@epam/ai-dial-ui-kit 0.9.0-rc.16 → 0.9.0-rc.17
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
|
@@ -61,4 +61,4 @@ If you are trying to annotate ${o} with application data, use the '${o}.context'
|
|
|
61
61
|
`,$I=class extends b4{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,np),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((s,o)=>{o!==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,o){s!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(o)}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 o=this.extractRowCellValue(e,t,t,"csv",s);this.result+=this.putInQuotes(o.valueFormatted??o.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():(z(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=np),this.isFirstLine=!1}},qI=class extends w4{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()){z(51);return}const t=this.getMergedParams(e),s=this.getData(t),o=new Blob(["\uFEFF",s],{type:"text/plain"}),i=typeof t.fileName=="function"?t.fileName(we(this.gos,{})):t.fileName;S4(this.getFileName(i),o)}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:o,valueSvc:i,gos:n}=this,{processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c,suppressQuotes:d,columnSeparator:u}=e;return new $I({colModel:t,colNames:s,valueSvc:i,gos:n,processCellCallback:r||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:c||void 0,suppressQuotes:d||!1,columnSeparator:u||",",rowGroupColsSvc:o})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function KI(e,t){return e.csvCreator?.getDataAsCsv(t)}function YI(e,t){e.csvCreator?.exportDataAsCsv(t)}var ZI={moduleName:"CsvExport",version:Z,beans:[qI],apiFunctions:{getDataAsCsv:KI,exportDataAsCsv:YI},dependsOn:[UI]},XI=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:o,rowNodes:i}=this;for(let n=0;n<e;n++){const r=s+n,a=new io(o);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(r),a.setRowTop(t*r),i.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:s,state:o}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:s,pageStatus:o}}}setDataAndId(e,t,s){X(t)?e.setDataAndId(t,s.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(qe(this.params.datasource.getRows)){z(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:s,params:{sortModel:o,filterModel:i},gos:n}=this;return{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,s),failCallback:this.pageLoadFailed.bind(this,s),sortModel:o,filterModel:i,context:we(n,{}).context}}forEachNode(e,t,s){this.rowNodes.forEach((o,i)=>{this.startRow+i<s&&e(o,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((i,n)=>{const r=e.rowData?e.rowData[n]:void 0;!i.id&&i.alreadyRendered&&r&&(t[n]=new io(s),t[n].setRowIndex(i.rowIndex),t[n].setRowTop(i.rowTop),t[n].setRowHeight(i.rowHeight),i.clearRowTopAndRowIndex()),this.setDataAndId(t[n],r,this.startRow+n)});const o=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,o)}destroy(){for(const e of this.rowNodes)e.clearRowTopAndRowIndex();super.destroy()}},QI=2,JI=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 o=this.blocks[s];if(!o){if(t)return;o=this.createBlock(s)}return o.getRow(e)}createBlock(e){const t=this.params,s=this.createBean(new XI(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()&&(Ao(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 o=this.params.maxBlocksInCache>0,i=o?this.params.maxBlocksInCache-1:null,n=QI-1;t.forEach((r,a)=>{const l=r.state==="needsLoading"&&a>=n,c=o?a>=i:!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:o}=e;return t.rowIndex>=s&&t.rowIndex<o}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:o}=this.params,n=(e.id+1)*s+o;this.rowCount<n&&(this.rowCount=n)}}setRowCount(e,t){this.rowCount=e,X(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,o)=>s.id-o.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 o=-1,i=!1;const n={value:0};let r=!1;for(const l of this.getBlocksInOrder())if(!r){if(i&&o+1!==l.id){r=!0;continue}o=l.id,l.forEachNode(c=>{const d=c===e||c===t;(i||d)&&s.push(c),d&&(i=!i)},n,this.rowCount)}return r||i?[]:s}},e6=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 io(e);this.rootNode=t,t.level=-1,this.rowHeight=Fo(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=Fo(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;this.cacheParams?e=!jn(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;Li(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:o,eventSvc:i,gos:n}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:s?.getSortModel()??[],rowNodeBlockLoader:o,initialRowCount:n.get("infiniteInitialRowCount"),maxBlocksInCache:n.get("maxBlocksInCache"),rowHeight:Fo(e),overflowSize:n.get("cacheOverflowSize"),blockSize:n.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new JI(this.cacheParams)),i.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 t6(e){ml(e)?.refreshCache()}function s6(e){ml(e)?.purgeCache()}function o6(e){return ml(e)?.getRowCount()}var i6=class extends O{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=ly(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=lt(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){as(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){Ao(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:o}=t.getBlockStateJson();e[s]=o}),e}printCacheStatus(){Ao(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},n6={moduleName:"InfiniteRowModelCore",version:Z,rowModels:["infinite"],beans:[e6,i6]},r6={moduleName:"InfiniteRowModel",version:Z,apiFunctions:{refreshInfiniteCache:t6,purgeInfiniteCache:s6,getInfiniteRowCount:o6},dependsOn:[n6,vI]},a6="↑",l6="↓",c6={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},d6=class extends Xe{constructor(){super(c6),this.eValue=ve,this.eDelta=ve,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const s=Math.abs(t),o=e.formatValue(s),i=X(o)?o:s,n=t>=0,r=this.eDelta;n?r.textContent=a6+i:r.textContent=l6+i,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"),Mt(this.eDelta)}refresh(e,t=!1){const{value:s,valueFormatted:o}=e,{eValue:i,lastValue:n,beans:r}=this;if(s===n||(X(o)?i.textContent=o:X(s)?i.textContent=s:Mt(i),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&&i.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=s,!0}},u6=".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}",h6={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},g6=class extends Xe{constructor(){super(h6),this.eCurrent=ve,this.refreshCount=0,this.registerCSS(u6)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:s}=this,o=Rt({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=o,o.textContent=s.textContent,this.getGui().insertBefore(o,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(qe(s)&&(s=""),s===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=s;const o=this.eCurrent;return X(e.valueFormatted)?o.textContent=e.valueFormatted:X(e.value)?o.textContent=s:Mt(o),!0}},p6=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"),o=this.beans.gos.get("cellFadeDuration")){const i=this.animations[t];i.delete(e);const n=Date.now(),r=n+s,a=n+s+o,l={phase:"flash",flashEndTime:r,fadeEndTime:a};i.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 o=this.animations[s],i=`ag-cell-${s}`,n=`${i}-animation`;for(const[r,a]of o){if(!r.isAlive()||!r.comp){o.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:m}}=r;switch(l){case"flash":p.toggleCss(i,!1),p.toggleCss(n,!0),m.transition=`background-color ${d-c}ms`,m.transitionDelay=`${c-e}ms`,t=Math.min(d,t??1/0),a.phase="fade";break;case"fade":p.toggleCss(i,!1),p.toggleCss(n,!1),m.removeProperty("transition"),m.removeProperty("transition-delay"),o.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=nE(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 f6(e,t={}){const{cellFlashSvc:s}=e;s&&e.frameworkOverrides.wrapIncoming(()=>{for(const o of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))s.flashCell(o,t)})}var m6={moduleName:"HighlightChanges",version:Z,beans:[p6],userComponents:{agAnimateShowChangeCellRenderer:d6,agAnimateSlideCellRenderer:g6},apiFunctions:{flashCells:f6}};function C6(e){return e.stateSvc?.getState()??{}}function v6(e,t,s){return e.stateSvc?.setState(t,s)}function rp(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=w6(e)),e.version=Z,e}function w6(e){return e.cellSelection=b6(e,"rangeSelection"),e}function b6(e,t){if(e&&typeof e=="object")return e[t]}var S6=class extends O{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=lt(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=lt(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=lt(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=Qe(e);const o=rp(e.get("initialState")??{}),i=o.partialColumnState;delete o.partialColumnState,this.cachedState=o;const n=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>n(()=>this.setupStateOnGridReady(o))),(o.columnOrder||o.columnVisibility||o.columnSizing||o.columnPinning||o.columnGroup)&&s?.hideColumns("columnState");const[r,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:c})=>{c==="gridInitializing"&&(r(),n(()=>{this.setupStateOnColumnsInitialised(o,!!i),s?.revealColumns("columnState")}))},rowCountReady:()=>{a?.(),n(()=>this.setupStateOnRowCountReady(o))},firstDataRendered:()=>{l?.(),n(()=>this.setupStateOnFirstDataRendered(o))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const s=rp(e);delete s.partialColumnState,this.cachedState=s,this.startSuppressEvents();const o="api",i=t?new Set(t):void 0;this.setGridReadyState(s,o,i),this.setColumnsInitialisedState(s,o,!!i,i),this.setRowCountState(s,o,i),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(s,o,i),this.stopSuppressEvents(o)})}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,o){this.setColumnState(e,t,s,o),this.setColumnGroupState(e,t,o),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const s=o=>()=>this.updateColumnState([o]);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:o,rowGroupExpansion:i,ssrmRowGroupExpansion:n,rowSelection:r,pagination:a}=e,l=(d,u)=>!s?.has(d)&&(u||t==="api");l("filter",o)&&this.setFilterState(o),l("rowGroupExpansion",i)&&this.setRowGroupExpansionState(n,i,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))},o=()=>t("filter",this.getFilterState()),{gos:i,colFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:o,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:s,columnRowGroupChanged:s,rowDataUpdated:()=>{(i.get("groupDefaultExpanded")!==0||i.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:o})}setFirstDataRenderedState(e,t,s){const{scroll:o,cellSelection:i,focusedCell:n,columnOrder:r,rowPinning:a}=e,l=(u,h)=>!s?.has(u)&&(h||t==="api");l("focusedCell",n)&&this.setFocusedCellState(n),l("cellSelection",i)&&this.setCellSelectionState(i),l("scroll",o)&&this.setScrollState(o),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:o=>{if(o.finished){const i=this.getRangeSelectionState();t("rangeSelection",i),t("cellSelection",i)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return f4(Ba(e),e.colModel.isPivotMode())}setColumnState(e,t,s,o){const{sort:i,rowGroup:n,aggregation:r,pivot:a,columnPinning:l,columnVisibility:c,columnSizing:d,columnOrder:u}=e;let h=!1;const p=(T,M)=>{const k=!o?.has(T)&&!!(M||t==="api");return h||(h=k),k},m={},C=T=>{let M=m[T];return M||(M={colId:T},m[T]=M,M)},v={},w=p("sort",i);w&&i?.sortModel.forEach(({colId:T,sort:M},k)=>{const N=C(T);N.sort=M,N.sortIndex=k}),(w||!s)&&(v.sort=null,v.sortIndex=null);const b=p("rowGroup",n);b&&n?.groupColIds.forEach((T,M)=>{const k=C(T);k.rowGroup=!0,k.rowGroupIndex=M}),(b||!s)&&(v.rowGroup=null,v.rowGroupIndex=null);const S=p("aggregation",r);S&&r?.aggregationModel.forEach(({colId:T,aggFunc:M})=>{C(T).aggFunc=M}),(S||!s)&&(v.aggFunc=null);const x=p("pivot",a);x&&(a?.pivotColIds.forEach((T,M)=>{const k=C(T);k.pivot=!0,k.pivotIndex=M}),this.gos.updateGridOptions({options:{pivotMode:!!a?.pivotMode},source:t})),(x||!s)&&(v.pivot=null,v.pivotIndex=null);const y=p("columnPinning",l);if(y){for(const T of l?.leftColIds??[])C(T).pinned="left";for(const T of l?.rightColIds??[])C(T).pinned="right"}(y||!s)&&(v.pinned=null);const F=p("columnVisibility",c);if(F)for(const T of c?.hiddenColIds??[])C(T).hide=!0;(F||!s)&&(v.hide=null);const R=p("columnSizing",d);if(R)for(const{colId:T,flex:M,width:k}of d?.columnSizingModel??[]){const N=C(T);N.flex=M??null,N.width=k}(R||!s)&&(v.flex=null);const E=u?.orderedColIds,D=!!E?.length&&!o?.has("columnOrder"),P=D?E.map(T=>C(T)):Object.values(m);(P.length||h)&&(this.columnStates=P,rs(this.beans,{state:P,applyOrder:D,defaultState:v},t))}setColumnPivotState(e,t){const s=this.columnStates;this.columnStates=void 0;const o=this.columnGroupStates;this.columnGroupStates=void 0;const i=this.beans,{pivotResultCols:n,colGroupSvc:r}=i;if(n?.isPivotResultColsPresent()){if(s){const a=[];for(const l of s)n.getPivotResultCol(l.colId)&&a.push(l);rs(i,{state:a,applyOrder:e},t)}o&&r?.setColumnGroupState(o,t)}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return m4(t)}setColumnGroupState(e,t,s){const o=this.beans.colGroupSvc;if(!o||s?.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const i=new Set(e.columnGroup?.openColumnGroupIds),r=o.getColumnGroupState().map(({groupId:a})=>{const l=i.has(a);return l&&i.delete(a),{groupId:a,open:l}});for(const a of i)r.push({groupId:a,open:!0});r.length&&(this.columnGroupStates=r),o.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(),o=e?.getAdvFilterModel()??void 0;return t||o||s?{filterModel:t,columnFilterState:s,advancedFilterModel:o}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:s,columnFilterState:o,advancedFilterModel:i}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(s!==void 0||o!==void 0)&&t?.setFilterState(s??null,o??null,"columnFilter"),i!==void 0&&t?.setAdvFilterModel(i??null,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:s,type:o,startRow:i,endRow:n,columns:r,startColumn:a}=t;return{id:s,type:o,startRow:i,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:o,visibleCols:i}=this.beans;if(!so(t)||!s)return;const n=[];for(const r of e?.cellRanges??[]){const a=[];for(const c of r.colIds){const d=o.getCol(c);d&&a.push(d)}if(!a.length)continue;let l=o.getCol(r.startColId);if(!l){const c=i.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:o,rowRenderer:i,animationFrameSvc:n,ctrlsSvc:r}=this.beans;o.wrapIncoming(()=>{r.get("center").setCenterViewportScrollLeft(s),r.getScrollFeature()?.setVerticalScrollPosition(t),i.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:o}=e;return{colId:t.getColId(),rowIndex:s,rowPinned:o}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:s}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:o,rowIndex:i,rowPinned:n}=e;t.setFocusedCell({column:s.getCol(o),rowIndex:i,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const s=e.getCurrentPage(),o=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!s&&!o))return{page:s,pageSize:o}}setPaginationState(e,t){const{pagination:s,gos:o}=this.beans;if(!s)return;const{pageSize:i,page:n}=e??{page:0,pageSize:o.get("paginationPageSize")},r=t==="gridInitializing";i&&!o.get("paginationAutoPageSize")&&s.setPageSize(i,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 o=this.beans.expansionSvc;if(!o)return;const i=t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};o.setExpansionState(i,s)}updateColumnState(e){const t=this.getColumnState();let s=!1;const o=this.cachedState;for(const i of Object.keys(t)){const n=t[i];jn(n,o[i])||(s=!0)}this.cachedState={...o,...t},s&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const s=this.cachedState[e];this.setCachedStateValue(e,t),jn(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")}},y6={moduleName:"GridState",version:Z,beans:[S6],apiFunctions:{getState:C6,setState:v6}};function x6(e){return e.rowModel.isLastRowIndexKnown()}function R6(e){return e.pagination?.getPageSize()??100}function F6(e){return e.pagination?.getCurrentPage()??0}function E6(e){return e.pagination?.getTotalPages()??1}function D6(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function P6(e){e.pagination?.goToNextPage()}function T6(e){e.pagination?.goToPreviousPage()}function M6(e){e.pagination?.goToFirstPage()}function I6(e){e.pagination?.goToLastPage()}function k6(e,t){e.pagination?.goToPage(t)}var A6=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 o=Math.max(Fo(t),1),i=Math.floor(e/o);t.pagination.setPageSize(i,"autoCalculated")};this.isBodyRendered?lt(this,s,50)():(s(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},Sn="paginationPageSizeSelector",L6={tag:"span",cls:"ag-paging-page-size"},O6=class extends Xe{constructor(){super(L6),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(Sn,()=>{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(){Mt(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(Sn)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),s=!t||!e.includes(t);if(s){const i=this.gos.exists("paginationPageSize"),n=this.gos.get(Sn)!==!0;z(94,{pageSizeSet:i,pageSizesSet:n,pageSizeOptions:e,paginationPageSizeOption:t}),n||z(95,{paginationPageSizeOption:t,paginationPageSizeSelector:Sn}),e.unshift("")}const o=String(s?"":t);this.selectPageSizeComp?(ro(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(o,!0)):this.createPageSizeSelectorComp(e,o),this.hasEmptyOption=s}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const s=this.getLocaleTextFunc(),o=s("pageSizeSelectorLabel","Page Size:"),i=s("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Eu).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(i).setLabel(o).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(Sn);return!Array.isArray(t)||!t?.length?e:[...t].sort((s,o)=>s-o)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},N6={selector:"AG-PAGE-SIZE-SELECTOR",component:O6},H6=".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}",G6=class extends IF{constructor(){super(),this.btFirst=ve,this.btPrevious=ve,this.btNext=ve,this.btLast=ve,this.lbRecordCount=ve,this.lbFirstRowOnPage=ve,this.lbLastRowOnPage=ve,this.lbCurrent=ve,this.lbTotal=ve,this.pageSizeComp=ve,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(H6)}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(),[N6]);const{btFirst:t,btPrevious:s,btNext:o,btLast:i}=this;this.activateTabIndex([t,s,o,i]),t.insertAdjacentElement("afterbegin",Jt(e?"last":"first",this.beans)),s.insertAdjacentElement("afterbegin",Jt(e?"next":"previous",this.beans)),o.insertAdjacentElement("afterbegin",Jt(e?"previous":"next",this.beans)),i.insertAdjacentElement("afterbegin",Jt(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):Y2(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:o=>{(o.key===I.ENTER||o.key===I.SPACE)&&(o.preventDefault(),s())}})}K2(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}):v4(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 o=this.isZeroPagesToDisplay(),i=e===s-1;this.nextButtonDisabled=i||o,this.lastButtonDisabled=!t||o||e===s-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){hS(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(),o=e?s:null,i=this.pagination.getCurrentPage(),n=this.pagination.getPageSize();let r,a;this.isZeroPagesToDisplay()?r=a=0:(r=n*i+1,a=r+n-1,e&&a>o&&(a=o));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 m=t>0?i+1:0,C=this.formatNumber(m);this.lbCurrent.textContent=C;let v,w;if(e)v=this.formatNumber(t),w=this.formatNumber(o);else{const b=h("more","more");v=b,w=b}this.lbTotal.textContent=v,this.lbRecordCount.textContent=w,this.announceAriaStatus(d,u,w,C,v)}announceAriaStatus(e,t,s,o,i){const n=this.getLocaleTextFunc(),r=n("page","Page"),a=n("to","to"),l=n("of","of"),c=`${e} ${a} ${t} ${l} ${s}`,d=`${r} ${o} ${l} ${i}`;c!==this.ariaRowStatus&&(this.ariaRowStatus=c,this.ariaAnnounce?.announceValue(c,"paginationRow")),d!==this.ariaPageStatus&&(this.ariaPageStatus=d,this.ariaAnnounce?.announceValue(d,"paginationPage"))}},B6={selector:"AG-PAGINATION",component:G6},V6=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 B6}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 X(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:X(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:X(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:X(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,o=t-1;this.totalPages=Math.floor(o/s)+1,this.adjustCurrentPageIfInvalid();const i=this.currentPage,n=s*i;let r=s*(i+1)-1;if(r>o&&(r=o),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(n),r===o)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,o=e-1;this.totalPages=Math.floor(o/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*s,this.bottomDisplayedRowIndex=t*(s+1)-1,this.bottomDisplayedRowIndex>o&&(this.bottomDisplayedRowIndex=o)}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:o=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:s,newPageSize:o,keepRenderedRows:t})}},z6={moduleName:"Pagination",version:Z,beans:[V6,A6],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:x6,paginationGetPageSize:R6,paginationGetCurrentPage:F6,paginationGetTotalPages:E6,paginationGetRowCount:D6,paginationGoToNextPage:P6,paginationGoToPreviousPage:T6,paginationGoToFirstPage:M6,paginationGoToLastPage:I6,paginationGoToPage:k6},dependsOn:[Cl]};function W6(e,t={}){const s=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(s))}function cv(e,t,s,o,i){t&&(o&&t.parent&&t.parent.level!==-1&&cv(e,t.parent,s,o,i),t.setExpanded(s,void 0,i))}function _6(e,t){return e.rowModel.getRowNode(t)}function j6(e,t,s,o){e.rowRenderer.addRenderedRowListener(t,s,o)}function U6(e){return e.rowRenderer.getRenderedNodes()}function $6(e,t,s){e.rowModel.forEachNode(t,s)}function q6(e){return e.rowRenderer.firstRenderedRow}function K6(e){return e.rowRenderer.lastRenderedRow}function Y6(e,t){return e.rowModel.getRow(t)}function Z6(e){return e.rowModel.getRowCount()}var X6={moduleName:"RowApi",version:Z,apiFunctions:{redrawRows:W6,setRowNodeExpanded:cv,getRowNode:_6,addRenderedRowListener:j6,getRenderedNodes:U6,forEachNode:$6,getFirstDisplayedRowIndex:q6,getLastDisplayedRowIndex:K6,getDisplayedRowAtIndex:Y6,getDisplayedRowCount:Z6}},Q6={moduleName:"ScrollApi",version:Z,apiFunctions:{getVerticalPixelRange:dM,getHorizontalPixelRange:uM,ensureColumnVisible:YC,ensureIndexVisible:ZC,ensureNodeVisible:hM}};function J6(e,t,s){if(!t)return;const o=e.ctrlsSvc.getGridBodyCtrl().eGridBody,i=`aria-${t}`;s===null?o.removeAttribute(i):o.setAttribute(i,s)}function ek(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function tk(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function sk(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function ok(e){e.animationFrameSvc?.flushAllFrames()}function ik(e){return{rowHeight:Fo(e),headerHeight:hr(e)}}function nk(e,t={}){const s=[];for(const n of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const r=n.getCellRenderer();r!=null&&s.push(Xn(r))}if(t.columns?.length)return s;const o=[],i=Hd(t.rowNodes);for(const n of e.rowRenderer.getAllRowCtrls()){if(i&&!Gd(n.rowNode,i)||!n.isFullWidth())continue;const r=n.getFullWidthCellRenderers();for(let a=0;a<r.length;a++){const l=r[a];l!=null&&o.push(Xn(l))}}return[...o,...s]}var rk={moduleName:"RenderApi",version:Z,apiFunctions:{setGridAriaProperty:J6,refreshCells:ek,refreshHeader:tk,isAnimationFrameQueueEmpty:sk,flushAllAnimationFrames:ok,getSizesForCurrentTheme:ik,getCellRendererInstances:nk}};function ak(e,t){typeof t=="number"?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)}function dv({colAutosize:e,visibleCols:t},s,o){Array.isArray(s)?e?.autoSizeCols({colKeys:s,skipHeader:o,source:"api"}):e?.autoSizeCols({...s,colKeys:s.colIds??t.allCols,source:"api"})}function lk(e,t){t&&typeof t=="object"?dv(e,t):e.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:t})}var ck=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 o=t.type;if(o==="fitGridWidth"||o==="fitProvidedWidth")s=!0;else if(o==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const i=e.get("rowData");s=i!=null&&i.length>0&&Qe(e)}s&&this.beans.colDelayRenderSvc?.hideColumns(o)}}autoSizeCols(e){const{eventSvc:t,visibleCols:s}=this.beans;this.innerAutoSizeCols(e).then(o=>{const i=c=>Oi(t,Array.from(c),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return i(o);const n=ap(this.beans),r=c=>s.leftCols.some(d=>On(d,c)),a=c=>s.rightCols.some(d=>On(d,c)),l=e.colKeys.filter(c=>!Vs(c)&&!As(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}),i(o)})}innerAutoSizeCols(e){return new Promise((t,s)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,s));const{colKeys:o,skipHeader:i,skipHeaderGroups:n,stopAtGroup:r,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:c=[],source:d="api"}=e,{animationFrameSvc:u,renderStatus:h,colModel:p,autoWidthCalc:m,visibleCols:C}=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 v=new Set;let w=-1;const b=Object.fromEntries(c.map(({colId:y,...F})=>[y,F])),S=i??this.gos.get("skipHeaderOnAutoSize"),x=n??S;for(;w!==0;){w=0;const y=[];for(const F of o){if(!F||xy(F))continue;const R=p.getCol(F);if(!R||v.has(R))continue;const E=m.getPreferredWidthForColumn(R,S);if(E>0){const D=b[R.colId]??{};D.minWidth??(D.minWidth=l),D.maxWidth??(D.maxWidth=a);const P=dk(R,E,D);R.setActualWidth(P,d),v.add(R),w++}y.push(R)}y.length&&C.refresh(d)}x||this.autoSizeColumnGroupsByColumns(o,d,r),t(v)})}autoSizeColumn(e,t,s){this.autoSizeCols({colKeys:[e],skipHeader:s,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,s){const{colModel:o,ctrlsSvc:i}=this.beans,n=new Set,r=o.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 i.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"),o=()=>{this.autoSizeColumn(t,"uiColumnResized",s)};e.addEventListener("dblclick",o);const i=new fo(e);return i.addEventListener("doubleTap",o),()=>{e.removeEventListener("dblclick",o),i.destroy()}}addColumnGroupResize(e,t,s){const o=this.gos.get("skipHeaderOnAutoSize"),i=()=>{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:o,stopAtGroup:t,source:"uiColumnResized"}),s()};return e.addEventListener("dblclick",i),()=>e.removeEventListener("dblclick",i)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const s=ap(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):z(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",s,o){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,s,o));return}const i={};for(const{key:m,...C}of o?.columnLimits??[])i[typeof m=="string"?m:m.getColId()]=C;const n=this.beans.visibleCols.allCols;if(e<=0||!n.length)return;const r=Ts(n);if(o?.onlyScaleUp&&r>e||e===r&&n.every(C=>{if(C.colDef.suppressSizeToFit)return!0;const v=i?.[C.getId()],w=v?.minWidth??o?.defaultMinWidth,b=v?.maxWidth??o?.defaultMaxWidth,S=C.getActualWidth();return(w==null||S>=w)&&(b==null||S<=b)}))return;const l=[],c=[];for(const m of n){const C=o?.colKeys?.some(v=>On(m,v))??!0;m.getColDef().suppressSizeToFit||!C?c.push(m):l.push(m)}const d=l.slice(0);let u=!1;const h=m=>{as(l,m),c.push(m)};for(const m of l){m.resetActualWidth(t);const C=i?.[m.getId()],v=C?.minWidth??o?.defaultMinWidth,w=C?.maxWidth??o?.defaultMaxWidth,b=m.getActualWidth();typeof v=="number"&&b<v?m.setActualWidth(v,t,!0):typeof w=="number"&&b>w&&m.setActualWidth(w,t,!0)}for(;!u;){u=!0;const m=e-Ts(c);if(m<=0)for(const C of l){const v=i?.[C.getId()]?.minWidth??o?.defaultMinWidth??C.minWidth;C.setActualWidth(v,t,!0)}else{const C=m/Ts(l);let v=m;for(let w=l.length-1;w>=0;w--){const b=l[w],S=i?.[b.getId()],x=S?.minWidth??o?.defaultMinWidth,y=S?.maxWidth??o?.defaultMaxWidth,F=b.getMinWidth(),R=b.getMaxWidth(),E=typeof x=="number"&&x>F?x:F,D=typeof y=="number"&&y<R?y:R;let P=Math.round(b.getActualWidth()*C);P<E?(P=E,h(b),u=!1):P>D?(P=D,h(b),u=!1):w===0&&(P=v),b.setActualWidth(P,t,!0),v-=P}}}for(const m of d)m.fireColumnWidthChangedEvent(t);const p=this.beans.visibleCols;p.setLeftValues(t),p.updateBodyWidths(),!s&&Oi(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 o=s.type;if(o==="fitGridWidth"){const{columnLimits:i,defaultMinWidth:n,defaultMaxWidth:r}=s,a=i?.map(({colId:l,minWidth:c,maxWidth:d})=>({key:l,minWidth:c,maxWidth:d}));this.sizeColumnsToFitGridBody({defaultMinWidth:n,defaultMaxWidth:r,columnLimits:a})}else o==="fitProvidedWidth"&&this.sizeColumnsToFit(s.width,"sizeColumnsToFit");t?.revealColumns(o)})}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 dk(e,t,s={}){const o=s.minWidth??e.getMinWidth();t<o&&(t=o);const i=s.maxWidth??e.getMaxWidth();return t>i&&(t=i),t}function ap({ctrlsSvc:e,scrollVisibleSvc:t}){const s=e.getGridBodyCtrl(),i=s.isVerticalScrollShowing()?t.getScrollbarWidth():0;return qn(s.eGridBody)-i}var uk={moduleName:"ColumnAutoSize",version:Z,beans:[ck],apiFunctions:{sizeColumnsToFit:ak,autoSizeColumns:dv,autoSizeAllColumns:lk},dependsOn:[iC]},hk=".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 gk(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function pk(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function fk(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function mk(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function Ck(e,t,s){return e.pinnedRowModel?.forEachPinnedRow(t,s)}var vk={moduleName:"PinnedRow",version:Z,beans:[RF],css:[hk],apiFunctions:{getPinnedTopRowCount:gk,getPinnedBottomRowCount:pk,getPinnedTopRow:fk,getPinnedBottomRow:mk,forEachPinnedRow:Ck},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},wk=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}},bk=class extends O{constructor(e){super(),this.column=e}buildCache(e){const{column:t,beans:{gos:s,pinnedRowModel:o,rowModel:i,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 m=null,C=null,v;const w=(S,x)=>{m=S,C=null,v=x},b=S=>{const x=!S.isExpandable()&&!S.group&&!S.detail&&(d?!d({rowNode:S}):!0);if(S.rowIndex==null||!x){w(null,null);return}if(m==null||S.level!==m.level||S.footer||C&&S.rowIndex-1!==C?.getLastNode().rowIndex){w(S,n.getValue(t,S));return}const y=n.getValue(t,S);if(p){const F=we(s,{valueA:v,nodeA:m,valueB:y,nodeB:S,column:t,colDef:a});if(!h(F)){w(S,y);return}}else if(u?!u(v,y):v!==y){w(S,y);return}if(!C){const F=l?.get(m);F?.firstNode===m?(F.reset(),C=F):C=new wk(t,m),c.set(m,C)}C.addSpannedNode(S),c.set(S,C)};switch(e){case"center":i.forEachDisplayedNode?.(S=>{(!r||r.isRowInPage(S.rowIndex))&&b(S)}),this.centerValueNodeMap=c;break;case"top":o?.forEachPinnedRow("top",b),this.topValueNodeMap=c;break;case"bottom":o?.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}}},Sk=class extends O{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=lt(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=lt(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 bk(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,o=e.column,i=e.rowIndex,n=this.spanningColumns.get(o);if(!n)return;let r;switch(e.rowPinned){case"top":r=t?.getPinnedTopRow(i);break;case"bottom":r=t?.getPinnedBottomRow(i);break;default:r=s.getRow(i)}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,o]of this.spanningColumns)if(o.isCellSpanning(e)){const i=o.getCellSpan(e);t(s,i)}}destroy(){super.destroy(),this.spanningColumns.clear()}},yk=class extends Mi{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,o,i,n,r){this.eWrapper=s,super.setComp(e,t,s,o,i,n,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||uf(e,t.rowIndex)}setAriaRowSpan(){mS(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(pl(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}},xk=class extends qa{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 yk(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(){}},Rk=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),o=s.size,i=this.getAllRelevantRowControls(e),n=new Map;let r=!1;for(const l of i)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 xk(d.firstNode,this.beans,!1,!1,!1);n.set(d.firstNode,h)});this.setCtrlsMap(e,n);const a=n.size===o;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 o=this.getCtrlsMap(e.rowPinned).get(s.firstNode);if(o)return o.getAllCellCtrls().find(i=>i.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")}},Fk={moduleName:"CellSpan",version:Z,beans:[Sk,Rk]},Ek=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,o=s.cellClassRules,i=this.getCellClassParams(e,s);ju(this.beans.expressionSvc,o===this.cellClassRules?void 0:this.cellClassRules,o,i,n=>t.toggleCss(n,!0),n=>t.toggleCss(n,!1)),this.cellClassRules=o}applyUserStyles(){const e=this.column,t=e.colDef,s=t.cellStyle;if(!s)return;let o;if(typeof s=="function"){const i=this.getCellClassParams(e,t);o=s(i)}else o=s;o&&this.cellComp.setUserStyles(o)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,s=e.colDef,o=this.getCellClassParams(e,s);for(const n of this.staticClasses)t.toggleCss(n,!1);const i=this.beans.cellStyles.getStaticCellClasses(s,o);this.staticClasses=i;for(const n of i)t.toggleCss(n,!0)}getCellClassParams(e,t){const{value:s,rowNode:o}=this.cellCtrl;return we(this.beans.gos,{value:s,data:o.data,node:o,colDef:t,column:e,rowIndex:o.rowIndex})}},Dk=class extends O{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,s,o){ju(this.beans.expressionSvc,void 0,e.cellClassRules,t,s,o),this.processStaticCellClasses(e,t,s)}getStaticCellClasses(e,t){const{cellClass:s}=e;if(!s)return[];let o;return typeof s=="function"?o=s(t):o=s,typeof o=="string"&&(o=[o]),o||[]}createCellCustomStyleFeature(e,t){return new Ek(e,t)}processStaticCellClasses(e,t,s){this.getStaticCellClasses(e,t).forEach(i=>{s(i)})}},Pk={moduleName:"CellStyle",version:Z,beans:[Dk]},Tk={moduleName:"RowStyle",version:Z,beans:[p5]};function Mk(e,t){return!!e.colHover?.isHovered(t)}var Ik=class extends O{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=s=>{const{beans:o,gos:i,element:n,columns:r}=this,a=o.colHover;if(s??!!i.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}},kk="ag-column-hover",Ak=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 o=()=>{const i=this.isHovered(s);t.toggleCss("ag-column-hover",i)};e.addManagedEventListeners({columnHoverChanged:o}),o()}onCellColumnHover(e,t){if(!t)return;const s=this.isHovered(e);t.toggleCss(kk,s)}addHeaderFilterColumnHoverListener(e,t,s,o){this.createHoverFeature(e,[s],o);const i=()=>{const n=this.isHovered(s);t.toggleCss("ag-column-hover",n)};e.addManagedEventListeners({columnHoverChanged:i}),i()}createHoverFeature(e,t,s){e.createManagedBean(new Ik(t,s))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},Lk={moduleName:"ColumnHover",version:Z,beans:[Ak],apiFunctions:{isColumnHovered:Mk}},Ok=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,o=!Sa.has(e),i=o?this.asyncListeners:this.syncListeners;i.has(e)||i.set(e,new Set),i.get(e).add(s),this.eventSvc.addListener(e,s,o)}removeListener(e,t){const s=this.wrapSvc?.unwrap(e,t)??t,i=!!this.asyncListeners.get(e)?.delete(s);i||this.syncListeners.get(e)?.delete(s),this.eventSvc.removeListener(e,s,i)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,s=(n,r)=>{Sa.has(n)&&t(n,r)},o=(n,r)=>{Sa.has(n)||t(n,r)};this.globalListenerPairs.set(e,{syncListener:s,asyncListener:o});const i=this.eventSvc;i.addGlobalListener(s,!1),i.addGlobalListener(o,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:s,globalListenerPairs:o}=this,i=s?.unwrapGlobal(e)??e;if(o.has(i)){const{syncListener:r,asyncListener:a}=o.get(i);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!0),o.delete(e)}else this.syncGlobalListeners.delete(i),t.removeGlobalListener(i,!1)}destroyEventListeners(e,t){e.forEach((s,o)=>{s.forEach(i=>this.eventSvc.removeListener(o,i,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:o})=>{t.removeGlobalListener(s,!1),t.removeGlobalListener(o,!0)}),e.clear()}};function Nk(e,t,s){e.apiEventSvc?.addListener(t,s)}function Hk(e,t,s){e.apiEventSvc?.removeListener(t,s)}function Gk(e,t){e.apiEventSvc?.addGlobalListener(t)}function Bk(e,t){e.apiEventSvc?.removeGlobalListener(t)}var Vk={moduleName:"EventApi",version:Z,apiFunctions:{addEventListener:Nk,addGlobalListener:Gk,removeEventListener:Hk,removeGlobalListener:Bk},beans:[Ok]},zk={moduleName:"Locale",version:Z,beans:[p4]},Wk=class extends O{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=lt(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:e,rowModel:t,rowSpanSvc:s,pinnedRowModel:o}=this.beans,i=e.autoHeightCols;let n=!1;const r=a=>{const l=a.__autoHeights;let c=to(this.beans,a).height;for(const d of i){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)};o?.forEachPinnedRow?.("top",r),o?.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 o=e.__autoHeights[s.getId()];e.__autoHeights[s.getId()]=t,o!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:s,colViewport:o,visibleCols:i}=this.beans;if(!s.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=i.getLeftColsForRow(t);break;case"right":n=i.getRightColsForRow(t);break;case null:n=o.getColsWithinViewport(t);break}return!n.includes(e)}setupCellAutoHeight(e,t,s){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const o=t.parentElement,{rowNode:i,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:m}=Vo(o),C=u+h+p+m,w=t.offsetHeight+C;if(d<5){const S=!dt(r)?.contains(t),x=w==0;if(S||x){window.setTimeout(()=>a(d+1),0);return}}this.setRowAutoHeight(i,w,n)},l=()=>a(0);l();const c=Gs(r,t,l);return s.addDestroyFunc(()=>{c(),this.setRowAutoHeight(i,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(i=>i.isAutoHeight())),t.length!==0){if(!s.__autoHeights)return!1;for(const o of t){const i=s.__autoHeights[o.getColId()];if(!i||s.rowHeight<i)return!1}}return!0}},_k={moduleName:"RowAutoHeight",version:Z,beans:[Wk]},jk={moduleName:"AllCommunity",version:Z,dependsOn:[WI,ZI,r6,A4,_M,jM,UM,$M,qM,KM,YM,WM,OT,NT,HT,LT,BT,VT,y6,bI,z6,nC,X6,Q6,rk,uk,SE,vk,dI,Z5,Pk,Lk,Tk,Vk,J5,m6,KC,zk,_k,bE,_I,Fk]};function ae(e,t={}){const s=Object.keys(t).map(o=>{const i=t[o];return i!=null?`${o}=${i}`:null}).filter(Boolean).join(";");return[e,s].filter(o=>o.length>0).join(":")}var ee={grid(e){return ae("ag-grid-root",{gridId:e})},headerGroupCell(e){return ae("ag-header-group-cell",{colId:e})},headerCell(e){return ae("ag-header-cell",{colId:e})},headerCheckbox(e){return ae("ag-header-selection-checkbox",{colId:e})},headerFilterButton(e){return ae("ag-header-cell-filter-button",{colId:e})},floatingFilter(e){return ae("ag-floating-filter",{colId:e})},floatingFilterButton(e){return ae("ag-floating-filter-button",{colId:e})},headerCellMenuButton(e){return ae("ag-header-cell-menu-button",{colId:e})},headerResizeHandle(e){return ae("ag-header-cell-resize",{colId:e})},filterInstancePickerDisplay(e){return ae(`ag-${e.source}-picker-display`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},numberFilterInstanceInput(e){return ae(`ag-${e.source}-number-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},textFilterInstanceInput(e){return ae(`ag-${e.source}-text-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},dateFilterInstanceInput(e){return ae(`ag-${e.source}-date-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},setFilterInstanceMiniFilterInput(e){return ae(`ag-${e.source}-set-filter-mini-filter-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},setFilterInstanceItem(e,t){return ae(`ag-${e.source}-set-filter-item`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,itemLabel:t}:{colId:e.colId,itemLabel:t})},setFilterApplyPanelButton(e,t){return ae(`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 ae(`ag-${e.source}-filter-condition-radio-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},advancedFilterInput(){return ae("ag-advanced-filter-input")},advancedFilterButton(e){return ae("ag-advanced-filter-button",{label:e})},advancedFilterBuilderButton(){return ae("ag-advanced-filter-builder-button")},advancedFilterPanelMaximiseButton(){return ae("ag-advanced-filter-builder-panel-maximise")},advancedFilterPanelCloseButton(){return ae("ag-advanced-filter-builder-panel-close")},advancedFilterPill(e){return ae("ag-advanced-filter-builder-pill",{label:e})},advancedFilterBuilderAddItemButton(){return ae("ag-advanced-filter-builder-add-item-button")},rowNode(e){return ae("ag-row",{"row-id":e})},cell(e,t){return ae("ag-cell",{"row-id":e,colId:t})},autoGroupCell(e){return ee.cell(e,Xs)},checkbox(e,t){return ae("ag-selection-checkbox",{"row-id":e,colId:t})},selectionColumnCheckbox(e){return ee.checkbox(e,Cu)},autoGroupColumnCheckbox(e){return ee.checkbox(e,Xs)},dragHandle(e,t){return ae("ag-drag-handle",{"row-id":e,colId:t})},groupContracted(e,t){return ae("ag-group-contracted",{"row-id":e,colId:t})},groupExpanded(e,t){return ae("ag-group-expanded",{"row-id":e,colId:t})},autoGroupContracted(e){return ee.groupContracted(e,Xs)},autoGroupExpanded(e){return ee.groupExpanded(e,Xs)},rowNumber(e){return ee.cell(e,vu)},menu(){return ae("ag-menu")},menuOption(e){return ae("ag-menu-option",{option:e})},sideBar(){return ae("ag-side-bar")},sideBarButton(e){return ae("ag-side-button",{label:e})},columnToolPanel(){return ae("ag-column-panel")},pivotModeSelect(){return ae("ag-pivot-mode-select")},columnPanelSelectHeaderCheckbox(){return ae("ag-column-panel-select-header-checkbox")},columnPanelSelectHeaderFilter(){return ae("ag-column-panel-select-header-filter")},columnSelectListItemGroupClosedIcon(e){return ae("ag-column-select-list-item-group-closed-icon",{label:e})},columnSelectListItemCheckbox(e){return ae("ag-column-select-list-item-checkbox",{label:e})},columnSelectListItemDragHandle(e){return ae("ag-column-select-list-item-drag-handle",{label:e})},columnDropCellDragHandle(e,t,s){return ae("ag-column-drop-cell-drag-handle",{source:e,area:t,label:s})},columnDropCellCancelButton(e,t,s){return ae("ag-column-drop-cell-cancel",{source:e,area:t,label:s})},columnDropArea(e,t){return ae("ag-column-drop-area",{source:e,name:t})},filterToolPanel(){return ae("ag-filter-panel")},filterToolPanelAddFilterButton(){return ae("ag-filter-panel-add-filter-button")},filterToolPanelFilterTypeSelector(e){return ae("ag-filter-panel-filter-type-selector",{colLabel:e})},filterToolPanelSearchInput(){return ae("ag-filter-toolpanel-search-input")},filterToolPanelGroup(e){return ae("ag-filter-toolpanel-group",{title:e})},filterToolPanelGroupCollapsedIcon(e){return ae("ag-filter-toolpanel-group-collapsed-icon",{title:e})},statusBarTotalAndFilteredRowCount(){return ae("ag-status-bar-total-and-filtered-row-count")},statusBarTotalRowCount(){return ae("ag-status-bar-total-row-count")},statusBarFilteredRowCount(){return ae("ag-status-bar-filtered-row-count")},statusBarSelectedRowCount(){return ae("ag-status-bar-selected-row-count")},statusBarAggregations(){return ae("ag-status-bar-aggregations")},paginationPanelSizePickerDisplay(e){return ae("ag-pagination-page-size-picker-field-display",{value:e})},paginationPanelFirstRowOnPage(e){return ae("ag-paging-row-summary-panel-first-row-on-page",{value:e})},paginationPanelLastRowOnPage(e){return ae("ag-paging-row-summary-panel-last-row-on-page",{value:e})},paginationPanelRecordCount(e){return ae("ag-paging-row-summary-panel-record-count",{value:e})},paginationSummaryPanelButton(e){return ae("ag-paging-page-summary-panel-btn",{label:e})},paginationSummaryPanelCurrentPage(e){return ae("ag-paging-page-summary-panel-current-page",{value:e})},paginationSummaryPanelTotalPage(e){return ae("ag-paging-page-summary-panel-total-page",{value:e})},fillHandle(){return ae("ag-fill-handle")},columnChooserCloseButton(){return ae("ag-column-chooser-close-button")},columnChooserSearchBarCheckbox(){return ae("ag-column-chooser-header-checkbox")},columnChooserSearchBarFilter(){return ae("ag-column-chooser-searchbar-filter")},columnChooserListItemGroupClosedIcon(e){return ae("ag-column-chooser-list-item-group-closed-icon",{label:e})},columnChooserListItemCheckbox(e){return ae("ag-column-chooser-list-item-checkbox",{label:e})},columnChooserListItemDragHandle(e){return ae("ag-column-chooser-list-item-drag-handle",{label:e})},overlay(){return ae("ag-overlay")}},uv="data-testid";function ce(e,t){e?.setAttribute(uv,t)}function Uk(e){uv=e}var $k=class extends O{constructor(){super(...arguments),this.beanName="testIdSvc"}postConstruct(){const e=lt(this,()=>this.setupAllTestIds(),500),t=lt(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=os(this.beans),t=Zm(this.beans),s=e.querySelector(`[grid-id="${t}"]`);ce(s,ee.grid(t)),e.querySelectorAll(".ag-header-group-cell").forEach(n=>{ce(n,ee.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")?ee.floatingFilter(r):ee.headerCell(r);ce(n,l),ce(n.querySelector(".ag-header-cell-filter-button"),ee.headerFilterButton(r)),ce(n.querySelector(".ag-header-cell-menu-button"),ee.headerCellMenuButton(r)),ce(n.querySelector(".ag-header-cell-resize"),ee.headerResizeHandle(r)),ce(n.querySelector(".ag-checkbox input[type=checkbox]"),ee.headerCheckbox(r)),ce(n.querySelector(".ag-floating-filter-button button"),ee.floatingFilterButton(r)),this.setupFilterInstance(n.querySelector(".ag-floating-filter-body"),{source:"floating-filter",colId:r})});const o=e.querySelector(".ag-filter-menu");this.setupFilterInstance(o,{source:"column-filter"}),ce(e.querySelector(".ag-advanced-filter input[type=text]"),ee.advancedFilterInput()),e.querySelectorAll(".ag-advanced-filter-buttons button").forEach(n=>{ce(n,ee.advancedFilterButton(n.textContent))}),ce(e.querySelector("button.ag-advanced-filter-builder-button"),ee.advancedFilterBuilderButton()),e.querySelectorAll('.ag-panel[aria-label="Advanced Filter"] .ag-panel-title-bar-button').forEach((n,r)=>{ce(n,r===0?ee.advancedFilterPanelMaximiseButton():ee.advancedFilterPanelCloseButton())}),e.querySelectorAll('.ag-panel[aria-lable="Advanced Filter"] .ag-advanced-filter-builder-pill').forEach(n=>{ce(n,ee.advancedFilterPill(n.querySelector(".ag-picker-field-display")?.textContent))}),ce(e.querySelector('.ag-panel[aria-label="Advanced Filter"] .ag-advanced-filter-builder-item-button'),ee.advancedFilterBuilderAddItemButton()),e.querySelectorAll(".ag-row").forEach(n=>{const r=n.getAttribute("row-id");ce(n,ee.rowNode(r)),n.querySelectorAll(".ag-cell").forEach(a=>{const l=a.getAttribute("col-id");ce(a,ee.cell(r,l)),ce(a.querySelector(".ag-selection-checkbox input[type=checkbox]"),ee.checkbox(r,l)),ce(a.querySelector(".ag-drag-handle"),ee.dragHandle(r,l)),ce(a.querySelector(".ag-group-contracted"),ee.groupContracted(r,l)),ce(a.querySelector(".ag-group-expanded"),ee.groupExpanded(r,l))})}),e.querySelectorAll(".ag-menu-list").forEach(n=>{ce(n,ee.menu()),n.querySelectorAll(".ag-menu-option").forEach(r=>{ce(r,ee.menuOption(r.querySelector(".ag-menu-option-text")?.textContent))})}),e.querySelectorAll(".ag-side-bar").forEach(n=>{ce(n,ee.sideBar()),n.querySelectorAll(".ag-side-button button").forEach(r=>{ce(r,ee.sideBarButton(r.querySelector(".ag-side-button-label")?.textContent))}),n.querySelectorAll(".ag-column-panel").forEach(r=>{ce(r,ee.columnToolPanel()),ce(r.querySelector(".ag-pivot-mode-select input[type=checkbox]"),ee.pivotModeSelect()),ce(r.querySelector(".ag-column-select-header-checkbox input[type=checkbox]"),ee.columnPanelSelectHeaderCheckbox()),ce(r.querySelector(".ag-column-select-header-filter-wrapper input[type=text]"),ee.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");ce(l.querySelector(".ag-column-group-closed-icon"),ee.columnSelectListItemGroupClosedIcon(c)),ce(l.querySelector(".ag-column-select-checkbox input[type=checkbox]"),ee.columnSelectListItemCheckbox(c)),ce(l.querySelector(".ag-drag-handle"),ee.columnSelectListItemDragHandle(c))})}),this.setupColumnDropArea(r,"toolbar")}),n.querySelectorAll(".ag-filter-panel").forEach(r=>{ce(r,ee.filterToolPanel()),ce(r.querySelector("button.ag-filter-add-button"),ee.filterToolPanelAddFilterButton()),r.querySelectorAll(".ag-filter-card").forEach(a=>{const l=a.querySelector(".ag-filter-card-title")?.textContent,c=a.querySelector(".ag-filter-type-select");ce(c,ee.filterToolPanelFilterTypeSelector(l)),a.querySelectorAll(".ag-filter").forEach(d=>this.setupFilterInstance(d,{source:"filter-toolpanel",colLabel:l}))})}),n.querySelectorAll(".ag-filter-toolpanel").forEach(r=>{ce(r.querySelector(".ag-filter-toolpanel-search-input input[type=text]"),ee.filterToolPanelSearchInput()),r.querySelectorAll(".ag-filter-toolpanel-group").forEach(a=>{const l=a.querySelector(".ag-filter-toolpanel-group-title")?.textContent;ce(a,ee.filterToolPanelGroup(l)),ce(a.querySelector(".ag-filter-toolpanel-group-title-bar-icon .ag-icon-tree-closed"),ee.filterToolPanelGroupCollapsedIcon(l));const c=a.querySelector(".ag-filter-toolpanel-instance-filter");c&&this.setupFilterInstance(c,{source:"filter-toolpanel",colLabel:l})})})}),ce(e.querySelector(".ag-status-bar .ag-status-panel-total-and-filtered-row-count"),ee.statusBarTotalAndFilteredRowCount()),ce(e.querySelector(".ag-status-bar .ag-status-panel-total-row-count"),ee.statusBarTotalRowCount()),ce(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),ee.statusBarFilteredRowCount()),ce(e.querySelector(".ag-status-bar .ag-status-panel-selected-row-count"),ee.statusBarSelectedRowCount()),ce(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),ee.statusBarAggregations()),e.querySelectorAll(".ag-paging-panel").forEach(n=>{ce(n.querySelector(".ag-paging-page-size .ag-picker-field-display"),ee.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":ce(r,ee.paginationPanelFirstRowOnPage(r.textContent));break;case"lbLastRowOnPage":ce(r,ee.paginationPanelLastRowOnPage(r.textContent));break;case"lbRecordCount":ce(r,ee.paginationPanelRecordCount(r.textContent));break}}),n.querySelectorAll(".ag-paging-page-summary-panel .ag-button").forEach(r=>{ce(r,ee.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":ce(r,ee.paginationSummaryPanelCurrentPage(r.textContent));break;case"lbTotal":ce(r,ee.paginationSummaryPanelTotalPage(r.textContent));break}})}),ce(e.querySelector(".ag-fill-handle"),ee.fillHandle()),e.querySelectorAll('.ag-panel[aria-label="Choose Columns"]').forEach(n=>{ce(n.querySelector(".ag-panel-title-bar-button-icon"),ee.columnChooserCloseButton()),ce(n.querySelector('.ag-column-select-header-checkbox input[type="checkbox"]'),ee.columnChooserSearchBarCheckbox()),ce(n.querySelector('.ag-column-select-header-filter-wrapper input[type="text"]'),ee.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");ce(a.querySelector(".ag-column-group-closed-icon"),ee.columnChooserListItemGroupClosedIcon(l)),ce(a.querySelector(".ag-column-select-checkbox input[type=checkbox]"),ee.columnChooserListItemCheckbox(l)),ce(a.querySelector(".ag-drag-handle"),ee.columnChooserListItemDragHandle(l))})})}),ce(e.querySelector(".ag-overlay-wrapper"),ee.overlay());const i=e.querySelector(".ag-column-drop-wrapper");i&&this.setupColumnDropArea(i,"panel")}setupFilterInstance(e,t){if(!e)return;e.querySelectorAll(".ag-filter-select .ag-picker-field-display").forEach(r=>{ce(r,ee.filterInstancePickerDisplay(t))});const s=e.querySelector('.ag-filter-body input[type="number"]');ce(s,ee.numberFilterInstanceInput(t));const o=e.querySelector('.ag-filter-body input[type="text"]');ce(o,ee.textFilterInstanceInput(t));const i=e.querySelector('.ag-filter-body input[type="date"]');ce(i,ee.dateFilterInstanceInput(t));const n=e.querySelector('.ag-mini-filter input[type="text"]');ce(n,ee.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"]');ce(l,ee.setFilterInstanceItem(t,a))}),e.querySelectorAll(".ag-filter-apply-panel button").forEach(r=>{ce(r,ee.setFilterApplyPanelButton(t,r.textContent))}),e.querySelectorAll(".ag-filter-condition .ag-radio-button").forEach(r=>{const a=r.querySelector(".ag-radio-button-label")?.textContent;ce(r.querySelector("input[type=radio]"),ee.filterConditionRadioButton(t,a))})}setupColumnDropArea(e,t){e.querySelectorAll(".ag-column-drop").forEach(s=>{const o=s.querySelector(".ag-column-drop-list")?.getAttribute("aria-label");ce(s,ee.columnDropArea(t,o)),s.querySelectorAll(".ag-column-drop-cell").forEach(i=>{const n=i.querySelector(".ag-column-drop-cell-text")?.textContent;ce(i.querySelector(".ag-drag-handle"),ee.columnDropCellDragHandle(t,o,n)),ce(i.querySelector(".ag-column-drop-cell-button .ag-icon-cancel"),ee.columnDropCellCancelButton(t,o,n))})})}},qk={moduleName:"Testing",version:Z,beans:[$k]};function Kk({testIdAttribute:e}={}){e&&Uk(e),Mf.registerModules([qk])}var Ct=g.createContext({}),hv=g.createContext("default"),pr=(e,t,s,o)=>{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),lp(o,r)}),()=>{l=!0,r&&(a?.remove(),t.destroyBean(r),o&&lp(o,void 0))}},lp=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const s=e;s.current=t}},Yt=(...e)=>e.filter(s=>s!=null&&s!=="").join(" "),es=class gv{constructor(...t){this.classesMap={};for(const s of t)this.classesMap[s]=!0}setClass(t,s){if(!!this.classesMap[t]==s)return this;const i=new gv;return i.classesMap={...this.classesMap},i.classesMap[t]=s,i}toString(){return Object.keys(this.classesMap).filter(s=>this.classesMap[s]).join(" ")}},Ki=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()},_d=g.version?.split(".")[0],pv=_d==="16"||_d==="17";function Yk(){return _d==="19"}var xa=!1;function Zk(e){return xa||setTimeout(()=>xa=!1,0),xa=!0,e()}var sr=(e,t)=>{!pv&&e&&!xa?zi.flushSync(t):t()},Xk=e=>{pv?e():g.startTransition(e)};function Qk(e,t,s){return g.useSyncExternalStore?g.useSyncExternalStore(e,t):s}function Za(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 o=[],i=[],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)&&o.push(l)}for(let a=0;a<t.length;a++){const l=t[a],c=l.instanceId;n.has(c)||i.push(l)}return o.length===e.length&&i.length===0?e:o.length===0&&i.length===t.length?t:o.length===0?i:i.length===0?o:[...o,...i]}var fv=g.forwardRef((e,t)=>{const{registry:s,context:o}=g.useContext(Ct),i=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(),[m,C]=g.useState(),[v,w]=g.useState(()=>new es),[b,S]=g.useState(()=>new es("ag-hidden")),[x,y]=g.useState(()=>new es("ag-hidden")),[F,R]=g.useState(()=>new es("ag-invisible"));g.useImperativeHandle(t,()=>({refresh(){return!1}})),g.useLayoutEffect(()=>pr(d,o,n.current),[d]);const E=g.useCallback(U=>{if(i.current=U,!U||o.isDestroyed()){c.current=o.destroyBean(c.current);return}const L={setInnerRenderer:(H,te)=>{u(H),C(te)},setChildCount:H=>p(H),toggleCss:(H,te)=>w(Q=>Q.setClass(H,te)),setContractedDisplayed:H=>y(te=>te.setClass("ag-hidden",!H)),setExpandedDisplayed:H=>S(te=>te.setClass("ag-hidden",!H)),setCheckboxVisible:H=>R(te=>te.setClass("ag-invisible",!H)),setCheckboxSpacing:H=>R(te=>te.setClass("ag-group-checkbox-spacing",H))},de=s.createDynamicBean("groupCellRendererCtrl",!0);de&&(c.current=o.createBean(de),c.current.init(L,U,r.current,a.current,l.current,fv,e))},[]),D=g.useMemo(()=>`ag-cell-wrapper ${v.toString()}`,[v]),P=g.useMemo(()=>`ag-group-expanded ${b.toString()}`,[b]),T=g.useMemo(()=>`ag-group-contracted ${x.toString()}`,[x]),M=g.useMemo(()=>`ag-group-checkbox ${F.toString()}`,[F]),k=d?.componentFromFramework,N=k?d.componentClass:void 0,A=d==null&&m!=null,W=Ui(m);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},A?W:k?g.createElement(N,{...d.params}):null),g.createElement("span",{className:"ag-group-child-count"},h))}),cp=fv,Qu=g.createContext({setMethods:()=>{}}),Jk=e=>{const{initialProps:t,addUpdateCallback:s,CustomComponentClass:o,setMethods:i}=e,[{key:n,...r},a]=g.useState(t);return g.useEffect(()=>{s(l=>a(l))},[]),g.createElement(Qu.Provider,{value:{setMethods:i}},g.createElement(o,{key:n,...r}))},eA=g.memo(Jk),tA=0;function dp(){return`agPortalKey_${++tA}`}var mv=class{constructor(e,t,s,o){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=s,this.suppressFallbackMethods=!!o,this.statelessComponent=this.isStateless(this.reactComponent),this.key=dp(),this.portalKey=dp(),this.instanceCreated=this.isStatelessComponent()?Ae.resolve(!1):new Ae(i=>{this.resolveInstanceCreated=i})}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 o=s[e];if(o)return o.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 Ae(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=zi.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 bl(e,t,s){for(const o of e){const i=t[o];i&&(s[o]=i)}}var jt=class extends mv{constructor(){super(...arguments),this.awaitUpdateCallback=new Ae(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=eA}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 Ae(o=>{setTimeout(()=>{o()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,bl(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}refreshProps(){return this.updateCallback?this.updateCallback():new Ae(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},sA=class extends jt{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},oA=class extends jt{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}},iA=class extends jt{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:o}=this;return e.label=t,e.icon=s,e.shake=o,e}},nA=class extends jt{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 Ae(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 Ae(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}},rA=class extends jt{constructor(){super(...arguments),this.awaitSetMethodsCallback=new Ae(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 Cv(e,t){e.parentFilterInstance(s=>{(s.setModel(t)||Ae.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var aA=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){bl(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),Cv(this.floatingFilterParams,e)}},lA=class extends jt{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(),Cv(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},cA=class extends jt{refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}},dA=class extends jt{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},uA=class extends jt{refresh(e){this.sourceParams=e,this.refreshProps()}},hA=class extends jt{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}},gA=class extends jt{refresh(e){this.sourceParams=e,this.refreshProps()}},pA=class extends jt{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},fA=class extends jt{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 Ju(){z(231)}var mA=1e3,CA=class{constructor(e,t,s){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=s||mA}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){sr(!0,()=>this.refresher()),e.rendered()&&t(e);return}window.setTimeout(()=>{this.waitForInstance(e,t,s)})}}},vA=({ctrl:e})=>{const t=e.isAlive(),{context:s}=g.useContext(Ct),[o,i]=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 cr(()=>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 $i);const b=()=>{const x=e.getSelectAllGui();x&&(c.current?.insertAdjacentElement("afterend",x),a.current.addDestroyFunc(()=>x.remove()))},S={setWidth:x=>{l.current&&(l.current.style.width=x)},toggleCss:(x,y)=>h.current.toggleCss(x,y),setUserStyles:x=>r(x),setAriaSort:x=>{l.current&&(x?wS(l.current,x):bS(l.current))},setUserCompDetails:x=>i(x),getUserCompInstance:()=>u.current||void 0,refreshSelectAllGui:b,removeSelectAllGui:()=>e.getSelectAllGui()?.remove()};e.setComp(S,w,c.current,d.current,a.current),b()},[]);g.useLayoutEffect(()=>pr(o,s,d.current,u),[o]),g.useEffect(()=>{e.setDragSource(l.current)},[o]);const m=g.useMemo(()=>!!(o?.componentFromFramework&&Ki(o.componentClass)),[o]),C=o?.componentFromFramework,v=o?.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"},C?m?g.createElement(v,{...o.params}):g.createElement(v,{...o.params,ref:u}):null))},wA=g.memo(vA),bA=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t}getProps(){return this.floatingFilterParams}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){bl(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}},SA=({ctrl:e})=>{const{context:t,gos:s}=g.useContext(Ct),[o,i]=g.useState(),[n,r]=g.useState(()=>new es("ag-header-cell","ag-floating-filter")),[a,l]=g.useState(()=>new es),[c,d]=g.useState(()=>new es("ag-floating-filter-button","ag-hidden")),[u,h]=g.useState("false"),[p,m]=g.useState(),[,C]=g.useState(1),v=g.useRef(),w=g.useRef(null),b=g.useRef(null),S=g.useRef(null),x=g.useRef(null),y=g.useRef(),F=g.useRef(),R=H=>{H!=null&&y.current&&y.current(H)},E=g.useCallback(H=>{if(w.current=H,!H||!e.isAlive()||t.isDestroyed()){v.current=t.destroyBean(v.current);return}v.current=t.createBean(new $i),F.current=new Ae(Q=>{y.current=Q});const te={toggleCss:(Q,J)=>r(me=>me.setClass(Q,J)),setUserStyles:Q=>i(Q),addOrRemoveBodyCssClass:(Q,J)=>l(me=>me.setClass(Q,J)),setButtonWrapperDisplayed:Q=>{d(J=>J.setClass("ag-hidden",!Q)),h(Q?"false":"true")},setWidth:Q=>{w.current&&(w.current.style.width=Q)},setCompDetails:Q=>m(Q),getFloatingFilterComp:()=>F.current?F.current:null,setMenuIcon:Q=>x.current?.appendChild(Q)};e.setComp(te,H,x.current,b.current,v.current)},[]);g.useLayoutEffect(()=>pr(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&&Ki(p.componentClass)),[p]),k=g.useMemo(()=>s.get("reactiveCustomComponents"),[]),N=g.useMemo(()=>s.get("enableFilterHandlers"),[]),[A,W]=g.useState();g.useEffect(()=>{if(p?.componentFromFramework)if(k){const H=N?bA:aA,te=new H(p.params,()=>C(Q=>Q+1));R(te),W(te)}else Ju()},[p]);const U=A?.getProps(),L=p?.componentFromFramework,de=p?.componentClass;return g.createElement("div",{ref:E,style:o,className:D,role:"gridcell"},g.createElement("div",{ref:b,className:P,role:"presentation"},L?k?U&&g.createElement(Qu.Provider,{value:{setMethods:H=>A.setMethods(H)}},g.createElement(de,{...U})):g.createElement(de,{...p.params,ref:M?()=>{}:R}):null),g.createElement("div",{ref:S,"aria-hidden":u,className:T,role:"presentation"},g.createElement("button",{ref:x,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},yA=g.memo(SA),xA=({ctrl:e})=>{const{context:t}=g.useContext(Ct),[s,o]=g.useState(),[i,n]=g.useState(()=>new es),[r,a]=g.useState(()=>new es),[l,c]=g.useState("false"),[d,u]=g.useState(),[h,p]=g.useState(),m=g.useRef(),C=g.useRef(null),v=g.useRef(null),w=g.useRef(null),b=g.useRef(),S=g.useCallback(D=>{if(C.current=D,!D||!e.isAlive()||t.isDestroyed()){m.current=t.destroyBean(m.current);return}m.current=t.createBean(new $i);const P={setWidth:T=>{C.current&&(C.current.style.width=T)},toggleCss:(T,M)=>n(k=>k.setClass(T,M)),setUserStyles:T=>o(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,v.current,w.current,m.current)},[]);g.useLayoutEffect(()=>pr(h,t,w.current),[h]),g.useEffect(()=>{C.current&&e.setDragSource(C.current)},[h]);const x=g.useMemo(()=>!!(h?.componentFromFramework&&Ki(h.componentClass)),[h]),y=g.useMemo(()=>"ag-header-group-cell "+i.toString(),[i]),F=g.useMemo(()=>"ag-header-cell-resize "+r.toString(),[r]),R=h?.componentFromFramework,E=h?.componentClass;return g.createElement("div",{ref:S,style:s,className:y,role:"columnheader","aria-expanded":d},g.createElement("div",{ref:w,className:"ag-header-cell-comp-wrapper",role:"presentation"},R?x?g.createElement(E,{...h.params}):g.createElement(E,{...h.params,ref:b}):null),g.createElement("div",{ref:v,"aria-hidden":l,className:F}))},RA=g.memo(xA),FA=({ctrl:e})=>{const{gos:t,context:s}=g.useContext(Ct),{topOffset:o,rowHeight:i}=g.useMemo(()=>e.getTopAndHeight(),[]),n=g.useMemo(()=>t.get("tabIndex"),[]),[r,a]=g.useState(()=>e.getAriaRowIndex()),l=e.headerRowClass,[c,d]=g.useState(()=>i+"px"),[u,h]=g.useState(()=>o+"px"),p=g.useRef(null),[m,C]=g.useState(()=>e.getUpdatedHeaderCtrls()),v=g.useRef(),w=g.useRef(null),b=g.useCallback(y=>{if(w.current=y,!y||!e.isAlive()||s.isDestroyed()){v.current=s.destroyBean(v.current);return}v.current=s.createBean(new $i);const F={setHeight:R=>d(R),setTop:R=>h(R),setHeaderCtrls:(R,E,D)=>{const P=p.current,T=Za(P,R,E);T!==P&&(p.current=T,sr(D,()=>C(T)))},setWidth:R=>{w.current&&(w.current.style.width=R)},setRowIndex:R=>{a(R)}};e.setComp(F,v.current,!1)},[]),S=g.useMemo(()=>({height:c,top:u}),[c,u]),x=g.useCallback(y=>{switch(e.type){case"group":return g.createElement(RA,{ctrl:y,key:y.instanceId});case"filter":return g.createElement(yA,{ctrl:y,key:y.instanceId});default:return g.createElement(wA,{ctrl:y,key:y.instanceId})}},[]);return g.createElement("div",{ref:b,className:l,role:"row",style:S,tabIndex:n,"aria-rowindex":r},m.map(x))},EA=g.memo(FA),DA=({pinned:e})=>{const[t,s]=g.useState(!0),[o,i]=g.useState([]),{context:n}=g.useContext(Ct),r=g.useRef(null),a=g.useRef(null),l=g.useRef(),c=e==="left",d=e==="right",u=!c&&!d,h=g.useCallback(C=>{if(r.current=C,!C||n.isDestroyed()){l.current=n.destroyBean(l.current);return}l.current=n.createBean(new iF(e));const v={setDisplayed:s,setCtrls:w=>i(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(v,r.current)},[]),p=t?"":"ag-hidden",m=()=>o.map(C=>g.createElement(EA,{ctrl:C,key:C.instanceId}));return c?g.createElement("div",{ref:h,className:"ag-pinned-left-header "+p,"aria-hidden":!t,role:"rowgroup"},m()):d?g.createElement("div",{ref:h,className:"ag-pinned-right-header "+p,"aria-hidden":!t,role:"rowgroup"},m()):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"},m())):null},Bc=g.memo(DA),PA=()=>{const[e,t]=g.useState(()=>new es),[s,o]=g.useState(),{context:i}=g.useContext(Ct),n=g.useRef(null),r=g.useRef(),a=g.useCallback(d=>{if(n.current=d,!d||i.isDestroyed()){r.current=i.destroyBean(r.current);return}r.current=i.createBean(new eF);const u={toggleCss:(h,p)=>t(m=>m.setClass(h,p)),setHeightAndMinHeight:h=>o(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(Bc,{pinned:"left"}),g.createElement(Bc,{pinned:null}),g.createElement(Bc,{pinned:"right"}))},TA=g.memo(PA),MA=(e,t)=>{g.useEffect(()=>{const s=t.current;if(s){const o=s.parentElement;if(o){const i=document.createComment(e);return o.insertBefore(i,s),()=>{i.remove()}}}},[e])},Co=MA,IA=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new Ae(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){bl(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()}},kA=e=>{const t=g.useRef(e),s=g.useRef(),o=g.useRef(!1),i=g.useRef(!1),[,n]=g.useState(0);o.current&&(i.current=!0),g.useEffect(()=>(o.current||(s.current=t.current(),o.current=!0),n(r=>r+1),()=>{i.current&&s.current?.()}),[])},AA=e=>{const[t,s]=g.useState(),o=g.useContext(Ct),{context:i,popupSvc:n,gos:r,editSvc:a}=o,{editDetails:l,cellCtrl:c,eParentCell:d}=e;return kA(()=>{const{compDetails:u}=l,h=r.get("stopEditingWhenCellsLoseFocus");let p,m;if(!i.isDestroyed()){m=i.createBean(a.createPopupEditorWrapper(u.params));const C=m.getGui();if(e.jsChildComp){const y=e.jsChildComp.getGui();y&&C.appendChild(y)}const{column:v,rowNode:w}=c,b={column:v,rowNode:w,type:"popupCellEditor",eventSource:d,ePopup:C,position:l.popupPosition,keepWithinBounds:!0},S=n?.positionPopupByComponent.bind(n,b),x=n?.addPopup({modal:h,eChild:C,closeOnEsc:!0,closedCallback:()=>{c.onPopupEditorClosed()},anchorToElement:d,positionCallback:S,ariaOwns:d});p=x?x.hideFunc:void 0,s(m),e.jsChildComp?.afterGuiAttached?.()}return()=>{p?.(),i.destroyBean(m)}}),g.useLayoutEffect(()=>()=>{c.isCellFocused()&&t?.getGui().contains(Ze(o))&&d.focus({preventScroll:!0})},[t]),t&&e.wrappedContent?zi.createPortal(e.wrappedContent,t.getGui()):null},up=g.memo(AA),LA=(e,t,s)=>{const{compProxy:o}=e;s(o);const i=o.getProps(),n=Ki(t);return g.createElement(Qu.Provider,{value:{setMethods:r=>o.setMethods(r)}},n?g.createElement(t,{...i}):g.createElement(t,{...i,ref:r=>o.setRef(r)}))},hp=(e,t,s)=>e.compProxy?LA(e,t,s):g.createElement(t,{...e.compDetails.params,ref:s}),OA=(e,t,s,o,i)=>{const n=e.compDetails,r=n.componentClass,a=n.componentFromFramework&&!e.popup,l=n.componentFromFramework&&e.popup,c=!n.componentFromFramework&&e.popup;return a?hp(e,r,t):l?g.createElement(up,{editDetails:e,cellCtrl:o,eParentCell:s,wrappedContent:hp(e,r,t)}):c&&i?g.createElement(up,{editDetails:e,cellCtrl:o,eParentCell:s,jsChildComp:i}):null},NA=(e,t,s,o,i,n)=>{const{context:r}=g.useContext(Ct),a=g.useCallback(()=>{const l=i.current;if(!l)return;const c=l.getGui();c&&c.parentElement&&c.remove(),r.destroyBean(l),i.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(i.current){const m=i.current,v=m.refresh!=null&&e.force==!1?m.refresh(h.params):!1;if(v===!0||v===void 0)return;a()}h.newAgStackInstance().then(m=>{if(!m)return;const C=m.getGui();if(!C)return;(t?s:n.current).appendChild(C),i.current=m})},[e,t,o]),g.useEffect(()=>a,[])},vv=NA,HA=({cellCtrl:e,parent:t})=>{const s=g.useRef(),o=g.useMemo(()=>{const{loadingComp:i}=e.getDeferLoadingCellRenderer();return i?{value:void 0,compDetails:i,force:!1}:void 0},[e]);if(vv(o,!1,void 0,1,s,t),o?.compDetails?.componentFromFramework){const i=o.compDetails.componentClass;return g.createElement(i,{...o.compDetails.params})}return g.createElement(g.Fragment,null)},GA=({cellCtrl:e,printLayout:t,editingCell:s})=>{const o=g.useContext(Ct),{context:i}=o,{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),[m,C]=g.useState(),[v,w]=g.useState(!1),[b,S]=g.useState(!1),[x,y]=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),k=g.useRef(),N=g.useRef(),A=g.useRef(),W=g.useRef([]),U=g.useRef(),L=g.useRef(),[de,H]=g.useState(0),te=g.useCallback(re=>{L.current=re,H(Ce=>Ce+1)},[]),Q=l!=null&&(v||x||b)&&(d==null||!!d.popup),J=E||Q,me=g.useMemo(()=>e.getCellValueClass(),[e]),Re=g.useCallback(re=>{if(N.current=re,re){const Ce=re.isCancelBeforeStart&&re.isCancelBeforeStart();setTimeout(()=>{Ce?(e.stopEditing(!0),e.focusCell(!0)):(e.cellEditorAttached(),e.enableEditorTooltipFeature(re))})}},[e]),ne=g.useRef();ne.current||(ne.current=new cr(()=>P.current)),vv(l,J,L.current,de,k,P);const _=g.useRef();g.useLayoutEffect(()=>{const re=_.current,Ce=l;if(_.current=l,re==null||re.compDetails==null||Ce==null||Ce.compDetails==null)return;U.current?.refreshVisibility();const xe=re.compDetails,Le=Ce.compDetails;if(xe.componentClass!=Le.componentClass||M.current?.refresh==null)return;M.current.refresh(Le.params)!=!0&&p(De=>De+1)},[l]),g.useLayoutEffect(()=>{if(!(d&&!d.compDetails.componentFromFramework)||i.isDestroyed())return;const Ce=d.compDetails,xe=d.popup===!0,Le=Ce.newAgStackInstance();return Le.then(fe=>{if(!fe)return;const De=fe.getGui();Re(fe),xe||((E?A:P).current?.appendChild(De),fe.afterGuiAttached?.()),R(fe)}),()=>{Le.then(fe=>{const De=fe.getGui();e.disableEditorTooltipFeature(),i.destroyBean(fe),Re(void 0),R(void 0),De?.remove()})}},[d]);const Fe=g.useCallback(re=>{if(A.current=re,!re||i.isDestroyed()||!e.isAlive()){const Le=W.current;W.current=[];for(const fe of Le)fe();return}let Ce;const xe=Le=>{Le&&(re.insertAdjacentElement("afterbegin",Le.getGui()),W.current.push(()=>{eo(Le.getGui()),i.destroyBean(Le),U.current===Ce&&(U.current=void 0)}))};v&&xe(e.createSelectionCheckbox()),x&&xe(e.createDndSource()),b&&(Ce=e.createRowDragComp(),U.current=Ce,Ce&&(xe(Ce),Ce.refreshVisibility()))},[e,i,x,b,v]),ie=g.useCallback(()=>{const re=!e.isCellSpanning()||T.current,Ce=P.current;if(!Ce||!re||!e||!e.isAlive()||i.isDestroyed()){a.current=i.destroyBean(a.current);return}a.current=i.createBean(new $i);const xe={toggleCss:(fe,De)=>ne.current.toggleCss(fe,De),setUserStyles:fe=>C(fe),getFocusableElement:()=>P.current,setIncludeSelection:fe=>w(fe),setIncludeRowDrag:fe=>S(fe),setIncludeDndSource:fe=>y(fe),getCellEditor:()=>N.current??null,getCellRenderer:()=>M.current??k.current,getParentOfValue:()=>L.current??A.current??P.current,setRenderDetails:(fe,De,ze)=>{const Ne=()=>{c(Ve=>Ve?.compDetails!==fe||Ve?.value!==De||Ve?.force!==ze?{value:De,compDetails:fe,force:ze}:Ve)};if(fe?.params?.deferRender&&!e.rowNode.group){const{loadingComp:Ve,onReady:kt}=e.getDeferLoadingCellRenderer();if(Ve){c({value:void 0,compDetails:Ve,force:!1}),kt.then(()=>Xk(Ne));return}}Ne()},setEditDetails:(fe,De,ze,Ne)=>{if(fe){let Ve;fe.componentFromFramework&&(Ne?Ve=new IA(fe.params,()=>p(kt=>kt+1)):Ju()),u({compDetails:fe,popup:De,popupPosition:ze,compProxy:Ve}),De||c(void 0)}else e.hasBrowserFocus()&&xe.getFocusableElement().focus({preventScroll:!0}),N.current=void 0,u(void 0)},refreshEditStyles:(fe,De)=>{if(!P.current)return;const{current:ze}=ne;ze.toggleCss("ag-cell-value",!J),ze.toggleCss("ag-cell-inline-editing",!!fe&&!De),ze.toggleCss("ag-cell-popup-editing",!!fe&&!!De),ze.toggleCss("ag-cell-not-inline-editing",!fe||!!De)}},Le=A.current||void 0;e.setComp(xe,Ce,T.current??void 0,Le,t,s,a.current)},[]),$=g.useCallback(re=>{P.current=re,ie()},[]),q=g.useCallback(re=>{T.current=re,ie()},[]),se=g.useMemo(()=>!!(l?.compDetails?.componentFromFramework&&Ki(l.compDetails.componentClass)),[l]);g.useLayoutEffect(()=>{if(!P.current)return;const{current:re}=ne;re.toggleCss("ag-cell-value",!J),re.toggleCss("ag-cell-inline-editing",!!d&&!d.popup),re.toggleCss("ag-cell-popup-editing",!!d&&!!d.popup),re.toggleCss("ag-cell-not-inline-editing",!d||!!d.popup)});const B=()=>{const{compDetails:re,value:Ce}=l;if(!re)return Ce?.toString?.()??Ce;if(re.componentFromFramework){const xe=re.componentClass;return g.createElement(g.Suspense,{fallback:g.createElement(HA,{cellCtrl:e,parent:P})},se?g.createElement(xe,{...re.params,key:h}):g.createElement(xe,{...re.params,key:h,ref:M}))}},pe=()=>{const re=()=>l==null?null:J?g.createElement("span",{role:"presentation",id:`cell-${r}`,className:me,ref:te},B()):B(),Ce=xe=>OA(xe,Re,P.current,e,F);return d!=null?d.popup?g.createElement(g.Fragment,null,re(),Ce(d)):Ce(d):re()},le=()=>g.createElement("div",{ref:$,style:m,role:D,"col-id":n},J?g.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:Fe},pe()):pe());return e.isCellSpanning()?g.createElement("div",{ref:q,className:"ag-spanned-cell-wrapper",role:"presentation"},le()):le()},BA=g.memo(GA),VA=({rowCtrl:e,containerType:t})=>{const{context:s,gos:o,editSvc:i}=g.useContext(Ct),n=g.useContext(hv)==="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),[m,C]=g.useState(()=>e.businessKey),[v,w]=g.useState(()=>e.rowStyles),b=g.useRef(null),[S,x]=g.useState(()=>null),[y,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(),k=g.useRef(),N=g.useRef(!1),[A,W]=g.useState(0);g.useEffect(()=>{if(N.current||!y||A>10)return;const $=T.current?.firstChild;$?(e.setupDetailRowAutoHeight($),N.current=!0):W(q=>q+1)},[y,A]);const U=g.useRef();U.current||(U.current=new cr(()=>T.current));const L=g.useRef(()=>{}),de=g.useCallback($=>(L.current=$,()=>{L.current=()=>{}}),[]),H=Qk(de,()=>b.current,[]),te=n?H:S,Q=g.useCallback($=>{if(T.current=$,r.current=$?s.createBean(new $i):s.destroyBean(r.current),!$){e.unsetComp(t);return}if(!e.isAlive()||s.isDestroyed())return;const q={setTop:E,setTransform:P,toggleCss:(se,B)=>U.current.toggleCss(se,B),setDomOrder:se=>a.current=se,setRowIndex:u,setRowId:p,setRowBusinessKey:C,setUserStyles:w,setCellCtrls:(se,B)=>{const pe=b.current,le=Za(pe,se,a.current);le!==pe&&(b.current=le,n?L.current():sr(B,()=>x(le)))},showFullWidth:se=>{k.current=se.params,F(se)},getFullWidthCellRenderer:()=>M.current,getFullWidthCellRendererParams:()=>k.current,refreshFullWidth:se=>{const B=se();return k.current=B,_.current?(F(pe=>({...pe,params:B})),!0):!M.current||!M.current.refresh?!1:M.current.refresh(B)}};e.setComp(q,$,t,r.current)},[]);g.useLayoutEffect(()=>pr(y,s,T.current,M),[y]);const J=g.useMemo(()=>{const $={top:R,transform:D};return Object.assign($,v),$},[R,D,v]),me=l&&y?.componentFromFramework,Re=!l&&te!=null,ne=g.useMemo(()=>!!(y?.componentFromFramework&&Ki(y.componentClass)),[y]),_=g.useRef(!1);g.useEffect(()=>{_.current=ne&&!!y&&!!o.get("reactiveCustomComponents")},[ne,y]);const Fe=()=>te?.map($=>g.createElement(BA,{cellCtrl:$,editingCell:i?.isEditing($,{withOpenEditor:!0})??!1,printLayout:e.printLayout,key:$.instanceId})),ie=()=>{const $=y.componentClass;return ne?g.createElement($,{...y.params}):g.createElement($,{...y.params,ref:M})};return g.createElement("div",{ref:Q,role:"row",style:J,"row-index":d,"row-id":h,"row-business-key":m},Re?Fe():me?ie():null)},gp=g.memo(VA),zA=({name:e})=>{const{context:t,gos:s}=g.useContext(Ct),o=g.useMemo(()=>ur(e),[e]),i=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")&&!!o.getSpannedRowCtrls,h=g.useRef([]),p=g.useRef([]),[m,C]=g.useState(()=>[]),v=g.useRef(!1),w=g.useRef(),b=g.useMemo(()=>Yt("ag-viewport",Om(e)),[e]),S=g.useMemo(()=>Yt(va(e)),[e]),x=g.useMemo(()=>Yt("ag-spanning-container",R2(e)),[e]),y=o.type==="center"||u,F=y?i:n;Co(" AG Row Container "+e+" ",F);const R=g.useCallback(()=>{const A=!y||i.current!=null,W=n.current!=null,U=!u||r.current!=null;return A&&W&&U},[]),E=g.useCallback(()=>i.current==null&&n.current==null&&r.current==null,[]),D=g.useCallback(()=>{if(E()&&(w.current=t.destroyBean(w.current)),!t.isDestroyed()&&R()){const A=L=>{const de=Za(l.current,a.current,v.current);de!==l.current&&(l.current=de,sr(L,()=>d(de)))},W=L=>{const de=Za(p.current,h.current,v.current);de!==p.current&&(p.current=de,sr(L,()=>C(de)))},U={setHorizontalScroll:L=>{i.current&&(i.current.scrollLeft=L)},setViewportHeight:L=>{i.current&&(i.current.style.height=L)},setRowCtrls:({rowCtrls:L,useFlushSync:de})=>{const H=!!de&&a.current.length>0&&L.length>0;a.current=L,A(H)},setSpannedRowCtrls:(L,de)=>{const H=!!de&&h.current.length>0&&L.length>0;h.current=L,W(H)},setDomOrder:L=>{v.current!=L&&(v.current=L,A(!1))},setContainerWidth:L=>{n.current&&(n.current.style.width=L)},setOffsetTop:L=>{n.current&&(n.current.style.transform=`translateY(${L})`)}};w.current=t.createBean(new L2(e)),w.current.setComp(U,n.current,r.current??void 0,i.current)}},[R,E]),P=g.useCallback(A=>{n.current=A,D()},[D]),T=g.useCallback(A=>{r.current=A,D()},[D]),M=g.useCallback(A=>{i.current=A,D()},[D]),k=()=>g.createElement("div",{className:S,ref:P,role:y?"presentation":"rowgroup"},c.map(A=>g.createElement(gp,{rowCtrl:A,containerType:o.type,key:A.instanceId})));if(!y)return k();const N=()=>g.createElement("div",{className:x,ref:T,role:"presentation"},m.map(A=>g.createElement(gp,{rowCtrl:A,containerType:o.type,key:A.instanceId})));return g.createElement("div",{className:b,ref:M,role:"rowgroup"},k(),u?N():null)},WA=g.memo(zA),_A=()=>{const e=g.useContext(Ct),{context:t,overlays:s}=e,[o,i]=g.useState(""),[n,r]=g.useState(0),[a,l]=g.useState(0),[c,d]=g.useState("0px"),[u,h]=g.useState("0px"),[p,m]=g.useState("100%"),[C,v]=g.useState("0px"),[w,b]=g.useState("0px"),[S,x]=g.useState("100%"),[y,F]=g.useState(!0),[R,E]=g.useState(!0),[D,P]=g.useState(null),[T,M]=g.useState(""),[k,N]=g.useState(null),[A,W]=g.useState("ag-layout-normal"),U=g.useRef();U.current||(U.current=new cr(()=>L.current));const L=g.useRef(null),de=g.useRef(null),H=g.useRef(null),te=g.useRef(null),Q=g.useRef(null),J=g.useRef(null),me=g.useRef(null),Re=g.useRef([]),ne=g.useRef([]);Co(" AG Grid Body ",L),Co(" AG Pinned Top ",de),Co(" AG Sticky Top ",H),Co(" AG Middle ",J),Co(" AG Pinned Bottom ",me);const _=g.useCallback(De=>{if(L.current=De,!De||t.isDestroyed()){Re.current=t.destroyBeans(Re.current);for(const V of ne.current)V();ne.current=[];return}const ze=(V,Ee)=>{V.appendChild(Ee),ne.current.push(()=>Ee.remove())},Ne=V=>{const Ee=t.createBean(new V);return Re.current.push(Ee),Ee},Ve=(V,Ee,At)=>{ze(V,document.createComment(At)),ze(V,Ne(Ee).getGui())};Ve(De,z2," AG Fake Horizontal Scroll ");const kt=s?.getOverlayWrapperCompClass();kt&&Ve(De,kt," AG Overlay Wrapper "),Q.current&&Ve(Q.current,_2," AG Fake Vertical Scroll ");const Et={setRowAnimationCssOnBodyViewport:i,setColumnCount:V=>{L.current&&CS(L.current,V)},setRowCount:V=>{L.current&&fS(L.current,V)},setTopHeight:r,setBottomHeight:l,setStickyTopHeight:d,setStickyTopTop:h,setStickyTopWidth:m,setTopInvisible:F,setBottomInvisible:E,setColumnMovingCss:(V,Ee)=>U.current.toggleCss(V,Ee),updateLayoutClasses:W,setAlwaysVerticalScrollClass:P,setPinnedTopBottomOverflowY:M,setCellSelectableCss:(V,Ee)=>N(Ee?V:null),setBodyViewportWidth:V=>{J.current&&(J.current.style.width=V)},registerBodyViewportResizeListener:V=>{if(J.current){const Ee=Gs(e,J.current,V);ne.current.push(()=>Ee())}},setStickyBottomHeight:v,setStickyBottomBottom:b,setStickyBottomWidth:x,setGridRootRole:V=>De.setAttribute("role",V)},Ut=t.createBean(new G2);Re.current.push(Ut),Ut.setComp(Et,De,J.current,de.current,me.current,H.current,te.current)},[]),Fe=g.useMemo(()=>Yt("ag-root","ag-unselectable",A),[A]),ie=g.useMemo(()=>Yt("ag-body-viewport",o,A,D,k),[o,A,D,k]),$=g.useMemo(()=>Yt("ag-body",A),[A]),q=g.useMemo(()=>Yt("ag-floating-top",y?"ag-invisible":null,k),[k,y]),se=g.useMemo(()=>Yt("ag-sticky-top",k),[k]),B=g.useMemo(()=>Yt("ag-sticky-bottom",C==="0px"?"ag-invisible":null,k),[k,C]),pe=g.useMemo(()=>Yt("ag-floating-bottom",R?"ag-invisible":null,k),[k,R]),le=g.useMemo(()=>({height:n,minHeight:n,overflowY:T}),[n,T]),re=g.useMemo(()=>({height:c,top:u,width:p}),[c,u,p]),Ce=g.useMemo(()=>({height:C,bottom:w,width:S}),[C,w,S]),xe=g.useMemo(()=>({height:a,minHeight:a,overflowY:T}),[a,T]),Le=De=>g.createElement(WA,{name:De,key:`${De}-container`}),fe=({section:De,children:ze,className:Ne,style:Ve})=>g.createElement("div",{ref:De,className:Ne,role:"presentation",style:Ve},ze.map(Le));return g.createElement("div",{ref:_,className:Fe},g.createElement(TA,null),fe({section:de,className:q,style:le,children:["topLeft","topCenter","topRight","topFullWidth"]}),g.createElement("div",{className:$,ref:Q,role:"presentation"},fe({section:J,className:ie,children:["left","center","right","fullWidth"]})),fe({section:H,className:se,style:re,children:["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"]}),fe({section:te,className:B,style:Ce,children:["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"]}),fe({section:me,className:pe,style:xe,children:["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"]}))},jA=g.memo(_A),UA=(e,t)=>{const{children:s,eFocusableElement:o,onTabKeyDown:i,gridCtrl:n,forceFocusOutWhenTabGuardsAreEmpty:r,isEmpty:a}=e,{context:l}=g.useContext(Ct),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 S of[c,d])b===void 0?S.current?.removeAttribute("tabindex"):S.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 S={setTabIndex:h};u.current=l.createBean(new qm({comp:S,eTopGuard:w,eBottomGuard:b,eFocusableElement:o,onTabKeyDown:i,forceFocusOutWhenTabGuardsAreEmpty:r,focusInnerElement:x=>n.focusInnerElement(x),isEmpty:a}))}},[]),m=g.useCallback(w=>{c.current=w,p()},[p]),C=g.useCallback(w=>{d.current=w,p()},[p]),v=w=>{const b=w==="top"?Di.TAB_GUARD_TOP:Di.TAB_GUARD_BOTTOM;return g.createElement("div",{className:`${Di.TAB_GUARD} ${b}`,role:"presentation",ref:w==="top"?m:C})};return g.createElement(g.Fragment,null,v("top"),s,v("bottom"))},$A=g.forwardRef(UA),qA=g.memo($A),KA=({context:e})=>{const[t,s]=g.useState(""),[o,i]=g.useState(""),[n,r]=g.useState(null),[a,l]=g.useState(null),[c,d]=g.useState(!1),[u,h]=g.useState(),p=g.useRef(),m=g.useRef(null),C=g.useRef(),[v,w]=g.useState(null),b=g.useRef(()=>{}),S=g.useRef(),x=g.useRef([]),y=g.useCallback(()=>{},[]);Co(" AG Grid ",m);const F=g.useCallback(M=>{if(m.current=M,p.current=M?e.createBean(new VF):e.destroyBean(p.current),!M||e.isDestroyed())return;const k=p.current;b.current=k.focusInnerElement.bind(k);const N={destroyGridUi:()=>{},setRtlClass:s,forceFocusOutOfContainer:A=>{if(!A&&S.current?.isDisplayed()){S.current.forceFocusOutOfContainer(A);return}C.current?.forceFocusOutOfContainer(A)},updateLayoutClasses:i,getFocusableContainers:()=>{const A=[],W=m.current?.querySelector(".ag-root");W&&A.push({getGui:()=>W});for(const U of x.current)U.isDisplayed()&&A.push(U);return A},setCursor:r,setUserSelect:l};k.setComp(N,M,M),d(!0)},[]);g.useEffect(()=>{const M=p.current,k=m.current;if(!u||!M||!v||!k||e.isDestroyed())return;const N=[],{watermarkSelector:A,paginationSelector:W,sideBarSelector:U,statusBarSelector:L,gridHeaderDropZonesSelector:de}=M.getOptionalSelectors(),H=[];if(de){const Q=e.createBean(new de.component),J=Q.getGui();k.insertAdjacentElement("afterbegin",J),H.push(J),N.push(Q)}if(U){const Q=e.createBean(new U.component),J=Q.getGui(),me=v.querySelector(".ag-tab-guard-bottom");me&&(me.insertAdjacentElement("beforebegin",J),H.push(J)),N.push(Q),x.current.push(Q)}const te=Q=>{const J=e.createBean(new Q),me=J.getGui();return k.insertAdjacentElement("beforeend",me),H.push(me),N.push(J),J};if(L&&te(L.component),W){const Q=te(W.component);S.current=Q,x.current.push(Q)}return A&&te(A.component),()=>{e.destroyBeans(N);for(const Q of H)Q.remove()}},[u,v,e]);const R=g.useMemo(()=>Yt("ag-root-wrapper",t,o),[t,o]),E=g.useMemo(()=>Yt("ag-root-wrapper-body","ag-focus-managed",o),[o]),D=g.useMemo(()=>({userSelect:a??"",WebkitUserSelect:a??"",cursor:n??""}),[a,n]),P=g.useCallback(M=>{C.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&&v&&!e.isDestroyed()&&g.createElement(Ct.Provider,{value:e.getBeans()},g.createElement(qA,{ref:P,eFocusableElement:v,onTabKeyDown:y,gridCtrl:p.current,forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:T},g.createElement(jA,null)))))},YA=g.memo(KA),ZA=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))}},wv={setGridApi:void 0,maxComponentCreationTimeMs:void 0,children:void 0},XA={gridOptions:void 0,modules:void 0,containerStyle:void 0,className:void 0,passGridApi:void 0,componentWrappingElement:void 0,...wv},bv=new Set(Object.keys(XA)),QA=new Set(Object.keys(wv)),Sv=e=>{const t=g.useRef(),s=g.useRef(null),o=g.useRef(null),i=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 i.current)T();i.current.length=0;return}const b=e.modules||[];o.current||(o.current=new CA(()=>h(T=>T+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),i.current.push(()=>{o.current?.destroy(),o.current=null}));const S=Cy(e.gridOptions,e,Object.keys(e).filter(T=>!bv.has(T))),x=()=>{if(c.current){const T=()=>a.current?.shouldQueueUpdates()?void 0:n.current.shift();let M=T();for(;M;)M(),M=T()}},y=new s8(x);a.current=y;const F=new ZA,R={providedBeanInstances:{frameworkCompWrapper:new e8(o.current,S),renderStatus:F},modules:b,frameworkOverrides:y,setThemeOnGridDiv:!0},E=T=>{u(T),T.createBean(F),i.current.push(()=>{T.destroy()}),T.getBean("ctrlsSvc").whenReady({addDestroyFunc:M=>{i.current.push(M)}},()=>{if(T.isDestroyed())return;const M=t.current;M&&e.passGridApi?.(M)})},D=T=>{T.getBean("ctrlsSvc").whenReady({addDestroyFunc:M=>{i.current.push(M)}},()=>{for(const M of n.current)M();n.current.length=0,c.current=!0})},P=new h4;S.gridId??(S.gridId=l.current),t.current=P.create(w,S,E,D,R),i.current.push(()=>{t.current=void 0}),t.current&&(l.current=t.current.getGridId())},[]),m=g.useMemo(()=>({height:"100%",...e.containerStyle||{}}),[e.containerStyle]),C=g.useCallback(w=>{c.current&&!a.current?.shouldQueueUpdates()?w():n.current.push(w)},[]);g.useEffect(()=>{const w=JA(r.current,e);r.current=e,C(()=>{t.current&&vy(w,t.current)})},[e]);const v=!g.useSyncExternalStore||ga(e,"renderingMode")==="legacy"?"legacy":"default";return g.createElement("div",{style:m,className:e.className,ref:p},g.createElement(hv.Provider,{value:v},d&&!d.isDestroyed()?g.createElement(YA,{key:d.instanceId,context:d}):null,o.current?.getPortals()??null))};function JA(e,t){const s={};for(const o of Object.keys(t)){if(bv.has(o)){QA.has(o)&&z(274,{prop:o});continue}const i=t[o];e[o]!==i&&(s[o]=i)}return s}var e8=class extends C4{constructor(e,t){super(),this.parent=e,this.gridOptions=t}createWrapper(e,t){const s=this.gridOptions;if(ga(s,"reactiveCustomComponents")){const r=(a=>{switch(a){case"filter":return ga(s,"enableFilterHandlers")?rA:nA;case"floatingFilterComponent":return ga(s,"enableFilterHandlers")?cA:lA;case"dateComponent":return oA;case"dragAndDropImageComponent":return iA;case"loadingOverlayComponent":return uA;case"noRowsOverlayComponent":return gA;case"statusPanel":return pA;case"toolPanel":return fA;case"menuItem":return hA;case"cellRenderer":return sA;case"innerHeaderComponent":return dA}})(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":Ju();break}const i=!t.cellRenderer&&t.name!=="toolPanel";return new mv(e,this.parent,t,i)}},t8=g.forwardRef((e,t)=>{const s=g.useContext(Ct),{registry:o,context:i,gos:n,rowModel:r}=s,[a,l]=g.useState(()=>new es),[c,d]=g.useState(()=>new es),[u,h]=g.useState(),[p,m]=g.useState(),C=g.useRef(),v=g.useRef(null),w=g.useRef(),b=g.useMemo(()=>YS(e.api.getGridId(),u?.rowModelType??"clientSide"),[e]),S=g.useMemo(()=>a.toString()+" ag-details-row",[a]),x=g.useMemo(()=>c.toString()+" ag-details-grid",[c]);t&&g.useImperativeHandle(t,()=>({refresh(){return C.current?.refresh()??!1}})),e.template&&z(230);const y=g.useCallback(R=>{if(v.current=R,!R||i.isDestroyed()){C.current=i.destroyBean(C.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=>m(P),getGui:()=>v.current},D=o.createDynamicBean("detailCellRendererCtrl",!0);if(D&&(i.createBean(D),D.init(E,e),C.current=D,n.get("detailRowAutoHeight"))){const P=()=>{if(v.current==null)return;const T=v.current.clientHeight;T!=null&&T>0&&setTimeout(()=>{e.node.setRowHeight(T),(Qe(n)||zo(n))&&r.onRowHeightChanged()},0)};w.current=Gs(s,R,P),P()}},[]),F=g.useCallback(R=>{C.current?.registerDetailWithMaster(R)},[]);return g.createElement("div",{className:S,ref:y},u&&g.createElement(Sv,{className:x,...u,modules:b,rowData:p,passGridApi:F}))}),s8=class extends Km{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.renderingEngine="react",this.frameworkComponents={agGroupCellRenderer:cp,agGroupRowRenderer:cp,agDetailCellRenderer:t8},this.wrapIncoming=(t,s)=>s==="ensureVisible"?Zk(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 Yk()}},o8=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(Sv,{...this.props,passGridApi:this.setGridApi})}},yv=(e=>(e.Dropdown="dropdown",e.Menu="menu",e))(yv||{}),Ht=(e=>(e.Click="click",e.Hover="hover",e.ContextMenu="contextMenu",e))(Ht||{}),Bi=(e=>(e.Item="item",e.Divider="divider",e.PlainText="plainText",e))(Bi||{});const i8=ue("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),n8=ue("z-[53] overflow-auto rounded bg-layer-0 text-primary shadow focus-visible:outline-none"),r8=ue("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 h-[34px] rounded text-primary"),a8="opacity-75 !cursor-not-allowed",l8="text-error",c8="my-1 border-t border-hover border-secondary",yn=4,eh=({ariaLabel:e,className:t,size:s=24,onClose:o,...i})=>f.jsx(no,{"aria-label":e,className:oe("text-secondary hover:enabled:text-accent-primary",t,"w-auto h-auto"),onClick:o,icon:f.jsx(G.IconX,{size:s}),...i}),Ft=({children:e,menu:t,renderOverlay:s,trigger:o=[Ht.Click],placement:i,disabled:n=!1,open:r,defaultOpen:a=!1,onOpenChange:l,closable:c=!1,onClose:d,className:u,listClassName:h,outsidePressIgnoreRef:p,outsideClosable:m=!0,allowedPlacements:C,anchorToMouse:v=!1,matchReferenceWidth:w=!0,maxDropdownHeight:b})=>{const[S,x]=g.useState(a),y=r!==void 0,F=y?!!r:S,R=g.useRef(null),E=g.useCallback(_=>{y||x(_),l?.(_)},[y,l]),D=g.useId(),P=i===void 0,T=_=>"clientWidth"in _?_.clientWidth:_.getBoundingClientRect?.()?.width??0,{refs:M,floatingStyles:k,context:N}=Ie.useFloating({placement:i,open:F,onOpenChange:E,whileElementsMounted:Ie.autoUpdate,middleware:[Ie.offset({mainAxis:yn,crossAxis:0}),P?Ie.autoPlacement({alignment:"start",crossAxis:!0,padding:yn,allowedPlacements:C}):Ie.flip({padding:yn}),Ie.shift({padding:yn}),Ie.size({padding:yn,apply({availableWidth:_,availableHeight:Fe,elements:ie}){const $=ie.floating,q=T(ie.reference);$.style.setProperty("--fui-available-height",`${Math.floor(Fe)}px`),$.style.setProperty("--reference-width",w?`${Math.round(q)}px`:"0px"),w?$.style.minWidth=`${Math.round(q)}px`:$.style.removeProperty("min-width"),$.style.maxWidth=`${Math.floor(_)}px`;const se=Math.floor(Fe);$.style.maxHeight=`${b?Math.min(se,b):se}px`}})]}),A=Ie.useClick(N,{enabled:o.includes(Ht.Click)&&!n}),W=Ie.useHover(N,{enabled:o.includes(Ht.Hover)&&!n,move:!1,restMs:40,delay:{open:80,close:80}}),U=Ie.useDismiss(N,{bubbles:!0,referencePress:!1,outsidePress:_=>{if(!m)return!1;const Fe=_.target;return!(p?.current&&Fe instanceof Node&&p.current.contains(Fe))}}),L=Ie.useRole(N,{role:"menu"}),{getReferenceProps:de,getFloatingProps:H}=Ie.useInteractions([A,W,U,L]),te=g.useCallback((_,Fe)=>{M.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:_,y:Fe,top:Fe,left:_,right:_,bottom:Fe})})},[M]),Q=g.useCallback(_=>{!o.includes(Ht.ContextMenu)||n||(_.preventDefault(),v&&(te(_.clientX,_.clientY),R.current=document.elementFromPoint(_.clientX,_.clientY)),E(!0))},[v,n,E,te,o]),J=g.useCallback(_=>{!v||n||(o.includes(Ht.ContextMenu)&&F&&E(!1),te(_.clientX,_.clientY),R.current=document.elementFromPoint(_.clientX,_.clientY))},[v,n,te,F,o,E]);g.useEffect(()=>{n&&F&&E(!1)},[n,F,E]);const me=g.useCallback(_=>Fe=>{_.disabled||(_.onClick?.({key:_.key,domEvent:Fe}),t?.onClick?.({key:_.key,domEvent:Fe}),E(!1))},[t,E]),Re=g.useMemo(()=>s?s():t?f.jsxs(f.Fragment,{children:[t.header&&f.jsx(f.Fragment,{children:typeof t.header=="function"?t.header():t.header}),f.jsx("div",{role:"none",className:"py-1","aria-label":"dropdown",children:t.items.map(_=>_.type===Bi.Divider?f.jsx("div",{role:"separator",className:c8},_.key):_.type===Bi.PlainText?f.jsx("div",{className:oe("px-3 py-2 text-secondary dial-caption",_.className),children:_.label},_.key):f.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!_.disabled,className:ue(r8,_.disabled&&a8,_.danger&&l8,_.className),disabled:_.disabled,onClick:me(_),children:[_.icon&&f.jsx("span",{className:ue(_.danger&&"text-error",_.disabled&&"text-secondary"),children:f.jsx($e,{icon:_.icon})}),f.jsx("span",{className:ue("flex-1 truncate text-left",_.danger&&"text-error",_.disabled&&"text-secondary"),"aria-labelledby":"item-text",children:_.label})]},_.key))}),t.footer&&f.jsx(f.Fragment,{children:typeof t.footer=="function"?t.footer():t.footer})]}):null,[me,t,s]),ne=de({onContextMenu:Q,onMouseDown:J});return g.useEffect(()=>{if(!F)return;const _=M.reference.current;let Fe=null;if(_ instanceof Element?Fe=_:R.current instanceof Element&&(Fe=R.current),!Fe)return;const ie=new IntersectionObserver(([$])=>{$.isIntersecting||E(!1)},{root:null,threshold:0});return ie.observe(Fe),()=>ie.disconnect()},[F,M.reference,E]),f.jsxs(f.Fragment,{children:[f.jsx("span",{ref:M.setReference,className:ue(i8,n&&"!cursor-not-allowed opacity-75",u),"aria-haspopup":"menu","aria-expanded":F,"aria-controls":D,...ne,children:e}),F&&f.jsx(Ie.FloatingPortal,{children:f.jsx(Ie.FloatingFocusManager,{context:N,modal:!1,initialFocus:-1,returnFocus:!0,children:f.jsxs("div",{id:D,ref:M.setFloating,style:k,className:ue(n8,!w&&"w-max",h),...H(),children:[c&&f.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:f.jsx(eh,{ariaLabel:"Close dropdown",onClose:_=>{d?.(_),E(!1)}})}),Re]})})})]})},d8="h-full w-full",pp=".ag-checkbox-input",Vc={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))"}},zc=40;var mo=(e=>(e.API="api",e.ROW_DATA_CHANGED="rowDataChanged",e.CHECKBOX_SELECTED="checkboxSelected",e))(mo||{});const u8=(e,t,s,o,i)=>{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:i?1:-1:i?-1:1};var Vn=(e=>(e.MULTIPLE="MULTIPLE",e.SINGLE="SINGLE",e))(Vn||{});const xv="en-US",Rv={year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},h8="text-primary",Wc=40,Fv={minWidth:Wc,width:Wc,maxWidth:Wc},g8={cellClass:"ag-grid-no-checkbox",...Fv},p8={...Fv};function f8(e,t){let s=null;return(...o)=>{s&&clearTimeout(s),s=setTimeout(()=>e(...o),t)}}Kk({testIdAttribute:"dataQA"});Mf.registerModules([jk]);const th=({columnDefs:e,rowData:t,additionalGridOptions:s,getContextMenuItems:o,className:i,ariaLabel:n="Data grid",wrapCustomCellRenderers:r=!0,disabledRowIds:a,selectedRowIds:l,selectionOnHover:c=!0,onSelectionChange:d,onGridApiChange:u,getRowId:h=R=>String(R.id??JSON.stringify(R)),alternateOddRowColors:p=!1,filterPlaceholder:m="Enter value",emptyStateIcon:C,emptyStateTitle:v="No results found",emptyStateDescription:w="Sorry, we couldn't find any results for your search.",loading:b=!1,wrapperBorder:S=!0,withoutHeaderBorders:x=!1,allowDisabledContextMenu:y=!1,selectionMode:F})=>{const[R,E]=g.useState(zc),[D,P]=g.useState(),T=g.useId(),M=g.useRef(new Set),k=g.useRef(void 0),N=g.useMemo(()=>({...Vc,oddRowBackgroundColor:p?Vc.oddRowBackgroundColor:Vc.backgroundColor,wrapperBorder:S}),[p,S]),A=g.useCallback(q=>{q.api.sizeColumnsToFit(),E(zc)},[]),W=g.useCallback(q=>{if(q.data){const se=h(q.data),B=a?.has(se)??!1,pe=B&&!y,le=q.value==null?"":String(q.value),re=o?.(q.data)??[];return f.jsx(Ft,{trigger:[Ht.ContextMenu],menu:{items:re},anchorToMouse:!0,matchReferenceWidth:!0,className:"w-full",disabled:pe,children:f.jsx("span",{className:"block min-w-0 h-full max-w-full",children:f.jsx(ht,{text:le,className:"max-w-full h-full",hideTooltip:B})})})}},[o,a,h,y]),U=g.useCallback(q=>q===mo.API||q===mo.ROW_DATA_CHANGED,[]),L=g.useCallback(q=>{if(!D)return;const B=(q.selectedNodes||[]).map(le=>le.data),pe=new Set(B.map(h));M.current=pe,k.current=q.source,U(q.source)||d?.(pe,B)},[D,h,U,d]),de=g.useMemo(()=>f8(q=>L?.(q),100),[L]),H=g.useCallback(q=>{if(!q.data)return null;const se=h(q.data),B=q.node.isSelected(),pe=a?.has(se),le=`row-select-${se}`;return f.jsx("div",{className:"h-6 w-6 flex items-center justify-center",children:f.jsx(Zd,{className:"w-[18px] h-[18px]",inputId:le,checked:B,disabled:pe,name:"gridradiobutton",value:"selected",onChange:()=>{pe||(q.node.setSelected(!0,!0,mo.CHECKBOX_SELECTED),q.api.refreshCells({columns:[q.column?.getColId()]}))}})})},[h,a]),te=g.useCallback(q=>{const se="dial-row-select",B="dial-row-select-visible";return q?se:`${se} ${B}`},[]),Q=g.useMemo(()=>{if(F===Vn.SINGLE)return{...g8,cellRenderer:H};if(F===Vn.MULTIPLE)return{...p8,headerClass:()=>te(c),cellClass:q=>{const se=q.data?h(q.data):null;let B=te(c);return se&&a?.has(se)&&(B+=" opacity-50 pointer-events-none"),B}}},[a,h,H,F,c,te]),J=g.useCallback(q=>{const se=typeof r=="function"?r(q):!!r;if(!q.cellRenderer)return{...q,cellRenderer:W};if(!se)return q;const B=q.cellRenderer;return{...q,cellRenderer:le=>{const re=le.data?o?.(le.data)??[]:[];let Ce=null;if(typeof B=="function"){const fe=B;Ce=f.jsx(fe,{...le})}else Ce=W(le);const xe=le.data?h(le.data):null,Le=xe?a?.has(xe):!1;return f.jsx(Ft,{trigger:[Ht.ContextMenu],menu:{items:re},anchorToMouse:!0,matchReferenceWidth:!0,className:ue("w-full h-full",Le&&"!cursor-not-allowed opacity-75"),disabled:Le&&!y,children:f.jsx("span",{className:"block min-w-0 max-w-full flex-1",children:Ce})})}}},[a,o,h,W,r,y]),me=g.useMemo(()=>r?(e??[]).map(J):e??[],[e,r,r?J:null]),Re=g.useMemo(()=>({minWidth:150,resizable:!0,sortable:!0,floatingFilter:!0,filter:"agTextColumnFilter",filterParams:{filterPlaceholder:m,buttons:["reset"]},comparator:u8.bind(void 0)}),[m]),ne=q=>{const se=document.querySelector(pp);se&&se.setAttribute("aria-description",od);const B=me.map(pe=>({...pe,sort:void 0}));q.api.updateGridOptions({columnDefs:B,rowData:t}),q.api.sizeColumnsToFit(),P(q.api),s?.onGridReady?.(q),u?.(q.api)};g.useEffect(()=>{D&&D.redrawRows()},[D]);const _=g.useCallback(()=>f.jsx(rr,{title:v,description:w,containerClassName:"gap-3",titleClassName:"mt-2 !text-lg",icon:C||f.jsx(G.IconZoomCancel,{size:100,stroke:.5,className:"text-secondary"})}),[v,w,C]),Fe=g.useMemo(()=>{if(F)return{mode:F===Vn.SINGLE?"singleRow":"multiRow",isRowSelectable:q=>{const se=q.data?h(q.data):null;return se?!a?.has(se):!0}}},[a,h,F]);g.useEffect(()=>{D&&t&&M.current.size&&M.current.forEach(q=>{const se=D.getRowNode(q);se&&!se.isSelected()&&se.setSelected(!0,!1,mo.API)})},[D,t]),g.useEffect(()=>{D&&l&&(D.deselectAll("all",mo.API),l.forEach(q=>{const se=D.getRowNode(q);se&&!se.isSelected()&&se.setSelected(!0,!1,mo.API)}))},[D,l]);const ie=g.useCallback(q=>q.data?h(q.data):"",[h]),$=g.useCallback(()=>{document.querySelectorAll(`.ag-row ${pp}`).forEach(q=>{q.setAttribute("aria-description",od)})},[]);return g.useEffect(()=>{const q=U(k.current);if(D&&l?.size&&q){const se=Array.from(l)[0];if(se){const B=D.getRowNode(se);B&&D.ensureNodeVisible(B)}}},[D,U,l]),f.jsx("div",{className:ue(d8,i,F&&"with-selection-column",x&&"dial-without-header-borders"),"aria-label":n,role:"region","aria-busy":b,children:f.jsx("div",{className:"ag-theme-balham-dark h-full overflow-x-auto",role:"table","aria-describedby":T,children:f.jsx(o8,{rowModelType:"clientSide",headerHeight:zc,rowHeight:R,cellSelection:!1,theme:_3.withPart(y3).withParams({...N}),autoSizeStrategy:{type:"fitGridWidth"},columnDefs:me,defaultColDef:Re,selectionColumnDef:Q,onGridSizeChanged:A,onGridReady:ne,loading:b,suppressCellFocus:!0,suppressDragLeaveHidesColumns:!0,noRowsOverlayComponent:_,rowData:t,rowSelection:Fe,onSelectionChanged:de,getRowId:ie,onRowDataUpdated:$,onBodyScroll:$,onFirstDataRendered:$,...s})})})};var Xa=(e=>(e.Horizontal="horizontal",e.Vertical="vertical",e))(Xa||{}),Qa=(e=>(e.Mobile="mobile",e.Tablet="tablet",e))(Qa||{});const na=({tab:e,active:t,invalid:s,className:o,horizontal:i,onClick:n})=>{const r=oe("rounded h-[38px] items-center flex flex-row border-transparent cursor-pointer dial-small leading-4 hover:text-accent-primary",{"border-b-2 px-4":i,"border-l-2 px-3":!i}),a=oe(r,{"bg-layer-4":i,"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&&i&&!e.disabled,"border-l-accent-primary":t&&!i&&!e.disabled},o);return f.jsxs("button",{role:"tab",className:a,onClick:()=>n(e.id),disabled:e.disabled,children:[f.jsx(ht,{text:e.label,contentClassName:"max-w-[200px]",className:"max-w-[200px]"}),(s||e.invalid)&&f.jsx("div",{className:"text-error pl-1",children:f.jsx(G.IconExclamationCircle,{...Y})}),e.warning&&f.jsx("div",{className:"text-warning pl-1",children:f.jsx(G.IconAlertTriangle,{...Y})})]})},m8=12;var Qs=(e=>(e.Undefined="undefined",e.Mobile="mobile",e.Tablet="tablet",e.Desktop="desktop",e))(Qs||{});const fp=()=>typeof window<"u"&&window.innerWidth<640,_c=()=>{if(typeof window>"u")return Qs.Undefined;const e=window.innerWidth;return e>=1024?Qs.Desktop:e<640?Qs.Mobile:Qs.Tablet},C8=()=>{const[e,t]=g.useState(()=>typeof window>"u"?Qs.Desktop:_c());return g.useEffect(()=>{t(_c());const s=()=>t(_c());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e},Ev=({tabs:e,activeTab:t,onClick:s,orientation:o=Xa.Horizontal,screenThreshold:i=Qa.Tablet,smallScreenContainerClassName:n,smallScreenDropdownItemClassName:r,desktopDropdownClassName:a,desktopTabClassName:l})=>{const[c,d]=g.useState(!1),[u,h]=g.useState(!1),[p,m]=g.useState(!1),C=C8(),v=C===Qs.Mobile||i===Qa.Tablet&&C===Qs.Tablet,w=o===Xa.Horizontal,b=g.useRef(null),S=g.useRef(null),x=g.useRef(null),y=e.find(P=>P.id===t),F=g.useMemo(()=>ue("flex gap-2",w?"flex-row flex-nowrap overflow-x-auto":"flex-col flex-wrap w-full"),[w]),R=g.useCallback(()=>{const P=S.current;P&&m(P.scrollWidth>P.clientWidth)},[]),E=g.useCallback(()=>{const P=x.current,T=S.current;if(!P||!T)return;const M=P.getBoundingClientRect(),k=T.getBoundingClientRect();if(M.width===0||k.width===0)return;const N=m8;let A=T.scrollLeft;if(M.left<k.left+N)A-=k.left+N-M.left;else if(M.right>k.right-N)A+=M.right-(k.right-N);else return;const W=Math.max(0,T.scrollWidth-T.clientWidth);A=Math.max(0,Math.min(A,W)),A!==T.scrollLeft&&T.scrollTo({left:A,behavior:"smooth"})},[]),D=g.useCallback(P=>{s(P),P===t&&E()},[s,t,E]);return g.useEffect(()=>{R();const P=new ResizeObserver(()=>R()),T=S.current;return T&&P.observe(T),()=>P.disconnect()},[e,R]),g.useEffect(()=>{E()},[t,E]),v?f.jsx("div",{role:"tablist",className:oe("h-11 flex items-center bg-layer-3 px-4",n),children:f.jsx(Ft,{trigger:[Ht.Click],open:c,onOpenChange:d,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],renderOverlay:()=>e.map(P=>f.jsx(na,{tab:P,active:P.id===t,onClick:T=>{D(T),d(!1)},className:oe("w-full rounded-none h-11 items-center px-6",r)},P.id)),children:f.jsxs("div",{className:"flex gap-2 items-center h-11 cursor-pointer",children:[f.jsx(na,{tab:y,active:!0,onClick:D,className:"rounded-none bg-transparent border-l-0 border-b-0 h-full items-center px-0"},t),f.jsx($e,{icon:f.jsx(G.IconChevronDown,{size:pt.SM}),className:ue("text-primary transition-transform",c&&"rotate-180")})]})})}):f.jsxs("div",{ref:b,className:"flex w-full items-start",children:[f.jsx("div",{ref:S,role:"tablist",className:F,children:e.map(P=>f.jsx("div",{ref:t===P.id?x:void 0,className:"w-full",children:f.jsx(na,{tab:P,active:t===P.id,onClick:D,horizontal:w,className:oe("w-full",l)})},P.id))}),p&&f.jsx("div",{className:"flex items-center ml-2",children:f.jsx(Ft,{trigger:[Ht.Click],open:u,onOpenChange:h,placement:"bottom-end",renderOverlay:()=>e.map(P=>f.jsx(na,{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:f.jsx(ss,{iconBefore:f.jsx(G.IconDotsVertical,{size:Nt}),className:oe("w-8 h-8 flex items-center justify-center rounded border",u?"bg-layer-4 border-transparent":"border-primary",a)})})})]})},v8="w-full overflow-hidden",w8="flex flex-nowrap items-center gap-2 min-w-0 px-0 py-0 whitespace-nowrap",Dv="flex items-center gap-2 min-w-0 shrink-0 dial-small",b8="basis-[20%] flex-none",S8="flex-1 min-w-0",mp="inline-flex items-center gap-1 min-w-0 transition-colors",y8="text-secondary hover:text-accent-primary",x8="text-primary cursor-default",Pv="flex-none inline-flex items-center leading-none text-secondary",R8="items-center gap-1 min-w-0 transition-colors text-secondary hover:text-accent-primary",Tv=f.jsx(G.IconChevronRight,{size:pt.SM,"aria-hidden":"true"}),Dn=({label:e,href:t,onClick:s,disabled:o,isLast:i,separator:n=Tv,className:r,iconBefore:a,labelClassName:l,onBeforeNavigate:c,...d})=>{const u=async v=>{if(c&&!i&&!await c()){v.preventDefault();return}s&&s(v)},h=oe(Dv,i?S8:b8,r),p=(!!t||!!s)&&!i&&!o,m=p?oe(mp,y8):oe(mp,x8,o?"pointer-events-none opacity-75":""),C=typeof e=="string"?f.jsx(ht,{className:oe("cursor-pointer",l),text:e,id:"breadcrumb-item-content"}):f.jsx("span",{className:oe("flex-1 min-w-0 max-w-full truncate cursor-pointer max-w-[300px]",l),"aria-label":"breadcrumb-item-content",children:e});return f.jsxs("li",{...d,className:h,"aria-label":d["aria-label"]||"breadcrumb-item",children:[p?f.jsxs("a",{href:t,onClick:u,className:m,children:[a,C]}):f.jsxs("span",{className:m,"aria-current":i?"page":void 0,"aria-disabled":o?"true":void 0,children:[a,C]}),!i&&f.jsx("span",{className:Pv,"aria-label":"separator",children:n})]})},Mv=({pathItems:e,separator:t=Tv,ariaLabel:s="Breadcrumb",className:o,children:i,labelClassName:n,onBeforeNavigate:r})=>{const a=g.useMemo(()=>e?.length?e:g.Children.toArray(i).filter(g.isValidElement).map(d=>{const u=d.props,{labelClassName:h,isLast:p,separator:m,...C}=u;return C}),[e,i]),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((C,v)=>g.createElement(Dn,{...C,key:`item-${v}`,isLast:v===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 m=u.map((C,v)=>({key:String(v+1),label:typeof C.label=="string"?C.label:`Item ${v+1}`,disabled:C.disabled}));return f.jsxs(f.Fragment,{children:[g.createElement(Dn,{...d,key:"item-0",separator:t,labelClassName:n,onBeforeNavigate:r}),f.jsxs("li",{className:oe(Dv),children:[f.jsx(Ft,{menu:{items:m,onClick:l},placement:"bottom-start",matchReferenceWidth:!1,children:f.jsx("button",{type:"button","aria-label":"More breadcrumbs",className:R8,children:f.jsx(G.IconDots,{size:pt.SM})})}),f.jsx("span",{className:Pv,children:t})]}),g.createElement(Dn,{...h,key:`item-${a.length-2}`,separator:t,labelClassName:n,onBeforeNavigate:r}),g.createElement(Dn,{...p,key:`item-${a.length-1}`,isLast:!0,separator:t,labelClassName:n,onBeforeNavigate:r})]})},[a,t,n,l,r]);return f.jsx("nav",{"aria-label":s,className:oe(v8,o),children:f.jsx("ol",{className:w8,children:c})})},sh=(e,t)=>({appearance:o,...i})=>f.jsx(ss,{...i,variant:e,appearance:o||t}),Iv=(e,t)=>({variant:o,...i})=>f.jsx(ss,{...i,variant:o||t,appearance:e}),bs=sh(Ge.Primary,Me.Solid),ys=sh(Ge.Neutral,Me.Outlined),kv=sh(Ge.Error,Me.Outlined),F8=Iv(Me.Link,Ge.Primary),E8=Iv(Me.Ghost,Ge.Primary),Yi=(e,t)=>({appearance:o,...i})=>f.jsx(no,{...i,variant:e,appearance:o||t}),D8=(e,t)=>({variant:o,...i})=>f.jsx(no,{...i,variant:o||t,appearance:e}),P8=Yi(Ge.Primary,Me.Solid),T8=Yi(Ge.Neutral,Me.Outlined),Av=Yi(Ge.Error,Me.Outlined),M8=Yi(Ge.Secondary,Me.Ghost),I8=Yi(Ge.Tertiary,Me.Ghost),k8=Yi(Ge.Success,Me.Ghost),A8=D8(Me.Ghost,Ge.Primary),Lv=({iconClassName:e,label:t,...s})=>t?f.jsx(kv,{...s,label:t,appearance:Me.Ghost,iconBefore:f.jsx(G.IconTrashX,{...Y,className:e||""})}):f.jsx(Av,{...s,appearance:Me.Ghost,icon:f.jsx(G.IconTrashX,{...Y,className:e||""})}),L8=({className:e="",value:t,onChange:s,error:o,containerClassName:i,resize:n=!1,labelProps:r,caption:a,id:l,...c})=>{const d=oe("dial-textarea dial-input px-3 py-2",c.invalid&&"dial-input-error",c.disabled&&"dial-input-disable",n?"resize":"resize-none",e);return f.jsxs("div",{className:oe("flex flex-col gap-y-2",i),children:[r&&f.jsx(Bo,{...r,htmlFor:l}),f.jsx("textarea",{id:l,value:t||"",className:d,onChange:u=>s?.(u.currentTarget.value),...c}),f.jsx(ns,{text:o}),!o&&f.jsx(ir,{text:a})]})},oh=({label:e,switchId:t,isOn:s=!1,disabled:o,onChange:i,caption:n})=>{const r=ue("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",o?"pointer-events-none":"",o?s?"bg-controls-disable":"bg-layer-4":s?"bg-accent-primary":"bg-layer-4"),a=g.useCallback(l=>{l.stopPropagation(),i?.(!s)},[i,s]);return f.jsxs("div",{className:"flex flex-row items-start",role:"switch",children:[f.jsx("input",{type:"checkbox",onChange:a,id:t,disabled:o,className:"invisible w-0 h-0",checked:s}),f.jsx("label",{htmlFor:t,className:r,"aria-describedby":n&&"caption",children:f.jsx("span",{className:ue("size-3 rounded-full",o?"bg-controls-disable-accent":"bg-controls-enable-primary")})}),(e||n)&&f.jsxs("div",{className:"flex flex-col gap-1 ml-2",children:[e&&f.jsx("span",{className:ue("dial-small py-[1px]",o?"text-secondary":"text-primary"),"aria-label":"switch-title",children:e}),n&&f.jsx("span",{id:"caption",className:"dial-tiny text-secondary",children:n})]})]})};var Wt=(e=>(e.Sm="sm",e.Md="md",e.Lg="lg",e))(Wt||{});const O8="z-[52] flex items-center justify-center bg-blackout md:p-4",Cp="divide-tertiary divide-y",N8="flex flex-row justify-between py-4 px-6 items-center",H8={[Wt.Sm]:"dial-sm-popup",[Wt.Md]:"dial-md-popup",[Wt.Lg]:"dial-lg-popup"},Uo=({open:e=!1,header:t,portalId:s,className:o,overlayClassName:i,titleClassName:n,headerClassName:r,dividers:a=!0,dividerFooter:l=!0,children:c,footer:d,onClose:u,size:h=Wt.Md,hideClose:p=!1,closeOnOutsideClick:m=!0,preventKeyboardOnOpen:C=!1})=>{const v=g.useRef(null),{refs:w,context:b}=Ie.useFloating({open:e,onOpenChange:E=>{E||u?.(null)}}),S=Ie.useRole(b,{role:"dialog"}),x=Ie.useDismiss(b,{outsidePress:m}),{getFloatingProps:y}=Ie.useInteractions([S,x]);if(!e)return null;const F=typeof t=="string"?"dial-popup-heading":void 0,R=E=>E?typeof E=="string"?f.jsx("h3",{id:F,className:ue("flex-1 min-w-0 mr-3 truncate dial-h3 text-primary",n),children:f.jsx(yt,{tooltip:E,children:E})}):E:f.jsx("span",{});return f.jsx(Ie.FloatingPortal,{id:s,children:f.jsx(Ie.FloatingOverlay,{className:ue(O8,i),children:f.jsx(Ie.FloatingFocusManager,{context:b,initialFocus:C?v:void 0,children:f.jsxs("div",{ref:w.setFloating,...y(),role:"dialog","aria-modal":"true","aria-labelledby":F,className:ue("dial-popup",H8[h],a&&Cp,o),children:[C&&f.jsx("div",{ref:v,tabIndex:-1,"aria-hidden":!0,className:"absolute size-px -m-px overflow-hidden opacity-0 pointer-events-none"}),f.jsxs("div",{className:oe(N8,r),children:[R(t),!p&&f.jsx(eh,{ariaLabel:"Close dialog",onClose:E=>u?.(E)})]}),f.jsx("div",{className:"flex-grow overflow-auto","aria-label":"popup-description",children:c}),l&&f.jsx("div",{className:Cp}),d]})})})})};var Vi=(e=>(e.Info="info",e.Danger="danger",e))(Vi||{});const G8="flex justify-end gap-2 px-6 py-4",B8="text-secondary dial-small-150 px-6 py-4",V8="Cancel",z8="Ok",jc={[Vi.Info]:{confirm:{variant:Ge.Primary,appearance:Me.Solid},cancel:{variant:Ge.Neutral,appearance:Me.Outlined}},[Vi.Danger]:{container:"dial-danger-popup",confirm:{variant:Ge.Error,appearance:Me.Solid},cancel:{variant:Ge.Neutral,appearance:Me.Outlined}}},Ov=({header:e,description:t,descriptionClassName:s,open:o=!1,confirmLabel:i=z8,cancelLabel:n=V8,isLoading:r=!1,disableConfirmButton:a=!1,className:l,confirmClassName:c,onClose:d,onConfirm:u,onCancel:h,children:p,dividers:m=!1,variant:C=Vi.Info,size:v=Wt.Sm,footer:w})=>{const b=r?null:f.jsxs("div",{className:G8,children:[f.jsx(ys,{label:n,onClick:()=>h?h():d?.()}),f.jsx(ss,{variant:jc[C].confirm?.variant,appearance:jc[C].confirm?.appearance,className:c,label:i,disabled:a,onClick:()=>u()})]}),S=g.useCallback(()=>r?f.jsx("div",{className:"px-6 py-4 h-[120px]",children:f.jsx(nr,{size:50})}):p??(t?f.jsx("div",{className:ue(B8,s),children:t}):null),[p,t,r,s]);return f.jsx(Uo,{open:o,header:e,className:ue(jc[C].container,l),dividers:m,onClose:()=>d?.(),footer:w??b,size:v,children:S()})},Nv=({selectedItems:e,listClassName:t,listElementClassName:s,placeholder:o})=>e?.length?f.jsx("ul",{className:ue("flex-row items-center truncate flex-wrap","flex gap-x-2 gap-y-1",t),children:e?.map((i,n)=>f.jsx("li",{children:f.jsx(yt,{tooltip:i,children:f.jsx(vo,{tag:i,className:ue([s])})})},`${i}_${n}`))}):o?f.jsx("span",{className:"text-secondary",children:o}):null,Uc=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"})),Hv=({children:e,open:t,disabled:s=!1,selectedValue:o,valueClassName:i,inputClassName:n,onOpen:r,elementId:a,errorText:l,invalid:c,emptyValueText:d,placeholder:u,editable:h=!1,onValueChange:p})=>{const m=Array.isArray(o)&&o.length>0,C=typeof o=="string"&&!!o.trim(),v=m||C?o:u?void 0:d,w=s?void 0:r,b=g.useCallback(F=>{p?.(F.target.value)},[p]),S=()=>f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:ue("dial-input px-3 py-2 dial-input-field flex flex-row items-center w-full justify-between",n,s&&"dial-input-disable",(l||c)&&"dial-input-error"),children:[f.jsx("input",{type:"text",className:ue("flex-1 min-w-0 bg-transparent outline-none border-none p-0 dial-small-text text-primary placeholder:text-secondary",i),value:typeof o=="string"?o:"",placeholder:u||d,onChange:b,disabled:s,id:a,"aria-label":"input-popup-field"}),!s&&f.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:f.jsx($e,{icon:f.jsx(Uc,{role:"img",width:Nt,height:Nt})})})]}),f.jsx(ns,{text:l})]}),x=()=>f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",className:"w-full",onClick:w,"aria-label":"open-popup",id:a,children:f.jsxs("div",{className:ue("dial-input px-3 py-2 dial-input-field flex flex-row items-center w-full justify-between cursor-pointer",n,s&&"dial-input-disable",(l||c)&&"dial-input-error"),children:[f.jsx(yt,{tooltip:v==null?void 0:String(v),children:v||!u?f.jsx("span",{className:i,children:v}):f.jsx("span",{className:"text-secondary",children:u})}),!s&&f.jsx("div",{className:"flex-shrink-0",children:f.jsx($e,{icon:f.jsx(Uc,{role:"img",width:Nt,height:Nt})})})]})}),f.jsx(ns,{text:l})]}),y=()=>f.jsx("div",{className:"w-full",onClick:w,children:f.jsxs("div",{className:ue("dial-input px-3 py-2 flex flex-row items-center w-full justify-between cursor-pointer",s&&"dial-input-disable"),children:[f.jsx(Nv,{placeholder:u,selectedItems:v}),!s&&f.jsx("div",{className:"ml-1",children:f.jsx($e,{icon:f.jsx(Uc,{role:"img",width:Nt,height:Nt})})})]})});return f.jsxs(f.Fragment,{children:[m?y():h?S():x(),t&&zi.createPortal(e,document.body)]})},W8=({label:e,htmlFor:t,disabled:s,selectedValue:o,radioButtons:i,customInputValue:n,valueClassName:r,inputClassName:a,emptyValueText:l,onClose:c,header:d,portalId:u,onApply:h,onCancel:p,cancelButtonTitle:m="Cancel",applyButtonTitle:C="Apply",isValid:v,selectedRadioValue:w,onChangeRadioField:b,id:S,size:x=Wt.Md})=>{const[y,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 f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsx(Bo,{label:e,htmlFor:t}),f.jsx(Hv,{disabled:s,open:y,selectedValue:n??i.find(T=>T.id===o)?.name,valueClassName:r,inputClassName:ue(a,"py-2","px-3"),emptyValueText:l,onOpen:R,children:f.jsx(Uo,{open:y,onClose:D,header:d,portalId:u,size:x,footer:f.jsxs("div",{className:"flex flex-row items-center justify-end gap-2 px-6 py-4",children:[f.jsx(ys,{label:m,onClick:D}),f.jsx(bs,{label:C,onClick:P,disabled:!v})]}),children:f.jsx("div",{className:"px-6 py-4",children:f.jsx(Fa,{radioButtons:i,labelClassName:"dial-small",activeRadioButton:w,onChange:b,elementId:S,orientation:To.Column})})})})]})},_8="Create",j8="Cancel",U8="flex items-center justify-end gap-2 px-6 py-3",$8=({header:e,open:t=!1,submitLabel:s=_8,cancelLabel:o=j8,isLoading:i=!1,disableSubmitButton:n=!1,className:r,submitClassName:a,onClose:l,onSubmit:c,onCancel:d,children:u,dividers:h=!0,size:p=Wt.Md,footer:m})=>{const C=i?null:f.jsxs("div",{className:U8,children:[f.jsx(ys,{label:o,onClick:()=>d?d():l?.()}),f.jsx(bs,{className:a,label:s,disabled:n,onClick:()=>c()})]}),v=g.useCallback(()=>i?f.jsx("div",{className:"px-6 py-4 h-[120px]",children:f.jsx(nr,{size:50})}):u??null,[u,i]);return f.jsx(Uo,{open:t,header:e,className:r,dividers:h,onClose:()=>l?.(),footer:m??C,size:p,children:v()})},q8=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Tab","Enter","Escape","Home","End","Insert"],K8=(e,t,s,o)=>{if((t==="number"||s!==void 0||o!==void 0)&&!q8.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||o!==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(o!==void 0&&l>+o){e.preventDefault();return}}}}},Y8="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",Z8=({icon:e,onClick:t,disabled:s,size:o=bt.Standard})=>f.jsx("div",{className:ue("border-l border-tertiary",o===bt.Standard?"h-[40px] w-[44px]":"h-[24px] w-[32px]"),children:f.jsx(no,{className:ue(Y8,o===bt.Small&&"p-1"),icon:e,onClick:t,disabled:s,size:o})}),Zi=({labelProps:e,error:t,caption:s,id:o,containerClassName:i,...n})=>f.jsxs("div",{className:oe("flex flex-col gap-y-2",i),children:[e&&f.jsx(Bo,{...e,htmlFor:o}),f.jsx(Gv,{id:o,...n}),f.jsx(ns,{text:t}),!t&&f.jsx(ir,{text:s})]}),Gv=({invalid:e,disabled:t,prefix:s,className:o,postfix:i,iconBefore:n,iconAfter:r,wrapperClassName:a,type:l,inputRef:c,value:d,min:u,onChange:h,max:p,inputButtonProps:m,...C})=>{const v=g.useRef(null),w=Ie.useMergeRefs([c,v]);g.useEffect(()=>{const F=v.current;if(!F)return;const R=E=>{E.preventDefault()};return F.addEventListener("wheel",R,{passive:!1}),()=>{F.removeEventListener("wheel",R)}},[]);const b=l==="number"||u!==void 0||p!==void 0,S=F=>{K8(F,l,u,p)},x=F=>{const R=F.currentTarget.value;if(b&&R!==""){const E=parseFloat(R);if(isNaN(E)&&R!=="-"&&R!=="."||!isNaN(E)&&(u!==void 0&&E<+u||p!==void 0&&E>+p))return}h?.(R||void 0)},y=()=>f.jsxs("div",{className:oe("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",!m&&"pr-3",a),"aria-label":"input-container",children:[s&&f.jsx("div",{className:"border-r border-tertiary",children:f.jsx(Gv,{wrapperClassName:"!rounded-r-none",className:"truncate",value:s,disabled:!0,id:`${s}_textBefore`})}),f.jsx($e,{icon:n}),f.jsx("input",{ref:w,type:l,autoComplete:l==="password"?"new-password":"off",value:d??"",className:oe("border-0 bg-transparent w-full truncate",o),onChange:x,onKeyDown:S,min:u,disabled:t,max:p,...C}),i&&f.jsxs("p",{className:"text-secondary dial-small-text",children:[" ",i]}),f.jsx($e,{icon:r}),m&&f.jsx(Z8,{...m,disabled:t})]});return t&&l!=="password"?f.jsx(yt,{tooltip:d,children:y()}):y()},X8=/^0+\.(\d+)?$/,Q8=/^0+/,J8=({onChange:e,...t})=>{const s=o=>!o||o==="-"?o:String(o)?.match(X8)?String(o)?.replace(Q8,"0"):Number(o);return f.jsx(Zi,{type:"number",onChange:o=>e?.(s(o)),...t})},eL=({onClick:e})=>f.jsx(G.IconEyeOff,{...Y,className:"text-primary",onClick:e,role:"button","aria-label":"hide"}),tL=({onClick:e})=>f.jsx(G.IconEye,{...Y,className:"text-primary",onClick:e,role:"button","aria-label":"show"}),sL=({...e})=>{const[t,s]=g.useState(!1),o=g.useCallback(i=>{s(i)},[]);return f.jsx(Zi,{type:t?"text":"password",...e,iconAfter:e.disabled?null:t?f.jsx(eL,{onClick:()=>o(!1)}):f.jsx(tL,{onClick:()=>o(!0)})})},oL={[bt.Small]:{className:"dial-tiny-text",wrapperClassName:"pl-2 py-0",containerClassName:"h-[24px]",iconSize:16,iconStroke:1},[bt.Standard]:{className:"dial-small-text",wrapperClassName:"",containerClassName:"",iconSize:20,iconStroke:1.5}},ih=({size:e=bt.Standard,placeholder:t="Search...",value:s,onChange:o,...i})=>{const[n,r]=g.useState(s||"");g.useEffect(()=>{r(s||"")},[s]);const a=g.useCallback(u=>{r(u||""),o?.(u||"")},[o]),l=oL[e],c=g.useCallback(()=>{a("")},[a]),d=g.useMemo(()=>{if(n)return{icon:f.jsx(G.IconX,{size:l.iconSize,"aria-label":"Clear search",role:"button"}),onClick:c,size:e}},[c,n,e,l.iconSize]);return f.jsx(Zi,{placeholder:t,iconBefore:f.jsx(G.IconSearch,{size:l.iconSize,stroke:l.iconStroke}),value:n,onChange:a,inputButtonProps:d,containerClassName:l.containerClassName,className:l.className,wrapperClassName:l.wrapperClassName,...i})},$c=8,iL=24,nL=({initialTags:e=[],label:t,required:s,elementId:o,placeholder:i,captionDescription:n,errorText:r,invalid:a,disabled:l,collapseTagOverflow:c=!1,onChange:d})=>{const u=g.useRef(null),h=g.useRef([]),p=g.useRef(null),[m,C]=g.useState(e),[v,w]=g.useState(""),[b,S]=g.useState(!1),[x,y]=g.useState(e.length),F=g.useCallback(k=>N=>{h.current[k]=N},[]),R=g.useCallback(()=>{if(!c)return;const k=u.current;if(!k)return;const N=k.offsetWidth;if(N===0)return;const A=p.current?.offsetWidth??0,W=N-iL-$c;let U=0,L=0;for(let de=0;de<m.length;de++){const H=h.current[de];if(!H)continue;const te=H.offsetWidth+$c;if(U+te>W)break;U+=te,L++}if(L<m.length&&L>0)for(;U+A>W&&L>0;){L--;const de=h.current[L]?.offsetWidth??0;U-=de+$c}y(L)},[c,m]),E=k=>{const N=k.trim().replace(/,$/,"");if(N&&!m.includes(N)){const A=[N,...m];C(A),d?.(A)}},D=k=>{(k.key===","||k.key==="Enter")&&(k.preventDefault(),E(v),w(""))},P=()=>{v.trim()&&(E(v),w(""))},T=k=>{const N=m.filter((A,W)=>W!==k);C(N),d?.(N)},M=()=>r?f.jsx(ns,{text:r}):n?f.jsx(ir,{text:n}):null;return g.useEffect(()=>{if(c)return;const k=new ResizeObserver(()=>{if(u.current){const N=u.current.scrollHeight>u.current.clientHeight+10;S(N)}});return u.current&&k.observe(u.current),()=>k.disconnect()},[m,c]),g.useEffect(()=>{if(!c){y(m.length);return}y(m.length);const k=new ResizeObserver(()=>{R()}),N=u.current;return N&&k.observe(N),R(),()=>k.disconnect()},[c,R,m]),g.useEffect(()=>{C(e)},[JSON.stringify(e)]),f.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f.jsx(Bo,{label:t,required:s,htmlFor:o}),f.jsx("div",{className:ue("dial-input min-h-[38px] p-[6px]",a&&"dial-input-error",l&&"dial-input-disable"),children:f.jsxs("div",{ref:u,className:ue("flex gap-2 items-center relative",c?"flex-nowrap overflow-hidden w-full min-w-0":ue("flex-wrap",b?"flex-col-reverse":"flex-row")),children:[(c?m.slice(0,x):m).map((k,N)=>f.jsx(vo,{tag:k,remove:l?void 0:()=>T(N)},k+N)),c&&x<m.length&&f.jsx(yt,{tooltip:m.slice(x).join(", "),triggerClassName:"inline-flex shrink-0 cursor-pointer",children:f.jsx(vo,{tag:`+${m.length-x}`})}),f.jsx("input",{type:"text",value:v,onChange:k=>w(k.target.value),onKeyDown:D,onBlur:P,className:ue("dial-input outline-none !border-none w-full flex-1 !p-1 !h-auto",c?"min-w-0":"min-w-[100px]"),placeholder:i??"",disabled:l}),c&&f.jsxs("div",{className:"absolute left-0 top-0 invisible pointer-events-none h-0 overflow-hidden whitespace-nowrap","aria-hidden":!0,children:[m.map((k,N)=>f.jsx("div",{ref:F(N),className:"inline-flex shrink-0",children:f.jsx(vo,{tag:k,remove:l?void 0:()=>T(N)})},`measure-${k}-${N}`)),f.jsx("div",{ref:p,className:"inline-flex shrink-0",children:f.jsx(vo,{tag:`+${m.length}`})})]})]})}),M()]})},rL="dial-input flex w-full items-center justify-between gap-2 dial-small cursor-pointer",aL="w-full rounded flex flex-col",qc="flex w-full items-center justify-between gap-2 px-3 h-[34px] dial-small text-primary truncate hover:bg-accent-primary-alpha focus:bg-accent-primary-alpha focus:outline-none",lL="bg-accent-primary-alpha",cL="bg-accent-primary-alpha border-l border-accent-primary border-1",vp="opacity-75",dL=352,uL=f.jsx(G.IconChevronDown,{size:pt.SM}),Bv=({options:e,selectedValues:t,handleRemoveTag:s})=>f.jsx("div",{className:"flex flex-wrap w-full items-center gap-1",children:t.map(o=>{const i=e.find(r=>r.value===o)?.label??o,n=e.find(r=>r.value===o)?.icon;return f.jsx(vo,{tag:i,remove:r=>s?.(r,o),iconBefore:n?f.jsx($e,{icon:n}):null,className:"max-w-full"},o)})});var Ja=(e=>(e.Sm="sm",e.Md="md",e))(Ja||{}),el=(e=>(e.Primary="Primary",e.Secondary="Secondary",e))(el||{});const Vv=({options:e,multiple:t=!1,elementId:s,value:o,defaultValue:i,variant:n=el.Primary,size:r=Ja.Md,prefix:a,customSelectedValue:l,placeholder:c="Select...",searchable:d=!1,searchPlaceholder:u,selectAll:h=!1,invalid:p,selectAllLabel:m="Select all",emptyStateTitle:C="No options available",emptyStateDescription:v,emptyStateIcon:w,disabled:b=!1,className:S,listClassName:x,closable:y=!1,header:F,footer:R,onClose:E,onChange:D,inlineSearch:P=!1,dismissRef:T,onFooterClick:M,open:k,onOpenChange:N,onInlineQueryChange:A})=>{const W=g.useId(),[U,L]=g.useState(!1),de=k!==void 0,H=de?!!k:U,te=g.useCallback(V=>{de||L(V),N?.(V)},[de,N]),[Q,J]=g.useState(P&&l||""),me=g.useRef(null),Re=g.useCallback(V=>{V!==Q&&(J(V||""),A?.(V||""))},[A,Q]),ne=o!==void 0,[_,Fe]=g.useState(i),ie=ne?o:_,$=g.useMemo(()=>t?Array.isArray(ie)?ie:[]:typeof ie=="string"?[ie]:[],[ie,t]),q=g.useMemo(()=>{const V=Q.trim().toLowerCase();return V?e.filter(Ee=>Ee.label.toLowerCase().includes(V)):e},[e,Q]);g.useEffect(()=>{!H&&!P&&Re("")},[P,H,Re]),g.useEffect(()=>{P&&!H&&l&&Re(l||"")},[l,P,H,Re]);const se=g.useCallback(V=>{ne||Fe(V),D?.(V)},[ne,D]),B=g.useCallback(V=>{if(t){const Ee=new Set($);Ee.has(V)?Ee.delete(V):Ee.add(V),se(Array.from(Ee));return}if(se(V),P){const Ee=e.find(At=>At.value===V);Ee&&(Re(Ee.label),A?.(Ee.label))}te(!1)},[t,se,P,te,$,e,Re,A]),pe=g.useCallback((V,Ee)=>{if(V.stopPropagation(),!t){se("");return}const At=$.filter(Xi=>Xi!==Ee);se(At)},[t,$,se]),le=g.useMemo(()=>q.filter(V=>!V.disabled),[q]),re=g.useMemo(()=>le.filter(V=>$.includes(V.value)).length,[le,$]),Ce=V=>{P&&!t&&!V&&B(Q),te(V)},xe=le.length>0&&re===le.length,Le=re>0&&!xe,fe=()=>{if(!(!t||le.length===0))if(xe){const V=new Set(le.map(At=>At.value)),Ee=$.filter(At=>!V.has(At));se(Ee)}else{const V=new Set($);le.forEach(Ee=>V.add(Ee.value)),se(Array.from(V))}},De=$.length>0;g.useEffect(()=>{H&&P&&!t&&!b&&requestAnimationFrame(()=>{const V=me.current;if(!V)return;V.focus();const Ee=V.value?.length??0;V.setSelectionRange?.(Ee,Ee)})},[H,P,t,b]);const ze=!t&&De?$[0]:void 0,Ne=g.useMemo(()=>ze?e.find(V=>V.value===ze):void 0,[e,ze]),Ve=g.useCallback(()=>!t||$.length===0?null:f.jsx(Bv,{options:e,selectedValues:$,handleRemoveTag:pe}),[t,e,$,pe]),kt=g.useCallback(()=>t?De?Ve():f.jsx("span",{className:"text-secondary truncate",children:c}):Ne?f.jsxs(f.Fragment,{children:[Ne.icon&&f.jsx($e,{icon:Ne.icon}),f.jsx(ht,{text:a?`${a} ${Ne.label}`:Ne.label}),Ne?.description&&f.jsx("div",{className:"text-secondary dial-small",children:Ne.description})]}):l&&o?l:f.jsx("span",{className:"text-secondary truncate",children:c}),[De,t,l,a,o,c,Ve,Ne]);g.useImperativeHandle(T,()=>({dismiss:()=>{te(!1)}}));const Et=g.useCallback(()=>{Re($.length===1?Ne?.label??Q:"")},[Q,$.length,Re,Ne?.label]),Ut=g.useCallback(()=>{b||(te(!H),P&&!t&&(Et(),me.current?.focus()))},[b,P,H,t,Et,te]);return f.jsx(Ft,{open:H,onOpenChange:Ce,disabled:b,closable:y,onClose:E,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],maxDropdownHeight:d?null:dL,listClassName:x,renderOverlay:()=>f.jsxs("div",{id:`list-${s||W}`,role:"listbox","aria-multiselectable":t||void 0,className:aL,children:[F&&f.jsx(f.Fragment,{children:typeof F=="function"?F():F}),(d||y)&&e.length>8&&f.jsxs("div",{className:"flex items-center gap-2 px-2 pt-2",children:[d&&f.jsx(ih,{placeholder:u,onChange:Re,value:Q,id:`search-${s||W}`,containerClassName:"w-full"}),y&&f.jsx(ss,{"aria-label":"Close select",className:"shrink-0",iconBefore:f.jsx(G.IconX,{size:pt.SM}),onClick:V=>{E?.(V),te(!1)}})]}),t&&h&&le.length>0&&f.jsx("div",{className:ue(qc,"mt-2"),children:f.jsx(id,{id:`${s||W}-selectAll`,label:m,checked:xe,indeterminate:Le,onChange:fe,ariaLabel:m})}),f.jsx("div",{className:ue("overflow-y-auto max-h-[352px]",P&&q.length===0?"":"py-1"),children:q.length===0?!P&&f.jsx("div",{className:"px-2 py-3",children:f.jsx(rr,{icon:w??f.jsx(G.IconClipboardX,{size:pt.LG,stroke:.5}),title:C,description:v})}):q.map(V=>{const Ee=$.includes(V.value);return t?f.jsxs("div",{role:"option","aria-selected":Ee,"aria-disabled":!!V.disabled,className:ue(qc,Ee&&lL,V.disabled&&vp,"w-full"),children:[f.jsx(id,{id:`${s||W}-${V.value}`,label:f.jsxs("span",{className:"flex w-full flex-1 pl-2 min-w-0 items-center gap-2 text-primary",children:[V.icon&&f.jsx($e,{icon:V.icon}),f.jsx("span",{className:"truncate",children:V.label})]}),checked:Ee,disabled:V.disabled,onChange:()=>!V.disabled&&B(V.value),ariaLabel:V.label}),V.description&&f.jsx("div",{className:"text-secondary dial-small",children:V.description})]},V.value):f.jsx("button",{role:"option",type:"button","aria-selected":Ee,"aria-disabled":!!V.disabled,disabled:V.disabled,className:ue(qc,Ee&&cL,V.disabled&&vp),onClick:()=>!V.disabled&&B(V.value),children:f.jsxs("div",{className:"flex items-center gap-2 w-full",children:[V.icon&&f.jsx($e,{icon:V.icon}),f.jsx(ht,{text:V.label}),V.description&&f.jsx("div",{className:"text-secondary dial-small",children:V.description})]})},V.value)})}),R&&f.jsx("div",{onClick:V=>{M?.(V),M&&te(!1)},children:typeof R=="function"?R():R})]}),children:f.jsxs("div",{role:"button",tabIndex:0,"aria-roledescription":"button to open select list","aria-haspopup":"listbox","aria-expanded":H,"aria-controls":`list-${s||W}`,className:oe(rL,b&&"opacity-75 !cursor-not-allowed",r===Ja.Sm?"min-h-[25px] px-1.5 py-1":"min-h-[38px] px-3 py-2",p&&"dial-input-error",n===el.Secondary?"!bg-layer-4 !h-auto":"",S),onMouseDown:V=>{b||P&&!t&&(Et(),V.preventDefault())},onClick:()=>{Ut()},onKeyDown:V=>{(V.key===" "||V.code==="Space")&&(V.preventDefault(),Ut())},children:[P&&!t?f.jsx("div",{className:"flex min-w-0 items-center gap-2 text-primary flex-1",children:f.jsx("input",{id:`inline-${s||W}`,type:"text",placeholder:u??c,value:Q||"",onChange:V=>Re(V.currentTarget.value.trimStart()),onFocus:()=>!b&&te(!0),onMouseDown:V=>{Et(),V.stopPropagation()},onClick:V=>{V.stopPropagation()},onKeyDown:V=>{V.stopPropagation()},className:"bg-transparent outline-none w-full dial-small",ref:me,disabled:b,"aria-disabled":b,autoComplete:"off"})}):f.jsx("div",{className:"flex w-full min-w-0 items-center gap-2 text-primary",children:kt()}),!P&&f.jsx($e,{icon:uL,className:ue("text-primary",H&&"rotate-180")})]})})},hL=({label:e,required:t,captionDescription:s,containerClassName:o,selectClassName:i,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 f.jsx(Bv,{options:u.options,selectedValues:c});{const p=u.options?.find(m=>m.value===c);return f.jsx("span",{"aria-readonly":!0,className:"text-primary",children:p?.label||c})}},[c,u.options,d]);return f.jsx(Xd,{id:r,label:e,required:t,description:a,error:n,captionDescription:s,className:o,readonly:l,value:h(),defaultEmptyText:d,children:f.jsx(Vv,{className:i,value:c,elementId:r,invalid:!!n,...u})})};function zv(e){let t=null;return()=>(t==null&&(t=e()),t)}function gL(e,t){return e.filter(s=>s!==t)}function pL(e,t){const s=new Set,o=n=>s.add(n);e.forEach(o),t.forEach(o);const i=[];return s.forEach(n=>i.push(n)),i}class fL{enter(t){const s=this.entered.length,o=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(t));return this.entered=pL(this.entered.filter(o),[t]),s===0&&this.entered.length>0}leave(t){const s=this.entered.length;return this.entered=gL(this.entered.filter(this.isNodeInDocument),t),s>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class mL{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(o=>{const i=this.config.exposeProperties[o];i!=null&&(s[o]={value:i(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 nh="__NATIVE_FILE__",Wv="__NATIVE_URL__",_v="__NATIVE_TEXT__",jv="__NATIVE_HTML__",wp=Object.freeze(Object.defineProperty({__proto__:null,FILE:nh,HTML:jv,TEXT:_v,URL:Wv},Symbol.toStringTag,{value:"Module"}));function Kc(e,t,s){const o=t.reduce((i,n)=>i||e.getData(n),"");return o??s}const jd={[nh]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[jv]:{exposeProperties:{html:(e,t)=>Kc(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Wv]:{exposeProperties:{urls:(e,t)=>Kc(e,t,"").split(`
|
|
62
62
|
`),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[_v]:{exposeProperties:{text:(e,t)=>Kc(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function CL(e,t){const s=jd[e];if(!s)throw new Error(`native type ${e} has no configuration`);const o=new mL(s);return o.loadDataTransfer(t),o}function Yc(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(jd).filter(s=>{const o=jd[s];return o?.matchesTypes?o.matchesTypes.some(i=>t.indexOf(i)>-1):!1})[0]||null}const vL=zv(()=>/firefox/i.test(navigator.userAgent)),Uv=zv(()=>!!window.safari);class bp{interpolate(t){const{xs:s,ys:o,c1s:i,c2s:n,c3s:r}=this;let a=s.length-1;if(t===s[a])return o[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 o[d]}a=Math.max(0,c);const u=t-s[a],h=u*u;return o[a]+i[a]*u+n[a]*h+r[a]*u*h}constructor(t,s){const{length:o}=t,i=[];for(let p=0;p<o;p++)i.push(p);i.sort((p,m)=>t[p]<t[m]?-1:1);const n=[],r=[];let a,l;for(let p=0;p<o-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 m=r[p],C=r[p+1];if(m*C<=0)c.push(0);else{a=n[p];const v=n[p+1],w=a+v;c.push(3*w/((w+v)/m+(w+a)/C))}}c.push(r[r.length-1]);const d=[],u=[];let h;for(let p=0;p<c.length-1;p++){h=r[p];const m=c[p],C=1/n[p],v=m+c[p+1]-h-h;d.push((h-m-v)*C),u.push(v*C*C)}this.xs=t,this.ys=s,this.c1s=c,this.c2s=d,this.c3s=u}}const wL=1;function $v(e){const t=e.nodeType===wL?e:e.parentElement;if(!t)return null;const{top:s,left:o}=t.getBoundingClientRect();return{x:o,y:s}}function ra(e){return{x:e.clientX,y:e.clientY}}function bL(e){var t;return e.nodeName==="IMG"&&(vL()||!(!((t=document.documentElement)===null||t===void 0)&&t.contains(e)))}function SL(e,t,s,o){let i=e?t.width:s,n=e?t.height:o;return Uv()&&e&&(n/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:n}}function yL(e,t,s,o,i){const n=bL(t),a=$v(n?e:t),l={x:s.x-a.x,y:s.y-a.y},{offsetWidth:c,offsetHeight:d}=e,{anchorX:u,anchorY:h}=o,{dragPreviewWidth:p,dragPreviewHeight:m}=SL(n,t,c,d),C=()=>{let F=new bp([0,.5,1],[l.y,l.y/d*m,l.y+m-d]).interpolate(h);return Uv()&&n&&(F+=(window.devicePixelRatio-1)*m),F},v=()=>new bp([0,.5,1],[l.x,l.x/c*p,l.x+p-c]).interpolate(u),{offsetX:w,offsetY:b}=i,S=w===0||w,x=b===0||b;return{x:S?w:v(),y:x?b:C()}}class xL{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 RL(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Sp(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},o=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),o.forEach(function(i){RL(e,i,s[i])})}return e}class FL{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,o){return this.sourcePreviewNodeOptions.set(t,o),this.sourcePreviewNodes.set(t,s),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,s,o){this.sourceNodes.set(t,s),this.sourceNodeOptions.set(t,o);const i=r=>this.handleDragStart(r,t),n=r=>this.handleSelectStart(r);return s.setAttribute("draggable","true"),s.addEventListener("dragstart",i),s.addEventListener("selectstart",n),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),s.removeEventListener("dragstart",i),s.removeEventListener("selectstart",n),s.setAttribute("draggable","false")}}connectDropTarget(t,s){const o=r=>this.handleDragEnter(r,t),i=r=>this.handleDragOver(r,t),n=r=>this.handleDrop(r,t);return s.addEventListener("dragenter",o),s.addEventListener("dragover",i),s.addEventListener("drop",n),()=>{s.removeEventListener("dragenter",o),s.removeEventListener("dragover",i),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 Sp({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 Sp({anchorX:.5,anchorY:.5,captureDraggingState:!1},s||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(wp).some(s=>wp[s]===t)}beginDragNativeItem(t,s){this.clearCurrentDragSourceNode(),this.currentNativeSource=CL(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 o;return(o=this.rootElement)===null||o===void 0?void 0:o.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,o){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=i=>{const n=this.sourceNodes.get(i);return n&&$v(n)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{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=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:n}=this;this.dragStartSourceIds=null;const r=ra(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(n||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});const{dataTransfer:a}=i,l=Yc(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:m,offsetX:C,offsetY:v}=this.getCurrentSourcePreviewNodeOptions(),S=yL(u,h,r,{anchorX:p,anchorY:m},{offsetX:C,offsetY:v});a.setDragImage(h,S.x,S.y)}}try{a?.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.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&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var n;(n=this.currentNativeSource)===null||n===void 0||n.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:a}=i,l=Yc(a);l&&this.beginDragNativeItem(l,a)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:n}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,n.length>0&&this.actions.hover(n,{clientOffset:ra(i)}),n.some(a=>this.monitor.canDropOnTarget(a))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var n;(n=this.currentNativeSource)===null||n===void 0||n.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:n}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=ra(i),this.scheduleHover(n),(n||[]).some(a=>this.monitor.canDropOnTarget(a))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var n;i.preventDefault(),(n=this.currentNativeSource)===null||n===void 0||n.loadDataTransfer(i.dataTransfer)}else Yc(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:n}=this;this.dropTargetIds=[],this.actions.hover(n,{clientOffset:ra(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const n=i.target;typeof n.dragDrop=="function"&&(n.tagName==="INPUT"||n.tagName==="SELECT"||n.tagName==="TEXTAREA"||n.isContentEditable||(i.preventDefault(),n.dragDrop()))},this.options=new xL(s,o),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new fL(this.isNodeInDocument)}}const EL=function(t,s,o){return new FL(t,s,o)},DL=({onChange:e,emptyTextFirstLine:t,emptyTextSecondLine:s,emptyButtonLabel:o,acceptTypes:i,maxFilesCount:n,multiple:r,fileFormatError:a,fileCountError:l,fileSizeError:c,getIsFileFormatError:d,getIsFileSizeError:u})=>{const h=g.useRef(null),p=g.useRef(null),[m,C]=g.useState([]),[v,w]=g.useState(!1),[b,S]=g.useState(!1),x=g.useCallback(W=>{const U=W.target.files;if(U&&U.length>0){const L=Array.from(U),de=d?.(L),H=u?.(L);de?w(!0):H?S(!0):e(L)}},[d,u,e]),y=g.useCallback(W=>n&&W?.length>n,[n]),F=g.useMemo(()=>v||b||y(m),[v,b,y,m]),R=()=>{C([]),w(!1),S(!1)},E=g.useMemo(()=>v?f.jsx(ns,{text:a}):b?f.jsx(ns,{text:c}):y(m)?f.jsx(ns,{text:l}):null,[l,a,c,m,y,v,b]);g.useEffect(()=>{R()},[i]);const[{isOver:D,canDrop:P},T]=tf(()=>({accept:[nh],drop(W){const U=W.files;!d?.(U)&&!u?.(U)&&!y(U)&&e(U),R()},collect:W=>({isOver:W.isOver(),canDrop:W.canDrop()})}),[x]),M=W=>{(W.key==="Enter"||W.key==="Space")&&(W.preventDefault(),p.current?.click())},k=W=>{W?.preventDefault();const U=Array.from(W.dataTransfer?.items??[]);w(!!d?.(U)),S(!!u?.(U)),C(U)},N=W=>{W.target===W.currentTarget&&R()},A=ue("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),f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:A,ref:h,onDragOver:k,onDragLeave:N,children:[f.jsxs("label",{htmlFor:"file",tabIndex:0,onKeyDown:M,className:"flex flex-col items-center cursor-pointer h-full w-full text-secondary dial-tiny justify-center",children:[t&&f.jsx("p",{className:"mb-1",children:t}),s&&f.jsx("p",{className:"mb-0.5",children:s}),o&&f.jsx(bs,{appearance:Me.Ghost,label:o,onClick:()=>p.current?.click()})]}),f.jsx("input",{multiple:r,id:"file",type:"file",ref:p,hidden:!0,accept:i,onChange:x})]}),f.jsx(f.Fragment,{children:E})]})},PL=({iconBefore:e,className:t,error:s,...o})=>{const i=o.invalid,n=()=>f.jsx("div",{className:"mr-2",children:i?f.jsx(G.IconExclamationCircle,{...Y,className:"text-error"}):e});return f.jsx(Zi,{...o,iconBefore:n(),containerClassName:"h-[40px] p-0",className:ue("rounded-r-none border-r-0",i&&"text-error",t)})},qv=e=>{const{files:t,iconBeforeInput:s,dynamicIcon:o,onChange:i,isInvalid:n,errorText:r,removeButtonAriaLabel:a,getIsMultiFilesSizeError:l,multiFilesSizeError:c}=e,d=(p,m)=>{p.stopPropagation(),i(t?.filter(C=>C.name!==m)||[])},u=p=>f.jsx(Lv,{"aria-label":a,onClick:m=>d(m,p)}),h=p=>{i(p)};return!t||t.length===0?f.jsx(e0,{backend:EL,children:f.jsx(DL,{...e,onChange:h})}):f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"flex-1 min-h-0 border border-solid border-primary rounded p-2 overflow-y-auto",children:t&&t.length>0&&f.jsx("div",{className:"flex flex-col gap-y-1",children:t.map((p,m)=>f.jsx(PL,{id:p.name,value:p.name,iconAfter:u(p.name),iconBefore:s||o?.(p.name),invalid:n?.(p),error:r},p.name+m))})}),l?.(t)&&f.jsx(ns,{text:c})]})},TL=({onChange:e,fieldTitle:t,elementId:s,files:o,maxFilesCount:i,maxFileSize:n,maxMultiFilesSize:r,fileFormatError:a,fileCountError:l,fileSizeError:c,multiFilesSizeError:d,multiple:u=!0,acceptTypes:h,deleteAllButtonLabel:p,addButtonLabel:m,additionalActionButtons:C,...v})=>{const w=g.useRef(null),b=()=>w.current?.click(),S=()=>{e([])},x=g.useCallback(E=>E?.some(D=>!(h==="/"||h?.toLowerCase()?.includes(D?.type?.toLowerCase()))),[h]),y=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=x(P),M=y(P);!T&&!M&&e([...o||[],...P])}},[x,y,e,o]);return f.jsxs("div",{className:"h-full flex flex-col",children:[f.jsxs("div",{className:"flex justify-between items-center pb-1 min-h-[42px]",children:[f.jsx(Bo,{label:`${t}: ${u?o?.length||0:""}`,htmlFor:s}),u&&!!o?.length&&f.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[f.jsx(ys,{label:p,iconBefore:f.jsx(G.IconTrashX,{...Y}),onClick:S}),(i?i>o?.length:!0)&&f.jsx(bs,{appearance:Me.Ghost,iconBefore:f.jsx(G.IconPlus,{...Y}),label:m,onClick:b}),C]})]}),o&&o.length>0&&f.jsx("input",{id:"file",type:"file",multiple:u,ref:w,hidden:!0,accept:h,onChange:R}),f.jsx(qv,{files:o,onChange:e,acceptTypes:h,maxFilesCount:i,multiple:u,fileFormatError:a,fileCountError:l,fileSizeError:c,multiFilesSizeError:d,getIsFileFormatError:x,getIsFileSizeError:y,getIsMultiFilesSizeError:F,...v})]})},ML=f.jsx(G.IconChevronDown,{size:pt.SM}),IL=f.jsx(G.IconChevronUp,{size:pt.SM}),Ud=({variant:e,appearance:t,items:s,...o})=>{const[i,n]=g.useState(!1),r=g.useMemo(()=>i?IL:ML,[i]);return f.jsx("div",{children:f.jsx(Ft,{menu:{items:s},onOpenChange:a=>n(a),children:f.jsx(ss,{...o,iconAfter:r,variant:e||Ge.Primary,appearance:t||Me.Solid})})})},Kv=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"})),Yv=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"})),rh=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"})),ah=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"})),lh=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 wi=(e=>(e.MyFiles="my_files",e.Shared="shared",e.Organization="organization",e.Review="review",e))(wi||{}),K=(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))(K||{}),nt=(e=>(e.Replace="replace",e.Duplicate="duplicate",e.Cancel="cancel",e))(nt||{}),Ot=(e=>(e.ReplaceAll="replaceAll",e.DuplicateAll="duplicateAll",e.DecideForEach="decideForEach",e))(Ot||{}),rt=(e=>(e.Copy="copy",e.Move="move",e))(rt||{}),Ii=(e=>(e.Tree="tree",e.Grid="grid",e))(Ii||{}),at=(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))(at||{});const kL="w-full h-full grid grid-rows-[auto_1fr] gap-5 p-6 overflow-hidden min-w-0 bg-layer-1",yp="w-full text-secondary flex items-center gap-2",AL="flex min-h-0 min-w-0 h-full gap-4 overflow-hidden",LL="flex flex-col flex-1 min-h-0 min-w-0 h-full gap-4",OL="h-full rounded bg-layer-3 text-secondary min-w-0",NL="flex-1 w-full rounded text-secondary overflow-auto min-h-0 min-w-0",HL="opacity-0 pointer-events-none group-hover/grid-row:opacity-100 group-hover/grid-row:pointer-events-auto",GL=280,BL="Files",Js=20,VL="Files",Zc=".dial_folder",zL=280,WL=460,Xc=44,_L=56,jL=800,UL=[at.Name,at.UpdatedAt,at.Size,at.Author,at.Actions];var be=(e=>(e.ITEM="item",e.FOLDER="folder",e))(be||{}),ch=(e=>(e.FILE="FILE",e.PROMPT="PROMPT",e.CONVERSATION="CONVERSATION",e.APPLICATION="APPLICATION",e.TOOLSET="TOOL_SET",e))(ch||{}),$o=(e=>(e.READ="READ",e.WRITE="WRITE",e.SHARE="SHARE",e))($o||{});const xp=({open:e,onClose:t,onReplace:s,onDuplicate:o,onDecideForEach:i,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:m="Action"})=>{const C=n.length===1,v=C?n[0]?.name:"",w=c?.[nt.Replace]??"Replace",b=c?.[nt.Duplicate]??"Duplicate",S=c?.[nt.Cancel]??"Cancel",x=d?.[Ot.ReplaceAll]??"Replace all",y=d?.[Ot.DuplicateAll]??"Duplicate all",F=d?.[Ot.DecideForEach]??"Decide for each",[R,E]=g.useState(nt.Replace),[D,P]=g.useState(Ot.ReplaceAll),[T,M]=g.useState(new Map(n.map(ne=>[ne.path,nt.Replace]))),[k,N]=g.useState(void 0),A=C?r:a,W=f.jsxs(f.Fragment,{children:["Item with the name ",f.jsxs("span",{className:"text-primary",children:['"',v,'"']})," ","already exists in this destination."]}),U=`${n.length} items with the same names already exist in this destination.`,L=l??(C?W:U),de=g.useMemo(()=>[{id:nt.Replace,name:w},{id:nt.Duplicate,name:b}],[w,b]),H=g.useMemo(()=>n.map(ne=>({id:ne.path,name:ne.name,path:ne.path,nodeType:ne.nodeType??be.ITEM,action:T.get(ne.path)||nt.Replace})),[n,T]),te=g.useMemo(()=>[{field:"name",headerName:p,flex:1,minWidth:200,floatingFilter:!1,filter:!1,resizable:!1,cellRenderer:ne=>ne.data?.nodeType===be.FOLDER?f.jsx(cl,{name:ne.data.name,iconSize:Js}):f.jsx(ll,{name:ne.data.name,iconSize:Js})},{field:"action",headerName:m,width:140,suppressSizeToFit:!0,sortable:!1,filter:!1,floatingFilter:!1,resizable:!1,cellRenderer:ne=>{if(!ne.data)return null;const _=[{key:nt.Replace,label:w,icon:f.jsx(G.IconCircleFilled,{size:10,className:"text-accent-tertiary"})},{key:nt.Duplicate,label:b,icon:f.jsx(G.IconCircleFilled,{size:10,className:"text-accent-secondary"})},{key:nt.Cancel,label:S,icon:f.jsx(G.IconCircleFilled,{size:10,className:"text-error"})}],Fe=_.find($=>$.key===ne.data.action),ie=k===ne.data.path;return f.jsx("div",{className:"flex items-center h-full",children:f.jsx(Ft,{trigger:[Ht.Click],open:ie,menu:{items:_,onClick:({key:$})=>{M(q=>{const se=new Map(q);return se.set(ne.data.path,$),se}),N(void 0)}},placement:"bottom-start",matchReferenceWidth:!1,allowedPlacements:["bottom-start","top-start"],onOpenChange:$=>{N($?ne.data.path:void 0)},children:f.jsxs("button",{type:"button",className:"flex items-center gap-2",children:[f.jsxs("span",{className:"flex items-center gap-2",children:[Fe?.icon,Fe?.label??w]}),f.jsx(G.IconChevronDown,{size:pt.SM,className:ue("text-secondary transition-transform",ie&&"rotate-180")})]})})})}}],[p,m,w,b,S,k]),Q=g.useMemo(()=>[{id:Ot.ReplaceAll,name:x},{id:Ot.DuplicateAll,name:y},{id:Ot.DecideForEach,name:F,content:D===Ot.DecideForEach?f.jsx("div",{className:"mt-4",children:f.jsx(th,{columnDefs:te,rowData:H,getRowId:ne=>ne.id,wrapCustomCellRenderers:!1,alternateOddRowColors:!1,additionalGridOptions:{domLayout:"autoHeight"}})}):void 0}],[x,y,F,D,te,H]),J=g.useCallback(()=>{E(nt.Replace),P(Ot.ReplaceAll),M(new Map(n.map(ne=>[ne.path,nt.Replace])))},[n]),me=g.useCallback(()=>{J(),t()},[J,t]),Re=g.useCallback(()=>{if(J(),C)R===nt.Replace?s():o();else if(D===Ot.ReplaceAll)s();else if(D===Ot.DuplicateAll)o();else if(D===Ot.DecideForEach&&i){const ne=n.map(_=>({file:_,action:T.get(_.path)||nt.Replace}));i(ne)}},[J,C,R,s,o,D,i,n,T]);return f.jsx(Uo,{open:e,onClose:me,size:C?Wt.Sm:Wt.Md,className:ue([!C&&"w-[600px]"]),header:A,dividers:!1,preventKeyboardOnOpen:!0,footer:f.jsxs("div",{className:"flex justify-end gap-3 py-4 px-6 border-t border-tertiary",children:[f.jsx(ys,{onClick:me,label:h}),f.jsx(bs,{onClick:Re,label:u})]}),children:f.jsxs("div",{className:"px-6 py-4",children:[f.jsx("p",{className:"text-secondary mb-4 break-words",children:L}),C?f.jsx(Fa,{elementId:"single-file-conflict",radioButtons:de,activeRadioButton:R,orientation:To.Column,onChange:ne=>E(ne)}):f.jsx(Fa,{elementId:"multiple-files-conflict",radioButtons:Q,activeRadioButton:D,orientation:To.Column,onChange:ne=>P(ne),formItemChildrenClassName:"gap-3"})]})})},$L=({getContextMenuItems:e,isRowDisabled:t,allowedFileTypes:s,maxSelectableFileSize:o,buttonClassName:i})=>{const n=g.useRef(e);g.useEffect(()=>{n.current=e},[e]);const r=g.useCallback(l=>{if(!l.data||t(l.data,s,o))return null;const d=l.data?n.current?.(l.data)??[]:[];return d.length?f.jsx(Ft,{placement:"bottom-start",allowedPlacements:["top-start","top-end","bottom-start"],menu:{items:d},className:oe("sticky right-0",i),children:f.jsx($e,{className:"text-secondary mx-2 flex flex-row gap-2 hover:text-accent-primary cursor-default",icon:f.jsx(G.IconDotsVertical,{...Y})})}):null},[s,o,i,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])}},qL=({onRename:e})=>{const[t,s]=g.useState(Ii.Grid),o=g.useCallback(n=>{e(n),s(Ii.Grid)},[e]),i=g.useCallback(n=>{e(n),s(Ii.Tree)},[e]);return{renameTriggerView:t,onGridRename:o,onTreeRename:i}};function KL(e,t){const s=g.useRef(null),[o,i]=g.useState(!1);return g.useEffect(()=>{if(!s.current)return;const n=new ResizeObserver(([r])=>{const a=r.contentRect.width;i(a<e)});return n.observe(t?.current||s?.current),()=>n.disconnect()},[e,t]),{containerRef:s,isBelowBreakpoint:o}}const Go=(e,t)=>{if(!(!e||!e.length||!t))for(const s of e){if(s.path===t)return s;const o=Go(s.items,t);if(o)return o}},Rp=(e,t)=>{if(!e?.length)return;if(!t)return e[0];const s=Go(e,t);if(s&&s.nodeType===be.FOLDER)return s;const o=t.split("/").filter(Boolean);if(o.length<=1)return e[0];const i="/"+o.slice(0,o.length-1).join("/");return Go(e,i)??e[0]},ki=e=>(e??"").toLowerCase(),YL=e=>ki(e).replace(/^\./,""),ZL=e=>{if(!e)return[];const t=[],s=o=>{const i=o.items??[];for(const n of i)t.push(n),n.nodeType===be.FOLDER&&s(n)};return s(e),t},Zv=e=>(e.name??e.path.split("/").pop()??"").startsWith("."),or=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`},XL=(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 Xv(e,t,s){if(!e||e.includes("*/*"))return!0;const o=t.toLowerCase(),i=s&&s.includes(".")?`.${s.split(".").at(-1).toLowerCase()}`:void 0;return e.some(n=>{const r=n.toLowerCase();if(r.startsWith("."))return i===r;if(r.endsWith("/*")){const a=r.slice(0,-1);return o.startsWith(a)}return o===r})}const QL=e=>e?.join(", ")??"",Sl=e=>{if(!e)return;const t=e.flags.replace(/[gy]/g,"");return new RegExp(e.source,t)};function dh(e,t,s){if(t&&Sl(t)?.test(e.name))return s??`This ${e.isFolder?"folder":"file"} contains forbidden characters in its name. Please rename it.`}const JL=(e,t,s,o,i)=>{if(e.nodeType===be.FOLDER)return;const n=!e.contentLength||s==null||e.contentLength<=s;if(!(!e.contentType||Xv(t,e.contentType,e.name)))return o??(t?.length?`Unsupported file type. Supported types: ${QL(t)}.`:"Unsupported file type.");if(!n)return i??`File is too large. Maximum size: ${or(s)}.`},e7=e=>{const[t,s]=g.useState(e?.showHiddenFiles??!1),o=!!e?.onShowHiddenFilesChange,i=o?e.showHiddenFiles??!1:t,n=g.useCallback(a=>{o?e?.onShowHiddenFilesChange?.(a):s(a)},[o,e]),r=g.useCallback(()=>{const a=!i;o?e?.onShowHiddenFilesChange?.(a):s(a)},[i,o,e]);return{areHiddenFilesVisible:i,toggleHiddenFilesVisibility:r,setAreHiddenFilesVisible:n}},t7=e=>{const[t,s]=g.useState(e?.collapsed??!1),o=!!e?.onCollapseChange,i=o?e.collapsed??!1:t,n=g.useCallback(a=>{o?e?.onCollapseChange?.(a):s(a)},[o,e]),r=g.useCallback(()=>{const a=!i;o?e?.onCollapseChange?.(a):s(a)},[i,o,e]);return{isTreeCollapsed:i,toggleTreeCollapse:r,setIsTreeCollapsed:n}},Fp=(e,t,s)=>{if(!t.has(e))return e;const o=s===be.FOLDER?(i,n)=>`${i} (${n})`:(i,n)=>{const r=i.lastIndexOf("."),a=r>0,l=a?i.slice(0,r):i,c=a?i.slice(r):"";return`${l} (${n})${c}`};for(let i=1;;i++){const n=o(e,i);if(!t.has(n))return n}},Qc=e=>e.name,Qv=({getDestinationFiles:e,onResolve:t})=>{const[s,o]=g.useState([]),[i,n]=g.useState(!1),[r,a]=g.useState(null),l=g.useRef(!1),c=g.useCallback(S=>{l.current=!0,o(S),n(!0)},[]),d=g.useCallback(()=>{l.current=!1,n(!1),o([]),a(null)},[]),u=g.useCallback((S,x)=>{const y=e(S),F=new Set(y.map(Qc)),R=x.filter(E=>F.has(E.name));return{hasConflicts:R.length>0,conflicts:R}},[e]),h=g.useCallback((S,x,y,F)=>{const R=e(S),E=new Set(R.map(Qc));return x.map(D=>{const P=D.name,T=E.has(P),M=y&&T?P:Fp(P,E,D.nodeType);return(!y||!T)&&E.add(M),{sourceUrl:D.path,destinationUrl:`${S}/${M}`,overwrite:y&&T,nodeType:D.nodeType??be.ITEM,...F??{}}})},[e]),p=g.useCallback((S,x,y,F)=>{const R=e(S),E=new Set(R.map(Qc));return x.filter(P=>y.get(P.path)!==nt.Cancel).map(P=>{const T=y.get(P.path),M=E.has(P.name),k=T===nt.Replace&&M,N=k?P.name:Fp(P.name,E,P.nodeType);return k||E.add(N),{sourceUrl:P.path,destinationUrl:`${S}/${N}`,overwrite:k,nodeType:P.nodeType??be.ITEM,...F??{}}})},[e]),m=g.useCallback((S,x,y)=>{const F=u(S,x);return F.hasConflicts&&(a({files:x,destinationFolder:S,metadata:y}),c(F.conflicts)),F},[u,c]),C=g.useCallback(()=>{if(!r)return;const{files:S,destinationFolder:x,metadata:y}=r,F=h(x,S,!0,y);t?.(F,x),d()},[r,h,t,d]),v=g.useCallback(()=>{if(!r)return;const{files:S,destinationFolder:x,metadata:y}=r,F=h(x,S,!1,y);t?.(F,x),d()},[r,h,t,d]),w=g.useCallback(()=>{if(!r)return;const{files:S,destinationFolder:x,metadata:y}=r,F=p(x,S,new Map(s.map(R=>[R.path,nt.Cancel])),y);t?.(F,x),d()},[d,s,t,r,p]),b=g.useCallback(S=>{if(!r)return;const{files:x,destinationFolder:y,metadata:F}=r,R=new Map(S.map(D=>[D.file.path,D.action])),E=p(y,x,R,F);t?.(E,y),d()},[r,p,t,d]);return{conflictingFiles:s,conflictResolutionOpen:i,hasActiveConflictRef:l,checkForConflicts:u,startConflictResolution:m,resolveConflictsWithStrategy:h,resolveConflictsWithDecisions:p,openConflictResolution:c,closeConflictResolution:d,handleReplaceAll:C,handleDuplicateAll:v,handleCancelAll:w,handleDecideForEach:b}},s7=({getDestinationFiles:e,onCopyFiles:t,onMoveToFiles:s,onCopySuccess:o,onMoveSuccess:i,onDuplicateSuccess:n,getCopyHeader:r,getMoveHeader:a})=>{const[l,c]=g.useState(!1),[d,u]=g.useState([]),[h,p]=g.useState([]),[m,C]=g.useState(rt.Copy),[v,w]=g.useState(),[b,S]=g.useState(null),{conflictingFiles:x,conflictResolutionOpen:y,hasActiveConflictRef:F,startConflictResolution:R,resolveConflictsWithStrategy:E,closeConflictResolution:D,openConflictResolution:P,handleReplaceAll:T,handleDuplicateAll:M,handleCancelAll:k,handleDecideForEach:N}=Qv({getDestinationFiles:e,onResolve:(ie,$)=>{b?.type===rt.Copy?(t?.(ie,$),o?.()):b?.type===rt.Move&&b.sourceFolder&&(s?.(ie,b.sourceFolder,$),i?.())}}),A=g.useCallback(()=>{u([]),p([]),S(null),w(void 0)},[]),W=g.useCallback(ie=>{const $=R(ie,d,{type:rt.Copy});if(S({type:rt.Copy}),!$.hasConflicts){const q=E(ie,d,!1);t?.(q,ie),o?.(),A()}},[d,R,E,t,o,A]),U=g.useCallback((ie,$)=>{const q=$||(b?.sourceFolder??"/");if(!R(ie,h,{type:rt.Move,sourceFolderPath:q}).hasConflicts){const B=E(ie,h,!0);s?.(B,q,ie),i?.(),A()}},[h,R,E,s,i,A,b]),L=g.useCallback(()=>{T(),A()},[T,A]),de=g.useCallback(()=>{M(),A()},[M,A]),H=g.useCallback(()=>{k(),A()},[k,A]),te=g.useCallback(ie=>{N(ie),A()},[N,A]),Q=g.useCallback(ie=>{const $=ie.at(0)?.parentPath??"/",q=E($,ie,!1);t?.(q,$),n?.()},[t,n,E]),J=g.useCallback(ie=>{C(ie),c(!0)},[]),me=g.useCallback(()=>{c(!1),F.current||A()},[A,F]),[Re,ne]=g.useState(),_=g.useCallback(ie=>{u(ie);const $=ie[0]?.parentPath??ie[0]?.folderId;w($),r&&ie.length>0?ne(r(ie.length,ie[0]?.name)):ne(void 0)},[r]),Fe=g.useCallback(ie=>{p(ie);const $=ie[0]?.parentPath??ie[0]?.folderId;w($),S({type:rt.Move,sourceFolder:$}),a&&ie.length>0?ne(a(ie.length,ie[0]?.name)):ne(void 0)},[a]);return{handleDuplicate:Q,handleCloseDestinationFolderPopup:me,handleOpenDestinationFolderPopup:J,handleCopyTo:W,handleMoveTo:U,openDestinationFolderPopup:l,destinationFolderMode:m,destinationFolderTitle:Re,handleSetCopiedFiles:_,handleSetMovedFiles:Fe,clearState:A,conflictingFiles:x,conflictResolutionOpen:y,openConflictResolution:P,closeConflictResolution:D,handleConflictReplace:L,handleConflictCancel:H,handleConflictDuplicate:de,handleConflictDecideForEach:te,sourceFolder:v}},o7=({path:e,defaultPath:t,onPathChange:s,onSelectionClear:o})=>{const i=e!==void 0,[n,r]=g.useState(t),a=i?e:n,l=g.useCallback(d=>{i||r(d),s?.(d)},[i,s]),c=g.useCallback(d=>{l(d),o?.()},[l,o]);return{currentPath:a,setCurrentPath:l,handlePathChange:c}},i7=({onDeleteFiles:e,onDeleteSuccess:t})=>{const[s,o]=g.useState(!1),[i,n]=g.useState([]),[r,a]=g.useState(""),l=g.useCallback((u,h)=>{n(u),a(h),o(!0)},[]),c=g.useCallback(()=>{o(!1),n([])},[]),d=g.useCallback(()=>{if(e&&i.length>0){const u=i.map(h=>({sourceUrl:h.path,nodeType:h.nodeType}));e(u,r),t?.()}c()},[i,e,t,c,r]);return{deleteConfirmationOpen:s,itemsToDelete:i,openDeleteConfirmation:l,closeDeleteConfirmation:c,confirmDelete:d}},n7=({onDownloadFiles:e,customDownloadItemsAction:t,onDownloadSuccess:s})=>({handleDownloadFiles:g.useCallback(i=>{t&&i.length>0?t(i):e&&i.length>0&&(e(i),s?.())},[e,s,t])}),r7=e=>"dataTransfer"in e&&e.dataTransfer!==null,a7=({onUploadFiles:e,onValidateUpload:t,maxFileSize:s,allowedFileTypes:o,validationMessages:i={},onUploadArchive:n,uploadEnabled:r=!0,currentFolder:a}={})=>{const[l,c]=g.useState(!1),[d,u]=g.useState(!1),[h,p]=g.useState(),m=g.useRef(null),C=g.useRef(""),v=g.useRef([]),w=g.useMemo(()=>!!a?.permissions?.includes($o.WRITE),[a]),[b,S]=g.useState(new Map),[x,y]=g.useState(null),F=g.useCallback(B=>!o||o.includes("*/*")?B:B.filter(({fileContent:pe,name:le})=>Xv(o,pe.type,le)),[o]),R=g.useCallback(()=>{S(new Map),y(null)},[]),{conflictingFiles:E,conflictResolutionOpen:D,hasActiveConflictRef:P,startConflictResolution:T,closeConflictResolution:M,openConflictResolution:k,handleReplaceAll:N,handleDuplicateAll:A,handleCancelAll:W,handleDecideForEach:U}=Qv({getDestinationFiles:()=>v.current,onResolve:(B,pe)=>{if(!r||!w){R();return}if(!x)return;const le=B.map(re=>{const Ce=b.get(re.sourceUrl);if(!Ce)return;const xe=re.destinationUrl.split("/").pop();return{fileContent:Ce.fileContent,name:xe}}).filter(Boolean);le.length>0&&e?.(le,pe),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 B=0;const pe=xe=>{r7(xe)&&xe.dataTransfer.types.includes(VL)&&(B++,u(!0))},le=()=>{B--,B===0&&u(!1)},re=()=>{B=0,u(!1)},Ce=xe=>{xe.preventDefault()};return window.addEventListener("dragenter",pe),window.addEventListener("dragleave",le),window.addEventListener("drop",re),window.addEventListener("dragover",Ce),()=>{window.removeEventListener("dragenter",pe),window.removeEventListener("dragleave",le),window.removeEventListener("drop",re),window.removeEventListener("dragover",Ce)}},[r,w]);const L=g.useCallback(B=>s?B.filter(pe=>pe.fileContent.size>s).map(pe=>pe.name):[],[s]),de=g.useCallback((B,pe)=>B.map(le=>({id:le.name,name:le.name,folderId:pe,path:le.name,nodeType:be.ITEM,parentPath:pe,contentLength:le.fileContent.size})),[]),H=g.useCallback(async(B,pe,le)=>{if(!r||!w)return!1;p(void 0),v.current=le;const re=L(B);if(re.length>0){const fe=s?(s/1048576).toFixed(2):0,De=i.oversizedFiles||`Files exceed maximum size (${fe}MB): ${re.join(", ")}`;return p(De),!1}if(t)try{const fe=await t(B,le,pe);if(!fe.valid)return p(fe.message||i.validationFailed||"Validation failed"),!1}catch{return p(i.validationError||"Validation error occurred"),!1}const Ce=new Map(B.map(fe=>[fe.name,fe]));S(Ce);const xe=de(B,pe);return y({destinationFolder:pe}),T(pe,xe,{destinationFolder:pe}).hasConflicts?!1:(e?.(B,pe),R(),!0)},[r,e,t,L,s,i,de,T,R,w]),te=g.useCallback(()=>{N(),R()},[N,R]),Q=g.useCallback(()=>{A(),R()},[A,R]),J=g.useCallback(()=>{W(),R()},[W,R]),me=g.useCallback(B=>{U(B),R()},[U,R]),Re=g.useCallback(()=>{M(),P.current||R()},[M,P,R]),ne=g.useCallback(B=>{!r||!w||(B.preventDefault(),B.stopPropagation(),B.dataTransfer.types.includes("Files")&&c(!0))},[r,w]),_=g.useCallback(B=>{if(!r||!w)return;B.preventDefault(),B.stopPropagation();const pe=B.currentTarget.getBoundingClientRect(),le=B.clientX,re=B.clientY;(le<=pe.left||le>=pe.right||re<=pe.top||re>=pe.bottom)&&c(!1)},[r,w]),Fe=g.useCallback(B=>{!r||!w||(B.preventDefault(),B.stopPropagation(),B.dataTransfer.types.includes("Files")&&(B.dataTransfer.dropEffect="copy"))},[r,w]),ie=g.useCallback(async(B,pe,le)=>{if(!r||!w||(B.preventDefault(),B.stopPropagation(),c(!1),!B.dataTransfer.types.includes("Files")))return;const re=Array.from(B.dataTransfer.files);if(re.length===0)return;const Ce=re.map(Le=>({fileContent:Le,name:Le.name})),xe=F(Ce);if(xe.length===0){p(i.unsupportedFiles||"Selected files are not supported");return}await H(xe,pe,le)},[r,F,H,i,w]);g.useEffect(()=>{let B=m.current;B||(B=document.createElement("input"),B.type="file",B.multiple=!0,B.style.display="none",document.body.appendChild(B),m.current=B),o&&o.length>0?B.accept=o.join(","):B.removeAttribute("accept");const pe=async()=>{if(!r||!w){B&&(B.value="");return}if(!B?.files?.length)return;const re=Array.from(B.files).map(xe=>({fileContent:xe,name:xe.name})),Ce=F(re);if(Ce.length===0){p(i.unsupportedFiles||"Selected files are not supported"),B.value="";return}await H(Ce,C.current,v.current),B.value=""};return B.addEventListener("change",pe),()=>{B&&(B.removeEventListener("change",pe),m.current===B&&(document.body.removeChild(B),m.current=null))}},[r,o,F,H,i,w]);const $=g.useCallback((B,pe)=>{!r||!w||(C.current=B,v.current=pe,m.current&&m.current.click())},[r,w]),q=g.useCallback((B,pe)=>{if(!n||!r||!w)return;const le=document.createElement("input");le.type="file",le.accept=".zip,application/zip",le.multiple=!1,le.style.display="none";const re=()=>{const Ce=le.files?.[0];if(!Ce){document.body.removeChild(le);return}const xe=Ce.name.replace(/\.zip$/i,"");if(pe.some(fe=>fe.nodeType===be.FOLDER&&fe.name.toLowerCase()===xe.toLowerCase())){p(i.validationFailed||`Folder with name "${xe}" already exists`),document.body.removeChild(le);return}try{n(Ce,xe,B)}finally{document.body.removeChild(le)}};le.addEventListener("change",re),document.body.appendChild(le),le.click()},[r,n,i,w]),se=g.useCallback(()=>{p(void 0)},[]);return{isDragging:l,isDraggingOverWindow:d,uploadError:h,handleDragEnter:ne,handleDragLeave:_,handleDragOver:Fe,handleDrop:ie,clearError:se,handleUpload:H,openFileDialog:$,openArchiveDialog:q,fileInputRef:m,uploadConflictingFiles:E,uploadConflictResolutionOpen:D,hasActiveUploadConflictRef:P,openUploadConflictResolution:k,closeUploadConflictResolution:Re,handleUploadConflictReplace:te,handleUploadConflictDuplicate:Q,handleUploadConflictCancel:J,handleUploadConflictDecideForEach:me}},Jv=g.createContext(void 0),ew={hiddenItemWarning:`${is.Warning}__A dot at the start of the name will make the item hidden`},l7={emptyName:"Name cannot be empty",duplicateName:"An item with this name already exists",hiddenItemWarning:ew.hiddenItemWarning};function c7(e){let t=e.length;for(;t>0&&e[t-1]==="/";)t--;return e.slice(0,t)}function d7(e,t){const s=c7(e),o=s.lastIndexOf("/");return o===-1?t:s.slice(0,o+1)+t}function u7(e){const t=e.lastIndexOf(".");return t===-1||t===0?e:e.substring(0,t)}function Ep(e){const t=e.lastIndexOf(".");return t===-1||t===0?"":e.substring(t)}const h7=({items:e,onRenameValidate:t,validationMessages:s,onMoveToFiles:o})=>{const[i,n]=g.useState(),r=g.useMemo(()=>({...l7,...s}),[s]),a=g.useMemo(()=>i?.path,[i]),l=g.useCallback(p=>{const m=Go(e,p);m&&n(m)},[e]),c=g.useCallback(()=>{n(void 0)},[]),d=g.useCallback(p=>{if(!i||!o){n(void 0);return}const m=i.nodeType===be.ITEM;let C=p.trim();if(m){const S=Ep(i.name);S&&!C.endsWith(S)&&(C=C+S)}if(C===i.name){n(void 0);return}const v=d7(i.path,C),w=i.parentPath;if(!w){n(void 0);return}const b={sourceUrl:i.path,destinationUrl:v,nodeType:i.nodeType};o([b],w,w),n(void 0)},[i,o]),u=g.useCallback((p,m)=>{const C=p.trim();if(!C)return r.emptyName;if(C.startsWith("."))return r.hiddenItemWarning;const v=m.nodeType===be.ITEM;let w=C;if(v){const S=Ep(m.name);S&&!w.endsWith(S)&&(w=w+S)}const b=m.parentPath;if(b){const S=Go(e,b);if(S&&new Set((S.items??[]).filter(y=>y.path!==m.path).map(y=>y.name.toLowerCase())).has(w.toLowerCase()))return r.duplicateName}if(t){const S=t(w,m);if(S)return S}return null},[t,r,e]),h=g.useCallback(p=>p.nodeType===be.ITEM?u7(p.name):p.name,[]);return{renamedPath:a,renamedItem:i,renameHandler:l,renameSaveHandler:d,renameCancelHandler:c,renameValidateHandler:u,getDisplayName:h}},tw=e=>{const[t,s]=g.useState(e?.expandedPaths??new Set),o=g.useMemo(()=>!!e?.onExpandedPathsChange,[e?.onExpandedPathsChange]),i=g.useMemo(()=>o?e?.expandedPaths??new Set:t,[o,e?.expandedPaths,t]);g.useEffect(()=>{o&&e?.expandedPaths&&s(new Set(e.expandedPaths))},[o,e?.expandedPaths]);const n=g.useCallback(d=>{o?e?.onExpandedPathsChange?.(d):s(d)},[o,e]),r=g.useCallback(d=>{const u=new Set(i);u.has(d)?u.delete(d):u.add(d),n(u)},[i,n]),a=g.useCallback(()=>{n(new Set)},[n]),l=g.useCallback(d=>{const u=new Set(i);u.add(d),n(u)},[i,n]),c=g.useCallback(d=>{const u=new Set(i);u.delete(d),n(u)},[i,n]);return{expandedPaths:i,setExpandedPaths:n,togglePath:r,collapseAll:a,expandPath:l,collapsePath:c,isControlled:o}},g7=({newActions:e,currentFolder:t,onUploadFiles:s,onCreateFolder:o,onUploadArchive:i,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:f.jsx(G.IconFolder,{...Y,className:"text-secondary"}),onClick:()=>{o&&o()}}),e.newItem&&d.push({key:"new-item",label:e.newItem.label,icon:e?.newItem?.icon!==void 0?e?.newItem?.icon:f.jsx(G.IconPlus,{...Y,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:f.jsx(G.IconFile,{...Y,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:f.jsx(G.IconFileZip,{...Y,className:"text-secondary"}),onClick:()=>{i&&i()}})),d},[e,o,s,i,n]),l=g.useMemo(()=>a?.length>0,[a]),c=g.useMemo(()=>!t?.permissions?.includes($o.WRITE)||!!r,[t,r]);return{newActions:a,isNewButtonVisible:l,isNewButtonDisabled:c}},p7={emptyName:"Folder name cannot be empty",duplicateName:"A folder with this name already exists",hiddenItemWarning:ew.hiddenItemWarning},f7=({currentFolder:e,onCreateFolder:t,onValidateFolderName:s,validationMessages:o})=>{const[i,n]=g.useState(!1),[r,a]=g.useState(null),l=g.useRef(e?.path),c=g.useMemo(()=>({...p7,...o}),[o]);g.useEffect(()=>{const m=e?.path;l.current!==m&&i&&(n(!1),a(null)),l.current=m},[e?.path,i]);const d=g.useCallback(()=>{const m=`__new_folder_${Date.now()}`;a(m),n(!0)},[]),u=g.useCallback(()=>{n(!1),a(null)},[]),h=g.useCallback(m=>{const C=m.trim();if(!C)return c.emptyName;if(C.startsWith("."))return c.hiddenItemWarning;if(e&&new Set((e.items??[]).filter(w=>w.nodeType===be.FOLDER).map(w=>w.name.toLowerCase())).has(C.toLowerCase()))return c.duplicateName;if(s&&e){const v=s(C,e);if(v)return v}return null},[e,s,c]),p=g.useCallback(async m=>{const C=m.trim();if(!C)return;const w=`${e?.path??"/"}/${C}`,b=`${w}/${Zc}`,x={fileContent:new File([],Zc,{type:"text/plain"}),name:Zc};t&&await t(x,w,b),u()},[e,t,u]);return{isCreatingFolder:i,newFolderTempId:r,startFolderCreation:d,cancelFolderCreation:u,saveFolderCreation:p,validateFolderName:h}},m7=({additionalButtons:e,expandedPathsLength:t,collapseAll:s})=>{const o=t===0;return{additionalButtons:g.useMemo(()=>{const n=oe(["hover:text-accent-primary",o&&"controls-secondary-disable hover:controls-secondary-disable disabled:hover:cursor-default"]);return f.jsxs(f.Fragment,{children:[e,f.jsx(no,{disabled:o,className:n,size:bt.Small,onClick:s,icon:f.jsx(G.IconCopyMinus,{size:pt.LG,stroke:1.5}),"aria-label":"collapse-all"})]})},[e,o,s])}},C7=({onGetInfo:e})=>{const[t,s]=g.useState(!1),[o,i]=g.useState(void 0),n=g.useCallback(async a=>{i(a),s(!0),e&&await e(a)},[e]),r=g.useCallback(()=>{s(!1),i(void 0)},[]);return{isMetadataPopupOpen:t,selectedFileForMetadata:o,openMetadataPopup:n,closeMetadataPopup:r}};function v7(e){const t=[];function s(o){for(const i of o)t.push(i),i.items&&s(i.items)}return s(e),t}function Dp(e,t){const s=ki(t);return e.filter(o=>ki(o.name).includes(s))}function w7({onSearchFiles:e,clearSearchResults:t,currentPath:s,searchResults:o=[],searchInProgress:i=!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([]),m=g.useRef(s),C=g.useRef(l);g.useEffect(()=>{n!=null&&d(String(n))},[n]);const v=String(n??c??"").trim(),w=h.current&&(i||o.length>0||v!==""),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]),S=g.useCallback(()=>{u.current=!1,h.current=!1,p.current=[],d(""),r?.(""),t?.()},[t,r]),x=g.useCallback(F=>{const R=String(F??"");d(R),r?.(R),R.trim()?b(R):S()},[r,b,S]);g.useEffect(()=>{(m.current!==s||C.current!==l)&&(m.current=s,C.current=l,u.current=!1,h.current=!1,p.current=[],d(""),r?.(""),t?.())},[s,l,r,t]),g.useEffect(()=>{o.length>0&&p.current.length===0&&(p.current=o)},[o]);const y=g.useMemo(()=>{if(e){const R=p.current.length>0?p.current:o;return!v||R.length===0?R:Dp(R,v)}if(!v||!a.length)return[];const F=v7(a);return Dp(F,v)},[e,o,v,a]);return{isSearchMode:w,searchValue:c,effectiveSearchValue:v,setSearchValue:d,handleSearchChange:x,handleSearchActivate:b,handleSearchClear:S,searchResultsRows:y}}function b7({selectedPaths:e,defaultSelectedPaths:t,onSelectedPathsChange:s}){const o=e!==void 0,[i,n]=g.useState(()=>t??new Set),r=g.useMemo(()=>o?e:i,[o,e,i]),a=g.useCallback(c=>{const d=new Set(c);s?.(d),o||n(d)},[o,s]),l=g.useCallback(()=>{a(new Set)},[a]);return{selectedPaths:r,setSelectedPaths:a,clearSelection:l,isControlled:o}}const sw=':;,=/{}%&\\"',uh=`(\r
|
|
63
63
|
|
|
|
64
|
-
|\r| )|[\0-]`,S7=`[${sw.replace(/\\/g,"\\\\")}]`,ow=new RegExp(`${S7}|${uh}`),y7=new RegExp(uh),iw=({managerLabel:e,children:t,className:s,items:o=[],rootItem:i,path:n,defaultPath:r,filesLoading:a,selectedPaths:l,defaultSelectedPaths:c,onSelectedPathsChange:d,showHiddenFiles:u,onShowHiddenFilesChange:h,treeOptions:p,showNavigationPanel:m=!0,navigationPanelOptions:C,deleteConfirmationOptions:v,gridOptions:w,toolbarOptions:b,bulkActionsToolbarOptions:S,destinationFolderPopupOptions:x,conflictResolutionPopupOptions:y,onPathChange:F,onTableFileClick:R,handleSelectionClick:E,onGridApiChange:D,onCopyFiles:P,onMoveToFiles:T,onDeleteFiles:M,onDownloadFiles:k,onRenameValidate:N,onAddSibling:A,onAddChild:W,renameValidationMessages:U,forbiddenSymbolsRegExp:L=ow,forbiddenSymbolsTooltip:de,onUploadFiles:H,onValidateUpload:te,uploadEnabled:Q,uploadValidationMessages:J,maxFileSize:me,onUploadArchive:Re,onCreateFolder:ne,onCreateFolderValidate:_,folderCreationValidationMessages:Fe,fileMetadataPopupOptions:ie,onGetInfo:$,onUnshareFiles:q,onRemoveFilesAccess:se,actionsRef:B,sharedByMePaths:pe,onSearchFiles:le,searchResults:re,searchInProgress:Ce,clearSearchResults:xe,allowedFileTypes:Le,maxSelectableFileSize:fe,getDisabledTooltip:De,fileTooLargeTooltip:ze,unsupportedFileTypeTooltip:Ne,emptyStateIcon:Ve,emptyStateTitle:kt,emptyStateDescription:Et,sharedWithMeIds:Ut,onFolderPopupPathChange:V,onManagePermissions:Ee,onPreview:At,onOpenInNewTab:Xi,previewExtensions:yl,isRenameFileAvailable:xl,isDuplicateFolderAvailable:Rl,customUploadFileAction:uo,customCreateNewItemAction:Qi,customDuplicateAction:qo,customDeleteItemsAction:fr,customDownloadItemsAction:Ko,customBreakpointRef:mr,gridClassName:Cr,nonClickableTableColumns:vr,hideSearchPathItemName:Fl})=>{const{selectedPaths:Ji,clearSelection:Rs,setSelectedPaths:El}=b7({selectedPaths:l,defaultSelectedPaths:c,onSelectedPathsChange:d}),Dl=g.useMemo(()=>{const Oe=new Map;return Ji.forEach(Lt=>{const Pt=Go(o,Lt);Pt&&Oe.set(Lt,Pt)}),Oe},[Ji,o]),{currentPath:ot,setCurrentPath:Pl,handlePathChange:Fs}=o7({path:n,defaultPath:r,onPathChange:F,onSelectionClear:Rs}),en=g.useMemo(()=>{const{showFiles:Oe=!0,showFolders:Lt=!0,...Pt}=w||{};return{showFiles:Oe,showFolders:Lt,...Pt}},[w]),tn=en.showFiles,sn=en.showFolders,[Tl,Ml]=g.useState(),ds=x?.destinationFolderPath??Tl,on=g.useCallback(Oe=>{x?.setDestinationFolderPath?x.setDestinationFolderPath(Oe):Ml(Oe)},[x]),{areHiddenFilesVisible:Yo,toggleHiddenFilesVisibility:Il}=e7({showHiddenFiles:u,onShowHiddenFilesChange:h}),{isTreeCollapsed:Zo,toggleTreeCollapse:Xo,setIsTreeCollapsed:kl}=t7({collapsed:p?.collapsed,onCollapseChange:p?.onCollapseChange}),{renamedPath:wr,renamedItem:Qo,renameHandler:br,renameSaveHandler:Sr,renameCancelHandler:yr,renameValidateHandler:Jo,getDisplayName:Al}=h7({items:o,onRenameValidate:N,validationMessages:U,onMoveToFiles:T}),{isSearchMode:zs,searchValue:Ll,effectiveSearchValue:nn,setSearchValue:Ol,handleSearchChange:Nl,handleSearchClear:Dt,searchResultsRows:xr}=w7({onSearchFiles:le,clearSearchResults:xe,currentPath:ot,searchResults:re,searchInProgress:Ce,navigationPanelValue:C?.value,onNavigationPanelSearchChange:C?.onSearchChange,allItems:o,activeTab:b?.activeTab}),et=g.useMemo(()=>Rp(o,ot)??o[0],[o,ot]),{handleCopyTo:Rr,handleMoveTo:Hl,handleDuplicate:rn,handleOpenDestinationFolderPopup:Fr,handleCloseDestinationFolderPopup:Gl,openDestinationFolderPopup:ei,handleSetCopiedFiles:Er,handleSetMovedFiles:Dr,destinationFolderMode:Pr,destinationFolderTitle:ti,conflictingFiles:Tr,conflictResolutionOpen:si,closeConflictResolution:Bl,handleConflictReplace:Mr,handleConflictDuplicate:an,handleConflictCancel:Vl,handleConflictDecideForEach:zl,sourceFolder:Wl}=s7({getDestinationFiles:Oe=>Rp(o,Oe)?.items??[],onCopyFiles:P,onMoveToFiles:T,onCopySuccess:Rs,onMoveSuccess:Rs,onDuplicateSuccess:Rs,getCopyHeader:x?.getCopyHeader,getMoveHeader:x?.getMoveHeader});g.useEffect(()=>{ei||on(void 0)},[ei,on]);const{deleteConfirmationOpen:_l,itemsToDelete:jl,openDeleteConfirmation:Ir,closeDeleteConfirmation:kr,confirmDelete:Ar}=i7({onDeleteFiles:M,onDeleteSuccess:Rs}),{handleDownloadFiles:oi}=n7({onDownloadFiles:k,customDownloadItemsAction:Ko,onDownloadSuccess:Rs}),{isDragging:Ws,isDraggingOverWindow:Ul,uploadError:vt,handleDragEnter:$l,handleDragLeave:ln,handleDragOver:ii,handleDrop:_s,clearError:Lr,openFileDialog:cn,fileInputRef:Or,openArchiveDialog:dn,uploadConflictingFiles:Nr,uploadConflictResolutionOpen:ql,closeUploadConflictResolution:Kl,handleUploadConflictReplace:Hr,handleUploadConflictDuplicate:un,handleUploadConflictCancel:Yl,handleUploadConflictDecideForEach:Zl}=a7({onUploadFiles:H,onValidateUpload:te,maxFileSize:me,onUploadArchive:Re,allowedFileTypes:Le,validationMessages:J,uploadEnabled:Q,currentFolder:et}),hn=g.useCallback(Oe=>{Dt();const Lt=ot??"",Pt=et?.items??[];_s(Oe,Lt,Pt)},[ot,et,_s,Dt]),gn=g.useCallback(()=>{Dt();const Oe=ot??"",Lt=et?.items??[];cn(Oe,Lt)},[ot,et,cn,Dt]),Gr=g.useCallback(()=>{Dt();const Oe=ot??"",Lt=et?.items??[];dn(Oe,Lt)},[ot,et,dn,Dt]),Br=g.useCallback(()=>{Dt(),uo?.(ot,et)},[uo,ot,et,Dt]),Vr=g.useCallback(()=>{Dt(),Qi?.(ot,et)},[Qi,ot,et,Dt]),zr=g.useCallback(Oe=>{qo?.(Oe)},[qo]),{isCreatingFolder:ni,newFolderTempId:j,startFolderCreation:We,cancelFolderCreation:Ke,saveFolderCreation:$t,validateFolderName:ho}=f7({currentFolder:et,onCreateFolder:ne,onValidateFolderName:_,validationMessages:Fe}),ph=g.useCallback(()=>{Dt(),We()},[Dt,We]),{newActions:gw,isNewButtonVisible:pw,isNewButtonDisabled:fw}=g7({newActions:b?.newActions,currentFolder:et,onUploadFiles:uo?Br:gn,onUploadArchive:Gr,onCreateFolder:ph,onCreateNewItem:Vr,isNewButtonDisabled:b?.isNewButtonDisabled}),mw=g.useMemo(()=>{if(zs){let ke=xr;tn||(ke=ke.filter(_e=>_e.nodeType!==be.ITEM)),sn||(ke=ke.filter(_e=>_e.nodeType!==be.FOLDER)),Yo||(ke=ke.filter(_e=>!_e.path.split("/").filter(Boolean).some(fn=>fn.startsWith("."))));const pn=ke.map(_e=>({..._e,id:_e.id??_e.path,name:_e.name??_e.path.split("/").pop()??"",updatedAt:_e.updatedAt,size:_e.contentLength,contentLength:_e.contentLength,author:_e.author,path:_e.path,nodeType:_e.nodeType,extension:_e.extension,isTemporary:!1,owner:_e.owner,folderId:_e.folderId}));return ni&&j&&pn.unshift({id:j,name:"",updatedAt:void 0,author:void 0,path:ot??"/",nodeType:be.FOLDER,extension:void 0,isTemporary:!0,owner:void 0}),pn}const Oe=ki(nn).trim(),Lt=et?.items??[];let Pt=Oe?ZL(et):Lt;tn||(Pt=Pt.filter(ke=>ke.nodeType!==be.ITEM)),sn||(Pt=Pt.filter(ke=>ke.nodeType!==be.FOLDER)),Yo||(Pt=Pt.filter(ke=>Oe?!ke.path.split("/").filter(Boolean).some(_e=>_e.startsWith(".")):!Zv(ke)));const Xl=Pt.map(ke=>({...ke,id:ke.id??ke.path,name:ke.name??ke.path.split("/").pop()??"",updatedAt:ke.updatedAt,size:ke.contentLength,author:ke.author,path:ke.path,nodeType:ke.nodeType,extension:ke.extension,isTemporary:!1,owner:ke.owner,contentType:ke.contentType,contentLength:ke.contentLength,folderId:ke.folderId}));if(ni&&j&&!Oe&&Xl.unshift({id:j,name:"",updatedAt:void 0,author:void 0,path:ot??"/",nodeType:be.FOLDER,extension:void 0,isTemporary:!0,owner:void 0}),!Oe)return Xl;const Tw=Oe.split(/\s+/).filter(Boolean);return Xl.filter(ke=>{if(ke.isTemporary)return!0;const pn=ki(ke.name),_e=ki(ke.author),Ch=YL(ke.extension);return Tw.every(fn=>pn.includes(fn)||_e.includes(fn)||Ch.includes(fn))})},[zs,xr,et,nn,Yo,ni,j,tn,sn,ot]),Cw=g.useCallback(Oe=>{Fs(Oe.path)},[Fs]),vw=g.useCallback(Oe=>{Fs(Oe)},[Fs]),ww=g.useCallback(Oe=>{Oe.nodeType===be.FOLDER?Fs(Oe.path):R?.(Oe)},[Fs,R]),{expandedPaths:fh,setExpandedPaths:bw,collapseAll:Sw}=tw({expandedPaths:p?.expandedPaths,onExpandedPathsChange:p?.onExpandedPathsChange}),{additionalButtons:yw}=m7({collapseAll:Sw,expandedPathsLength:fh.size,additionalButtons:p?.additionalButtons}),{isMetadataPopupOpen:xw,selectedFileForMetadata:Rw,openMetadataPopup:Fw,closeMetadataPopup:mh}=C7({onGetInfo:$}),Ew=g.useCallback(()=>{mh(),ie?.clearMetadata?.()},[mh,ie]),Dw=g.useMemo(()=>{if(L)return Sl(L)},[L]),Pw={managerLabel:e,className:s,items:o,allowedFileTypes:Le,maxSelectableFileSize:fe,rootItem:i,filesLoading:a,treeOptions:{...p,expandedPaths:fh,onExpandedPathsChange:bw,additionalButtons:yw},showNavigationPanel:m,navigationPanelOptions:C,gridOptions:en,toolbarOptions:b,bulkActionsToolbarOptions:S,deleteConfirmationOptions:v,destinationFolderPopupOptions:{...x,destinationFolderPath:ds,setDestinationFolderPath:on,header:ti,onCreateFolder:ne,onCreateFolderValidate:_,folderCreationValidationMessages:Fe,sourceFolder:Wl},currentPath:ot,setCurrentPath:Pl,searchValue:Ll,effectiveSearchValue:nn,setSearchValue:Ol,areHiddenFilesVisible:Yo,toggleHiddenFilesVisibility:Il,isTreeCollapsed:Zo,toggleTreeCollapse:Xo,setIsTreeCollapsed:kl,selectedPaths:Ji,selectedFiles:Dl,setSelectedPaths:El,clearSelection:Rs,currentFolder:et,gridRows:mw,handleCopyTo:Rr,handleMoveTo:Hl,handleDuplicate:qo?zr:rn,handleSetCopiedFiles:Er,handleSetMovedFiles:Dr,openDestinationFolderPopup:ei,handleCloseDestinationFolderPopup:Gl,handleOpenDestinationFolderPopup:Fr,destinationFolderMode:Pr,handleAddSibling:A,handleAddChild:W,handleDownloadFiles:oi,renamedPath:wr,renamedItem:Qo,forbiddenSymbolsRegExp:Dw,forbiddenSymbolsTooltip:de,onRename:br,onRenameSave:Sr,onRenameCancel:yr,onRenameValidate:Jo,getDisplayName:Al,openDeleteConfirmation:fr||Ir,closeDeleteConfirmation:kr,confirmDelete:Ar,deleteConfirmationOpen:_l,itemsToDelete:jl,handlePathChange:Fs,handleTreeItemClick:Cw,handleBreadcrumbItemClick:vw,handleSearchChange:Nl,handleTableRowClick:ww,onTableFileClick:R,handleSelectionClick:E,onGridApiChange:D,isDragging:Ws,uploadError:vt,handleDragEnter:$l,handleDragLeave:ln,handleDragOver:ii,handleDrop:hn,clearUploadError:Lr,onUploadFiles:H,onValidateUpload:te,maxFileSize:me,isDraggingOverWindow:Ul,openFileDialog:gn,fileInputRef:Or,newActions:gw,isNewButtonVisible:pw,isNewButtonDisabled:fw,isCreatingFolder:ni,newFolderTempId:j,startFolderCreation:ph,cancelFolderCreation:Ke,saveFolderCreation:$t,validateFolderName:ho,conflictResolutionPopupOptions:y,conflictingFiles:Tr,conflictResolutionOpen:si,closeConflictResolution:Bl,handleConflictReplace:Mr,handleConflictDuplicate:an,handleConflictCancel:Vl,handleConflictDecideForEach:zl,uploadConflictingFiles:Nr,uploadConflictResolutionOpen:ql,closeUploadConflictResolution:Kl,handleUploadConflictReplace:Hr,handleUploadConflictDuplicate:un,handleUploadConflictCancel:Yl,handleUploadConflictDecideForEach:Zl,fileMetadataPopupOptions:ie,isMetadataPopupOpen:xw,selectedFileForMetadata:Rw,openMetadataPopup:Fw,closeMetadataPopup:Ew,onGetInfo:$,onUnshareFiles:q,onRemoveFilesAccess:se,actionsRef:B,sharedByMePaths:pe,onSearchFiles:le,searchInProgress:Ce,searchResults:re,clearSearchResults:xe,isSearchMode:zs,emptyStateIcon:Ve,emptyStateTitle:kt,emptyStateDescription:Et,gridClassName:Cr,sharedWithMeIds:Ut,onFolderPopupPathChange:V,onManagePermissions:Ee,onPreview:At,onOpenInNewTab:Xi,previewExtensions:yl,isRenameFileAvailable:xl,isDuplicateFolderAvailable:Rl,customUploadFileAction:uo,customBreakpointRef:mr,nonClickableTableColumns:vr,hideSearchPathItemName:Fl,getDisabledTooltip:De,fileTooLargeTooltip:ze,unsupportedFileTypeTooltip:Ne};return f.jsx(Jv.Provider,{value:Pw,children:t})},x7=({disabledGridRowIds:e,gridRows:t,getDisabledTooltip:s,getRowDisabledTooltip:o,allowedFileTypes:i,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=C=>{const w=C.target.closest(".ag-row");if(!w){a(S=>S&&null);return}const b=w.getAttribute("row-id");b&&e.has(b)?a(S=>S!==b?(c(w.getBoundingClientRect()),b):S):a(S=>S&&null)},p=()=>{a(null),c(null)},m=document.querySelector('[aria-label="File Manager Grid View"]');if(m)return m.addEventListener("mousemove",h),m.addEventListener("mouseleave",p),()=>{m.removeEventListener("mousemove",h),m.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):o(d,i,n)},[d,s,o,i,n]);return f.jsx(f.Fragment,{children:u&&l&&zi.createPortal(f.jsxs(qd,{open:!0,placement:"top",children:[f.jsx(Yd,{asChild:!0,children:f.jsx("div",{className:ue("fixed z-[-1]",u&&"pointer-events-none"),style:{top:l.top,left:l.left,width:l.width,height:l.height}})}),f.jsx(Kd,{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)})},hh=()=>{const[e,t]=g.useState(fp());return g.useEffect(()=>{const s=()=>t(fp());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e},nw=({onClose:e,onConfirm:t,onFolderPopupPathChange:s,setDestinationFolderPath:o,open:i,copyLabel:n="Copy",moveLabel:r="Move",addFolderLabel:a="Add folder",mode:l=rt.Copy,hiddenFilesSwitcherLabel:c="Show hidden files",onUploadFiles:d,onValidateUpload:u,maxFileSize:h,header:p,sourceFolder:m,disabledPathTooltip:C="Unavailable for the original path. Please select another folder",path:v,collapsedFileTree:w=!1,alertProps:b,...S})=>{const[x,y]=g.useState(!1),[F,R]=g.useState(!1),E=g.useRef(null),D=hh(),P=g.useCallback(A=>{y(A)},[]),T=g.useMemo(()=>[{key:"add-folder",label:a,icon:f.jsx(G.IconFolderPlus,{...Y,className:"text-secondary"}),onClick:()=>{E.current?.createFolder(),R(!1)}},{key:"show-hidden-files",label:c,icon:f.jsx(G.IconEye,{...Y,className:"text-secondary"}),onClick:()=>{y(A=>!A),R(!1)}}],[a,c]),M=g.useCallback(A=>{A&&(s?.(A),o?.(A))},[s,o]),k=l===rt.Copy?"Copy to":"Move to",N=g.useMemo(()=>!v||!m?!1:m===v,[v,m]);return f.jsx(Uo,{open:i,onClose:()=>{e()},size:Wt.Lg,dividerFooter:!0,dividers:!1,className:"md:!h-[800px] !bg-layer-2",footer:f.jsxs("div",{className:"flex justify-between items-center gap-2 py-4 px-4 md:px-6",children:[f.jsx("div",{className:"flex items-center gap-4 min-w-0",children:D?f.jsx(Ft,{menu:{items:T},open:F,onOpenChange:R,children:f.jsx(ss,{className:"h-9 w-9 shrink-0","aria-label":"More options",iconBefore:f.jsx(G.IconDotsVertical,{...Y,className:"text-secondary"})})}):f.jsxs(f.Fragment,{children:[f.jsx(bs,{label:a,appearance:Me.Ghost,iconBefore:f.jsx(G.IconFolderPlus,{...Y}),onClick:()=>{E.current?.createFolder()}}),f.jsx("div",{className:"w-px h-[26px] bg-controls-disable-accent my-2"}),f.jsx("div",{className:"inline-flex items-center cursor-pointer",children:f.jsx(oh,{label:c,isOn:x,onChange:P,switchId:"hidden-files-switch"})})]})}),f.jsxs("div",{className:"flex space-x-4 items-center",children:[f.jsx(ys,{onClick:e,label:"Cancel"}),N?f.jsx(yt,{tooltip:C,children:f.jsx(bs,{onClick:t,label:l==="copy"?n:r,disabled:N,"aria-disabled":N})}):f.jsx(bs,{onClick:t,label:l==="copy"?n:r})]})]}),header:p??k,children:f.jsxs("div",{className:"bg-layer-2 h-full flex flex-col",children:[b&&f.jsx("div",{className:"px-4 pt-4",children:f.jsx(Wp,{...b})}),f.jsx("div",{className:"flex-1 min-h-0",children:f.jsx(hw,{...S,gridClassName:"size-full",className:oe(S.className,"bg-layer-2 h-full flex pt-0"),actionsRef:E,path:v,showHiddenFiles:x,onShowHiddenFilesChange:P,treeOptions:{...S.treeOptions,collapsed:w,expandedPaths:new Set([S.rootItem?.path||"/"]),header:S.treeOptions?.header},gridOptions:{...S.gridOptions,selectionMode:void 0},navigationPanelOptions:{elementId:"file-manager-destination-search",...S.navigationPanelOptions},onUploadFiles:d,onValidateUpload:u,onPathChange:M,maxFileSize:h})})]})})},R7=12,F7=8;var So=(e=>(e.Normal="normal",e.Reverse="reverse",e))(So||{});function E7({actions:e,direction:t=So.Normal,moreButtonWidth:s=Nt,actionsGap:o=8,containerPadding:i=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 C=Array.from(a.current.children);d.current=C.map(v=>Math.ceil(v.getBoundingClientRect().width))},[e,...n]),g.useEffect(()=>{if(!r.current)return;let C=null;const v=()=>{C&&cancelAnimationFrame(C),C=requestAnimationFrame(()=>{const b=r.current,S=l.current?.offsetWidth??0,x=c.current?.offsetWidth??0,y=S+x,R=b.getBoundingClientRect().width-y-s-o*2-i*2,E=d.current;let D=0,P=0;if(t===So.Reverse)for(let T=E.length-1;T>=0&&(D+=E[T]+o,!(D>R));T--)P++;else for(const T of E){if(D+=T+o,D>R)break;P++}h(P)})},w=new ResizeObserver(v);return w.observe(r.current),v(),()=>{C&&cancelAnimationFrame(C),w.disconnect()}},[e.length,t,...n]);const p=t===So.Reverse?e.slice(0,e.length-u):e.slice(u);return{visibleActions:t===So.Reverse?e.slice(e.length-u):e.slice(0,u),hiddenActions:p,refs:{containerRef:r,measureRef:a,leftSectionRef:l,rightSectionRef:c}}}const D7=({getSelectionLabel:e,onClearSelection:t,actions:s,selectedCount:o})=>{const i=hh(),{refs:{containerRef:n,leftSectionRef:r,measureRef:a},visibleActions:l,hiddenActions:c}=E7({actions:s,direction:So.Reverse,dependencies:[i],actionsGap:R7,containerPadding:F7}),d=e(o);return f.jsxs(f.Fragment,{children:[f.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})=>f.jsx(ys,{iconBefore:h,label:p,hideTitleOnMobile:!0},u))}),f.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:[f.jsx("div",{ref:r,children:f.jsx(bs,{label:d,onClick:t,textClassName:"text-accent-primary whitespace-nowrap",appearance:Me.Ghost,iconBefore:f.jsx(G.IconX,{...Y,className:"text-accent-primary"})})}),f.jsxs("div",{className:"flex flex-1 w-full gap-3 items-center justify-end",children:[c.length>0&&f.jsx(Ft,{menu:{items:c},allowedPlacements:["bottom","bottom-start"],children:f.jsx(ss,{className:"h-[38px]",iconBefore:f.jsx(G.IconDotsVertical,{...Y,className:"text-secondary hover:text-accent-primary"})})}),l.map(({key:u,icon:h,tooltip:p,title:m,onClick:C,disabled:v})=>f.jsx(ys,{className:"!p-[9px]",iconBefore:h,label:m,hideTitleOnMobile:!0,disabled:v,tooltipProps:{tooltip:p},onClick:w=>C?.({key:u,domEvent:w})},u))]})]})]})},P7=({open:e,itemsToDelete:t,onClose:s,onConfirm:o,cancelLabel:i="Cancel",confirmLabel:n="Delete",titleRenderer:r,contentRenderer:a})=>{const l=t.map(p=>p.name),d=r?.(l)||"Confirm Deleting Items",u=f.jsxs("div",{className:"px-6 py-3 dial-small",children:[f.jsx("p",{className:"text-secondary mb-3",children:t.length===1?f.jsxs(f.Fragment,{children:["Do you want to delete file or folder"," ",f.jsxs("span",{className:"text-primary break-all",children:['"',t[0].name,'"']}),"?"]}):f.jsxs(f.Fragment,{children:["Do you want to delete the following"," ",f.jsx("span",{className:"text-primary",children:t.length})," items?"]})}),t.length>1&&f.jsx(f.Fragment,{children:t.length<=10?f.jsx("ul",{className:"space-y-1 text-primary list-none",children:t.map(p=>f.jsx("li",{className:"truncate",children:p.name},p.path))}):f.jsxs(f.Fragment,{children:[f.jsx("ul",{className:"space-y-1 text-primary list-none mb-2",children:t.slice(0,10).map(p=>f.jsx("li",{className:"truncate",children:p.name},p.path))}),f.jsxs("p",{className:"text-secondary italic",children:["... and ",t.length-10," more"]})]})})]}),h=a?.(l)||u;return f.jsx(Ov,{open:e,header:d,confirmLabel:n,cancelLabel:i,variant:Vi.Danger,onClose:s,onConfirm:o,children:h})},Pp=e=>e.split("/").map(t=>t.trim()).filter(Boolean),T7="w-full flex items-center justify-between gap-4",M7="min-w-0 h-[38px] flex-1 overflow-hidden bg-layer-3 px-3 flex items-center rounded",I7="w-[260px]",k7=({ariaLabel:e="Breadcrumb",labelClassName:t,onItemClick:s,path:o,makeHref:i,rootItemPath:n,rootItemLabel:r,breadcrumbsHiddenPathPart:a,className:l,breadcrumbClassName:c,searchable:d=!0,value:u,elementId:h="file-manager-search",disabled:p,invalid:m,onSearchChange:C,searchClassName:v,searchContainerClassName:w,isCompactView:b=!1})=>{const S=g.useMemo(()=>{if(!o)return;let D=Pp(o);const P=[...D];let T=0;if(a){const k=Pp(a);if(k.length){const N=D.findIndex((A,W)=>k.every((U,L)=>D[W+L]===U));N!==-1&&(T=k.length,D=[...D.slice(0,N),...D.slice(N+k.length)])}}if(!D.length)return[{label:"/"}];const M=D.map((k,N)=>{const A=N<D.length-T?N:N+T,W=P.slice(0,A+1),U=typeof i=="function"?i(W,A):void 0;return{label:k,href:U,onClick:s?L=>{L.preventDefault(),s(U)}:void 0}});if(n&&r){const k=n.split("/").filter(Boolean),N=o.split("/").filter(Boolean);if(k.every((W,U)=>N[U]===W)&&M.length>0){const W=M.slice(k.length);return[{label:r,href:n,onClick:s?U=>{U.preventDefault(),s(n)}:void 0},...W]}}return M},[o,a,n,r,i,s]),[x,y]=g.useState(!1),F=g.useCallback(()=>{if(b&&!x){y(!0);const D=document.getElementById(h);D&&D.focus()}},[h,x,b]),R=g.useCallback(()=>{(!u||String(u).trim()==="")&&C?.("")},[u,C]),E=g.useCallback(()=>b&&x?f.jsx(ys,{className:"!p-[9px]",iconBefore:f.jsx(G.IconArrowLeft,{...Y}),onClick:()=>{y(!1),C?.("")}}):f.jsx("div",{className:M7,children:f.jsx(Mv,{pathItems:S,ariaLabel:e,labelClassName:t,className:c})}),[e,c,S,x,b,t,C]);return f.jsxs("div",{className:oe(T7,{"gap-3":b},l),"aria-label":"navigation-panel",children:[E(),d&&f.jsx("div",{className:oe(I7,{"w-[40px]":b&&!x,"w-full":b&&x}),role:"search","aria-label":"Search",onClick:F,children:f.jsx(ih,{id:h,value:u??"",onChange:C,disabled:p,onBlur:R,invalid:m,className:v,wrapperClassName:b&&!x?"pl-2.5":"",containerClassName:w})})]})},A7=({tabs:e,activeTab:t,onTabChange:s,areHiddenFilesVisible:o,onToggleHiddenFiles:i,isNewButtonVisible:n,isNewButtonDisabled:r,newButtonVariant:a=Ge.Primary,newButtonDropdownItems:l=[],newButtonLabel:c="New",hiddenFilesSwitcherLabel:d="Hidden files",showHiddenFilesLabel:u="Show hidden files",hideHiddenFilesLabel:h="Hide hidden files",showHiddenFilesToggle:p=!0,disabledNewButtonTooltip:m})=>{const C=hh(),v=g.useMemo(()=>[{key:"hidden-files-switch",label:o?h:u,icon:o?f.jsx(G.IconEyeOff,{...Y,className:"text-secondary"}):f.jsx(G.IconEye,{...Y,className:"text-secondary"}),onClick:()=>i?.(!o)}],[o,h,u,i]),w=()=>e&&t&&s?f.jsx(Ev,{tabs:e,activeTab:t,onClick:x=>s(x),screenThreshold:Qa.Tablet,smallScreenContainerClassName:"w-fit bg-transparent h-[38px] overflow-hidden",smallScreenDropdownItemClassName:"px-3 h-[38px]"}):null,b=()=>f.jsxs(f.Fragment,{children:[p&&f.jsxs(f.Fragment,{children:[f.jsx(oh,{switchId:"hidden-files-switch",label:d,isOn:o,onChange:i}),f.jsx("div",{className:"h-6 border-l border-primary"})]}),n&&f.jsx(yt,{tooltip:r&&m?m:void 0,children:f.jsx(Ud,{label:c,variant:a,items:l,disabled:r})})]}),S=()=>f.jsxs(f.Fragment,{children:[f.jsx(Ft,{menu:{items:v},allowedPlacements:["bottom","bottom-start"],children:f.jsx(ss,{className:"h-[38px]",iconBefore:f.jsx(G.IconDotsVertical,{...Y,className:"text-secondary hover:text-accent-primary"})})}),n?f.jsx(yt,{tooltip:r&&m?m:void 0,children:f.jsx(Ud,{label:c,variant:a,items:l,disabled:r})}):null]});return f.jsxs("div",{className:"flex w-full justify-between gap-4 items-center overflow-x-auto",children:[f.jsx("div",{className:"flex-1 min-w-0",children:w()}),f.jsx("div",{className:"flex gap-4 flex-shrink-0 items-center",children:C?S():b()})]})},L7=100,xn=16,hs="text-secondary",aa="text-primary min-w-0",O7="text-primary break-words min-w-0",Rn="bg-layer-2",N7=({open:e,onClose:t,fileMetadata:s,loading:o=!1,header:i="Information",nameLabel:n="Name:",pathLabel:r="Path:",modifiedDateLabel:a="Modified Date:",sizeLabel:l="Size:",authorLabel:c="Author:",dateLocale:d="en-US",dateOptions:u})=>f.jsx(Uo,{open:e,onClose:t,size:Wt.Sm,header:i,dividers:!1,children:f.jsx("div",{className:"px-6 py-4",children:f.jsx("div",{className:"grid gap-x-4 gap-y-4 items-center dial-small",style:{gridTemplateColumns:`${L7}px 1fr`},children:o?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:hs,children:n}),f.jsx(pi,{variant:Xt.Text,width:"100%",height:xn,className:Rn}),f.jsx("div",{className:hs,children:a}),f.jsx(pi,{variant:Xt.Text,width:"90%",height:xn,className:Rn}),f.jsx("div",{className:hs,children:l}),f.jsx(pi,{variant:Xt.Text,width:"60%",height:xn,className:Rn}),f.jsx("div",{className:hs,children:c}),f.jsx(pi,{variant:Xt.Text,width:"80%",height:xn,className:Rn}),f.jsx("div",{className:hs,children:r}),f.jsx(pi,{variant:Xt.Text,width:"70%",height:xn,className:Rn})]}):s?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:hs,children:n}),f.jsx("div",{className:aa,children:f.jsx(ht,{text:s.name})}),f.jsx("div",{className:hs,children:a}),f.jsx("div",{className:aa,children:f.jsx(ht,{text:XL(s.updatedAt,d,u)})}),f.jsx("div",{className:hs,children:l}),f.jsx("div",{className:aa,children:f.jsx(ht,{text:or(s.contentLength)})}),f.jsx("div",{className:hs,children:c}),f.jsx("div",{className:aa,children:f.jsx(ht,{text:s.author||"—"})}),f.jsx("div",{className:hs,children:r}),f.jsx("div",{className:O7,children:decodeURIComponent(s.path)})]}):null})})}),H7={size:10,stroke:2},G7=26;var _t=(e=>(e.File="file",e.Folder="folder",e))(_t||{});const B7=({name:e,type:t,shared:s=!1,loading:o=!1,sharedIndicatorClassName:i,sharedIndicatorTooltip:n,fileExtension:r,...a})=>{const l=c=>f.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[c,s&&f.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:f.jsx(Wn,{className:i,sharedIndicatorTooltip:n})})]});if(o)return l(f.jsx(nr,{}));if(t===_t.File){const c=r||(e.includes(".")?e.split(".").pop():void 0);return f.jsx(iu,{...a,extension:c??"",className:"text-secondary",indicator:s?f.jsx(Wn,{className:i,sharedIndicatorTooltip:n}):null,label:"File type icon"})}return t===_t.Folder?l(f.jsx($e,{icon:f.jsx(G.IconFolder,{className:a.className,size:a.size??Y.size,stroke:a.stroke??Y.stroke}),className:"inline-block align-middle"})):null},V7=({name:e,type:t,elementId:s,loading:o=!1,shared:i=!1,iconClassName:n,iconIndicator:r,iconLabel:a,iconSize:l,iconStroke:c,inputInvalid:d,inputInvalidMessage:u,inputContainerClassName:h,inputIconAfter:p,inputRef:m,onChange:C,sharedIndicatorClassName:v,sharedIndicatorTooltip:w,fileExtension:b})=>{const S=()=>{const x=u?.startsWith(`${is.Warning}__`);if(!d&&!x)return null;const y=u?.replace(`${is.Warning}__`,"");return f.jsx(yt,{tooltip:y,children:p||(x?f.jsx(G.IconAlertTriangleFilled,{...Y,className:"text-warning-icon","aria-label":"warning"}):f.jsx(G.IconAlertCircleFilled,{...Y,className:"text-error","aria-label":"alert"}))})};return f.jsxs("div",{className:"flex gap-2 items-center",children:[f.jsx(B7,{name:e,type:t,label:a,className:n,indicator:r,size:l,stroke:c,loading:o,shared:i,fileExtension:b,sharedIndicatorClassName:v,sharedIndicatorTooltip:w}),f.jsx(Zi,{containerClassName:oe("!h-6 py-[1px] pl-[7px] pr-[7px]",h),id:s,value:e,onChange:C,invalid:d,iconAfter:S(),inputRef:m})]})};function rw({value:e,isEditing:t,restoreOnCancel:s=!0,onValidate:o,onSave:i,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,S="")=>{c(b),u(S)},[]),m=g.useCallback(b=>{if(!o)return p(),!0;const S=o(b);return S?S.startsWith(`${is.Warning}__`)?(p(!1,S),!0):(p(!0,S),!1):(p(),!0)},[o,p]),C=g.useCallback(b=>{const S=b??"";a(S),m(S)},[m]),v=g.useCallback(()=>{m(r)?i?.(r):h.current?.focus()},[m,i,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 S=x=>{x.key==="Enter"?(x.preventDefault(),h.current?.blur()):x.key==="Escape"&&(x.preventDefault(),w())};return b.addEventListener("keydown",S),()=>b.removeEventListener("keydown",S)},[t,v,w]),g.useEffect(()=>{if(!t)return;const b=h.current;if(!b)return;const S=x=>{const y=x.relatedTarget;y&&b.contains(y)||(m(r)?v():b.focus())};return b.addEventListener("blur",S),()=>{b.removeEventListener("blur",S)}},[t,r,m,v]),{inputRef:h,value:r,onChange:C,invalid:l,invalidMessage:d}}const tl=({name:e,type:t,elementId:s,editing:o=!1,loading:i=!1,shared:n=!1,iconSize:r=Nt,validate:a,onSave:l,fileExtension:c,onCancel:d,inputContainerClassName:u,sharedIndicatorClassName:h,sharedIndicatorTooltip:p,hideTooltip:m=!1,forbiddenSymbolsRegExp:C,forbiddenSymbolsTooltip:v,...w})=>{const{value:b,invalid:S,invalidMessage:x,onChange:y,inputRef:F}=rw({value:e,isEditing:o,onValidate:a,onCancel:d,onSave:l});if(!o){const R=dh({name:e,isFolder:t===_t.Folder},C,v),E=!!R;return t===_t.Folder?f.jsx(cl,{name:e,loading:i,shared:n,iconSize:r,className:"max-w-[428px] truncate",sharedIndicatorClassName:h,hideTooltip:m,isInvalidName:E,tooltipContent:R}):f.jsx(ll,{className:"max-w-[428px]",...w,name:e,shared:n,iconSize:r,sharedIndicatorClassName:h,hideTooltip:m,isInvalidName:E,tooltipContent:R})}return f.jsx(V7,{type:t,name:b,elementId:s,inputInvalid:S,inputInvalidMessage:x,inputRef:F,onChange:y,iconSize:r,fileExtension:c,inputContainerClassName:u,sharedIndicatorTooltip:p,sharedIndicatorClassName:h})},z7=({items:e,showFiles:t=!1,expandedPaths:s,loadingPaths:o=new Set,loadedPaths:i=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:m,getContextMenuItems:C,onRenameSave:v,onRenameCancel:w,onRenameValidate:b,onExpandedPathsChange:S,forbiddenSymbolsRegExp:x,forbiddenSymbolsTooltip:y})=>{const{expandedPaths:F,togglePath:R}=tw({expandedPaths:s??new Set,onExpandedPathsChange:S}),E=P=>{m?.(P),R(P.path)},D=(P,T)=>P.map(M=>{const{path:k,nodeType:N,name:A,items:W}=M,U=N===be.FOLDER;if(!d&&Zv(M))return null;if(!U&&!t)return;const L=Array.isArray(W)&&W.length>0&&W.some($=>$.nodeType===be.FOLDER||t),de=F.has(k),H=r===k,te=o.has(k),Q=u===k,J=i.has(k),me=n.has(k),Re=p&&h&&k===p&&U,ne=b&&($=>b($,M)),_=H?"bg-accent-primary-alpha border-l-2 border-l-accent-primary rounded":"border-l-2 border-l-transparent",Fe=Re?[]:C?.(M)??[],ie=x?dh({name:M.name,isFolder:U},x,y):void 0;return f.jsx("div",{className:"cursor-pointer text-secondary",children:f.jsxs("div",{className:"flex flex-col w-full","aria-label":"folder",children:[f.jsx(Ft,{trigger:[Ht.ContextMenu],className:"w-full",anchorToMouse:!0,menu:{items:Fe},children:f.jsxs("div",{style:{paddingLeft:`${T*G7}px`},className:oe("py-1 gap-[2px] dial-small flex justify-between hover:bg-accent-primary-alpha rounded group/item w-full mb-[2px] relative",_),"aria-selected":H,children:[!Q&&f.jsx("div",{className:"absolute size-full left-0 top-0 z-0",onClick:()=>E(M)}),f.jsx("div",{className:"relative flex flex-row truncate items-center w-fit h-6 gap-x-1 pl-1",onClick:()=>!Q&&E(M),children:f.jsxs(f.Fragment,{children:[U&&f.jsx(G.IconCaretRightFilled,{...H7,className:ue("flex-shrink-0",de&&"rotate-90 transition-all",J&&!L&&"text-transparent")}),f.jsx(tl,{elementId:`${k}-tree-item`,name:Re?h:A,type:U?_t.Folder:_t.File,loading:te,shared:me,sharedIndicatorClassName:oe("group-hover/item:bg-accent-primary-alpha",H&&"bg-accent-primary-alpha"),iconSize:Js,forbiddenSymbolsRegExp:x,forbiddenSymbolsTooltip:ie,...!Re&&{editing:Q,onSave:v,onCancel:w,validate:ne}})]})}),Fe.length>0&&!Q&&!Re&&f.jsx("div",{className:"flex-1 flex justify-end",children:f.jsx(Ft,{placement:"bottom-start",allowedPlacements:["top-start","top-end"],menu:{items:Fe},className:"sticky right-0",children:f.jsx($e,{className:"invisible group-hover/item:visible text-secondary mx-2 flex flex-row gap-2 hover:text-accent-primary",icon:f.jsx(G.IconDotsVertical,{...Y})})})})]})}),de&&W&&D(W,T+1)]})},`${k}-children`)});return f.jsx("div",{className:"flex-1 w-full h-full overflow-y-auto","aria-label":"folders-tree",children:e.length>0?D(e,0):f.jsx(rr,{title:a,description:l,icon:c})})},W7=({selectedFiles:e,actionLabels:t,onDuplicate:s,onCopy:o,onMove:i,onDownload:n,onUnshare:r,onRemoveAccess:a,onDelete:l,getCurrentFolderPath:c,sharedWithMeIds:d,sharedByMePaths:u,onClearSelection:h,forbiddenSymbolsRegExp:p})=>g.useMemo(()=>{const m=[],C=Array.from(e.values());if(!C.length||!t)return m;const v=Sl(p),w=v?C.some(b=>v.test(b.name)):!1;if(t[K.Move]&&!w&&m.push({key:K.Move,label:t[K.Move],title:t[K.Move],icon:f.jsx(ah,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>i(C)}),t[K.Copy]&&!w&&m.push({key:K.Copy,label:t[K.Copy],title:t[K.Copy],icon:f.jsx(rh,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>o(C)}),t[K.Duplicate]&&!w&&m.push({key:K.Duplicate,label:t[K.Duplicate],title:t[K.Duplicate],icon:f.jsx(G.IconCopy,{...Y,className:"text-secondary"}),onClick:()=>s(C)}),t[K.Delete]){const b=C.some(S=>S.permissions&&!S.permissions.includes($o.WRITE));m.push({key:K.Delete,label:t[K.Delete],title:t[K.Delete],icon:f.jsx(G.IconTrashX,{...Y,className:"text-secondary"}),disabled:b,tooltip:b?"Selected items contain item which can not be deleted":void 0,onClick:()=>{const S=c();l(C,S)}})}if(t[K.Download]&&!w&&m.push({key:K.Download,label:t[K.Download],title:t[K.Download],icon:f.jsx(G.IconDownload,{...Y,className:"text-secondary"}),onClick:()=>n(C)}),t[K.Unshare]&&r){const b=C.some(S=>!d?.includes(S.path));m.push({key:K.Unshare,label:t[K.Unshare],title:t[K.Unshare],disabled:b,icon:f.jsx(lh,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>{r(C),h()}})}if(t[K.RemoveAccess]&&a){const b=C.some(S=>!u?.has(S.path));m.push({key:K.RemoveAccess,label:t[K.RemoveAccess],title:t[K.RemoveAccess],disabled:b,icon:f.jsx(G.IconUserX,{size:Y.size,className:"text-secondary"}),onClick:()=>{a(C),h()}})}return m},[e,t,r,a,i,o,s,c,l,n,d,h,u,p]);function gh(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 o=Number(t);return gh(o)}const s=new Date(t);return isFinite(s.getTime())?s:null}return null}const aw=({value:e,locale:t=xv,options:s=Rv,emptyPlaceholder:o,className:i,hideTooltip:n=!1})=>{const r=gh(e),a=g.useMemo(()=>r?new Intl.DateTimeFormat(t,s).format(r):o,[r,o,t,s]),l=r?r.toISOString():void 0;return f.jsx(ht,{text:l?f.jsx("time",{dateTime:l,children:a}):f.jsx("span",{children:a}),className:ue(h8,i),hideTooltip:n})},_7=({id:e,name:t,nodeType:s,size:o,updatedAt:i,dateLocale:n,dateOptions:r,shared:a,sharedIndicatorClassName:l,hideTooltip:c=!1,forbiddenSymbolsRegExp:d,forbiddenSymbolsTooltip:u})=>f.jsx("div",{className:"flex",children:f.jsx("div",{className:"flex flex-1 min-w-0",children:f.jsx(tl,{type:s===be.FOLDER?_t.Folder:_t.File,name:t,elementId:e,shared:a,iconSize:Js,sharedIndicatorClassName:l,hideTooltip:c,forbiddenSymbolsRegExp:d,forbiddenSymbolsTooltip:u,details:f.jsxs("div",{className:"flex items-center gap-1 dial-tiny text-secondary",children:[f.jsx("span",{children:s===be.ITEM?or(o):""}),i&&o&&f.jsx(G.IconCircleFilled,{size:2,className:"text-secondary"}),i?f.jsx("span",{children:f.jsx(aw,{value:i,locale:n?.toString(),options:r,className:"dial-tiny text-secondary",hideTooltip:c})}):null]})})})}),lw=e=>(t,s,o)=>({colId:at.Name,field:"name",headerName:e,flex:1,minWidth:200,cellRenderer:i=>{const n=i.data.nodeType,{saveFolderCreation:r,validateFolderName:a,cancelFolderCreation:l,newFolderTempId:c,sharedByMePaths:d,selectedPaths:u,disabledRowIds:h}=i.context,p=d?.has(i.data.path),m=u?.has(i.data.path),C=h?.has(i.data.path)??!1,v=oe(["group-hover/grid-row:bg-accent-primary-alpha",m&&"bg-accent-primary-alpha"]);if(i.data?.isTemporary&&i.data.id===c)return f.jsx(tl,{name:"",type:_t.Folder,elementId:`new-folder-${i.data.id}`,editing:!0,shared:p,sharedIndicatorClassName:v,iconSize:Js,validate:a,onSave:r,onCancel:l,inputContainerClassName:oe(["!h-9",o&&n===be.ITEM&&"!h-10"])});const{renameTriggerView:w,renamedPath:b,renamedItem:S,getDisplayName:x,onRenameValidate:y,onRenameSave:F,onRenameCancel:R}=i.context;if(w===Ii.Grid&&b===i.data?.path&&S&&i.data){const P=x(S);return f.jsx(tl,{name:P,type:n===be.FOLDER?_t.Folder:_t.File,fileExtension:S.name.split(".").pop(),elementId:`rename-${i.data.id}`,editing:!0,shared:p,sharedIndicatorClassName:v,iconSize:Js,validate:T=>y(T,S),onSave:F,onCancel:R,inputContainerClassName:oe(["!h-9",o&&n===be.ITEM&&"!h-10"]),forbiddenSymbolsRegExp:i.context.forbiddenSymbolsRegExp})}if(o)return f.jsx(_7,{id:i.data.id,name:i.data.name,nodeType:n,size:i.data.size,shared:p,sharedIndicatorClassName:v,updatedAt:i.data.updatedAt,dateLocale:t,dateOptions:s,hideTooltip:C,forbiddenSymbolsRegExp:i.context.forbiddenSymbolsRegExp,forbiddenSymbolsTooltip:i.context.forbiddenSymbolsTooltip});const D=dh({name:i.data.name,isFolder:n===be.FOLDER},i.context.forbiddenSymbolsRegExp,i.context.forbiddenSymbolsTooltip);return n===be.FOLDER?f.jsx(cl,{name:i.data.name,shared:p,sharedIndicatorClassName:v,iconSize:Js,hideTooltip:C,isInvalidName:!!D,tooltipContent:D}):f.jsx(ll,{name:i.data.name,shared:p,sharedIndicatorClassName:v,iconSize:Js,hideTooltip:C,isInvalidName:!!D,tooltipContent:D})}}),cw=e=>(t,s)=>({colId:at.UpdatedAt,field:"updatedAt",headerName:e,width:168,suppressSizeToFit:!0,cellRenderer:o=>{const i=o.context?.disabledRowIds?.has(o.data?.path)??!1;return f.jsx(aw,{...o,hideTooltip:i})},cellRendererParams:{locale:t,options:s},filterValueGetter:o=>{const i=o.data[o.colDef.field||""],n=gh(i);return n?new Intl.DateTimeFormat(t||xv,s||Rv).format(n):""}}),dw=e=>({colId:at.Size,field:"size",headerName:e,width:120,suppressSizeToFit:!0,cellRenderer:t=>t.data.nodeType===be.ITEM?or(t.data.contentLength):"",filterValueGetter:t=>t.data.nodeType===be.ITEM?or(t.data.contentLength):""}),j7=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 U7({userColumnDefs:e,filterable:t,dateLocale:s,dateOptions:o,effectiveVisibleColumns:i,isCompactView:n,hasActions:r,actionsColumnDef:a,rootItemLabel:l,rootItemPath:c}){const d=g.useMemo(()=>[lw("Name")(s,o,n),{colId:at.Path,field:"path",headerName:"Path",flex:1,minWidth:200,cellRenderer:h=>{const p=h.context?.disabledRowIds?.has(h.data.path)??!1;let m=h.data.path;if(h.context?.hideSearchPathItemName&&(h.data.parentPath?m=h.data.parentPath:m=m.replace(/\/[^/]+\/?$/,"")||"/"),!c||!l)return f.jsx(ht,{text:m,hideTooltip:p});const C=m.replace(c,l);return f.jsx(ht,{text:C,hideTooltip:p})}},cw("Modified Date")(s,o),dw("Size"),{colId:at.Author,field:"author",headerName:"Author",width:200,suppressSizeToFit:!0,cellRenderer:h=>h.data.author},{colId:at.Owner,field:"owner",headerName:"Owner",width:200,suppressSizeToFit:!0,cellRenderer:h=>h.data.owner}],[s,o,n,l,c]);return{columnDefs:g.useMemo(()=>{const h=e?.map(C=>typeof C=="function"?C(s,o,n):C);let p=h??d;h||(p=p.filter(C=>C.colId&&i.includes(C.colId))),r&&(n&&(p=p.slice(0,1)),p.push(a));const m=C=>C.colId===at.Name;return p.map(C=>{const v={...C,filter:t?C.filter:!1,floatingFilter:t?C.floatingFilter:!1};return m(C)&&!C.suppressKeyboardEvent&&(v.suppressKeyboardEvent=j7),v})},[a,s,o,d,i,t,r,n,e])}}const uw=()=>{const e=g.useContext(Jv);if(!e)throw new Error("useFileManagerContext must be used within <FileManagerProvider>");return e},$7=({actionLabels:e,onDuplicate:t,onCopy:s,onMove:o,onDownload:i,onRename:n,onDelete:r,onInfo:a,onUnshare:l,onRemoveAccess:c,sharedWithMeIds:d,sharedByMePaths:u,onAddSibling:h,onAddChild:p,onManagePermissions:m,onPreview:C,onOpenInNewTab:v,previewExtensions:w,isRenameFileAvailable:b=!0,isDuplicateFolderAvailable:S=!0,forbiddenSymbolsRegExp:x})=>g.useMemo(()=>y=>{const F=[];if(!e)return F;const R=Sl(x)?.test(y.name);e[K.AddSibling]&&typeof h=="function"&&y.nodeType===be.FOLDER&&F.push({key:"addSibling",label:e[K.AddSibling],icon:f.jsx(Yv,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>h(y)}),e[K.AddChild]&&typeof p=="function"&&y.nodeType===be.FOLDER&&!R&&F.push({key:"addChild",label:e[K.AddChild],icon:f.jsx(Kv,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>p(y)},{key:"divider",type:Bi.Divider});const E=y.nodeType===be.ITEM||y.nodeType===be.FOLDER&&S;e[K.Duplicate]&&E&&!R&&F.push({key:K.Duplicate,label:e[K.Duplicate],icon:f.jsx(G.IconCopy,{...Y,className:"text-secondary"}),onClick:()=>t(y)}),e[K.Copy]&&!R&&F.push({key:K.Copy,label:e[K.Copy],icon:f.jsx(rh,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>s(y)}),e[K.Move]&&!R&&F.push({key:K.Move,label:e[K.Move],icon:f.jsx(ah,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>o(y)}),e[K.Download]&&!R&&F.push({key:K.Download,label:e[K.Download],icon:f.jsx(G.IconDownload,{...Y,className:"text-secondary"}),onClick:()=>i(y)}),e[K.ManagePermissions]&&typeof m=="function"&&y.nodeType===be.FOLDER&&!R&&F.push({key:K.ManagePermissions,label:e[K.ManagePermissions],icon:f.jsx(G.IconExternalLink,{...Y,className:"text-secondary"}),onClick:()=>m?.(y.path)});const D=y.name.split("."),P=D.length>1?D[D.length-1]:"",T=P&&w?.includes(`.${P}`);e[K.Preview]&&typeof C=="function"&&y.nodeType===be.ITEM&&T&&!R&&F.push({key:K.Preview,label:e[K.Preview],icon:f.jsx(G.IconEye,{...Y,className:"text-secondary"}),onClick:()=>C?.(y.path)}),e[K.OpenInNewTab]&&typeof v=="function"&&y.nodeType===be.ITEM&&!R&&F.push({key:K.OpenInNewTab,label:e[K.OpenInNewTab],icon:f.jsx(G.IconExternalLink,{...Y,className:"text-secondary"}),onClick:()=>v?.(y)});const M=!y.permissions||y.permissions.includes($o.WRITE);e[K.Delete]&&M&&F.push({key:K.Delete,label:e[K.Delete],icon:f.jsx(G.IconTrashX,{...Y,className:"text-secondary"}),onClick:()=>r(y,y.parentPath??"")});const k=y.nodeType===be.FOLDER||y.nodeType===be.ITEM&&b;return e[K.Rename]&&k&&F.push({key:K.Rename,label:e[K.Rename],icon:f.jsx(G.IconPencilMinus,{...Y,className:"text-secondary"}),onClick:()=>n(y.path)}),e[K.Info]&&y.nodeType===be.ITEM&&!R&&F.push({key:K.Info,label:e[K.Info],icon:f.jsx(G.IconInfoCircle,{...Y,className:"text-secondary"}),onClick:()=>a(y)}),e[K.Unshare]&&d?.includes(y.path)&&F.push({key:K.Unshare,label:e[K.Unshare],icon:f.jsx(lh,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>l(y)}),e[K.RemoveAccess]&&u?.has(y.path)&&c&&F.push({key:K.RemoveAccess,label:e[K.RemoveAccess],icon:f.jsx(G.IconUserX,{size:Y.size,className:"text-secondary"}),onClick:()=>c(y)}),F},[e,h,p,t,s,o,i,r,n,a,l,c,d,u,m,C,v,w,b,S,x]),hw=e=>f.jsx(iw,{...e,children:f.jsx(q7,{})}),q7=()=>{const{managerLabel:e,className:t,items:s,rootItem:o,filesLoading:i,treeOptions:n,showNavigationPanel:r,navigationPanelOptions:a,gridOptions:l,toolbarOptions:c,bulkActionsToolbarOptions:d,deleteConfirmationOptions:u,destinationFolderPopupOptions:h,conflictResolutionPopupOptions:p,compactViewWidthBreakpoint:m=jL,customBreakpointRef:C,sharedByMePaths:v,allowedFileTypes:w,maxSelectableFileSize:b,areHiddenFilesVisible:S,toggleHiddenFilesVisibility:x,isTreeCollapsed:y,toggleTreeCollapse:F,currentPath:R,gridRows:E,selectedPaths:D,selectedFiles:P,clearSelection:T,setSelectedPaths:M,effectiveSearchValue:k,handleBreadcrumbItemClick:N,handleSearchChange:A,handleTreeItemClick:W,handleTableRowClick:U,handleSelectionClick:L,onGridApiChange:de,handleOpenDestinationFolderPopup:H,handleCloseDestinationFolderPopup:te,openDestinationFolderPopup:Q,destinationFolderMode:J,handleSetCopiedFiles:me,handleSetMovedFiles:Re,handleDuplicate:ne,handleCopyTo:_,handleMoveTo:Fe,handleAddSibling:ie,handleAddChild:$,handleDownloadFiles:q,openDeleteConfirmation:se,closeDeleteConfirmation:B,confirmDelete:pe,deleteConfirmationOpen:le,itemsToDelete:re,renamedPath:Ce,renamedItem:xe,onRename:Le,onRenameSave:fe,onRenameCancel:De,onRenameValidate:ze,forbiddenSymbolsRegExp:Ne,forbiddenSymbolsTooltip:Ve,getDisplayName:kt,isDragging:Et,isDraggingOverWindow:Ut,handleDragEnter:V,handleDragLeave:Ee,handleDragOver:At,handleDrop:Xi,onUploadFiles:yl,onValidateUpload:xl,maxFileSize:Rl,newActions:uo,isNewButtonVisible:Qi,isNewButtonDisabled:qo,newFolderTempId:fr,cancelFolderCreation:Ko,saveFolderCreation:mr,validateFolderName:Cr,startFolderCreation:vr,conflictingFiles:Fl,conflictResolutionOpen:Ji,handleConflictReplace:Rs,handleConflictDuplicate:El,handleConflictCancel:Dl,handleConflictDecideForEach:ot,uploadConflictingFiles:Pl,uploadConflictResolutionOpen:Fs,handleUploadConflictReplace:en,handleUploadConflictDuplicate:tn,handleUploadConflictCancel:sn,handleUploadConflictDecideForEach:Tl,openMetadataPopup:Ml,fileMetadataPopupOptions:ds,isMetadataPopupOpen:on,selectedFileForMetadata:Yo,closeMetadataPopup:Il,onUnshareFiles:Zo,onRemoveFilesAccess:Xo,actionsRef:kl,searchInProgress:wr,isSearchMode:Qo,emptyStateIcon:br,emptyStateTitle:Sr="You don't have any files",emptyStateDescription:yr="Upload or drag and drop files",sharedWithMeIds:Jo,onFolderPopupPathChange:Al,onManagePermissions:zs,onPreview:Ll,onOpenInNewTab:nn,previewExtensions:Ol,isRenameFileAvailable:Nl,isDuplicateFolderAvailable:Dt,getDisabledTooltip:xr,fileTooLargeTooltip:et,unsupportedFileTypeTooltip:Rr,gridClassName:Hl,nonClickableTableColumns:rn,hideSearchPathItemName:Fr}=uw(),{width:Gl=GL,header:ei=BL,containerClassName:Er=OL,additionalButtons:Dr,...Pr}=n??{},[ti,Tr]=g.useState(Gl),{renameTriggerView:si,onGridRename:Bl,onTreeRename:Mr}=qL({onRename:Le}),an=g.useRef(null),Vl=j=>{an.current===null&&(an.current=requestAnimationFrame(()=>{Tr(j),an.current=null}))},{columnDefs:zl,filterable:Wl=!0,dateLocale:_l,dateOptions:jl,selectionMode:Ir,wrapCustomCellRenderers:kr,visibleColumns:Ar=UL,allowDisabledContextMenu:oi=!1,...Ws}=l??{},{containerRef:Ul,isBelowBreakpoint:vt}=KL(m,C),$l=g.useMemo(()=>Qo?[at.Name,at.Path,at.Actions]:Ar,[Qo,Ar]),ln=g.useCallback((j,We,Ke)=>JL(j,We,Ke,Rr,et),[et,Rr]),ii=g.useCallback((j,We,Ke)=>!!ln(j,We,Ke),[ln]),_s=g.useMemo(()=>{const j=new Set;for(const We of E)ii(We,w,b)&&j.add(We.path);return j},[w,b,E,ii]),Lr=g.useCallback(j=>{const We=[],Ke=[],$t=!j.parentPath,ho=Ne?.test(j.name);return n?.actionLabels&&(n.actionLabels[K.AddSibling]&&typeof ie=="function"&&j.nodeType===be.FOLDER&&!$t&&We.push({key:"addSibling",label:n.actionLabels[K.AddSibling],icon:f.jsx(Yv,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>ie([j])}),n.actionLabels[K.AddChild]&&typeof $=="function"&&j.nodeType===be.FOLDER&&!ho&&We.push({key:"addChild",label:n.actionLabels[K.AddChild],icon:f.jsx(Kv,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>$([j])}),n.actionLabels[K.Duplicate]&&!$t&&!ho&&Ke.push({key:"duplicate",label:n.actionLabels[K.Duplicate],icon:f.jsx(G.IconCopy,{...Y,className:"text-secondary"}),onClick:()=>ne([j])}),n.actionLabels[K.Copy]&&!$t&&!ho&&Ke.push({key:rt.Copy,label:n.actionLabels[K.Copy],icon:f.jsx(rh,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>{me([j]),H(rt.Copy)}}),n.actionLabels[K.Move]&&!$t&&!ho&&Ke.push({key:rt.Move,label:n.actionLabels[K.Move],icon:f.jsx(ah,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>{Re([j]),H(rt.Move)}}),n.actionLabels[K.Download]&&!$t&&!ho&&Ke.push({key:"download",label:n.actionLabels[K.Download],icon:f.jsx(G.IconDownload,{...Y,className:"text-secondary"}),onClick:()=>q([j])}),n.actionLabels[K.Rename]&&!$t&&Ke.push({key:"rename",label:n.actionLabels[K.Rename],icon:f.jsx(G.IconPencilMinus,{...Y,className:"text-secondary"}),onClick:()=>Mr(j.path)}),n.actionLabels[K.Unshare]&&Jo?.includes(j.path)&&!$t&&Ke.push({key:"unshare",label:n.actionLabels[K.Unshare],icon:f.jsx(lh,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>Zo?.([j])}),n.actionLabels[K.RemoveAccess]&&v?.has(j.path)&&!$t&&Ke.push({key:K.RemoveAccess,label:n.actionLabels[K.RemoveAccess],icon:f.jsx(G.IconUserX,{size:Y.size,className:"text-secondary"}),onClick:()=>Xo?.([j])}),n.actionLabels[K.ManagePermissions]&&typeof zs=="function"&&j.nodeType===be.FOLDER&&!$t&&Ke.push({key:K.ManagePermissions,label:n.actionLabels[K.ManagePermissions],icon:f.jsx(G.IconExternalLink,{...Y,className:"text-secondary"}),onClick:()=>zs?.(j.path)}),n.actionLabels[K.Delete]&&j.permissions?.includes($o.WRITE)&&!$t&&Ke.push({key:"delete",label:n.actionLabels[K.Delete],icon:f.jsx(G.IconTrashX,{...Y,className:"text-secondary"}),onClick:()=>se([j],j.parentPath??"")})),We.length?Ke.length===0?We:We.length===0?Ke:[...We,{key:"divider",type:Bi.Divider},...Ke]:Ke},[n?.actionLabels,ie,Ne,$,zs,ne,me,H,Re,q,Mr,Zo,Xo,Jo,v,se]),cn=g.useMemo(()=>{const j=new Set;return P.forEach((We,Ke)=>j.add(Ke)),j},[P]),Or=g.useCallback((j,We)=>{M(j),L?.(We)},[L,M]),dn=W7({selectedFiles:P,actionLabels:d?.actionLabels,onDuplicate:ne,onCopy:j=>{me(j),H(rt.Copy)},onMove:j=>{Re(j),H(rt.Move)},onDownload:q,onDelete:se,onUnshare:Zo,onRemoveAccess:Xo,getCurrentFolderPath:()=>R??"/",sharedWithMeIds:Jo,sharedByMePaths:v,onClearSelection:T,forbiddenSymbolsRegExp:Ne}),Nr=g.useCallback(j=>{c?.onTabChange?.(j),Ko()},[c,Ko]),ql=g.useCallback(()=>c&&D.size===0?f.jsxs("div",{className:yp,role:"toolbar","aria-label":"File Manager Toolbar",children:[e,f.jsx(A7,{...c,onTabChange:Nr,areHiddenFilesVisible:S,onToggleHiddenFiles:x,isNewButtonVisible:Qi,isNewButtonDisabled:qo,newButtonDropdownItems:uo})]}):D.size>0&&d?f.jsx("div",{className:yp,role:"toolbar","aria-label":"File Manager Toolbar",children:f.jsx(D7,{...d,selectedCount:D.size,onClearSelection:T,actions:dn})}):null,[Nr,d,D,T,dn,S,x,c,Qi,qo,uo,e]);g.useImperativeHandle(kl,()=>({createFolder:vr}),[vr]);const Kl=g.useCallback(()=>vt?null:f.jsx("aside",{role:"region","aria-label":"File Manager Tree Navigation",className:"min-h-0 min-w-0 h-full flex-none",children:f.jsx(of,{defaultWidth:ti,width:ti,onResizeStop:Tr,onResize:Vl,minWidth:zL,maxWidth:WL,enabled:!y,children:f.jsx(_p,{width:ti,title:ei,containerClassName:Er,titleClassName:"dial-body-text text-primary",additionalButtons:Dr,isOpened:!y,onToggle:F,children:f.jsx(z7,{...Pr,items:s,rootItemPath:o?.path,rootItemLabel:o?.label,selectedPath:R,sharedByMePaths:v,forbiddenSymbolsRegExp:Ne,forbiddenSymbolsTooltip:Ve,onItemClick:W,areHiddenFilesVisible:S,getContextMenuItems:Lr,renamedPath:si===Ii.Tree?Ce:void 0,onRenameSave:fe,onRenameCancel:De,onRenameValidate:ze})})})}),[vt,ti,y,ei,Er,Dr,F,Pr,s,o?.path,o?.label,R,v,Ne,Ve,W,S,Lr,si,Ce,fe,De,ze]),Hr=$7({actionLabels:l?.actionLabels,onDuplicate:j=>ne([j]),onCopy:j=>{me([j]),H(rt.Copy)},onMove:j=>{Re([j]),H(rt.Move)},onDownload:j=>q([j]),onRename:Bl,onDelete:(j,We)=>se([j],We),onInfo:j=>Ml(j),onUnshare:j=>Zo?.([j]),onRemoveAccess:j=>Xo?.([j]),sharedWithMeIds:Jo,sharedByMePaths:v,onAddChild:j=>$?.([j]),onAddSibling:j=>ie?.([j]),onManagePermissions:j=>zs?.(j),onPreview:j=>Ll?.(j),onOpenInNewTab:j=>nn?.(j),previewExtensions:Ol,isRenameFileAvailable:Nl,isDuplicateFolderAvailable:Dt,forbiddenSymbolsRegExp:Ne}),un=g.useCallback(j=>{const We=Go(s,j.path);return We?Hr(We):[]},[s,Hr]),Yl=g.useCallback((j,We,Ke)=>oi?!1:ii(j,We,Ke),[oi,ii]),{actionsColumnDef:Zl}=$L({getContextMenuItems:un,isRowDisabled:Yl,allowedFileTypes:w,buttonClassName:vt?"":HL}),{columnDefs:hn}=U7({userColumnDefs:zl,filterable:Wl,dateLocale:_l,dateOptions:jl,effectiveVisibleColumns:$l,isCompactView:vt,hasActions:!!l?.actionLabels,actionsColumnDef:Zl,rootItemLabel:o?.label,rootItemPath:o?.path}),gn=g.useCallback(j=>{j.colDef.colId==="ag-Grid-SelectionColumn"||j.colDef.colId===at.Actions||Ce&&j.data?.path===Ce||j.data?.isTemporary||rn&&rn.includes(j.colDef.colId)||j.data&&U(j.data)},[Ce,U,rn]),Gr=g.useCallback(()=>f.jsx(rr,{title:Sr,description:yr,descriptionClassName:"text-sm",containerClassName:"gap-3 size-full bg-layer-2 border rounded-[4px] border-primary",titleClassName:"mt-2 !text-lg",icon:br||f.jsx(G.IconFileDescription,{size:100,stroke:.5,className:"text-secondary"})}),[yr,br,Sr]),Br=g.useMemo(()=>j=>j.path,[]),Vr=g.useMemo(()=>ue(Et?"border border-dashed border-accent-primary":"",Ut&&!Et?"border border-dashed border-primary":""),[Et,Ut]),zr=g.useMemo(()=>({...Ws.additionalGridOptions,onCellClicked:gn,headerHeight:Xc,rowHeight:Xc,rowClass:"group/grid-row",defaultColDef:{...Ws.additionalGridOptions?.defaultColDef,floatingFilter:a?.searchable?!1:Ws.additionalGridOptions?.defaultColDef?.floatingFilter},...vt?{getRowHeight:j=>j.data?.nodeType===be.FOLDER?Xc:_L}:{},context:{cancelFolderCreation:Ko,saveFolderCreation:mr,getDisplayName:kt,onRenameCancel:De,onRenameSave:fe,onRenameValidate:ze,renameTriggerView:si,validateFolderName:Cr,renamedItem:xe,renamedPath:Ce,newFolderTempId:fr,sharedByMePaths:v,selectedPaths:D,disabledRowIds:_s,forbiddenSymbolsRegExp:Ne,forbiddenSymbolsTooltip:Ve,hideSearchPathItemName:Fr}}),[Ws.additionalGridOptions,gn,a?.searchable,vt,Ko,mr,kt,De,fe,ze,si,Cr,xe,Ce,fr,v,D,_s,Ne,Ve,Fr]),ni=g.useMemo(()=>E.length===0&&!Qo&&!i?Gr():f.jsx(th,{columnDefs:hn,rowData:E,getRowId:Br,loading:i||wr,getContextMenuItems:un,withoutHeaderBorders:vt,selectionOnHover:!vt,onGridApiChange:de,className:Vr,...Ws,selectionMode:Ir,wrapCustomCellRenderers:kr,additionalGridOptions:zr,selectedRowIds:cn,onSelectionChange:Or,wrapperBorder:!Et&&!Ut,disabledRowIds:_s,allowDisabledContextMenu:oi}),[E,Qo,i,Gr,hn,Br,wr,un,vt,de,Vr,Ws,Ir,kr,zr,cn,Or,Et,Ut,_s,oi]);return f.jsx("section",{ref:Ul,children:f.jsxs("div",{className:oe(kL,{"gap-3 pt-4":d&&D.size>0,"gap-4 p-3 pt-4":vt,"gap-2 pt-2":vt&&d&&D.size>0},t),children:[ql(),f.jsxs("div",{className:oe(AL,Hl),children:[Kl(),f.jsxs("div",{className:oe(LL,{"gap-3":vt}),children:[r&&f.jsx(k7,{...a??{},makeHref:j=>j.join("/"),path:R,onItemClick:N,rootItemPath:o?.path,rootItemLabel:o?.label,value:k,onSearchChange:A,isCompactView:vt,labelClassName:"dial-tiny"}),f.jsxs("section",{role:"region","aria-label":"File Manager Grid View",className:oe(NL,"relative"),onDragEnter:V,onDragLeave:Ee,onDragOver:At,onDrop:Xi,children:[ni,f.jsx(x7,{disabledGridRowIds:_s,gridRows:E,getDisabledTooltip:xr,getRowDisabledTooltip:ln,allowedFileTypes:w,maxSelectableFileSize:b})]})]})]}),f.jsx(P7,{...u,open:le,itemsToDelete:re,onClose:B,onConfirm:pe}),f.jsx(nw,{...h,open:Q,onClose:te,onConfirm:()=>{const j=h?.destinationFolderPath??"/";J===rt.Copy?_(j):Fe(j),te()},mode:J,items:s,rootItem:o,gridOptions:{columnDefs:hn.filter(j=>j.colId!==at.Actions),loading:i},onUploadFiles:yl,onValidateUpload:xl,maxFileSize:Rl,path:h?.destinationFolderPath??h?.sourceFolder??R,onPathChange:j=>{h?.setDestinationFolderPath?.(j)},sourceFolder:h?.sourceFolder??R,treeOptions:{header:n?.header},onFolderPopupPathChange:Al}),f.jsx(xp,{...p,open:Ji,onClose:Dl,onReplace:Rs,onDuplicate:El,onDecideForEach:ot,conflictingFiles:Fl}),f.jsx(xp,{...p,open:Fs,onClose:sn,onReplace:en,onDuplicate:tn,onDecideForEach:Tl,conflictingFiles:Pl}),f.jsx(N7,{open:on,onClose:Il,fileMetadata:ds?.fileMetadata??Yo,loading:ds?.loading,header:ds?.header,nameLabel:ds?.nameLabel,pathLabel:ds?.pathLabel,modifiedDateLabel:ds?.modifiedDateLabel,sizeLabel:ds?.sizeLabel,authorLabel:ds?.authorLabel,dateLocale:l?.dateLocale,dateOptions:l?.dateOptions})]})})},K7=(e,t=wi.MyFiles)=>{const s=Object.values(wi).includes(t)?t:wi.MyFiles,[o,i]=g.useState(s),n=a=>{i(a)},r=g.useMemo(()=>{if(e)return Object.values(wi).map(a=>({id:a,label:e?.[a]||a.replace("_"," ")}))},[e]);return{activeTab:o,handleTabChange:n,tabs:r}},Y7="application/octet-stream";function Z7(e,t){if(!e||e.length===0)return[];const s=e.find(l=>l.parentPath===""&&l.nodeType==="FOLDER");if(!s)return[];const o=s.path||s.url||"",i=Jc(o,!0),n=e.filter(l=>l!==s).map(l=>{const c=l.path||l.url||"",d=X7(l.nodeType),u=d===be.FOLDER,h=Jc(c,u);let p;return l.parentPath===null||l.parentPath===void 0?p=i:l.parentPath===""?p="":p=Jc(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:Q7(l.resourceType),folderId:t,updatedAt:l.updatedAt?new Date(l.updatedAt).toISOString():new Date().toISOString(),items:l.nodeType===be.FOLDER?[]:void 0};l.nodeType===be.ITEM&&(c.extension=J7(l.name),c.contentType=l.contentType||Y7,c.contentLength=l.contentLength||0),r.set(l.path,c)});const a=[];return r.forEach(l=>{if(l.parentPath===i)a.push(l);else{const c=l.path.lastIndexOf(l.name||""),d=l.path.slice(0,c),u=r.get(d);u&&u.nodeType===be.FOLDER?(u.items=u.items||[],u.items.push(l)):a.push(l)}}),a}function Jc(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 X7(e){return e.toUpperCase()==="FOLDER"?be.FOLDER:be.ITEM}function Q7(e){if(!e)return;const t=e.toUpperCase();return Object.values(ch).find(o=>o.toUpperCase()===t)}function J7(e){const t=e.split(".");return t.length>1?t[t.length-1]:""}function e9(e,t="Prompts",s="prompts/public/",o="root"){const i=Z7(e,o);return[{id:o,name:t,path:s,parentPath:"",nodeType:be.FOLDER,folderId:o,items:i}]}exports.AlertVariant=is;exports.BASE_ICON_PROPS=Y;exports.BASE_ICON_SIZE=Nt;exports.ButtonAppearance=Me;exports.ButtonVariant=Ge;exports.ConfirmationPopupVariant=Vi;exports.DIAL_ICON_SIZE=pt;exports.DialAlert=Wp;exports.DialAutocompleteInputValue=Nv;exports.DialBreadcrumb=Mv;exports.DialBreadcrumbItem=Dn;exports.DialButton=ss;exports.DialButtonDropdown=Ud;exports.DialCaptionText=ir;exports.DialCheckbox=id;exports.DialCloseButton=eh;exports.DialCollapsibleSidebar=_p;exports.DialConditionalResizableContainer=of;exports.DialConfirmationPopup=Ov;exports.DialDestinationFolderPopup=nw;exports.DialDraggableItem=N0;exports.DialDropdown=Ft;exports.DialEllipsisTooltip=ht;exports.DialErrorButton=kv;exports.DialErrorIconButton=Av;exports.DialErrorText=ns;exports.DialFileIcon=iu;exports.DialFileManager=hw;exports.DialFileManagerActions=K;exports.DialFileManagerTabs=wi;exports.DialFileName=ll;exports.DialFileNodeType=be;exports.DialFilePermission=$o;exports.DialFileResourceType=ch;exports.DialFolderName=cl;exports.DialFormItem=Xd;exports.DialFormPopup=$8;exports.DialGhostButton=E8;exports.DialGhostIconButton=A8;exports.DialGrid=th;exports.DialIcon=$e;exports.DialIconButton=no;exports.DialInput=Zi;exports.DialInputPopup=Hv;exports.DialItemType=_t;exports.DialLabel=Bo;exports.DialLabelledText=k1;exports.DialLinkButton=F8;exports.DialLoadFileArea=qv;exports.DialLoadFileAreaField=TL;exports.DialLoader=nr;exports.DialNeutralButton=ys;exports.DialNeutralIconButton=T8;exports.DialNoDataContent=rr;exports.DialNumberInput=J8;exports.DialPasswordInput=sL;exports.DialPopup=Uo;exports.DialPrimaryButton=bs;exports.DialPrimaryIconButton=P8;exports.DialRadioButton=Zd;exports.DialRadioGroup=Fa;exports.DialRadioGroupPopupField=W8;exports.DialRemoveButton=Lv;exports.DialResizableContainer=sf;exports.DialSearch=ih;exports.DialSecondaryIconButton=M8;exports.DialSelect=Vv;exports.DialSelectField=hL;exports.DialSharedEntityIndicator=Wn;exports.DialSkeleton=pi;exports.DialSkeletonAvatarShape=Ea;exports.DialSkeletonAvatarSize=Tn;exports.DialSkeletonVariant=Xt;exports.DialSteps=E1;exports.DialSuccessIconButton=k8;exports.DialSwitch=oh;exports.DialTabs=Ev;exports.DialTag=vo;exports.DialTagInput=nL;exports.DialTertiaryIconButton=I8;exports.DialTextarea=L8;exports.DialTooltip=yt;exports.DropdownItemType=Bi;exports.DropdownTrigger=Ht;exports.DropdownType=yv;exports.ElementSize=bt;exports.FileManagerColumnKey=at;exports.FileManagerProvider=iw;exports.FlexibleActionsDirection=So;exports.FormItemOrientation=zn;exports.GridSelectionMode=Vn;exports.NAME_COLUMN=lw;exports.NOT_ALLOWED_SPACES=uh;exports.NOT_ALLOWED_SPACES_REGEXP=y7;exports.NOT_ALLOWED_SYMBOLS=sw;exports.NOT_ALLOWED_SYMBOLS_REGEXP=ow;exports.PopupSize=Wt;exports.RadioGroupOrientation=To;exports.ResizableContainerSide=_n;exports.SIZE_COLUMN=dw;exports.SelectSize=Ja;exports.SelectVariant=el;exports.StepStatus=Gt;exports.TabOrientation=Xa;exports.TagVariant=sl;exports.UPDATED_AT_COLUMN=cw;exports.mergeClasses=oe;exports.useDialFileManagerTabs=K7;exports.useEditableItem=rw;exports.useFileManagerContext=uw;exports.wrapInRootFolder=e9;
|
|
64
|
+
|\r| )|[\0-]`,S7=`[${sw.replace(/\\/g,"\\\\")}]`,ow=new RegExp(`${S7}|${uh}`),y7=new RegExp(uh),iw=({managerLabel:e,children:t,className:s,items:o=[],rootItem:i,path:n,defaultPath:r,filesLoading:a,selectedPaths:l,defaultSelectedPaths:c,onSelectedPathsChange:d,showHiddenFiles:u,onShowHiddenFilesChange:h,treeOptions:p,showNavigationPanel:m=!0,navigationPanelOptions:C,deleteConfirmationOptions:v,gridOptions:w,toolbarOptions:b,bulkActionsToolbarOptions:S,destinationFolderPopupOptions:x,conflictResolutionPopupOptions:y,onPathChange:F,onTableFileClick:R,handleSelectionClick:E,onGridApiChange:D,onCopyFiles:P,onMoveToFiles:T,onDeleteFiles:M,onDownloadFiles:k,onRenameValidate:N,onAddSibling:A,onAddChild:W,renameValidationMessages:U,forbiddenSymbolsRegExp:L=ow,forbiddenSymbolsTooltip:de,onUploadFiles:H,onValidateUpload:te,uploadEnabled:Q,uploadValidationMessages:J,maxFileSize:me,onUploadArchive:Re,onCreateFolder:ne,onCreateFolderValidate:_,folderCreationValidationMessages:Fe,fileMetadataPopupOptions:ie,onGetInfo:$,onUnshareFiles:q,onRemoveFilesAccess:se,actionsRef:B,sharedByMePaths:pe,onSearchFiles:le,searchResults:re,searchInProgress:Ce,clearSearchResults:xe,allowedFileTypes:Le,maxSelectableFileSize:fe,getDisabledTooltip:De,fileTooLargeTooltip:ze,unsupportedFileTypeTooltip:Ne,emptyStateIcon:Ve,emptyStateTitle:kt,emptyStateDescription:Et,sharedWithMeIds:Ut,onFolderPopupPathChange:V,onManagePermissions:Ee,onPreview:At,onOpenInNewTab:Xi,previewExtensions:yl,isRenameFileAvailable:xl,isDuplicateFolderAvailable:Rl,customUploadFileAction:uo,customCreateNewItemAction:Qi,customDuplicateAction:qo,customDeleteItemsAction:fr,customDownloadItemsAction:Ko,customBreakpointRef:mr,gridClassName:Cr,nonClickableTableColumns:vr,hideSearchPathItemName:Fl})=>{const{selectedPaths:Ji,clearSelection:Rs,setSelectedPaths:El}=b7({selectedPaths:l,defaultSelectedPaths:c,onSelectedPathsChange:d}),Dl=g.useMemo(()=>{const Oe=new Map;return Ji.forEach(Lt=>{const Pt=Go(o,Lt);Pt&&Oe.set(Lt,Pt)}),Oe},[Ji,o]),{currentPath:ot,setCurrentPath:Pl,handlePathChange:Fs}=o7({path:n,defaultPath:r,onPathChange:F,onSelectionClear:Rs}),en=g.useMemo(()=>{const{showFiles:Oe=!0,showFolders:Lt=!0,...Pt}=w||{};return{showFiles:Oe,showFolders:Lt,...Pt}},[w]),tn=en.showFiles,sn=en.showFolders,[Tl,Ml]=g.useState(),ds=x?.destinationFolderPath??Tl,on=g.useCallback(Oe=>{x?.setDestinationFolderPath?x.setDestinationFolderPath(Oe):Ml(Oe)},[x]),{areHiddenFilesVisible:Yo,toggleHiddenFilesVisibility:Il}=e7({showHiddenFiles:u,onShowHiddenFilesChange:h}),{isTreeCollapsed:Zo,toggleTreeCollapse:Xo,setIsTreeCollapsed:kl}=t7({collapsed:p?.collapsed,onCollapseChange:p?.onCollapseChange}),{renamedPath:wr,renamedItem:Qo,renameHandler:br,renameSaveHandler:Sr,renameCancelHandler:yr,renameValidateHandler:Jo,getDisplayName:Al}=h7({items:o,onRenameValidate:N,validationMessages:U,onMoveToFiles:T}),{isSearchMode:zs,searchValue:Ll,effectiveSearchValue:nn,setSearchValue:Ol,handleSearchChange:Nl,handleSearchClear:Dt,searchResultsRows:xr}=w7({onSearchFiles:le,clearSearchResults:xe,currentPath:ot,searchResults:re,searchInProgress:Ce,navigationPanelValue:C?.value,onNavigationPanelSearchChange:C?.onSearchChange,allItems:o,activeTab:b?.activeTab}),et=g.useMemo(()=>Rp(o,ot)??o[0],[o,ot]),{handleCopyTo:Rr,handleMoveTo:Hl,handleDuplicate:rn,handleOpenDestinationFolderPopup:Fr,handleCloseDestinationFolderPopup:Gl,openDestinationFolderPopup:ei,handleSetCopiedFiles:Er,handleSetMovedFiles:Dr,destinationFolderMode:Pr,destinationFolderTitle:ti,conflictingFiles:Tr,conflictResolutionOpen:si,closeConflictResolution:Bl,handleConflictReplace:Mr,handleConflictDuplicate:an,handleConflictCancel:Vl,handleConflictDecideForEach:zl,sourceFolder:Wl}=s7({getDestinationFiles:Oe=>Rp(o,Oe)?.items??[],onCopyFiles:P,onMoveToFiles:T,onCopySuccess:Rs,onMoveSuccess:Rs,onDuplicateSuccess:Rs,getCopyHeader:x?.getCopyHeader,getMoveHeader:x?.getMoveHeader});g.useEffect(()=>{ei||on(void 0)},[ei,on]);const{deleteConfirmationOpen:_l,itemsToDelete:jl,openDeleteConfirmation:Ir,closeDeleteConfirmation:kr,confirmDelete:Ar}=i7({onDeleteFiles:M,onDeleteSuccess:Rs}),{handleDownloadFiles:oi}=n7({onDownloadFiles:k,customDownloadItemsAction:Ko,onDownloadSuccess:Rs}),{isDragging:Ws,isDraggingOverWindow:Ul,uploadError:vt,handleDragEnter:$l,handleDragLeave:ln,handleDragOver:ii,handleDrop:_s,clearError:Lr,openFileDialog:cn,fileInputRef:Or,openArchiveDialog:dn,uploadConflictingFiles:Nr,uploadConflictResolutionOpen:ql,closeUploadConflictResolution:Kl,handleUploadConflictReplace:Hr,handleUploadConflictDuplicate:un,handleUploadConflictCancel:Yl,handleUploadConflictDecideForEach:Zl}=a7({onUploadFiles:H,onValidateUpload:te,maxFileSize:me,onUploadArchive:Re,allowedFileTypes:Le,validationMessages:J,uploadEnabled:Q,currentFolder:et}),hn=g.useCallback(Oe=>{Dt();const Lt=ot??"",Pt=et?.items??[];_s(Oe,Lt,Pt)},[ot,et,_s,Dt]),gn=g.useCallback(()=>{Dt();const Oe=ot??"",Lt=et?.items??[];cn(Oe,Lt)},[ot,et,cn,Dt]),Gr=g.useCallback(()=>{Dt();const Oe=ot??"",Lt=et?.items??[];dn(Oe,Lt)},[ot,et,dn,Dt]),Br=g.useCallback(()=>{Dt(),uo?.(ot,et)},[uo,ot,et,Dt]),Vr=g.useCallback(()=>{Dt(),Qi?.(ot,et)},[Qi,ot,et,Dt]),zr=g.useCallback(Oe=>{qo?.(Oe)},[qo]),{isCreatingFolder:ni,newFolderTempId:j,startFolderCreation:We,cancelFolderCreation:Ke,saveFolderCreation:$t,validateFolderName:ho}=f7({currentFolder:et,onCreateFolder:ne,onValidateFolderName:_,validationMessages:Fe}),ph=g.useCallback(()=>{Dt(),We()},[Dt,We]),{newActions:gw,isNewButtonVisible:pw,isNewButtonDisabled:fw}=g7({newActions:b?.newActions,currentFolder:et,onUploadFiles:uo?Br:gn,onUploadArchive:Gr,onCreateFolder:ph,onCreateNewItem:Vr,isNewButtonDisabled:b?.isNewButtonDisabled}),mw=g.useMemo(()=>{if(zs){let ke=xr;tn||(ke=ke.filter(_e=>_e.nodeType!==be.ITEM)),sn||(ke=ke.filter(_e=>_e.nodeType!==be.FOLDER)),Yo||(ke=ke.filter(_e=>!_e.path.split("/").filter(Boolean).some(fn=>fn.startsWith("."))));const pn=ke.map(_e=>({..._e,id:_e.id??_e.path,name:_e.name??_e.path.split("/").pop()??"",updatedAt:_e.updatedAt,size:_e.contentLength,contentLength:_e.contentLength,author:_e.author,path:_e.path,nodeType:_e.nodeType,extension:_e.extension,isTemporary:!1,owner:_e.owner,folderId:_e.folderId}));return ni&&j&&pn.unshift({id:j,name:"",updatedAt:void 0,author:void 0,path:ot??"/",nodeType:be.FOLDER,extension:void 0,isTemporary:!0,owner:void 0}),pn}const Oe=ki(nn).trim(),Lt=et?.items??[];let Pt=Oe?ZL(et):Lt;tn||(Pt=Pt.filter(ke=>ke.nodeType!==be.ITEM)),sn||(Pt=Pt.filter(ke=>ke.nodeType!==be.FOLDER)),Yo||(Pt=Pt.filter(ke=>Oe?!ke.path.split("/").filter(Boolean).some(_e=>_e.startsWith(".")):!Zv(ke)));const Xl=Pt.map(ke=>({...ke,id:ke.id??ke.path,name:ke.name??ke.path.split("/").pop()??"",updatedAt:ke.updatedAt,size:ke.contentLength,author:ke.author,path:ke.path,nodeType:ke.nodeType,extension:ke.extension,isTemporary:!1,owner:ke.owner,contentType:ke.contentType,contentLength:ke.contentLength,folderId:ke.folderId}));if(ni&&j&&!Oe&&Xl.unshift({id:j,name:"",updatedAt:void 0,author:void 0,path:ot??"/",nodeType:be.FOLDER,extension:void 0,isTemporary:!0,owner:void 0}),!Oe)return Xl;const Tw=Oe.split(/\s+/).filter(Boolean);return Xl.filter(ke=>{if(ke.isTemporary)return!0;const pn=ki(ke.name),_e=ki(ke.author),Ch=YL(ke.extension);return Tw.every(fn=>pn.includes(fn)||_e.includes(fn)||Ch.includes(fn))})},[zs,xr,et,nn,Yo,ni,j,tn,sn,ot]),Cw=g.useCallback(Oe=>{Fs(Oe.path)},[Fs]),vw=g.useCallback(Oe=>{Fs(Oe)},[Fs]),ww=g.useCallback(Oe=>{Oe.nodeType===be.FOLDER?Fs(Oe.path):R?.(Oe)},[Fs,R]),{expandedPaths:fh,setExpandedPaths:bw,collapseAll:Sw}=tw({expandedPaths:p?.expandedPaths,onExpandedPathsChange:p?.onExpandedPathsChange}),{additionalButtons:yw}=m7({collapseAll:Sw,expandedPathsLength:fh.size,additionalButtons:p?.additionalButtons}),{isMetadataPopupOpen:xw,selectedFileForMetadata:Rw,openMetadataPopup:Fw,closeMetadataPopup:mh}=C7({onGetInfo:$}),Ew=g.useCallback(()=>{mh(),ie?.clearMetadata?.()},[mh,ie]),Dw=g.useMemo(()=>{if(L)return Sl(L)},[L]),Pw={managerLabel:e,className:s,items:o,allowedFileTypes:Le,maxSelectableFileSize:fe,rootItem:i,filesLoading:a,treeOptions:{...p,expandedPaths:fh,onExpandedPathsChange:bw,additionalButtons:yw},showNavigationPanel:m,navigationPanelOptions:C,gridOptions:en,toolbarOptions:b,bulkActionsToolbarOptions:S,deleteConfirmationOptions:v,destinationFolderPopupOptions:{...x,destinationFolderPath:ds,setDestinationFolderPath:on,header:ti,onCreateFolder:ne,onCreateFolderValidate:_,folderCreationValidationMessages:Fe,sourceFolder:Wl},currentPath:ot,setCurrentPath:Pl,searchValue:Ll,effectiveSearchValue:nn,setSearchValue:Ol,areHiddenFilesVisible:Yo,toggleHiddenFilesVisibility:Il,isTreeCollapsed:Zo,toggleTreeCollapse:Xo,setIsTreeCollapsed:kl,selectedPaths:Ji,selectedFiles:Dl,setSelectedPaths:El,clearSelection:Rs,currentFolder:et,gridRows:mw,handleCopyTo:Rr,handleMoveTo:Hl,handleDuplicate:qo?zr:rn,handleSetCopiedFiles:Er,handleSetMovedFiles:Dr,openDestinationFolderPopup:ei,handleCloseDestinationFolderPopup:Gl,handleOpenDestinationFolderPopup:Fr,destinationFolderMode:Pr,handleAddSibling:A,handleAddChild:W,handleDownloadFiles:oi,renamedPath:wr,renamedItem:Qo,forbiddenSymbolsRegExp:Dw,forbiddenSymbolsTooltip:de,onRename:br,onRenameSave:Sr,onRenameCancel:yr,onRenameValidate:Jo,getDisplayName:Al,openDeleteConfirmation:fr||Ir,closeDeleteConfirmation:kr,confirmDelete:Ar,deleteConfirmationOpen:_l,itemsToDelete:jl,handlePathChange:Fs,handleTreeItemClick:Cw,handleBreadcrumbItemClick:vw,handleSearchChange:Nl,handleTableRowClick:ww,onTableFileClick:R,handleSelectionClick:E,onGridApiChange:D,isDragging:Ws,uploadError:vt,handleDragEnter:$l,handleDragLeave:ln,handleDragOver:ii,handleDrop:hn,clearUploadError:Lr,onUploadFiles:H,onValidateUpload:te,maxFileSize:me,isDraggingOverWindow:Ul,openFileDialog:gn,fileInputRef:Or,newActions:gw,isNewButtonVisible:pw,isNewButtonDisabled:fw,isCreatingFolder:ni,newFolderTempId:j,startFolderCreation:ph,cancelFolderCreation:Ke,saveFolderCreation:$t,validateFolderName:ho,conflictResolutionPopupOptions:y,conflictingFiles:Tr,conflictResolutionOpen:si,closeConflictResolution:Bl,handleConflictReplace:Mr,handleConflictDuplicate:an,handleConflictCancel:Vl,handleConflictDecideForEach:zl,uploadConflictingFiles:Nr,uploadConflictResolutionOpen:ql,closeUploadConflictResolution:Kl,handleUploadConflictReplace:Hr,handleUploadConflictDuplicate:un,handleUploadConflictCancel:Yl,handleUploadConflictDecideForEach:Zl,fileMetadataPopupOptions:ie,isMetadataPopupOpen:xw,selectedFileForMetadata:Rw,openMetadataPopup:Fw,closeMetadataPopup:Ew,onGetInfo:$,onUnshareFiles:q,onRemoveFilesAccess:se,actionsRef:B,sharedByMePaths:pe,onSearchFiles:le,searchInProgress:Ce,searchResults:re,clearSearchResults:xe,isSearchMode:zs,emptyStateIcon:Ve,emptyStateTitle:kt,emptyStateDescription:Et,gridClassName:Cr,sharedWithMeIds:Ut,onFolderPopupPathChange:V,onManagePermissions:Ee,onPreview:At,onOpenInNewTab:Xi,previewExtensions:yl,isRenameFileAvailable:xl,isDuplicateFolderAvailable:Rl,customUploadFileAction:uo,customBreakpointRef:mr,nonClickableTableColumns:vr,hideSearchPathItemName:Fl,getDisabledTooltip:De,fileTooLargeTooltip:ze,unsupportedFileTypeTooltip:Ne};return f.jsx(Jv.Provider,{value:Pw,children:t})},x7=({disabledGridRowIds:e,gridRows:t,getDisabledTooltip:s,getRowDisabledTooltip:o,allowedFileTypes:i,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=C=>{const w=C.target.closest(".ag-row");if(!w){a(S=>S&&null);return}const b=w.getAttribute("row-id");b&&e.has(b)?a(S=>S!==b?(c(w.getBoundingClientRect()),b):S):a(S=>S&&null)},p=()=>{a(null),c(null)},m=document.querySelector('[aria-label="File Manager Grid View"]');if(m)return m.addEventListener("mousemove",h),m.addEventListener("mouseleave",p),()=>{m.removeEventListener("mousemove",h),m.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):o(d,i,n)},[d,s,o,i,n]);return f.jsx(f.Fragment,{children:u&&l&&zi.createPortal(f.jsxs(qd,{open:!0,placement:"top",children:[f.jsx(Yd,{asChild:!0,children:f.jsx("div",{className:ue("fixed z-[-1]",u&&"pointer-events-none"),style:{top:l.top,left:l.left,width:l.width,height:l.height}})}),f.jsx(Kd,{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)})},hh=()=>{const[e,t]=g.useState(fp());return g.useEffect(()=>{const s=()=>t(fp());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e},nw=({onClose:e,onConfirm:t,onFolderPopupPathChange:s,setDestinationFolderPath:o,open:i,copyLabel:n="Copy",moveLabel:r="Move",addFolderLabel:a="Add folder",mode:l=rt.Copy,hiddenFilesSwitcherLabel:c="Show hidden files",onUploadFiles:d,onValidateUpload:u,maxFileSize:h,header:p,sourceFolder:m,disabledPathTooltip:C="Unavailable for the original path. Please select another folder",path:v,collapsedFileTree:w=!1,alertProps:b,...S})=>{const[x,y]=g.useState(!1),[F,R]=g.useState(!1),E=g.useRef(null),D=hh(),P=g.useCallback(A=>{y(A)},[]),T=g.useMemo(()=>[{key:"add-folder",label:a,icon:f.jsx(G.IconFolderPlus,{...Y,className:"text-secondary"}),onClick:()=>{E.current?.createFolder(),R(!1)}},{key:"show-hidden-files",label:c,icon:f.jsx(G.IconEye,{...Y,className:"text-secondary"}),onClick:()=>{y(A=>!A),R(!1)}}],[a,c]),M=g.useCallback(A=>{A&&(s?.(A),o?.(A))},[s,o]),k=l===rt.Copy?"Copy to":"Move to",N=g.useMemo(()=>!v||!m?!1:m===v,[v,m]);return f.jsx(Uo,{open:i,onClose:()=>{e()},size:Wt.Lg,dividerFooter:!0,dividers:!1,className:"md:!h-[800px] !bg-layer-2",footer:f.jsxs("div",{className:"flex justify-between items-center gap-2 py-4 px-4 md:px-6",children:[f.jsx("div",{className:"flex items-center gap-4 min-w-0",children:D?f.jsx(Ft,{menu:{items:T},open:F,onOpenChange:R,children:f.jsx(ss,{className:"h-9 w-9 shrink-0","aria-label":"More options",iconBefore:f.jsx(G.IconDotsVertical,{...Y,className:"text-secondary"})})}):f.jsxs(f.Fragment,{children:[f.jsx(bs,{label:a,appearance:Me.Ghost,iconBefore:f.jsx(G.IconFolderPlus,{...Y}),onClick:()=>{E.current?.createFolder()}}),f.jsx("div",{className:"w-px h-[26px] bg-controls-disable-accent my-2"}),f.jsx("div",{className:"inline-flex items-center cursor-pointer",children:f.jsx(oh,{label:c,isOn:x,onChange:P,switchId:"hidden-files-switch"})})]})}),f.jsxs("div",{className:"flex space-x-4 items-center",children:[f.jsx(ys,{onClick:e,label:"Cancel"}),N?f.jsx(yt,{tooltip:C,children:f.jsx(bs,{onClick:t,label:l==="copy"?n:r,disabled:N,"aria-disabled":N})}):f.jsx(bs,{onClick:t,label:l==="copy"?n:r})]})]}),header:p??k,children:f.jsxs("div",{className:"bg-layer-2 h-full flex flex-col",children:[b&&f.jsx("div",{className:"px-4 pt-4",children:f.jsx(Wp,{...b})}),f.jsx("div",{className:"flex-1 min-h-0",children:f.jsx(hw,{...S,gridClassName:"size-full",className:oe(S.className,"bg-layer-2 h-full flex pt-0"),actionsRef:E,path:v,showHiddenFiles:x,onShowHiddenFilesChange:P,treeOptions:{...S.treeOptions,collapsed:w,expandedPaths:new Set([S.rootItem?.path||"/"]),header:S.treeOptions?.header},gridOptions:{...S.gridOptions,selectionMode:void 0},navigationPanelOptions:{elementId:"file-manager-destination-search",...S.navigationPanelOptions},onUploadFiles:d,onValidateUpload:u,onPathChange:M,maxFileSize:h})})]})})},R7=12,F7=8;var So=(e=>(e.Normal="normal",e.Reverse="reverse",e))(So||{});function E7({actions:e,direction:t=So.Normal,moreButtonWidth:s=Nt,actionsGap:o=8,containerPadding:i=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 C=Array.from(a.current.children);d.current=C.map(v=>Math.ceil(v.getBoundingClientRect().width))},[e,...n]),g.useEffect(()=>{if(!r.current)return;let C=null;const v=()=>{C&&cancelAnimationFrame(C),C=requestAnimationFrame(()=>{const b=r.current,S=l.current?.offsetWidth??0,x=c.current?.offsetWidth??0,y=S+x,R=b.getBoundingClientRect().width-y-s-o*2-i*2,E=d.current;let D=0,P=0;if(t===So.Reverse)for(let T=E.length-1;T>=0&&(D+=E[T]+o,!(D>R));T--)P++;else for(const T of E){if(D+=T+o,D>R)break;P++}h(P)})},w=new ResizeObserver(v);return w.observe(r.current),v(),()=>{C&&cancelAnimationFrame(C),w.disconnect()}},[e.length,t,...n]);const p=t===So.Reverse?e.slice(0,e.length-u):e.slice(u);return{visibleActions:t===So.Reverse?e.slice(e.length-u):e.slice(0,u),hiddenActions:p,refs:{containerRef:r,measureRef:a,leftSectionRef:l,rightSectionRef:c}}}const D7=({getSelectionLabel:e,onClearSelection:t,actions:s,selectedCount:o})=>{const i=hh(),{refs:{containerRef:n,leftSectionRef:r,measureRef:a},visibleActions:l,hiddenActions:c}=E7({actions:s,direction:So.Reverse,dependencies:[i],actionsGap:R7,containerPadding:F7}),d=e(o);return f.jsxs(f.Fragment,{children:[f.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})=>f.jsx(ys,{iconBefore:h,label:p,hideTitleOnMobile:!0},u))}),f.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:[f.jsx("div",{ref:r,children:f.jsx(bs,{label:d,onClick:t,textClassName:"text-accent-primary whitespace-nowrap",appearance:Me.Ghost,iconBefore:f.jsx(G.IconX,{...Y,className:"text-accent-primary"})})}),f.jsxs("div",{className:"flex flex-1 w-full gap-3 items-center justify-end",children:[c.length>0&&f.jsx(Ft,{menu:{items:c},allowedPlacements:["bottom","bottom-start"],children:f.jsx(ss,{className:"h-[38px]",iconBefore:f.jsx(G.IconDotsVertical,{...Y,className:"text-secondary hover:text-accent-primary"})})}),l.map(({key:u,icon:h,tooltip:p,title:m,onClick:C,disabled:v})=>f.jsx(ys,{className:"!p-[9px]",iconBefore:h,label:m,hideTitleOnMobile:!0,disabled:v,tooltipProps:{tooltip:p},onClick:w=>C?.({key:u,domEvent:w})},u))]})]})]})},P7=({open:e,itemsToDelete:t,onClose:s,onConfirm:o,cancelLabel:i="Cancel",confirmLabel:n="Delete",titleRenderer:r,contentRenderer:a})=>{const l=t.map(p=>p.name),d=r?.(l)||"Confirm Deleting Items",u=f.jsxs("div",{className:"px-6 py-3 dial-small",children:[f.jsx("p",{className:"text-secondary mb-3",children:t.length===1?f.jsxs(f.Fragment,{children:["Do you want to delete file or folder"," ",f.jsxs("span",{className:"text-primary break-all",children:['"',t[0].name,'"']}),"?"]}):f.jsxs(f.Fragment,{children:["Do you want to delete the following"," ",f.jsx("span",{className:"text-primary",children:t.length})," items?"]})}),t.length>1&&f.jsx(f.Fragment,{children:t.length<=10?f.jsx("ul",{className:"space-y-1 text-primary list-none",children:t.map(p=>f.jsx("li",{className:"truncate",children:p.name},p.path))}):f.jsxs(f.Fragment,{children:[f.jsx("ul",{className:"space-y-1 text-primary list-none mb-2",children:t.slice(0,10).map(p=>f.jsx("li",{className:"truncate",children:p.name},p.path))}),f.jsxs("p",{className:"text-secondary italic",children:["... and ",t.length-10," more"]})]})})]}),h=a?.(l)||u;return f.jsx(Ov,{open:e,header:d,confirmLabel:n,cancelLabel:i,variant:Vi.Danger,onClose:s,onConfirm:o,children:h})},Pp=e=>e.split("/").map(t=>t.trim()).filter(Boolean),T7="w-full flex items-center justify-between gap-4",M7="min-w-0 h-[38px] flex-1 overflow-hidden bg-layer-3 px-3 flex items-center rounded",I7="w-[260px]",k7=({ariaLabel:e="Breadcrumb",labelClassName:t,onItemClick:s,path:o,makeHref:i,rootItemPath:n,rootItemLabel:r,breadcrumbsHiddenPathPart:a,className:l,breadcrumbClassName:c,searchable:d=!0,value:u,elementId:h="file-manager-search",disabled:p,invalid:m,onSearchChange:C,searchClassName:v,searchContainerClassName:w,isCompactView:b=!1})=>{const S=g.useMemo(()=>{if(!o)return;let D=Pp(o);const P=[...D];let T=0;if(a){const k=Pp(a);if(k.length){const N=D.findIndex((A,W)=>k.every((U,L)=>D[W+L]===U));N!==-1&&(T=k.length,D=[...D.slice(0,N),...D.slice(N+k.length)])}}if(!D.length)return[{label:"/"}];const M=D.map((k,N)=>{const A=N<D.length-T?N:N+T,W=P.slice(0,A+1),U=typeof i=="function"?i(W,A):void 0;return{label:k,href:U,onClick:s?L=>{L.preventDefault(),s(U)}:void 0}});if(n&&r){const k=n.split("/").filter(Boolean),N=o.split("/").filter(Boolean);if(k.every((W,U)=>N[U]===W)&&M.length>0){const W=M.slice(k.length);return[{label:r,href:n,onClick:s?U=>{U.preventDefault(),s(n)}:void 0},...W]}}return M},[o,a,n,r,i,s]),[x,y]=g.useState(!1),F=g.useCallback(()=>{if(b&&!x){y(!0);const D=document.getElementById(h);D&&D.focus()}},[h,x,b]),R=g.useCallback(()=>{(!u||String(u).trim()==="")&&C?.("")},[u,C]),E=g.useCallback(()=>b&&x?f.jsx(ys,{className:"!p-[9px]",iconBefore:f.jsx(G.IconArrowLeft,{...Y}),onClick:()=>{y(!1),C?.("")}}):f.jsx("div",{className:M7,children:f.jsx(Mv,{pathItems:S,ariaLabel:e,labelClassName:t,className:c})}),[e,c,S,x,b,t,C]);return f.jsxs("div",{className:oe(T7,{"gap-3":b},l),"aria-label":"navigation-panel",children:[E(),d&&f.jsx("div",{className:oe(I7,{"w-[40px]":b&&!x,"w-full":b&&x}),role:"search","aria-label":"Search",onClick:F,children:f.jsx(ih,{id:h,value:u??"",onChange:C,disabled:p,onBlur:R,invalid:m,className:v,wrapperClassName:b&&!x?"pl-2.5":"",containerClassName:w})})]})},A7=({tabs:e,activeTab:t,onTabChange:s,areHiddenFilesVisible:o,onToggleHiddenFiles:i,isNewButtonVisible:n,isNewButtonDisabled:r,newButtonVariant:a=Ge.Primary,newButtonDropdownItems:l=[],newButtonLabel:c="New",hiddenFilesSwitcherLabel:d="Hidden files",showHiddenFilesLabel:u="Show hidden files",hideHiddenFilesLabel:h="Hide hidden files",showHiddenFilesToggle:p=!0,disabledNewButtonTooltip:m})=>{const C=hh(),v=g.useMemo(()=>[{key:"hidden-files-switch",label:o?h:u,icon:o?f.jsx(G.IconEyeOff,{...Y,className:"text-secondary"}):f.jsx(G.IconEye,{...Y,className:"text-secondary"}),onClick:()=>i?.(!o)}],[o,h,u,i]),w=()=>e&&t&&s?f.jsx(Ev,{tabs:e,activeTab:t,onClick:x=>s(x),screenThreshold:Qa.Tablet,smallScreenContainerClassName:"w-fit bg-transparent h-[38px] overflow-hidden",smallScreenDropdownItemClassName:"px-3 h-[38px]"}):null,b=()=>f.jsxs(f.Fragment,{children:[p&&f.jsxs(f.Fragment,{children:[f.jsx(oh,{switchId:"hidden-files-switch",label:d,isOn:o,onChange:i}),f.jsx("div",{className:"h-6 border-l border-primary"})]}),n&&f.jsx(yt,{tooltip:r&&m?m:void 0,children:f.jsx(Ud,{label:c,variant:a,items:l,disabled:r})})]}),S=()=>f.jsxs(f.Fragment,{children:[f.jsx(Ft,{menu:{items:v},allowedPlacements:["bottom","bottom-start"],children:f.jsx(ss,{className:"h-[38px]",iconBefore:f.jsx(G.IconDotsVertical,{...Y,className:"text-secondary hover:text-accent-primary"})})}),n?f.jsx(yt,{tooltip:r&&m?m:void 0,children:f.jsx(Ud,{label:c,variant:a,items:l,disabled:r})}):null]});return f.jsxs("div",{className:"flex w-full justify-between gap-4 items-center overflow-x-auto",children:[f.jsx("div",{className:"flex-1 min-w-0",children:w()}),f.jsx("div",{className:"flex gap-4 flex-shrink-0 items-center",children:C?S():b()})]})},L7=100,xn=16,hs="text-secondary",aa="text-primary min-w-0",O7="text-primary break-words min-w-0",Rn="bg-layer-2",N7=({open:e,onClose:t,fileMetadata:s,loading:o=!1,header:i="Information",nameLabel:n="Name:",pathLabel:r="Path:",modifiedDateLabel:a="Modified Date:",sizeLabel:l="Size:",authorLabel:c="Author:",dateLocale:d="en-US",dateOptions:u})=>f.jsx(Uo,{open:e,onClose:t,size:Wt.Sm,header:i,dividers:!1,children:f.jsx("div",{className:"px-6 py-4",children:f.jsx("div",{className:"grid gap-x-4 gap-y-4 items-center dial-small",style:{gridTemplateColumns:`${L7}px 1fr`},children:o?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:hs,children:n}),f.jsx(pi,{variant:Xt.Text,width:"100%",height:xn,className:Rn}),f.jsx("div",{className:hs,children:a}),f.jsx(pi,{variant:Xt.Text,width:"90%",height:xn,className:Rn}),f.jsx("div",{className:hs,children:l}),f.jsx(pi,{variant:Xt.Text,width:"60%",height:xn,className:Rn}),f.jsx("div",{className:hs,children:c}),f.jsx(pi,{variant:Xt.Text,width:"80%",height:xn,className:Rn}),f.jsx("div",{className:hs,children:r}),f.jsx(pi,{variant:Xt.Text,width:"70%",height:xn,className:Rn})]}):s?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:hs,children:n}),f.jsx("div",{className:aa,children:f.jsx(ht,{text:s.name})}),f.jsx("div",{className:hs,children:a}),f.jsx("div",{className:aa,children:f.jsx(ht,{text:XL(s.updatedAt,d,u)})}),f.jsx("div",{className:hs,children:l}),f.jsx("div",{className:aa,children:f.jsx(ht,{text:or(s.contentLength)})}),f.jsx("div",{className:hs,children:c}),f.jsx("div",{className:aa,children:f.jsx(ht,{text:s.author||"—"})}),f.jsx("div",{className:hs,children:r}),f.jsx("div",{className:O7,children:decodeURIComponent(s.path)})]}):null})})}),H7={size:10,stroke:2},G7=26;var _t=(e=>(e.File="file",e.Folder="folder",e))(_t||{});const B7=({name:e,type:t,shared:s=!1,loading:o=!1,sharedIndicatorClassName:i,sharedIndicatorTooltip:n,fileExtension:r,...a})=>{const l=c=>f.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[c,s&&f.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:f.jsx(Wn,{className:i,sharedIndicatorTooltip:n})})]});if(o)return l(f.jsx(nr,{}));if(t===_t.File){const c=r||(e.includes(".")?e.split(".").pop():void 0);return f.jsx(iu,{...a,extension:c??"",className:"text-secondary",indicator:s?f.jsx(Wn,{className:i,sharedIndicatorTooltip:n}):null,label:"File type icon"})}return t===_t.Folder?l(f.jsx($e,{icon:f.jsx(G.IconFolder,{className:a.className,size:a.size??Y.size,stroke:a.stroke??Y.stroke}),className:"inline-block align-middle"})):null},V7=({name:e,type:t,elementId:s,loading:o=!1,shared:i=!1,iconClassName:n,iconIndicator:r,iconLabel:a,iconSize:l,iconStroke:c,inputInvalid:d,inputInvalidMessage:u,inputContainerClassName:h,inputIconAfter:p,inputRef:m,onChange:C,sharedIndicatorClassName:v,sharedIndicatorTooltip:w,fileExtension:b})=>{const S=()=>{const x=u?.startsWith(`${is.Warning}__`);if(!d&&!x)return null;const y=u?.replace(`${is.Warning}__`,"");return f.jsx(yt,{tooltip:y,children:p||(x?f.jsx(G.IconAlertTriangleFilled,{...Y,className:"text-warning-icon","aria-label":"warning"}):f.jsx(G.IconAlertCircleFilled,{...Y,className:"text-error","aria-label":"alert"}))})};return f.jsxs("div",{className:"flex gap-2 items-center",children:[f.jsx(B7,{name:e,type:t,label:a,className:n,indicator:r,size:l,stroke:c,loading:o,shared:i,fileExtension:b,sharedIndicatorClassName:v,sharedIndicatorTooltip:w}),f.jsx(Zi,{containerClassName:oe("!h-6 py-[1px] pl-[7px] pr-[7px]",h),id:s,value:e,onChange:C,invalid:d,iconAfter:S(),inputRef:m})]})};function rw({value:e,isEditing:t,restoreOnCancel:s=!0,onValidate:o,onSave:i,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,S="")=>{c(b),u(S)},[]),m=g.useCallback(b=>{if(!o)return p(),!0;const S=o(b);return S?S.startsWith(`${is.Warning}__`)?(p(!1,S),!0):(p(!0,S),!1):(p(),!0)},[o,p]),C=g.useCallback(b=>{const S=b??"";a(S),m(S)},[m]),v=g.useCallback(()=>{m(r)?i?.(r):h.current?.focus()},[m,i,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 S=x=>{x.key==="Enter"?(x.preventDefault(),h.current?.blur()):x.key==="Escape"&&(x.preventDefault(),w())};return b.addEventListener("keydown",S),()=>b.removeEventListener("keydown",S)},[t,v,w]),g.useEffect(()=>{if(!t)return;const b=h.current;if(!b)return;const S=x=>{const y=x.relatedTarget;y&&b.contains(y)||(m(r)?v():b.focus())};return b.addEventListener("blur",S),()=>{b.removeEventListener("blur",S)}},[t,r,m,v]),{inputRef:h,value:r,onChange:C,invalid:l,invalidMessage:d}}const tl=({name:e,type:t,elementId:s,editing:o=!1,loading:i=!1,shared:n=!1,iconSize:r=Nt,validate:a,onSave:l,fileExtension:c,onCancel:d,inputContainerClassName:u,sharedIndicatorClassName:h,sharedIndicatorTooltip:p,hideTooltip:m=!1,forbiddenSymbolsRegExp:C,forbiddenSymbolsTooltip:v,...w})=>{const{value:b,invalid:S,invalidMessage:x,onChange:y,inputRef:F}=rw({value:e,isEditing:o,onValidate:a,onCancel:d,onSave:l});if(!o){const R=dh({name:e,isFolder:t===_t.Folder},C,v),E=!!R;return t===_t.Folder?f.jsx(cl,{name:e,loading:i,shared:n,iconSize:r,className:"max-w-[428px] truncate",sharedIndicatorClassName:h,hideTooltip:m,isInvalidName:E,tooltipContent:R}):f.jsx(ll,{className:"max-w-[428px]",...w,name:e,shared:n,iconSize:r,sharedIndicatorClassName:h,hideTooltip:m,isInvalidName:E,tooltipContent:R})}return f.jsx(V7,{type:t,name:b,elementId:s,inputInvalid:S,inputInvalidMessage:x,inputRef:F,onChange:y,iconSize:r,fileExtension:c,inputContainerClassName:u,sharedIndicatorTooltip:p,sharedIndicatorClassName:h})},z7=({items:e,showFiles:t=!1,expandedPaths:s,loadingPaths:o=new Set,loadedPaths:i=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:m,getContextMenuItems:C,onRenameSave:v,onRenameCancel:w,onRenameValidate:b,onExpandedPathsChange:S,forbiddenSymbolsRegExp:x,forbiddenSymbolsTooltip:y})=>{const{expandedPaths:F,togglePath:R}=tw({expandedPaths:s??new Set,onExpandedPathsChange:S}),E=P=>{m?.(P),R(P.path)},D=(P,T)=>P.map(M=>{const{path:k,nodeType:N,name:A,items:W}=M,U=N===be.FOLDER;if(!d&&Zv(M))return null;if(!U&&!t)return;const L=Array.isArray(W)&&W.length>0&&W.some($=>$.nodeType===be.FOLDER||t),de=F.has(k),H=r===k,te=o.has(k),Q=u===k,J=i.has(k),me=n.has(k),Re=p&&h&&k===p&&U,ne=b&&($=>b($,M)),_=H?"bg-accent-primary-alpha border-l-2 border-l-accent-primary rounded":"border-l-2 border-l-transparent",Fe=Re?[]:C?.(M)??[],ie=x?dh({name:M.name,isFolder:U},x,y):void 0;return f.jsx("div",{className:"cursor-pointer text-secondary",children:f.jsxs("div",{className:"flex flex-col w-full","aria-label":"folder",children:[f.jsx(Ft,{trigger:[Ht.ContextMenu],className:"w-full",anchorToMouse:!0,menu:{items:Fe},children:f.jsxs("div",{style:{paddingLeft:`${T*G7}px`},className:oe("py-1 gap-[2px] dial-small flex justify-between hover:bg-accent-primary-alpha rounded group/item w-full mb-[2px] relative",_),"aria-selected":H,children:[!Q&&f.jsx("div",{className:"absolute size-full left-0 top-0 z-0",onClick:()=>E(M)}),f.jsx("div",{className:"relative flex flex-row truncate items-center w-fit h-6 gap-x-1 pl-1",onClick:()=>!Q&&E(M),children:f.jsxs(f.Fragment,{children:[U&&f.jsx(G.IconCaretRightFilled,{...H7,className:ue("flex-shrink-0",de&&"rotate-90 transition-all",J&&!L&&"text-transparent")}),f.jsx(tl,{elementId:`${k}-tree-item`,name:Re?h:A,type:U?_t.Folder:_t.File,loading:te,shared:me,sharedIndicatorClassName:oe("group-hover/item:bg-accent-primary-alpha",H&&"bg-accent-primary-alpha"),iconSize:Js,forbiddenSymbolsRegExp:x,forbiddenSymbolsTooltip:ie,...!Re&&{editing:Q,onSave:v,onCancel:w,validate:ne}})]})}),Fe.length>0&&!Q&&!Re&&f.jsx("div",{className:"flex-1 flex justify-end",children:f.jsx(Ft,{placement:"bottom-start",allowedPlacements:["top-start","top-end"],menu:{items:Fe},className:"sticky right-0",children:f.jsx($e,{className:"invisible group-hover/item:visible text-secondary mx-2 flex flex-row gap-2 hover:text-accent-primary",icon:f.jsx(G.IconDotsVertical,{...Y})})})})]})}),de&&W&&D(W,T+1)]})},`${k}-children`)});return f.jsx("div",{className:"flex-1 w-full h-full overflow-y-auto","aria-label":"folders-tree",children:e.length>0?D(e,0):f.jsx(rr,{title:a,description:l,icon:c})})},W7=({selectedFiles:e,actionLabels:t,onDuplicate:s,onCopy:o,onMove:i,onDownload:n,onUnshare:r,onRemoveAccess:a,onDelete:l,getCurrentFolderPath:c,sharedWithMeIds:d,sharedByMePaths:u,onClearSelection:h,forbiddenSymbolsRegExp:p})=>g.useMemo(()=>{const m=[],C=Array.from(e.values());if(!C.length||!t)return m;const v=Sl(p),w=v?C.some(b=>v.test(b.name)):!1;if(t[K.Move]&&!w&&m.push({key:K.Move,label:t[K.Move],title:t[K.Move],icon:f.jsx(ah,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>i(C)}),t[K.Copy]&&!w&&m.push({key:K.Copy,label:t[K.Copy],title:t[K.Copy],icon:f.jsx(rh,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>o(C)}),t[K.Duplicate]&&!w&&m.push({key:K.Duplicate,label:t[K.Duplicate],title:t[K.Duplicate],icon:f.jsx(G.IconCopy,{...Y,className:"text-secondary"}),onClick:()=>s(C)}),t[K.Delete]){const b=C.some(S=>S.permissions&&!S.permissions.includes($o.WRITE));m.push({key:K.Delete,label:t[K.Delete],title:t[K.Delete],icon:f.jsx(G.IconTrashX,{...Y,className:"text-secondary"}),disabled:b,tooltip:b?"Selected items contain item which can not be deleted":void 0,onClick:()=>{const S=c();l(C,S)}})}if(t[K.Download]&&!w&&m.push({key:K.Download,label:t[K.Download],title:t[K.Download],icon:f.jsx(G.IconDownload,{...Y,className:"text-secondary"}),onClick:()=>n(C)}),t[K.Unshare]&&r){const b=C.some(S=>!d?.includes(S.path));m.push({key:K.Unshare,label:t[K.Unshare],title:t[K.Unshare],disabled:b,icon:f.jsx(lh,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>{r(C),h()}})}if(t[K.RemoveAccess]&&a){const b=C.some(S=>!u?.has(S.path));m.push({key:K.RemoveAccess,label:t[K.RemoveAccess],title:t[K.RemoveAccess],disabled:b,icon:f.jsx(G.IconUserX,{size:Y.size,className:"text-secondary"}),onClick:()=>{a(C),h()}})}return m},[e,t,r,a,i,o,s,c,l,n,d,h,u,p]);function gh(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 o=Number(t);return gh(o)}const s=new Date(t);return isFinite(s.getTime())?s:null}return null}const aw=({value:e,locale:t=xv,options:s=Rv,emptyPlaceholder:o,className:i,hideTooltip:n=!1})=>{const r=gh(e),a=g.useMemo(()=>r?new Intl.DateTimeFormat(t,s).format(r):o,[r,o,t,s]),l=r?r.toISOString():void 0;return f.jsx(ht,{text:l?f.jsx("time",{dateTime:l,children:a}):f.jsx("span",{children:a}),className:ue(h8,i),hideTooltip:n})},_7=({id:e,name:t,nodeType:s,size:o,updatedAt:i,dateLocale:n,dateOptions:r,shared:a,sharedIndicatorClassName:l,hideTooltip:c=!1,forbiddenSymbolsRegExp:d,forbiddenSymbolsTooltip:u})=>f.jsx("div",{className:"flex",children:f.jsx("div",{className:"flex flex-1 min-w-0",children:f.jsx(tl,{type:s===be.FOLDER?_t.Folder:_t.File,name:t,elementId:e,shared:a,iconSize:Js,sharedIndicatorClassName:l,hideTooltip:c,forbiddenSymbolsRegExp:d,forbiddenSymbolsTooltip:u,details:f.jsxs("div",{className:"flex items-center gap-1 dial-tiny text-secondary",children:[f.jsx("span",{children:s===be.ITEM?or(o):""}),i&&o&&f.jsx(G.IconCircleFilled,{size:2,className:"text-secondary"}),i?f.jsx("span",{children:f.jsx(aw,{value:i,locale:n?.toString(),options:r,className:"dial-tiny text-secondary",hideTooltip:c})}):null]})})})}),lw=e=>(t,s,o)=>({colId:at.Name,field:"name",headerName:e,flex:1,minWidth:200,cellRenderer:i=>{const n=i.data.nodeType,{saveFolderCreation:r,validateFolderName:a,cancelFolderCreation:l,newFolderTempId:c,sharedByMePaths:d,selectedPaths:u,disabledRowIds:h}=i.context,p=d?.has(i.data.path),m=u?.has(i.data.path),C=h?.has(i.data.path)??!1,v=oe(["group-hover/grid-row:bg-accent-primary-alpha",m&&"bg-accent-primary-alpha"]);if(i.data?.isTemporary&&i.data.id===c)return f.jsx(tl,{name:"",type:_t.Folder,elementId:`new-folder-${i.data.id}`,editing:!0,shared:p,sharedIndicatorClassName:v,iconSize:Js,validate:a,onSave:r,onCancel:l,inputContainerClassName:oe(["!h-9",o&&n===be.ITEM&&"!h-10"])});const{renameTriggerView:w,renamedPath:b,renamedItem:S,getDisplayName:x,onRenameValidate:y,onRenameSave:F,onRenameCancel:R}=i.context;if(w===Ii.Grid&&b===i.data?.path&&S&&i.data){const P=x(S);return f.jsx(tl,{name:P,type:n===be.FOLDER?_t.Folder:_t.File,fileExtension:S.name.split(".").pop(),elementId:`rename-${i.data.id}`,editing:!0,shared:p,sharedIndicatorClassName:v,iconSize:Js,validate:T=>y(T,S),onSave:F,onCancel:R,inputContainerClassName:oe(["!h-9",o&&n===be.ITEM&&"!h-10"]),forbiddenSymbolsRegExp:i.context.forbiddenSymbolsRegExp})}if(o)return f.jsx(_7,{id:i.data.id,name:i.data.name,nodeType:n,size:i.data.size,shared:p,sharedIndicatorClassName:v,updatedAt:i.data.updatedAt,dateLocale:t,dateOptions:s,hideTooltip:C,forbiddenSymbolsRegExp:i.context.forbiddenSymbolsRegExp,forbiddenSymbolsTooltip:i.context.forbiddenSymbolsTooltip});const D=dh({name:i.data.name,isFolder:n===be.FOLDER},i.context.forbiddenSymbolsRegExp,i.context.forbiddenSymbolsTooltip);return n===be.FOLDER?f.jsx(cl,{name:i.data.name,shared:p,sharedIndicatorClassName:v,iconSize:Js,hideTooltip:C,isInvalidName:!!D,tooltipContent:D}):f.jsx(ll,{name:i.data.name,shared:p,sharedIndicatorClassName:v,iconSize:Js,hideTooltip:C,isInvalidName:!!D,tooltipContent:D})}}),cw=e=>(t,s)=>({colId:at.UpdatedAt,field:"updatedAt",headerName:e,width:168,suppressSizeToFit:!0,cellRenderer:o=>{const i=o.context?.disabledRowIds?.has(o.data?.path)??!1;return f.jsx(aw,{...o,hideTooltip:i})},cellRendererParams:{locale:t,options:s},filterValueGetter:o=>{const i=o.data[o.colDef.field||""],n=gh(i);return n?new Intl.DateTimeFormat(t||xv,s||Rv).format(n):""}}),dw=e=>({colId:at.Size,field:"size",headerName:e,width:120,suppressSizeToFit:!0,cellRenderer:t=>t.data.nodeType===be.ITEM?or(t.data.contentLength):"",filterValueGetter:t=>t.data.nodeType===be.ITEM?or(t.data.contentLength):""}),j7=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 U7({userColumnDefs:e,filterable:t,dateLocale:s,dateOptions:o,effectiveVisibleColumns:i,isCompactView:n,hasActions:r,actionsColumnDef:a,rootItemLabel:l,rootItemPath:c}){const d=g.useMemo(()=>[lw("Name")(s,o,n),{colId:at.Path,field:"path",headerName:"Path",flex:1,minWidth:200,cellRenderer:h=>{const p=h.context?.disabledRowIds?.has(h.data.path)??!1;let m=h.data.path;if(h.context?.hideSearchPathItemName&&(h.data.parentPath?m=h.data.parentPath:m=m.replace(/\/[^/]+\/?$/,"")||"/"),!c||!l)return f.jsx(ht,{text:m,hideTooltip:p});const C=m.replace(c,l);return f.jsx(ht,{text:C,hideTooltip:p})}},cw("Modified Date")(s,o),dw("Size"),{colId:at.Author,field:"author",headerName:"Author",width:200,suppressSizeToFit:!0,cellRenderer:h=>h.data.author},{colId:at.Owner,field:"owner",headerName:"Owner",width:200,suppressSizeToFit:!0,cellRenderer:h=>h.data.owner}],[s,o,n,l,c]);return{columnDefs:g.useMemo(()=>{const h=e?.map(C=>typeof C=="function"?C(s,o,n):C);let p=h??d;h||(p=p.filter(C=>C.colId&&i.includes(C.colId))),r&&(n&&(p=p.slice(0,1)),p.push(a));const m=C=>C.colId===at.Name;return p.map(C=>{const v={...C,filter:t?C.filter:!1,floatingFilter:t?C.floatingFilter:!1};return m(C)&&!C.suppressKeyboardEvent&&(v.suppressKeyboardEvent=j7),v})},[a,s,o,d,i,t,r,n,e])}}const uw=()=>{const e=g.useContext(Jv);if(!e)throw new Error("useFileManagerContext must be used within <FileManagerProvider>");return e},$7=({actionLabels:e,onDuplicate:t,onCopy:s,onMove:o,onDownload:i,onRename:n,onDelete:r,onInfo:a,onUnshare:l,onRemoveAccess:c,sharedWithMeIds:d,sharedByMePaths:u,onAddSibling:h,onAddChild:p,onManagePermissions:m,onPreview:C,onOpenInNewTab:v,previewExtensions:w,isRenameFileAvailable:b=!0,isDuplicateFolderAvailable:S=!0,forbiddenSymbolsRegExp:x})=>g.useMemo(()=>y=>{const F=[];if(!e)return F;const R=Sl(x)?.test(y.name);e[K.AddSibling]&&typeof h=="function"&&y.nodeType===be.FOLDER&&F.push({key:"addSibling",label:e[K.AddSibling],icon:f.jsx(Yv,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>h(y)}),e[K.AddChild]&&typeof p=="function"&&y.nodeType===be.FOLDER&&!R&&F.push({key:"addChild",label:e[K.AddChild],icon:f.jsx(Kv,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>p(y)},{key:"divider",type:Bi.Divider});const E=y.nodeType===be.ITEM||y.nodeType===be.FOLDER&&S;e[K.Duplicate]&&E&&!R&&F.push({key:K.Duplicate,label:e[K.Duplicate],icon:f.jsx(G.IconCopy,{...Y,className:"text-secondary"}),onClick:()=>t(y)}),e[K.Copy]&&!R&&F.push({key:K.Copy,label:e[K.Copy],icon:f.jsx(rh,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>s(y)}),e[K.Move]&&!R&&F.push({key:K.Move,label:e[K.Move],icon:f.jsx(ah,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>o(y)}),e[K.Download]&&!R&&F.push({key:K.Download,label:e[K.Download],icon:f.jsx(G.IconDownload,{...Y,className:"text-secondary"}),onClick:()=>i(y)}),e[K.ManagePermissions]&&typeof m=="function"&&y.nodeType===be.FOLDER&&!R&&F.push({key:K.ManagePermissions,label:e[K.ManagePermissions],icon:f.jsx(G.IconExternalLink,{...Y,className:"text-secondary"}),onClick:()=>m?.(y.path)});const D=y.name.split("."),P=D.length>1?D[D.length-1]:"",T=P&&w?.includes(`.${P}`);e[K.Preview]&&typeof C=="function"&&y.nodeType===be.ITEM&&T&&!R&&F.push({key:K.Preview,label:e[K.Preview],icon:f.jsx(G.IconEye,{...Y,className:"text-secondary"}),onClick:()=>C?.(y.path)}),e[K.OpenInNewTab]&&typeof v=="function"&&y.nodeType===be.ITEM&&!R&&F.push({key:K.OpenInNewTab,label:e[K.OpenInNewTab],icon:f.jsx(G.IconExternalLink,{...Y,className:"text-secondary"}),onClick:()=>v?.(y)});const M=!y.permissions||y.permissions.includes($o.WRITE);e[K.Delete]&&M&&F.push({key:K.Delete,label:e[K.Delete],icon:f.jsx(G.IconTrashX,{...Y,className:"text-secondary"}),onClick:()=>r(y,y.parentPath??"")});const k=y.nodeType===be.FOLDER||y.nodeType===be.ITEM&&b;return e[K.Rename]&&k&&F.push({key:K.Rename,label:e[K.Rename],icon:f.jsx(G.IconPencilMinus,{...Y,className:"text-secondary"}),onClick:()=>n(y.path)}),e[K.Info]&&y.nodeType===be.ITEM&&!R&&F.push({key:K.Info,label:e[K.Info],icon:f.jsx(G.IconInfoCircle,{...Y,className:"text-secondary"}),onClick:()=>a(y)}),e[K.Unshare]&&d?.includes(y.path)&&F.push({key:K.Unshare,label:e[K.Unshare],icon:f.jsx(lh,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>l(y)}),e[K.RemoveAccess]&&u?.has(y.path)&&c&&F.push({key:K.RemoveAccess,label:e[K.RemoveAccess],icon:f.jsx(G.IconUserX,{size:Y.size,className:"text-secondary"}),onClick:()=>c(y)}),F},[e,h,p,t,s,o,i,r,n,a,l,c,d,u,m,C,v,w,b,S,x]),hw=e=>f.jsx(iw,{...e,children:f.jsx(q7,{})}),q7=()=>{const{managerLabel:e,className:t,items:s,rootItem:o,filesLoading:i,treeOptions:n,showNavigationPanel:r,navigationPanelOptions:a,gridOptions:l,toolbarOptions:c,bulkActionsToolbarOptions:d,deleteConfirmationOptions:u,destinationFolderPopupOptions:h,conflictResolutionPopupOptions:p,compactViewWidthBreakpoint:m=jL,customBreakpointRef:C,sharedByMePaths:v,allowedFileTypes:w,maxSelectableFileSize:b,areHiddenFilesVisible:S,toggleHiddenFilesVisibility:x,isTreeCollapsed:y,toggleTreeCollapse:F,currentPath:R,gridRows:E,selectedPaths:D,selectedFiles:P,clearSelection:T,setSelectedPaths:M,effectiveSearchValue:k,handleBreadcrumbItemClick:N,handleSearchChange:A,handleTreeItemClick:W,handleTableRowClick:U,handleSelectionClick:L,onGridApiChange:de,handleOpenDestinationFolderPopup:H,handleCloseDestinationFolderPopup:te,openDestinationFolderPopup:Q,destinationFolderMode:J,handleSetCopiedFiles:me,handleSetMovedFiles:Re,handleDuplicate:ne,handleCopyTo:_,handleMoveTo:Fe,handleAddSibling:ie,handleAddChild:$,handleDownloadFiles:q,openDeleteConfirmation:se,closeDeleteConfirmation:B,confirmDelete:pe,deleteConfirmationOpen:le,itemsToDelete:re,renamedPath:Ce,renamedItem:xe,onRename:Le,onRenameSave:fe,onRenameCancel:De,onRenameValidate:ze,forbiddenSymbolsRegExp:Ne,forbiddenSymbolsTooltip:Ve,getDisplayName:kt,isDragging:Et,isDraggingOverWindow:Ut,handleDragEnter:V,handleDragLeave:Ee,handleDragOver:At,handleDrop:Xi,onUploadFiles:yl,onValidateUpload:xl,maxFileSize:Rl,newActions:uo,isNewButtonVisible:Qi,isNewButtonDisabled:qo,newFolderTempId:fr,cancelFolderCreation:Ko,saveFolderCreation:mr,validateFolderName:Cr,startFolderCreation:vr,conflictingFiles:Fl,conflictResolutionOpen:Ji,handleConflictReplace:Rs,handleConflictDuplicate:El,handleConflictCancel:Dl,handleConflictDecideForEach:ot,uploadConflictingFiles:Pl,uploadConflictResolutionOpen:Fs,handleUploadConflictReplace:en,handleUploadConflictDuplicate:tn,handleUploadConflictCancel:sn,handleUploadConflictDecideForEach:Tl,openMetadataPopup:Ml,fileMetadataPopupOptions:ds,isMetadataPopupOpen:on,selectedFileForMetadata:Yo,closeMetadataPopup:Il,onUnshareFiles:Zo,onRemoveFilesAccess:Xo,actionsRef:kl,searchInProgress:wr,isSearchMode:Qo,emptyStateIcon:br,emptyStateTitle:Sr="You don't have any files",emptyStateDescription:yr="Upload or drag and drop files",sharedWithMeIds:Jo,onFolderPopupPathChange:Al,onManagePermissions:zs,onPreview:Ll,onOpenInNewTab:nn,previewExtensions:Ol,isRenameFileAvailable:Nl,isDuplicateFolderAvailable:Dt,getDisabledTooltip:xr,fileTooLargeTooltip:et,unsupportedFileTypeTooltip:Rr,gridClassName:Hl,nonClickableTableColumns:rn,hideSearchPathItemName:Fr}=uw(),{width:Gl=GL,header:ei=BL,containerClassName:Er=OL,additionalButtons:Dr,...Pr}=n??{},[ti,Tr]=g.useState(Gl),{renameTriggerView:si,onGridRename:Bl,onTreeRename:Mr}=qL({onRename:Le}),an=g.useRef(null),Vl=j=>{an.current===null&&(an.current=requestAnimationFrame(()=>{Tr(j),an.current=null}))},{columnDefs:zl,filterable:Wl=!0,dateLocale:_l,dateOptions:jl,selectionMode:Ir,wrapCustomCellRenderers:kr,visibleColumns:Ar=UL,allowDisabledContextMenu:oi=!1,...Ws}=l??{},{containerRef:Ul,isBelowBreakpoint:vt}=KL(m,C),$l=g.useMemo(()=>Qo?[at.Name,at.Path,at.Actions]:Ar,[Qo,Ar]),ln=g.useCallback((j,We,Ke)=>JL(j,We,Ke,Rr,et),[et,Rr]),ii=g.useCallback((j,We,Ke)=>!!ln(j,We,Ke),[ln]),_s=g.useMemo(()=>{const j=new Set;for(const We of E)ii(We,w,b)&&j.add(We.path);return j},[w,b,E,ii]),Lr=g.useCallback(j=>{const We=[],Ke=[],$t=!j.parentPath,ho=Ne?.test(j.name);return n?.actionLabels&&(n.actionLabels[K.AddSibling]&&typeof ie=="function"&&j.nodeType===be.FOLDER&&!$t&&We.push({key:"addSibling",label:n.actionLabels[K.AddSibling],icon:f.jsx(Yv,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>ie([j])}),n.actionLabels[K.AddChild]&&typeof $=="function"&&j.nodeType===be.FOLDER&&!ho&&We.push({key:"addChild",label:n.actionLabels[K.AddChild],icon:f.jsx(Kv,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>$([j])}),n.actionLabels[K.Duplicate]&&!$t&&!ho&&Ke.push({key:"duplicate",label:n.actionLabels[K.Duplicate],icon:f.jsx(G.IconCopy,{...Y,className:"text-secondary"}),onClick:()=>ne([j])}),n.actionLabels[K.Copy]&&!$t&&!ho&&Ke.push({key:rt.Copy,label:n.actionLabels[K.Copy],icon:f.jsx(rh,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>{me([j]),H(rt.Copy)}}),n.actionLabels[K.Move]&&!$t&&!ho&&Ke.push({key:rt.Move,label:n.actionLabels[K.Move],icon:f.jsx(ah,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>{Re([j]),H(rt.Move)}}),n.actionLabels[K.Download]&&!$t&&!ho&&Ke.push({key:"download",label:n.actionLabels[K.Download],icon:f.jsx(G.IconDownload,{...Y,className:"text-secondary"}),onClick:()=>q([j])}),n.actionLabels[K.Rename]&&!$t&&Ke.push({key:"rename",label:n.actionLabels[K.Rename],icon:f.jsx(G.IconPencilMinus,{...Y,className:"text-secondary"}),onClick:()=>Mr(j.path)}),n.actionLabels[K.Unshare]&&Jo?.includes(j.path)&&!$t&&Ke.push({key:"unshare",label:n.actionLabels[K.Unshare],icon:f.jsx(lh,{width:Y.size,height:Y.size,className:"text-secondary"}),onClick:()=>Zo?.([j])}),n.actionLabels[K.RemoveAccess]&&v?.has(j.path)&&!$t&&Ke.push({key:K.RemoveAccess,label:n.actionLabels[K.RemoveAccess],icon:f.jsx(G.IconUserX,{size:Y.size,className:"text-secondary"}),onClick:()=>Xo?.([j])}),n.actionLabels[K.ManagePermissions]&&typeof zs=="function"&&j.nodeType===be.FOLDER&&!$t&&Ke.push({key:K.ManagePermissions,label:n.actionLabels[K.ManagePermissions],icon:f.jsx(G.IconExternalLink,{...Y,className:"text-secondary"}),onClick:()=>zs?.(j.path)}),n.actionLabels[K.Delete]&&j.permissions?.includes($o.WRITE)&&!$t&&Ke.push({key:"delete",label:n.actionLabels[K.Delete],icon:f.jsx(G.IconTrashX,{...Y,className:"text-secondary"}),onClick:()=>se([j],j.parentPath??"")})),We.length?Ke.length===0?We:We.length===0?Ke:[...We,{key:"divider",type:Bi.Divider},...Ke]:Ke},[n?.actionLabels,ie,Ne,$,zs,ne,me,H,Re,q,Mr,Zo,Xo,Jo,v,se]),cn=g.useMemo(()=>{const j=new Set;return P.forEach((We,Ke)=>j.add(Ke)),j},[P]),Or=g.useCallback((j,We)=>{M(j),L?.(We)},[L,M]),dn=W7({selectedFiles:P,actionLabels:d?.actionLabels,onDuplicate:ne,onCopy:j=>{me(j),H(rt.Copy)},onMove:j=>{Re(j),H(rt.Move)},onDownload:q,onDelete:se,onUnshare:Zo,onRemoveAccess:Xo,getCurrentFolderPath:()=>R??"/",sharedWithMeIds:Jo,sharedByMePaths:v,onClearSelection:T,forbiddenSymbolsRegExp:Ne}),Nr=g.useCallback(j=>{c?.onTabChange?.(j),Ko()},[c,Ko]),ql=g.useCallback(()=>c&&D.size===0?f.jsxs("div",{className:yp,role:"toolbar","aria-label":"File Manager Toolbar",children:[e,f.jsx(A7,{...c,onTabChange:Nr,areHiddenFilesVisible:S,onToggleHiddenFiles:x,isNewButtonVisible:Qi,isNewButtonDisabled:qo,newButtonDropdownItems:uo})]}):D.size>0&&d?f.jsx("div",{className:yp,role:"toolbar","aria-label":"File Manager Toolbar",children:f.jsx(D7,{...d,selectedCount:D.size,onClearSelection:T,actions:dn})}):null,[Nr,d,D,T,dn,S,x,c,Qi,qo,uo,e]);g.useImperativeHandle(kl,()=>({createFolder:vr}),[vr]);const Kl=g.useCallback(()=>vt?null:f.jsx("aside",{role:"region","aria-label":"File Manager Tree Navigation",className:"min-h-0 min-w-0 h-full flex-none",children:f.jsx(of,{defaultWidth:ti,width:ti,onResizeStop:Tr,onResize:Vl,minWidth:zL,maxWidth:WL,enabled:!y,children:f.jsx(_p,{width:ti,title:ei,containerClassName:Er,titleClassName:"dial-body-text text-primary",additionalButtons:Dr,isOpened:!y,onToggle:F,children:f.jsx(z7,{...Pr,items:s,rootItemPath:o?.path,rootItemLabel:o?.label,selectedPath:R,sharedByMePaths:v,forbiddenSymbolsRegExp:Ne,forbiddenSymbolsTooltip:Ve,onItemClick:W,areHiddenFilesVisible:S,getContextMenuItems:Lr,renamedPath:si===Ii.Tree?Ce:void 0,onRenameSave:fe,onRenameCancel:De,onRenameValidate:ze})})})}),[vt,ti,y,ei,Er,Dr,F,Pr,s,o?.path,o?.label,R,v,Ne,Ve,W,S,Lr,si,Ce,fe,De,ze]),Hr=$7({actionLabels:l?.actionLabels,onDuplicate:j=>ne([j]),onCopy:j=>{me([j]),H(rt.Copy)},onMove:j=>{Re([j]),H(rt.Move)},onDownload:j=>q([j]),onRename:Bl,onDelete:(j,We)=>se([j],We),onInfo:j=>Ml(j),onUnshare:j=>Zo?.([j]),onRemoveAccess:j=>Xo?.([j]),sharedWithMeIds:Jo,sharedByMePaths:v,onAddChild:j=>$?.([j]),onAddSibling:j=>ie?.([j]),onManagePermissions:j=>zs?.(j),onPreview:j=>Ll?.(j),onOpenInNewTab:j=>nn?.(j),previewExtensions:Ol,isRenameFileAvailable:Nl,isDuplicateFolderAvailable:Dt,forbiddenSymbolsRegExp:Ne}),un=g.useCallback(j=>{const We=Go(s,j.path);return We?Hr(We):[]},[s,Hr]),Yl=g.useCallback((j,We,Ke)=>oi?!1:ii(j,We,Ke),[oi,ii]),{actionsColumnDef:Zl}=$L({getContextMenuItems:un,isRowDisabled:Yl,allowedFileTypes:w,buttonClassName:vt?"":HL}),{columnDefs:hn}=U7({userColumnDefs:zl,filterable:Wl,dateLocale:_l,dateOptions:jl,effectiveVisibleColumns:$l,isCompactView:vt,hasActions:!!l?.actionLabels,actionsColumnDef:Zl,rootItemLabel:o?.label,rootItemPath:o?.path}),gn=g.useCallback(j=>{j.colDef.colId==="ag-Grid-SelectionColumn"||j.colDef.colId===at.Actions||Ce&&j.data?.path===Ce||j.data?.isTemporary||rn&&rn.includes(j.colDef.colId)||j.data&&U(j.data)},[Ce,U,rn]),Gr=g.useCallback(()=>f.jsx(rr,{title:Sr,description:yr,descriptionClassName:"text-sm",containerClassName:"gap-3 size-full bg-layer-2 border rounded-[4px] border-primary",titleClassName:"mt-2 !text-lg",icon:br||f.jsx(G.IconFileDescription,{size:100,stroke:.5,className:"text-secondary"})}),[yr,br,Sr]),Br=g.useMemo(()=>j=>j.path,[]),Vr=g.useMemo(()=>ue(Et?"border border-dashed border-accent-primary":"",Ut&&!Et?"border border-dashed border-primary":""),[Et,Ut]),zr=g.useMemo(()=>({...Ws.additionalGridOptions,onCellClicked:gn,headerHeight:Xc,rowHeight:Xc,rowClass:"group/grid-row",defaultColDef:{...Ws.additionalGridOptions?.defaultColDef,floatingFilter:a?.searchable?!1:Ws.additionalGridOptions?.defaultColDef?.floatingFilter},...vt?{getRowHeight:j=>j.data?.nodeType===be.FOLDER?Xc:_L}:{},context:{cancelFolderCreation:Ko,saveFolderCreation:mr,getDisplayName:kt,onRenameCancel:De,onRenameSave:fe,onRenameValidate:ze,renameTriggerView:si,validateFolderName:Cr,renamedItem:xe,renamedPath:Ce,newFolderTempId:fr,sharedByMePaths:v,selectedPaths:D,disabledRowIds:_s,forbiddenSymbolsRegExp:Ne,forbiddenSymbolsTooltip:Ve,hideSearchPathItemName:Fr}}),[Ws.additionalGridOptions,gn,a?.searchable,vt,Ko,mr,kt,De,fe,ze,si,Cr,xe,Ce,fr,v,D,_s,Ne,Ve,Fr]),ni=g.useMemo(()=>E.length===0&&!Qo&&!i?Gr():f.jsx(th,{columnDefs:hn,rowData:E,getRowId:Br,loading:i||wr,getContextMenuItems:un,withoutHeaderBorders:vt,selectionOnHover:!vt,onGridApiChange:de,className:Vr,...Ws,selectionMode:Ir,wrapCustomCellRenderers:kr,additionalGridOptions:zr,selectedRowIds:cn,onSelectionChange:Or,wrapperBorder:!Et&&!Ut,disabledRowIds:_s,allowDisabledContextMenu:oi}),[E,Qo,i,Gr,hn,Br,wr,un,vt,de,Vr,Ws,Ir,kr,zr,cn,Or,Et,Ut,_s,oi]);return f.jsx("section",{ref:Ul,className:"size-full",children:f.jsxs("div",{className:oe(kL,{"gap-3 pt-4":d&&D.size>0,"gap-4 p-3 pt-4":vt,"gap-2 pt-2":vt&&d&&D.size>0},t),children:[ql(),f.jsxs("div",{className:oe(AL,Hl),children:[Kl(),f.jsxs("div",{className:oe(LL,{"gap-3":vt}),children:[r&&f.jsx(k7,{...a??{},makeHref:j=>j.join("/"),path:R,onItemClick:N,rootItemPath:o?.path,rootItemLabel:o?.label,value:k,onSearchChange:A,isCompactView:vt,labelClassName:"dial-tiny"}),f.jsxs("section",{role:"region","aria-label":"File Manager Grid View",className:oe(NL,"relative"),onDragEnter:V,onDragLeave:Ee,onDragOver:At,onDrop:Xi,children:[ni,f.jsx(x7,{disabledGridRowIds:_s,gridRows:E,getDisabledTooltip:xr,getRowDisabledTooltip:ln,allowedFileTypes:w,maxSelectableFileSize:b})]})]})]}),f.jsx(P7,{...u,open:le,itemsToDelete:re,onClose:B,onConfirm:pe}),f.jsx(nw,{...h,open:Q,onClose:te,onConfirm:()=>{const j=h?.destinationFolderPath??"/";J===rt.Copy?_(j):Fe(j),te()},mode:J,items:s,rootItem:o,gridOptions:{columnDefs:hn.filter(j=>j.colId!==at.Actions),loading:i},onUploadFiles:yl,onValidateUpload:xl,maxFileSize:Rl,path:h?.destinationFolderPath??h?.sourceFolder??R,onPathChange:j=>{h?.setDestinationFolderPath?.(j)},sourceFolder:h?.sourceFolder??R,treeOptions:{header:n?.header},onFolderPopupPathChange:Al}),f.jsx(xp,{...p,open:Ji,onClose:Dl,onReplace:Rs,onDuplicate:El,onDecideForEach:ot,conflictingFiles:Fl}),f.jsx(xp,{...p,open:Fs,onClose:sn,onReplace:en,onDuplicate:tn,onDecideForEach:Tl,conflictingFiles:Pl}),f.jsx(N7,{open:on,onClose:Il,fileMetadata:ds?.fileMetadata??Yo,loading:ds?.loading,header:ds?.header,nameLabel:ds?.nameLabel,pathLabel:ds?.pathLabel,modifiedDateLabel:ds?.modifiedDateLabel,sizeLabel:ds?.sizeLabel,authorLabel:ds?.authorLabel,dateLocale:l?.dateLocale,dateOptions:l?.dateOptions})]})})},K7=(e,t=wi.MyFiles)=>{const s=Object.values(wi).includes(t)?t:wi.MyFiles,[o,i]=g.useState(s),n=a=>{i(a)},r=g.useMemo(()=>{if(e)return Object.values(wi).map(a=>({id:a,label:e?.[a]||a.replace("_"," ")}))},[e]);return{activeTab:o,handleTabChange:n,tabs:r}},Y7="application/octet-stream";function Z7(e,t){if(!e||e.length===0)return[];const s=e.find(l=>l.parentPath===""&&l.nodeType==="FOLDER");if(!s)return[];const o=s.path||s.url||"",i=Jc(o,!0),n=e.filter(l=>l!==s).map(l=>{const c=l.path||l.url||"",d=X7(l.nodeType),u=d===be.FOLDER,h=Jc(c,u);let p;return l.parentPath===null||l.parentPath===void 0?p=i:l.parentPath===""?p="":p=Jc(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:Q7(l.resourceType),folderId:t,updatedAt:l.updatedAt?new Date(l.updatedAt).toISOString():new Date().toISOString(),items:l.nodeType===be.FOLDER?[]:void 0};l.nodeType===be.ITEM&&(c.extension=J7(l.name),c.contentType=l.contentType||Y7,c.contentLength=l.contentLength||0),r.set(l.path,c)});const a=[];return r.forEach(l=>{if(l.parentPath===i)a.push(l);else{const c=l.path.lastIndexOf(l.name||""),d=l.path.slice(0,c),u=r.get(d);u&&u.nodeType===be.FOLDER?(u.items=u.items||[],u.items.push(l)):a.push(l)}}),a}function Jc(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 X7(e){return e.toUpperCase()==="FOLDER"?be.FOLDER:be.ITEM}function Q7(e){if(!e)return;const t=e.toUpperCase();return Object.values(ch).find(o=>o.toUpperCase()===t)}function J7(e){const t=e.split(".");return t.length>1?t[t.length-1]:""}function e9(e,t="Prompts",s="prompts/public/",o="root"){const i=Z7(e,o);return[{id:o,name:t,path:s,parentPath:"",nodeType:be.FOLDER,folderId:o,items:i}]}exports.AlertVariant=is;exports.BASE_ICON_PROPS=Y;exports.BASE_ICON_SIZE=Nt;exports.ButtonAppearance=Me;exports.ButtonVariant=Ge;exports.ConfirmationPopupVariant=Vi;exports.DIAL_ICON_SIZE=pt;exports.DialAlert=Wp;exports.DialAutocompleteInputValue=Nv;exports.DialBreadcrumb=Mv;exports.DialBreadcrumbItem=Dn;exports.DialButton=ss;exports.DialButtonDropdown=Ud;exports.DialCaptionText=ir;exports.DialCheckbox=id;exports.DialCloseButton=eh;exports.DialCollapsibleSidebar=_p;exports.DialConditionalResizableContainer=of;exports.DialConfirmationPopup=Ov;exports.DialDestinationFolderPopup=nw;exports.DialDraggableItem=N0;exports.DialDropdown=Ft;exports.DialEllipsisTooltip=ht;exports.DialErrorButton=kv;exports.DialErrorIconButton=Av;exports.DialErrorText=ns;exports.DialFileIcon=iu;exports.DialFileManager=hw;exports.DialFileManagerActions=K;exports.DialFileManagerTabs=wi;exports.DialFileName=ll;exports.DialFileNodeType=be;exports.DialFilePermission=$o;exports.DialFileResourceType=ch;exports.DialFolderName=cl;exports.DialFormItem=Xd;exports.DialFormPopup=$8;exports.DialGhostButton=E8;exports.DialGhostIconButton=A8;exports.DialGrid=th;exports.DialIcon=$e;exports.DialIconButton=no;exports.DialInput=Zi;exports.DialInputPopup=Hv;exports.DialItemType=_t;exports.DialLabel=Bo;exports.DialLabelledText=k1;exports.DialLinkButton=F8;exports.DialLoadFileArea=qv;exports.DialLoadFileAreaField=TL;exports.DialLoader=nr;exports.DialNeutralButton=ys;exports.DialNeutralIconButton=T8;exports.DialNoDataContent=rr;exports.DialNumberInput=J8;exports.DialPasswordInput=sL;exports.DialPopup=Uo;exports.DialPrimaryButton=bs;exports.DialPrimaryIconButton=P8;exports.DialRadioButton=Zd;exports.DialRadioGroup=Fa;exports.DialRadioGroupPopupField=W8;exports.DialRemoveButton=Lv;exports.DialResizableContainer=sf;exports.DialSearch=ih;exports.DialSecondaryIconButton=M8;exports.DialSelect=Vv;exports.DialSelectField=hL;exports.DialSharedEntityIndicator=Wn;exports.DialSkeleton=pi;exports.DialSkeletonAvatarShape=Ea;exports.DialSkeletonAvatarSize=Tn;exports.DialSkeletonVariant=Xt;exports.DialSteps=E1;exports.DialSuccessIconButton=k8;exports.DialSwitch=oh;exports.DialTabs=Ev;exports.DialTag=vo;exports.DialTagInput=nL;exports.DialTertiaryIconButton=I8;exports.DialTextarea=L8;exports.DialTooltip=yt;exports.DropdownItemType=Bi;exports.DropdownTrigger=Ht;exports.DropdownType=yv;exports.ElementSize=bt;exports.FileManagerColumnKey=at;exports.FileManagerProvider=iw;exports.FlexibleActionsDirection=So;exports.FormItemOrientation=zn;exports.GridSelectionMode=Vn;exports.NAME_COLUMN=lw;exports.NOT_ALLOWED_SPACES=uh;exports.NOT_ALLOWED_SPACES_REGEXP=y7;exports.NOT_ALLOWED_SYMBOLS=sw;exports.NOT_ALLOWED_SYMBOLS_REGEXP=ow;exports.PopupSize=Wt;exports.RadioGroupOrientation=To;exports.ResizableContainerSide=_n;exports.SIZE_COLUMN=dw;exports.SelectSize=Ja;exports.SelectVariant=el;exports.StepStatus=Gt;exports.TabOrientation=Xa;exports.TagVariant=sl;exports.UPDATED_AT_COLUMN=cw;exports.mergeClasses=oe;exports.useDialFileManagerTabs=K7;exports.useEditableItem=rw;exports.useFileManagerContext=uw;exports.wrapInRootFolder=e9;
|
package/dist/dial-ui-kit.es.js
CHANGED
|
@@ -49320,7 +49320,11 @@ function Lh(e, t, o) {
|
|
|
49320
49320
|
const w9 = (e, t, o, s, i) => {
|
|
49321
49321
|
if (e.nodeType === Fe.FOLDER) return;
|
|
49322
49322
|
const n = !e.contentLength || o == null || e.contentLength <= o;
|
|
49323
|
-
if (!(!e.contentType || Mw(
|
|
49323
|
+
if (!(!e.contentType || Mw(
|
|
49324
|
+
t,
|
|
49325
|
+
e.contentType,
|
|
49326
|
+
e.name
|
|
49327
|
+
)))
|
|
49324
49328
|
return s ?? (t?.length ? `Unsupported file type. Supported types: ${v9(t)}.` : "Unsupported file type.");
|
|
49325
49329
|
if (!n)
|
|
49326
49330
|
return i ?? `File is too large. Maximum size: ${ar(o)}.`;
|
|
@@ -53505,7 +53509,7 @@ const wO = () => {
|
|
|
53505
53509
|
ni
|
|
53506
53510
|
]
|
|
53507
53511
|
);
|
|
53508
|
-
return /* @__PURE__ */ m("section", { ref: ec, children: /* @__PURE__ */ V(
|
|
53512
|
+
return /* @__PURE__ */ m("section", { ref: ec, className: "size-full", children: /* @__PURE__ */ V(
|
|
53509
53513
|
"div",
|
|
53510
53514
|
{
|
|
53511
53515
|
className: ae(
|
package/dist/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.dial-display1-text{font-size:32px;line-height:48px;font-weight:600}.dial-display2-text{font-size:28px;line-height:40px;font-weight:600}.dial-h1-text{font-size:22px;line-height:32px;font-weight:600}.dial-h2-text{font-size:20px;line-height:28px;font-weight:600}.dial-h3-text{font-size:18px;line-height:26px;font-weight:600}.dial-body-text{font-size:16px;line-height:24px;font-weight:400}.dial-body-semi-text{font-size:16px;line-height:24px;font-weight:600}.dial-small-text{font-size:14px;line-height:20px;font-weight:400}.dial-small-semi-text{font-size:14px;line-height:20px;font-weight:600}.dial-tiny-text{font-size:12px;line-height:16px;font-weight:400}.dial-tiny-semi-text{font-size:12px;line-height:16px;font-weight:600}.dial-caption-text{font-size:10px;line-height:12px;font-weight:400}.dial-code-text{font-size:14px;line-height:20px;font-weight:400}.dial-h1{font-weight:600}.dial-h1,.dial-h2{font-size:20px;line-height:24px}.dial-h2{font-weight:400}.dial-h3{font-weight:600;line-height:18px}.dial-body,.dial-h3{font-size:16px}.dial-body{font-weight:400;line-height:28px}.dial-small{font-weight:400}.dial-small,.dial-small-semi{font-size:14px;line-height:16px}.dial-small-semi{font-weight:600}.dial-small-medium{font-weight:400;font-size:14px;line-height:16px}.dial-small-150{font-weight:400;font-size:14px;line-height:21px}.dial-tiny{line-height:14px}.dial-tiny,.dial-tiny-150{font-weight:400;font-size:12px}.dial-tiny-150{line-height:18px}.dial-tiny-semi{font-weight:600;font-size:12px;line-height:14px}.dial-caption{font-weight:400;font-size:10px;line-height:12px}h1{font-weight:600}h1,h2{font-size:20px;line-height:24px}h2{font-weight:400}h3{font-weight:600;font-size:16px;line-height:18px}.dial-base-button{display:flex;flex-direction:row;align-items:center;justify-content:center;-moz-column-gap:.5rem;column-gap:.5rem;border-radius:4px;border:1px solid transparent}.dial-button-disable{cursor:not-allowed}.dial-base-button:focus-visible{border-color:var(--stroke-focus,#eef1f7)}.dial-button-solid-disable{background-color:var(--controls-bg-disable-accent,#696e7c);color:var(--controls-text-accent-disable,#242c42);cursor:not-allowed}.dial-primary-solid-button{background-color:var(--controls-bg-accent-primary,#3664e2);color:var(--controls-text-permanent,#fcfcfc);display:flex;flex-direction:row;align-items:center;justify-content:center;-moz-column-gap:.5rem;column-gap:.5rem;border-radius:4px;border:1px solid transparent}.dial-primary-solid-button:focus-visible{border-color:var(--stroke-focus,#eef1f7)}.dial-primary-solid-button{&:hover{background-color:var(--controls-bg-accent-primary-hover,#2656d9)}&:active{background-color:var(--controls-bg-accent-primary-active,#124ace)}}.dial-primary-ghost-button{color:var(--text-accent-primary,#7da4ff);&.dial-icon-button{color:var(--text-secondary,#9fa6bd)}&.dial-icon-button{&:hover:enabled{color:var(--text-accent-primary,#7da4ff)}}&:hover{background-color:var(--bg-accent-primary-alpha,#7da4ff26)}&:active{background-color:var(--controls-bg-accent-primary-alpha-active,#7da4ff4d)}}.dial-primary-link-button{background-color:transparent;padding-left:.5rem;padding-right:.5rem;color:var(--text-accent-primary,#7da4ff);display:flex;flex-direction:row;align-items:center;justify-content:center;-moz-column-gap:.5rem;column-gap:.5rem;border-radius:4px;border:1px solid transparent}.dial-primary-link-button:focus-visible{border-color:var(--stroke-focus,#eef1f7)}.dial-primary-link-button{&:hover{color:var(--controls-text-accent-primary-hover,#3664e2)}&:active{color:var(--controls-text-accent-primary-active,#124ace)}&:disabled{color:var(--controls-text-secondary-disable,#575f73);cursor:not-allowed}}.dial-neutral-outlined-button{background-color:transparent;color:var(--controls-text-neutral,#fcfcfc);display:flex;flex-direction:row;align-items:center;justify-content:center;-moz-column-gap:.5rem;column-gap:.5rem;border-radius:4px;border:1px solid transparent}.dial-neutral-outlined-button:focus-visible{border-color:var(--stroke-focus,#eef1f7)}.dial-neutral-outlined-button{border-color:var(--stroke-primary,#696e7c);&:hover{background-color:var(--controls-bg-neutral-hover,#242c42)}&:active{background-color:var(--controls-bg-neutral-active,#575f73)}&:active,&:disabled{border-color:transparent}&:disabled{background-color:var(--controls-bg-disable,#242c42);color:var(--controls-text-primary-disable,#7c8293);cursor:not-allowed}}.dial-error-solid-button{background-color:var(--controls-bg-error,#cc4545);color:var(--controls-text-permanent,#fcfcfc);display:flex;flex-direction:row;align-items:center;justify-content:center;-moz-column-gap:.5rem;column-gap:.5rem;border-radius:4px;border:1px solid transparent}.dial-error-solid-button:focus-visible{border-color:var(--stroke-focus,#eef1f7)}.dial-error-solid-button{&:hover{background-color:var(--controls-bg-error-hover,#bf3939)}&:active{background-color:var(--controls-bg-error-active,#ae2f2f)}}.dial-error-ghost-button{color:var(--text-error,#f76464);&:hover{background-color:var(--bg-error,#402027)}}.dial-success-ghost-button{color:var(--text-accent-secondary,#37babc);&:hover{background-color:var(--controls-bg-accent-success-alpha-hover,#37babc2e)}&:active{background-color:var(--controls-bg-accent-success-alpha-active,#37babc5c)}}.dial-secondary-ghost-button{color:var(--text-secondary,#9fa6bd);&:hover{background-color:var(--bg-accent-secondary-alpha,#37babc2e);color:var(--text-accent-secondary,#37babc)}&:active{background-color:var(--controls-bg-accent-secondary-alpha-active,#37babc5c);color:var(--text-accent-secondary,#37babc)}}.dial-tertiary-ghost-button{color:var(--text-secondary,#9fa6bd);&:hover{background-color:var(--bg-accent-tertiary-alpha,#a972ff2e);color:var(--text-accent-tertiary,#a972ff)}&:active{background-color:var(--controls-bg-accent-tertiary-alpha-active,#a972ff5c);color:var(--text-accent-tertiary,#a972ff)}}.dial-error-ghost-button,.dial-primary-ghost-button,.dial-secondary-ghost-button,.dial-success-ghost-button,.dial-tertiary-ghost-button{background-color:transparent;display:flex;flex-direction:row;align-items:center;justify-content:center;-moz-column-gap:.5rem;column-gap:.5rem;border-radius:4px;border:1px solid transparent}.dial-error-ghost-button:focus-visible,.dial-primary-ghost-button:focus-visible,.dial-secondary-ghost-button:focus-visible,.dial-success-ghost-button:focus-visible,.dial-tertiary-ghost-button:focus-visible{border-color:var(--stroke-focus,#eef1f7)}.dial-error-ghost-button:disabled,.dial-primary-ghost-button:disabled,.dial-secondary-ghost-button:disabled,.dial-success-ghost-button:disabled,.dial-tertiary-ghost-button:disabled{background-color:transparent;color:var(--controls-text-secondary-disable,#575f73);cursor:not-allowed}.dial-error-solid-button:disabled,.dial-primary-solid-button:disabled{background-color:var(--controls-bg-disable-accent,#696e7c);color:var(--controls-text-accent-disable,#242c42);cursor:not-allowed}.dial-input{height:40px;border-radius:4px;border-width:1px;border-style:solid;border-color:var(--stroke-primary,#696e7c);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:transparent;font-size:14px;line-height:20px;font-weight:400;width:100%;outline-width:0;&:hover{border-color:var(--stroke-accent-primary,#7da4ff)}&:active,&:focus,&:focus-within{border-color:var(--stroke-focus,#eef1f7)}&:not(:-moz-placeholder){color:var(--text-primary,#eef1f7)}&:not(:placeholder-shown){color:var(--text-primary,#eef1f7)}&:disabled:not(:-moz-placeholder){cursor:not-allowed}&:disabled,&:disabled:not(:placeholder-shown){cursor:not-allowed}&:disabled:not(:-moz-placeholder){border-color:transparent}&:disabled,&:disabled:not(:placeholder-shown){border-color:transparent}&:disabled:not(:-moz-placeholder){background-color:var(--controls-bg-disable,#242c42)}&:disabled,&:disabled:not(:placeholder-shown){background-color:var(--controls-bg-disable,#242c42)}&:disabled:not(:-moz-placeholder){color:var(--controls-text-primary-disable,#7c8293)}&:disabled,&:disabled:not(:placeholder-shown){color:var(--controls-text-primary-disable,#7c8293)}&:disabled{&:not(:placeholder-shown)::-moz-placeholder{color:var(--controls-text-secondary-disable,#575f73)}&:not(:-moz-placeholder)::placeholder{color:var(--controls-text-secondary-disable,#575f73)}&:not(:placeholder-shown)::placeholder{color:var(--controls-text-secondary-disable,#575f73)}}}.dial-input-disable:not(:-moz-placeholder){cursor:not-allowed;border-color:transparent;background-color:var(--controls-bg-disable,#242c42);color:var(--controls-text-primary-disable,#7c8293)}.dial-input-disable,.dial-input-disable:not(:placeholder-shown){cursor:not-allowed;border-color:transparent;background-color:var(--controls-bg-disable,#242c42);color:var(--controls-text-primary-disable,#7c8293)}.dial-input-error{border-color:var(--stroke-error,#f76464)}input{-webkit-appearance:none;-moz-appearance:none;appearance:none;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}&:focus{outline:none}}.dial-textarea{min-height:120px;overflow:auto;white-space:normal;&:focus{outline:2px solid transparent;outline-offset:2px}}.dial-input-radio{position:relative;display:flex;cursor:pointer;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;padding:0;height:18px;width:18px;border-color:var(--stroke-hover,#eef1f7);background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;color:currentColor;font:inherit;&:checked{border-color:var(--stroke-accent-primary,#7da4ff)}&:checked{&:after{height:10px;width:10px;background-color:var(--bg-accent-primary,#5c8dea);content:"";border-radius:18px}}&:focus,&:hover{border-width:1px;border-color:var(--stroke-accent-primary,#7da4ff);background-color:transparent}&:disabled{pointer-events:none}&:disabled{&:checked{border-color:var(--stroke-primary,#696e7c)}&:checked{&:after{background-color:var(--controls-bg-disable,#242c42)}}}}div .dial-sm-popup{max-width:100%}@media (min-width:768px){div .dial-sm-popup{max-width:400px}}div .dial-md-popup{max-width:100%}@media (min-width:768px){div .dial-md-popup{max-width:800px}}div .dial-lg-popup{max-width:100%}@media (min-width:768px){div .dial-lg-popup{max-width:1200px}}div .dial-popup{position:relative;display:flex;height:100%;max-height:100%;width:100%;flex-direction:column;border-radius:4px;background-color:var(--bg-layer-3,#1d2439);--tw-shadow:0 0 4px 0 var(--bg-blackout,#0c101db3);--tw-shadow-colored:0 0 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}@media (min-width:768px){div .dial-popup{height:auto}}div .dial-danger-popup{border-top-width:4px;border-color:var(--stroke-error,#f76464)}.ag-root-wrapper{.ag-root-wrapper-body{height:auto}.ag-filter-wrapper{.ag-input-field-input.ag-text-field-input{padding-left:1.25rem}}overflow-x:auto;.ag-header{.ag-header-cell.align-right{.ag-header-cell-label{justify-content:flex-end}}.ag-header-cell{.header-checkbox-container{display:flex;height:100%;width:100%;align-items:center;justify-content:center}}.ag-header-viewport,.ag-pinned-left-header{.ag-floating-filter{input{margin:0;padding:0;padding-left:.5rem;padding-right:.5rem;height:24px!important}}}.ag-column-last:after{border-width:0}}.ag-cell{display:flex;align-items:center}.ag-cell{&.ag-cell-focus,&.ag-grid-no-border{border-width:0}&.align-right{justify-content:flex-end}}.ag-error-row{background-color:var(--bg-error,#402027)}.ag-error-row{#editable-cell-renderer{border-color:var(--stroke-error,#f76464)}&.ag-error-border{border-width:1px;border-color:var(--stroke-error,#f76464);cursor:pointer}&.ag-row-hover:not(.ag-full-width-row):before{background-color:transparent}}.ag-new-row{background-color:var(--bg-success,#1d3841)}.ag-new-row{&.ag-new-border{border-width:1px;border-color:var(--stroke-accent-secondary,#37babc);cursor:pointer}&.ag-row-hover:not(.ag-full-width-row):before{background-color:transparent}}.ag-changed-row{background-color:var(--bg-info,#1c2c47)}.ag-changed-row{&.ag-changed-border{border-width:1px;border-color:var(--stroke-accent-primary,#7da4ff);cursor:pointer}&.ag-row-hover:not(.ag-full-width-row):before{background-color:transparent}}.ag-empty-row{&.ag-row-hover:not(.ag-full-width-row):before{background-color:transparent}}.ag-row-selected{&.ag-row-hover:not(.ag-full-width-row):before{background-color:transparent}}}.with-selection-column{.ag-header-row .dial-row-select,.ag-row .dial-row-select{opacity:0;transition:opacity .12s ease}.ag-header-active.dial-row-select,.ag-header-row .dial-row-select-visible,.ag-header-row .dial-row-select:has(.ag-checkbox-input-wrapper.ag-checked),.ag-header-row .dial-row-select:has(.ag-checkbox-input-wrapper.ag-indeterminate),.ag-row .dial-row-select-visible,.ag-row-hover .dial-row-select,.ag-row-selected .dial-row-select{opacity:1}.header-checkbox-container .dial-header-select.unchecked:not(.dial-header-select-visible){opacity:0;transition:opacity .12s ease}.ag-header-cell:hover .header-checkbox-container .dial-header-select.unchecked,.header-checkbox-container .dial-header-select-visible,.header-checkbox-container .dial-header-select.checked,.header-checkbox-container .dial-header-select.indeterminate{opacity:1}}.dial-without-header-borders{.ag-header{.ag-header-cell{&:after{border-right-width:0}}}}.ag-layout-auto-height{.ag-center-cols-container,.ag-center-cols-viewport{min-height:0}}.ag-grid-no-checkbox{.ag-selection-checkbox{display:none}}:where(.ag-theme-checkboxStyle-5){.ag-checkbox-input-wrapper{height:18px;width:18px;border-radius:2px!important;border-color:var(--controls-bg-accent,#5c8dea);background-color:transparent;--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.ag-checkbox-input-wrapper{&.ag-checked:after{-webkit-mask:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' class='icon icon-tabler icons-tabler-outline icon-tabler-check'%3E%3Cpath stroke='none' d='M0 0h24v24H0z'/%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' class='icon icon-tabler icons-tabler-outline icon-tabler-check'%3E%3Cpath stroke='none' d='M0 0h24v24H0z'/%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center/contain no-repeat}&.ag-checked:after,&.ag-indeterminate:after{background-color:var(--bg-accent-primary,#5c8dea)}&.ag-indeterminate:after{-webkit-mask:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' class='icon icon-tabler icons-tabler-outline icon-tabler-minus'%3E%3Cpath stroke='none' d='M0 0h24v24H0z'/%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' class='icon icon-tabler icons-tabler-outline icon-tabler-minus'%3E%3Cpath stroke='none' d='M0 0h24v24H0z'/%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E") center/contain no-repeat}}}div .dial-step{border-top-width:2px}@layer ui{*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }
|
|
1
|
+
.dial-display1-text{font-size:32px;line-height:48px;font-weight:600}.dial-display2-text{font-size:28px;line-height:40px;font-weight:600}.dial-h1-text{font-size:22px;line-height:32px;font-weight:600}.dial-h2-text{font-size:20px;line-height:28px;font-weight:600}.dial-h3-text{font-size:18px;line-height:26px;font-weight:600}.dial-body-text{font-size:16px;line-height:24px;font-weight:400}.dial-body-semi-text{font-size:16px;line-height:24px;font-weight:600}.dial-small-text{font-size:14px;line-height:20px;font-weight:400}.dial-small-semi-text{font-size:14px;line-height:20px;font-weight:600}.dial-tiny-text{font-size:12px;line-height:16px;font-weight:400}.dial-tiny-semi-text{font-size:12px;line-height:16px;font-weight:600}.dial-caption-text{font-size:10px;line-height:12px;font-weight:400}.dial-code-text{font-size:14px;line-height:20px;font-weight:400}.dial-h1{font-weight:600}.dial-h1,.dial-h2{font-size:20px;line-height:24px}.dial-h2{font-weight:400}.dial-h3{font-weight:600;line-height:18px}.dial-body,.dial-h3{font-size:16px}.dial-body{font-weight:400;line-height:28px}.dial-small{font-weight:400}.dial-small,.dial-small-semi{font-size:14px;line-height:16px}.dial-small-semi{font-weight:600}.dial-small-medium{font-weight:400;font-size:14px;line-height:16px}.dial-small-150{font-weight:400;font-size:14px;line-height:21px}.dial-tiny{line-height:14px}.dial-tiny,.dial-tiny-150{font-weight:400;font-size:12px}.dial-tiny-150{line-height:18px}.dial-tiny-semi{font-weight:600;font-size:12px;line-height:14px}.dial-caption{font-weight:400;font-size:10px;line-height:12px}h1{font-weight:600}h1,h2{font-size:20px;line-height:24px}h2{font-weight:400}h3{font-weight:600;font-size:16px;line-height:18px}.dial-base-button{display:flex;flex-direction:row;align-items:center;justify-content:center;-moz-column-gap:.5rem;column-gap:.5rem;border-radius:4px;border:1px solid transparent}.dial-button-disable{cursor:not-allowed}.dial-base-button:focus-visible{border-color:var(--stroke-focus,#eef1f7)}.dial-button-solid-disable{background-color:var(--controls-bg-disable-accent,#696e7c);color:var(--controls-text-accent-disable,#242c42);cursor:not-allowed}.dial-primary-solid-button{background-color:var(--controls-bg-accent-primary,#3664e2);color:var(--controls-text-permanent,#fcfcfc);display:flex;flex-direction:row;align-items:center;justify-content:center;-moz-column-gap:.5rem;column-gap:.5rem;border-radius:4px;border:1px solid transparent}.dial-primary-solid-button:focus-visible{border-color:var(--stroke-focus,#eef1f7)}.dial-primary-solid-button{&:hover{background-color:var(--controls-bg-accent-primary-hover,#2656d9)}&:active{background-color:var(--controls-bg-accent-primary-active,#124ace)}}.dial-primary-ghost-button{color:var(--text-accent-primary,#7da4ff);&.dial-icon-button{color:var(--text-secondary,#9fa6bd)}&.dial-icon-button{&:hover:enabled{color:var(--text-accent-primary,#7da4ff)}}&:hover{background-color:var(--bg-accent-primary-alpha,#7da4ff26)}&:active{background-color:var(--controls-bg-accent-primary-alpha-active,#7da4ff4d)}}.dial-primary-link-button{background-color:transparent;padding-left:.5rem;padding-right:.5rem;color:var(--text-accent-primary,#7da4ff);display:flex;flex-direction:row;align-items:center;justify-content:center;-moz-column-gap:.5rem;column-gap:.5rem;border-radius:4px;border:1px solid transparent}.dial-primary-link-button:focus-visible{border-color:var(--stroke-focus,#eef1f7)}.dial-primary-link-button{&:hover{color:var(--controls-text-accent-primary-hover,#3664e2)}&:active{color:var(--controls-text-accent-primary-active,#124ace)}&:disabled{color:var(--controls-text-secondary-disable,#575f73);cursor:not-allowed}}.dial-neutral-outlined-button{background-color:transparent;color:var(--controls-text-neutral,#fcfcfc);display:flex;flex-direction:row;align-items:center;justify-content:center;-moz-column-gap:.5rem;column-gap:.5rem;border-radius:4px;border:1px solid transparent}.dial-neutral-outlined-button:focus-visible{border-color:var(--stroke-focus,#eef1f7)}.dial-neutral-outlined-button{border-color:var(--stroke-primary,#696e7c);&:hover{background-color:var(--controls-bg-neutral-hover,#242c42)}&:active{background-color:var(--controls-bg-neutral-active,#575f73)}&:active,&:disabled{border-color:transparent}&:disabled{background-color:var(--controls-bg-disable,#242c42);color:var(--controls-text-primary-disable,#7c8293);cursor:not-allowed}}.dial-error-solid-button{background-color:var(--controls-bg-error,#cc4545);color:var(--controls-text-permanent,#fcfcfc);display:flex;flex-direction:row;align-items:center;justify-content:center;-moz-column-gap:.5rem;column-gap:.5rem;border-radius:4px;border:1px solid transparent}.dial-error-solid-button:focus-visible{border-color:var(--stroke-focus,#eef1f7)}.dial-error-solid-button{&:hover{background-color:var(--controls-bg-error-hover,#bf3939)}&:active{background-color:var(--controls-bg-error-active,#ae2f2f)}}.dial-error-ghost-button{color:var(--text-error,#f76464);&:hover{background-color:var(--bg-error,#402027)}}.dial-success-ghost-button{color:var(--text-accent-secondary,#37babc);&:hover{background-color:var(--controls-bg-accent-success-alpha-hover,#37babc2e)}&:active{background-color:var(--controls-bg-accent-success-alpha-active,#37babc5c)}}.dial-secondary-ghost-button{color:var(--text-secondary,#9fa6bd);&:hover{background-color:var(--bg-accent-secondary-alpha,#37babc2e);color:var(--text-accent-secondary,#37babc)}&:active{background-color:var(--controls-bg-accent-secondary-alpha-active,#37babc5c);color:var(--text-accent-secondary,#37babc)}}.dial-tertiary-ghost-button{color:var(--text-secondary,#9fa6bd);&:hover{background-color:var(--bg-accent-tertiary-alpha,#a972ff2e);color:var(--text-accent-tertiary,#a972ff)}&:active{background-color:var(--controls-bg-accent-tertiary-alpha-active,#a972ff5c);color:var(--text-accent-tertiary,#a972ff)}}.dial-error-ghost-button,.dial-primary-ghost-button,.dial-secondary-ghost-button,.dial-success-ghost-button,.dial-tertiary-ghost-button{background-color:transparent;display:flex;flex-direction:row;align-items:center;justify-content:center;-moz-column-gap:.5rem;column-gap:.5rem;border-radius:4px;border:1px solid transparent}.dial-error-ghost-button:focus-visible,.dial-primary-ghost-button:focus-visible,.dial-secondary-ghost-button:focus-visible,.dial-success-ghost-button:focus-visible,.dial-tertiary-ghost-button:focus-visible{border-color:var(--stroke-focus,#eef1f7)}.dial-error-ghost-button:disabled,.dial-primary-ghost-button:disabled,.dial-secondary-ghost-button:disabled,.dial-success-ghost-button:disabled,.dial-tertiary-ghost-button:disabled{background-color:transparent;color:var(--controls-text-secondary-disable,#575f73);cursor:not-allowed}.dial-error-solid-button:disabled,.dial-primary-solid-button:disabled{background-color:var(--controls-bg-disable-accent,#696e7c);color:var(--controls-text-accent-disable,#242c42);cursor:not-allowed}.dial-input{height:40px;border-radius:4px;border-width:1px;border-style:solid;border-color:var(--stroke-primary,#696e7c);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:transparent;font-size:14px;line-height:20px;font-weight:400;width:100%;outline-width:0;&:hover{border-color:var(--stroke-accent-primary,#7da4ff)}&:active,&:focus,&:focus-within{border-color:var(--stroke-focus,#eef1f7)}&:not(:-moz-placeholder){color:var(--text-primary,#eef1f7)}&:not(:placeholder-shown){color:var(--text-primary,#eef1f7)}&:disabled:not(:-moz-placeholder){cursor:not-allowed}&:disabled,&:disabled:not(:placeholder-shown){cursor:not-allowed}&:disabled:not(:-moz-placeholder){border-color:transparent}&:disabled,&:disabled:not(:placeholder-shown){border-color:transparent}&:disabled:not(:-moz-placeholder){background-color:var(--controls-bg-disable,#242c42)}&:disabled,&:disabled:not(:placeholder-shown){background-color:var(--controls-bg-disable,#242c42)}&:disabled:not(:-moz-placeholder){color:var(--controls-text-primary-disable,#7c8293)}&:disabled,&:disabled:not(:placeholder-shown){color:var(--controls-text-primary-disable,#7c8293)}&:disabled{&:not(:placeholder-shown)::-moz-placeholder{color:var(--controls-text-secondary-disable,#575f73)}&:not(:-moz-placeholder)::placeholder{color:var(--controls-text-secondary-disable,#575f73)}&:not(:placeholder-shown)::placeholder{color:var(--controls-text-secondary-disable,#575f73)}}}.dial-input-disable:not(:-moz-placeholder){cursor:not-allowed;border-color:transparent;background-color:var(--controls-bg-disable,#242c42);color:var(--controls-text-primary-disable,#7c8293)}.dial-input-disable,.dial-input-disable:not(:placeholder-shown){cursor:not-allowed;border-color:transparent;background-color:var(--controls-bg-disable,#242c42);color:var(--controls-text-primary-disable,#7c8293)}.dial-input-error{border-color:var(--stroke-error,#f76464)}input{-webkit-appearance:none;-moz-appearance:none;appearance:none;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}&:focus{outline:none}&::selection{background-color:var(--controls-bg-accent-primary,#3664e2)}&::-moz-selection{background-color:var(--controls-bg-accent-primary,#3664e2)}}.dial-textarea{min-height:120px;overflow:auto;white-space:normal;&:focus{outline:2px solid transparent;outline-offset:2px}&::selection{background-color:var(--controls-bg-accent-primary,#3664e2)}&::-moz-selection{background-color:var(--controls-bg-accent-primary,#3664e2)}}.dial-input-radio{position:relative;display:flex;cursor:pointer;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;padding:0;height:18px;width:18px;border-color:var(--stroke-hover,#eef1f7);background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;color:currentColor;font:inherit;&:checked{border-color:var(--stroke-accent-primary,#7da4ff)}&:checked{&:after{height:10px;width:10px;background-color:var(--bg-accent-primary,#5c8dea);content:"";border-radius:18px}}&:focus,&:hover{border-width:1px;border-color:var(--stroke-accent-primary,#7da4ff);background-color:transparent}&:disabled{pointer-events:none}&:disabled{&:checked{border-color:var(--stroke-primary,#696e7c)}&:checked{&:after{background-color:var(--controls-bg-disable,#242c42)}}}}div .dial-sm-popup{max-width:100%}@media (min-width:768px){div .dial-sm-popup{max-width:400px}}div .dial-md-popup{max-width:100%}@media (min-width:768px){div .dial-md-popup{max-width:800px}}div .dial-lg-popup{max-width:100%}@media (min-width:768px){div .dial-lg-popup{max-width:1200px}}div .dial-popup{position:relative;display:flex;height:100%;max-height:100%;width:100%;flex-direction:column;border-radius:4px;background-color:var(--bg-layer-3,#1d2439);--tw-shadow:0 0 4px 0 var(--bg-blackout,#0c101db3);--tw-shadow-colored:0 0 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}@media (min-width:768px){div .dial-popup{height:auto}}div .dial-danger-popup{border-top-width:4px;border-color:var(--stroke-error,#f76464)}.ag-root-wrapper{.ag-root-wrapper-body{height:auto}.ag-filter-wrapper{.ag-input-field-input.ag-text-field-input{padding-left:1.25rem}}overflow-x:auto;.ag-header{.ag-header-cell.align-right{.ag-header-cell-label{justify-content:flex-end}}.ag-header-cell{.header-checkbox-container{display:flex;height:100%;width:100%;align-items:center;justify-content:center}}.ag-header-viewport,.ag-pinned-left-header{.ag-floating-filter{input{margin:0;padding:0;padding-left:.5rem;padding-right:.5rem;height:24px!important}}}.ag-column-last:after{border-width:0}}.ag-cell{display:flex;align-items:center}.ag-cell{&.ag-cell-focus,&.ag-grid-no-border{border-width:0}&.align-right{justify-content:flex-end}}.ag-error-row{background-color:var(--bg-error,#402027)}.ag-error-row{#editable-cell-renderer{border-color:var(--stroke-error,#f76464)}&.ag-error-border{border-width:1px;border-color:var(--stroke-error,#f76464);cursor:pointer}&.ag-row-hover:not(.ag-full-width-row):before{background-color:transparent}}.ag-new-row{background-color:var(--bg-success,#1d3841)}.ag-new-row{&.ag-new-border{border-width:1px;border-color:var(--stroke-accent-secondary,#37babc);cursor:pointer}&.ag-row-hover:not(.ag-full-width-row):before{background-color:transparent}}.ag-changed-row{background-color:var(--bg-info,#1c2c47)}.ag-changed-row{&.ag-changed-border{border-width:1px;border-color:var(--stroke-accent-primary,#7da4ff);cursor:pointer}&.ag-row-hover:not(.ag-full-width-row):before{background-color:transparent}}.ag-empty-row{&.ag-row-hover:not(.ag-full-width-row):before{background-color:transparent}}.ag-row-selected{&.ag-row-hover:not(.ag-full-width-row):before{background-color:transparent}}}.with-selection-column{.ag-header-row .dial-row-select,.ag-row .dial-row-select{opacity:0;transition:opacity .12s ease}.ag-header-active.dial-row-select,.ag-header-row .dial-row-select-visible,.ag-header-row .dial-row-select:has(.ag-checkbox-input-wrapper.ag-checked),.ag-header-row .dial-row-select:has(.ag-checkbox-input-wrapper.ag-indeterminate),.ag-row .dial-row-select-visible,.ag-row-hover .dial-row-select,.ag-row-selected .dial-row-select{opacity:1}.header-checkbox-container .dial-header-select.unchecked:not(.dial-header-select-visible){opacity:0;transition:opacity .12s ease}.ag-header-cell:hover .header-checkbox-container .dial-header-select.unchecked,.header-checkbox-container .dial-header-select-visible,.header-checkbox-container .dial-header-select.checked,.header-checkbox-container .dial-header-select.indeterminate{opacity:1}}.dial-without-header-borders{.ag-header{.ag-header-cell{&:after{border-right-width:0}}}}.ag-layout-auto-height{.ag-center-cols-container,.ag-center-cols-viewport{min-height:0}}.ag-grid-no-checkbox{.ag-selection-checkbox{display:none}}:where(.ag-theme-checkboxStyle-5){.ag-checkbox-input-wrapper{height:18px;width:18px;border-radius:2px!important;border-color:var(--controls-bg-accent,#5c8dea);background-color:transparent;--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.ag-checkbox-input-wrapper{&.ag-checked:after{-webkit-mask:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' class='icon icon-tabler icons-tabler-outline icon-tabler-check'%3E%3Cpath stroke='none' d='M0 0h24v24H0z'/%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' class='icon icon-tabler icons-tabler-outline icon-tabler-check'%3E%3Cpath stroke='none' d='M0 0h24v24H0z'/%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center/contain no-repeat}&.ag-checked:after,&.ag-indeterminate:after{background-color:var(--bg-accent-primary,#5c8dea)}&.ag-indeterminate:after{-webkit-mask:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' class='icon icon-tabler icons-tabler-outline icon-tabler-minus'%3E%3Cpath stroke='none' d='M0 0h24v24H0z'/%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' class='icon icon-tabler icons-tabler-outline icon-tabler-minus'%3E%3Cpath stroke='none' d='M0 0h24v24H0z'/%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E") center/contain no-repeat}}}div .dial-step{border-top-width:2px}@layer ui{*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }
|
|
2
2
|
/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}::-webkit-scrollbar-corner,::-webkit-scrollbar-track,::-webkit-scrollbar-track:hover,:not(:hover)::-webkit-scrollbar-thumb{background-color:transparent}::-webkit-scrollbar-thumb{cursor:pointer;border-radius:4px;background-color:var(--bg-layer-4,#242c42)}::-webkit-scrollbar{height:4px;width:4px}*{scrollbar-width:thin;scrollbar-color:transparent transparent}:hover{scrollbar-color:var(--bg-layer-4,#242c42) transparent}.divide-y>:empty~:not([hidden]){border-top:none;border-bottom:none}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.-bottom-0\.5{bottom:-.125rem}.-left-0\.5{left:-.125rem}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-0{z-index:0}.z-50{z-index:50}.z-\[-1\]{z-index:-1}.z-\[52\]{z-index:52}.z-\[53\]{z-index:53}.z-\[55\]{z-index:55}.-m-px{margin:-1px}.m-0{margin:0}.mx-2{margin-left:.5rem;margin-right:.5rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.-ml-6{margin-left:-1.5rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-\[2px\]{margin-bottom:2px}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-\[26px\]{margin-left:26px}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.size-3{width:.75rem;height:.75rem}.size-full{width:100%;height:100%}.size-px{width:1px;height:1px}.\!h-10{height:2.5rem!important}.\!h-6{height:1.5rem!important}.\!h-9{height:2.25rem!important}.\!h-\[600px\]{height:600px!important}.\!h-auto{height:auto!important}.h-0{height:0}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[100px\]{height:100px}.h-\[10px\]{height:10px}.h-\[120px\]{height:120px}.h-\[180px\]{height:180px}.h-\[18px\]{height:18px}.h-\[22px\]{height:22px}.h-\[24px\]{height:24px}.h-\[250px\]{height:250px}.h-\[26px\]{height:26px}.h-\[300px\]{height:300px}.h-\[32px\]{height:32px}.h-\[34px\]{height:34px}.h-\[38px\]{height:38px}.h-\[400px\]{height:400px}.h-\[40px\]{height:40px}.h-\[4px\]{height:4px}.h-\[500px\]{height:500px}.h-\[640px\]{height:640px}.h-\[740px\]{height:740px}.h-auto{height:auto}.h-full{height:100%}.max-h-\[352px\]{max-height:352px}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-4{min-height:1rem}.min-h-\[120px\]{min-height:120px}.min-h-\[180px\]{min-height:180px}.min-h-\[220px\]{min-height:220px}.min-h-\[25px\]{min-height:25px}.min-h-\[38px\]{min-height:38px}.min-h-\[42px\]{min-height:42px}.min-h-\[48px\]{min-height:48px}.min-h-screen{min-height:100vh}.\!w-\[280px\]{width:280px!important}.w-0{width:0}.w-0\.5{width:.125rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-2{width:.5rem}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[1000px\]{width:1000px}.w-\[10px\]{width:10px}.w-\[150px\]{width:150px}.w-\[160px\]{width:160px}.w-\[18px\]{width:18px}.w-\[22px\]{width:22px}.w-\[24px\]{width:24px}.w-\[250px\]{width:250px}.w-\[260px\]{width:260px}.w-\[300px\]{width:300px}.w-\[320px\]{width:320px}.w-\[32px\]{width:32px}.w-\[360px\]{width:360px}.w-\[36px\]{width:36px}.w-\[400px\]{width:400px}.w-\[40px\]{width:40px}.w-\[420px\]{width:420px}.w-\[44px\]{width:44px}.w-\[450px\]{width:450px}.w-\[480px\]{width:480px}.w-\[4px\]{width:4px}.w-\[500px\]{width:500px}.w-\[520px\]{width:520px}.w-\[600px\]{width:600px}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.min-w-0{min-width:0}.min-w-\[100px\]{min-width:100px}.min-w-\[160px\]{min-width:160px}.min-w-\[180px\]{min-width:180px}.min-w-\[400px\]{min-width:400px}.min-w-\[600px\]{min-width:600px}.min-w-\[760px\]{min-width:760px}.min-w-\[800px\]{min-width:800px}.max-w-80{max-width:20rem}.max-w-\[1200px\]{max-width:1200px}.max-w-\[160px\]{max-width:160px}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[300px\]{max-width:300px}.max-w-\[428px\]{max-width:428px}.max-w-\[80px\]{max-width:80px}.max-w-full{max-width:100%}.max-w-none{max-width:none}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.grow-0{flex-grow:0}.basis-\[20\%\]{flex-basis:20%}.basis-auto{flex-basis:auto}.rotate-180{--tw-rotate:180deg}.rotate-180,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-steps{animation:spin .75s steps(8) infinite}.\!cursor-not-allowed{cursor:not-allowed!important}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[220px_1fr\]{grid-template-columns:220px 1fr}.grid-cols-\[minmax\(280px\2c 1fr\)_minmax\(220px\2c 1fr\)_minmax\(220px\2c 1fr\)\]{grid-template-columns:minmax(280px,1fr) minmax(220px,1fr) minmax(220px,1fr)}.grid-rows-\[auto_1fr\]{grid-template-rows:auto 1fr}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-\[2px\]{gap:2px}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-x-\[160px\]{-moz-column-gap:160px;column-gap:160px}.gap-y-1{row-gap:.25rem}.gap-y-2{row-gap:.5rem}.gap-y-3{row-gap:.75rem}.gap-y-4{row-gap:1rem}.gap-y-6{row-gap:1.5rem}.gap-y-\[80px\]{row-gap:80px}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem*var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem*var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px*var(--tw-divide-y-reverse))}.divide-tertiary>:not([hidden])~:not([hidden]){border-color:var(--stroke-tertiary,#0c101d)}.self-end{align-self:flex-end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.\!rounded-\[2px\]{border-radius:2px!important}.rounded,.rounded-\[4px\]{border-radius:4px}.rounded-\[6px\]{border-radius:6px}.rounded-\[8px\]{border-radius:8px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.\!rounded-r-none{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-0{border-left-width:0}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-r-0{border-right-width:0}.border-t{border-top-width:1px}.border-t-4{border-top-width:4px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.\!border-none{border-style:none!important}.border-none{border-style:none}.border-\[\#F4CE46\]{--tw-border-opacity:1;border-color:rgb(244 206 70/var(--tw-border-opacity,1))}.border-accent-primary{border-color:var(--stroke-accent-primary,#7da4ff)}.border-accent-secondary{border-color:var(--stroke-accent-secondary,#37babc)}.border-error{border-color:var(--stroke-error,#f76464)}.border-hover{border-color:var(--stroke-hover,#eef1f7)}.border-info{border-color:var(--stroke-info,#7da4ff)}.border-primary{border-color:var(--stroke-primary,#696e7c)}.border-red-900{border-color:var(--red-900,#402027)}.border-secondary{border-color:var(--stroke-secondary,#242c42)}.border-success{border-color:var(--stroke-success,#37babc)}.border-tertiary{border-color:var(--stroke-tertiary,#0c101d)}.border-transparent{border-color:transparent}.border-warning{border-color:var(--stroke-warning,#eec840)}.border-b-accent-primary{border-bottom-color:var(--stroke-accent-primary,#7da4ff)}.border-l-accent-primary{border-left-color:var(--stroke-accent-primary,#7da4ff)}.border-l-transparent{border-left-color:transparent}.\!bg-accent-secondary{background-color:var(--bg-accent-secondary,#37babc)!important}.\!bg-layer-2{background-color:var(--bg-layer-2,#161b2d)!important}.\!bg-layer-4{background-color:var(--bg-layer-4,#242c42)!important}.bg-accent-primary{background-color:var(--bg-accent-primary,#5c8dea)}.bg-accent-primary-alpha{background-color:var(--bg-accent-primary-alpha,#7da4ff26)}.bg-accent-secondary{background-color:var(--bg-accent-secondary,#37babc)}.bg-accent-secondary-alpha{background-color:var(--bg-accent-secondary-alpha,#37babc2e)}.bg-accent-tertiary-alpha{background-color:var(--bg-accent-tertiary-alpha,#a972ff2e)}.bg-blackout{background-color:var(--bg-blackout,#0c101db3)}.bg-controls-accent-primary{background-color:var(--controls-bg-accent-primary,#3664e2)}.bg-controls-disable{background-color:var(--controls-bg-disable,#242c42)}.bg-controls-disable-accent{background-color:var(--controls-bg-disable-accent,#696e7c)}.bg-controls-enable-primary{background-color:var(--controls-enable-primary,#fcfcfc)}.bg-controls-error{background-color:var(--controls-bg-error,#cc4545)}.bg-error{background-color:var(--bg-error,#402027)}.bg-info{background-color:var(--bg-info,#1c2c47)}.bg-layer-0{background-color:var(--bg-layer-0,#000)}.bg-layer-1{background-color:var(--bg-layer-1,#0c101d)}.bg-layer-2{background-color:var(--bg-layer-2,#161b2d)}.bg-layer-3{background-color:var(--bg-layer-3,#1d2439)}.bg-layer-4{background-color:var(--bg-layer-4,#242c42)}.bg-red-400{background-color:var(--bg-red-400,#f76464)}.bg-success{background-color:var(--bg-success,#1d3841)}.bg-transparent{background-color:transparent}.bg-warning{background-color:var(--bg-warning,#3f3d25)}.stroke-primary{stroke:var(--stroke-primary,#696e7c)}.\!p-1{padding:.25rem!important}.\!p-\[9px\]{padding:9px!important}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-9{padding:2.25rem}.p-\[6px\]{padding:6px}.px-0{padding-left:0;padding-right:0}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-\[1px\]{padding-top:1px;padding-bottom:1px}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-3{padding-left:.75rem}.pl-6{padding-left:1.5rem}.pl-\[7px\]{padding-left:7px}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pr-\[7px\]{padding-right:7px}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.font{font-family:var(--theme-font,var(--font-inter))}.\!text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-4{line-height:1rem}.leading-none{line-height:1}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\[var\(--bg-layer-0\2c _\#000000\)\]{color:var(--bg-layer-0,#000)}.text-accent-primary{color:var(--text-accent-primary,#7da4ff)}.text-accent-secondary{color:var(--text-accent-secondary,#37babc)}.text-accent-tertiary{color:var(--text-accent-tertiary,#a972ff)}.text-controls-accent-disable{color:var(--controls-text-accent-disable,#242c42)}.text-controls-primary-disable{color:var(--controls-text-primary-disable,#7c8293)}.text-controls-secondary-disable{color:var(--controls-text-secondary-disable,#575f73)}.text-error{color:var(--text-error,#f76464)}.text-info{color:var(--text-info,#7da4ff)}.text-primary{color:var(--text-primary,#eef1f7)}.text-secondary{color:var(--text-secondary,#9fa6bd)}.text-success{color:var(--text-success,#37babc)}.text-transparent{color:transparent}.text-warning{color:var(--text-warning,#eec840)}.text-warning-icon{color:var(--text-warning-icon,#eec840)}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.\!shadow-none{--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow:0 0 4px 0 var(--bg-blackout,#0c101db3);--tw-shadow-colored:0 0 4px 0 var(--tw-shadow-color)}.shadow,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-offset-0{outline-offset:0}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-1,.ring-2{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-sky-400{--tw-ring-opacity:1;--tw-ring-color:rgb(56 189 248/var(--tw-ring-opacity,1))}.ring-offset-1{--tw-ring-offset-width:1px}.ring-offset-2{--tw-ring-offset-width:2px}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.\[writing-mode\:tb-rl\]{writing-mode:tb-rl}}.placeholder\:text-secondary::-moz-placeholder{color:var(--text-secondary,#9fa6bd)}.placeholder\:text-secondary::placeholder{color:var(--text-secondary,#9fa6bd)}.before\:inline-block:before{content:var(--tw-content);display:inline-block}.before\:h-\[18px\]:before{content:var(--tw-content);height:18px}.before\:w-\[18px\]:before{content:var(--tw-content);width:18px}.before\:rounded:before{content:var(--tw-content);border-radius:4px}.before\:border:before{content:var(--tw-content);border-width:1px}.before\:border-hover:before{content:var(--tw-content);border-color:var(--stroke-hover,#eef1f7)}.before\:bg-layer-4:before{content:var(--tw-content);background-color:var(--bg-layer-4,#242c42)}.before\:content-\[\"\"\]:before{--tw-content:"";content:var(--tw-content)}.last\:mb-0:last-child{margin-bottom:0}.last\:border-0:last-child{border-width:0}.focus-within\:border-focus:focus-within{border-color:var(--stroke-focus,#eef1f7)}.hover\:border-hover:hover{border-color:var(--stroke-hover,#eef1f7)}.hover\:bg-accent-primary-alpha:hover{background-color:var(--bg-accent-primary-alpha,#7da4ff26)}.hover\:text-accent-primary:hover{color:var(--text-accent-primary,#7da4ff)}.hover\:text-accent-tertiary:hover{color:var(--text-accent-tertiary,#a972ff)}.hover\:text-controls-accent-primary-hover:hover{color:var(--controls-text-accent-primary-hover,#3664e2)}.hover\:text-error:hover{color:var(--text-error,#f76464)}.hover\:text-primary:hover{color:var(--text-primary,#eef1f7)}.focus\:bg-accent-primary-alpha:focus{background-color:var(--bg-accent-primary-alpha,#7da4ff26)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:border-none:focus-visible{border-style:none}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:outline:focus-visible{outline-style:solid}.active\:text-controls-accent-primary-active:active{color:var(--controls-text-accent-primary-active,#124ace)}.enabled\:text-secondary:enabled{color:var(--text-secondary,#9fa6bd)}.enabled\:hover\:bg-accent-primary-alpha:hover:enabled{background-color:var(--bg-accent-primary-alpha,#7da4ff26)}.enabled\:hover\:text-accent-primary:hover:enabled,.hover\:enabled\:text-accent-primary:enabled:hover{color:var(--text-accent-primary,#7da4ff)}.enabled\:active\:bg-controls-accent-primary-alpha-active:active:enabled{background-color:var(--controls-bg-accent-primary-alpha-active,#7da4ff4d)}.enabled\:active\:text-accent-primary:active:enabled{color:var(--text-accent-primary,#7da4ff)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:text-controls-secondary-disable:disabled{color:var(--controls-text-secondary-disable,#575f73)}.disabled\:hover\:cursor-default:hover:disabled{cursor:default}.group\/grid-row:hover .group-hover\/grid-row\:pointer-events-auto{pointer-events:auto}.group:hover .group-hover\:visible,.group\/item:hover .group-hover\/item\:visible{visibility:visible}.group\/grid-row:hover .group-hover\/grid-row\:bg-accent-primary-alpha,.group\/item:hover .group-hover\/item\:bg-accent-primary-alpha{background-color:var(--bg-accent-primary-alpha,#7da4ff26)}.group\/grid-row:hover .group-hover\/grid-row\:opacity-100{opacity:1}@media (min-width:640px){.sm\:inline{display:inline}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:768px){.md\:\!h-\[800px\]{height:800px!important}.md\:max-w-\[1200px\]{max-width:1200px}.md\:max-w-\[400px\]{max-width:400px}.md\:max-w-\[800px\]{max-width:800px}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:p-4{padding:1rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width:1024px){.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}
|
|
@@ -47,4 +47,4 @@ export declare function getForbiddenSymbolsTooltip(item: {
|
|
|
47
47
|
name: string;
|
|
48
48
|
isFolder: boolean;
|
|
49
49
|
}, forbiddenSymbolsRegExp?: RegExp, forbiddenSymbolsTooltip?: ReactNode): ReactNode | undefined;
|
|
50
|
-
export declare const getRowTooltip: (file: FileManagerGridRow, allowedFileTypes?:
|
|
50
|
+
export declare const getRowTooltip: (file: FileManagerGridRow, allowedFileTypes?: string[], maxSelectableFileSize?: number, unsupportedFileTypeTooltip?: string, fileTooLargeTooltip?: string) => string | undefined;
|