@epam/ai-dial-ui-kit 0.9.0-dev.72 → 0.9.0-dev.73
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/dist/dial-ui-kit.cjs.js
CHANGED
|
@@ -63,7 +63,7 @@ See ${um(e,t)}`;return Array.isArray(i)?i.concat(n):[i,n]}var ZT={1:"Charting Ag
|
|
|
63
63
|
`)}checkProperties(e,t,s,i,o){const n=["__ob__","__v_skip","__metadata__"],r=C4(Object.getOwnPropertyNames(e),[...n,...t,...s],s),a=Object.keys(r);for(const l of a){const c=r[l];let d=`invalid ${i} property '${l}' did you mean any of these: ${c.slice(0,8).join(", ")}.`;s.includes("context")&&(d+=`
|
|
64
64
|
If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),Un(d)}if(a.length>0&&o){const l=this.beans.frameworkOverrides.getDocLink(o);Un(`to see all the valid ${i} properties please check: ${l}`)}}};function C4(e,t,s){const i={},o=e.filter(n=>!t.some(r=>r===n));if(o.length>0)for(const n of o)i[n]=Wd({inputValue:n,allSuggestions:s}).values;return i}var w4=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),b4={moduleName:"Validation",version:ee,beans:[v4]};function dC(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var x4=class extends O{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=["excludeChildrenWhenTreeDataFiltering"]}wireBeans(e){this.filterManager=e.filterManager}execute(e){const{changedPath:t}=e;this.filter(t)}filter(e){const t=!!this.filterManager?.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){const s=(i,o)=>{i.hasChildren()&&e&&!o?i.childrenAfterFilter=i.childrenAfterGroup.filter(n=>{const r=n.childrenAfterFilter&&n.childrenAfterFilter.length>0,a=n.data&&this.filterManager.doesRowPassFilter({rowNode:n});return r||a}):i.childrenAfterFilter=i.childrenAfterGroup,dC(i)};if(this.doingTreeDataFiltering()){const i=(n,r)=>{if(n.childrenAfterGroup)for(let a=0;a<n.childrenAfterGroup.length;a++){const l=n.childrenAfterGroup[a],c=r||this.filterManager.doesRowPassFilter({rowNode:l});l.childrenAfterGroup?i(n.childrenAfterGroup[a],c):s(l,c)}s(n,r)},o=n=>i(n,!1);t.executeFromRootNode(o)}else{const i=o=>s(o,!1);t.forEachChangedNodeDepthFirst(i,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},y4=class extends oh{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,s,i,o){this.comp=e;const n=wr(this,this.beans.context,o);this.eButtonShowMainFilter=s,this.eFloatingFilterBody=i,this.setGui(t,n),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(n),this.setupLeft(n),this.setupHover(n),this.setupFocus(n),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(n),this.setupUi(),n.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(n);const r=()=>this.onColDefChanged(n);n.addManagedListeners(this.column,{colDefChanged:r}),n.addManagedEventListeners({filterSwitched:({column:a})=>{a===this.column&&r()}}),n.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,s=e.colDef;return xe(t.gos,{colDef:s,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,s=!!e.floatingFilter;this.active=t&&s}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=es("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new ln(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.getLocaleTextFunc();$o(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(et(t)===this.eGui)return;const o=Qi(t,this.eGui,null,e.shiftKey);if(o){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),o.focus();return}const n=this.findNextColumnWithFloatingFilter(e.shiftKey);n&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:n},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let s=this.column;do if(s=e?t.getColBefore(s):t.getColAfter(s),!s)break;while(!s.getColDef().filter||!s.getColDef().floatingFilter);return s}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case I.UP:case I.DOWN:case I.LEFT:case I.RIGHT:if(t)return;_i(e);case I.ENTER:t&&ji(this.eGui)&&e.preventDefault();break;case I.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const s=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&ki(e.relatedTarget,"ag-floating-filter");if(s&&i&&e.target===this.eGui){const o=this.lastFocusEvent,n=!!(o&&o.key===I.TAB);if(o&&n){const r=o.shiftKey;ji(this.eGui,r)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new ih(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!Wt(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.colFilter?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{beans:{colFilter:t},column:s,gos:i}=this,o=n=>{if(n?.source==="filterDestroyed"&&(!this.isAlive()||!t?.isAlive()))return;const r=this.comp.getFloatingFilterComp();r&&r.then(a=>{if(a){if(i.get("enableFilterHandlers")){const d=n;let u="filter";d?.afterFloatingFilter?u="ui":d?.afterDataChange?u="dataChanged":n?.source==="api"&&(u="api"),this.updateFloatingFilterParams(this.userCompDetails,u);return}const l=t?.getCurrentFloatingFilterParentModel(s),c=n?{...n,columns:n.columns??[],source:n.source==="api"?"api":"columnFilter"}:null;a.onParentModelChanged(l,c)}})};[this.destroySyncListener]=e.addManagedListeners(s,{filterChanged:o}),t?.isFilterActive(s)&&o(null)}setupWidth(e){const t=()=>{const s=`${this.column.getActualWidth()}px`;this.comp.setWidth(s)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const s=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const i=this.beans.colFilter,o=this.active?i?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,n=this.comp.getFloatingFilterComp();!n||!o?this.updateCompDetails(e,o,s):n.then(r=>{!r||i?.areFilterCompsDifferent(this.userCompDetails??null,o)?this.updateCompDetails(e,o,s):this.updateFloatingFilterParams(o,"colDef")})}updateCompDetails(e,t,s){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),s&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){if(!e)return;let s=e.params;this.comp.getFloatingFilterComp()?.then(i=>{typeof i?.refresh=="function"&&(this.gos.get("enableFilterHandlers")&&(s={...s,model:pt(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),i.refresh(s))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function S4(e,t){const s=e.colModel.getCol(t);if(!s){Ve(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:s,positionBy:"auto"})}function R4(e){e.menuSvc?.hidePopupMenu()}var F4={moduleName:"SharedMenu",version:ee,beans:[$F],apiFunctions:{showColumnMenu:S4,hidePopupMenu:R4}},E4=class extends x2{postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getDefaultPopupParent(){return this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:s,event:i}=e,o=t.getBoundingClientRect(),n=this.getParentRect();this.setAlignedTo(t,s);let r=!1;const a=()=>{const l=this.keepXYWithinBounds(s,o.top-n.top,0),c=s.clientWidth>0?s.clientWidth:200;r||(s.style.minWidth=`${c}px`,r=!0);const u=n.right-n.left-c;let h;return this.gos.get("enableRtl")?(h=f(),h<0&&(h=p(),this.setAlignedStyles(s,"left")),h>u&&(h=0,this.setAlignedStyles(s,"right"))):(h=p(),h>u&&(h=f(),this.setAlignedStyles(s,"right")),h<0&&(h=0,this.setAlignedStyles(s,"left"))),{x:h,y:l};function p(){return o.right-n.left-2}function f(){return o.left-n.left-c}};this.positionPopup({ePopup:s,keepWithinBounds:!0,updatePosition:a,postProcessCallback:()=>this.callPostProcessPopup(e,"subMenu",s,t,i instanceof MouseEvent?i:void 0)})}callPostProcessPopup(e,t,s,i,o){const n=this.gos.getCallback("postProcessPopup");if(n){const{column:r,rowNode:a}=e;n({column:r,rowNode:a,ePopup:s,type:t,eventSource:i,mouseEvent:o})}}getActivePopups(){return this.popupList.map(e=>e.element)}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const s of this.popupList)t.applyThemeClasses(s.wrapper)}}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return Vs(e)}},Al={moduleName:"Popup",version:ee,beans:[E4]},D4=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper,:where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}:where(.ag-floating-filter-full-body)>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function P4(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function T4(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function k4(e,t){const s=e.colModel.getColDefCol(t);if(s)return e.colFilter?.destroyFilter(s,"api")}function M4(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function I4(e){return e.filterManager?.getFilterModel()??{}}function A4(e,t,s){const{gos:i,colModel:o,colFilter:n}=e;s&&!i.get("enableFilterHandlers")&&($(288),s=!1);const r=o.getColDefCol(t);return r?n?.getModelForColumn(r,s)??null:null}function L4(e,t,s){return e.filterManager?.setColumnFilterModel(t,s)??Promise.resolve()}function O4(e,t){const s=e.colModel.getCol(t);if(!s){Ve(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:s,containerType:"columnFilter",positionBy:"auto"})}function N4(e){e.menuSvc?.hideFilterMenu()}function H4(e,t){const s=e.colModel.getCol(t);if(!s){Ve(12,{colKey:t});return}return e.colFilter?.getHandler(s,!0)}function G4(e,t){const{colModel:s,colFilter:i,gos:o}=e;if(!o.get("enableFilterHandlers")){$(287);return}const{colId:n,action:r}=t;if(n){const a=s.getColById(n);a&&i?.updateModel(a,r)}else i?.updateAllModels(r)}var B4={filterHandler:()=>({doesFilterPass:()=>!0})},V4=class extends O{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...iv},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)});const e=this.gos,t={...e.get("initialState")?.filter?.filterModel??{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",s){const{colModel:i,dataTypeSvc:o,filterManager:n}=this.beans;if(o?.isPendingInference){this.modelUpdates.push({model:e,source:t});return}const r=[],a=this.getModel(!0);if(e){const l=new Set(Object.keys(e));this.allColumnFilters.forEach((c,d)=>{const u=e[d];r.push(this.setModelOnFilterWrapper(c,u)),l.delete(d)}),l.forEach(c=>{const d=i.getColDefCol(c)||i.getCol(c);if(!d){$(62,{colId:c});return}if(!d.isFilterAllowed()){$(63,{colId:c});return}const u=this.getOrCreateFilterWrapper(d,!0);if(!u){$(64,{colId:c});return}r.push(this.setModelOnFilterWrapper(u,e[c],!0))})}else this.model={},this.allColumnFilters.forEach(l=>{r.push(this.setModelOnFilterWrapper(l,null))});Le.all(r).then(()=>{const l=this.getModel(!0),c=[];this.allColumnFilters.forEach((d,u)=>{const h=a?a[u]:null,p=l?l[u]:null;tr(h,p)||c.push(d.column)}),c.length>0?n?.onFilterChanged({columns:c,source:t}):s&&this.updateActive("filterChanged")})}getModel(e){const t={},{allColumnFilters:s,initialModel:i,beans:{colModel:o}}=this;if(s.forEach((n,r)=>{const a=this.getModelFromFilterWrapper(n);te(a)&&(t[r]=a)}),!e)for(const n of Object.keys(i)){const r=i[n];te(r)&&!s.has(n)&&o.getCol(n)?.isFilterAllowed()&&(t[n]=r)}return t}setState(e,t,s="api"){if(this.state.clear(),t)for(const i of Object.keys(t)){const o=t[i];this.state.set(i,{model:pt(this.model,i),state:o})}this.setModel(e,s,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let s=!1;return e.forEach((i,o)=>{const n=i.state;n!=null&&(s=!0,t[o]=n)}),s?t:void 0}getModelFromFilterWrapper(e){const s=e.column.getColId();if(e.isHandler)return pt(this.model,s);const i=e.filter;return i?typeof i.getModel!="function"?($(66),null):i.getModel():pt(this.initialModel,s)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){const e=c=>c?c.isFilterActive?c.isFilterActive():($(67),!1):!1,{colModel:t,gos:s}=this.beans,i=!!Od(s),o=c=>{if(!c.isPrimary())return!0;const u=!t.isPivotActive();return!c.isValueActive()||!u?!1:t.isPivotMode()?!0:i},n=[],r=[],a=(c,d,u)=>{d&&(o(c)?n.push(u):r.push(u))},l=[];return this.allColumnFilters.forEach(c=>{const d=c.column,u=d.getColId();if(c.isHandler)l.push(Le.resolve().then(()=>{a(d,this.isHandlerActive(d),{colId:u,isHandler:!0,handler:c.handler,handlerParams:c.handlerParams})}));else{const h=Qs(c);h&&l.push(h.then(p=>{a(d,e(p),{colId:u,isHandler:!1,comp:p})}))}}),Le.all(l).then(()=>{this.activeAggregateFilters=n,this.activeColumnFilters=r})}updateFilterFlagInColumns(e,t){const s=[];return this.allColumnFilters.forEach(i=>{const o=i.column;if(i.isHandler)s.push(Le.resolve().then(()=>{this.setColFilterActive(o,this.isHandlerActive(o),e,t)}));else{const n=Qs(i);n&&s.push(n.then(r=>{this.setColFilterActive(o,r.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),Le.all(s)}doFiltersPass(e,t,s){const{data:i,aggData:o}=e,n=s?this.activeAggregateFilters:this.activeColumnFilters,r=s?o:i,a=this.model;for(let l=0;l<n.length;l++){const c=n[l],{colId:d,isHandler:u}=c;if(d!==t)if(u){const{handler:h,handlerParams:p}=c;if(!h.doesFilterPass({node:e,data:r,model:pt(a,d),handlerParams:p}))return!1}else{const h=c.comp;if(typeof h.doesFilterPass!="function"){Ve(91);continue}if(!h.doesFilterPass({node:e,data:r}))return!1}}return!0}getHandlerParams(e){const t=this.allColumnFilters.get(e.getColId());return t?.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:s}=this.beans,i=()=>{this.isAlive()&&s?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(i,0):i()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:s}=e,i=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",s).then(()=>{this.allColumnFilters.forEach(o=>{const{column:n,isHandler:r}=o;i!==n.getColId()&&(r&&o.handler.onAnyFilterChanged?.(),Qs(o,r)?.then(a=>{typeof a?.onAnyFilterChanged=="function"&&a.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(s=>{const i=s.isHandler;i&&s.handler.onNewRowsLoaded?.();const o=Qs(s,i);o&&t.push(o.then(n=>{n.onNewRowsLoaded?.()}))}),Le.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:s,colModel:i}=this.beans;return(o,n)=>{const r=n?i.getCol(n):e;return r?s.getValue(r,o,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);const s=t?.filter;return s?s.isFilterActive():pt(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=te(pt(this.model,e.getColId()));if(t)return t;const s=this.beans.groupFilter;return s?.isGroupFilter(e)?s.isFilterActive(e):!1}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?Qs(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const s=Qs(t);return s?s.then(i=>({comp:i,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const s=this.getOrCreateFilterWrapper(e,t);return s?.isHandler?s.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let s=this.cachedFilter(e);return!s&&t&&(s=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,s)),s}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>this.beans.dataTypeSvc?.getBaseDataType(e),t)}getDefaultFilterFromDataType(e,t=!1){return tS(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":U2(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,s,i,o,n){const r=()=>{const c=this.createFilterCompParams(e,o,n),d=i(c,o);return rR(this.beans.userCompFactory,t,d,s)},a=r();return a?{compDetails:a,createFilterUi:c=>(c?r():a).newAgStackInstance()}:null}createFilterInstance(e,t,s,i){const o=this.beans.selectableFilter;o?.isSelectable(t)&&(t=o.getFilterDef(e,t));const{handler:n,handlerParams:r,handlerGenerator:a}=this.createHandler(e,t,s)??{},l=this.createFilterComp(e,t,s,i,!!n,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:n,handlerGenerator:a,handlerParams:r};const{compDetails:c,createFilterUi:d}=l;return this.isGlobalButtons&&(c.params?.buttons?.length||$(281,{colId:e.getColId()})),{compDetails:c,handler:n,handlerGenerator:a,handlerParams:r,createFilterUi:d}}createBaseFilterParams(e,t){const{filterManager:s,rowModel:i}=this.beans;return xe(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:o=>s?.doesRowPassOtherFilters(e.getColId(),o)??!0,rowModel:i})}createFilterCompParams(e,t,s,i){const o=this.filterChangedCallbackFactory(e),n=this.createBaseFilterParams(e,i);if(n.filterChangedCallback=o,n.filterModifiedCallback=i?()=>{}:r=>this.filterModified(e,r),t){const r=n,a=e.getColId(),l=pt(this.model,a);r.model=l,r.state=this.state.get(a)??{model:l},r.onModelChange=(c,d)=>{this.updateStoredModel(a,c),this.refreshHandlerAndUi(e,c,"ui",!1,d).then(()=>{o({...d,source:"columnFilter"})})},r.onStateChange=c=>{this.updateState(e,c),this.updateOrRefreshFilterUi(e)},r.onAction=(c,d,u)=>{this.updateModel(e,c,d),this.dispatchLocalEvent({type:"filterAction",column:e,action:c,event:u})},r.getHandler=()=>this.getHandler(e,!0),r.onUiChange=c=>this.filterUiChanged(e,c),r.source=s}return n}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,s){const i=t(),o={created:!0,create:t,filterParams:e.params,compDetails:e,promise:i};return i.then(s),o}createFilterWrapper(e){const{compDetails:t,handler:s,handlerGenerator:i,handlerParams:o,createFilterUi:n}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),a=>a),r=e.getColId();if(s)return delete this.initialModel[r],s.init?.({...o,source:"init",model:pt(this.model,r)}),{column:e,isHandler:!0,handler:s,handlerGenerator:i,handlerParams:o,filterUi:this.createFilterUiForHandler(t,n)};if(n){const a={column:e,filterUi:null,isHandler:!1};return a.filterUi=this.createFilterUiLegacy(t,n,l=>{a.filter=l??void 0}),a}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,s){const{gos:i,frameworkOverrides:o,registry:n}=this.beans;let r;const a=p=>{const f=p.filter;if(Im(f)){const v=f.handler;return v||(r=f.doesFilterPass,r?()=>({doesFilterPass:r}):void 0)}return typeof f=="string"?f:void 0},l=i.get("enableFilterHandlers"),c=l?a(t):void 0,d=p=>()=>this.createBean(n.createDynamicBean(p,!0));let u,h;if(typeof c=="string"){const p=i.get("filterHandlers")?.[c];p!=null?u=p:A2.has(c)&&(u=d(c),h=c)}else u=c;if(!u){let p;const{compName:f,jsComp:v,fwComp:C}=Om(o,t);f?p=f:v==null&&C==null&&t.filter===!0&&(p=s),h=this.handlerMap[p],h&&(u=d(h))}return u?{filterHandler:u,handlerNameOrCallback:r??h}:l?(st(i)&&$(277,{colId:e.getColId()}),B4):void 0}createHandler(e,t,s){const i=this.createHandlerFunc(e,t,s);if(!i)return;const o=Fc(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:n,filterHandler:r}=i,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,r,o);return{handler:a,handlerParams:l,handlerGenerator:n??r}}createHandlerFromFunc(e,t,s){const i=e.getColDef(),o=t(xe(this.gos,{column:e,colDef:i})),n=this.createHandlerParams(e,s);return{handler:o,handlerParams:n}}createHandlerParams(e,t){const s=e.getColDef(),i=e.getColId(),o=this.filterChangedCallbackFactory(e);return xe(this.gos,{colDef:s,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:n=>this.beans.filterManager?.doesRowPassOtherFilters(i,n)??!0,onModelChange:(n,r)=>{this.updateStoredModel(i,n),this.refreshHandlerAndUi(e,n,"handler",!1,r).then(()=>{o({...r,source:"columnFilter"})})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:s,groupFilter:i}=this.beans;this.allColumnFilters.forEach((n,r)=>{let a;n.column.isPrimary()?a=t.getColDefCol(r):a=t.getCol(r),!(a&&a===n.column)&&(e.push(n.column),this.disposeFilterWrapper(n,"columnChanged"),this.disposeColumnListener(r))});const o=i&&e.every(n=>i.isGroupFilter(n));e.length>0&&!o&&s?.onFilterChanged({columns:e,source:"api"})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const s=this.beans.groupFilter;return s?.isGroupFilter(e)?s.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){const{userCompFactory:s,frameworkOverrides:i,selectableFilter:o}=this.beans,n=h=>{const p=this.getOrCreateFilterUi(e);p?.then(f=>{h(lr(f))})},r=e.getColDef(),a=o?.isSelectable(r)?o.getFilterDef(e,r):r,l=X2(i,a,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",c=this.gos.get("enableFilterHandlers"),d=Fc(s,a,this.createFilterCompParams(e,c,"init",!0)),u=xe(this.gos,{column:e,filterParams:d,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:n,showParentFilter:t});if(c){const h=u,p=e.getColId(),f=this.filterChangedCallbackFactory(e);h.onUiChange=v=>this.floatingFilterUiChanged(e,v),h.model=pt(this.model,p),h.onModelChange=(v,C)=>{this.updateStoredModel(p,v),this.refreshHandlerAndUi(e,v,"floating",!0,C).then(()=>{f({...C,source:"columnFilter"})})},h.getHandler=()=>this.getHandler(e,!0),h.source="init"}return uR(s,r,u,l)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,s,i){const o="paramsUpdated";if(e.isHandler){const n=t.getColId();delete this.initialModel[n],this.state.delete(n);const r=e.filterUi,a=this.createFilterUiForHandler(s,i);e.filterUi=a;const l=this.eventSvc;r?.created?r.promise.then(c=>{this.destroyBean(c),l.dispatchEvent({type:"filterDestroyed",source:o,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:o,column:t})}else this.destroyFilter(t,o)}destroyFilter(e,t="api"){const s=e.getColId(),i=this.allColumnFilters.get(s);this.disposeColumnListener(s),delete this.initialModel[s],i&&this.disposeFilterWrapper(i,t).then(o=>{o&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"})})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let s=!1;const{column:i,isHandler:o,filterUi:n}=e,r=i.getColId();o&&(s=this.isHandlerActive(i),this.destroyBean(e.handler),delete this.model[r],this.state.delete(r));const a=()=>{this.setColFilterActive(i,!1,"filterDestroyed"),this.allColumnFilters.delete(r),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:i})};if(n){if(n.created)return n.promise.then(l=>(s=o?s:!!l?.isFilterActive(),this.destroyBean(l),a(),s));a()}return Le.resolve(s)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??"columnFilter"})}}filterParamsChanged(e,t="api"){const s=this.allColumnFilters.get(e);if(!s)return;const i=this.beans,o=s.column,n=o.getColDef(),r=o.isFilterAllowed(),a=this.getDefaultFilter(o),l=i.selectableFilter,c=l?.isSelectable(n)?l.getFilterDef(o,n):n,d=r?this.createHandlerFunc(o,c,this.getDefaultFilter(o)):void 0,u=!!d,h=s.isHandler;if(h!=u){this.destroyFilter(o,"paramsUpdated");return}const{compDetails:p,createFilterUi:f}=(r?this.createFilterComp(o,c,a,C=>C,u,"colDef"):null)??{compDetails:null,createFilterUi:null},v=p?.params??Fc(i.userCompFactory,c,this.createFilterCompParams(o,u,"colDef"));if(h){const C=d?.handlerNameOrCallback??d?.filterHandler,w=pt(this.model,e);if(s.handlerGenerator!=C){const b=s.handler,{handler:x,handlerParams:y}=this.createHandlerFromFunc(o,d.filterHandler,v);s.handler=x,s.handlerParams=y,s.handlerGenerator=C,delete this.model[e],x.init?.({...y,source:"init",model:null}),this.destroyBean(b),w!=null&&this.beans.filterManager?.onFilterChanged({columns:[o],source:t})}else{const b=this.createHandlerParams(o,p?.params);s.handlerParams=b,s.handler.refresh?.({...b,source:"colDef",model:w})}}if(this.areFilterCompsDifferent(s.filterUi?.compDetails??null,p)||!s.filterUi||!p){this.destroyFilterUi(s,o,p,f);return}s.filterUi.filterParams=v,Qs(s,h)?.then(C=>{(C?.refresh?C.refresh(v):!0)===!1?this.destroyFilterUi(s,o,p,f):this.dispatchLocalEvent({type:"filterParamsChanged",column:o,params:v})})}refreshHandlerAndUi(e,t,s,i,o){const n=this.cachedFilter(e);if(!n)return i&&this.getOrCreateFilterWrapper(e,!0),Le.resolve();if(!n.isHandler)return Le.resolve();const{filterUi:r,handler:a,handlerParams:l}=n;return L2(()=>{if(r){const{created:c,filterParams:d}=r;if(c)return r.promise.then(u=>u?{filter:u,filterParams:d}:void 0);r.refreshed=!0}return Le.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},s,o)}setColumnFilterWrapper(e,t){const s=e.getColId();this.allColumnFilters.set(s,t),this.allColumnListeners.set(s,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(s)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:s}=e,{componentClass:i}=t;return!(s===i||s?.render&&i?.render&&s.render===i.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){const t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);const s=this.getOrCreateFilterUi(t);return s?new Promise(i=>{s.then(o=>{i(lr(o))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:s})=>{this.setModelForColumn(e,t).then(()=>s())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:i,model:o}=this,n=e.getColId(),r=i.get(n);return r?r.model??null:pt(o,n)}const s=this.cachedFilter(e);return s?this.getModelFromFilterWrapper(s):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let s=()=>{};const i=new Promise(o=>{s=o});return this.columnModelUpdates.push({key:e,model:t,resolve:s}),i}return new Promise(s=>{this.setModelForColumnLegacy(e,t).then(i=>s(i))})}getStateForColumn(e){return this.state.get(e)??{model:pt(this.model,e)}}setModelForColumnLegacy(e,t){const s=this.beans.colModel.getColDefCol(e),i=s?this.getOrCreateFilterWrapper(s,!0):null;return i?this.setModelOnFilterWrapper(i,t):Le.resolve()}setColDefPropsForDataType(e,t,s){const i=e.filter,o=i===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):i;if(typeof o!="string")return;let n,r;const a=this.beans,{filterParams:l,filterValueGetter:c}=e;o==="agMultiColumnFilter"?{filterParams:n,filterValueGetter:r}=a.multiFilter?.getParamsForDataType(l,c,t,s)??{}:{filterParams:n,filterValueGetter:r}=W2(o,l,c,t,s,a,this.getLocaleTextFunc()),e.filterParams=n,r&&(e.filterValueGetter=r)}setColFilterActive(e,t,s,i){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",s)),e.dispatchColEvent("filterChanged",s,i)}setModelOnFilterWrapper(e,t,s){return new Le(i=>{if(e.isHandler){const n=e.column,r=n.getColId(),a=this.model[r];if(this.updateStoredModel(r,t),s&&t===a){i();return}this.refreshHandlerAndUi(n,t,"api").then(()=>i());return}const o=Qs(e);if(o){o.then(n=>{if(typeof n?.setModel!="function"){$(65),i();return}(n.setModel(t)||Le.resolve()).then(()=>i())});return}i()})}updateStoredModel(e,t){te(t)?this.model[e]=t:delete this.model[e];const s=this.state.get(e),i={model:t,state:s?.state};this.state.set(e,i)}filterModified(e,t){this.getOrCreateFilterUi(e)?.then(s=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:s,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,s){const i=e.getColId(),o=this.cachedFilter(e),n=()=>o?.filterUi;Np(t,n,()=>pt(this.model,i),()=>this.state.get(i),r=>this.updateState(e,r),r=>n()?.filterParams?.onModelChange(r,s),o?.isHandler?o.handler.processModelToApply?.bind(o.handler):void 0)}updateAllModels(e,t){const s=[];this.allColumnFilters.forEach((i,o)=>{const n=this.beans.colModel.getColDefCol(o);n&&Np(e,()=>i.filterUi,()=>pt(this.model,o),()=>this.state.get(o),r=>this.updateState(n,r),r=>{this.updateStoredModel(o,r),this.dispatchLocalEvent({type:"filterAction",column:n,action:e}),s.push(this.refreshHandlerAndUi(n,r,"ui"))},i?.isHandler?i.handler.processModelToApply?.bind(i.handler):void 0)}),s.length&&Le.all(s).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();nv(()=>this.cachedFilter(e)?.filterUi,()=>pt(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:s}=this;for(const o of s)if(o.source==="COLUMN_MENU")return!1;let i=!1;for(const o of e.keys()){const n=e.get(o);if(n.valid===!1)return!1;(n.model??null)!==pt(t,o)&&(i=!0)}return i}hasUnappliedModel(e){const{model:t,state:s}=this;return(s.get(e)?.model??null)!==pt(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;const s=this.beans.filterPanelSvc;return s?.isActive?!!s.getState(e.getColId()):!1}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function z4(e){return!!e.filterManager?.isAnyFilterPresent()}function W4(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var j4=class extends O{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:i})=>this.onAdvFilterEnabledChanged(i),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:s}=this;this.alwaysPassFilter=s.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=s.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,s="api"){this.isAdvFilterEnabled()||this.colFilter?.setState(e,t,s)}setFilterModel(e,t="api",s){if(this.isAdvFilterEnabled()){s||this.warnAdvFilters();return}this.colFilter?.setModel(e,t)}getFilterModel(){return this.colFilter?.getModel()??{}}getFilterState(){return this.colFilter?.getState()}isColumnFilterPresent(){return!!this.colFilter?.isFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){Od(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:s,columns:i=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):Le.resolve()).then(()=>{const o={source:t,type:"filterChanged",columns:i};s&&Et(o,s),this.eventSvc.dispatchEvent(o),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!Od(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,colIdToSkip:e})}doesRowPassAggregateFilters(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterAllowed(e){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.isFilterAllowed(e)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){$(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(const e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setModelForColumn(e,t)??Promise.resolve()}},_4=class extends O{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,s,i){e&&!e.isColumn||this.showPopup(e,o=>{this.popupSvc?.positionPopupUnderMouseEvent({column:e,type:s,mouseEvent:t,ePopup:o})},s,t.target,Wt(this.gos),i)}showMenuAfterButtonClick(e,t,s,i){if(e&&!e.isColumn)return;let o=-1,n="left";const r=Wt(this.gos);!r&&this.gos.get("enableRtl")&&(o=1,n="right");const a=r?void 0:4*o,l=r?void 0:4;this.showPopup(e,c=>{this.popupSvc?.positionPopupByComponent({type:s,eventSource:t,ePopup:c,nudgeX:a,nudgeY:l,alignSide:n,keepWithinBounds:!0,position:"under",column:e})},s,t,r,i)}showPopup(e,t,s,i,o,n){const r=e?this.createBean(new V2(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!e){Ve(57);return}const a=Pt({tag:"div",cls:`ag-menu${o?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:v=>this.trapFocusWithin(v,a)}),a.appendChild(r?.getGui());let l;const c=()=>r?.afterGuiDetached(),d=sS(this.gos)?i??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,u=v=>{_p(e,!1,"contextMenu");const C=v instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),C&&i&&_s(i)&&zm(i)?.focus({preventScroll:!0}),c(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,s,e),n?.()},h=this.getLocaleTextFunc(),p=o&&s!=="columnFilter"?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),f=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:u,positionCallback:()=>t(a),anchorToElement:d,ariaLabel:p});f&&(this.hidePopup=l=f.hideFunc),r.afterInit().then(()=>{t(a),r.afterGuiAttached({container:s,hidePopup:l})}),_p(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,s,e)}trapFocusWithin(e,t){e.key!==I.TAB||e.defaultPrevented||Qi(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),ji(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,s){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:s??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},U4=class extends O{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,s){if(!t)return;const i=e.getColDef(),{selectableFilter:o,valueSvc:n}=this.beans,r=s??o?.getFilterValueGetter(e.getColId())??i.filterValueGetter;return r?this.executeFilterValueGetter(r,t.data,e,t,i):n.getValue(e,t)}executeFilterValueGetter(e,t,s,i,o){const{expressionSvc:n,valueSvc:r}=this.beans,a=xe(this.gos,{data:t,node:i,column:s,colDef:o,getValue:r.getValueCallback.bind(r,i)});return typeof e=="function"?e(a):n?.evaluate(e,a)}},$4={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},q4=class extends tt{constructor(){super($4,[Dl]),this.eFloatingFilterText=we}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const s=e,i=s.getHandler();if(i.getModelAsString){const o=i.getModelAsString(s.model);this.eFloatingFilterText.setValue(o)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const s=t.getModelAsString(e);this.eFloatingFilterText.setValue(s)}})}refresh(e){this.init(e)}},uh=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const s=e.filterOptions??t;this.filterOptions!==s&&(this.filterOptions=s,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e){if(typeof t=="string")continue;const s=[["displayKey"],["displayName"],["predicate","test"]],i=o=>o.some(n=>t[n]!=null)?!0:($(72,{keys:o}),!1);if(!s.every(i)){this.filterOptions=e.filter(o=>o===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const s=t[0];if(typeof s=="string")return s;if(s.displayKey)return s.displayKey;$(73)}else $(74)}getCustomOption(e){return this.customFilterOptions[e]}};function Xn(e,t,s){return s==null?e.splice(t):e.splice(t,s)}function cl(e){return e==null||typeof e=="string"&&e.trim().length===0}function K4(e){return e==="AND"||e==="OR"?e:"AND"}function Y4(e,t,s){if(e==null)return;const{predicate:i}=e;if(i!=null&&!t.some(o=>o==null))return i(t,s)}function X4(e,t){let s=e.length;return s>t&&(e.splice(t),$(78),s=t),s}function hr(e,t){const s=t.getCustomOption(e);if(s){const{numberOfInputs:o}=s;return o??1}return e&&["empty","notBlank","blank"].indexOf(e)>=0?0:e==="inRange"?2:1}var hh=class extends Y2{constructor(e,t,s){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=s,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(e){super.setParams(e);const t=new uh;this.optionsFactory=t,t.init(e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e)}commonUpdateSimpleParams(e){this.setNumConditions(e),this.defaultJoinOperator=K4(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions();const t=this.getGui();this.isReadOnly()?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,s)=>{const i=s===0?e:this.optionsFactory.defaultOption;t.setValue(i,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const s=!e.operator,i=!t.operator;if(!s&&i||s&&!i)return!1;let n;if(s){const r=e,a=t;n=this.areSimpleModelsEqual(r,a)}else{const r=e,a=t;n=r.operator===a.operator&&pi(r.conditions,a.conditions,(l,c)=>this.areSimpleModelsEqual(l,c))}return n}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),Le.resolve();if(e.operator){const i=e;let o=i.conditions;o==null&&(o=[],$(77));const n=X4(o,this.maxNumConditions),r=this.getNumConditions();if(n<r)this.removeConditionsAndOperators(n);else if(n>r)for(let l=r;l<n;l++)this.createJoinOperatorPanel(),this.createOption();const a=i.operator==="OR";this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),o.forEach((l,c)=>{this.eTypes[c].setValue(l.type,!0),this.setConditionIntoUi(l,c)})}else{const i=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(i.type,!0),this.setConditionIntoUi(i,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),Le.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&($(79),t=1),this.maxNumConditions=t;let s=e.numAlwaysVisibleConditions??1;s<1&&($(80),s=1),s>t&&($(81),s=t),this.numAlwaysVisibleConditions=s}createOption(){const e=this.getGui(),t=this.createManagedBean(new $u);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const s=this.createEValue();this.eConditionBodies.push(s),e.appendChild(s),this.putOptionsIntoDropdown(t),this.resetType(t);const i=this.getNumConditions()-1;this.forEachPositionInput(i,o=>this.resetInput(o)),this.addChangedListeners(t,i)}createJoinOperatorPanel(){const e=Pt({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),s=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const i=this.eJoinPanels.length-1,o=this.joinOperatorId++;this.resetJoinOperatorAnd(t,i,o),this.resetJoinOperatorOr(s,i,o),this.isReadOnly()||(t.onValueChange(this.listener),s.onValueChange(this.listener))}createJoinOperator(e,t,s){const i=this.createManagedBean(new ER);e.push(i);const o="ag-filter-condition-operator";return i.addCss(o),i.addCss(`${o}-${s}`),t.appendChild(i.getGui()),i}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const s of t)e.addOption(s);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,s=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:s?this.getLocaleTextFunc()(s.displayKey,s.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let s=0;s<this.getNumConditions();s++)this.isConditionUiComplete(s)?e=s:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const s=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<s){this.removeConditionsAndOperators(s+1);const i=e+1,o=s-i;o>0&&this.removeConditionsAndOperators(i,o),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((i,o)=>{const n=this.isConditionDisabled(o,e);i.setDisabled(n||this.filterListOptions.length<=1),o===1&&(ir(this.eJoinPanels[0],n),this.eJoinAnds[0].setDisabled(n),this.eJoinOrs[0].setDisabled(n))}),this.eConditionBodies.forEach((i,o)=>{Je(i,this.isConditionBodyVisible(o))});const s=(t??this.getJoinOperator())==="OR";for(const i of this.eJoinAnds)i.setValue(!s,!0);for(const i of this.eJoinOrs)i.setValue(s,!0);this.forEachInput((i,o,n,r)=>{this.setElementDisplayed(i,o<r),this.setElementDisabled(i,this.isConditionDisabled(n,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:s,eConditionBodies:i,eJoinPanels:o,eJoinAnds:n,eJoinOrs:r}=this;this.removeComponents(s,e,t),this.removeElements(i,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(o,a,t),this.removeComponents(n,a,t),this.removeComponents(r,a,t)}removeElements(e,t,s){const i=Xn(e,t,s);for(const o of i)ai(o)}removeComponents(e,t,s){const i=Xn(e,t,s);for(const o of i)ai(o.getGui()),this.destroyBean(o)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let t;if(!this.isReadOnly()){const s=this.getInputs(0)[0];s instanceof Ei&&this.isConditionBodyVisible(0)?t=s.getInputElement():t=this.eTypes[0]?.getFocusableElement()}(t??this.getGui()).focus({preventScroll:!0})}}afterGuiDetached(){super.afterGuiDetached();const e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column))return;e.onStateChange({model:e.model});let t=-1,s=-1,i=!1;const o=this.getJoinOperator();for(let r=this.getNumConditions()-1;r>=0;r--)if(this.isConditionUiComplete(r))t===-1&&(t=r,s=r);else{const a=r>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(r-1),l=r<t;(a||l)&&(this.removeConditionsAndOperators(r,1),i=!0,l&&s--)}let n=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),n=!0),this.shouldAddNewConditionAtEnd(s===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),n=!0),n&&this.updateConditionStatusesAndValues(s,o),i&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=s}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??""}getPlaceholderText(e,t){let s=this.translate(e);if(typeof this.filterPlaceholder=="function"){const i=this.eTypes[t].getValue(),o=this.translate(i);s=this.filterPlaceholder({filterOptionKey:i,filterOption:o,placeholder:s})}else typeof this.filterPlaceholder=="string"&&(s=this.filterPlaceholder);return s}resetPlaceholder(){const e=this.getLocaleTextFunc();this.forEachInput((t,s,i,o)=>{if(!(t instanceof Ei))return;const n=s===0&&o>1?"inRangeStart":s===0?"filterOoo":"inRangeEnd",r=s===0&&o>1?e("ariaFilterFromValue","Filter from value"):s===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(n,i)),t.setInputAriaLabel(r)})}setElementValue(e,t,s){e instanceof Ei&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){Fp(e)&&Je(e.getGui(),t)}setElementDisabled(e,t){Fp(e)&&ir(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Ei&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,s)=>{this.forEachPositionTypeInput(s,t,e)})}forEachPositionInput(e,t){const s=this.getConditionType(e);this.forEachPositionTypeInput(e,s,t)}forEachPositionTypeInput(e,t,s){const i=hr(t,this.optionsFactory),o=this.getInputs(e);for(let n=0;n<o.length;n++){const r=o[n];r!=null&&s(r,n,e,i)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return hr(t,this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(s=>s==null))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinAnds.forEach((t,s)=>this.resetJoinOperatorAnd(t,s,this.joinOperatorId+s)),this.eJoinOrs.forEach((t,s)=>this.resetJoinOperatorOr(t,s,this.joinOperatorId+s)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const s=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(s).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,s){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),s)}resetJoinOperatorOr(e,t,s){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),s)}resetJoinOperator(e,t,s,i,o){this.updateJoinOperatorDisabled(e.setValue(s,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${o}`).setLabel(i),t)}updateJoinOperatorsDisabled(){const e=(t,s)=>this.updateJoinOperatorDisabled(t,s);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const s=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((i,o,n)=>{n===t&&this.setElementValue(i,s[o]!=null?s[o]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,s,i)=>{this.setElementValue(t,s===0&&i===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,s=>{this.attachElementOnChange(s,this.listener)}))}hasInvalidInputs(){return!1}isReadOnly(){return!!this.params.readOnly}},uC=class{constructor(e,t,s,i,o,n){this.alive=!0,this.context=e,this.eParent=o;const r=aR(t,s,i);r&&r.newAgStackInstance().then(a=>{if(!this.alive){e.destroyBean(a);return}if(this.dateComp=a,!a)return;o.appendChild(a.getGui()),a?.afterGuiAttached?.();const{tempValue:l,disabled:c}=this;l&&a.setDate(l),c!=null&&a.setDisabled?.(c),n?.(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){const t=this.dateComp;t?t.setDisabled?.(e):this.disabled=e}setDisplayed(e){Je(this.eParent,e)}setInputPlaceholder(e){this.dateComp?.setInputPlaceholder?.(e)}setInputAriaLabel(e){this.dateComp?.setInputAriaLabel?.(e)}afterGuiAttached(e){this.dateComp?.afterGuiAttached?.(e)}updateParams(e){this.dateComp?.refresh?.(e)}},ph=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function hC(e,t){const{dateFrom:s,dateTo:i,type:o}=e||{};return[s&&Nt(s,void 0,!0)||null,i&&Nt(i,void 0,!0)||null].slice(0,hr(o,t))}var Fg=1e3,Eg=1/0,Z4=class extends hh{constructor(){super("dateFilter",hC,ph),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=Fg,this.maxValidYear=Eg,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(l,c)=>{const d=e[l];if(d!=null)if(isNaN(d))$(82,{param:l});else return d==null?c:Number(d);return c},s=t("minValidYear",Fg),i=t("maxValidYear",Eg);this.minValidYear=s,this.maxValidYear=i,s>i&&$(83);const{minValidDate:o,maxValidDate:n}=e,r=o instanceof Date?o:Nt(o);this.minValidDate=r;const a=n instanceof Date?n:Nt(n);this.maxValidDate=a,r&&a&&r>a&&$(84)}createDateCompWrapper(e){const{beans:{userCompFactory:t,context:s,gos:i},params:o}=this,n=new uC(s,t,o.colDef,xe(i,{onDateChanged:()=>this.onUiChanged(),filterParams:o,location:"filter"}),e);return this.addDestroyFunc(()=>n.destroy()),n}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=Pt({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,s,i){const o=Pt({tag:"div",cls:`ag-filter-${i} ag-filter-date-${i}`});t.push(o),e.appendChild(o),s.push(this.createDateCompWrapper(o))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),Xn(this.eConditionPanelsFrom,e,t),Xn(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,s){const i=Xn(e,t,s);for(const o of i)o.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:s,minValidYear:i,maxValidYear:o}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<i)return!1;if(s){if(e>s)return!1}else if(e.getUTCFullYear()>o)return!1;return!0}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachInput((s,i,o,n)=>{o!==e||!t||i>=n||(t=t&&this.isValidDateValue(s.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),s={},i=this.getValues(e),o=this.params.useIsoSeparator?"T":" ";return i.length>0&&(s.dateFrom=jt(i[0],!0,o)),i.length>1&&(s.dateTo=jt(i[1],!0,o)),{dateFrom:null,dateTo:null,filterType:this.filterType,type:t,...s}}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),s=e("ariaFilterValue","Filter Value");this.forEachInput(i=>{i.setInputPlaceholder(t),i.setInputAriaLabel(s)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:s}=this;return e>=t.length?[null,null]:[t[e],s[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(s,i,o,n)=>{i<n&&t.push(s.getDate())}),t}translate(e){return e==="lessThan"?super.translate("before"):e==="greaterThan"?super.translate("after"):super.translate(e)}},pC=class extends O{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,s=new uh;this.optionsFactory=s,s.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(s,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source==="colDef"){const t=e.filterParams,s=this.optionsFactory;s.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:s,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(t==null)return!0;const{operator:s}=t,i=[];if(s){const r=t;i.push(...r.conditions??[])}else i.push(t);const o=s&&s==="OR"?"some":"every",n=this.params.getValue(e.node);return i[o](r=>this.individualConditionPasses(e,r,n))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:s,maxNumConditions:i}}=e;if(t==null)return;let n=lv(t)?t.conditions:[t];const r=s?.map(d=>typeof d=="string"?d:d.displayKey)??this.defaultOptions;if(!(!n||n.every(d=>r.find(u=>u===d.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let l=!1;const c=this.filterType;if((n&&!n.every(d=>d.filterType===c)||t.filterType!==c)&&(n=n.map(d=>({...d,filterType:c})),l=!0),typeof i=="number"&&n&&n.length>i&&(n=n.slice(0,i),l=!0),l){const d=n.length>1?{...t,filterType:c,conditions:n}:{...n[0],filterType:c};this.params={...e,model:d},e.onModelChange(d)}}individualConditionPasses(e,t,s){const i=this.optionsFactory,o=this.mapValuesFromModel(t,i),n=i.getCustomOption(t.type),r=Y4(n,o,s);return r??(s==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(o,s,t,e))}},gC=class extends pC{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:s,includeBlanksInGreaterThan:i,includeBlanksInLessThan:o,includeBlanksInRange:n}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(s)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(i)return!0;break;case"lessThan":case"lessThanOrEqual":if(o)return!0;break;case"inRange":if(n)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,s){const i=s.type;if(!this.isValid(t))return i==="notEqual"||i==="notBlank";const o=this.comparator(),n=e[0]!=null?o(e[0],t):0;switch(i){case"equals":return n===0;case"notEqual":return n!==0;case"greaterThan":return n>0;case"greaterThanOrEqual":return n>=0;case"lessThan":return n<0;case"lessThanOrEqual":return n<=0;case"inRange":{const r=o(e[1],t);return this.params.filterParams.inRangeInclusive?n>=0&&r<=0:n>0&&r<0}case"blank":return cl(t);case"notBlank":return!cl(t);default:return $(76,{filterModelType:i}),!0}}},fC={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},Q4={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},gh=class extends O{constructor(e,t,s){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=s}getModelAsString(e,t){const s=this.getLocaleTextFunc(),i=t==="filterToolPanel";if(!e)return i?ii(this,"filterSummaryInactive"):null;if(e.operator!=null){const n=e,a=(n.conditions??[]).map(c=>this.getModelAsString(c,t)),l=n.operator==="AND"?"andCondition":"orCondition";return a.join(` ${ii(this,l)} `)}else{if(e.type==="blank"||e.type==="notBlank")return i?ii(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):s(e.type,e.type);{const n=e,r=this.optionsFactory.getCustomOption(n.type),{displayKey:a,displayName:l,numberOfInputs:c}=r||{};return a&&l&&c===0?s(a,l):this.conditionToString(n,i,n.type==="inRange"||c===2,a,l)}}}updateParams(e){const{optionsFactory:t,filterParams:s}=e;this.optionsFactory=t,this.filterParams=s}conditionForToolPanel(e,t,s,i,o,n){let r;const a=this.getTypeKey(e);return a&&(r=ii(this,a)),o&&n&&(r=this.getLocaleTextFunc()(o,n)),r!=null?t?`${r} ${ii(this,"filterSummaryInRangeValues",[s(),i()])}`:`${r} ${s()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},mC=class extends gh{constructor(e,t){super(e,t,s=>{const{dataTypeSvc:i,valueSvc:o}=this.beans,n=t.column,r=i?.getDateFormatterFunction(n),a=r?r(s??void 0):s;return o.formatValue(n,null,a)}),this.filterTypeKeys=fC}conditionToString(e,t,s,i,o){const{type:n}=e,r=Nt(e.dateFrom),a=Nt(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,c=t?this.formatValue.bind(this):h=>zd(h,l),d=()=>r!==null?c(r):"null",u=()=>a!==null?c(a):"null";if(t){const h=this.conditionForToolPanel(n,s,d,u,i,o);if(h!=null)return h}return s?`${d()}-${u()}`:r!=null?c(r):`${n}`}};function J4(e,t){const s=t;return s<e?-1:s>e?1:0}var ek=class extends gC{constructor(){super(hC,ph),this.filterType="date",this.FilterModelFormatterClass=mC}comparator(){return this.params.filterParams.comparator??J4}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}},vC=class extends tt{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let s;t?s=e.conditions[0]:s=e,this.lastType=s.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const s=e;return this.isTypeEditable(s.type)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){const s=e;this.onModelUpdated(s.model)}}setParams(e){const t=new uh;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const s=this.optionsFactory.defaultOption;t||(this.lastType=s),this.readOnly=!!e.filterParams.readOnly;const i=this.isTypeEditable(s);this.setEditable(i)}refresh(e){this.params=e;const t=e,s=this.reactive;if((!s||t.source==="colDef")&&this.updateParams(e),s){const{source:i,model:o}=t;if(i==="dataChanged"||i==="ui")return;this.onModelUpdated(o)}}updateParams(e){const t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||this.onModelUpdated(e)}hasSingleInput(e){const t=this.optionsFactory.getCustomOption(e)?.numberOfInputs;return t==null||t==1}isTypeEditable(e){const t=["inRange","empty","blank","notBlank"];return!!e&&!this.readOnly&&this.hasSingleInput(e)&&t.indexOf(e)<0}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},tk={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},sk=class extends vC{constructor(){super(tk,[Dl]),this.eReadOnlyText=we,this.eDateWrapper=we,this.FilterModelFormatterClass=mC,this.filterType="date",this.defaultOptions=ph}setParams(e){super.setParams(e),this.createDateComponent();const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const s=e?Nt(e.dateFrom):null;this.dateComp.setDate(s),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){Je(this.eDateWrapper,e),Je(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const s=t.model,i=jt(e),o=i==null?null:{...s??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:i};t.onModelChange(o,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=Zu(e,this.defaultDebounceMs);return xe(this.gos,{onDateChanged:ht(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:s,params:i}=this;this.dateComp=new uC(e,t,i.column.getColDef(),this.getDateComponentParams(),s,o=>{o.setInputAriaLabel(this.getAriaLabel(i))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},ik={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},ok=class extends tt{constructor(){super(ik,[Dl]),this.eDateInput=we,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}setParams(e){const t=this.eDateInput.getInputElement(),s=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=s&&gi();const{minValidYear:i,maxValidYear:o,minValidDate:n,maxValidDate:r,buttons:a,includeTime:l,colDef:c}=e.filterParams||{},d=this.beans.dataTypeSvc,u=l??d?.getDateIncludesTimeFlag?.(c.cellDataType)??!1;if(s?u?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text",n&&i&&$(85),r&&o&&$(86),n&&r){const[h,p]=[n,r].map(f=>f instanceof Date?f:Nt(f));h&&p&&h.getTime()>p.getTime()&&$(87)}n?n instanceof Date?t.min=zd(n):t.min=n:i&&(t.min=`${i}-01-01`),r?r instanceof Date?t.max=zd(r):t.max=r:o&&(t.max=`${o}-12-31`),this.isApply=e.location==="floatingFilter"&&!!a?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return Nt(this.eDateInput.getValue())}setDate(e){const t=this.params.filterParams.colDef.cellDataType,s=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(t)??!1;this.eDateInput.setValue(jt(e,s))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e?.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){return e?.filterParams?.browserDatePicker??!0}},fh=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function nu(e){const{allowedCharPattern:t}=e??{};return t??null}function ru(e){return e==null||isNaN(e)?null:e}function CC(e,t){const{filter:s,filterTo:i,type:o}=e||{};return[ru(s),ru(i)].slice(0,hr(o,t))}var nk=class extends hh{constructor(){super("numberFilter",CC,fh),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}setElementValue(e,t,s){const{numberFormatter:i}=this.params,o=!s&&i?i(t??null):t;super.setElementValue(e,o)}createEValue(){const e=nu(this.params),t=Pt({tag:"div",cls:"ag-filter-body",role:"presentation"});return this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,s,i){const o=this.createManagedBean(i?new Ji({allowedCharPattern:i}):new Uu);o.addCss(`ag-filter-${s}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui())}removeEValues(e,t){const s=i=>this.removeComponents(i,e,t);s(this.eValuesFrom),s(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(s,i,o,n)=>{i<n&&t.push(ru(this.stringToFloat(s.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}stringToFloat(e){if(typeof e=="number")return e;let t=Hs(e);t!=null&&t.trim()===""&&(t=null);const s=this.params.numberParser;return s?s(t):t==null||t.trim()==="-"?null:Number.parseFloat(t)}createCondition(e){const t=this.getConditionType(e),s={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(s.filter=i[0]),i.length>1&&(s.filterTo=i[1]),s}getInputs(e){const{eValuesFrom:t,eValuesTo:s}=this;return e>=t.length?[null,null]:[t[e],s[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{t.getInputElement().validity.valid||(e=!0)}),e}},wC=class extends gh{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=fC}conditionToString(e,t,s,i,o){const{filter:n,filterTo:r,type:a}=e,l=this.formatValue.bind(this);if(t){const c=this.conditionForToolPanel(a,s,()=>l(n),()=>l(r),i,o);if(c!=null)return c}return s?`${l(n)}-${l(r)}`:n!=null?l(n):`${a}`}},rk=class extends gC{constructor(){super(CC,fh),this.filterType="number",this.FilterModelFormatterClass=wC}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},bC=class extends O{constructor(e){super(),this.params=e,this.eInput=we,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new Ji(this.params?.config));const t=this.eInput.getGui();e.appendChild(t);const s=i=>this.onValueChanged(i);this.addManagedListeners(t,{input:s,keydown:s})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t}){const{eInput:s}=this;s.setInputAriaLabel(e),t!==void 0&&s.setAutoComplete(t)}};function au(e){const t=e?.trim();return t===""?e:t}function xC(e,t){const{filter:s,filterTo:i,type:o}=e||{};return[s||null,i||null].slice(0,hr(o,t))}var ak={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},yC=class extends vC{constructor(){super(...arguments),this.eFloatingFilterInputContainer=we,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(ak)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){const t=e.browserAutoComplete??!1,{inputSvc:s,defaultDebounceMs:i,readOnly:o}=this;if(s.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:t}),this.applyActive=Tl(e.filterParams),!o){const n=Zu(e.filterParams,i),r=ht(this,this.syncUpWithParentFilter.bind(this),n);s.setValueChangedListener(r)}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,s=t.getValue();Ot(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(s,!0)}syncUpWithParentFilter(e){const t=e.key===I.ENTER,s=this.reactive;if(s&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:i,params:o,lastType:n}=this;let r=i.getValue();if(o.filterParams.trimInput&&(r=au(r),i.setValue(r,!0)),s){const a=o,l=a.model,c=this.convertValue(r),d=c==null?null:{...l??{filterType:this.filterType,type:n??this.optionsFactory.defaultOption},filter:c};a.onModelChange(d,{afterFloatingFilter:!0})}else o.parentFilterInstance(a=>{a?.onFloatingFilterChanged(n||null,r||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},lk=class extends O{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new Uu),this.eTextInput=this.createManagedBean(new Ji),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),s=this.eTextInput.getGui();e.appendChild(t),e.appendChild(s),this.setupListeners(t,i=>this.onValueChanged(i)),this.setupListeners(s,i=>this.onValueChanged(i))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams(e){this.setAriaLabel(e.ariaLabel),e.autoComplete!==void 0&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},ck=class extends yC{constructor(){super(...arguments),this.FilterModelFormatterClass=wC,this.filterType="number",this.defaultOptions=fh}updateParams(e){nu(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=nu(e.filterParams),this.allowedCharPattern?this.createManagedBean(new bC({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new lk)}convertValue(e){return e?Number(e):null}},mh=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],dk=class extends hh{constructor(){super("textFilter",xC,mh),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),s={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(s.filter=i[0]),i.length>1&&(s.filterTo=i[1]),s}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:s}=this;return e>=t.length?[null,null]:[t[e],s[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(s,i,o,n)=>{i<n&&t.push(Hs(s.getValue()))}),t}createEValue(){const e=Pt({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:s}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,s,"to"),e}createFromToElement(e,t,s){const i=this.createManagedBean(new Ji);i.addCss(`ag-filter-${s}`),i.addCss("ag-filter-filter"),t.push(i),e.appendChild(i.getGui())}removeEValues(e,t){const s=n=>this.removeComponents(n,e,t),{eValuesFrom:i,eValuesTo:o}=this;s(i),s(o)}},SC=class extends gh{constructor(){super(...arguments),this.filterTypeKeys=Q4}conditionToString(e,t,s,i,o){const{filter:n,filterTo:r,type:a}=e;if(t){const l=d=>()=>ii(this,"filterSummaryTextQuote",[d]),c=this.conditionForToolPanel(a,s,l(n),l(r),i,o);if(c!=null)return c}return s?`${n}-${r}`:n!=null?`${n}`:`${a}`}},uk=({filterOption:e,value:t,filterText:s})=>{if(s==null)return!1;switch(e){case"contains":return t.includes(s);case"notContains":return!t.includes(s);case"equals":return t===s;case"notEqual":return t!=s;case"startsWith":return t.indexOf(s)===0;case"endsWith":{const i=t.lastIndexOf(s);return i>=0&&i===t.length-s.length}default:return!1}},hk=e=>e,pk=e=>e==null?null:e.toString().toLowerCase(),gk=class extends pC{constructor(){super(xC,mh),this.filterType="text",this.FilterModelFormatterClass=SC}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??uk,this.formatter=t.textFormatter??(t.caseSensitive?hk:pk)}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,s,i){const o=e.map(h=>this.formatter(h))||[],n=this.formatter(t),{api:r,colDef:a,column:l,context:c,filterParams:{textFormatter:d}}=this.params;if(s.type==="blank")return cl(t);if(s.type==="notBlank")return!cl(t);const u={api:r,colDef:a,column:l,context:c,node:i.node,data:i.data,filterOption:s.type,value:n,textFormatter:d};return o.some(h=>this.matcher({...u,filterText:h}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=s=>{const i={...s},{filter:o,filterTo:n}=s;return o&&(i.filter=au(o)??null),n&&(i.filterTo=au(n)??null),i};return lv(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},fk=class extends yC{constructor(){super(...arguments),this.FilterModelFormatterClass=SC,this.filterType="text",this.defaultOptions=mh}createFloatingFilterInputService(){return this.createManagedBean(new bC)}};function mk(e){return!!e.quickFilter?.isFilterPresent()}function vk(e){return e.quickFilter?.getText()}function Ck(e){e.quickFilter?.resetCache()}var wk=class extends O{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",s=>this.setFilter(s.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){const{autoColSvc:e,colModel:t,gos:s,pivotResultCols:i}=this.beans,o=t.isPivotMode(),n=e?.getColumns(),r=t.getColDefCols();let a=(o&&!s.get("applyQuickFilterBeforePivotOrAgg")?i?.getPivotResultCols()?.list:r)??[];n&&(a=a.concat(n)),this.colsToUse=s.get("includeHiddenColumnsInQuickFilter")?a:a.filter(l=>l.isVisible()||l.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(s=>t?this.doesRowPassCache(e,s):this.doesRowPassNoCache(e,s))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return te(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){$(70,{newFilter:e});return}const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),s=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,s&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(s=>{const i=this.getTextForColumn(s,e);return te(i)&&i.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let s;e?(this.checkGenerateAggText(t),s=t.quickFilterAggregateText):s=this.getAggText(t);const{quickFilterParts:i,matcher:o}=this;return o(i,s)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let s=this.beans.filterValueSvc.getValue(e,t);const i=e.getColDef();if(i.getQuickFilterText){const o=xe(this.gos,{value:s,node:t,data:t.data,column:e,colDef:i});s=i.getQuickFilterText(o)}return te(s)?s.toString().toUpperCase():null}getAggText(e){const t=[];for(const s of this.colsToUse){const i=this.getTextForColumn(s,e);te(i)&&t.push(i)}return t.join(`
|
|
65
65
|
`)}},bk={moduleName:"ClientSideRowModelFilter",version:ee,rowModels:["clientSide"],beans:[x4]},vh={moduleName:"FilterCore",version:ee,beans:[j4],apiFunctions:{isAnyFilterPresent:z4,onFilterChanged:W4},css:[D4],dependsOn:[bk]},RC={moduleName:"FilterValue",version:ee,beans:[U4]},Ll={moduleName:"ColumnFilter",version:ee,beans:[V4,_4],dynamicBeans:{headerFilterCellCtrl:y4},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:P4,getColumnFilterInstance:T4,destroyFilter:k4,setFilterModel:M4,getFilterModel:I4,getColumnFilterModel:A4,setColumnFilterModel:L4,showColumnFilter:O4,hideColumnFilter:N4,getColumnFilterHandler:H4,doFilterAction:G4},dependsOn:[vh,Al,RC,F4]},xk={moduleName:"CustomFilter",version:ee,userComponents:{agReadOnlyFloatingFilter:q4},dependsOn:[Ll]},yk={moduleName:"TextFilter",version:ee,dependsOn:[Ll],userComponents:{agTextColumnFilter:{classImp:dk,params:{useForm:!0}},agTextColumnFloatingFilter:fk},dynamicBeans:{agTextColumnFilterHandler:gk}},Sk={moduleName:"NumberFilter",version:ee,dependsOn:[Ll],userComponents:{agNumberColumnFilter:{classImp:nk,params:{useForm:!0}},agNumberColumnFloatingFilter:ck},dynamicBeans:{agNumberColumnFilterHandler:rk}},Rk={moduleName:"DateFilter",version:ee,dependsOn:[Ll],userComponents:{agDateColumnFilter:{classImp:Z4,params:{useForm:!0}},agDateInput:ok,agDateColumnFloatingFilter:sk},dynamicBeans:{agDateColumnFilterHandler:ek}},Fk={moduleName:"QuickFilterCore",version:ee,rowModels:["clientSide"],beans:[wk],dependsOn:[vh,RC]},Ek={moduleName:"QuickFilter",version:ee,apiFunctions:{isQuickFilterPresent:mk,getQuickFilter:vk,resetQuickFilter:Ck},dependsOn:[Fk]},Dk={moduleName:"ExternalFilter",version:ee,dependsOn:[vh]},Pk=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",Jc=(e,t,s)=>{const{editModelSvc:i}=e,o=i?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,n=i?.getRowValidationModel().getRowValidation(t)?.errorMessages,r=o||n;return r?.length?r.join(s("tooltipValidationErrorSeparator",". ")):void 0},Tk=class extends O{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,s,i){e&&t.destroyBean(e);const o=this.gos,n=Qc(o),{column:r,eGui:a}=t,l=r.getColDef();!i&&n&&!l.headerComponent&&(i=Ra(()=>a.querySelector(".ag-header-cell-text")));const c="header",u=this.beans.colNames.getDisplayNameForColumn(r,"header",!0),h=s??u,p={getGui:()=>a,getLocation:()=>c,getTooltipValue:()=>s??l?.headerTooltipValueGetter?.(xe(o,{location:c,colDef:l,column:r,value:h,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:i,getAdditionalParams:()=>({column:r,colDef:r.getColDef()})};let f=this.createTooltipFeature(p);return f&&(f=t.createBean(f),t.setRefreshFunction("tooltip",()=>f.refreshTooltip())),f}setupHeaderGroupTooltip(e,t,s,i){e&&t.destroyBean(e);const o=this.gos,n=Qc(o),{column:r,eGui:a}=t,l=r.getColGroupDef();!i&&n&&!l?.headerGroupComponent&&(i=Ra(()=>a.querySelector(".ag-header-group-text")));const c="headerGroup",u=this.beans.colNames.getDisplayNameForColumnGroup(r,"header"),h=s??u,p={getGui:()=>a,getLocation:()=>c,getTooltipValue:()=>s??l?.headerTooltipValueGetter?.(xe(o,{location:c,colDef:l,column:r,value:h,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:i,getAdditionalParams:()=>{const v={column:r};return l&&(v.colDef=l),v}},f=this.createTooltipFeature(p);return f&&t.createBean(f)}enableCellTooltipFeature(e,t,s){const{beans:i}=this,{gos:o,editSvc:n}=i,{column:r,rowNode:a}=e;let l="cell";const c=()=>{const p=!!!n?.isEditing(e)&&Jc(i,e,this.getLocaleTextFunc());if(p)return l="cellEditor",p;l="cell";const f=r.getColDef(),v=a.data;if(f.tooltipField&&te(v))return Kn(v,f.tooltipField,r.isTooltipFieldContainsDots());const C=f.tooltipValueGetter;return C?C(xe(o,{location:"cell",colDef:r.getColDef(),column:r,rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,value:e.value,valueFormatted:e.valueFormatted})):null},d=Qc(o);s||(d&&!e.isCellRenderer()?s=()=>{const h=!!n?.isEditing(e);if(!h&&Jc(i,e,this.getLocaleTextFunc()))return!0;if(!r.isTooltipEnabled())return!1;const v=Ra(()=>{const C=e.eGui;return C.children.length===0?C:C.querySelector(".ag-cell-value")});return!h&&v()}:s=()=>!n?.isEditing(e));const u={getGui:()=>e.eGui,getLocation:()=>l,getTooltipValue:t!=null?()=>t:c,shouldDisplayTooltip:s,getAdditionalParams:()=>({column:r,colDef:r.getColDef(),rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(u,i)}setupFullWidthRowTooltip(e,t,s,i){const o={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>s,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const a=this.createTooltipFeature(o,n);if(a)return t.createBean(a,r)}setupCellEditorTooltip(e,t){const{beans:s}=this,{context:i}=s,o=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!o)return;const n={getGui:()=>o,getTooltipValue:()=>Jc(s,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{const{editModelSvc:a}=s,l=a?.getRowValidationModel()?.getRowValidationMap(),c=a?.getCellValidationModel()?.getCellValidationMap(),d=!!l&&l.size>0,u=!!c&&c.size>0;return d||u}},r=this.createTooltipFeature(n,s);if(r)return e.createBean(r,i)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=te(t.tooltipField)||te(t.tooltipValueGetter)||te(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},kk=class extends C2{createTooltipComp(e,t){dR(this.beans.userCompFactory,e)?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}},FC={moduleName:"Tooltip",version:ee,beans:[Tk],dynamicBeans:{tooltipFeature:Qm,highlightTooltipFeature:w2,tooltipStateManager:kk},userComponents:{agTooltipComponent:y2},dependsOn:[Al],css:[Pk]},Do=class{constructor(e){this.cellValueChanges=e}},ed=class extends Do{constructor(e,t,s,i){super(e),this.initialRange=t,this.finalRange=s,this.ranges=i}},Mk=10,Dg=class{constructor(e){this.actionStack=[],this.maxStackSize=e||Mk,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},Ik=class extends O{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},s=this.activeCellEdit!==null&&Tv(this.activeCellEdit,t),i=this.activeRowEdit!==null&&KE(this.activeRowEdit,t);if(!(s||i||this.isPasting||this.isRangeInAction))return;const{rowPinned:n,rowIndex:r,column:a,oldValue:l,value:c}=e,d={rowPinned:n,rowIndex:r,columnId:a.getColId(),newValue:c,oldValue:l};this.cellValueChanges.push(d)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const s=e.get("undoRedoCellEditingLimit");if(s<=0)return;this.undoStack=new Dg(s),this.redoStack=new Dg(s),this.addListeners();const i=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:o=>{o.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:i,newColumnsLoaded:i,columnGroupOpened:i,columnRowGroupChanged:i,columnMoved:i,columnPinned:i,columnVisible:i,rowDragEnd:i}),t.whenReady(this,o=>{this.gridBodyCtrl=o.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:s,redoStack:i}=this;t.dispatchEvent({type:"undoStarted",source:e});const o=this.undoRedo(s,i,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:o})}redo(e){const{eventSvc:t,undoStack:s,redoStack:i}=this;t.dispatchEvent({type:"redoStarted",source:e});const o=this.undoRedo(i,s,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:o})}undoRedo(e,t,s,i,o){if(!e)return!1;const n=e.pop();return n?.cellValueChanges?(this.processAction(n,r=>r[i],o),n instanceof ed?this.processRange(n.ranges||[n[s]]):this.processCell(n.cellValueChanges),t.push(n),!0):!1}processAction(e,t,s){for(const i of e.cellValueChanges){const{rowIndex:o,rowPinned:n,columnId:r}=i,a={rowIndex:o,rowPinned:n},l=Ws(this.beans,a);l.displayed&&l.setDataValue(r,t(i),s)}}processRange(e){let t;const s=this.beans.rangeSvc;s.removeAllCellRanges(!0),e.forEach((i,o)=>{if(!i)return;const n=i.startRow,r=i.endRow;o===e.length-1&&(t={rowPinned:n.rowPinned,rowIndex:n.rowIndex,columnId:i.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:n.rowIndex,rowStartPinned:n.rowPinned,rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnStart:i.startColumn,columns:i.columns};s.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:s,rowPinned:i}=t,o={rowIndex:s,rowPinned:i},n=Ws(this.beans,o),r={rowPinned:t.rowPinned,rowIndex:n.rowIndex,columnId:t.columnId};this.setLastFocusedCell(r)}setLastFocusedCell(e){const{rowIndex:t,columnId:s,rowPinned:i}=e,{colModel:o,focusSvc:n,rangeSvc:r}=this.beans,a=o.getCol(s);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const c={rowIndex:t,column:a,rowPinned:i};n.setFocusedCell({...c,forceBrowserFocus:!0}),r?.setRangeToCell(c)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new Do(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const s=new Do(this.cellValueChanges);this.pushActionsToUndoStack(s)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new Do(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new ed(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:s}=this.beans;t&&ci(s)?e=new ed(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new Do(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:e})=>this.stopBigChange("batchEditing",e),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:e})=>this.stopBigChange("bulkEditing",e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){e==="bulkEditing"?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if(e==="bulkEditing"&&!this.bulkEditing||e==="batchEditing"&&!this.batchEditing||(this.updateBigChange(e,!1),t?.length===0))return;const s=new Do(t??[]);this.pushActionsToUndoStack(s),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},Ak=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}",Lk={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},Ok=class extends Ml{constructor(){super(Lk,[_u]),this.eEditor=we}initialiseEditor(e){const t=e.value??void 0,s=this.eEditor;s.setValue(t),s.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(s,{fieldValueChanged:o=>this.setAriaLabel(o.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),s=El(t,e),i=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${i} (${s})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,s=this.getValue();return t?t({value:s,internalErrors:null,cellEditorParams:e}):null}},Ol=class extends Ml{constructor(e){super(),this.cellEditorInput=e,this.eEditor=we}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:s}=this,{cellStartedEdit:i,eventKey:o,suppressPreventDefault:n}=e;s.getInputElement().setAttribute("title",""),t.init(s,e);let r,a=!0;i?(this.focusAfterAttached=!0,o===I.BACKSPACE||o===I.DELETE?r="":o&&o.length===1?n?a=!1:r=o:(r=t.getStartValue(),o!==I.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),a&&r!=null&&s.setStartValue(r),this.addGuiEventListener("keydown",l=>{const{key:c}=l;(c===I.PAGE_UP||c===I.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;gi()||t.getFocusableElement().focus();const s=t.getInputElement();this.highlightAllOnFocus?s.select():this.cellEditorInput.setCaret?.()}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),s=e.getInputElement();t.focus(),s.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},Nk={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},Hk=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return Nk}getAgComponents(){return[jm]}init(e,t){this.eEditor=e,this.params=t;const{min:s,max:i,step:o,colDef:n}=t;s!=null&&e.setMin(s),i!=null&&e.setMax(i),o!=null&&e.setStep(o),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:s}=this,{min:i,max:o,getValidationErrors:n}=s;let r=[];const a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){const l=i instanceof Date?i:new Date(i);if(t<l){const c=l.toLocaleDateString();r.push(a("minDateValidation",`Date must be after ${c}`,[c]))}}if(o){const l=o instanceof Date?o:new Date(o);if(t>l){const c=l.toLocaleDateString();r.push(a("maxDateValidation",`Date must be before ${c}`,[c]))}}}return r.length||(r=null),n?n({value:t,cellEditorParams:s,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,s=e.getDate();return!te(s)&&!te(t.value)?t.value:s??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return jt(e,this.includeTime??!1)}},Gk=class extends Ol{constructor(){super(new Hk(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},Bk={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},Vk=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return Bk}getAgComponents(){return[jm]}init(e,t){this.eEditor=e,this.params=t;const{min:s,max:i,step:o,colDef:n}=t;s!=null&&e.setMin(s),i!=null&&e.setMax(i),o!=null&&e.setStep(o),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,s=e.getInputElement().value,i=this.formatDate(this.parseDate(s??void 0)),{min:o,max:n,getValidationErrors:r}=t;let a=[];if(i){const l=new Date(i),c=this.getLocaleTextFunc();if(o){const d=new Date(o);if(l<d){const u=d.toLocaleDateString();a.push(c("minDateValidation",`Date must be after ${u}`,[u]))}}if(n){const d=new Date(n);if(l>d){const u=d.toLocaleDateString();a.push(c("maxDateValidation",`Date must be before ${u}`,[u]))}}}return a.length||(a=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,s=this.formatDate(t.getDate());return!te(s)&&!te(e.value)?e.value:e.parseValue(s??"")}getStartValue(){return jt(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):Nt(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):jt(e??null,this.includeTime??!1)??void 0}},zk=class extends Ol{constructor(){super(new Vk(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},Wk={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},jk=class extends Ml{constructor(){super(Wk,[PR]),this.eEditor=we}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:s,eventKey:i,maxLength:o,cols:n,rows:r}=e;this.focusAfterAttached=s,t.getInputElement().setAttribute("title",""),t.setMaxLength(o||200).setCols(n||60).setRows(r||10);let a;s?(this.focusAfterAttached=!0,i===I.BACKSPACE||i===I.DELETE?a="":i&&i.length===1?a=i:(a=this.getStartValue(e),i!==I.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=this.getStartValue(e)),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return t?.toString()??t}onKeyDown(e){const t=e.key;(t===I.LEFT||t===I.UP||t===I.RIGHT||t===I.DOWN||e.shiftKey&&t===I.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:s}=this,i=this.getLocaleTextFunc();e.setInputAriaLabel(i("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),s&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:s}=t,i=e.getValue();return!te(i)&&!te(s)?s:t.parseValue(i)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:s}=e,i=this.getLocaleTextFunc(),o=this.getValue();let n=[];return typeof o=="string"&&t!=null&&o.length>t&&n.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),s?s({value:o,internalErrors:n,cellEditorParams:e}):n}},_k={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},Uk=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return _k}getAgComponents(){return[TR]}init(e,t){this.eEditor=e,this.params=t;const{max:s,min:i,precision:o,step:n}=t;s!=null&&e.setMax(s),i!=null&&e.setMin(i),o!=null&&e.setPrecision(o),n!=null&&e.setStep(n);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:s,getValidationErrors:i}=e,n=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let a=[];return typeof n=="number"&&(t!=null&&n<t&&a.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),s!=null&&n>s&&a.push(r("maxValueValidation",`Must be less than or equal to ${s}.`,[String(s)]))),a.length||(a=null),i?i({value:n,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===I.UP||e.key===I.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,s=e.getValue();if(!te(s)&&!te(t.value))return t.value;let i=t.parseValue(s);if(i==null)return i;if(typeof i=="string"){if(i==="")return null;i=Number(i)}return isNaN(i)?null:i}getStartValue(){return this.params.value}setCaret(){gi()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},$k=class extends Ol{constructor(){super(new Uk(()=>this.getLocaleTextFunc()))}},qk={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},Kk=class extends Ml{constructor(){super(qk,[VR]),this.eEditor=we,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:s,gos:i}=this,{values:o,value:n,eventKey:r}=e;if(Ze(o)){$(58);return}this.startedByEnter=r!=null?r===I.ENTER:!1;let a=!1;o.forEach(u=>{const h={value:u},p=s.formatValue(e.column,null,u),f=p!=null;h.text=f?p:u,t.addOption(h),a=a||n===u}),a?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:c,valueListMaxHeight:d}=e;l!=null&&t.setPickerGap(l),d!=null&&t.setPickerMaxHeight(d),c!=null&&t.setPickerMaxWidth(c),i.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:s}=e,i=this.getValue();let o=[];if(t&&!t.includes(i)){const n=this.getLocaleTextFunc();o.push(n("invalidSelectionValidation","Invalid selection."))}else o=null;return s?s({value:i,internalErrors:o,cellEditorParams:e}):o}},Yk={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},Xk=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return Yk}getAgComponents(){return[Dl]}init(e,t){this.eEditor=e,this.params=t;const s=t.maxLength;s!=null&&e.setMaxLength(s)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:s}=e,i=this.getValue(),o=this.getLocaleTextFunc();let n=[];return t!=null&&typeof i=="string"&&i.length>t&&n.push(o("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),s?s({value:i,cellEditorParams:e,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,s=e.getValue();return!te(s)&&!te(t.value)?t.value:t.parseValue(s)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){gi()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),s=te(t)&&t.length||0;s&&e.getInputElement().setSelectionRange(s,s)}},Pg=class extends Ol{constructor(){super(new Xk(()=>this.getLocaleTextFunc()))}};function Zk(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function Qk(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function EC(e,t,s="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,s),"ensureVisible")}function DC(e,t,s){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,s),"ensureVisible")}function Jk(e,t,s=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,s),"ensureVisible")}function eM(e){e.undoRedo?.undo("api")}function tM(e){e.undoRedo?.redo("api")}function sM(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})}function iM(e){const t=e.editModelSvc?.getEditMap(),s=[];return t?.forEach((i,o)=>{const{rowIndex:n,rowPinned:r}=o;i.forEach((a,l)=>{const{editorValue:c,pendingValue:d,sourceValue:u,state:h}=a,p=Ns(a);let f=c??d;f===ss&&(f=void 0);const v={newValue:f,oldValue:u,state:h,column:l,colId:l.getColId(),colKey:l.getColId(),rowIndex:n,rowPinned:r};(h==="editing"||h==="changed"&&p)&&s.push(v)})}),s}function oM(e,t=!1){const{editSvc:s}=e;if(s?.isBatchEditing()){if(t)for(const i of e.editModelSvc?.getEditPositions()??[])i.state==="editing"&&s.revertSingleCellEdit(i);else Di(e,{persist:!0});Wo(e,void 0,{cancel:t})}else s?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function nM(e,t){const s=Xe(e,t);return e.editSvc?.isEditing(s)??!1}function rM(e,t){const{key:s,colKey:i,rowIndex:o,rowPinned:n}=t,{editSvc:r,colModel:a}=e,l=a.getCol(i);if(!l){$(12,{colKey:i});return}const d=Ws(e,{rowIndex:o,rowPinned:n||null});if(!d){$(290,{rowIndex:o,rowPinned:n});return}if(!l.isCellEditable(d))return;n==null&&DC(e,o),EC(e,i),r?.startEditing({rowNode:d,column:l},{event:s?new KeyboardEvent("keydown",{key:s}):void 0,source:"api"})}function aM(e){return e.editSvc?.validateEdit()||null}function lM(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function cM(e){return e.undoRedo?.getCurrentRedoStackSize()??0}var dM={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},uM=class extends zu{constructor(e){super(dM),this.params=e}postConstruct(){Wi(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,s=i=>{Kd(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:s})}};function hM(e,{column:t},s,i,o="ui"){if(s instanceof KeyboardEvent&&(s.key===I.TAB||s.key===I.ENTER||s.key===I.F2||s.key===I.BACKSPACE&&i))return!0;if(s?.shiftKey&&e.rangeSvc?.getCellRanges().length!=0)return!1;const r=t?.getColDef(),a=pM(e.gos,r),l=s?.type;return l==="click"&&s?.detail===1&&a===1||l==="dblclick"&&s?.detail===2&&a===2?!0:o==="api"?i??!1:!1}function pM(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t?.singleClickEdit?1:2}function lu(e,{rowNode:t,column:s},i="ui"){const o=s.getColDef().editable,n=e.editModelSvc;return s.isColumnFunc(t,o)||!!n&&n.hasEdits({rowNode:t,column:s},{withOpenEditor:!0})}function gM(e,t,s="ui"){const i=lu(e,t,s);return i===!0||s==="ui"?i:e.colModel.getCols().some(n=>lu(e,{rowNode:t.rowNode,column:n},s))}var dl=(e,t=!1)=>{if(e!==void 0)return Ns(e)||t&&e.state==="editing"};function PC(e,t,s=!1){return dl(e.editModelSvc?.getEdit(t),s)}var TC=(e,t,s)=>{if(e)for(let i=0,o=e.length;i<o;++i){const n=e[i];if(n.data&&(dl(t?.getEdit({rowNode:n,column:s}))||dl(t?.getEdit({rowNode:n.pinnedSibling,column:s})))||TC(n.childrenAfterGroup,t,s))return!0}};function kC(e,t){const{column:s,rowNode:i}=t;return e.gos.get("groupTotalRow")&&!i?.footer?!1:TC(i?.childrenAfterGroup,e.editModelSvc,s)}function MC(e,{rowNode:t,column:s}){if(t=t.pinnedSibling,!!t)return dl(e.editModelSvc?.getEdit({rowNode:t,column:s}))}var fM=class extends O{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){const{cellCtrl:e,editSvc:t,beans:s}=this;if(t?.isBatchEditing()&&t.isEditing()){const o=PC(s,e)||kC(s,e)||MC(s,e);this.applyBatchingStyle(o)}else this.applyBatchingStyle(!1);const i=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss("ag-cell-editing-error",i)}applyBatchingStyle(e){this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&this.editSvc?.isBatchEditing())??!1)}},mM=class extends O{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){const{rowCtrl:e,editModelSvc:t,beans:s}=this;let i=e.rowNode,o=t?.getEditRow(i);const n=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:i});if(!o&&i.pinnedSibling&&(i=i.pinnedSibling,o=t?.getEditRow(i)),o){const r=Array.from(o.keys()).some(a=>{const l={rowNode:i,column:a};return PC(s,l,!0)||kC(s,l)||MC(s,l)});this.applyStyle(n,r);return}this.applyStyle(n)}applyStyle(e=!1,t=!1){const s=this.editSvc?.isBatchEditing()??!1,i=this.gos.get("editType")==="fullRow";this.rowCtrl?.forEachGui(void 0,({rowComp:o})=>{o.toggleCss("ag-row-editing",i&&t),o.toggleCss("ag-row-batch-edit",i&&t&&s),o.toggleCss("ag-row-inline-editing",t),o.toggleCss("ag-row-not-inline-editing",!t),o.toggleCss("ag-row-editing-invalid",i&&t&&e)})}},vM=({rowModel:e,pinnedRowModel:t,editModelSvc:s},i)=>{const o=new Set;e.forEachNode(n=>i.has(n)&&o.add(n)),t?.forEachPinnedRow("top",n=>i.has(n)&&o.add(n)),t?.forEachPinnedRow("bottom",n=>i.has(n)&&o.add(n));for(const n of i)o.has(n)||s.removeEdits({rowNode:n});return o},CM=({editModelSvc:e},t,s)=>{for(const i of t)e?.getEditRow(i)?.forEach((o,n)=>!s.has(n)&&e.removeEdits({rowNode:i,column:n}))},wM=e=>()=>{const t=new Set(e.colModel.getCols()),s=e.editModelSvc.getEditMap(!0),i=new Set(s.keys());CM(e,vM(e,i),t)},bM=new Set(["undo","redo","paste","bulk","rangeSvc"]),xM=new Set(["ui","api"]),IC={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},yM=new Set(Object.keys(IC)),SM=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),wa={cancel:!0,source:"api"},RM={cancel:!1,source:"api"},Ro={checkSiblings:!0},Mn={force:!0,suppressFlash:!0},FM=class extends O{constructor(){super(...arguments),this.beanName="editSvc",this.batch=!1,this.stopping=!1,this.committing=!1}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:i})=>{this.stopEditing(void 0,wa),this.createStrategy(i)});const t=wM(e),s=()=>{const i=this.model.getCellValidationModel().getCellValidationMap().size>0,o=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||o?this.stopEditing(void 0,wa):this.isEditing()&&(this.isBatchEditing()?Wo(e,this.model.getEditPositions()):this.stopEditing(void 0,RM)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:s,filterChanged:s,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}setBatchEditing(e){e?(this.batch=!0,this.stopEditing(void 0,wa)):(this.stopEditing(void 0,wa),this.batch=!1)}createStrategy(e){const{beans:t,gos:s,strategy:i}=this,o=Tg(s,e);if(i){if(i.beanName===o)return i;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(o,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,s,i="ui"){const o=hM(this.beans,e,t,s,i);return o&&(this.strategy??(this.strategy=this.createStrategy())),o}shouldStopEditing(e,t,s="ui"){return this.strategy?.shouldStop(e,t,s)??null}shouldCancelEditing(e,t,s="ui"){return this.strategy?.shouldCancel(e,t,s)??null}validateEdit(){return V5(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??Ro)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){const{startedEdit:s=!0,event:i=null,source:o="ui",ignoreEventKey:n=!1,silent:r}=t;if(this.strategy??(this.strategy=this.createStrategy()),!this.isCellEditable(e,"api"))return;const a=Xe(this.beans,e);if(a&&!a.comp){a.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const l=this.shouldStartEditing(e,i,s,o);if(l===!1&&o!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,o)&&!t.continueEditing&&this.stopEditing(void 0,{source:o}),l&&this.isBatchEditing()&&this.dispatchBatchEvent("batchEditingStarted",new Map),this.strategy.start({position:e,event:i,source:o,ignoreEventKey:n,startedEdit:s,silent:r})}stopEditing(e,t){const{event:s,cancel:i,source:o="ui",forceCancel:n,forceStop:r}=t||{},{beans:a,model:l}=this;if(yM.has(o)&&this.isBatchEditing())return this.bulkRefresh(e),!1;const c=this.committing?IC[o]:o;if(!(this.committing||this.isEditing(e)||this.isBatchEditing()&&l.hasEdits(e,Ro))||!this.strategy||this.stopping)return!1;this.stopping=!0;const u=Xe(a,e);u&&(u.onEditorAttachedFuncs=[]);let h=l.getEditMap(!0),p=!1;const f=!i&&(!!this.shouldStopEditing(e,s,c)||this.committing&&!this.batch)||(r??!1),v=i&&!!this.shouldCancelEditing(e,s,c)||(n??!1);if(f||v){Di(a,{persist:!0,isCancelling:v||i,isStopping:f});const C=l.getEditMap(),w=this.processEdits(C,i,o);this.strategy?.stop(i,s);for(const b of w)l.clearEditValue(b);this.bulkRefresh(void 0,h);for(const b of l.getEditPositions(C)){const x=Xe(a,b),y=Ns(b);x?.refreshCell({force:!0,suppressFlash:!y})}h=C,p||(p=f)}else if(s instanceof KeyboardEvent&&this.batch&&this.strategy?.midBatchInputsAllowed(e)&&this.isEditing(e,{withOpenEditor:!0})){const{key:C}=s,w=C===I.ENTER,b=C===I.ESCAPE,x=C===I.TAB;(w||x||b)&&(w||x?Di(a,{persist:!0}):b&&this.revertSingleCellEdit(u),this.isBatchEditing()?this.strategy?.cleanupEditors():Wo(a,l.getEditPositions(),{event:s,cancel:b}),s.preventDefault(),this.bulkRefresh(e,h,{suppressFlash:!0}),h=l.getEditMap())}else Di(a,{persist:!0}),h=l.getEditMap();return p&&e&&this.model.removeEdits(e),this.navigateAfterEdit(t,u?.cellPosition),su(a),this.model.hasEdits()||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap()),this.bulkRefresh(),v&&this.beans.rowRenderer.refreshRows({rowNodes:Array.from(h.keys())}),this.isBatchEditing()&&(this.beans.rowRenderer.refreshRows({suppressFlash:!0,force:!0}),p&&f&&this.dispatchBatchEvent("batchEditingStopped",h)),this.stopping=!1,p}navigateAfterEdit(e,t){if(!e||!t)return;const{event:s,suppressNavigateAfterEdit:i}=e;if(!(s instanceof KeyboardEvent)||i)return;const{key:n,shiftKey:r}=s,a=this.gos.get("enterNavigatesVerticallyAfterEdit");if(n!==I.ENTER||!a)return;const l=r?I.UP:I.DOWN;this.beans.navigation?.navigateToNextCell(null,l,t,!1)}processEdits(e,t=!1,s){const i=Array.from(e.keys()),o=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,n=[];for(const r of i){const a=e.get(r);for(const l of a.keys()){const c=a.get(l),d={rowNode:r,column:l},u=Ns(c);!t&&u&&!o&&(this.setNodeDataValue(r,l,c.pendingValue,void 0,s)||n.push(d))}}return n}setNodeDataValue(e,t,s,i,o="edit"){const{beans:n}=this,r=Xe(n,{rowNode:e,column:t}),a=xM.has(o)?"edit":o;r&&(r.suppressRefreshCell=!0),this.commitNextEdit();const l=e.setDataValue(t,s,a);return r&&(r.suppressRefreshCell=!1),i&&r?.refreshCell(Mn),l}setEditMap(e,t){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(e,t),this.bulkRefresh();let s=Mn;t?.forceRefreshOfEditCellsOnly&&(s={...EM(e),...Mn}),this.beans.rowRenderer.refreshCells(s)}dispatchEditValuesChanged({rowNode:e,column:t},s={}){if(!e||!t||!s)return;const{pendingValue:i,sourceValue:o}=s,{rowIndex:n,rowPinned:r,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:r,column:t,source:"api",data:a,newValue:i,oldValue:o,value:i,colDef:t.getColDef()})}bulkRefresh(e={},t,s={}){const{beans:i,gos:o}=this,{editModelSvc:n,rowModel:r}=i;st(o)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),s):t&&n?.getEditMap(!1)?.forEach((a,l)=>{for(const c of a.keys())this.refCell({rowNode:l,column:c},a.get(c),s)}))}refCell({rowNode:e,column:t},s,i={}){const{beans:o,gos:n}=this,r=new Set([e]),a=new Set,l=e.pinnedSibling;l&&r.add(l);const c=e.sibling;c&&a.add(c);let d=e.parent;for(;d;)d.sibling?.footer&&n.get("groupTotalRow")||!d.parent&&d.sibling&&n.get("grandTotalRow")?a.add(d.sibling):a.add(d),d=d.parent;for(const u of r)this.dispatchEditValuesChanged({rowNode:u,column:t},s);for(const u of r)Xe(o,{rowNode:u,column:t})?.refreshCell(i);for(const u of a)Xe(o,{rowNode:u,column:t})?.refreshCell(i)}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{rowNode:s}=e,{gos:i,beans:o}=this;if(s.group){if(i.get("treeData")){if(!s.data&&!i.get("enableGroupEdit"))return!1}else if(!i.get("enableGroupEdit"))return!1}const n=Tg(i)==="fullRow"?gM(o,e,t):lu(o,e,t);return n&&(this.strategy??(this.strategy=this.createStrategy())),n}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,s=!0){if(this.hasValidationErrors(e)){const i=Xe(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),s&&(!i?.hasBrowserFocus()&&i?.focusCell(),i?.comp?.getCellEditor()?.focusIn?.()),"block-stop"):(i&&this.revertSingleCellEdit(i),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){const s=Xe(this.beans,e);s?.comp?.getCellEditor()&&(Wo(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),Zo(this.beans,e,{silent:!0}),Ui(this.beans),s?.refreshCell(Mn),t&&(s?.focusCell(),s?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(e){Ui(this.beans);const t=Xe(this.beans,e);t&&(t.refreshCell(Mn),t.rowCtrl.rowEditStyleFeature?.applyRowStyles());let s=!1;return e?.rowNode?(s||(s=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(s||(s=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(s||(s=this.model.getCellValidationModel().getCellValidationMap().size>0),s||(s=this.model.getRowValidationModel().getRowValidationMap().size>0)),s}moveToNextCell(e,t,s,i="ui"){let o;const n=this.isEditing(),r=n&&this.checkNavWithValidation(void 0,s)==="block-stop";return e instanceof jo&&n&&(o=this.strategy?.moveToNextEditingCell(e,t,s,i,r)),o===null||(o=o||!!this.beans.focusSvc.focusedHeader,o===!1&&!r&&this.stopEditing()),o}getCellDataValue({rowNode:e,column:t},s=!0){if(!e||!t)return;let i=this.model.getEdit({rowNode:e,column:t});const o=e.pinnedSibling;if(o){const r=this.model.getEdit({rowNode:o,column:t});r&&(i=r)}const n=s?i?.editorValue??i?.pendingValue:i?.pendingValue;return n===ss||!i?i?.sourceValue??this.valueSvc.getValue(t,e,!1,"api"):n}addStopEditingWhenGridLosesFocus(e){L5(this,this.beans,e)}createPopupEditorWrapper(e){return new uM(e)}commitNextEdit(){this.committing=!0}setDataValue(e,t,s){try{if((!this.isEditing()||this.committing)&&!SM.has(s))return;const{beans:i}=this;this.strategy??(this.strategy=this.createStrategy());const o=this.isBatchEditing()?"ui":this.committing?s??"api":"api";if(!s||bM.has(s))return Ha(i,e,t,s,void 0,{persist:!0}),this.setNodeDataValue(e.rowNode,e.column,t,!0,s);const n=this.model.getEdit(e);if(n){if(n.pendingValue===t)return!1;if(n.sourceValue!==t)return Ha(i,e,t,s,void 0,{persist:!0}),this.stopEditing(e,{source:o,suppressNavigateAfterEdit:!0}),!0;if(n.sourceValue===t)return i.editModelSvc?.removeEdits(e),this.dispatchEditValuesChanged(e,{...n,pendingValue:t}),!0}return Ha(i,e,t,s,void 0,{persist:!0}),this.stopEditing(e,{source:o,suppressNavigateAfterEdit:!0}),!0}finally{this.committing=!1}}handleColDefChanged(e){H5(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,Ro))return;const{rowNode:i,column:o}=e,{compDetails:n,valueToDisplay:r}=t;if(n){const{params:l}=n;return l.data=this.model.getEditRowDataValue(i,Ro),{compDetails:n}}const a=this.model.getEditRow(e.rowNode,Ro);if(r!==void 0&&a?.has(o))return{valueToDisplay:this.valueSvc.getValue(o,i)}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,s,i){this.strategy?.dispatchCellEvent(e,t,s,i)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return xe(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},s){if(!s||s.length===0)return;const{beans:i,rangeSvc:o,valueSvc:n}=this;Di(i,{persist:!0});const r=this.model.getEditMap(!0),a=r.get(e)?.get(t)?.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),s.forEach(c=>{if(o?.forEachRowInRange(c,d=>{const u=Ws(i,d);if(u===void 0)return;const h=r.get(u)??new Map;for(const p of c.columns)if(p&&this.isCellEditable({rowNode:u,column:p},"api")){const f=n.getValue(p,u,!0,"api");let v=n.parseValue(p,u??null,a,f);Number.isNaN(v)&&(v=null),h.set(p,{editorValue:void 0,pendingValue:v,sourceValue:f,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}h.size>0&&r.set(u,h)}),this.setEditMap(r),this.batch){this.cleanupEditors(),su(i),this.bulkRefresh();return}this.commitNextEdit(),this.stopEditing(void 0,{source:"bulk"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(r)})}),this.bulkRefresh();const l=Xe(i,{rowNode:e,column:t});l&&l.focusCell(!0)}createCellStyleFeature(e,t){return new fM(e,t)}createRowStyleFeature(e,t){return new mM(e,t)}setEditingCells(e,t){const{beans:s}=this,{colModel:i,valueSvc:o}=s,n=new Map;for(let{colId:r,column:a,colKey:l,rowIndex:c,rowPinned:d,newValue:u,state:h}of e){const p=r?i.getCol(r):l?i.getCol(l):a;if(!p)continue;const f=Ws(s,{rowIndex:c,rowPinned:d});if(!f)continue;const v=o.getValue(p,f,!0,"api");if(!t?.forceRefreshOfEditCellsOnly&&!Ns({pendingValue:u,sourceValue:v})&&h!=="editing")continue;let C=n.get(f);C||(C=new Map,n.set(f,C)),u===void 0&&(u=ss),C.set(p,{editorValue:void 0,pendingValue:u,sourceValue:v,state:h??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(n,t)}onCellFocused(e){const t=Xe(this.beans,e);if(!t||!this.isEditing(t,Ro))return;const s=this.model.getEdit(t);if(!s||!Ns(s))return;const o=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(o,"pendingChange")}allowedFocusTargetOnValidation(e){return Xe(this.beans,e)}};function EM(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap(t=>Array.from(t.keys())))]:void 0}}function Tg(e,t){return t??e.get("editType")??"singleCell"}var AC=class extends O{postConstruct(){this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:this.onCellFocusChanged?.bind(this),cellFocusCleared:this.onCellFocusChanged?.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const s=e.previousParams,{editSvc:i,beans:o}=this,n=e.type==="cellFocused"?e.sourceEvent:null;s&&(t=Xe(o,s));const{gos:r,editModelSvc:a}=o,l=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){const{column:c,rowIndex:d,rowPinned:u}=e,h={column:c,rowNode:Ws(o,{rowIndex:d,rowPinned:u})},p=r.get("invalidEditValueMode")==="block";if(p)return;const f=!p,v=!!a?.getCellValidationModel().hasCellValidation(h),C=f&&v;(s||l?i.stopEditing(void 0,{cancel:C,source:l&&f?"api":void 0,event:n}):!0)||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t?.refreshCell({suppressFlash:!0,force:!0})}stop(e,t){const s=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};for(const o of s){if(i.all.push(o),(this.model.getCellValidationModel().getCellValidation(o)?.errorMessages?.length??0)>0){i.fail.push(o);continue}i.pass.push(o)}if(e)for(const o of s)al(this.beans,o,{cancel:e}),this.model.stop(o);else{const o=this.processValidationResults(i);if(o.destroy.length>0)for(const n of o.destroy)al(this.beans,n,{event:t,cancel:e}),this.model.stop(n);if(o.keep.length>0)for(const n of o.keep){const r=Xe(this.beans,n);this.editSvc?.cellEditingInvalidCommitBlocks()||r&&this.editSvc.revertSingleCellEdit(r)}}return!0}cleanupEditors({rowNode:e}={},t){Di(this.beans,{persist:!1});const s=this.model.getEditPositions(),i=[];if(e)for(const o of s)o.rowNode!==e&&i.push(o);else for(const o of s)i.push(o);Wo(this.beans,i),su(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(e){const t=e.comp,s=t?.getCellEditor();if(s?.focusIn)s.focusIn();else{const i=this.beans.gos.get("editType")==="fullRow";e.focusCell(i),e.onEditorAttachedFuncs.push(()=>t?.getCellEditor()?.focusIn?.())}}setupEditors(e){const{event:t,ignoreEventKey:s=!1,startedEdit:i,position:o,cells:n=this.model.getEditPositions()}=e,r=t instanceof KeyboardEvent&&!s&&t.key||void 0;N5(this.beans,n,o,r,t,i)}dispatchCellEvent(e,t,s,i){const o=Xe(this.beans,e);o&&this.eventSvc.dispatchEvent({...o.createEvent(t??null,s),...i})}dispatchRowEvent(e,t,s){if(s)return;const i=lh(this.beans,e);i&&this.eventSvc.dispatchEvent(i.createRowEvent(t))}shouldStop(e,t,s="ui"){const i=this.editSvc.isBatchEditing();return i&&s==="api"?!0:i&&(s==="ui"||s==="edit")?!1:s==="api"?!0:t instanceof KeyboardEvent&&!i?t.key===I.ENTER:null}shouldCancel(e,t,s="ui"){const i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&t.key===I.ESCAPE||i&&s==="api"||s==="api")}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const s=[];if(e.forEach((i,o)=>{i.forEach((n,r)=>{n.state==="editing"&&s.push({...n,rowNode:o,column:r})})}),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),s.length>0){const i=s.at(-1),o=i.pendingValue===ss?void 0:i.pendingValue;this.start({position:i,event:new KeyboardEvent("keydown",{key:o}),source:"api"});const n=Xe(this.beans,i);n&&this.setFocusInOnEditor(n)}}destroy(){this.cleanupEditors(),super.destroy()}},DM=class extends AC{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}shouldStop(e,t,s="ui"){const{rowNode:i}=e||{};if(!lh(this.beans,{rowNode:this.rowNode}))return!0;const n=super.shouldStop({rowNode:this.rowNode},t,s);return n!==null?n:this.rowNode?i!==this.rowNode:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:s,startedEdit:i,event:o,ignoreEventKey:n}=e,{rowNode:r}=t;this.rowNode!==r&&super.cleanupEditors(t),this.dispatchRowEvent({rowNode:r},"rowEditingStarted",s),this.startedRows.push(r);const a=this.beans.visibleCols.allCols,l=[];for(const c of a){if(!c.isCellEditable(r))continue;const d={rowNode:r,column:c};l.push(d),this.model.hasEdits(d)||this.model.start(d)}this.rowNode=r,this.setupEditors({cells:l,position:t,startedEdit:i,event:o,ignoreEventKey:n})}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){const{rowNode:s}=this;if(s&&!this.model.hasRowEdits(s))return!1;const i=[];if(e||this.model.getEditMap().forEach((o,n)=>{if(!(!o||o.size===0)){for(const r of o.values())if(Ns(r)){i.push(n);break}}}),Ui(this.beans),!e&&this.editSvc?.checkNavWithValidation({rowNode:s})==="block-stop")return!1;super.stop(e,t);for(const o of i)this.dispatchRowEvent({rowNode:o},"rowValueChanged");return this.cleanupEditors({rowNode:s},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,s=e.previousParams;if(s?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent)return;const i=Xe(this.beans,s);this.gos.get("invalidEditValueMode")==="block"&&i&&(this.model.getCellValidationModel().getCellValidation(i)||this.model.getRowValidationModel().getRowValidation(i))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);for(const s of this.startedRows)this.dispatchRowEvent({rowNode:s},"rowEditingStopped");this.startedRows.length=0}moveToNextEditingCell(e,t,s,i="ui",o=!1){const n=e.cellPosition;let r;this.model.suspend(!0);try{r=this.beans.navigation?.findNextCellToFocusOn(n,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const a=r.cellPosition,l=e.isCellEditable(),c=r.isCellEditable(),d=a&&n.rowIndex===a.rowIndex&&n.rowPinned===a.rowPinned;l&&this.setFocusOutOnEditor(e),this.restoreEditors();const u=this.gos.get("suppressStartEditOnTab");return c&&!o?u?r.focusCell(!0,s):(r.comp?.getCellEditor()||Zo(this.beans,r,{event:s,cellStartedEdit:!0}),this.setFocusInOnEditor(r),r.focusCell(!1,s)):(c&&o&&this.setFocusInOnEditor(r),r.focusCell(!0,s)),!d&&!o&&(this.editSvc?.stopEditing({rowNode:e.rowNode},{event:s}),this.cleanupEditors(r,!0),u?r.focusCell(!0,s):this.editSvc.startEditing(r,{startedEdit:!0,event:s,source:i,ignoreEventKey:!0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach((e,t)=>e.forEach(({state:s},i)=>{if(s!=="editing")return;const o=Xe(this.beans,{rowNode:t,column:i});o&&!o.comp?.getCellEditor()&&Zo(this.beans,o,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},PM=class extends AC{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,s="ui"){const i=super.shouldStop(e,t,s);if(i!==null)return i;const{rowNode:o,column:n}=e||{};return(!this.rowNode||!this.column)&&o&&n?null:this.rowNode!==o||this.column!==n}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:s,event:i,ignoreEventKey:o}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:s,event:i,ignoreEventKey:o})}dispatchRowEvent(e,t,s){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){return super.stop(e,t),this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:s}=this.beans,{rowIndex:i,column:o,rowPinned:n}=e,r=Ws(this.beans,{rowIndex:i,rowPinned:n}),a=tu(o),l=t.getCol(a),c=e.previousParams;if(c){const d=tu(c.column);if(c?.rowIndex===i&&d===a&&c?.rowPinned===n)return}s?.isEditing({rowNode:r,column:l},{withOpenEditor:!0})&&e.type==="cellFocused"||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,s,i="ui",o=!1){const n=this.beans.focusSvc.getFocusedCell();n&&(e=Mo(this.beans,n)??e);const r=e.cellPosition;let a;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),o||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:s}));try{a=this.beans.navigation?.findNextCellToFocusOn(r,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(a===!1)return null;if(a==null)return!1;const c=a.cellPosition,d=e.isCellEditable(),u=a.isCellEditable(),h=c&&r.rowIndex===c.rowIndex&&r.rowPinned===c.rowPinned;d&&!o&&this.setFocusOutOnEditor(e);const p=this.gos.get("suppressStartEditOnTab");if(!h&&!o&&(super.cleanupEditors(a,!0),p?a.focusCell(!0,s):this.editSvc.startEditing(a,{startedEdit:!0,event:s,source:i,ignoreEventKey:!0})),u&&!o){if(a.focusCell(!1,s),p)a.focusCell(!0,s);else if(!a.comp?.getCellEditor()){const f=this.editSvc?.isEditing(a,{withOpenEditor:!0});Zo(this.beans,a,{event:s,cellStartedEdit:!0,silent:f}),this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else u&&o&&this.setFocusInOnEditor(a),a.focusCell(!0,s);return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},mi={moduleName:"EditCore",version:ee,beans:[A5,FM],apiFunctions:{getEditingCells:iM,getEditRowValues:sM,getCellEditorInstances:O5,startEditingCell:rM,stopEditing:oM,isEditing:nM,validateEdit:aM},dynamicBeans:{singleCell:PM,fullRow:DM},dependsOn:[Al,FC],css:[Ak]},TM={moduleName:"UndoRedoEdit",version:ee,beans:[Ik],apiFunctions:{undoCellEditing:eM,redoCellEditing:tM,getCurrentUndoSize:lM,getCurrentRedoSize:cM},dependsOn:[mi]},kM={moduleName:"TextEditor",version:ee,userComponents:{agCellEditor:Pg,agTextCellEditor:Pg},dependsOn:[mi]},MM={moduleName:"NumberEditor",version:ee,userComponents:{agNumberCellEditor:{classImp:$k}},dependsOn:[mi]},IM={moduleName:"DateEditor",version:ee,userComponents:{agDateCellEditor:Gk,agDateStringCellEditor:zk},dependsOn:[mi]},AM={moduleName:"CheckboxEditor",version:ee,userComponents:{agCheckboxCellEditor:Ok},dependsOn:[mi]},LM={moduleName:"SelectEditor",version:ee,userComponents:{agSelectCellEditor:Kk},dependsOn:[mi]},OM={moduleName:"LargeTextEditor",version:ee,userComponents:{agLargeTextCellEditor:jk},dependsOn:[mi]},NM={moduleName:"CustomEditor",version:ee,dependsOn:[mi]},HM=class extends O{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,Ho(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),hS(e))}createColumns(e,t){const s=()=>{Qa(this.beans,this.columns?.tree),this.columns=null},i=e.treeDepth,n=(this.columns?.treeDepth??-1)==i,r=this.generateSelectionCols();if(uS(r,this.columns?.list??[])&&n)return;s();const{colGroupSvc:l}=this.beans,c=l?.findDepth(e.tree)??0,d=l?.balanceTreeForAutoCols(r,c)??[];this.columns={list:r,tree:d,treeDepth:c,map:{}},t(h=>{if(!h)return null;const p=h.filter(f=>!qs(f));return[...r,...p]})}updateColumns(e){const t=Ho(e.source);for(const s of this.columns?.list??[]){const i=this.createSelectionColDef(e.currentValue);s.setColDef(i,null,t),ds(this.beans,{state:[{...i,colId:s.getColId()}]},t)}}getColumn(e){return this.columns?.list.find(t=>$n(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,s=e.get("rowSelection");if(typeof s!="object"||!Ii(e))return!1;const i=(t.autoColSvc?.getColumns()?.length??0)>0;if(s.checkboxLocation==="autoGroupColumn"&&i)return!1;const o=!!No(s),n=Da(s);return o||n}createSelectionColDef(e){const{gos:t}=this,s=e??t.get("selectionColumnDef"),i=t.get("enableRtl"),{rowSpan:o,spanRows:n,...r}=s??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:i?"right":"left",comparator(a,l,c,d){const u=c.isSelected(),h=d.isSelected();return u===h?0:u?1:-1},editable:!1,suppressFillHandle:!0,pinned:null,...r,colId:Hu,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const s=new Zi(e,null,t,!1);return this.createBean(s),[s]}onSelectionOptionsChanged(e,t,s){const i=t&&typeof t!="string"?No(t):void 0,o=e&&typeof e!="string"?No(e):void 0,n=i!==o,r=t&&typeof t!="string"?Da(t):void 0,a=e&&typeof e!="string"?Da(e):void 0,l=r!==a,c=Ka(e),d=Ka(t);(n||l||c!==d)&&this.beans.colModel.refreshAll(s)}destroy(){Qa(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,s){if(!this.columns?.list.length)return;const i=e.length+t.length+s.length;if(i===0)return;const o=this.columns.list[0];if(!o.isVisible())return;const n=()=>{let l;switch(o.pinned){case"left":case!0:l=e;break;case"right":l=s;break;default:l=t}l&&us(l,o)};(this.beans.rowNumbersSvc?.getColumn(Gu)?2:1)===i&&n()}};function GM(e,t){if(!t.nodes.every(r=>r.rowPinned&&!Rr(r)?($(59),!1):r.id===void 0?($(60),!1):!0))return;const{nodes:i,source:o,newValue:n}=t;e.selectionSvc?.setNodesSelected({nodes:i,source:o??"api",newValue:n})}function BM(e,t,s="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:s,selectAll:t})}function VM(e,t,s="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:s,selectAll:t})}function zM(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function WM(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function jM(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function _M(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function UM(e){return e.selectionSvc?.getSelectedNodes()??[]}function $M(e){return e.selectionSvc?.getSelectedRows()??[]}var qM=class extends mE{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();const{gos:e}=this;this.mode=Ya(e),this.groupSelectsDescendants=ar(e),this.groupSelectsFiltered=Za(e)==="filteredDescendants",this.masterSelectsDetail=bp(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=ar(e),s=Ya(e),i=Za(e)==="filteredDescendants";this.masterSelectsDetail=bp(e)==="detail",(t!==this.groupSelectsDescendants||i!==this.groupSelectsFiltered||s!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=i,this.mode=s)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,s){if(this.isRowSelectionBlocked(t))return 0;const i=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,s);if(i==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in i)return i.reset?this.resetNodes():this.selectRange(i.deselect,!1,s),this.selectRange(i.select,!0,s);{const o=i.checkFilteredNodes?OC(i.node):i.newValue;return this.setNodesSelected({nodes:[i.node],newValue:o,clearSelection:i.clearSelection,keepDescendants:i.keepDescendants,event:e,source:s})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:s,nodes:i,event:o,source:n,keepDescendants:r=!1}){if(i.length===0)return 0;const{gos:a}=this;if(!Ii(a)&&e)return $(132),0;if(i.length>1&&!this.isMultiSelect())return $(130),0;let l=0;for(let c=0;c<i.length;c++){const d=i[c],u=Fo(d);if(u.rowPinned&&!Rr(u)){$(59);continue}if(u.id===void 0){$(60);continue}this.groupSelectsFiltered&&u.group&&!a.get("treeData")||this.selectRowNode(u,e,o,n)&&(this.detailSelection.delete(u.id),l++),this.groupSelectsDescendants&&u.childrenAfterGroup?.length&&(l+=this.selectChildren(u,e,n))}return s||(i.length===1&&n==="api"&&this.selectionCtx.setRoot(Fo(i[0])),e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(Fo(i[0]),r,n)),l>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n))),l}selectRange(e,t,s){let i=0;return e.forEach(o=>{const n=Fo(o);if(n.group&&this.groupSelectsDescendants)return;this.selectRowNode(n,t,void 0,s)&&i++}),i>0&&(this.updateGroupsFromChildrenSelections(s),this.dispatchSelectionChanged(s)),i}selectChildren(e,t,s){const i=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return i?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:s,nodes:i}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((s,i)=>{e(s)&&t.set(i,s)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:s,rowModel:i}=this.beans;if(!st(s))return!1;const o=i.rootNode;if(!o)return!1;t||(t=new dr(!0,o),t.active=!1);let n=!1;return t.forEachChangedNodeDepthFirst(r=>{if(r!==o){const a=this.calculateSelectedFromChildren(r);n=this.selectRowNode(r,a===null?!1:a,void 0,e)||n}}),n}clearOtherNodes(e,t,s){const i=new Map;let o=0;return this.selectedNodes.forEach(n=>{const r=n.id==e.id;if((t?!YM(e,n):!0)&&!r){const l=this.selectedNodes.get(n.id);o+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:s}),this.groupSelectsDescendants&&n.parent&&i.set(n.parent.id,n.parent)}}),i.forEach(n=>{const r=this.calculateSelectedFromChildren(n);this.selectRowNode(n,r===null?!1:r,void 0,s)}),o}onRowSelected(e){const t=e.node;this.groupSelectsDescendants&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}createDaemonNode(e){if(!e.id)return;const t=new ui(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:e,rowModel:t}=this.beans;if(!st(e))return;const s=t.getTopLevelNodes();if(s===null)return;const i=[];function o(n){for(let r=0,a=n.length;r<a;r++){const l=n[r];l.isSelected()?i.push(l):l.group&&l.childrenAfterGroup&&o(l.childrenAfterGroup)}}return o(s),i}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){const s=st(this.gos);let i=!1;const o=n=>{const r=this.selectRowNode(Fo(n),!1,void 0,e);i||(i=r)};if(t==="currentPage"||t==="filtered"){if(!s){Ve(102);return}this.getNodesToSelect(t).forEach(o)}else this.selectedNodes.forEach(o),this.reset(e);if(this.selectionCtx.selectAll=!1,s&&this.groupSelectsDescendants){const n=this.updateGroupsFromChildrenSelections(e);i||(i=n)}i&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,s=0;return this.getNodesToSelect(e).forEach(i=>{this.groupSelectsDescendants&&i.group||(i.isSelected()?t++:i.selectable&&s++)}),{selectedCount:t,notSelectedCount:s}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:s}=this.getSelectedCounts(e);return LC(t,s)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],s=o=>t.push(o);if(e==="currentPage")return this.forEachNodeOnPage(o=>{if(!o.group){s(o);return}if(!o.expanded&&!o.footer){const n=r=>{s(r),r.childrenAfterFilter?.forEach(n)};n(o);return}this.groupSelectsDescendants||s(o)}),t;const i=this.beans.rowModel;return e==="filtered"?(i.forEachNodeAfterFilter(s),t):(i.forEachNode(s),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:s}=this.beans,i=t.getFirstRow(),o=t.getLastRow();for(let n=i;n<=o;n++){const r=s.getRow(n);r&&e(r)}}selectAllRowNodes(e){const{gos:t,selectionCtx:s}=this;if(!Ii(t)){$(132);return}if(Xy(t)&&!Xa(t)){$(130);return}if(!this.canSelectAll())return;const{source:i,selectAll:o}=e;let n=!1;if(this.getNodesToSelect(o).forEach(r=>{const a=this.selectRowNode(Fo(r),!0,void 0,i);n||(n=a)}),s.selectAll=!0,st(t)&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(i);n||(n=r)}n&&this.dispatchSelectionChanged(i)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,s){if(e||(e=[]),!Array.isArray(e)){Ve(103);return}const i=new Set(e),o=[];this.beans.rowModel.forEachNode(n=>{i.has(n.id)&&o.push(n)}),s&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:o,source:t})}canSelectAll(){return st(this.beans.gos)}updateSelectable(e){const{gos:t,rowModel:s}=this.beans;if(!Ii(t))return;const i="selectableChanged",o=e!==void 0,n=st(t)&&this.groupSelectsDescendants,r=[],a=l=>{if(o&&!l.group)return;if(n&&l.group){const d=l.childrenAfterGroup?.some(u=>u.selectable)??!1;this.setRowSelectable(l,d,!0);return}!this.updateRowSelectable(l,!0)&&l.isSelected()&&r.push(l)};if(n){if(e===void 0){const l=s.rootNode;e=l?new dr(!1,l):void 0}e?.forEachChangedNodeDepthFirst(a,!o,!o)}else s.forEachNode(a);r.length&&this.setNodesSelected({nodes:r,newValue:!1,source:i}),!o&&n&&this.updateGroupsFromChildrenSelections?.(i)}updateSelectableAfterGrouping(e){this.updateSelectable(e),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.("rowGroupChanged",e)&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail)return;const s=e.detailNode?.detailGridInfo?.api;if(!s)return;const i=KM(s);if(e.isSelected()!==i&&this.selectRowNode(e,i,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!i){const n=this.detailSelection.get(e.id)??new Set;for(const r of s.getSelectedNodes())n.add(r.id);this.detailSelection.set(e.id,n)}}setDetailSelectionState(e,t,s){if(this.masterSelectsDetail){if(!Xa(t)){$(269);return}switch(e.isSelected()){case!0:{s.selectAll();break}case!1:{s.deselectAll();break}case void 0:{const i=this.detailSelection.get(e.id);if(i){const o=[];for(const n of i){const r=s.getRowNode(n);r&&o.push(r)}s.setNodesSelected({nodes:o,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function Fo(e){return Rr(e)?e.pinnedSibling:e.footer?e.sibling:e}function KM(e){let t=0,s=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&s++}),LC(t,s)}function LC(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function YM(e,t){let s=t.parent;for(;s;){if(s===e)return!0;s=s.parent}return!1}function OC(e){const t=e.isSelected()===!1,s=e.childrenAfterFilter?.some(OC)??!1;return t||s}var XM={moduleName:"SharedRowSelection",version:ee,beans:[HM],apiFunctions:{setNodesSelected:GM,selectAll:BM,deselectAll:VM,selectAllFiltered:zM,deselectAllFiltered:WM,selectAllOnCurrentPage:jM,deselectAllOnCurrentPage:_M,getSelectedNodes:UM,getSelectedRows:$M}},ZM={moduleName:"RowSelection",version:ee,rowModels:["clientSide","infinite","viewport"],beans:[qM],dependsOn:[XM]};function QM(e){e.expansionSvc?.expandAll(!0)}function JM(e){e.expansionSvc?.expandAll(!1)}function NC(e){e.rowModel?.onRowHeightChanged()}function HC(e){if(e.rowAutoHeight?.active){$(3);return}e.rowModel?.resetRowHeights()}function eI(e,t,s){const i=e4(e);if(i){if(e.rowGroupColsSvc?.columns.length===0){if(t<0){Ve(238);return}i.setRowCount(t,s);return}Ve(28);return}Il(e)?.setRowCount(t,s)}function tI(e){return Xi(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}}function sI(e){return e.rowModel.isLastRowIndexKnown()}var iI={moduleName:"CsrmSsrmSharedApi",version:ee,apiFunctions:{expandAll:QM,collapseAll:JM}},oI={moduleName:"RowModelSharedApi",version:ee,apiFunctions:{onRowHeightChanged:NC,resetRowHeights:HC}},nI={moduleName:"SsrmInfiniteSharedApi",version:ee,apiFunctions:{setRowCount:eI,getCacheBlockState:tI,isLastRowIndexKnown:sI}},rI=class extends O{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(i=>{if(!i){Ve(18),t||Ve(20);return}if(this.isGridApi(i))return i;const o=i;return"current"in o?o.current?.api:(o.api||Ve(19),o.api)}).filter(i=>!!i&&!i.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){if(!this.consuming)for(const t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const s=[];return e.columns?e.columns.forEach(i=>{s.push(t(i))}):e.column&&s.push(t(e.column)),s}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":$(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;if(t)for(const s of e.columnGroups){let i=null;s&&(i=t.getProvidedColGroup(s.getGroupId())),!(s&&!i)&&t.setColumnGroupOpened(i,s.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let s=null;const i=this.beans,{colResize:o,ctrlsSvc:n,colModel:r}=i;if(t&&(s=r.getColDefCol(t.getColId())),t&&!s)return;const a=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const u=e.api.getColumnState().map(h=>({colId:h.colId}));ds(i,{state:u,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const u=e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}));ds(i,{state:u},"alignedGridChanged")}break;case"columnPinned":{const u=e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}));ds(i,{state:u},"alignedGridChanged")}break;case"columnResized":{const d=e,u={};for(const h of a)u[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()};for(const h of d.flexColumns??[])u[h.getId()]&&delete u[h.getId()];o?.setColumnWidths(Object.values(u),!1,d.finished,"alignedGridChanged");break}}const c=n.getGridBodyCtrl().isVerticalScrollShowing();for(const d of this.getAlignedGridApis())d.setGridOption("alwaysShowVerticalScroll",c)}},aI={moduleName:"AlignedGrids",version:ee,beans:[rI],dependsOn:[Nv]},lI=class extends O{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},kg(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){const{selectionSvc:t,pinnedRowModel:s,groupStage:i}=this.beans;t?.reset("rowDataChanged"),s?.isManual()&&s.reset(),this.dispatchRowDataUpdateStarted(e),this.allNodesMap=Object.create(null),this.nextId=0;const o=kg(this.rootNode),n=new Array(e.length);o._leafs=n;let r=0;const a=i?.getNestedDataGetter(),l=a?new Set:null,c=(d,u)=>{const h=d.level+1;for(let p=0,f=u.length;p<f;++p){const v=u[p];if(!v)continue;const C=this.createRowNode(v,h);if(C.sourceRowIndex=r,n[r++]=C,l&&!l.has(v)){l.add(v),C.treeParent=d;const w=a(v);w&&c(C,w)}}};c(o,e),n.length=r}setImmutableRowData(e,t){const{rootNode:s,gos:i}=this;this.dispatchRowDataUpdateStarted(t);const o=qo(i),n=e.changedRowNodes,{adds:r,updates:a}=n,l=new Set,c=[],d=this.beans.groupStage?.getNestedDataGetter();let u=i.get("suppressMaintainUnsortedOrder")?void 0:!1,h=-1,p=!1;const f=(w,b)=>{if(!u&&u!==void 0){const x=w.sourceRowIndex;u=x<=h,h=x}w.data!==b&&(w.updateData(b),r.has(w)||a.add(w),!w.selectable&&w.isSelected()&&c.push(w))},v=(w,b,x)=>{for(let y=0,S=b.length;y<S;++y){const F=b[y];if(!F)continue;let R=this.getRowNode(o({data:F,level:x}));if(R?(f(R,F),p||(p=!!d&&R.treeParent!==w)):(R=this.createRowNode(F,x),r.add(R)),!d||l.has(R)){l.add(R);continue}l.add(R),R.treeParent=w;const E=d(F);E&&v(R,E,x+1)}};v(s,t,0);const C=this.deleteUnusedNodes(l,n,c)||u||r.size>0;if(C){const w=s._leafs??(s._leafs=[]);u===void 0?pI(w,l,n):hI(w,l)&&(n.reordered=!0)}(C||p||a.size)&&(e.rowDataUpdated=!0,this.deselect(c))}deleteUnusedNodes(e,{removals:t},s){const i=this.rootNode._leafs;for(let o=0,n=i.length;o<n;o++){const r=i[o];e.has(r)||(t.add(r),r.isSelected()&&s.push(r),this.deleteNode(r))}return t.size>0}updateRowData(e,t){if(this.dispatchRowDataUpdateStarted(e.add),this.beans.groupStage?.getNestedDataGetter())return $(268),{remove:[],update:[],add:[]};const s=[],i=qo(this.gos),o=this.executeRemove(i,e,t,s),n=this.executeUpdate(i,e,t,s),r=this.executeAdd(e,t);return this.deselect(s),{remove:o,update:n,add:r}}executeRemove(e,{remove:t},{adds:s,updates:i,removals:o},n){const r=this.rootNode._leafs,a=r?.length,l=t?.length;if(!l||!a)return[];let c=0,d=a,u=0,h;const p=new Array(l);for(let f=0;f<l;++f){const v=this.lookupNode(e,t[f]);if(!v)continue;const C=v.sourceRowIndex;C<d&&(d=C),C>u&&(u=C),v.isSelected()&&n.push(v),this.deleteNode(v),s.delete(v)?(h??(h=new Set),h.add(v)):(i.delete(v),o.add(v)),p[c++]=v}return p.length=c,c&&uI(r,d,u,o,h),p}executeUpdate(e,{update:t},{adds:s,updates:i},o){const n=t?.length;if(!n)return[];const r=new Array(n);let a=0;for(let l=0;l<n;l++){const c=t[l],d=this.lookupNode(e,c);d&&(d.updateData(c),!d.selectable&&d.isSelected()&&o.push(d),r[a++]=d,s.has(d)||i.add(d))}return r.length=a,r}executeAdd(e,t){var s;const i=(s=this.rootNode)._leafs??(s._leafs=[]),o=i.length,n=e.add,r=n?.length;if(!r)return[];const a=o+r;let l=this.sanitizeAddIndex(i,e.addIndex);if(l<o){for(let u=o-1,h=a-1;u>=l;--u){const p=i[u];p.sourceRowIndex=h,i[h--]=p}t.reordered=!0}i.length=a;const c=new Array(r),d=t.adds;for(let u=0;u<r;u++){const h=this.createRowNode(n[u],0);d.add(h),h.sourceRowIndex=l,i[l]=h,c[u]=h,l++}return c}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselect(e){const t="rowDataChanged",s=this.beans.selectionSvc;e.length&&s?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),s?.updateGroupsFromChildrenSelections?.(t),e.length&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:s?.getSelectedNodes()??null,serverSideState:null})}createRowNode(e,t){const s=new ui(this.beans);s.parent=this.rootNode,s.level=t,s.group=!1,s.expanded=!1,s.setDataAndId(e,String(this.nextId++));const i=s.id,o=this.allNodesMap;return o[i]&&$(2,{nodeId:i}),o[i]=s,s}deleteNode(e){e.clearRowTopAndRowIndex();const t=e.id,s=this.allNodesMap;s[t]===e&&delete s[t];const i=e.pinnedSibling;i&&this.beans.pinnedRowModel?.pinRow(i,null)}lookupNode(e,t){if(!e)return dI(this.rootNode._leafs,t);const s=e({data:t,level:0}),i=this.allNodesMap[s];return i||(Ve(4,{id:s}),null)}sanitizeAddIndex(e,t){const s=e.length;if(typeof t!="number"||t<0||t>=s||Number.isNaN(t))return s;t=Math.ceil(t);const i=this.gos;return t>0&&i.get("treeData")&&i.get("getDataPath")&&(t=cI(e,t)),t}},cI=(e,t)=>{for(let s=0,i=e.length;s<i;s++)if(e[s]?.rowIndex==t-1)return s+1;return t},kg=e=>{e.group=!0,e.level=-1,e.id="ROOT_NODE_ID",e._leafs?.length!==0&&(e._leafs=[]);const t=[],s=[],i=[],o=[];e.childrenAfterGroup=t,e.childrenAfterSort=s,e.childrenAfterAggFilter=i,e.childrenAfterFilter=o;const n=e.sibling;return n&&(n.childrenAfterGroup=t,n.childrenAfterSort=s,n.childrenAfterAggFilter=i,n.childrenAfterFilter=o,n.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},dI=(e,t)=>{if(e)for(let s=0,i=e.length;s<i;s++){const o=e[s];if(o.data===t)return o}return Ve(5,{data:t}),null},uI=(e,t,s,i,o)=>{t=Math.max(0,t);for(let n=t,r=e.length;n<r;++n){const a=e[n];n<=s&&(i.has(a)||o?.has(a))||(a.sourceRowIndex=t,e[t++]=a)}e.length=t},hI=(e,t)=>{const s=t.size;e.length=s;let i=0,o=!1,n=!1;for(const r of t){const a=r.sourceRowIndex;a===i?n||(n=o):(a>=0?n=!0:o=!0,r.sourceRowIndex=i,e[i]=r),++i}return n},pI=(e,t,{removals:s,adds:i})=>{const o=e.length;e.length=t.size;let n=0;for(let r=0;r<o;++r){const a=e[r];s.has(a)||(n!==r&&(a.sourceRowIndex=n,e[n]=a),++n)}for(const r of i)r.sourceRowIndex<0&&(r.sourceRowIndex=n,e[n++]=r);e.length=n},GC=e=>{const t=e.childrenAfterSort,s=e.sibling;if(s&&(s.childrenAfterSort=t),!!t)for(let i=0,o=t.length-1;i<=o;i++){const n=t[i],r=i===0,a=i===o;n.firstChild!==r&&(n.firstChild=r,n.dispatchRowEvent("firstChildChanged")),n.lastChild!==a&&(n.lastChild=a,n.dispatchRowEvent("lastChildChanged")),n.childIndex!==i&&(n.childIndex=i,n.dispatchRowEvent("childIndexChanged"))}},gI=class extends O{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e){const t=this.beans.sortSvc.getSortOptions(),s=t.length>0&&!!e.changedRowNodes&&this.gos.get("deltaSort");this.sort(t,s,e.changedRowNodes,e.changedPath)}sort(e,t,s,i){const{gos:o,colModel:n,rowGroupColsSvc:r,rowNodeSorter:a,rowRenderer:l,showRowGroupCols:c}=this.beans,d=o.get("groupMaintainOrder"),u=n.getCols().some(b=>b.isRowGroupActive()),h=r?.columns,p=n.isPivotMode(),f=o.getCallback("postSortRows");let v=!1,C;const w=b=>{const x=p&&b.leafGroup;let y=d&&u&&!b.leafGroup;y&&(C??(C=this.shouldSortContainsGroupCols(e)),y&&(y=!C));let S=null;if(y){let F=!1;if(h){const R=b.level+1;R<h.length&&(F=h[R].getSort()===null)}F||(S=vI(b))}else!e.length||x||(t&&s?S=fI(a,b,s,i,e):S=a.doFullSort(b.childrenAfterAggFilter,e));if(S||(S=b.childrenAfterAggFilter?.slice(0)??[]),v||(v=b.childrenAfterSort?.[0]!==S[0]),b.childrenAfterSort=S,GC(b),f){const F={nodes:b.childrenAfterSort};f(F)}};if(i?.forEachChangedNodeDepthFirst(w),v&&o.get("groupHideOpenParents")){const b=c?.getShowRowGroupCols();b?.length&&l.refreshCells({columns:b,force:!0})}}shouldSortContainsGroupCols(e){const t=e.length;if(!t)return!1;if(ws(this.gos)){for(let s=0;s<t;++s){const i=e[s].column;if(i.isPrimary()&&i.isRowGroupActive())return!0}return!1}for(let s=0;s<t;++s)if(e[s].column.getColDef().showRowGroup)return!0;return!1}},fI=(e,t,s,i,o)=>{const n=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(n,o);const a=new Set,l=[],{updates:c,adds:d}=s;for(let h=0,p=n.length;h<p;++h){const f=n[h];c.has(f)||d.has(f)||i&&!i.canSkip(f)?l.push({currentPos:l.length,rowNode:f}):a.add(f)}const u=r.filter(h=>a.has(h)).map((h,p)=>({currentPos:p,rowNode:h}));return l.sort((h,p)=>e.compareRowNodes(o,h,p)),mI(e,o,l,u)},mI=(e,t,s,i)=>{let o=0,n=0;const r=s.length,a=i.length,l=new Array(r+a);let c=0;for(;o<r&&n<a;){const d=s[o],u=i[n];e.compareRowNodes(t,d,u)<0?(l[c++]=d.rowNode,++o):(l[c++]=u.rowNode,++n)}for(;o<r;)l[c++]=s[o++].rowNode;for(;n<a;)l[c++]=i[n++].rowNode;return l},vI=e=>{const t=e.childrenAfterSort,s=e.childrenAfterAggFilter,i=t?.length,o=s?.length;if(!i||!o)return null;const n=new Array(o),r=new Set;for(let l=0;l<o;++l)r.add(s[l]);let a=0;for(let l=0;l<i;++l){const c=t[l];r.delete(c)&&(n[a++]=c)}if(r.size===0&&a===i)return t;for(const l of r)n[a++]=l;return n.length=a,n},CI=class extends O{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.rowDataUpdatedPending=!1,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingModel=!1,this.rowNodesCountReady=!1,this.stages=[],this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=ht(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const e=this.beans,t=new ui(e);this.rootNode=t,this.nodeManager=this.createBean(new lI(t));const s=this.refreshModel.bind(this,{step:"group"}),i=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:s,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:s,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,s=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(i=>!!i);this.stages=s;for(let i=s.length-1;i>=0;--i)for(const o of s[i].refreshProps)t.set(o,i);this.addManagedPropertyListeners([...t.keys()],i=>{const o=i.changeSet?.properties;o&&this.onPropChange(o)}),this.addManagedPropertyListener("rowData",()=>this.onPropChange(["rowData"])),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,s,i){let o,n=!1;do{o=!1;const r=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(r,s),c=Math.min(a,i);for(let d=l;d<=c;d++){const u=this.getRow(d);if(u.rowHeightEstimated){const h=li(this.beans,u);u.setRowHeight(h.height),o=!0,n=!0}}o&&this.setRowTopAndRowIndex()}while(o);return n}onPropChange(e){const{nodeManager:t,gos:s,beans:i}=this,o=i.groupStage;if(!t)return;const n=new Set(e),r=o?.onPropChange(n);let a;n.has("rowData")?a=s.get("rowData"):r&&(a=o?.extractData()),a&&!Array.isArray(a)&&(a=null,$(1));const l={step:"nothing",changedProps:n};a&&(!r&&!this.isEmpty()&&a.length>0&&s.exists("getRowId")&&!s.get("resetRowDataOnUpdate")?(l.keepRenderedRows=!0,l.animate=!s.get("suppressAnimationFrame"),l.changedRowNodes=new La,t.setImmutableRowData(l,a)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(a),this.rowNodesCountReady=!0));const c=l.rowDataUpdated?"group":this.getRefreshedStage(e);c&&(l.step=c,this.refreshModel(l))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:s}=this,i=t.length;let o=i;for(let n=0,r=e.length;n<r&&o;++n)o=Math.min(o,s.get(e[n])??o);return o<i?t[o].step:null}setRowTopAndRowIndex(e){const{beans:t,rowsToDisplay:s}=this,i=t.environment.getDefaultRowHeight();let o=0;const n=vt(this.gos,"normal");for(let r=0,a=s.length;r<a;++r){const l=s[r],c=l.id;if(c!=null&&e?.add(c),l.rowHeight==null){const d=li(t,l,n,i);l.setRowHeight(d.height,d.estimated)}l.setRowTop(o),l.setRowIndex(r),o+=l.rowHeight}}clearRowTopAndRowIndex(e,t){const s=e.active,i=r=>{r?.id!=null&&!t.has(r.id)&&r.clearRowTopAndRowIndex()},o=r=>{i(r),i(r.detailNode),i(r.sibling);const a=r.childrenAfterGroup;if(!r.hasChildren()||!a)return;const l=r.level==-1;if(!(s&&!l&&!r.expanded))for(let d=0,u=a.length;d<u;++d)o(a[d])},n=this.rootNode;n&&o(n)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){const{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;const i=e.sibling?.displayed?1:0;return(e.childrenAfterSort?.length??0)+i}getTopLevelRowDisplayedIndex(e){const{beans:t,rootNode:s,rowsToDisplay:i}=this;if(!s||!i.length||i[0]===s)return e;const n=s.childrenAfterSort,r=l=>{let c=n[l];if(this.gos.get("groupHideOpenParents"))for(;c.expanded&&c.childrenAfterSort&&c.childrenAfterSort.length>0;)c=c.childrenAfterSort[0];return c.rowIndex},a=t.footerSvc;return a?a?.getTopDisplayIndex(i,e,n,r):r(e)}getTopLevelIndexFromDisplayedIndex(e){const{rootNode:t,rowsToDisplay:s}=this;if(!t||!s.length||s[0]===t)return e;let o=this.getRow(e);o.footer&&(o=o.sibling);let n=o.parent;for(;n&&n!==t;)o=n,n=o.parent;const r=t.childrenAfterSort?.indexOf(o)??-1;return r>=0?r:e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:Oo(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const i=t.length===0||t.some(o=>o.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:i,keepRenderedRows:!0,animate:Oo(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:Oo(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){const t=new dr(!1,this.rootNode);return t.active=e,t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:s,rowDataUpdated:i}=e;return!(!t||s||!i||t.removals.size||t.adds.size)}refreshModel(e){const{nodeManager:t,beans:s,eventSvc:i,started:o,refreshingModel:n}=this;if(!t)return;const r=!!e.rowDataUpdated,a=e.changedPath??(e.changedPath=this.createChangePath(!e.newData&&r));if(o&&r&&i.dispatchEvent({type:"rowDataUpdated"}),!o||n||s.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(e)){this.rowDataUpdatedPending||(this.rowDataUpdatedPending=r);return}switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.refreshingModel=!0,s.masterDetailSvc?.refreshModel(e),r&&e.step!=="group"&&s.colFilter?.refreshModel(),e.step){case"group":this.doGrouping(e);case"filter":this.doFilter(a);case"pivot":this.doPivot(a);case"aggregate":this.doAggregate(a);case"filter_aggregates":this.doFilterAggregates(a);case"sort":this.doSort(e.changedRowNodes,a);case"map":this.doRowsToDisplay()}const l=new Set;this.setRowTopAndRowIndex(l),this.clearRowTopAndRowIndex(a,l),this.refreshingModel=!1,i.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}isEmpty(){return!this.rootNode?._leafs?.length||!this.beans.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let s=!1,i=!1;const o=[],n=ar(this.gos);return this.forEachNodeAfterFilterAndSort(r=>{if(i)return;if(s&&(r===t||r===e)&&(i=!0,n&&r.group)){BC(o,r);return}if(!s){if(r!==t&&r!==e)return;s=!0,t===e&&(i=!0)}(!r.group||!n)&&o.push(r)}),o}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay,s=t.length;if(this.isEmpty()||s===0)return-1;let i=0,o=s-1;if(e<=0)return 0;if(t[o].rowTop<=e)return o;let r=-1,a=-1;for(;;){const l=Math.floor((i+o)/2),c=t[l];if(this.isRowInPixel(c,e)||(c.rowTop<e?i=l+1:c.rowTop>e&&(o=l-1),r===i&&a===o))return l;r=i,a=o}}isRowInPixel(e,t){const s=e.rowTop,i=s+e.rowHeight;return s<=t&&i>t}forEachLeafNode(e){const t=this.rootNode?._leafs;if(t)for(let s=0,i=t.length;s<i;++s)e(t[s],s)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){const t=this.rowsToDisplay;for(let s=0,i=t.length;s<i;++s)e(t[s],s)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,s=>s.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,s=>s.childrenAfterSort)}forEachPivotNode(e,t,s){const{colModel:i,rowGroupColsSvc:o}=this.beans;if(!i.isPivotMode())return;if(!o?.columns.length){e(this.rootNode,0);return}const n=s?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,r=>r.leafGroup?null:r[n])}depthFirstSearchRowNodes(e,t=!1,s=n=>n.childrenAfterGroup,i=this.rootNode,o=0){let n=o;if(!i)return n;const r=i===this.rootNode;if(r||e(i,n++),i.hasChildren()&&!i.footer){const a=s(i);if(a){const l=this.beans.footerSvc;n=l?.addTotalRows(n,i,e,t,r,"top")??n;for(const c of a)n=this.depthFirstSearchRowNodes(e,t,s,c,n);return l?.addTotalRows(n,i,e,t,r,"bottom")??n}}return n}doAggregate(e){const t=this.rootNode;t&&this.beans.aggStage?.execute({rowNode:t,changedPath:e})}doFilterAggregates(e){const t=this.rootNode,s=this.beans.filterAggStage;if(s){s.execute({rowNode:t,changedPath:e});return}t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){const s=this.beans.sortStage;if(s){s.execute({rowNode:this.rootNode,changedRowNodes:e,changedPath:t});return}t.forEachChangedNodeDepthFirst(i=>{i.childrenAfterSort=i.childrenAfterAggFilter.slice(0),GC(i)})}doGrouping(e){const t=this.rootNode,i=this.beans.groupStage?.execute({rowNode:t,changedRowNodes:e.changedRowNodes,changedPath:e.changedPath,afterColumnsChanged:!!e.afterColumnsChanged});if(i===void 0){const o=t._leafs;t.childrenAfterGroup=o,t.updateHasChildren();const n=t.sibling;n&&(n.childrenAfterGroup=o)}(i||e.rowDataUpdated)&&this.beans.colFilter?.refreshModel(),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){const t=this.beans.filterStage;if(t){t.execute({rowNode:this.rootNode,changedPath:e});return}e.forEachChangedNodeDepthFirst(s=>{s.childrenAfterFilter=s.childrenAfterGroup,dC(s)},!0)}doPivot(e){this.beans.pivotStage?.execute({rowNode:this.rootNode,changedPath:e})}getRowNode(e){const t=this.nodeManager?.getRowNode(e);return typeof t=="object"?t:typeof e=="string"&&e.indexOf(Ud)===0?this.beans.groupStage?.getNode(e):void 0}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const s=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),s)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){const{nodeManager:e,beans:t,eventSvc:s,asyncTransactions:i}=this;if(!e)return;t.valueCache?.onDataChanged();const o=[],n=[],r=new La;for(const{rowDataTransaction:a,callback:l}of i??[]){this.rowNodesCountReady=!0;const c=e.updateRowData(a,r);o.push(c),l&&n.push(l.bind(null,c))}this.commitTransactions(r),n.length>0&&setTimeout(()=>{for(let a=0,l=n.length;a<l;a++)n[a]()},0),o.length>0&&s.dispatchEvent({type:"asyncTransactionsFlushed",results:o}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){const t=this.nodeManager;if(!t)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const s=new La,i=t.updateRowData(e,s);return this.commitTransactions(s),i}commitTransactions(e){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:e,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{beans:e,rootNode:t}=this,s=e.flattenStage;if(s){this.rowsToDisplay=s.execute({rowNode:t});return}const i=this.rootNode.childrenAfterSort??[];for(const o of i)o.setUiLevel(0);this.rowsToDisplay=i}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);const s=e.sibling;s?.setRowHeight(s.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const s=t.detailNode;s?.setRowHeight(s.rowHeight,!0);const i=t.sibling;i?.setRowHeight(i.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){e.rowHeightChanged&&!this.beans.rowAutoHeight?.active&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},BC=(e,t)=>{const s=t.childrenAfterGroup;if(s)for(let i=0,o=s.length;i<o;++i){const n=s[i];n.data&&e.push(n),n.group&&BC(e,n)}};function wI(e){e.expansionSvc?.onGroupExpandedOrCollapsed()}function bI(e,t){const s=fi(e);s&&((!t||t==="everything")&&(t="group"),s.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function xI(e){return fi(e)?.isEmpty()??!0}function yI(e,t){fi(e)?.forEachLeafNode(t)}function SI(e,t){fi(e)?.forEachNodeAfterFilter(t)}function RI(e,t){fi(e)?.forEachNodeAfterFilterAndSort(t)}function FI(e,t){return e.frameworkOverrides.wrapIncoming(()=>fi(e)?.updateRowData(t))}function EI(e,t,s){e.frameworkOverrides.wrapIncoming(()=>fi(e)?.batchUpdateRowData(t,s))}function DI(e){e.frameworkOverrides.wrapIncoming(()=>fi(e)?.flushAsyncTransactions())}function PI(e){return e.selectionSvc?.getBestCostNodeSelection()}var TI={moduleName:"ClientSideRowModel",version:ee,rowModels:["clientSide"],beans:[CI,gI],dependsOn:[rC]},kI={moduleName:"ClientSideRowModelApi",version:ee,apiFunctions:{onGroupExpandedOrCollapsed:wI,refreshClientSideRowModel:bI,isRowDataEmpty:xI,forEachLeafNode:yI,forEachNodeAfterFilter:SI,forEachNodeAfterFilterAndSort:RI,applyTransaction:FI,applyTransactionAsync:EI,flushAsyncTransactions:DI,getBestCostNodeSelection:PI,resetRowHeights:HC,onRowHeightChanged:NC},dependsOn:[iI,oI]},MI=class extends O{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:s,columnKeys:i,skipRowGroups:o,exportRowNumbers:n}=t,r=this.getColumnsToExport({allColumns:s,skipRowGroups:o,columnKeys:i,exportRowNumbers:n});return[this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,s,i){const o=t.shouldRowBeSkipped||(()=>!1),r=t.rowPositions!=null||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!r,l=this.colModel.isPivotMode()?i.leafGroup:!i.group,c=!!i.footer,d=i.allChildrenCount===1&&i.childrenAfterGroup?.length===1&&Ky(this.gos,i);if(!l&&!c&&(t.skipRowGroups||d||a)||t.onlySelected&&!i.isSelected()||t.skipPinnedTop&&i.rowPinned==="top"||t.skipPinnedBottom&&i.rowPinned==="bottom"||i.stub||i.level===-1&&!l&&!c||o(xe(this.gos,{node:i})))return;const p=e.onNewBodyRow(i);if(s.forEach((f,v)=>{p.onColumn(f,v,i)}),t.getCustomContentBelowRow){const f=t.getCustomContentBelowRow(xe(this.gos,{node:i}));f&&e.addCustomContent(f)}}appendContent(e){return t=>{const s=e.appendContent;return s&&t.addCustomContent(s),t}}prependContent(e){return t=>{const s=e.prependContent;return s&&t.addCustomContent(s),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return s=>{if(!e.skipColumnGroupHeaders){const i=new Mm,{colGroupSvc:o}=this.beans,n=o?o.createColumnGroups({columns:t,idCreator:i,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(n,s,e.processGroupHeaderCallback)}return s}}exportHeaders(e,t){return s=>{if(!e.skipColumnHeaders){const i=s.onNewHeaderRow();t.forEach((o,n)=>{i.onColumn(o,n,void 0)})}return s}}processPinnedTopRows(e,t){return s=>{const i=this.processRow.bind(this,s,e,t);return e.rowPositions?e.rowPositions.filter(o=>o.rowPinned==="top").sort((o,n)=>o.rowIndex-n.rowIndex).map(o=>this.pinnedRowModel?.getPinnedTopRow(o.rowIndex)).forEach(i):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("top",i),s}}processRows(e,t){return s=>{const i=this.rowModel,o=st(this.gos),n=Xi(this.gos),r=!o&&e.onlySelected,a=this.processRow.bind(this,s,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(c=>c.rowPinned==null).sort((c,d)=>c.rowIndex-d.rowIndex).map(c=>i.getRow(c.rowIndex)).forEach(a);else if(this.colModel.isPivotMode())o?i.forEachPivotNode(a,!0,l==="filteredAndSorted"):n?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a);else if(e.onlySelectedAllPages||r){const c=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(c),c.forEach(a)}else l==="all"?i.forEachNode(a):o||n?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a);return s}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:s}=this.beans;if(!t||!s)return;const i=t.getSortOptions(),o=(n,r)=>n.rowIndex!=null&&r.rowIndex!=null?n.rowIndex-r.rowIndex:n.level===r.level?n.parent?.id===r.parent?.id?s.compareRowNodes(i,{rowNode:n,currentPos:n.rowIndex??-1},{rowNode:r,currentPos:r.rowIndex??-1}):o(n.parent,r.parent):n.level>r.level?o(n.parent,r):o(n,r.parent);e.sort(o)}processPinnedBottomRows(e,t){return s=>{const i=this.processRow.bind(this,s,e,t);return e.rowPositions?e.rowPositions.filter(o=>o.rowPinned==="bottom").sort((o,n)=>o.rowIndex-n.rowIndex).map(o=>this.pinnedRowModel?.getPinnedBottomRow(o.rowIndex)).forEach(i):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("bottom",i),s}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:s=!1,exportRowNumbers:i=!1,columnKeys:o}=e,{colModel:n,gos:r,visibleCols:a}=this,l=n.isPivotMode(),c=h=>qs(h)?!1:!Gs(h)||i;if(o?.length)return n.getColsForKeys(o).filter(c);const d=r.get("treeData");let u=[];return t&&!l?u=n.getCols():u=a.allCols,u=u.filter(h=>c(h)&&(s&&!d?!Bu(h):!0)),u}recursivelyAddHeaderGroups(e,t,s){const i=[];for(const o of e){const n=o;if(n.getChildren)for(const r of n.getChildren()??[])i.push(r)}e.length>0&&ot(e[0])&&this.doAddHeaderHeader(t,e,s),i&&i.length>0&&this.recursivelyAddHeaderGroups(i,t,s)}doAddHeaderHeader(e,t,s){const i=e.onNewHeaderGroupingRow();let o=0;for(const n of t){const r=n;let a;s?a=s(xe(this.gos,{columnGroup:r})):a=this.beans.colNames.getDisplayNameForColumnGroup(r,"header");const c=(r.isExpandable()?r.getLeafColumns():[]).reduce((d,u,h,p)=>{let f=je(d);return u.getColumnGroupShow()==="open"?(!f||f[1]!=null)&&(f=[h],d.push(f)):f&&f[1]==null&&(f[1]=h-1),h===p.length-1&&f&&f[1]==null&&(f[1]=h),d},[]);i.onColumn(r,a||"",o++,r.getLeafColumns().length-1,c)}}},II={moduleName:"SharedExport",version:ee,beans:[MI]},Mg=`\r
|
|
66
|
-
`,AI=class extends a4{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:s}=e;this.suppressQuotes=t,this.columnSeparator=s}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,Mg),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((s,i)=>{i!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(s.data.value||""),s.mergeAcross&&this.appendEmptyCells(s.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,s,i){s!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(i)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,s){t!=0&&(this.result+=this.columnSeparator);const i=this.extractRowCellValue(e,t,t,"csv",s);this.result+=this.putInQuotes(i.valueFormatted??i.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():($(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=Mg),this.isFirstLine=!1}},LI=class extends r4{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){$(51);return}const t=this.getMergedParams(e),s=this.getData(t),i=new Blob(["\uFEFF",s],{type:"text/plain"}),o=typeof t.fileName=="function"?t.fileName(xe(this.gos,{})):t.fileName;l4(this.getFileName(o),i)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const s=t?Object.assign({},e):this.getMergedParams(e);return this.getData(s)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:s,rowGroupColsSvc:i,valueSvc:o,gos:n}=this,{processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c,suppressQuotes:d,columnSeparator:u}=e;return new AI({colModel:t,colNames:s,valueSvc:o,gos:n,processCellCallback:r||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:c||void 0,suppressQuotes:d||!1,columnSeparator:u||",",rowGroupColsSvc:i})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function OI(e,t){return e.csvCreator?.getDataAsCsv(t)}function NI(e,t){e.csvCreator?.exportDataAsCsv(t)}var HI={moduleName:"CsvExport",version:ee,beans:[LI],apiFunctions:{getDataAsCsv:OI,exportDataAsCsv:NI},dependsOn:[II]},GI=class extends O{constructor(e,t,s){super(),this.id=e,this.parentCache=t,this.params=s,this.state="needsLoading",this.version=0,this.startRow=e*s.blockSize,this.endRow=this.startRow+s.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,s){this.successCommon(e,{rowData:t,rowCount:s})}isRequestMostRecentAndLive(e){const t=e===this.version,s=this.isAlive();return t&&s}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:s,beans:i,rowNodes:o}=this;for(let n=0;n<e;n++){const r=s+n,a=new ui(i);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(r),a.setRowTop(t*r),o.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:s,state:i}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:s,pageStatus:i}}}setDataAndId(e,t,s){te(t)?e.setDataAndId(t,s.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(Ze(this.params.datasource.getRows)){$(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:s,params:{sortModel:i,filterModel:o},gos:n}=this;return{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,s),failCallback:this.pageLoadFailed.bind(this,s),sortModel:i,filterModel:o,context:xe(n,{}).context}}forEachNode(e,t,s){this.rowNodes.forEach((i,o)=>{this.startRow+o<s&&e(i,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const s=e-this.startRow;return this.rowNodes[s]}processServerResult(e){const{rowNodes:t,beans:s}=this;t.forEach((o,n)=>{const r=e.rowData?e.rowData[n]:void 0;!o.id&&o.alreadyRendered&&r&&(t[n]=new ui(s),t[n].setRowIndex(o.rowIndex),t[n].setRowTop(o.rowTop),t[n].setRowHeight(o.rowHeight),o.clearRowTopAndRowIndex()),this.setDataAndId(t[n],r,this.startRow+n)});const i=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,i)}destroy(){for(const e of this.rowNodes)e.clearRowTopAndRowIndex();super.destroy()}},BI=2,VI=class extends O{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const s=Math.floor(e/this.params.blockSize);let i=this.blocks[s];if(!i){if(t)return;i=this.createBlock(s)}return i.getRow(e)}createBlock(e){const t=this.params,s=this.createBean(new GI(e,this,t));return this.blocks[s.id]=s,this.blockCount++,this.purgeBlocksIfNeeded(s),t.rowNodeBlockLoader.addBlock(s),s}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(zi(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(r=>r!=e),s=(r,a)=>a.lastAccessed-r.lastAccessed;t.sort(s);const i=this.params.maxBlocksInCache>0,o=i?this.params.maxBlocksInCache-1:null,n=BI-1;t.forEach((r,a)=>{const l=r.state==="needsLoading"&&a>=n,c=i?a>=o:!1;if(l||c){if(this.isBlockCurrentlyDisplayed(r)||this.isBlockFocused(r))return;this.removeBlockFromCache(r)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:s,endRow:i}=e;return t.rowIndex>=s&&t.rowIndex<i}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:s}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,s-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:s,overflowSize:i}=this.params,n=(e.id+1)*s+i;this.rowCount<n&&(this.rowCount=n)}}setRowCount(e,t){this.rowCount=e,te(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const s of this.getBlocksInOrder())s.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(s,i)=>s.id-i.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const s=[];let i=-1,o=!1;const n={value:0};let r=!1;for(const l of this.getBlocksInOrder())if(!r){if(o&&i+1!==l.id){r=!0;continue}i=l.id,l.forEachNode(c=>{const d=c===e||c===t;(o||d)&&s.push(c),d&&(o=!o)},n,this.rowCount)}return r||o?[]:s}},zI=class extends O{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new ui(e);this.rootNode=t,t.level=-1,this.rowHeight=Ai(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=Ai(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;this.cacheParams?e=!tr(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){if(!this.datasource)return;qo(this.gos)!=null||this.beans.selectionSvc?.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:s,rowNodeBlockLoader:i,eventSvc:o,gos:n}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:s?.getSortModel()??[],rowNodeBlockLoader:i,initialRowCount:n.get("infiniteInitialRowCount"),maxBlocksInCache:n.get("maxBlocksInCache"),rowHeight:Ai(e),overflowSize:n.get("cacheOverflowSize"),blockSize:n.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new VI(this.cacheParams)),o.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(s=>{s.id===e&&(t=s)}),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),s=this.getRowCount()-1;return t>s?s:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(e,t){this.infiniteCache?.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function WI(e){Il(e)?.refreshCache()}function jI(e){Il(e)?.purgeCache()}function _I(e){return Il(e)?.getRowCount()}var UI=class extends O{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=Yy(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=ht(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){us(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){zi(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(s=>s.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const s of t)s.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:s,state:i}=t.getBlockStateJson();e[s]=i}),e}printCacheStatus(){zi(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},$I={moduleName:"InfiniteRowModelCore",version:ee,rowModels:["infinite"],beans:[zI,UI]},qI={moduleName:"InfiniteRowModel",version:ee,apiFunctions:{refreshInfiniteCache:WI,purgeInfiniteCache:jI,getInfiniteRowCount:_I},dependsOn:[$I,nI]},KI="↑",YI="↓",XI={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},ZI=class extends tt{constructor(){super(XI),this.eValue=we,this.eDelta=we,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const s=Math.abs(t),i=e.formatValue(s),o=te(i)?i:s,n=t>=0,r=this.eDelta;n?r.textContent=KI+o:r.textContent=YI+o,r.classList.toggle("ag-value-change-delta-up",n),r.classList.toggle("ag-value-change-delta-down",!n)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),Ot(this.eDelta)}refresh(e,t=!1){const{value:s,valueFormatted:i}=e,{eValue:o,lastValue:n,beans:r}=this;if(s===n||(te(i)?o.textContent=i:te(s)?o.textContent=s:Ot(o),r.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=s&&typeof s=="object"&&"toNumber"in s?s.toNumber():s,l=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return n&&o.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=s,!0}},QI=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",JI={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},e6=class extends tt{constructor(){super(JI),this.eCurrent=we,this.refreshCount=0,this.registerCSS(QI)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:s}=this,i=Pt({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=i,i.textContent=s.textContent,this.getGui().insertBefore(i,s),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.ePrevious?.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let s=e.value;if(Ze(s)&&(s=""),s===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=s;const i=this.eCurrent;return te(e.valueFormatted)?i.textContent=e.valueFormatted:te(e.value)?i.textContent=s:Ot(i),!0}},t6=class extends O{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,s=this.beans.gos.get("cellFlashDuration"),i=this.beans.gos.get("cellFadeDuration")){const o=this.animations[t];o.delete(e);const n=Date.now(),r=n+s,a=n+s+i,l={phase:"flash",flashEndTime:r,fadeEndTime:a};o.set(e,l);const c=`ag-cell-${t}`,d=`${c}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(c,!0),u.toggleCss(d,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),s)}),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const s of Object.keys(this.animations)){const i=this.animations[s],o=`ag-cell-${s}`,n=`${o}-animation`;for(const[r,a]of i){if(!r.isAlive()||!r.comp){i.delete(r);continue}const{phase:l,flashEndTime:c,fadeEndTime:d}=a,u=l==="flash"?c:d;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:p,eGui:{style:f}}=r;switch(l){case"flash":p.toggleCss(o,!1),p.toggleCss(n,!0),f.transition=`background-color ${d-c}ms`,f.transitionDelay=`${c-e}ms`,t=Math.min(d,t??1/0),a.phase="fade";break;case"fade":p.toggleCss(o,!1),p.toggleCss(n,!1),f.removeProperty("transition"),f.removeProperty("transition-delay"),i.delete(r);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const s=$E(e.cellPosition);t.cells[s]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t?.flashDuration,t?.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function s6(e,t={}){const{cellFlashSvc:s}=e;s&&e.frameworkOverrides.wrapIncoming(()=>{for(const i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))s.flashCell(i,t)})}var i6={moduleName:"HighlightChanges",version:ee,beans:[t6],userComponents:{agAnimateShowChangeCellRenderer:ZI,agAnimateSlideCellRenderer:e6},apiFunctions:{flashCells:s6}};function o6(e){return e.stateSvc?.getState()??{}}function n6(e,t,s){return e.stateSvc?.setState(t,s)}function Ig(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=r6(e)),e.version=ee,e}function r6(e){return e.cellSelection=a6(e,"rangeSelection"),e}function a6(e,t){if(e&&typeof e=="object")return e[t]}var l6=class extends O{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=ht(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=ht(this,()=>{this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(this.updateCachedState("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowGroupExpansion",void 0)):(this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("ssrmRowGroupExpansion",void 0))},0),this.onRowSelectedDebounced=ht(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:s}=this.beans;this.isClientSideRowModel=st(e);const i=Ig(e.get("initialState")??{}),o=i.partialColumnState;delete i.partialColumnState,this.cachedState=i;const n=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>n(()=>this.setupStateOnGridReady(i))),(i.columnOrder||i.columnVisibility||i.columnSizing||i.columnPinning||i.columnGroup)&&s?.hideColumns("columnState");const[r,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:c})=>{c==="gridInitializing"&&(r(),n(()=>{this.setupStateOnColumnsInitialised(i,!!o),s?.revealColumns("columnState")}))},rowCountReady:()=>{a?.(),n(()=>this.setupStateOnRowCountReady(i))},firstDataRendered:()=>{l?.(),n(()=>this.setupStateOnFirstDataRendered(i))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const s=Ig(e);delete s.partialColumnState,this.cachedState=s,this.startSuppressEvents();const i="api",o=t?new Set(t):void 0;this.setGridReadyState(s,i,o),this.setColumnsInitialisedState(s,i,!!o,o),this.setRowCountState(s,i,o),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(s,i,o),this.stopSuppressEvents(i)})}setGridReadyState(e,t,s){t==="api"&&!s?.has("sideBar")&&this.beans.sideBar?.comp?.setState(e.sideBar),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,s,i){this.setColumnState(e,t,s,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const s=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:s("aggregation"),columnMoved:s("columnOrder"),columnPinned:s("columnPinning"),columnResized:s("columnSizing"),columnVisible:s("columnVisibility"),columnPivotChanged:s("pivot"),columnPivotModeChanged:s("pivot"),columnRowGroupChanged:s("rowGroup"),sortChanged:s("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,s){const{filter:i,rowGroupExpansion:o,ssrmRowGroupExpansion:n,rowSelection:r,pagination:a}=e,l=(d,u)=>!s?.has(d)&&(u||t==="api");l("filter",i)&&this.setFilterState(i),l("rowGroupExpansion",o)&&this.setRowGroupExpansionState(n,o,t),l("rowSelection",r)&&this.setRowSelectionState(r,t),l("pagination",a)&&this.setPaginationState(a,t);const c=this.updateCachedState.bind(this);c("filter",this.getFilterState()),this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(c("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),c("rowGroupExpansion",void 0)):(c("rowGroupExpansion",this.getRowGroupExpansionState()),c("ssrmRowGroupExpansion",void 0)),c("rowSelection",this.getRowSelectionState()),c("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),s=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(t("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),t("rowGroupExpansion",void 0)):(t("rowGroupExpansion",this.getRowGroupExpansionState()),t("ssrmRowGroupExpansion",void 0))},i=()=>t("filter",this.getFilterState()),{gos:o,colFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:i,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:s,columnRowGroupChanged:s,rowDataUpdated:()=>{(o.get("groupDefaultExpanded")!==0||o.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(s)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&t("pagination",this.getPaginationState())}}),n&&this.addManagedListeners(n,{filterStateChanged:i})}setFirstDataRenderedState(e,t,s){const{scroll:i,cellSelection:o,focusedCell:n,columnOrder:r,rowPinning:a}=e,l=(u,h)=>!s?.has(u)&&(h||t==="api");l("focusedCell",n)&&this.setFocusedCellState(n),l("cellSelection",o)&&this.setCellSelectionState(o),l("scroll",i)&&this.setScrollState(i),l("rowPinning",a)&&this.setRowPinningState(a),this.setColumnPivotState(!!r?.orderedColIds,t);const c=this.updateCachedState.bind(this);c("sideBar",this.getSideBarState()),c("focusedCell",this.getFocusedCellState());const d=this.getRangeSelectionState();c("rangeSelection",d),c("cellSelection",d),c("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),s=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:s,cellFocusCleared:s,cellSelectionChanged:i=>{if(i.finished){const o=this.getRangeSelectionState();t("rangeSelection",o),t("cellSelection",o)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return s4(el(e),e.colModel.isPivotMode())}setColumnState(e,t,s,i){const{sort:o,rowGroup:n,aggregation:r,pivot:a,columnPinning:l,columnVisibility:c,columnSizing:d,columnOrder:u}=e;let h=!1;const p=(T,M)=>{const N=!i?.has(T)&&!!(M||t==="api");return h||(h=N),N},f={},v=T=>{let M=f[T];return M||(M={colId:T},f[T]=M,M)},C={},w=p("sort",o);w&&o?.sortModel.forEach(({colId:T,sort:M},N)=>{const q=v(T);q.sort=M,q.sortIndex=N}),(w||!s)&&(C.sort=null,C.sortIndex=null);const b=p("rowGroup",n);b&&n?.groupColIds.forEach((T,M)=>{const N=v(T);N.rowGroup=!0,N.rowGroupIndex=M}),(b||!s)&&(C.rowGroup=null,C.rowGroupIndex=null);const x=p("aggregation",r);x&&r?.aggregationModel.forEach(({colId:T,aggFunc:M})=>{v(T).aggFunc=M}),(x||!s)&&(C.aggFunc=null);const y=p("pivot",a);y&&(a?.pivotColIds.forEach((T,M)=>{const N=v(T);N.pivot=!0,N.pivotIndex=M}),this.gos.updateGridOptions({options:{pivotMode:!!a?.pivotMode},source:t})),(y||!s)&&(C.pivot=null,C.pivotIndex=null);const S=p("columnPinning",l);if(S){for(const T of l?.leftColIds??[])v(T).pinned="left";for(const T of l?.rightColIds??[])v(T).pinned="right"}(S||!s)&&(C.pinned=null);const F=p("columnVisibility",c);if(F)for(const T of c?.hiddenColIds??[])v(T).hide=!0;(F||!s)&&(C.hide=null);const R=p("columnSizing",d);if(R)for(const{colId:T,flex:M,width:N}of d?.columnSizingModel??[]){const q=v(T);q.flex=M??null,q.width=N}(R||!s)&&(C.flex=null);const E=u?.orderedColIds,D=!!E?.length&&!i?.has("columnOrder"),P=D?E.map(T=>v(T)):Object.values(f);(P.length||h)&&(this.columnStates=P,ds(this.beans,{state:P,applyOrder:D,defaultState:C},t))}setColumnPivotState(e,t){const s=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;this.columnGroupStates=void 0;const o=this.beans,{pivotResultCols:n,colGroupSvc:r}=o;if(n?.isPivotResultColsPresent()){if(s){const a=[];for(const l of s)n.getPivotResultCol(l.colId)&&a.push(l);ds(o,{state:a,applyOrder:e},t)}i&&r?.setColumnGroupState(i,t)}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return i4(t)}setColumnGroupState(e,t,s){const i=this.beans.colGroupSvc;if(!i||s?.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const o=new Set(e.columnGroup?.openColumnGroupIds),r=i.getColumnGroupState().map(({groupId:a})=>{const l=o.has(a);return l&&o.delete(a),{groupId:a,open:l}});for(const a of o)r.push({groupId:a,open:!0});r.length&&(this.columnGroupStates=r),i.setColumnGroupState(r,t)}getFilterState(){const e=this.beans.filterManager;let t=e?.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const s=e?.getFilterState(),i=e?.getAdvFilterModel()??void 0;return t||i||s?{filterModel:t,columnFilterState:s,advancedFilterModel:i}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:s,columnFilterState:i,advancedFilterModel:o}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(s!==void 0||i!==void 0)&&t?.setFilterState(s??null,i??null,"columnFilter"),o!==void 0&&t?.setAdvFilterModel(o??null,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:s,type:i,startRow:o,endRow:n,columns:r,startColumn:a}=t;return{id:s,type:i,startRow:o,endRow:n,colIds:r.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:s,colModel:i,visibleCols:o}=this.beans;if(!ci(t)||!s)return;const n=[];for(const r of e?.cellRanges??[]){const a=[];for(const c of r.colIds){const d=i.getCol(c);d&&a.push(d)}if(!a.length)continue;let l=i.getCol(r.startColId);if(!l){const c=o.allCols,d=new Set(a);l=c.find(u=>d.has(u))}n.push({...r,columns:a,startColumn:l})}s.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:s}=e?.getVScrollPosition()??{top:0};return s||t?{top:s,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:s}=e??{top:0,left:0},{frameworkOverrides:i,rowRenderer:o,animationFrameSvc:n,ctrlsSvc:r}=this.beans;i.wrapIncoming(()=>{r.get("center").setCenterViewportScrollLeft(s),r.getScrollFeature()?.setVerticalScrollPosition(t),o.redraw({afterScroll:!0}),n?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:s,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:s,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:s}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:i,rowIndex:o,rowPinned:n}=e;t.setFocusedCell({column:s.getCol(i),rowIndex:o,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const s=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!s&&!i))return{page:s,pageSize:i}}setPaginationState(e,t){const{pagination:s,gos:i}=this.beans;if(!s)return;const{pageSize:o,page:n}=e??{page:0,pageSize:i.get("paginationPageSize")},r=t==="gridInitializing";o&&!i.get("paginationAutoPageSize")&&s.setPageSize(o,r?"initialState":"pageSizeSelector"),typeof n=="number"&&(r?s.setPage(n):s.goToPage(n))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e,t){this.beans.selectionSvc?.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e}=this.beans;if(e)return e.getExpansionState()}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,s){const i=this.beans.expansionSvc;if(!i)return;const o=t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};i.setExpansionState(o,s)}updateColumnState(e){const t=this.getColumnState();let s=!1;const i=this.cachedState;for(const o of Object.keys(t)){const n=t[o];tr(n,i[o])||(s=!0)}this.cachedState={...i,...t},s&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const s=this.cachedState[e];this.setCachedStateValue(e,t),tr(t,s)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){this.suppressEvents=!0,this.beans.colAnimation?.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.beans.colAnimation?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},c6={moduleName:"GridState",version:ee,beans:[l6],apiFunctions:{getState:o6,setState:n6}};function d6(e){return e.rowModel.isLastRowIndexKnown()}function u6(e){return e.pagination?.getPageSize()??100}function h6(e){return e.pagination?.getCurrentPage()??0}function p6(e){return e.pagination?.getTotalPages()??1}function g6(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function f6(e){e.pagination?.goToNextPage()}function m6(e){e.pagination?.goToPreviousPage()}function v6(e){e.pagination?.goToFirstPage()}function C6(e){e.pagination?.goToLastPage()}function w6(e,t){e.pagination?.goToPage(t)}var b6=class extends O{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,s=()=>{const i=Math.max(Ai(t),1),o=Math.floor(e/i);t.pagination.setPageSize(o,"autoCalculated")};this.isBodyRendered?ht(this,s,50)():(s(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},In="paginationPageSizeSelector",x6={tag:"span",cls:"ag-paging-page-size"},y6=class extends tt{constructor(){super(x6),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(In,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){Ot(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(In)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),s=!t||!e.includes(t);if(s){const o=this.gos.exists("paginationPageSize"),n=this.gos.get(In)!==!0;$(94,{pageSizeSet:o,pageSizesSet:n,pageSizeOptions:e,paginationPageSizeOption:t}),n||$(95,{paginationPageSizeOption:t,paginationPageSizeSelector:In}),e.unshift("")}const i=String(s?"":t);this.selectPageSizeComp?(pi(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(i,!0)):this.createPageSizeSelectorComp(e,i),this.hasEmptyOption=s}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const s=this.getLocaleTextFunc(),i=s("pageSizeSelectorLabel","Page Size:"),o=s("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new $u).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(o).setLabel(i).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(In);return!Array.isArray(t)||!t?.length?e:[...t].sort((s,i)=>s-i)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},S6={selector:"AG-PAGE-SIZE-SELECTOR",component:y6},R6=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:var(--ag-pagination-panel-height);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}",F6=class extends CE{constructor(){super(),this.btFirst=we,this.btPrevious=we,this.btNext=we,this.btLast=we,this.lbRecordCount=we,this.lbFirstRowOnPage=we,this.lbLastRowOnPage=we,this.lbCurrent=we,this.lbTotal=we,this.pageSizeComp=we,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(R6)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[S6]);const{btFirst:t,btPrevious:s,btNext:i,btLast:o}=this;this.activateTabIndex([t,s,i,o]),t.insertAdjacentElement("afterbegin",es(e?"last":"first",this.beans)),s.insertAdjacentElement("afterbegin",es(e?"next":"previous",this.beans)),i.insertAdjacentElement("afterbegin",es(e?"previous":"next",this.beans)),o.insertAdjacentElement("afterbegin",es(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(n):NF(this.beans,n),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){const{el:t,fn:s}=e;this.addManagedListeners(t,{click:s,keydown:i=>{(i.key===I.ENTER||i.key===I.SPACE)&&(i.preventDefault(),s())}})}OF(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):n4(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),s=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const i=this.isZeroPagesToDisplay(),o=e===s-1;this.nextButtonDisabled=o||i,this.lastButtonDisabled=!t||i||e===s-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){J0(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),s=this.pagination.getMasterRowCount(),i=e?s:null,o=this.pagination.getCurrentPage(),n=this.pagination.getPageSize();let r,a;this.isZeroPagesToDisplay()?r=a=0:(r=n*o+1,a=r+n-1,e&&a>i&&(a=i));const l=r+n-1,c=!e&&s<l,d=this.formatNumber(r);this.lbFirstRowOnPage.textContent=d;let u;const h=this.getLocaleTextFunc();c?u=h("pageLastRowUnknown","?"):u=this.formatNumber(a),this.lbLastRowOnPage.textContent=u;const f=t>0?o+1:0,v=this.formatNumber(f);this.lbCurrent.textContent=v;let C,w;if(e)C=this.formatNumber(t),w=this.formatNumber(i);else{const b=h("more","more");C=b,w=b}this.lbTotal.textContent=C,this.lbRecordCount.textContent=w,this.announceAriaStatus(d,u,w,v,C)}announceAriaStatus(e,t,s,i,o){const n=this.getLocaleTextFunc(),r=n("page","Page"),a=n("to","to"),l=n("of","of"),c=`${e} ${a} ${t} ${l} ${s}`,d=`${r} ${i} ${l} ${o}`;c!==this.ariaRowStatus&&(this.ariaRowStatus=c,this.ariaAnnounce?.announceValue(c,"paginationRow")),d!==this.ariaPageStatus&&(this.ariaPageStatus=d,this.ariaAnnounce?.announceValue(d,"paginationPage"))}},E6={selector:"AG-PAGINATION",component:F6},D6=class extends O{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return E6}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:s}=this.beans;s?.isEditing()&&(s.isBatchEditing()?s.cleanupEditors():s.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return te(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:te(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:te(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:te(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const s=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}s!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const s=this.pageSize,i=t-1;this.totalPages=Math.floor(i/s)+1,this.adjustCurrentPageIfInvalid();const o=this.currentPage,n=s*o;let r=s*(o+1)-1;if(r>i&&(r=i),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(n),r===i)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(r+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:s}=this,i=e-1;this.totalPages=Math.floor(i/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*s,this.bottomDisplayedRowIndex=t*(s+1)-1,this.bottomDisplayedRowIndex>i&&(this.bottomDisplayedRowIndex=i)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:s=!1,newPageSize:i=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:s,newPageSize:i,keepRenderedRows:t})}},P6={moduleName:"Pagination",version:ee,beans:[D6,b6],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:d6,paginationGetPageSize:u6,paginationGetCurrentPage:h6,paginationGetTotalPages:p6,paginationGetRowCount:g6,paginationGoToNextPage:f6,paginationGoToPreviousPage:m6,paginationGoToFirstPage:v6,paginationGoToLastPage:C6,paginationGoToPage:w6},dependsOn:[Al]};function T6(e,t={}){const s=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(s))}function VC(e,t,s,i,o){t&&(i&&t.parent&&t.parent.level!==-1&&VC(e,t.parent,s,i,o),t.setExpanded(s,void 0,o))}function k6(e,t){return e.rowModel.getRowNode(t)}function M6(e,t,s,i){e.rowRenderer.addRenderedRowListener(t,s,i)}function I6(e){return e.rowRenderer.getRenderedNodes()}function A6(e,t,s){e.rowModel.forEachNode(t,s)}function L6(e){return e.rowRenderer.firstRenderedRow}function O6(e){return e.rowRenderer.lastRenderedRow}function N6(e,t){return e.rowModel.getRow(t)}function H6(e){return e.rowModel.getRowCount()}var G6={moduleName:"RowApi",version:ee,apiFunctions:{redrawRows:T6,setRowNodeExpanded:VC,getRowNode:k6,addRenderedRowListener:M6,getRenderedNodes:I6,forEachNode:A6,getFirstDisplayedRowIndex:L6,getLastDisplayedRowIndex:O6,getDisplayedRowAtIndex:N6,getDisplayedRowCount:H6}},B6={moduleName:"ScrollApi",version:ee,apiFunctions:{getVerticalPixelRange:Zk,getHorizontalPixelRange:Qk,ensureColumnVisible:EC,ensureIndexVisible:DC,ensureNodeVisible:Jk}};function V6(e,t,s){if(!t)return;const i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,o=`aria-${t}`;s===null?i.removeAttribute(o):i.setAttribute(o,s)}function z6(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function W6(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function j6(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function _6(e){e.animationFrameSvc?.flushAllFrames()}function U6(e){return{rowHeight:Ai(e),headerHeight:Sr(e)}}function $6(e,t={}){const s=[];for(const n of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const r=n.getCellRenderer();r!=null&&s.push(lr(r))}if(t.columns?.length)return s;const i=[],o=iu(t.rowNodes);for(const n of e.rowRenderer.getAllRowCtrls()){if(o&&!ou(n.rowNode,o)||!n.isFullWidth())continue;const r=n.getFullWidthCellRenderers();for(let a=0;a<r.length;a++){const l=r[a];l!=null&&i.push(lr(l))}}return[...i,...s]}var q6={moduleName:"RenderApi",version:ee,apiFunctions:{setGridAriaProperty:V6,refreshCells:z6,refreshHeader:W6,isAnimationFrameQueueEmpty:j6,flushAllAnimationFrames:_6,getSizesForCurrentTheme:U6,getCellRendererInstances:$6}};function K6(e,t){typeof t=="number"?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)}function zC({colAutosize:e,visibleCols:t},s,i){Array.isArray(s)?e?.autoSizeCols({colKeys:s,skipHeader:i,source:"api"}):e?.autoSizeCols({...s,colKeys:s.colIds??t.allCols,source:"api"})}function Y6(e,t){t&&typeof t=="object"?zC(e,t):e.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:t})}var X6=class extends O{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let s=!1;const i=t.type;if(i==="fitGridWidth"||i==="fitProvidedWidth")s=!0;else if(i==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const o=e.get("rowData");s=o!=null&&o.length>0&&st(e)}s&&this.beans.colDelayRenderSvc?.hideColumns(i)}}autoSizeCols(e){const{eventSvc:t,visibleCols:s}=this.beans;this.innerAutoSizeCols(e).then(i=>{const o=c=>Ko(t,Array.from(c),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return o(i);const n=Ag(this.beans),r=c=>s.leftCols.some(d=>$n(d,c)),a=c=>s.rightCols.some(d=>$n(d,c)),l=e.colKeys.filter(c=>!qs(c)&&!Gs(c)&&!r(c)&&!a(c));this.sizeColumnsToFit(n,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map(c=>({...c,key:c.colId})),colKeys:l,onlyScaleUp:!0}),o(i)})}innerAutoSizeCols(e){return new Promise((t,s)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,s));const{colKeys:i,skipHeader:o,skipHeaderGroups:n,stopAtGroup:r,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:c=[],source:d="api"}=e,{animationFrameSvc:u,renderStatus:h,colModel:p,autoWidthCalc:f,visibleCols:v}=this.beans;if(u?.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,s)});return}this.timesDelayed=0;const C=new Set;let w=-1;const b=Object.fromEntries(c.map(({colId:S,...F})=>[S,F])),x=o??this.gos.get("skipHeaderOnAutoSize"),y=n??x;for(;w!==0;){w=0;const S=[];for(const F of i){if(!F||dS(F))continue;const R=p.getCol(F);if(!R||C.has(R))continue;const E=f.getPreferredWidthForColumn(R,x);if(E>0){const D=b[R.colId]??{};D.minWidth??(D.minWidth=l),D.maxWidth??(D.maxWidth=a);const P=Z6(R,E,D);R.setActualWidth(P,d),C.add(R),w++}S.push(R)}S.length&&v.refresh(d)}y||this.autoSizeColumnGroupsByColumns(i,d,r),t(C)})}autoSizeColumn(e,t,s){this.autoSizeCols({colKeys:[e],skipHeader:s,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,s){const{colModel:i,ctrlsSvc:o}=this.beans,n=new Set,r=i.getColsForKeys(e);for(const l of r){let c=l.getParent();for(;c&&c!=s;)c.isPadding()||n.add(c),c=c.getParent()}let a;for(const l of n){for(const c of o.getHeaderRowContainerCtrls())if(a=c.getHeaderCtrlForColumn(l),a)break;a?.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const s=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.autoSizeColumn(t,"uiColumnResized",s)};e.addEventListener("dblclick",i);const o=new Si(e);return o.addEventListener("doubleTap",i),()=>{e.removeEventListener("dblclick",i),o.destroy()}}addColumnGroupResize(e,t,s){const i=this.gos.get("skipHeaderOnAutoSize"),o=()=>{const n=[],r=t.getDisplayedLeafColumns();for(const a of r)a.getColDef().suppressAutoSize||n.push(a.getColId());n.length>0&&this.autoSizeCols({colKeys:n,skipHeader:i,stopAtGroup:t,source:"uiColumnResized"}),s()};return e.addEventListener("dblclick",o),()=>e.removeEventListener("dblclick",o)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const s=Ag(this.beans);if(s>0){this.sizeColumnsToFit(s,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):$(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",s,i){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,s,i));return}const o={};for(const{key:f,...v}of i?.columnLimits??[])o[typeof f=="string"?f:f.getColId()]=v;const n=this.beans.visibleCols.allCols;if(e<=0||!n.length)return;const r=Ls(n);if(i?.onlyScaleUp&&r>e||e===r&&n.every(v=>{if(v.colDef.suppressSizeToFit)return!0;const C=o?.[v.getId()],w=C?.minWidth??i?.defaultMinWidth,b=C?.maxWidth??i?.defaultMaxWidth,x=v.getActualWidth();return(w==null||x>=w)&&(b==null||x<=b)}))return;const l=[],c=[];for(const f of n){const v=i?.colKeys?.some(C=>$n(f,C))??!0;f.getColDef().suppressSizeToFit||!v?c.push(f):l.push(f)}const d=l.slice(0);let u=!1;const h=f=>{us(l,f),c.push(f)};for(const f of l){f.resetActualWidth(t);const v=o?.[f.getId()],C=v?.minWidth??i?.defaultMinWidth,w=v?.maxWidth??i?.defaultMaxWidth,b=f.getActualWidth();typeof C=="number"&&b<C?f.setActualWidth(C,t,!0):typeof w=="number"&&b>w&&f.setActualWidth(w,t,!0)}for(;!u;){u=!0;const f=e-Ls(c);if(f<=0)for(const v of l){const C=o?.[v.getId()]?.minWidth??i?.defaultMinWidth??v.minWidth;v.setActualWidth(C,t,!0)}else{const v=f/Ls(l);let C=f;for(let w=l.length-1;w>=0;w--){const b=l[w],x=o?.[b.getId()],y=x?.minWidth??i?.defaultMinWidth,S=x?.maxWidth??i?.defaultMaxWidth,F=b.getMinWidth(),R=b.getMaxWidth(),E=typeof y=="number"&&y>F?y:F,D=typeof S=="number"&&S<R?S:R;let P=Math.round(b.getActualWidth()*v);P<E?(P=E,h(b),u=!1):P>D?(P=D,h(b),u=!1):w===0&&(P=C),b.setActualWidth(P,t,!0),C-=P}}}for(const f of d)f.fireColumnWidthChangedEvent(t);const p=this.beans.visibleCols;p.setLeftValues(t),p.updateBodyWidths(),!s&&Ko(this.eventSvc,d,!0,t)}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,s=e.get("autoSizeStrategy");s?.type!=="fitGridWidth"&&s?.type!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const i=s.type;if(i==="fitGridWidth"){const{columnLimits:o,defaultMinWidth:n,defaultMaxWidth:r}=s,a=o?.map(({colId:l,minWidth:c,maxWidth:d})=>({key:l,minWidth:c,maxWidth:d}));this.sizeColumnsToFitGridBody({defaultMinWidth:n,defaultMaxWidth:r,columnLimits:a})}else i==="fitProvidedWidth"&&this.sizeColumnsToFit(s.width,"sizeColumnsToFit");t?.revealColumns(i)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{if(!this.isAlive())return;const s="autosizeColumns";e?this.autoSizeCols({...t,source:s,colKeys:e}):this.autoSizeAllColumns({...t,source:s}),this.beans.colDelayRenderSvc?.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function Z6(e,t,s={}){const i=s.minWidth??e.getMinWidth();t<i&&(t=i);const o=s.maxWidth??e.getMaxWidth();return t>o&&(t=o),t}function Ag({ctrlsSvc:e,scrollVisibleSvc:t}){const s=e.getGridBodyCtrl(),o=s.isVerticalScrollShowing()?t.getScrollbarWidth():0;return or(s.eGridBody)-o}var Q6={moduleName:"ColumnAutoSize",version:ee,beans:[X6],apiFunctions:{sizeColumnsToFit:K6,autoSizeColumns:zC,autoSizeAllColumns:Y6},dependsOn:[Ov]},J6=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function eA(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function tA(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function sA(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function iA(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function oA(e,t,s){return e.pinnedRowModel?.forEachPinnedRow(t,s)}var nA={moduleName:"PinnedRow",version:ee,beans:[uE],css:[J6],apiFunctions:{getPinnedTopRowCount:eA,getPinnedBottomRowCount:tA,getPinnedTopRow:sA,getPinnedBottomRow:iA,forEachPinnedRow:oA},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},rA=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){const e=this.firstNode.__autoHeights?.[this.col.getColId()];if(e==null)return;let t=0;for(const s of this.spannedNodes)s!==this.lastNode&&(t+=s.rowHeight);return e-t}},aA=class extends O{constructor(e){super(),this.column=e}buildCache(e){const{column:t,beans:{gos:s,pinnedRowModel:i,rowModel:o,valueSvc:n,pagination:r}}=this,{colDef:a}=t,l=this.getNodeMap(e),c=new Map,d=s.getCallback("isFullWidthRow"),u=a.equals,h=a.spanRows,p=typeof h=="function";let f=null,v=null,C;const w=(x,y)=>{f=x,v=null,C=y},b=x=>{const y=!x.isExpandable()&&!x.group&&!x.detail&&(d?!d({rowNode:x}):!0);if(x.rowIndex==null||!y){w(null,null);return}if(f==null||x.level!==f.level||x.footer||v&&x.rowIndex-1!==v?.getLastNode().rowIndex){w(x,n.getValue(t,x));return}const S=n.getValue(t,x);if(p){const F=xe(s,{valueA:C,nodeA:f,valueB:S,nodeB:x,column:t,colDef:a});if(!h(F)){w(x,S);return}}else if(u?!u(C,S):C!==S){w(x,S);return}if(!v){const F=l?.get(f);F?.firstNode===f?(F.reset(),v=F):v=new rA(t,f),c.set(f,v)}v.addSpannedNode(x),c.set(x,v)};switch(e){case"center":o.forEachDisplayedNode?.(x=>{(!r||r.isRowInPage(x.rowIndex))&&b(x)}),this.centerValueNodeMap=c;break;case"top":i?.forEachPinnedRow("top",b),this.topValueNodeMap=c;break;case"bottom":i?.forEachPinnedRow("bottom",b),this.bottomValueNodeMap=c;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},lA=class extends O{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=ht(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=ht(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const s=this.createManagedBean(new aA(e));this.spanningColumns.set(e,s),s.buildCache("top"),s.buildCache("bottom"),s.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls("top"),t?.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const s=this.spanningColumns.get(e);return s?s.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:s}=this.beans,i=e.column,o=e.rowIndex,n=this.spanningColumns.get(i);if(!n)return;let r;switch(e.rowPinned){case"top":r=t?.getPinnedTopRow(o);break;case"bottom":r=t?.getPinnedBottomRow(o);break;default:r=s.getRow(o)}if(r)return n.getCellSpan(r)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const s=this.spanningColumns.get(e);if(s)return s.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[s,i]of this.spanningColumns)if(i.isCellSpanning(e)){const o=i.getCellSpan(e);t(s,o)}}destroy(){super.destroy(),this.spanningColumns.clear()}},cA=class extends jo{constructor(e,t,s){super(e.col,e.firstNode,s,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,s,i,o,n,r){this.eWrapper=s,super.setComp(e,t,s,i,o,n,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||Wf(e,t.rowIndex)}setAriaRowSpan(){iy(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(kl(t)){this.focusedCellPosition=void 0;return}const s=this.isCellFocused();s||(this.focusedCellPosition=void 0),e&&s&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},dA=class extends ll{onRowIndexChanged(){super.onRowIndexChanged();for(const e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){const t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new cA(t,this,this.beans)}isCorrectCtrlForSpan(e){const t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},uA=class extends O{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,s=this.getCtrlsMap(e),i=s.size,o=this.getAllRelevantRowControls(e),n=new Map;let r=!1;for(const l of o)l.isAlive()&&t?.forEachSpannedColumn(l.rowNode,(c,d)=>{if(n.has(d.firstNode))return;const u=s.get(d.firstNode);if(u){n.set(d.firstNode,u),s.delete(d.firstNode);return}r=!0;const h=new dA(d.firstNode,this.beans,!1,!1,!1);n.set(d.firstNode,h)});this.setCtrlsMap(e,n);const a=n.size===i;if(!(!r&&a)){for(const l of s.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,s=t?.getCellSpanByPosition(e);if(!s)return;const i=this.getCtrlsMap(e.rowPinned).get(s.firstNode);if(i)return i.getAllCellCtrls().find(o=>o.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},hA={moduleName:"CellSpan",version:ee,beans:[lA,uA]},pA=class extends O{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,s=e.colDef,i=s.cellClassRules,o=this.getCellClassParams(e,s);dh(this.beans.expressionSvc,i===this.cellClassRules?void 0:this.cellClassRules,i,o,n=>t.toggleCss(n,!0),n=>t.toggleCss(n,!1)),this.cellClassRules=i}applyUserStyles(){const e=this.column,t=e.colDef,s=t.cellStyle;if(!s)return;let i;if(typeof s=="function"){const o=this.getCellClassParams(e,t);i=s(o)}else i=s;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,s=e.colDef,i=this.getCellClassParams(e,s);for(const n of this.staticClasses)t.toggleCss(n,!1);const o=this.beans.cellStyles.getStaticCellClasses(s,i);this.staticClasses=o;for(const n of o)t.toggleCss(n,!0)}getCellClassParams(e,t){const{value:s,rowNode:i}=this.cellCtrl;return xe(this.beans.gos,{value:s,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},gA=class extends O{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,s,i){dh(this.beans.expressionSvc,void 0,e.cellClassRules,t,s,i),this.processStaticCellClasses(e,t,s)}getStaticCellClasses(e,t){const{cellClass:s}=e;if(!s)return[];let i;return typeof s=="function"?i=s(t):i=s,typeof i=="string"&&(i=[i]),i||[]}createCellCustomStyleFeature(e,t){return new pA(e,t)}processStaticCellClasses(e,t,s){this.getStaticCellClasses(e,t).forEach(o=>{s(o)})}},fA={moduleName:"CellStyle",version:ee,beans:[gA]},mA={moduleName:"RowStyle",version:ee,beans:[tT]};function vA(e,t){return!!e.colHover?.isHovered(t)}var CA=class extends O{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=s=>{const{beans:i,gos:o,element:n,columns:r}=this,a=i.colHover;if(s??!!o.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:a.setMouseOver.bind(a,r),mouseout:a.clearMouseOver.bind(a)});else{for(const c of this.destroyManagedListeners)c();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},wA="ag-column-hover",bA=class extends O{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,s){const i=()=>{const o=this.isHovered(s);t.toggleCss("ag-column-hover",o)};e.addManagedEventListeners({columnHoverChanged:i}),i()}onCellColumnHover(e,t){if(!t)return;const s=this.isHovered(e);t.toggleCss(wA,s)}addHeaderFilterColumnHoverListener(e,t,s,i){this.createHoverFeature(e,[s],i);const o=()=>{const n=this.isHovered(s);t.toggleCss("ag-column-hover",n)};e.addManagedEventListeners({columnHoverChanged:o}),o()}createHoverFeature(e,t,s){e.createManagedBean(new CA(t,s))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},xA={moduleName:"ColumnHover",version:ee,beans:[bA],apiFunctions:{isColumnHovered:vA}},yA=class extends O{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addListener(e,t){const s=this.wrapSvc?.wrap(e,t)??t,i=!Na.has(e),o=i?this.asyncListeners:this.syncListeners;o.has(e)||o.set(e,new Set),o.get(e).add(s),this.eventSvc.addListener(e,s,i)}removeListener(e,t){const s=this.wrapSvc?.unwrap(e,t)??t,o=!!this.asyncListeners.get(e)?.delete(s);o||this.syncListeners.get(e)?.delete(s),this.eventSvc.removeListener(e,s,o)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,s=(n,r)=>{Na.has(n)&&t(n,r)},i=(n,r)=>{Na.has(n)||t(n,r)};this.globalListenerPairs.set(e,{syncListener:s,asyncListener:i});const o=this.eventSvc;o.addGlobalListener(s,!1),o.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:s,globalListenerPairs:i}=this,o=s?.unwrapGlobal(e)??e;if(i.has(o)){const{syncListener:r,asyncListener:a}=i.get(o);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!0),i.delete(e)}else this.syncGlobalListeners.delete(o),t.removeGlobalListener(o,!1)}destroyEventListeners(e,t){e.forEach((s,i)=>{s.forEach(o=>this.eventSvc.removeListener(i,o,t)),s.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const s of e)this.eventSvc.removeGlobalListener(s,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:s,asyncListener:i})=>{t.removeGlobalListener(s,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function SA(e,t,s){e.apiEventSvc?.addListener(t,s)}function RA(e,t,s){e.apiEventSvc?.removeListener(t,s)}function FA(e,t){e.apiEventSvc?.addGlobalListener(t)}function EA(e,t){e.apiEventSvc?.removeGlobalListener(t)}var DA={moduleName:"EventApi",version:ee,apiFunctions:{addEventListener:SA,addGlobalListener:FA,removeEventListener:RA,removeGlobalListener:EA},beans:[yA]},PA={moduleName:"Locale",version:ee,beans:[t4]},TA=class extends O{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=ht(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:e,rowModel:t,rowSpanSvc:s,pinnedRowModel:i}=this.beans,o=e.autoHeightCols;let n=!1;const r=a=>{const l=a.__autoHeights;let c=li(this.beans,a).height;for(const d of o){let u=l?.[d.getColId()];const h=s?.getCellSpan(d,a);if(h){if(h.getLastNode()!==a)continue;if(u=s?.getCellSpan(d,a)?.getLastNodeAutoHeight(),!u)return}if(u==null){if(this.colSpanSkipCell(d,a))continue;return}c=Math.max(u,c)}c!==a.rowHeight&&(a.setRowHeight(c),n=!0)};i?.forEachPinnedRow?.("top",r),i?.forEachPinnedRow?.("bottom",r),t.forEachDisplayedNode?.(r),n&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,s){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[s.getId()];return}const i=e.__autoHeights[s.getId()];e.__autoHeights[s.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:s,colViewport:i,visibleCols:o}=this.beans;if(!s.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=o.getLeftColsForRow(t);break;case"right":n=o.getRightColsForRow(t);break;case null:n=i.getColsWithinViewport(t);break}return!n.includes(e)}setupCellAutoHeight(e,t,s){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const i=t.parentElement,{rowNode:o,column:n}=e,r=this.beans,a=d=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!s.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:p,borderTopWidth:f}=Yi(i),v=u+h+p+f,w=t.offsetHeight+v;if(d<5){const x=!gt(r)?.contains(t),y=w==0;if(x||y){window.setTimeout(()=>a(d+1),0);return}}this.setRowAutoHeight(o,w,n)},l=()=>a(0);l();const c=Us(r,t,l);return s.addDestroyFunc(()=>{c(),this.setRowAutoHeight(o,void 0,n)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:s}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(s).filter(o=>o.isAutoHeight())),t.length!==0){if(!s.__autoHeights)return!1;for(const i of t){const o=s.__autoHeights[i.getColId()];if(!o||s.rowHeight<o)return!1}}return!0}},kA={moduleName:"RowAutoHeight",version:ee,beans:[TA]},MA={moduleName:"AllCommunity",version:ee,dependsOn:[TI,HI,qI,b4,kM,MM,IM,AM,LM,OM,NM,TM,yk,Sk,Rk,xk,Ek,Dk,c6,aI,P6,Nv,G6,B6,q6,Q6,l3,nA,ZM,HT,fA,xA,mA,DA,VT,i6,FC,PA,kA,a3,kI,hA]};function ce(e,t={}){const s=Object.keys(t).map(i=>{const o=t[i];return o!=null?`${i}=${o}`:null}).filter(Boolean).join(";");return[e,s].filter(i=>i.length>0).join(":")}var ne={grid(e){return ce("ag-grid-root",{gridId:e})},headerGroupCell(e){return ce("ag-header-group-cell",{colId:e})},headerCell(e){return ce("ag-header-cell",{colId:e})},headerCheckbox(e){return ce("ag-header-selection-checkbox",{colId:e})},headerFilterButton(e){return ce("ag-header-cell-filter-button",{colId:e})},floatingFilter(e){return ce("ag-floating-filter",{colId:e})},floatingFilterButton(e){return ce("ag-floating-filter-button",{colId:e})},headerCellMenuButton(e){return ce("ag-header-cell-menu-button",{colId:e})},headerResizeHandle(e){return ce("ag-header-cell-resize",{colId:e})},filterInstancePickerDisplay(e){return ce(`ag-${e.source}-picker-display`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},numberFilterInstanceInput(e){return ce(`ag-${e.source}-number-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},textFilterInstanceInput(e){return ce(`ag-${e.source}-text-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},dateFilterInstanceInput(e){return ce(`ag-${e.source}-date-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},setFilterInstanceMiniFilterInput(e){return ce(`ag-${e.source}-set-filter-mini-filter-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},setFilterInstanceItem(e,t){return ce(`ag-${e.source}-set-filter-item`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,itemLabel:t}:{colId:e.colId,itemLabel:t})},setFilterApplyPanelButton(e,t){return ce(`ag-${e.source}-set-filter-apply-panel-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},filterConditionRadioButton(e,t){return ce(`ag-${e.source}-filter-condition-radio-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},advancedFilterInput(){return ce("ag-advanced-filter-input")},advancedFilterButton(e){return ce("ag-advanced-filter-button",{label:e})},advancedFilterBuilderButton(){return ce("ag-advanced-filter-builder-button")},advancedFilterPanelMaximiseButton(){return ce("ag-advanced-filter-builder-panel-maximise")},advancedFilterPanelCloseButton(){return ce("ag-advanced-filter-builder-panel-close")},advancedFilterPill(e){return ce("ag-advanced-filter-builder-pill",{label:e})},advancedFilterBuilderAddItemButton(){return ce("ag-advanced-filter-builder-add-item-button")},rowNode(e){return ce("ag-row",{"row-id":e})},cell(e,t){return ce("ag-cell",{"row-id":e,colId:t})},autoGroupCell(e){return ne.cell(e,oi)},checkbox(e,t){return ce("ag-selection-checkbox",{"row-id":e,colId:t})},selectionColumnCheckbox(e){return ne.checkbox(e,Hu)},autoGroupColumnCheckbox(e){return ne.checkbox(e,oi)},dragHandle(e,t){return ce("ag-drag-handle",{"row-id":e,colId:t})},groupContracted(e,t){return ce("ag-group-contracted",{"row-id":e,colId:t})},groupExpanded(e,t){return ce("ag-group-expanded",{"row-id":e,colId:t})},autoGroupContracted(e){return ne.groupContracted(e,oi)},autoGroupExpanded(e){return ne.groupExpanded(e,oi)},rowNumber(e){return ne.cell(e,Gu)},menu(){return ce("ag-menu")},menuOption(e){return ce("ag-menu-option",{option:e})},sideBar(){return ce("ag-side-bar")},sideBarButton(e){return ce("ag-side-button",{label:e})},columnToolPanel(){return ce("ag-column-panel")},pivotModeSelect(){return ce("ag-pivot-mode-select")},columnPanelSelectHeaderCheckbox(){return ce("ag-column-panel-select-header-checkbox")},columnPanelSelectHeaderFilter(){return ce("ag-column-panel-select-header-filter")},columnSelectListItemGroupClosedIcon(e){return ce("ag-column-select-list-item-group-closed-icon",{label:e})},columnSelectListItemCheckbox(e){return ce("ag-column-select-list-item-checkbox",{label:e})},columnSelectListItemDragHandle(e){return ce("ag-column-select-list-item-drag-handle",{label:e})},columnDropCellDragHandle(e,t,s){return ce("ag-column-drop-cell-drag-handle",{source:e,area:t,label:s})},columnDropCellCancelButton(e,t,s){return ce("ag-column-drop-cell-cancel",{source:e,area:t,label:s})},columnDropArea(e,t){return ce("ag-column-drop-area",{source:e,name:t})},filterToolPanel(){return ce("ag-filter-panel")},filterToolPanelAddFilterButton(){return ce("ag-filter-panel-add-filter-button")},filterToolPanelFilterTypeSelector(e){return ce("ag-filter-panel-filter-type-selector",{colLabel:e})},filterToolPanelSearchInput(){return ce("ag-filter-toolpanel-search-input")},filterToolPanelGroup(e){return ce("ag-filter-toolpanel-group",{title:e})},filterToolPanelGroupCollapsedIcon(e){return ce("ag-filter-toolpanel-group-collapsed-icon",{title:e})},statusBarTotalAndFilteredRowCount(){return ce("ag-status-bar-total-and-filtered-row-count")},statusBarTotalRowCount(){return ce("ag-status-bar-total-row-count")},statusBarFilteredRowCount(){return ce("ag-status-bar-filtered-row-count")},statusBarSelectedRowCount(){return ce("ag-status-bar-selected-row-count")},statusBarAggregations(){return ce("ag-status-bar-aggregations")},paginationPanelSizePickerDisplay(e){return ce("ag-pagination-page-size-picker-field-display",{value:e})},paginationPanelFirstRowOnPage(e){return ce("ag-paging-row-summary-panel-first-row-on-page",{value:e})},paginationPanelLastRowOnPage(e){return ce("ag-paging-row-summary-panel-last-row-on-page",{value:e})},paginationPanelRecordCount(e){return ce("ag-paging-row-summary-panel-record-count",{value:e})},paginationSummaryPanelButton(e){return ce("ag-paging-page-summary-panel-btn",{label:e})},paginationSummaryPanelCurrentPage(e){return ce("ag-paging-page-summary-panel-current-page",{value:e})},paginationSummaryPanelTotalPage(e){return ce("ag-paging-page-summary-panel-total-page",{value:e})},fillHandle(){return ce("ag-fill-handle")},columnChooserCloseButton(){return ce("ag-column-chooser-close-button")},columnChooserSearchBarCheckbox(){return ce("ag-column-chooser-header-checkbox")},columnChooserSearchBarFilter(){return ce("ag-column-chooser-searchbar-filter")},columnChooserListItemGroupClosedIcon(e){return ce("ag-column-chooser-list-item-group-closed-icon",{label:e})},columnChooserListItemCheckbox(e){return ce("ag-column-chooser-list-item-checkbox",{label:e})},columnChooserListItemDragHandle(e){return ce("ag-column-chooser-list-item-drag-handle",{label:e})},overlay(){return ce("ag-overlay")}},WC="data-testid";function ue(e,t){e?.setAttribute(WC,t)}function IA(e){WC=e}var AA=class extends O{constructor(){super(...arguments),this.beanName="testIdSvc"}postConstruct(){const e=ht(this,()=>this.setupAllTestIds(),500),t=ht(this,()=>{this.setupAllTestIds(),e()},0);this.addManagedEventListeners({firstDataRendered:t,displayedRowsChanged:t,displayedColumnsChanged:t,displayedColumnsWidthChanged:t,virtualColumnsChanged:t,columnMenuVisibleChanged:t,contextMenuVisibleChanged:t,advancedFilterBuilderVisibleChanged:t,fieldPickerValueSelected:t,modelUpdated:t,sideBarUpdated:t,pinnedHeightChanged:t,gridReady:t,overlayExclusiveChanged:t,rowGroupOpened:t,scrollVisibilityChanged:t,gridSizeChanged:t,filterOpened:t,filterChanged:t,cellSelectionChanged:t})}setupAllTestIds(){const e=as(this.beans),t=Dv(this.beans),s=e.querySelector(`[grid-id="${t}"]`);ue(s,ne.grid(t)),e.querySelectorAll(".ag-header-group-cell").forEach(n=>{ue(n,ne.headerGroupCell(n.getAttribute("col-id")))}),e.querySelectorAll(".ag-header-cell").forEach(n=>{const r=n.getAttribute("col-id"),l=n.classList.contains("ag-floating-filter")?ne.floatingFilter(r):ne.headerCell(r);ue(n,l),ue(n.querySelector(".ag-header-cell-filter-button"),ne.headerFilterButton(r)),ue(n.querySelector(".ag-header-cell-menu-button"),ne.headerCellMenuButton(r)),ue(n.querySelector(".ag-header-cell-resize"),ne.headerResizeHandle(r)),ue(n.querySelector(".ag-checkbox input[type=checkbox]"),ne.headerCheckbox(r)),ue(n.querySelector(".ag-floating-filter-button button"),ne.floatingFilterButton(r)),this.setupFilterInstance(n.querySelector(".ag-floating-filter-body"),{source:"floating-filter",colId:r})});const i=e.querySelector(".ag-filter-menu");this.setupFilterInstance(i,{source:"column-filter"}),ue(e.querySelector(".ag-advanced-filter input[type=text]"),ne.advancedFilterInput()),e.querySelectorAll(".ag-advanced-filter-buttons button").forEach(n=>{ue(n,ne.advancedFilterButton(n.textContent))}),ue(e.querySelector("button.ag-advanced-filter-builder-button"),ne.advancedFilterBuilderButton()),e.querySelectorAll('.ag-panel[aria-label="Advanced Filter"] .ag-panel-title-bar-button').forEach((n,r)=>{ue(n,r===0?ne.advancedFilterPanelMaximiseButton():ne.advancedFilterPanelCloseButton())}),e.querySelectorAll('.ag-panel[aria-lable="Advanced Filter"] .ag-advanced-filter-builder-pill').forEach(n=>{ue(n,ne.advancedFilterPill(n.querySelector(".ag-picker-field-display")?.textContent))}),ue(e.querySelector('.ag-panel[aria-label="Advanced Filter"] .ag-advanced-filter-builder-item-button'),ne.advancedFilterBuilderAddItemButton()),e.querySelectorAll(".ag-row").forEach(n=>{const r=n.getAttribute("row-id");ue(n,ne.rowNode(r)),n.querySelectorAll(".ag-cell").forEach(a=>{const l=a.getAttribute("col-id");ue(a,ne.cell(r,l)),ue(a.querySelector(".ag-selection-checkbox input[type=checkbox]"),ne.checkbox(r,l)),ue(a.querySelector(".ag-drag-handle"),ne.dragHandle(r,l)),ue(a.querySelector(".ag-group-contracted"),ne.groupContracted(r,l)),ue(a.querySelector(".ag-group-expanded"),ne.groupExpanded(r,l))})}),e.querySelectorAll(".ag-menu-list").forEach(n=>{ue(n,ne.menu()),n.querySelectorAll(".ag-menu-option").forEach(r=>{ue(r,ne.menuOption(r.querySelector(".ag-menu-option-text")?.textContent))})}),e.querySelectorAll(".ag-side-bar").forEach(n=>{ue(n,ne.sideBar()),n.querySelectorAll(".ag-side-button button").forEach(r=>{ue(r,ne.sideBarButton(r.querySelector(".ag-side-button-label")?.textContent))}),n.querySelectorAll(".ag-column-panel").forEach(r=>{ue(r,ne.columnToolPanel()),ue(r.querySelector(".ag-pivot-mode-select input[type=checkbox]"),ne.pivotModeSelect()),ue(r.querySelector(".ag-column-select-header-checkbox input[type=checkbox]"),ne.columnPanelSelectHeaderCheckbox()),ue(r.querySelector(".ag-column-select-header-filter-wrapper input[type=text]"),ne.columnPanelSelectHeaderFilter()),r.querySelectorAll(".ag-column-select-list").forEach(a=>{a.querySelectorAll(".ag-column-select-virtual-list-item").forEach(l=>{const c=l.getAttribute("aria-label");ue(l.querySelector(".ag-column-group-closed-icon"),ne.columnSelectListItemGroupClosedIcon(c)),ue(l.querySelector(".ag-column-select-checkbox input[type=checkbox]"),ne.columnSelectListItemCheckbox(c)),ue(l.querySelector(".ag-drag-handle"),ne.columnSelectListItemDragHandle(c))})}),this.setupColumnDropArea(r,"toolbar")}),n.querySelectorAll(".ag-filter-panel").forEach(r=>{ue(r,ne.filterToolPanel()),ue(r.querySelector("button.ag-filter-add-button"),ne.filterToolPanelAddFilterButton()),r.querySelectorAll(".ag-filter-card").forEach(a=>{const l=a.querySelector(".ag-filter-card-title")?.textContent,c=a.querySelector(".ag-filter-type-select");ue(c,ne.filterToolPanelFilterTypeSelector(l)),a.querySelectorAll(".ag-filter").forEach(d=>this.setupFilterInstance(d,{source:"filter-toolpanel",colLabel:l}))})}),n.querySelectorAll(".ag-filter-toolpanel").forEach(r=>{ue(r.querySelector(".ag-filter-toolpanel-search-input input[type=text]"),ne.filterToolPanelSearchInput()),r.querySelectorAll(".ag-filter-toolpanel-group").forEach(a=>{const l=a.querySelector(".ag-filter-toolpanel-group-title")?.textContent;ue(a,ne.filterToolPanelGroup(l)),ue(a.querySelector(".ag-filter-toolpanel-group-title-bar-icon .ag-icon-tree-closed"),ne.filterToolPanelGroupCollapsedIcon(l));const c=a.querySelector(".ag-filter-toolpanel-instance-filter");c&&this.setupFilterInstance(c,{source:"filter-toolpanel",colLabel:l})})})}),ue(e.querySelector(".ag-status-bar .ag-status-panel-total-and-filtered-row-count"),ne.statusBarTotalAndFilteredRowCount()),ue(e.querySelector(".ag-status-bar .ag-status-panel-total-row-count"),ne.statusBarTotalRowCount()),ue(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),ne.statusBarFilteredRowCount()),ue(e.querySelector(".ag-status-bar .ag-status-panel-selected-row-count"),ne.statusBarSelectedRowCount()),ue(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),ne.statusBarAggregations()),e.querySelectorAll(".ag-paging-panel").forEach(n=>{ue(n.querySelector(".ag-paging-page-size .ag-picker-field-display"),ne.paginationPanelSizePickerDisplay(n.querySelector(".ag-paging-page-size .ag-picker-field-display")?.textContent)),n.querySelectorAll(".ag-paging-row-summary-panel-number").forEach(r=>{switch(r.getAttribute("data-ref")){case"lbFirstRowOnPage":ue(r,ne.paginationPanelFirstRowOnPage(r.textContent));break;case"lbLastRowOnPage":ue(r,ne.paginationPanelLastRowOnPage(r.textContent));break;case"lbRecordCount":ue(r,ne.paginationPanelRecordCount(r.textContent));break}}),n.querySelectorAll(".ag-paging-page-summary-panel .ag-button").forEach(r=>{ue(r,ne.paginationSummaryPanelButton(r.getAttribute("aria-label")?.toLowerCase()))}),n.querySelectorAll(".ag-paging-page-summary-panel .ag-paging-number").forEach(r=>{switch(r.getAttribute("data-ref")){case"lbCurrent":ue(r,ne.paginationSummaryPanelCurrentPage(r.textContent));break;case"lbTotal":ue(r,ne.paginationSummaryPanelTotalPage(r.textContent));break}})}),ue(e.querySelector(".ag-fill-handle"),ne.fillHandle()),e.querySelectorAll('.ag-panel[aria-label="Choose Columns"]').forEach(n=>{ue(n.querySelector(".ag-panel-title-bar-button-icon"),ne.columnChooserCloseButton()),ue(n.querySelector('.ag-column-select-header-checkbox input[type="checkbox"]'),ne.columnChooserSearchBarCheckbox()),ue(n.querySelector('.ag-column-select-header-filter-wrapper input[type="text"]'),ne.columnChooserSearchBarFilter()),n.querySelectorAll(".ag-column-select-list").forEach(r=>{r.querySelectorAll(".ag-column-select-virtual-list-item").forEach(a=>{const l=a.getAttribute("aria-label");ue(a.querySelector(".ag-column-group-closed-icon"),ne.columnChooserListItemGroupClosedIcon(l)),ue(a.querySelector(".ag-column-select-checkbox input[type=checkbox]"),ne.columnChooserListItemCheckbox(l)),ue(a.querySelector(".ag-drag-handle"),ne.columnChooserListItemDragHandle(l))})})}),ue(e.querySelector(".ag-overlay-wrapper"),ne.overlay());const o=e.querySelector(".ag-column-drop-wrapper");o&&this.setupColumnDropArea(o,"panel")}setupFilterInstance(e,t){if(!e)return;e.querySelectorAll(".ag-filter-select .ag-picker-field-display").forEach(r=>{ue(r,ne.filterInstancePickerDisplay(t))});const s=e.querySelector('.ag-filter-body input[type="number"]');ue(s,ne.numberFilterInstanceInput(t));const i=e.querySelector('.ag-filter-body input[type="text"]');ue(i,ne.textFilterInstanceInput(t));const o=e.querySelector('.ag-filter-body input[type="date"]');ue(o,ne.dateFilterInstanceInput(t));const n=e.querySelector('.ag-mini-filter input[type="text"]');ue(n,ne.setFilterInstanceMiniFilterInput(t)),e.querySelectorAll(".ag-set-filter-list .ag-set-filter-item").forEach(r=>{const a=r.querySelector(".ag-checkbox-label")?.textContent,l=r.querySelector('input[type="checkbox"]');ue(l,ne.setFilterInstanceItem(t,a))}),e.querySelectorAll(".ag-filter-apply-panel button").forEach(r=>{ue(r,ne.setFilterApplyPanelButton(t,r.textContent))}),e.querySelectorAll(".ag-filter-condition .ag-radio-button").forEach(r=>{const a=r.querySelector(".ag-radio-button-label")?.textContent;ue(r.querySelector("input[type=radio]"),ne.filterConditionRadioButton(t,a))})}setupColumnDropArea(e,t){e.querySelectorAll(".ag-column-drop").forEach(s=>{const i=s.querySelector(".ag-column-drop-list")?.getAttribute("aria-label");ue(s,ne.columnDropArea(t,i)),s.querySelectorAll(".ag-column-drop-cell").forEach(o=>{const n=o.querySelector(".ag-column-drop-cell-text")?.textContent;ue(o.querySelector(".ag-drag-handle"),ne.columnDropCellDragHandle(t,i,n)),ue(o.querySelector(".ag-column-drop-cell-button .ag-icon-cancel"),ne.columnDropCellCancelButton(t,i,n))})})}},LA={moduleName:"Testing",version:ee,beans:[AA]};function OA({testIdAttribute:e}={}){e&&IA(e),am.registerModules([LA])}var St=g.createContext({}),jC=g.createContext("default"),Fr=(e,t,s,i)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const n=e.newAgStackInstance();let r,a,l=!1;return n.then(c=>{if(l){t.destroyBean(c);return}r=c,a=r.getGui(),s.appendChild(a),Lg(i,r)}),()=>{l=!0,r&&(a?.remove(),t.destroyBean(r),i&&Lg(i,void 0))}},Lg=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const s=e;s.current=t}},Xt=(...e)=>e.filter(s=>s!=null&&s!=="").join(" "),ts=class _C{constructor(...t){this.classesMap={};for(const s of t)this.classesMap[s]=!0}setClass(t,s){if(!!this.classesMap[t]==s)return this;const o=new _C;return o.classesMap={...this.classesMap},o.classesMap[t]=s,o}toString(){return Object.keys(this.classesMap).filter(s=>this.classesMap[s]).join(" ")}},cn=e=>{const t=()=>typeof Symbol=="function"&&Symbol.for,s=()=>t()?Symbol.for("react.memo"):60115;return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===s()},cu=g.version?.split(".")[0],UC=cu==="16"||cu==="17";function NA(){return cu==="19"}var Ga=!1;function HA(e){return Ga||setTimeout(()=>Ga=!1,0),Ga=!0,e()}var pr=(e,t)=>{!UC&&e&&!Ga?tn.flushSync(t):t()},GA=e=>{UC?e():g.startTransition(e)};function BA(e,t,s){return g.useSyncExternalStore?g.useSyncExternalStore(e,t):s}function ul(e,t,s){if(t==null||e==null)return t;if(e===t||t.length===0&&e.length===0)return e;if(s||e.length===0&&t.length>0||e.length>0&&t.length===0)return t;const i=[],o=[],n=new Map,r=new Map;for(let a=0;a<t.length;a++){const l=t[a];r.set(l.instanceId,l)}for(let a=0;a<e.length;a++){const l=e[a];n.set(l.instanceId,l),r.has(l.instanceId)&&i.push(l)}for(let a=0;a<t.length;a++){const l=t[a],c=l.instanceId;n.has(c)||o.push(l)}return i.length===e.length&&o.length===0?e:i.length===0&&o.length===t.length?t:i.length===0?o:o.length===0?i:[...i,...o]}var $C=g.forwardRef((e,t)=>{const{registry:s,context:i}=g.useContext(St),o=g.useRef(null),n=g.useRef(null),r=g.useRef(null),a=g.useRef(null),l=g.useRef(null),c=g.useRef(),[d,u]=g.useState(),[h,p]=g.useState(),[f,v]=g.useState(),[C,w]=g.useState(()=>new ts),[b,x]=g.useState(()=>new ts("ag-hidden")),[y,S]=g.useState(()=>new ts("ag-hidden")),[F,R]=g.useState(()=>new ts("ag-invisible"));g.useImperativeHandle(t,()=>({refresh(){return!1}})),g.useLayoutEffect(()=>Fr(d,i,n.current),[d]);const E=g.useCallback(H=>{if(o.current=H,!H||i.isDestroyed()){c.current=i.destroyBean(c.current);return}const A={setInnerRenderer:(k,V)=>{u(k),v(V)},setChildCount:k=>p(k),toggleCss:(k,V)=>w(U=>U.setClass(k,V)),setContractedDisplayed:k=>S(V=>V.setClass("ag-hidden",!k)),setExpandedDisplayed:k=>x(V=>V.setClass("ag-hidden",!k)),setCheckboxVisible:k=>R(V=>V.setClass("ag-invisible",!k)),setCheckboxSpacing:k=>R(V=>V.setClass("ag-group-checkbox-spacing",k))},de=s.createDynamicBean("groupCellRendererCtrl",!0);de&&(c.current=i.createBean(de),c.current.init(A,H,r.current,a.current,l.current,$C,e))},[]),D=g.useMemo(()=>`ag-cell-wrapper ${C.toString()}`,[C]),P=g.useMemo(()=>`ag-group-expanded ${b.toString()}`,[b]),T=g.useMemo(()=>`ag-group-contracted ${y.toString()}`,[y]),M=g.useMemo(()=>`ag-group-checkbox ${F.toString()}`,[F]),N=d?.componentFromFramework,q=N?d.componentClass:void 0,L=d==null&&f!=null,z=rn(f);return g.createElement("span",{className:D,ref:E,...e.colDef?{}:{role:c.current?.getCellAriaRole()}},g.createElement("span",{className:P,ref:a}),g.createElement("span",{className:T,ref:l}),g.createElement("span",{className:M,ref:r}),g.createElement("span",{className:"ag-group-value",ref:n},L?z:N?g.createElement(q,{...d.params}):null),g.createElement("span",{className:"ag-group-child-count"},h))}),Og=$C,Ch=g.createContext({setMethods:()=>{}}),VA=e=>{const{initialProps:t,addUpdateCallback:s,CustomComponentClass:i,setMethods:o}=e,[{key:n,...r},a]=g.useState(t);return g.useEffect(()=>{s(l=>a(l))},[]),g.createElement(Ch.Provider,{value:{setMethods:o}},g.createElement(i,{key:n,...r}))},zA=g.memo(VA),WA=0;function Ng(){return`agPortalKey_${++WA}`}var qC=class{constructor(e,t,s,i){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=s,this.suppressFallbackMethods=!!i,this.statelessComponent=this.isStateless(this.reactComponent),this.key=Ng(),this.portalKey=Ng(),this.instanceCreated=this.isStatelessComponent()?Le.resolve(!1):new Le(o=>{this.resolveInstanceCreated=o})}getGui(){return this.eParentElement}getRootElement(){return this.eParentElement.firstChild}destroy(){this.componentInstance&&typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy();const e=this.portal;e&&this.portalManager.destroyPortal(e)}createParentElement(e){const t=this.portalManager.getComponentWrappingElement(),s=document.createElement(t||"div");return s.classList.add("ag-react-container"),e.reactContainer=s,s}statelessComponentRendered(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0}getFrameworkComponentInstance(){return this.componentInstance}isStatelessComponent(){return this.statelessComponent}getReactComponentName(){return this.reactComponent.name}getMemoType(){return this.hasSymbol()?Symbol.for("react.memo"):60115}hasSymbol(){return typeof Symbol=="function"&&Symbol.for}isStateless(e){return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===this.getMemoType()}hasMethod(e){const t=this.getFrameworkComponentInstance();return!!t&&t[e]!=null||this.fallbackMethodAvailable(e)}callMethod(e,t){const s=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!s){setTimeout(()=>this.callMethod(e,t));return}const i=s[e];if(i)return i.apply(s,t);if(this.fallbackMethodAvailable(e))return this.fallbackMethod(e,t&&t[0]?t[0]:{})}addMethod(e,t){this[e]=t}init(e){return this.eParentElement=this.createParentElement(e),this.createOrUpdatePortal(e),new Le(t=>this.createReactComponent(t))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=t=>{this.componentInstance=t,this.resolveInstanceCreated?.(!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,{...e,key:this.key}),this.portal=tn.createPortal(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return g.createElement(e,t)}createReactComponent(e){this.portalManager.mountReactPortal(this.portal,this,e)}rendered(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!!(!this.isStatelessComponent()&&this.getFrameworkComponentInstance())}refreshComponent(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)}fallbackMethod(e,t){const s=this[`${e}Component`];if(!this.suppressFallbackMethods&&s)return s.bind(this)(t)}fallbackMethodAvailable(e){return this.suppressFallbackMethods?!1:!!this[`${e}Component`]}};function Nl(e,t,s){for(const i of e){const o=t[i];o&&(s[i]=o)}}var $t=class extends qC{constructor(){super(...arguments),this.awaitUpdateCallback=new Le(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=zA}init(e){return this.sourceParams=e,super.init(this.getProps())}addMethod(){}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}getFrameworkComponentInstance(){return this}createElement(e,t){return super.createElement(this.wrapperComponent,{initialProps:t,CustomComponentClass:e,setMethods:s=>this.setMethods(s),addUpdateCallback:s=>{this.updateCallback=()=>(s(this.getProps()),new Le(i=>{setTimeout(()=>{i()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,Nl(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}refreshProps(){return this.updateCallback?this.updateCallback():new Le(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},jA=class extends $t{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},_A=class extends $t{constructor(){super(...arguments),this.date=null,this.onDateChange=e=>this.updateDate(e)}getDate(){return this.date}setDate(e){this.date=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled"]}updateDate(e){this.setDate(e),this.sourceParams.onDateChanged()}getProps(){const e=super.getProps();return e.date=this.date,e.onDateChange=this.onDateChange,delete e.onDateChanged,e}},UA=class extends $t{constructor(){super(...arguments),this.label="",this.icon=null,this.shake=!1}setIcon(e,t){this.icon=e,this.shake=t,this.refreshProps()}setLabel(e){this.label=e,this.refreshProps()}getProps(){const e=super.getProps(),{label:t,icon:s,shake:i}=this;return e.label=t,e.icon=s,e.shake=i,e}},$A=class extends $t{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterModifiedCallback(),this.expectingNewMethods=!0,this.hasBeenActive=!1,this.awaitSetMethodsCallback=new Le(e=>{this.resolveSetMethodsCallback=e})}isFilterActive(){return this.model!=null}doesFilterPass(e){return this.providedMethods.doesFilterPass(e)}getModel(){return this.model}setModel(e){return this.expectingNewMethods=!0,this.model=e,this.hasBeenActive||(this.hasBeenActive=this.isFilterActive()),this.refreshProps()}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){const t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then(()=>this.providedMethods?.afterGuiAttached?.(e))}getOptionalMethods(){return["afterGuiDetached","onNewRowsLoaded","getModelAsString","onAnyFilterChanged"]}setMethods(e){this.expectingNewMethods===!1&&this.hasBeenActive&&this.providedMethods?.doesFilterPass!==e?.doesFilterPass&&setTimeout(()=>{this.sourceParams.filterChangedCallback()}),this.expectingNewMethods=!1,super.setMethods(e),this.resolveSetMethodsCallback(),this.resolveFilterPassCallback?.(),this.resolveFilterPassCallback=void 0}updateModel(e){this.resolveFilterPassCallback?.();const t=new Le(s=>{this.resolveFilterPassCallback=s});this.setModel(e).then(()=>{t.then(()=>{this.sourceParams.filterChangedCallback()})})}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e.onUiChange=this.onUiChange,delete e.filterChangedCallback,e}},qA=class extends $t{constructor(){super(...arguments),this.awaitSetMethodsCallback=new Le(e=>{this.resolveSetMethodsCallback=e})}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){const t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then(()=>this.providedMethods?.afterGuiAttached?.(e))}getOptionalMethods(){return["afterGuiDetached","onNewRowsLoaded","onAnyFilterChanged"]}setMethods(e){super.setMethods(e),this.resolveSetMethodsCallback()}};function KC(e,t){e.parentFilterInstance(s=>{(s.setModel(t)||Le.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var KA=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=s=>this.updateModel(s)}getProps(){return{...this.floatingFilterParams,model:this.model,onModelChange:this.onModelChange}}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){Nl(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),KC(this.floatingFilterParams,e)}},YA=class extends $t{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e)}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),KC(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},XA=class extends $t{refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}},ZA=class extends $t{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},QA=class extends $t{refresh(e){this.sourceParams=e,this.refreshProps()}},JA=class extends $t{constructor(){super(...arguments),this.active=!1,this.expanded=!1,this.onActiveChange=e=>this.updateActive(e)}setActive(e){this.awaitSetActive(e)}setExpanded(e){this.expanded=e,this.refreshProps()}getOptionalMethods(){return["select","configureDefaults"]}awaitSetActive(e){return this.active=e,this.refreshProps()}updateActive(e){const t=this.awaitSetActive(e);e&&t.then(()=>this.sourceParams.onItemActivated())}getProps(){const e=super.getProps();return e.active=this.active,e.expanded=this.expanded,e.onActiveChange=this.onActiveChange,delete e.onItemActivated,e}},e8=class extends $t{refresh(e){this.sourceParams=e,this.refreshProps()}},t8=class extends $t{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},s8=class extends $t{constructor(){super(...arguments),this.onStateChange=e=>this.updateState(e)}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getState(){return this.state}updateState(e){this.state=e,this.refreshProps(),this.sourceParams.onStateUpdated()}getProps(){const e=super.getProps();return e.state=this.state,e.onStateChange=this.onStateChange,e}};function wh(){$(231)}var i8=1e3,o8=class{constructor(e,t,s){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=s||i8}getPortals(){return this.portals}destroy(){this.destroyed=!0}destroyPortal(e){this.portals=this.portals.filter(t=>t!==e),this.batchUpdate()}getComponentWrappingElement(){return this.wrappingElement}mountReactPortal(e,t,s){this.portals=[...this.portals,e],this.waitForInstance(t,s),this.batchUpdate()}updateReactPortal(e,t){this.portals[this.portals.indexOf(e)]=t,this.batchUpdate()}batchUpdate(){this.hasPendingPortalUpdate||(setTimeout(()=>{this.destroyed||(this.refresher(),this.hasPendingPortalUpdate=!1)}),this.hasPendingPortalUpdate=!0)}waitForInstance(e,t,s=Date.now()){if(this.destroyed){t(null);return}if(e.rendered())t(e);else{if(Date.now()-s>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate){pr(!0,()=>this.refresher()),e.rendered()&&t(e);return}window.setTimeout(()=>{this.waitForInstance(e,t,s)})}}},n8=({ctrl:e})=>{const t=e.isAlive(),{context:s}=g.useContext(St),[i,o]=g.useState(),[n,r]=g.useState(),a=g.useRef(),l=g.useRef(null),c=g.useRef(null),d=g.useRef(null),u=g.useRef(),h=g.useRef();t&&!h.current&&(h.current=new br(()=>l.current));const p=g.useCallback(w=>{if(l.current=w,!w||!e.isAlive()||s.isDestroyed()){a.current=s.destroyBean(a.current);return}a.current=s.createBean(new an);const b=()=>{const y=e.getSelectAllGui();y&&(c.current?.insertAdjacentElement("afterend",y),a.current.addDestroyFunc(()=>y.remove()))},x={setWidth:y=>{l.current&&(l.current.style.width=y)},toggleCss:(y,S)=>h.current.toggleCss(y,S),setUserStyles:y=>r(y),setAriaSort:y=>{l.current&&(y?ry(l.current,y):ay(l.current))},setUserCompDetails:y=>o(y),getUserCompInstance:()=>u.current||void 0,refreshSelectAllGui:b,removeSelectAllGui:()=>e.getSelectAllGui()?.remove()};e.setComp(x,w,c.current,d.current,a.current),b()},[]);g.useLayoutEffect(()=>Fr(i,s,d.current,u),[i]),g.useEffect(()=>{e.setDragSource(l.current)},[i]);const f=g.useMemo(()=>!!(i?.componentFromFramework&&cn(i.componentClass)),[i]),v=i?.componentFromFramework,C=i?.componentClass;return g.createElement("div",{ref:p,style:n,className:"ag-header-cell",role:"columnheader"},g.createElement("div",{ref:c,className:"ag-header-cell-resize",role:"presentation"}),g.createElement("div",{ref:d,className:"ag-header-cell-comp-wrapper",role:"presentation"},v?f?g.createElement(C,{...i.params}):g.createElement(C,{...i.params,ref:u}):null))},r8=g.memo(n8),a8=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t}getProps(){return this.floatingFilterParams}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){Nl(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}},l8=({ctrl:e})=>{const{context:t,gos:s}=g.useContext(St),[i,o]=g.useState(),[n,r]=g.useState(()=>new ts("ag-header-cell","ag-floating-filter")),[a,l]=g.useState(()=>new ts),[c,d]=g.useState(()=>new ts("ag-floating-filter-button","ag-hidden")),[u,h]=g.useState("false"),[p,f]=g.useState(),[,v]=g.useState(1),C=g.useRef(),w=g.useRef(null),b=g.useRef(null),x=g.useRef(null),y=g.useRef(null),S=g.useRef(),F=g.useRef(),R=k=>{k!=null&&S.current&&S.current(k)},E=g.useCallback(k=>{if(w.current=k,!k||!e.isAlive()||t.isDestroyed()){C.current=t.destroyBean(C.current);return}C.current=t.createBean(new an),F.current=new Le(U=>{S.current=U});const V={toggleCss:(U,W)=>r(re=>re.setClass(U,W)),setUserStyles:U=>o(U),addOrRemoveBodyCssClass:(U,W)=>l(re=>re.setClass(U,W)),setButtonWrapperDisplayed:U=>{d(W=>W.setClass("ag-hidden",!U)),h(U?"false":"true")},setWidth:U=>{w.current&&(w.current.style.width=U)},setCompDetails:U=>f(U),getFloatingFilterComp:()=>F.current?F.current:null,setMenuIcon:U=>y.current?.appendChild(U)};e.setComp(V,k,y.current,b.current,C.current)},[]);g.useLayoutEffect(()=>Fr(p,t,b.current,R),[p]);const D=g.useMemo(()=>n.toString(),[n]),P=g.useMemo(()=>a.toString(),[a]),T=g.useMemo(()=>c.toString(),[c]),M=g.useMemo(()=>!!(p&&p.componentFromFramework&&cn(p.componentClass)),[p]),N=g.useMemo(()=>s.get("reactiveCustomComponents"),[]),q=g.useMemo(()=>s.get("enableFilterHandlers"),[]),[L,z]=g.useState();g.useEffect(()=>{if(p?.componentFromFramework)if(N){const k=q?a8:KA,V=new k(p.params,()=>v(U=>U+1));R(V),z(V)}else wh()},[p]);const H=L?.getProps(),A=p?.componentFromFramework,de=p?.componentClass;return g.createElement("div",{ref:E,style:i,className:D,role:"gridcell"},g.createElement("div",{ref:b,className:P,role:"presentation"},A?N?H&&g.createElement(Ch.Provider,{value:{setMethods:k=>L.setMethods(k)}},g.createElement(de,{...H})):g.createElement(de,{...p.params,ref:M?()=>{}:R}):null),g.createElement("div",{ref:x,"aria-hidden":u,className:T,role:"presentation"},g.createElement("button",{ref:y,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},c8=g.memo(l8),d8=({ctrl:e})=>{const{context:t}=g.useContext(St),[s,i]=g.useState(),[o,n]=g.useState(()=>new ts),[r,a]=g.useState(()=>new ts),[l,c]=g.useState("false"),[d,u]=g.useState(),[h,p]=g.useState(),f=g.useRef(),v=g.useRef(null),C=g.useRef(null),w=g.useRef(null),b=g.useRef(),x=g.useCallback(D=>{if(v.current=D,!D||!e.isAlive()||t.isDestroyed()){f.current=t.destroyBean(f.current);return}f.current=t.createBean(new an);const P={setWidth:T=>{v.current&&(v.current.style.width=T)},toggleCss:(T,M)=>n(N=>N.setClass(T,M)),setUserStyles:T=>i(T),setHeaderWrapperHidden:T=>{const M=w.current;M&&(T?M.style.setProperty("display","none"):M.style.removeProperty("display"))},setHeaderWrapperMaxHeight:T=>{const M=w.current;M&&(T!=null?M.style.setProperty("max-height",`${T}px`):M.style.removeProperty("max-height"),M.classList.toggle("ag-header-cell-comp-wrapper-limited-height",T!=null))},setUserCompDetails:T=>p(T),setResizableDisplayed:T=>{a(M=>M.setClass("ag-hidden",!T)),c(T?"false":"true")},setAriaExpanded:T=>u(T),getUserCompInstance:()=>b.current||void 0};e.setComp(P,D,C.current,w.current,f.current)},[]);g.useLayoutEffect(()=>Fr(h,t,w.current),[h]),g.useEffect(()=>{v.current&&e.setDragSource(v.current)},[h]);const y=g.useMemo(()=>!!(h?.componentFromFramework&&cn(h.componentClass)),[h]),S=g.useMemo(()=>"ag-header-group-cell "+o.toString(),[o]),F=g.useMemo(()=>"ag-header-cell-resize "+r.toString(),[r]),R=h?.componentFromFramework,E=h?.componentClass;return g.createElement("div",{ref:x,style:s,className:S,role:"columnheader","aria-expanded":d},g.createElement("div",{ref:w,className:"ag-header-cell-comp-wrapper",role:"presentation"},R?y?g.createElement(E,{...h.params}):g.createElement(E,{...h.params,ref:b}):null),g.createElement("div",{ref:C,"aria-hidden":l,className:F}))},u8=g.memo(d8),h8=({ctrl:e})=>{const{gos:t,context:s}=g.useContext(St),{topOffset:i,rowHeight:o}=g.useMemo(()=>e.getTopAndHeight(),[]),n=g.useMemo(()=>t.get("tabIndex"),[]),[r,a]=g.useState(()=>e.getAriaRowIndex()),l=e.headerRowClass,[c,d]=g.useState(()=>o+"px"),[u,h]=g.useState(()=>i+"px"),p=g.useRef(null),[f,v]=g.useState(()=>e.getUpdatedHeaderCtrls()),C=g.useRef(),w=g.useRef(null),b=g.useCallback(S=>{if(w.current=S,!S||!e.isAlive()||s.isDestroyed()){C.current=s.destroyBean(C.current);return}C.current=s.createBean(new an);const F={setHeight:R=>d(R),setTop:R=>h(R),setHeaderCtrls:(R,E,D)=>{const P=p.current,T=ul(P,R,E);T!==P&&(p.current=T,pr(D,()=>v(T)))},setWidth:R=>{w.current&&(w.current.style.width=R)},setRowIndex:R=>{a(R)}};e.setComp(F,C.current,!1)},[]),x=g.useMemo(()=>({height:c,top:u}),[c,u]),y=g.useCallback(S=>{switch(e.type){case"group":return g.createElement(u8,{ctrl:S,key:S.instanceId});case"filter":return g.createElement(c8,{ctrl:S,key:S.instanceId});default:return g.createElement(r8,{ctrl:S,key:S.instanceId})}},[]);return g.createElement("div",{ref:b,className:l,role:"row",style:x,tabIndex:n,"aria-rowindex":r},f.map(y))},p8=g.memo(h8),g8=({pinned:e})=>{const[t,s]=g.useState(!0),[i,o]=g.useState([]),{context:n}=g.useContext(St),r=g.useRef(null),a=g.useRef(null),l=g.useRef(),c=e==="left",d=e==="right",u=!c&&!d,h=g.useCallback(v=>{if(r.current=v,!v||n.isDestroyed()){l.current=n.destroyBean(l.current);return}l.current=n.createBean(new UF(e));const C={setDisplayed:s,setCtrls:w=>o(w),setCenterWidth:w=>{a.current&&(a.current.style.width=w)},setViewportScrollLeft:w=>{r.current&&(r.current.scrollLeft=w)},setPinnedContainerWidth:w=>{r.current&&(r.current.style.width=w,r.current.style.minWidth=w,r.current.style.maxWidth=w)}};l.current.setComp(C,r.current)},[]),p=t?"":"ag-hidden",f=()=>i.map(v=>g.createElement(p8,{ctrl:v,key:v.instanceId}));return c?g.createElement("div",{ref:h,className:"ag-pinned-left-header "+p,"aria-hidden":!t,role:"rowgroup"},f()):d?g.createElement("div",{ref:h,className:"ag-pinned-right-header "+p,"aria-hidden":!t,role:"rowgroup"},f()):u?g.createElement("div",{ref:h,className:"ag-header-viewport "+p,role:"rowgroup",tabIndex:-1},g.createElement("div",{ref:a,className:"ag-header-container",role:"presentation"},f())):null},td=g.memo(g8),f8=()=>{const[e,t]=g.useState(()=>new ts),[s,i]=g.useState(),{context:o}=g.useContext(St),n=g.useRef(null),r=g.useRef(),a=g.useCallback(d=>{if(n.current=d,!d||o.isDestroyed()){r.current=o.destroyBean(r.current);return}r.current=o.createBean(new zF);const u={toggleCss:(h,p)=>t(f=>f.setClass(h,p)),setHeightAndMinHeight:h=>i(h)};r.current.setComp(u,d,d)},[]),l=g.useMemo(()=>"ag-header "+e.toString(),[e]),c=g.useMemo(()=>({height:s,minHeight:s}),[s]);return g.createElement("div",{ref:a,className:l,style:c,role:"presentation"},g.createElement(td,{pinned:"left"}),g.createElement(td,{pinned:null}),g.createElement(td,{pinned:"right"}))},m8=g.memo(f8),v8=(e,t)=>{g.useEffect(()=>{const s=t.current;if(s){const i=s.parentElement;if(i){const o=document.createComment(e);return i.insertBefore(o,s),()=>{o.remove()}}}},[e])},Fi=v8,C8=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new Le(s=>{this.resolveInstanceCreated=s}),this.onValueChange=s=>this.updateValue(s),this.value=e.value}getProps(){return{...this.cellEditorParams,initialValue:this.cellEditorParams.value,value:this.value,onValueChange:this.onValueChange}}getValue(){return this.value}refresh(e){this.cellEditorParams=e,this.refreshProps()}setMethods(e){Nl(this.getOptionalMethods(),e,this)}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}setRef(e){this.componentInstance=e,this.resolveInstanceCreated?.(),this.resolveInstanceCreated=void 0}getOptionalMethods(){return["isCancelBeforeStart","isCancelAfterEnd","focusIn","focusOut","afterGuiAttached","getValidationErrors","getValidationElement"]}updateValue(e){this.value=e,this.refreshProps()}},w8=e=>{const t=g.useRef(e),s=g.useRef(),i=g.useRef(!1),o=g.useRef(!1),[,n]=g.useState(0);i.current&&(o.current=!0),g.useEffect(()=>(i.current||(s.current=t.current(),i.current=!0),n(r=>r+1),()=>{o.current&&s.current?.()}),[])},b8=e=>{const[t,s]=g.useState(),i=g.useContext(St),{context:o,popupSvc:n,gos:r,editSvc:a}=i,{editDetails:l,cellCtrl:c,eParentCell:d}=e;return w8(()=>{const{compDetails:u}=l,h=r.get("stopEditingWhenCellsLoseFocus");let p,f;if(!o.isDestroyed()){f=o.createBean(a.createPopupEditorWrapper(u.params));const v=f.getGui();if(e.jsChildComp){const S=e.jsChildComp.getGui();S&&v.appendChild(S)}const{column:C,rowNode:w}=c,b={column:C,rowNode:w,type:"popupCellEditor",eventSource:d,ePopup:v,position:l.popupPosition,keepWithinBounds:!0},x=n?.positionPopupByComponent.bind(n,b),y=n?.addPopup({modal:h,eChild:v,closeOnEsc:!0,closedCallback:()=>{c.onPopupEditorClosed()},anchorToElement:d,positionCallback:x,ariaOwns:d});p=y?y.hideFunc:void 0,s(f),e.jsChildComp?.afterGuiAttached?.()}return()=>{p?.(),o.destroyBean(f)}}),g.useLayoutEffect(()=>()=>{c.isCellFocused()&&t?.getGui().contains(et(i))&&d.focus({preventScroll:!0})},[t]),t&&e.wrappedContent?tn.createPortal(e.wrappedContent,t.getGui()):null},Hg=g.memo(b8),x8=(e,t,s)=>{const{compProxy:i}=e;s(i);const o=i.getProps(),n=cn(t);return g.createElement(Ch.Provider,{value:{setMethods:r=>i.setMethods(r)}},n?g.createElement(t,{...o}):g.createElement(t,{...o,ref:r=>i.setRef(r)}))},Gg=(e,t,s)=>e.compProxy?x8(e,t,s):g.createElement(t,{...e.compDetails.params,ref:s}),y8=(e,t,s,i,o)=>{const n=e.compDetails,r=n.componentClass,a=n.componentFromFramework&&!e.popup,l=n.componentFromFramework&&e.popup,c=!n.componentFromFramework&&e.popup;return a?Gg(e,r,t):l?g.createElement(Hg,{editDetails:e,cellCtrl:i,eParentCell:s,wrappedContent:Gg(e,r,t)}):c&&o?g.createElement(Hg,{editDetails:e,cellCtrl:i,eParentCell:s,jsChildComp:o}):null},S8=(e,t,s,i,o,n)=>{const{context:r}=g.useContext(St),a=g.useCallback(()=>{const l=o.current;if(!l)return;const c=l.getGui();c&&c.parentElement&&c.remove(),r.destroyBean(l),o.current=void 0},[]);g.useEffect(()=>{const l=e!=null,c=e?.compDetails&&!e.compDetails.componentFromFramework,d=t&&s==null;if(!(l&&c&&!d)){a();return}const h=e.compDetails;if(o.current){const f=o.current,C=f.refresh!=null&&e.force==!1?f.refresh(h.params):!1;if(C===!0||C===void 0)return;a()}h.newAgStackInstance().then(f=>{if(!f)return;const v=f.getGui();if(!v)return;(t?s:n.current).appendChild(v),o.current=f})},[e,t,i]),g.useEffect(()=>a,[])},YC=S8,R8=({cellCtrl:e,parent:t})=>{const s=g.useRef(),i=g.useMemo(()=>{const{loadingComp:o}=e.getDeferLoadingCellRenderer();return o?{value:void 0,compDetails:o,force:!1}:void 0},[e]);if(YC(i,!1,void 0,1,s,t),i?.compDetails?.componentFromFramework){const o=i.compDetails.componentClass;return g.createElement(o,{...i.compDetails.params})}return g.createElement(g.Fragment,null)},F8=({cellCtrl:e,printLayout:t,editingCell:s})=>{const i=g.useContext(St),{context:o}=i,{column:{colIdSanitised:n},instanceId:r}=e,a=g.useRef(),[l,c]=g.useState(()=>e.isCellRenderer()?void 0:{compDetails:void 0,value:e.getValueToDisplay(),force:!1}),[d,u]=g.useState(),[h,p]=g.useState(1),[f,v]=g.useState(),[C,w]=g.useState(!1),[b,x]=g.useState(!1),[y,S]=g.useState(!1),[F,R]=g.useState(),E=g.useMemo(()=>e.isForceWrapper(),[e]),D=g.useMemo(()=>e.getCellAriaRole(),[e]),P=g.useRef(null),T=g.useRef(null),M=g.useRef(null),N=g.useRef(),q=g.useRef(),L=g.useRef(),z=g.useRef([]),H=g.useRef(),A=g.useRef(),[de,k]=g.useState(0),V=g.useCallback(ie=>{A.current=ie,k(le=>le+1)},[]),U=l!=null&&(C||y||b)&&(d==null||!!d.popup),W=E||U,re=g.useMemo(()=>e.getCellValueClass(),[e]),be=g.useCallback(ie=>{if(q.current=ie,ie){const le=ie.isCancelBeforeStart&&ie.isCancelBeforeStart();setTimeout(()=>{le?(e.stopEditing(!0),e.focusCell(!0)):(e.cellEditorAttached(),e.enableEditorTooltipFeature(ie))})}},[e]),Q=g.useRef();Q.current||(Q.current=new br(()=>P.current)),YC(l,W,A.current,de,N,P);const j=g.useRef();g.useLayoutEffect(()=>{const ie=j.current,le=l;if(j.current=l,ie==null||ie.compDetails==null||le==null||le.compDetails==null)return;H.current?.refreshVisibility();const Fe=ie.compDetails,Oe=le.compDetails;if(Fe.componentClass!=Oe.componentClass||M.current?.refresh==null)return;M.current.refresh(Oe.params)!=!0&&p(Ee=>Ee+1)},[l]),g.useLayoutEffect(()=>{if(!(d&&!d.compDetails.componentFromFramework)||o.isDestroyed())return;const le=d.compDetails,Fe=d.popup===!0,Oe=le.newAgStackInstance();return Oe.then(Ce=>{if(!Ce)return;const Ee=Ce.getGui();be(Ce),Fe||((E?L:P).current?.appendChild(Ee),Ce.afterGuiAttached?.()),R(Ce)}),()=>{Oe.then(Ce=>{const Ee=Ce.getGui();e.disableEditorTooltipFeature(),o.destroyBean(Ce),be(void 0),R(void 0),Ee?.remove()})}},[d]);const ge=g.useCallback(ie=>{if(L.current=ie,!ie||o.isDestroyed()||!e.isAlive()){const Oe=z.current;z.current=[];for(const Ce of Oe)Ce();return}let le;const Fe=Oe=>{Oe&&(ie.insertAdjacentElement("afterbegin",Oe.getGui()),z.current.push(()=>{ai(Oe.getGui()),o.destroyBean(Oe),H.current===le&&(H.current=void 0)}))};C&&Fe(e.createSelectionCheckbox()),y&&Fe(e.createDndSource()),b&&(le=e.createRowDragComp(),H.current=le,le&&(Fe(le),le.refreshVisibility()))},[e,o,y,b,C]),oe=g.useCallback(()=>{const ie=!e.isCellSpanning()||T.current,le=P.current;if(!le||!ie||!e||!e.isAlive()||o.isDestroyed()){a.current=o.destroyBean(a.current);return}a.current=o.createBean(new an);const Fe={toggleCss:(Ce,Ee)=>Q.current.toggleCss(Ce,Ee),setUserStyles:Ce=>v(Ce),getFocusableElement:()=>P.current,setIncludeSelection:Ce=>w(Ce),setIncludeRowDrag:Ce=>x(Ce),setIncludeDndSource:Ce=>S(Ce),getCellEditor:()=>q.current??null,getCellRenderer:()=>M.current??N.current,getParentOfValue:()=>A.current??L.current??P.current,setRenderDetails:(Ce,Ee,_e)=>{const Ue=()=>{c(Ae=>Ae?.compDetails!==Ce||Ae?.value!==Ee||Ae?.force!==_e?{value:Ee,compDetails:Ce,force:_e}:Ae)};if(Ce?.params?.deferRender&&!e.rowNode.group){const{loadingComp:Ae,onReady:kt}=e.getDeferLoadingCellRenderer();if(Ae){c({value:void 0,compDetails:Ae,force:!1}),kt.then(()=>GA(Ue));return}}Ue()},setEditDetails:(Ce,Ee,_e,Ue)=>{if(Ce){let Ae;Ce.componentFromFramework&&(Ue?Ae=new C8(Ce.params,()=>p(kt=>kt+1)):wh()),u({compDetails:Ce,popup:Ee,popupPosition:_e,compProxy:Ae}),Ee||c(void 0)}else e.hasBrowserFocus()&&Fe.getFocusableElement().focus({preventScroll:!0}),q.current=void 0,u(void 0)},refreshEditStyles:(Ce,Ee)=>{if(!P.current)return;const{current:_e}=Q;_e.toggleCss("ag-cell-value",!W),_e.toggleCss("ag-cell-inline-editing",!!Ce&&!Ee),_e.toggleCss("ag-cell-popup-editing",!!Ce&&!!Ee),_e.toggleCss("ag-cell-not-inline-editing",!Ce||!!Ee)}},Oe=L.current||void 0;e.setComp(Fe,le,T.current??void 0,Oe,t,s,a.current)},[]),Z=g.useCallback(ie=>{P.current=ie,oe()},[]),_=g.useCallback(ie=>{T.current=ie,oe()},[]),ae=g.useMemo(()=>!!(l?.compDetails?.componentFromFramework&&cn(l.compDetails.componentClass)),[l]);g.useLayoutEffect(()=>{if(!P.current)return;const{current:ie}=Q;ie.toggleCss("ag-cell-value",!W),ie.toggleCss("ag-cell-inline-editing",!!d&&!d.popup),ie.toggleCss("ag-cell-popup-editing",!!d&&!!d.popup),ie.toggleCss("ag-cell-not-inline-editing",!d||!!d.popup)});const G=()=>{const{compDetails:ie,value:le}=l;if(!ie)return le?.toString?.()??le;if(ie.componentFromFramework){const Fe=ie.componentClass;return g.createElement(g.Suspense,{fallback:g.createElement(R8,{cellCtrl:e,parent:P})},ae?g.createElement(Fe,{...ie.params,key:h}):g.createElement(Fe,{...ie.params,key:h,ref:M}))}},fe=()=>{const ie=()=>l==null?null:W?g.createElement("span",{role:"presentation",id:`cell-${r}`,className:re,ref:V},G()):G(),le=Fe=>y8(Fe,be,P.current,e,F);return d!=null?d.popup?g.createElement(g.Fragment,null,ie(),le(d)):le(d):ie()},he=()=>g.createElement("div",{ref:Z,style:f,role:D,"col-id":n},W?g.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:ge},fe()):fe());return e.isCellSpanning()?g.createElement("div",{ref:_,className:"ag-spanned-cell-wrapper",role:"presentation"},he()):he()},E8=g.memo(F8),D8=({rowCtrl:e,containerType:t})=>{const{context:s,gos:i,editSvc:o}=g.useContext(St),n=g.useContext(jC)==="default",r=g.useRef(),a=g.useRef(e.getDomOrder()),l=e.isFullWidth(),c=e.rowNode.displayed,[d,u]=g.useState(()=>c?e.rowNode.getRowIndexString():null),[h,p]=g.useState(()=>e.rowId),[f,v]=g.useState(()=>e.businessKey),[C,w]=g.useState(()=>e.rowStyles),b=g.useRef(null),[x,y]=g.useState(()=>null),[S,F]=g.useState(),[R,E]=g.useState(()=>c?e.getInitialRowTop(t):void 0),[D,P]=g.useState(()=>c?e.getInitialTransform(t):void 0),T=g.useRef(null),M=g.useRef(),N=g.useRef(),q=g.useRef(!1),[L,z]=g.useState(0);g.useEffect(()=>{if(q.current||!S||L>10)return;const Z=T.current?.firstChild;Z?(e.setupDetailRowAutoHeight(Z),q.current=!0):z(_=>_+1)},[S,L]);const H=g.useRef();H.current||(H.current=new br(()=>T.current));const A=g.useRef(()=>{}),de=g.useCallback(Z=>(A.current=Z,()=>{A.current=()=>{}}),[]),k=BA(de,()=>b.current,[]),V=n?k:x,U=g.useCallback(Z=>{if(T.current=Z,r.current=Z?s.createBean(new an):s.destroyBean(r.current),!Z){e.unsetComp(t);return}if(!e.isAlive()||s.isDestroyed())return;const _={setTop:E,setTransform:P,toggleCss:(ae,G)=>H.current.toggleCss(ae,G),setDomOrder:ae=>a.current=ae,setRowIndex:u,setRowId:p,setRowBusinessKey:v,setUserStyles:w,setCellCtrls:(ae,G)=>{const fe=b.current,he=ul(fe,ae,a.current);he!==fe&&(b.current=he,n?A.current():pr(G,()=>y(he)))},showFullWidth:ae=>{N.current=ae.params,F(ae)},getFullWidthCellRenderer:()=>M.current,getFullWidthCellRendererParams:()=>N.current,refreshFullWidth:ae=>{const G=ae();return N.current=G,j.current?(F(fe=>({...fe,params:G})),!0):!M.current||!M.current.refresh?!1:M.current.refresh(G)}};e.setComp(_,Z,t,r.current)},[]);g.useLayoutEffect(()=>Fr(S,s,T.current,M),[S]);const W=g.useMemo(()=>{const Z={top:R,transform:D};return Object.assign(Z,C),Z},[R,D,C]),re=l&&S?.componentFromFramework,be=!l&&V!=null,Q=g.useMemo(()=>!!(S?.componentFromFramework&&cn(S.componentClass)),[S]),j=g.useRef(!1);g.useEffect(()=>{j.current=Q&&!!S&&!!i.get("reactiveCustomComponents")},[Q,S]);const ge=()=>V?.map(Z=>g.createElement(E8,{cellCtrl:Z,editingCell:o?.isEditing(Z,{withOpenEditor:!0})??!1,printLayout:e.printLayout,key:Z.instanceId})),oe=()=>{const Z=S.componentClass;return Q?g.createElement(Z,{...S.params}):g.createElement(Z,{...S.params,ref:M})};return g.createElement("div",{ref:U,role:"row",style:W,"row-index":d,"row-id":h,"row-business-key":f},be?ge():re?oe():null)},Bg=g.memo(D8),P8=({name:e})=>{const{context:t,gos:s}=g.useContext(St),i=g.useMemo(()=>yr(e),[e]),o=g.useRef(null),n=g.useRef(null),r=g.useRef(null),a=g.useRef([]),l=g.useRef([]),[c,d]=g.useState(()=>[]),u=!!s.get("enableCellSpan")&&!!i.getSpannedRowCtrls,h=g.useRef([]),p=g.useRef([]),[f,v]=g.useState(()=>[]),C=g.useRef(!1),w=g.useRef(),b=g.useMemo(()=>Xt("ag-viewport",hv(e)),[e]),x=g.useMemo(()=>Xt(Aa(e)),[e]),y=g.useMemo(()=>Xt("ag-spanning-container",uF(e)),[e]),S=i.type==="center"||u,F=S?o:n;Fi(" AG Row Container "+e+" ",F);const R=g.useCallback(()=>{const L=!S||o.current!=null,z=n.current!=null,H=!u||r.current!=null;return L&&z&&H},[]),E=g.useCallback(()=>o.current==null&&n.current==null&&r.current==null,[]),D=g.useCallback(()=>{if(E()&&(w.current=t.destroyBean(w.current)),!t.isDestroyed()&&R()){const L=A=>{const de=ul(l.current,a.current,C.current);de!==l.current&&(l.current=de,pr(A,()=>d(de)))},z=A=>{const de=ul(p.current,h.current,C.current);de!==p.current&&(p.current=de,pr(A,()=>v(de)))},H={setHorizontalScroll:A=>{o.current&&(o.current.scrollLeft=A)},setViewportHeight:A=>{o.current&&(o.current.style.height=A)},setRowCtrls:({rowCtrls:A,useFlushSync:de})=>{const k=!!de&&a.current.length>0&&A.length>0;a.current=A,L(k)},setSpannedRowCtrls:(A,de)=>{const k=!!de&&h.current.length>0&&A.length>0;h.current=A,z(k)},setDomOrder:A=>{C.current!=A&&(C.current=A,L(!1))},setContainerWidth:A=>{n.current&&(n.current.style.width=A)},setOffsetTop:A=>{n.current&&(n.current.style.transform=`translateY(${A})`)}};w.current=t.createBean(new xF(e)),w.current.setComp(H,n.current,r.current??void 0,o.current)}},[R,E]),P=g.useCallback(L=>{n.current=L,D()},[D]),T=g.useCallback(L=>{r.current=L,D()},[D]),M=g.useCallback(L=>{o.current=L,D()},[D]),N=()=>g.createElement("div",{className:x,ref:P,role:S?"presentation":"rowgroup"},c.map(L=>g.createElement(Bg,{rowCtrl:L,containerType:i.type,key:L.instanceId})));if(!S)return N();const q=()=>g.createElement("div",{className:y,ref:T,role:"presentation"},f.map(L=>g.createElement(Bg,{rowCtrl:L,containerType:i.type,key:L.instanceId})));return g.createElement("div",{className:b,ref:M,role:"rowgroup"},N(),u?q():null)},T8=g.memo(P8),k8=()=>{const e=g.useContext(St),{context:t,overlays:s}=e,[i,o]=g.useState(""),[n,r]=g.useState(0),[a,l]=g.useState(0),[c,d]=g.useState("0px"),[u,h]=g.useState("0px"),[p,f]=g.useState("100%"),[v,C]=g.useState("0px"),[w,b]=g.useState("0px"),[x,y]=g.useState("100%"),[S,F]=g.useState(!0),[R,E]=g.useState(!0),[D,P]=g.useState(null),[T,M]=g.useState(""),[N,q]=g.useState(null),[L,z]=g.useState("ag-layout-normal"),H=g.useRef();H.current||(H.current=new br(()=>A.current));const A=g.useRef(null),de=g.useRef(null),k=g.useRef(null),V=g.useRef(null),U=g.useRef(null),W=g.useRef(null),re=g.useRef(null),be=g.useRef([]),Q=g.useRef([]);Fi(" AG Grid Body ",A),Fi(" AG Pinned Top ",de),Fi(" AG Sticky Top ",k),Fi(" AG Middle ",W),Fi(" AG Pinned Bottom ",re);const j=g.useCallback(Ee=>{if(A.current=Ee,!Ee||t.isDestroyed()){be.current=t.destroyBeans(be.current);for(const Ge of Q.current)Ge();Q.current=[];return}const _e=(Ge,K)=>{Ge.appendChild(K),Q.current.push(()=>K.remove())},Ue=Ge=>{const K=t.createBean(new Ge);return be.current.push(K),K},Ae=(Ge,K,He)=>{_e(Ge,document.createComment(He)),_e(Ge,Ue(K).getGui())};Ae(Ee,PF," AG Fake Horizontal Scroll ");const kt=s?.getOverlayWrapperCompClass();kt&&Ae(Ee,kt," AG Overlay Wrapper "),U.current&&Ae(U.current,kF," AG Fake Vertical Scroll ");const os={setRowAnimationCssOnBodyViewport:o,setColumnCount:Ge=>{A.current&&oy(A.current,Ge)},setRowCount:Ge=>{A.current&&sy(A.current,Ge)},setTopHeight:r,setBottomHeight:l,setStickyTopHeight:d,setStickyTopTop:h,setStickyTopWidth:f,setTopInvisible:F,setBottomInvisible:E,setColumnMovingCss:(Ge,K)=>H.current.toggleCss(Ge,K),updateLayoutClasses:z,setAlwaysVerticalScrollClass:P,setPinnedTopBottomOverflowY:M,setCellSelectableCss:(Ge,K)=>q(K?Ge:null),setBodyViewportWidth:Ge=>{W.current&&(W.current.style.width=Ge)},registerBodyViewportResizeListener:Ge=>{if(W.current){const K=Us(e,W.current,Ge);Q.current.push(()=>K())}},setStickyBottomHeight:C,setStickyBottomBottom:b,setStickyBottomWidth:y,setGridRootRole:Ge=>Ee.setAttribute("role",Ge)},Mt=t.createBean(new FF);be.current.push(Mt),Mt.setComp(os,Ee,W.current,de.current,re.current,k.current,V.current)},[]),ge=g.useMemo(()=>Xt("ag-root","ag-unselectable",L),[L]),oe=g.useMemo(()=>Xt("ag-body-viewport",i,L,D,N),[i,L,D,N]),Z=g.useMemo(()=>Xt("ag-body",L),[L]),_=g.useMemo(()=>Xt("ag-floating-top",S?"ag-invisible":null,N),[N,S]),ae=g.useMemo(()=>Xt("ag-sticky-top",N),[N]),G=g.useMemo(()=>Xt("ag-sticky-bottom",v==="0px"?"ag-invisible":null,N),[N,v]),fe=g.useMemo(()=>Xt("ag-floating-bottom",R?"ag-invisible":null,N),[N,R]),he=g.useMemo(()=>({height:n,minHeight:n,overflowY:T}),[n,T]),ie=g.useMemo(()=>({height:c,top:u,width:p}),[c,u,p]),le=g.useMemo(()=>({height:v,bottom:w,width:x}),[v,w,x]),Fe=g.useMemo(()=>({height:a,minHeight:a,overflowY:T}),[a,T]),Oe=Ee=>g.createElement(T8,{name:Ee,key:`${Ee}-container`}),Ce=({section:Ee,children:_e,className:Ue,style:Ae})=>g.createElement("div",{ref:Ee,className:Ue,role:"presentation",style:Ae},_e.map(Oe));return g.createElement("div",{ref:j,className:ge},g.createElement(m8,null),Ce({section:de,className:_,style:he,children:["topLeft","topCenter","topRight","topFullWidth"]}),g.createElement("div",{className:Z,ref:U,role:"presentation"},Ce({section:W,className:oe,children:["left","center","right","fullWidth"]})),Ce({section:k,className:ae,style:ie,children:["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"]}),Ce({section:V,className:G,style:le,children:["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"]}),Ce({section:re,className:fe,style:Fe,children:["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"]}))},M8=g.memo(k8),I8=(e,t)=>{const{children:s,eFocusableElement:i,onTabKeyDown:o,gridCtrl:n,forceFocusOutWhenTabGuardsAreEmpty:r,isEmpty:a}=e,{context:l}=g.useContext(St),c=g.useRef(null),d=g.useRef(null),u=g.useRef(),h=w=>{const b=w==null?void 0:parseInt(w,10).toString();for(const x of[c,d])b===void 0?x.current?.removeAttribute("tabindex"):x.current?.setAttribute("tabindex",b)};g.useImperativeHandle(t,()=>({forceFocusOutOfContainer(w){u.current?.forceFocusOutOfContainer(w)}}));const p=g.useCallback(()=>{const w=c.current,b=d.current;if(!w&&!b||l.isDestroyed()){u.current=l.destroyBean(u.current);return}if(w&&b){const x={setTabIndex:h};u.current=l.createBean(new Rv({comp:x,eTopGuard:w,eBottomGuard:b,eFocusableElement:i,onTabKeyDown:o,forceFocusOutWhenTabGuardsAreEmpty:r,focusInnerElement:y=>n.focusInnerElement(y),isEmpty:a}))}},[]),f=g.useCallback(w=>{c.current=w,p()},[p]),v=g.useCallback(w=>{d.current=w,p()},[p]),C=w=>{const b=w==="top"?Vo.TAB_GUARD_TOP:Vo.TAB_GUARD_BOTTOM;return g.createElement("div",{className:`${Vo.TAB_GUARD} ${b}`,role:"presentation",ref:w==="top"?f:v})};return g.createElement(g.Fragment,null,C("top"),s,C("bottom"))},A8=g.forwardRef(I8),L8=g.memo(A8),O8=({context:e})=>{const[t,s]=g.useState(""),[i,o]=g.useState(""),[n,r]=g.useState(null),[a,l]=g.useState(null),[c,d]=g.useState(!1),[u,h]=g.useState(),p=g.useRef(),f=g.useRef(null),v=g.useRef(),[C,w]=g.useState(null),b=g.useRef(()=>{}),x=g.useRef(),y=g.useRef([]),S=g.useCallback(()=>{},[]);Fi(" AG Grid ",f);const F=g.useCallback(M=>{if(f.current=M,p.current=M?e.createBean(new DE):e.destroyBean(p.current),!M||e.isDestroyed())return;const N=p.current;b.current=N.focusInnerElement.bind(N);const q={destroyGridUi:()=>{},setRtlClass:s,forceFocusOutOfContainer:L=>{if(!L&&x.current?.isDisplayed()){x.current.forceFocusOutOfContainer(L);return}v.current?.forceFocusOutOfContainer(L)},updateLayoutClasses:o,getFocusableContainers:()=>{const L=[],z=f.current?.querySelector(".ag-root");z&&L.push({getGui:()=>z});for(const H of y.current)H.isDisplayed()&&L.push(H);return L},setCursor:r,setUserSelect:l};N.setComp(q,M,M),d(!0)},[]);g.useEffect(()=>{const M=p.current,N=f.current;if(!u||!M||!C||!N||e.isDestroyed())return;const q=[],{watermarkSelector:L,paginationSelector:z,sideBarSelector:H,statusBarSelector:A,gridHeaderDropZonesSelector:de}=M.getOptionalSelectors(),k=[];if(de){const U=e.createBean(new de.component),W=U.getGui();N.insertAdjacentElement("afterbegin",W),k.push(W),q.push(U)}if(H){const U=e.createBean(new H.component),W=U.getGui(),re=C.querySelector(".ag-tab-guard-bottom");re&&(re.insertAdjacentElement("beforebegin",W),k.push(W)),q.push(U),y.current.push(U)}const V=U=>{const W=e.createBean(new U),re=W.getGui();return N.insertAdjacentElement("beforeend",re),k.push(re),q.push(W),W};if(A&&V(A.component),z){const U=V(z.component);x.current=U,y.current.push(U)}return L&&V(L.component),()=>{e.destroyBeans(q);for(const U of k)U.remove()}},[u,C,e]);const R=g.useMemo(()=>Xt("ag-root-wrapper",t,i),[t,i]),E=g.useMemo(()=>Xt("ag-root-wrapper-body","ag-focus-managed",i),[i]),D=g.useMemo(()=>({userSelect:a??"",WebkitUserSelect:a??"",cursor:n??""}),[a,n]),P=g.useCallback(M=>{v.current=M,h(M!==null)},[]),T=g.useCallback(()=>!p.current?.isFocusable(),[]);return g.createElement("div",{ref:F,className:R,style:D,role:"presentation"},g.createElement("div",{className:E,ref:w,role:"presentation"},c&&C&&!e.isDestroyed()&&g.createElement(St.Provider,{value:e.getBeans()},g.createElement(L8,{ref:P,eFocusableElement:C,onTabKeyDown:S,gridCtrl:p.current,forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:T},g.createElement(M8,null)))))},N8=g.memo(O8),H8=class extends O{postConstruct(){if(this.beans.colAutosize){const e=this.queueResizeOperationsForTick.bind(this);this.addManagedEventListeners({rowExpansionStateChanged:e,expandOrCollapseAll:e,cellValueChanged:e,rowNodeDataChanged:e,rowDataUpdated:e})}}queueResizeOperationsForTick(){const e=this.beans.colAutosize;e.shouldQueueResizeOperations=!0,setTimeout(()=>{e.processResizeOperations()},0)}areHeaderCellsRendered(){return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().every(e=>e.getAllCtrls().every(t=>t.areCellsRendered()))}areCellsRendered(){return this.beans.rowRenderer.getAllRowCtrls().every(e=>e.isRowRendered()&&e.getAllCellCtrls().every(t=>!!t.eGui))}},XC={setGridApi:void 0,maxComponentCreationTimeMs:void 0,children:void 0},G8={gridOptions:void 0,modules:void 0,containerStyle:void 0,className:void 0,passGridApi:void 0,componentWrappingElement:void 0,...XC},ZC=new Set(Object.keys(G8)),B8=new Set(Object.keys(XC)),QC=e=>{const t=g.useRef(),s=g.useRef(null),i=g.useRef(null),o=g.useRef([]),n=g.useRef([]),r=g.useRef(e),a=g.useRef(),l=g.useRef(),c=g.useRef(!1),[d,u]=g.useState(void 0),[,h]=g.useState(0),p=g.useCallback(w=>{if(s.current=w,!w){for(const T of o.current)T();o.current.length=0;return}const b=e.modules||[];i.current||(i.current=new o8(()=>h(T=>T+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),o.current.push(()=>{i.current?.destroy(),i.current=null}));const x=oS(e.gridOptions,e,Object.keys(e).filter(T=>!ZC.has(T))),y=()=>{if(c.current){const T=()=>a.current?.shouldQueueUpdates()?void 0:n.current.shift();let M=T();for(;M;)M(),M=T()}},S=new j8(y);a.current=S;const F=new H8,R={providedBeanInstances:{frameworkCompWrapper:new z8(i.current,x),renderStatus:F},modules:b,frameworkOverrides:S,setThemeOnGridDiv:!0},E=T=>{u(T),T.createBean(F),o.current.push(()=>{T.destroy()}),T.getBean("ctrlsSvc").whenReady({addDestroyFunc:M=>{o.current.push(M)}},()=>{if(T.isDestroyed())return;const M=t.current;M&&e.passGridApi?.(M)})},D=T=>{T.getBean("ctrlsSvc").whenReady({addDestroyFunc:M=>{o.current.push(M)}},()=>{for(const M of n.current)M();n.current.length=0,c.current=!0})},P=new JT;x.gridId??(x.gridId=l.current),t.current=P.create(w,x,E,D,R),o.current.push(()=>{t.current=void 0}),t.current&&(l.current=t.current.getGridId())},[]),f=g.useMemo(()=>({height:"100%",...e.containerStyle||{}}),[e.containerStyle]),v=g.useCallback(w=>{c.current&&!a.current?.shouldQueueUpdates()?w():n.current.push(w)},[]);g.useEffect(()=>{const w=V8(r.current,e);r.current=e,v(()=>{t.current&&nS(w,t.current)})},[e]);const C=!g.useSyncExternalStore||Pa(e,"renderingMode")==="legacy"?"legacy":"default";return g.createElement("div",{style:f,className:e.className,ref:p},g.createElement(jC.Provider,{value:C},d&&!d.isDestroyed()?g.createElement(N8,{key:d.instanceId,context:d}):null,i.current?.getPortals()??null))};function V8(e,t){const s={};for(const i of Object.keys(t)){if(ZC.has(i)){B8.has(i)&&$(274,{prop:i});continue}const o=t[i];e[i]!==o&&(s[i]=o)}return s}var z8=class extends o4{constructor(e,t){super(),this.parent=e,this.gridOptions=t}createWrapper(e,t){const s=this.gridOptions;if(Pa(s,"reactiveCustomComponents")){const r=(a=>{switch(a){case"filter":return Pa(s,"enableFilterHandlers")?qA:$A;case"floatingFilterComponent":return Pa(s,"enableFilterHandlers")?XA:YA;case"dateComponent":return _A;case"dragAndDropImageComponent":return UA;case"loadingOverlayComponent":return QA;case"noRowsOverlayComponent":return e8;case"statusPanel":return t8;case"toolPanel":return s8;case"menuItem":return JA;case"cellRenderer":return jA;case"innerHeaderComponent":return ZA}})(t.name);if(r)return new r(e,this.parent,t)}else switch(t.name){case"filter":case"floatingFilterComponent":case"dateComponent":case"dragAndDropImageComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"statusPanel":case"toolPanel":case"menuItem":case"cellRenderer":wh();break}const o=!t.cellRenderer&&t.name!=="toolPanel";return new qC(e,this.parent,t,o)}},W8=g.forwardRef((e,t)=>{const s=g.useContext(St),{registry:i,context:o,gos:n,rowModel:r}=s,[a,l]=g.useState(()=>new ts),[c,d]=g.useState(()=>new ts),[u,h]=g.useState(),[p,f]=g.useState(),v=g.useRef(),C=g.useRef(null),w=g.useRef(),b=g.useMemo(()=>Ny(e.api.getGridId(),u?.rowModelType??"clientSide"),[e]),x=g.useMemo(()=>a.toString()+" ag-details-row",[a]),y=g.useMemo(()=>c.toString()+" ag-details-grid",[c]);t&&g.useImperativeHandle(t,()=>({refresh(){return v.current?.refresh()??!1}})),e.template&&$(230);const S=g.useCallback(R=>{if(C.current=R,!R||o.isDestroyed()){v.current=o.destroyBean(v.current),w.current?.();return}const E={toggleCss:(P,T)=>l(M=>M.setClass(P,T)),toggleDetailGridCss:(P,T)=>d(M=>M.setClass(P,T)),setDetailGrid:P=>h(P),setRowData:P=>f(P),getGui:()=>C.current},D=i.createDynamicBean("detailCellRendererCtrl",!0);if(D&&(o.createBean(D),D.init(E,e),v.current=D,n.get("detailRowAutoHeight"))){const P=()=>{if(C.current==null)return;const T=C.current.clientHeight;T!=null&&T>0&&setTimeout(()=>{e.node.setRowHeight(T),(st(n)||Xi(n))&&r.onRowHeightChanged()},0)};w.current=Us(s,R,P),P()}},[]),F=g.useCallback(R=>{v.current?.registerDetailWithMaster(R)},[]);return g.createElement("div",{className:x,ref:S},u&&g.createElement(QC,{className:y,...u,modules:b,rowData:p,passGridApi:F}))}),j8=class extends Fv{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.renderingEngine="react",this.frameworkComponents={agGroupCellRenderer:Og,agGroupRowRenderer:Og,agDetailCellRenderer:W8},this.wrapIncoming=(t,s)=>s==="ensureVisible"?HA(t):t()}frameworkComponent(e){return this.frameworkComponents[e]}isFrameworkComponent(e){if(!e)return!1;const t=e.prototype;return!(t&&"getGui"in t)}getLockOnRefresh(){this.queueUpdates=!0}releaseLockOnRefresh(){this.queueUpdates=!1,this.processQueuedUpdates()}shouldQueueUpdates(){return this.queueUpdates}runWhenReadyAsync(){return NA()}},_8=class extends g.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=e=>{this.api=e;for(const t of this.apiListeners)t(e)}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return g.createElement(QC,{...this.props,passGridApi:this.setGridApi})}},JC=(e=>(e.Dropdown="dropdown",e.Menu="menu",e))(JC||{}),Bt=(e=>(e.Click="click",e.Hover="hover",e.ContextMenu="contextMenu",e))(Bt||{}),Qo=(e=>(e.Item="item",e.Divider="divider",e.PlainText="plainText",e))(Qo||{});const U8=pe("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),$8=pe("z-[53] overflow-auto rounded bg-layer-0 text-primary shadow focus-visible:outline-none"),q8=pe("flex w-full cursor-pointer items-center gap-3","focus-visible:border-none focus-visible:outline-none","hover:bg-accent-primary-alpha px-3","dial-small-text h-[34px] rounded text-primary"),K8="opacity-75 !cursor-not-allowed",Y8="text-error",X8="my-1 border-t border-hover border-secondary",An=4,Er=({ariaLabel:e,className:t,size:s=24,onClose:i,...o})=>m.jsx(hi,{"aria-label":e,className:se("text-secondary hover:enabled:text-accent-primary",t,"w-auto h-auto"),onClick:i,icon:m.jsx(B.IconX,{size:s}),...o}),Tt=({children:e,menu:t,renderOverlay:s,trigger:i=[Bt.Click],placement:o,disabled:n=!1,open:r,defaultOpen:a=!1,onOpenChange:l,closable:c=!1,onClose:d,className:u,listClassName:h,outsidePressIgnoreRef:p,outsideClosable:f=!0,allowedPlacements:v,anchorToMouse:C=!1,matchReferenceWidth:w=!0,maxDropdownHeight:b})=>{const[x,y]=g.useState(a),S=r!==void 0,F=S?!!r:x,R=g.useRef(null),E=g.useCallback(j=>{S||y(j),l?.(j)},[S,l]),D=g.useId(),P=o===void 0,T=j=>"clientWidth"in j?j.clientWidth:j.getBoundingClientRect?.()?.width??0,{refs:M,floatingStyles:N,context:q}=Ie.useFloating({placement:o,open:F,onOpenChange:E,whileElementsMounted:Ie.autoUpdate,middleware:[Ie.offset({mainAxis:An,crossAxis:0}),P?Ie.autoPlacement({alignment:"start",crossAxis:!0,padding:An,allowedPlacements:v}):Ie.flip({padding:An}),Ie.shift({padding:An}),Ie.size({padding:An,apply({availableWidth:j,availableHeight:ge,elements:oe}){const Z=oe.floating,_=T(oe.reference);Z.style.setProperty("--fui-available-height",`${Math.floor(ge)}px`),Z.style.setProperty("--reference-width",w?`${Math.round(_)}px`:"0px"),w?Z.style.minWidth=`${Math.round(_)}px`:Z.style.removeProperty("min-width"),Z.style.maxWidth=`${Math.floor(j)}px`;const ae=Math.floor(ge);Z.style.maxHeight=`${b?Math.min(ae,b):ae}px`}})]}),L=Ie.useClick(q,{enabled:i.includes(Bt.Click)&&!n}),z=Ie.useHover(q,{enabled:i.includes(Bt.Hover)&&!n,move:!1,restMs:40,delay:{open:80,close:80}}),H=Ie.useDismiss(q,{bubbles:!0,referencePress:!1,outsidePress:j=>{if(!f)return!1;const ge=j.target;return!(p?.current&&ge instanceof Node&&p.current.contains(ge))}}),A=Ie.useRole(q,{role:"menu"}),{getReferenceProps:de,getFloatingProps:k}=Ie.useInteractions([L,z,H,A]),V=g.useCallback((j,ge)=>{M.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:j,y:ge,top:ge,left:j,right:j,bottom:ge})})},[M]),U=g.useCallback(j=>{!i.includes(Bt.ContextMenu)||n||(j.preventDefault(),C&&(V(j.clientX,j.clientY),R.current=document.elementFromPoint(j.clientX,j.clientY)),E(!0))},[C,n,E,V,i]),W=g.useCallback(j=>{!C||n||(i.includes(Bt.ContextMenu)&&F&&E(!1),V(j.clientX,j.clientY),R.current=document.elementFromPoint(j.clientX,j.clientY))},[C,n,V,F,i,E]);g.useEffect(()=>{n&&F&&E(!1)},[n,F,E]);const re=g.useCallback(j=>ge=>{j.disabled||(j.onClick?.({key:j.key,domEvent:ge}),t?.onClick?.({key:j.key,domEvent:ge}),E(!1))},[t,E]),be=g.useMemo(()=>s?s():t?m.jsxs(m.Fragment,{children:[t.header&&m.jsx(m.Fragment,{children:typeof t.header=="function"?t.header():t.header}),m.jsx("div",{role:"none",className:"py-1","aria-label":"dropdown",children:t.items.map(j=>j.type===Qo.Divider?m.jsx("div",{role:"separator",className:X8},j.key):j.type===Qo.PlainText?m.jsx("div",{className:se("px-3 py-2 text-secondary dial-caption",j.className),children:j.label},j.key):m.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!j.disabled,className:pe(q8,j.disabled&&K8,j.danger&&Y8,j.className),disabled:j.disabled,onClick:re(j),children:[j.icon&&m.jsx("span",{className:pe(j.danger&&"text-error",j.disabled&&"text-secondary"),children:m.jsx(Be,{icon:j.icon})}),m.jsx("span",{className:pe("flex-1 truncate text-left",j.danger&&"text-error",j.disabled&&"text-secondary"),"aria-labelledby":"item-text",children:j.label})]},j.key))}),t.footer&&m.jsx(m.Fragment,{children:typeof t.footer=="function"?t.footer():t.footer})]}):null,[re,t,s]),Q=de({onContextMenu:U,onMouseDown:W});return g.useEffect(()=>{if(!F)return;const j=M.reference.current;let ge=null;if(j instanceof Element?ge=j:R.current instanceof Element&&(ge=R.current),!ge)return;const oe=new IntersectionObserver(([Z])=>{Z.isIntersecting||E(!1)},{root:null,threshold:0});return oe.observe(ge),()=>oe.disconnect()},[F,M.reference,E]),m.jsxs(m.Fragment,{children:[m.jsx("span",{ref:M.setReference,className:pe(U8,n&&"!cursor-not-allowed opacity-75",u),"aria-haspopup":"menu","aria-expanded":F,"aria-controls":D,...Q,children:e}),F&&m.jsx(Ie.FloatingPortal,{children:m.jsx(Ie.FloatingFocusManager,{context:q,modal:!1,initialFocus:-1,returnFocus:!0,children:m.jsxs("div",{id:D,ref:M.setFloating,style:N,className:pe($8,!w&&"w-max",h),...k(),children:[c&&m.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:m.jsx(Er,{ariaLabel:"Close dropdown",onClose:j=>{d?.(j),E(!1)}})}),be]})})})]})},Z8="h-full w-full",Vg=".ag-checkbox-input",sd={accentColor:"var(--controls-bg-accent, #5C8DEA)",backgroundColor:"var(--bg-layer-3, #1D2439)",oddRowBackgroundColor:"var(--bg-layer-2, #161B2D)",selectedRowBackgroundColor:"var(--bg-accent-primary-alpha, #7DA4FF26)",borderColor:"var(--bg-layer-4, #242C42)",rowBorder:"1px solid var(--stroke-tertiary, #0C101D)",rowHoverColor:"var(--bg-accent-primary-alpha, #7DA4FF26)",borderRadius:3,browserColorScheme:"dark",chromeBackgroundColor:"var(--bg-layer-1, #0C101D)",foregroundColor:"var(--text-primary, ##EEF1F7)",headerFontSize:14,headerFontWeight:600,headerTextColor:"var(--text-secondary, #7F8792)",spacing:4,wrapperBorderRadius:3,fontSize:14,fontFamily:{googleFont:"var(--theme-font, var(--font-inter))"}},id=40;var Ri=(e=>(e.API="api",e.ROW_DATA_CHANGED="rowDataChanged",e.CHECKBOX_SELECTED="checkboxSelected",e))(Ri||{});const Q8=(e,t,s,i,o)=>{const n=typeof e=="string"?e.toLowerCase():e,r=typeof t=="string"?t.toLowerCase():t;return n===r?0:n?r?n>r?1:-1:o?1:-1:o?-1:1};var Zn=(e=>(e.MULTIPLE="MULTIPLE",e.SINGLE="SINGLE",e))(Zn||{});const ew="en-US",tw={year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},J8="text-primary",od=40,sw={minWidth:od,width:od,maxWidth:od},eL={cellClass:"ag-grid-no-checkbox",...sw},tL={...sw};function sL(e,t){let s=null;return(...i)=>{s&&clearTimeout(s),s=setTimeout(()=>e(...i),t)}}OA({testIdAttribute:"dataQA"});am.registerModules([MA]);const bh=({columnDefs:e,rowData:t,additionalGridOptions:s,getContextMenuItems:i,className:o,ariaLabel:n="Data grid",wrapCustomCellRenderers:r=!0,disabledRowIds:a,selectedRowIds:l,onSelectionChange:c,onGridApiChange:d,getRowId:u=F=>String(F.id??JSON.stringify(F)),alternateOddRowColors:h=!1,filterPlaceholder:p="Enter value",emptyStateIcon:f,emptyStateTitle:v="No results found",emptyStateDescription:C="Sorry, we couldn't find any results for your search.",loading:w=!1,wrapperBorder:b=!0,withoutHeaderBorders:x=!1,allowDisabledContextMenu:y=!1,selectionMode:S})=>{const[F,R]=g.useState(id),[E,D]=g.useState(),P=g.useId(),T=g.useRef(new Set),M=g.useRef(void 0),N=g.useMemo(()=>({...sd,oddRowBackgroundColor:h?sd.oddRowBackgroundColor:sd.backgroundColor,wrapperBorder:b}),[h,b]),q=g.useCallback(_=>{_.api.sizeColumnsToFit(),R(id)},[]),L=g.useCallback(_=>{if(_.data){const ae=u(_.data),G=a?.has(ae)??!1,fe=G&&!y,he=_.value==null?"":String(_.value),ie=i?.(_.data)??[];return m.jsx(Tt,{trigger:[Bt.ContextMenu],menu:{items:ie},anchorToMouse:!0,matchReferenceWidth:!0,className:"w-full",disabled:fe,children:m.jsx("span",{className:"block min-w-0 h-full max-w-full",children:m.jsx(mt,{text:he,className:"max-w-full h-full",hideTooltip:G})})})}},[i,a,u,y]),z=g.useCallback(_=>_===Ri.API||_===Ri.ROW_DATA_CHANGED,[]),H=g.useCallback(_=>{if(!E)return;const G=(_.selectedNodes||[]).map(he=>he.data),fe=new Set(G.map(u));T.current=fe,M.current=_.source,z(_.source)||c?.(fe,G)},[E,u,z,c]),A=g.useMemo(()=>sL(_=>H?.(_),100),[H]),de=g.useCallback(_=>{if(!_.data)return null;const ae=u(_.data),G=_.node.isSelected(),fe=a?.has(ae),he=`row-select-${ae}`;return m.jsx("div",{className:"h-6 w-6 flex items-center justify-center",children:m.jsx(vu,{className:"w-[18px] h-[18px]",inputId:he,checked:G,disabled:fe,name:"gridradiobutton",value:"selected",onChange:()=>{fe||(_.node.setSelected(!0,!0,Ri.CHECKBOX_SELECTED),_.api.refreshCells({columns:[_.column?.getColId()]}))}})})},[u,a]),k=g.useCallback(()=>{const _="dial-row-select",ae="dial-row-select-visible";return!l||l.size===0?_:`${_} ${ae}`},[l]),V=g.useCallback(()=>!l||l.size===0?"dial-row-not-select-header":k(),[k,l]),U=g.useMemo(()=>{if(S===Zn.SINGLE)return{...eL,cellRenderer:de};if(S===Zn.MULTIPLE)return{...tL,headerClass:()=>V(),cellClass:_=>{const ae=_.data?u(_.data):null;let G=k();return ae&&a?.has(ae)&&(G+=" opacity-50 pointer-events-none"),G}}},[S,de,V,u,k,a]),W=g.useCallback(_=>{const ae=typeof r=="function"?r(_):!!r;if(!_.cellRenderer)return{..._,cellRenderer:L};if(!ae)return _;const G=_.cellRenderer;return{..._,cellRenderer:he=>{const ie=he.data?i?.(he.data)??[]:[];let le=null;if(typeof G=="function"){const Ce=G;le=m.jsx(Ce,{...he})}else le=L(he);const Fe=he.data?u(he.data):null,Oe=Fe?a?.has(Fe):!1;return m.jsx(Tt,{trigger:[Bt.ContextMenu],menu:{items:ie},anchorToMouse:!0,matchReferenceWidth:!0,className:pe("w-full h-full",Oe&&"!cursor-not-allowed opacity-75"),disabled:Oe&&!y,children:m.jsx("span",{className:"block min-w-0 max-w-full flex-1",children:le})})}}},[a,i,u,L,r,y]),re=g.useMemo(()=>r?(e??[]).map(W):e??[],[e,r,r?W:null]),be=g.useMemo(()=>({minWidth:150,resizable:!0,sortable:!0,floatingFilter:!0,filter:"agTextColumnFilter",filterParams:{filterPlaceholder:p,buttons:["reset"]},comparator:Q8.bind(void 0)}),[p]),Q=_=>{const ae=document.querySelector(Vg);ae&&ae.setAttribute("aria-description",Sd);const G=re.map(fe=>({...fe,sort:void 0}));_.api.updateGridOptions({columnDefs:G,rowData:t}),_.api.sizeColumnsToFit(),D(_.api),s?.onGridReady?.(_),d?.(_.api)};g.useEffect(()=>{E&&t&&E.setGridOption("rowData",t)},[E,t]);const j=g.useCallback(()=>m.jsx(vr,{title:v,description:C,containerClassName:"gap-3",titleClassName:"mt-2 !text-lg",icon:f||m.jsx(B.IconZoomCancel,{size:100,stroke:.5,className:"text-secondary"})}),[v,C,f]),ge=g.useMemo(()=>{if(S)return{mode:S===Zn.SINGLE?"singleRow":"multiRow",isRowSelectable:_=>{const ae=_.data?u(_.data):null;return ae?!a?.has(ae):!0}}},[a,u,S]);g.useEffect(()=>{E&&t&&T.current.size&&T.current.forEach(_=>{const ae=E.getRowNode(_);ae&&!ae.isSelected()&&ae.setSelected(!0,!1,Ri.API)})},[E,t]),g.useEffect(()=>{E&&l&&(E.deselectAll("all",Ri.API),l.forEach(_=>{const ae=E.getRowNode(_);ae&&!ae.isSelected()&&ae.setSelected(!0,!1,Ri.API)}))},[E,l]);const oe=g.useCallback(_=>_.data?u(_.data):"",[u]),Z=g.useCallback(()=>{document.querySelectorAll(`.ag-row ${Vg}`).forEach(_=>{_.setAttribute("aria-description",Sd)})},[]);return g.useEffect(()=>{const _=z(M.current);if(E&&l?.size&&_){const ae=Array.from(l)[0];if(ae){const G=E.getRowNode(ae);G&&E.ensureNodeVisible(G)}}},[E,z,l]),m.jsx("div",{className:pe(Z8,o,S&&"with-selection-column",x&&"dial-without-header-borders"),"aria-label":n,role:"region","aria-busy":w,children:m.jsx("div",{className:"ag-theme-balham-dark h-full overflow-x-auto",role:"table","aria-describedby":P,children:m.jsx(_8,{rowModelType:"clientSide",headerHeight:id,rowHeight:F,cellSelection:!1,theme:kP.withPart(cP).withParams({...N}),autoSizeStrategy:{type:"fitGridWidth"},columnDefs:re,defaultColDef:be,selectionColumnDef:U,onGridSizeChanged:q,onGridReady:Q,loading:w,suppressCellFocus:!0,suppressDragLeaveHidesColumns:!0,noRowsOverlayComponent:j,rowData:t,rowSelection:ge,onSelectionChanged:A,getRowId:oe,onRowDataUpdated:Z,onBodyScroll:Z,onFirstDataRendered:Z,...s})})})};var hl=(e=>(e.Horizontal="horizontal",e.Vertical="vertical",e))(hl||{}),pl=(e=>(e.Mobile="mobile",e.Tablet="tablet",e))(pl||{});const ba=({tab:e,active:t,invalid:s,className:i,horizontal:o,onClick:n})=>{const r=se("rounded h-[38px] items-center flex flex-row border-transparent cursor-pointer dial-small-text hover:text-accent-primary",{"border-b-2 px-4":o,"border-l-2 px-3":!o}),a=se(r,{"bg-layer-4":o,"bg-layer-1 text-secondary pointer-events-none":e.disabled,"bg-accent-primary-alpha text-primary":t&&!e.disabled,"text-primary":!t&&!e.disabled,"border-b-accent-primary":t&&o&&!e.disabled,"border-l-accent-primary":t&&!o&&!e.disabled},i);return m.jsxs("button",{role:"tab",className:a,onClick:()=>n(e.id),disabled:e.disabled,children:[m.jsx(mt,{text:e.label,contentClassName:"max-w-[200px]",className:"max-w-[200px]"}),(s||e.invalid)&&m.jsx("div",{className:"text-error pl-1",children:m.jsx(B.IconExclamationCircle,{...J})}),e.warning&&m.jsx("div",{className:"text-warning pl-1",children:m.jsx(B.IconAlertTriangle,{...J})})]})},iL=12;var ni=(e=>(e.Undefined="undefined",e.Mobile="mobile",e.Tablet="tablet",e.Desktop="desktop",e))(ni||{});const zg=()=>typeof window<"u"&&window.innerWidth<640,nd=()=>{if(typeof window>"u")return ni.Undefined;const e=window.innerWidth;return e>=1024?ni.Desktop:e<640?ni.Mobile:ni.Tablet},oL=()=>{const[e,t]=g.useState(()=>typeof window>"u"?ni.Desktop:nd());return g.useEffect(()=>{t(nd());const s=()=>t(nd());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e},iw=({tabs:e,activeTab:t,onClick:s,orientation:i=hl.Horizontal,screenThreshold:o=pl.Tablet,smallScreenContainerClassName:n,smallScreenDropdownItemClassName:r,desktopDropdownClassName:a,desktopTabClassName:l})=>{const[c,d]=g.useState(!1),[u,h]=g.useState(!1),[p,f]=g.useState(!1),v=oL(),C=v===ni.Mobile||o===pl.Tablet&&v===ni.Tablet,w=i===hl.Horizontal,b=g.useRef(null),x=g.useRef(null),y=g.useRef(null),S=e.find(P=>P.id===t),F=g.useMemo(()=>pe("flex gap-2",w?"flex-row flex-nowrap overflow-x-auto":"flex-col flex-wrap w-full"),[w]),R=g.useCallback(()=>{const P=x.current;P&&f(P.scrollWidth>P.clientWidth)},[]),E=g.useCallback(()=>{const P=y.current,T=x.current;if(!P||!T)return;const M=P.getBoundingClientRect(),N=T.getBoundingClientRect();if(M.width===0||N.width===0)return;const q=iL;let L=T.scrollLeft;if(M.left<N.left+q)L-=N.left+q-M.left;else if(M.right>N.right-q)L+=M.right-(N.right-q);else return;const z=Math.max(0,T.scrollWidth-T.clientWidth);L=Math.max(0,Math.min(L,z)),L!==T.scrollLeft&&T.scrollTo({left:L,behavior:"smooth"})},[]),D=g.useCallback(P=>{s(P),P===t&&E()},[s,t,E]);return g.useEffect(()=>{R();const P=new ResizeObserver(()=>R()),T=x.current;return T&&P.observe(T),()=>P.disconnect()},[e,R]),g.useEffect(()=>{E()},[t,E]),C?m.jsx("div",{role:"tablist",className:se("h-11 flex items-center bg-layer-3 px-4",n),children:m.jsx(Tt,{trigger:[Bt.Click],open:c,onOpenChange:d,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],renderOverlay:()=>e.map(P=>m.jsx(ba,{tab:P,active:P.id===t,onClick:T=>{D(T),d(!1)},className:se("w-full rounded-none h-11 items-center px-6",r)},P.id)),children:m.jsxs("div",{className:"flex gap-2 items-center h-11 cursor-pointer",children:[m.jsx(ba,{tab:S,active:!0,onClick:D,className:"rounded-none bg-transparent border-l-0 border-b-0 h-full items-center px-0"},t),m.jsx(Be,{icon:m.jsx(B.IconChevronDown,{size:Ct.SM}),className:pe("text-primary transition-transform",c&&"rotate-180")})]})})}):m.jsxs("div",{ref:b,className:"flex w-full items-start",children:[m.jsx("div",{ref:x,role:"tablist",className:F,children:e.map(P=>m.jsx("div",{ref:t===P.id?y:void 0,className:"w-full",children:m.jsx(ba,{tab:P,active:t===P.id,onClick:D,horizontal:w,className:se("w-full",l)})},P.id))}),p&&m.jsx("div",{className:"flex items-center ml-2",children:m.jsx(Tt,{trigger:[Bt.Click],open:u,onOpenChange:h,placement:"bottom-end",renderOverlay:()=>e.map(P=>m.jsx(ba,{tab:P,active:P.id===t,onClick:T=>{D(T),h(!1)},className:"w-full rounded-none h-8 items-center px-3 py-2"},P.id)),children:m.jsx(is,{iconBefore:m.jsx(B.IconDotsVertical,{size:Gt}),className:se("w-8 h-8 flex items-center justify-center rounded border",u?"bg-layer-4 border-transparent":"border-primary",a)})})})]})},nL="w-full overflow-hidden",rL="flex flex-nowrap items-center gap-2 min-w-0 px-0 py-0 whitespace-nowrap",ow="flex items-center gap-2 min-w-0 shrink-0 dial-small-text",aL="basis-[20%] flex-none",lL="flex-1 min-w-0",Wg="inline-flex items-center gap-1 min-w-0 transition-colors",cL="text-secondary hover:text-accent-primary",dL="text-primary cursor-default",nw="flex-none inline-flex items-center leading-none text-secondary",uL="items-center gap-1 min-w-0 transition-colors text-secondary hover:text-accent-primary",rw=m.jsx(B.IconChevronRight,{size:Ct.SM,"aria-hidden":"true"}),Gn=({label:e,href:t,onClick:s,disabled:i,isLast:o,separator:n=rw,className:r,iconBefore:a,labelClassName:l,onBeforeNavigate:c,...d})=>{const u=async C=>{if(c&&!o&&!await c()){C.preventDefault();return}s&&s(C)},h=se(ow,o?lL:aL,r),p=(!!t||!!s)&&!o&&!i,f=p?se(Wg,cL):se(Wg,dL,i?"pointer-events-none opacity-75":""),v=typeof e=="string"?m.jsx(mt,{className:se("cursor-pointer",l),text:e,id:"breadcrumb-item-content"}):m.jsx("span",{className:se("flex-1 min-w-0 truncate cursor-pointer max-w-[300px]",l),"aria-label":"breadcrumb-item-content",children:e});return m.jsxs("li",{...d,className:h,"aria-label":d["aria-label"]||"breadcrumb-item",children:[p?m.jsxs("a",{href:t,onClick:u,className:f,children:[a,v]}):m.jsxs("span",{className:f,"aria-current":o?"page":void 0,"aria-disabled":i?"true":void 0,children:[a,v]}),!o&&m.jsx("span",{className:nw,"aria-label":"separator",children:n})]})},aw=({pathItems:e,separator:t=rw,ariaLabel:s="Breadcrumb",className:i,children:o,labelClassName:n,onBeforeNavigate:r})=>{const a=g.useMemo(()=>e?.length?e:g.Children.toArray(o).filter(g.isValidElement).map(d=>{const u=d.props,{labelClassName:h,isLast:p,separator:f,...v}=u;return v}),[e,o]),l=g.useCallback(async d=>{const u=parseInt(d.key,10),h=a[u];if(r&&!await r()){d.domEvent.preventDefault();return}h.onClick?h.onClick(d.domEvent):h.href&&(window.location.href=h.href)},[a,r]),c=g.useMemo(()=>{if(a.length===0)return null;if(a.length<=3)return a.map((v,C)=>g.createElement(Gn,{...v,key:`item-${C}`,isLast:C===a.length-1,separator:t,labelClassName:n,onBeforeNavigate:r}));const d=a.at(0),u=a.slice(1,-2),h=a.at(-2),p=a.at(-1);if(!d||!h||!p)return null;const f=u.map((v,C)=>({key:String(C+1),label:typeof v.label=="string"?v.label:`Item ${C+1}`,disabled:v.disabled}));return m.jsxs(m.Fragment,{children:[g.createElement(Gn,{...d,key:"item-0",separator:t,labelClassName:n,onBeforeNavigate:r}),m.jsxs("li",{className:se(ow),children:[m.jsx(Tt,{menu:{items:f,onClick:l},placement:"bottom-start",matchReferenceWidth:!1,children:m.jsx("button",{type:"button","aria-label":"More breadcrumbs",className:uL,children:m.jsx(B.IconDots,{size:Ct.SM})})}),m.jsx("span",{className:nw,children:t})]}),g.createElement(Gn,{...h,key:`item-${a.length-2}`,separator:t,labelClassName:n,onBeforeNavigate:r}),g.createElement(Gn,{...p,key:`item-${a.length-1}`,isLast:!0,separator:t,labelClassName:n,onBeforeNavigate:r})]})},[a,t,n,l,r]);return m.jsx("nav",{"aria-label":s,className:se(nL,i),children:m.jsx("ol",{className:rL,children:c})})},xh=(e,t)=>({appearance:i,...o})=>m.jsx(is,{...o,variant:e,appearance:i||t}),lw=(e,t)=>({variant:i,...o})=>m.jsx(is,{...o,variant:i||t,appearance:e}),Rs=xh(We.Primary,ke.Solid),Es=xh(We.Neutral,ke.Outlined),cw=xh(We.Error,ke.Outlined),hL=lw(ke.Link,We.Primary),yh=lw(ke.Ghost,We.Primary),dn=(e,t)=>({appearance:i,...o})=>m.jsx(hi,{...o,variant:e,appearance:i||t}),pL=(e,t)=>({variant:i,...o})=>m.jsx(hi,{...o,variant:i||t,appearance:e}),gL=dn(We.Primary,ke.Solid),fL=dn(We.Neutral,ke.Outlined),dw=dn(We.Error,ke.Outlined),mL=dn(We.Secondary,ke.Ghost),vL=dn(We.Tertiary,ke.Ghost),CL=dn(We.Success,ke.Ghost),wL=pL(ke.Ghost,We.Primary),uw=({iconClassName:e,label:t,...s})=>t?m.jsx(cw,{...s,label:t,appearance:ke.Ghost,iconBefore:m.jsx(B.IconTrashX,{...J,className:e||""})}):m.jsx(dw,{...s,appearance:ke.Ghost,icon:m.jsx(B.IconTrashX,{...J,className:e||""})}),bL=({className:e="",value:t,onChange:s,error:i,containerClassName:o,resize:n=!1,labelProps:r,caption:a,id:l,...c})=>{const d=se("dial-textarea dial-input px-3 py-2",c.invalid&&"dial-input-error",c.disabled&&"dial-input-disable",n?"resize":"resize-none",e);return m.jsxs("div",{className:se("flex flex-col gap-y-1",o),children:[r&&m.jsx(Ki,{...r,htmlFor:l}),m.jsx("textarea",{id:l,value:t||"",className:d,onChange:u=>s?.(u.currentTarget.value),...c}),m.jsx(cs,{text:i}),!i&&m.jsx(fr,{text:a})]})},Hl=({label:e,switchId:t,isOn:s=!1,disabled:i,onChange:o,caption:n})=>{const r=pe("flex w-[36px] h-[18px] cursor-pointer items-center gap-1 rounded-full p-0.5 transition-all duration-200",s?"flex-row-reverse":"flex-row",i?"pointer-events-none":"",i?s?"bg-controls-disable":"bg-layer-4":s?"bg-accent-primary":"bg-layer-4"),a=g.useCallback(l=>{l.stopPropagation(),o?.(!s)},[o,s]);return m.jsxs("div",{className:"flex flex-row items-start",role:"switch",children:[m.jsx("input",{type:"checkbox",onChange:a,id:t,disabled:i,className:"invisible w-0 h-0",checked:s}),m.jsx("label",{htmlFor:t,className:r,"aria-describedby":n&&"caption",children:m.jsx("span",{className:pe("size-3 rounded-full",i?"bg-controls-disable-accent":"bg-controls-enable-primary")})}),(e||n)&&m.jsxs("div",{className:"flex flex-col gap-1 ml-2",children:[e&&m.jsx("span",{className:pe("dial-small-text py-[1px]",i?"text-secondary":"text-primary"),"aria-label":"switch-title",children:e}),n&&m.jsx("span",{id:"caption",className:"dial-tiny-text text-secondary",children:n})]})]})};var _t=(e=>(e.Sm="sm",e.Md="md",e.Lg="lg",e))(_t||{});const xL="z-[52] flex items-center justify-center bg-blackout md:p-4",jg="divide-tertiary divide-y",yL="flex flex-row justify-between py-4 px-6 items-center",SL={[_t.Sm]:"dial-sm-popup",[_t.Md]:"dial-md-popup",[_t.Lg]:"dial-lg-popup"},eo=({open:e=!1,header:t,portalId:s,className:i,overlayClassName:o,titleClassName:n,headerClassName:r,dividers:a=!0,dividerFooter:l=!0,children:c,footer:d,onClose:u,size:h=_t.Md,hideClose:p=!1,closeOnOutsideClick:f=!0,preventKeyboardOnOpen:v=!1})=>{const C=g.useRef(null),{refs:w,context:b}=Ie.useFloating({open:e,onOpenChange:E=>{E||u?.(null)}}),x=Ie.useRole(b,{role:"dialog"}),y=Ie.useDismiss(b,{outsidePress:f}),{getFloatingProps:S}=Ie.useInteractions([x,y]);if(!e)return null;const F=typeof t=="string"?"dial-popup-heading":void 0,R=E=>E?typeof E=="string"?m.jsx("h3",{id:F,className:pe("flex-1 min-w-0 mr-3 truncate dial-h3 text-primary",n),children:m.jsx(Lt,{tooltip:E,children:E})}):E:m.jsx("span",{});return m.jsx(Ie.FloatingPortal,{id:s,children:m.jsx(Ie.FloatingOverlay,{className:pe(xL,o),children:m.jsx(Ie.FloatingFocusManager,{context:b,initialFocus:v?C:void 0,children:m.jsxs("div",{ref:w.setFloating,...S(),role:"dialog","aria-modal":"true","aria-labelledby":F,className:pe("dial-popup",SL[h],a&&jg,i),children:[v&&m.jsx("div",{ref:C,tabIndex:-1,"aria-hidden":!0,className:"absolute size-px -m-px overflow-hidden opacity-0 pointer-events-none"}),m.jsxs("div",{className:se(yL,r),children:[R(t),!p&&m.jsx(Er,{ariaLabel:"Close dialog",onClose:E=>u?.(E)})]}),m.jsx("div",{className:"flex-grow overflow-auto","aria-label":"popup-description",children:c}),l&&!d&&m.jsx("div",{className:jg}),d]})})})})};var Jo=(e=>(e.Info="info",e.Danger="danger",e))(Jo||{});const RL="flex justify-end gap-2 px-6 py-4",FL="text-secondary dial-small-150 px-6 py-4",EL="Cancel",DL="Ok",rd={[Jo.Info]:{confirm:{variant:We.Primary,appearance:ke.Solid},cancel:{variant:We.Neutral,appearance:ke.Outlined}},[Jo.Danger]:{container:"dial-danger-popup",confirm:{variant:We.Error,appearance:ke.Solid},cancel:{variant:We.Neutral,appearance:ke.Outlined}}},hw=({header:e,description:t,descriptionClassName:s,open:i=!1,confirmLabel:o=DL,cancelLabel:n=EL,isLoading:r=!1,disableConfirmButton:a=!1,className:l,confirmClassName:c,onClose:d,onConfirm:u,onCancel:h,children:p,dividers:f=!1,variant:v=Jo.Info,size:C=_t.Sm,footer:w})=>{const b=r?null:m.jsxs("div",{className:RL,children:[m.jsx(Es,{label:n,onClick:()=>h?h():d?.()}),m.jsx(is,{variant:rd[v].confirm?.variant,appearance:rd[v].confirm?.appearance,className:c,label:o,disabled:a,onClick:()=>u()})]}),x=g.useCallback(()=>r?m.jsx("div",{className:"px-6 py-4 h-[120px]",children:m.jsx(mr,{size:50})}):p??(t?m.jsx("div",{className:pe(FL,s),children:t}):null),[p,t,r,s]);return m.jsx(eo,{open:i,header:e,className:pe(rd[v].container,l),dividers:f,onClose:()=>d?.(),footer:w??b,size:C,children:x()})},ad=8,PL=24,pw=({initialTags:e=[],label:t,required:s,elementId:i,placeholder:o,captionDescription:n,errorText:r,invalid:a,disabled:l,collapseTagOverflow:c=!1,readOnly:d=!1,containerClassName:u,tagClassName:h,onChange:p})=>{const f=g.useRef(null),v=g.useRef([]),C=g.useRef(null),[w,b]=g.useState(e),[x,y]=g.useState(""),[S,F]=g.useState(!1),[R,E]=g.useState(e.length),D=g.useCallback(H=>A=>{v.current[H]=A},[]),P=g.useCallback(()=>{if(!c)return;const H=f.current;if(!H)return;const A=H.offsetWidth;if(A===0)return;const de=C.current?.offsetWidth??0,V=A-(d?0:PL)-ad;let U=0,W=0;for(let re=0;re<w.length;re++){const be=v.current[re];if(!be)continue;const Q=be.offsetWidth+ad;if(U+Q>V)break;U+=Q,W++}if(W<w.length&&W>0)for(;U+de>V&&W>0;){W--;const re=v.current[W]?.offsetWidth??0;U-=re+ad}E(W)},[c,d,w.length]),T=H=>{const A=H.trim().replace(/,$/,"");if(A&&!w.includes(A)){const de=[A,...w];b(de),p?.(de)}},M=H=>{(H.key===","||H.key==="Enter")&&(H.preventDefault(),T(x),y(""))},N=()=>{x.trim()&&(T(x),y(""))},q=H=>{const A=w.filter((de,k)=>k!==H);b(A),p?.(A)},L=()=>r?m.jsx(cs,{text:r}):n?m.jsx(fr,{text:n}):null;g.useEffect(()=>{if(c)return;const H=new ResizeObserver(()=>{if(f.current){const A=f.current.scrollHeight>f.current.clientHeight+10;F(A)}});return f.current&&H.observe(f.current),()=>H.disconnect()},[w,c]),g.useEffect(()=>{if(!c){E(w.length);return}E(w.length);const H=new ResizeObserver(()=>{P()}),A=f.current;return A&&H.observe(A),P(),()=>H.disconnect()},[c,P,w]),g.useEffect(()=>{b(e)},[JSON.stringify(e)]);const z=m.jsxs("div",{ref:f,className:pe("flex gap-2 items-center relative",c?"flex-nowrap overflow-hidden w-full min-w-0":pe("flex-wrap",S?"flex-col-reverse":"flex-row"),u),children:[(c?w.slice(0,R):w).map((H,A)=>m.jsx(Po,{tag:H,className:h,remove:!l&&!d?()=>q(A):void 0},H+A)),c&&R<w.length&&m.jsx(Lt,{tooltip:w.slice(R).join(", "),triggerClassName:"inline-flex shrink-0 cursor-pointer",children:m.jsx(Po,{tag:`+${w.length-R}`})}),!d&&m.jsx("input",{id:i,type:"text",value:x,onChange:H=>y(H.target.value),onKeyDown:M,onBlur:N,className:pe("dial-input outline-none !border-none w-full flex-1 !p-1 !h-auto",c?"min-w-0":"min-w-[100px]"),placeholder:o??"",disabled:l}),c&&m.jsxs("div",{className:"absolute left-0 top-0 invisible pointer-events-none h-0 overflow-hidden whitespace-nowrap","aria-hidden":!0,children:[w.map((H,A)=>m.jsx("div",{ref:D(A),className:"inline-flex shrink-0",children:m.jsx(Po,{tag:H,className:h,remove:!l&&!d?()=>q(A):void 0})},`measure-${H}-${A}`)),m.jsx("div",{ref:C,className:"inline-flex shrink-0",children:m.jsx(Po,{tag:`+${w.length}`})})]})]});return d?z:m.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[m.jsx(Ki,{label:t,required:s,htmlFor:i}),m.jsx("div",{className:pe("dial-input min-h-[38px] p-[6px]",a&&"dial-input-error",l&&"dial-input-disable"),children:z}),L()]})},gw=({selectedItems:e,placeholder:t,collapseTagOverflow:s=!1,listClassName:i,listElementClassName:o})=>e?.length?m.jsx(pw,{readOnly:!0,initialTags:e,collapseTagOverflow:s,containerClassName:i,tagClassName:o}):t?m.jsx("span",{className:"text-secondary",children:t}):null,ld=e=>Se.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Se.createElement("path",{d:"M2.25 13.5V12C2.25 11.5858 2.58579 11.25 3 11.25C3.41421 11.25 3.75 11.5858 3.75 12V13.5C3.75 13.6989 3.82907 13.8896 3.96973 14.0303C4.11038 14.1709 4.30109 14.25 4.5 14.25H6C6.41421 14.25 6.75 14.5858 6.75 15C6.75 15.4142 6.41421 15.75 6 15.75H4.5C3.90326 15.75 3.33114 15.5128 2.90918 15.0908C2.48722 14.6689 2.25 14.0967 2.25 13.5ZM14.25 6V4.5C14.25 4.30109 14.1709 4.11038 14.0303 3.96973C13.8896 3.82907 13.6989 3.75 13.5 3.75H12C11.5858 3.75 11.25 3.41421 11.25 3C11.25 2.58579 11.5858 2.25 12 2.25H13.5C14.0967 2.25 14.6689 2.48722 15.0908 2.90918C15.5128 3.33114 15.75 3.90326 15.75 4.5V6C15.75 6.41421 15.4142 6.75 15 6.75C14.5858 6.75 14.25 6.41421 14.25 6Z",fill:"currentColor"})),fw=({children:e,open:t,disabled:s=!1,selectedValue:i,valueClassName:o,inputClassName:n,onOpen:r,elementId:a,errorText:l,invalid:c,emptyValueText:d,placeholder:u,editable:h=!1,onValueChange:p,collapseTagOverflow:f=!1,iconBefore:v})=>{const C=Array.isArray(i)&&i.length>0,w=typeof i=="string"&&!!i.trim(),b=C||w?i:u?void 0:d,x=s?void 0:r,y=g.useCallback(E=>{p?.(E.target.value)},[p]),S=()=>m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:pe("dial-input px-3 py-2 dial-input-field flex flex-row items-center gap-x-2 w-full justify-between",n,s&&"dial-input-disable",(l||c)&&"dial-input-error"),children:[v&&m.jsx(Be,{icon:v}),m.jsx("input",{type:"text",className:pe("flex-1 min-w-0 bg-transparent outline-none border-none p-0 dial-small-text text-primary placeholder:text-secondary",o),value:typeof i=="string"?i:"",placeholder:u||d,onChange:y,disabled:s,id:a,"aria-label":"input-popup-field"}),!s&&m.jsx("button",{type:"button",className:"flex-shrink-0 cursor-pointer bg-transparent border-none p-0 ml-1",onClick:r,"aria-label":"open-popup",children:m.jsx(Be,{icon:m.jsx(ld,{role:"img",width:Gt,height:Gt})})})]}),m.jsx(cs,{text:l})]}),F=()=>m.jsxs(m.Fragment,{children:[m.jsx("button",{type:"button",className:"w-full",onClick:x,"aria-label":"open-popup",id:a,children:m.jsxs("div",{className:pe("dial-input px-3 py-2 dial-input-field flex flex-row items-center gap-x-2 w-full justify-between cursor-pointer",n,s&&"dial-input-disable",(l||c)&&"dial-input-error"),children:[v&&m.jsx(Be,{icon:v}),m.jsx(Lt,{tooltip:b==null?void 0:String(b),children:b||!u?m.jsx("span",{className:o,children:b}):m.jsx("span",{className:"text-secondary",children:u})}),!s&&m.jsx("div",{className:"flex-shrink-0",children:m.jsx(Be,{icon:m.jsx(ld,{role:"img",width:Gt,height:Gt})})})]})}),m.jsx(cs,{text:l})]}),R=()=>m.jsx("div",{className:"w-full",onClick:x,children:m.jsxs("div",{className:pe("dial-input px-3 py-2 flex flex-row items-center gap-x-2 w-full justify-between cursor-pointer",s&&"dial-input-disable"),children:[v&&m.jsx(Be,{icon:v}),m.jsx(gw,{placeholder:u,selectedItems:b,collapseTagOverflow:f}),!s&&m.jsx("div",{className:"ml-1",children:m.jsx(Be,{icon:m.jsx(ld,{role:"img",width:Gt,height:Gt})})})]})});return m.jsxs(m.Fragment,{children:[C?R():h?S():F(),t&&tn.createPortal(e,document.body)]})},TL=({label:e,htmlFor:t,disabled:s,selectedValue:i,radioButtons:o,customInputValue:n,valueClassName:r,inputClassName:a,emptyValueText:l,onClose:c,header:d,portalId:u,onApply:h,onCancel:p,cancelButtonTitle:f="Cancel",applyButtonTitle:v="Apply",isValid:C,selectedRadioValue:w,onChangeRadioField:b,id:x,size:y=_t.Md})=>{const[S,F]=g.useState(!1),R=g.useCallback(()=>{s||F(!0)},[s]),E=g.useCallback(()=>{F(!1),c?.()},[c]),D=g.useCallback(()=>{p?.(),E()},[p,E]),P=g.useCallback(()=>{h(),E()},[h,E]);return m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(Ki,{label:e,htmlFor:t}),m.jsx(fw,{disabled:s,open:S,selectedValue:n??o.find(T=>T.id===i)?.name,valueClassName:r,inputClassName:pe(a,"py-2","px-3"),emptyValueText:l,onOpen:R,children:m.jsx(eo,{open:S,onClose:D,header:d,portalId:u,size:y,footer:m.jsxs("div",{className:"flex flex-row items-center justify-end gap-2 px-6 py-4",children:[m.jsx(Es,{label:f,onClick:D}),m.jsx(Rs,{label:v,onClick:P,disabled:!C})]}),children:m.jsx("div",{className:"px-6 py-4",children:m.jsx(Va,{radioButtons:o,labelClassName:"dial-small-text",activeRadioButton:w,onChange:b,elementId:x,orientation:Hi.Column})})})})]})},kL="Create",ML="Cancel",IL="flex items-center justify-end gap-2 px-6 py-3",AL=({header:e,open:t=!1,submitLabel:s=kL,cancelLabel:i=ML,isLoading:o=!1,disableSubmitButton:n=!1,className:r,submitClassName:a,onClose:l,onSubmit:c,onCancel:d,children:u,dividers:h=!0,size:p=_t.Md,footer:f})=>{const v=o?null:m.jsxs("div",{className:IL,children:[m.jsx(Es,{label:i,onClick:()=>d?d():l?.()}),m.jsx(Rs,{className:a,label:s,disabled:n,onClick:()=>c()})]}),C=g.useCallback(()=>o?m.jsx("div",{className:"px-6 py-4 h-[120px]",children:m.jsx(mr,{size:50})}):u??null,[u,o]);return m.jsx(eo,{open:t,header:e,className:r,dividers:h,onClose:()=>l?.(),footer:f??v,size:p,children:C()})},LL=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Tab","Enter","Escape","Home","End","Insert"],mw=(e,t,s,i)=>{if((t==="number"||s!==void 0||i!==void 0)&&!LL.includes(e.key)&&!(e.ctrlKey||e.metaKey)&&!(e.key==="-"&&(e.currentTarget.selectionStart??0)===0&&!e.currentTarget.value.includes("-"))&&!(e.key==="."&&t==="number"&&!e.currentTarget.value.includes("."))){if(!/^[0-9]$/.test(e.key)){e.preventDefault();return}if(s!==void 0||i!==void 0){const n=e.currentTarget.value,r=e.currentTarget.selectionStart||0,a=n.slice(0,r)+e.key+n.slice(r),l=parseFloat(a);if(!isNaN(l)){if(s!==void 0&&l<+s){e.preventDefault();return}if(i!==void 0&&l>+i){e.preventDefault();return}}}}},OL="bg-layer-4 flex items-center justify-center enabled:text-secondary enabled:hover:text-accent-primary enabled:active:bg-controls-accent-primary-alpha-active enabled:hover:bg-accent-primary-alpha enabled:active:text-accent-primary",NL=({icon:e,onClick:t,disabled:s,size:i=Ft.Standard})=>m.jsx("div",{className:pe("border-l border-tertiary",i===Ft.Standard?"h-[40px] w-[44px]":"h-[24px] w-[32px]"),children:m.jsx(hi,{className:pe(OL,i===Ft.Small&&"p-1"),icon:e,onClick:t,disabled:s,size:i})}),js=({labelProps:e,error:t,caption:s,id:i,containerClassName:o,...n})=>m.jsxs("div",{className:se("flex flex-col gap-y-1",o),children:[e&&m.jsx(Ki,{...e,htmlFor:i}),m.jsx(vw,{id:i,...n}),m.jsx(cs,{text:t}),!t&&m.jsx(fr,{text:s})]}),vw=({invalid:e,disabled:t,prefix:s,className:i,postfix:o,iconBefore:n,iconAfter:r,wrapperClassName:a,type:l,inputRef:c,value:d,tooltipText:u,min:h,onChange:p,max:f,inputButtonProps:v,...C})=>{const w=g.useRef(null),b=Ie.useMergeRefs([c,w]);g.useEffect(()=>{const R=w.current;if(!R)return;const E=D=>{D.preventDefault()};return R.addEventListener("wheel",E,{passive:!1}),()=>{R.removeEventListener("wheel",E)}},[]);const x=l==="number"||h!==void 0||f!==void 0,y=R=>{mw(R,l,h,f)},S=R=>{const E=R.currentTarget.value;if(x&&E!==""){const D=parseFloat(E);if(isNaN(D)&&E!=="-"&&E!=="."||!isNaN(D)&&(h!==void 0&&D<+h||f!==void 0&&D>+f))return}p?.(E||void 0)},F=()=>m.jsxs("div",{className:se("dial-input flex flex-row items-center gap-x-2 justify-between py-2",e&&"dial-input-error",t&&"dial-input-disable",!s&&"pl-3",!v&&"pr-3",a),"aria-label":"input-container",children:[s&&m.jsx("div",{className:"border-r border-tertiary",children:m.jsx(vw,{wrapperClassName:"!rounded-r-none",className:"truncate",value:s,disabled:!0,id:`${s}_textBefore`})}),m.jsx(Be,{icon:n}),m.jsx("input",{ref:b,type:l,autoComplete:l==="password"?"new-password":"off",value:d??"",className:se("border-0 bg-transparent w-full truncate",t&&"cursor-not-allowed",i),onChange:S,onKeyDown:y,min:h,disabled:t,max:f,...C}),o&&m.jsxs("p",{className:"text-secondary dial-small-text",children:[" ",o]}),m.jsx(Be,{icon:r}),v&&m.jsx(NL,{...v,disabled:t})]});return t&&l!=="password"?m.jsx(Lt,{tooltip:u||d,children:F()}):F()},HL=/^0+\.(\d+)?$/,GL=/^0+/,du=({integer:e,onChange:t,min:s,max:i,onKeyDown:o,onPaste:n,...r})=>{const a=d=>!d||d==="-"?d:String(d)?.match(HL)?String(d)?.replace(GL,"0"):Number(d),l=d=>{if([".","-","+","e","E"].includes(d.key)){d.preventDefault();return}mw(d,"number",s,i)},c=d=>{const u=d.clipboardData.getData("text"),h=u.replace(/\D/g,"");if(h!==u&&(d.preventDefault(),h)){const p=d.currentTarget,f=p.selectionStart??0,v=p.selectionEnd??0,C=p.value.slice(0,f)+h+p.value.slice(v);t?.(a(C))}};return m.jsx(js,{type:"number",min:s,max:i,onChange:d=>t?.(a(d)),onKeyDown:e?l:o,onPaste:e?c:n,...r})},BL=({onClick:e})=>m.jsx(B.IconEyeOff,{...J,className:"text-primary",onClick:e,role:"button","aria-label":"hide"}),VL=({onClick:e})=>m.jsx(B.IconEye,{...J,className:"text-primary",onClick:e,role:"button","aria-label":"show"}),zL=({...e})=>{const[t,s]=g.useState(!1),i=g.useCallback(o=>{s(o)},[]);return m.jsx(js,{type:t?"text":"password",...e,iconAfter:e.disabled?null:t?m.jsx(BL,{onClick:()=>i(!1)}):m.jsx(VL,{onClick:()=>i(!0)})})},WL={[Ft.Small]:{className:"dial-tiny-text",wrapperClassName:"pl-2 py-0",containerClassName:"h-[24px]",iconSize:16,iconStroke:1},[Ft.Standard]:{className:"dial-small-text",wrapperClassName:"",containerClassName:"",iconSize:20,iconStroke:1.5}},Sh=({size:e=Ft.Standard,placeholder:t="Search...",value:s,onChange:i,...o})=>{const[n,r]=g.useState(s||"");g.useEffect(()=>{r(s||"")},[s]);const a=g.useCallback(u=>{r(u||""),i?.(u||"")},[i]),l=WL[e],c=g.useCallback(()=>{a("")},[a]),d=g.useMemo(()=>{if(n)return{icon:m.jsx(B.IconX,{size:l.iconSize,"aria-label":"Clear search",role:"button"}),onClick:c,size:e}},[c,n,e,l.iconSize]);return m.jsx(js,{placeholder:t,iconBefore:m.jsx(B.IconSearch,{size:l.iconSize,stroke:l.iconStroke}),value:n,onChange:a,inputButtonProps:d,containerClassName:l.containerClassName,className:l.className,wrapperClassName:l.wrapperClassName,...o})},jL="dial-input flex w-full items-center justify-between gap-2 dial-small-text cursor-pointer",_L="w-full rounded flex flex-col",cd="flex w-full items-center justify-between gap-2 px-3 h-[34px] dial-small-text text-primary truncate hover:bg-accent-primary-alpha focus:bg-accent-primary-alpha focus:outline-none",UL="bg-accent-primary-alpha",$L="bg-accent-primary-alpha border-l border-accent-primary border-1",_g="opacity-75",qL=352,KL=m.jsx(B.IconChevronDown,{size:Ct.SM}),Cw=({options:e,selectedValues:t,handleRemoveTag:s})=>m.jsx("div",{className:"flex flex-wrap w-full items-center gap-1",children:t.map(i=>{const o=e.find(r=>r.value===i)?.label??i,n=e.find(r=>r.value===i)?.icon;return m.jsx(Po,{tag:o,remove:r=>s?.(r,i),iconBefore:n?m.jsx(Be,{icon:n}):null,className:"max-w-full"},i)})});var gl=(e=>(e.Sm="sm",e.Md="md",e))(gl||{}),fl=(e=>(e.Primary="Primary",e.Secondary="Secondary",e))(fl||{});const $i=({options:e,multiple:t=!1,elementId:s,value:i,defaultValue:o,variant:n=fl.Primary,size:r=gl.Md,prefix:a,customSelectedValue:l,placeholder:c="Select...",searchable:d=!1,searchPlaceholder:u,selectAll:h=!1,invalid:p,selectAllLabel:f="Select all",emptyStateTitle:v="No options available",emptyStateDescription:C,emptyStateIcon:w,disabled:b=!1,className:x,listClassName:y,closable:S=!1,header:F,footer:R,onClose:E,onChange:D,inlineSearch:P=!1,dismissRef:T,onFooterClick:M,open:N,onOpenChange:q,onInlineQueryChange:L,customMultiSelectTagsRenderer:z})=>{const H=g.useId(),[A,de]=g.useState(!1),k=N!==void 0,V=k?!!N:A,U=g.useCallback(K=>{k||de(K),q?.(K)},[k,q]),[W,re]=g.useState(P&&l||""),be=g.useRef(null),Q=g.useCallback(K=>{K!==W&&(re(K||""),L?.(K||""))},[L,W]),j=i!==void 0,[ge,oe]=g.useState(o),Z=j?i:ge,_=g.useMemo(()=>t?Array.isArray(Z)?Z:[]:typeof Z=="string"?[Z]:[],[Z,t]),ae=g.useMemo(()=>{const K=W.trim().toLowerCase();return K?e.filter(He=>He.label.toLowerCase().includes(K)):e},[e,W]);g.useEffect(()=>{!V&&!P&&Q("")},[P,V,Q]),g.useEffect(()=>{P&&!V&&l&&Q(l||"")},[l,P,V,Q]);const G=g.useCallback(K=>{j||oe(K),D?.(K)},[j,D]),fe=g.useCallback(K=>{if(t){const He=new Set(_);He.has(K)?He.delete(K):He.add(K),G(Array.from(He));return}if(G(K),P){const He=e.find(ns=>ns.value===K);He&&(Q(He.label),L?.(He.label))}U(!1)},[t,G,P,U,_,e,Q,L]),he=g.useCallback((K,He)=>{if(K.stopPropagation(),!t){G("");return}const ns=_.filter(hn=>hn!==He);G(ns)},[t,_,G]),ie=g.useMemo(()=>ae.filter(K=>!K.disabled),[ae]),le=g.useMemo(()=>ie.filter(K=>_.includes(K.value)).length,[ie,_]),Fe=K=>{P&&!t&&!K&&fe(W),U(K)},Oe=ie.length>0&&le===ie.length,Ce=le>0&&!Oe,Ee=()=>{if(!(!t||ie.length===0))if(Oe){const K=new Set(ie.map(ns=>ns.value)),He=_.filter(ns=>!K.has(ns));G(He)}else{const K=new Set(_);ie.forEach(He=>K.add(He.value)),G(Array.from(K))}},_e=_.length>0;g.useEffect(()=>{V&&P&&!t&&!b&&requestAnimationFrame(()=>{const K=be.current;if(!K)return;K.focus();const He=K.value?.length??0;K.setSelectionRange?.(He,He)})},[V,P,t,b]);const Ue=!t&&_e?_[0]:void 0,Ae=g.useMemo(()=>Ue?e.find(K=>K.value===Ue):void 0,[e,Ue]),kt=g.useCallback(()=>!t||_.length===0?null:m.jsx(Cw,{options:e,selectedValues:_,handleRemoveTag:he}),[t,e,_,he]),os=g.useCallback(()=>t?_e?z?.(e,_,he)||kt():m.jsx("span",{className:"text-secondary truncate",children:c}):Ae?m.jsxs(m.Fragment,{children:[Ae.icon&&m.jsx(Be,{icon:Ae.icon}),m.jsx(mt,{text:a?`${a} ${Ae.label}`:Ae.label}),Ae?.description&&m.jsx("div",{className:"text-secondary dial-small-text",children:Ae.description})]}):l&&i?l:m.jsx("span",{className:"text-secondary truncate",children:c}),[_e,t,l,a,i,c,kt,Ae,e,_,he,z]);g.useImperativeHandle(T,()=>({dismiss:()=>{U(!1)}}));const Mt=g.useCallback(()=>{Q(_.length===1?Ae?.label??W:"")},[W,_.length,Q,Ae?.label]),Ge=g.useCallback(()=>{b||(U(!V),P&&!t&&(Mt(),be.current?.focus()))},[b,P,V,t,Mt,U]);return m.jsx(Tt,{open:V,onOpenChange:Fe,disabled:b,closable:S,onClose:E,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],maxDropdownHeight:d?null:qL,listClassName:y,renderOverlay:()=>m.jsxs("div",{id:`list-${s||H}`,role:"listbox","aria-multiselectable":t||void 0,className:_L,children:[F&&m.jsx(m.Fragment,{children:typeof F=="function"?F():F}),(d||S)&&e.length>8&&m.jsxs("div",{className:"flex items-center gap-2 px-2 pt-2",children:[d&&m.jsx(Sh,{placeholder:u,onChange:Q,value:W,id:`search-${s||H}`,containerClassName:"w-full"}),S&&m.jsx(is,{"aria-label":"Close select",className:"shrink-0",iconBefore:m.jsx(B.IconX,{size:Ct.SM}),onClick:K=>{E?.(K),U(!1)}})]}),t&&h&&ie.length>0&&m.jsx("div",{className:pe(cd,"mt-2"),children:m.jsx(Rd,{id:`${s||H}-selectAll`,label:f,checked:Oe,indeterminate:Ce,onChange:Ee,ariaLabel:f})}),m.jsx("div",{className:pe("overflow-y-auto max-h-[352px]",P&&ae.length===0?"":"py-1"),children:ae.length===0?!P&&m.jsx("div",{className:"px-2 py-3",children:m.jsx(vr,{icon:w??m.jsx(B.IconClipboardX,{size:Ct.LG,stroke:.5}),title:v,description:C})}):ae.map(K=>{const He=_.includes(K.value);return t?m.jsxs("div",{role:"option","aria-selected":He,"aria-disabled":!!K.disabled,className:pe(cd,He&&UL,K.disabled&&_g,"w-full"),children:[m.jsx(Rd,{id:`${s||H}-${K.value}`,label:m.jsxs("span",{className:"flex w-full flex-1 pl-2 min-w-0 items-center gap-2 text-primary",children:[K.icon&&m.jsx(Be,{icon:K.icon}),m.jsx("span",{className:"truncate",children:K.label})]}),checked:He,disabled:K.disabled,onChange:()=>!K.disabled&&fe(K.value),ariaLabel:K.label}),K.description&&m.jsx("div",{className:"text-secondary dial-small-text",children:K.description})]},K.value):m.jsx("button",{role:"option",type:"button","aria-selected":He,"aria-disabled":!!K.disabled,disabled:K.disabled,className:pe(cd,He&&$L,K.disabled&&_g),onClick:()=>!K.disabled&&fe(K.value),children:m.jsxs("div",{className:"flex items-center gap-2 w-full",children:[K.icon&&m.jsx(Be,{icon:K.icon}),m.jsx(mt,{text:K.label}),K.description&&m.jsx("div",{className:"text-secondary dial-small-text",children:K.description})]})},K.value)})}),R&&m.jsx("div",{onClick:K=>{M?.(K),M&&U(!1)},children:typeof R=="function"?R():R})]}),children:m.jsxs("div",{role:"button",tabIndex:0,"aria-roledescription":"button to open select list","aria-haspopup":"listbox","aria-expanded":V,"aria-controls":`list-${s||H}`,className:se(jL,b&&"opacity-75 !cursor-not-allowed",r===gl.Sm?"min-h-[25px] px-1.5 py-1":"min-h-[38px] px-3 py-2",p&&"dial-input-error",n===fl.Secondary?"!bg-layer-4 !h-auto":"",x),onMouseDown:K=>{b||P&&!t&&(Mt(),K.preventDefault())},onClick:()=>{Ge()},onKeyDown:K=>{(K.key===" "||K.code==="Space")&&(K.preventDefault(),Ge())},children:[P&&!t?m.jsx("div",{className:"flex min-w-0 items-center gap-2 text-primary flex-1",children:m.jsx("input",{id:`inline-${s||H}`,type:"text",placeholder:u??c,value:W||"",onChange:K=>Q(K.currentTarget.value.trimStart()),onFocus:()=>!b&&U(!0),onMouseDown:K=>{Mt(),K.stopPropagation()},onClick:K=>{K.stopPropagation()},onKeyDown:K=>{K.stopPropagation()},className:"bg-transparent outline-none w-full dial-small-text",ref:be,disabled:b,"aria-disabled":b,autoComplete:"off"})}):m.jsx("div",{className:"flex w-full min-w-0 items-center gap-2 text-primary",children:os()}),!P&&m.jsx(Be,{icon:KL,className:pe("text-primary",V&&"rotate-180")})]})})},YL=({label:e,required:t,captionDescription:s,containerClassName:i,selectClassName:o,error:n,id:r,caption:a,readonly:l,value:c,defaultEmptyText:d,...u})=>{const h=g.useCallback(()=>{if(!c||Array.isArray(c)&&c.length===0)return d??"None";if(Array.isArray(c))return m.jsx(Cw,{options:u.options,selectedValues:c});{const p=u.options?.find(f=>f.value===c);return m.jsx("span",{"aria-readonly":!0,className:"text-primary",children:p?.label||c})}},[c,u.options,d]);return m.jsx(vl,{id:r,label:e,required:t,description:a,error:n,captionDescription:s,className:i,readonly:l,value:h(),defaultEmptyText:d,children:m.jsx($i,{className:o,value:c,elementId:r,invalid:!!n,...u})})};function ww(e){let t=null;return()=>(t==null&&(t=e()),t)}function XL(e,t){return e.filter(s=>s!==t)}function ZL(e,t){const s=new Set,i=n=>s.add(n);e.forEach(i),t.forEach(i);const o=[];return s.forEach(n=>o.push(n)),o}class QL{enter(t){const s=this.entered.length,i=o=>this.isNodeInDocument(o)&&(!o.contains||o.contains(t));return this.entered=ZL(this.entered.filter(i),[t]),s===0&&this.entered.length>0}leave(t){const s=this.entered.length;return this.entered=XL(this.entered.filter(this.isNodeInDocument),t),s>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class JL{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const s={};Object.keys(this.config.exposeProperties).forEach(i=>{const o=this.config.exposeProperties[i];o!=null&&(s[i]={value:o(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,s)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,s){return s===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const Rh="__NATIVE_FILE__",bw="__NATIVE_URL__",xw="__NATIVE_TEXT__",yw="__NATIVE_HTML__",Ug=Object.freeze(Object.defineProperty({__proto__:null,FILE:Rh,HTML:yw,TEXT:xw,URL:bw},Symbol.toStringTag,{value:"Module"}));function dd(e,t,s){const i=t.reduce((o,n)=>o||e.getData(n),"");return i??s}const uu={[Rh]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[yw]:{exposeProperties:{html:(e,t)=>dd(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[bw]:{exposeProperties:{urls:(e,t)=>dd(e,t,"").split(`
|
|
66
|
+
`,AI=class extends a4{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:s}=e;this.suppressQuotes=t,this.columnSeparator=s}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,Mg),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((s,i)=>{i!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(s.data.value||""),s.mergeAcross&&this.appendEmptyCells(s.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,s,i){s!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(i)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,s){t!=0&&(this.result+=this.columnSeparator);const i=this.extractRowCellValue(e,t,t,"csv",s);this.result+=this.putInQuotes(i.valueFormatted??i.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():($(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=Mg),this.isFirstLine=!1}},LI=class extends r4{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){$(51);return}const t=this.getMergedParams(e),s=this.getData(t),i=new Blob(["\uFEFF",s],{type:"text/plain"}),o=typeof t.fileName=="function"?t.fileName(xe(this.gos,{})):t.fileName;l4(this.getFileName(o),i)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const s=t?Object.assign({},e):this.getMergedParams(e);return this.getData(s)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:s,rowGroupColsSvc:i,valueSvc:o,gos:n}=this,{processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c,suppressQuotes:d,columnSeparator:u}=e;return new AI({colModel:t,colNames:s,valueSvc:o,gos:n,processCellCallback:r||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:c||void 0,suppressQuotes:d||!1,columnSeparator:u||",",rowGroupColsSvc:i})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function OI(e,t){return e.csvCreator?.getDataAsCsv(t)}function NI(e,t){e.csvCreator?.exportDataAsCsv(t)}var HI={moduleName:"CsvExport",version:ee,beans:[LI],apiFunctions:{getDataAsCsv:OI,exportDataAsCsv:NI},dependsOn:[II]},GI=class extends O{constructor(e,t,s){super(),this.id=e,this.parentCache=t,this.params=s,this.state="needsLoading",this.version=0,this.startRow=e*s.blockSize,this.endRow=this.startRow+s.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,s){this.successCommon(e,{rowData:t,rowCount:s})}isRequestMostRecentAndLive(e){const t=e===this.version,s=this.isAlive();return t&&s}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:s,beans:i,rowNodes:o}=this;for(let n=0;n<e;n++){const r=s+n,a=new ui(i);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(r),a.setRowTop(t*r),o.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:s,state:i}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:s,pageStatus:i}}}setDataAndId(e,t,s){te(t)?e.setDataAndId(t,s.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(Ze(this.params.datasource.getRows)){$(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:s,params:{sortModel:i,filterModel:o},gos:n}=this;return{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,s),failCallback:this.pageLoadFailed.bind(this,s),sortModel:i,filterModel:o,context:xe(n,{}).context}}forEachNode(e,t,s){this.rowNodes.forEach((i,o)=>{this.startRow+o<s&&e(i,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const s=e-this.startRow;return this.rowNodes[s]}processServerResult(e){const{rowNodes:t,beans:s}=this;t.forEach((o,n)=>{const r=e.rowData?e.rowData[n]:void 0;!o.id&&o.alreadyRendered&&r&&(t[n]=new ui(s),t[n].setRowIndex(o.rowIndex),t[n].setRowTop(o.rowTop),t[n].setRowHeight(o.rowHeight),o.clearRowTopAndRowIndex()),this.setDataAndId(t[n],r,this.startRow+n)});const i=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,i)}destroy(){for(const e of this.rowNodes)e.clearRowTopAndRowIndex();super.destroy()}},BI=2,VI=class extends O{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const s=Math.floor(e/this.params.blockSize);let i=this.blocks[s];if(!i){if(t)return;i=this.createBlock(s)}return i.getRow(e)}createBlock(e){const t=this.params,s=this.createBean(new GI(e,this,t));return this.blocks[s.id]=s,this.blockCount++,this.purgeBlocksIfNeeded(s),t.rowNodeBlockLoader.addBlock(s),s}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(zi(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(r=>r!=e),s=(r,a)=>a.lastAccessed-r.lastAccessed;t.sort(s);const i=this.params.maxBlocksInCache>0,o=i?this.params.maxBlocksInCache-1:null,n=BI-1;t.forEach((r,a)=>{const l=r.state==="needsLoading"&&a>=n,c=i?a>=o:!1;if(l||c){if(this.isBlockCurrentlyDisplayed(r)||this.isBlockFocused(r))return;this.removeBlockFromCache(r)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:s,endRow:i}=e;return t.rowIndex>=s&&t.rowIndex<i}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:s}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,s-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:s,overflowSize:i}=this.params,n=(e.id+1)*s+i;this.rowCount<n&&(this.rowCount=n)}}setRowCount(e,t){this.rowCount=e,te(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const s of this.getBlocksInOrder())s.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(s,i)=>s.id-i.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const s=[];let i=-1,o=!1;const n={value:0};let r=!1;for(const l of this.getBlocksInOrder())if(!r){if(o&&i+1!==l.id){r=!0;continue}i=l.id,l.forEachNode(c=>{const d=c===e||c===t;(o||d)&&s.push(c),d&&(o=!o)},n,this.rowCount)}return r||o?[]:s}},zI=class extends O{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new ui(e);this.rootNode=t,t.level=-1,this.rowHeight=Ai(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=Ai(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;this.cacheParams?e=!tr(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){if(!this.datasource)return;qo(this.gos)!=null||this.beans.selectionSvc?.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:s,rowNodeBlockLoader:i,eventSvc:o,gos:n}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:s?.getSortModel()??[],rowNodeBlockLoader:i,initialRowCount:n.get("infiniteInitialRowCount"),maxBlocksInCache:n.get("maxBlocksInCache"),rowHeight:Ai(e),overflowSize:n.get("cacheOverflowSize"),blockSize:n.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new VI(this.cacheParams)),o.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(s=>{s.id===e&&(t=s)}),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),s=this.getRowCount()-1;return t>s?s:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(e,t){this.infiniteCache?.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function WI(e){Il(e)?.refreshCache()}function jI(e){Il(e)?.purgeCache()}function _I(e){return Il(e)?.getRowCount()}var UI=class extends O{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=Yy(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=ht(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){us(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){zi(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(s=>s.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const s of t)s.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:s,state:i}=t.getBlockStateJson();e[s]=i}),e}printCacheStatus(){zi(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},$I={moduleName:"InfiniteRowModelCore",version:ee,rowModels:["infinite"],beans:[zI,UI]},qI={moduleName:"InfiniteRowModel",version:ee,apiFunctions:{refreshInfiniteCache:WI,purgeInfiniteCache:jI,getInfiniteRowCount:_I},dependsOn:[$I,nI]},KI="↑",YI="↓",XI={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},ZI=class extends tt{constructor(){super(XI),this.eValue=we,this.eDelta=we,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const s=Math.abs(t),i=e.formatValue(s),o=te(i)?i:s,n=t>=0,r=this.eDelta;n?r.textContent=KI+o:r.textContent=YI+o,r.classList.toggle("ag-value-change-delta-up",n),r.classList.toggle("ag-value-change-delta-down",!n)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),Ot(this.eDelta)}refresh(e,t=!1){const{value:s,valueFormatted:i}=e,{eValue:o,lastValue:n,beans:r}=this;if(s===n||(te(i)?o.textContent=i:te(s)?o.textContent=s:Ot(o),r.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=s&&typeof s=="object"&&"toNumber"in s?s.toNumber():s,l=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return n&&o.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=s,!0}},QI=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",JI={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},e6=class extends tt{constructor(){super(JI),this.eCurrent=we,this.refreshCount=0,this.registerCSS(QI)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:s}=this,i=Pt({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=i,i.textContent=s.textContent,this.getGui().insertBefore(i,s),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.ePrevious?.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let s=e.value;if(Ze(s)&&(s=""),s===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=s;const i=this.eCurrent;return te(e.valueFormatted)?i.textContent=e.valueFormatted:te(e.value)?i.textContent=s:Ot(i),!0}},t6=class extends O{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,s=this.beans.gos.get("cellFlashDuration"),i=this.beans.gos.get("cellFadeDuration")){const o=this.animations[t];o.delete(e);const n=Date.now(),r=n+s,a=n+s+i,l={phase:"flash",flashEndTime:r,fadeEndTime:a};o.set(e,l);const c=`ag-cell-${t}`,d=`${c}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(c,!0),u.toggleCss(d,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),s)}),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const s of Object.keys(this.animations)){const i=this.animations[s],o=`ag-cell-${s}`,n=`${o}-animation`;for(const[r,a]of i){if(!r.isAlive()||!r.comp){i.delete(r);continue}const{phase:l,flashEndTime:c,fadeEndTime:d}=a,u=l==="flash"?c:d;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:p,eGui:{style:f}}=r;switch(l){case"flash":p.toggleCss(o,!1),p.toggleCss(n,!0),f.transition=`background-color ${d-c}ms`,f.transitionDelay=`${c-e}ms`,t=Math.min(d,t??1/0),a.phase="fade";break;case"fade":p.toggleCss(o,!1),p.toggleCss(n,!1),f.removeProperty("transition"),f.removeProperty("transition-delay"),i.delete(r);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const s=$E(e.cellPosition);t.cells[s]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t?.flashDuration,t?.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function s6(e,t={}){const{cellFlashSvc:s}=e;s&&e.frameworkOverrides.wrapIncoming(()=>{for(const i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))s.flashCell(i,t)})}var i6={moduleName:"HighlightChanges",version:ee,beans:[t6],userComponents:{agAnimateShowChangeCellRenderer:ZI,agAnimateSlideCellRenderer:e6},apiFunctions:{flashCells:s6}};function o6(e){return e.stateSvc?.getState()??{}}function n6(e,t,s){return e.stateSvc?.setState(t,s)}function Ig(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=r6(e)),e.version=ee,e}function r6(e){return e.cellSelection=a6(e,"rangeSelection"),e}function a6(e,t){if(e&&typeof e=="object")return e[t]}var l6=class extends O{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=ht(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=ht(this,()=>{this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(this.updateCachedState("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowGroupExpansion",void 0)):(this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("ssrmRowGroupExpansion",void 0))},0),this.onRowSelectedDebounced=ht(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:s}=this.beans;this.isClientSideRowModel=st(e);const i=Ig(e.get("initialState")??{}),o=i.partialColumnState;delete i.partialColumnState,this.cachedState=i;const n=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>n(()=>this.setupStateOnGridReady(i))),(i.columnOrder||i.columnVisibility||i.columnSizing||i.columnPinning||i.columnGroup)&&s?.hideColumns("columnState");const[r,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:c})=>{c==="gridInitializing"&&(r(),n(()=>{this.setupStateOnColumnsInitialised(i,!!o),s?.revealColumns("columnState")}))},rowCountReady:()=>{a?.(),n(()=>this.setupStateOnRowCountReady(i))},firstDataRendered:()=>{l?.(),n(()=>this.setupStateOnFirstDataRendered(i))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const s=Ig(e);delete s.partialColumnState,this.cachedState=s,this.startSuppressEvents();const i="api",o=t?new Set(t):void 0;this.setGridReadyState(s,i,o),this.setColumnsInitialisedState(s,i,!!o,o),this.setRowCountState(s,i,o),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(s,i,o),this.stopSuppressEvents(i)})}setGridReadyState(e,t,s){t==="api"&&!s?.has("sideBar")&&this.beans.sideBar?.comp?.setState(e.sideBar),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,s,i){this.setColumnState(e,t,s,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const s=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:s("aggregation"),columnMoved:s("columnOrder"),columnPinned:s("columnPinning"),columnResized:s("columnSizing"),columnVisible:s("columnVisibility"),columnPivotChanged:s("pivot"),columnPivotModeChanged:s("pivot"),columnRowGroupChanged:s("rowGroup"),sortChanged:s("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,s){const{filter:i,rowGroupExpansion:o,ssrmRowGroupExpansion:n,rowSelection:r,pagination:a}=e,l=(d,u)=>!s?.has(d)&&(u||t==="api");l("filter",i)&&this.setFilterState(i),l("rowGroupExpansion",o)&&this.setRowGroupExpansionState(n,o,t),l("rowSelection",r)&&this.setRowSelectionState(r,t),l("pagination",a)&&this.setPaginationState(a,t);const c=this.updateCachedState.bind(this);c("filter",this.getFilterState()),this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(c("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),c("rowGroupExpansion",void 0)):(c("rowGroupExpansion",this.getRowGroupExpansionState()),c("ssrmRowGroupExpansion",void 0)),c("rowSelection",this.getRowSelectionState()),c("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),s=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(t("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),t("rowGroupExpansion",void 0)):(t("rowGroupExpansion",this.getRowGroupExpansionState()),t("ssrmRowGroupExpansion",void 0))},i=()=>t("filter",this.getFilterState()),{gos:o,colFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:i,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:s,columnRowGroupChanged:s,rowDataUpdated:()=>{(o.get("groupDefaultExpanded")!==0||o.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(s)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&t("pagination",this.getPaginationState())}}),n&&this.addManagedListeners(n,{filterStateChanged:i})}setFirstDataRenderedState(e,t,s){const{scroll:i,cellSelection:o,focusedCell:n,columnOrder:r,rowPinning:a}=e,l=(u,h)=>!s?.has(u)&&(h||t==="api");l("focusedCell",n)&&this.setFocusedCellState(n),l("cellSelection",o)&&this.setCellSelectionState(o),l("scroll",i)&&this.setScrollState(i),l("rowPinning",a)&&this.setRowPinningState(a),this.setColumnPivotState(!!r?.orderedColIds,t);const c=this.updateCachedState.bind(this);c("sideBar",this.getSideBarState()),c("focusedCell",this.getFocusedCellState());const d=this.getRangeSelectionState();c("rangeSelection",d),c("cellSelection",d),c("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),s=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:s,cellFocusCleared:s,cellSelectionChanged:i=>{if(i.finished){const o=this.getRangeSelectionState();t("rangeSelection",o),t("cellSelection",o)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return s4(el(e),e.colModel.isPivotMode())}setColumnState(e,t,s,i){const{sort:o,rowGroup:n,aggregation:r,pivot:a,columnPinning:l,columnVisibility:c,columnSizing:d,columnOrder:u}=e;let h=!1;const p=(T,M)=>{const N=!i?.has(T)&&!!(M||t==="api");return h||(h=N),N},f={},v=T=>{let M=f[T];return M||(M={colId:T},f[T]=M,M)},C={},w=p("sort",o);w&&o?.sortModel.forEach(({colId:T,sort:M},N)=>{const q=v(T);q.sort=M,q.sortIndex=N}),(w||!s)&&(C.sort=null,C.sortIndex=null);const b=p("rowGroup",n);b&&n?.groupColIds.forEach((T,M)=>{const N=v(T);N.rowGroup=!0,N.rowGroupIndex=M}),(b||!s)&&(C.rowGroup=null,C.rowGroupIndex=null);const x=p("aggregation",r);x&&r?.aggregationModel.forEach(({colId:T,aggFunc:M})=>{v(T).aggFunc=M}),(x||!s)&&(C.aggFunc=null);const y=p("pivot",a);y&&(a?.pivotColIds.forEach((T,M)=>{const N=v(T);N.pivot=!0,N.pivotIndex=M}),this.gos.updateGridOptions({options:{pivotMode:!!a?.pivotMode},source:t})),(y||!s)&&(C.pivot=null,C.pivotIndex=null);const S=p("columnPinning",l);if(S){for(const T of l?.leftColIds??[])v(T).pinned="left";for(const T of l?.rightColIds??[])v(T).pinned="right"}(S||!s)&&(C.pinned=null);const F=p("columnVisibility",c);if(F)for(const T of c?.hiddenColIds??[])v(T).hide=!0;(F||!s)&&(C.hide=null);const R=p("columnSizing",d);if(R)for(const{colId:T,flex:M,width:N}of d?.columnSizingModel??[]){const q=v(T);q.flex=M??null,q.width=N}(R||!s)&&(C.flex=null);const E=u?.orderedColIds,D=!!E?.length&&!i?.has("columnOrder"),P=D?E.map(T=>v(T)):Object.values(f);(P.length||h)&&(this.columnStates=P,ds(this.beans,{state:P,applyOrder:D,defaultState:C},t))}setColumnPivotState(e,t){const s=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;this.columnGroupStates=void 0;const o=this.beans,{pivotResultCols:n,colGroupSvc:r}=o;if(n?.isPivotResultColsPresent()){if(s){const a=[];for(const l of s)n.getPivotResultCol(l.colId)&&a.push(l);ds(o,{state:a,applyOrder:e},t)}i&&r?.setColumnGroupState(i,t)}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return i4(t)}setColumnGroupState(e,t,s){const i=this.beans.colGroupSvc;if(!i||s?.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const o=new Set(e.columnGroup?.openColumnGroupIds),r=i.getColumnGroupState().map(({groupId:a})=>{const l=o.has(a);return l&&o.delete(a),{groupId:a,open:l}});for(const a of o)r.push({groupId:a,open:!0});r.length&&(this.columnGroupStates=r),i.setColumnGroupState(r,t)}getFilterState(){const e=this.beans.filterManager;let t=e?.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const s=e?.getFilterState(),i=e?.getAdvFilterModel()??void 0;return t||i||s?{filterModel:t,columnFilterState:s,advancedFilterModel:i}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:s,columnFilterState:i,advancedFilterModel:o}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(s!==void 0||i!==void 0)&&t?.setFilterState(s??null,i??null,"columnFilter"),o!==void 0&&t?.setAdvFilterModel(o??null,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:s,type:i,startRow:o,endRow:n,columns:r,startColumn:a}=t;return{id:s,type:i,startRow:o,endRow:n,colIds:r.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:s,colModel:i,visibleCols:o}=this.beans;if(!ci(t)||!s)return;const n=[];for(const r of e?.cellRanges??[]){const a=[];for(const c of r.colIds){const d=i.getCol(c);d&&a.push(d)}if(!a.length)continue;let l=i.getCol(r.startColId);if(!l){const c=o.allCols,d=new Set(a);l=c.find(u=>d.has(u))}n.push({...r,columns:a,startColumn:l})}s.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:s}=e?.getVScrollPosition()??{top:0};return s||t?{top:s,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:s}=e??{top:0,left:0},{frameworkOverrides:i,rowRenderer:o,animationFrameSvc:n,ctrlsSvc:r}=this.beans;i.wrapIncoming(()=>{r.get("center").setCenterViewportScrollLeft(s),r.getScrollFeature()?.setVerticalScrollPosition(t),o.redraw({afterScroll:!0}),n?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:s,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:s,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:s}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:i,rowIndex:o,rowPinned:n}=e;t.setFocusedCell({column:s.getCol(i),rowIndex:o,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const s=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!s&&!i))return{page:s,pageSize:i}}setPaginationState(e,t){const{pagination:s,gos:i}=this.beans;if(!s)return;const{pageSize:o,page:n}=e??{page:0,pageSize:i.get("paginationPageSize")},r=t==="gridInitializing";o&&!i.get("paginationAutoPageSize")&&s.setPageSize(o,r?"initialState":"pageSizeSelector"),typeof n=="number"&&(r?s.setPage(n):s.goToPage(n))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e,t){this.beans.selectionSvc?.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e}=this.beans;if(e)return e.getExpansionState()}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,s){const i=this.beans.expansionSvc;if(!i)return;const o=t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};i.setExpansionState(o,s)}updateColumnState(e){const t=this.getColumnState();let s=!1;const i=this.cachedState;for(const o of Object.keys(t)){const n=t[o];tr(n,i[o])||(s=!0)}this.cachedState={...i,...t},s&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const s=this.cachedState[e];this.setCachedStateValue(e,t),tr(t,s)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){this.suppressEvents=!0,this.beans.colAnimation?.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.beans.colAnimation?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},c6={moduleName:"GridState",version:ee,beans:[l6],apiFunctions:{getState:o6,setState:n6}};function d6(e){return e.rowModel.isLastRowIndexKnown()}function u6(e){return e.pagination?.getPageSize()??100}function h6(e){return e.pagination?.getCurrentPage()??0}function p6(e){return e.pagination?.getTotalPages()??1}function g6(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function f6(e){e.pagination?.goToNextPage()}function m6(e){e.pagination?.goToPreviousPage()}function v6(e){e.pagination?.goToFirstPage()}function C6(e){e.pagination?.goToLastPage()}function w6(e,t){e.pagination?.goToPage(t)}var b6=class extends O{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,s=()=>{const i=Math.max(Ai(t),1),o=Math.floor(e/i);t.pagination.setPageSize(o,"autoCalculated")};this.isBodyRendered?ht(this,s,50)():(s(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},In="paginationPageSizeSelector",x6={tag:"span",cls:"ag-paging-page-size"},y6=class extends tt{constructor(){super(x6),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(In,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){Ot(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(In)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),s=!t||!e.includes(t);if(s){const o=this.gos.exists("paginationPageSize"),n=this.gos.get(In)!==!0;$(94,{pageSizeSet:o,pageSizesSet:n,pageSizeOptions:e,paginationPageSizeOption:t}),n||$(95,{paginationPageSizeOption:t,paginationPageSizeSelector:In}),e.unshift("")}const i=String(s?"":t);this.selectPageSizeComp?(pi(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(i,!0)):this.createPageSizeSelectorComp(e,i),this.hasEmptyOption=s}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const s=this.getLocaleTextFunc(),i=s("pageSizeSelectorLabel","Page Size:"),o=s("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new $u).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(o).setLabel(i).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(In);return!Array.isArray(t)||!t?.length?e:[...t].sort((s,i)=>s-i)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},S6={selector:"AG-PAGE-SIZE-SELECTOR",component:y6},R6=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:var(--ag-pagination-panel-height);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}",F6=class extends CE{constructor(){super(),this.btFirst=we,this.btPrevious=we,this.btNext=we,this.btLast=we,this.lbRecordCount=we,this.lbFirstRowOnPage=we,this.lbLastRowOnPage=we,this.lbCurrent=we,this.lbTotal=we,this.pageSizeComp=we,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(R6)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[S6]);const{btFirst:t,btPrevious:s,btNext:i,btLast:o}=this;this.activateTabIndex([t,s,i,o]),t.insertAdjacentElement("afterbegin",es(e?"last":"first",this.beans)),s.insertAdjacentElement("afterbegin",es(e?"next":"previous",this.beans)),i.insertAdjacentElement("afterbegin",es(e?"previous":"next",this.beans)),o.insertAdjacentElement("afterbegin",es(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(n):NF(this.beans,n),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){const{el:t,fn:s}=e;this.addManagedListeners(t,{click:s,keydown:i=>{(i.key===I.ENTER||i.key===I.SPACE)&&(i.preventDefault(),s())}})}OF(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):n4(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),s=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const i=this.isZeroPagesToDisplay(),o=e===s-1;this.nextButtonDisabled=o||i,this.lastButtonDisabled=!t||i||e===s-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){J0(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),s=this.pagination.getMasterRowCount(),i=e?s:null,o=this.pagination.getCurrentPage(),n=this.pagination.getPageSize();let r,a;this.isZeroPagesToDisplay()?r=a=0:(r=n*o+1,a=r+n-1,e&&a>i&&(a=i));const l=r+n-1,c=!e&&s<l,d=this.formatNumber(r);this.lbFirstRowOnPage.textContent=d;let u;const h=this.getLocaleTextFunc();c?u=h("pageLastRowUnknown","?"):u=this.formatNumber(a),this.lbLastRowOnPage.textContent=u;const f=t>0?o+1:0,v=this.formatNumber(f);this.lbCurrent.textContent=v;let C,w;if(e)C=this.formatNumber(t),w=this.formatNumber(i);else{const b=h("more","more");C=b,w=b}this.lbTotal.textContent=C,this.lbRecordCount.textContent=w,this.announceAriaStatus(d,u,w,v,C)}announceAriaStatus(e,t,s,i,o){const n=this.getLocaleTextFunc(),r=n("page","Page"),a=n("to","to"),l=n("of","of"),c=`${e} ${a} ${t} ${l} ${s}`,d=`${r} ${i} ${l} ${o}`;c!==this.ariaRowStatus&&(this.ariaRowStatus=c,this.ariaAnnounce?.announceValue(c,"paginationRow")),d!==this.ariaPageStatus&&(this.ariaPageStatus=d,this.ariaAnnounce?.announceValue(d,"paginationPage"))}},E6={selector:"AG-PAGINATION",component:F6},D6=class extends O{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return E6}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:s}=this.beans;s?.isEditing()&&(s.isBatchEditing()?s.cleanupEditors():s.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return te(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:te(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:te(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:te(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const s=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}s!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const s=this.pageSize,i=t-1;this.totalPages=Math.floor(i/s)+1,this.adjustCurrentPageIfInvalid();const o=this.currentPage,n=s*o;let r=s*(o+1)-1;if(r>i&&(r=i),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(n),r===i)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(r+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:s}=this,i=e-1;this.totalPages=Math.floor(i/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*s,this.bottomDisplayedRowIndex=t*(s+1)-1,this.bottomDisplayedRowIndex>i&&(this.bottomDisplayedRowIndex=i)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:s=!1,newPageSize:i=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:s,newPageSize:i,keepRenderedRows:t})}},P6={moduleName:"Pagination",version:ee,beans:[D6,b6],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:d6,paginationGetPageSize:u6,paginationGetCurrentPage:h6,paginationGetTotalPages:p6,paginationGetRowCount:g6,paginationGoToNextPage:f6,paginationGoToPreviousPage:m6,paginationGoToFirstPage:v6,paginationGoToLastPage:C6,paginationGoToPage:w6},dependsOn:[Al]};function T6(e,t={}){const s=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(s))}function VC(e,t,s,i,o){t&&(i&&t.parent&&t.parent.level!==-1&&VC(e,t.parent,s,i,o),t.setExpanded(s,void 0,o))}function k6(e,t){return e.rowModel.getRowNode(t)}function M6(e,t,s,i){e.rowRenderer.addRenderedRowListener(t,s,i)}function I6(e){return e.rowRenderer.getRenderedNodes()}function A6(e,t,s){e.rowModel.forEachNode(t,s)}function L6(e){return e.rowRenderer.firstRenderedRow}function O6(e){return e.rowRenderer.lastRenderedRow}function N6(e,t){return e.rowModel.getRow(t)}function H6(e){return e.rowModel.getRowCount()}var G6={moduleName:"RowApi",version:ee,apiFunctions:{redrawRows:T6,setRowNodeExpanded:VC,getRowNode:k6,addRenderedRowListener:M6,getRenderedNodes:I6,forEachNode:A6,getFirstDisplayedRowIndex:L6,getLastDisplayedRowIndex:O6,getDisplayedRowAtIndex:N6,getDisplayedRowCount:H6}},B6={moduleName:"ScrollApi",version:ee,apiFunctions:{getVerticalPixelRange:Zk,getHorizontalPixelRange:Qk,ensureColumnVisible:EC,ensureIndexVisible:DC,ensureNodeVisible:Jk}};function V6(e,t,s){if(!t)return;const i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,o=`aria-${t}`;s===null?i.removeAttribute(o):i.setAttribute(o,s)}function z6(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function W6(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function j6(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function _6(e){e.animationFrameSvc?.flushAllFrames()}function U6(e){return{rowHeight:Ai(e),headerHeight:Sr(e)}}function $6(e,t={}){const s=[];for(const n of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const r=n.getCellRenderer();r!=null&&s.push(lr(r))}if(t.columns?.length)return s;const i=[],o=iu(t.rowNodes);for(const n of e.rowRenderer.getAllRowCtrls()){if(o&&!ou(n.rowNode,o)||!n.isFullWidth())continue;const r=n.getFullWidthCellRenderers();for(let a=0;a<r.length;a++){const l=r[a];l!=null&&i.push(lr(l))}}return[...i,...s]}var q6={moduleName:"RenderApi",version:ee,apiFunctions:{setGridAriaProperty:V6,refreshCells:z6,refreshHeader:W6,isAnimationFrameQueueEmpty:j6,flushAllAnimationFrames:_6,getSizesForCurrentTheme:U6,getCellRendererInstances:$6}};function K6(e,t){typeof t=="number"?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)}function zC({colAutosize:e,visibleCols:t},s,i){Array.isArray(s)?e?.autoSizeCols({colKeys:s,skipHeader:i,source:"api"}):e?.autoSizeCols({...s,colKeys:s.colIds??t.allCols,source:"api"})}function Y6(e,t){t&&typeof t=="object"?zC(e,t):e.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:t})}var X6=class extends O{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let s=!1;const i=t.type;if(i==="fitGridWidth"||i==="fitProvidedWidth")s=!0;else if(i==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const o=e.get("rowData");s=o!=null&&o.length>0&&st(e)}s&&this.beans.colDelayRenderSvc?.hideColumns(i)}}autoSizeCols(e){const{eventSvc:t,visibleCols:s}=this.beans;this.innerAutoSizeCols(e).then(i=>{const o=c=>Ko(t,Array.from(c),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return o(i);const n=Ag(this.beans),r=c=>s.leftCols.some(d=>$n(d,c)),a=c=>s.rightCols.some(d=>$n(d,c)),l=e.colKeys.filter(c=>!qs(c)&&!Gs(c)&&!r(c)&&!a(c));this.sizeColumnsToFit(n,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map(c=>({...c,key:c.colId})),colKeys:l,onlyScaleUp:!0}),o(i)})}innerAutoSizeCols(e){return new Promise((t,s)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,s));const{colKeys:i,skipHeader:o,skipHeaderGroups:n,stopAtGroup:r,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:c=[],source:d="api"}=e,{animationFrameSvc:u,renderStatus:h,colModel:p,autoWidthCalc:f,visibleCols:v}=this.beans;if(u?.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,s)});return}this.timesDelayed=0;const C=new Set;let w=-1;const b=Object.fromEntries(c.map(({colId:S,...F})=>[S,F])),x=o??this.gos.get("skipHeaderOnAutoSize"),y=n??x;for(;w!==0;){w=0;const S=[];for(const F of i){if(!F||dS(F))continue;const R=p.getCol(F);if(!R||C.has(R))continue;const E=f.getPreferredWidthForColumn(R,x);if(E>0){const D=b[R.colId]??{};D.minWidth??(D.minWidth=l),D.maxWidth??(D.maxWidth=a);const P=Z6(R,E,D);R.setActualWidth(P,d),C.add(R),w++}S.push(R)}S.length&&v.refresh(d)}y||this.autoSizeColumnGroupsByColumns(i,d,r),t(C)})}autoSizeColumn(e,t,s){this.autoSizeCols({colKeys:[e],skipHeader:s,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,s){const{colModel:i,ctrlsSvc:o}=this.beans,n=new Set,r=i.getColsForKeys(e);for(const l of r){let c=l.getParent();for(;c&&c!=s;)c.isPadding()||n.add(c),c=c.getParent()}let a;for(const l of n){for(const c of o.getHeaderRowContainerCtrls())if(a=c.getHeaderCtrlForColumn(l),a)break;a?.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const s=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.autoSizeColumn(t,"uiColumnResized",s)};e.addEventListener("dblclick",i);const o=new Si(e);return o.addEventListener("doubleTap",i),()=>{e.removeEventListener("dblclick",i),o.destroy()}}addColumnGroupResize(e,t,s){const i=this.gos.get("skipHeaderOnAutoSize"),o=()=>{const n=[],r=t.getDisplayedLeafColumns();for(const a of r)a.getColDef().suppressAutoSize||n.push(a.getColId());n.length>0&&this.autoSizeCols({colKeys:n,skipHeader:i,stopAtGroup:t,source:"uiColumnResized"}),s()};return e.addEventListener("dblclick",o),()=>e.removeEventListener("dblclick",o)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const s=Ag(this.beans);if(s>0){this.sizeColumnsToFit(s,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):$(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",s,i){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,s,i));return}const o={};for(const{key:f,...v}of i?.columnLimits??[])o[typeof f=="string"?f:f.getColId()]=v;const n=this.beans.visibleCols.allCols;if(e<=0||!n.length)return;const r=Ls(n);if(i?.onlyScaleUp&&r>e||e===r&&n.every(v=>{if(v.colDef.suppressSizeToFit)return!0;const C=o?.[v.getId()],w=C?.minWidth??i?.defaultMinWidth,b=C?.maxWidth??i?.defaultMaxWidth,x=v.getActualWidth();return(w==null||x>=w)&&(b==null||x<=b)}))return;const l=[],c=[];for(const f of n){const v=i?.colKeys?.some(C=>$n(f,C))??!0;f.getColDef().suppressSizeToFit||!v?c.push(f):l.push(f)}const d=l.slice(0);let u=!1;const h=f=>{us(l,f),c.push(f)};for(const f of l){f.resetActualWidth(t);const v=o?.[f.getId()],C=v?.minWidth??i?.defaultMinWidth,w=v?.maxWidth??i?.defaultMaxWidth,b=f.getActualWidth();typeof C=="number"&&b<C?f.setActualWidth(C,t,!0):typeof w=="number"&&b>w&&f.setActualWidth(w,t,!0)}for(;!u;){u=!0;const f=e-Ls(c);if(f<=0)for(const v of l){const C=o?.[v.getId()]?.minWidth??i?.defaultMinWidth??v.minWidth;v.setActualWidth(C,t,!0)}else{const v=f/Ls(l);let C=f;for(let w=l.length-1;w>=0;w--){const b=l[w],x=o?.[b.getId()],y=x?.minWidth??i?.defaultMinWidth,S=x?.maxWidth??i?.defaultMaxWidth,F=b.getMinWidth(),R=b.getMaxWidth(),E=typeof y=="number"&&y>F?y:F,D=typeof S=="number"&&S<R?S:R;let P=Math.round(b.getActualWidth()*v);P<E?(P=E,h(b),u=!1):P>D?(P=D,h(b),u=!1):w===0&&(P=C),b.setActualWidth(P,t,!0),C-=P}}}for(const f of d)f.fireColumnWidthChangedEvent(t);const p=this.beans.visibleCols;p.setLeftValues(t),p.updateBodyWidths(),!s&&Ko(this.eventSvc,d,!0,t)}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,s=e.get("autoSizeStrategy");s?.type!=="fitGridWidth"&&s?.type!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const i=s.type;if(i==="fitGridWidth"){const{columnLimits:o,defaultMinWidth:n,defaultMaxWidth:r}=s,a=o?.map(({colId:l,minWidth:c,maxWidth:d})=>({key:l,minWidth:c,maxWidth:d}));this.sizeColumnsToFitGridBody({defaultMinWidth:n,defaultMaxWidth:r,columnLimits:a})}else i==="fitProvidedWidth"&&this.sizeColumnsToFit(s.width,"sizeColumnsToFit");t?.revealColumns(i)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{if(!this.isAlive())return;const s="autosizeColumns";e?this.autoSizeCols({...t,source:s,colKeys:e}):this.autoSizeAllColumns({...t,source:s}),this.beans.colDelayRenderSvc?.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function Z6(e,t,s={}){const i=s.minWidth??e.getMinWidth();t<i&&(t=i);const o=s.maxWidth??e.getMaxWidth();return t>o&&(t=o),t}function Ag({ctrlsSvc:e,scrollVisibleSvc:t}){const s=e.getGridBodyCtrl(),o=s.isVerticalScrollShowing()?t.getScrollbarWidth():0;return or(s.eGridBody)-o}var Q6={moduleName:"ColumnAutoSize",version:ee,beans:[X6],apiFunctions:{sizeColumnsToFit:K6,autoSizeColumns:zC,autoSizeAllColumns:Y6},dependsOn:[Ov]},J6=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function eA(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function tA(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function sA(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function iA(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function oA(e,t,s){return e.pinnedRowModel?.forEachPinnedRow(t,s)}var nA={moduleName:"PinnedRow",version:ee,beans:[uE],css:[J6],apiFunctions:{getPinnedTopRowCount:eA,getPinnedBottomRowCount:tA,getPinnedTopRow:sA,getPinnedBottomRow:iA,forEachPinnedRow:oA},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},rA=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){const e=this.firstNode.__autoHeights?.[this.col.getColId()];if(e==null)return;let t=0;for(const s of this.spannedNodes)s!==this.lastNode&&(t+=s.rowHeight);return e-t}},aA=class extends O{constructor(e){super(),this.column=e}buildCache(e){const{column:t,beans:{gos:s,pinnedRowModel:i,rowModel:o,valueSvc:n,pagination:r}}=this,{colDef:a}=t,l=this.getNodeMap(e),c=new Map,d=s.getCallback("isFullWidthRow"),u=a.equals,h=a.spanRows,p=typeof h=="function";let f=null,v=null,C;const w=(x,y)=>{f=x,v=null,C=y},b=x=>{const y=!x.isExpandable()&&!x.group&&!x.detail&&(d?!d({rowNode:x}):!0);if(x.rowIndex==null||!y){w(null,null);return}if(f==null||x.level!==f.level||x.footer||v&&x.rowIndex-1!==v?.getLastNode().rowIndex){w(x,n.getValue(t,x));return}const S=n.getValue(t,x);if(p){const F=xe(s,{valueA:C,nodeA:f,valueB:S,nodeB:x,column:t,colDef:a});if(!h(F)){w(x,S);return}}else if(u?!u(C,S):C!==S){w(x,S);return}if(!v){const F=l?.get(f);F?.firstNode===f?(F.reset(),v=F):v=new rA(t,f),c.set(f,v)}v.addSpannedNode(x),c.set(x,v)};switch(e){case"center":o.forEachDisplayedNode?.(x=>{(!r||r.isRowInPage(x.rowIndex))&&b(x)}),this.centerValueNodeMap=c;break;case"top":i?.forEachPinnedRow("top",b),this.topValueNodeMap=c;break;case"bottom":i?.forEachPinnedRow("bottom",b),this.bottomValueNodeMap=c;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},lA=class extends O{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=ht(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=ht(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const s=this.createManagedBean(new aA(e));this.spanningColumns.set(e,s),s.buildCache("top"),s.buildCache("bottom"),s.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls("top"),t?.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const s=this.spanningColumns.get(e);return s?s.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:s}=this.beans,i=e.column,o=e.rowIndex,n=this.spanningColumns.get(i);if(!n)return;let r;switch(e.rowPinned){case"top":r=t?.getPinnedTopRow(o);break;case"bottom":r=t?.getPinnedBottomRow(o);break;default:r=s.getRow(o)}if(r)return n.getCellSpan(r)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const s=this.spanningColumns.get(e);if(s)return s.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[s,i]of this.spanningColumns)if(i.isCellSpanning(e)){const o=i.getCellSpan(e);t(s,o)}}destroy(){super.destroy(),this.spanningColumns.clear()}},cA=class extends jo{constructor(e,t,s){super(e.col,e.firstNode,s,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,s,i,o,n,r){this.eWrapper=s,super.setComp(e,t,s,i,o,n,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||Wf(e,t.rowIndex)}setAriaRowSpan(){iy(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(kl(t)){this.focusedCellPosition=void 0;return}const s=this.isCellFocused();s||(this.focusedCellPosition=void 0),e&&s&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},dA=class extends ll{onRowIndexChanged(){super.onRowIndexChanged();for(const e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){const t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new cA(t,this,this.beans)}isCorrectCtrlForSpan(e){const t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},uA=class extends O{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,s=this.getCtrlsMap(e),i=s.size,o=this.getAllRelevantRowControls(e),n=new Map;let r=!1;for(const l of o)l.isAlive()&&t?.forEachSpannedColumn(l.rowNode,(c,d)=>{if(n.has(d.firstNode))return;const u=s.get(d.firstNode);if(u){n.set(d.firstNode,u),s.delete(d.firstNode);return}r=!0;const h=new dA(d.firstNode,this.beans,!1,!1,!1);n.set(d.firstNode,h)});this.setCtrlsMap(e,n);const a=n.size===i;if(!(!r&&a)){for(const l of s.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,s=t?.getCellSpanByPosition(e);if(!s)return;const i=this.getCtrlsMap(e.rowPinned).get(s.firstNode);if(i)return i.getAllCellCtrls().find(o=>o.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},hA={moduleName:"CellSpan",version:ee,beans:[lA,uA]},pA=class extends O{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,s=e.colDef,i=s.cellClassRules,o=this.getCellClassParams(e,s);dh(this.beans.expressionSvc,i===this.cellClassRules?void 0:this.cellClassRules,i,o,n=>t.toggleCss(n,!0),n=>t.toggleCss(n,!1)),this.cellClassRules=i}applyUserStyles(){const e=this.column,t=e.colDef,s=t.cellStyle;if(!s)return;let i;if(typeof s=="function"){const o=this.getCellClassParams(e,t);i=s(o)}else i=s;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,s=e.colDef,i=this.getCellClassParams(e,s);for(const n of this.staticClasses)t.toggleCss(n,!1);const o=this.beans.cellStyles.getStaticCellClasses(s,i);this.staticClasses=o;for(const n of o)t.toggleCss(n,!0)}getCellClassParams(e,t){const{value:s,rowNode:i}=this.cellCtrl;return xe(this.beans.gos,{value:s,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},gA=class extends O{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,s,i){dh(this.beans.expressionSvc,void 0,e.cellClassRules,t,s,i),this.processStaticCellClasses(e,t,s)}getStaticCellClasses(e,t){const{cellClass:s}=e;if(!s)return[];let i;return typeof s=="function"?i=s(t):i=s,typeof i=="string"&&(i=[i]),i||[]}createCellCustomStyleFeature(e,t){return new pA(e,t)}processStaticCellClasses(e,t,s){this.getStaticCellClasses(e,t).forEach(o=>{s(o)})}},fA={moduleName:"CellStyle",version:ee,beans:[gA]},mA={moduleName:"RowStyle",version:ee,beans:[tT]};function vA(e,t){return!!e.colHover?.isHovered(t)}var CA=class extends O{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=s=>{const{beans:i,gos:o,element:n,columns:r}=this,a=i.colHover;if(s??!!o.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:a.setMouseOver.bind(a,r),mouseout:a.clearMouseOver.bind(a)});else{for(const c of this.destroyManagedListeners)c();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},wA="ag-column-hover",bA=class extends O{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,s){const i=()=>{const o=this.isHovered(s);t.toggleCss("ag-column-hover",o)};e.addManagedEventListeners({columnHoverChanged:i}),i()}onCellColumnHover(e,t){if(!t)return;const s=this.isHovered(e);t.toggleCss(wA,s)}addHeaderFilterColumnHoverListener(e,t,s,i){this.createHoverFeature(e,[s],i);const o=()=>{const n=this.isHovered(s);t.toggleCss("ag-column-hover",n)};e.addManagedEventListeners({columnHoverChanged:o}),o()}createHoverFeature(e,t,s){e.createManagedBean(new CA(t,s))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},xA={moduleName:"ColumnHover",version:ee,beans:[bA],apiFunctions:{isColumnHovered:vA}},yA=class extends O{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addListener(e,t){const s=this.wrapSvc?.wrap(e,t)??t,i=!Na.has(e),o=i?this.asyncListeners:this.syncListeners;o.has(e)||o.set(e,new Set),o.get(e).add(s),this.eventSvc.addListener(e,s,i)}removeListener(e,t){const s=this.wrapSvc?.unwrap(e,t)??t,o=!!this.asyncListeners.get(e)?.delete(s);o||this.syncListeners.get(e)?.delete(s),this.eventSvc.removeListener(e,s,o)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,s=(n,r)=>{Na.has(n)&&t(n,r)},i=(n,r)=>{Na.has(n)||t(n,r)};this.globalListenerPairs.set(e,{syncListener:s,asyncListener:i});const o=this.eventSvc;o.addGlobalListener(s,!1),o.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:s,globalListenerPairs:i}=this,o=s?.unwrapGlobal(e)??e;if(i.has(o)){const{syncListener:r,asyncListener:a}=i.get(o);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!0),i.delete(e)}else this.syncGlobalListeners.delete(o),t.removeGlobalListener(o,!1)}destroyEventListeners(e,t){e.forEach((s,i)=>{s.forEach(o=>this.eventSvc.removeListener(i,o,t)),s.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const s of e)this.eventSvc.removeGlobalListener(s,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:s,asyncListener:i})=>{t.removeGlobalListener(s,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function SA(e,t,s){e.apiEventSvc?.addListener(t,s)}function RA(e,t,s){e.apiEventSvc?.removeListener(t,s)}function FA(e,t){e.apiEventSvc?.addGlobalListener(t)}function EA(e,t){e.apiEventSvc?.removeGlobalListener(t)}var DA={moduleName:"EventApi",version:ee,apiFunctions:{addEventListener:SA,addGlobalListener:FA,removeEventListener:RA,removeGlobalListener:EA},beans:[yA]},PA={moduleName:"Locale",version:ee,beans:[t4]},TA=class extends O{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=ht(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:e,rowModel:t,rowSpanSvc:s,pinnedRowModel:i}=this.beans,o=e.autoHeightCols;let n=!1;const r=a=>{const l=a.__autoHeights;let c=li(this.beans,a).height;for(const d of o){let u=l?.[d.getColId()];const h=s?.getCellSpan(d,a);if(h){if(h.getLastNode()!==a)continue;if(u=s?.getCellSpan(d,a)?.getLastNodeAutoHeight(),!u)return}if(u==null){if(this.colSpanSkipCell(d,a))continue;return}c=Math.max(u,c)}c!==a.rowHeight&&(a.setRowHeight(c),n=!0)};i?.forEachPinnedRow?.("top",r),i?.forEachPinnedRow?.("bottom",r),t.forEachDisplayedNode?.(r),n&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,s){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[s.getId()];return}const i=e.__autoHeights[s.getId()];e.__autoHeights[s.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:s,colViewport:i,visibleCols:o}=this.beans;if(!s.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=o.getLeftColsForRow(t);break;case"right":n=o.getRightColsForRow(t);break;case null:n=i.getColsWithinViewport(t);break}return!n.includes(e)}setupCellAutoHeight(e,t,s){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const i=t.parentElement,{rowNode:o,column:n}=e,r=this.beans,a=d=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!s.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:p,borderTopWidth:f}=Yi(i),v=u+h+p+f,w=t.offsetHeight+v;if(d<5){const x=!gt(r)?.contains(t),y=w==0;if(x||y){window.setTimeout(()=>a(d+1),0);return}}this.setRowAutoHeight(o,w,n)},l=()=>a(0);l();const c=Us(r,t,l);return s.addDestroyFunc(()=>{c(),this.setRowAutoHeight(o,void 0,n)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:s}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(s).filter(o=>o.isAutoHeight())),t.length!==0){if(!s.__autoHeights)return!1;for(const i of t){const o=s.__autoHeights[i.getColId()];if(!o||s.rowHeight<o)return!1}}return!0}},kA={moduleName:"RowAutoHeight",version:ee,beans:[TA]},MA={moduleName:"AllCommunity",version:ee,dependsOn:[TI,HI,qI,b4,kM,MM,IM,AM,LM,OM,NM,TM,yk,Sk,Rk,xk,Ek,Dk,c6,aI,P6,Nv,G6,B6,q6,Q6,l3,nA,ZM,HT,fA,xA,mA,DA,VT,i6,FC,PA,kA,a3,kI,hA]};function ce(e,t={}){const s=Object.keys(t).map(i=>{const o=t[i];return o!=null?`${i}=${o}`:null}).filter(Boolean).join(";");return[e,s].filter(i=>i.length>0).join(":")}var ne={grid(e){return ce("ag-grid-root",{gridId:e})},headerGroupCell(e){return ce("ag-header-group-cell",{colId:e})},headerCell(e){return ce("ag-header-cell",{colId:e})},headerCheckbox(e){return ce("ag-header-selection-checkbox",{colId:e})},headerFilterButton(e){return ce("ag-header-cell-filter-button",{colId:e})},floatingFilter(e){return ce("ag-floating-filter",{colId:e})},floatingFilterButton(e){return ce("ag-floating-filter-button",{colId:e})},headerCellMenuButton(e){return ce("ag-header-cell-menu-button",{colId:e})},headerResizeHandle(e){return ce("ag-header-cell-resize",{colId:e})},filterInstancePickerDisplay(e){return ce(`ag-${e.source}-picker-display`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},numberFilterInstanceInput(e){return ce(`ag-${e.source}-number-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},textFilterInstanceInput(e){return ce(`ag-${e.source}-text-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},dateFilterInstanceInput(e){return ce(`ag-${e.source}-date-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},setFilterInstanceMiniFilterInput(e){return ce(`ag-${e.source}-set-filter-mini-filter-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},setFilterInstanceItem(e,t){return ce(`ag-${e.source}-set-filter-item`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,itemLabel:t}:{colId:e.colId,itemLabel:t})},setFilterApplyPanelButton(e,t){return ce(`ag-${e.source}-set-filter-apply-panel-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},filterConditionRadioButton(e,t){return ce(`ag-${e.source}-filter-condition-radio-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},advancedFilterInput(){return ce("ag-advanced-filter-input")},advancedFilterButton(e){return ce("ag-advanced-filter-button",{label:e})},advancedFilterBuilderButton(){return ce("ag-advanced-filter-builder-button")},advancedFilterPanelMaximiseButton(){return ce("ag-advanced-filter-builder-panel-maximise")},advancedFilterPanelCloseButton(){return ce("ag-advanced-filter-builder-panel-close")},advancedFilterPill(e){return ce("ag-advanced-filter-builder-pill",{label:e})},advancedFilterBuilderAddItemButton(){return ce("ag-advanced-filter-builder-add-item-button")},rowNode(e){return ce("ag-row",{"row-id":e})},cell(e,t){return ce("ag-cell",{"row-id":e,colId:t})},autoGroupCell(e){return ne.cell(e,oi)},checkbox(e,t){return ce("ag-selection-checkbox",{"row-id":e,colId:t})},selectionColumnCheckbox(e){return ne.checkbox(e,Hu)},autoGroupColumnCheckbox(e){return ne.checkbox(e,oi)},dragHandle(e,t){return ce("ag-drag-handle",{"row-id":e,colId:t})},groupContracted(e,t){return ce("ag-group-contracted",{"row-id":e,colId:t})},groupExpanded(e,t){return ce("ag-group-expanded",{"row-id":e,colId:t})},autoGroupContracted(e){return ne.groupContracted(e,oi)},autoGroupExpanded(e){return ne.groupExpanded(e,oi)},rowNumber(e){return ne.cell(e,Gu)},menu(){return ce("ag-menu")},menuOption(e){return ce("ag-menu-option",{option:e})},sideBar(){return ce("ag-side-bar")},sideBarButton(e){return ce("ag-side-button",{label:e})},columnToolPanel(){return ce("ag-column-panel")},pivotModeSelect(){return ce("ag-pivot-mode-select")},columnPanelSelectHeaderCheckbox(){return ce("ag-column-panel-select-header-checkbox")},columnPanelSelectHeaderFilter(){return ce("ag-column-panel-select-header-filter")},columnSelectListItemGroupClosedIcon(e){return ce("ag-column-select-list-item-group-closed-icon",{label:e})},columnSelectListItemCheckbox(e){return ce("ag-column-select-list-item-checkbox",{label:e})},columnSelectListItemDragHandle(e){return ce("ag-column-select-list-item-drag-handle",{label:e})},columnDropCellDragHandle(e,t,s){return ce("ag-column-drop-cell-drag-handle",{source:e,area:t,label:s})},columnDropCellCancelButton(e,t,s){return ce("ag-column-drop-cell-cancel",{source:e,area:t,label:s})},columnDropArea(e,t){return ce("ag-column-drop-area",{source:e,name:t})},filterToolPanel(){return ce("ag-filter-panel")},filterToolPanelAddFilterButton(){return ce("ag-filter-panel-add-filter-button")},filterToolPanelFilterTypeSelector(e){return ce("ag-filter-panel-filter-type-selector",{colLabel:e})},filterToolPanelSearchInput(){return ce("ag-filter-toolpanel-search-input")},filterToolPanelGroup(e){return ce("ag-filter-toolpanel-group",{title:e})},filterToolPanelGroupCollapsedIcon(e){return ce("ag-filter-toolpanel-group-collapsed-icon",{title:e})},statusBarTotalAndFilteredRowCount(){return ce("ag-status-bar-total-and-filtered-row-count")},statusBarTotalRowCount(){return ce("ag-status-bar-total-row-count")},statusBarFilteredRowCount(){return ce("ag-status-bar-filtered-row-count")},statusBarSelectedRowCount(){return ce("ag-status-bar-selected-row-count")},statusBarAggregations(){return ce("ag-status-bar-aggregations")},paginationPanelSizePickerDisplay(e){return ce("ag-pagination-page-size-picker-field-display",{value:e})},paginationPanelFirstRowOnPage(e){return ce("ag-paging-row-summary-panel-first-row-on-page",{value:e})},paginationPanelLastRowOnPage(e){return ce("ag-paging-row-summary-panel-last-row-on-page",{value:e})},paginationPanelRecordCount(e){return ce("ag-paging-row-summary-panel-record-count",{value:e})},paginationSummaryPanelButton(e){return ce("ag-paging-page-summary-panel-btn",{label:e})},paginationSummaryPanelCurrentPage(e){return ce("ag-paging-page-summary-panel-current-page",{value:e})},paginationSummaryPanelTotalPage(e){return ce("ag-paging-page-summary-panel-total-page",{value:e})},fillHandle(){return ce("ag-fill-handle")},columnChooserCloseButton(){return ce("ag-column-chooser-close-button")},columnChooserSearchBarCheckbox(){return ce("ag-column-chooser-header-checkbox")},columnChooserSearchBarFilter(){return ce("ag-column-chooser-searchbar-filter")},columnChooserListItemGroupClosedIcon(e){return ce("ag-column-chooser-list-item-group-closed-icon",{label:e})},columnChooserListItemCheckbox(e){return ce("ag-column-chooser-list-item-checkbox",{label:e})},columnChooserListItemDragHandle(e){return ce("ag-column-chooser-list-item-drag-handle",{label:e})},overlay(){return ce("ag-overlay")}},WC="data-testid";function ue(e,t){e?.setAttribute(WC,t)}function IA(e){WC=e}var AA=class extends O{constructor(){super(...arguments),this.beanName="testIdSvc"}postConstruct(){const e=ht(this,()=>this.setupAllTestIds(),500),t=ht(this,()=>{this.setupAllTestIds(),e()},0);this.addManagedEventListeners({firstDataRendered:t,displayedRowsChanged:t,displayedColumnsChanged:t,displayedColumnsWidthChanged:t,virtualColumnsChanged:t,columnMenuVisibleChanged:t,contextMenuVisibleChanged:t,advancedFilterBuilderVisibleChanged:t,fieldPickerValueSelected:t,modelUpdated:t,sideBarUpdated:t,pinnedHeightChanged:t,gridReady:t,overlayExclusiveChanged:t,rowGroupOpened:t,scrollVisibilityChanged:t,gridSizeChanged:t,filterOpened:t,filterChanged:t,cellSelectionChanged:t})}setupAllTestIds(){const e=as(this.beans),t=Dv(this.beans),s=e.querySelector(`[grid-id="${t}"]`);ue(s,ne.grid(t)),e.querySelectorAll(".ag-header-group-cell").forEach(n=>{ue(n,ne.headerGroupCell(n.getAttribute("col-id")))}),e.querySelectorAll(".ag-header-cell").forEach(n=>{const r=n.getAttribute("col-id"),l=n.classList.contains("ag-floating-filter")?ne.floatingFilter(r):ne.headerCell(r);ue(n,l),ue(n.querySelector(".ag-header-cell-filter-button"),ne.headerFilterButton(r)),ue(n.querySelector(".ag-header-cell-menu-button"),ne.headerCellMenuButton(r)),ue(n.querySelector(".ag-header-cell-resize"),ne.headerResizeHandle(r)),ue(n.querySelector(".ag-checkbox input[type=checkbox]"),ne.headerCheckbox(r)),ue(n.querySelector(".ag-floating-filter-button button"),ne.floatingFilterButton(r)),this.setupFilterInstance(n.querySelector(".ag-floating-filter-body"),{source:"floating-filter",colId:r})});const i=e.querySelector(".ag-filter-menu");this.setupFilterInstance(i,{source:"column-filter"}),ue(e.querySelector(".ag-advanced-filter input[type=text]"),ne.advancedFilterInput()),e.querySelectorAll(".ag-advanced-filter-buttons button").forEach(n=>{ue(n,ne.advancedFilterButton(n.textContent))}),ue(e.querySelector("button.ag-advanced-filter-builder-button"),ne.advancedFilterBuilderButton()),e.querySelectorAll('.ag-panel[aria-label="Advanced Filter"] .ag-panel-title-bar-button').forEach((n,r)=>{ue(n,r===0?ne.advancedFilterPanelMaximiseButton():ne.advancedFilterPanelCloseButton())}),e.querySelectorAll('.ag-panel[aria-lable="Advanced Filter"] .ag-advanced-filter-builder-pill').forEach(n=>{ue(n,ne.advancedFilterPill(n.querySelector(".ag-picker-field-display")?.textContent))}),ue(e.querySelector('.ag-panel[aria-label="Advanced Filter"] .ag-advanced-filter-builder-item-button'),ne.advancedFilterBuilderAddItemButton()),e.querySelectorAll(".ag-row").forEach(n=>{const r=n.getAttribute("row-id");ue(n,ne.rowNode(r)),n.querySelectorAll(".ag-cell").forEach(a=>{const l=a.getAttribute("col-id");ue(a,ne.cell(r,l)),ue(a.querySelector(".ag-selection-checkbox input[type=checkbox]"),ne.checkbox(r,l)),ue(a.querySelector(".ag-drag-handle"),ne.dragHandle(r,l)),ue(a.querySelector(".ag-group-contracted"),ne.groupContracted(r,l)),ue(a.querySelector(".ag-group-expanded"),ne.groupExpanded(r,l))})}),e.querySelectorAll(".ag-menu-list").forEach(n=>{ue(n,ne.menu()),n.querySelectorAll(".ag-menu-option").forEach(r=>{ue(r,ne.menuOption(r.querySelector(".ag-menu-option-text")?.textContent))})}),e.querySelectorAll(".ag-side-bar").forEach(n=>{ue(n,ne.sideBar()),n.querySelectorAll(".ag-side-button button").forEach(r=>{ue(r,ne.sideBarButton(r.querySelector(".ag-side-button-label")?.textContent))}),n.querySelectorAll(".ag-column-panel").forEach(r=>{ue(r,ne.columnToolPanel()),ue(r.querySelector(".ag-pivot-mode-select input[type=checkbox]"),ne.pivotModeSelect()),ue(r.querySelector(".ag-column-select-header-checkbox input[type=checkbox]"),ne.columnPanelSelectHeaderCheckbox()),ue(r.querySelector(".ag-column-select-header-filter-wrapper input[type=text]"),ne.columnPanelSelectHeaderFilter()),r.querySelectorAll(".ag-column-select-list").forEach(a=>{a.querySelectorAll(".ag-column-select-virtual-list-item").forEach(l=>{const c=l.getAttribute("aria-label");ue(l.querySelector(".ag-column-group-closed-icon"),ne.columnSelectListItemGroupClosedIcon(c)),ue(l.querySelector(".ag-column-select-checkbox input[type=checkbox]"),ne.columnSelectListItemCheckbox(c)),ue(l.querySelector(".ag-drag-handle"),ne.columnSelectListItemDragHandle(c))})}),this.setupColumnDropArea(r,"toolbar")}),n.querySelectorAll(".ag-filter-panel").forEach(r=>{ue(r,ne.filterToolPanel()),ue(r.querySelector("button.ag-filter-add-button"),ne.filterToolPanelAddFilterButton()),r.querySelectorAll(".ag-filter-card").forEach(a=>{const l=a.querySelector(".ag-filter-card-title")?.textContent,c=a.querySelector(".ag-filter-type-select");ue(c,ne.filterToolPanelFilterTypeSelector(l)),a.querySelectorAll(".ag-filter").forEach(d=>this.setupFilterInstance(d,{source:"filter-toolpanel",colLabel:l}))})}),n.querySelectorAll(".ag-filter-toolpanel").forEach(r=>{ue(r.querySelector(".ag-filter-toolpanel-search-input input[type=text]"),ne.filterToolPanelSearchInput()),r.querySelectorAll(".ag-filter-toolpanel-group").forEach(a=>{const l=a.querySelector(".ag-filter-toolpanel-group-title")?.textContent;ue(a,ne.filterToolPanelGroup(l)),ue(a.querySelector(".ag-filter-toolpanel-group-title-bar-icon .ag-icon-tree-closed"),ne.filterToolPanelGroupCollapsedIcon(l));const c=a.querySelector(".ag-filter-toolpanel-instance-filter");c&&this.setupFilterInstance(c,{source:"filter-toolpanel",colLabel:l})})})}),ue(e.querySelector(".ag-status-bar .ag-status-panel-total-and-filtered-row-count"),ne.statusBarTotalAndFilteredRowCount()),ue(e.querySelector(".ag-status-bar .ag-status-panel-total-row-count"),ne.statusBarTotalRowCount()),ue(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),ne.statusBarFilteredRowCount()),ue(e.querySelector(".ag-status-bar .ag-status-panel-selected-row-count"),ne.statusBarSelectedRowCount()),ue(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),ne.statusBarAggregations()),e.querySelectorAll(".ag-paging-panel").forEach(n=>{ue(n.querySelector(".ag-paging-page-size .ag-picker-field-display"),ne.paginationPanelSizePickerDisplay(n.querySelector(".ag-paging-page-size .ag-picker-field-display")?.textContent)),n.querySelectorAll(".ag-paging-row-summary-panel-number").forEach(r=>{switch(r.getAttribute("data-ref")){case"lbFirstRowOnPage":ue(r,ne.paginationPanelFirstRowOnPage(r.textContent));break;case"lbLastRowOnPage":ue(r,ne.paginationPanelLastRowOnPage(r.textContent));break;case"lbRecordCount":ue(r,ne.paginationPanelRecordCount(r.textContent));break}}),n.querySelectorAll(".ag-paging-page-summary-panel .ag-button").forEach(r=>{ue(r,ne.paginationSummaryPanelButton(r.getAttribute("aria-label")?.toLowerCase()))}),n.querySelectorAll(".ag-paging-page-summary-panel .ag-paging-number").forEach(r=>{switch(r.getAttribute("data-ref")){case"lbCurrent":ue(r,ne.paginationSummaryPanelCurrentPage(r.textContent));break;case"lbTotal":ue(r,ne.paginationSummaryPanelTotalPage(r.textContent));break}})}),ue(e.querySelector(".ag-fill-handle"),ne.fillHandle()),e.querySelectorAll('.ag-panel[aria-label="Choose Columns"]').forEach(n=>{ue(n.querySelector(".ag-panel-title-bar-button-icon"),ne.columnChooserCloseButton()),ue(n.querySelector('.ag-column-select-header-checkbox input[type="checkbox"]'),ne.columnChooserSearchBarCheckbox()),ue(n.querySelector('.ag-column-select-header-filter-wrapper input[type="text"]'),ne.columnChooserSearchBarFilter()),n.querySelectorAll(".ag-column-select-list").forEach(r=>{r.querySelectorAll(".ag-column-select-virtual-list-item").forEach(a=>{const l=a.getAttribute("aria-label");ue(a.querySelector(".ag-column-group-closed-icon"),ne.columnChooserListItemGroupClosedIcon(l)),ue(a.querySelector(".ag-column-select-checkbox input[type=checkbox]"),ne.columnChooserListItemCheckbox(l)),ue(a.querySelector(".ag-drag-handle"),ne.columnChooserListItemDragHandle(l))})})}),ue(e.querySelector(".ag-overlay-wrapper"),ne.overlay());const o=e.querySelector(".ag-column-drop-wrapper");o&&this.setupColumnDropArea(o,"panel")}setupFilterInstance(e,t){if(!e)return;e.querySelectorAll(".ag-filter-select .ag-picker-field-display").forEach(r=>{ue(r,ne.filterInstancePickerDisplay(t))});const s=e.querySelector('.ag-filter-body input[type="number"]');ue(s,ne.numberFilterInstanceInput(t));const i=e.querySelector('.ag-filter-body input[type="text"]');ue(i,ne.textFilterInstanceInput(t));const o=e.querySelector('.ag-filter-body input[type="date"]');ue(o,ne.dateFilterInstanceInput(t));const n=e.querySelector('.ag-mini-filter input[type="text"]');ue(n,ne.setFilterInstanceMiniFilterInput(t)),e.querySelectorAll(".ag-set-filter-list .ag-set-filter-item").forEach(r=>{const a=r.querySelector(".ag-checkbox-label")?.textContent,l=r.querySelector('input[type="checkbox"]');ue(l,ne.setFilterInstanceItem(t,a))}),e.querySelectorAll(".ag-filter-apply-panel button").forEach(r=>{ue(r,ne.setFilterApplyPanelButton(t,r.textContent))}),e.querySelectorAll(".ag-filter-condition .ag-radio-button").forEach(r=>{const a=r.querySelector(".ag-radio-button-label")?.textContent;ue(r.querySelector("input[type=radio]"),ne.filterConditionRadioButton(t,a))})}setupColumnDropArea(e,t){e.querySelectorAll(".ag-column-drop").forEach(s=>{const i=s.querySelector(".ag-column-drop-list")?.getAttribute("aria-label");ue(s,ne.columnDropArea(t,i)),s.querySelectorAll(".ag-column-drop-cell").forEach(o=>{const n=o.querySelector(".ag-column-drop-cell-text")?.textContent;ue(o.querySelector(".ag-drag-handle"),ne.columnDropCellDragHandle(t,i,n)),ue(o.querySelector(".ag-column-drop-cell-button .ag-icon-cancel"),ne.columnDropCellCancelButton(t,i,n))})})}},LA={moduleName:"Testing",version:ee,beans:[AA]};function OA({testIdAttribute:e}={}){e&&IA(e),am.registerModules([LA])}var St=g.createContext({}),jC=g.createContext("default"),Fr=(e,t,s,i)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const n=e.newAgStackInstance();let r,a,l=!1;return n.then(c=>{if(l){t.destroyBean(c);return}r=c,a=r.getGui(),s.appendChild(a),Lg(i,r)}),()=>{l=!0,r&&(a?.remove(),t.destroyBean(r),i&&Lg(i,void 0))}},Lg=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const s=e;s.current=t}},Xt=(...e)=>e.filter(s=>s!=null&&s!=="").join(" "),ts=class _C{constructor(...t){this.classesMap={};for(const s of t)this.classesMap[s]=!0}setClass(t,s){if(!!this.classesMap[t]==s)return this;const o=new _C;return o.classesMap={...this.classesMap},o.classesMap[t]=s,o}toString(){return Object.keys(this.classesMap).filter(s=>this.classesMap[s]).join(" ")}},cn=e=>{const t=()=>typeof Symbol=="function"&&Symbol.for,s=()=>t()?Symbol.for("react.memo"):60115;return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===s()},cu=g.version?.split(".")[0],UC=cu==="16"||cu==="17";function NA(){return cu==="19"}var Ga=!1;function HA(e){return Ga||setTimeout(()=>Ga=!1,0),Ga=!0,e()}var pr=(e,t)=>{!UC&&e&&!Ga?tn.flushSync(t):t()},GA=e=>{UC?e():g.startTransition(e)};function BA(e,t,s){return g.useSyncExternalStore?g.useSyncExternalStore(e,t):s}function ul(e,t,s){if(t==null||e==null)return t;if(e===t||t.length===0&&e.length===0)return e;if(s||e.length===0&&t.length>0||e.length>0&&t.length===0)return t;const i=[],o=[],n=new Map,r=new Map;for(let a=0;a<t.length;a++){const l=t[a];r.set(l.instanceId,l)}for(let a=0;a<e.length;a++){const l=e[a];n.set(l.instanceId,l),r.has(l.instanceId)&&i.push(l)}for(let a=0;a<t.length;a++){const l=t[a],c=l.instanceId;n.has(c)||o.push(l)}return i.length===e.length&&o.length===0?e:i.length===0&&o.length===t.length?t:i.length===0?o:o.length===0?i:[...i,...o]}var $C=g.forwardRef((e,t)=>{const{registry:s,context:i}=g.useContext(St),o=g.useRef(null),n=g.useRef(null),r=g.useRef(null),a=g.useRef(null),l=g.useRef(null),c=g.useRef(),[d,u]=g.useState(),[h,p]=g.useState(),[f,v]=g.useState(),[C,w]=g.useState(()=>new ts),[b,x]=g.useState(()=>new ts("ag-hidden")),[y,S]=g.useState(()=>new ts("ag-hidden")),[F,R]=g.useState(()=>new ts("ag-invisible"));g.useImperativeHandle(t,()=>({refresh(){return!1}})),g.useLayoutEffect(()=>Fr(d,i,n.current),[d]);const E=g.useCallback(H=>{if(o.current=H,!H||i.isDestroyed()){c.current=i.destroyBean(c.current);return}const A={setInnerRenderer:(k,V)=>{u(k),v(V)},setChildCount:k=>p(k),toggleCss:(k,V)=>w(U=>U.setClass(k,V)),setContractedDisplayed:k=>S(V=>V.setClass("ag-hidden",!k)),setExpandedDisplayed:k=>x(V=>V.setClass("ag-hidden",!k)),setCheckboxVisible:k=>R(V=>V.setClass("ag-invisible",!k)),setCheckboxSpacing:k=>R(V=>V.setClass("ag-group-checkbox-spacing",k))},de=s.createDynamicBean("groupCellRendererCtrl",!0);de&&(c.current=i.createBean(de),c.current.init(A,H,r.current,a.current,l.current,$C,e))},[]),D=g.useMemo(()=>`ag-cell-wrapper ${C.toString()}`,[C]),P=g.useMemo(()=>`ag-group-expanded ${b.toString()}`,[b]),T=g.useMemo(()=>`ag-group-contracted ${y.toString()}`,[y]),M=g.useMemo(()=>`ag-group-checkbox ${F.toString()}`,[F]),N=d?.componentFromFramework,q=N?d.componentClass:void 0,L=d==null&&f!=null,z=rn(f);return g.createElement("span",{className:D,ref:E,...e.colDef?{}:{role:c.current?.getCellAriaRole()}},g.createElement("span",{className:P,ref:a}),g.createElement("span",{className:T,ref:l}),g.createElement("span",{className:M,ref:r}),g.createElement("span",{className:"ag-group-value",ref:n},L?z:N?g.createElement(q,{...d.params}):null),g.createElement("span",{className:"ag-group-child-count"},h))}),Og=$C,Ch=g.createContext({setMethods:()=>{}}),VA=e=>{const{initialProps:t,addUpdateCallback:s,CustomComponentClass:i,setMethods:o}=e,[{key:n,...r},a]=g.useState(t);return g.useEffect(()=>{s(l=>a(l))},[]),g.createElement(Ch.Provider,{value:{setMethods:o}},g.createElement(i,{key:n,...r}))},zA=g.memo(VA),WA=0;function Ng(){return`agPortalKey_${++WA}`}var qC=class{constructor(e,t,s,i){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=s,this.suppressFallbackMethods=!!i,this.statelessComponent=this.isStateless(this.reactComponent),this.key=Ng(),this.portalKey=Ng(),this.instanceCreated=this.isStatelessComponent()?Le.resolve(!1):new Le(o=>{this.resolveInstanceCreated=o})}getGui(){return this.eParentElement}getRootElement(){return this.eParentElement.firstChild}destroy(){this.componentInstance&&typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy();const e=this.portal;e&&this.portalManager.destroyPortal(e)}createParentElement(e){const t=this.portalManager.getComponentWrappingElement(),s=document.createElement(t||"div");return s.classList.add("ag-react-container"),e.reactContainer=s,s}statelessComponentRendered(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0}getFrameworkComponentInstance(){return this.componentInstance}isStatelessComponent(){return this.statelessComponent}getReactComponentName(){return this.reactComponent.name}getMemoType(){return this.hasSymbol()?Symbol.for("react.memo"):60115}hasSymbol(){return typeof Symbol=="function"&&Symbol.for}isStateless(e){return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===this.getMemoType()}hasMethod(e){const t=this.getFrameworkComponentInstance();return!!t&&t[e]!=null||this.fallbackMethodAvailable(e)}callMethod(e,t){const s=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!s){setTimeout(()=>this.callMethod(e,t));return}const i=s[e];if(i)return i.apply(s,t);if(this.fallbackMethodAvailable(e))return this.fallbackMethod(e,t&&t[0]?t[0]:{})}addMethod(e,t){this[e]=t}init(e){return this.eParentElement=this.createParentElement(e),this.createOrUpdatePortal(e),new Le(t=>this.createReactComponent(t))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=t=>{this.componentInstance=t,this.resolveInstanceCreated?.(!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,{...e,key:this.key}),this.portal=tn.createPortal(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return g.createElement(e,t)}createReactComponent(e){this.portalManager.mountReactPortal(this.portal,this,e)}rendered(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!!(!this.isStatelessComponent()&&this.getFrameworkComponentInstance())}refreshComponent(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)}fallbackMethod(e,t){const s=this[`${e}Component`];if(!this.suppressFallbackMethods&&s)return s.bind(this)(t)}fallbackMethodAvailable(e){return this.suppressFallbackMethods?!1:!!this[`${e}Component`]}};function Nl(e,t,s){for(const i of e){const o=t[i];o&&(s[i]=o)}}var $t=class extends qC{constructor(){super(...arguments),this.awaitUpdateCallback=new Le(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=zA}init(e){return this.sourceParams=e,super.init(this.getProps())}addMethod(){}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}getFrameworkComponentInstance(){return this}createElement(e,t){return super.createElement(this.wrapperComponent,{initialProps:t,CustomComponentClass:e,setMethods:s=>this.setMethods(s),addUpdateCallback:s=>{this.updateCallback=()=>(s(this.getProps()),new Le(i=>{setTimeout(()=>{i()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,Nl(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}refreshProps(){return this.updateCallback?this.updateCallback():new Le(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},jA=class extends $t{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},_A=class extends $t{constructor(){super(...arguments),this.date=null,this.onDateChange=e=>this.updateDate(e)}getDate(){return this.date}setDate(e){this.date=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled"]}updateDate(e){this.setDate(e),this.sourceParams.onDateChanged()}getProps(){const e=super.getProps();return e.date=this.date,e.onDateChange=this.onDateChange,delete e.onDateChanged,e}},UA=class extends $t{constructor(){super(...arguments),this.label="",this.icon=null,this.shake=!1}setIcon(e,t){this.icon=e,this.shake=t,this.refreshProps()}setLabel(e){this.label=e,this.refreshProps()}getProps(){const e=super.getProps(),{label:t,icon:s,shake:i}=this;return e.label=t,e.icon=s,e.shake=i,e}},$A=class extends $t{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterModifiedCallback(),this.expectingNewMethods=!0,this.hasBeenActive=!1,this.awaitSetMethodsCallback=new Le(e=>{this.resolveSetMethodsCallback=e})}isFilterActive(){return this.model!=null}doesFilterPass(e){return this.providedMethods.doesFilterPass(e)}getModel(){return this.model}setModel(e){return this.expectingNewMethods=!0,this.model=e,this.hasBeenActive||(this.hasBeenActive=this.isFilterActive()),this.refreshProps()}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){const t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then(()=>this.providedMethods?.afterGuiAttached?.(e))}getOptionalMethods(){return["afterGuiDetached","onNewRowsLoaded","getModelAsString","onAnyFilterChanged"]}setMethods(e){this.expectingNewMethods===!1&&this.hasBeenActive&&this.providedMethods?.doesFilterPass!==e?.doesFilterPass&&setTimeout(()=>{this.sourceParams.filterChangedCallback()}),this.expectingNewMethods=!1,super.setMethods(e),this.resolveSetMethodsCallback(),this.resolveFilterPassCallback?.(),this.resolveFilterPassCallback=void 0}updateModel(e){this.resolveFilterPassCallback?.();const t=new Le(s=>{this.resolveFilterPassCallback=s});this.setModel(e).then(()=>{t.then(()=>{this.sourceParams.filterChangedCallback()})})}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e.onUiChange=this.onUiChange,delete e.filterChangedCallback,e}},qA=class extends $t{constructor(){super(...arguments),this.awaitSetMethodsCallback=new Le(e=>{this.resolveSetMethodsCallback=e})}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){const t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then(()=>this.providedMethods?.afterGuiAttached?.(e))}getOptionalMethods(){return["afterGuiDetached","onNewRowsLoaded","onAnyFilterChanged"]}setMethods(e){super.setMethods(e),this.resolveSetMethodsCallback()}};function KC(e,t){e.parentFilterInstance(s=>{(s.setModel(t)||Le.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var KA=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=s=>this.updateModel(s)}getProps(){return{...this.floatingFilterParams,model:this.model,onModelChange:this.onModelChange}}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){Nl(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),KC(this.floatingFilterParams,e)}},YA=class extends $t{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e)}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),KC(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},XA=class extends $t{refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}},ZA=class extends $t{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},QA=class extends $t{refresh(e){this.sourceParams=e,this.refreshProps()}},JA=class extends $t{constructor(){super(...arguments),this.active=!1,this.expanded=!1,this.onActiveChange=e=>this.updateActive(e)}setActive(e){this.awaitSetActive(e)}setExpanded(e){this.expanded=e,this.refreshProps()}getOptionalMethods(){return["select","configureDefaults"]}awaitSetActive(e){return this.active=e,this.refreshProps()}updateActive(e){const t=this.awaitSetActive(e);e&&t.then(()=>this.sourceParams.onItemActivated())}getProps(){const e=super.getProps();return e.active=this.active,e.expanded=this.expanded,e.onActiveChange=this.onActiveChange,delete e.onItemActivated,e}},e8=class extends $t{refresh(e){this.sourceParams=e,this.refreshProps()}},t8=class extends $t{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},s8=class extends $t{constructor(){super(...arguments),this.onStateChange=e=>this.updateState(e)}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getState(){return this.state}updateState(e){this.state=e,this.refreshProps(),this.sourceParams.onStateUpdated()}getProps(){const e=super.getProps();return e.state=this.state,e.onStateChange=this.onStateChange,e}};function wh(){$(231)}var i8=1e3,o8=class{constructor(e,t,s){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=s||i8}getPortals(){return this.portals}destroy(){this.destroyed=!0}destroyPortal(e){this.portals=this.portals.filter(t=>t!==e),this.batchUpdate()}getComponentWrappingElement(){return this.wrappingElement}mountReactPortal(e,t,s){this.portals=[...this.portals,e],this.waitForInstance(t,s),this.batchUpdate()}updateReactPortal(e,t){this.portals[this.portals.indexOf(e)]=t,this.batchUpdate()}batchUpdate(){this.hasPendingPortalUpdate||(setTimeout(()=>{this.destroyed||(this.refresher(),this.hasPendingPortalUpdate=!1)}),this.hasPendingPortalUpdate=!0)}waitForInstance(e,t,s=Date.now()){if(this.destroyed){t(null);return}if(e.rendered())t(e);else{if(Date.now()-s>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate){pr(!0,()=>this.refresher()),e.rendered()&&t(e);return}window.setTimeout(()=>{this.waitForInstance(e,t,s)})}}},n8=({ctrl:e})=>{const t=e.isAlive(),{context:s}=g.useContext(St),[i,o]=g.useState(),[n,r]=g.useState(),a=g.useRef(),l=g.useRef(null),c=g.useRef(null),d=g.useRef(null),u=g.useRef(),h=g.useRef();t&&!h.current&&(h.current=new br(()=>l.current));const p=g.useCallback(w=>{if(l.current=w,!w||!e.isAlive()||s.isDestroyed()){a.current=s.destroyBean(a.current);return}a.current=s.createBean(new an);const b=()=>{const y=e.getSelectAllGui();y&&(c.current?.insertAdjacentElement("afterend",y),a.current.addDestroyFunc(()=>y.remove()))},x={setWidth:y=>{l.current&&(l.current.style.width=y)},toggleCss:(y,S)=>h.current.toggleCss(y,S),setUserStyles:y=>r(y),setAriaSort:y=>{l.current&&(y?ry(l.current,y):ay(l.current))},setUserCompDetails:y=>o(y),getUserCompInstance:()=>u.current||void 0,refreshSelectAllGui:b,removeSelectAllGui:()=>e.getSelectAllGui()?.remove()};e.setComp(x,w,c.current,d.current,a.current),b()},[]);g.useLayoutEffect(()=>Fr(i,s,d.current,u),[i]),g.useEffect(()=>{e.setDragSource(l.current)},[i]);const f=g.useMemo(()=>!!(i?.componentFromFramework&&cn(i.componentClass)),[i]),v=i?.componentFromFramework,C=i?.componentClass;return g.createElement("div",{ref:p,style:n,className:"ag-header-cell",role:"columnheader"},g.createElement("div",{ref:c,className:"ag-header-cell-resize",role:"presentation"}),g.createElement("div",{ref:d,className:"ag-header-cell-comp-wrapper",role:"presentation"},v?f?g.createElement(C,{...i.params}):g.createElement(C,{...i.params,ref:u}):null))},r8=g.memo(n8),a8=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t}getProps(){return this.floatingFilterParams}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){Nl(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}},l8=({ctrl:e})=>{const{context:t,gos:s}=g.useContext(St),[i,o]=g.useState(),[n,r]=g.useState(()=>new ts("ag-header-cell","ag-floating-filter")),[a,l]=g.useState(()=>new ts),[c,d]=g.useState(()=>new ts("ag-floating-filter-button","ag-hidden")),[u,h]=g.useState("false"),[p,f]=g.useState(),[,v]=g.useState(1),C=g.useRef(),w=g.useRef(null),b=g.useRef(null),x=g.useRef(null),y=g.useRef(null),S=g.useRef(),F=g.useRef(),R=k=>{k!=null&&S.current&&S.current(k)},E=g.useCallback(k=>{if(w.current=k,!k||!e.isAlive()||t.isDestroyed()){C.current=t.destroyBean(C.current);return}C.current=t.createBean(new an),F.current=new Le(U=>{S.current=U});const V={toggleCss:(U,W)=>r(re=>re.setClass(U,W)),setUserStyles:U=>o(U),addOrRemoveBodyCssClass:(U,W)=>l(re=>re.setClass(U,W)),setButtonWrapperDisplayed:U=>{d(W=>W.setClass("ag-hidden",!U)),h(U?"false":"true")},setWidth:U=>{w.current&&(w.current.style.width=U)},setCompDetails:U=>f(U),getFloatingFilterComp:()=>F.current?F.current:null,setMenuIcon:U=>y.current?.appendChild(U)};e.setComp(V,k,y.current,b.current,C.current)},[]);g.useLayoutEffect(()=>Fr(p,t,b.current,R),[p]);const D=g.useMemo(()=>n.toString(),[n]),P=g.useMemo(()=>a.toString(),[a]),T=g.useMemo(()=>c.toString(),[c]),M=g.useMemo(()=>!!(p&&p.componentFromFramework&&cn(p.componentClass)),[p]),N=g.useMemo(()=>s.get("reactiveCustomComponents"),[]),q=g.useMemo(()=>s.get("enableFilterHandlers"),[]),[L,z]=g.useState();g.useEffect(()=>{if(p?.componentFromFramework)if(N){const k=q?a8:KA,V=new k(p.params,()=>v(U=>U+1));R(V),z(V)}else wh()},[p]);const H=L?.getProps(),A=p?.componentFromFramework,de=p?.componentClass;return g.createElement("div",{ref:E,style:i,className:D,role:"gridcell"},g.createElement("div",{ref:b,className:P,role:"presentation"},A?N?H&&g.createElement(Ch.Provider,{value:{setMethods:k=>L.setMethods(k)}},g.createElement(de,{...H})):g.createElement(de,{...p.params,ref:M?()=>{}:R}):null),g.createElement("div",{ref:x,"aria-hidden":u,className:T,role:"presentation"},g.createElement("button",{ref:y,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},c8=g.memo(l8),d8=({ctrl:e})=>{const{context:t}=g.useContext(St),[s,i]=g.useState(),[o,n]=g.useState(()=>new ts),[r,a]=g.useState(()=>new ts),[l,c]=g.useState("false"),[d,u]=g.useState(),[h,p]=g.useState(),f=g.useRef(),v=g.useRef(null),C=g.useRef(null),w=g.useRef(null),b=g.useRef(),x=g.useCallback(D=>{if(v.current=D,!D||!e.isAlive()||t.isDestroyed()){f.current=t.destroyBean(f.current);return}f.current=t.createBean(new an);const P={setWidth:T=>{v.current&&(v.current.style.width=T)},toggleCss:(T,M)=>n(N=>N.setClass(T,M)),setUserStyles:T=>i(T),setHeaderWrapperHidden:T=>{const M=w.current;M&&(T?M.style.setProperty("display","none"):M.style.removeProperty("display"))},setHeaderWrapperMaxHeight:T=>{const M=w.current;M&&(T!=null?M.style.setProperty("max-height",`${T}px`):M.style.removeProperty("max-height"),M.classList.toggle("ag-header-cell-comp-wrapper-limited-height",T!=null))},setUserCompDetails:T=>p(T),setResizableDisplayed:T=>{a(M=>M.setClass("ag-hidden",!T)),c(T?"false":"true")},setAriaExpanded:T=>u(T),getUserCompInstance:()=>b.current||void 0};e.setComp(P,D,C.current,w.current,f.current)},[]);g.useLayoutEffect(()=>Fr(h,t,w.current),[h]),g.useEffect(()=>{v.current&&e.setDragSource(v.current)},[h]);const y=g.useMemo(()=>!!(h?.componentFromFramework&&cn(h.componentClass)),[h]),S=g.useMemo(()=>"ag-header-group-cell "+o.toString(),[o]),F=g.useMemo(()=>"ag-header-cell-resize "+r.toString(),[r]),R=h?.componentFromFramework,E=h?.componentClass;return g.createElement("div",{ref:x,style:s,className:S,role:"columnheader","aria-expanded":d},g.createElement("div",{ref:w,className:"ag-header-cell-comp-wrapper",role:"presentation"},R?y?g.createElement(E,{...h.params}):g.createElement(E,{...h.params,ref:b}):null),g.createElement("div",{ref:C,"aria-hidden":l,className:F}))},u8=g.memo(d8),h8=({ctrl:e})=>{const{gos:t,context:s}=g.useContext(St),{topOffset:i,rowHeight:o}=g.useMemo(()=>e.getTopAndHeight(),[]),n=g.useMemo(()=>t.get("tabIndex"),[]),[r,a]=g.useState(()=>e.getAriaRowIndex()),l=e.headerRowClass,[c,d]=g.useState(()=>o+"px"),[u,h]=g.useState(()=>i+"px"),p=g.useRef(null),[f,v]=g.useState(()=>e.getUpdatedHeaderCtrls()),C=g.useRef(),w=g.useRef(null),b=g.useCallback(S=>{if(w.current=S,!S||!e.isAlive()||s.isDestroyed()){C.current=s.destroyBean(C.current);return}C.current=s.createBean(new an);const F={setHeight:R=>d(R),setTop:R=>h(R),setHeaderCtrls:(R,E,D)=>{const P=p.current,T=ul(P,R,E);T!==P&&(p.current=T,pr(D,()=>v(T)))},setWidth:R=>{w.current&&(w.current.style.width=R)},setRowIndex:R=>{a(R)}};e.setComp(F,C.current,!1)},[]),x=g.useMemo(()=>({height:c,top:u}),[c,u]),y=g.useCallback(S=>{switch(e.type){case"group":return g.createElement(u8,{ctrl:S,key:S.instanceId});case"filter":return g.createElement(c8,{ctrl:S,key:S.instanceId});default:return g.createElement(r8,{ctrl:S,key:S.instanceId})}},[]);return g.createElement("div",{ref:b,className:l,role:"row",style:x,tabIndex:n,"aria-rowindex":r},f.map(y))},p8=g.memo(h8),g8=({pinned:e})=>{const[t,s]=g.useState(!0),[i,o]=g.useState([]),{context:n}=g.useContext(St),r=g.useRef(null),a=g.useRef(null),l=g.useRef(),c=e==="left",d=e==="right",u=!c&&!d,h=g.useCallback(v=>{if(r.current=v,!v||n.isDestroyed()){l.current=n.destroyBean(l.current);return}l.current=n.createBean(new UF(e));const C={setDisplayed:s,setCtrls:w=>o(w),setCenterWidth:w=>{a.current&&(a.current.style.width=w)},setViewportScrollLeft:w=>{r.current&&(r.current.scrollLeft=w)},setPinnedContainerWidth:w=>{r.current&&(r.current.style.width=w,r.current.style.minWidth=w,r.current.style.maxWidth=w)}};l.current.setComp(C,r.current)},[]),p=t?"":"ag-hidden",f=()=>i.map(v=>g.createElement(p8,{ctrl:v,key:v.instanceId}));return c?g.createElement("div",{ref:h,className:"ag-pinned-left-header "+p,"aria-hidden":!t,role:"rowgroup"},f()):d?g.createElement("div",{ref:h,className:"ag-pinned-right-header "+p,"aria-hidden":!t,role:"rowgroup"},f()):u?g.createElement("div",{ref:h,className:"ag-header-viewport "+p,role:"rowgroup",tabIndex:-1},g.createElement("div",{ref:a,className:"ag-header-container",role:"presentation"},f())):null},td=g.memo(g8),f8=()=>{const[e,t]=g.useState(()=>new ts),[s,i]=g.useState(),{context:o}=g.useContext(St),n=g.useRef(null),r=g.useRef(),a=g.useCallback(d=>{if(n.current=d,!d||o.isDestroyed()){r.current=o.destroyBean(r.current);return}r.current=o.createBean(new zF);const u={toggleCss:(h,p)=>t(f=>f.setClass(h,p)),setHeightAndMinHeight:h=>i(h)};r.current.setComp(u,d,d)},[]),l=g.useMemo(()=>"ag-header "+e.toString(),[e]),c=g.useMemo(()=>({height:s,minHeight:s}),[s]);return g.createElement("div",{ref:a,className:l,style:c,role:"presentation"},g.createElement(td,{pinned:"left"}),g.createElement(td,{pinned:null}),g.createElement(td,{pinned:"right"}))},m8=g.memo(f8),v8=(e,t)=>{g.useEffect(()=>{const s=t.current;if(s){const i=s.parentElement;if(i){const o=document.createComment(e);return i.insertBefore(o,s),()=>{o.remove()}}}},[e])},Fi=v8,C8=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new Le(s=>{this.resolveInstanceCreated=s}),this.onValueChange=s=>this.updateValue(s),this.value=e.value}getProps(){return{...this.cellEditorParams,initialValue:this.cellEditorParams.value,value:this.value,onValueChange:this.onValueChange}}getValue(){return this.value}refresh(e){this.cellEditorParams=e,this.refreshProps()}setMethods(e){Nl(this.getOptionalMethods(),e,this)}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}setRef(e){this.componentInstance=e,this.resolveInstanceCreated?.(),this.resolveInstanceCreated=void 0}getOptionalMethods(){return["isCancelBeforeStart","isCancelAfterEnd","focusIn","focusOut","afterGuiAttached","getValidationErrors","getValidationElement"]}updateValue(e){this.value=e,this.refreshProps()}},w8=e=>{const t=g.useRef(e),s=g.useRef(),i=g.useRef(!1),o=g.useRef(!1),[,n]=g.useState(0);i.current&&(o.current=!0),g.useEffect(()=>(i.current||(s.current=t.current(),i.current=!0),n(r=>r+1),()=>{o.current&&s.current?.()}),[])},b8=e=>{const[t,s]=g.useState(),i=g.useContext(St),{context:o,popupSvc:n,gos:r,editSvc:a}=i,{editDetails:l,cellCtrl:c,eParentCell:d}=e;return w8(()=>{const{compDetails:u}=l,h=r.get("stopEditingWhenCellsLoseFocus");let p,f;if(!o.isDestroyed()){f=o.createBean(a.createPopupEditorWrapper(u.params));const v=f.getGui();if(e.jsChildComp){const S=e.jsChildComp.getGui();S&&v.appendChild(S)}const{column:C,rowNode:w}=c,b={column:C,rowNode:w,type:"popupCellEditor",eventSource:d,ePopup:v,position:l.popupPosition,keepWithinBounds:!0},x=n?.positionPopupByComponent.bind(n,b),y=n?.addPopup({modal:h,eChild:v,closeOnEsc:!0,closedCallback:()=>{c.onPopupEditorClosed()},anchorToElement:d,positionCallback:x,ariaOwns:d});p=y?y.hideFunc:void 0,s(f),e.jsChildComp?.afterGuiAttached?.()}return()=>{p?.(),o.destroyBean(f)}}),g.useLayoutEffect(()=>()=>{c.isCellFocused()&&t?.getGui().contains(et(i))&&d.focus({preventScroll:!0})},[t]),t&&e.wrappedContent?tn.createPortal(e.wrappedContent,t.getGui()):null},Hg=g.memo(b8),x8=(e,t,s)=>{const{compProxy:i}=e;s(i);const o=i.getProps(),n=cn(t);return g.createElement(Ch.Provider,{value:{setMethods:r=>i.setMethods(r)}},n?g.createElement(t,{...o}):g.createElement(t,{...o,ref:r=>i.setRef(r)}))},Gg=(e,t,s)=>e.compProxy?x8(e,t,s):g.createElement(t,{...e.compDetails.params,ref:s}),y8=(e,t,s,i,o)=>{const n=e.compDetails,r=n.componentClass,a=n.componentFromFramework&&!e.popup,l=n.componentFromFramework&&e.popup,c=!n.componentFromFramework&&e.popup;return a?Gg(e,r,t):l?g.createElement(Hg,{editDetails:e,cellCtrl:i,eParentCell:s,wrappedContent:Gg(e,r,t)}):c&&o?g.createElement(Hg,{editDetails:e,cellCtrl:i,eParentCell:s,jsChildComp:o}):null},S8=(e,t,s,i,o,n)=>{const{context:r}=g.useContext(St),a=g.useCallback(()=>{const l=o.current;if(!l)return;const c=l.getGui();c&&c.parentElement&&c.remove(),r.destroyBean(l),o.current=void 0},[]);g.useEffect(()=>{const l=e!=null,c=e?.compDetails&&!e.compDetails.componentFromFramework,d=t&&s==null;if(!(l&&c&&!d)){a();return}const h=e.compDetails;if(o.current){const f=o.current,C=f.refresh!=null&&e.force==!1?f.refresh(h.params):!1;if(C===!0||C===void 0)return;a()}h.newAgStackInstance().then(f=>{if(!f)return;const v=f.getGui();if(!v)return;(t?s:n.current).appendChild(v),o.current=f})},[e,t,i]),g.useEffect(()=>a,[])},YC=S8,R8=({cellCtrl:e,parent:t})=>{const s=g.useRef(),i=g.useMemo(()=>{const{loadingComp:o}=e.getDeferLoadingCellRenderer();return o?{value:void 0,compDetails:o,force:!1}:void 0},[e]);if(YC(i,!1,void 0,1,s,t),i?.compDetails?.componentFromFramework){const o=i.compDetails.componentClass;return g.createElement(o,{...i.compDetails.params})}return g.createElement(g.Fragment,null)},F8=({cellCtrl:e,printLayout:t,editingCell:s})=>{const i=g.useContext(St),{context:o}=i,{column:{colIdSanitised:n},instanceId:r}=e,a=g.useRef(),[l,c]=g.useState(()=>e.isCellRenderer()?void 0:{compDetails:void 0,value:e.getValueToDisplay(),force:!1}),[d,u]=g.useState(),[h,p]=g.useState(1),[f,v]=g.useState(),[C,w]=g.useState(!1),[b,x]=g.useState(!1),[y,S]=g.useState(!1),[F,R]=g.useState(),E=g.useMemo(()=>e.isForceWrapper(),[e]),D=g.useMemo(()=>e.getCellAriaRole(),[e]),P=g.useRef(null),T=g.useRef(null),M=g.useRef(null),N=g.useRef(),q=g.useRef(),L=g.useRef(),z=g.useRef([]),H=g.useRef(),A=g.useRef(),[de,k]=g.useState(0),V=g.useCallback(ie=>{A.current=ie,k(le=>le+1)},[]),U=l!=null&&(C||y||b)&&(d==null||!!d.popup),W=E||U,re=g.useMemo(()=>e.getCellValueClass(),[e]),be=g.useCallback(ie=>{if(q.current=ie,ie){const le=ie.isCancelBeforeStart&&ie.isCancelBeforeStart();setTimeout(()=>{le?(e.stopEditing(!0),e.focusCell(!0)):(e.cellEditorAttached(),e.enableEditorTooltipFeature(ie))})}},[e]),Q=g.useRef();Q.current||(Q.current=new br(()=>P.current)),YC(l,W,A.current,de,N,P);const j=g.useRef();g.useLayoutEffect(()=>{const ie=j.current,le=l;if(j.current=l,ie==null||ie.compDetails==null||le==null||le.compDetails==null)return;H.current?.refreshVisibility();const Fe=ie.compDetails,Oe=le.compDetails;if(Fe.componentClass!=Oe.componentClass||M.current?.refresh==null)return;M.current.refresh(Oe.params)!=!0&&p(Ee=>Ee+1)},[l]),g.useLayoutEffect(()=>{if(!(d&&!d.compDetails.componentFromFramework)||o.isDestroyed())return;const le=d.compDetails,Fe=d.popup===!0,Oe=le.newAgStackInstance();return Oe.then(Ce=>{if(!Ce)return;const Ee=Ce.getGui();be(Ce),Fe||((E?L:P).current?.appendChild(Ee),Ce.afterGuiAttached?.()),R(Ce)}),()=>{Oe.then(Ce=>{const Ee=Ce.getGui();e.disableEditorTooltipFeature(),o.destroyBean(Ce),be(void 0),R(void 0),Ee?.remove()})}},[d]);const ge=g.useCallback(ie=>{if(L.current=ie,!ie||o.isDestroyed()||!e.isAlive()){const Oe=z.current;z.current=[];for(const Ce of Oe)Ce();return}let le;const Fe=Oe=>{Oe&&(ie.insertAdjacentElement("afterbegin",Oe.getGui()),z.current.push(()=>{ai(Oe.getGui()),o.destroyBean(Oe),H.current===le&&(H.current=void 0)}))};C&&Fe(e.createSelectionCheckbox()),y&&Fe(e.createDndSource()),b&&(le=e.createRowDragComp(),H.current=le,le&&(Fe(le),le.refreshVisibility()))},[e,o,y,b,C]),oe=g.useCallback(()=>{const ie=!e.isCellSpanning()||T.current,le=P.current;if(!le||!ie||!e||!e.isAlive()||o.isDestroyed()){a.current=o.destroyBean(a.current);return}a.current=o.createBean(new an);const Fe={toggleCss:(Ce,Ee)=>Q.current.toggleCss(Ce,Ee),setUserStyles:Ce=>v(Ce),getFocusableElement:()=>P.current,setIncludeSelection:Ce=>w(Ce),setIncludeRowDrag:Ce=>x(Ce),setIncludeDndSource:Ce=>S(Ce),getCellEditor:()=>q.current??null,getCellRenderer:()=>M.current??N.current,getParentOfValue:()=>A.current??L.current??P.current,setRenderDetails:(Ce,Ee,_e)=>{const Ue=()=>{c(Ae=>Ae?.compDetails!==Ce||Ae?.value!==Ee||Ae?.force!==_e?{value:Ee,compDetails:Ce,force:_e}:Ae)};if(Ce?.params?.deferRender&&!e.rowNode.group){const{loadingComp:Ae,onReady:kt}=e.getDeferLoadingCellRenderer();if(Ae){c({value:void 0,compDetails:Ae,force:!1}),kt.then(()=>GA(Ue));return}}Ue()},setEditDetails:(Ce,Ee,_e,Ue)=>{if(Ce){let Ae;Ce.componentFromFramework&&(Ue?Ae=new C8(Ce.params,()=>p(kt=>kt+1)):wh()),u({compDetails:Ce,popup:Ee,popupPosition:_e,compProxy:Ae}),Ee||c(void 0)}else e.hasBrowserFocus()&&Fe.getFocusableElement().focus({preventScroll:!0}),q.current=void 0,u(void 0)},refreshEditStyles:(Ce,Ee)=>{if(!P.current)return;const{current:_e}=Q;_e.toggleCss("ag-cell-value",!W),_e.toggleCss("ag-cell-inline-editing",!!Ce&&!Ee),_e.toggleCss("ag-cell-popup-editing",!!Ce&&!!Ee),_e.toggleCss("ag-cell-not-inline-editing",!Ce||!!Ee)}},Oe=L.current||void 0;e.setComp(Fe,le,T.current??void 0,Oe,t,s,a.current)},[]),Z=g.useCallback(ie=>{P.current=ie,oe()},[]),_=g.useCallback(ie=>{T.current=ie,oe()},[]),ae=g.useMemo(()=>!!(l?.compDetails?.componentFromFramework&&cn(l.compDetails.componentClass)),[l]);g.useLayoutEffect(()=>{if(!P.current)return;const{current:ie}=Q;ie.toggleCss("ag-cell-value",!W),ie.toggleCss("ag-cell-inline-editing",!!d&&!d.popup),ie.toggleCss("ag-cell-popup-editing",!!d&&!!d.popup),ie.toggleCss("ag-cell-not-inline-editing",!d||!!d.popup)});const G=()=>{const{compDetails:ie,value:le}=l;if(!ie)return le?.toString?.()??le;if(ie.componentFromFramework){const Fe=ie.componentClass;return g.createElement(g.Suspense,{fallback:g.createElement(R8,{cellCtrl:e,parent:P})},ae?g.createElement(Fe,{...ie.params,key:h}):g.createElement(Fe,{...ie.params,key:h,ref:M}))}},fe=()=>{const ie=()=>l==null?null:W?g.createElement("span",{role:"presentation",id:`cell-${r}`,className:re,ref:V},G()):G(),le=Fe=>y8(Fe,be,P.current,e,F);return d!=null?d.popup?g.createElement(g.Fragment,null,ie(),le(d)):le(d):ie()},he=()=>g.createElement("div",{ref:Z,style:f,role:D,"col-id":n},W?g.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:ge},fe()):fe());return e.isCellSpanning()?g.createElement("div",{ref:_,className:"ag-spanned-cell-wrapper",role:"presentation"},he()):he()},E8=g.memo(F8),D8=({rowCtrl:e,containerType:t})=>{const{context:s,gos:i,editSvc:o}=g.useContext(St),n=g.useContext(jC)==="default",r=g.useRef(),a=g.useRef(e.getDomOrder()),l=e.isFullWidth(),c=e.rowNode.displayed,[d,u]=g.useState(()=>c?e.rowNode.getRowIndexString():null),[h,p]=g.useState(()=>e.rowId),[f,v]=g.useState(()=>e.businessKey),[C,w]=g.useState(()=>e.rowStyles),b=g.useRef(null),[x,y]=g.useState(()=>null),[S,F]=g.useState(),[R,E]=g.useState(()=>c?e.getInitialRowTop(t):void 0),[D,P]=g.useState(()=>c?e.getInitialTransform(t):void 0),T=g.useRef(null),M=g.useRef(),N=g.useRef(),q=g.useRef(!1),[L,z]=g.useState(0);g.useEffect(()=>{if(q.current||!S||L>10)return;const Z=T.current?.firstChild;Z?(e.setupDetailRowAutoHeight(Z),q.current=!0):z(_=>_+1)},[S,L]);const H=g.useRef();H.current||(H.current=new br(()=>T.current));const A=g.useRef(()=>{}),de=g.useCallback(Z=>(A.current=Z,()=>{A.current=()=>{}}),[]),k=BA(de,()=>b.current,[]),V=n?k:x,U=g.useCallback(Z=>{if(T.current=Z,r.current=Z?s.createBean(new an):s.destroyBean(r.current),!Z){e.unsetComp(t);return}if(!e.isAlive()||s.isDestroyed())return;const _={setTop:E,setTransform:P,toggleCss:(ae,G)=>H.current.toggleCss(ae,G),setDomOrder:ae=>a.current=ae,setRowIndex:u,setRowId:p,setRowBusinessKey:v,setUserStyles:w,setCellCtrls:(ae,G)=>{const fe=b.current,he=ul(fe,ae,a.current);he!==fe&&(b.current=he,n?A.current():pr(G,()=>y(he)))},showFullWidth:ae=>{N.current=ae.params,F(ae)},getFullWidthCellRenderer:()=>M.current,getFullWidthCellRendererParams:()=>N.current,refreshFullWidth:ae=>{const G=ae();return N.current=G,j.current?(F(fe=>({...fe,params:G})),!0):!M.current||!M.current.refresh?!1:M.current.refresh(G)}};e.setComp(_,Z,t,r.current)},[]);g.useLayoutEffect(()=>Fr(S,s,T.current,M),[S]);const W=g.useMemo(()=>{const Z={top:R,transform:D};return Object.assign(Z,C),Z},[R,D,C]),re=l&&S?.componentFromFramework,be=!l&&V!=null,Q=g.useMemo(()=>!!(S?.componentFromFramework&&cn(S.componentClass)),[S]),j=g.useRef(!1);g.useEffect(()=>{j.current=Q&&!!S&&!!i.get("reactiveCustomComponents")},[Q,S]);const ge=()=>V?.map(Z=>g.createElement(E8,{cellCtrl:Z,editingCell:o?.isEditing(Z,{withOpenEditor:!0})??!1,printLayout:e.printLayout,key:Z.instanceId})),oe=()=>{const Z=S.componentClass;return Q?g.createElement(Z,{...S.params}):g.createElement(Z,{...S.params,ref:M})};return g.createElement("div",{ref:U,role:"row",style:W,"row-index":d,"row-id":h,"row-business-key":f},be?ge():re?oe():null)},Bg=g.memo(D8),P8=({name:e})=>{const{context:t,gos:s}=g.useContext(St),i=g.useMemo(()=>yr(e),[e]),o=g.useRef(null),n=g.useRef(null),r=g.useRef(null),a=g.useRef([]),l=g.useRef([]),[c,d]=g.useState(()=>[]),u=!!s.get("enableCellSpan")&&!!i.getSpannedRowCtrls,h=g.useRef([]),p=g.useRef([]),[f,v]=g.useState(()=>[]),C=g.useRef(!1),w=g.useRef(),b=g.useMemo(()=>Xt("ag-viewport",hv(e)),[e]),x=g.useMemo(()=>Xt(Aa(e)),[e]),y=g.useMemo(()=>Xt("ag-spanning-container",uF(e)),[e]),S=i.type==="center"||u,F=S?o:n;Fi(" AG Row Container "+e+" ",F);const R=g.useCallback(()=>{const L=!S||o.current!=null,z=n.current!=null,H=!u||r.current!=null;return L&&z&&H},[]),E=g.useCallback(()=>o.current==null&&n.current==null&&r.current==null,[]),D=g.useCallback(()=>{if(E()&&(w.current=t.destroyBean(w.current)),!t.isDestroyed()&&R()){const L=A=>{const de=ul(l.current,a.current,C.current);de!==l.current&&(l.current=de,pr(A,()=>d(de)))},z=A=>{const de=ul(p.current,h.current,C.current);de!==p.current&&(p.current=de,pr(A,()=>v(de)))},H={setHorizontalScroll:A=>{o.current&&(o.current.scrollLeft=A)},setViewportHeight:A=>{o.current&&(o.current.style.height=A)},setRowCtrls:({rowCtrls:A,useFlushSync:de})=>{const k=!!de&&a.current.length>0&&A.length>0;a.current=A,L(k)},setSpannedRowCtrls:(A,de)=>{const k=!!de&&h.current.length>0&&A.length>0;h.current=A,z(k)},setDomOrder:A=>{C.current!=A&&(C.current=A,L(!1))},setContainerWidth:A=>{n.current&&(n.current.style.width=A)},setOffsetTop:A=>{n.current&&(n.current.style.transform=`translateY(${A})`)}};w.current=t.createBean(new xF(e)),w.current.setComp(H,n.current,r.current??void 0,o.current)}},[R,E]),P=g.useCallback(L=>{n.current=L,D()},[D]),T=g.useCallback(L=>{r.current=L,D()},[D]),M=g.useCallback(L=>{o.current=L,D()},[D]),N=()=>g.createElement("div",{className:x,ref:P,role:S?"presentation":"rowgroup"},c.map(L=>g.createElement(Bg,{rowCtrl:L,containerType:i.type,key:L.instanceId})));if(!S)return N();const q=()=>g.createElement("div",{className:y,ref:T,role:"presentation"},f.map(L=>g.createElement(Bg,{rowCtrl:L,containerType:i.type,key:L.instanceId})));return g.createElement("div",{className:b,ref:M,role:"rowgroup"},N(),u?q():null)},T8=g.memo(P8),k8=()=>{const e=g.useContext(St),{context:t,overlays:s}=e,[i,o]=g.useState(""),[n,r]=g.useState(0),[a,l]=g.useState(0),[c,d]=g.useState("0px"),[u,h]=g.useState("0px"),[p,f]=g.useState("100%"),[v,C]=g.useState("0px"),[w,b]=g.useState("0px"),[x,y]=g.useState("100%"),[S,F]=g.useState(!0),[R,E]=g.useState(!0),[D,P]=g.useState(null),[T,M]=g.useState(""),[N,q]=g.useState(null),[L,z]=g.useState("ag-layout-normal"),H=g.useRef();H.current||(H.current=new br(()=>A.current));const A=g.useRef(null),de=g.useRef(null),k=g.useRef(null),V=g.useRef(null),U=g.useRef(null),W=g.useRef(null),re=g.useRef(null),be=g.useRef([]),Q=g.useRef([]);Fi(" AG Grid Body ",A),Fi(" AG Pinned Top ",de),Fi(" AG Sticky Top ",k),Fi(" AG Middle ",W),Fi(" AG Pinned Bottom ",re);const j=g.useCallback(Ee=>{if(A.current=Ee,!Ee||t.isDestroyed()){be.current=t.destroyBeans(be.current);for(const Ge of Q.current)Ge();Q.current=[];return}const _e=(Ge,K)=>{Ge.appendChild(K),Q.current.push(()=>K.remove())},Ue=Ge=>{const K=t.createBean(new Ge);return be.current.push(K),K},Ae=(Ge,K,He)=>{_e(Ge,document.createComment(He)),_e(Ge,Ue(K).getGui())};Ae(Ee,PF," AG Fake Horizontal Scroll ");const kt=s?.getOverlayWrapperCompClass();kt&&Ae(Ee,kt," AG Overlay Wrapper "),U.current&&Ae(U.current,kF," AG Fake Vertical Scroll ");const os={setRowAnimationCssOnBodyViewport:o,setColumnCount:Ge=>{A.current&&oy(A.current,Ge)},setRowCount:Ge=>{A.current&&sy(A.current,Ge)},setTopHeight:r,setBottomHeight:l,setStickyTopHeight:d,setStickyTopTop:h,setStickyTopWidth:f,setTopInvisible:F,setBottomInvisible:E,setColumnMovingCss:(Ge,K)=>H.current.toggleCss(Ge,K),updateLayoutClasses:z,setAlwaysVerticalScrollClass:P,setPinnedTopBottomOverflowY:M,setCellSelectableCss:(Ge,K)=>q(K?Ge:null),setBodyViewportWidth:Ge=>{W.current&&(W.current.style.width=Ge)},registerBodyViewportResizeListener:Ge=>{if(W.current){const K=Us(e,W.current,Ge);Q.current.push(()=>K())}},setStickyBottomHeight:C,setStickyBottomBottom:b,setStickyBottomWidth:y,setGridRootRole:Ge=>Ee.setAttribute("role",Ge)},Mt=t.createBean(new FF);be.current.push(Mt),Mt.setComp(os,Ee,W.current,de.current,re.current,k.current,V.current)},[]),ge=g.useMemo(()=>Xt("ag-root","ag-unselectable",L),[L]),oe=g.useMemo(()=>Xt("ag-body-viewport",i,L,D,N),[i,L,D,N]),Z=g.useMemo(()=>Xt("ag-body",L),[L]),_=g.useMemo(()=>Xt("ag-floating-top",S?"ag-invisible":null,N),[N,S]),ae=g.useMemo(()=>Xt("ag-sticky-top",N),[N]),G=g.useMemo(()=>Xt("ag-sticky-bottom",v==="0px"?"ag-invisible":null,N),[N,v]),fe=g.useMemo(()=>Xt("ag-floating-bottom",R?"ag-invisible":null,N),[N,R]),he=g.useMemo(()=>({height:n,minHeight:n,overflowY:T}),[n,T]),ie=g.useMemo(()=>({height:c,top:u,width:p}),[c,u,p]),le=g.useMemo(()=>({height:v,bottom:w,width:x}),[v,w,x]),Fe=g.useMemo(()=>({height:a,minHeight:a,overflowY:T}),[a,T]),Oe=Ee=>g.createElement(T8,{name:Ee,key:`${Ee}-container`}),Ce=({section:Ee,children:_e,className:Ue,style:Ae})=>g.createElement("div",{ref:Ee,className:Ue,role:"presentation",style:Ae},_e.map(Oe));return g.createElement("div",{ref:j,className:ge},g.createElement(m8,null),Ce({section:de,className:_,style:he,children:["topLeft","topCenter","topRight","topFullWidth"]}),g.createElement("div",{className:Z,ref:U,role:"presentation"},Ce({section:W,className:oe,children:["left","center","right","fullWidth"]})),Ce({section:k,className:ae,style:ie,children:["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"]}),Ce({section:V,className:G,style:le,children:["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"]}),Ce({section:re,className:fe,style:Fe,children:["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"]}))},M8=g.memo(k8),I8=(e,t)=>{const{children:s,eFocusableElement:i,onTabKeyDown:o,gridCtrl:n,forceFocusOutWhenTabGuardsAreEmpty:r,isEmpty:a}=e,{context:l}=g.useContext(St),c=g.useRef(null),d=g.useRef(null),u=g.useRef(),h=w=>{const b=w==null?void 0:parseInt(w,10).toString();for(const x of[c,d])b===void 0?x.current?.removeAttribute("tabindex"):x.current?.setAttribute("tabindex",b)};g.useImperativeHandle(t,()=>({forceFocusOutOfContainer(w){u.current?.forceFocusOutOfContainer(w)}}));const p=g.useCallback(()=>{const w=c.current,b=d.current;if(!w&&!b||l.isDestroyed()){u.current=l.destroyBean(u.current);return}if(w&&b){const x={setTabIndex:h};u.current=l.createBean(new Rv({comp:x,eTopGuard:w,eBottomGuard:b,eFocusableElement:i,onTabKeyDown:o,forceFocusOutWhenTabGuardsAreEmpty:r,focusInnerElement:y=>n.focusInnerElement(y),isEmpty:a}))}},[]),f=g.useCallback(w=>{c.current=w,p()},[p]),v=g.useCallback(w=>{d.current=w,p()},[p]),C=w=>{const b=w==="top"?Vo.TAB_GUARD_TOP:Vo.TAB_GUARD_BOTTOM;return g.createElement("div",{className:`${Vo.TAB_GUARD} ${b}`,role:"presentation",ref:w==="top"?f:v})};return g.createElement(g.Fragment,null,C("top"),s,C("bottom"))},A8=g.forwardRef(I8),L8=g.memo(A8),O8=({context:e})=>{const[t,s]=g.useState(""),[i,o]=g.useState(""),[n,r]=g.useState(null),[a,l]=g.useState(null),[c,d]=g.useState(!1),[u,h]=g.useState(),p=g.useRef(),f=g.useRef(null),v=g.useRef(),[C,w]=g.useState(null),b=g.useRef(()=>{}),x=g.useRef(),y=g.useRef([]),S=g.useCallback(()=>{},[]);Fi(" AG Grid ",f);const F=g.useCallback(M=>{if(f.current=M,p.current=M?e.createBean(new DE):e.destroyBean(p.current),!M||e.isDestroyed())return;const N=p.current;b.current=N.focusInnerElement.bind(N);const q={destroyGridUi:()=>{},setRtlClass:s,forceFocusOutOfContainer:L=>{if(!L&&x.current?.isDisplayed()){x.current.forceFocusOutOfContainer(L);return}v.current?.forceFocusOutOfContainer(L)},updateLayoutClasses:o,getFocusableContainers:()=>{const L=[],z=f.current?.querySelector(".ag-root");z&&L.push({getGui:()=>z});for(const H of y.current)H.isDisplayed()&&L.push(H);return L},setCursor:r,setUserSelect:l};N.setComp(q,M,M),d(!0)},[]);g.useEffect(()=>{const M=p.current,N=f.current;if(!u||!M||!C||!N||e.isDestroyed())return;const q=[],{watermarkSelector:L,paginationSelector:z,sideBarSelector:H,statusBarSelector:A,gridHeaderDropZonesSelector:de}=M.getOptionalSelectors(),k=[];if(de){const U=e.createBean(new de.component),W=U.getGui();N.insertAdjacentElement("afterbegin",W),k.push(W),q.push(U)}if(H){const U=e.createBean(new H.component),W=U.getGui(),re=C.querySelector(".ag-tab-guard-bottom");re&&(re.insertAdjacentElement("beforebegin",W),k.push(W)),q.push(U),y.current.push(U)}const V=U=>{const W=e.createBean(new U),re=W.getGui();return N.insertAdjacentElement("beforeend",re),k.push(re),q.push(W),W};if(A&&V(A.component),z){const U=V(z.component);x.current=U,y.current.push(U)}return L&&V(L.component),()=>{e.destroyBeans(q);for(const U of k)U.remove()}},[u,C,e]);const R=g.useMemo(()=>Xt("ag-root-wrapper",t,i),[t,i]),E=g.useMemo(()=>Xt("ag-root-wrapper-body","ag-focus-managed",i),[i]),D=g.useMemo(()=>({userSelect:a??"",WebkitUserSelect:a??"",cursor:n??""}),[a,n]),P=g.useCallback(M=>{v.current=M,h(M!==null)},[]),T=g.useCallback(()=>!p.current?.isFocusable(),[]);return g.createElement("div",{ref:F,className:R,style:D,role:"presentation"},g.createElement("div",{className:E,ref:w,role:"presentation"},c&&C&&!e.isDestroyed()&&g.createElement(St.Provider,{value:e.getBeans()},g.createElement(L8,{ref:P,eFocusableElement:C,onTabKeyDown:S,gridCtrl:p.current,forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:T},g.createElement(M8,null)))))},N8=g.memo(O8),H8=class extends O{postConstruct(){if(this.beans.colAutosize){const e=this.queueResizeOperationsForTick.bind(this);this.addManagedEventListeners({rowExpansionStateChanged:e,expandOrCollapseAll:e,cellValueChanged:e,rowNodeDataChanged:e,rowDataUpdated:e})}}queueResizeOperationsForTick(){const e=this.beans.colAutosize;e.shouldQueueResizeOperations=!0,setTimeout(()=>{e.processResizeOperations()},0)}areHeaderCellsRendered(){return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().every(e=>e.getAllCtrls().every(t=>t.areCellsRendered()))}areCellsRendered(){return this.beans.rowRenderer.getAllRowCtrls().every(e=>e.isRowRendered()&&e.getAllCellCtrls().every(t=>!!t.eGui))}},XC={setGridApi:void 0,maxComponentCreationTimeMs:void 0,children:void 0},G8={gridOptions:void 0,modules:void 0,containerStyle:void 0,className:void 0,passGridApi:void 0,componentWrappingElement:void 0,...XC},ZC=new Set(Object.keys(G8)),B8=new Set(Object.keys(XC)),QC=e=>{const t=g.useRef(),s=g.useRef(null),i=g.useRef(null),o=g.useRef([]),n=g.useRef([]),r=g.useRef(e),a=g.useRef(),l=g.useRef(),c=g.useRef(!1),[d,u]=g.useState(void 0),[,h]=g.useState(0),p=g.useCallback(w=>{if(s.current=w,!w){for(const T of o.current)T();o.current.length=0;return}const b=e.modules||[];i.current||(i.current=new o8(()=>h(T=>T+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),o.current.push(()=>{i.current?.destroy(),i.current=null}));const x=oS(e.gridOptions,e,Object.keys(e).filter(T=>!ZC.has(T))),y=()=>{if(c.current){const T=()=>a.current?.shouldQueueUpdates()?void 0:n.current.shift();let M=T();for(;M;)M(),M=T()}},S=new j8(y);a.current=S;const F=new H8,R={providedBeanInstances:{frameworkCompWrapper:new z8(i.current,x),renderStatus:F},modules:b,frameworkOverrides:S,setThemeOnGridDiv:!0},E=T=>{u(T),T.createBean(F),o.current.push(()=>{T.destroy()}),T.getBean("ctrlsSvc").whenReady({addDestroyFunc:M=>{o.current.push(M)}},()=>{if(T.isDestroyed())return;const M=t.current;M&&e.passGridApi?.(M)})},D=T=>{T.getBean("ctrlsSvc").whenReady({addDestroyFunc:M=>{o.current.push(M)}},()=>{for(const M of n.current)M();n.current.length=0,c.current=!0})},P=new JT;x.gridId??(x.gridId=l.current),t.current=P.create(w,x,E,D,R),o.current.push(()=>{t.current=void 0}),t.current&&(l.current=t.current.getGridId())},[]),f=g.useMemo(()=>({height:"100%",...e.containerStyle||{}}),[e.containerStyle]),v=g.useCallback(w=>{c.current&&!a.current?.shouldQueueUpdates()?w():n.current.push(w)},[]);g.useEffect(()=>{const w=V8(r.current,e);r.current=e,v(()=>{t.current&&nS(w,t.current)})},[e]);const C=!g.useSyncExternalStore||Pa(e,"renderingMode")==="legacy"?"legacy":"default";return g.createElement("div",{style:f,className:e.className,ref:p},g.createElement(jC.Provider,{value:C},d&&!d.isDestroyed()?g.createElement(N8,{key:d.instanceId,context:d}):null,i.current?.getPortals()??null))};function V8(e,t){const s={};for(const i of Object.keys(t)){if(ZC.has(i)){B8.has(i)&&$(274,{prop:i});continue}const o=t[i];e[i]!==o&&(s[i]=o)}return s}var z8=class extends o4{constructor(e,t){super(),this.parent=e,this.gridOptions=t}createWrapper(e,t){const s=this.gridOptions;if(Pa(s,"reactiveCustomComponents")){const r=(a=>{switch(a){case"filter":return Pa(s,"enableFilterHandlers")?qA:$A;case"floatingFilterComponent":return Pa(s,"enableFilterHandlers")?XA:YA;case"dateComponent":return _A;case"dragAndDropImageComponent":return UA;case"loadingOverlayComponent":return QA;case"noRowsOverlayComponent":return e8;case"statusPanel":return t8;case"toolPanel":return s8;case"menuItem":return JA;case"cellRenderer":return jA;case"innerHeaderComponent":return ZA}})(t.name);if(r)return new r(e,this.parent,t)}else switch(t.name){case"filter":case"floatingFilterComponent":case"dateComponent":case"dragAndDropImageComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"statusPanel":case"toolPanel":case"menuItem":case"cellRenderer":wh();break}const o=!t.cellRenderer&&t.name!=="toolPanel";return new qC(e,this.parent,t,o)}},W8=g.forwardRef((e,t)=>{const s=g.useContext(St),{registry:i,context:o,gos:n,rowModel:r}=s,[a,l]=g.useState(()=>new ts),[c,d]=g.useState(()=>new ts),[u,h]=g.useState(),[p,f]=g.useState(),v=g.useRef(),C=g.useRef(null),w=g.useRef(),b=g.useMemo(()=>Ny(e.api.getGridId(),u?.rowModelType??"clientSide"),[e]),x=g.useMemo(()=>a.toString()+" ag-details-row",[a]),y=g.useMemo(()=>c.toString()+" ag-details-grid",[c]);t&&g.useImperativeHandle(t,()=>({refresh(){return v.current?.refresh()??!1}})),e.template&&$(230);const S=g.useCallback(R=>{if(C.current=R,!R||o.isDestroyed()){v.current=o.destroyBean(v.current),w.current?.();return}const E={toggleCss:(P,T)=>l(M=>M.setClass(P,T)),toggleDetailGridCss:(P,T)=>d(M=>M.setClass(P,T)),setDetailGrid:P=>h(P),setRowData:P=>f(P),getGui:()=>C.current},D=i.createDynamicBean("detailCellRendererCtrl",!0);if(D&&(o.createBean(D),D.init(E,e),v.current=D,n.get("detailRowAutoHeight"))){const P=()=>{if(C.current==null)return;const T=C.current.clientHeight;T!=null&&T>0&&setTimeout(()=>{e.node.setRowHeight(T),(st(n)||Xi(n))&&r.onRowHeightChanged()},0)};w.current=Us(s,R,P),P()}},[]),F=g.useCallback(R=>{v.current?.registerDetailWithMaster(R)},[]);return g.createElement("div",{className:x,ref:S},u&&g.createElement(QC,{className:y,...u,modules:b,rowData:p,passGridApi:F}))}),j8=class extends Fv{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.renderingEngine="react",this.frameworkComponents={agGroupCellRenderer:Og,agGroupRowRenderer:Og,agDetailCellRenderer:W8},this.wrapIncoming=(t,s)=>s==="ensureVisible"?HA(t):t()}frameworkComponent(e){return this.frameworkComponents[e]}isFrameworkComponent(e){if(!e)return!1;const t=e.prototype;return!(t&&"getGui"in t)}getLockOnRefresh(){this.queueUpdates=!0}releaseLockOnRefresh(){this.queueUpdates=!1,this.processQueuedUpdates()}shouldQueueUpdates(){return this.queueUpdates}runWhenReadyAsync(){return NA()}},_8=class extends g.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=e=>{this.api=e;for(const t of this.apiListeners)t(e)}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return g.createElement(QC,{...this.props,passGridApi:this.setGridApi})}},JC=(e=>(e.Dropdown="dropdown",e.Menu="menu",e))(JC||{}),Bt=(e=>(e.Click="click",e.Hover="hover",e.ContextMenu="contextMenu",e))(Bt||{}),Qo=(e=>(e.Item="item",e.Divider="divider",e.PlainText="plainText",e))(Qo||{});const U8=pe("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),$8=pe("z-[53] overflow-auto rounded bg-layer-0 text-primary shadow focus-visible:outline-none"),q8=pe("flex w-full cursor-pointer items-center gap-3","focus-visible:border-none focus-visible:outline-none","hover:bg-accent-primary-alpha px-3","dial-small-text h-[34px] rounded text-primary"),K8="opacity-75 !cursor-not-allowed",Y8="text-error",X8="my-1 border-t border-hover border-secondary",An=4,Er=({ariaLabel:e,className:t,size:s=24,onClose:i,...o})=>m.jsx(hi,{"aria-label":e,className:se("text-secondary hover:enabled:text-accent-primary",t,"w-auto h-auto"),onClick:i,icon:m.jsx(B.IconX,{size:s}),...o}),Tt=({children:e,menu:t,renderOverlay:s,trigger:i=[Bt.Click],placement:o,disabled:n=!1,open:r,defaultOpen:a=!1,onOpenChange:l,closable:c=!1,onClose:d,className:u,listClassName:h,outsidePressIgnoreRef:p,outsideClosable:f=!0,allowedPlacements:v,anchorToMouse:C=!1,matchReferenceWidth:w=!0,maxDropdownHeight:b})=>{const[x,y]=g.useState(a),S=r!==void 0,F=S?!!r:x,R=g.useRef(null),E=g.useCallback(j=>{S||y(j),l?.(j)},[S,l]),D=g.useId(),P=o===void 0,T=j=>"clientWidth"in j?j.clientWidth:j.getBoundingClientRect?.()?.width??0,{refs:M,floatingStyles:N,context:q}=Ie.useFloating({placement:o,open:F,onOpenChange:E,whileElementsMounted:Ie.autoUpdate,middleware:[Ie.offset({mainAxis:An,crossAxis:0}),P?Ie.autoPlacement({alignment:"start",crossAxis:!0,padding:An,allowedPlacements:v}):Ie.flip({padding:An}),Ie.shift({padding:An}),Ie.size({padding:An,apply({availableWidth:j,availableHeight:ge,elements:oe}){const Z=oe.floating,_=T(oe.reference);Z.style.setProperty("--fui-available-height",`${Math.floor(ge)}px`),Z.style.setProperty("--reference-width",w?`${Math.round(_)}px`:"0px"),w?Z.style.minWidth=`${Math.round(_)}px`:Z.style.removeProperty("min-width"),Z.style.maxWidth=`${Math.floor(j)}px`;const ae=Math.floor(ge);Z.style.maxHeight=`${b?Math.min(ae,b):ae}px`}})]}),L=Ie.useClick(q,{enabled:i.includes(Bt.Click)&&!n}),z=Ie.useHover(q,{enabled:i.includes(Bt.Hover)&&!n,move:!1,restMs:40,delay:{open:80,close:80}}),H=Ie.useDismiss(q,{bubbles:!0,referencePress:!1,outsidePress:j=>{if(!f)return!1;const ge=j.target;return!(p?.current&&ge instanceof Node&&p.current.contains(ge))}}),A=Ie.useRole(q,{role:"menu"}),{getReferenceProps:de,getFloatingProps:k}=Ie.useInteractions([L,z,H,A]),V=g.useCallback((j,ge)=>{M.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:j,y:ge,top:ge,left:j,right:j,bottom:ge})})},[M]),U=g.useCallback(j=>{!i.includes(Bt.ContextMenu)||n||(j.preventDefault(),C&&(V(j.clientX,j.clientY),R.current=document.elementFromPoint(j.clientX,j.clientY)),E(!0))},[C,n,E,V,i]),W=g.useCallback(j=>{!C||n||(i.includes(Bt.ContextMenu)&&F&&E(!1),V(j.clientX,j.clientY),R.current=document.elementFromPoint(j.clientX,j.clientY))},[C,n,V,F,i,E]);g.useEffect(()=>{n&&F&&E(!1)},[n,F,E]);const re=g.useCallback(j=>ge=>{j.disabled||(j.onClick?.({key:j.key,domEvent:ge}),t?.onClick?.({key:j.key,domEvent:ge}),E(!1))},[t,E]),be=g.useMemo(()=>s?s():t?m.jsxs(m.Fragment,{children:[t.header&&m.jsx(m.Fragment,{children:typeof t.header=="function"?t.header():t.header}),m.jsx("div",{role:"none",className:"py-1","aria-label":"dropdown",children:t.items.map(j=>j.type===Qo.Divider?m.jsx("div",{role:"separator",className:X8},j.key):j.type===Qo.PlainText?m.jsx("div",{className:se("px-3 py-2 text-secondary dial-caption",j.className),children:j.label},j.key):m.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!j.disabled,className:pe(q8,j.disabled&&K8,j.danger&&Y8,j.className),disabled:j.disabled,onClick:re(j),children:[j.icon&&m.jsx("span",{className:pe(j.danger&&"text-error",j.disabled&&"text-secondary"),children:m.jsx(Be,{icon:j.icon})}),m.jsx("span",{className:pe("flex-1 truncate text-left",j.danger&&"text-error",j.disabled&&"text-secondary"),"aria-labelledby":"item-text",children:j.label})]},j.key))}),t.footer&&m.jsx(m.Fragment,{children:typeof t.footer=="function"?t.footer():t.footer})]}):null,[re,t,s]),Q=de({onContextMenu:U,onMouseDown:W});return g.useEffect(()=>{if(!F)return;const j=M.reference.current;let ge=null;if(j instanceof Element?ge=j:R.current instanceof Element&&(ge=R.current),!ge)return;const oe=new IntersectionObserver(([Z])=>{Z.isIntersecting||E(!1)},{root:null,threshold:0});return oe.observe(ge),()=>oe.disconnect()},[F,M.reference,E]),m.jsxs(m.Fragment,{children:[m.jsx("span",{ref:M.setReference,className:pe(U8,n&&"!cursor-not-allowed opacity-75",u),"aria-haspopup":"menu","aria-expanded":F,"aria-controls":D,...Q,children:e}),F&&m.jsx(Ie.FloatingPortal,{children:m.jsx(Ie.FloatingFocusManager,{context:q,modal:!1,initialFocus:-1,returnFocus:!0,children:m.jsxs("div",{id:D,ref:M.setFloating,style:N,className:pe($8,!w&&"w-max",h),...k(),children:[c&&m.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:m.jsx(Er,{ariaLabel:"Close dropdown",onClose:j=>{d?.(j),E(!1)}})}),be]})})})]})},Z8="h-full w-full",Vg=".ag-checkbox-input",sd={accentColor:"var(--controls-bg-accent, #5C8DEA)",backgroundColor:"var(--bg-layer-3, #1D2439)",oddRowBackgroundColor:"var(--bg-layer-2, #161B2D)",selectedRowBackgroundColor:"var(--bg-accent-primary-alpha, #7DA4FF26)",borderColor:"var(--bg-layer-4, #242C42)",rowBorder:"1px solid var(--stroke-tertiary, #0C101D)",rowHoverColor:"var(--bg-accent-primary-alpha, #7DA4FF26)",borderRadius:3,browserColorScheme:"dark",chromeBackgroundColor:"var(--bg-layer-1, #0C101D)",foregroundColor:"var(--text-primary, ##EEF1F7)",headerFontSize:14,headerFontWeight:600,headerTextColor:"var(--text-secondary, #7F8792)",spacing:4,wrapperBorderRadius:3,fontSize:14,fontFamily:{googleFont:"var(--theme-font, var(--font-inter))"}},id=40;var Ri=(e=>(e.API="api",e.ROW_DATA_CHANGED="rowDataChanged",e.CHECKBOX_SELECTED="checkboxSelected",e))(Ri||{});const Q8=(e,t,s,i,o)=>{const n=typeof e=="string"?e.toLowerCase():e,r=typeof t=="string"?t.toLowerCase():t;return n===r?0:n?r?n>r?1:-1:o?1:-1:o?-1:1};var Zn=(e=>(e.MULTIPLE="MULTIPLE",e.SINGLE="SINGLE",e))(Zn||{});const ew="en-US",tw={year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},J8="text-primary",od=40,sw={minWidth:od,width:od,maxWidth:od},eL={cellClass:"ag-grid-no-checkbox",...sw},tL={...sw};function sL(e,t){let s=null;return(...i)=>{s&&clearTimeout(s),s=setTimeout(()=>e(...i),t)}}OA({testIdAttribute:"dataQA"});am.registerModules([MA]);const bh=({columnDefs:e,rowData:t,additionalGridOptions:s,getContextMenuItems:i,className:o,ariaLabel:n="Data grid",wrapCustomCellRenderers:r=!0,disabledRowIds:a,selectedRowIds:l,onSelectionChange:c,onGridApiChange:d,getRowId:u=F=>String(F.id??JSON.stringify(F)),alternateOddRowColors:h=!1,filterPlaceholder:p="Enter value",emptyStateIcon:f,emptyStateTitle:v="No results found",emptyStateDescription:C="Sorry, we couldn't find any results for your search.",loading:w=!1,wrapperBorder:b=!0,withoutHeaderBorders:x=!1,allowDisabledContextMenu:y=!1,selectionMode:S})=>{const[F,R]=g.useState(id),[E,D]=g.useState(),P=g.useId(),T=g.useRef(new Set),M=g.useRef(void 0),N=g.useMemo(()=>({...sd,oddRowBackgroundColor:h?sd.oddRowBackgroundColor:sd.backgroundColor,wrapperBorder:b}),[h,b]),q=g.useCallback(_=>{_.api.sizeColumnsToFit(),R(id)},[]),L=g.useCallback(_=>{if(_.data){const ae=u(_.data),G=a?.has(ae)??!1,fe=G&&!y,he=_.value==null?"":String(_.value),ie=i?.(_.data)??[];return m.jsx(Tt,{trigger:[Bt.ContextMenu],menu:{items:ie},anchorToMouse:!0,matchReferenceWidth:!0,className:"w-full",disabled:fe,children:m.jsx("span",{className:"block min-w-0 h-full max-w-full",children:m.jsx(mt,{text:he,className:"max-w-full h-full",hideTooltip:G})})})}},[i,a,u,y]),z=g.useCallback(_=>_===Ri.API||_===Ri.ROW_DATA_CHANGED,[]),H=g.useCallback(_=>{if(!E)return;const G=(_.selectedNodes||[]).map(he=>he.data),fe=new Set(G.map(u));T.current=fe,M.current=_.source,z(_.source)||c?.(fe,G)},[E,u,z,c]),A=g.useMemo(()=>sL(_=>H?.(_),100),[H]),de=g.useCallback(_=>{if(!_.data)return null;const ae=u(_.data),G=_.node.isSelected(),fe=a?.has(ae),he=`row-select-${ae}`;return m.jsx("div",{className:"h-6 w-6 flex items-center justify-center",children:m.jsx(vu,{className:"w-[18px] h-[18px]",inputId:he,checked:G,disabled:fe,name:"gridradiobutton",value:"selected",onChange:()=>{fe||(_.node.setSelected(!0,!0,Ri.CHECKBOX_SELECTED),_.api.refreshCells({columns:[_.column?.getColId()]}))}})})},[u,a]),k=g.useCallback(()=>{const _="dial-row-select",ae="dial-row-select-visible";return!l||l.size===0?_:`${_} ${ae}`},[l]),V=g.useCallback(()=>!l||l.size===0?"dial-row-not-select-header":k(),[k,l]),U=g.useMemo(()=>{if(S===Zn.SINGLE)return{...eL,cellRenderer:de};if(S===Zn.MULTIPLE)return{...tL,headerClass:()=>V(),cellClass:_=>{const ae=_.data?u(_.data):null;let G=k();return ae&&a?.has(ae)&&(G+=" opacity-50 pointer-events-none"),G}}},[S,de,V,u,k,a]),W=g.useCallback(_=>{const ae=typeof r=="function"?r(_):!!r;if(!_.cellRenderer)return{..._,cellRenderer:L};if(!ae)return _;const G=_.cellRenderer;return{..._,cellRenderer:he=>{const ie=he.data?i?.(he.data)??[]:[];let le=null;if(typeof G=="function"){const Ce=G;le=m.jsx(Ce,{...he})}else le=L(he);const Fe=he.data?u(he.data):null,Oe=Fe?a?.has(Fe):!1;return m.jsx(Tt,{trigger:[Bt.ContextMenu],menu:{items:ie},anchorToMouse:!0,matchReferenceWidth:!0,className:pe("w-full h-full",Oe&&"!cursor-not-allowed opacity-75"),disabled:Oe&&!y,children:m.jsx("span",{className:"block min-w-0 max-w-full flex-1",children:le})})}}},[a,i,u,L,r,y]),re=g.useMemo(()=>r?(e??[]).map(W):e??[],[e,r,r?W:null]),be=g.useMemo(()=>({minWidth:150,resizable:!0,sortable:!0,floatingFilter:!0,filter:"agTextColumnFilter",filterParams:{filterPlaceholder:p,buttons:["reset"]},comparator:Q8.bind(void 0)}),[p]),Q=_=>{const ae=document.querySelector(Vg);ae&&ae.setAttribute("aria-description",Sd);const G=re.map(fe=>({...fe,sort:void 0}));_.api.updateGridOptions({columnDefs:G,rowData:t}),_.api.sizeColumnsToFit(),D(_.api),s?.onGridReady?.(_),d?.(_.api)};g.useEffect(()=>{E&&t&&E.setGridOption("rowData",t)},[E,t]);const j=g.useCallback(()=>m.jsx(vr,{title:v,description:C,containerClassName:"gap-3",titleClassName:"mt-2 !text-lg",icon:f||m.jsx(B.IconZoomCancel,{size:100,stroke:.5,className:"text-secondary"})}),[v,C,f]),ge=g.useMemo(()=>{if(S)return{mode:S===Zn.SINGLE?"singleRow":"multiRow",isRowSelectable:_=>{const ae=_.data?u(_.data):null;return ae?!a?.has(ae):!0}}},[a,u,S]);g.useEffect(()=>{E&&t&&T.current.size&&T.current.forEach(_=>{const ae=E.getRowNode(_);ae&&!ae.isSelected()&&ae.setSelected(!0,!1,Ri.API)})},[E,t]),g.useEffect(()=>{E&&l&&(E.deselectAll("all",Ri.API),l.forEach(_=>{const ae=E.getRowNode(_);ae&&!ae.isSelected()&&ae.setSelected(!0,!1,Ri.API)}))},[E,l]);const oe=g.useCallback(_=>_.data?u(_.data):"",[u]),Z=g.useCallback(()=>{document.querySelectorAll(`.ag-row ${Vg}`).forEach(_=>{_.setAttribute("aria-description",Sd)})},[]);return g.useEffect(()=>{const _=z(M.current);if(E&&l?.size&&_){const ae=Array.from(l)[0];if(ae){const G=E.getRowNode(ae);G&&E.ensureNodeVisible(G)}}},[E,z,l]),m.jsx("div",{className:pe(Z8,o,S&&"with-selection-column",x&&"dial-without-header-borders"),"aria-label":n,role:"region","aria-busy":w,children:m.jsx("div",{className:"ag-theme-balham-dark h-full overflow-x-auto",role:"table","aria-describedby":P,children:m.jsx(_8,{rowModelType:"clientSide",headerHeight:id,rowHeight:F,cellSelection:!1,theme:kP.withPart(cP).withParams({...N}),autoSizeStrategy:{type:"fitGridWidth"},columnDefs:re,defaultColDef:be,selectionColumnDef:U,onGridSizeChanged:q,onGridReady:Q,loading:w,suppressCellFocus:!0,suppressDragLeaveHidesColumns:!0,noRowsOverlayComponent:j,rowData:t,rowSelection:ge,onSelectionChanged:A,getRowId:oe,onRowDataUpdated:Z,onBodyScroll:Z,onFirstDataRendered:Z,...s})})})};var hl=(e=>(e.Horizontal="horizontal",e.Vertical="vertical",e))(hl||{}),pl=(e=>(e.Mobile="mobile",e.Tablet="tablet",e))(pl||{});const ba=({tab:e,active:t,invalid:s,className:i,horizontal:o,onClick:n})=>{const r=se("rounded h-[38px] items-center flex flex-row border-transparent cursor-pointer dial-small-text hover:text-accent-primary",{"border-b-2 px-4":o,"border-l-2 px-3":!o}),a=se(r,{"bg-layer-4":o,"bg-layer-1 text-secondary pointer-events-none":e.disabled,"bg-accent-primary-alpha text-primary":t&&!e.disabled,"text-primary":!t&&!e.disabled,"border-b-accent-primary":t&&o&&!e.disabled,"border-l-accent-primary":t&&!o&&!e.disabled},i);return m.jsxs("button",{role:"tab",className:a,onClick:()=>n(e.id),disabled:e.disabled,children:[m.jsx(mt,{text:e.label,contentClassName:"max-w-[200px]",className:"max-w-[200px]"}),(s||e.invalid)&&m.jsx("div",{className:"text-error pl-1",children:m.jsx(B.IconExclamationCircle,{...J})}),e.warning&&m.jsx("div",{className:"text-warning pl-1",children:m.jsx(B.IconAlertTriangle,{...J})})]})},iL=12;var ni=(e=>(e.Undefined="undefined",e.Mobile="mobile",e.Tablet="tablet",e.Desktop="desktop",e))(ni||{});const zg=()=>typeof window<"u"&&window.innerWidth<640,nd=()=>{if(typeof window>"u")return ni.Undefined;const e=window.innerWidth;return e>=1024?ni.Desktop:e<640?ni.Mobile:ni.Tablet},oL=()=>{const[e,t]=g.useState(()=>typeof window>"u"?ni.Desktop:nd());return g.useEffect(()=>{t(nd());const s=()=>t(nd());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e},iw=({tabs:e,activeTab:t,onClick:s,orientation:i=hl.Horizontal,screenThreshold:o=pl.Tablet,smallScreenContainerClassName:n,smallScreenDropdownItemClassName:r,desktopDropdownClassName:a,desktopTabClassName:l})=>{const[c,d]=g.useState(!1),[u,h]=g.useState(!1),[p,f]=g.useState(!1),v=oL(),C=v===ni.Mobile||o===pl.Tablet&&v===ni.Tablet,w=i===hl.Horizontal,b=g.useRef(null),x=g.useRef(null),y=g.useRef(null),S=e.find(P=>P.id===t),F=g.useMemo(()=>pe("flex gap-2",w?"flex-row flex-nowrap overflow-x-auto":"flex-col flex-wrap w-full"),[w]),R=g.useCallback(()=>{const P=x.current;P&&f(P.scrollWidth>P.clientWidth)},[]),E=g.useCallback(()=>{const P=y.current,T=x.current;if(!P||!T)return;const M=P.getBoundingClientRect(),N=T.getBoundingClientRect();if(M.width===0||N.width===0)return;const q=iL;let L=T.scrollLeft;if(M.left<N.left+q)L-=N.left+q-M.left;else if(M.right>N.right-q)L+=M.right-(N.right-q);else return;const z=Math.max(0,T.scrollWidth-T.clientWidth);L=Math.max(0,Math.min(L,z)),L!==T.scrollLeft&&T.scrollTo({left:L,behavior:"smooth"})},[]),D=g.useCallback(P=>{s(P),P===t&&E()},[s,t,E]);return g.useEffect(()=>{R();const P=new ResizeObserver(()=>R()),T=x.current;return T&&P.observe(T),()=>P.disconnect()},[e,R]),g.useEffect(()=>{E()},[t,E]),C?m.jsx("div",{role:"tablist",className:se("h-11 flex items-center bg-layer-3 px-4",n),children:m.jsx(Tt,{trigger:[Bt.Click],open:c,onOpenChange:d,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],renderOverlay:()=>e.map(P=>m.jsx(ba,{tab:P,active:P.id===t,onClick:T=>{D(T),d(!1)},className:se("w-full rounded-none h-11 items-center px-6",r)},P.id)),children:m.jsxs("div",{className:"flex gap-2 items-center h-11 cursor-pointer",children:[m.jsx(ba,{tab:S,active:!0,onClick:D,className:"rounded-none bg-transparent border-l-0 border-b-0 h-full items-center px-0"},t),m.jsx(Be,{icon:m.jsx(B.IconChevronDown,{size:Ct.SM}),className:pe("text-primary transition-transform",c&&"rotate-180")})]})})}):m.jsxs("div",{ref:b,className:"flex w-full items-start",children:[m.jsx("div",{ref:x,role:"tablist",className:F,children:e.map(P=>m.jsx("div",{ref:t===P.id?y:void 0,className:"w-full",children:m.jsx(ba,{tab:P,active:t===P.id,onClick:D,horizontal:w,className:se("w-full",l)})},P.id))}),p&&m.jsx("div",{className:"flex items-center ml-2",children:m.jsx(Tt,{trigger:[Bt.Click],open:u,onOpenChange:h,placement:"bottom-end",renderOverlay:()=>e.map(P=>m.jsx(ba,{tab:P,active:P.id===t,onClick:T=>{D(T),h(!1)},className:"w-full rounded-none h-8 items-center px-3 py-2"},P.id)),children:m.jsx(is,{iconBefore:m.jsx(B.IconDotsVertical,{size:Gt}),className:se("w-8 h-8 flex items-center justify-center rounded border",u?"bg-layer-4 border-transparent":"border-primary",a)})})})]})},nL="w-full overflow-hidden",rL="flex flex-nowrap items-center gap-2 min-w-0 px-0 py-0 whitespace-nowrap",ow="flex items-center gap-2 min-w-0 shrink-0 dial-small-text",aL="basis-[20%] flex-none",lL="flex-1 min-w-0",Wg="inline-flex items-center gap-1 min-w-0 transition-colors",cL="text-secondary hover:text-accent-primary",dL="text-primary cursor-default",nw="flex-none inline-flex items-center leading-none text-secondary",uL="items-center gap-1 min-w-0 transition-colors text-secondary hover:text-accent-primary",rw=m.jsx(B.IconChevronRight,{size:Ct.SM,"aria-hidden":"true"}),Gn=({label:e,href:t,onClick:s,disabled:i,isLast:o,separator:n=rw,className:r,iconBefore:a,labelClassName:l,onBeforeNavigate:c,...d})=>{const u=async C=>{if(c&&!o&&!await c()){C.preventDefault();return}s&&s(C)},h=se(ow,o?lL:aL,r),p=(!!t||!!s)&&!o&&!i,f=p?se(Wg,cL):se(Wg,dL,i?"pointer-events-none opacity-75":""),v=typeof e=="string"?m.jsx(mt,{className:se("cursor-pointer",l),text:e,id:"breadcrumb-item-content"}):m.jsx("span",{className:se("flex-1 min-w-0 truncate cursor-pointer max-w-[300px]",l),"aria-label":"breadcrumb-item-content",children:e});return m.jsxs("li",{...d,className:h,"aria-label":d["aria-label"]||"breadcrumb-item",children:[p?m.jsxs("a",{href:t,onClick:u,className:f,children:[a,v]}):m.jsxs("span",{className:f,"aria-current":o?"page":void 0,"aria-disabled":i?"true":void 0,children:[a,v]}),!o&&m.jsx("span",{className:nw,"aria-label":"separator",children:n})]})},aw=({pathItems:e,separator:t=rw,ariaLabel:s="Breadcrumb",className:i,children:o,labelClassName:n,onBeforeNavigate:r})=>{const a=g.useMemo(()=>e?.length?e:g.Children.toArray(o).filter(g.isValidElement).map(d=>{const u=d.props,{labelClassName:h,isLast:p,separator:f,...v}=u;return v}),[e,o]),l=g.useCallback(async d=>{const u=parseInt(d.key,10),h=a[u];if(r&&!await r()){d.domEvent.preventDefault();return}h.onClick?h.onClick(d.domEvent):h.href&&(window.location.href=h.href)},[a,r]),c=g.useMemo(()=>{if(a.length===0)return null;if(a.length<=3)return a.map((v,C)=>g.createElement(Gn,{...v,key:`item-${C}`,isLast:C===a.length-1,separator:t,labelClassName:n,onBeforeNavigate:r}));const d=a.at(0),u=a.slice(1,-2),h=a.at(-2),p=a.at(-1);if(!d||!h||!p)return null;const f=u.map((v,C)=>({key:String(C+1),label:typeof v.label=="string"?v.label:`Item ${C+1}`,disabled:v.disabled}));return m.jsxs(m.Fragment,{children:[g.createElement(Gn,{...d,key:"item-0",separator:t,labelClassName:n,onBeforeNavigate:r}),m.jsxs("li",{className:se(ow),children:[m.jsx(Tt,{menu:{items:f,onClick:l},placement:"bottom-start",matchReferenceWidth:!1,children:m.jsx("button",{type:"button","aria-label":"More breadcrumbs",className:uL,children:m.jsx(B.IconDots,{size:Ct.SM})})}),m.jsx("span",{className:nw,children:t})]}),g.createElement(Gn,{...h,key:`item-${a.length-2}`,separator:t,labelClassName:n,onBeforeNavigate:r}),g.createElement(Gn,{...p,key:`item-${a.length-1}`,isLast:!0,separator:t,labelClassName:n,onBeforeNavigate:r})]})},[a,t,n,l,r]);return m.jsx("nav",{"aria-label":s,className:se(nL,i),children:m.jsx("ol",{className:rL,children:c})})},xh=(e,t)=>({appearance:i,...o})=>m.jsx(is,{...o,variant:e,appearance:i||t}),lw=(e,t)=>({variant:i,...o})=>m.jsx(is,{...o,variant:i||t,appearance:e}),Rs=xh(We.Primary,ke.Solid),Es=xh(We.Neutral,ke.Outlined),cw=xh(We.Error,ke.Outlined),hL=lw(ke.Link,We.Primary),yh=lw(ke.Ghost,We.Primary),dn=(e,t)=>({appearance:i,...o})=>m.jsx(hi,{...o,variant:e,appearance:i||t}),pL=(e,t)=>({variant:i,...o})=>m.jsx(hi,{...o,variant:i||t,appearance:e}),gL=dn(We.Primary,ke.Solid),fL=dn(We.Neutral,ke.Outlined),dw=dn(We.Error,ke.Outlined),mL=dn(We.Secondary,ke.Ghost),vL=dn(We.Tertiary,ke.Ghost),CL=dn(We.Success,ke.Ghost),wL=pL(ke.Ghost,We.Primary),uw=({iconClassName:e,label:t,...s})=>t?m.jsx(cw,{...s,label:t,appearance:ke.Ghost,iconBefore:m.jsx(B.IconTrashX,{...J,className:e||""})}):m.jsx(dw,{...s,appearance:ke.Ghost,icon:m.jsx(B.IconTrashX,{...J,className:e||""})}),bL=({className:e="",value:t,onChange:s,error:i,containerClassName:o,resize:n=!1,labelProps:r,caption:a,id:l,...c})=>{const d=se("dial-textarea dial-input px-3 py-2",c.invalid&&"dial-input-error",c.disabled&&"dial-input-disable",n?"resize":"resize-none",e);return m.jsxs("div",{className:se("flex flex-col gap-y-1",o),children:[r&&m.jsx(Ki,{...r,htmlFor:l}),m.jsx("textarea",{id:l,value:t||"",className:d,onChange:u=>s?.(u.currentTarget.value),...c}),m.jsx(cs,{text:i}),!i&&m.jsx(fr,{text:a})]})},Hl=({label:e,switchId:t,isOn:s=!1,disabled:i,onChange:o,caption:n})=>{const r=pe("flex w-[36px] h-[18px] cursor-pointer items-center gap-1 rounded-full p-0.5 transition-all duration-200",s?"flex-row-reverse":"flex-row",i?"pointer-events-none":"",i?s?"bg-controls-disable":"bg-layer-4":s?"bg-accent-primary":"bg-layer-4"),a=g.useCallback(l=>{l.stopPropagation(),o?.(!s)},[o,s]);return m.jsxs("div",{className:"flex flex-row items-start",role:"switch",children:[m.jsx("input",{type:"checkbox",onChange:a,id:t,disabled:i,className:"invisible w-0 h-0",checked:s}),m.jsx("label",{htmlFor:t,className:r,"aria-describedby":n&&"caption",children:m.jsx("span",{className:pe("size-3 rounded-full",i?"bg-controls-disable-accent":"bg-controls-enable-primary")})}),(e||n)&&m.jsxs("div",{className:"flex flex-col gap-1 ml-2",children:[e&&m.jsx("span",{className:pe("dial-small-text py-[1px]",i?"text-secondary":"text-primary"),"aria-label":"switch-title",children:e}),n&&m.jsx("span",{id:"caption",className:"dial-tiny-text text-secondary",children:n})]})]})};var _t=(e=>(e.Sm="sm",e.Md="md",e.Lg="lg",e))(_t||{});const xL="z-[52] flex items-center justify-center bg-blackout md:p-4",jg="divide-tertiary divide-y",yL="flex flex-row justify-between py-4 px-6 items-center",SL={[_t.Sm]:"dial-sm-popup",[_t.Md]:"dial-md-popup",[_t.Lg]:"dial-lg-popup"},eo=({open:e=!1,header:t,portalId:s,className:i,overlayClassName:o,titleClassName:n,headerClassName:r,dividers:a=!0,dividerFooter:l=!0,children:c,footer:d,onClose:u,size:h=_t.Md,hideClose:p=!1,closeOnOutsideClick:f=!0,preventKeyboardOnOpen:v=!1})=>{const C=g.useRef(null),{refs:w,context:b}=Ie.useFloating({open:e,onOpenChange:E=>{E||u?.(null)}}),x=Ie.useRole(b,{role:"dialog"}),y=Ie.useDismiss(b,{outsidePress:f}),{getFloatingProps:S}=Ie.useInteractions([x,y]);if(!e)return null;const F=typeof t=="string"?"dial-popup-heading":void 0,R=E=>E?typeof E=="string"?m.jsx("h3",{id:F,className:pe("flex-1 min-w-0 mr-3 truncate dial-h3 text-primary",n),children:m.jsx(Lt,{tooltip:E,children:E})}):E:m.jsx("span",{});return m.jsx(Ie.FloatingPortal,{id:s,children:m.jsx(Ie.FloatingOverlay,{className:pe(xL,o),children:m.jsx(Ie.FloatingFocusManager,{context:b,initialFocus:v?C:void 0,children:m.jsxs("div",{ref:w.setFloating,...S(),role:"dialog","aria-modal":"true","aria-labelledby":F,className:pe("dial-popup",SL[h],a&&jg,i),children:[v&&m.jsx("div",{ref:C,tabIndex:-1,"aria-hidden":!0,className:"absolute size-px -m-px overflow-hidden opacity-0 pointer-events-none"}),m.jsxs("div",{className:se(yL,r),children:[R(t),!p&&m.jsx(Er,{ariaLabel:"Close dialog",onClose:E=>u?.(E)})]}),m.jsx("div",{className:"flex-grow overflow-auto","aria-label":"popup-description",children:c}),l&&!d&&m.jsx("div",{className:jg}),d]})})})})};var Jo=(e=>(e.Info="info",e.Danger="danger",e))(Jo||{});const RL="flex justify-end gap-2 px-6 py-4",FL="text-secondary dial-small-150 px-6 py-4",EL="Cancel",DL="Ok",rd={[Jo.Info]:{confirm:{variant:We.Primary,appearance:ke.Solid},cancel:{variant:We.Neutral,appearance:ke.Outlined}},[Jo.Danger]:{container:"dial-danger-popup",confirm:{variant:We.Error,appearance:ke.Solid},cancel:{variant:We.Neutral,appearance:ke.Outlined}}},hw=({header:e,description:t,descriptionClassName:s,open:i=!1,confirmLabel:o=DL,cancelLabel:n=EL,isLoading:r=!1,disableConfirmButton:a=!1,className:l,confirmClassName:c,onClose:d,onConfirm:u,onCancel:h,children:p,dividers:f=!1,variant:v=Jo.Info,size:C=_t.Sm,footer:w})=>{const b=r?null:m.jsxs("div",{className:RL,children:[m.jsx(Es,{label:n,onClick:()=>h?h():d?.()}),m.jsx(is,{variant:rd[v].confirm?.variant,appearance:rd[v].confirm?.appearance,className:c,label:o,disabled:a,onClick:()=>u()})]}),x=g.useCallback(()=>r?m.jsx("div",{className:"px-6 py-4 h-[120px]",children:m.jsx(mr,{size:50})}):p??(t?m.jsx("div",{className:pe(FL,s),children:t}):null),[p,t,r,s]);return m.jsx(eo,{open:i,header:e,className:pe(rd[v].container,l),dividers:f,onClose:()=>d?.(),footer:w??b,size:C,children:x()})},ad=8,PL=24,pw=({initialTags:e=[],label:t,required:s,elementId:i,placeholder:o,captionDescription:n,errorText:r,invalid:a,disabled:l,collapseTagOverflow:c=!1,readOnly:d=!1,containerClassName:u,tagClassName:h,onChange:p})=>{const f=g.useRef(null),v=g.useRef([]),C=g.useRef(null),[w,b]=g.useState(e),[x,y]=g.useState(""),[S,F]=g.useState(!1),[R,E]=g.useState(e.length),D=g.useCallback(H=>A=>{v.current[H]=A},[]),P=g.useCallback(()=>{if(!c)return;const H=f.current;if(!H)return;const A=H.offsetWidth;if(A===0)return;const de=C.current?.offsetWidth??0,V=A-(d?0:PL)-ad;let U=0,W=0;for(let re=0;re<w.length;re++){const be=v.current[re];if(!be)continue;const Q=be.offsetWidth+ad;if(U+Q>V)break;U+=Q,W++}if(W<w.length&&W>0)for(;U+de>V&&W>0;){W--;const re=v.current[W]?.offsetWidth??0;U-=re+ad}E(W)},[c,d,w.length]),T=H=>{const A=H.trim().replace(/,$/,"");if(A&&!w.includes(A)){const de=[A,...w];b(de),p?.(de)}},M=H=>{(H.key===","||H.key==="Enter")&&(H.preventDefault(),T(x),y(""))},N=()=>{x.trim()&&(T(x),y(""))},q=H=>{const A=w.filter((de,k)=>k!==H);b(A),p?.(A)},L=()=>r?m.jsx(cs,{text:r}):n?m.jsx(fr,{text:n}):null;g.useEffect(()=>{if(c)return;const H=new ResizeObserver(()=>{if(f.current){const A=f.current.scrollHeight>f.current.clientHeight+10;F(A)}});return f.current&&H.observe(f.current),()=>H.disconnect()},[w,c]),g.useEffect(()=>{if(!c){E(w.length);return}E(w.length);const H=new ResizeObserver(()=>{P()}),A=f.current;return A&&H.observe(A),P(),()=>H.disconnect()},[c,P,w]),g.useEffect(()=>{b(e)},[JSON.stringify(e)]);const z=m.jsxs("div",{ref:f,className:pe("flex gap-2 items-center relative",c?"flex-nowrap overflow-hidden w-full min-w-0":pe("flex-wrap",S?"flex-col-reverse":"flex-row"),u),children:[(c?w.slice(0,R):w).map((H,A)=>m.jsx(Po,{tag:H,className:h,remove:!l&&!d?()=>q(A):void 0},H+A)),c&&R<w.length&&m.jsx(Lt,{tooltip:w.slice(R).join(", "),triggerClassName:"inline-flex shrink-0 cursor-pointer",children:m.jsx(Po,{tag:`+${w.length-R}`})}),!d&&m.jsx("input",{id:i,type:"text",value:x,onChange:H=>y(H.target.value),onKeyDown:M,onBlur:N,className:pe("dial-input outline-none !border-none w-full flex-1 !p-1 !h-auto",c?"min-w-0":"min-w-[100px]"),placeholder:o??"",disabled:l}),c&&m.jsxs("div",{className:"absolute left-0 top-0 invisible pointer-events-none h-0 overflow-hidden whitespace-nowrap","aria-hidden":!0,children:[w.map((H,A)=>m.jsx("div",{ref:D(A),className:"inline-flex shrink-0",children:m.jsx(Po,{tag:H,className:h,remove:!l&&!d?()=>q(A):void 0})},`measure-${H}-${A}`)),m.jsx("div",{ref:C,className:"inline-flex shrink-0",children:m.jsx(Po,{tag:`+${w.length}`})})]})]});return d?z:m.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[m.jsx(Ki,{label:t,required:s,htmlFor:i}),m.jsx("div",{className:pe("dial-input min-h-[38px] p-[6px]",a&&"dial-input-error",l&&"dial-input-disable"),children:z}),L()]})},gw=({selectedItems:e,placeholder:t,collapseTagOverflow:s=!1,listClassName:i,listElementClassName:o})=>e?.length?m.jsx(pw,{readOnly:!0,initialTags:e,collapseTagOverflow:s,containerClassName:i,tagClassName:o}):t?m.jsx("span",{className:"text-secondary",children:t}):null,ld=e=>Se.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Se.createElement("path",{d:"M2.25 13.5V12C2.25 11.5858 2.58579 11.25 3 11.25C3.41421 11.25 3.75 11.5858 3.75 12V13.5C3.75 13.6989 3.82907 13.8896 3.96973 14.0303C4.11038 14.1709 4.30109 14.25 4.5 14.25H6C6.41421 14.25 6.75 14.5858 6.75 15C6.75 15.4142 6.41421 15.75 6 15.75H4.5C3.90326 15.75 3.33114 15.5128 2.90918 15.0908C2.48722 14.6689 2.25 14.0967 2.25 13.5ZM14.25 6V4.5C14.25 4.30109 14.1709 4.11038 14.0303 3.96973C13.8896 3.82907 13.6989 3.75 13.5 3.75H12C11.5858 3.75 11.25 3.41421 11.25 3C11.25 2.58579 11.5858 2.25 12 2.25H13.5C14.0967 2.25 14.6689 2.48722 15.0908 2.90918C15.5128 3.33114 15.75 3.90326 15.75 4.5V6C15.75 6.41421 15.4142 6.75 15 6.75C14.5858 6.75 14.25 6.41421 14.25 6Z",fill:"currentColor"})),fw=({children:e,open:t,disabled:s=!1,selectedValue:i,valueClassName:o,inputClassName:n,onOpen:r,elementId:a,errorText:l,invalid:c,emptyValueText:d,placeholder:u,editable:h=!1,onValueChange:p,collapseTagOverflow:f=!1,iconBefore:v})=>{const C=Array.isArray(i)&&i.length>0,w=typeof i=="string"&&!!i.trim(),b=C||w?i:u?void 0:d,x=s?void 0:r,y=g.useCallback(E=>{p?.(E.target.value)},[p]),S=()=>m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:pe("dial-input px-3 py-2 dial-input-field flex flex-row items-center gap-x-2 w-full justify-between",n,s&&"dial-input-disable",(l||c)&&"dial-input-error"),children:[m.jsxs("div",{className:"flex flex-row items-center gap-x-2 flex-1 min-w-0",children:[v&&m.jsx(Be,{icon:v}),m.jsx("input",{type:"text",className:pe("flex-1 min-w-0 bg-transparent outline-none border-none p-0 dial-small-text text-primary placeholder:text-secondary",o),value:typeof i=="string"?i:"",placeholder:u||d,onChange:y,disabled:s,id:a,"aria-label":"input-popup-field"})]}),!s&&m.jsx("button",{type:"button",className:"flex-shrink-0 cursor-pointer bg-transparent border-none p-0 ml-1",onClick:r,"aria-label":"open-popup",children:m.jsx(Be,{icon:m.jsx(ld,{role:"img",width:Gt,height:Gt})})})]}),m.jsx(cs,{text:l})]}),F=()=>m.jsxs(m.Fragment,{children:[m.jsx("button",{type:"button",className:"w-full",onClick:x,"aria-label":"open-popup",id:a,children:m.jsxs("div",{className:pe("dial-input px-3 py-2 dial-input-field flex flex-row items-center gap-x-2 w-full justify-between cursor-pointer",n,s&&"dial-input-disable",(l||c)&&"dial-input-error"),children:[m.jsxs("div",{className:"flex flex-row items-center gap-x-2 min-w-0",children:[v&&m.jsx(Be,{icon:v}),m.jsx(Lt,{tooltip:b==null?void 0:String(b),children:b||!u?m.jsx("span",{className:o,children:b}):m.jsx("span",{className:"text-secondary",children:u})})]}),!s&&m.jsx("div",{className:"flex-shrink-0",children:m.jsx(Be,{icon:m.jsx(ld,{role:"img",width:Gt,height:Gt})})})]})}),m.jsx(cs,{text:l})]}),R=()=>m.jsx("div",{className:"w-full",onClick:x,children:m.jsxs("div",{className:pe("dial-input px-3 py-2 flex flex-row items-center gap-x-2 w-full justify-between cursor-pointer",s&&"dial-input-disable"),children:[m.jsxs("div",{className:"flex flex-row items-center gap-x-2 min-w-0",children:[v&&m.jsx(Be,{icon:v}),m.jsx(gw,{placeholder:u,selectedItems:b,collapseTagOverflow:f})]}),!s&&m.jsx("div",{className:"ml-1",children:m.jsx(Be,{icon:m.jsx(ld,{role:"img",width:Gt,height:Gt})})})]})});return m.jsxs(m.Fragment,{children:[C?R():h?S():F(),t&&tn.createPortal(e,document.body)]})},TL=({label:e,htmlFor:t,disabled:s,selectedValue:i,radioButtons:o,customInputValue:n,valueClassName:r,inputClassName:a,emptyValueText:l,onClose:c,header:d,portalId:u,onApply:h,onCancel:p,cancelButtonTitle:f="Cancel",applyButtonTitle:v="Apply",isValid:C,selectedRadioValue:w,onChangeRadioField:b,id:x,size:y=_t.Md})=>{const[S,F]=g.useState(!1),R=g.useCallback(()=>{s||F(!0)},[s]),E=g.useCallback(()=>{F(!1),c?.()},[c]),D=g.useCallback(()=>{p?.(),E()},[p,E]),P=g.useCallback(()=>{h(),E()},[h,E]);return m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(Ki,{label:e,htmlFor:t}),m.jsx(fw,{disabled:s,open:S,selectedValue:n??o.find(T=>T.id===i)?.name,valueClassName:r,inputClassName:pe(a,"py-2","px-3"),emptyValueText:l,onOpen:R,children:m.jsx(eo,{open:S,onClose:D,header:d,portalId:u,size:y,footer:m.jsxs("div",{className:"flex flex-row items-center justify-end gap-2 px-6 py-4",children:[m.jsx(Es,{label:f,onClick:D}),m.jsx(Rs,{label:v,onClick:P,disabled:!C})]}),children:m.jsx("div",{className:"px-6 py-4",children:m.jsx(Va,{radioButtons:o,labelClassName:"dial-small-text",activeRadioButton:w,onChange:b,elementId:x,orientation:Hi.Column})})})})]})},kL="Create",ML="Cancel",IL="flex items-center justify-end gap-2 px-6 py-3",AL=({header:e,open:t=!1,submitLabel:s=kL,cancelLabel:i=ML,isLoading:o=!1,disableSubmitButton:n=!1,className:r,submitClassName:a,onClose:l,onSubmit:c,onCancel:d,children:u,dividers:h=!0,size:p=_t.Md,footer:f})=>{const v=o?null:m.jsxs("div",{className:IL,children:[m.jsx(Es,{label:i,onClick:()=>d?d():l?.()}),m.jsx(Rs,{className:a,label:s,disabled:n,onClick:()=>c()})]}),C=g.useCallback(()=>o?m.jsx("div",{className:"px-6 py-4 h-[120px]",children:m.jsx(mr,{size:50})}):u??null,[u,o]);return m.jsx(eo,{open:t,header:e,className:r,dividers:h,onClose:()=>l?.(),footer:f??v,size:p,children:C()})},LL=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Tab","Enter","Escape","Home","End","Insert"],mw=(e,t,s,i)=>{if((t==="number"||s!==void 0||i!==void 0)&&!LL.includes(e.key)&&!(e.ctrlKey||e.metaKey)&&!(e.key==="-"&&(e.currentTarget.selectionStart??0)===0&&!e.currentTarget.value.includes("-"))&&!(e.key==="."&&t==="number"&&!e.currentTarget.value.includes("."))){if(!/^[0-9]$/.test(e.key)){e.preventDefault();return}if(s!==void 0||i!==void 0){const n=e.currentTarget.value,r=e.currentTarget.selectionStart||0,a=n.slice(0,r)+e.key+n.slice(r),l=parseFloat(a);if(!isNaN(l)){if(s!==void 0&&l<+s){e.preventDefault();return}if(i!==void 0&&l>+i){e.preventDefault();return}}}}},OL="bg-layer-4 flex items-center justify-center enabled:text-secondary enabled:hover:text-accent-primary enabled:active:bg-controls-accent-primary-alpha-active enabled:hover:bg-accent-primary-alpha enabled:active:text-accent-primary",NL=({icon:e,onClick:t,disabled:s,size:i=Ft.Standard})=>m.jsx("div",{className:pe("border-l border-tertiary",i===Ft.Standard?"h-[40px] w-[44px]":"h-[24px] w-[32px]"),children:m.jsx(hi,{className:pe(OL,i===Ft.Small&&"p-1"),icon:e,onClick:t,disabled:s,size:i})}),js=({labelProps:e,error:t,caption:s,id:i,containerClassName:o,...n})=>m.jsxs("div",{className:se("flex flex-col gap-y-1",o),children:[e&&m.jsx(Ki,{...e,htmlFor:i}),m.jsx(vw,{id:i,...n}),m.jsx(cs,{text:t}),!t&&m.jsx(fr,{text:s})]}),vw=({invalid:e,disabled:t,prefix:s,className:i,postfix:o,iconBefore:n,iconAfter:r,wrapperClassName:a,type:l,inputRef:c,value:d,tooltipText:u,min:h,onChange:p,max:f,inputButtonProps:v,...C})=>{const w=g.useRef(null),b=Ie.useMergeRefs([c,w]);g.useEffect(()=>{const R=w.current;if(!R)return;const E=D=>{D.preventDefault()};return R.addEventListener("wheel",E,{passive:!1}),()=>{R.removeEventListener("wheel",E)}},[]);const x=l==="number"||h!==void 0||f!==void 0,y=R=>{mw(R,l,h,f)},S=R=>{const E=R.currentTarget.value;if(x&&E!==""){const D=parseFloat(E);if(isNaN(D)&&E!=="-"&&E!=="."||!isNaN(D)&&(h!==void 0&&D<+h||f!==void 0&&D>+f))return}p?.(E||void 0)},F=()=>m.jsxs("div",{className:se("dial-input flex flex-row items-center gap-x-2 justify-between py-2",e&&"dial-input-error",t&&"dial-input-disable",!s&&"pl-3",!v&&"pr-3",a),"aria-label":"input-container",children:[s&&m.jsx("div",{className:"border-r border-tertiary",children:m.jsx(vw,{wrapperClassName:"!rounded-r-none",className:"truncate",value:s,disabled:!0,id:`${s}_textBefore`})}),m.jsx(Be,{icon:n}),m.jsx("input",{ref:b,type:l,autoComplete:l==="password"?"new-password":"off",value:d??"",className:se("border-0 bg-transparent w-full truncate",t&&"cursor-not-allowed",i),onChange:S,onKeyDown:y,min:h,disabled:t,max:f,...C}),o&&m.jsxs("p",{className:"text-secondary dial-small-text",children:[" ",o]}),m.jsx(Be,{icon:r}),v&&m.jsx(NL,{...v,disabled:t})]});return t&&l!=="password"?m.jsx(Lt,{tooltip:u||d,children:F()}):F()},HL=/^0+\.(\d+)?$/,GL=/^0+/,du=({integer:e,onChange:t,min:s,max:i,onKeyDown:o,onPaste:n,...r})=>{const a=d=>!d||d==="-"?d:String(d)?.match(HL)?String(d)?.replace(GL,"0"):Number(d),l=d=>{if([".","-","+","e","E"].includes(d.key)){d.preventDefault();return}mw(d,"number",s,i)},c=d=>{const u=d.clipboardData.getData("text"),h=u.replace(/\D/g,"");if(h!==u&&(d.preventDefault(),h)){const p=d.currentTarget,f=p.selectionStart??0,v=p.selectionEnd??0,C=p.value.slice(0,f)+h+p.value.slice(v);t?.(a(C))}};return m.jsx(js,{type:"number",min:s,max:i,onChange:d=>t?.(a(d)),onKeyDown:e?l:o,onPaste:e?c:n,...r})},BL=({onClick:e})=>m.jsx(B.IconEyeOff,{...J,className:"text-primary",onClick:e,role:"button","aria-label":"hide"}),VL=({onClick:e})=>m.jsx(B.IconEye,{...J,className:"text-primary",onClick:e,role:"button","aria-label":"show"}),zL=({...e})=>{const[t,s]=g.useState(!1),i=g.useCallback(o=>{s(o)},[]);return m.jsx(js,{type:t?"text":"password",...e,iconAfter:e.disabled?null:t?m.jsx(BL,{onClick:()=>i(!1)}):m.jsx(VL,{onClick:()=>i(!0)})})},WL={[Ft.Small]:{className:"dial-tiny-text",wrapperClassName:"pl-2 py-0",containerClassName:"h-[24px]",iconSize:16,iconStroke:1},[Ft.Standard]:{className:"dial-small-text",wrapperClassName:"",containerClassName:"",iconSize:20,iconStroke:1.5}},Sh=({size:e=Ft.Standard,placeholder:t="Search...",value:s,onChange:i,...o})=>{const[n,r]=g.useState(s||"");g.useEffect(()=>{r(s||"")},[s]);const a=g.useCallback(u=>{r(u||""),i?.(u||"")},[i]),l=WL[e],c=g.useCallback(()=>{a("")},[a]),d=g.useMemo(()=>{if(n)return{icon:m.jsx(B.IconX,{size:l.iconSize,"aria-label":"Clear search",role:"button"}),onClick:c,size:e}},[c,n,e,l.iconSize]);return m.jsx(js,{placeholder:t,iconBefore:m.jsx(B.IconSearch,{size:l.iconSize,stroke:l.iconStroke}),value:n,onChange:a,inputButtonProps:d,containerClassName:l.containerClassName,className:l.className,wrapperClassName:l.wrapperClassName,...o})},jL="dial-input flex w-full items-center justify-between gap-2 dial-small-text cursor-pointer",_L="w-full rounded flex flex-col",cd="flex w-full items-center justify-between gap-2 px-3 h-[34px] dial-small-text text-primary truncate hover:bg-accent-primary-alpha focus:bg-accent-primary-alpha focus:outline-none",UL="bg-accent-primary-alpha",$L="bg-accent-primary-alpha border-l border-accent-primary border-1",_g="opacity-75",qL=352,KL=m.jsx(B.IconChevronDown,{size:Ct.SM}),Cw=({options:e,selectedValues:t,handleRemoveTag:s})=>m.jsx("div",{className:"flex flex-wrap w-full items-center gap-1",children:t.map(i=>{const o=e.find(r=>r.value===i)?.label??i,n=e.find(r=>r.value===i)?.icon;return m.jsx(Po,{tag:o,remove:r=>s?.(r,i),iconBefore:n?m.jsx(Be,{icon:n}):null,className:"max-w-full"},i)})});var gl=(e=>(e.Sm="sm",e.Md="md",e))(gl||{}),fl=(e=>(e.Primary="Primary",e.Secondary="Secondary",e))(fl||{});const $i=({options:e,multiple:t=!1,elementId:s,value:i,defaultValue:o,variant:n=fl.Primary,size:r=gl.Md,prefix:a,customSelectedValue:l,placeholder:c="Select...",searchable:d=!1,searchPlaceholder:u,selectAll:h=!1,invalid:p,selectAllLabel:f="Select all",emptyStateTitle:v="No options available",emptyStateDescription:C,emptyStateIcon:w,disabled:b=!1,className:x,listClassName:y,closable:S=!1,header:F,footer:R,onClose:E,onChange:D,inlineSearch:P=!1,dismissRef:T,onFooterClick:M,open:N,onOpenChange:q,onInlineQueryChange:L,customMultiSelectTagsRenderer:z})=>{const H=g.useId(),[A,de]=g.useState(!1),k=N!==void 0,V=k?!!N:A,U=g.useCallback(K=>{k||de(K),q?.(K)},[k,q]),[W,re]=g.useState(P&&l||""),be=g.useRef(null),Q=g.useCallback(K=>{K!==W&&(re(K||""),L?.(K||""))},[L,W]),j=i!==void 0,[ge,oe]=g.useState(o),Z=j?i:ge,_=g.useMemo(()=>t?Array.isArray(Z)?Z:[]:typeof Z=="string"?[Z]:[],[Z,t]),ae=g.useMemo(()=>{const K=W.trim().toLowerCase();return K?e.filter(He=>He.label.toLowerCase().includes(K)):e},[e,W]);g.useEffect(()=>{!V&&!P&&Q("")},[P,V,Q]),g.useEffect(()=>{P&&!V&&l&&Q(l||"")},[l,P,V,Q]);const G=g.useCallback(K=>{j||oe(K),D?.(K)},[j,D]),fe=g.useCallback(K=>{if(t){const He=new Set(_);He.has(K)?He.delete(K):He.add(K),G(Array.from(He));return}if(G(K),P){const He=e.find(ns=>ns.value===K);He&&(Q(He.label),L?.(He.label))}U(!1)},[t,G,P,U,_,e,Q,L]),he=g.useCallback((K,He)=>{if(K.stopPropagation(),!t){G("");return}const ns=_.filter(hn=>hn!==He);G(ns)},[t,_,G]),ie=g.useMemo(()=>ae.filter(K=>!K.disabled),[ae]),le=g.useMemo(()=>ie.filter(K=>_.includes(K.value)).length,[ie,_]),Fe=K=>{P&&!t&&!K&&fe(W),U(K)},Oe=ie.length>0&&le===ie.length,Ce=le>0&&!Oe,Ee=()=>{if(!(!t||ie.length===0))if(Oe){const K=new Set(ie.map(ns=>ns.value)),He=_.filter(ns=>!K.has(ns));G(He)}else{const K=new Set(_);ie.forEach(He=>K.add(He.value)),G(Array.from(K))}},_e=_.length>0;g.useEffect(()=>{V&&P&&!t&&!b&&requestAnimationFrame(()=>{const K=be.current;if(!K)return;K.focus();const He=K.value?.length??0;K.setSelectionRange?.(He,He)})},[V,P,t,b]);const Ue=!t&&_e?_[0]:void 0,Ae=g.useMemo(()=>Ue?e.find(K=>K.value===Ue):void 0,[e,Ue]),kt=g.useCallback(()=>!t||_.length===0?null:m.jsx(Cw,{options:e,selectedValues:_,handleRemoveTag:he}),[t,e,_,he]),os=g.useCallback(()=>t?_e?z?.(e,_,he)||kt():m.jsx("span",{className:"text-secondary truncate",children:c}):Ae?m.jsxs(m.Fragment,{children:[Ae.icon&&m.jsx(Be,{icon:Ae.icon}),m.jsx(mt,{text:a?`${a} ${Ae.label}`:Ae.label}),Ae?.description&&m.jsx("div",{className:"text-secondary dial-small-text",children:Ae.description})]}):l&&i?l:m.jsx("span",{className:"text-secondary truncate",children:c}),[_e,t,l,a,i,c,kt,Ae,e,_,he,z]);g.useImperativeHandle(T,()=>({dismiss:()=>{U(!1)}}));const Mt=g.useCallback(()=>{Q(_.length===1?Ae?.label??W:"")},[W,_.length,Q,Ae?.label]),Ge=g.useCallback(()=>{b||(U(!V),P&&!t&&(Mt(),be.current?.focus()))},[b,P,V,t,Mt,U]);return m.jsx(Tt,{open:V,onOpenChange:Fe,disabled:b,closable:S,onClose:E,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],maxDropdownHeight:d?null:qL,listClassName:y,renderOverlay:()=>m.jsxs("div",{id:`list-${s||H}`,role:"listbox","aria-multiselectable":t||void 0,className:_L,children:[F&&m.jsx(m.Fragment,{children:typeof F=="function"?F():F}),(d||S)&&e.length>8&&m.jsxs("div",{className:"flex items-center gap-2 px-2 pt-2",children:[d&&m.jsx(Sh,{placeholder:u,onChange:Q,value:W,id:`search-${s||H}`,containerClassName:"w-full"}),S&&m.jsx(is,{"aria-label":"Close select",className:"shrink-0",iconBefore:m.jsx(B.IconX,{size:Ct.SM}),onClick:K=>{E?.(K),U(!1)}})]}),t&&h&&ie.length>0&&m.jsx("div",{className:pe(cd,"mt-2"),children:m.jsx(Rd,{id:`${s||H}-selectAll`,label:f,checked:Oe,indeterminate:Ce,onChange:Ee,ariaLabel:f})}),m.jsx("div",{className:pe("overflow-y-auto max-h-[352px]",P&&ae.length===0?"":"py-1"),children:ae.length===0?!P&&m.jsx("div",{className:"px-2 py-3",children:m.jsx(vr,{icon:w??m.jsx(B.IconClipboardX,{size:Ct.LG,stroke:.5}),title:v,description:C})}):ae.map(K=>{const He=_.includes(K.value);return t?m.jsxs("div",{role:"option","aria-selected":He,"aria-disabled":!!K.disabled,className:pe(cd,He&&UL,K.disabled&&_g,"w-full"),children:[m.jsx(Rd,{id:`${s||H}-${K.value}`,label:m.jsxs("span",{className:"flex w-full flex-1 pl-2 min-w-0 items-center gap-2 text-primary",children:[K.icon&&m.jsx(Be,{icon:K.icon}),m.jsx("span",{className:"truncate",children:K.label})]}),checked:He,disabled:K.disabled,onChange:()=>!K.disabled&&fe(K.value),ariaLabel:K.label}),K.description&&m.jsx("div",{className:"text-secondary dial-small-text",children:K.description})]},K.value):m.jsx("button",{role:"option",type:"button","aria-selected":He,"aria-disabled":!!K.disabled,disabled:K.disabled,className:pe(cd,He&&$L,K.disabled&&_g),onClick:()=>!K.disabled&&fe(K.value),children:m.jsxs("div",{className:"flex items-center gap-2 w-full",children:[K.icon&&m.jsx(Be,{icon:K.icon}),m.jsx(mt,{text:K.label}),K.description&&m.jsx("div",{className:"text-secondary dial-small-text",children:K.description})]})},K.value)})}),R&&m.jsx("div",{onClick:K=>{M?.(K),M&&U(!1)},children:typeof R=="function"?R():R})]}),children:m.jsxs("div",{role:"button",tabIndex:0,"aria-roledescription":"button to open select list","aria-haspopup":"listbox","aria-expanded":V,"aria-controls":`list-${s||H}`,className:se(jL,b&&"opacity-75 !cursor-not-allowed",r===gl.Sm?"min-h-[25px] px-1.5 py-1":"min-h-[38px] px-3 py-2",p&&"dial-input-error",n===fl.Secondary?"!bg-layer-4 !h-auto":"",x),onMouseDown:K=>{b||P&&!t&&(Mt(),K.preventDefault())},onClick:()=>{Ge()},onKeyDown:K=>{(K.key===" "||K.code==="Space")&&(K.preventDefault(),Ge())},children:[P&&!t?m.jsx("div",{className:"flex min-w-0 items-center gap-2 text-primary flex-1",children:m.jsx("input",{id:`inline-${s||H}`,type:"text",placeholder:u??c,value:W||"",onChange:K=>Q(K.currentTarget.value.trimStart()),onFocus:()=>!b&&U(!0),onMouseDown:K=>{Mt(),K.stopPropagation()},onClick:K=>{K.stopPropagation()},onKeyDown:K=>{K.stopPropagation()},className:"bg-transparent outline-none w-full dial-small-text",ref:be,disabled:b,"aria-disabled":b,autoComplete:"off"})}):m.jsx("div",{className:"flex w-full min-w-0 items-center gap-2 text-primary",children:os()}),!P&&m.jsx(Be,{icon:KL,className:pe("text-primary",V&&"rotate-180")})]})})},YL=({label:e,required:t,captionDescription:s,containerClassName:i,selectClassName:o,error:n,id:r,caption:a,readonly:l,value:c,defaultEmptyText:d,...u})=>{const h=g.useCallback(()=>{if(!c||Array.isArray(c)&&c.length===0)return d??"None";if(Array.isArray(c))return m.jsx(Cw,{options:u.options,selectedValues:c});{const p=u.options?.find(f=>f.value===c);return m.jsx("span",{"aria-readonly":!0,className:"text-primary",children:p?.label||c})}},[c,u.options,d]);return m.jsx(vl,{id:r,label:e,required:t,description:a,error:n,captionDescription:s,className:i,readonly:l,value:h(),defaultEmptyText:d,children:m.jsx($i,{className:o,value:c,elementId:r,invalid:!!n,...u})})};function ww(e){let t=null;return()=>(t==null&&(t=e()),t)}function XL(e,t){return e.filter(s=>s!==t)}function ZL(e,t){const s=new Set,i=n=>s.add(n);e.forEach(i),t.forEach(i);const o=[];return s.forEach(n=>o.push(n)),o}class QL{enter(t){const s=this.entered.length,i=o=>this.isNodeInDocument(o)&&(!o.contains||o.contains(t));return this.entered=ZL(this.entered.filter(i),[t]),s===0&&this.entered.length>0}leave(t){const s=this.entered.length;return this.entered=XL(this.entered.filter(this.isNodeInDocument),t),s>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class JL{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const s={};Object.keys(this.config.exposeProperties).forEach(i=>{const o=this.config.exposeProperties[i];o!=null&&(s[i]={value:o(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,s)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,s){return s===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const Rh="__NATIVE_FILE__",bw="__NATIVE_URL__",xw="__NATIVE_TEXT__",yw="__NATIVE_HTML__",Ug=Object.freeze(Object.defineProperty({__proto__:null,FILE:Rh,HTML:yw,TEXT:xw,URL:bw},Symbol.toStringTag,{value:"Module"}));function dd(e,t,s){const i=t.reduce((o,n)=>o||e.getData(n),"");return i??s}const uu={[Rh]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[yw]:{exposeProperties:{html:(e,t)=>dd(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[bw]:{exposeProperties:{urls:(e,t)=>dd(e,t,"").split(`
|
|
67
67
|
`),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[xw]:{exposeProperties:{text:(e,t)=>dd(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function e7(e,t){const s=uu[e];if(!s)throw new Error(`native type ${e} has no configuration`);const i=new JL(s);return i.loadDataTransfer(t),i}function ud(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(uu).filter(s=>{const i=uu[s];return i?.matchesTypes?i.matchesTypes.some(o=>t.indexOf(o)>-1):!1})[0]||null}const t7=ww(()=>/firefox/i.test(navigator.userAgent)),Sw=ww(()=>!!window.safari);class $g{interpolate(t){const{xs:s,ys:i,c1s:o,c2s:n,c3s:r}=this;let a=s.length-1;if(t===s[a])return i[a];let l=0,c=r.length-1,d;for(;l<=c;){d=Math.floor(.5*(l+c));const p=s[d];if(p<t)l=d+1;else if(p>t)c=d-1;else return i[d]}a=Math.max(0,c);const u=t-s[a],h=u*u;return i[a]+o[a]*u+n[a]*h+r[a]*u*h}constructor(t,s){const{length:i}=t,o=[];for(let p=0;p<i;p++)o.push(p);o.sort((p,f)=>t[p]<t[f]?-1:1);const n=[],r=[];let a,l;for(let p=0;p<i-1;p++)a=t[p+1]-t[p],l=s[p+1]-s[p],n.push(a),r.push(l/a);const c=[r[0]];for(let p=0;p<n.length-1;p++){const f=r[p],v=r[p+1];if(f*v<=0)c.push(0);else{a=n[p];const C=n[p+1],w=a+C;c.push(3*w/((w+C)/f+(w+a)/v))}}c.push(r[r.length-1]);const d=[],u=[];let h;for(let p=0;p<c.length-1;p++){h=r[p];const f=c[p],v=1/n[p],C=f+c[p+1]-h-h;d.push((h-f-C)*v),u.push(C*v*v)}this.xs=t,this.ys=s,this.c1s=c,this.c2s=d,this.c3s=u}}const s7=1;function Rw(e){const t=e.nodeType===s7?e:e.parentElement;if(!t)return null;const{top:s,left:i}=t.getBoundingClientRect();return{x:i,y:s}}function xa(e){return{x:e.clientX,y:e.clientY}}function i7(e){var t;return e.nodeName==="IMG"&&(t7()||!(!((t=document.documentElement)===null||t===void 0)&&t.contains(e)))}function o7(e,t,s,i){let o=e?t.width:s,n=e?t.height:i;return Sw()&&e&&(n/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:n}}function n7(e,t,s,i,o){const n=i7(t),a=Rw(n?e:t),l={x:s.x-a.x,y:s.y-a.y},{offsetWidth:c,offsetHeight:d}=e,{anchorX:u,anchorY:h}=i,{dragPreviewWidth:p,dragPreviewHeight:f}=o7(n,t,c,d),v=()=>{let F=new $g([0,.5,1],[l.y,l.y/d*f,l.y+f-d]).interpolate(h);return Sw()&&n&&(F+=(window.devicePixelRatio-1)*f),F},C=()=>new $g([0,.5,1],[l.x,l.x/c*p,l.x+p-c]).interpolate(u),{offsetX:w,offsetY:b}=o,x=w===0||w,y=b===0||b;return{x:x?w:C(),y:y?b:v()}}class r7{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var t;return!((t=this.globalContext)===null||t===void 0)&&t.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.optionsArgs)===null||t===void 0?void 0:t.rootElement)||this.window}constructor(t,s){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=s}}function a7(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function qg(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},i=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(s).filter(function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.forEach(function(o){a7(e,o,s[o])})}return e}class l7{profile(){var t,s;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((t=this.dragStartSourceIds)===null||t===void 0?void 0:t.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((s=this.dragOverTargetIds)===null||s===void 0?void 0:s.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const t=this.rootElement;if(t!==void 0){if(t.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");t.__isReactDndBackendSetUp=!0,this.addEventListeners(t)}}teardown(){const t=this.rootElement;if(t!==void 0&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var s;(s=this.window)===null||s===void 0||s.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(t,s,i){return this.sourcePreviewNodeOptions.set(t,i),this.sourcePreviewNodes.set(t,s),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,s,i){this.sourceNodes.set(t,s),this.sourceNodeOptions.set(t,i);const o=r=>this.handleDragStart(r,t),n=r=>this.handleSelectStart(r);return s.setAttribute("draggable","true"),s.addEventListener("dragstart",o),s.addEventListener("selectstart",n),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),s.removeEventListener("dragstart",o),s.removeEventListener("selectstart",n),s.setAttribute("draggable","false")}}connectDropTarget(t,s){const i=r=>this.handleDragEnter(r,t),o=r=>this.handleDragOver(r,t),n=r=>this.handleDrop(r,t);return s.addEventListener("dragenter",i),s.addEventListener("dragover",o),s.addEventListener("drop",n),()=>{s.removeEventListener("dragenter",i),s.removeEventListener("dragover",o),s.removeEventListener("drop",n)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),s=this.sourceNodeOptions.get(t);return qg({dropEffect:this.altKeyPressed?"copy":"move"},s||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),s=this.sourcePreviewNodeOptions.get(t);return qg({anchorX:.5,anchorY:.5,captureDraggingState:!1},s||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(Ug).some(s=>Ug[s]===t)}beginDragNativeItem(t,s){this.clearCurrentDragSourceNode(),this.currentNativeSource=e7(t,s),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const s=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var i;return(i=this.rootElement)===null||i===void 0?void 0:i.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},s)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,s){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(s))}handleDragEnter(t,s){this.dragEnterTargetIds.unshift(s)}handleDragOver(t,s){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(s)}handleDrop(t,s){this.dropTargetIds.unshift(s)}constructor(t,s,i){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=o=>{const n=this.sourceNodes.get(o);return n&&Rw(n)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=o=>!!(o&&this.document&&this.document.body&&this.document.body.contains(o)),this.endDragIfSourceWasRemovedFromDOM=()=>{const o=this.currentDragSourceNode;o==null||this.isNodeInDocument(o)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=o=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(o||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=o=>{if(o.defaultPrevented)return;const{dragStartSourceIds:n}=this;this.dragStartSourceIds=null;const r=xa(o);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(n||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});const{dataTransfer:a}=o,l=ud(a);if(this.monitor.isDragging()){if(a&&typeof a.setDragImage=="function"){const d=this.monitor.getSourceId(),u=this.sourceNodes.get(d),h=this.sourcePreviewNodes.get(d)||u;if(h){const{anchorX:p,anchorY:f,offsetX:v,offsetY:C}=this.getCurrentSourcePreviewNodeOptions(),x=n7(u,h,r,{anchorX:p,anchorY:f},{offsetX:v,offsetY:C});a.setDragImage(h,x.x,x.y)}}try{a?.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(o.target);const{captureDraggingState:c}=this.getCurrentSourcePreviewNodeOptions();c?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(l)this.beginDragNativeItem(l);else{if(a&&!a.types&&(o.target&&!o.target.hasAttribute||!o.target.hasAttribute("draggable")))return;o.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=o=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var n;(n=this.currentNativeSource)===null||n===void 0||n.loadDataTransfer(o.dataTransfer)}if(!this.enterLeaveCounter.enter(o.target)||this.monitor.isDragging())return;const{dataTransfer:a}=o,l=ud(a);l&&this.beginDragNativeItem(l,a)},this.handleTopDragEnter=o=>{const{dragEnterTargetIds:n}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=o.altKey,n.length>0&&this.actions.hover(n,{clientOffset:xa(o)}),n.some(a=>this.monitor.canDropOnTarget(a))&&(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=o=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var n;(n=this.currentNativeSource)===null||n===void 0||n.loadDataTransfer(o.dataTransfer)}},this.handleTopDragOver=o=>{const{dragOverTargetIds:n}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none");return}this.altKeyPressed=o.altKey,this.lastClientOffset=xa(o),this.scheduleHover(n),(n||[]).some(a=>this.monitor.canDropOnTarget(a))?(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?o.preventDefault():(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=o=>{this.isDraggingNativeItem()&&o.preventDefault(),this.enterLeaveCounter.leave(o.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=o=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var n;o.preventDefault(),(n=this.currentNativeSource)===null||n===void 0||n.loadDataTransfer(o.dataTransfer)}else ud(o.dataTransfer)&&o.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=o=>{const{dropTargetIds:n}=this;this.dropTargetIds=[],this.actions.hover(n,{clientOffset:xa(o)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=o=>{const n=o.target;typeof n.dragDrop=="function"&&(n.tagName==="INPUT"||n.tagName==="SELECT"||n.tagName==="TEXTAREA"||n.isContentEditable||(o.preventDefault(),n.dragDrop()))},this.options=new r7(s,i),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new QL(this.isNodeInDocument)}}const c7=function(t,s,i){return new l7(t,s,i)},d7=({onChange:e,emptyTextFirstLine:t,emptyTextSecondLine:s,emptyButtonLabel:i,acceptTypes:o,maxFilesCount:n,multiple:r,fileFormatError:a,fileCountError:l,fileSizeError:c,getIsFileFormatError:d,getIsFileSizeError:u})=>{const h=g.useRef(null),p=g.useRef(null),[f,v]=g.useState([]),[C,w]=g.useState(!1),[b,x]=g.useState(!1),y=g.useCallback(z=>{const H=z.target.files;if(H&&H.length>0){const A=Array.from(H),de=d?.(A),k=u?.(A);de?w(!0):k?x(!0):e(A)}},[d,u,e]),S=g.useCallback(z=>n&&z?.length>n,[n]),F=g.useMemo(()=>C||b||S(f),[C,b,S,f]),R=()=>{v([]),w(!1),x(!1)},E=g.useMemo(()=>C?m.jsx(cs,{text:a}):b?m.jsx(cs,{text:c}):S(f)?m.jsx(cs,{text:l}):null,[l,a,c,f,S,C,b]);g.useEffect(()=>{R()},[o]);const[{isOver:D,canDrop:P},T]=Af(()=>({accept:[Rh],drop(z){const H=z.files;!d?.(H)&&!u?.(H)&&!S(H)&&e(H),R()},collect:z=>({isOver:z.isOver(),canDrop:z.canDrop()})}),[y]),M=z=>{(z.key==="Enter"||z.key==="Space")&&(z.preventDefault(),p.current?.click())},N=z=>{z?.preventDefault();const H=Array.from(z.dataTransfer?.items??[]);w(!!d?.(H)),x(!!u?.(H)),v(H)},q=z=>{z.target===z.currentTarget&&R()},L=pe("border border-dashed rounded w-full cursor-pointer relative h-full hover:border-hover",!P&&!F&&"border-primary",P&&(D?"border-accent-primary":"border-hover"),F&&"border-error");return T(h),m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:L,ref:h,onDragOver:N,onDragLeave:q,children:[m.jsxs("label",{htmlFor:"file",tabIndex:0,onKeyDown:M,className:"flex flex-col items-center cursor-pointer h-full w-full text-secondary dial-tiny-text justify-center",children:[t&&m.jsx("p",{className:"mb-1",children:t}),s&&m.jsx("p",{className:"mb-0.5",children:s}),i&&m.jsx(Rs,{appearance:ke.Ghost,label:i,onClick:()=>p.current?.click()})]}),m.jsx("input",{multiple:r,id:"file",type:"file",ref:p,hidden:!0,accept:o,onChange:y})]}),m.jsx(m.Fragment,{children:E})]})},u7=({iconBefore:e,className:t,error:s,...i})=>{const o=i.invalid,n=()=>m.jsx("div",{className:"mr-2",children:o?m.jsx(B.IconExclamationCircle,{...J,className:"text-error"}):e});return m.jsx(js,{...i,iconBefore:n(),containerClassName:"h-[40px] p-0",className:pe("rounded-r-none border-r-0",o&&"text-error",t)})},Fw=e=>{const{files:t,iconBeforeInput:s,dynamicIcon:i,onChange:o,isInvalid:n,errorText:r,removeButtonAriaLabel:a,getIsMultiFilesSizeError:l,multiFilesSizeError:c}=e,d=(p,f)=>{p.stopPropagation(),o(t?.filter(v=>v.name!==f)||[])},u=p=>m.jsx(uw,{"aria-label":a,onClick:f=>d(f,p)}),h=p=>{o(p)};return!t||t.length===0?m.jsx(Wx,{backend:c7,children:m.jsx(d7,{...e,onChange:h})}):m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"flex-1 min-h-0 border border-solid border-primary rounded p-2 overflow-y-auto",children:t&&t.length>0&&m.jsx("div",{className:"flex flex-col gap-y-1",children:t.map((p,f)=>m.jsx(u7,{id:p.name,value:p.name,iconAfter:u(p.name),iconBefore:s||i?.(p.name),invalid:n?.(p),error:r},p.name+f))})}),l?.(t)&&m.jsx(cs,{text:c})]})},h7=({onChange:e,fieldTitle:t,elementId:s,files:i,maxFilesCount:o,maxFileSize:n,maxMultiFilesSize:r,fileFormatError:a,fileCountError:l,fileSizeError:c,multiFilesSizeError:d,multiple:u=!0,acceptTypes:h,deleteAllButtonLabel:p,addButtonLabel:f,additionalActionButtons:v,...C})=>{const w=g.useRef(null),b=()=>w.current?.click(),x=()=>{e([])},y=g.useCallback(E=>E?.some(D=>!(h==="/"||h?.toLowerCase()?.includes(D?.type?.toLowerCase()))),[h]),S=g.useCallback(E=>{if(!n)return!1;const D=n*(1024*1024);return E?.some(P=>{const T=P.size;return!!T&&T>D})},[n]),F=g.useCallback(E=>{if(!r||!u)return!1;const D=r*1024*1024;return E.reduce((T,M)=>T+M.size,0)>D},[r,u]),R=g.useCallback(E=>{const D=E.target.files;if(D&&D.length>0){const P=Array.from(D),T=y(P),M=S(P);!T&&!M&&e([...i||[],...P])}},[y,S,e,i]);return m.jsxs("div",{className:"h-full flex flex-col",children:[m.jsxs("div",{className:"flex justify-between items-center pb-1 min-h-[42px]",children:[m.jsx(Ki,{label:`${t}: ${u?i?.length||0:""}`,htmlFor:s}),u&&!!i?.length&&m.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[m.jsx(Es,{label:p,iconBefore:m.jsx(B.IconTrashX,{...J}),onClick:x}),(o?o>i?.length:!0)&&m.jsx(Rs,{appearance:ke.Ghost,iconBefore:m.jsx(B.IconPlus,{...J}),label:f,onClick:b}),v]})]}),i&&i.length>0&&m.jsx("input",{id:"file",type:"file",multiple:u,ref:w,hidden:!0,accept:h,onChange:R}),m.jsx(Fw,{files:i,onChange:e,acceptTypes:h,maxFilesCount:o,multiple:u,fileFormatError:a,fileCountError:l,fileSizeError:c,multiFilesSizeError:d,getIsFileFormatError:y,getIsFileSizeError:S,getIsMultiFilesSizeError:F,...C})]})},p7=m.jsx(B.IconChevronDown,{size:Ct.SM}),g7=m.jsx(B.IconChevronUp,{size:Ct.SM}),hu=({variant:e,appearance:t,items:s,...i})=>{const[o,n]=g.useState(!1),r=g.useMemo(()=>o?g7:p7,[o]);return m.jsx("div",{children:m.jsx(Tt,{menu:{items:s},onOpenChange:a=>n(a),children:m.jsx(is,{...i,iconAfter:r,variant:e||We.Primary,appearance:t||ke.Solid})})})},Ew=e=>Se.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Se.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.1812 1.2002H2.80615C2.43319 1.2002 2.07551 1.34835 1.81178 1.61208C1.54806 1.8758 1.3999 2.23348 1.3999 2.60645V5.48145C1.3999 5.85441 1.54806 6.21209 1.81178 6.47581C2.07551 6.73954 2.43319 6.8877 2.80615 6.8877H15.1812C15.5541 6.8877 15.9118 6.73954 16.1755 6.47581C16.4392 6.21209 16.5874 5.85441 16.5874 5.48145V2.60645C16.5874 2.23348 16.4392 1.8758 16.1755 1.61208C15.9118 1.34835 15.5541 1.2002 15.1812 1.2002ZM14.8999 5.2002H3.0874V2.8877H14.8999V5.2002ZM12 7.80017C12.3107 7.80017 12.5625 8.05201 12.5625 8.36267V11.7377H15.9375C16.2482 11.7377 16.5 11.9895 16.5 12.3002C16.5 12.6108 16.2482 12.8627 15.9375 12.8627H12.5625V16.2377C12.5625 16.5483 12.3107 16.8002 12 16.8002C11.6893 16.8002 11.4375 16.5483 11.4375 16.2377V12.8627H8.0625C7.75184 12.8627 7.5 12.6108 7.5 12.3002C7.5 11.9895 7.75184 11.7377 8.0625 11.7377H11.4375V8.36267C11.4375 8.05201 11.6893 7.80017 12 7.80017ZM2.41188 12.5883C2.14816 12.3246 2 11.9669 2 11.5939V9.00018H3.6875V11.3127H6.1001V13.0002H3.40625C3.03329 13.0002 2.6756 12.852 2.41188 12.5883Z",fill:"currentColor"})),Dw=e=>Se.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Se.createElement("path",{d:"M9.00049 7.7998C9.3108 7.80007 9.56279 8.05198 9.56299 8.3623V11.7373H12.938C13.2483 11.7376 13.5003 11.9895 13.5005 12.2998C13.5005 12.6103 13.2484 12.862 12.938 12.8623H9.56299V16.2373C9.56299 16.5478 9.31092 16.7995 9.00049 16.7998C8.68983 16.7998 8.43799 16.548 8.43799 16.2373V12.8623H5.06299C4.75233 12.8623 4.50049 12.6105 4.50049 12.2998C4.50069 11.9893 4.75245 11.7373 5.06299 11.7373H8.43799V8.3623C8.43819 8.05181 8.68995 7.7998 9.00049 7.7998ZM15.1812 1.2002C15.5541 1.2002 15.9116 1.34858 16.1753 1.6123C16.439 1.87603 16.5874 2.23348 16.5874 2.60645V5.48145C16.5874 5.85441 16.439 6.21186 16.1753 6.47559C15.9116 6.73931 15.5541 6.8877 15.1812 6.8877H2.80615C2.43319 6.8877 2.07573 6.73931 1.81201 6.47559C1.54829 6.21186 1.3999 5.85441 1.3999 5.48145V2.60645C1.3999 2.23348 1.54829 1.87603 1.81201 1.6123C2.07573 1.34858 2.43319 1.2002 2.80615 1.2002H15.1812ZM3.0874 2.8877V5.2002H14.8999V2.8877H3.0874Z",fill:"currentColor"})),Fh=e=>Se.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Se.createElement("path",{d:"M3.009 12.5527C2.77901 12.4216 2.5877 12.2321 2.45443 12.0034C2.32116 11.7746 2.25064 11.5147 2.25 11.25V3.75C2.25 2.925 2.925 2.25 3.75 2.25H11.25C11.8125 2.25 12.1185 2.53875 12.375 3M10.5 15.75H7.25025C6.98757 15.75 6.72747 15.6983 6.48479 15.5977C6.24211 15.4972 6.0216 15.3499 5.83586 15.1641C5.65012 14.9784 5.50278 14.7579 5.40226 14.5152C5.30174 14.2725 5.25 14.0124 5.25 13.7498V7.25025C5.25 6.71975 5.46074 6.21098 5.83586 5.83586C6.21098 5.46074 6.71975 5.25 7.25025 5.25H13.7498C14.0124 5.25 14.2725 5.30174 14.5152 5.40226C14.7579 5.50278 14.9784 5.65012 15.1641 5.83586C15.3499 6.0216 15.4972 6.24211 15.5977 6.48479C15.6983 6.72747 15.75 6.98757 15.75 7.25025V10.5M12.75 16.5L16.5 12.75M16.5 12.75V16.125M16.5 12.75H13.125",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Eh=e=>Se.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Se.createElement("path",{d:"M9.75 14.25H3.75C3.35218 14.25 2.97064 14.092 2.68934 13.8107C2.40804 13.5294 2.25 13.1478 2.25 12.75V4.5C2.25 4.10218 2.40804 3.72064 2.68934 3.43934C2.97064 3.15804 3.35218 3 3.75 3H6.75L9 5.25H14.25C14.6478 5.25 15.0294 5.40804 15.3107 5.68934C15.592 5.97064 15.75 6.35218 15.75 6.75V9.75M12 16.5L15.75 12.75M15.75 12.75V16.125M15.75 12.75H12.375",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Dh=e=>Se.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Se.createElement("path",{d:"M4.5 15.75V14.25C4.5 13.4544 4.81607 12.6913 5.37868 12.1287C5.94129 11.5661 6.70435 11.25 7.5 11.25H9.75M15.75 12.75L12 16.5M12 16.5V13.125M12 16.5H15.375M6 5.25C6 6.04565 6.31607 6.80871 6.87868 7.37132C7.44129 7.93393 8.20435 8.25 9 8.25C9.79565 8.25 10.5587 7.93393 11.1213 7.37132C11.6839 6.80871 12 6.04565 12 5.25C12 4.45435 11.6839 3.69129 11.1213 3.12868C10.5587 2.56607 9.79565 2.25 9 2.25C8.20435 2.25 7.44129 2.56607 6.87868 3.12868C6.31607 3.69129 6 4.45435 6 5.25Z",stroke:"#7F8792",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));var Io=(e=>(e.MyFiles="my_files",e.Shared="shared",e.Organization="organization",e.Review="review",e))(Io||{}),Y=(e=>(e.AddSibling="addSibling",e.AddChild="addChild",e.Duplicate="duplicate",e.Copy="copy",e.Move="move",e.Download="download",e.Delete="delete",e.Rename="rename",e.Info="info",e.Unshare="unshare",e.RemoveAccess="removeAccess",e.ManagePermissions="managePermissions",e.Preview="preview",e.OpenInNewTab="openInNewTab",e))(Y||{}),ct=(e=>(e.Replace="replace",e.Duplicate="duplicate",e.Cancel="cancel",e))(ct||{}),Ht=(e=>(e.ReplaceAll="replaceAll",e.DuplicateAll="duplicateAll",e.DecideForEach="decideForEach",e))(Ht||{}),dt=(e=>(e.Copy="copy",e.Move="move",e))(dt||{}),_o=(e=>(e.Tree="tree",e.Grid="grid",e))(_o||{}),ut=(e=>(e.Name="name",e.UpdatedAt="updatedAt",e.Size="size",e.Author="author",e.Owner="owner",e.Path="path",e.Actions="__actions",e.Version="version",e))(ut||{});const f7="w-full h-full grid grid-rows-[auto_1fr] gap-5 p-6 overflow-hidden min-w-0 bg-layer-1",Kg="w-full text-secondary flex items-center gap-2",m7="flex min-h-0 min-w-0 h-full gap-4 overflow-hidden",v7="flex flex-col flex-1 min-h-0 min-w-0 h-full gap-4",C7="h-full rounded bg-layer-3 text-secondary min-w-0",w7="flex-1 w-full rounded text-secondary overflow-auto min-h-0 min-w-0",b7="opacity-0 pointer-events-none group-hover/grid-row:opacity-100 group-hover/grid-row:pointer-events-auto",x7=280,y7="Files",ri=20,S7="Files",hd=".dial_folder",R7=280,F7=460,pd=44,E7=56,D7=800,P7=[ut.Name,ut.UpdatedAt,ut.Size,ut.Author,ut.Actions];var ye=(e=>(e.ITEM="item",e.FOLDER="folder",e))(ye||{}),Ph=(e=>(e.FILE="FILE",e.PROMPT="PROMPT",e.CONVERSATION="CONVERSATION",e.APPLICATION="APPLICATION",e.TOOLSET="TOOL_SET",e))(Ph||{}),to=(e=>(e.READ="READ",e.WRITE="WRITE",e.SHARE="SHARE",e))(to||{});const Yg=({open:e,onClose:t,onReplace:s,onDuplicate:i,onDecideForEach:o,conflictingFiles:n,singleFileTitle:r="Replace Or Duplicate Item",multipleFilesTitle:a="Replace Or Duplicate Items",message:l,actionLabels:c,strategyLabels:d,confirmLabel:u="Confirm",cancelLabel:h="Cancel",nameColumnLabel:p="Name",actionColumnLabel:f="Action"})=>{const v=n.length===1,C=v?n[0]?.name:"",w=c?.[ct.Replace]??"Replace",b=c?.[ct.Duplicate]??"Duplicate",x=c?.[ct.Cancel]??"Cancel",y=d?.[Ht.ReplaceAll]??"Replace all",S=d?.[Ht.DuplicateAll]??"Duplicate all",F=d?.[Ht.DecideForEach]??"Decide for each",[R,E]=g.useState(ct.Replace),[D,P]=g.useState(Ht.ReplaceAll),[T,M]=g.useState(new Map(n.map(Q=>[Q.path,ct.Replace]))),[N,q]=g.useState(void 0),L=v?r:a,z=m.jsxs(m.Fragment,{children:["Item with the name ",m.jsxs("span",{className:"text-primary",children:['"',C,'"']})," ","already exists in this destination."]}),H=`${n.length} items with the same names already exist in this destination.`,A=l??(v?z:H),de=g.useMemo(()=>[{id:ct.Replace,name:w},{id:ct.Duplicate,name:b}],[w,b]),k=g.useMemo(()=>n.map(Q=>({id:Q.path,name:Q.name,path:Q.path,nodeType:Q.nodeType??ye.ITEM,action:T.get(Q.path)||ct.Replace})),[n,T]),V=g.useMemo(()=>[{field:"name",headerName:p,flex:1,minWidth:200,floatingFilter:!1,filter:!1,resizable:!1,cellRenderer:Q=>Q.data?.nodeType===ye.FOLDER?m.jsx(Fl,{name:Q.data.name,iconSize:ri}):m.jsx(Rl,{name:Q.data.name,iconSize:ri})},{field:"action",headerName:f,width:140,suppressSizeToFit:!0,sortable:!1,filter:!1,floatingFilter:!1,resizable:!1,cellRenderer:Q=>{if(!Q.data)return null;const j=[{key:ct.Replace,label:w,icon:m.jsx(B.IconCircleFilled,{size:10,className:"text-accent-tertiary"})},{key:ct.Duplicate,label:b,icon:m.jsx(B.IconCircleFilled,{size:10,className:"text-accent-secondary"})},{key:ct.Cancel,label:x,icon:m.jsx(B.IconCircleFilled,{size:10,className:"text-error"})}],ge=j.find(Z=>Z.key===Q.data.action),oe=N===Q.data.path;return m.jsx("div",{className:"flex items-center h-full",children:m.jsx(Tt,{trigger:[Bt.Click],open:oe,menu:{items:j,onClick:({key:Z})=>{M(_=>{const ae=new Map(_);return ae.set(Q.data.path,Z),ae}),q(void 0)}},placement:"bottom-start",matchReferenceWidth:!1,allowedPlacements:["bottom-start","top-start"],onOpenChange:Z=>{q(Z?Q.data.path:void 0)},children:m.jsxs("button",{type:"button",className:"flex items-center gap-2",children:[m.jsxs("span",{className:"flex items-center gap-2",children:[ge?.icon,ge?.label??w]}),m.jsx(B.IconChevronDown,{size:Ct.SM,className:pe("text-secondary transition-transform",oe&&"rotate-180")})]})})})}}],[p,f,w,b,x,N]),U=g.useMemo(()=>[{id:Ht.ReplaceAll,name:y},{id:Ht.DuplicateAll,name:S},{id:Ht.DecideForEach,name:F,content:D===Ht.DecideForEach?m.jsx("div",{className:"mt-4",children:m.jsx(bh,{columnDefs:V,rowData:k,getRowId:Q=>Q.id,wrapCustomCellRenderers:!1,alternateOddRowColors:!1,additionalGridOptions:{domLayout:"autoHeight"}})}):void 0}],[y,S,F,D,V,k]),W=g.useCallback(()=>{E(ct.Replace),P(Ht.ReplaceAll),M(new Map(n.map(Q=>[Q.path,ct.Replace])))},[n]),re=g.useCallback(()=>{W(),t()},[W,t]),be=g.useCallback(()=>{if(W(),v)R===ct.Replace?s():i();else if(D===Ht.ReplaceAll)s();else if(D===Ht.DuplicateAll)i();else if(D===Ht.DecideForEach&&o){const Q=n.map(j=>({file:j,action:T.get(j.path)||ct.Replace}));o(Q)}},[W,v,R,s,i,D,o,n,T]);return m.jsx(eo,{open:e,onClose:re,size:v?_t.Sm:_t.Md,className:pe([!v&&"w-[600px]"]),header:L,dividers:!1,preventKeyboardOnOpen:!0,footer:m.jsxs("div",{className:"flex justify-end gap-3 py-4 px-6 border-t border-tertiary",children:[m.jsx(Es,{onClick:re,label:h}),m.jsx(Rs,{onClick:be,label:u})]}),children:m.jsxs("div",{className:"px-6 py-4",children:[m.jsx("p",{className:"text-secondary mb-4 break-words",children:A}),v?m.jsx(Va,{elementId:"single-file-conflict",radioButtons:de,activeRadioButton:R,orientation:Hi.Column,onChange:Q=>E(Q)}):m.jsx(Va,{elementId:"multiple-files-conflict",radioButtons:U,activeRadioButton:D,orientation:Hi.Column,onChange:Q=>P(Q),formItemChildrenClassName:"gap-3"})]})})},T7=({getContextMenuItems:e,isRowDisabled:t,allowedFileTypes:s,maxSelectableFileSize:i,buttonClassName:o})=>{const n=g.useRef(e);g.useEffect(()=>{n.current=e},[e]);const r=g.useCallback(l=>{if(!l.data||t(l.data,s,i))return null;const d=l.data?n.current?.(l.data)??[]:[];return d.length?m.jsx(Tt,{placement:"bottom-start",allowedPlacements:["top-start","top-end","bottom-start"],menu:{items:d},className:se("sticky right-0",o),children:m.jsx(Be,{className:"text-secondary mx-2 flex flex-row gap-2 hover:text-accent-primary cursor-default",icon:m.jsx(B.IconDotsVertical,{...J})})}):null},[s,i,o,t]);return{actionsColumnDef:g.useMemo(()=>({colId:"__actions",headerName:"",width:44,minWidth:44,maxWidth:44,suppressSizeToFit:!0,sortable:!1,resizable:!1,filter:!1,floatingFilter:!1,cellRenderer:r}),[r])}},k7=({onRename:e})=>{const[t,s]=g.useState(_o.Grid),i=g.useCallback(n=>{e(n),s(_o.Grid)},[e]),o=g.useCallback(n=>{e(n),s(_o.Tree)},[e]);return{renameTriggerView:t,onGridRename:i,onTreeRename:o}};function M7(e,t){const s=g.useRef(null),[i,o]=g.useState(!1);return g.useEffect(()=>{if(!s.current)return;const n=new ResizeObserver(([r])=>{const a=r.contentRect.width;o(a<e)});return n.observe(t?.current||s?.current),()=>n.disconnect()},[e,t]),{containerRef:s,isBelowBreakpoint:i}}var gd={};const I7={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/ace+json":{source:"iana",compressible:!0},"application/ace-groupcomm+cbor":{source:"iana"},"application/ace-trl+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/aif+cbor":{source:"iana"},"application/aif+json":{source:"iana",compressible:!0},"application/alto-cdni+json":{source:"iana",compressible:!0},"application/alto-cdnifilter+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-propmap+json":{source:"iana",compressible:!0},"application/alto-propmapparams+json":{source:"iana",compressible:!0},"application/alto-tips+json":{source:"iana",compressible:!0},"application/alto-tipsparams+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/appinstaller":{compressible:!1,extensions:["appinstaller"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/appx":{compressible:!1,extensions:["appx"]},"application/appxbundle":{compressible:!1,extensions:["appxbundle"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/automationml-aml+xml":{source:"iana",compressible:!0,extensions:["aml"]},"application/automationml-amlx+zip":{source:"iana",compressible:!1,extensions:["amlx"]},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/bufr":{source:"iana"},"application/c2pa":{source:"iana"},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/ce+cbor":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/cid-edhoc+cbor-seq":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/city+json-seq":{source:"iana"},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-eap":{source:"iana"},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/concise-problem-details+cbor":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cose-x509":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwl":{source:"iana",extensions:["cwl"]},"application/cwl+json":{source:"iana",compressible:!0},"application/cwl+yaml":{source:"iana"},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana",extensions:["dcm"]},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dpop+jwt":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/eat+cwt":{source:"iana"},"application/eat+jwt":{source:"iana"},"application/eat-bun+cbor":{source:"iana"},"application/eat-bun+json":{source:"iana",compressible:!0},"application/eat-ucs+cbor":{source:"iana"},"application/eat-ucs+json":{source:"iana",compressible:!0},"application/ecmascript":{source:"apache",compressible:!0,extensions:["ecma"]},"application/edhoc+cbor-seq":{source:"iana"},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.legacyesn+json":{source:"iana",compressible:!0},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/entity-statement+jwt":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdf":{source:"iana",extensions:["fdf"]},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geopose+json":{source:"iana",compressible:!0},"application/geoxacml+json":{source:"iana",compressible:!0},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gnap-binding-jws":{source:"iana"},"application/gnap-binding-jwsd":{source:"iana"},"application/gnap-binding-rotation-jws":{source:"iana"},"application/gnap-binding-rotation-jwsd":{source:"iana"},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/grib":{source:"iana"},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"iana",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"apache",charset:"UTF-8",compressible:!0,extensions:["js"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/jscontact+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jsonpath":{source:"iana"},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwk-set+jwt":{source:"iana"},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/linkset":{source:"iana"},"application/linkset+json":{source:"iana",compressible:!0},"application/load-control+xml":{source:"iana",compressible:!0},"application/logout+jwt":{source:"iana"},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4","mpg4","mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msix":{compressible:!1,extensions:["msix"]},"application/msixbundle":{compressible:!1,extensions:["msixbundle"]},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!0,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/ohttp-keys":{source:"iana"},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg","one","onea"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["sig","asc"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/private-token-issuer-directory":{source:"iana"},"application/private-token-request":{source:"iana"},"application/private-token-response":{source:"iana"},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/provided-claims+jwt":{source:"iana"},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.implied-document+xml":{source:"iana",compressible:!0},"application/prs.implied-executable":{source:"iana"},"application/prs.implied-object+json":{source:"iana",compressible:!0},"application/prs.implied-object+json-seq":{source:"iana"},"application/prs.implied-object+yaml":{source:"iana"},"application/prs.implied-structure":{source:"iana"},"application/prs.mayfile":{source:"iana"},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.vcfbzip2":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0,extensions:["xsf"]},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"apache"},"application/reputon+json":{source:"iana",compressible:!0},"application/resolve-response+jwt":{source:"iana"},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-checklist":{source:"iana"},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-signed-tal":{source:"iana"},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"apache"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana",extensions:["sql"]},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/sslkeylogfile":{source:"iana"},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/st2110-41":{source:"iana"},"application/stix+json":{source:"iana",compressible:!0},"application/stratum":{source:"iana"},"application/swid+cbor":{source:"iana"},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tm+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/toc+cbor":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{source:"iana",compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/trust-chain+json":{source:"iana",compressible:!0},"application/trust-mark+jwt":{source:"iana"},"application/trust-mark-delegation+jwt":{source:"iana"},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/uccs+cbor":{source:"iana"},"application/ujcs+json":{source:"iana",compressible:!0},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vc":{source:"iana"},"application/vc+cose":{source:"iana"},"application/vc+jwt":{source:"iana"},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.1ob":{source:"iana"},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3a+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ach+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc8+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.5gsa2x":{source:"iana"},"application/vnd.3gpp.5gsa2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gsv2x":{source:"iana"},"application/vnd.3gpp.5gsv2x-local-service-information":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.crs+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.current-location-discovery+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-msgstore-ctrl-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-regroup+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-regroup+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-regroup+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.pinapp-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.seal-group-doc+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-network-qos-management-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-ue-config-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-unicast-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-user-profile-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.v2x":{source:"iana"},"application/vnd.3gpp.vae-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acm.addressxfer+json":{source:"iana",compressible:!0},"application/vnd.acm.chatbot+json":{source:"iana",compressible:!0},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"apache",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"apache"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.parquet":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.apexlang":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"apache"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autodesk.fbx":{extensions:["fbx"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.belightsoft.lhzd+zip":{source:"iana",compressible:!1},"application/vnd.belightsoft.lhzl+zip":{source:"iana",compressible:!1},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.bzip3":{source:"iana"},"application/vnd.c3voc.schedule+xml":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.cncf.helm.chart.content.v1.tar+gzip":{source:"iana"},"application/vnd.cncf.helm.chart.provenance.v1.prov":{source:"iana"},"application/vnd.cncf.helm.config.v1+json":{source:"iana",compressible:!0},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datalog":{source:"iana"},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.dcmp+xml":{source:"iana",compressible:!0,extensions:["dcmp"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.eln+zip":{source:"iana",compressible:!1},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.erofs":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"apache",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.fdsn.stationxml+xml":{source:"iana",charset:"XML-BASED",compressible:!0},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.freelog.comic":{source:"iana"},"application/vnd.frogans.fnc":{source:"apache",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"apache",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.ga4gh.passport+jwt":{source:"iana"},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.genozip":{source:"iana"},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.gentoo.catmetadata+xml":{source:"iana",compressible:!0},"application/vnd.gentoo.ebuild":{source:"iana"},"application/vnd.gentoo.eclass":{source:"iana"},"application/vnd.gentoo.gpkg":{source:"iana"},"application/vnd.gentoo.manifest":{source:"iana"},"application/vnd.gentoo.pkgmetadata+xml":{source:"iana",compressible:!0},"application/vnd.gentoo.xpak":{source:"iana"},"application/vnd.geo+json":{source:"apache",compressible:!0},"application/vnd.geocube+xml":{source:"apache",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.pinboard":{source:"iana"},"application/vnd.geogebra.slides":{source:"iana",extensions:["ggs"]},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.gnu.taler.exchange+json":{source:"iana",compressible:!0},"application/vnd.gnu.taler.merchant+json":{source:"iana",compressible:!0},"application/vnd.google-apps.audio":{},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.drawing":{compressible:!1,extensions:["gdraw"]},"application/vnd.google-apps.drive-sdk":{compressible:!1},"application/vnd.google-apps.file":{},"application/vnd.google-apps.folder":{compressible:!1},"application/vnd.google-apps.form":{compressible:!1,extensions:["gform"]},"application/vnd.google-apps.fusiontable":{},"application/vnd.google-apps.jam":{compressible:!1,extensions:["gjam"]},"application/vnd.google-apps.mail-layout":{},"application/vnd.google-apps.map":{compressible:!1,extensions:["gmap"]},"application/vnd.google-apps.photo":{},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.script":{compressible:!1,extensions:["gscript"]},"application/vnd.google-apps.shortcut":{},"application/vnd.google-apps.site":{compressible:!1,extensions:["gsite"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-apps.unknown":{},"application/vnd.google-apps.video":{},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"apache",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0,extensions:["xdcf"]},"application/vnd.gpxsee.map+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.hsl":{source:"iana"},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"apache"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"apache",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"apache"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.ipfs.ipns-record":{source:"iana"},"application/vnd.ipld.car":{source:"iana"},"application/vnd.ipld.dag-cbor":{source:"iana"},"application/vnd.ipld.dag-json":{source:"iana"},"application/vnd.ipld.raw":{source:"iana"},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kdl":{source:"iana"},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.keyman.kmp+zip":{source:"iana",compressible:!1},"application/vnd.keyman.kmx":{source:"iana"},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.ldev.productlicensing":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.mdl":{source:"iana"},"application/vnd.mdl-mbsdf":{source:"iana"},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.medicalholodeck.recordxr":{source:"iana"},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mermaid":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.modl":{source:"iana"},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-visio.viewer":{extensions:["vdx"]},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msgpack":{source:"iana"},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.nato.bindingdataobject+cbor":{source:"iana"},"application/vnd.nato.bindingdataobject+json":{source:"iana",compressible:!0},"application/vnd.nato.bindingdataobject+xml":{source:"iana",compressible:!0,extensions:["bdo"]},"application/vnd.nato.openxmlformats-package.iepd+zip":{source:"iana",compressible:!1},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"apache",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oai.workflows":{source:"iana"},"application/vnd.oai.workflows+json":{source:"iana",compressible:!0},"application/vnd.oai.workflows+yaml":{source:"iana"},"application/vnd.oasis.opendocument.base":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"apache",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-master-template":{source:"iana"},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"apache",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"apache",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.onvif.metadata":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openvpi.dspx+json":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.procrate.brushset":{extensions:["brushset"]},"application/vnd.procreate.brush":{extensions:["brush"]},"application/vnd.procreate.dream":{extensions:["drm"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.pt.mundusmundi":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0,extensions:["xhtm"]},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.relpipe":{source:"iana"},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.sketchometry":{source:"iana"},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.smintio.portals.archive":{source:"iana"},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sybyl.mol2":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uic.osdm+json":{source:"iana",compressible:!0},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml","uo"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.veraison.tsm-report+cbor":{source:"iana"},"application/vnd.veraison.tsm-report+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw","vsdx","vtx"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vocalshaper.vsp4":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.wasmflow.wafl":{source:"iana"},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordlift":{source:"iana"},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xarin.cpj":{source:"iana"},"application/vnd.xecrets-encrypted":{source:"iana"},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/voucher-jws+json":{source:"iana",compressible:!0},"application/vp":{source:"iana"},"application/vp+cose":{source:"iana"},"application/vp+jwt":{source:"iana"},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blender":{extensions:["blend"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-compressed":{extensions:["rar"]},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-ipynb+json":{compressible:!0,extensions:["ipynb"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zip-compressed":{extensions:["zip"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xfdf":{source:"iana",extensions:["xfdf"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yaml":{source:"iana"},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+cbor":{source:"iana"},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yang-sid+json":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zip+dotlottie":{extensions:["lottie"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana",extensions:["adts","aac"]},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flac":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/matroska":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/midi-clip":{source:"iana"},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a","m4b"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"apache"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{source:"iana",compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp","dib"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/dpx":{source:"iana",extensions:["dpx"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/j2c":{source:"iana"},"image/jaii":{source:"iana",extensions:["jaii"]},"image/jais":{source:"iana",extensions:["jais"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpg","jpeg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm","jpgm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxl":{source:"iana",extensions:["jxl"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1,extensions:["jfif"]},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif","btf"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.clip":{source:"iana"},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"iana",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-adobe-dng":{extensions:["dng"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-emf":{source:"iana"},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-wmf":{source:"iana"},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/bhttp":{source:"iana"},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/mls":{source:"iana"},"message/news":{source:"apache"},"message/ohttp-req":{source:"iana"},"message/ohttp-res":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime","mht","mhtml"]},"message/s-http":{source:"apache"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"apache"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/jt":{source:"iana",extensions:["jt"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/prc":{source:"iana",extensions:["prc"]},"model/step":{source:"iana",extensions:["step","stp","stpnc","p21","210"]},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/u3d":{source:"iana",extensions:["u3d"]},"model/vnd.bary":{source:"iana",extensions:["bary"]},"model/vnd.cld":{source:"iana",extensions:["cld"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana",extensions:["pyo","pyox"]},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usda":{source:"iana",extensions:["usda"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"apache"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/hl7v2":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["md","markdown"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/prs.texi":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.exchangeable":{source:"iana"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"apache"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.vcf":{source:"iana"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vnd.zoo.kcl":{source:"iana"},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/wgsl":{source:"iana",extensions:["wgsl"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/evc":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/h266":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/lottie+json":{source:"iana",compressible:!0},"video/matroska":{source:"iana"},"video/matroska-3d":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts","m2t","m2ts","mts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.planar":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"apache"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}};var fd,Xg;function A7(){return Xg||(Xg=1,fd=I7),fd}const L7={},O7=Object.freeze(Object.defineProperty({__proto__:null,default:L7},Symbol.toStringTag,{value:"Module"})),N7=fb(O7);var md,Zg;function H7(){if(Zg)return md;Zg=1;var e={"prs.":100,"x-":200,"x.":300,"vnd.":400,default:900},t={nginx:10,apache:20,iana:40,default:30},s={application:1,font:2,audio:2,video:3,default:0};return md=function(o,n="default"){if(o==="application/octet-stream")return 0;const[r,a]=o.split("/"),l=a.replace(/(\.|x-).*/,"$1"),c=e[l]||e.default,d=t[n]||t.default,u=s[r]||s.default,h=1-o.length/100;return c+d+u+h},md}var Qg;function G7(){return Qg||(Qg=1,(function(e){var t=A7(),s=N7.extname,i=H7(),o=/^\s*([^;\s]*)(?:;|\s|$)/,n=/^text\//i;e.charset=r,e.charsets={lookup:r},e.contentType=a,e.extension=l,e.extensions=Object.create(null),e.lookup=c,e.types=Object.create(null),e._extensionConflicts=[],d(e.extensions,e.types);function r(p){if(!p||typeof p!="string")return!1;var f=o.exec(p),v=f&&t[f[1].toLowerCase()];return v&&v.charset?v.charset:f&&n.test(f[1])?"UTF-8":!1}function a(p){if(!p||typeof p!="string")return!1;var f=p.indexOf("/")===-1?e.lookup(p):p;if(!f)return!1;if(f.indexOf("charset")===-1){var v=e.charset(f);v&&(f+="; charset="+v.toLowerCase())}return f}function l(p){if(!p||typeof p!="string")return!1;var f=o.exec(p),v=f&&e.extensions[f[1].toLowerCase()];return!v||!v.length?!1:v[0]}function c(p){if(!p||typeof p!="string")return!1;var f=s("x."+p).toLowerCase().slice(1);return f&&e.types[f]||!1}function d(p,f){Object.keys(t).forEach(function(C){var w=t[C],b=w.extensions;if(!(!b||!b.length)){p[C]=b;for(var x=0;x<b.length;x++){var y=b[x];f[y]=u(y,f[y],C);const S=h(y,f[y],C);S!==f[y]&&e._extensionConflicts.push([y,S,f[y]])}}})}function u(p,f,v){var C=f?i(f,t[f].source):0,w=v?i(v,t[v].source):0;return C>w?f:v}function h(p,f,v){var C=["nginx","apache",void 0,"iana"],w=f?C.indexOf(t[f].source):0,b=v?C.indexOf(t[v].source):0;return e.types[l]!=="application/octet-stream"&&(w>b||w===b&&e.types[l]?.slice(0,12)==="application/")||w>b?f:v}})(gd)),gd}var Jg=G7();const zs=(e,t)=>{if(!(!e||!e.length||!t))for(const s of e){if(s.path===t)return s;const i=zs(s.items,t);if(i)return i}},vd=(e,t)=>{if(!e?.length)return;if(!t)return e[0];const s=zs(e,t);if(s&&s.nodeType===ye.FOLDER)return s;const i=t.split("/").filter(Boolean);if(i.length<=1)return e[0];const o="/"+i.slice(0,i.length-1).join("/");return zs(e,o)??e[0]},Uo=e=>(e??"").toLowerCase(),B7=e=>Uo(e).replace(/^\./,""),V7=e=>{if(!e)return[];const t=[],s=i=>{const o=i.items??[];for(const n of o)t.push(n),n.nodeType===ye.FOLDER&&s(n)};return s(e),t},Pw=e=>(e.name??e.path.split("/").pop()??"").startsWith("."),gr=e=>{if(!e)return"0 bytes";const t=1024,s=t*1024;return e>=s?`${(e/s).toFixed(1)} MB`:e>=t?`${(e/t).toFixed(0)} KB`:`${e} bytes`},z7=(e,t="en-US",s={year:"numeric",month:"short",day:"2-digit"})=>{if(!e)return"";try{return new Intl.DateTimeFormat(t,s).format(new Date(e))}catch{return e}};function Tw(e,t,s){if(!e||e.includes("*/*"))return!0;const i=t.toLowerCase(),o=s&&s.includes(".")?`.${s.split(".").at(-1).toLowerCase()}`:void 0;return e.some(n=>{const r=n.toLowerCase();if(r.startsWith("."))return o===r;if(r.endsWith("/*")){const a=r.slice(0,-1);return i.startsWith(a)}return i===r})}const W7=e=>e?.map(t=>t.endsWith("/*")?t.replace("/*","s"):j7(t).flat().map(s=>`.${s}`)).flat().join(", ")||"",j7=e=>{const[t,s]=e.split("/");return t==="*"?["all"]:s==="*"?Object.entries(Jg.extensions).reduce((i,[o,n])=>{const[r]=o.split("/");return r===t&&i.push(...n),i},[]):Jg.extensions[e]||[]},Gl=e=>{if(!e)return;const t=e.flags.replace(/[gy]/g,"");return new RegExp(e.source,t)};function Th(e,t,s){if(t&&Gl(t)?.test(e.name))return s??`This ${e.isFolder?"folder":"file"} contains forbidden characters in its name. Please rename it.`}const _7=(e,t,s,i,o)=>{if(e.nodeType===ye.FOLDER)return;const n=!e.contentLength||s==null||e.contentLength<=s;if(!(!e.contentType||Tw(t,e.contentType,e.name)))return i??(t?.length?`Unsupported file type. Supported types: ${W7(t)}.`:"Unsupported file type.");if(!n)return o??`File is too large. Maximum size: ${gr(s)}.`},U7=e=>{const[t,s]=g.useState(e?.showHiddenFiles??!1),i=!!e?.onShowHiddenFilesChange,o=i?e.showHiddenFiles??!1:t,n=g.useCallback(a=>{i?e?.onShowHiddenFilesChange?.(a):s(a)},[i,e]),r=g.useCallback(()=>{const a=!o;i?e?.onShowHiddenFilesChange?.(a):s(a)},[o,i,e]);return{areHiddenFilesVisible:o,toggleHiddenFilesVisibility:r,setAreHiddenFilesVisible:n}},$7=e=>{const[t,s]=g.useState(e?.collapsed??!1),i=!!e?.onCollapseChange,o=i?e.collapsed??!1:t,n=g.useCallback(a=>{i?e?.onCollapseChange?.(a):s(a)},[i,e]),r=g.useCallback(()=>{const a=!o;i?e?.onCollapseChange?.(a):s(a)},[o,i,e]);return{isTreeCollapsed:o,toggleTreeCollapse:r,setIsTreeCollapsed:n}},ef=(e,t,s)=>{if(!t.has(e))return e;const i=s===ye.FOLDER?(o,n)=>`${o} (${n})`:(o,n)=>{const r=o.lastIndexOf("."),a=r>0,l=a?o.slice(0,r):o,c=a?o.slice(r):"";return`${l} (${n})${c}`};for(let o=1;;o++){const n=i(e,o);if(!t.has(n))return n}},Cd=e=>e.name,kw=({getDestinationFiles:e,onResolve:t})=>{const[s,i]=g.useState([]),[o,n]=g.useState(!1),[r,a]=g.useState(null),l=g.useRef(!1),c=g.useCallback(x=>{l.current=!0,i(x),n(!0)},[]),d=g.useCallback(()=>{l.current=!1,n(!1),i([]),a(null)},[]),u=g.useCallback((x,y)=>{const S=e(x),F=new Set(S.map(Cd)),R=y.filter(E=>F.has(E.name));return{hasConflicts:R.length>0,conflicts:R}},[e]),h=g.useCallback((x,y,S,F)=>{const R=e(x),E=new Set(R.map(Cd));return y.map(D=>{const P=D.name,T=E.has(P),M=S&&T?P:ef(P,E,D.nodeType);return(!S||!T)&&E.add(M),{sourceUrl:D.path,destinationUrl:`${x}/${M}`,overwrite:S&&T,nodeType:D.nodeType??ye.ITEM,...F??{}}})},[e]),p=g.useCallback((x,y,S,F)=>{const R=e(x),E=new Set(R.map(Cd));return y.filter(P=>S.get(P.path)!==ct.Cancel).map(P=>{const T=S.get(P.path),M=E.has(P.name),N=T===ct.Replace&&M,q=N?P.name:ef(P.name,E,P.nodeType);return N||E.add(q),{sourceUrl:P.path,destinationUrl:`${x}/${q}`,overwrite:N,nodeType:P.nodeType??ye.ITEM,...F??{}}})},[e]),f=g.useCallback((x,y,S)=>{const F=u(x,y);return F.hasConflicts&&(a({files:y,destinationFolder:x,metadata:S}),c(F.conflicts)),F},[u,c]),v=g.useCallback(()=>{if(!r)return;const{files:x,destinationFolder:y,metadata:S}=r,F=h(y,x,!0,S);t?.(F,y),d()},[r,h,t,d]),C=g.useCallback(()=>{if(!r)return;const{files:x,destinationFolder:y,metadata:S}=r,F=h(y,x,!1,S);t?.(F,y),d()},[r,h,t,d]),w=g.useCallback(()=>{if(!r)return;const{files:x,destinationFolder:y,metadata:S}=r,F=p(y,x,new Map(s.map(R=>[R.path,ct.Cancel])),S);t?.(F,y),d()},[d,s,t,r,p]),b=g.useCallback(x=>{if(!r)return;const{files:y,destinationFolder:S,metadata:F}=r,R=new Map(x.map(D=>[D.file.path,D.action])),E=p(S,y,R,F);t?.(E,S),d()},[r,p,t,d]);return{conflictingFiles:s,conflictResolutionOpen:o,hasActiveConflictRef:l,checkForConflicts:u,startConflictResolution:f,resolveConflictsWithStrategy:h,resolveConflictsWithDecisions:p,openConflictResolution:c,closeConflictResolution:d,handleReplaceAll:v,handleDuplicateAll:C,handleCancelAll:w,handleDecideForEach:b}},q7=({getDestinationFiles:e,onCopyFiles:t,onMoveToFiles:s,onCopySuccess:i,onMoveSuccess:o,onDuplicateSuccess:n,getCopyHeader:r,getMoveHeader:a})=>{const[l,c]=g.useState(!1),[d,u]=g.useState([]),[h,p]=g.useState([]),[f,v]=g.useState(dt.Copy),[C,w]=g.useState(),[b,x]=g.useState(null),{conflictingFiles:y,conflictResolutionOpen:S,hasActiveConflictRef:F,startConflictResolution:R,resolveConflictsWithStrategy:E,closeConflictResolution:D,openConflictResolution:P,handleReplaceAll:T,handleDuplicateAll:M,handleCancelAll:N,handleDecideForEach:q}=kw({getDestinationFiles:e,onResolve:(oe,Z)=>{oe?.length&&(b?.type===dt.Copy?(t?.(oe,Z),i?.()):b?.type===dt.Move&&b.sourceFolder&&(s?.(oe,b.sourceFolder,Z),o?.()))}}),L=g.useCallback(()=>{u([]),p([]),x(null),w(void 0)},[]),z=g.useCallback(oe=>{const Z=R(oe,d,{type:dt.Copy});if(x({type:dt.Copy}),!Z.hasConflicts){const _=E(oe,d,!1);t?.(_,oe),i?.(),L()}},[d,R,E,t,i,L]),H=g.useCallback((oe,Z)=>{const _=Z||(b?.sourceFolder??"/");if(!R(oe,h,{type:dt.Move,sourceFolderPath:_}).hasConflicts){const G=E(oe,h,!0);s?.(G,_,oe),o?.(),L()}},[h,R,E,s,o,L,b]),A=g.useCallback(()=>{T(),L()},[T,L]),de=g.useCallback(()=>{M(),L()},[M,L]),k=g.useCallback(()=>{N(),L()},[N,L]),V=g.useCallback(oe=>{q(oe),L()},[q,L]),U=g.useCallback(oe=>{const Z=oe.at(0)?.parentPath??"/",_=E(Z,oe,!1);t?.(_,Z),n?.()},[t,n,E]),W=g.useCallback(oe=>{v(oe),c(!0)},[]),re=g.useCallback(()=>{c(!1),F.current||L()},[L,F]),[be,Q]=g.useState(),j=g.useCallback(oe=>{u(oe);const Z=oe[0]?.parentPath??oe[0]?.folderId;w(Z),r&&oe.length>0?Q(r(oe.length,oe[0]?.name)):Q(void 0)},[r]),ge=g.useCallback(oe=>{p(oe);const Z=oe[0]?.parentPath??oe[0]?.folderId;w(Z),x({type:dt.Move,sourceFolder:Z}),a&&oe.length>0?Q(a(oe.length,oe[0]?.name)):Q(void 0)},[a]);return{handleDuplicate:U,handleCloseDestinationFolderPopup:re,handleOpenDestinationFolderPopup:W,handleCopyTo:z,handleMoveTo:H,openDestinationFolderPopup:l,destinationFolderMode:f,destinationFolderTitle:be,handleSetCopiedFiles:j,handleSetMovedFiles:ge,clearState:L,conflictingFiles:y,conflictResolutionOpen:S,openConflictResolution:P,closeConflictResolution:D,handleConflictReplace:A,handleConflictCancel:k,handleConflictDuplicate:de,handleConflictDecideForEach:V,sourceFolder:C}},K7=({path:e,defaultPath:t,onPathChange:s,onSelectionClear:i})=>{const o=e!==void 0,[n,r]=g.useState(t),a=o?e:n,l=g.useCallback(d=>{o||r(d),s?.(d)},[o,s]),c=g.useCallback(d=>{l(d),i?.()},[l,i]);return{currentPath:a,setCurrentPath:l,handlePathChange:c}},Y7=({onDeleteFiles:e,onDeleteSuccess:t})=>{const[s,i]=g.useState(!1),[o,n]=g.useState([]),[r,a]=g.useState(""),l=g.useCallback((u,h)=>{n(u),a(h),i(!0)},[]),c=g.useCallback(()=>{i(!1),n([])},[]),d=g.useCallback(()=>{if(e&&o.length>0){const u=o.map(h=>({sourceUrl:h.path,nodeType:h.nodeType}));e(u,r),t?.()}c()},[o,e,t,c,r]);return{deleteConfirmationOpen:s,itemsToDelete:o,openDeleteConfirmation:l,closeDeleteConfirmation:c,confirmDelete:d}},X7=({onDownloadFiles:e,customDownloadItemsAction:t,onDownloadSuccess:s})=>({handleDownloadFiles:g.useCallback(o=>{t&&o.length>0?t(o):e&&o.length>0&&(e(o),s?.())},[e,s,t])}),Z7=e=>"dataTransfer"in e&&e.dataTransfer!==null,Q7=({onUploadFiles:e,onValidateUpload:t,maxFileSize:s,allowedFileTypes:i,validationMessages:o={},onUploadArchive:n,uploadEnabled:r=!0,currentFolder:a}={})=>{const[l,c]=g.useState(!1),[d,u]=g.useState(!1),[h,p]=g.useState(),f=g.useRef(null),v=g.useRef(""),C=g.useRef([]),w=g.useMemo(()=>!!a?.permissions?.includes(to.WRITE),[a]),[b,x]=g.useState(new Map),[y,S]=g.useState(null),F=g.useCallback(G=>!i||i.includes("*/*")?G:G.filter(({fileContent:fe,name:he})=>Tw(i,fe.type,he)),[i]),R=g.useCallback(()=>{x(new Map),S(null)},[]),{conflictingFiles:E,conflictResolutionOpen:D,hasActiveConflictRef:P,startConflictResolution:T,closeConflictResolution:M,openConflictResolution:N,handleReplaceAll:q,handleDuplicateAll:L,handleCancelAll:z,handleDecideForEach:H}=kw({getDestinationFiles:()=>C.current,onResolve:(G,fe)=>{if(!r||!w){R();return}if(!y)return;const he=G.map(ie=>{const le=b.get(ie.sourceUrl);if(!le)return;const Fe=ie.destinationUrl.split("/").pop();return{fileContent:le.fileContent,name:Fe}}).filter(Boolean);if(he[0]?.fileContent?.type==="application/zip"){const{fileContent:ie,name:le}=he[0];n?.(ie,le,fe)}else he.length>0&&e?.(he,fe);R()}});g.useEffect(()=>{r&&w||(c(!1),u(!1),p(void 0),M(),R())},[r,M,R,w]),g.useEffect(()=>{if(!r||!w)return;let G=0;const fe=Fe=>{Z7(Fe)&&Fe.dataTransfer.types.includes(S7)&&(G++,u(!0))},he=()=>{G--,G===0&&u(!1)},ie=()=>{G=0,u(!1)},le=Fe=>{Fe.preventDefault()};return window.addEventListener("dragenter",fe),window.addEventListener("dragleave",he),window.addEventListener("drop",ie),window.addEventListener("dragover",le),()=>{window.removeEventListener("dragenter",fe),window.removeEventListener("dragleave",he),window.removeEventListener("drop",ie),window.removeEventListener("dragover",le)}},[r,w]);const A=g.useCallback(G=>s?G.filter(fe=>fe.fileContent.size>s).map(fe=>fe.name):[],[s]),de=g.useCallback((G,fe)=>G.map(he=>({id:he.name,name:he.name,folderId:fe,path:he.name,nodeType:ye.ITEM,parentPath:fe,contentLength:he.fileContent.size})),[]),k=g.useCallback(async(G,fe,he)=>{if(!r||!w)return!1;p(void 0),C.current=he;const ie=A(G);if(ie.length>0){const Ce=s?(s/1048576).toFixed(2):0,Ee=o.oversizedFiles||`Files exceed maximum size (${Ce}MB): ${ie.join(", ")}`;return p(Ee),!1}if(t)try{const Ce=await t(G,he,fe);if(!Ce.valid)return p(Ce.message||o.validationFailed||"Validation failed"),!1}catch{return p(o.validationError||"Validation error occurred"),!1}const le=new Map(G.map(Ce=>[Ce.name,Ce]));x(le);const Fe=de(G,fe);return S({destinationFolder:fe}),T(fe,Fe,{destinationFolder:fe}).hasConflicts?!1:(e?.(G,fe),R(),!0)},[r,e,t,A,s,o,de,T,R,w]),V=g.useCallback(()=>{q(),R()},[q,R]),U=g.useCallback(()=>{L(),R()},[L,R]),W=g.useCallback(()=>{z(),R()},[z,R]),re=g.useCallback(G=>{H(G),R()},[H,R]),be=g.useCallback(()=>{M(),P.current||R()},[M,P,R]),Q=g.useCallback(G=>{!r||!w||(G.preventDefault(),G.stopPropagation(),G.dataTransfer.types.includes("Files")&&c(!0))},[r,w]),j=g.useCallback(G=>{if(!r||!w)return;G.preventDefault(),G.stopPropagation();const fe=G.currentTarget.getBoundingClientRect(),he=G.clientX,ie=G.clientY;(he<=fe.left||he>=fe.right||ie<=fe.top||ie>=fe.bottom)&&c(!1)},[r,w]),ge=g.useCallback(G=>{!r||!w||(G.preventDefault(),G.stopPropagation(),G.dataTransfer.types.includes("Files")&&(G.dataTransfer.dropEffect="copy"))},[r,w]),oe=g.useCallback(async(G,fe,he)=>{if(!r||!w||(G.preventDefault(),G.stopPropagation(),c(!1),!G.dataTransfer.types.includes("Files")))return;const ie=Array.from(G.dataTransfer.items||[]),le=[];let Fe=!1;if(ie.length>0&&ie.forEach(Ee=>{if(Ee.kind==="file"){if(Ee.webkitGetAsEntry?.()?.isDirectory){Fe=!0;return}const Ue=Ee.getAsFile?.();Ue&&le.push(Ue)}}),le.length===0&&G.dataTransfer.files?.length&&le.push(...Array.from(G.dataTransfer.files)),le.length===0){Fe&&p(o.foldersNotSupported||"Folder upload is not supported");return}const Oe=le.map(Ee=>({fileContent:Ee,name:Ee.name})),Ce=F(Oe);if(Ce.length===0){p(o.unsupportedFiles||"Selected files are not supported");return}await k(Ce,fe,he)},[r,F,k,o,w]);g.useEffect(()=>{let G=f.current;G||(G=document.createElement("input"),G.type="file",G.multiple=!0,G.style.display="none",document.body.appendChild(G),f.current=G),i&&i.length>0?G.accept=i.join(","):G.removeAttribute("accept");const fe=async()=>{if(!r||!w){G&&(G.value="");return}if(!G?.files?.length)return;const ie=Array.from(G.files).map(Fe=>({fileContent:Fe,name:Fe.name})),le=F(ie);if(le.length===0){p(o.unsupportedFiles||"Selected files are not supported"),G.value="";return}await k(le,v.current,C.current),G.value=""};return G.addEventListener("change",fe),()=>{G&&(G.removeEventListener("change",fe),f.current===G&&(document.body.removeChild(G),f.current=null))}},[r,i,F,k,o,w]);const Z=g.useCallback((G,fe)=>{!r||!w||(v.current=G,C.current=fe,f.current&&f.current.click())},[r,w]),_=g.useCallback((G,fe)=>{if(!n||!r||!w)return;const he=document.createElement("input");he.type="file",he.accept=".zip,application/zip",he.multiple=!1,he.style.display="none";const ie=()=>{const le=he.files?.[0];if(!le){document.body.removeChild(he);return}const Fe=le.name.replace(/\.zip$/i,""),Oe={id:Fe,name:Fe,folderId:G,path:`${G}/${Fe}`,nodeType:ye.FOLDER,parentPath:G,contentLength:le.size,contentType:le.type};if(C.current=fe,S({destinationFolder:G}),x(new Map([[Oe.path,{fileContent:le,name:Fe}]])),T(G,[Oe],{destinationFolder:G}).hasConflicts){document.body.removeChild(he);return}try{n(le,Fe,G)}finally{document.body.removeChild(he)}};he.addEventListener("change",ie),document.body.appendChild(he),he.click()},[n,r,w,T]),ae=g.useCallback(()=>{p(void 0)},[]);return{isDragging:l,isDraggingOverWindow:d,uploadError:h,handleDragEnter:Q,handleDragLeave:j,handleDragOver:ge,handleDrop:oe,clearError:ae,handleUpload:k,openFileDialog:Z,openArchiveDialog:_,fileInputRef:f,uploadConflictingFiles:E,uploadConflictResolutionOpen:D,hasActiveUploadConflictRef:P,openUploadConflictResolution:N,closeUploadConflictResolution:be,handleUploadConflictReplace:V,handleUploadConflictDuplicate:U,handleUploadConflictCancel:W,handleUploadConflictDecideForEach:re}},Mw=g.createContext(void 0),Iw={hiddenItemWarning:`${ls.Warning}__A dot at the start of the name will make the item hidden`},J7={emptyName:"Name cannot be empty",duplicateName:"An item with this name already exists",hiddenItemWarning:Iw.hiddenItemWarning};function e9(e){let t=e.length;for(;t>0&&e[t-1]==="/";)t--;return e.slice(0,t)}function t9(e,t){const s=e9(e),i=s.lastIndexOf("/");return i===-1?t:s.slice(0,i+1)+t}function s9(e){const t=e.lastIndexOf(".");return t===-1||t===0?e:e.substring(0,t)}function tf(e){const t=e.lastIndexOf(".");return t===-1||t===0?"":e.substring(t)}const i9=({items:e,onRenameValidate:t,validationMessages:s,onMoveToFiles:i})=>{const[o,n]=g.useState(),r=g.useMemo(()=>({...J7,...s}),[s]),a=g.useMemo(()=>o?.path,[o]),l=g.useCallback(p=>{const f=zs(e,p);f&&n(f)},[e]),c=g.useCallback(()=>{n(void 0)},[]),d=g.useCallback(p=>{if(!o||!i){n(void 0);return}const f=o.nodeType===ye.ITEM;let v=p.trim();if(f){const x=tf(o.name);x&&!v.endsWith(x)&&(v=v+x)}if(v===o.name){n(void 0);return}const C=t9(o.path,v),w=o.parentPath;if(!w){n(void 0);return}const b={sourceUrl:o.path,destinationUrl:C,nodeType:o.nodeType};i([b],w,w),n(void 0)},[o,i]),u=g.useCallback((p,f)=>{const v=p.trim();if(!v)return r.emptyName;if(v.startsWith("."))return r.hiddenItemWarning;const C=f.nodeType===ye.ITEM;let w=v;if(C){const x=tf(f.name);x&&!w.endsWith(x)&&(w=w+x)}const b=f.parentPath;if(b){const x=zs(e,b);if(x&&new Set((x.items??[]).filter(S=>S.path!==f.path).map(S=>S.name.toLowerCase())).has(w.toLowerCase()))return r.duplicateName}if(t){const x=t(w,f);if(x)return x}return null},[t,r,e]),h=g.useCallback(p=>p.nodeType===ye.ITEM?s9(p.name):p.name,[]);return{renamedPath:a,renamedItem:o,renameHandler:l,renameSaveHandler:d,renameCancelHandler:c,renameValidateHandler:u,getDisplayName:h}},Aw=e=>{const[t,s]=g.useState(e?.expandedPaths??new Set),i=g.useMemo(()=>!!e?.onExpandedPathsChange,[e?.onExpandedPathsChange]),o=g.useMemo(()=>i?e?.expandedPaths??new Set:t,[i,e?.expandedPaths,t]);g.useEffect(()=>{i&&e?.expandedPaths&&s(new Set(e.expandedPaths))},[i,e?.expandedPaths]);const n=g.useCallback(d=>{i?e?.onExpandedPathsChange?.(d):s(d)},[i,e]),r=g.useCallback(d=>{const u=new Set(o);u.has(d)?u.delete(d):u.add(d),n(u)},[o,n]),a=g.useCallback(()=>{n(new Set)},[n]),l=g.useCallback(d=>{const u=new Set(o);u.add(d),n(u)},[o,n]),c=g.useCallback(d=>{const u=new Set(o);u.delete(d),n(u)},[o,n]);return{expandedPaths:o,setExpandedPaths:n,togglePath:r,collapseAll:a,expandPath:l,collapsePath:c,isControlled:i}},o9=({newActions:e,currentFolder:t,onUploadFiles:s,onCreateFolder:i,onUploadArchive:o,onCreateNewItem:n,isNewButtonDisabled:r})=>{const a=g.useMemo(()=>{const d=[];return e&&(e.newFolder&&d.push({key:"new-folder",label:e.newFolder.label,icon:e?.newFolder?.icon!==void 0?e?.newFolder?.icon:m.jsx(B.IconFolder,{...J,className:"text-secondary"}),onClick:()=>{i&&i()}}),e.newItem&&d.push({key:"new-item",label:e.newItem.label,icon:e?.newItem?.icon!==void 0?e?.newItem?.icon:m.jsx(B.IconPlus,{...J,className:"text-secondary"}),onClick:()=>{n&&n()}}),e.uploadFiles&&d.push({key:"upload-file",label:e.uploadFiles.label,icon:e?.uploadFiles?.icon!==void 0?e?.uploadFiles?.icon:m.jsx(B.IconFile,{...J,className:"text-secondary"}),onClick:()=>{s&&s()}}),e.uploadArchive&&d.push({key:"upload-archive",label:e.uploadArchive.label,icon:e?.uploadArchive?.icon!==void 0?e?.uploadArchive?.icon:m.jsx(B.IconFileZip,{...J,className:"text-secondary"}),onClick:()=>{o&&o()}})),d},[e,i,s,o,n]),l=g.useMemo(()=>a?.length>0,[a]),c=g.useMemo(()=>!t?.permissions?.includes(to.WRITE)||!!r,[t,r]);return{newActions:a,isNewButtonVisible:l,isNewButtonDisabled:c}},n9={emptyName:"Folder name cannot be empty",duplicateName:"A folder with this name already exists",hiddenItemWarning:Iw.hiddenItemWarning},r9=({currentFolder:e,onCreateFolder:t,onValidateFolderName:s,validationMessages:i})=>{const[o,n]=g.useState(!1),[r,a]=g.useState(null),l=g.useRef(e?.path),c=g.useMemo(()=>({...n9,...i}),[i]);g.useEffect(()=>{const f=e?.path;l.current!==f&&o&&(n(!1),a(null)),l.current=f},[e?.path,o]);const d=g.useCallback(()=>{if(o)return;const f=`__new_folder_${Date.now()}`;a(f),n(!0)},[o]),u=g.useCallback(()=>{n(!1),a(null)},[]),h=g.useCallback(f=>{const v=f.trim();if(!v)return c.emptyName;if(v.startsWith(".")&&v.length>1)return c.hiddenItemWarning;if(e&&new Set((e.items??[]).filter(w=>w.nodeType===ye.FOLDER).map(w=>w.name.toLowerCase())).has(v.toLowerCase()))return c.duplicateName;if(s&&e){const C=s(v,e);if(C)return C}return null},[e,s,c]),p=g.useCallback(async f=>{const v=f.trim();if(!v)return;const w=`${e?.path??"/"}/${v}`,b=`${w}/${hd}`,y={fileContent:new File([],hd,{type:"text/plain"}),name:hd};t&&await t(y,w,b),u()},[e,t,u]);return{isCreatingFolder:o,newFolderTempId:r,startFolderCreation:d,cancelFolderCreation:u,saveFolderCreation:p,validateFolderName:h}},a9=({additionalButtons:e,expandedPathsLength:t,collapseAll:s})=>{const i=t===0;return{additionalButtons:g.useMemo(()=>{const n=se(["hover:text-accent-primary",i&&"controls-secondary-disable hover:controls-secondary-disable disabled:hover:cursor-default"]);return m.jsxs(m.Fragment,{children:[e,m.jsx(hi,{disabled:i,className:n,size:Ft.Small,onClick:s,icon:m.jsx(B.IconCopyMinus,{size:Ct.LG,stroke:1.5}),"aria-label":"collapse-all"})]})},[e,i,s])}},l9=({onGetInfo:e})=>{const[t,s]=g.useState(!1),[i,o]=g.useState(void 0),n=g.useCallback(async a=>{o(a),s(!0),e&&await e(a)},[e]),r=g.useCallback(()=>{s(!1),o(void 0)},[]);return{isMetadataPopupOpen:t,selectedFileForMetadata:i,openMetadataPopup:n,closeMetadataPopup:r}};function c9(e){const t=[];function s(i){for(const o of i)t.push(o),o.items&&s(o.items)}return s(e),t}function sf(e,t){const s=Uo(t);return e.filter(i=>Uo(i.name).includes(s))}function d9({onSearchFiles:e,clearSearchResults:t,currentPath:s,searchResults:i=[],searchInProgress:o=!1,navigationPanelValue:n,onNavigationPanelSearchChange:r,allItems:a=[],activeTab:l}){const[c,d]=g.useState(""),u=g.useRef(!1),h=g.useRef(!1),p=g.useRef([]),f=g.useRef(s),v=g.useRef(l);g.useEffect(()=>{n!=null&&d(String(n))},[n]);const C=String(n??c??"").trim(),w=h.current&&(o||i.length>0||C!==""),b=g.useCallback(F=>{const R=F.trim();if(!R){h.current=!1,u.current=!1;return}h.current=!0,e&&s&&!u.current&&(u.current=!0,e(s,R))},[e,s]),x=g.useCallback(()=>{u.current=!1,h.current=!1,p.current=[],d(""),r?.(""),t?.()},[t,r]),y=g.useCallback(F=>{const R=String(F??"");d(R),r?.(R),R.trim()?b(R):x()},[r,b,x]);g.useEffect(()=>{(f.current!==s||v.current!==l)&&(f.current=s,v.current=l,u.current=!1,h.current=!1,p.current=[],d(""),r?.(""),t?.())},[s,l,r,t]),g.useEffect(()=>{o||(p.current=i)},[i,o]);const S=g.useMemo(()=>{if(e){const R=o?p.current:i;return!C||R.length===0?R:sf(R,C)}if(!C||!a.length)return[];const F=c9(a);return sf(F,C)},[e,i,o,C,a]);return{isSearchMode:w,searchValue:c,effectiveSearchValue:C,setSearchValue:d,handleSearchChange:y,handleSearchActivate:b,handleSearchClear:x,searchResultsRows:S}}function u9({selectedPaths:e,defaultSelectedPaths:t,onSelectedPathsChange:s}){const i=e!==void 0,[o,n]=g.useState(()=>t??new Set),r=g.useMemo(()=>i?e:o,[i,e,o]),a=g.useCallback(c=>{const d=new Set(c);s?.(d),i||n(d)},[i,s]),l=g.useCallback(()=>{a(new Set)},[a]);return{selectedPaths:r,setSelectedPaths:a,clearSelection:l,isControlled:i}}const Lw=':;,=/{}%&\\"',kh=`(\r
|
|
68
68
|
|
|
|
69
69
|
|\r| )|[\0-]`,h9=`[${Lw.replace(/\\/g,"\\\\")}]`,Ow=new RegExp(`${h9}|${kh}`),p9=new RegExp(kh),Nw=({managerLabel:e,children:t,className:s,items:i=[],rootItem:o,path:n,defaultPath:r,filesLoading:a,selectedPaths:l,defaultSelectedPaths:c,onSelectedPathsChange:d,showHiddenFiles:u,onShowHiddenFilesChange:h,treeOptions:p,showNavigationPanel:f=!0,navigationPanelOptions:v,deleteConfirmationOptions:C,gridOptions:w,toolbarOptions:b,bulkActionsToolbarOptions:x,destinationFolderPopupOptions:y,conflictResolutionPopupOptions:S,onPathChange:F,onTableFileClick:R,handleSelectionClick:E,onGridApiChange:D,onCopyFiles:P,onMoveToFiles:T,onDeleteFiles:M,onDownloadFiles:N,onRenameValidate:q,onAddSibling:L,onAddChild:z,renameValidationMessages:H,forbiddenSymbolsRegExp:A=Ow,forbiddenSymbolsTooltip:de,onUploadFiles:k,onValidateUpload:V,uploadEnabled:U,uploadValidationMessages:W,maxFileSize:re,onUploadArchive:be,onCreateFolder:Q,onCreateFolderValidate:j,folderCreationValidationMessages:ge,fileMetadataPopupOptions:oe,onGetInfo:Z,onUnshareFiles:_,onRemoveFilesAccess:ae,actionsRef:G,sharedByMePaths:fe,onSearchFiles:he,searchResults:ie,searchInProgress:le,clearSearchResults:Fe,allowedFileTypes:Oe,maxSelectableFileSize:Ce,getDisabledTooltip:Ee,fileTooLargeTooltip:_e,unsupportedFileTypeTooltip:Ue,emptyStateIcon:Ae,emptyStateTitle:kt,emptyStateDescription:os,sharedWithMeIds:Mt,onFolderPopupPathChange:Ge,onManagePermissions:K,onPreview:He,onOpenInNewTab:ns,previewExtensions:hn,isRenameFileAvailable:Bl,isDuplicateFolderAvailable:Vl,customUploadFileAction:Ci,customCreateNewItemAction:pn,customDuplicateAction:so,customDeleteItemsAction:Dr,customDownloadItemsAction:io,customBreakpointRef:Pr,gridClassName:Tr,nonClickableTableColumns:kr,hideSearchPathItemName:zl,showHiddenFileSwitcherInDestinationPopup:Wl,autoSelectUploadedItems:Ks=!1})=>{const{selectedPaths:Ps,clearSelection:Ts,setSelectedPaths:wi}=u9({selectedPaths:l,defaultSelectedPaths:c,onSelectedPathsChange:d}),Ys=g.useRef(null),jl=g.useCallback((De,Ne,ze)=>{if(Ks){const rs=Ne.lastIndexOf("/"),pc=rs>=0?Ne.slice(rs+1):Ne,Me=rs>=0?Ne.slice(0,rs):"";Ys.current={fileNames:new Set([pc]),destinationFolder:Me}}Q?.(De,Ne,ze)},[Q,Ks]),_l=g.useCallback((De,Ne)=>{Ks&&(Ys.current={fileNames:new Set(De.map(ze=>ze.name)),destinationFolder:Ne}),k?.(De,Ne)},[k,Ks]),Ul=g.useCallback((De,Ne,ze)=>{Ks&&(Ys.current={fileNames:new Set([Ne]),destinationFolder:ze}),be?.(De,Ne,ze)},[be,Ks]),$l=g.useMemo(()=>{const De=new Map;return Ps.forEach(Ne=>{const ze=zs(i,Ne);ze&&De.set(Ne,ze)}),De},[Ps,i]);g.useEffect(()=>{if(Ps.size===0)return;let De=!1;for(const Ne of Ps)if(!zs(i,Ne)){De=!0;break}if(De){const Ne=new Set;for(const ze of Ps)zs(i,ze)&&Ne.add(ze);wi(Ne)}},[i,Ps,wi]);const{currentPath:it,setCurrentPath:ql,handlePathChange:wt}=K7({path:n,defaultPath:r,onPathChange:F,onSelectionClear:Ts}),gn=g.useMemo(()=>{const{showFiles:De=!0,showFolders:Ne=!0,...ze}=w||{};return{showFiles:De,showFolders:Ne,...ze}},[w]),fn=gn.showFiles,mn=gn.showFolders,[oo,no]=g.useState(),Kl=y?.destinationFolderPath??oo,ro=g.useCallback(De=>{y?.setDestinationFolderPath?y.setDestinationFolderPath(De):no(De)},[y]),{areHiddenFilesVisible:ks,toggleHiddenFilesVisibility:Mr}=U7({showHiddenFiles:u,onShowHiddenFilesChange:h}),{isTreeCollapsed:Ir,toggleTreeCollapse:Ar,setIsTreeCollapsed:ao}=$7({collapsed:p?.collapsed,onCollapseChange:p?.onCollapseChange}),{renamedPath:Yl,renamedItem:lo,renameHandler:Xl,renameSaveHandler:Zl,renameCancelHandler:Ql,renameValidateHandler:Jl,getDisplayName:ec}=i9({items:i,onRenameValidate:q,validationMessages:H,onMoveToFiles:T}),{isSearchMode:vn,searchValue:Lr,effectiveSearchValue:co,setSearchValue:tc,handleSearchChange:Cn,handleSearchClear:bt,searchResultsRows:Or}=d9({onSearchFiles:he,clearSearchResults:Fe,currentPath:it,searchResults:ie,searchInProgress:le,navigationPanelValue:v?.value,onNavigationPanelSearchChange:v?.onSearchChange,allItems:i,activeTab:b?.activeTab}),at=g.useMemo(()=>vd(i,it)??i[0],[i,it]),{handleCopyTo:Nr,handleMoveTo:Hr,handleDuplicate:Gr,handleOpenDestinationFolderPopup:Br,handleCloseDestinationFolderPopup:uo,openDestinationFolderPopup:ho,handleSetCopiedFiles:po,handleSetMovedFiles:sc,destinationFolderMode:Vr,destinationFolderTitle:wn,conflictingFiles:ic,conflictResolutionOpen:oc,closeConflictResolution:nc,handleConflictReplace:rc,handleConflictDuplicate:ac,handleConflictCancel:zr,handleConflictDecideForEach:Wr,sourceFolder:jr}=q7({getDestinationFiles:De=>vd(i,De)?.items??[],onCopyFiles:P,onMoveToFiles:T,onCopySuccess:Ts,onMoveSuccess:Ts,onDuplicateSuccess:Ts,getCopyHeader:y?.getCopyHeader,getMoveHeader:y?.getMoveHeader});g.useEffect(()=>{ho||ro(void 0)},[ho,ro]);const{deleteConfirmationOpen:go,itemsToDelete:Xs,openDeleteConfirmation:lc,closeDeleteConfirmation:It,confirmDelete:cc}=Y7({onDeleteFiles:M,onDeleteSuccess:Ts}),{handleDownloadFiles:bn}=X7({onDownloadFiles:N,customDownloadItemsAction:io,onDownloadSuccess:Ts}),{isDragging:fo,isDraggingOverWindow:bi,uploadError:_r,handleDragEnter:Ur,handleDragLeave:$r,handleDragOver:qr,handleDrop:xn,clearError:dc,openFileDialog:Kr,fileInputRef:Yr,openArchiveDialog:mo,uploadConflictingFiles:uc,uploadConflictResolutionOpen:hc,closeUploadConflictResolution:yn,handleUploadConflictReplace:Xr,handleUploadConflictDuplicate:Zr,handleUploadConflictCancel:Qr,handleUploadConflictDecideForEach:Jr}=Q7({onUploadFiles:_l,onValidateUpload:V,maxFileSize:re,onUploadArchive:Ul,allowedFileTypes:Oe,validationMessages:W,uploadEnabled:U,currentFolder:at}),ea=g.useCallback(De=>{bt();const Ne=it??"",ze=at?.items??[];xn(De,Ne,ze)},[it,at,xn,bt]),ta=g.useCallback(()=>{bt();const De=it??"",Ne=at?.items??[];Kr(De,Ne)},[it,at,Kr,bt]),X=g.useCallback(()=>{bt();const De=it??"",Ne=at?.items??[];mo(De,Ne)},[it,at,mo,bt]),qe=g.useCallback(()=>{bt(),Ci?.(it,at)},[Ci,it,at,bt]),Qe=g.useCallback(()=>{bt(),pn?.(it,at)},[pn,it,at,bt]),qt=g.useCallback(De=>{so?.(De)},[so]),{isCreatingFolder:gs,newFolderTempId:vo,startFolderCreation:Nh,cancelFolderCreation:Kw,saveFolderCreation:Yw,validateFolderName:Xw}=r9({currentFolder:at,onCreateFolder:jl,onValidateFolderName:j,validationMessages:ge}),Hh=g.useCallback(()=>{bt(),Nh()},[bt,Nh]),{newActions:Zw,isNewButtonVisible:Qw,isNewButtonDisabled:Jw}=o9({newActions:b?.newActions,currentFolder:at,onUploadFiles:Ci?qe:ta,onUploadArchive:X,onCreateFolder:Hh,onCreateNewItem:Qe,isNewButtonDisabled:b?.isNewButtonDisabled}),eb=g.useMemo(()=>{if(vn){let Me=Or;fn||(Me=Me.filter(Ke=>Ke.nodeType!==ye.ITEM)),mn||(Me=Me.filter(Ke=>Ke.nodeType!==ye.FOLDER)),ks||(Me=Me.filter(Ke=>!Ke.path.split("/").filter(Boolean).some(Rn=>Rn.startsWith("."))));const Sn=Me.map(Ke=>({...Ke,id:Ke.id??Ke.path,name:Ke.name??Ke.path.split("/").pop()??"",updatedAt:Ke.updatedAt,size:Ke.contentLength,contentLength:Ke.contentLength,author:Ke.author,path:Ke.path,nodeType:Ke.nodeType,extension:Ke.extension,isTemporary:!1,owner:Ke.owner,folderId:Ke.folderId}));return gs&&vo&&Sn.unshift({id:vo,name:"",updatedAt:void 0,author:void 0,path:it??"/",nodeType:ye.FOLDER,extension:void 0,isTemporary:!0,owner:void 0}),Sn}const De=Uo(co).trim(),Ne=at?.items??[];let ze=De?V7(at):Ne;fn||(ze=ze.filter(Me=>Me.nodeType!==ye.ITEM)),mn||(ze=ze.filter(Me=>Me.nodeType!==ye.FOLDER)),ks||(ze=ze.filter(Me=>De?!Me.path.split("/").filter(Boolean).some(Ke=>Ke.startsWith(".")):!Pw(Me)));const rs=ze.map(Me=>({...Me,id:Me.id??Me.path,name:Me.name??Me.path.split("/").pop()??"",updatedAt:Me.updatedAt,size:Me.contentLength,author:Me.author,path:Me.path,nodeType:Me.nodeType,extension:Me.extension,isTemporary:!1,owner:Me.owner,contentType:Me.contentType,contentLength:Me.contentLength,folderId:Me.folderId}));if(gs&&vo&&!De&&rs.unshift({id:vo,name:"",updatedAt:void 0,author:void 0,path:it??"/",nodeType:ye.FOLDER,extension:void 0,isTemporary:!0,owner:void 0}),!De)return rs;const pc=De.split(/\s+/).filter(Boolean);return rs.filter(Me=>{if(Me.isTemporary)return!0;const Sn=Uo(Me.name),Ke=Uo(Me.author),Vh=B7(Me.extension);return pc.every(Rn=>Sn.includes(Rn)||Ke.includes(Rn)||Vh.includes(Rn))})},[vn,Or,at,co,ks,gs,vo,fn,mn,it]);g.useEffect(()=>{const De=Ys.current;if(!De)return;if((it??"")!==De.destinationFolder){Ys.current=null;return}const Ne=vd(i,De.destinationFolder);if(!Ne?.items)return;const ze=new Set;for(const rs of Ne.items)De.fileNames.has(rs.name)&&ze.add(rs.path);ze.size>0&&(wi(ze),Ys.current=null)},[i,it,wi]);const tb=g.useCallback(De=>{wt(De.path)},[wt]),sb=g.useCallback(De=>{wt(De)},[wt]),ib=g.useCallback(De=>{De.nodeType===ye.FOLDER?wt(De.path):R?.(De)},[wt,R]),{expandedPaths:Gh,setExpandedPaths:ob,collapseAll:nb}=Aw({expandedPaths:p?.expandedPaths,onExpandedPathsChange:p?.onExpandedPathsChange}),{additionalButtons:rb}=a9({collapseAll:nb,expandedPathsLength:Gh.size,additionalButtons:p?.additionalButtons}),{isMetadataPopupOpen:ab,selectedFileForMetadata:lb,openMetadataPopup:cb,closeMetadataPopup:Bh}=l9({onGetInfo:Z}),db=g.useCallback(()=>{Bh(),oe?.clearMetadata?.()},[Bh,oe]),ub=g.useMemo(()=>{if(A)return Gl(A)},[A]),hb={managerLabel:e,className:s,items:i,allowedFileTypes:Oe,maxSelectableFileSize:Ce,rootItem:o,filesLoading:a,treeOptions:{...p,expandedPaths:Gh,onExpandedPathsChange:ob,additionalButtons:rb},showNavigationPanel:f,navigationPanelOptions:v,gridOptions:gn,toolbarOptions:b,bulkActionsToolbarOptions:x,deleteConfirmationOptions:C,destinationFolderPopupOptions:{...y,destinationFolderPath:Kl,setDestinationFolderPath:ro,header:wn,onCreateFolder:Q,onCreateFolderValidate:j,folderCreationValidationMessages:ge,sourceFolder:jr},currentPath:it,setCurrentPath:ql,searchValue:Lr,effectiveSearchValue:co,setSearchValue:tc,areHiddenFilesVisible:ks,toggleHiddenFilesVisibility:Mr,isTreeCollapsed:Ir,toggleTreeCollapse:Ar,setIsTreeCollapsed:ao,selectedPaths:Ps,selectedFiles:$l,setSelectedPaths:wi,clearSelection:Ts,currentFolder:at,gridRows:eb,handleCopyTo:Nr,handleMoveTo:Hr,handleDuplicate:so?qt:Gr,handleSetCopiedFiles:po,handleSetMovedFiles:sc,openDestinationFolderPopup:ho,handleCloseDestinationFolderPopup:uo,handleOpenDestinationFolderPopup:Br,destinationFolderMode:Vr,handleAddSibling:L,handleAddChild:z,handleDownloadFiles:bn,renamedPath:Yl,renamedItem:lo,forbiddenSymbolsRegExp:ub,forbiddenSymbolsTooltip:de,onRename:Xl,onRenameSave:Zl,onRenameCancel:Ql,onRenameValidate:Jl,getDisplayName:ec,openDeleteConfirmation:Dr||lc,closeDeleteConfirmation:It,confirmDelete:cc,deleteConfirmationOpen:go,itemsToDelete:Xs,handlePathChange:wt,handleTreeItemClick:tb,handleBreadcrumbItemClick:sb,handleSearchChange:Cn,handleTableRowClick:ib,onTableFileClick:R,handleSelectionClick:E,onGridApiChange:D,isDragging:fo,uploadError:_r,handleDragEnter:Ur,handleDragLeave:$r,handleDragOver:qr,handleDrop:ea,clearUploadError:dc,onUploadFiles:k,onValidateUpload:V,maxFileSize:re,isDraggingOverWindow:bi,openFileDialog:ta,fileInputRef:Yr,newActions:Zw,isNewButtonVisible:Qw,isNewButtonDisabled:Jw,isCreatingFolder:gs,newFolderTempId:vo,startFolderCreation:Hh,cancelFolderCreation:Kw,saveFolderCreation:Yw,validateFolderName:Xw,conflictResolutionPopupOptions:S,conflictingFiles:ic,conflictResolutionOpen:oc,closeConflictResolution:nc,handleConflictReplace:rc,handleConflictDuplicate:ac,handleConflictCancel:zr,handleConflictDecideForEach:Wr,uploadConflictingFiles:uc,uploadConflictResolutionOpen:hc,closeUploadConflictResolution:yn,handleUploadConflictReplace:Xr,handleUploadConflictDuplicate:Zr,handleUploadConflictCancel:Qr,handleUploadConflictDecideForEach:Jr,fileMetadataPopupOptions:oe,isMetadataPopupOpen:ab,selectedFileForMetadata:lb,openMetadataPopup:cb,closeMetadataPopup:db,onGetInfo:Z,onUnshareFiles:_,onRemoveFilesAccess:ae,actionsRef:G,sharedByMePaths:fe,onSearchFiles:he,searchInProgress:le,searchResults:ie,clearSearchResults:Fe,isSearchMode:vn,emptyStateIcon:Ae,emptyStateTitle:kt,emptyStateDescription:os,gridClassName:Tr,sharedWithMeIds:Mt,onFolderPopupPathChange:Ge,onManagePermissions:K,onPreview:He,onOpenInNewTab:ns,previewExtensions:hn,isRenameFileAvailable:Bl,isDuplicateFolderAvailable:Vl,customUploadFileAction:Ci,customBreakpointRef:Pr,nonClickableTableColumns:kr,hideSearchPathItemName:zl,getDisabledTooltip:Ee,fileTooLargeTooltip:_e,unsupportedFileTypeTooltip:Ue,showHiddenFileSwitcherInDestinationPopup:Wl};return m.jsx(Mw.Provider,{value:hb,children:t})},g9=({disabledGridRowIds:e,gridRows:t,getDisabledTooltip:s,getRowDisabledTooltip:i,allowedFileTypes:o,maxSelectableFileSize:n})=>{const[r,a]=g.useState(null),[l,c]=g.useState(null);g.useEffect(()=>{const h=()=>{a(null),c(null)};return window.addEventListener("scroll",h,!0),()=>window.removeEventListener("scroll",h,!0)},[]),g.useEffect(()=>{const h=v=>{const w=v.target.closest(".ag-row");if(!w){a(x=>x&&null);return}const b=new DOMParser().parseFromString(w.getAttribute("row-id")||"","text/html").documentElement.textContent;b&&e.has(b)?a(x=>x!==b?(c(w.getBoundingClientRect()),b):x):a(x=>x&&null)},p=()=>{a(null),c(null)},f=document.querySelector('[aria-label="File Manager Grid View"]');if(f)return f.addEventListener("mousemove",h),f.addEventListener("mouseleave",p),()=>{f.removeEventListener("mousemove",h),f.removeEventListener("mouseleave",p)}},[e]);const d=g.useMemo(()=>{if(r)return t.find(h=>h.path===r)},[r,t]),u=g.useMemo(()=>{if(d)return s&&d.folderId?s(d):i(d,o,n)},[d,s,i,o,n]);return m.jsx(m.Fragment,{children:u&&l&&tn.createPortal(m.jsxs(gu,{open:!0,placement:"top",children:[m.jsx(mu,{asChild:!0,children:m.jsx("div",{className:pe("fixed z-[-1]",u&&"pointer-events-none"),style:{top:l.top,left:l.left,width:l.width,height:l.height}})}),m.jsx(fu,{className:"max-w-[300px] rounded border border-ui-outline-primary bg-ui-popover px-3 py-1.5 text-center text-primary shadow-md fill-ui-popover",children:u})]}),document.body)})},Mh=()=>{const[e,t]=g.useState(zg());return g.useEffect(()=>{const s=()=>t(zg());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e},Hw=({onClose:e,onConfirm:t,onFolderPopupPathChange:s,setDestinationFolderPath:i,open:o,copyLabel:n="Copy",moveLabel:r="Move",addFolderLabel:a="Add folder",mode:l=dt.Copy,hiddenFilesSwitcherLabel:c="Show hidden files",showHiddenFileSwitcher:d=!0,onUploadFiles:u,onValidateUpload:h,maxFileSize:p,header:f,sourceFolder:v,disabledPathTooltip:C="Unavailable for the original path. Please select another folder",path:w,collapsedFileTree:b=!1,alertProps:x,...y})=>{const[S,F]=g.useState(!1),[R,E]=g.useState(!1),D=g.useRef(null),P=Mh(),T=g.useCallback(z=>{F(z)},[]),M=g.useMemo(()=>{const z=[{key:"add-folder",label:a,icon:m.jsx(B.IconFolderPlus,{...J,className:"text-secondary"}),onClick:()=>{D.current?.createFolder(),E(!1)}}];return d&&z.push({key:"show-hidden-files",label:c,icon:m.jsx(B.IconEye,{...J,className:"text-secondary"}),onClick:()=>{F(H=>!H),E(!1)}}),z},[a,c,d]),N=g.useCallback(z=>{z&&(s?.(z),i?.(z))},[s,i]),q=l===dt.Copy?"Copy to":"Move to",L=g.useMemo(()=>!w||!v?!1:v===w,[w,v]);return m.jsx(eo,{open:o,onClose:()=>{e()},size:_t.Lg,dividerFooter:!0,dividers:!1,className:"md:!h-[800px] !bg-layer-2",footer:m.jsxs("div",{className:"flex justify-between items-center gap-2 py-4 px-4 md:px-6",children:[m.jsx("div",{className:"flex items-center gap-4 min-w-0",children:P?m.jsx(Tt,{menu:{items:M},open:R,onOpenChange:E,children:m.jsx(is,{className:"h-9 w-9 shrink-0","aria-label":"More options",iconBefore:m.jsx(B.IconDotsVertical,{...J,className:"text-secondary"})})}):m.jsxs(m.Fragment,{children:[m.jsx(Rs,{label:a,appearance:ke.Ghost,iconBefore:m.jsx(B.IconFolderPlus,{...J}),onClick:()=>{D.current?.createFolder()}}),d&&m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"w-px h-[26px] bg-controls-disable-accent my-2"}),m.jsx("div",{className:"inline-flex items-center cursor-pointer",children:m.jsx(Hl,{label:c,isOn:S,onChange:T,switchId:"hidden-files-switch-modal"})})]})]})}),m.jsxs("div",{className:"flex space-x-4 items-center",children:[m.jsx(Es,{onClick:e,label:"Cancel"}),L?m.jsx(Lt,{tooltip:C,children:m.jsx(Rs,{onClick:t,label:l==="copy"?n:r,disabled:L,"aria-disabled":L})}):m.jsx(Rs,{onClick:t,label:l==="copy"?n:r})]})]}),header:f??q,children:m.jsxs("div",{className:"bg-layer-2 h-full flex flex-col",children:[x&&m.jsx("div",{className:"px-6 mb-4 pt-4",children:m.jsx(bf,{...x})}),m.jsx("div",{className:"flex-1 min-h-0",children:m.jsx(_w,{...y,gridClassName:"size-full",className:se(y.className,"bg-layer-2 h-full flex pt-0"),actionsRef:D,path:w,showHiddenFiles:S,onShowHiddenFilesChange:T,treeOptions:{...y.treeOptions,collapsed:b,expandedPaths:new Set([y.rootItem?.path||"/"]),header:y.treeOptions?.header},gridOptions:{...y.gridOptions,selectionMode:void 0},navigationPanelOptions:{elementId:"file-manager-destination-search",...y.navigationPanelOptions},onUploadFiles:u,onValidateUpload:h,onPathChange:N,maxFileSize:p})})]})})},f9=12,m9=8;var Pi=(e=>(e.Normal="normal",e.Reverse="reverse",e))(Pi||{});function v9({actions:e,direction:t=Pi.Normal,moreButtonWidth:s=Gt,actionsGap:i=8,containerPadding:o=8,dependencies:n=[]}){const r=g.useRef(null),a=g.useRef(null),l=g.useRef(null),c=g.useRef(null),d=g.useRef([]),[u,h]=g.useState(e.length);g.useLayoutEffect(()=>{if(!a.current)return;const v=Array.from(a.current.children);d.current=v.map(C=>Math.ceil(C.getBoundingClientRect().width))},[e,...n]),g.useEffect(()=>{if(!r.current)return;let v=null;const C=()=>{v&&cancelAnimationFrame(v),v=requestAnimationFrame(()=>{const b=r.current,x=l.current?.offsetWidth??0,y=c.current?.offsetWidth??0,S=x+y,R=b.getBoundingClientRect().width-S-s-i*2-o*2,E=d.current;let D=0,P=0;if(t===Pi.Reverse)for(let T=E.length-1;T>=0&&(D+=E[T]+i,!(D>R));T--)P++;else for(const T of E){if(D+=T+i,D>R)break;P++}h(P)})},w=new ResizeObserver(C);return w.observe(r.current),C(),()=>{v&&cancelAnimationFrame(v),w.disconnect()}},[e.length,t,...n]);const p=t===Pi.Reverse?e.slice(0,e.length-u):e.slice(u);return{visibleActions:t===Pi.Reverse?e.slice(e.length-u):e.slice(0,u),hiddenActions:p,refs:{containerRef:r,measureRef:a,leftSectionRef:l,rightSectionRef:c}}}const C9=({getSelectionLabel:e,onClearSelection:t,actions:s,selectedCount:i})=>{const o=Mh(),{refs:{containerRef:n,leftSectionRef:r,measureRef:a},visibleActions:l,hiddenActions:c}=v9({actions:s,direction:Pi.Reverse,dependencies:[o],actionsGap:f9,containerPadding:m9}),d=e(i);return m.jsxs(m.Fragment,{children:[m.jsx("div",{ref:a,className:"absolute top-0 left-0 invisible pointer-events-none overflow-hidden whitespace-nowrap flex gap-3",children:s.map(({key:u,icon:h,title:p})=>m.jsx(Es,{iconBefore:h,label:p,hideTitleOnMobile:!0},u))}),m.jsxs("div",{ref:n,className:"rounded bg-layer-0 p-2 flex justify-between items-center w-full",role:"toolbar","aria-label":"File bulk actions",children:[m.jsx("div",{ref:r,children:m.jsx(Rs,{label:d,onClick:t,textClassName:"text-accent-primary whitespace-nowrap",appearance:ke.Ghost,iconBefore:m.jsx(B.IconX,{...J,className:"text-accent-primary"})})}),m.jsxs("div",{className:"flex flex-1 w-full gap-3 items-center justify-end",children:[c.length>0&&m.jsx(Tt,{menu:{items:c},allowedPlacements:["bottom","bottom-start"],children:m.jsx(is,{className:"h-[38px]",iconBefore:m.jsx(B.IconDotsVertical,{...J,className:"text-secondary hover:text-accent-primary"})})}),l.map(({key:u,icon:h,tooltip:p,title:f,onClick:v,disabled:C})=>m.jsx(Es,{className:"!p-[9px]",iconBefore:h,label:f,hideTitleOnMobile:!0,disabled:C,tooltipProps:{tooltip:p},onClick:w=>v?.({key:u,domEvent:w})},u))]})]})]})},w9=({open:e,itemsToDelete:t,onClose:s,onConfirm:i,cancelLabel:o="Cancel",confirmLabel:n="Delete",titleRenderer:r,contentRenderer:a})=>{const l=t.map(p=>p.name),d=r?.(l)||"Confirm Deleting Items",u=m.jsxs("div",{className:"px-6 py-3 dial-small-text",children:[m.jsx("p",{className:"text-secondary mb-3",children:t.length===1?m.jsxs(m.Fragment,{children:["Do you want to delete file or folder"," ",m.jsxs("span",{className:"text-primary break-all",children:['"',t[0].name,'"']}),"?"]}):m.jsxs(m.Fragment,{children:["Do you want to delete the following"," ",m.jsx("span",{className:"text-primary",children:t.length})," items?"]})}),t.length>1&&m.jsx(m.Fragment,{children:t.length<=10?m.jsx("ul",{className:"space-y-1 text-primary list-none",children:t.map(p=>m.jsx("li",{className:"truncate",children:p.name},p.path))}):m.jsxs(m.Fragment,{children:[m.jsx("ul",{className:"space-y-1 text-primary list-none mb-2",children:t.slice(0,10).map(p=>m.jsx("li",{className:"truncate",children:p.name},p.path))}),m.jsxs("p",{className:"text-secondary italic",children:["... and ",t.length-10," more"]})]})})]}),h=a?.(l)||u;return m.jsx(hw,{open:e,header:d,confirmLabel:n,cancelLabel:o,variant:Jo.Danger,onClose:s,onConfirm:i,children:h})},of=e=>e.split("/").map(t=>t.trim()).filter(Boolean),b9="w-full flex items-center justify-between gap-4",x9="min-w-0 h-[38px] flex-1 overflow-hidden bg-layer-3 px-3 flex items-center rounded",y9="w-[260px]",S9=({ariaLabel:e="Breadcrumb",labelClassName:t,onItemClick:s,path:i,makeHref:o,rootItemPath:n,rootItemLabel:r,breadcrumbsHiddenPathPart:a,className:l,breadcrumbClassName:c,searchable:d=!0,value:u,elementId:h="file-manager-search",disabled:p,invalid:f,onSearchChange:v,searchClassName:C,searchContainerClassName:w,isCompactView:b=!1})=>{const x=g.useMemo(()=>{if(!i)return;let D=of(i);const P=[...D];let T=0;if(a){const N=of(a);if(N.length){const q=D.findIndex((L,z)=>N.every((H,A)=>D[z+A]===H));q!==-1&&(T=N.length,D=[...D.slice(0,q),...D.slice(q+N.length)])}}if(!D.length)return[{label:"/"}];const M=D.map((N,q)=>{const L=q<D.length-T?q:q+T,z=P.slice(0,L+1),H=typeof o=="function"?o(z,L):void 0;return{label:N,href:H,onClick:s?A=>{A.preventDefault(),s(H)}:void 0}});if(n&&r){const N=n.split("/").filter(Boolean),q=i.split("/").filter(Boolean);if(N.every((z,H)=>q[H]===z)&&M.length>0){const z=M.slice(N.length);return[{label:r,href:n,onClick:s?H=>{H.preventDefault(),s(n)}:void 0},...z]}}return M},[i,a,n,r,o,s]),[y,S]=g.useState(!1),F=g.useCallback(()=>{if(b&&!y){S(!0);const D=document.getElementById(h);D&&D.focus()}},[h,y,b]),R=g.useCallback(()=>{(!u||String(u).trim()==="")&&v?.("")},[u,v]),E=g.useCallback(()=>b&&y?m.jsx(Es,{className:"!p-[9px]",iconBefore:m.jsx(B.IconArrowLeft,{...J}),onClick:()=>{S(!1),v?.("")}}):m.jsx("div",{className:x9,children:m.jsx(aw,{pathItems:x,ariaLabel:e,labelClassName:t,className:c})}),[e,c,x,y,b,t,v]);return m.jsxs("div",{className:se(b9,{"gap-3":b},l),"aria-label":"navigation-panel",children:[E(),d&&m.jsx("div",{className:se(y9,{"w-[40px]":b&&!y,"w-full":b&&y}),role:"search","aria-label":"Search",onClick:F,children:m.jsx(Sh,{id:h,value:u??"",onChange:v,disabled:p,onBlur:R,invalid:f,className:C,wrapperClassName:b&&!y?"pl-2.5":"",containerClassName:w})})]})},R9=({tabs:e,activeTab:t,onTabChange:s,areHiddenFilesVisible:i,onToggleHiddenFiles:o,isNewButtonVisible:n,isNewButtonDisabled:r,newButtonVariant:a=We.Primary,newButtonDropdownItems:l=[],newButtonLabel:c="New",hiddenFilesSwitcherLabel:d="Hidden files",showHiddenFilesLabel:u="Show hidden files",hideHiddenFilesLabel:h="Hide hidden files",showHiddenFilesToggle:p=!0,disabledNewButtonTooltip:f})=>{const v=Mh(),C=g.useMemo(()=>[{key:"hidden-files-switch",label:i?h:u,icon:i?m.jsx(B.IconEyeOff,{...J,className:"text-secondary"}):m.jsx(B.IconEye,{...J,className:"text-secondary"}),onClick:()=>o?.(!i)}],[i,h,u,o]),w=()=>e&&t&&s?m.jsx(iw,{tabs:e,activeTab:t,onClick:y=>s(y),screenThreshold:pl.Tablet,smallScreenContainerClassName:"w-fit bg-transparent h-[38px] overflow-hidden",smallScreenDropdownItemClassName:"px-3 h-[38px]"}):null,b=()=>m.jsxs(m.Fragment,{children:[p&&m.jsxs(m.Fragment,{children:[m.jsx(Hl,{switchId:"hidden-files-switch",label:d,isOn:i,onChange:o}),m.jsx("div",{className:"h-6 border-l border-primary"})]}),n&&m.jsx(Lt,{tooltip:r&&f?f:void 0,children:m.jsx(hu,{label:c,variant:a,items:l,disabled:r})})]}),x=()=>m.jsxs(m.Fragment,{children:[m.jsx(Tt,{menu:{items:C},allowedPlacements:["bottom","bottom-start"],children:m.jsx(is,{className:"h-[38px]",iconBefore:m.jsx(B.IconDotsVertical,{...J,className:"text-secondary hover:text-accent-primary"})})}),n?m.jsx(Lt,{tooltip:r&&f?f:void 0,children:m.jsx(hu,{label:c,variant:a,items:l,disabled:r})}):null]});return m.jsxs("div",{className:"flex w-full justify-between gap-4 items-center overflow-x-auto",children:[m.jsx("div",{className:"flex-1 min-w-0",children:w()}),m.jsx("div",{className:"flex gap-4 flex-shrink-0 items-center",children:v?x():b()})]})},F9=100,Ln=16,ms="text-secondary",ya="text-primary min-w-0",E9="text-primary break-words min-w-0",On="bg-layer-2",D9=({open:e,onClose:t,fileMetadata:s,loading:i=!1,header:o="Information",nameLabel:n="Name:",pathLabel:r="Path:",modifiedDateLabel:a="Modified Date:",sizeLabel:l="Size:",authorLabel:c="Author:",dateLocale:d="en-US",dateOptions:u})=>m.jsx(eo,{open:e,onClose:t,size:_t.Sm,header:o,dividers:!1,children:m.jsx("div",{className:"px-6 py-4",children:m.jsx("div",{className:"grid gap-x-4 gap-y-4 items-center dial-small-text",style:{gridTemplateColumns:`${F9}px 1fr`},children:i?m.jsxs(m.Fragment,{children:[m.jsx("div",{className:ms,children:n}),m.jsx(Eo,{variant:Qt.Text,width:"100%",height:Ln,className:On}),m.jsx("div",{className:ms,children:a}),m.jsx(Eo,{variant:Qt.Text,width:"90%",height:Ln,className:On}),m.jsx("div",{className:ms,children:l}),m.jsx(Eo,{variant:Qt.Text,width:"60%",height:Ln,className:On}),m.jsx("div",{className:ms,children:c}),m.jsx(Eo,{variant:Qt.Text,width:"80%",height:Ln,className:On}),m.jsx("div",{className:ms,children:r}),m.jsx(Eo,{variant:Qt.Text,width:"70%",height:Ln,className:On})]}):s?m.jsxs(m.Fragment,{children:[m.jsx("div",{className:ms,children:n}),m.jsx("div",{className:ya,children:m.jsx(mt,{text:s.name})}),m.jsx("div",{className:ms,children:a}),m.jsx("div",{className:ya,children:m.jsx(mt,{text:z7(s.updatedAt,d,u)})}),m.jsx("div",{className:ms,children:l}),m.jsx("div",{className:ya,children:m.jsx(mt,{text:gr(s.contentLength)})}),m.jsx("div",{className:ms,children:c}),m.jsx("div",{className:ya,children:m.jsx(mt,{text:s.author||"—"})}),m.jsx("div",{className:ms,children:r}),m.jsx("div",{className:E9,children:decodeURIComponent(s.path)})]}):null})})}),P9={size:10,stroke:2},T9=26;var Ut=(e=>(e.File="file",e.Folder="folder",e))(Ut||{});const k9=({name:e,type:t,shared:s=!1,loading:i=!1,sharedIndicatorClassName:o,sharedIndicatorTooltip:n,fileExtension:r,...a})=>{const l=c=>m.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[c,s&&m.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:m.jsx(Jn,{className:o,sharedIndicatorTooltip:n})})]});if(i)return l(m.jsx(mr,{}));if(t===Ut.File){const c=r||(e.includes(".")?e.split(".").pop():void 0);return m.jsx(Ru,{...a,extension:c??"",className:"text-secondary",indicator:s?m.jsx(Jn,{className:o,sharedIndicatorTooltip:n}):null,label:"File type icon"})}return t===Ut.Folder?l(m.jsx(Be,{icon:m.jsx(B.IconFolder,{className:a.className,size:a.size??J.size,stroke:a.stroke??J.stroke}),className:"inline-block align-middle"})):null},M9=({name:e,type:t,elementId:s,loading:i=!1,shared:o=!1,iconClassName:n,iconIndicator:r,iconLabel:a,iconSize:l,iconStroke:c,inputInvalid:d,inputInvalidMessage:u,inputContainerClassName:h,inputIconAfter:p,inputRef:f,onChange:v,sharedIndicatorClassName:C,sharedIndicatorTooltip:w,fileExtension:b})=>{const x=()=>{const y=u?.startsWith(`${ls.Warning}__`);if(!d&&!y)return null;const S=u?.replace(`${ls.Warning}__`,"");return m.jsx(Lt,{tooltip:S,children:p||(y?m.jsx(B.IconAlertTriangleFilled,{...J,className:"text-warning-icon","aria-label":"warning"}):m.jsx(B.IconAlertCircleFilled,{...J,className:"text-error","aria-label":"alert"}))})};return m.jsxs("div",{className:"flex gap-2 items-center",children:[m.jsx(k9,{name:e,type:t,label:a,className:n,indicator:r,size:l,stroke:c,loading:i,shared:o,fileExtension:b,sharedIndicatorClassName:C,sharedIndicatorTooltip:w}),m.jsx(js,{containerClassName:se("!h-6 py-[1px] pl-[7px] pr-[7px]",h),id:s,value:e,onChange:v,invalid:d,iconAfter:x(),inputRef:f})]})};function Gw({value:e,isEditing:t,restoreOnCancel:s=!0,onValidate:i,onSave:o,onCancel:n}){const[r,a]=g.useState(e),[l,c]=g.useState(!1),[d,u]=g.useState(""),h=g.useRef(null),p=g.useCallback((b=!1,x="")=>{c(b),u(x)},[]),f=g.useCallback(b=>{if(!i)return p(),!0;const x=i(b);return x?x.startsWith(`${ls.Warning}__`)?(p(!1,x),!0):(p(!0,x),!1):(p(),!0)},[i,p]),v=g.useCallback(b=>{const x=b??"";a(x),f(x)},[f]),C=g.useCallback(()=>{f(r)?o?.(r):h.current?.focus()},[f,o,r]),w=g.useCallback(()=>{s&&a(e),p(),n?.()},[e,n,s,p]);return g.useEffect(()=>{t&&(a(e),p(),requestAnimationFrame(()=>{h.current?.focus(),h.current?.select()}))},[t,e,p]),g.useEffect(()=>{const b=h.current;if(!t||!b)return;const x=y=>{y.key==="Enter"?(y.preventDefault(),h.current?.blur()):y.key==="Escape"&&(y.preventDefault(),w())};return b.addEventListener("keydown",x),()=>b.removeEventListener("keydown",x)},[t,C,w]),g.useEffect(()=>{if(!t)return;const b=h.current;if(!b)return;const x=y=>{const S=y.relatedTarget;S&&b.contains(S)||(f(r)?C():b.focus())};return b.addEventListener("blur",x),()=>{b.removeEventListener("blur",x)}},[t,r,f,C]),{inputRef:h,value:r,onChange:v,invalid:l,invalidMessage:d}}const ml=({name:e,type:t,elementId:s,editing:i=!1,loading:o=!1,shared:n=!1,iconSize:r=Gt,validate:a,onSave:l,fileExtension:c,onCancel:d,inputContainerClassName:u,sharedIndicatorClassName:h,sharedIndicatorTooltip:p,hideTooltip:f=!1,forbiddenSymbolsRegExp:v,forbiddenSymbolsTooltip:C,...w})=>{const{value:b,invalid:x,invalidMessage:y,onChange:S,inputRef:F}=Gw({value:e,isEditing:i,onValidate:a,onCancel:d,onSave:l});if(!i){const R=Th({name:e,isFolder:t===Ut.Folder},v,C),E=!!R;return t===Ut.Folder?m.jsx(Fl,{name:e,loading:o,shared:n,iconSize:r,className:"max-w-[428px] truncate",sharedIndicatorClassName:h,hideTooltip:f,isInvalidName:E,tooltipContent:R}):m.jsx(Rl,{className:"max-w-[428px]",...w,name:e,shared:n,iconSize:r,sharedIndicatorClassName:h,hideTooltip:f,isInvalidName:E,tooltipContent:R})}return m.jsx(M9,{type:t,name:b,elementId:s,inputInvalid:x,inputInvalidMessage:y,inputRef:F,onChange:S,iconSize:r,fileExtension:c,inputContainerClassName:u,sharedIndicatorTooltip:p,sharedIndicatorClassName:h})},I9=({items:e,showFiles:t=!1,expandedPaths:s,loadingPaths:i=new Set,loadedPaths:o=new Set,sharedByMePaths:n=new Set,selectedPath:r,emptyStateTitle:a="No Folders",emptyStateDescription:l,emptyStateIcon:c,areHiddenFilesVisible:d=!1,renamedPath:u,rootItemLabel:h,rootItemPath:p,onItemClick:f,getContextMenuItems:v,onRenameSave:C,onRenameCancel:w,onRenameValidate:b,onExpandedPathsChange:x,forbiddenSymbolsRegExp:y,forbiddenSymbolsTooltip:S})=>{const{expandedPaths:F,togglePath:R}=Aw({expandedPaths:s??new Set,onExpandedPathsChange:x}),E=P=>{f?.(P),R(P.path)},D=(P,T)=>P.map(M=>{const{path:N,nodeType:q,name:L,items:z}=M,H=q===ye.FOLDER;if(!d&&Pw(M))return null;if(!H&&!t)return;const A=Array.isArray(z)&&z.length>0&&z.some(Z=>Z.nodeType===ye.FOLDER||t),de=F.has(N),k=r===N,V=i.has(N),U=u===N,W=o.has(N),re=n.has(N),be=p&&h&&N===p&&H,Q=b&&(Z=>b(Z,M)),j=k?"bg-accent-primary-alpha border-l-2 border-l-accent-primary rounded":"border-l-2 border-l-transparent",ge=be?[]:v?.(M)??[],oe=y?Th({name:M.name,isFolder:H},y,S):void 0;return m.jsx("div",{className:"cursor-pointer text-secondary",children:m.jsxs("div",{className:"flex flex-col w-full","aria-label":"folder",children:[m.jsx(Tt,{trigger:[Bt.ContextMenu],className:"w-full",anchorToMouse:!0,menu:{items:ge},children:m.jsxs("div",{style:{paddingLeft:`${T*T9}px`},className:se("py-1 gap-[2px] dial-small-text flex justify-between hover:bg-accent-primary-alpha rounded group/item w-full mb-[2px] relative",j),"aria-selected":k,children:[!U&&m.jsx("div",{className:"absolute size-full left-0 top-0 z-0",onClick:()=>E(M)}),m.jsx("div",{className:"relative flex flex-row truncate items-center w-fit h-6 gap-x-1 pl-1",onClick:()=>!U&&E(M),children:m.jsxs(m.Fragment,{children:[H&&m.jsx(B.IconCaretRightFilled,{...P9,className:pe("flex-shrink-0",de&&"rotate-90 transition-all",W&&!A&&"text-transparent")}),m.jsx(ml,{elementId:`${N}-tree-item`,name:be?h:L,type:H?Ut.Folder:Ut.File,loading:V,shared:re,sharedIndicatorClassName:se("group-hover/item:bg-accent-primary-alpha",k&&"bg-accent-primary-alpha"),iconSize:ri,forbiddenSymbolsRegExp:y,forbiddenSymbolsTooltip:oe,...!be&&{editing:U,onSave:C,onCancel:w,validate:Q}})]})}),ge.length>0&&!U&&!be&&m.jsx("div",{className:"flex-1 flex justify-end",children:m.jsx(Tt,{placement:"bottom-start",allowedPlacements:["top-start","top-end"],menu:{items:ge},className:"sticky right-0",children:m.jsx(Be,{className:"invisible group-hover/item:visible text-secondary mx-2 flex flex-row gap-2 hover:text-accent-primary",icon:m.jsx(B.IconDotsVertical,{...J})})})})]})}),de&&z&&D(z,T+1)]})},`${N}-children`)});return m.jsx("div",{className:"flex-1 w-full h-full overflow-y-auto","aria-label":"folders-tree",children:e.length>0?D(e,0):m.jsx(vr,{title:a,description:l,icon:c})})},A9=({selectedFiles:e,actionLabels:t,onDuplicate:s,onCopy:i,onMove:o,onDownload:n,onUnshare:r,onRemoveAccess:a,onDelete:l,getCurrentFolderPath:c,sharedWithMeIds:d,sharedByMePaths:u,onClearSelection:h,forbiddenSymbolsRegExp:p})=>g.useMemo(()=>{const f=[],v=Array.from(e.values());if(!v.length||!t)return f;const C=Gl(p),w=C?v.some(b=>C.test(b.name)):!1;if(t[Y.Move]&&!w&&f.push({key:Y.Move,label:t[Y.Move],title:t[Y.Move],icon:m.jsx(Eh,{width:J.size,height:J.size,className:"text-secondary"}),onClick:()=>o(v)}),t[Y.Copy]&&!w&&f.push({key:Y.Copy,label:t[Y.Copy],title:t[Y.Copy],icon:m.jsx(Fh,{width:J.size,height:J.size,className:"text-secondary"}),onClick:()=>i(v)}),t[Y.Duplicate]&&!w&&f.push({key:Y.Duplicate,label:t[Y.Duplicate],title:t[Y.Duplicate],icon:m.jsx(B.IconCopy,{...J,className:"text-secondary"}),onClick:()=>s(v)}),t[Y.Delete]){const b=v.some(x=>x.permissions&&!x.permissions.includes(to.WRITE));f.push({key:Y.Delete,label:t[Y.Delete],title:t[Y.Delete],icon:m.jsx(B.IconTrashX,{...J,className:"text-secondary"}),disabled:b,tooltip:b?"Selected items contain item which can not be deleted":void 0,onClick:()=>{const x=c();l(v,x)}})}if(t[Y.Download]&&!w&&f.push({key:Y.Download,label:t[Y.Download],title:t[Y.Download],icon:m.jsx(B.IconDownload,{...J,className:"text-secondary"}),onClick:()=>n(v)}),t[Y.Unshare]&&r){const b=v.some(x=>!d?.includes(x.path));f.push({key:Y.Unshare,label:t[Y.Unshare],title:t[Y.Unshare],disabled:b,tooltip:b?"Selected items contain item which can not be unshared":void 0,icon:m.jsx(Dh,{width:J.size,height:J.size,className:"text-secondary"}),onClick:()=>{r(v),h()}})}if(t[Y.RemoveAccess]&&a){const b=v.some(x=>!u?.has(x.path));f.push({key:Y.RemoveAccess,label:t[Y.RemoveAccess],title:t[Y.RemoveAccess],disabled:b,icon:m.jsx(B.IconUserX,{size:J.size,className:"text-secondary"}),onClick:()=>{a(v),h()}})}return f},[e,t,r,a,o,i,s,c,l,n,d,h,u,p]);function Ih(e){if(!e)return null;if(e instanceof Date)return isFinite(e.getTime())?e:null;if(typeof e=="number"){const t=new Date(e);return isFinite(t.getTime())?t:null}if(typeof e=="string"){const t=e.trim();if(/^-?\d+$/.test(t)){const i=Number(t);return Ih(i)}const s=new Date(t);return isFinite(s.getTime())?s:null}return null}const Bw=({value:e,locale:t=ew,options:s=tw,emptyPlaceholder:i,className:o,hideTooltip:n=!1})=>{const r=Ih(e),a=g.useMemo(()=>r?new Intl.DateTimeFormat(t,s).format(r):i,[r,i,t,s]),l=r?r.toISOString():void 0;return m.jsx(mt,{text:l?m.jsx("time",{dateTime:l,children:a}):m.jsx("span",{children:a}),className:pe(J8,o),hideTooltip:n})},L9=({id:e,name:t,nodeType:s,size:i,updatedAt:o,dateLocale:n,dateOptions:r,shared:a,sharedIndicatorClassName:l,hideTooltip:c=!1,forbiddenSymbolsRegExp:d,forbiddenSymbolsTooltip:u})=>m.jsx("div",{className:"flex",children:m.jsx("div",{className:"flex flex-1 min-w-0",children:m.jsx(ml,{type:s===ye.FOLDER?Ut.Folder:Ut.File,name:t,elementId:e,shared:a,iconSize:ri,sharedIndicatorClassName:l,hideTooltip:c,forbiddenSymbolsRegExp:d,forbiddenSymbolsTooltip:u,details:m.jsxs("div",{className:"flex items-center gap-1 dial-tiny-text text-secondary",children:[m.jsx("span",{children:s===ye.ITEM?gr(i):""}),o&&i&&m.jsx(B.IconCircleFilled,{size:2,className:"text-secondary"}),o?m.jsx("span",{children:m.jsx(Bw,{value:o,locale:n?.toString(),options:r,className:"dial-tiny-text text-secondary",hideTooltip:c})}):null]})})})}),Vw=e=>(t,s,i)=>({colId:ut.Name,field:"name",headerName:e,flex:1,minWidth:200,cellRenderer:o=>{const n=o.data.nodeType,{saveFolderCreation:r,validateFolderName:a,cancelFolderCreation:l,newFolderTempId:c,sharedByMePaths:d,selectedPaths:u,disabledRowIds:h}=o.context,p=d?.has(o.data.path),f=u?.has(o.data.path),v=h?.has(o.data.path)??!1,C=se(["group-hover/grid-row:bg-accent-primary-alpha",f&&"bg-accent-primary-alpha"]);if(o.data?.isTemporary&&o.data.id===c)return m.jsx(ml,{name:"",type:Ut.Folder,elementId:`new-folder-${o.data.id}`,editing:!0,shared:p,sharedIndicatorClassName:C,iconSize:ri,validate:a,onSave:r,onCancel:l,inputContainerClassName:se(["!h-9",i&&n===ye.ITEM&&"!h-10"])});const{renameTriggerView:w,renamedPath:b,renamedItem:x,getDisplayName:y,onRenameValidate:S,onRenameSave:F,onRenameCancel:R}=o.context;if(w===_o.Grid&&b===o.data?.path&&x&&o.data){const P=y(x);return m.jsx(ml,{name:P,type:n===ye.FOLDER?Ut.Folder:Ut.File,fileExtension:x.name.split(".").pop(),elementId:`rename-${o.data.id}`,editing:!0,shared:p,sharedIndicatorClassName:C,iconSize:ri,validate:T=>S(T,x),onSave:F,onCancel:R,inputContainerClassName:se(["!h-9",i&&n===ye.ITEM&&"!h-10"]),forbiddenSymbolsRegExp:o.context.forbiddenSymbolsRegExp})}if(i)return m.jsx(L9,{id:o.data.id,name:o.data.name,nodeType:n,size:o.data.size,shared:p,sharedIndicatorClassName:C,updatedAt:o.data.updatedAt,dateLocale:t,dateOptions:s,hideTooltip:v,forbiddenSymbolsRegExp:o.context.forbiddenSymbolsRegExp,forbiddenSymbolsTooltip:o.context.forbiddenSymbolsTooltip});const D=Th({name:o.data.name,isFolder:n===ye.FOLDER},o.context.forbiddenSymbolsRegExp,o.context.forbiddenSymbolsTooltip);return n===ye.FOLDER?m.jsx(Fl,{name:o.data.name,shared:p,sharedIndicatorClassName:C,iconSize:ri,hideTooltip:v,isInvalidName:!!D,tooltipContent:D}):m.jsx(Rl,{name:o.data.name,shared:p,sharedIndicatorClassName:C,iconSize:ri,hideTooltip:v,isInvalidName:!!D,tooltipContent:D})}}),zw=e=>(t,s)=>({colId:ut.UpdatedAt,field:"updatedAt",headerName:e,width:168,suppressSizeToFit:!0,cellRenderer:i=>{const o=i.context?.disabledRowIds?.has(i.data?.path)??!1;return m.jsx(Bw,{...i,hideTooltip:o})},cellRendererParams:{locale:t,options:s},filterValueGetter:i=>{const o=i.data[i.colDef.field||""],n=Ih(o);return n?new Intl.DateTimeFormat(t||ew,s||tw).format(n):""}}),Ww=e=>({colId:ut.Size,field:"size",headerName:e,width:120,suppressSizeToFit:!0,cellRenderer:t=>t.data.nodeType===ye.ITEM?gr(t.data.contentLength):"",filterValueGetter:t=>t.data.nodeType===ye.ITEM?gr(t.data.contentLength):""}),O9=e=>{const t=e.event;if(!(t?.target??null)?.closest("input")||!t)return!1;switch(t.key){case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":case"Home":case"End":return!0;default:return!1}};function N9({userColumnDefs:e,filterable:t,dateLocale:s,dateOptions:i,effectiveVisibleColumns:o,isCompactView:n,hasActions:r,actionsColumnDef:a,rootItemLabel:l,rootItemPath:c}){const d=g.useMemo(()=>[Vw("Name")(s,i,n),{colId:ut.Path,field:"path",headerName:"Path",flex:1,minWidth:200,cellRenderer:h=>{const p=h.context?.disabledRowIds?.has(h.data.path)??!1;let f=h.data.path;if(h.context?.hideSearchPathItemName&&(h.data.parentPath?f=h.data.parentPath:f=f.replace(/\/[^/]+\/?$/,"")||"/"),!c||!l)return m.jsx(mt,{text:f,hideTooltip:p});const v=f.replace(c,l);return m.jsx(mt,{text:v,hideTooltip:p})}},zw("Modified Date")(s,i),Ww("Size"),{colId:ut.Author,field:"author",headerName:"Author",width:200,suppressSizeToFit:!0,cellRenderer:h=>h.data.author},{colId:ut.Owner,field:"owner",headerName:"Owner",width:200,suppressSizeToFit:!0,cellRenderer:h=>h.data.owner}],[s,i,n,l,c]);return{columnDefs:g.useMemo(()=>{const h=e?.map(v=>typeof v=="function"?v(s,i,n):v);let p=h??d;h||(p=p.filter(v=>v.colId&&o.includes(v.colId))),r&&(n&&(p=p.slice(0,1)),p.push(a));const f=v=>v.colId===ut.Name;return p.map(v=>{const C={...v,filter:t?v.filter:!1,floatingFilter:t?v.floatingFilter:!1};return f(v)&&!v.suppressKeyboardEvent&&(C.suppressKeyboardEvent=O9),C})},[a,s,i,d,o,t,r,n,e])}}const jw=()=>{const e=g.useContext(Mw);if(!e)throw new Error("useFileManagerContext must be used within <FileManagerProvider>");return e},H9=({actionLabels:e,onDuplicate:t,onCopy:s,onMove:i,onDownload:o,onRename:n,onDelete:r,onInfo:a,onUnshare:l,onRemoveAccess:c,sharedWithMeIds:d,sharedByMePaths:u,onAddSibling:h,onAddChild:p,onManagePermissions:f,onPreview:v,onOpenInNewTab:C,previewExtensions:w,isRenameFileAvailable:b=!0,isDuplicateFolderAvailable:x=!0,forbiddenSymbolsRegExp:y})=>g.useMemo(()=>S=>{const F=[];if(!e)return F;const R=Gl(y)?.test(S.name);e[Y.AddSibling]&&typeof h=="function"&&S.nodeType===ye.FOLDER&&F.push({key:"addSibling",label:e[Y.AddSibling],icon:m.jsx(Dw,{width:J.size,height:J.size,className:"text-secondary"}),onClick:()=>h(S)}),e[Y.AddChild]&&typeof p=="function"&&S.nodeType===ye.FOLDER&&!R&&F.push({key:"addChild",label:e[Y.AddChild],icon:m.jsx(Ew,{width:J.size,height:J.size,className:"text-secondary"}),onClick:()=>p(S)},{key:"divider",type:Qo.Divider}),e[Y.OpenInNewTab]&&typeof C=="function"&&S.nodeType===ye.ITEM&&!R&&F.push({key:Y.OpenInNewTab,label:e[Y.OpenInNewTab],icon:m.jsx(B.IconExternalLink,{...J,className:"text-secondary"}),onClick:()=>C?.(S)});const E=S.nodeType===ye.ITEM||S.nodeType===ye.FOLDER&&x;e[Y.Duplicate]&&E&&!R&&F.push({key:Y.Duplicate,label:e[Y.Duplicate],icon:m.jsx(B.IconCopy,{...J,className:"text-secondary"}),onClick:()=>t(S)}),e[Y.Copy]&&!R&&F.push({key:Y.Copy,label:e[Y.Copy],icon:m.jsx(Fh,{width:J.size,height:J.size,className:"text-secondary"}),onClick:()=>s(S)}),e[Y.Move]&&!R&&F.push({key:Y.Move,label:e[Y.Move],icon:m.jsx(Eh,{width:J.size,height:J.size,className:"text-secondary"}),onClick:()=>i(S)}),e[Y.Download]&&!R&&F.push({key:Y.Download,label:e[Y.Download],icon:m.jsx(B.IconDownload,{...J,className:"text-secondary"}),onClick:()=>o(S)}),e[Y.ManagePermissions]&&typeof f=="function"&&S.nodeType===ye.FOLDER&&!R&&F.push({key:Y.ManagePermissions,label:e[Y.ManagePermissions],icon:m.jsx(B.IconExternalLink,{...J,className:"text-secondary"}),onClick:()=>f?.(S.path)});const D=S.name.split("."),P=D.length>1?D[D.length-1]:"",T=P&&w?.includes(`.${P}`);e[Y.Preview]&&typeof v=="function"&&S.nodeType===ye.ITEM&&T&&!R&&F.push({key:Y.Preview,label:e[Y.Preview],icon:m.jsx(B.IconEye,{...J,className:"text-secondary"}),onClick:()=>v?.(S.path)});const M=!S.permissions||S.permissions.includes(to.WRITE);e[Y.Delete]&&M&&F.push({key:Y.Delete,label:e[Y.Delete],icon:m.jsx(B.IconTrashX,{...J,className:"text-secondary"}),onClick:()=>r(S,S.parentPath??"")});const N=S.nodeType===ye.FOLDER||S.nodeType===ye.ITEM&&b;return e[Y.Rename]&&N&&F.push({key:Y.Rename,label:e[Y.Rename],icon:m.jsx(B.IconPencilMinus,{...J,className:"text-secondary"}),onClick:()=>n(S.path)}),e[Y.Info]&&S.nodeType===ye.ITEM&&!R&&F.push({key:Y.Info,label:e[Y.Info],icon:m.jsx(B.IconInfoCircle,{...J,className:"text-secondary"}),onClick:()=>a(S)}),e[Y.Unshare]&&d?.includes(S.path)&&F.push({key:Y.Unshare,label:e[Y.Unshare],icon:m.jsx(Dh,{width:J.size,height:J.size,className:"text-secondary"}),onClick:()=>l(S)}),e[Y.RemoveAccess]&&u?.has(S.path)&&c&&F.push({key:Y.RemoveAccess,label:e[Y.RemoveAccess],icon:m.jsx(B.IconUserX,{size:J.size,className:"text-secondary"}),onClick:()=>c(S)}),F},[e,h,p,t,s,i,o,r,n,a,l,c,d,u,f,v,C,w,b,x,y]),_w=e=>m.jsx(Nw,{...e,children:m.jsx(G9,{})}),G9=()=>{const{managerLabel:e,className:t,items:s,rootItem:i,filesLoading:o,treeOptions:n,showNavigationPanel:r,navigationPanelOptions:a,gridOptions:l,toolbarOptions:c,bulkActionsToolbarOptions:d,deleteConfirmationOptions:u,destinationFolderPopupOptions:h,conflictResolutionPopupOptions:p,compactViewWidthBreakpoint:f=D7,customBreakpointRef:v,sharedByMePaths:C,allowedFileTypes:w,maxSelectableFileSize:b,areHiddenFilesVisible:x,toggleHiddenFilesVisibility:y,isTreeCollapsed:S,toggleTreeCollapse:F,currentPath:R,gridRows:E,selectedPaths:D,selectedFiles:P,clearSelection:T,setSelectedPaths:M,effectiveSearchValue:N,handleBreadcrumbItemClick:q,handleSearchChange:L,handleTreeItemClick:z,handleTableRowClick:H,handleSelectionClick:A,onGridApiChange:de,handleOpenDestinationFolderPopup:k,handleCloseDestinationFolderPopup:V,openDestinationFolderPopup:U,destinationFolderMode:W,handleSetCopiedFiles:re,handleSetMovedFiles:be,handleDuplicate:Q,handleCopyTo:j,handleMoveTo:ge,handleAddSibling:oe,handleAddChild:Z,handleDownloadFiles:_,openDeleteConfirmation:ae,closeDeleteConfirmation:G,confirmDelete:fe,deleteConfirmationOpen:he,itemsToDelete:ie,renamedPath:le,renamedItem:Fe,onRename:Oe,onRenameSave:Ce,onRenameCancel:Ee,onRenameValidate:_e,forbiddenSymbolsRegExp:Ue,forbiddenSymbolsTooltip:Ae,getDisplayName:kt,isDragging:os,isDraggingOverWindow:Mt,handleDragEnter:Ge,handleDragLeave:K,handleDragOver:He,handleDrop:ns,onUploadFiles:hn,onValidateUpload:Bl,maxFileSize:Vl,newActions:Ci,isNewButtonVisible:pn,isNewButtonDisabled:so,newFolderTempId:Dr,cancelFolderCreation:io,saveFolderCreation:Pr,validateFolderName:Tr,startFolderCreation:kr,conflictingFiles:zl,conflictResolutionOpen:Wl,handleConflictReplace:Ks,handleConflictDuplicate:Ps,handleConflictCancel:Ts,handleConflictDecideForEach:wi,uploadConflictingFiles:Ys,uploadConflictResolutionOpen:jl,handleUploadConflictReplace:_l,handleUploadConflictDuplicate:Ul,handleUploadConflictCancel:$l,handleUploadConflictDecideForEach:it,openMetadataPopup:ql,fileMetadataPopupOptions:wt,isMetadataPopupOpen:gn,selectedFileForMetadata:fn,closeMetadataPopup:mn,onUnshareFiles:oo,onRemoveFilesAccess:no,actionsRef:Kl,searchInProgress:ro,isSearchMode:ks,emptyStateIcon:Mr,emptyStateTitle:Ir="You don't have any files",emptyStateDescription:Ar="Upload or drag and drop files",sharedWithMeIds:ao,onFolderPopupPathChange:Yl,onManagePermissions:lo,onPreview:Xl,onOpenInNewTab:Zl,previewExtensions:Ql,isRenameFileAvailable:Jl,isDuplicateFolderAvailable:ec,getDisabledTooltip:vn,fileTooLargeTooltip:Lr,unsupportedFileTypeTooltip:co,gridClassName:tc,nonClickableTableColumns:Cn,hideSearchPathItemName:bt,showHiddenFileSwitcherInDestinationPopup:Or}=jw(),{width:at=x7,header:Nr=y7,containerClassName:Hr=C7,additionalButtons:Gr,...Br}=n??{},[uo,ho]=g.useState(at),{renameTriggerView:po,onGridRename:sc,onTreeRename:Vr}=k7({onRename:Oe}),wn=g.useRef(null),ic=X=>{wn.current===null&&(wn.current=requestAnimationFrame(()=>{ho(X),wn.current=null}))},{columnDefs:oc,filterable:nc=!0,dateLocale:rc,dateOptions:ac,selectionMode:zr,wrapCustomCellRenderers:Wr,visibleColumns:jr=P7,allowDisabledContextMenu:go=!1,...Xs}=l??{},{containerRef:lc,isBelowBreakpoint:It}=M7(f,v),cc=g.useMemo(()=>ks?[ut.Name,ut.Path,ut.Actions]:jr,[ks,jr]),bn=g.useCallback((X,qe,Qe)=>_7(X,qe,Qe,co,Lr),[Lr,co]),fo=g.useCallback((X,qe,Qe)=>!!bn(X,qe,Qe),[bn]),bi=g.useMemo(()=>{const X=new Set;for(const qe of E)fo(qe,w,b)&&X.add(qe.path);return X},[w,b,E,fo]),_r=g.useCallback(X=>{const qe=[],Qe=[],qt=!X.parentPath,gs=Ue?.test(X.name);return n?.actionLabels&&(n.actionLabels[Y.AddSibling]&&typeof oe=="function"&&X.nodeType===ye.FOLDER&&!qt&&qe.push({key:"addSibling",label:n.actionLabels[Y.AddSibling],icon:m.jsx(Dw,{width:J.size,height:J.size,className:"text-secondary"}),onClick:()=>oe([X])}),n.actionLabels[Y.AddChild]&&typeof Z=="function"&&X.nodeType===ye.FOLDER&&!gs&&qe.push({key:"addChild",label:n.actionLabels[Y.AddChild],icon:m.jsx(Ew,{width:J.size,height:J.size,className:"text-secondary"}),onClick:()=>Z([X])}),n.actionLabels[Y.Duplicate]&&!qt&&!gs&&Qe.push({key:"duplicate",label:n.actionLabels[Y.Duplicate],icon:m.jsx(B.IconCopy,{...J,className:"text-secondary"}),onClick:()=>Q([X])}),n.actionLabels[Y.Copy]&&!qt&&!gs&&Qe.push({key:dt.Copy,label:n.actionLabels[Y.Copy],icon:m.jsx(Fh,{width:J.size,height:J.size,className:"text-secondary"}),onClick:()=>{re([X]),k(dt.Copy)}}),n.actionLabels[Y.Move]&&!qt&&!gs&&Qe.push({key:dt.Move,label:n.actionLabels[Y.Move],icon:m.jsx(Eh,{width:J.size,height:J.size,className:"text-secondary"}),onClick:()=>{be([X]),k(dt.Move)}}),n.actionLabels[Y.Download]&&!qt&&!gs&&Qe.push({key:"download",label:n.actionLabels[Y.Download],icon:m.jsx(B.IconDownload,{...J,className:"text-secondary"}),onClick:()=>_([X])}),n.actionLabels[Y.Rename]&&!qt&&Qe.push({key:"rename",label:n.actionLabels[Y.Rename],icon:m.jsx(B.IconPencilMinus,{...J,className:"text-secondary"}),onClick:()=>Vr(X.path)}),n.actionLabels[Y.Unshare]&&ao?.includes(X.path)&&!qt&&Qe.push({key:"unshare",label:n.actionLabels[Y.Unshare],icon:m.jsx(Dh,{width:J.size,height:J.size,className:"text-secondary"}),onClick:()=>oo?.([X])}),n.actionLabels[Y.RemoveAccess]&&C?.has(X.path)&&!qt&&Qe.push({key:Y.RemoveAccess,label:n.actionLabels[Y.RemoveAccess],icon:m.jsx(B.IconUserX,{size:J.size,className:"text-secondary"}),onClick:()=>no?.([X])}),n.actionLabels[Y.ManagePermissions]&&typeof lo=="function"&&X.nodeType===ye.FOLDER&&!qt&&Qe.push({key:Y.ManagePermissions,label:n.actionLabels[Y.ManagePermissions],icon:m.jsx(B.IconExternalLink,{...J,className:"text-secondary"}),onClick:()=>lo?.(X.path)}),n.actionLabels[Y.Delete]&&X.permissions?.includes(to.WRITE)&&!qt&&Qe.push({key:"delete",label:n.actionLabels[Y.Delete],icon:m.jsx(B.IconTrashX,{...J,className:"text-secondary"}),onClick:()=>ae([X],X.parentPath??"")})),qe.length?Qe.length===0?qe:qe.length===0?Qe:[...qe,{key:"divider",type:Qo.Divider},...Qe]:Qe},[n?.actionLabels,oe,Ue,Z,lo,Q,re,k,be,_,Vr,oo,no,ao,C,ae]),Ur=g.useMemo(()=>{const X=new Set;return P.forEach((qe,Qe)=>X.add(Qe)),X},[P]),$r=g.useCallback((X,qe)=>{M(X),A?.(qe)},[A,M]),qr=A9({selectedFiles:P,actionLabels:d?.actionLabels,onDuplicate:Q,onCopy:X=>{re(X),k(dt.Copy)},onMove:X=>{be(X),k(dt.Move)},onDownload:_,onDelete:ae,onUnshare:oo,onRemoveAccess:no,getCurrentFolderPath:()=>R??"/",sharedWithMeIds:ao,sharedByMePaths:C,onClearSelection:T,forbiddenSymbolsRegExp:Ue}),xn=g.useCallback(X=>{c?.onTabChange?.(X),io()},[c,io]),dc=g.useCallback(()=>c&&D.size===0?m.jsxs("div",{className:Kg,role:"toolbar","aria-label":"File Manager Toolbar",children:[e,m.jsx(R9,{...c,onTabChange:xn,areHiddenFilesVisible:x,onToggleHiddenFiles:y,isNewButtonVisible:pn,isNewButtonDisabled:so,newButtonDropdownItems:Ci})]}):D.size>0&&d?m.jsx("div",{className:Kg,role:"toolbar","aria-label":"File Manager Toolbar",children:m.jsx(C9,{...d,selectedCount:D.size,onClearSelection:T,actions:qr})}):null,[xn,d,D,T,qr,x,y,c,pn,so,Ci,e]);g.useImperativeHandle(Kl,()=>({createFolder:kr}),[kr]);const Kr=g.useCallback(()=>It?null:m.jsx("aside",{role:"region","aria-label":"File Manager Tree Navigation",className:"min-h-0 min-w-0 h-full flex-none",children:m.jsx(Of,{defaultWidth:uo,width:uo,onResizeStop:ho,onResize:ic,minWidth:R7,maxWidth:F7,enabled:!S,children:m.jsx(xf,{width:uo,title:Nr,containerClassName:Hr,titleClassName:"dial-body-text text-primary",additionalButtons:Gr,isOpened:!S,onToggle:F,children:m.jsx(I9,{...Br,items:s,rootItemPath:i?.path,rootItemLabel:i?.label,selectedPath:R,sharedByMePaths:C,forbiddenSymbolsRegExp:Ue,forbiddenSymbolsTooltip:Ae,onItemClick:z,areHiddenFilesVisible:x,getContextMenuItems:_r,renamedPath:po===_o.Tree?le:void 0,onRenameSave:Ce,onRenameCancel:Ee,onRenameValidate:_e})})})}),[It,uo,S,Nr,Hr,Gr,F,Br,s,i?.path,i?.label,R,C,Ue,Ae,z,x,_r,po,le,Ce,Ee,_e]),Yr=H9({actionLabels:l?.actionLabels,onDuplicate:X=>Q([X]),onCopy:X=>{re([X]),k(dt.Copy)},onMove:X=>{be([X]),k(dt.Move)},onDownload:X=>_([X]),onRename:sc,onDelete:(X,qe)=>ae([X],qe),onInfo:X=>ql(X),onUnshare:X=>oo?.([X]),onRemoveAccess:X=>no?.([X]),sharedWithMeIds:ao,sharedByMePaths:C,onAddChild:X=>Z?.([X]),onAddSibling:X=>oe?.([X]),onManagePermissions:X=>lo?.(X),onPreview:X=>Xl?.(X),onOpenInNewTab:X=>Zl?.(X),previewExtensions:Ql,isRenameFileAvailable:Jl,isDuplicateFolderAvailable:ec,forbiddenSymbolsRegExp:Ue}),mo=g.useCallback(X=>{const qe=zs(s,X.path);return qe?Yr(qe):[]},[s,Yr]),uc=g.useCallback((X,qe,Qe)=>go?!1:fo(X,qe,Qe),[go,fo]),{actionsColumnDef:hc}=T7({getContextMenuItems:mo,isRowDisabled:uc,allowedFileTypes:w,buttonClassName:It?"":b7}),{columnDefs:yn}=N9({userColumnDefs:oc,filterable:nc,dateLocale:rc,dateOptions:ac,effectiveVisibleColumns:cc,isCompactView:It,hasActions:!!l?.actionLabels,actionsColumnDef:hc,rootItemLabel:i?.label,rootItemPath:i?.path}),Xr=g.useCallback(X=>{X.colDef.colId==="ag-Grid-SelectionColumn"||X.colDef.colId===ut.Actions||le&&X.data?.path===le||X.data?.isTemporary||Cn&&Cn.includes(X.colDef.colId)||X.data&&H(X.data)},[le,H,Cn]),Zr=g.useCallback(()=>m.jsx(vr,{title:Ir,description:Ar,descriptionClassName:"text-sm",containerClassName:"gap-3 size-full bg-layer-2 border rounded-[4px] border-primary",titleClassName:"mt-2 !text-lg",icon:Mr||m.jsx(B.IconFileDescription,{size:100,stroke:.5,className:"text-secondary"})}),[Ar,Mr,Ir]),Qr=g.useMemo(()=>X=>X.path,[]),Jr=g.useMemo(()=>pe("min-h-[248px] overflow-auto md:min-h-[266px]",os?"border border-dashed border-accent-primary":"",Mt&&!os?"border border-dashed border-primary":""),[os,Mt]),ea=g.useMemo(()=>({...Xs.additionalGridOptions,onCellClicked:Xr,headerHeight:pd,rowHeight:pd,rowClass:"group/grid-row",defaultColDef:{...Xs.additionalGridOptions?.defaultColDef,floatingFilter:a?.searchable?!1:Xs.additionalGridOptions?.defaultColDef?.floatingFilter},...It?{getRowHeight:X=>X.data?.nodeType===ye.FOLDER?pd:E7}:{},context:{cancelFolderCreation:io,saveFolderCreation:Pr,getDisplayName:kt,onRenameCancel:Ee,onRenameSave:Ce,onRenameValidate:_e,renameTriggerView:po,validateFolderName:Tr,renamedItem:Fe,renamedPath:le,newFolderTempId:Dr,sharedByMePaths:C,selectedPaths:D,disabledRowIds:bi,forbiddenSymbolsRegExp:Ue,forbiddenSymbolsTooltip:Ae,hideSearchPathItemName:bt}}),[Xs.additionalGridOptions,Xr,a?.searchable,It,io,Pr,kt,Ee,Ce,_e,po,Tr,Fe,le,Dr,C,D,bi,Ue,Ae,bt]),ta=g.useMemo(()=>E.length===0&&!ks&&!o?Zr():m.jsx(bh,{columnDefs:yn,rowData:E,getRowId:Qr,loading:o||ro,getContextMenuItems:mo,withoutHeaderBorders:It,onGridApiChange:de,className:Jr,...Xs,selectionMode:zr,wrapCustomCellRenderers:Wr,additionalGridOptions:ea,selectedRowIds:Ur,onSelectionChange:$r,wrapperBorder:!os&&!Mt,disabledRowIds:bi,allowDisabledContextMenu:go}),[E,ks,o,Zr,yn,Qr,ro,mo,It,de,Jr,Xs,zr,Wr,ea,Ur,$r,os,Mt,bi,go]);return m.jsx("section",{ref:lc,className:"size-full",children:m.jsxs("div",{className:se(f7,{"gap-3 pt-4":d&&D.size>0,"gap-4 p-3 pt-4":It,"gap-2 pt-2":It&&d&&D.size>0},t),children:[dc(),m.jsxs("div",{className:se(m7,tc),children:[Kr(),m.jsxs("div",{className:se(v7,{"gap-3":It}),children:[r&&m.jsx(S9,{...a??{},makeHref:X=>X.join("/"),path:R,onItemClick:q,rootItemPath:i?.path,rootItemLabel:i?.label,value:N,onSearchChange:L,isCompactView:It,labelClassName:"dial-tiny-text"}),m.jsxs("section",{role:"region","aria-label":"File Manager Grid View",className:se(w7,"relative"),onDragEnter:Ge,onDragLeave:K,onDragOver:He,onDrop:ns,children:[ta,m.jsx(g9,{disabledGridRowIds:bi,gridRows:E,getDisabledTooltip:vn,getRowDisabledTooltip:bn,allowedFileTypes:w,maxSelectableFileSize:b})]})]})]}),m.jsx(w9,{...u,open:he,itemsToDelete:ie,onClose:G,onConfirm:fe}),m.jsx(Hw,{...h,open:U,onClose:V,onConfirm:()=>{const X=h?.destinationFolderPath??"/";W===dt.Copy?j(X):ge(X),V()},mode:W,items:s,rootItem:i,gridOptions:{columnDefs:yn.filter(X=>X.colId!==ut.Actions),loading:o},onUploadFiles:hn,onValidateUpload:Bl,maxFileSize:Vl,path:h?.destinationFolderPath??h?.sourceFolder??R,onPathChange:X=>{h?.setDestinationFolderPath?.(X)},sourceFolder:h?.sourceFolder??R,treeOptions:{header:n?.header},onFolderPopupPathChange:Yl,showHiddenFileSwitcher:Or,hideSearchPathItemName:bt}),m.jsx(Yg,{...p,open:Wl,onClose:Ts,onReplace:Ks,onDuplicate:Ps,onDecideForEach:wi,conflictingFiles:zl}),m.jsx(Yg,{...p,open:jl,onClose:$l,onReplace:_l,onDuplicate:Ul,onDecideForEach:it,conflictingFiles:Ys}),m.jsx(D9,{open:gn,onClose:mn,fileMetadata:wt?.fileMetadata??fn,loading:wt?.loading,header:wt?.header,nameLabel:wt?.nameLabel,pathLabel:wt?.pathLabel,modifiedDateLabel:wt?.modifiedDateLabel,sizeLabel:wt?.sizeLabel,authorLabel:wt?.authorLabel,dateLocale:l?.dateLocale,dateOptions:l?.dateOptions})]})})},B9=(e,t=Io.MyFiles)=>{const s=Object.values(Io).includes(t)?t:Io.MyFiles,[i,o]=g.useState(s),n=a=>{o(a)},r=g.useMemo(()=>{if(e)return Object.values(Io).map(a=>({id:a,label:e?.[a]||a.replace("_"," ")}))},[e]);return{activeTab:i,handleTabChange:n,tabs:r}},V9="application/octet-stream";function z9(e,t){if(!e||e.length===0)return[];const s=e.find(l=>l.parentPath===""&&l.nodeType==="FOLDER");if(!s)return[];const i=s.path||s.url||"",o=wd(i,!0),n=e.filter(l=>l!==s).map(l=>{const c=l.path||l.url||"",d=W9(l.nodeType),u=d===ye.FOLDER,h=wd(c,u);let p;return l.parentPath===null||l.parentPath===void 0?p=o:l.parentPath===""?p="":p=wd(l.parentPath,!0),{...l,originalPath:c,path:h,parentPath:p,nodeType:d}}),r=new Map;n.forEach(l=>{const c={...l,id:l.originalPath,name:l.name,path:l.path,parentPath:l.parentPath,nodeType:l.nodeType,resourceType:j9(l.resourceType),folderId:t,updatedAt:l.updatedAt?new Date(l.updatedAt).toISOString():new Date().toISOString(),items:l.nodeType===ye.FOLDER?[]:void 0};l.nodeType===ye.ITEM&&(c.extension=_9(l.name),c.contentType=l.contentType||V9,c.contentLength=l.contentLength||0),r.set(l.path,c)});const a=[];return r.forEach(l=>{if(l.parentPath===o)a.push(l);else{const c=l.path.lastIndexOf(l.name||""),d=l.path.slice(0,c),u=r.get(d);u&&u.nodeType===ye.FOLDER?(u.items=u.items||[],u.items.push(l)):a.push(l)}}),a}function wd(e,t){try{let s=decodeURIComponent(e);return t?s.endsWith("/")||(s+="/"):s.endsWith("/")&&(s=s.slice(0,-1)),s}catch{return t&&!e.endsWith("/")?e+"/":!t&&e.endsWith("/")?e.slice(0,-1):e}}function W9(e){return e.toUpperCase()==="FOLDER"?ye.FOLDER:ye.ITEM}function j9(e){if(!e)return;const t=e.toUpperCase();return Object.values(Ph).find(i=>i.toUpperCase()===t)}function _9(e){const t=e.split(".");return t.length>1?t[t.length-1]:""}function U9(e,t="Prompts",s="prompts/public/",i="root"){const o=z9(e,i);return[{id:i,name:t,path:s,parentPath:"",nodeType:ye.FOLDER,folderId:i,items:o}]}const $9={noItemSchema:"No item schema defined.",noItemsYet:"No items yet. Add one below.",addItem:"Add Item",selectTypeToAdd:"Select type to add…",noConfigurableProperties:"No configurable properties.",noFieldsYet:"No fields yet. Add one below.",keyColumnHeader:"Key",valueColumnHeader:"Value",addField:"Add Field",keyInputPlaceholder:"Enter key",stringInputPlaceholder:"Enter a value",integerInputPlaceholder:"Enter a whole number",numberInputPlaceholder:"Enter a number",enumSelectPlaceholder:"Select an option",selectTypePlaceholder:"Select type",removeItemAriaLabel:"Remove item",removeFieldAriaLabel:"Remove field"},Uw=g.createContext(null);function vi(){const e=g.useContext(Uw);if(!e)throw new Error("useSchemaContext must be used inside DialSchemeRenderer");return e}function $e(e,t,s=0){if(!e.$ref||s>10)return e;const i=e.$ref.replace(/^#\//,"").split("/");let o=t;for(const c of i)o=o?.[c];if(!o||typeof o!="object")return e;const{$ref:n,...r}=e,a=o;return{...a.$ref?$e(a,t,s+1):a,...r}}function un(e){return e.type==="object"||e.properties!=null&&e.oneOf==null&&e.anyOf==null&&e.type==null}function Ah(e){return e.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase())}function q9(e,t){return e.type==="null"?"null":e.$ref?$e(e,t).title??e.$ref.split("/").pop()??"Option":e.title?e.title:e.type?Array.isArray(e.type)?e.type.join(" | "):e.type:e.discriminator?Object.keys(e.discriminator.mapping).join(" | "):e.const!=null?String(e.const):e.oneOf?"One of options":"Option"}function qi(e,t,s=0){if(s>15)return;const i=$e(e,t);if("default"in i)return i.default;if(un(i)&&i.properties){const o={};let n=!1;for(const[r,a]of Object.entries(i.properties)){const l=qi(a,t,s+1);l!==void 0&&(o[r]=l,n=!0)}return n?o:void 0}}function Ti(e,t,s,i="",o=0){if(o>15)return[];const n=[],r=$e(t,s);if(r.anyOf){const c=r.anyOf.filter(d=>d.type!=="null");return e!=null&&c.length===1?Ti(e,c[0],s,i,o+1):n}if(r.oneOf&&r.discriminator){const c=r.discriminator.propertyName,d=e?.[c];if(d&&r.discriminator.mapping[d]){const u={$ref:r.discriminator.mapping[d]},h=$e(u,s);return Ti(e,h,s,i,o+1)}return n}if(r.type==="array"||!r.type&&Array.isArray(e)){if(Array.isArray(e)&&r.items)for(let c=0;c<e.length;c++){const d=Ti(e[c],r.items,s,`${i}[${c}]`,o+1);n.push(...d)}return n}if(!un(r))return n;const a=r.required??[],l=e;for(const c of a){const d=i?`${i}.${c}`:c,u=l?.[c];if(u==null){const p=r.properties?.[c]?.title??Ah(c);n.push({path:d,message:`${p} is required`})}}if(l&&r.properties)for(const[c,d]of Object.entries(r.properties)){const u=i?`${i}.${c}`:c,h=l[c];if(h!=null){const p=Ti(h,d,s,u,o+1);n.push(...p)}}return n}function Lh(e,t,s){const i=$e(t,s);if(Array.isArray(e))return`${e.length} item${e.length!==1?"s":""}`;if(un(i)&&i.properties){const o=Object.keys(i.properties).length,n=e;return`${Object.keys(i.properties).filter(a=>{const l=n?.[a];return l!=null&&l!==""}).length}/${o} fields`}return""}function K9(e,t,s){if(e==null){const i=t.findIndex(o=>o.type==="null");return i>=0?i:0}if(Array.isArray(e)){const i=t.findIndex(o=>$e(o,s).type==="array");return i>=0?i:0}if(typeof e=="boolean"){const i=t.findIndex(o=>$e(o,s).type==="boolean");return i>=0?i:0}if(typeof e=="number"){const i=t.findIndex(o=>{const n=$e(o,s);return n.type==="number"||n.type==="integer"});return i>=0?i:0}if(typeof e=="string"){const i=t.findIndex(o=>$e(o,s).type==="string");return i>=0?i:0}if(typeof e=="object"){const i=e;for(let o=0;o<t.length;o++){const n=$e(t[o],s);if(n.discriminator&&n.discriminator.propertyName in i)return o}for(let o=0;o<t.length;o++){const n=$e(t[o],s);if(un(n)||n.oneOf)return o}return 0}return 0}function Y9(e,t,s){if(t&&typeof e=="object"&&e!==null){const i=e[t];if(i)return`Item ${s+1}: ${i}`}if(typeof e=="object"&&e!==null){const i=e,o=i.name??i.title??i.id;if(o)return`Item ${s+1}: ${o}`}return`Item ${s+1}`}function X9(e){switch(Array.isArray(e.type)?e.type[0]:e.type){case"string":return"";case"boolean":return!1;case"array":return[];case"integer":case"number":return;default:return{}}}const Oh=({title:e,description:t,summary:s,errorCount:i=0,level:o=0,children:n,onRemove:r,defaultExpanded:a=!0,removeItemAriaLabel:l="Remove item"})=>{const[c,d]=g.useState(a),u=o===0,h="rounded border border-secondary",p=se("flex items-center gap-2 cursor-pointer select-none transition-colors",u?"px-4 py-3 bg-layer-3 hover:bg-layer-4":"px-3 py-2 bg-layer-4 hover:bg-layer-3",c?"rounded-t":"rounded"),f=se("border-t border-secondary",u?"p-4":"p-3");return m.jsxs("div",{className:h,children:[m.jsxs("div",{className:p,onClick:()=>d(v=>!v),role:"button","aria-expanded":c,children:[m.jsx("span",{className:"flex-shrink-0 text-secondary",children:c?m.jsx(B.IconChevronDown,{size:16,stroke:2}):m.jsx(B.IconChevronRight,{size:16,stroke:2})}),m.jsx("span",{className:se("flex-1 truncate",u?"dial-small-semi-text text-primary":"dial-small-text text-primary"),children:e}),!c&&t&&m.jsx("span",{className:"dial-tiny-text text-secondary truncate max-w-[180px] hidden sm:block",children:t}),s&&m.jsx("span",{className:"dial-tiny-text text-secondary whitespace-nowrap ml-2",children:s}),i>0?m.jsxs("span",{className:"flex items-center gap-1 dial-tiny-text text-error whitespace-nowrap",children:[m.jsx(Be,{icon:m.jsx(B.IconAlertTriangle,{size:13,stroke:2})}),i," error",i>1?"s":""]}):m.jsx(Be,{icon:m.jsx(B.IconCheck,{size:13,stroke:2}),className:"text-success flex-shrink-0"}),r&&m.jsx(Er,{size:14,onClose:v=>{v.stopPropagation(),r()},ariaLabel:l,className:"ml-1 flex-shrink-0 hover:enabled:text-error p-0.5"})]}),c&&m.jsx("div",{className:f,children:n})]})},Z9=({schema:e,value:t,onChange:s,path:i,level:o=0,required:n,label:r})=>{const{rootSchema:a}=vi(),l=$e(e,a),c=un(l),d=l.type==="array";if(c||d){const h=Lh(t,l,a),p=Ti(t,l,a,i.join("."));return m.jsx(Oh,{title:r??l.title??i[i.length-1]??"Section",description:l.description,level:o,summary:h,errorCount:p.length,children:m.jsx(en,{schema:l,value:t,onChange:s,path:i,level:o+1,required:n})})}const u=n&&(t==null||t==="")?`${r??"Field"} is required`:void 0;return m.jsx(vl,{label:r,required:n,description:l.description,error:u,children:m.jsx(en,{schema:l,value:t,onChange:s,path:i,level:o,required:n})})},$w=({schema:e,value:t,onChange:s,path:i,level:o})=>{const{rootSchema:n,texts:r}=vi(),a=$e(e,n),l=Object.entries(a.properties??{}),c=a.required??[],d=t??{};return l.length===0?m.jsx("p",{className:"dial-tiny-text text-secondary italic",children:r.noConfigurableProperties}):m.jsx("div",{className:"flex flex-col gap-4",children:l.map(([u,h])=>{const f=$e(h,n).title??h.title??Ah(u),v=c.includes(u);return m.jsx(Z9,{schema:h,value:d[u],onChange:C=>s({...d,[u]:C}),path:[...i,u],level:o,required:v,label:f},u)})})},Q9=({schema:e,value:t,onChange:s,path:i,level:o})=>{const{rootSchema:n,texts:r}=vi(),a=Array.isArray(t)?t:[],l=e.items,[c,d]=g.useState(void 0);if(!l)return m.jsx("p",{className:"dial-tiny-text text-secondary italic",children:r.noItemSchema});const u=g.useMemo(()=>$e(l,n),[l,n]),h=g.useMemo(()=>u.discriminator,[u]),p=g.useMemo(()=>h?.propertyName,[h]),f=g.useMemo(()=>h?Object.keys(h.mapping).map(b=>({value:b,label:b})):[],[h]),v=()=>{const b=c??f[0]?.value;let x;if(h&&b){const y=$e({$ref:h.mapping[b]},n);x={...qi(y,n)??{},[h.propertyName]:b}}else x=qi(u,n)??X9(u);s([...a,x])},C=b=>{s(a.filter((x,y)=>y!==b))},w=(b,x)=>{s(a.map((y,S)=>S===b?x:y))};return m.jsxs("div",{className:"flex flex-col gap-3",children:[a.length===0&&m.jsx("p",{className:"dial-tiny-text text-secondary italic",children:r.noItemsYet}),a.map((b,x)=>{const y=Y9(b,p,x),S=Lh(b,u,n),F=Ti(b,u,n,`${i.join(".")}[${x}]`);return m.jsx(Oh,{title:y,level:o,summary:S,errorCount:F.length,onRemove:()=>C(x),defaultExpanded:!1,removeItemAriaLabel:r.removeItemAriaLabel,children:m.jsx(en,{schema:l,value:b,onChange:R=>w(x,R),path:[...i,String(x)],level:o+1})},x)}),m.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[f.length>0&&m.jsx("div",{className:"flex-1 max-w-[280px]",children:m.jsx($i,{options:f,value:c??f[0]?.value,placeholder:r.selectTypeToAdd,onChange:b=>{const x=typeof b=="string"?b:b[0];d(x)}})}),m.jsx(yh,{label:r.addItem,iconBefore:m.jsx(B.IconPlus,{size:16,stroke:2}),onClick:v})]})]})},nf=({schema:e,value:t,onChange:s,path:i,level:o})=>{const{rootSchema:n,texts:r}=vi(),a=e.discriminator;if(a){const f=a.propertyName,v=a.mapping,C=Object.keys(v).map(y=>({value:y,label:y})),w=typeof t=="object"&&t!==null?t[f]:void 0,b=w?$e({$ref:v[w]},n):void 0,x=y=>{const S=$e({$ref:v[y]},n),F=qi(S,n)??{};s({...F,[f]:y})};return m.jsxs("div",{className:"flex flex-col gap-3",children:[m.jsx($i,{options:C,value:w,placeholder:r.selectTypePlaceholder,onChange:y=>{const S=typeof y=="string"?y:y[0];S&&x(S)}}),b&&m.jsx("div",{className:"pl-3 border-l-2 border-secondary",children:m.jsx($w,{schema:b,value:t,onChange:s,path:i,level:o})})]})}const l=e.oneOf??[],c=l.map((f,v)=>{const C=$e(f,n);return{value:String(v),label:C.title??`Option ${v+1}`}}),u=(()=>{if(t==null)return 0;if(typeof t=="object"&&!Array.isArray(t)){for(let f=0;f<l.length;f++)if($e(l[f],n).required?.every(C=>C in t))return f}return 0})(),h=f=>{const v=$e(l[f],n),C=qi(v,n);s(C??null)},p=l[u];return m.jsxs("div",{className:"flex flex-col gap-3",children:[m.jsx($i,{options:c,value:String(u),onChange:f=>{const v=typeof f=="string"?f:f[0];h(Number(v))}}),p&&m.jsx("div",{className:"pl-3 border-l-2 border-secondary",children:m.jsx(en,{schema:p,value:t,onChange:s,path:i,level:o})})]})},J9=({schema:e,value:t,onChange:s,path:i,level:o})=>{const{rootSchema:n}=vi(),r=e.anyOf??[],a=r.map((p,f)=>({value:String(f),label:q9(p,n)})),l=K9(t,r,n),c=r[l],u=$e(c,n).type==="null",h=p=>{const f=$e(r[p],n);if(f.type==="null"){s(null);return}const v=qi(f,n);v!==void 0?s(v):f.type==="array"?s([]):f.type==="string"?s(""):f.type==="boolean"?s(!1):f.type==="integer"||f.type==="number"?s(0):s({})};return m.jsxs("div",{className:"flex flex-col gap-3",children:[m.jsx($i,{options:a,value:String(l),onChange:p=>{const f=typeof p=="string"?p:p[0];h(Number(f))}}),!u&&c&&m.jsx("div",{className:"pl-3 border-l-2 border-secondary",children:m.jsx(en,{schema:c,value:t,onChange:s,path:i,level:o})})]})},qw=({schema:e,value:t,onChange:s,invalid:i})=>{const o=g.useId(),{texts:n}=vi(),r=e.const!==void 0,a=Array.isArray(e.enum)&&e.enum.length>0;if(r)return m.jsx(js,{value:String(e.const??""),disabled:!0,onChange:void 0,className:"opacity-60"});if(a){const l=e.enum.map(c=>({value:String(c),label:String(c)}));return m.jsx($i,{options:l,value:t!=null?String(t):void 0,invalid:i,onChange:c=>s(typeof c=="string"?c:c[0]),placeholder:n.enumSelectPlaceholder})}return e.type==="boolean"?m.jsx(Hl,{switchId:o,isOn:!!t,onChange:l=>s(l)}):e.type==="integer"?m.jsx(du,{integer:!0,value:t!=null?String(t):"",invalid:i,onChange:l=>s(l!==void 0?Number(l):void 0),placeholder:n.integerInputPlaceholder}):e.type==="number"?m.jsx(du,{value:t!=null?String(t):"",invalid:i,onChange:l=>s(l!==void 0?Number(l):void 0),placeholder:n.numberInputPlaceholder}):m.jsx(js,{value:t!=null?String(t):"",invalid:i,onChange:l=>s(l??void 0),placeholder:n.stringInputPlaceholder})},rf=(e,t)=>({id:Math.random().toString(36).slice(2),key:e,value:t}),eO=({pairKey:e,pairValue:t,valueSchema:s,onKeyChange:i,onValueChange:o,onRemove:n,keyInputPlaceholder:r,removeFieldAriaLabel:a})=>{const[l,c]=g.useState(e);return m.jsxs("div",{className:"flex gap-2 items-center",children:[m.jsx("div",{className:"w-2/5 min-w-0",children:m.jsx(js,{value:l,onChange:d=>c(d??""),onBlur:()=>{l!==e&&i(l)},placeholder:r})}),m.jsx("div",{className:"flex-1 min-w-0",children:m.jsx(qw,{schema:s,value:t,onChange:o})}),m.jsx(Er,{size:14,onClose:n,ariaLabel:a,className:"flex-shrink-0 hover:enabled:text-error p-1"})]})},tO=({schema:e,value:t,onChange:s})=>{const{texts:i}=vi(),o=e.additionalProperties===!0||e.additionalProperties==null?{type:"string"}:typeof e.additionalProperties=="object"?e.additionalProperties:{type:"string"},[n,r]=g.useState(()=>Object.entries(t??{}).map(([h,p])=>rf(h,p))),a=h=>Object.fromEntries(h.filter(p=>p.key!=="").map(p=>[p.key,p.value])),l=(h,p)=>{const f=n.map((v,C)=>C===h?{...v,key:p}:v);r(f),s(a(f))},c=(h,p)=>{const f=n.map((v,C)=>C===h?{...v,value:p}:v);r(f),s(a(f))},d=()=>{r(h=>[...h,rf("","")])},u=h=>{const p=n.filter((f,v)=>v!==h);r(p),s(a(p))};return m.jsxs("div",{className:"flex flex-col gap-2",children:[n.length===0&&m.jsx("p",{className:"dial-tiny-text text-secondary italic",children:i.noFieldsYet}),n.length>0&&m.jsxs("div",{className:"flex gap-2 mb-1 pr-7",children:[m.jsx("span",{className:"w-2/5 dial-tiny-text text-secondary font-medium",children:i.keyColumnHeader}),m.jsx("span",{className:"flex-1 dial-tiny-text text-secondary font-medium",children:i.valueColumnHeader})]}),n.map((h,p)=>m.jsx(eO,{pairKey:h.key,pairValue:h.value,valueSchema:o,onKeyChange:f=>l(p,f),onValueChange:f=>c(p,f),onRemove:()=>u(p),keyInputPlaceholder:i.keyInputPlaceholder,removeFieldAriaLabel:i.removeFieldAriaLabel},h.id)),m.jsx("div",{className:"pt-1",children:m.jsx(yh,{label:i.addField,iconBefore:m.jsx(B.IconPlus,{size:16,stroke:2}),onClick:d})})]})},en=({schema:e,value:t,onChange:s,path:i,level:o,required:n})=>{const{rootSchema:r}=vi(),a=$e(e,r);if(a.discriminator&&a.oneOf)return m.jsx(nf,{schema:a,value:t,onChange:s,path:i,level:o});if(a.oneOf)return m.jsx(nf,{schema:a,value:t,onChange:s,path:i,level:o});if(a.anyOf)return m.jsx(J9,{schema:a,value:t,onChange:s,path:i,level:o});if(un(a)){const l=a.additionalProperties!=null&&a.additionalProperties!==!1,c=!a.properties||Object.keys(a.properties).length===0;return l&&c?m.jsx(tO,{schema:a,value:t,onChange:s}):m.jsx($w,{schema:a,value:t,onChange:s,path:i,level:o})}return a.type==="array"?m.jsx(Q9,{schema:a,value:t,onChange:s,path:i,level:o}):m.jsx(qw,{schema:a,value:t,onChange:s,invalid:n&&(t==null||t==="")})},sO=({schema:e,defaultValue:t,texts:s,className:i,onChange:o,onPropertyChange:n,onDefaultValues:r})=>{const a=g.useMemo(()=>({...$9,...s}),[s]),l=g.useMemo(()=>t||(qi(e,e)??{}),[]),[c,d]=g.useState(l);g.useEffect(()=>{r?.(l)},[]);const u=(f,v)=>{const C={...c,[f]:v};d(C),o?.(C),n?.(f,v)},h=Object.entries(e.properties??{}),p=e.required??[];return m.jsx(Uw.Provider,{value:{rootSchema:e,texts:a},children:m.jsx("div",{className:se("flex flex-col gap-4",i),children:h.map(([f,v])=>{const C=$e(v,e),w=C.title??v.title??Ah(f),b=p.includes(f),x=c[f],y=Lh(x,C,e),S=Ti(x,C,e,f);return m.jsx(Oh,{title:w,description:C.description,level:0,summary:y,errorCount:b&&x==null?Math.max(S.length,1):S.length,children:m.jsx(en,{schema:v,value:x,onChange:F=>u(f,F),path:[f],level:1,required:b})},f)})})})};exports.AlertVariant=ls;exports.BASE_ICON_PROPS=J;exports.BASE_ICON_SIZE=Gt;exports.ButtonAppearance=ke;exports.ButtonVariant=We;exports.ConfirmationPopupVariant=Jo;exports.DIAL_ICON_SIZE=Ct;exports.DialAlert=bf;exports.DialAutocompleteInputValue=gw;exports.DialBreadcrumb=aw;exports.DialBreadcrumbItem=Gn;exports.DialButton=is;exports.DialButtonDropdown=hu;exports.DialCaptionText=fr;exports.DialCheckbox=Rd;exports.DialCloseButton=Er;exports.DialCollapsibleSidebar=xf;exports.DialConditionalResizableContainer=Of;exports.DialConfirmationPopup=hw;exports.DialDestinationFolderPopup=Hw;exports.DialDraggableItem=S0;exports.DialDropdown=Tt;exports.DialEllipsisTooltip=mt;exports.DialErrorButton=cw;exports.DialErrorIconButton=dw;exports.DialErrorText=cs;exports.DialFileIcon=Ru;exports.DialFileManager=_w;exports.DialFileManagerActions=Y;exports.DialFileManagerTabs=Io;exports.DialFileName=Rl;exports.DialFileNodeType=ye;exports.DialFilePermission=to;exports.DialFileResourceType=Ph;exports.DialFolderName=Fl;exports.DialFormItem=vl;exports.DialFormPopup=AL;exports.DialGhostButton=yh;exports.DialGhostIconButton=wL;exports.DialGrid=bh;exports.DialIcon=Be;exports.DialIconButton=hi;exports.DialInput=js;exports.DialInputPopup=fw;exports.DialItemType=Ut;exports.DialLabel=Ki;exports.DialLabelledText=b1;exports.DialLinkButton=hL;exports.DialLoadFileArea=Fw;exports.DialLoadFileAreaField=h7;exports.DialLoader=mr;exports.DialNeutralButton=Es;exports.DialNeutralIconButton=fL;exports.DialNoDataContent=vr;exports.DialNumberInput=du;exports.DialPasswordInput=zL;exports.DialPopup=eo;exports.DialPrimaryButton=Rs;exports.DialPrimaryIconButton=gL;exports.DialRadioButton=vu;exports.DialRadioGroup=Va;exports.DialRadioGroupPopupField=TL;exports.DialRemoveButton=uw;exports.DialResizableContainer=Lf;exports.DialSchemeRenderer=sO;exports.DialSearch=Sh;exports.DialSecondaryIconButton=mL;exports.DialSelect=$i;exports.DialSelectField=YL;exports.DialSharedEntityIndicator=Jn;exports.DialSkeleton=Eo;exports.DialSkeletonAvatarShape=za;exports.DialSkeletonAvatarSize=Vn;exports.DialSkeletonVariant=Qt;exports.DialSteps=g1;exports.DialSuccessIconButton=CL;exports.DialSwitch=Hl;exports.DialTabs=iw;exports.DialTag=Po;exports.DialTagInput=pw;exports.DialTertiaryIconButton=vL;exports.DialTextarea=bL;exports.DialTooltip=Lt;exports.DropdownItemType=Qo;exports.DropdownTrigger=Bt;exports.DropdownType=JC;exports.ElementSize=Ft;exports.FileManagerColumnKey=ut;exports.FileManagerProvider=Nw;exports.FlexibleActionsDirection=Pi;exports.FormItemOrientation=Qn;exports.GridSelectionMode=Zn;exports.NAME_COLUMN=Vw;exports.NOT_ALLOWED_SPACES=kh;exports.NOT_ALLOWED_SPACES_REGEXP=p9;exports.NOT_ALLOWED_SYMBOLS=Lw;exports.NOT_ALLOWED_SYMBOLS_REGEXP=Ow;exports.PopupSize=_t;exports.RadioGroupOrientation=Hi;exports.ResizableContainerSide=er;exports.SIZE_COLUMN=Ww;exports.SelectSize=gl;exports.SelectVariant=fl;exports.StepStatus=Vt;exports.TabOrientation=hl;exports.TagVariant=Cl;exports.UPDATED_AT_COLUMN=zw;exports.mergeClasses=se;exports.useDialFileManagerTabs=B9;exports.useEditableItem=Gw;exports.useFileManagerContext=jw;exports.wrapInRootFolder=U9;
|