@mongodb-js/compass-web 0.34.0 → 0.35.1
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/128.d74f22fdbc215f781713.mjs +2 -0
- package/dist/145.bb3ab3ecc577c03d4719.mjs +1 -0
- package/dist/455.00dd3b68f4afab746f19.mjs +1 -0
- package/dist/{174.9b919a5407fdc3851924.mjs → 531.763ecadd9feb95d2dac6.mjs} +3 -3
- package/dist/583.aa2542a4a9a81cf18049.mjs +378 -0
- package/dist/689.fc3ea78ca03540c88c5e.mjs +2 -0
- package/dist/755.3d354b04ff596a23fd46.mjs +2 -0
- package/dist/755.3d354b04ff596a23fd46.mjs.LICENSE.txt +5 -0
- package/dist/{800.dcb5412b380b659e88ac.mjs → 800.6acd53ae9617e3cb63ed.mjs} +2 -2
- package/dist/901.2101dc93082369c119a3.mjs +2 -0
- package/dist/965.d5a6b7e950f14396c862.mjs +1 -0
- package/dist/assets-manifest.json +11 -10
- package/dist/compass-web.d.ts +1 -1
- package/dist/compass-web.mjs +25 -25
- package/dist/{index-bde52cb3.8627a1873c0630586210.mjs → index-bde52cb3.291f8ae4bc856eb51b2e.mjs} +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +47 -46
- package/dist/128.9e3ffe7449cca93fbcb4.mjs +0 -2
- package/dist/400.ee421ec0c79f2e659fa8.mjs +0 -378
- package/dist/455.e6b707cae57e3018c29e.mjs +0 -1
- package/dist/48.9ca2dbc319085729bea6.mjs +0 -1
- package/dist/753.c784df67afeae6565839.mjs +0 -2
- package/dist/753.c784df67afeae6565839.mjs.LICENSE.txt +0 -16
- package/dist/772.2baa874c0109bdb1a2cb.mjs +0 -2
- package/dist/915.2a425bc2ab5dfa3e6a60.mjs +0 -2
- /package/dist/{128.9e3ffe7449cca93fbcb4.mjs.LICENSE.txt → 128.d74f22fdbc215f781713.mjs.LICENSE.txt} +0 -0
- /package/dist/{174.9b919a5407fdc3851924.mjs.LICENSE.txt → 531.763ecadd9feb95d2dac6.mjs.LICENSE.txt} +0 -0
- /package/dist/{400.ee421ec0c79f2e659fa8.mjs.LICENSE.txt → 583.aa2542a4a9a81cf18049.mjs.LICENSE.txt} +0 -0
- /package/dist/{772.2baa874c0109bdb1a2cb.mjs.LICENSE.txt → 689.fc3ea78ca03540c88c5e.mjs.LICENSE.txt} +0 -0
- /package/dist/{800.dcb5412b380b659e88ac.mjs.LICENSE.txt → 800.6acd53ae9617e3cb63ed.mjs.LICENSE.txt} +0 -0
- /package/dist/{915.2a425bc2ab5dfa3e6a60.mjs.LICENSE.txt → 901.2101dc93082369c119a3.mjs.LICENSE.txt} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 915.2a425bc2ab5dfa3e6a60.mjs.LICENSE.txt */
|
|
2
|
-
export const __webpack_esm_id__=915;export const __webpack_esm_ids__=[915];export const __webpack_esm_modules__={663:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(55e3),a=o(44081),l=function(){function e(){}return e.prototype.postConstruct=function(){this.doingTreeData=this.gridOptionsWrapper.isTreeData()},e.prototype.filter=function(e){var t=this.filterManager.isAnyFilterPresent();this.filterNodes(t,e)},e.prototype.filterNodes=function(e,t){var o=this,r=function(t,r){t.hasChildren()?(t.childrenAfterFilter=e&&!r?t.childrenAfterGroup.filter((function(e){var t=e.childrenAfterFilter&&e.childrenAfterFilter.length>0,r=e.data&&o.filterManager.doesRowPassFilter(e);return t||r})):t.childrenAfterGroup,o.setAllChildrenCount(t)):(t.childrenAfterFilter=t.childrenAfterGroup,t.setAllChildrenCount(null))};if(this.doingTreeDataFiltering()){var i=function(e,t){if(e.childrenAfterGroup)for(var n=0;n<e.childrenAfterGroup.length;n++){var s=e.childrenAfterGroup[n],a=t||o.filterManager.doesRowPassFilter(s);s.childrenAfterGroup?i(e.childrenAfterGroup[n],a):r(s,a)}r(e,t)};t.executeFromRootNode((function(e){return i(e,!1)}))}else t.forEachChangedNodeDepthFirst((function(e){return r(e,!1)}),!0)},e.prototype.setAllChildrenCountTreeData=function(e){var t=0;e.childrenAfterFilter.forEach((function(e){t++,t+=e.allChildrenCount})),e.setAllChildrenCount(t)},e.prototype.setAllChildrenCountGridGrouping=function(e){var t=0;e.childrenAfterFilter.forEach((function(e){e.group?t+=e.allChildrenCount:t++})),e.setAllChildrenCount(t)},e.prototype.setAllChildrenCount=function(e){this.doingTreeData?this.setAllChildrenCountTreeData(e):this.setAllChildrenCountGridGrouping(e)},e.prototype.doingTreeDataFiltering=function(){return this.gridOptionsWrapper.isTreeData()&&!this.gridOptionsWrapper.isExcludeChildrenWhenTreeDataFiltering()},r([n.Autowired("filterManager"),i("design:type",s.FilterManager)],e.prototype,"filterManager",void 0),r([n.Autowired("gridOptionsWrapper"),i("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"postConstruct",null),r([n.Bean("filterService")],e)}();t.FilterService=l},719:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n,s=o(45727),a=o(44081),l=o(44871),p=o(98239),u=o(55e3),c=o(15068),d=o(60843),h=o(85786),f=o(72493),g=o(54828),m=o(28771),y=o(68363),v=o(24463),C=o(88842),w=o(40797),E=o(83423);!function(e){e[e.Normal=0]="Normal",e[e.AfterFilter=1]="AfterFilter",e[e.AfterFilterAndSort=2]="AfterFilterAndSort",e[e.PivotNodes=3]="PivotNodes"}(n||(n={}));var _=function(){function e(){}return e.prototype.init=function(){var e=this.refreshModel.bind(this,{step:s.Constants.STEP_EVERYTHING}),t=this.refreshModel.bind(this,{step:s.Constants.STEP_EVERYTHING,afterColumnsChanged:!0});this.eventService.addModalPriorityEventListener(h.Events.EVENT_COLUMN_EVERYTHING_CHANGED,t),this.eventService.addModalPriorityEventListener(h.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.eventService.addModalPriorityEventListener(h.Events.EVENT_COLUMN_VALUE_CHANGED,this.onValueChanged.bind(this)),this.eventService.addModalPriorityEventListener(h.Events.EVENT_COLUMN_PIVOT_CHANGED,this.refreshModel.bind(this,{step:s.Constants.STEP_PIVOT})),this.eventService.addModalPriorityEventListener(h.Events.EVENT_ROW_GROUP_OPENED,this.onRowGroupOpened.bind(this)),this.eventService.addModalPriorityEventListener(h.Events.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.eventService.addModalPriorityEventListener(h.Events.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.eventService.addModalPriorityEventListener(h.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,e);var o=this.refreshModel.bind(this,{step:s.Constants.STEP_MAP,keepRenderedRows:!0,animate:!0});this.gridOptionsWrapper.addEventListener(a.GridOptionsWrapper.PROP_GROUP_REMOVE_SINGLE_CHILDREN,o),this.gridOptionsWrapper.addEventListener(a.GridOptionsWrapper.PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN,o),this.rootNode=new c.RowNode,this.nodeManager=new m.ClientSideNodeManager(this.rootNode,this.gridOptionsWrapper,this.context,this.eventService,this.columnController,this.gridApi,this.columnApi,this.selectionController),this.context.wireBean(this.rootNode)},e.prototype.ensureRowHeightsValid=function(e,t,o,r){var i,n=!1;do{i=!1;for(var s=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(s,o),p=Math.min(a,r),u=l;u<=p;u++){var c=this.getRow(u);if(c.rowHeightEstimated){var d=this.gridOptionsWrapper.getRowHeightForNode(c);c.setRowHeight(d.height),i=!0,n=!0}}i&&this.setRowTops()}while(i);return n},e.prototype.setRowTops=function(){for(var e=0,t=0;t<this.rowsToDisplay.length;t++){var o=this.gridOptionsWrapper.getDomLayout()===s.Constants.DOM_LAYOUT_NORMAL,r=this.rowsToDisplay[t];if(E._.missing(r.rowHeight)){var i=this.gridOptionsWrapper.getRowHeightForNode(r,o);r.setRowHeight(i.height,i.estimated)}r.setRowTop(e),r.setRowIndex(t),e+=r.rowHeight}},e.prototype.resetRowTops=function(e,t){if(e.clearRowTop(),e.hasChildren()){if(e.childrenAfterGroup&&(!t.isActive()||e.expanded))for(var o=0;o<e.childrenAfterGroup.length;o++)this.resetRowTops(e.childrenAfterGroup[o],t);e.sibling&&e.sibling.clearRowTop()}e.detailNode&&e.detailNode.clearRowTop()},e.prototype.ensureRowAtPixel=function(e,t){var o=this.getRowIndexAtPixel(t);return this.getRow(o)!==e&&(E._.removeFromArray(this.rootNode.allLeafChildren,e),E._.insertIntoArray(this.rootNode.allLeafChildren,e,o),this.refreshModel({step:s.Constants.STEP_EVERYTHING,keepRenderedRows:!0,animate:!0,keepEditingRows:!0}),!0)},e.prototype.isLastRowFound=function(){return!0},e.prototype.getRowCount=function(){return this.rowsToDisplay?this.rowsToDisplay.length:0},e.prototype.getRowBounds=function(e){if(E._.missing(this.rowsToDisplay))return null;var t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null},e.prototype.onRowGroupOpened=function(){var e=this.gridOptionsWrapper.isAnimateRows();this.refreshModel({step:s.Constants.STEP_MAP,keepRenderedRows:!0,animate:e})},e.prototype.onFilterChanged=function(){var e=this.gridOptionsWrapper.isAnimateRows();this.refreshModel({step:s.Constants.STEP_FILTER,keepRenderedRows:!0,animate:e})},e.prototype.onSortChanged=function(){var e=this.gridOptionsWrapper.isAnimateRows();this.refreshModel({step:s.Constants.STEP_SORT,keepRenderedRows:!0,animate:e,keepEditingRows:!0})},e.prototype.getType=function(){return s.Constants.ROW_MODEL_TYPE_CLIENT_SIDE},e.prototype.onValueChanged=function(){this.columnController.isPivotActive()?this.refreshModel({step:s.Constants.STEP_PIVOT}):this.refreshModel({step:s.Constants.STEP_AGGREGATE})},e.prototype.createChangePath=function(e){var t=E._.missingOrEmpty(e),o=new y.ChangedPath(!1,this.rootNode);return(t||this.gridOptionsWrapper.isTreeData())&&o.setInactive(),o},e.prototype.refreshModel=function(e){var t=this,o=this.createChangePath(e.rowNodeTransactions);switch(e.step){case s.Constants.STEP_EVERYTHING:this.doRowGrouping(e.groupState,e.rowNodeTransactions,e.rowNodeOrder,o,e.afterColumnsChanged);case s.Constants.STEP_FILTER:this.doFilter(o);case s.Constants.STEP_PIVOT:this.doPivot(o);case s.Constants.STEP_AGGREGATE:this.doAggregate(o);case s.Constants.STEP_SORT:this.doSort(e.rowNodeTransactions,o);case s.Constants.STEP_MAP:this.doRowsToDisplay()}this.resetRowTops(this.rootNode,o),this.setRowTops();var r={type:h.Events.EVENT_MODEL_UPDATED,api:this.gridApi,columnApi:this.columnApi,animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1};this.eventService.dispatchEvent(r),this.$scope&&window.setTimeout((function(){t.$scope.$apply()}),0)},e.prototype.isEmpty=function(){var e;return e=E._.exists(this.gridOptionsWrapper.getNodeChildDetailsFunc())?E._.missing(this.rootNode.childrenAfterGroup)||0===this.rootNode.childrenAfterGroup.length:E._.missing(this.rootNode.allLeafChildren)||0===this.rootNode.allLeafChildren.length,E._.missing(this.rootNode)||e||!this.columnController.isReady()},e.prototype.isRowsToRender=function(){return E._.exists(this.rowsToDisplay)&&this.rowsToDisplay.length>0},e.prototype.getNodesInRangeForSelection=function(e,t){var o,r=!t,i=!1,n=[],s=this.gridOptionsWrapper.isGroupSelectsChildren();return this.forEachNodeAfterFilterAndSort((function(a){var l=r&&!i;if(r||a!==t&&a!==e||(r=!0),!a.group||!s){var p=r&&!i,u=a.isParentOfNode(o);(p||u)&&n.push(a)}l&&(a!==t&&a!==e||(i=!0,o=a===t?t:e))})),n},e.prototype.setDatasource=function(e){console.error("ag-Grid: should never call setDatasource on clientSideRowController")},e.prototype.getTopLevelNodes=function(){return this.rootNode?this.rootNode.childrenAfterGroup:null},e.prototype.getRootNode=function(){return this.rootNode},e.prototype.getRow=function(e){return this.rowsToDisplay[e]},e.prototype.isRowPresent=function(e){return this.rowsToDisplay.indexOf(e)>=0},e.prototype.getVirtualRowCount=function(){return console.warn("ag-Grid: rowModel.getVirtualRowCount() is not longer a function, use rowModel.getRowCount() instead"),this.getPageLastRow()},e.prototype.getPageFirstRow=function(){return 0},e.prototype.getPageLastRow=function(){return this.rowsToDisplay?this.rowsToDisplay.length-1:0},e.prototype.getRowIndexAtPixel=function(e){if(this.isEmpty())return-1;var t=0,o=this.rowsToDisplay.length-1;if(e<=0)return 0;if(this.rowsToDisplay[this.rowsToDisplay.length-1].rowTop<=e)return this.rowsToDisplay.length-1;for(;;){var r=Math.floor((t+o)/2),i=this.rowsToDisplay[r];if(this.isRowInPixel(i,e))return r;i.rowTop<e?t=r+1:i.rowTop>e&&(o=r-1)}},e.prototype.isRowInPixel=function(e,t){var o=e.rowTop,r=e.rowTop+e.rowHeight;return o<=t&&r>t},e.prototype.getCurrentPageHeight=function(){if(this.rowsToDisplay&&this.rowsToDisplay.length>0){var e=this.rowsToDisplay[this.rowsToDisplay.length-1];return e.rowTop+e.rowHeight}return 0},e.prototype.forEachLeafNode=function(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach((function(t,o){return e(t,o)}))},e.prototype.forEachNode=function(e){this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterGroup,e,n.Normal,0)},e.prototype.forEachNodeAfterFilter=function(e){this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterFilter,e,n.AfterFilter,0)},e.prototype.forEachNodeAfterFilterAndSort=function(e){this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterSort,e,n.AfterFilterAndSort,0)},e.prototype.forEachPivotNode=function(e){this.recursivelyWalkNodesAndCallback([this.rootNode],e,n.PivotNodes,0)},e.prototype.recursivelyWalkNodesAndCallback=function(e,t,o,r){if(e)for(var i=0;i<e.length;i++){var s=e[i];if(t(s,r++),s.hasChildren()){var a=null;switch(o){case n.Normal:a=s.childrenAfterGroup;break;case n.AfterFilter:a=s.childrenAfterFilter;break;case n.AfterFilterAndSort:a=s.childrenAfterSort;break;case n.PivotNodes:a=s.leafGroup?null:s.childrenAfterSort}a&&(r=this.recursivelyWalkNodesAndCallback(a,t,o,r))}}return r},e.prototype.doAggregate=function(e){this.aggregationStage&&this.aggregationStage.execute({rowNode:this.rootNode,changedPath:e})},e.prototype.expandOrCollapseAll=function(e){var t=this.gridOptionsWrapper.isTreeData();this.rootNode&&function o(r){r&&r.forEach((function(r){(t?E._.exists(r.childrenAfterGroup):r.group)&&(r.expanded=e,o(r.childrenAfterGroup))}))}(this.rootNode.childrenAfterGroup),this.refreshModel({step:s.Constants.STEP_MAP});var o=e?"expandAll":"collapseAll",r={api:this.gridApi,columnApi:this.columnApi,type:h.Events.EVENT_EXPAND_COLLAPSE_ALL,source:o};this.eventService.dispatchEvent(r)},e.prototype.doSort=function(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t})},e.prototype.doRowGrouping=function(e,t,o,r,i){var n=this;E._.exists(this.gridOptionsWrapper.getNodeChildDetailsFunc())||(this.groupStage?(t&&E._.exists(t)?t.forEach((function(e){n.groupStage.execute({rowNode:n.rootNode,rowNodeTransaction:e,rowNodeOrder:o,changedPath:r})})):(this.selectionController.removeGroupsFromSelection(),this.groupStage.execute({rowNode:this.rootNode,changedPath:r,afterColumnsChanged:i}),this.restoreGroupState(e)),this.gridOptionsWrapper.isGroupSelectsChildren()&&this.selectionController.updateGroupsFromChildrenSelections(r)):this.rootNode.childrenAfterGroup=this.rootNode.allLeafChildren)},e.prototype.restoreGroupState=function(e){e&&E._.traverseNodesWithKey(this.rootNode.childrenAfterGroup,(function(t,o){"boolean"==typeof e[o]&&(t.expanded=e[o])}))},e.prototype.doFilter=function(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})},e.prototype.doPivot=function(e){this.pivotStage&&this.pivotStage.execute({rowNode:this.rootNode,changedPath:e})},e.prototype.getGroupState=function(){if(!this.rootNode.childrenAfterGroup||!this.gridOptionsWrapper.isRememberGroupStateWhenNewData())return null;var e={};return E._.traverseNodesWithKey(this.rootNode.childrenAfterGroup,(function(t,o){return e[o]=t.expanded})),e},e.prototype.getCopyOfNodesMap=function(){return this.nodeManager.getCopyOfNodesMap()},e.prototype.getRowNode=function(e){return this.nodeManager.getRowNode(e)},e.prototype.setRowData=function(e){var t=this.getGroupState();this.nodeManager.setRowData(e);var o={type:h.Events.EVENT_ROW_DATA_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(o),this.refreshModel({step:s.Constants.STEP_EVERYTHING,groupState:t,newData:!0})},e.prototype.batchUpdateRowData=function(e,t){var o=this;if(!this.rowDataTransactionBatch){this.rowDataTransactionBatch=[];var r=this.gridOptionsWrapper.getBatchUpdateWaitMillis();window.setTimeout((function(){o.executeBatchUpdateRowData(),o.rowDataTransactionBatch=null}),r)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})},e.prototype.executeBatchUpdateRowData=function(){var e=this;this.valueCache.onDataChanged();var t=[],o=[];this.rowDataTransactionBatch&&this.rowDataTransactionBatch.forEach((function(r){var i=e.nodeManager.updateRowData(r.rowDataTransaction,null);o.push(i),r.callback&&t.push(r.callback.bind(i))})),this.commonUpdateRowData(o),t.length>0&&window.setTimeout((function(){t.forEach((function(e){return e()}))}),0)},e.prototype.updateRowData=function(e,t){this.valueCache.onDataChanged();var o=this.nodeManager.updateRowData(e,t);return this.commonUpdateRowData([o],t),o},e.prototype.commonUpdateRowData=function(e,t){this.refreshModel({step:s.Constants.STEP_EVERYTHING,rowNodeTransactions:e,rowNodeOrder:t,keepRenderedRows:!0,animate:!0,keepEditingRows:!0});var o={type:h.Events.EVENT_ROW_DATA_UPDATED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(o)},e.prototype.doRowsToDisplay=function(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})},e.prototype.onRowHeightChanged=function(){this.refreshModel({step:s.Constants.STEP_MAP,keepRenderedRows:!0,keepEditingRows:!0})},e.prototype.resetRowHeights=function(){this.forEachNode((function(e){return e.setRowHeight(null)})),this.onRowHeightChanged()},r([f.Autowired("gridOptionsWrapper"),i("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([f.Autowired("columnController"),i("design:type",p.ColumnController)],e.prototype,"columnController",void 0),r([f.Autowired("filterManager"),i("design:type",u.FilterManager)],e.prototype,"filterManager",void 0),r([f.Autowired("$scope"),i("design:type",Object)],e.prototype,"$scope",void 0),r([f.Autowired("selectionController"),i("design:type",g.SelectionController)],e.prototype,"selectionController",void 0),r([f.Autowired("eventService"),i("design:type",d.EventService)],e.prototype,"eventService",void 0),r([f.Autowired("context"),i("design:type",f.Context)],e.prototype,"context",void 0),r([f.Autowired("valueService"),i("design:type",v.ValueService)],e.prototype,"valueService",void 0),r([f.Autowired("valueCache"),i("design:type",C.ValueCache)],e.prototype,"valueCache",void 0),r([f.Autowired("columnApi"),i("design:type",l.ColumnApi)],e.prototype,"columnApi",void 0),r([f.Autowired("gridApi"),i("design:type",w.GridApi)],e.prototype,"gridApi",void 0),r([f.Autowired("filterStage"),i("design:type",Object)],e.prototype,"filterStage",void 0),r([f.Autowired("sortStage"),i("design:type",Object)],e.prototype,"sortStage",void 0),r([f.Autowired("flattenStage"),i("design:type",Object)],e.prototype,"flattenStage",void 0),r([f.Optional("groupStage"),i("design:type",Object)],e.prototype,"groupStage",void 0),r([f.Optional("aggregationStage"),i("design:type",Object)],e.prototype,"aggregationStage",void 0),r([f.Optional("pivotStage"),i("design:type",Object)],e.prototype,"pivotStage",void 0),r([f.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),r([f.Bean("rowModel")],e)}();t.ClientSideRowModel=_},814:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(44081),s=o(74517),a=o(72948),l=o(72493),p=o(72493),u=function(){function e(){}return e.prototype.calculateColInitialWidth=function(e){return e.width?e.width<this.gridOptionsWrapper.getMinColWidth()?this.gridOptionsWrapper.getMinColWidth():e.width:this.gridOptionsWrapper.getColWidth()},e.prototype.getOriginalPathForColumn=function(e,t){var o=[],r=!1;return function t(i,n){for(var s=0;s<i.length;s++){if(r)return;var l=i[s];l instanceof a.OriginalColumnGroup?(t(l.getChildren(),n+1),o[n]=l):l===e&&(r=!0)}}(t,0),r?o:null},e.prototype.depthFirstOriginalTreeSearch=function(e,t,o){var r=this;t&&t.forEach((function(t){t instanceof a.OriginalColumnGroup&&r.depthFirstOriginalTreeSearch(t,t.getChildren(),o),o(t,e)}))},e.prototype.depthFirstAllColumnTreeSearch=function(e,t){var o=this;e&&e.forEach((function(e){e instanceof s.ColumnGroup&&o.depthFirstAllColumnTreeSearch(e.getChildren(),t),t(e)}))},e.prototype.depthFirstDisplayedColumnTreeSearch=function(e,t){var o=this;e&&e.forEach((function(e){e instanceof s.ColumnGroup&&o.depthFirstDisplayedColumnTreeSearch(e.getDisplayedChildren(),t),t(e)}))},r([p.Autowired("gridOptionsWrapper"),i("design:type",n.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([l.Bean("columnUtils")],e)}();t.ColumnUtils=u},1571:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(72493),a=o(44081),l=o(83423),p=function(){function e(){this.gridInstanceId=t.gridInstanceSequence.next()}var t;return t=e,e.prototype.init=function(){this.stampDomElementWithGridInstance()},e.prototype.stampDomElementWithGridInstance=function(){this.eGridDiv[t.GRID_DOM_KEY]=this.gridInstanceId},e.prototype.getRenderedCellForEvent=function(e){return l._.getCellCompForEvent(this.gridOptionsWrapper,e)},e.prototype.isEventFromThisGrid=function(e){for(var o=l._.getEventPath(e),r=0;r<o.length;r++){var i=o[r][t.GRID_DOM_KEY];if(l._.exists(i))return i===this.gridInstanceId}return!1},e.prototype.getGridCellForEvent=function(e){var t=this.getRenderedCellForEvent(e);return t?t.getGridCell():null},e.gridInstanceSequence=new l.NumberSequence,e.GRID_DOM_KEY="__ag_grid_instance",r([s.Autowired("gridOptionsWrapper"),i("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([s.Autowired("eGridDiv"),i("design:type",HTMLElement)],e.prototype,"eGridDiv",void 0),r([n.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),t=r([n.Bean("mouseEventService")],e)}();t.MouseEventService=p},2102:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var n=o(96652),s=o(46410),a=o(47008),l=o(47008),p=function(e){function t(t,o){var r=e.call(this)||this;return r.reactComponent=t,r.parentComponent=o,r}return i(t,e),t.prototype.getFrameworkComponentInstance=function(){return this.componentInstance},t.prototype.getReactComponentName=function(){return this.reactComponent.name},t.prototype.init=function(e){var t=this;return new l.Promise((function(o){t.eParentElement=document.createElement(t.parentComponent.props.componentWrappingElement||"div"),a.Utils.addCssClass(t.eParentElement,"ag-react-container"),e.reactContainer=t.eParentElement,t.createReactComponentLegacy(e,o)}))},t.prototype.getGui=function(){return this.eParentElement},t.prototype.destroy=function(){s.unmountComponentAtNode(this.eParentElement)},t.prototype.createReactComponentLegacy=function(e,t){var o=this,r=n.createElement(this.reactComponent,e);this.parentComponent?s.unstable_renderSubtreeIntoContainer(this.parentComponent,r,this.eParentElement,(function(){o.componentInstance=this,t(null)})):s.render(r,this.eParentElement,(function(){o.componentInstance=this,t(null)}))},t}(o(30844).BaseReactComponent);t.LegacyReactComponent=p},2299:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(21951),l=o(8534),p=o(72493),u=o(44871),c=o(40797),d=o(85786),h=o(60843),f=o(45727),g=o(54828),m=o(44081),y=function(e){function t(t,o){var r=e.call(this)||this;r.cbSelectAllVisible=!1,r.processingEventFromCheckbox=!1,r.cbSelectAll=t,r.column=o;var i=o.getColDef();return r.filteredOnly=!!i&&!!i.headerCheckboxSelectionFilteredOnly,r}return i(t,e),t.prototype.postConstruct=function(){this.showOrHideSelectAll(),this.addDestroyableEventListener(this.eventService,d.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.showOrHideSelectAll.bind(this)),this.addDestroyableEventListener(this.eventService,d.Events.EVENT_SELECTION_CHANGED,this.onSelectionChanged.bind(this)),this.addDestroyableEventListener(this.eventService,d.Events.EVENT_MODEL_UPDATED,this.onModelChanged.bind(this)),this.addDestroyableEventListener(this.cbSelectAll,a.AgCheckbox.EVENT_CHANGED,this.onCbSelectAll.bind(this))},t.prototype.showOrHideSelectAll=function(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setVisible(this.cbSelectAllVisible),this.cbSelectAllVisible&&(this.checkRightRowModelType(),this.updateStateOfCheckbox())},t.prototype.onModelChanged=function(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()},t.prototype.onSelectionChanged=function(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()},t.prototype.getNextCheckboxState=function(e){return(0!==e.selected||0!==e.notSelected)&&(e.selected>0&&e.notSelected>0?null:e.selected>0)},t.prototype.updateStateOfCheckbox=function(){if(!this.processingEventFromCheckbox){this.processingEventFromCheckbox=!0;var e=this.getSelectionCount(),t=this.getNextCheckboxState(e);this.cbSelectAll.setSelected(t),this.processingEventFromCheckbox=!1}},t.prototype.getSelectionCount=function(){var e=this,t=0,o=0,r=function(r){e.gridOptionsWrapper.isGroupSelectsChildren()&&r.group||(r.isSelected()?t++:r.selectable&&o++)};return this.filteredOnly?this.gridApi.forEachNodeAfterFilter(r):this.gridApi.forEachNode(r),{notSelected:o,selected:t}},t.prototype.checkRightRowModelType=function(){var e=this.rowModel.getType();e===f.Constants.ROW_MODEL_TYPE_CLIENT_SIDE||console.warn("ag-Grid: selectAllCheckbox is only available if using normal row model, you are using "+e)},t.prototype.onCbSelectAll=function(){this.processingEventFromCheckbox||this.cbSelectAllVisible&&(this.cbSelectAll.isSelected()?this.selectionController.selectAllRowNodes(this.filteredOnly):this.selectionController.deselectAllRowNodes(this.filteredOnly))},t.prototype.isCheckboxSelection=function(){var e=this.column.getColDef().headerCheckboxSelection;return"function"==typeof e&&(e=e({column:this.column,colDef:this.column.getColDef(),columnApi:this.columnApi,api:this.gridApi})),!(!e||(this.gridOptionsWrapper.isRowModelServerSide()?(console.warn("headerCheckboxSelection is not supported for Server Side Row Model"),1):this.gridOptionsWrapper.isRowModelInfinite()?(console.warn("headerCheckboxSelection is not supported for Infinite Row Model"),1):this.gridOptionsWrapper.isRowModelViewport()&&(console.warn("headerCheckboxSelection is not supported for Viewport Row Model"),1)))},n([p.Autowired("gridApi"),s("design:type",c.GridApi)],t.prototype,"gridApi",void 0),n([p.Autowired("columnApi"),s("design:type",u.ColumnApi)],t.prototype,"columnApi",void 0),n([p.Autowired("eventService"),s("design:type",h.EventService)],t.prototype,"eventService",void 0),n([p.Autowired("rowModel"),s("design:type",Object)],t.prototype,"rowModel",void 0),n([p.Autowired("selectionController"),s("design:type",g.SelectionController)],t.prototype,"selectionController",void 0),n([p.Autowired("gridOptionsWrapper"),s("design:type",m.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([p.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(l.BeanStub);t.SelectAllFeature=y},2461:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(86608),a=o(24463),l=o(44081),p=o(98239),u=o(83423),c=function(){function e(){}return e.prototype.init=function(){this.postSortFunc=this.gridOptionsWrapper.getPostSortFunc()},e.prototype.sort=function(e,t,o,r,i,n){var s=this;i.forEachChangedNodeDepthFirst((function(a){if(s.pullDownGroupDataForHideOpenParents(a.childrenAfterFilter,!0),t){var l=o?s.doDeltaSort(a,e,r,i,n):s.doFullSort(a,e);a.childrenAfterSort=l.map((function(e){return e.rowNode}))}else a.childrenAfterSort=a.childrenAfterFilter.slice(0);s.updateChildIndexes(a),s.postSortFunc&&s.postSortFunc(a.childrenAfterSort)})),this.updateGroupDataForHiddenOpenParents(i)},e.prototype.doFullSort=function(e,t){var o=e.childrenAfterFilter.map(this.mapNodeToSortedNode.bind(this));return o.sort(this.compareRowNodes.bind(this,t)),o},e.prototype.mapNodeToSortedNode=function(e,t){return{currentPos:t,rowNode:e}},e.prototype.doDeltaSort=function(e,t,o,r,i){var n=e.childrenAfterSort.filter((function(e){var t=!o[e.id],n=i||r.canSkip(e);return t&&n})).map(this.mapNodeToSortedNode.bind(this)),s={};n.forEach((function(e){return s[e.rowNode.id]=e.rowNode}));var a=e.childrenAfterFilter.filter((function(e){return!s[e.id]})).map(this.mapNodeToSortedNode.bind(this));return a.sort(this.compareRowNodes.bind(this,t)),0===a.length?n:0===n.length?a:this.mergeSortedArrays(t,n,a)},e.prototype.mergeSortedArrays=function(e,t,o){for(var r=[],i=0,n=0;i<t.length&&n<o.length;)this.compareRowNodes(e,t[i],o[n])<0?r.push(t[i++]):r.push(o[n++]);for(;i<t.length;)r.push(t[i++]);for(;n<o.length;)r.push(o[n++]);return r},e.prototype.compareRowNodes=function(e,t,o){for(var r=t.rowNode,i=o.rowNode,n=0,s=e.length;n<s;n++){var a,l=e[n],p=-1===l.inverter,c=this.getValue(r,l.column),d=this.getValue(i,l.column);if(0!==(a=l.column.getColDef().comparator?l.column.getColDef().comparator(c,d,r,i,p):u._.defaultComparator(c,d,this.gridOptionsWrapper.isAccentedSort())))return a*l.inverter}return t.currentPos-o.currentPos},e.prototype.getValue=function(e,t){return this.valueService.getValue(t,e)},e.prototype.updateChildIndexes=function(e){if(!u._.missing(e.childrenAfterSort))for(var t=e.childrenAfterSort,o=0;o<t.length;o++){var r=t[o],i=0===o,n=o===e.childrenAfterSort.length-1;r.setFirstChild(i),r.setLastChild(n),r.setChildIndex(o)}},e.prototype.updateGroupDataForHiddenOpenParents=function(e){var t=this;if(this.gridOptionsWrapper.isGroupHideOpenParents()){var o=function(e){t.pullDownGroupDataForHideOpenParents(e.childrenAfterSort,!1),e.childrenAfterSort.forEach((function(e){e.hasChildren()&&o(e)}))};e.executeFromRootNode((function(e){return o(e)}))}},e.prototype.pullDownGroupDataForHideOpenParents=function(e,t){var o=this;u._.missing(e)||this.gridOptionsWrapper.isGroupHideOpenParents()&&e.forEach((function(e){o.columnController.getGroupDisplayColumns().forEach((function(r){var i=r.getColDef().showRowGroup;if("string"==typeof i){var n=i,s=o.columnController.getPrimaryColumn(n);if(s!==e.rowGroupColumn)if(t)e.setGroupValue(r.getId(),null);else{var a=e.getFirstChildOfFirstChild(s);a&&e.setGroupValue(r.getId(),a.key)}}else console.error("ag-Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup")}))}))},r([n.Autowired("sortController"),i("design:type",s.SortController)],e.prototype,"sortController",void 0),r([n.Autowired("columnController"),i("design:type",p.ColumnController)],e.prototype,"columnController",void 0),r([n.Autowired("valueService"),i("design:type",a.ValueService)],e.prototype,"valueService",void 0),r([n.Autowired("gridOptionsWrapper"),i("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),r([n.Bean("sortService")],e)}();t.SortService=c},3976:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(45727),i=o(34782),n=o(83423),s=function(){function e(e,t){this.rowIndex=e,this.floating=n._.makeNull(t)}return e.prototype.isFloatingTop=function(){return this.floating===r.Constants.PINNED_TOP},e.prototype.isFloatingBottom=function(){return this.floating===r.Constants.PINNED_BOTTOM},e.prototype.isNotFloating=function(){return!this.isFloatingBottom()&&!this.isFloatingTop()},e.prototype.equals=function(e){return this.rowIndex===e.rowIndex&&this.floating===e.floating},e.prototype.toString=function(){return"rowIndex = "+this.rowIndex+", floating = "+this.floating},e.prototype.getGridCell=function(e){var t={rowIndex:this.rowIndex,floating:this.floating,column:e};return new i.GridCell(t)},e.prototype.before=function(e){var t=e.floating;switch(this.floating){case r.Constants.PINNED_TOP:if(t!==r.Constants.PINNED_TOP)return!0;break;case r.Constants.PINNED_BOTTOM:if(t!==r.Constants.PINNED_BOTTOM)return!1;break;default:if(n._.exists(t))return t!==r.Constants.PINNED_TOP}return this.rowIndex<e.rowIndex},e}();t.GridRow=s},4889:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(44081),a=o(83423),l=function(){function e(){}return e.prototype.init=function(){this.groupSelectsChildren=this.gridOptionsWrapper.isGroupSelectsChildren(),this.isRowSelectableFunc=this.gridOptionsWrapper.getIsRowSelectableFunc()},e.prototype.updateSelectableAfterGrouping=function(e){this.isRowSelectableFunc&&this.recurseDown(e.childrenAfterGroup,(function(e){return e.childrenAfterGroup}))},e.prototype.updateSelectableAfterFiltering=function(e){this.isRowSelectableFunc&&this.recurseDown(e.childrenAfterGroup,(function(e){return e.childrenAfterFilter}))},e.prototype.recurseDown=function(e,t){var o=this;e.forEach((function(e){if(e.group){var r;if(e.hasChildren()&&o.recurseDown(t(e),t),o.groupSelectsChildren){var i=a._.find(t(e),"selectable",!0);r=a._.exists(i)}else r=!!o.isRowSelectableFunc&&o.isRowSelectableFunc(e);e.setRowSelectable(r)}}))},r([n.Autowired("gridOptionsWrapper"),i("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),r([n.Bean("selectableService")],e)}();t.SelectableService=l},5448:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.isPopup=function(){return!0},t}(o(71616).TextCellEditor);t.PopupTextCellEditor=n},6065:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(72493),l=o(44081),p=o(68363),u=o(10042),c=o(60843),d=o(45727),h=o(8534),f=o(85786),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.init=function(){this.rowModel.getType()===d.Constants.ROW_MODEL_TYPE_CLIENT_SIDE&&(this.clientSideRowModel=this.rowModel),this.addDestroyableEventListener(this.eventService,f.Events.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged.bind(this))},t.prototype.onCellValueChanged=function(e){this.doChangeDetection(e.node,e.column)},t.prototype.doChangeDetection=function(e,t){if(!this.gridOptionsWrapper.isSuppressChangeDetection()){if(this.clientSideRowModel&&!e.isRowPinned()){var o=this.gridOptionsWrapper.isAggregateOnlyChangedColumns(),r=new p.ChangedPath(o,this.clientSideRowModel.getRootNode());r.addParentNode(e.parent,[t]),this.clientSideRowModel.doAggregate(r)}this.rowRenderer.refreshCells()}},n([a.Autowired("gridOptionsWrapper"),s("design:type",l.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([a.Autowired("rowModel"),s("design:type",Object)],t.prototype,"rowModel",void 0),n([a.Autowired("rowRenderer"),s("design:type",u.RowRenderer)],t.prototype,"rowRenderer",void 0),n([a.Autowired("eventService"),s("design:type",c.EventService)],t.prototype,"eventService",void 0),n([a.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"init",null),n([a.Bean("changeDetectionService")],t)}(h.BeanStub);t.ChangeDetectionService=g},6577:(e,t,o)=>{var r,i=o(9606).URL,n=o(65994).process,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,p=Object.prototype.hasOwnProperty,u=(e,t)=>{for(var o in t)s(e,o,{get:t[o],enumerable:!0})},c={};u(c,{AISDKError:()=>O.AISDKError,APICallError:()=>O.APICallError,AbstractChat:()=>rn,DefaultChatTransport:()=>on,DownloadError:()=>qe,EmptyResponseBodyError:()=>O.EmptyResponseBodyError,Experimental_Agent:()=>Tr,HttpChatTransport:()=>tn,InvalidArgumentError:()=>x,InvalidDataContentError:()=>Pe,InvalidMessageRoleError:()=>Me,InvalidPromptError:()=>O.InvalidPromptError,InvalidResponseDataError:()=>O.InvalidResponseDataError,InvalidStreamPartError:()=>L,InvalidToolInputError:()=>B,JSONParseError:()=>O.JSONParseError,JsonToSseTransformStream:()=>Yo,LoadAPIKeyError:()=>O.LoadAPIKeyError,LoadSettingError:()=>O.LoadSettingError,MessageConversionError:()=>We,NoContentGeneratedError:()=>O.NoContentGeneratedError,NoImageGeneratedError:()=>$,NoObjectGeneratedError:()=>te,NoOutputGeneratedError:()=>ae,NoOutputSpecifiedError:()=>w,NoSpeechGeneratedError:()=>ue,NoSuchModelError:()=>O.NoSuchModelError,NoSuchProviderError:()=>Gi,NoSuchToolError:()=>ge,Output:()=>fi,RetryError:()=>Xe,SerialJobExecutor:()=>ii,TextStreamChatTransport:()=>sn,TooManyEmbeddingValuesForCallError:()=>O.TooManyEmbeddingValuesForCallError,ToolCallRepairError:()=>Ee,TypeValidationError:()=>O.TypeValidationError,UI_MESSAGE_STREAM_HEADERS:()=>qo,UnsupportedFunctionalityError:()=>O.UnsupportedFunctionalityError,UnsupportedModelVersionError:()=>Re,asSchema:()=>f.asSchema,assistantModelMessageSchema:()=>Ht,callCompletionApi:()=>Zi,consumeStream:()=>yr,convertFileListToFileUIParts:()=>Qi,convertToCoreMessages:()=>Or,convertToModelMessages:()=>Sr,coreAssistantMessageSchema:()=>Bt,coreMessageSchema:()=>qt,coreSystemMessageSchema:()=>Vt,coreToolMessageSchema:()=>zt,coreUserMessageSchema:()=>Wt,cosineSimilarity:()=>ti,createGateway:()=>h.createGateway,createIdGenerator:()=>f.createIdGenerator,createProviderRegistry:()=>ji,createTextStreamResponse:()=>Bo,createUIMessageStream:()=>fn,createUIMessageStreamResponse:()=>Ko,customProvider:()=>xi,defaultSettingsMiddleware:()=>bi,dynamicTool:()=>f.dynamicTool,embed:()=>Pr,embedMany:()=>Nr,experimental_createProviderRegistry:()=>Wi,experimental_customProvider:()=>Ni,experimental_generateImage:()=>kr,experimental_generateSpeech:()=>di,experimental_transcribe:()=>Yi,extractReasoningMiddleware:()=>Si,gateway:()=>h.gateway,generateId:()=>f.generateId,generateObject:()=>Qr,generateText:()=>Mo,getTextFromDataUrl:()=>oi,getToolName:()=>ur,getToolOrDynamicToolName:()=>cr,hasToolCall:()=>Ao,isDataUIPart:()=>rr,isDeepEqualData:()=>ri,isFileUIPart:()=>nr,isReasoningUIPart:()=>sr,isTextUIPart:()=>ir,isToolOrDynamicToolUIPart:()=>pr,isToolUIPart:()=>ar,jsonSchema:()=>f.jsonSchema,lastAssistantMessageIsCompleteWithToolCalls:()=>nn,modelMessageSchema:()=>Yt,parseJsonEventStream:()=>f.parseJsonEventStream,parsePartialJson:()=>or,pipeTextStreamToResponse:()=>zo,pipeUIMessageStreamToResponse:()=>gr,pruneMessages:()=>vi,readUIMessageStream:()=>gn,safeValidateUIMessages:()=>cn,simulateReadableStream:()=>si,simulateStreamingMiddleware:()=>Oi,smoothStream:()=>_i,stepCountIs:()=>To,streamObject:()=>li,streamText:()=>br,systemModelMessageSchema:()=>Gt,tool:()=>f.tool,toolModelMessageSchema:()=>Ut,uiMessageChunkSchema:()=>Qo,userModelMessageSchema:()=>jt,validateUIMessages:()=>dn,wrapLanguageModel:()=>Ti,wrapProvider:()=>Pi,zodSchema:()=>f.zodSchema}),e.exports=(r=c,((e,t,o,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of l(t))p.call(e,o)||undefined===o||s(e,o,{get:()=>t[o],enumerable:!(r=a(t,o))||r.enumerable});return e})(s({},"__esModule",{value:!0}),r));var d,h=o(10601),f=o(94192),g=o(94192),m=o(10292),y="AI_NoOutputSpecifiedError",v=`vercel.ai.error.${y}`,C=Symbol.for(v),w=class extends m.AISDKError{constructor({message:e="No output specified."}={}){super({name:y,message:e}),this[d]=!0}static isInstance(e){return m.AISDKError.hasMarker(e,v)}};function E(e){const t="AI SDK Warning:";switch(e.type){case"unsupported-setting":{let o=`${t} The "${e.setting}" setting is not supported by this model`;return e.details&&(o+=` - ${e.details}`),o}case"unsupported-tool":{let o=`${t} The tool "${"name"in e.tool?e.tool.name:"unknown tool"}" is not supported by this model`;return e.details&&(o+=` - ${e.details}`),o}case"other":return`${t} ${e.message}`;default:return`${t} ${JSON.stringify(e,null,2)}`}}d=C;var _,b=!1,R=e=>{if(0===e.length)return;const t=globalThis.AI_SDK_LOG_WARNINGS;if(!1!==t)if("function"!=typeof t){b||(b=!0,console.info("AI SDK Warning System: To turn off warning logging, set the AI_SDK_LOG_WARNINGS global to false."));for(const t of e)console.warn(E(t))}else t(e)},S=o(10601),O=o(10292),T=o(10292),A="AI_InvalidArgumentError",P=`vercel.ai.error.${A}`,I=Symbol.for(P),x=class extends T.AISDKError{constructor({parameter:e,value:t,message:o}){super({name:A,message:`Invalid argument for parameter ${e}: ${o}`}),this[_]=!0,this.parameter=e,this.value=t}static isInstance(e){return T.AISDKError.hasMarker(e,P)}};_=I;var D,N=o(10292),F="AI_InvalidStreamPartError",M=`vercel.ai.error.${F}`,k=Symbol.for(M),L=class extends N.AISDKError{constructor({chunk:e,message:t}){super({name:F,message:t}),this[D]=!0,this.chunk=e}static isInstance(e){return N.AISDKError.hasMarker(e,M)}};D=k;var G,V=o(10292),j="AI_InvalidToolInputError",W=`vercel.ai.error.${j}`,H=Symbol.for(W),B=class extends V.AISDKError{constructor({toolInput:e,toolName:t,cause:o,message:r=`Invalid input for tool ${t}: ${(0,V.getErrorMessage)(o)}`}){super({name:j,message:r,cause:o}),this[G]=!0,this.toolInput=e,this.toolName=t}static isInstance(e){return V.AISDKError.hasMarker(e,W)}};G=H;var U,z=o(10292),Y="AI_NoImageGeneratedError",q=`vercel.ai.error.${Y}`,K=Symbol.for(q),$=class extends z.AISDKError{constructor({message:e="No image generated.",cause:t,responses:o}){super({name:Y,message:e,cause:t}),this[U]=!0,this.responses=o}static isInstance(e){return z.AISDKError.hasMarker(e,q)}};U=K;var Z,J=o(10292),Q="AI_NoObjectGeneratedError",X=`vercel.ai.error.${Q}`,ee=Symbol.for(X),te=class extends J.AISDKError{constructor({message:e="No object generated.",cause:t,text:o,response:r,usage:i,finishReason:n}){super({name:Q,message:e,cause:t}),this[Z]=!0,this.text=o,this.response=r,this.usage=i,this.finishReason=n}static isInstance(e){return J.AISDKError.hasMarker(e,X)}};Z=ee;var oe,re=o(10292),ie="AI_NoOutputGeneratedError",ne=`vercel.ai.error.${ie}`,se=Symbol.for(ne),ae=class extends re.AISDKError{constructor({message:e="No output generated.",cause:t}={}){super({name:ie,message:e,cause:t}),this[oe]=!0}static isInstance(e){return re.AISDKError.hasMarker(e,ne)}};oe=se;var le,pe=o(10292),ue=class extends pe.AISDKError{constructor(e){super({name:"AI_NoSpeechGeneratedError",message:"No speech audio generated."}),this.responses=e.responses}},ce=o(10292),de="AI_NoSuchToolError",he=`vercel.ai.error.${de}`,fe=Symbol.for(he),ge=class extends ce.AISDKError{constructor({toolName:e,availableTools:t,message:o=`Model tried to call unavailable tool '${e}'. ${void 0===t?"No tools are available.":`Available tools: ${t.join(", ")}.`}`}){super({name:de,message:o}),this[le]=!0,this.toolName=e,this.availableTools=t}static isInstance(e){return ce.AISDKError.hasMarker(e,he)}};le=fe;var me,ye=o(10292),ve="AI_ToolCallRepairError",Ce=`vercel.ai.error.${ve}`,we=Symbol.for(Ce),Ee=class extends ye.AISDKError{constructor({cause:e,originalError:t,message:o=`Error repairing tool call: ${(0,ye.getErrorMessage)(e)}`}){super({name:ve,message:o,cause:e}),this[me]=!0,this.originalError=t}static isInstance(e){return ye.AISDKError.hasMarker(e,Ce)}};me=we;var _e,be=o(10292),Re=class extends be.AISDKError{constructor(e){super({name:"AI_UnsupportedModelVersionError",message:`Unsupported model version ${e.version} for provider "${e.provider}" and model "${e.modelId}". AI SDK 5 only supports models that implement specification version "v2".`}),this.version=e.version,this.provider=e.provider,this.modelId=e.modelId}},Se=o(10292),Oe="AI_InvalidDataContentError",Te=`vercel.ai.error.${Oe}`,Ae=Symbol.for(Te),Pe=class extends Se.AISDKError{constructor({content:e,cause:t,message:o=`Invalid data content. Expected a base64 string, Uint8Array, ArrayBuffer, or Buffer, but got ${typeof e}.`}){super({name:Oe,message:o,cause:t}),this[_e]=!0,this.content=e}static isInstance(e){return Se.AISDKError.hasMarker(e,Te)}};_e=Ae;var Ie,xe=o(10292),De="AI_InvalidMessageRoleError",Ne=`vercel.ai.error.${De}`,Fe=Symbol.for(Ne),Me=class extends xe.AISDKError{constructor({role:e,message:t=`Invalid message role: '${e}'. Must be one of: "system", "user", "assistant", "tool".`}){super({name:De,message:t}),this[Ie]=!0,this.role=e}static isInstance(e){return xe.AISDKError.hasMarker(e,Ne)}};Ie=Fe;var ke,Le=o(10292),Ge="AI_MessageConversionError",Ve=`vercel.ai.error.${Ge}`,je=Symbol.for(Ve),We=class extends Le.AISDKError{constructor({originalMessage:e,message:t}){super({name:Ge,message:t}),this[ke]=!0,this.originalMessage=e}static isInstance(e){return Le.AISDKError.hasMarker(e,Ve)}};ke=je;var He,Be=o(10292),Ue="AI_DownloadError",ze=`vercel.ai.error.${Ue}`,Ye=Symbol.for(ze),qe=class extends Be.AISDKError{constructor({url:e,statusCode:t,statusText:o,cause:r,message:i=(null==r?`Failed to download ${e}: ${t} ${o}`:`Failed to download ${e}: ${r}`)}){super({name:Ue,message:i,cause:r}),this[He]=!0,this.url=e,this.statusCode=t,this.statusText=o}static isInstance(e){return Be.AISDKError.hasMarker(e,ze)}};He=Ye;var Ke,$e=o(10292),Ze="AI_RetryError",Je=`vercel.ai.error.${Ze}`,Qe=Symbol.for(Je),Xe=class extends $e.AISDKError{constructor({message:e,reason:t,errors:o}){super({name:Ze,message:e}),this[Ke]=!0,this.reason=t,this.errors=o,this.lastError=o[o.length-1]}static isInstance(e){return $e.AISDKError.hasMarker(e,Je)}};function et(e){if("string"!=typeof e){if("v2"!==e.specificationVersion)throw new Re({version:e.specificationVersion,provider:e.provider,modelId:e.modelId});return e}return ot().languageModel(e)}function tt(e){if("string"!=typeof e){if("v2"!==e.specificationVersion)throw new Re({version:e.specificationVersion,provider:e.provider,modelId:e.modelId});return e}return ot().textEmbeddingModel(e)}function ot(){var e;return null!=(e=globalThis.AI_SDK_DEFAULT_PROVIDER)?e:S.gateway}Ke=Qe;var rt=o(94192),it=o(94192),nt=[{mediaType:"image/gif",bytesPrefix:[71,73,70]},{mediaType:"image/png",bytesPrefix:[137,80,78,71]},{mediaType:"image/jpeg",bytesPrefix:[255,216]},{mediaType:"image/webp",bytesPrefix:[82,73,70,70,null,null,null,null,87,69,66,80]},{mediaType:"image/bmp",bytesPrefix:[66,77]},{mediaType:"image/tiff",bytesPrefix:[73,73,42,0]},{mediaType:"image/tiff",bytesPrefix:[77,77,0,42]},{mediaType:"image/avif",bytesPrefix:[0,0,0,32,102,116,121,112,97,118,105,102]},{mediaType:"image/heic",bytesPrefix:[0,0,0,32,102,116,121,112,104,101,105,99]}],st=[{mediaType:"audio/mpeg",bytesPrefix:[255,251]},{mediaType:"audio/mpeg",bytesPrefix:[255,250]},{mediaType:"audio/mpeg",bytesPrefix:[255,243]},{mediaType:"audio/mpeg",bytesPrefix:[255,242]},{mediaType:"audio/mpeg",bytesPrefix:[255,227]},{mediaType:"audio/mpeg",bytesPrefix:[255,226]},{mediaType:"audio/wav",bytesPrefix:[82,73,70,70,null,null,null,null,87,65,86,69]},{mediaType:"audio/ogg",bytesPrefix:[79,103,103,83]},{mediaType:"audio/flac",bytesPrefix:[102,76,97,67]},{mediaType:"audio/aac",bytesPrefix:[64,21,0,0]},{mediaType:"audio/mp4",bytesPrefix:[102,116,121,112]},{mediaType:"audio/webm",bytesPrefix:[26,69,223,163]}],at=e=>{const t="string"==typeof e?(0,it.convertBase64ToUint8Array)(e):e,o=(127&t[6])<<21|(127&t[7])<<14|(127&t[8])<<7|127&t[9];return t.slice(o+10)};function lt({data:e,signatures:t}){const o=function(e){return"string"==typeof e&&e.startsWith("SUQz")||"string"!=typeof e&&e.length>10&&73===e[0]&&68===e[1]&&51===e[2]?at(e):e}(e),r="string"==typeof o?(0,it.convertBase64ToUint8Array)(o.substring(0,Math.min(o.length,24))):o;for(const e of t)if(r.length>=e.bytesPrefix.length&&e.bytesPrefix.every(((e,t)=>null===e||r[t]===e)))return e.mediaType}var pt=o(94192),ut="5.0.121",ct=async({url:e})=>{var t;const o=e.toString();try{const e=await fetch(o,{headers:(0,pt.withUserAgentSuffix)({},`ai-sdk/${ut}`,(0,pt.getRuntimeEnvironmentUserAgent)())});if(!e.ok)throw new qe({url:o,statusCode:e.status,statusText:e.statusText});return{data:new Uint8Array(await e.arrayBuffer()),mediaType:null!=(t=e.headers.get("content-type"))?t:void 0}}catch(e){if(qe.isInstance(e))throw e;throw new qe({url:o,cause:e})}},dt=(e=ct)=>t=>Promise.all(t.map((async t=>t.isUrlSupportedByModel?null:e(t)))),ht=o(10292),ft=o(94192),gt=o(19844),mt=gt.z.union([gt.z.string(),gt.z.instanceof(Uint8Array),gt.z.instanceof(ArrayBuffer),gt.z.custom((e=>{var t,o;return null!=(o=null==(t=globalThis.Buffer)?void 0:t.isBuffer(e))&&o}),{message:"Must be a Buffer"})]);function yt(e){if(e instanceof Uint8Array)return{data:e,mediaType:void 0};if(e instanceof ArrayBuffer)return{data:new Uint8Array(e),mediaType:void 0};if("string"==typeof e)try{e=new i(e)}catch(e){}if(e instanceof i&&"data:"===e.protocol){const{mediaType:t,base64Content:o}=function(e){try{const[t,o]=e.split(",");return{mediaType:t.split(";")[0].split(":")[1],base64Content:o}}catch(e){return{mediaType:void 0,base64Content:void 0}}}(e.toString());if(null==t||null==o)throw new ht.AISDKError({name:"InvalidDataContentError",message:`Invalid data URL format in content ${e.toString()}`});return{data:o,mediaType:t}}return{data:e,mediaType:void 0}}async function vt({prompt:e,supportedUrls:t,download:o=dt()}){const r=await async function(e,t,o){const r=e.filter((e=>"user"===e.role)).map((e=>e.content)).filter((e=>Array.isArray(e))).flat().filter((e=>"image"===e.type||"file"===e.type)).map((e=>{var t;const o=null!=(t=e.mediaType)?t:"image"===e.type?"image/*":void 0;let r="image"===e.type?e.image:e.data;if("string"==typeof r)try{r=new i(r)}catch(e){}return{mediaType:o,data:r}})).filter((e=>e.data instanceof i)).map((e=>({url:e.data,isUrlSupportedByModel:null!=e.mediaType&&(0,rt.isUrlSupported)({url:e.data.toString(),mediaType:e.mediaType,supportedUrls:o})}))),n=await t(r);return Object.fromEntries(n.map(((e,t)=>null==e?null:[r[t].url.toString(),{data:e.data,mediaType:e.mediaType}])).filter((e=>null!=e)))}(e.messages,o,t);return[...null!=e.system?[{role:"system",content:e.system}]:[],...e.messages.map((e=>function({message:e,downloadedAssets:t}){const o=e.role;switch(o){case"system":return{role:"system",content:e.content,providerOptions:e.providerOptions};case"user":return"string"==typeof e.content?{role:"user",content:[{type:"text",text:e.content}],providerOptions:e.providerOptions}:{role:"user",content:e.content.map((e=>function(e,t){var o;if("text"===e.type)return{type:"text",text:e.text,providerOptions:e.providerOptions};let r;const n=e.type;switch(n){case"image":r=e.image;break;case"file":r=e.data;break;default:throw new Error(`Unsupported part type: ${n}`)}const{data:s,mediaType:a}=yt(r);let l=null!=a?a:e.mediaType,p=s;if(p instanceof i){const e=t[p.toString()];e&&(p=e.data,null!=l||(l=e.mediaType))}switch(n){case"image":return(p instanceof Uint8Array||"string"==typeof p)&&(l=null!=(o=lt({data:p,signatures:nt}))?o:l),{type:"file",mediaType:null!=l?l:"image/*",filename:void 0,data:p,providerOptions:e.providerOptions};case"file":if(null==l)throw new Error("Media type is missing for file part");return{type:"file",mediaType:l,filename:e.filename,data:p,providerOptions:e.providerOptions}}}(e,t))).filter((e=>"text"!==e.type||""!==e.text)),providerOptions:e.providerOptions};case"assistant":return"string"==typeof e.content?{role:"assistant",content:[{type:"text",text:e.content}],providerOptions:e.providerOptions}:{role:"assistant",content:e.content.filter((e=>"text"!==e.type||""!==e.text||null!=e.providerOptions)).map((e=>{const t=e.providerOptions;switch(e.type){case"file":{const{data:o,mediaType:r}=yt(e.data);return{type:"file",data:o,filename:e.filename,mediaType:null!=r?r:e.mediaType,providerOptions:t}}case"reasoning":return{type:"reasoning",text:e.text,providerOptions:t};case"text":return{type:"text",text:e.text,providerOptions:t};case"tool-call":return{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:e.input,providerExecuted:e.providerExecuted,providerOptions:t};case"tool-result":return{type:"tool-result",toolCallId:e.toolCallId,toolName:e.toolName,output:e.output,providerOptions:t}}})),providerOptions:e.providerOptions};case"tool":return{role:"tool",content:e.content.map((e=>({type:"tool-result",toolCallId:e.toolCallId,toolName:e.toolName,output:e.output,providerOptions:e.providerOptions}))),providerOptions:e.providerOptions};default:throw new Me({role:o})}}({message:e,downloadedAssets:r})))]}function Ct({maxOutputTokens:e,temperature:t,topP:o,topK:r,presencePenalty:i,frequencyPenalty:n,seed:s,stopSequences:a}){if(null!=e){if(!Number.isInteger(e))throw new x({parameter:"maxOutputTokens",value:e,message:"maxOutputTokens must be an integer"});if(e<1)throw new x({parameter:"maxOutputTokens",value:e,message:"maxOutputTokens must be >= 1"})}if(null!=t&&"number"!=typeof t)throw new x({parameter:"temperature",value:t,message:"temperature must be a number"});if(null!=o&&"number"!=typeof o)throw new x({parameter:"topP",value:o,message:"topP must be a number"});if(null!=r&&"number"!=typeof r)throw new x({parameter:"topK",value:r,message:"topK must be a number"});if(null!=i&&"number"!=typeof i)throw new x({parameter:"presencePenalty",value:i,message:"presencePenalty must be a number"});if(null!=n&&"number"!=typeof n)throw new x({parameter:"frequencyPenalty",value:n,message:"frequencyPenalty must be a number"});if(null!=s&&!Number.isInteger(s))throw new x({parameter:"seed",value:s,message:"seed must be an integer"});return{maxOutputTokens:e,temperature:t,topP:o,topK:r,presencePenalty:i,frequencyPenalty:n,stopSequences:a,seed:s}}var wt=o(94192);function Et({tools:e,toolChoice:t,activeTools:o}){return null!=(r=e)&&Object.keys(r).length>0?{tools:(null!=o?Object.entries(e).filter((([e])=>o.includes(e))):Object.entries(e)).map((([e,t])=>{const o=t.type;switch(o){case void 0:case"dynamic":case"function":return{type:"function",name:e,description:t.description,inputSchema:(0,wt.asSchema)(t.inputSchema).jsonSchema,providerOptions:t.providerOptions};case"provider-defined":return{type:"provider-defined",name:e,id:t.id,args:t.args};default:throw new Error(`Unsupported tool type: ${o}`)}})),toolChoice:null==t?{type:"auto"}:"string"==typeof t?{type:t}:{type:"tool",toolName:t.toolName}}:{tools:void 0,toolChoice:void 0};var r}var _t=o(10292),bt=o(94192),Rt=o(19844),St=o(19844),Ot=o(19844),Tt=o(19844),At=Tt.z.lazy((()=>Tt.z.union([Tt.z.null(),Tt.z.string(),Tt.z.number(),Tt.z.boolean(),Tt.z.record(Tt.z.string(),At),Tt.z.array(At)]))),Pt=Ot.z.record(Ot.z.string(),Ot.z.record(Ot.z.string(),At)),It=o(19844),xt=It.z.object({type:It.z.literal("text"),text:It.z.string(),providerOptions:Pt.optional()}),Dt=It.z.object({type:It.z.literal("image"),image:It.z.union([mt,It.z.instanceof(i)]),mediaType:It.z.string().optional(),providerOptions:Pt.optional()}),Nt=It.z.object({type:It.z.literal("file"),data:It.z.union([mt,It.z.instanceof(i)]),filename:It.z.string().optional(),mediaType:It.z.string(),providerOptions:Pt.optional()}),Ft=It.z.object({type:It.z.literal("reasoning"),text:It.z.string(),providerOptions:Pt.optional()}),Mt=It.z.object({type:It.z.literal("tool-call"),toolCallId:It.z.string(),toolName:It.z.string(),input:It.z.unknown(),providerOptions:Pt.optional(),providerExecuted:It.z.boolean().optional()}),kt=It.z.discriminatedUnion("type",[It.z.object({type:It.z.literal("text"),value:It.z.string()}),It.z.object({type:It.z.literal("json"),value:At}),It.z.object({type:It.z.literal("error-text"),value:It.z.string()}),It.z.object({type:It.z.literal("error-json"),value:At}),It.z.object({type:It.z.literal("content"),value:It.z.array(It.z.union([It.z.object({type:It.z.literal("text"),text:It.z.string()}),It.z.object({type:It.z.literal("media"),data:It.z.string(),mediaType:It.z.string()})]))})]),Lt=It.z.object({type:It.z.literal("tool-result"),toolCallId:It.z.string(),toolName:It.z.string(),output:kt,providerOptions:Pt.optional()}),Gt=St.z.object({role:St.z.literal("system"),content:St.z.string(),providerOptions:Pt.optional()}),Vt=Gt,jt=St.z.object({role:St.z.literal("user"),content:St.z.union([St.z.string(),St.z.array(St.z.union([xt,Dt,Nt]))]),providerOptions:Pt.optional()}),Wt=jt,Ht=St.z.object({role:St.z.literal("assistant"),content:St.z.union([St.z.string(),St.z.array(St.z.union([xt,Nt,Ft,Mt,Lt]))]),providerOptions:Pt.optional()}),Bt=Ht,Ut=St.z.object({role:St.z.literal("tool"),content:St.z.array(Lt),providerOptions:Pt.optional()}),zt=Ut,Yt=St.z.union([Gt,jt,Ht,Ut]),qt=Yt;async function Kt(e){if(null==e.prompt&&null==e.messages)throw new _t.InvalidPromptError({prompt:e,message:"prompt or messages must be defined"});if(null!=e.prompt&&null!=e.messages)throw new _t.InvalidPromptError({prompt:e,message:"prompt and messages cannot be defined at the same time"});if(null!=e.system&&"string"!=typeof e.system)throw new _t.InvalidPromptError({prompt:e,message:"system must be a string"});let t;if(null!=e.prompt&&"string"==typeof e.prompt)t=[{role:"user",content:e.prompt}];else if(null!=e.prompt&&Array.isArray(e.prompt))t=e.prompt;else{if(null==e.messages)throw new _t.InvalidPromptError({prompt:e,message:"prompt or messages must be defined"});t=e.messages}if(0===t.length)throw new _t.InvalidPromptError({prompt:e,message:"messages must not be empty"});const o=await(0,bt.safeValidateTypes)({value:t,schema:Rt.z.array(Yt)});if(!o.success)throw new _t.InvalidPromptError({prompt:e,message:"The messages must be a ModelMessage[]. If you have passed a UIMessage[], you can use convertToModelMessages to convert them.",cause:o.error});return{messages:t,system:e.system}}var $t=o(10601),Zt=o(10292);function Jt(e){if(!$t.GatewayAuthenticationError.isInstance(e))return e;const t="https://v5.ai-sdk.dev/unauthenticated-ai-gateway";return"production"===(null==n?void 0:"production")?new Zt.AISDKError({name:"GatewayError",message:`Unauthenticated. Configure AI_GATEWAY_API_KEY or use a provider module. Learn more: ${t}`}):Object.assign(new Error(`[1m[31mUnauthenticated request to AI Gateway.[0m\n\nTo authenticate, set the [33mAI_GATEWAY_API_KEY[0m environment variable with your API key.\n\nAlternatively, you can use a provider module instead of the AI Gateway.\n\nLearn more: [34m${t}[0m\n\n`),{name:"GatewayAuthenticationError"})}function Qt({operationId:e,telemetry:t}){return{"operation.name":`${e}${null!=(null==t?void 0:t.functionId)?` ${t.functionId}`:""}`,"resource.name":null==t?void 0:t.functionId,"ai.operationId":e,"ai.telemetry.functionId":null==t?void 0:t.functionId}}function Xt({model:e,settings:t,telemetry:o,headers:r}){var i;return{"ai.model.provider":e.provider,"ai.model.id":e.modelId,...Object.entries(t).reduce(((e,[t,o])=>(e[`ai.settings.${t}`]=o,e)),{}),...Object.entries(null!=(i=null==o?void 0:o.metadata)?i:{}).reduce(((e,[t,o])=>(e[`ai.telemetry.metadata.${t}`]=o,e)),{}),...Object.entries(null!=r?r:{}).reduce(((e,[t,o])=>(void 0!==o&&(e[`ai.request.headers.${t}`]=o),e)),{})}}var eo=o(42379),to={startSpan:()=>oo,startActiveSpan:(e,t,o,r)=>"function"==typeof t?t(oo):"function"==typeof o?o(oo):"function"==typeof r?r(oo):void 0},oo={spanContext:()=>ro,setAttribute(){return this},setAttributes(){return this},addEvent(){return this},addLink(){return this},addLinks(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording:()=>!1,recordException(){return this}},ro={traceId:"",spanId:"",traceFlags:0};function io({isEnabled:e=!1,tracer:t}={}){return e?t||eo.trace.getTracer("ai"):to}var no=o(42379);function so({name:e,tracer:t,attributes:o,fn:r,endWhenDone:i=!0}){return t.startActiveSpan(e,{attributes:o},(async e=>{try{const t=await r(e);return i&&e.end(),t}catch(t){try{ao(e,t)}finally{e.end()}throw t}}))}function ao(e,t){t instanceof Error?(e.recordException({name:t.name,message:t.message,stack:t.stack}),e.setStatus({code:no.SpanStatusCode.ERROR,message:t.message})):e.setStatus({code:no.SpanStatusCode.ERROR})}function lo({telemetry:e,attributes:t}){return!0!==(null==e?void 0:e.isEnabled)?{}:Object.entries(t).reduce(((t,[o,r])=>{if(null==r)return t;if("object"==typeof r&&"input"in r&&"function"==typeof r.input){if(!1===(null==e?void 0:e.recordInputs))return t;const i=r.input();return null==i?t:{...t,[o]:i}}if("object"==typeof r&&"output"in r&&"function"==typeof r.output){if(!1===(null==e?void 0:e.recordOutputs))return t;const i=r.output();return null==i?t:{...t,[o]:i}}return{...t,[o]:r}}),{})}function po(e){return JSON.stringify(e.map((e=>({...e,content:"string"==typeof e.content?e.content:e.content.map((e=>{return"file"===e.type?{...e,data:e.data instanceof Uint8Array?(t=e.data,"string"==typeof t?t:t instanceof ArrayBuffer?(0,ft.convertUint8ArrayToBase64)(new Uint8Array(t)):(0,ft.convertUint8ArrayToBase64)(t)):e.data}:e;var t}))}))))}function uo(e,t){return{inputTokens:co(e.inputTokens,t.inputTokens),outputTokens:co(e.outputTokens,t.outputTokens),totalTokens:co(e.totalTokens,t.totalTokens),reasoningTokens:co(e.reasoningTokens,t.reasoningTokens),cachedInputTokens:co(e.cachedInputTokens,t.cachedInputTokens)}}function co(e,t){return null==e&&null==t?void 0:(null!=e?e:0)+(null!=t?t:0)}function ho(e){return void 0===e?[]:Array.isArray(e)?e:[e]}var fo=o(10292),go=o(94192),mo=({maxRetries:e=2,initialDelayInMs:t=2e3,backoffFactor:o=2,abortSignal:r}={})=>async i=>yo(i,{maxRetries:e,delayInMs:t,backoffFactor:o,abortSignal:r});async function yo(e,{maxRetries:t,delayInMs:o,backoffFactor:r,abortSignal:i},n=[]){try{return await e()}catch(s){if((0,go.isAbortError)(s))throw s;if(0===t)throw s;const a=(0,go.getErrorMessage)(s),l=[...n,s],p=l.length;if(p>t)throw new Xe({message:`Failed after ${p} attempts. Last error: ${a}`,reason:"maxRetriesExceeded",errors:l});if(s instanceof Error&&fo.APICallError.isInstance(s)&&!0===s.isRetryable&&p<=t)return await(0,go.delay)(function({error:e,exponentialBackoffDelay:t}){const o=e.responseHeaders;if(!o)return t;let r;const i=o["retry-after-ms"];if(i){const e=parseFloat(i);Number.isNaN(e)||(r=e)}const n=o["retry-after"];if(n&&void 0===r){const e=parseFloat(n);r=Number.isNaN(e)?Date.parse(n)-Date.now():1e3*e}return null!=r&&!Number.isNaN(r)&&0<=r&&(r<6e4||r<t)?r:t}({error:s,exponentialBackoffDelay:o}),{abortSignal:i}),yo(e,{maxRetries:t,delayInMs:r*o,backoffFactor:r,abortSignal:i},l);if(1===p)throw s;throw new Xe({message:`Failed after ${p} attempts with non-retryable error: '${a}'`,reason:"errorNotRetryable",errors:l})}}function vo({maxRetries:e,abortSignal:t}){if(null!=e){if(!Number.isInteger(e))throw new x({parameter:"maxRetries",value:e,message:"maxRetries must be an integer"});if(e<0)throw new x({parameter:"maxRetries",value:e,message:"maxRetries must be >= 0"})}const o=null!=e?e:2;return{maxRetries:o,retry:mo({maxRetries:o,abortSignal:t})}}function Co(e){const t=e.filter((e=>"text"===e.type));if(0!==t.length)return t.map((e=>e.text)).join("")}var wo=o(94192),Eo=class{constructor({data:e,mediaType:t}){const o=e instanceof Uint8Array;this.base64Data=o?void 0:e,this.uint8ArrayData=o?e:void 0,this.mediaType=t}get base64(){return null==this.base64Data&&(this.base64Data=(0,wo.convertUint8ArrayToBase64)(this.uint8ArrayData)),this.base64Data}get uint8Array(){return null==this.uint8ArrayData&&(this.uint8ArrayData=(0,wo.convertBase64ToUint8Array)(this.base64Data)),this.uint8ArrayData}},_o=class extends Eo{constructor(e){super(e),this.type="file"}},bo=o(94192);async function Ro({toolCall:e,tools:t,repairToolCall:o,system:r,messages:i}){try{if(null==t)throw new ge({toolName:e.toolName});try{return await So({toolCall:e,tools:t})}catch(n){if(null==o||!ge.isInstance(n)&&!B.isInstance(n))throw n;let s=null;try{s=await o({toolCall:e,tools:t,inputSchema:({toolName:e})=>{const{inputSchema:o}=t[e];return(0,bo.asSchema)(o).jsonSchema},system:r,messages:i,error:n})}catch(e){throw new Ee({cause:e,originalError:n})}if(null==s)throw n;return await So({toolCall:s,tools:t})}}catch(t){const o=await(0,bo.safeParseJSON)({text:e.input}),r=o.success?o.value:e.input;return{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:r,dynamic:!0,invalid:!0,error:t,providerMetadata:e.providerMetadata}}}async function So({toolCall:e,tools:t}){const o=e.toolName,r=t[o];if(null==r)throw new ge({toolName:e.toolName,availableTools:Object.keys(t)});const i=(0,bo.asSchema)(r.inputSchema),n=""===e.input.trim()?await(0,bo.safeValidateTypes)({value:{},schema:i}):await(0,bo.safeParseJSON)({text:e.input,schema:i});if(!1===n.success)throw new B({toolName:o,toolInput:e.input,cause:n.error});return"dynamic"===r.type?{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:n.value,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,dynamic:!0}:{type:"tool-call",toolCallId:e.toolCallId,toolName:o,input:n.value,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}}var Oo=class{constructor({content:e,finishReason:t,usage:o,warnings:r,request:i,response:n,providerMetadata:s}){this.content=e,this.finishReason=t,this.usage=o,this.warnings=r,this.request=i,this.response=n,this.providerMetadata=s}get text(){return this.content.filter((e=>"text"===e.type)).map((e=>e.text)).join("")}get reasoning(){return this.content.filter((e=>"reasoning"===e.type))}get reasoningText(){return 0===this.reasoning.length?void 0:this.reasoning.map((e=>e.text)).join("")}get files(){return this.content.filter((e=>"file"===e.type)).map((e=>e.file))}get sources(){return this.content.filter((e=>"source"===e.type))}get toolCalls(){return this.content.filter((e=>"tool-call"===e.type))}get staticToolCalls(){return this.toolCalls.filter((e=>!0!==e.dynamic))}get dynamicToolCalls(){return this.toolCalls.filter((e=>!0===e.dynamic))}get toolResults(){return this.content.filter((e=>"tool-result"===e.type))}get staticToolResults(){return this.toolResults.filter((e=>!0!==e.dynamic))}get dynamicToolResults(){return this.toolResults.filter((e=>!0===e.dynamic))}};function To(e){return({steps:t})=>t.length===e}function Ao(e){return({steps:t})=>{var o,r,i;return null!=(i=null==(r=null==(o=t[t.length-1])?void 0:o.toolCalls)?void 0:r.some((t=>t.toolName===e)))&&i}}async function Po({stopConditions:e,steps:t}){return(await Promise.all(e.map((e=>e({steps:t}))))).some((e=>e))}var Io=o(10292);function xo({output:e,tool:t,errorMode:o}){return"text"===o?{type:"error-text",value:(0,Io.getErrorMessage)(e)}:"json"===o?{type:"error-json",value:Do(e)}:(null==t?void 0:t.toModelOutput)?t.toModelOutput(e):"string"==typeof e?{type:"text",value:e}:{type:"json",value:Do(e)}}function Do(e){return void 0===e?null:e}function No({content:e,tools:t}){const o=[],r=e.filter((e=>"source"!==e.type)).filter((e=>("tool-result"!==e.type||e.providerExecuted)&&("tool-error"!==e.type||e.providerExecuted))).filter((e=>"text"!==e.type||e.text.length>0)).map((e=>{switch(e.type){case"text":return{type:"text",text:e.text,providerOptions:e.providerMetadata};case"reasoning":return{type:"reasoning",text:e.text,providerOptions:e.providerMetadata};case"file":return{type:"file",data:e.file.base64,mediaType:e.file.mediaType,providerOptions:e.providerMetadata};case"tool-call":return{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:e.input,providerExecuted:e.providerExecuted,providerOptions:e.providerMetadata};case"tool-result":return{type:"tool-result",toolCallId:e.toolCallId,toolName:e.toolName,output:xo({tool:null==t?void 0:t[e.toolName],output:e.output,errorMode:"none"}),providerExecuted:!0,providerOptions:e.providerMetadata};case"tool-error":return{type:"tool-result",toolCallId:e.toolCallId,toolName:e.toolName,output:xo({tool:null==t?void 0:t[e.toolName],output:e.error,errorMode:"json"}),providerOptions:e.providerMetadata}}}));r.length>0&&o.push({role:"assistant",content:r});const i=e.filter((e=>"tool-result"===e.type||"tool-error"===e.type)).filter((e=>!e.providerExecuted)).map((e=>({type:"tool-result",toolCallId:e.toolCallId,toolName:e.toolName,output:xo({tool:null==t?void 0:t[e.toolName],output:"tool-result"===e.type?e.output:e.error,errorMode:"tool-error"===e.type?"text":"none"}),...null!=e.providerMetadata?{providerOptions:e.providerMetadata}:{}})));return i.length>0&&o.push({role:"tool",content:i}),o}var Fo=(0,g.createIdGenerator)({prefix:"aitxt",size:24});async function Mo({model:e,tools:t,toolChoice:o,system:r,prompt:i,messages:n,maxRetries:s,abortSignal:a,headers:l,stopWhen:p=To(1),experimental_output:u,experimental_telemetry:c,providerOptions:d,experimental_activeTools:h,activeTools:f=h,experimental_prepareStep:m,prepareStep:y=m,experimental_repairToolCall:v,experimental_download:C,experimental_context:w,_internal:{generateId:E=Fo,currentDate:_=()=>new Date}={},onStepFinish:b,...S}){const O=et(e),T=ho(p),{maxRetries:A,retry:P}=vo({maxRetries:s,abortSignal:a}),I=Ct(S),x=(0,g.withUserAgentSuffix)(null!=l?l:{},`ai/${ut}`),D=Xt({model:O,telemetry:c,headers:x,settings:{...I,maxRetries:A}}),N=await Kt({system:r,prompt:i,messages:n}),F=io(c);try{return await so({name:"ai.generateText",attributes:lo({telemetry:c,attributes:{...Qt({operationId:"ai.generateText",telemetry:c}),...D,"ai.model.provider":O.provider,"ai.model.id":O.modelId,"ai.prompt":{input:()=>JSON.stringify({system:r,prompt:i,messages:n})}}}),tracer:F,fn:async e=>{var i,n,s,l,p,h,m;const A=Ct(S);let I,M=[],k=[];const L=[],G=[];do{const e=[...N.messages,...L],T=await(null==y?void 0:y({model:O,steps:G,stepNumber:G.length,messages:e})),V=et(null!=(i=null==T?void 0:T.model)?i:O),j=await vt({prompt:{system:null!=(n=null==T?void 0:T.system)?n:N.system,messages:null!=(s=null==T?void 0:T.messages)?s:e},supportedUrls:await V.supportedUrls,download:C}),{toolChoice:W,tools:H}=Et({tools:t,toolChoice:null!=(l=null==T?void 0:T.toolChoice)?l:o,activeTools:null!=(p=null==T?void 0:T.activeTools)?p:f});I=await P((()=>{var e;return so({name:"ai.generateText.doGenerate",attributes:lo({telemetry:c,attributes:{...Qt({operationId:"ai.generateText.doGenerate",telemetry:c}),...D,"ai.model.provider":V.provider,"ai.model.id":V.modelId,"ai.prompt.messages":{input:()=>po(j)},"ai.prompt.tools":{input:()=>null==H?void 0:H.map((e=>JSON.stringify(e)))},"ai.prompt.toolChoice":{input:()=>null!=W?JSON.stringify(W):void 0},"gen_ai.system":V.provider,"gen_ai.request.model":V.modelId,"gen_ai.request.frequency_penalty":S.frequencyPenalty,"gen_ai.request.max_tokens":S.maxOutputTokens,"gen_ai.request.presence_penalty":S.presencePenalty,"gen_ai.request.stop_sequences":S.stopSequences,"gen_ai.request.temperature":null!=(e=S.temperature)?e:void 0,"gen_ai.request.top_k":S.topK,"gen_ai.request.top_p":S.topP}}),tracer:F,fn:async e=>{var t,o,r,i,n,s,l,p;const h=await V.doGenerate({...A,tools:H,toolChoice:W,responseFormat:null==u?void 0:u.responseFormat,prompt:j,providerOptions:d,abortSignal:a,headers:x}),f={id:null!=(o=null==(t=h.response)?void 0:t.id)?o:E(),timestamp:null!=(i=null==(r=h.response)?void 0:r.timestamp)?i:_(),modelId:null!=(s=null==(n=h.response)?void 0:n.modelId)?s:V.modelId,headers:null==(l=h.response)?void 0:l.headers,body:null==(p=h.response)?void 0:p.body};return e.setAttributes(lo({telemetry:c,attributes:{"ai.response.finishReason":h.finishReason,"ai.response.text":{output:()=>Co(h.content)},"ai.response.toolCalls":{output:()=>{const e=Go(h.content);return null==e?void 0:JSON.stringify(e)}},"ai.response.id":f.id,"ai.response.model":f.modelId,"ai.response.timestamp":f.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(h.providerMetadata),"ai.usage.promptTokens":h.usage.inputTokens,"ai.usage.completionTokens":h.usage.outputTokens,"gen_ai.response.finish_reasons":[h.finishReason],"gen_ai.response.id":f.id,"gen_ai.response.model":f.modelId,"gen_ai.usage.input_tokens":h.usage.inputTokens,"gen_ai.usage.output_tokens":h.usage.outputTokens}})),{...h,response:f}}})}));const B=await Promise.all(I.content.filter((e=>"tool-call"===e.type)).map((o=>Ro({toolCall:o,tools:t,repairToolCall:v,system:r,messages:e}))));for(const o of B){if(o.invalid)continue;const r=t[o.toolName];null!=(null==r?void 0:r.onInputAvailable)&&await r.onInputAvailable({input:o.input,toolCallId:o.toolCallId,messages:e,abortSignal:a,experimental_context:w})}const U=B.filter((e=>e.invalid&&e.dynamic));k=[];for(const e of U)k.push({type:"tool-error",toolCallId:e.toolCallId,toolName:e.toolName,input:e.input,error:(0,g.getErrorMessage)(e.error),dynamic:!0});M=B.filter((e=>!e.providerExecuted)),null!=t&&k.push(...await ko({toolCalls:M.filter((e=>!e.invalid)),tools:t,tracer:F,telemetry:c,messages:e,abortSignal:a,experimental_context:w}));const z=Vo({content:I.content,toolCalls:B,toolOutputs:k});L.push(...No({content:z,tools:t}));const Y=new Oo({content:z,finishReason:I.finishReason,usage:I.usage,warnings:I.warnings,providerMetadata:I.providerMetadata,request:null!=(h=I.request)?h:{},response:{...I.response,messages:structuredClone(L)}});R(null!=(m=I.warnings)?m:[]),G.push(Y),await(null==b?void 0:b(Y))}while(M.length>0&&k.length===M.length&&!await Po({stopConditions:T,steps:G}));e.setAttributes(lo({telemetry:c,attributes:{"ai.response.finishReason":I.finishReason,"ai.response.text":{output:()=>Co(I.content)},"ai.response.toolCalls":{output:()=>{const e=Go(I.content);return null==e?void 0:JSON.stringify(e)}},"ai.response.providerMetadata":JSON.stringify(I.providerMetadata),"ai.usage.promptTokens":I.usage.inputTokens,"ai.usage.completionTokens":I.usage.outputTokens}}));const V=G[G.length-1];let j;return"stop"===V.finishReason&&(j=await(null==u?void 0:u.parseOutput({text:V.text},{response:V.response,usage:V.usage,finishReason:V.finishReason}))),new Lo({steps:G,resolvedOutput:j})}})}catch(e){throw Jt(e)}}async function ko({toolCalls:e,tools:t,tracer:o,telemetry:r,messages:i,abortSignal:n,experimental_context:s}){return(await Promise.all(e.map((async({toolCallId:e,toolName:a,input:l})=>{const p=t[a];if(null!=(null==p?void 0:p.execute))return so({name:"ai.toolCall",attributes:lo({telemetry:r,attributes:{...Qt({operationId:"ai.toolCall",telemetry:r}),"ai.toolCall.name":a,"ai.toolCall.id":e,"ai.toolCall.args":{output:()=>JSON.stringify(l)}}}),tracer:o,fn:async t=>{try{const o=(0,g.executeTool)({execute:p.execute.bind(p),input:l,options:{toolCallId:e,messages:i,abortSignal:n,experimental_context:s}});let u;for await(const e of o)"final"===e.type&&(u=e.output);try{t.setAttributes(lo({telemetry:r,attributes:{"ai.toolCall.result":{output:()=>JSON.stringify(u)}}}))}catch(e){}return{type:"tool-result",toolCallId:e,toolName:a,input:l,output:u,dynamic:"dynamic"===p.type}}catch(o){return ao(t,o),{type:"tool-error",toolCallId:e,toolName:a,input:l,error:o,dynamic:"dynamic"===p.type}}}})})))).filter((e=>null!=e))}var Lo=class{constructor(e){this.steps=e.steps,this.resolvedOutput=e.resolvedOutput}get finalStep(){return this.steps[this.steps.length-1]}get content(){return this.finalStep.content}get text(){return this.finalStep.text}get files(){return this.finalStep.files}get reasoningText(){return this.finalStep.reasoningText}get reasoning(){return this.finalStep.reasoning}get toolCalls(){return this.finalStep.toolCalls}get staticToolCalls(){return this.finalStep.staticToolCalls}get dynamicToolCalls(){return this.finalStep.dynamicToolCalls}get toolResults(){return this.finalStep.toolResults}get staticToolResults(){return this.finalStep.staticToolResults}get dynamicToolResults(){return this.finalStep.dynamicToolResults}get sources(){return this.finalStep.sources}get finishReason(){return this.finalStep.finishReason}get warnings(){return this.finalStep.warnings}get providerMetadata(){return this.finalStep.providerMetadata}get response(){return this.finalStep.response}get request(){return this.finalStep.request}get usage(){return this.finalStep.usage}get totalUsage(){return this.steps.reduce(((e,t)=>uo(e,t.usage)),{inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0})}get experimental_output(){if(null==this.resolvedOutput)throw new w;return this.resolvedOutput}};function Go(e){const t=e.filter((e=>"tool-call"===e.type));if(0!==t.length)return t.map((e=>({toolCallId:e.toolCallId,toolName:e.toolName,input:e.input})))}function Vo({content:e,toolCalls:t,toolOutputs:o}){return[...e.map((e=>{switch(e.type){case"text":case"reasoning":case"source":return e;case"file":return{type:"file",file:new Eo(e)};case"tool-call":return t.find((t=>t.toolCallId===e.toolCallId));case"tool-result":{const o=t.find((t=>t.toolCallId===e.toolCallId));if(null==o)throw new Error(`Tool call ${e.toolCallId} not found.`);return e.isError?{type:"tool-error",toolCallId:e.toolCallId,toolName:e.toolName,input:o.input,error:e.result,providerExecuted:!0,dynamic:o.dynamic}:{type:"tool-result",toolCallId:e.toolCallId,toolName:e.toolName,input:o.input,output:e.result,providerExecuted:!0,dynamic:o.dynamic}}}})),...o]}var jo=o(10292),Wo=o(94192);function Ho(e,t){const o=new Headers(null!=e?e:{});for(const[e,r]of Object.entries(t))o.has(e)||o.set(e,r);return o}function Bo({status:e,statusText:t,headers:o,textStream:r}){return new Response(r.pipeThrough(new TextEncoderStream),{status:null!=e?e:200,statusText:t,headers:Ho(o,{"content-type":"text/plain; charset=utf-8"})})}function Uo({response:e,status:t,statusText:o,headers:r,stream:i}){const n=null!=t?t:200;void 0!==o?e.writeHead(n,o,r):e.writeHead(n,r);const s=i.getReader();(async()=>{try{for(;;){const{done:t,value:o}=await s.read();if(t)break;e.write(o)||await new Promise((t=>{e.once("drain",t)}))}}catch(e){throw e}finally{e.end()}})()}function zo({response:e,status:t,statusText:o,headers:r,textStream:i}){Uo({response:e,status:t,statusText:o,headers:Object.fromEntries(Ho(r,{"content-type":"text/plain; charset=utf-8"}).entries()),stream:i.pipeThrough(new TextEncoderStream)})}var Yo=class extends TransformStream{constructor(){super({transform(e,t){t.enqueue(`data: ${JSON.stringify(e)}\n\n`)},flush(e){e.enqueue("data: [DONE]\n\n")}})}},qo={"content-type":"text/event-stream","cache-control":"no-cache",connection:"keep-alive","x-vercel-ai-ui-message-stream":"v1","x-accel-buffering":"no"};function Ko({status:e,statusText:t,headers:o,stream:r,consumeSseStream:i}){let n=r.pipeThrough(new Yo);if(i){const[e,t]=n.tee();n=e,i({stream:t})}return new Response(n.pipeThrough(new TextEncoderStream),{status:e,statusText:t,headers:Ho(o,qo)})}var $o=o(94192),Zo=o(19844),Jo=o(94192),Qo=(0,Jo.lazyValidator)((()=>(0,Jo.zodSchema)(Zo.z.union([Zo.z.strictObject({type:Zo.z.literal("text-start"),id:Zo.z.string(),providerMetadata:Pt.optional()}),Zo.z.strictObject({type:Zo.z.literal("text-delta"),id:Zo.z.string(),delta:Zo.z.string(),providerMetadata:Pt.optional()}),Zo.z.strictObject({type:Zo.z.literal("text-end"),id:Zo.z.string(),providerMetadata:Pt.optional()}),Zo.z.strictObject({type:Zo.z.literal("error"),errorText:Zo.z.string()}),Zo.z.strictObject({type:Zo.z.literal("tool-input-start"),toolCallId:Zo.z.string(),toolName:Zo.z.string(),providerExecuted:Zo.z.boolean().optional(),dynamic:Zo.z.boolean().optional()}),Zo.z.strictObject({type:Zo.z.literal("tool-input-delta"),toolCallId:Zo.z.string(),inputTextDelta:Zo.z.string()}),Zo.z.strictObject({type:Zo.z.literal("tool-input-available"),toolCallId:Zo.z.string(),toolName:Zo.z.string(),input:Zo.z.unknown(),providerExecuted:Zo.z.boolean().optional(),providerMetadata:Pt.optional(),dynamic:Zo.z.boolean().optional()}),Zo.z.strictObject({type:Zo.z.literal("tool-input-error"),toolCallId:Zo.z.string(),toolName:Zo.z.string(),input:Zo.z.unknown(),providerExecuted:Zo.z.boolean().optional(),providerMetadata:Pt.optional(),dynamic:Zo.z.boolean().optional(),errorText:Zo.z.string()}),Zo.z.strictObject({type:Zo.z.literal("tool-output-available"),toolCallId:Zo.z.string(),output:Zo.z.unknown(),providerExecuted:Zo.z.boolean().optional(),dynamic:Zo.z.boolean().optional(),preliminary:Zo.z.boolean().optional()}),Zo.z.strictObject({type:Zo.z.literal("tool-output-error"),toolCallId:Zo.z.string(),errorText:Zo.z.string(),providerExecuted:Zo.z.boolean().optional(),dynamic:Zo.z.boolean().optional()}),Zo.z.strictObject({type:Zo.z.literal("reasoning-start"),id:Zo.z.string(),providerMetadata:Pt.optional()}),Zo.z.strictObject({type:Zo.z.literal("reasoning-delta"),id:Zo.z.string(),delta:Zo.z.string(),providerMetadata:Pt.optional()}),Zo.z.strictObject({type:Zo.z.literal("reasoning-end"),id:Zo.z.string(),providerMetadata:Pt.optional()}),Zo.z.strictObject({type:Zo.z.literal("source-url"),sourceId:Zo.z.string(),url:Zo.z.string(),title:Zo.z.string().optional(),providerMetadata:Pt.optional()}),Zo.z.strictObject({type:Zo.z.literal("source-document"),sourceId:Zo.z.string(),mediaType:Zo.z.string(),title:Zo.z.string(),filename:Zo.z.string().optional(),providerMetadata:Pt.optional()}),Zo.z.strictObject({type:Zo.z.literal("file"),url:Zo.z.string(),mediaType:Zo.z.string(),providerMetadata:Pt.optional()}),Zo.z.strictObject({type:Zo.z.custom((e=>"string"==typeof e&&e.startsWith("data-")),{message:'Type must start with "data-"'}),id:Zo.z.string().optional(),data:Zo.z.unknown(),transient:Zo.z.boolean().optional()}),Zo.z.strictObject({type:Zo.z.literal("start-step")}),Zo.z.strictObject({type:Zo.z.literal("finish-step")}),Zo.z.strictObject({type:Zo.z.literal("start"),messageId:Zo.z.string().optional(),messageMetadata:Zo.z.unknown().optional()}),Zo.z.strictObject({type:Zo.z.literal("finish"),finishReason:Zo.z.enum(["stop","length","content-filter","tool-calls","error","other","unknown"]).optional(),messageMetadata:Zo.z.unknown().optional()}),Zo.z.strictObject({type:Zo.z.literal("abort")}),Zo.z.strictObject({type:Zo.z.literal("message-metadata"),messageMetadata:Zo.z.unknown()})]))));function Xo(e,t){if(void 0===e&&void 0===t)return;if(void 0===e)return t;if(void 0===t)return e;const o={...e};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const i=t[r];if(void 0===i)continue;const n=r in e?e[r]:void 0,s=!(null===i||"object"!=typeof i||Array.isArray(i)||i instanceof Date||i instanceof RegExp),a=!(null==n||"object"!=typeof n||Array.isArray(n)||n instanceof Date||n instanceof RegExp);o[r]=s&&a?Xo(n,i):i}return o}var er=o(94192);function tr(e){const t=["ROOT"];let o=-1,r=null;function i(e,i,n){switch(e){case'"':o=i,t.pop(),t.push(n),t.push("INSIDE_STRING");break;case"f":case"t":case"n":o=i,r=i,t.pop(),t.push(n),t.push("INSIDE_LITERAL");break;case"-":t.pop(),t.push(n),t.push("INSIDE_NUMBER");break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":o=i,t.pop(),t.push(n),t.push("INSIDE_NUMBER");break;case"{":o=i,t.pop(),t.push(n),t.push("INSIDE_OBJECT_START");break;case"[":o=i,t.pop(),t.push(n),t.push("INSIDE_ARRAY_START")}}function n(e,r){switch(e){case",":t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break;case"}":o=r,t.pop()}}function s(e,r){switch(e){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":o=r,t.pop()}}for(let a=0;a<e.length;a++){const l=e[a];switch(t[t.length-1]){case"ROOT":i(l,a,"FINISH");break;case"INSIDE_OBJECT_START":switch(l){case'"':t.pop(),t.push("INSIDE_OBJECT_KEY");break;case"}":o=a,t.pop()}break;case"INSIDE_OBJECT_AFTER_COMMA":'"'===l&&(t.pop(),t.push("INSIDE_OBJECT_KEY"));break;case"INSIDE_OBJECT_KEY":'"'===l&&(t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY"));break;case"INSIDE_OBJECT_AFTER_KEY":":"===l&&(t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE"));break;case"INSIDE_OBJECT_BEFORE_VALUE":i(l,a,"INSIDE_OBJECT_AFTER_VALUE");break;case"INSIDE_OBJECT_AFTER_VALUE":n(l,a);break;case"INSIDE_STRING":switch(l){case'"':t.pop(),o=a;break;case"\\":t.push("INSIDE_STRING_ESCAPE");break;default:o=a}break;case"INSIDE_ARRAY_START":"]"===l?(o=a,t.pop()):(o=a,i(l,a,"INSIDE_ARRAY_AFTER_VALUE"));break;case"INSIDE_ARRAY_AFTER_VALUE":switch(l){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":o=a,t.pop();break;default:o=a}break;case"INSIDE_ARRAY_AFTER_COMMA":i(l,a,"INSIDE_ARRAY_AFTER_VALUE");break;case"INSIDE_STRING_ESCAPE":t.pop(),o=a;break;case"INSIDE_NUMBER":switch(l){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":o=a;break;case"e":case"E":case"-":case".":break;case",":t.pop(),"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&s(l,a),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]&&n(l,a);break;case"}":t.pop(),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]&&n(l,a);break;case"]":t.pop(),"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&s(l,a);break;default:t.pop()}break;case"INSIDE_LITERAL":{const i=e.substring(r,a+1);"false".startsWith(i)||"true".startsWith(i)||"null".startsWith(i)?o=a:(t.pop(),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]?n(l,a):"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&s(l,a));break}}}let a=e.slice(0,o+1);for(let o=t.length-1;o>=0;o--)switch(t[o]){case"INSIDE_STRING":a+='"';break;case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":a+="}";break;case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":a+="]";break;case"INSIDE_LITERAL":{const t=e.substring(r,e.length);"true".startsWith(t)?a+="true".slice(t.length):"false".startsWith(t)?a+="false".slice(t.length):"null".startsWith(t)&&(a+="null".slice(t.length))}}return a}async function or(e){if(void 0===e)return{value:void 0,state:"undefined-input"};let t=await(0,er.safeParseJSON)({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=await(0,er.safeParseJSON)({text:tr(e)}),t.success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}function rr(e){return e.type.startsWith("data-")}function ir(e){return"text"===e.type}function nr(e){return"file"===e.type}function sr(e){return"reasoning"===e.type}function ar(e){return e.type.startsWith("tool-")}function lr(e){return"dynamic-tool"===e.type}function pr(e){return ar(e)||lr(e)}function ur(e){return e.type.split("-").slice(1).join("-")}function cr(e){return lr(e)?e.toolName:ur(e)}function dr({lastMessage:e,messageId:t}){return{message:"assistant"===(null==e?void 0:e.role)?e:{id:t,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function hr({stream:e,messageMetadataSchema:t,dataPartSchemas:o,runUpdateMessageJob:r,onError:i,onToolCall:n,onData:s}){return e.pipeThrough(new TransformStream({async transform(e,a){await r((async({state:r,write:l})=>{var p,u,c,d;function h(e){const t=r.message.parts.filter(ar).find((t=>t.toolCallId===e));if(null==t)throw new Error("tool-output-error must be preceded by a tool-input-available");return t}function f(e){const t=r.message.parts.filter((e=>"dynamic-tool"===e.type)).find((t=>t.toolCallId===e));if(null==t)throw new Error("tool-output-error must be preceded by a tool-input-available");return t}function g(e){var t;const o=r.message.parts.find((t=>ar(t)&&t.toolCallId===e.toolCallId)),i=e,n=o;null!=o?(o.state=e.state,n.input=i.input,n.output=i.output,n.errorText=i.errorText,n.rawInput=i.rawInput,n.preliminary=i.preliminary,n.providerExecuted=null!=(t=i.providerExecuted)?t:o.providerExecuted,null!=i.providerMetadata&&"input-available"===o.state&&(o.callProviderMetadata=i.providerMetadata)):r.message.parts.push({type:`tool-${e.toolName}`,toolCallId:e.toolCallId,state:e.state,input:i.input,output:i.output,rawInput:i.rawInput,errorText:i.errorText,providerExecuted:i.providerExecuted,preliminary:i.preliminary,...null!=i.providerMetadata?{callProviderMetadata:i.providerMetadata}:{}})}function m(e){var t,o;const i=r.message.parts.find((t=>"dynamic-tool"===t.type&&t.toolCallId===e.toolCallId)),n=e,s=i;null!=i?(i.state=e.state,s.toolName=e.toolName,s.input=n.input,s.output=n.output,s.errorText=n.errorText,s.rawInput=null!=(t=n.rawInput)?t:s.rawInput,s.preliminary=n.preliminary,s.providerExecuted=null!=(o=n.providerExecuted)?o:i.providerExecuted,null!=n.providerMetadata&&"input-available"===i.state&&(i.callProviderMetadata=n.providerMetadata)):r.message.parts.push({type:"dynamic-tool",toolName:e.toolName,toolCallId:e.toolCallId,state:e.state,input:n.input,output:n.output,errorText:n.errorText,preliminary:n.preliminary,providerExecuted:n.providerExecuted,...null!=n.providerMetadata?{callProviderMetadata:n.providerMetadata}:{}})}async function y(e){if(null!=e){const o=null!=r.message.metadata?Xo(r.message.metadata,e):e;null!=t&&await(0,$o.validateTypes)({value:o,schema:t}),r.message.metadata=o}}switch(e.type){case"text-start":{const t={type:"text",text:"",providerMetadata:e.providerMetadata,state:"streaming"};r.activeTextParts[e.id]=t,r.message.parts.push(t),l();break}case"text-delta":{const t=r.activeTextParts[e.id];t.text+=e.delta,t.providerMetadata=null!=(p=e.providerMetadata)?p:t.providerMetadata,l();break}case"text-end":{const t=r.activeTextParts[e.id];t.state="done",t.providerMetadata=null!=(u=e.providerMetadata)?u:t.providerMetadata,delete r.activeTextParts[e.id],l();break}case"reasoning-start":{const t={type:"reasoning",text:"",providerMetadata:e.providerMetadata,state:"streaming"};r.activeReasoningParts[e.id]=t,r.message.parts.push(t),l();break}case"reasoning-delta":{const t=r.activeReasoningParts[e.id];t.text+=e.delta,t.providerMetadata=null!=(c=e.providerMetadata)?c:t.providerMetadata,l();break}case"reasoning-end":{const t=r.activeReasoningParts[e.id];t.providerMetadata=null!=(d=e.providerMetadata)?d:t.providerMetadata,t.state="done",delete r.activeReasoningParts[e.id],l();break}case"file":r.message.parts.push({type:"file",mediaType:e.mediaType,url:e.url}),l();break;case"source-url":r.message.parts.push({type:"source-url",sourceId:e.sourceId,url:e.url,title:e.title,providerMetadata:e.providerMetadata}),l();break;case"source-document":r.message.parts.push({type:"source-document",sourceId:e.sourceId,mediaType:e.mediaType,title:e.title,filename:e.filename,providerMetadata:e.providerMetadata}),l();break;case"tool-input-start":{const t=r.message.parts.filter(ar);r.partialToolCalls[e.toolCallId]={text:"",toolName:e.toolName,index:t.length,dynamic:e.dynamic},e.dynamic?m({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-streaming",input:void 0,providerExecuted:e.providerExecuted}):g({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-streaming",input:void 0,providerExecuted:e.providerExecuted}),l();break}case"tool-input-delta":{const t=r.partialToolCalls[e.toolCallId];t.text+=e.inputTextDelta;const{value:o}=await or(t.text);t.dynamic?m({toolCallId:e.toolCallId,toolName:t.toolName,state:"input-streaming",input:o}):g({toolCallId:e.toolCallId,toolName:t.toolName,state:"input-streaming",input:o}),l();break}case"tool-input-available":e.dynamic?m({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-available",input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}):g({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-available",input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),l(),n&&!e.providerExecuted&&await n({toolCall:e});break;case"tool-input-error":e.dynamic?m({toolCallId:e.toolCallId,toolName:e.toolName,state:"output-error",input:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}):g({toolCallId:e.toolCallId,toolName:e.toolName,state:"output-error",input:void 0,rawInput:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),l();break;case"tool-output-available":if(e.dynamic){const t=f(e.toolCallId);m({toolCallId:e.toolCallId,toolName:t.toolName,state:"output-available",input:t.input,output:e.output,preliminary:e.preliminary})}else{const t=h(e.toolCallId);g({toolCallId:e.toolCallId,toolName:ur(t),state:"output-available",input:t.input,output:e.output,providerExecuted:e.providerExecuted,preliminary:e.preliminary})}l();break;case"tool-output-error":if(e.dynamic){const t=f(e.toolCallId);m({toolCallId:e.toolCallId,toolName:t.toolName,state:"output-error",input:t.input,errorText:e.errorText,providerExecuted:e.providerExecuted})}else{const t=h(e.toolCallId);g({toolCallId:e.toolCallId,toolName:ur(t),state:"output-error",input:t.input,rawInput:t.rawInput,errorText:e.errorText,providerExecuted:e.providerExecuted})}l();break;case"start-step":r.message.parts.push({type:"step-start"});break;case"finish-step":r.activeTextParts={},r.activeReasoningParts={};break;case"start":null!=e.messageId&&(r.message.id=e.messageId),await y(e.messageMetadata),null==e.messageId&&null==e.messageMetadata||l();break;case"finish":null!=e.finishReason&&(r.finishReason=e.finishReason),await y(e.messageMetadata),null!=e.messageMetadata&&l();break;case"message-metadata":await y(e.messageMetadata),null!=e.messageMetadata&&l();break;case"error":null==i||i(new Error(e.errorText));break;default:if(function(e){return e.type.startsWith("data-")}(e)){null!=(null==o?void 0:o[e.type])&&await(0,$o.validateTypes)({value:e.data,schema:o[e.type]});const t=e;if(t.transient){null==s||s(t);break}const i=null!=t.id?r.message.parts.find((e=>t.type===e.type&&t.id===e.id)):void 0;null!=i?i.data=t.data:r.message.parts.push(t),null==s||s(t),l()}}a.enqueue(e)}))}}))}function fr({messageId:e,originalMessages:t=[],onFinish:o,onError:r,stream:i}){let n=null==t?void 0:t[t.length-1];"assistant"!==(null==n?void 0:n.role)?n=void 0:e=n.id;let s=!1;const a=i.pipeThrough(new TransformStream({transform(t,o){if("start"===t.type){const o=t;null==o.messageId&&null!=e&&(o.messageId=e)}"abort"===t.type&&(s=!0),o.enqueue(t)}}));if(null==o)return a;const l=dr({lastMessage:n?structuredClone(n):void 0,messageId:null!=e?e:""});let p=!1;const u=async()=>{if(p||!o)return;p=!0;const e=l.message.id===(null==n?void 0:n.id);await o({isAborted:s,isContinuation:e,responseMessage:l.message,messages:[...e?t.slice(0,-1):t,l.message],finishReason:l.finishReason})};return hr({stream:a,runUpdateMessageJob:async e=>{await e({state:l,write:()=>{}})},onError:r}).pipeThrough(new TransformStream({transform(e,t){t.enqueue(e)},async cancel(){await u()},async flush(){await u()}}))}function gr({response:e,status:t,statusText:o,headers:r,stream:i,consumeSseStream:n}){let s=i.pipeThrough(new Yo);if(n){const[e,t]=s.tee();s=e,n({stream:t})}Uo({response:e,status:t,statusText:o,headers:Object.fromEntries(Ho(r,qo).entries()),stream:s.pipeThrough(new TextEncoderStream)})}function mr(e){const t=e.pipeThrough(new TransformStream);return t[Symbol.asyncIterator]=function(){const e=this.getReader();let t=!1;async function o(o){var r;t=!0;try{o&&await(null==(r=e.cancel)?void 0:r.call(e))}finally{try{e.releaseLock()}catch(e){}}}return{async next(){if(t)return{done:!0,value:void 0};const{done:r,value:i}=await e.read();return r?(await o(!0),{done:!0,value:void 0}):{done:!1,value:i}},return:async()=>(await o(!0),{done:!0,value:void 0}),async throw(e){throw await o(!0),e}}},t}async function yr({stream:e,onError:t}){const o=e.getReader();try{for(;;){const{done:e}=await o.read();if(e)break}}catch(e){null==t||t(e)}finally{o.releaseLock()}}function vr(){let e,t;return{promise:new Promise(((o,r)=>{e=o,t=r})),resolve:e,reject:t}}function Cr(){let e=[],t=null,o=!1,r=vr();const i=()=>{o=!0,r.resolve(),e.forEach((e=>e.cancel())),e=[],null==t||t.close()},n=async()=>{if(o&&0===e.length)null==t||t.close();else{if(0===e.length)return r=vr(),await r.promise,n();try{const{value:r,done:i}=await e[0].read();i?(e.shift(),e.length>0?await n():o&&(null==t||t.close())):null==t||t.enqueue(r)}catch(o){null==t||t.error(o),e.shift(),i()}}};return{stream:new ReadableStream({start(e){t=e},pull:n,async cancel(){for(const t of e)await t.cancel();e=[],o=!0}}),addStream:t=>{if(o)throw new Error("Cannot add inner stream: outer stream is closed");e.push(t.getReader()),r.resolve()},close:()=>{o=!0,r.resolve(),0===e.length&&(null==t||t.close())},terminate:i}}function wr(){var e,t;return null!=(t=null==(e=null==globalThis?void 0:globalThis.performance)?void 0:e.now())?t:Date.now()}var Er=o(94192),_r=(0,Wo.createIdGenerator)({prefix:"aitxt",size:24});function br({model:e,tools:t,toolChoice:o,system:r,prompt:i,messages:n,maxRetries:s,abortSignal:a,headers:l,stopWhen:p=To(1),experimental_output:u,experimental_telemetry:c,prepareStep:d,providerOptions:h,experimental_activeTools:f,activeTools:g=f,experimental_repairToolCall:m,experimental_transform:y,experimental_download:v,includeRawChunks:C=!1,onChunk:w,onError:E=({error:e})=>{console.error(e)},onFinish:_,onAbort:b,onStepFinish:R,experimental_context:S,_internal:{now:O=wr,generateId:T=_r,currentDate:A=()=>new Date}={},...P}){return new Rr({model:et(e),telemetry:c,headers:l,settings:P,maxRetries:s,abortSignal:a,system:r,prompt:i,messages:n,tools:t,toolChoice:o,transforms:ho(y),activeTools:g,repairToolCall:m,stopConditions:ho(p),output:u,providerOptions:h,prepareStep:d,includeRawChunks:C,onChunk:w,onError:E,onFinish:_,onAbort:b,onStepFinish:R,now:O,currentDate:A,generateId:T,experimental_context:S,download:v})}var Rr=class{constructor({model:e,telemetry:t,headers:o,settings:r,maxRetries:i,abortSignal:n,system:s,prompt:a,messages:l,tools:p,toolChoice:u,transforms:c,activeTools:d,repairToolCall:h,stopConditions:f,output:g,providerOptions:m,prepareStep:y,includeRawChunks:v,now:C,currentDate:w,generateId:E,onChunk:_,onError:b,onFinish:S,onAbort:O,onStepFinish:T,experimental_context:A,download:P}){let I;this._totalUsage=new Wo.DelayedPromise,this._finishReason=new Wo.DelayedPromise,this._steps=new Wo.DelayedPromise,this.output=g,this.includeRawChunks=v,this.tools=p;let x=[];const D=[];let N,F,M={},k=[];const L=[];let G,V={},j={};const W=new TransformStream({async transform(e,t){var o,r,i,n;t.enqueue(e);const{part:s}=e;if("text-delta"!==s.type&&"reasoning-delta"!==s.type&&"source"!==s.type&&"tool-call"!==s.type&&"tool-result"!==s.type&&"tool-input-start"!==s.type&&"tool-input-delta"!==s.type&&"raw"!==s.type||await(null==_?void 0:_({chunk:s})),"error"===s.type&&await b({error:Jt(s.error)}),"text-start"===s.type&&(V[s.id]={type:"text",text:"",providerMetadata:s.providerMetadata},x.push(V[s.id])),"text-delta"===s.type){const e=V[s.id];if(null==e)return void t.enqueue({part:{type:"error",error:`text part ${s.id} not found`},partialOutput:void 0});e.text+=s.text,e.providerMetadata=null!=(o=s.providerMetadata)?o:e.providerMetadata}if("text-end"===s.type){const e=V[s.id];if(null==e)return void t.enqueue({part:{type:"error",error:`text part ${s.id} not found`},partialOutput:void 0});e.providerMetadata=null!=(r=s.providerMetadata)?r:e.providerMetadata,delete V[s.id]}if("reasoning-start"===s.type&&(j[s.id]={type:"reasoning",text:"",providerMetadata:s.providerMetadata},x.push(j[s.id])),"reasoning-delta"===s.type){const e=j[s.id];if(null==e)return void t.enqueue({part:{type:"error",error:`reasoning part ${s.id} not found`},partialOutput:void 0});e.text+=s.text,e.providerMetadata=null!=(i=s.providerMetadata)?i:e.providerMetadata}if("reasoning-end"===s.type){const e=j[s.id];if(null==e)return void t.enqueue({part:{type:"error",error:`reasoning part ${s.id} not found`},partialOutput:void 0});e.providerMetadata=null!=(n=s.providerMetadata)?n:e.providerMetadata,delete j[s.id]}if("file"===s.type&&x.push({type:"file",file:s.file}),"source"===s.type&&x.push(s),"tool-call"===s.type&&x.push(s),"tool-result"!==s.type||s.preliminary||x.push(s),"tool-error"===s.type&&x.push(s),"start-step"===s.type&&(M=s.request,k=s.warnings),"finish-step"===s.type){const e=No({content:x,tools:p}),t=new Oo({content:x,finishReason:s.finishReason,usage:s.usage,warnings:k,request:M,response:{...s.response,messages:[...D,...e]},providerMetadata:s.providerMetadata});await(null==T?void 0:T(t)),R(k),L.push(t),x=[],j={},V={},D.push(...e),I.resolve()}"finish"===s.type&&(F=s.totalUsage,N=s.finishReason)},async flush(e){try{if(0===L.length){const e=new ae({message:"No output generated. Check the stream for errors."});return Z._finishReason.reject(e),Z._totalUsage.reject(e),void Z._steps.reject(e)}const e=null!=N?N:"unknown",o=null!=F?F:{inputTokens:void 0,outputTokens:void 0,totalTokens:void 0};Z._finishReason.resolve(e),Z._totalUsage.resolve(o),Z._steps.resolve(L);const r=L[L.length-1];await(null==S?void 0:S({finishReason:e,totalUsage:o,usage:r.usage,content:r.content,text:r.text,reasoningText:r.reasoningText,reasoning:r.reasoning,files:r.files,sources:r.sources,toolCalls:r.toolCalls,staticToolCalls:r.staticToolCalls,dynamicToolCalls:r.dynamicToolCalls,toolResults:r.toolResults,staticToolResults:r.staticToolResults,dynamicToolResults:r.dynamicToolResults,request:r.request,response:r.response,warnings:r.warnings,providerMetadata:r.providerMetadata,steps:L})),G.setAttributes(lo({telemetry:t,attributes:{"ai.response.finishReason":e,"ai.response.text":{output:()=>r.text},"ai.response.toolCalls":{output:()=>{var e;return(null==(e=r.toolCalls)?void 0:e.length)?JSON.stringify(r.toolCalls):void 0}},"ai.response.providerMetadata":JSON.stringify(r.providerMetadata),"ai.usage.inputTokens":o.inputTokens,"ai.usage.outputTokens":o.outputTokens,"ai.usage.totalTokens":o.totalTokens,"ai.usage.reasoningTokens":o.reasoningTokens,"ai.usage.cachedInputTokens":o.cachedInputTokens}}))}catch(t){e.error(t)}finally{G.end()}}}),H=Cr();this.addStream=H.addStream,this.closeStream=H.close;const B=H.stream.getReader();let U=new ReadableStream({async start(e){e.enqueue({type:"start"})},async pull(e){function t(){null==O||O({steps:L}),e.enqueue({type:"abort"}),e.close()}try{const{done:o,value:r}=await B.read();if(o)return void e.close();if(null==n?void 0:n.aborted)return void t();e.enqueue(r)}catch(o){(0,Wo.isAbortError)(o)&&(null==n?void 0:n.aborted)?t():e.error(o)}},cancel:e=>H.stream.cancel(e)});for(const e of c)U=U.pipeThrough(e({tools:p,stopStream(){H.terminate()}}));this.baseStream=U.pipeThrough(function(e){if(!e)return new TransformStream({transform(e,t){t.enqueue({part:e,partialOutput:void 0})}});let t,o="",r="",i="";function n({controller:e,partialOutput:o}){e.enqueue({part:{type:"text-delta",id:t,text:r},partialOutput:o}),r=""}return new TransformStream({async transform(s,a){if("finish-step"===s.type&&r.length>0&&n({controller:a}),"text-delta"!==s.type&&"text-start"!==s.type&&"text-end"!==s.type)return void a.enqueue({part:s,partialOutput:void 0});if(null==t)t=s.id;else if(s.id!==t)return void a.enqueue({part:s,partialOutput:void 0});if("text-start"===s.type)return void a.enqueue({part:s,partialOutput:void 0});if("text-end"===s.type)return r.length>0&&n({controller:a}),void a.enqueue({part:s,partialOutput:void 0});o+=s.text,r+=s.text;const l=await e.parsePartial({text:o});if(null!=l){const e=JSON.stringify(l.partial);e!==i&&(n({controller:a,partialOutput:l.partial}),i=e)}}})}(g)).pipeThrough(W);const{maxRetries:z,retry:Y}=vo({maxRetries:i,abortSignal:n}),q=io(t),K=Ct(r),$=Xt({model:e,telemetry:t,headers:o,settings:{...K,maxRetries:z}}),Z=this;so({name:"ai.streamText",attributes:lo({telemetry:t,attributes:{...Qt({operationId:"ai.streamText",telemetry:t}),...$,"ai.prompt":{input:()=>JSON.stringify({system:s,prompt:a,messages:l})}}}),tracer:q,endWhenDone:!1,fn:async r=>{G=r,await async function r({currentStep:i,responseMessages:c,usage:v}){var _,b,R,S,O;const T=Z.includeRawChunks;I=new Wo.DelayedPromise;const x=await Kt({system:s,prompt:a,messages:l}),D=[...x.messages,...c],N=await(null==y?void 0:y({model:e,steps:L,stepNumber:L.length,messages:D})),F=et(null!=(_=null==N?void 0:N.model)?_:e),M=await vt({prompt:{system:null!=(b=null==N?void 0:N.system)?b:x.system,messages:null!=(R=null==N?void 0:N.messages)?R:D},supportedUrls:await F.supportedUrls,download:P}),{toolChoice:k,tools:G}=Et({tools:p,toolChoice:null!=(S=null==N?void 0:N.toolChoice)?S:u,activeTools:null!=(O=null==N?void 0:N.activeTools)?O:d}),{result:{stream:V,response:j,request:W},doStreamSpan:H,startTimestampMs:B}=await Y((()=>so({name:"ai.streamText.doStream",attributes:lo({telemetry:t,attributes:{...Qt({operationId:"ai.streamText.doStream",telemetry:t}),...$,"ai.model.provider":F.provider,"ai.model.id":F.modelId,"ai.prompt.messages":{input:()=>po(M)},"ai.prompt.tools":{input:()=>null==G?void 0:G.map((e=>JSON.stringify(e)))},"ai.prompt.toolChoice":{input:()=>null!=k?JSON.stringify(k):void 0},"gen_ai.system":F.provider,"gen_ai.request.model":F.modelId,"gen_ai.request.frequency_penalty":K.frequencyPenalty,"gen_ai.request.max_tokens":K.maxOutputTokens,"gen_ai.request.presence_penalty":K.presencePenalty,"gen_ai.request.stop_sequences":K.stopSequences,"gen_ai.request.temperature":K.temperature,"gen_ai.request.top_k":K.topK,"gen_ai.request.top_p":K.topP}}),tracer:q,endWhenDone:!1,fn:async e=>({startTimestampMs:C(),doStreamSpan:e,result:await F.doStream({...K,tools:G,toolChoice:k,responseFormat:null==g?void 0:g.responseFormat,prompt:M,providerOptions:m,abortSignal:n,headers:o,includeRawChunks:T})})}))),U=function({tools:e,generatorStream:t,tracer:o,telemetry:r,system:i,messages:n,abortSignal:s,repairToolCall:a,experimental_context:l}){let p=null;const u=new ReadableStream({start(e){p=e}}),c=new Set,d=new Map;let h,f=!1;function g(){f&&0===c.size&&(null!=h&&p.enqueue(h),p.close())}const m=new TransformStream({async transform(t,u){const f=t.type;switch(f){case"stream-start":case"text-start":case"text-delta":case"text-end":case"reasoning-start":case"reasoning-delta":case"reasoning-end":case"tool-input-start":case"tool-input-delta":case"tool-input-end":case"source":case"response-metadata":case"error":case"raw":u.enqueue(t);break;case"file":u.enqueue({type:"file",file:new _o({data:t.data,mediaType:t.mediaType})});break;case"finish":h={type:"finish",finishReason:t.finishReason,usage:t.usage,providerMetadata:t.providerMetadata};break;case"tool-call":try{const h=await Ro({toolCall:t,tools:e,repairToolCall:a,system:i,messages:n});if(u.enqueue(h),h.invalid){p.enqueue({type:"tool-error",toolCallId:h.toolCallId,toolName:h.toolName,input:h.input,error:(0,Er.getErrorMessage)(h.error),dynamic:!0});break}const f=e[h.toolName];if(d.set(h.toolCallId,h.input),null!=f.onInputAvailable&&await f.onInputAvailable({input:h.input,toolCallId:h.toolCallId,messages:n,abortSignal:s,experimental_context:l}),null!=f.execute&&!0!==h.providerExecuted){const e=(0,Er.generateId)();c.add(e),so({name:"ai.toolCall",attributes:lo({telemetry:r,attributes:{...Qt({operationId:"ai.toolCall",telemetry:r}),"ai.toolCall.name":h.toolName,"ai.toolCall.id":h.toolCallId,"ai.toolCall.args":{output:()=>JSON.stringify(h.input)}}}),tracer:o,fn:async t=>{let o;try{const e=(0,Er.executeTool)({execute:f.execute.bind(f),input:h.input,options:{toolCallId:h.toolCallId,messages:n,abortSignal:s,experimental_context:l}});for await(const t of e)p.enqueue({...h,type:"tool-result",output:t.output,..."preliminary"===t.type&&{preliminary:!0}}),"final"===t.type&&(o=t.output)}catch(o){return ao(t,o),p.enqueue({...h,type:"tool-error",error:o}),c.delete(e),void g()}c.delete(e),g();try{t.setAttributes(lo({telemetry:r,attributes:{"ai.toolCall.result":{output:()=>JSON.stringify(o)}}}))}catch(e){}}})}}catch(e){p.enqueue({type:"error",error:e})}break;case"tool-result":{const e=t.toolName;t.isError?p.enqueue({type:"tool-error",toolCallId:t.toolCallId,toolName:e,input:d.get(t.toolCallId),providerExecuted:t.providerExecuted,error:t.result}):u.enqueue({type:"tool-result",toolCallId:t.toolCallId,toolName:e,input:d.get(t.toolCallId),output:t.result,providerExecuted:t.providerExecuted});break}default:throw new Error(`Unhandled chunk type: ${f}`)}},flush(){f=!0,g()}});return new ReadableStream({start:async e=>Promise.all([t.pipeThrough(m).pipeTo(new WritableStream({write(t){e.enqueue(t)},close(){}})),u.pipeTo(new WritableStream({write(t){e.enqueue(t)},close(){e.close()}}))])})}({tools:p,generatorStream:V,tracer:q,telemetry:t,system:s,messages:D,repairToolCall:h,abortSignal:n,experimental_context:A}),z=null!=W?W:{},J=[],Q=[];let X;const ee={};let te,oe="unknown",re={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},ie=!0,ne={id:E(),timestamp:w(),modelId:e.modelId},se="";Z.addStream(U.pipeThrough(new TransformStream({async transform(e,t){var o,r,i,s;if("stream-start"===e.type)return void(X=e.warnings);if(ie){const e=C()-B;ie=!1,H.addEvent("ai.stream.firstChunk",{"ai.response.msToFirstChunk":e}),H.setAttributes({"ai.response.msToFirstChunk":e}),t.enqueue({type:"start-step",request:z,warnings:null!=X?X:[]})}const a=e.type;switch(a){case"text-start":case"text-end":case"reasoning-start":case"reasoning-end":case"file":case"source":t.enqueue(e);break;case"text-delta":e.delta.length>0&&(t.enqueue({type:"text-delta",id:e.id,text:e.delta,providerMetadata:e.providerMetadata}),se+=e.delta);break;case"reasoning-delta":t.enqueue({type:"reasoning-delta",id:e.id,text:e.delta,providerMetadata:e.providerMetadata});break;case"tool-call":t.enqueue(e),J.push(e);break;case"tool-result":t.enqueue(e),e.preliminary||Q.push(e);break;case"tool-error":t.enqueue(e),Q.push(e);break;case"response-metadata":ne={id:null!=(o=e.id)?o:ne.id,timestamp:null!=(r=e.timestamp)?r:ne.timestamp,modelId:null!=(i=e.modelId)?i:ne.modelId};break;case"finish":{re=e.usage,oe=e.finishReason,te=e.providerMetadata;const t=C()-B;H.addEvent("ai.stream.finish"),H.setAttributes({"ai.response.msToFinish":t,"ai.response.avgOutputTokensPerSecond":1e3*(null!=(s=re.outputTokens)?s:0)/t});break}case"tool-input-start":{ee[e.id]=e.toolName;const o=null==p?void 0:p[e.toolName];null!=(null==o?void 0:o.onInputStart)&&await o.onInputStart({toolCallId:e.id,messages:D,abortSignal:n,experimental_context:A}),t.enqueue({...e,dynamic:"dynamic"===(null==o?void 0:o.type)});break}case"tool-input-end":delete ee[e.id],t.enqueue(e);break;case"tool-input-delta":{const o=ee[e.id],r=null==p?void 0:p[o];null!=(null==r?void 0:r.onInputDelta)&&await r.onInputDelta({inputTextDelta:e.delta,toolCallId:e.id,messages:D,abortSignal:n,experimental_context:A}),t.enqueue(e);break}case"error":t.enqueue(e),oe="error";break;case"raw":T&&t.enqueue(e);break;default:throw new Error(`Unknown chunk type: ${a}`)}},async flush(e){const o=J.length>0?JSON.stringify(J):void 0;try{H.setAttributes(lo({telemetry:t,attributes:{"ai.response.finishReason":oe,"ai.response.text":{output:()=>se},"ai.response.toolCalls":{output:()=>o},"ai.response.id":ne.id,"ai.response.model":ne.modelId,"ai.response.timestamp":ne.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(te),"ai.usage.inputTokens":re.inputTokens,"ai.usage.outputTokens":re.outputTokens,"ai.usage.totalTokens":re.totalTokens,"ai.usage.reasoningTokens":re.reasoningTokens,"ai.usage.cachedInputTokens":re.cachedInputTokens,"gen_ai.response.finish_reasons":[oe],"gen_ai.response.id":ne.id,"gen_ai.response.model":ne.modelId,"gen_ai.usage.input_tokens":re.inputTokens,"gen_ai.usage.output_tokens":re.outputTokens}}))}catch(e){}finally{H.end()}e.enqueue({type:"finish-step",finishReason:oe,usage:re,providerMetadata:te,response:{...ne,headers:null==j?void 0:j.headers}});const n=uo(v,re);await I.promise;const s=J.filter((e=>!0!==e.providerExecuted)),a=Q.filter((e=>!0!==e.providerExecuted));if(s.length>0&&a.length===s.length&&!await Po({stopConditions:f,steps:L})){c.push(...No({content:L[L.length-1].content,tools:p}));try{await r({currentStep:i+1,responseMessages:c,usage:n})}catch(t){e.enqueue({type:"error",error:t}),Z.closeStream()}}else e.enqueue({type:"finish",finishReason:oe,totalUsage:n}),Z.closeStream()}})))}({currentStep:0,responseMessages:[],usage:{inputTokens:void 0,outputTokens:void 0,totalTokens:void 0}})}}).catch((e=>{Z.addStream(new ReadableStream({start(t){t.enqueue({type:"error",error:e}),t.close()}})),Z.closeStream()}))}get steps(){return this.consumeStream(),this._steps.promise}get finalStep(){return this.steps.then((e=>e[e.length-1]))}get content(){return this.finalStep.then((e=>e.content))}get warnings(){return this.finalStep.then((e=>e.warnings))}get providerMetadata(){return this.finalStep.then((e=>e.providerMetadata))}get text(){return this.finalStep.then((e=>e.text))}get reasoningText(){return this.finalStep.then((e=>e.reasoningText))}get reasoning(){return this.finalStep.then((e=>e.reasoning))}get sources(){return this.finalStep.then((e=>e.sources))}get files(){return this.finalStep.then((e=>e.files))}get toolCalls(){return this.finalStep.then((e=>e.toolCalls))}get staticToolCalls(){return this.finalStep.then((e=>e.staticToolCalls))}get dynamicToolCalls(){return this.finalStep.then((e=>e.dynamicToolCalls))}get toolResults(){return this.finalStep.then((e=>e.toolResults))}get staticToolResults(){return this.finalStep.then((e=>e.staticToolResults))}get dynamicToolResults(){return this.finalStep.then((e=>e.dynamicToolResults))}get usage(){return this.finalStep.then((e=>e.usage))}get request(){return this.finalStep.then((e=>e.request))}get response(){return this.finalStep.then((e=>e.response))}get totalUsage(){return this.consumeStream(),this._totalUsage.promise}get finishReason(){return this.consumeStream(),this._finishReason.promise}teeStream(){const[e,t]=this.baseStream.tee();return this.baseStream=t,e}get textStream(){return mr(this.teeStream().pipeThrough(new TransformStream({transform({part:e},t){"text-delta"===e.type&&t.enqueue(e.text)}})))}get fullStream(){return mr(this.teeStream().pipeThrough(new TransformStream({transform({part:e},t){t.enqueue(e)}})))}async consumeStream(e){var t;try{await yr({stream:this.fullStream,onError:null==e?void 0:e.onError})}catch(o){null==(t=null==e?void 0:e.onError)||t.call(e,o)}}get experimental_partialOutputStream(){if(null==this.output)throw new w;return mr(this.teeStream().pipeThrough(new TransformStream({transform({partialOutput:e},t){null!=e&&t.enqueue(e)}})))}toUIMessageStream({originalMessages:e,generateMessageId:t,onFinish:o,messageMetadata:r,sendReasoning:i=!0,sendSources:n=!1,sendStart:s=!0,sendFinish:a=!0,onError:l=jo.getErrorMessage}={}){const p=null!=t?function({originalMessages:e,responseMessageId:t}){if(null==e)return;const o=e[e.length-1];return"assistant"===(null==o?void 0:o.role)?o.id:"function"==typeof t?t():t}({originalMessages:e,responseMessageId:t}):void 0,u={},c=e=>{var t,o;const r=u[e];return!("dynamic"!==(null==(o=null==(t=this.tools)?void 0:t[r])?void 0:o.type))||void 0};return mr(fr({stream:this.fullStream.pipeThrough(new TransformStream({transform:async(e,t)=>{const o=null==r?void 0:r({part:e}),d=e.type;switch(d){case"text-start":t.enqueue({type:"text-start",id:e.id,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"text-delta":t.enqueue({type:"text-delta",id:e.id,delta:e.text,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"text-end":t.enqueue({type:"text-end",id:e.id,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"reasoning-start":t.enqueue({type:"reasoning-start",id:e.id,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"reasoning-delta":i&&t.enqueue({type:"reasoning-delta",id:e.id,delta:e.text,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"reasoning-end":t.enqueue({type:"reasoning-end",id:e.id,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"file":t.enqueue({type:"file",mediaType:e.file.mediaType,url:`data:${e.file.mediaType};base64,${e.file.base64}`});break;case"source":n&&"url"===e.sourceType&&t.enqueue({type:"source-url",sourceId:e.id,url:e.url,title:e.title,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}}),n&&"document"===e.sourceType&&t.enqueue({type:"source-document",sourceId:e.id,mediaType:e.mediaType,title:e.title,filename:e.filename,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"tool-input-start":{u[e.id]=e.toolName;const o=c(e.id);t.enqueue({type:"tool-input-start",toolCallId:e.id,toolName:e.toolName,...null!=e.providerExecuted?{providerExecuted:e.providerExecuted}:{},...null!=o?{dynamic:o}:{}});break}case"tool-input-delta":t.enqueue({type:"tool-input-delta",toolCallId:e.id,inputTextDelta:e.delta});break;case"tool-call":{u[e.toolCallId]=e.toolName;const o=c(e.toolCallId);e.invalid?t.enqueue({type:"tool-input-error",toolCallId:e.toolCallId,toolName:e.toolName,input:e.input,...null!=e.providerExecuted?{providerExecuted:e.providerExecuted}:{},...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{},...null!=o?{dynamic:o}:{},errorText:l(e.error)}):t.enqueue({type:"tool-input-available",toolCallId:e.toolCallId,toolName:e.toolName,input:e.input,...null!=e.providerExecuted?{providerExecuted:e.providerExecuted}:{},...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{},...null!=o?{dynamic:o}:{}});break}case"tool-result":{const o=c(e.toolCallId);t.enqueue({type:"tool-output-available",toolCallId:e.toolCallId,output:e.output,...null!=e.providerExecuted?{providerExecuted:e.providerExecuted}:{},...null!=e.preliminary?{preliminary:e.preliminary}:{},...null!=o?{dynamic:o}:{}});break}case"tool-error":{const o=c(e.toolCallId);t.enqueue({type:"tool-output-error",toolCallId:e.toolCallId,errorText:l(e.error),...null!=e.providerExecuted?{providerExecuted:e.providerExecuted}:{},...null!=o?{dynamic:o}:{}});break}case"error":t.enqueue({type:"error",errorText:l(e.error)});break;case"start-step":t.enqueue({type:"start-step"});break;case"finish-step":t.enqueue({type:"finish-step"});break;case"start":s&&t.enqueue({type:"start",...null!=o?{messageMetadata:o}:{},...null!=p?{messageId:p}:{}});break;case"finish":a&&t.enqueue({type:"finish",finishReason:e.finishReason,...null!=o?{messageMetadata:o}:{}});break;case"abort":t.enqueue(e);break;case"tool-input-end":case"raw":break;default:throw new Error(`Unknown chunk type: ${d}`)}null!=o&&"start"!==d&&"finish"!==d&&t.enqueue({type:"message-metadata",messageMetadata:o})}})),messageId:null!=p?p:null==t?void 0:t(),originalMessages:e,onFinish:o,onError:l}))}pipeUIMessageStreamToResponse(e,{originalMessages:t,generateMessageId:o,onFinish:r,messageMetadata:i,sendReasoning:n,sendSources:s,sendFinish:a,sendStart:l,onError:p,...u}={}){gr({response:e,stream:this.toUIMessageStream({originalMessages:t,generateMessageId:o,onFinish:r,messageMetadata:i,sendReasoning:n,sendSources:s,sendFinish:a,sendStart:l,onError:p}),...u})}pipeTextStreamToResponse(e,t){zo({response:e,textStream:this.textStream,...t})}toUIMessageStreamResponse({originalMessages:e,generateMessageId:t,onFinish:o,messageMetadata:r,sendReasoning:i,sendSources:n,sendFinish:s,sendStart:a,onError:l,...p}={}){return Ko({stream:this.toUIMessageStream({originalMessages:e,generateMessageId:t,onFinish:o,messageMetadata:r,sendReasoning:i,sendSources:n,sendFinish:s,sendStart:a,onError:l}),...p})}toTextStreamResponse(e){return Bo({textStream:this.textStream,...e})}};function Sr(e,t){const o=[];(null==t?void 0:t.ignoreIncompleteToolCalls)&&(e=e.map((e=>({...e,parts:e.parts.filter((e=>!pr(e)||"input-streaming"!==e.state&&"input-available"!==e.state))}))));for(const r of e)switch(r.role){case"system":{const e=r.parts.filter((e=>"text"===e.type)),t=e.reduce(((e,t)=>null!=t.providerMetadata?{...e,...t.providerMetadata}:e),{});o.push({role:"system",content:e.map((e=>e.text)).join(""),...Object.keys(t).length>0?{providerOptions:t}:{}});break}case"user":o.push({role:"user",content:r.parts.map((e=>{var o;return ir(e)?{type:"text",text:e.text,...null!=e.providerMetadata?{providerOptions:e.providerMetadata}:{}}:nr(e)?{type:"file",mediaType:e.mediaType,filename:e.filename,data:e.url,...null!=e.providerMetadata?{providerOptions:e.providerMetadata}:{}}:rr(e)?null==(o=null==t?void 0:t.convertDataPart)?void 0:o.call(t,e):void 0})).filter((e=>null!=e))});break;case"assistant":if(null!=r.parts){let e=function(){var e,r,n;if(0===i.length)return;const s=[];for(const o of i)if(ir(o))s.push({type:"text",text:o.text,...null!=o.providerMetadata?{providerOptions:o.providerMetadata}:{}});else if(nr(o))s.push({type:"file",mediaType:o.mediaType,filename:o.filename,data:o.url});else if(sr(o))s.push({type:"reasoning",text:o.text,providerOptions:o.providerMetadata});else if(lr(o)){const e=o.toolName;"input-streaming"!==o.state&&s.push({type:"tool-call",toolCallId:o.toolCallId,toolName:e,input:o.input,...null!=o.callProviderMetadata?{providerOptions:o.callProviderMetadata}:{}})}else if(ar(o)){const i=ur(o);"input-streaming"!==o.state&&(s.push({type:"tool-call",toolCallId:o.toolCallId,toolName:i,input:"output-error"===o.state?null!=(e=o.input)?e:o.rawInput:o.input,providerExecuted:o.providerExecuted,...null!=o.callProviderMetadata?{providerOptions:o.callProviderMetadata}:{}}),!0!==o.providerExecuted||"output-available"!==o.state&&"output-error"!==o.state||s.push({type:"tool-result",toolCallId:o.toolCallId,toolName:i,output:xo({output:"output-error"===o.state?o.errorText:o.output,tool:null==(r=null==t?void 0:t.tools)?void 0:r[i],errorMode:"output-error"===o.state?"json":"none"}),...null!=o.callProviderMetadata?{providerOptions:o.callProviderMetadata}:{}}))}else{if(!rr(o))throw new Error(`Unsupported part: ${o}`);{const e=null==(n=null==t?void 0:t.convertDataPart)?void 0:n.call(t,o);null!=e&&s.push(e)}}o.push({role:"assistant",content:s});const a=i.filter((e=>ar(e)&&!0!==e.providerExecuted||"dynamic-tool"===e.type));a.length>0&&o.push({role:"tool",content:a.map((e=>{var o;switch(e.state){case"output-error":case"output-available":{const r=cr(e);return{type:"tool-result",toolCallId:e.toolCallId,toolName:r,output:xo({output:"output-error"===e.state?e.errorText:e.output,tool:null==(o=null==t?void 0:t.tools)?void 0:o[r],errorMode:"output-error"===e.state?"text":"none"}),...null!=e.callProviderMetadata?{providerOptions:e.callProviderMetadata}:{}}}default:return null}})).filter((e=>null!=e))}),i=[]},i=[];for(const t of r.parts)ir(t)||sr(t)||nr(t)||pr(t)||rr(t)?i.push(t):"step-start"===t.type&&e();e();break}break;default:{const e=r.role;throw new We({originalMessage:r,message:`Unsupported role: ${e}`})}}return o}var Or=Sr,Tr=class{constructor(e){this.settings=e}get tools(){return this.settings.tools}async generate(e){return Mo({...this.settings,...e})}stream(e){return br({...this.settings,...e})}respond(e){return this.stream({prompt:Sr(e.messages)}).toUIMessageStreamResponse()}},Ar=o(94192);async function Pr({model:e,value:t,providerOptions:o,maxRetries:r,abortSignal:i,headers:n,experimental_telemetry:s}){const a=tt(e),{maxRetries:l,retry:p}=vo({maxRetries:r,abortSignal:i}),u=(0,Ar.withUserAgentSuffix)(null!=n?n:{},`ai/${ut}`),c=Xt({model:a,telemetry:s,headers:u,settings:{maxRetries:l}}),d=io(s);return so({name:"ai.embed",attributes:lo({telemetry:s,attributes:{...Qt({operationId:"ai.embed",telemetry:s}),...c,"ai.value":{input:()=>JSON.stringify(t)}}}),tracer:d,fn:async e=>{const{embedding:r,usage:n,response:l,providerMetadata:h}=await p((()=>so({name:"ai.embed.doEmbed",attributes:lo({telemetry:s,attributes:{...Qt({operationId:"ai.embed.doEmbed",telemetry:s}),...c,"ai.values":{input:()=>[JSON.stringify(t)]}}}),tracer:d,fn:async e=>{var r;const n=await a.doEmbed({values:[t],abortSignal:i,headers:u,providerOptions:o}),l=n.embeddings[0],p=null!=(r=n.usage)?r:{tokens:NaN};return e.setAttributes(lo({telemetry:s,attributes:{"ai.embeddings":{output:()=>n.embeddings.map((e=>JSON.stringify(e)))},"ai.usage.tokens":p.tokens}})),{embedding:l,usage:p,providerMetadata:n.providerMetadata,response:n.response}}})));return e.setAttributes(lo({telemetry:s,attributes:{"ai.embedding":{output:()=>JSON.stringify(r)},"ai.usage.tokens":n.tokens}})),new Ir({value:t,embedding:r,usage:n,providerMetadata:h,response:l})}})}var Ir=class{constructor(e){this.value=e.value,this.embedding=e.embedding,this.usage=e.usage,this.providerMetadata=e.providerMetadata,this.response=e.response}},xr=o(94192);function Dr(e,t){if(t<=0)throw new Error("chunkSize must be greater than 0");const o=[];for(let r=0;r<e.length;r+=t)o.push(e.slice(r,r+t));return o}async function Nr({model:e,values:t,maxParallelCalls:o=1/0,maxRetries:r,abortSignal:i,headers:n,providerOptions:s,experimental_telemetry:a}){const l=tt(e),{maxRetries:p,retry:u}=vo({maxRetries:r,abortSignal:i}),c=(0,xr.withUserAgentSuffix)(null!=n?n:{},`ai/${ut}`),d=Xt({model:l,telemetry:a,headers:c,settings:{maxRetries:p}}),h=io(a);return so({name:"ai.embedMany",attributes:lo({telemetry:a,attributes:{...Qt({operationId:"ai.embedMany",telemetry:a}),...d,"ai.values":{input:()=>t.map((e=>JSON.stringify(e)))}}}),tracer:h,fn:async e=>{var r;const[n,p]=await Promise.all([l.maxEmbeddingsPerCall,l.supportsParallelCalls]);if(null==n||n===1/0){const{embeddings:o,usage:r,response:n,providerMetadata:p}=await u((()=>so({name:"ai.embedMany.doEmbed",attributes:lo({telemetry:a,attributes:{...Qt({operationId:"ai.embedMany.doEmbed",telemetry:a}),...d,"ai.values":{input:()=>t.map((e=>JSON.stringify(e)))}}}),tracer:h,fn:async e=>{var o;const r=await l.doEmbed({values:t,abortSignal:i,headers:c,providerOptions:s}),n=r.embeddings,p=null!=(o=r.usage)?o:{tokens:NaN};return e.setAttributes(lo({telemetry:a,attributes:{"ai.embeddings":{output:()=>n.map((e=>JSON.stringify(e)))},"ai.usage.tokens":p.tokens}})),{embeddings:n,usage:p,providerMetadata:r.providerMetadata,response:r.response}}})));return e.setAttributes(lo({telemetry:a,attributes:{"ai.embeddings":{output:()=>o.map((e=>JSON.stringify(e)))},"ai.usage.tokens":r.tokens}})),new Fr({values:t,embeddings:o,usage:r,providerMetadata:p,responses:[n]})}const f=Dr(t,n),g=[],m=[];let y,v=0;const C=Dr(f,p?o:1);for(const e of C){const t=await Promise.all(e.map((e=>u((()=>so({name:"ai.embedMany.doEmbed",attributes:lo({telemetry:a,attributes:{...Qt({operationId:"ai.embedMany.doEmbed",telemetry:a}),...d,"ai.values":{input:()=>e.map((e=>JSON.stringify(e)))}}}),tracer:h,fn:async t=>{var o;const r=await l.doEmbed({values:e,abortSignal:i,headers:c,providerOptions:s}),n=r.embeddings,p=null!=(o=r.usage)?o:{tokens:NaN};return t.setAttributes(lo({telemetry:a,attributes:{"ai.embeddings":{output:()=>n.map((e=>JSON.stringify(e)))},"ai.usage.tokens":p.tokens}})),{embeddings:n,usage:p,providerMetadata:r.providerMetadata,response:r.response}}}))))));for(const e of t)if(g.push(...e.embeddings),m.push(e.response),v+=e.usage.tokens,e.providerMetadata)if(y)for(const[t,o]of Object.entries(e.providerMetadata))y[t]={...null!=(r=y[t])?r:{},...o};else y={...e.providerMetadata}}return e.setAttributes(lo({telemetry:a,attributes:{"ai.embeddings":{output:()=>g.map((e=>JSON.stringify(e)))},"ai.usage.tokens":v}})),new Fr({values:t,embeddings:g,usage:{tokens:v},providerMetadata:y,responses:m})}})}var Fr=class{constructor(e){this.values=e.values,this.embeddings=e.embeddings,this.usage=e.usage,this.providerMetadata=e.providerMetadata,this.responses=e.responses}},Mr=o(94192);async function kr({model:e,prompt:t,n:o=1,maxImagesPerCall:r,size:i,aspectRatio:n,seed:s,providerOptions:a,maxRetries:l,abortSignal:p,headers:u}){var c;const d=function(e){if("string"!=typeof e){if("v2"!==e.specificationVersion)throw new Re({version:e.specificationVersion,provider:e.provider,modelId:e.modelId});return e}return ot().imageModel(e)}(e),h=(0,Mr.withUserAgentSuffix)(null!=u?u:{},`ai/${ut}`),{retry:f}=vo({maxRetries:l,abortSignal:p}),g=null!=(c=null!=r?r:await async function(e){return e.maxImagesPerCall instanceof Function?e.maxImagesPerCall({modelId:e.modelId}):e.maxImagesPerCall}(d))?c:1,m=Math.ceil(o/g),y=Array.from({length:m},((e,t)=>{if(t<m-1)return g;const r=o%g;return 0===r?g:r})),v=await Promise.all(y.map((async e=>f((()=>d.doGenerate({prompt:t,n:e,abortSignal:p,headers:h,size:i,aspectRatio:n,seed:s,providerOptions:null!=a?a:{}})))))),C=[],w=[],E=[],_={};for(const e of v){if(C.push(...e.images.map((e=>{var t;return new Eo({data:e,mediaType:null!=(t=lt({data:e,signatures:nt}))?t:"image/png"})}))),w.push(...e.warnings),e.providerMetadata)for(const[t,o]of Object.entries(e.providerMetadata))if("gateway"===t){const e=_[t];_[t]=null!=e&&"object"==typeof e?{...e,...o}:o;const r=_[t].images;Array.isArray(r)&&0===r.length&&delete _[t].images}else null!=_[t]||(_[t]={images:[]}),_[t].images.push(...e.providerMetadata[t].images);E.push(e.response)}if(R(w),!C.length)throw new $({responses:E});return new Lr({images:C,warnings:w,responses:E,providerMetadata:_})}var Lr=class{constructor(e){this.images=e.images,this.warnings=e.warnings,this.responses=e.responses,this.providerMetadata=e.providerMetadata}get image(){return this.images[0]}},Gr=o(94192),Vr=o(10292),jr=o(94192),Wr={type:"no-schema",jsonSchema:void 0,validatePartialResult:async({value:e,textDelta:t})=>({success:!0,value:{partial:e,textDelta:t}}),validateFinalResult:async(e,t)=>void 0===e?{success:!1,error:new te({message:"No object generated: response did not match schema.",text:t.text,response:t.response,usage:t.usage,finishReason:t.finishReason})}:{success:!0,value:e},createElementStream(){throw new Vr.UnsupportedFunctionalityError({functionality:"element streams in no-schema mode"})}},Hr=e=>({type:"object",jsonSchema:e.jsonSchema,validatePartialResult:async({value:e,textDelta:t})=>({success:!0,value:{partial:e,textDelta:t}}),validateFinalResult:async t=>(0,jr.safeValidateTypes)({value:t,schema:e}),createElementStream(){throw new Vr.UnsupportedFunctionalityError({functionality:"element streams in object mode"})}}),Br=e=>{const{$schema:t,...o}=e.jsonSchema;return{type:"array",jsonSchema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:o}},required:["elements"],additionalProperties:!1},async validatePartialResult({value:t,latestObject:o,isFirstDelta:r,isFinalDelta:i}){var n;if(!(0,Vr.isJSONObject)(t)||!(0,Vr.isJSONArray)(t.elements))return{success:!1,error:new Vr.TypeValidationError({value:t,cause:"value must be an object that contains an array of elements"})};const s=t.elements,a=[];for(let t=0;t<s.length;t++){const o=s[t],r=await(0,jr.safeValidateTypes)({value:o,schema:e});if(t!==s.length-1||i){if(!r.success)return r;a.push(r.value)}}const l=null!=(n=null==o?void 0:o.length)?n:0;let p="";return r&&(p+="["),l>0&&(p+=","),p+=a.slice(l).map((e=>JSON.stringify(e))).join(","),i&&(p+="]"),{success:!0,value:{partial:a,textDelta:p}}},async validateFinalResult(t){if(!(0,Vr.isJSONObject)(t)||!(0,Vr.isJSONArray)(t.elements))return{success:!1,error:new Vr.TypeValidationError({value:t,cause:"value must be an object that contains an array of elements"})};const o=t.elements;for(const t of o){const o=await(0,jr.safeValidateTypes)({value:t,schema:e});if(!o.success)return o}return{success:!0,value:o}},createElementStream(e){let t=0;return mr(e.pipeThrough(new TransformStream({transform(e,o){switch(e.type){case"object":{const r=e.object;for(;t<r.length;t++)o.enqueue(r[t]);break}case"text-delta":case"finish":case"error":break;default:throw new Error(`Unsupported chunk type: ${e}`)}}})))}}},Ur=e=>({type:"enum",jsonSchema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:e}},required:["result"],additionalProperties:!1},async validateFinalResult(t){if(!(0,Vr.isJSONObject)(t)||"string"!=typeof t.result)return{success:!1,error:new Vr.TypeValidationError({value:t,cause:'value must be an object that contains a string in the "result" property.'})};const o=t.result;return e.includes(o)?{success:!0,value:o}:{success:!1,error:new Vr.TypeValidationError({value:t,cause:"value must be a string in the enum"})}},async validatePartialResult({value:t,textDelta:o}){if(!(0,Vr.isJSONObject)(t)||"string"!=typeof t.result)return{success:!1,error:new Vr.TypeValidationError({value:t,cause:'value must be an object that contains a string in the "result" property.'})};const r=t.result,i=e.filter((e=>e.startsWith(r)));return 0===t.result.length||0===i.length?{success:!1,error:new Vr.TypeValidationError({value:t,cause:"value must be a string in the enum"})}:{success:!0,value:{partial:i.length>1?r:i[0],textDelta:o}}},createElementStream(){throw new Vr.UnsupportedFunctionalityError({functionality:"element streams in enum mode"})}});function zr({output:e,schema:t,enumValues:o}){switch(e){case"object":return Hr((0,jr.asSchema)(t));case"array":return Br((0,jr.asSchema)(t));case"enum":return Ur(o);case"no-schema":return Wr;default:throw new Error(`Unsupported output: ${e}`)}}var Yr=o(10292),qr=o(94192);async function Kr(e,t,o){const r=await(0,qr.safeParseJSON)({text:e});if(!r.success)throw new te({message:"No object generated: could not parse the response.",cause:r.error,text:e,response:o.response,usage:o.usage,finishReason:o.finishReason});const i=await t.validateFinalResult(r.value,{text:e,response:o.response,usage:o.usage});if(!i.success)throw new te({message:"No object generated: response did not match schema.",cause:i.error,text:e,response:o.response,usage:o.usage,finishReason:o.finishReason});return i.value}async function $r(e,t,o,r){try{return await Kr(e,t,r)}catch(i){if(null!=o&&te.isInstance(i)&&(Yr.JSONParseError.isInstance(i.cause)||Yr.TypeValidationError.isInstance(i.cause))){const n=await o({text:e,error:i.cause});if(null===n)throw i;return await Kr(n,t,r)}throw i}}function Zr({output:e,schema:t,schemaName:o,schemaDescription:r,enumValues:i}){if(null!=e&&"object"!==e&&"array"!==e&&"enum"!==e&&"no-schema"!==e)throw new x({parameter:"output",value:e,message:"Invalid output type."});if("no-schema"===e){if(null!=t)throw new x({parameter:"schema",value:t,message:"Schema is not supported for no-schema output."});if(null!=r)throw new x({parameter:"schemaDescription",value:r,message:"Schema description is not supported for no-schema output."});if(null!=o)throw new x({parameter:"schemaName",value:o,message:"Schema name is not supported for no-schema output."});if(null!=i)throw new x({parameter:"enumValues",value:i,message:"Enum values are not supported for no-schema output."})}if("object"===e){if(null==t)throw new x({parameter:"schema",value:t,message:"Schema is required for object output."});if(null!=i)throw new x({parameter:"enumValues",value:i,message:"Enum values are not supported for object output."})}if("array"===e){if(null==t)throw new x({parameter:"schema",value:t,message:"Element schema is required for array output."});if(null!=i)throw new x({parameter:"enumValues",value:i,message:"Enum values are not supported for array output."})}if("enum"===e){if(null!=t)throw new x({parameter:"schema",value:t,message:"Schema is not supported for enum output."});if(null!=r)throw new x({parameter:"schemaDescription",value:r,message:"Schema description is not supported for enum output."});if(null!=o)throw new x({parameter:"schemaName",value:o,message:"Schema name is not supported for enum output."});if(null==i)throw new x({parameter:"enumValues",value:i,message:"Enum values are required for enum output."});for(const e of i)if("string"!=typeof e)throw new x({parameter:"enumValues",value:e,message:"Enum values must be strings."})}}var Jr=(0,Gr.createIdGenerator)({prefix:"aiobj",size:24});async function Qr(e){const{model:t,output:o="object",system:r,prompt:i,messages:n,maxRetries:s,abortSignal:a,headers:l,experimental_repairText:p,experimental_telemetry:u,experimental_download:c,providerOptions:d,_internal:{generateId:h=Jr,currentDate:f=()=>new Date}={},...g}=e,m=et(t),y="enum"in e?e.enum:void 0,{schema:v,schemaDescription:C,schemaName:w}="schema"in e?e:{};Zr({output:o,schema:v,schemaName:w,schemaDescription:C,enumValues:y});const{maxRetries:E,retry:_}=vo({maxRetries:s,abortSignal:a}),b=zr({output:o,schema:v,enumValues:y}),S=Ct(g),O=(0,Gr.withUserAgentSuffix)(null!=l?l:{},`ai/${ut}`),T=Xt({model:m,telemetry:u,headers:O,settings:{...S,maxRetries:E}}),A=io(u);try{return await so({name:"ai.generateObject",attributes:lo({telemetry:u,attributes:{...Qt({operationId:"ai.generateObject",telemetry:u}),...T,"ai.prompt":{input:()=>JSON.stringify({system:r,prompt:i,messages:n})},"ai.schema":null!=b.jsonSchema?{input:()=>JSON.stringify(b.jsonSchema)}:void 0,"ai.schema.name":w,"ai.schema.description":C,"ai.settings.output":b.type}}),tracer:A,fn:async e=>{var t;let o,s,l,y,v,E,P,I;const x=await Kt({system:r,prompt:i,messages:n}),D=await vt({prompt:x,supportedUrls:await m.supportedUrls,download:c}),N=await _((()=>so({name:"ai.generateObject.doGenerate",attributes:lo({telemetry:u,attributes:{...Qt({operationId:"ai.generateObject.doGenerate",telemetry:u}),...T,"ai.prompt.messages":{input:()=>po(D)},"gen_ai.system":m.provider,"gen_ai.request.model":m.modelId,"gen_ai.request.frequency_penalty":S.frequencyPenalty,"gen_ai.request.max_tokens":S.maxOutputTokens,"gen_ai.request.presence_penalty":S.presencePenalty,"gen_ai.request.temperature":S.temperature,"gen_ai.request.top_k":S.topK,"gen_ai.request.top_p":S.topP}}),tracer:A,fn:async e=>{var t,o,r,i,n,s,l,p;const c=await m.doGenerate({responseFormat:{type:"json",schema:b.jsonSchema,name:w,description:C},...Ct(g),prompt:D,providerOptions:d,abortSignal:a,headers:O}),y={id:null!=(o=null==(t=c.response)?void 0:t.id)?o:h(),timestamp:null!=(i=null==(r=c.response)?void 0:r.timestamp)?i:f(),modelId:null!=(s=null==(n=c.response)?void 0:n.modelId)?s:m.modelId,headers:null==(l=c.response)?void 0:l.headers,body:null==(p=c.response)?void 0:p.body},v=Co(c.content),E=function(e){const t=e.filter((e=>"reasoning"===e.type));return 0===t.length?void 0:t.map((e=>e.text)).join("\n")}(c.content);if(void 0===v)throw new te({message:"No object generated: the model did not return a response.",response:y,usage:c.usage,finishReason:c.finishReason});return e.setAttributes(lo({telemetry:u,attributes:{"ai.response.finishReason":c.finishReason,"ai.response.object":{output:()=>v},"ai.response.id":y.id,"ai.response.model":y.modelId,"ai.response.timestamp":y.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(c.providerMetadata),"ai.usage.promptTokens":c.usage.inputTokens,"ai.usage.completionTokens":c.usage.outputTokens,"gen_ai.response.finish_reasons":[c.finishReason],"gen_ai.response.id":y.id,"gen_ai.response.model":y.modelId,"gen_ai.usage.input_tokens":c.usage.inputTokens,"gen_ai.usage.output_tokens":c.usage.outputTokens}})),{...c,objectText:v,reasoning:E,responseData:y}}})));o=N.objectText,s=N.finishReason,l=N.usage,y=N.warnings,P=N.providerMetadata,E=null!=(t=N.request)?t:{},v=N.responseData,I=N.reasoning,R(y);const F=await $r(o,b,p,{response:v,usage:l,finishReason:s});return e.setAttributes(lo({telemetry:u,attributes:{"ai.response.finishReason":s,"ai.response.object":{output:()=>JSON.stringify(F)},"ai.response.providerMetadata":JSON.stringify(P),"ai.usage.promptTokens":l.inputTokens,"ai.usage.completionTokens":l.outputTokens}})),new Xr({object:F,reasoning:I,finishReason:s,usage:l,warnings:y,request:E,response:v,providerMetadata:P})}})}catch(e){throw Jt(e)}}var Xr=class{constructor(e){this.object=e.object,this.finishReason=e.finishReason,this.usage=e.usage,this.warnings=e.warnings,this.providerMetadata=e.providerMetadata,this.response=e.response,this.request=e.request,this.reasoning=e.reasoning}toJsonResponse(e){var t;return new Response(JSON.stringify(this.object),{status:null!=(t=null==e?void 0:e.status)?t:200,headers:Ho(null==e?void 0:e.headers,{"content-type":"application/json; charset=utf-8"})})}},ei=o(94192);function ti(e,t){if(e.length!==t.length)throw new x({parameter:"vector1,vector2",value:{vector1Length:e.length,vector2Length:t.length},message:"Vectors must have the same length"});const o=e.length;if(0===o)return 0;let r=0,i=0,n=0;for(let s=0;s<o;s++){const o=e[s],a=t[s];r+=o*o,i+=a*a,n+=o*a}return 0===r||0===i?0:n/(Math.sqrt(r)*Math.sqrt(i))}function oi(e){const[t,o]=e.split(",");if(null==t.split(";")[0].split(":")[1]||null==o)throw new Error("Invalid data URL format");try{return window.atob(o)}catch(e){throw new Error("Error decoding data URL")}}function ri(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if("object"!=typeof e&&"object"!=typeof t)return e===t;if(e.constructor!==t.constructor)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(Array.isArray(e)){if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(!ri(e[o],t[o]))return!1;return!0}const o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;for(const i of o){if(!r.includes(i))return!1;if(!ri(e[i],t[i]))return!1}return!0}var ii=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise(((t,o)=>{this.queue.push((async()=>{try{await e(),t()}catch(e){o(e)}})),this.processQueue()}))}},ni=o(94192);function si({chunks:e,initialDelayInMs:t=0,chunkDelayInMs:o=0,_internal:r}){var i;const n=null!=(i=null==r?void 0:r.delay)?i:ni.delay;let s=0;return new ReadableStream({async pull(r){s<e.length?(await n(0===s?t:o),r.enqueue(e[s++])):r.close()}})}var ai=(0,ei.createIdGenerator)({prefix:"aiobj",size:24});function li(e){const{model:t,output:o="object",system:r,prompt:i,messages:n,maxRetries:s,abortSignal:a,headers:l,experimental_repairText:p,experimental_telemetry:u,experimental_download:c,providerOptions:d,onError:h=({error:e})=>{console.error(e)},onFinish:f,_internal:{generateId:g=ai,currentDate:m=()=>new Date,now:y=wr}={},...v}=e,C="enum"in e&&e.enum?e.enum:void 0,{schema:w,schemaDescription:E,schemaName:_}="schema"in e?e:{};Zr({output:o,schema:w,schemaName:_,schemaDescription:E,enumValues:C});const b=zr({output:o,schema:w,enumValues:C});return new pi({model:t,telemetry:u,headers:l,settings:v,maxRetries:s,abortSignal:a,outputStrategy:b,system:r,prompt:i,messages:n,schemaName:_,schemaDescription:E,providerOptions:d,repairText:p,onError:h,onFinish:f,download:c,generateId:g,currentDate:m,now:y})}var pi=class{constructor({model:e,headers:t,telemetry:o,settings:r,maxRetries:i,abortSignal:n,outputStrategy:s,system:a,prompt:l,messages:p,schemaName:u,schemaDescription:c,providerOptions:d,repairText:h,onError:f,onFinish:g,download:m,generateId:y,currentDate:v,now:C}){this._object=new ei.DelayedPromise,this._usage=new ei.DelayedPromise,this._providerMetadata=new ei.DelayedPromise,this._warnings=new ei.DelayedPromise,this._request=new ei.DelayedPromise,this._response=new ei.DelayedPromise,this._finishReason=new ei.DelayedPromise;const w=et(e),{maxRetries:E,retry:_}=vo({maxRetries:i,abortSignal:n}),b=Ct(r),S=Xt({model:w,telemetry:o,headers:t,settings:{...b,maxRetries:E}}),O=io(o),T=this,A=Cr(),P=new TransformStream({transform(e,t){t.enqueue(e),"error"===e.type&&f({error:Jt(e.error)})}});this.baseStream=A.stream.pipeThrough(P),so({name:"ai.streamObject",attributes:lo({telemetry:o,attributes:{...Qt({operationId:"ai.streamObject",telemetry:o}),...S,"ai.prompt":{input:()=>JSON.stringify({system:a,prompt:l,messages:p})},"ai.schema":null!=s.jsonSchema?{input:()=>JSON.stringify(s.jsonSchema)}:void 0,"ai.schema.name":u,"ai.schema.description":c,"ai.settings.output":s.type}}),tracer:O,endWhenDone:!1,fn:async e=>{const i=await Kt({system:a,prompt:l,messages:p}),f={responseFormat:{type:"json",schema:s.jsonSchema,name:u,description:c},...Ct(r),prompt:await vt({prompt:i,supportedUrls:await w.supportedUrls,download:m}),providerOptions:d,abortSignal:n,headers:t,includeRawChunks:!1},{result:{stream:E,response:P,request:I},doStreamSpan:x,startTimestampMs:D}=await _((()=>so({name:"ai.streamObject.doStream",attributes:lo({telemetry:o,attributes:{...Qt({operationId:"ai.streamObject.doStream",telemetry:o}),...S,"ai.prompt.messages":{input:()=>po(f.prompt)},"gen_ai.system":w.provider,"gen_ai.request.model":w.modelId,"gen_ai.request.frequency_penalty":b.frequencyPenalty,"gen_ai.request.max_tokens":b.maxOutputTokens,"gen_ai.request.presence_penalty":b.presencePenalty,"gen_ai.request.temperature":b.temperature,"gen_ai.request.top_k":b.topK,"gen_ai.request.top_p":b.topP}}),tracer:O,endWhenDone:!1,fn:async e=>({startTimestampMs:C(),doStreamSpan:e,result:await w.doStream(f)})})));let N;T._request.resolve(null!=I?I:{});let F,M,k,L,G,V,j={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},W="",H="",B={id:y(),timestamp:v(),modelId:w.modelId},U=!0,z=!0;const Y=E.pipeThrough(new TransformStream({transform:(e,t)=>{switch(e.type){case"text-delta":t.enqueue(e.delta);break;case"response-metadata":case"finish":case"error":case"stream-start":t.enqueue(e)}}})).pipeThrough(new TransformStream({async transform(e,t){var o,r,i;if("object"!=typeof e||"stream-start"!==e.type){if(U){const e=C()-D;U=!1,x.addEvent("ai.stream.firstChunk",{"ai.stream.msToFirstChunk":e}),x.setAttributes({"ai.stream.msToFirstChunk":e})}if("string"!=typeof e)switch(e.type){case"response-metadata":B={id:null!=(o=e.id)?o:B.id,timestamp:null!=(r=e.timestamp)?r:B.timestamp,modelId:null!=(i=e.modelId)?i:B.modelId};break;case"finish":""!==H&&t.enqueue({type:"text-delta",textDelta:H}),F=e.finishReason,j=e.usage,M=e.providerMetadata,t.enqueue({...e,usage:j,response:B}),R(null!=N?N:[]),T._usage.resolve(j),T._providerMetadata.resolve(M),T._warnings.resolve(N),T._response.resolve({...B,headers:null==P?void 0:P.headers}),T._finishReason.resolve(null!=F?F:"unknown");try{k=await $r(W,s,h,{response:B,usage:j,finishReason:F}),T._object.resolve(k)}catch(e){L=e,T._object.reject(e)}break;default:t.enqueue(e)}else{W+=e,H+=e;const{value:o,state:r}=await or(W);if(void 0!==o&&!ri(G,o)){const e=await s.validatePartialResult({value:o,textDelta:H,latestObject:V,isFirstDelta:z,isFinalDelta:"successful-parse"===r});e.success&&!ri(V,e.value.partial)&&(G=o,V=e.value.partial,t.enqueue({type:"object",object:V}),t.enqueue({type:"text-delta",textDelta:e.value.textDelta}),H="",z=!1)}}}else N=e.warnings},async flush(t){try{const t=null!=j?j:{promptTokens:NaN,completionTokens:NaN,totalTokens:NaN};x.setAttributes(lo({telemetry:o,attributes:{"ai.response.finishReason":F,"ai.response.object":{output:()=>JSON.stringify(k)},"ai.response.id":B.id,"ai.response.model":B.modelId,"ai.response.timestamp":B.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(M),"ai.usage.inputTokens":t.inputTokens,"ai.usage.outputTokens":t.outputTokens,"ai.usage.totalTokens":t.totalTokens,"ai.usage.reasoningTokens":t.reasoningTokens,"ai.usage.cachedInputTokens":t.cachedInputTokens,"gen_ai.response.finish_reasons":[F],"gen_ai.response.id":B.id,"gen_ai.response.model":B.modelId,"gen_ai.usage.input_tokens":t.inputTokens,"gen_ai.usage.output_tokens":t.outputTokens}})),x.end(),e.setAttributes(lo({telemetry:o,attributes:{"ai.usage.inputTokens":t.inputTokens,"ai.usage.outputTokens":t.outputTokens,"ai.usage.totalTokens":t.totalTokens,"ai.usage.reasoningTokens":t.reasoningTokens,"ai.usage.cachedInputTokens":t.cachedInputTokens,"ai.response.object":{output:()=>JSON.stringify(k)},"ai.response.providerMetadata":JSON.stringify(M)}})),await(null==g?void 0:g({usage:t,object:k,error:L,response:{...B,headers:null==P?void 0:P.headers},warnings:N,providerMetadata:M}))}catch(e){t.enqueue({type:"error",error:e})}finally{e.end()}}}));A.addStream(Y)}}).catch((e=>{A.addStream(new ReadableStream({start(t){t.enqueue({type:"error",error:e}),t.close()}}))})).finally((()=>{A.close()})),this.outputStrategy=s}get object(){return this._object.promise}get usage(){return this._usage.promise}get providerMetadata(){return this._providerMetadata.promise}get warnings(){return this._warnings.promise}get request(){return this._request.promise}get response(){return this._response.promise}get finishReason(){return this._finishReason.promise}get partialObjectStream(){return mr(this.baseStream.pipeThrough(new TransformStream({transform(e,t){switch(e.type){case"object":t.enqueue(e.object);break;case"text-delta":case"finish":case"error":break;default:throw new Error(`Unsupported chunk type: ${e}`)}}})))}get elementStream(){return this.outputStrategy.createElementStream(this.baseStream)}get textStream(){return mr(this.baseStream.pipeThrough(new TransformStream({transform(e,t){switch(e.type){case"text-delta":t.enqueue(e.textDelta);break;case"object":case"finish":case"error":break;default:throw new Error(`Unsupported chunk type: ${e}`)}}})))}get fullStream(){return mr(this.baseStream)}pipeTextStreamToResponse(e,t){zo({response:e,textStream:this.textStream,...t})}toTextStreamResponse(e){return Bo({textStream:this.textStream,...e})}},ui=o(94192),ci=class extends Eo{constructor({data:e,mediaType:t}){super({data:e,mediaType:t});let o="mp3";if(t){const e=t.split("/");2===e.length&&"audio/mpeg"!==t&&(o=e[1])}if(!o)throw new Error("Audio format must be provided or determinable from media type");this.format=o}};async function di({model:e,text:t,voice:o,outputFormat:r,instructions:i,speed:n,language:s,providerOptions:a={},maxRetries:l,abortSignal:p,headers:u}){var c;if("v2"!==e.specificationVersion)throw new Re({version:e.specificationVersion,provider:e.provider,modelId:e.modelId});const d=(0,ui.withUserAgentSuffix)(null!=u?u:{},`ai/${ut}`),{retry:h}=vo({maxRetries:l,abortSignal:p}),f=await h((()=>e.doGenerate({text:t,voice:o,outputFormat:r,instructions:i,speed:n,language:s,abortSignal:p,headers:d,providerOptions:a})));if(!f.audio||0===f.audio.length)throw new ue({responses:[f.response]});return R(f.warnings),new hi({audio:new ci({data:f.audio,mediaType:null!=(c=lt({data:f.audio,signatures:st}))?c:"audio/mp3"}),warnings:f.warnings,responses:[f.response],providerMetadata:f.providerMetadata})}var hi=class{constructor(e){var t;this.audio=e.audio,this.warnings=e.warnings,this.responses=e.responses,this.providerMetadata=null!=(t=e.providerMetadata)?t:{}}},fi={};u(fi,{object:()=>yi,text:()=>mi});var gi=o(94192),mi=()=>({type:"text",responseFormat:{type:"text"},parsePartial:async({text:e})=>({partial:e}),parseOutput:async({text:e})=>e}),yi=({schema:e})=>{const t=(0,gi.asSchema)(e);return{type:"object",responseFormat:{type:"json",schema:t.jsonSchema},async parsePartial({text:e}){const t=await or(e);switch(t.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:t.value};default:{const e=t.state;throw new Error(`Unsupported parse state: ${e}`)}}},async parseOutput({text:e},o){const r=await(0,gi.safeParseJSON)({text:e});if(!r.success)throw new te({message:"No object generated: could not parse the response.",cause:r.error,text:e,response:o.response,usage:o.usage,finishReason:o.finishReason});const i=await(0,gi.safeValidateTypes)({value:r.value,schema:t});if(!i.success)throw new te({message:"No object generated: response did not match schema.",cause:i.error,text:e,response:o.response,usage:o.usage,finishReason:o.finishReason});return i.value}}};function vi({messages:e,reasoning:t="none",toolCalls:o=[],emptyMessages:r="remove"}){"all"!==t&&"before-last-message"!==t||(e=e.map(((o,r)=>"assistant"!==o.role||"string"==typeof o.content||"before-last-message"===t&&r===e.length-1?o:{...o,content:o.content.filter((e=>"reasoning"!==e.type))}))),"none"===o?o=[]:"all"===o?o=[{type:"all"}]:"before-last-message"===o?o=[{type:"before-last-message"}]:"string"==typeof o&&(o=[{type:o}]);for(const t of o){const o="all"===t.type?void 0:"before-last-message"===t.type?1:Number(t.type.slice(12).slice(0,-9)),r=new Set;if(null!=o)for(const t of e.slice(-o))if(("assistant"===t.role||"tool"===t.role)&&"string"!=typeof t.content)for(const e of t.content)"tool-call"!==e.type&&"tool-result"!==e.type||r.add(e.toolCallId);e=e.map(((i,n)=>{if("assistant"!==i.role&&"tool"!==i.role||"string"==typeof i.content||o&&n>=e.length-o)return i;const s={};return{...i,content:i.content.filter((e=>"tool-call"!==e.type&&"tool-result"!==e.type||("tool-call"===e.type&&(s[e.toolCallId]=e.toolName),!("tool-call"!==e.type&&"tool-result"!==e.type||!r.has(e.toolCallId))||null!=t.tools&&!t.tools.includes(e.toolName))))}}))}return"remove"===r&&(e=e.filter((e=>e.content.length>0))),e}var Ci=o(94192),wi=o(10292),Ei={word:/\S+\s+/m,line:/\n+/m};function _i({delayInMs:e=10,chunking:t="word",_internal:{delay:o=Ci.delay}={}}={}){let r;if("function"==typeof t)r=e=>{const o=t(e);if(null==o)return null;if(!o.length)throw new Error("Chunking function must return a non-empty string.");if(!e.startsWith(o))throw new Error(`Chunking function must return a match that is a prefix of the buffer. Received: "${o}" expected to start with "${e}"`);return o};else{const e="string"==typeof t?Ei[t]:t;if(null==e)throw new wi.InvalidArgumentError({argument:"chunking",message:`Chunking must be "word" or "line" or a RegExp. Received: ${t}`});r=t=>{const o=e.exec(t);return o?t.slice(0,o.index)+(null==o?void 0:o[0]):null}}return()=>{let t="",i="";return new TransformStream({async transform(n,s){if("text-delta"!==n.type)return t.length>0&&(s.enqueue({type:"text-delta",text:t,id:i}),t=""),void s.enqueue(n);let a;for(n.id!==i&&t.length>0&&(s.enqueue({type:"text-delta",text:t,id:i}),t=""),t+=n.text,i=n.id;null!=(a=r(t));)s.enqueue({type:"text-delta",text:a,id:i}),t=t.slice(a.length),await o(e)}})}}function bi({settings:e}){return{middlewareVersion:"v2",transformParams:async({params:t})=>Xo(e,t)}}function Ri(e,t){if(0===t.length)return null;const o=e.indexOf(t);if(-1!==o)return o;for(let o=e.length-1;o>=0;o--){const r=e.substring(o);if(t.startsWith(r))return o}return null}function Si({tagName:e,separator:t="\n",startWithReasoning:o=!1}){const r=`<${e}>`,i=`</${e}>`;return{middlewareVersion:"v2",wrapGenerate:async({doGenerate:e})=>{const{content:n,...s}=await e(),a=[];for(const e of n){if("text"!==e.type){a.push(e);continue}const n=o?r+e.text:e.text,s=new RegExp(`${r}(.*?)${i}`,"gs"),l=Array.from(n.matchAll(s));if(!l.length){a.push(e);continue}const p=l.map((e=>e[1])).join(t);let u=n;for(let e=l.length-1;e>=0;e--){const o=l[e],r=u.slice(0,o.index),i=u.slice(o.index+o[0].length);u=r+(r.length>0&&i.length>0?t:"")+i}a.push({type:"reasoning",text:p}),a.push({type:"text",text:u})}return{content:a,...s}},wrapStream:async({doStream:e})=>{const{stream:n,...s}=await e(),a={};let l;return{stream:n.pipeThrough(new TransformStream({transform:(e,n)=>{if("text-start"===e.type)return void(l=e);if("text-end"===e.type&&l&&(n.enqueue(l),l=void 0),"text-delta"!==e.type)return void n.enqueue(e);null==a[e.id]&&(a[e.id]={isFirstReasoning:!0,isFirstText:!0,afterSwitch:!1,isReasoning:o,buffer:"",idCounter:0,textId:e.id});const s=a[e.id];function p(e){if(e.length>0){const o=!s.afterSwitch||(s.isReasoning?s.isFirstReasoning:s.isFirstText)?"":t;s.isReasoning&&(s.afterSwitch||s.isFirstReasoning)&&n.enqueue({type:"reasoning-start",id:`reasoning-${s.idCounter}`}),s.isReasoning?n.enqueue({type:"reasoning-delta",delta:o+e,id:`reasoning-${s.idCounter}`}):(l&&(n.enqueue(l),l=void 0),n.enqueue({type:"text-delta",delta:o+e,id:s.textId})),s.afterSwitch=!1,s.isReasoning?s.isFirstReasoning=!1:s.isFirstText=!1}}for(s.buffer+=e.delta;;){const e=s.isReasoning?i:r,t=Ri(s.buffer,e);if(null==t){p(s.buffer),s.buffer="";break}if(p(s.buffer.slice(0,t)),!(t+e.length<=s.buffer.length)){s.buffer=s.buffer.slice(t);break}s.buffer=s.buffer.slice(t+e.length),s.isReasoning&&n.enqueue({type:"reasoning-end",id:"reasoning-"+s.idCounter++}),s.isReasoning=!s.isReasoning,s.afterSwitch=!0}}})),...s}}}}function Oi(){return{middlewareVersion:"v2",wrapStream:async({doGenerate:e})=>{const t=await e();let o=0;return{stream:new ReadableStream({start(e){e.enqueue({type:"stream-start",warnings:t.warnings}),e.enqueue({type:"response-metadata",...t.response});for(const r of t.content)switch(r.type){case"text":r.text.length>0&&(e.enqueue({type:"text-start",id:String(o)}),e.enqueue({type:"text-delta",id:String(o),delta:r.text}),e.enqueue({type:"text-end",id:String(o)}),o++);break;case"reasoning":e.enqueue({type:"reasoning-start",id:String(o),providerMetadata:r.providerMetadata}),e.enqueue({type:"reasoning-delta",id:String(o),delta:r.text}),e.enqueue({type:"reasoning-end",id:String(o)}),o++;break;default:e.enqueue(r)}e.enqueue({type:"finish",finishReason:t.finishReason,usage:t.usage,providerMetadata:t.providerMetadata}),e.close()}}),request:t.request,response:t.response}}}}var Ti=({model:e,middleware:t,modelId:o,providerId:r})=>[...ho(t)].reverse().reduce(((e,t)=>Ai({model:e,middleware:t,modelId:o,providerId:r})),e),Ai=({model:e,middleware:{transformParams:t,wrapGenerate:o,wrapStream:r,overrideProvider:i,overrideModelId:n,overrideSupportedUrls:s},modelId:a,providerId:l})=>{var p,u,c;async function d({params:o,type:r}){return t?await t({params:o,type:r,model:e}):o}return{specificationVersion:"v2",provider:null!=(p=null!=l?l:null==i?void 0:i({model:e}))?p:e.provider,modelId:null!=(u=null!=a?a:null==n?void 0:n({model:e}))?u:e.modelId,supportedUrls:null!=(c=null==s?void 0:s({model:e}))?c:e.supportedUrls,async doGenerate(t){const r=await d({params:t,type:"generate"}),i=async()=>e.doGenerate(r);return o?o({doGenerate:i,doStream:async()=>e.doStream(r),params:r,model:e}):i()},async doStream(t){const o=await d({params:t,type:"stream"}),i=async()=>e.doStream(o);return r?r({doGenerate:async()=>e.doGenerate(o),doStream:i,params:o,model:e}):i()}}};function Pi({provider:e,languageModelMiddleware:t}){return{languageModel(o){let r=e.languageModel(o);return r=Ti({model:r,middleware:t}),r},textEmbeddingModel:e.textEmbeddingModel,imageModel:e.imageModel,transcriptionModel:e.transcriptionModel,speechModel:e.speechModel}}var Ii=o(10292);function xi({languageModels:e,textEmbeddingModels:t,imageModels:o,transcriptionModels:r,speechModels:i,fallbackProvider:n}){return{languageModel(t){if(null!=e&&t in e)return e[t];if(n)return n.languageModel(t);throw new Ii.NoSuchModelError({modelId:t,modelType:"languageModel"})},textEmbeddingModel(e){if(null!=t&&e in t)return t[e];if(n)return n.textEmbeddingModel(e);throw new Ii.NoSuchModelError({modelId:e,modelType:"textEmbeddingModel"})},imageModel(e){if(null!=o&&e in o)return o[e];if(null==n?void 0:n.imageModel)return n.imageModel(e);throw new Ii.NoSuchModelError({modelId:e,modelType:"imageModel"})},transcriptionModel(e){if(null!=r&&e in r)return r[e];if(null==n?void 0:n.transcriptionModel)return n.transcriptionModel(e);throw new Ii.NoSuchModelError({modelId:e,modelType:"transcriptionModel"})},speechModel(e){if(null!=i&&e in i)return i[e];if(null==n?void 0:n.speechModel)return n.speechModel(e);throw new Ii.NoSuchModelError({modelId:e,modelType:"speechModel"})}}}var Di,Ni=xi,Fi=o(10292),Mi="AI_NoSuchProviderError",ki=`vercel.ai.error.${Mi}`,Li=Symbol.for(ki),Gi=class extends Fi.NoSuchModelError{constructor({modelId:e,modelType:t,providerId:o,availableProviders:r,message:i=`No such provider: ${o} (available providers: ${r.join()})`}){super({errorName:Mi,modelId:e,modelType:t,message:i}),this[Di]=!0,this.providerId=o,this.availableProviders=r}static isInstance(e){return Fi.AISDKError.hasMarker(e,ki)}};Di=Li;var Vi=o(10292);function ji(e,{separator:t=":",languageModelMiddleware:o}={}){const r=new Hi({separator:t,languageModelMiddleware:o});for(const[t,o]of Object.entries(e))r.registerProvider({id:t,provider:o});return r}var Wi=ji,Hi=class{constructor({separator:e,languageModelMiddleware:t}){this.providers={},this.separator=e,this.languageModelMiddleware=t}registerProvider({id:e,provider:t}){this.providers[e]=t}getProvider(e,t){const o=this.providers[e];if(null==o)throw new Gi({modelId:e,modelType:t,providerId:e,availableProviders:Object.keys(this.providers)});return o}splitId(e,t){const o=e.indexOf(this.separator);if(-1===o)throw new Vi.NoSuchModelError({modelId:e,modelType:t,message:`Invalid ${t} id for registry: ${e} (must be in the format "providerId${this.separator}modelId")`});return[e.slice(0,o),e.slice(o+this.separator.length)]}languageModel(e){var t,o;const[r,i]=this.splitId(e,"languageModel");let n=null==(o=(t=this.getProvider(r,"languageModel")).languageModel)?void 0:o.call(t,i);if(null==n)throw new Vi.NoSuchModelError({modelId:e,modelType:"languageModel"});return null!=this.languageModelMiddleware&&(n=Ti({model:n,middleware:this.languageModelMiddleware})),n}textEmbeddingModel(e){var t;const[o,r]=this.splitId(e,"textEmbeddingModel"),i=this.getProvider(o,"textEmbeddingModel"),n=null==(t=i.textEmbeddingModel)?void 0:t.call(i,r);if(null==n)throw new Vi.NoSuchModelError({modelId:e,modelType:"textEmbeddingModel"});return n}imageModel(e){var t;const[o,r]=this.splitId(e,"imageModel"),i=this.getProvider(o,"imageModel"),n=null==(t=i.imageModel)?void 0:t.call(i,r);if(null==n)throw new Vi.NoSuchModelError({modelId:e,modelType:"imageModel"});return n}transcriptionModel(e){var t;const[o,r]=this.splitId(e,"transcriptionModel"),i=this.getProvider(o,"transcriptionModel"),n=null==(t=i.transcriptionModel)?void 0:t.call(i,r);if(null==n)throw new Vi.NoSuchModelError({modelId:e,modelType:"transcriptionModel"});return n}speechModel(e){var t;const[o,r]=this.splitId(e,"speechModel"),i=this.getProvider(o,"speechModel"),n=null==(t=i.speechModel)?void 0:t.call(i,r);if(null==n)throw new Vi.NoSuchModelError({modelId:e,modelType:"speechModel"});return n}},Bi=o(94192),Ui=o(10292),zi=class extends Ui.AISDKError{constructor(e){super({name:"AI_NoTranscriptGeneratedError",message:"No transcript generated."}),this.responses=e.responses}};async function Yi({model:e,audio:t,providerOptions:o={},maxRetries:r,abortSignal:n,headers:s}){if("v2"!==e.specificationVersion)throw new Re({version:e.specificationVersion,provider:e.provider,modelId:e.modelId});const{retry:a}=vo({maxRetries:r,abortSignal:n}),l=(0,Bi.withUserAgentSuffix)(null!=s?s:{},`ai/${ut}`),p=t instanceof i?(await ct({url:t})).data:function(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)try{return(0,ft.convertBase64ToUint8Array)(e)}catch(t){throw new Pe({message:"Invalid data content. Content string is not a base64-encoded media.",content:e,cause:t})}if(e instanceof ArrayBuffer)return new Uint8Array(e);throw new Pe({content:e})}(t),u=await a((()=>{var t;return e.doGenerate({audio:p,abortSignal:n,headers:l,providerOptions:o,mediaType:null!=(t=lt({data:p,signatures:st}))?t:"audio/wav"})}));if(R(u.warnings),!u.text)throw new zi({responses:[u.response]});return new qi({text:u.text,segments:u.segments,language:u.language,durationInSeconds:u.durationInSeconds,warnings:u.warnings,responses:[u.response],providerMetadata:u.providerMetadata})}var qi=class{constructor(e){var t;this.text=e.text,this.segments=e.segments,this.language=e.language,this.durationInSeconds=e.durationInSeconds,this.warnings=e.warnings,this.responses=e.responses,this.providerMetadata=null!=(t=e.providerMetadata)?t:{}}},Ki=o(94192),$i=()=>fetch;async function Zi({api:e,prompt:t,credentials:o,headers:r,body:i,streamProtocol:n="data",setCompletion:s,setLoading:a,setError:l,setAbortController:p,onFinish:u,onError:c,fetch:d=$i()}){var h;try{a(!0),l(void 0);const c=new AbortController;p(c),s("");const f=await d(e,{method:"POST",body:JSON.stringify({prompt:t,...i}),credentials:o,headers:(0,Ki.withUserAgentSuffix)({"Content-Type":"application/json",...r},`ai-sdk/${ut}`,(0,Ki.getRuntimeEnvironmentUserAgent)()),signal:c.signal}).catch((e=>{throw e}));if(!f.ok)throw new Error(null!=(h=await f.text())?h:"Failed to fetch the chat response.");if(!f.body)throw new Error("The response body is empty.");let g="";switch(n){case"text":await async function({stream:e,onTextPart:t}){const o=e.pipeThrough(new TextDecoderStream).getReader();for(;;){const{done:e,value:r}=await o.read();if(e)break;await t(r)}}({stream:f.body,onTextPart:e=>{g+=e,s(g)}});break;case"data":await yr({stream:(0,Ki.parseJsonEventStream)({stream:f.body,schema:Qo}).pipeThrough(new TransformStream({async transform(e){if(!e.success)throw e.error;const t=e.value;if("text-delta"===t.type)g+=t.delta,s(g);else if("error"===t.type)throw new Error(t.errorText)}})),onError:e=>{throw e}});break;default:throw new Error(`Unknown stream protocol: ${n}`)}return u&&u(t,g),p(null),g}catch(e){if("AbortError"===e.name)return p(null),null;e instanceof Error&&c&&c(e),l(e)}finally{a(!1)}}var Ji=o(94192);async function Qi(e){if(null==e)return[];if(!(globalThis.FileList&&e instanceof globalThis.FileList))throw new Error("FileList is not supported in the current environment");return Promise.all(Array.from(e).map((async e=>{const{name:t,type:o}=e;return{type:"file",mediaType:o,filename:t,url:await new Promise(((t,o)=>{const r=new FileReader;r.onload=e=>{var o;t(null==(o=e.target)?void 0:o.result)},r.onerror=e=>o(e),r.readAsDataURL(e)}))}})))}var Xi=o(94192),en=o(94192),tn=class{constructor({api:e="/api/chat",credentials:t,headers:o,body:r,fetch:i,prepareSendMessagesRequest:n,prepareReconnectToStreamRequest:s}){this.api=e,this.credentials=t,this.headers=o,this.body=r,this.fetch=i,this.prepareSendMessagesRequest=n,this.prepareReconnectToStreamRequest=s}async sendMessages({abortSignal:e,...t}){var o,r,i,n,s;const a=await(0,en.resolve)(this.body),l=await(0,en.resolve)(this.headers),p=await(0,en.resolve)(this.credentials),u={...(0,en.normalizeHeaders)(l),...(0,en.normalizeHeaders)(t.headers)},c=await(null==(o=this.prepareSendMessagesRequest)?void 0:o.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...a,...t.body},headers:u,credentials:p,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId})),d=null!=(r=null==c?void 0:c.api)?r:this.api,h=void 0!==(null==c?void 0:c.headers)?(0,en.normalizeHeaders)(c.headers):u,f=void 0!==(null==c?void 0:c.body)?c.body:{...a,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId},g=null!=(i=null==c?void 0:c.credentials)?i:p,m=null!=(n=this.fetch)?n:globalThis.fetch,y=await m(d,{method:"POST",headers:(0,en.withUserAgentSuffix)({"Content-Type":"application/json",...h},`ai-sdk/${ut}`,(0,en.getRuntimeEnvironmentUserAgent)()),body:JSON.stringify(f),credentials:g,signal:e});if(!y.ok)throw new Error(null!=(s=await y.text())?s:"Failed to fetch the chat response.");if(!y.body)throw new Error("The response body is empty.");return this.processResponseStream(y.body)}async reconnectToStream(e){var t,o,r,i,n;const s=await(0,en.resolve)(this.body),a=await(0,en.resolve)(this.headers),l=await(0,en.resolve)(this.credentials),p={...(0,en.normalizeHeaders)(a),...(0,en.normalizeHeaders)(e.headers)},u=await(null==(t=this.prepareReconnectToStreamRequest)?void 0:t.call(this,{api:this.api,id:e.chatId,body:{...s,...e.body},headers:p,credentials:l,requestMetadata:e.metadata})),c=null!=(o=null==u?void 0:u.api)?o:`${this.api}/${e.chatId}/stream`,d=void 0!==(null==u?void 0:u.headers)?(0,en.normalizeHeaders)(u.headers):p,h=null!=(r=null==u?void 0:u.credentials)?r:l,f=null!=(i=this.fetch)?i:globalThis.fetch,g=await f(c,{method:"GET",headers:(0,en.withUserAgentSuffix)(d,`ai-sdk/${ut}`,(0,en.getRuntimeEnvironmentUserAgent)()),credentials:h});if(204===g.status)return null;if(!g.ok)throw new Error(null!=(n=await g.text())?n:"Failed to fetch the chat response.");if(!g.body)throw new Error("The response body is empty.");return this.processResponseStream(g.body)}},on=class extends tn{constructor(e={}){super(e)}processResponseStream(e){return(0,Xi.parseJsonEventStream)({stream:e,schema:Qo}).pipeThrough(new TransformStream({async transform(e,t){if(!e.success)throw e.error;t.enqueue(e.value)}}))}},rn=class{constructor({generateId:e=Ji.generateId,id:t=e(),transport:o=new on,messageMetadataSchema:r,dataPartSchemas:i,state:n,onError:s,onToolCall:a,onFinish:l,onData:p,sendAutomaticallyWhen:u}){this.activeResponse=void 0,this.jobExecutor=new ii,this.sendMessage=async(e,t)=>{var o,r,i,n;if(null==e)return void await this.makeRequest({trigger:"submit-message",messageId:null==(o=this.lastMessage)?void 0:o.id,...t});let s;if(s="text"in e||"files"in e?{parts:[...Array.isArray(e.files)?e.files:await Qi(e.files),..."text"in e&&null!=e.text?[{type:"text",text:e.text}]:[]]}:e,null!=e.messageId){const t=this.state.messages.findIndex((t=>t.id===e.messageId));if(-1===t)throw new Error(`message with id ${e.messageId} not found`);if("user"!==this.state.messages[t].role)throw new Error(`message with id ${e.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,t+1),this.state.replaceMessage(t,{...s,id:e.messageId,role:null!=(r=s.role)?r:"user",metadata:e.metadata})}else this.state.pushMessage({...s,id:null!=(i=s.id)?i:this.generateId(),role:null!=(n=s.role)?n:"user",metadata:e.metadata});await this.makeRequest({trigger:"submit-message",messageId:e.messageId,...t})},this.regenerate=async({messageId:e,...t}={})=>{const o=null==e?this.state.messages.length-1:this.state.messages.findIndex((t=>t.id===e));if(-1===o)throw new Error(`message ${e} not found`);this.state.messages=this.state.messages.slice(0,"assistant"===this.messages[o].role?o:o+1),await this.makeRequest({trigger:"regenerate-message",messageId:e,...t})},this.resumeStream=async(e={})=>{await this.makeRequest({trigger:"resume-stream",...e})},this.clearError=()=>{"error"===this.status&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolOutput=async({state:e="output-available",tool:t,toolCallId:o,output:r,errorText:i})=>this.jobExecutor.run((async()=>{var t,n;const s=this.state.messages,a=s[s.length-1];this.state.replaceMessage(s.length-1,{...a,parts:a.parts.map((t=>pr(t)&&t.toolCallId===o?{...t,state:e,output:r,errorText:i}:t))}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map((t=>pr(t)&&t.toolCallId===o?{...t,state:e,output:r,errorText:i}:t))),"streaming"!==this.status&&"submitted"!==this.status&&(null==(t=this.sendAutomaticallyWhen)?void 0:t.call(this,{messages:this.state.messages}))&&this.makeRequest({trigger:"submit-message",messageId:null==(n=this.lastMessage)?void 0:n.id})})),this.addToolResult=this.addToolOutput,this.stop=async()=>{var e;"streaming"!==this.status&&"submitted"!==this.status||(null==(e=this.activeResponse)?void 0:e.abortController)&&this.activeResponse.abortController.abort()},this.id=t,this.transport=o,this.generateId=e,this.messageMetadataSchema=r,this.dataPartSchemas=i,this.state=n,this.onError=s,this.onToolCall=a,this.onFinish=l,this.onData=p,this.sendAutomaticallyWhen=u}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async makeRequest({trigger:e,metadata:t,headers:o,body:r,messageId:i}){var n,s,a,l;this.setStatus({status:"submitted",error:void 0});const p=this.lastMessage;let u=!1,c=!1,d=!1;try{const n={state:dr({lastMessage:this.state.snapshot(p),messageId:this.generateId()}),abortController:new AbortController};let s;if(n.abortController.signal.addEventListener("abort",(()=>{u=!0})),this.activeResponse=n,"resume-stream"===e){const e=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:o,body:r});if(null==e)return void this.setStatus({status:"ready"});s=e}else s=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:n.abortController.signal,metadata:t,headers:o,body:r,trigger:e,messageId:i});const a=e=>this.jobExecutor.run((()=>e({state:n.state,write:()=>{var e;this.setStatus({status:"streaming"}),n.state.message.id===(null==(e=this.lastMessage)?void 0:e.id)?this.state.replaceMessage(this.state.messages.length-1,n.state.message):this.state.pushMessage(n.state.message)}})));await yr({stream:hr({stream:s,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:a,onError:e=>{throw e}}),onError:e=>{throw e}}),this.setStatus({status:"ready"})}catch(e){if(u||"AbortError"===e.name)return u=!0,this.setStatus({status:"ready"}),null;d=!0,e instanceof TypeError&&(e.message.toLowerCase().includes("fetch")||e.message.toLowerCase().includes("network"))&&(c=!0),this.onError&&e instanceof Error&&this.onError(e),this.setStatus({status:"error",error:e})}finally{try{null==(s=this.onFinish)||s.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:u,isDisconnect:c,isError:d,finishReason:null==(n=this.activeResponse)?void 0:n.state.finishReason})}catch(e){console.error(e)}this.activeResponse=void 0}(null==(a=this.sendAutomaticallyWhen)?void 0:a.call(this,{messages:this.state.messages}))&&!d&&await this.makeRequest({trigger:"submit-message",messageId:null==(l=this.lastMessage)?void 0:l.id,metadata:t,headers:o,body:r})}};function nn({messages:e}){const t=e[e.length-1];if(!t)return!1;if("assistant"!==t.role)return!1;const o=t.parts.reduce(((e,t,o)=>"step-start"===t.type?o:e),-1),r=t.parts.slice(o+1).filter(pr).filter((e=>!e.providerExecuted));return r.length>0&&r.every((e=>"output-available"===e.state||"output-error"===e.state))}var sn=class extends tn{constructor(e={}){super(e)}processResponseStream(e){return function({stream:e}){return e.pipeThrough(new TransformStream({start(e){e.enqueue({type:"start"}),e.enqueue({type:"start-step"}),e.enqueue({type:"text-start",id:"text-1"})},async transform(e,t){t.enqueue({type:"text-delta",id:"text-1",delta:e})},async flush(e){e.enqueue({type:"text-end",id:"text-1"}),e.enqueue({type:"finish-step"}),e.enqueue({type:"finish"})}}))}({stream:e.pipeThrough(new TextDecoderStream)})}},an=o(10292),ln=o(94192),pn=o(19844),un=(0,ln.lazyValidator)((()=>(0,ln.zodSchema)(pn.z.array(pn.z.object({id:pn.z.string(),role:pn.z.enum(["system","user","assistant"]),metadata:pn.z.unknown().optional(),parts:pn.z.array(pn.z.union([pn.z.object({type:pn.z.literal("text"),text:pn.z.string(),state:pn.z.enum(["streaming","done"]).optional(),providerMetadata:Pt.optional()}),pn.z.object({type:pn.z.literal("reasoning"),text:pn.z.string(),state:pn.z.enum(["streaming","done"]).optional(),providerMetadata:Pt.optional()}),pn.z.object({type:pn.z.literal("source-url"),sourceId:pn.z.string(),url:pn.z.string(),title:pn.z.string().optional(),providerMetadata:Pt.optional()}),pn.z.object({type:pn.z.literal("source-document"),sourceId:pn.z.string(),mediaType:pn.z.string(),title:pn.z.string(),filename:pn.z.string().optional(),providerMetadata:Pt.optional()}),pn.z.object({type:pn.z.literal("file"),mediaType:pn.z.string(),filename:pn.z.string().optional(),url:pn.z.string(),providerMetadata:Pt.optional()}),pn.z.object({type:pn.z.literal("step-start")}),pn.z.object({type:pn.z.string().startsWith("data-"),id:pn.z.string().optional(),data:pn.z.unknown()}),pn.z.object({type:pn.z.literal("dynamic-tool"),toolName:pn.z.string(),toolCallId:pn.z.string(),state:pn.z.literal("input-streaming"),input:pn.z.unknown().optional(),providerExecuted:pn.z.boolean().optional(),output:pn.z.never().optional(),errorText:pn.z.never().optional()}),pn.z.object({type:pn.z.literal("dynamic-tool"),toolName:pn.z.string(),toolCallId:pn.z.string(),state:pn.z.literal("input-available"),input:pn.z.unknown(),providerExecuted:pn.z.boolean().optional(),output:pn.z.never().optional(),errorText:pn.z.never().optional(),callProviderMetadata:Pt.optional()}),pn.z.object({type:pn.z.literal("dynamic-tool"),toolName:pn.z.string(),toolCallId:pn.z.string(),state:pn.z.literal("output-available"),input:pn.z.unknown(),providerExecuted:pn.z.boolean().optional(),output:pn.z.unknown(),errorText:pn.z.never().optional(),callProviderMetadata:Pt.optional(),preliminary:pn.z.boolean().optional()}),pn.z.object({type:pn.z.literal("dynamic-tool"),toolName:pn.z.string(),toolCallId:pn.z.string(),state:pn.z.literal("output-error"),input:pn.z.unknown(),providerExecuted:pn.z.boolean().optional(),output:pn.z.never().optional(),errorText:pn.z.string(),callProviderMetadata:Pt.optional()}),pn.z.object({type:pn.z.string().startsWith("tool-"),toolCallId:pn.z.string(),state:pn.z.literal("input-streaming"),providerExecuted:pn.z.boolean().optional(),input:pn.z.unknown().optional(),output:pn.z.never().optional(),errorText:pn.z.never().optional(),approval:pn.z.never().optional()}),pn.z.object({type:pn.z.string().startsWith("tool-"),toolCallId:pn.z.string(),state:pn.z.literal("input-available"),providerExecuted:pn.z.boolean().optional(),input:pn.z.unknown(),output:pn.z.never().optional(),errorText:pn.z.never().optional(),callProviderMetadata:Pt.optional(),approval:pn.z.never().optional()}),pn.z.object({type:pn.z.string().startsWith("tool-"),toolCallId:pn.z.string(),state:pn.z.literal("approval-requested"),input:pn.z.unknown(),providerExecuted:pn.z.boolean().optional(),output:pn.z.never().optional(),errorText:pn.z.never().optional(),callProviderMetadata:Pt.optional(),approval:pn.z.object({id:pn.z.string(),approved:pn.z.never().optional(),reason:pn.z.never().optional()})}),pn.z.object({type:pn.z.string().startsWith("tool-"),toolCallId:pn.z.string(),state:pn.z.literal("approval-responded"),input:pn.z.unknown(),providerExecuted:pn.z.boolean().optional(),output:pn.z.never().optional(),errorText:pn.z.never().optional(),callProviderMetadata:Pt.optional(),approval:pn.z.object({id:pn.z.string(),approved:pn.z.boolean(),reason:pn.z.string().optional()})}),pn.z.object({type:pn.z.string().startsWith("tool-"),toolCallId:pn.z.string(),state:pn.z.literal("output-available"),providerExecuted:pn.z.boolean().optional(),input:pn.z.unknown(),output:pn.z.unknown(),errorText:pn.z.never().optional(),callProviderMetadata:Pt.optional(),preliminary:pn.z.boolean().optional(),approval:pn.z.object({id:pn.z.string(),approved:pn.z.literal(!0),reason:pn.z.string().optional()}).optional()}),pn.z.object({type:pn.z.string().startsWith("tool-"),toolCallId:pn.z.string(),state:pn.z.literal("output-error"),providerExecuted:pn.z.boolean().optional(),input:pn.z.unknown(),output:pn.z.never().optional(),errorText:pn.z.string(),callProviderMetadata:Pt.optional(),approval:pn.z.object({id:pn.z.string(),approved:pn.z.literal(!0),reason:pn.z.string().optional()}).optional()}),pn.z.object({type:pn.z.string().startsWith("tool-"),toolCallId:pn.z.string(),state:pn.z.literal("output-denied"),providerExecuted:pn.z.boolean().optional(),input:pn.z.unknown(),output:pn.z.never().optional(),errorText:pn.z.never().optional(),callProviderMetadata:Pt.optional(),approval:pn.z.object({id:pn.z.string(),approved:pn.z.literal(!1),reason:pn.z.string().optional()})})])).nonempty("Message must contain at least one part")})).nonempty("Messages array must not be empty"))));async function cn({messages:e,metadataSchema:t,dataSchemas:o,tools:r}){try{if(null==e)return{success:!1,error:new x({parameter:"messages",value:e,message:"messages parameter must be provided"})};const i=await(0,ln.validateTypes)({value:e,schema:un});if(t)for(const e of i)await(0,ln.validateTypes)({value:e.metadata,schema:t});if(o)for(const e of i){const t=e.parts.filter((e=>e.type.startsWith("data-")));for(const e of t){const t=e.type.slice(5),r=o[t];if(!r)return{success:!1,error:new an.TypeValidationError({value:e.data,cause:`No data schema found for data part ${t}`})};await(0,ln.validateTypes)({value:e.data,schema:r})}}if(r)for(const e of i){const t=e.parts.filter((e=>e.type.startsWith("tool-")));for(const e of t){const t=e.type.slice(5),o=r[t];if(!o)return{success:!1,error:new an.TypeValidationError({value:e.input,cause:`No tool schema found for tool part ${t}`})};"input-available"!==e.state&&"output-available"!==e.state&&"output-error"!==e.state||await(0,ln.validateTypes)({value:e.input,schema:o.inputSchema}),"output-available"===e.state&&o.outputSchema&&await(0,ln.validateTypes)({value:e.output,schema:o.outputSchema})}}return{success:!0,data:i}}catch(e){return{success:!1,error:e}}}async function dn({messages:e,metadataSchema:t,dataSchemas:o,tools:r}){const i=await cn({messages:e,metadataSchema:t,dataSchemas:o,tools:r});if(!i.success)throw i.error;return i.data}var hn=o(94192);function fn({execute:e,onError:t=hn.getErrorMessage,originalMessages:o,onFinish:r,generateId:i=hn.generateId}){let n;const s=[],a=new ReadableStream({start(e){n=e}});function l(e){try{n.enqueue(e)}catch(e){}}try{const o=e({writer:{write(e){l(e)},merge(e){s.push((async()=>{const t=e.getReader();for(;;){const{done:e,value:o}=await t.read();if(e)break;l(o)}})().catch((e=>{l({type:"error",errorText:t(e)})})))},onError:t}});o&&s.push(o.catch((e=>{l({type:"error",errorText:t(e)})})))}catch(e){l({type:"error",errorText:t(e)})}return new Promise((async e=>{for(;s.length>0;)await s.shift();e()})).finally((()=>{try{n.close()}catch(e){}})),fr({stream:a,messageId:i(),originalMessages:o,onFinish:r,onError:t})}function gn({message:e,stream:t,onError:o,terminateOnError:r=!1}){var i;let n,s=!1;const a=new ReadableStream({start(e){n=e}}),l=dr({messageId:null!=(i=null==e?void 0:e.id)?i:"",lastMessage:e}),p=e=>{null==o||o(e),!s&&r&&(s=!0,null==n||n.error(e))};return yr({stream:hr({stream:t,runUpdateMessageJob:e=>e({state:l,write:()=>{null==n||n.enqueue(structuredClone(l.message))}}),onError:p}),onError:p}).finally((()=>{s||null==n||n.close()})),mr(a)}},7760:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(83423);t.simpleHttpRequest=function(e){return new r.Promise((function(t){var o=new XMLHttpRequest;o.open("GET",e.url),o.send(),o.onreadystatechange=function(){if(4==o.readyState&&200==o.status){var e=JSON.parse(o.responseText);t(e)}}}))}},7897:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},n=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(44081),a=o(37132),l=o(814),p=o(69734),u=o(72948),c=o(26016),d=o(72493),h=o(99770),f=o(83423),g=function(){function e(){}return e.prototype.setBeans=function(e){this.logger=e.create("ColumnFactory")},e.prototype.createColumnTree=function(e,t,o){var r=new p.ColumnKeyCreator;if(o){var i=o.map((function(e){return e.getId()}));r.addExistingKeys(i)}var n=o?o.slice():null,s=this.recursivelyCreateColumns(e,0,t,n,r,null),a=this.findMaxDept(s,0);this.logger.log("Number of levels for grouped columns is "+a);var l=this.balanceColumnTree(s,0,a,r);return this.columnUtils.depthFirstOriginalTreeSearch(null,l,(function(e,t){e instanceof u.OriginalColumnGroup&&e.setupExpandable(),e.setOriginalParent(t)})),{columnTree:l,treeDept:a}},e.prototype.createForAutoGroups=function(e,t){var o=this,r=[];return e.forEach((function(e){var i=o.createAutoGroupTreeItem(t,e);r.push(i)})),r},e.prototype.createAutoGroupTreeItem=function(e,t){for(var o=t,r=this.findDepth(e)-1;r>=0;r--){var i=new u.OriginalColumnGroup(null,"FAKE_PATH_"+t.getId()+"}_"+r,!0,r);this.context.wireBean(i),i.setChildren([o]),o.setOriginalParent(i),o=i}return o},e.prototype.findDepth=function(e){for(var t=0,o=e;o&&o[0]&&o[0]instanceof u.OriginalColumnGroup;)t++,o=o[0].getChildren();return t},e.prototype.balanceColumnTree=function(e,t,o,r){for(var i=[],n=0;n<e.length;n++){var s=e[n];if(s instanceof u.OriginalColumnGroup){var a=s,l=this.balanceColumnTree(a.getChildren(),t+1,o,r);a.setChildren(l),i.push(a)}else{for(var p=void 0,c=void 0,d=o-1;d>=t;d--){var h=r.getUniqueKey(null,null),f=this.createMergedColGroupDef(null),g=new u.OriginalColumnGroup(f,h,!0,t);this.context.wireBean(g),c&&c.setChildren([g]),c=g,p||(p=c)}if(p){i.push(p);var m=e.some((function(e){return e instanceof u.OriginalColumnGroup}));if(m){c.setChildren([s]);continue}c.setChildren(e);break}i.push(s)}}return i},e.prototype.findMaxDept=function(e,t){for(var o=t,r=0;r<e.length;r++){var i=e[r];if(i instanceof u.OriginalColumnGroup){var n=i,s=this.findMaxDept(n.getChildren(),t+1);o<s&&(o=s)}}return o},e.prototype.recursivelyCreateColumns=function(e,t,o,r,i,n){var s=this,a=[];return e?(e.forEach((function(e){var l;l=s.isColumnGroup(e)?s.createColumnGroup(o,e,t,r,i,n):s.createColumn(o,e,r,i,n),a.push(l)})),a):a},e.prototype.createColumnGroup=function(e,t,o,r,i,n){var s=this.createMergedColGroupDef(t),a=i.getUniqueKey(s.groupId,null),l=new u.OriginalColumnGroup(s,a,!1,o);this.context.wireBean(l);var p=this.recursivelyCreateColumns(s.children,o+1,e,r,i,l);return l.setChildren(p),l},e.prototype.createMergedColGroupDef=function(e){var t={};return f._.assign(t,this.gridOptionsWrapper.getDefaultColGroupDef()),f._.assign(t,e),this.checkForDeprecatedItems(t),t},e.prototype.createColumn=function(e,t,o,r,i){var n=this.mergeColDefs(t);this.checkForDeprecatedItems(n);var s=this.findExistingColumn(t,o);if(s)s.setColDef(n,t);else{var a=r.getUniqueKey(n.colId,n.field);s=new c.Column(n,t,a,e),this.context.wireBean(s)}return s},e.prototype.findExistingColumn=function(e,t){var o=f._.find(t,(function(t){var o=t.getUserProvidedColDef();return!(!o||o!==e&&(null===o.colId||void 0===o.colId||o.colId!==e.colId))}));return o&&f._.removeFromArray(t,o),o},e.prototype.mergeColDefs=function(e){var t={};return f._.assign(t,this.gridOptionsWrapper.getDefaultColDef()),e.type&&this.assignColumnTypes(e,t),f._.assign(t,e),t},e.prototype.assignColumnTypes=function(e,t){var o;if(e.type instanceof Array)e.type.some((function(e){return"string"!=typeof e}))?console.warn("ag-grid: if colDef.type is supplied an array it should be of type 'string[]'"):o=e.type;else{if("string"!=typeof e.type)return void console.warn("ag-grid: colDef.type should be of type 'string' | 'string[]'");o=e.type.split(",")}var r=f._.assign({},this.gridOptionsWrapper.getColumnTypes(),h.DefaultColumnTypes);o.forEach((function(e){var o=r[e.trim()];o?f._.assign(t,o):console.warn("ag-grid: colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes")}))},e.prototype.checkForDeprecatedItems=function(e){if(e){var t=e;void 0!==t.group&&console.warn("ag-grid: colDef.group is invalid, please check documentation on how to do grouping as it changed in version 3"),void 0!==t.headerGroup&&console.warn("ag-grid: colDef.headerGroup is invalid, please check documentation on how to do grouping as it changed in version 3"),void 0!==t.headerGroupShow&&console.warn("ag-grid: colDef.headerGroupShow is invalid, should be columnGroupShow, please check documentation on how to do grouping as it changed in version 3"),void 0!==t.suppressRowGroup&&console.warn("ag-grid: colDef.suppressRowGroup is deprecated, please use colDef.type instead"),void 0!==t.suppressAggregation&&console.warn("ag-grid: colDef.suppressAggregation is deprecated, please use colDef.type instead"),(t.suppressRowGroup||t.suppressAggregation)&&console.warn("ag-grid: colDef.suppressAggregation and colDef.suppressRowGroup are deprecated, use allowRowGroup, allowPivot and allowValue instead"),t.displayName&&(console.warn("ag-grid: Found displayName "+t.displayName+", please use headerName instead, displayName is deprecated."),t.headerName=t.displayName)}},e.prototype.isColumnGroup=function(e){return void 0!==e.children},r([d.Autowired("gridOptionsWrapper"),i("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([d.Autowired("columnUtils"),i("design:type",l.ColumnUtils)],e.prototype,"columnUtils",void 0),r([d.Autowired("context"),i("design:type",d.Context)],e.prototype,"context",void 0),r([n(0,d.Qualifier("loggerFactory")),i("design:type",Function),i("design:paramtypes",[a.LoggerFactory]),i("design:returntype",void 0)],e.prototype,"setBeans",null),r([d.Bean("columnFactory")],e)}();t.ColumnFactory=g},8534:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(60843),s=o(44081),a=o(72493),l=o(83423),p=function(){function e(){this.destroyFunctions=[],this.destroyed=!1}return e.prototype.getContext=function(){return this.context},e.prototype.destroy=function(){this.destroyFunctions.forEach((function(e){return e()})),this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchEvent({type:e.EVENT_DESTROYED})},e.prototype.addEventListener=function(e,t){this.localEventService||(this.localEventService=new n.EventService),this.localEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.localEventService&&this.localEventService.removeEventListener(e,t)},e.prototype.dispatchEventAsync=function(e){var t=this;window.setTimeout((function(){return t.dispatchEvent(e)}),0)},e.prototype.dispatchEvent=function(e){this.localEventService&&this.localEventService.dispatchEvent(e)},e.prototype.addDestroyableEventListener=function(e,t,o,r){this.destroyed||(e instanceof HTMLElement?l._.addSafePassiveEventListener(e,t,o,r):(e instanceof Window||s.GridOptionsWrapper,e.addEventListener(t,o)),this.destroyFunctions.push((function(){e instanceof HTMLElement||e instanceof Window||s.GridOptionsWrapper,e.removeEventListener(t,o)})))},e.prototype.isAlive=function(){return!this.destroyed},e.prototype.addDestroyFunc=function(e){this.isAlive()?this.destroyFunctions.push(e):e()},e.EVENT_DESTROYED="destroyed",r([a.Autowired("context"),i("design:type",a.Context)],e.prototype,"context",void 0),r([a.PreDestroy,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"destroy",null),e}();t.BeanStub=p},8894:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(34782),a=o(45727),l=o(1571),p=o(41451),u=o(42195),c=o(69065),d=o(98239),h=o(44081),f=o(83423),g=function(){function e(){this.timeLastPageEventProcessed=0}return e.prototype.init=function(){this.scrollWidth=this.gridOptionsWrapper.getScrollbarWidth()},e.prototype.registerGridComp=function(e){this.gridPanel=e},e.prototype.handlePageScrollingKey=function(e){var t=e.which||e.keyCode,o=e.altKey,r=e.ctrlKey,i=this.mouseEventService.getGridCellForEvent(e).getGridCellDef();if(!i)return!1;var n=!1;switch(t){case a.Constants.KEY_PAGE_HOME:case a.Constants.KEY_PAGE_END:r||o||(this.onHomeOrEndKey(t),n=!0);break;case a.Constants.KEY_LEFT:case a.Constants.KEY_RIGHT:r&&!o&&(this.onCtrlLeftOrRight(t,i),n=!0);break;case a.Constants.KEY_UP:case a.Constants.KEY_DOWN:r&&!o&&(this.onCtrlUpOrDown(t,i),n=!0);break;case a.Constants.KEY_PAGE_DOWN:r||o||(this.onPageDown(i),n=!0);break;case a.Constants.KEY_PAGE_UP:r||o||(this.onPageUp(i),n=!0)}return n&&e.preventDefault(),n},e.prototype.isTimeSinceLastPageEventToRecent=function(){return(new Date).getTime()-this.timeLastPageEventProcessed<100},e.prototype.setTimeLastPageEventProcessed=function(){this.timeLastPageEventProcessed=(new Date).getTime()},e.prototype.onPageDown=function(e){if(!this.isTimeSinceLastPageEventToRecent()){var t=this.gridPanel.getVScrollPosition(),o=t.bottom-t.top;this.gridPanel.isHorizontalScrollShowing()&&(o-=this.scrollWidth);var r=this.paginationProxy.getPixelOffset(),i=t.top+o,n=this.paginationProxy.getRowIndexAtPixel(i+r),s=this.paginationProxy.getRow(e.rowIndex).rowTop+o-r,a=this.paginationProxy.getRowIndexAtPixel(s+r),l=this.paginationProxy.getPageLastRow();a>l&&(a=l),n>l&&(n=l),this.navigateTo(n,"top",null,a,e.column),this.setTimeLastPageEventProcessed()}},e.prototype.onPageUp=function(e){if(!this.isTimeSinceLastPageEventToRecent()){var t=this.gridPanel.getVScrollPosition(),o=t.bottom-t.top;this.gridPanel.isHorizontalScrollShowing()&&(o-=this.scrollWidth);var r=this.paginationProxy.getPixelOffset(),i=t.top,n=this.paginationProxy.getRowIndexAtPixel(i+r),s=this.paginationProxy.getRow(e.rowIndex),a=s.rowTop+s.rowHeight-o-r,l=this.paginationProxy.getRowIndexAtPixel(a+r),p=this.paginationProxy.getPageFirstRow();l<p&&(l=p),n<p&&(n=p),this.navigateTo(n,"bottom",null,l,e.column),this.setTimeLastPageEventProcessed()}},e.prototype.navigateTo=function(e,t,o,r,i){if(f._.exists(o)&&this.gridPanel.ensureColumnVisible(o),f._.exists(e)&&this.gridPanel.ensureIndexVisible(e,t),this.animationFrameService.flushAllFrames(),this.focusedCellController.setFocusedCell(r,i,null,!0),this.rangeController){var n=new s.GridCell({rowIndex:r,floating:null,column:i});this.rangeController.setRangeToCell(n)}},e.prototype.onCtrlUpOrDown=function(e,t){var o=e===a.Constants.KEY_UP?0:this.paginationProxy.getPageLastRow();this.navigateTo(o,null,t.column,o,t.column)},e.prototype.onCtrlLeftOrRight=function(e,t){var o=e===a.Constants.KEY_LEFT,r=this.columnController.getAllDisplayedColumns(),i=o?r[0]:r[r.length-1];this.navigateTo(t.rowIndex,null,i,t.rowIndex,i)},e.prototype.onHomeOrEndKey=function(e){var t=e===a.Constants.KEY_PAGE_HOME,o=this.columnController.getAllDisplayedColumns(),r=t?o[0]:o[o.length-1],i=t?0:this.paginationProxy.getPageLastRow();this.navigateTo(i,null,r,i,r)},r([n.Autowired("mouseEventService"),i("design:type",l.MouseEventService)],e.prototype,"mouseEventService",void 0),r([n.Autowired("paginationProxy"),i("design:type",p.PaginationProxy)],e.prototype,"paginationProxy",void 0),r([n.Autowired("focusedCellController"),i("design:type",u.FocusedCellController)],e.prototype,"focusedCellController",void 0),r([n.Autowired("animationFrameService"),i("design:type",c.AnimationFrameService)],e.prototype,"animationFrameService",void 0),r([n.Optional("rangeController"),i("design:type",Object)],e.prototype,"rangeController",void 0),r([n.Autowired("columnController"),i("design:type",d.ColumnController)],e.prototype,"columnController",void 0),r([n.Autowired("gridOptionsWrapper"),i("design:type",h.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),r([n.Bean("navigationService")],e)}();t.NavigationService=g},9018:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),n=o(83423),s=[0,1996959894,-301047508,-1727442502,124634137,1886057615,-379345611,-1637575261,249268274,2044508324,-522852066,-1747789432,162941995,2125561021,-407360249,-1866523247,498536548,1789927666,-205950648,-2067906082,450548861,1843258603,-187386543,-2083289657,325883990,1684777152,-43845254,-1973040660,335633487,1661365465,-99664541,-1928851979,997073096,1281953886,-715111964,-1570279054,1006888145,1258607687,-770865667,-1526024853,901097722,1119000684,-608450090,-1396901568,853044451,1172266101,-589951537,-1412350631,651767980,1373503546,-925412992,-1076862698,565507253,1454621731,-809855591,-1195530993,671266974,1594198024,-972236366,-1324619484,795835527,1483230225,-1050600021,-1234817731,1994146192,31158534,-1731059524,-271249366,1907459465,112637215,-1614814043,-390540237,2013776290,251722036,-1777751922,-519137256,2137656763,141376813,-1855689577,-429695999,1802195444,476864866,-2056965928,-228458418,1812370925,453092731,-2113342271,-183516073,1706088902,314042704,-1950435094,-54949764,1658658271,366619977,-1932296973,-69972891,1303535960,984961486,-1547960204,-725929758,1256170817,1037604311,-1529756563,-740887301,1131014506,879679996,-1385723834,-631195440,1141124467,855842277,-1442165665,-586318647,1342533948,654459306,-1106571248,-921952122,1466479909,544179635,-1184443383,-832445281,1591671054,702138776,-1328506846,-942167884,1504918807,783551873,-1212326853,-1061524307,-306674912,-1698712650,62317068,1957810842,-355121351,-1647151185,81470997,1943803523,-480048366,-1805370492,225274430,2053790376,-468791541,-1828061283,167816743,2097651377,-267414716,-2029476910,503444072,1762050814,-144550051,-2140837941,426522225,1852507879,-19653770,-1982649376,282753626,1742555852,-105259153,-1900089351,397917763,1622183637,-690576408,-1580100738,953729732,1340076626,-776247311,-1497606297,1068828381,1219638859,-670225446,-1358292148,906185462,1090812512,-547295293,-1469587627,829329135,1181335161,-882789492,-1134132454,628085408,1382605366,-871598187,-1156888829,570562233,1426400815,-977650754,-1296233688,733239954,1555261956,-1026031705,-1244606671,752459403,1541320221,-1687895376,-328994266,1969922972,40735498,-1677130071,-351390145,1913087877,83908371,-1782625662,-491226604,2075208622,213261112,-1831694693,-438977011,2094854071,198958881,-2032938284,-237706686,1759359992,534414190,-2118248755,-155638181,1873836001,414664567,-2012718362,-15766928,1711684554,285281116,-1889165569,-127750551,1634467795,376229701,-1609899400,-686959890,1308918612,956543938,-1486412191,-799009033,1231636301,1047427035,-1362007478,-640263460,1088359270,936918e3,-1447252397,-558129467,1202900863,817233897,-1111625188,-893730166,1404277552,615818150,-1160759803,-841546093,1423857449,601450431,-1285129682,-1000256840,1567103746,711928724,-1274298825,-1022587231,1510334235,755167117],a=function(){function e(){var e=this;this.folders=[],this.files=[],this.addFolder=function(t){e.folders.push({path:t,created:new Date})}}return e.prototype.addFolders=function(e){e.forEach(this.addFolder)},e.prototype.addFile=function(e,t){this.files.push({path:e,created:new Date,content:t})},e.prototype.clearStream=function(){this.folders=[],this.files=[]},e.prototype.getContent=function(e){void 0===e&&(e="application/zip");var t=this.buildFileStream(),o=this.buildUint8Array(t);return this.clearStream(),new Blob([o],{type:e})},e.prototype.buildFileStream=function(e){void 0===e&&(e="");for(var t=this.folders.concat(this.files),o=t.length,r="",i=0,n=0,s=0,a=t;s<a.length;s++){var l=a[s],p=this.getHeader(l,i),u=p.fileHeader,c=p.folderHeader,d=p.content;i+=u.length+d.length,n+=c.length,e+=u+d,r+=c}return e+r+this.buildFolderEnd(o,n,i)},e.prototype.getHeader=function(e,t){var o=e.content,r=e.path,i=e.created,s=n._.utf8_encode,a=n._.decToHex,l=s(r),p=l!==r,u=this.convertTime(i),c=this.convertDate(i),d="";if(p){var h=a(1,1)+a(this.getFromCrc32Table(l),4)+l;d="up"+a(h.length,2)+h}var f="\n\0"+(p?"\0\b":"\0\0")+"\0\0"+a(u,2)+a(c,2)+a(o?this.getFromCrc32Table(o):0,4)+a(o?o.length:0,4)+a(o?o.length:0,4)+a(l.length,2)+a(d.length,2);return{fileHeader:"PK"+f+l+d,folderHeader:"PK\0"+f+"\0\0\0\0\0\0"+(o?"\0\0\0\0":"\0\0\0")+a(t,4)+l+d,content:o||""}},e.prototype.buildFolderEnd=function(e,t,o){var r=n._.decToHex;return"PK\0\0\0\0"+r(e,2)+r(e,2)+r(t,4)+r(o,4)+"\0\0"},e.prototype.buildUint8Array=function(e){for(var t=new Uint8Array(e.length),o=0;o<t.length;o++)t[o]=e.charCodeAt(o);return t},e.prototype.getFromCrc32Table=function(e,t){if(void 0===t&&(t=0),!e.length)return 0;t^=-1;for(var o=0,r=0;r<e.length;r++)o=e.charCodeAt(r),t=t>>>8^s[255&(t^o)];return~t},e.prototype.convertTime=function(e){var t=e.getHours();return t<<=6,t|=e.getMinutes(),(t<<=5)|e.getSeconds()/2},e.prototype.convertDate=function(e){var t=e.getFullYear()-1980;return t<<=4,t|=e.getMonth()+1,(t<<=5)|e.getDate()},r([i.Bean("zipContainer")],e)}();t.ZipContainer=a},10042:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var l=o(44081),p=o(40634),u=o(92427),c=o(24463),d=o(60843),h=o(19378),f=o(85786),g=o(45727),m=o(23054),y=o(72493),v=o(44871),C=o(98239),w=o(37132),E=o(42195),_=o(38427),b=o(34782),R=o(8534),S=o(41451),O=o(40797),T=o(50580),A=o(55090),P=o(69065),I=o(51755),x=o(83423),D=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rowCompsByIndex={},t.floatingTopRowComps=[],t.floatingBottomRowComps=[],t.refreshInProgress=!1,t}return i(t,e),t.prototype.registerGridCore=function(e){this.gridCore=e},t.prototype.agWire=function(e){this.logger=e.create("RowRenderer")},t.prototype.registerGridComp=function(e){this.gridPanel=e,this.rowContainers=this.gridPanel.getRowContainers(),this.addDestroyableEventListener(this.eventService,f.Events.EVENT_PAGINATION_CHANGED,this.onPageLoaded.bind(this)),this.addDestroyableEventListener(this.eventService,f.Events.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addDestroyableEventListener(this.eventService,f.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addDestroyableEventListener(this.eventService,f.Events.EVENT_BODY_SCROLL,this.redrawAfterScroll.bind(this)),this.addDestroyableEventListener(this.eventService,f.Events.EVENT_BODY_HEIGHT_CHANGED,this.redrawAfterScroll.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,l.GridOptionsWrapper.PROP_DOM_LAYOUT,this.onDomLayoutChanged.bind(this)),this.printLayout=this.gridOptionsWrapper.getDomLayout()===g.Constants.DOM_LAYOUT_PRINT,this.embedFullWidthRows=this.printLayout||this.gridOptionsWrapper.isEmbedFullWidthRows(),this.redrawAfterModelUpdate()},t.prototype.onDomLayoutChanged=function(){var e=this.gridOptionsWrapper.getDomLayout()===g.Constants.DOM_LAYOUT_PRINT,t=e||this.gridOptionsWrapper.isEmbedFullWidthRows(),o=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,o&&this.redrawAfterModelUpdate()},t.prototype.datasourceChanged=function(){this.firstRenderedRow=0,this.lastRenderedRow=-1;var e=Object.keys(this.rowCompsByIndex);this.removeRowComps(e)},t.prototype.onPageLoaded=function(e){x._.missing(e)&&(e={type:f.Events.EVENT_MODEL_UPDATED,api:this.gridApi,columnApi:this.columnApi,animate:!1,keepRenderedRows:!1,newData:!1,newPage:!1}),this.onModelUpdated(e)},t.prototype.getAllCellsForColumn=function(e){var t=[];function o(o,r){var i=r.getCellForCol(e);i&&t.push(i)}return x._.iterateObject(this.rowCompsByIndex,o),x._.iterateObject(this.floatingBottomRowComps,o),x._.iterateObject(this.floatingTopRowComps,o),t},t.prototype.refreshFloatingRowComps=function(){this.refreshFloatingRows(this.floatingTopRowComps,this.pinnedRowModel.getPinnedTopRowData(),this.rowContainers.floatingTopPinnedLeft,this.rowContainers.floatingTopPinnedRight,this.rowContainers.floatingTop,this.rowContainers.floatingTopFullWidth),this.refreshFloatingRows(this.floatingBottomRowComps,this.pinnedRowModel.getPinnedBottomRowData(),this.rowContainers.floatingBottomPinnedLeft,this.rowContainers.floatingBottomPinnedRight,this.rowContainers.floatingBottom,this.rowContainers.floatingBottomFullWith)},t.prototype.refreshFloatingRows=function(e,t,o,r,i,n){var s=this;e.forEach((function(e){e.destroy()})),e.length=0,t&&t.forEach((function(t){var a=new h.RowComp(s.$scope,i,o,r,n,t,s.beans,!1,!1,s.printLayout,s.embedFullWidthRows);a.init(),e.push(a)})),this.flushContainers(e)},t.prototype.onPinnedRowDataChanged=function(){this.redrawAfterModelUpdate({recycleRows:!0})},t.prototype.onModelUpdated=function(e){var t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)},t.prototype.getRenderedIndexesForRowNodes=function(e){var t=[];return x._.missing(e)||x._.iterateObject(this.rowCompsByIndex,(function(o,r){var i=r.getRowNode();e.indexOf(i)>=0&&t.push(o)})),t},t.prototype.redrawRows=function(e){if(e&&0!=e.length){var t=this.getRenderedIndexesForRowNodes(e);this.removeRowComps(t),this.redrawAfterModelUpdate({recycleRows:!0})}},t.prototype.getCellToRestoreFocusToAfterRefresh=function(e){var t=e.suppressKeepFocus?null:this.focusedCellController.getFocusCellToUseAfterRefresh();if(x._.missing(t))return null;var o=document.activeElement,r=this.gridOptionsWrapper.getDomData(o,m.CellComp.DOM_DATA_KEY_CELL_COMP);return x._.missing(r)?null:t},t.prototype.redrawAfterModelUpdate=function(e){void 0===e&&(e={}),this.getLockOnRefresh();var t=this.getCellToRestoreFocusToAfterRefresh(e);this.sizeContainerToPageHeight(),this.scrollToTopIfNewData(e);var o=!this.printLayout&&e.recycleRows,r=e.animate&&this.gridOptionsWrapper.isAnimateRows(),i=this.binRowComps(o);this.redraw(i,r),e.onlyBody||this.refreshFloatingRowComps(),this.restoreFocusedCell(t),this.releaseLockOnRefresh()},t.prototype.scrollToTopIfNewData=function(e){var t=e.newData||e.newPage,o=this.gridOptionsWrapper.isSuppressScrollOnNewData();t&&!o&&this.gridPanel.scrollToTop()},t.prototype.sizeContainerToPageHeight=function(){var e=[this.rowContainers.body,this.rowContainers.fullWidth,this.rowContainers.pinnedLeft,this.rowContainers.pinnedRight];if(this.printLayout)e.forEach((function(e){return e.setHeight(null)}));else{var t=this.paginationProxy.getCurrentPageHeight();0===t&&(t=1),this.maxDivHeightScaler.setModelHeight(t);var o=this.maxDivHeightScaler.getUiContainerHeight();e.forEach((function(e){return e.setHeight(o)}))}},t.prototype.getLockOnRefresh=function(){if(this.refreshInProgress)throw new Error("ag-Grid: cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, eg instead of api.refreshView(), call setTimeout(function(){api.refreshView(),0}). To see what part of your code that caused the refresh check this stacktrace.");this.refreshInProgress=!0},t.prototype.releaseLockOnRefresh=function(){this.refreshInProgress=!1},t.prototype.restoreFocusedCell=function(e){e&&this.focusedCellController.setFocusedCell(e.rowIndex,e.column,e.floating,!0)},t.prototype.stopEditing=function(e){void 0===e&&(e=!1),this.forEachRowComp((function(t,o){o.stopEditing(e)}))},t.prototype.forEachCellComp=function(e){this.forEachRowComp((function(t,o){return o.forEachCellComp(e)}))},t.prototype.forEachRowComp=function(e){x._.iterateObject(this.rowCompsByIndex,e),x._.iterateObject(this.floatingTopRowComps,e),x._.iterateObject(this.floatingBottomRowComps,e)},t.prototype.addRenderedRowListener=function(e,t,o){var r=this.rowCompsByIndex[t];r&&r.addEventListener(e,o)},t.prototype.flashCells=function(e){void 0===e&&(e={}),this.forEachCellCompFiltered(e.rowNodes,e.columns,(function(e){return e.flashCell()}))},t.prototype.refreshCells=function(e){void 0===e&&(e={});var t={forceRefresh:e.force,newData:!1};this.forEachCellCompFiltered(e.rowNodes,e.columns,(function(e){return e.refreshCell(t)}))},t.prototype.getCellRendererInstances=function(e){var t=[];return this.forEachCellCompFiltered(e.rowNodes,e.columns,(function(e){var o=e.getCellRenderer();o&&t.push(o)})),t},t.prototype.getCellEditorInstances=function(e){var t=[];return this.forEachCellCompFiltered(e.rowNodes,e.columns,(function(e){var o=e.getCellEditor();o&&t.push(o)})),t},t.prototype.getEditingCells=function(){var e=[];return this.forEachCellComp((function(t){if(t.isEditing()){var o=t.getGridCell().getGridCellDef();e.push(o)}})),e},t.prototype.forEachCellCompFiltered=function(e,t,o){var r,i,n=this;x._.exists(e)&&(r={top:{},bottom:{},normal:{}},e.forEach((function(e){e.rowPinned===g.Constants.PINNED_TOP?r.top[e.id]=!0:e.rowPinned===g.Constants.PINNED_BOTTOM?r.bottom[e.id]=!0:r.normal[e.id]=!0}))),x._.exists(t)&&(i={},t.forEach((function(e){var t=n.columnController.getGridColumn(e);x._.exists(t)&&(i[t.getId()]=!0)})));var s=function(e){var t=e.getRowNode(),n=t.id,s=t.rowPinned;if(x._.exists(r))if(s===g.Constants.PINNED_BOTTOM){if(!r.bottom[n])return}else if(s===g.Constants.PINNED_TOP){if(!r.top[n])return}else if(!r.normal[n])return;e.forEachCellComp((function(e){var t=e.getColumn().getId();i&&!i[t]||o(e)}))};x._.iterateObject(this.rowCompsByIndex,(function(e,t){s(t)})),this.floatingTopRowComps&&this.floatingTopRowComps.forEach(s),this.floatingBottomRowComps&&this.floatingBottomRowComps.forEach(s)},t.prototype.destroy=function(){e.prototype.destroy.call(this);var t=Object.keys(this.rowCompsByIndex);this.removeRowComps(t)},t.prototype.binRowComps=function(e){var t,o=this,r={};return e?(t=[],x._.iterateObject(this.rowCompsByIndex,(function(e,i){var n=i.getRowNode();x._.exists(n.id)?(r[n.id]=i,delete o.rowCompsByIndex[e]):t.push(e)}))):t=Object.keys(this.rowCompsByIndex),this.removeRowComps(t),r},t.prototype.removeRowComps=function(e){var t=this;e.forEach((function(e){t.rowCompsByIndex[e].destroy(),delete t.rowCompsByIndex[e]}))},t.prototype.redrawAfterScroll=function(){this.getLockOnRefresh(),this.redraw(null,!1,!0),this.releaseLockOnRefresh()},t.prototype.removeRowCompsNotToDraw=function(e){var t={};e.forEach((function(e){return t[e]=!0}));var o=Object.keys(this.rowCompsByIndex),r=x._.filter(o,(function(e){return!t[e]}));this.removeRowComps(r)},t.prototype.calculateIndexesToDraw=function(){var e=this,t=x._.createArrayOfNumbers(this.firstRenderedRow,this.lastRenderedRow);return x._.iterateObject(this.rowCompsByIndex,(function(o,r){var i=Number(o);(i<e.firstRenderedRow||i>e.lastRenderedRow)&&e.keepRowBecauseEditingOrFocused(r)&&t.push(i)})),t.sort((function(e,t){return e-t})),t},t.prototype.redraw=function(e,t,o){var r=this;void 0===t&&(t=!1),void 0===o&&(o=!1),this.maxDivHeightScaler.updateOffset(),this.workOutFirstAndLastRowsToRender();var i=this.calculateIndexesToDraw();this.removeRowCompsNotToDraw(i),this.printLayout&&(t=!1);var n=[],s=[];i.forEach((function(i){var a=r.createOrUpdateRowComp(i,e,t,o);x._.exists(a)&&(s.push(a),x._.pushAll(n,a.getAndClearNextVMTurnFunctions()))})),this.flushContainers(s),x._.executeNextVMTurn(n),!o||this.gridOptionsWrapper.isSuppressAnimationFrame()||this.printLayout?this.destroyRowComps(e,t):this.beans.taskQueue.addP2Task(this.destroyRowComps.bind(this,e,t)),this.checkAngularCompile()},t.prototype.flushContainers=function(e){x._.iterateObject(this.rowContainers,(function(e,t){t&&t.flushRowTemplates()})),e.forEach((function(e){return e.afterFlush()}))},t.prototype.onDisplayedColumnsChanged=function(){var e=this.columnController.isPinningLeft(),t=this.columnController.isPinningRight();(this.pinningLeft!==e||t!==this.pinningRight)&&(this.pinningLeft=e,this.pinningRight=t,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())},t.prototype.redrawFullWidthEmbeddedRows=function(){var e=[];x._.iterateObject(this.rowCompsByIndex,(function(t,o){if(o.isFullWidth()){var r=o.getRowNode().rowIndex;e.push(r.toString())}})),this.refreshFloatingRowComps(),this.removeRowComps(e),this.redrawAfterScroll()},t.prototype.refreshFullWidthRows=function(){var e=[];x._.iterateObject(this.rowCompsByIndex,(function(t,o){if(o.isFullWidth()){var r=o.getRowNode().rowIndex;e.push(r.toString())}})),this.removeRowComps(e),this.redrawAfterScroll()},t.prototype.createOrUpdateRowComp=function(e,t,o,r){var i,n=this.rowCompsByIndex[e];if(n||(i=this.paginationProxy.getRow(e),x._.exists(i)&&x._.exists(t)&&t[i.id]&&i.alreadyRendered&&(n=t[i.id],t[i.id]=null)),n)n.ensureDomOrder();else{if(i||(i=this.paginationProxy.getRow(e)),!x._.exists(i))return;n=this.createRowComp(i,o,r)}return i&&(i.alreadyRendered=!0),this.rowCompsByIndex[e]=n,n},t.prototype.destroyRowComps=function(e,t){var o=[];x._.iterateObject(e,(function(e,r){r&&(r.destroy(t),x._.pushAll(o,r.getAndClearDelayedDestroyFunctions()))})),x._.executeInAWhile(o)},t.prototype.checkAngularCompile=function(){var e=this;this.gridOptionsWrapper.isAngularCompileRows()&&window.setTimeout((function(){e.$scope.$apply()}),0)},t.prototype.workOutFirstAndLastRowsToRender=function(){var e,t;if(this.paginationProxy.isRowsToRender())if(this.printLayout)e=this.paginationProxy.getPageFirstRow(),t=this.paginationProxy.getPageLastRow();else{var o=this.paginationProxy?this.paginationProxy.getPixelOffset():0,r=this.maxDivHeightScaler.getOffset(),i=this.gridPanel.getVScrollPosition(),n=i.top,s=i.bottom,a=this.gridOptionsWrapper.getRowBufferInPixels(),l=n+o+r-a,p=s+o+r+a;this.ensureAllRowsInRangeHaveHeightsCalculated(l,p);var u=this.paginationProxy.getRowIndexAtPixel(l),c=this.paginationProxy.getRowIndexAtPixel(p),d=this.paginationProxy.getPageFirstRow(),h=this.paginationProxy.getPageLastRow();u<d&&(u=d),c>h&&(c=h),e=u,t=c}else e=0,t=-1;var m=this.gridOptionsWrapper.getDomLayout()===g.Constants.DOM_LAYOUT_NORMAL,y=this.gridOptionsWrapper.isSuppressMaxRenderedRowRestriction();m&&!y&&t-e>500&&(t=e+500);var v=e!==this.firstRenderedRow,C=t!==this.lastRenderedRow;if(v||C){this.firstRenderedRow=e,this.lastRenderedRow=t;var w={type:f.Events.EVENT_VIEWPORT_CHANGED,firstRow:e,lastRow:t,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(w)}if(this.paginationProxy.isRowsToRender()){var E={type:f.Events.EVENT_FIRST_DATA_RENDERED,firstRow:e,lastRow:t,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEventOnce(E)}},t.prototype.ensureAllRowsInRangeHaveHeightsCalculated=function(e,t){this.paginationProxy.ensureRowHeightsValid(e,t,-1,-1)&&(this.sizeContainerToPageHeight(),this.maxDivHeightScaler.updateOffset())},t.prototype.getFirstVirtualRenderedRow=function(){return this.firstRenderedRow},t.prototype.getLastVirtualRenderedRow=function(){return this.lastRenderedRow},t.prototype.keepRowBecauseEditingOrFocused=function(e){var t=e.getRowNode(),o=this.focusedCellController.isRowNodeFocused(t),r=e.isEditing();return(o||r)&&!!this.paginationProxy.isRowPresent(t)||!1},t.prototype.createRowComp=function(e,t,o){var r=this.gridOptionsWrapper.isSuppressAnimationFrame(),i=o&&!r&&!this.printLayout,n=new h.RowComp(this.$scope,this.rowContainers.body,this.rowContainers.pinnedLeft,this.rowContainers.pinnedRight,this.rowContainers.fullWidth,e,this.beans,t,i,this.printLayout,this.embedFullWidthRows);return n.init(),n},t.prototype.getRenderedNodes=function(){var e=this.rowCompsByIndex;return Object.keys(e).map((function(t){return e[t].getRowNode()}))},t.prototype.navigateToNextCell=function(e,t,o,r){for(var i;;){var n=this.getComponentForCell(o).getColSpanningList();if(t===g.Constants.KEY_RIGHT&&n.length>1&&(o=new b.GridCell({rowIndex:o.rowIndex,column:n[n.length-1],floating:o.floating})),i=this.cellNavigationService.getNextCellToFocus(t,o),x._.missing(i))break;if(!this.gridOptionsWrapper.isGroupUseEntireRow())break;if(!this.paginationProxy.getRow(i.rowIndex).group)break}if(i&&(i=this.getComponentForCell(i).getGridCell()),r){var s=this.gridOptionsWrapper.getNavigateToNextCellFunc();if(x._.exists(s)){var a=s({key:t,previousCellDef:o.getGridCellDef(),nextCellDef:i?i.getGridCellDef():null,event:e});i=x._.exists(a)?new b.GridCell(a):null}}if(i&&(this.ensureCellVisible(i),this.focusedCellController.setFocusedCell(i.rowIndex,i.column,i.floating,!0),this.rangeController)){var l=new b.GridCell({rowIndex:i.rowIndex,floating:i.floating,column:i.column});this.rangeController.setRangeToCell(l)}},t.prototype.ensureCellVisible=function(e){x._.missing(e.floating)&&this.gridPanel.ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridPanel.ensureColumnVisible(e.column),this.gridPanel.horizontallyScrollHeaderCenterAndFloatingCenter(),this.animationFrameService.flushAllFrames()},t.prototype.startEditingCell=function(e,t,o){var r=this.getComponentForCell(e);r&&r.startRowOrCellEdit(t,o)},t.prototype.getComponentForCell=function(e){var t;switch(e.floating){case g.Constants.PINNED_TOP:t=this.floatingTopRowComps[e.rowIndex];break;case g.Constants.PINNED_BOTTOM:t=this.floatingBottomRowComps[e.rowIndex];break;default:t=this.rowCompsByIndex[e.rowIndex]}return t?t.getRenderedCellForColumn(e.column):null},t.prototype.onTabKeyDown=function(e,t){var o=t.shiftKey;this.moveToCellAfter(e,o)&&t.preventDefault()},t.prototype.tabToNextCell=function(e){var t=this.focusedCellController.getFocusedCell();if(x._.missing(t))return!1;var o=this.getComponentForCell(t);return!x._.missing(o)&&this.moveToCellAfter(o,e)},t.prototype.moveToCellAfter=function(e,t){return e.isEditing()?this.gridOptionsWrapper.isFullRowEdit()?this.moveToNextEditingRow(e,t):this.moveToNextEditingCell(e,t):this.moveToNextCellNotEditing(e,t)},t.prototype.moveToNextEditingCell=function(e,t){var o=e.getGridCell();e.stopEditing();var r=this.findNextCellToFocusOn(o,t,!0),i=x._.exists(r);return i&&(r.startEditingIfEnabled(null,null,!0),r.focusCell(!1)),i},t.prototype.moveToNextEditingRow=function(e,t){var o=e.getGridCell(),r=this.findNextCellToFocusOn(o,t,!0),i=x._.exists(r);return i&&this.moveEditToNextCellOrRow(e,r),i},t.prototype.moveToNextCellNotEditing=function(e,t){var o=e.getGridCell(),r=this.findNextCellToFocusOn(o,t,!1),i=x._.exists(r);return i&&r.focusCell(!0),i},t.prototype.moveEditToNextCellOrRow=function(e,t){var o=e.getGridCell(),r=t.getGridCell();if(o.rowIndex===r.rowIndex&&o.floating===r.floating)e.setFocusOutOnEditor(),t.setFocusInOnEditor();else{var i=e.getRenderedRow(),n=t.getRenderedRow();e.setFocusOutOnEditor(),i.stopEditing(),n.startRowEditing(),t.setFocusInOnEditor()}t.focusCell()},t.prototype.findNextCellToFocusOn=function(e,t,o){for(var r=e;;){r=this.cellNavigationService.getNextTabbedCell(r,t);var i=this.gridOptionsWrapper.getTabToNextCellFunc();if(x._.exists(i)){var n=i({backwards:t,editing:o,previousCellDef:e.getGridCellDef(),nextCellDef:r?r.getGridCellDef():null});r=x._.exists(n)?new b.GridCell(n):null}if(!r)return null;if(o){var s=this.lookupRowNodeForCell(r);if(!r.column.isCellEditable(s))continue}x._.missing(r.floating)&&this.gridPanel.ensureIndexVisible(r.rowIndex),r.column.isPinned()||this.gridPanel.ensureColumnVisible(r.column),this.gridPanel.horizontallyScrollHeaderCenterAndFloatingCenter(),this.animationFrameService.flushAllFrames();var a=this.getComponentForCell(r);if(!x._.missing(a)&&!a.isSuppressNavigable())return this.rangeController&&(e=new b.GridCell({rowIndex:r.rowIndex,floating:r.floating,column:r.column}),this.rangeController.setRangeToCell(e)),a}},t.prototype.lookupRowNodeForCell=function(e){return e.floating===g.Constants.PINNED_TOP?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):e.floating===g.Constants.PINNED_BOTTOM?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.paginationProxy.getRow(e.rowIndex)},n([y.Autowired("paginationProxy"),s("design:type",S.PaginationProxy)],t.prototype,"paginationProxy",void 0),n([y.Autowired("columnController"),s("design:type",C.ColumnController)],t.prototype,"columnController",void 0),n([y.Autowired("gridOptionsWrapper"),s("design:type",l.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([y.Autowired("$scope"),s("design:type",Object)],t.prototype,"$scope",void 0),n([y.Autowired("expressionService"),s("design:type",p.ExpressionService)],t.prototype,"expressionService",void 0),n([y.Autowired("templateService"),s("design:type",u.TemplateService)],t.prototype,"templateService",void 0),n([y.Autowired("valueService"),s("design:type",c.ValueService)],t.prototype,"valueService",void 0),n([y.Autowired("eventService"),s("design:type",d.EventService)],t.prototype,"eventService",void 0),n([y.Autowired("pinnedRowModel"),s("design:type",T.PinnedRowModel)],t.prototype,"pinnedRowModel",void 0),n([y.Autowired("loggerFactory"),s("design:type",w.LoggerFactory)],t.prototype,"loggerFactory",void 0),n([y.Autowired("focusedCellController"),s("design:type",E.FocusedCellController)],t.prototype,"focusedCellController",void 0),n([y.Autowired("cellNavigationService"),s("design:type",_.CellNavigationService)],t.prototype,"cellNavigationService",void 0),n([y.Autowired("columnApi"),s("design:type",v.ColumnApi)],t.prototype,"columnApi",void 0),n([y.Autowired("gridApi"),s("design:type",O.GridApi)],t.prototype,"gridApi",void 0),n([y.Autowired("beans"),s("design:type",A.Beans)],t.prototype,"beans",void 0),n([y.Autowired("maxDivHeightScaler"),s("design:type",I.MaxDivHeightScaler)],t.prototype,"maxDivHeightScaler",void 0),n([y.Autowired("animationFrameService"),s("design:type",P.AnimationFrameService)],t.prototype,"animationFrameService",void 0),n([y.Optional("rangeController"),s("design:type",Object)],t.prototype,"rangeController",void 0),n([a(0,y.Qualifier("loggerFactory")),s("design:type",Function),s("design:paramtypes",[w.LoggerFactory]),s("design:returntype",void 0)],t.prototype,"agWire",null),n([y.Bean("rowRenderer")],t)}(R.BeanStub);t.RowRenderer=D},10190:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},n=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(44081),a=o(98239),l=o(60843),p=o(37132),u=o(85786),c=o(72493),d=o(72493),h=o(72493),f=o(72493),g=function(){function e(){this.consuming=!1}return e.prototype.setBeans=function(e){this.logger=e.create("AlignedGridsService")},e.prototype.registerGridComp=function(e){this.gridPanel=e},e.prototype.init=function(){this.eventService.addEventListener(u.Events.EVENT_COLUMN_MOVED,this.fireColumnEvent.bind(this)),this.eventService.addEventListener(u.Events.EVENT_COLUMN_VISIBLE,this.fireColumnEvent.bind(this)),this.eventService.addEventListener(u.Events.EVENT_COLUMN_PINNED,this.fireColumnEvent.bind(this)),this.eventService.addEventListener(u.Events.EVENT_COLUMN_GROUP_OPENED,this.fireColumnEvent.bind(this)),this.eventService.addEventListener(u.Events.EVENT_COLUMN_RESIZED,this.fireColumnEvent.bind(this)),this.eventService.addEventListener(u.Events.EVENT_BODY_SCROLL,this.fireScrollEvent.bind(this))},e.prototype.fireEvent=function(e){if(!this.consuming){var t=this.gridOptionsWrapper.getAlignedGrids();t&&t.forEach((function(t){if(t.api){var o=t.api.__getAlignedGridService();e(o)}}))}},e.prototype.onEvent=function(e){this.consuming=!0,e(),this.consuming=!1},e.prototype.fireColumnEvent=function(e){this.fireEvent((function(t){t.onColumnEvent(e)}))},e.prototype.fireScrollEvent=function(e){"horizontal"===e.direction&&this.fireEvent((function(t){t.onScrollEvent(e)}))},e.prototype.onScrollEvent=function(e){var t=this;this.onEvent((function(){t.gridPanel.setHorizontalScrollPosition(e.left)}))},e.prototype.getMasterColumns=function(e){var t=[];return e.columns?e.columns.forEach((function(e){t.push(e)})):e.column&&t.push(e.column),t},e.prototype.getColumnIds=function(e){var t=[];return e.columns?e.columns.forEach((function(e){t.push(e.getColId())})):e.column&&t.push(e.column.getColId()),t},e.prototype.onColumnEvent=function(e){var t=this;this.onEvent((function(){switch(e.type){case u.Events.EVENT_COLUMN_MOVED:case u.Events.EVENT_COLUMN_VISIBLE:case u.Events.EVENT_COLUMN_PINNED:case u.Events.EVENT_COLUMN_RESIZED:var o=e;t.processColumnEvent(o);break;case u.Events.EVENT_COLUMN_GROUP_OPENED:var r=e;t.processGroupOpenedEvent(r);break;case u.Events.EVENT_COLUMN_PIVOT_CHANGED:console.warn("ag-Grid: pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.")}}))},e.prototype.processGroupOpenedEvent=function(e){var t,o=e.columnGroup;if(o){var r=o.getGroupId();t=this.columnController.getOriginalColumnGroup(r)}o&&!t||(this.logger.log("onColumnEvent-> processing "+e+" expanded = "+o.isExpanded()),this.columnController.setColumnGroupOpened(t,o.isExpanded(),"alignedGridChanged"))},e.prototype.processColumnEvent=function(e){var t,o=this,r=e.column;if(r&&(t=this.columnController.getPrimaryColumn(r.getColId())),!r||t){var i=this.getColumnIds(e),n=this.getMasterColumns(e);switch(e.type){case u.Events.EVENT_COLUMN_MOVED:var s=e;this.logger.log("onColumnEvent-> processing "+e.type+" toIndex = "+s.toIndex),this.columnController.moveColumns(i,s.toIndex,"alignedGridChanged");break;case u.Events.EVENT_COLUMN_VISIBLE:var a=e;this.logger.log("onColumnEvent-> processing "+e.type+" visible = "+a.visible),this.columnController.setColumnsVisible(i,a.visible,"alignedGridChanged");break;case u.Events.EVENT_COLUMN_PINNED:var l=e;this.logger.log("onColumnEvent-> processing "+e.type+" pinned = "+l.pinned),this.columnController.setColumnsPinned(i,l.pinned,"alignedGridChanged");break;case u.Events.EVENT_COLUMN_RESIZED:var p=e;n.forEach((function(t){o.logger.log("onColumnEvent-> processing "+e.type+" actualWidth = "+t.getActualWidth()),o.columnController.setColumnWidth(t.getColId(),t.getActualWidth(),!1,p.finished,"alignedGridChanged")}))}var c=this.gridPanel.isVerticalScrollShowing();this.gridOptionsWrapper.getAlignedGrids().forEach((function(e){e.api.setAlwaysShowVerticalScroll(c)}))}},r([h.Autowired("gridOptionsWrapper"),i("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([h.Autowired("columnController"),i("design:type",a.ColumnController)],e.prototype,"columnController",void 0),r([h.Autowired("eventService"),i("design:type",l.EventService)],e.prototype,"eventService",void 0),r([n(0,d.Qualifier("loggerFactory")),i("design:type",Function),i("design:paramtypes",[p.LoggerFactory]),i("design:returntype",void 0)],e.prototype,"setBeans",null),r([f.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),r([c.Bean("alignedGridsService")],e)}();t.AlignedGridsService=g},10292:e=>{var t,o=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,s={};((e,t)=>{for(var r in t)o(e,r,{get:t[r],enumerable:!0})})(s,{AISDKError:()=>g,APICallError:()=>C,EmptyResponseBodyError:()=>b,InvalidArgumentError:()=>Z,InvalidPromptError:()=>ee,InvalidResponseDataError:()=>ie,JSONParseError:()=>le,LoadAPIKeyError:()=>de,LoadSettingError:()=>me,NoContentGeneratedError:()=>we,NoSuchModelError:()=>Re,TooManyEmbeddingValuesForCallError:()=>Ae,TypeValidationError:()=>De,UnsupportedFunctionalityError:()=>ke,getErrorMessage:()=>R,isJSONArray:()=>Ge,isJSONObject:()=>Ve,isJSONValue:()=>Le}),e.exports=(t=s,((e,t,s,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of i(t))n.call(e,s)||undefined===s||o(e,s,{get:()=>t[s],enumerable:!(a=r(t,s))||a.enumerable});return e})(o({},"__esModule",{value:!0}),t));var a,l,p,u,c,d,h="vercel.ai.error",f=Symbol.for(h),g=class e extends(l=Error,a=f,l){constructor({name:e,message:t,cause:o}){super(t),this[a]=!0,this.name=e,this.cause=o}static isInstance(t){return e.hasMarker(t,h)}static hasMarker(e,t){const o=Symbol.for(t);return null!=e&&"object"==typeof e&&o in e&&"boolean"==typeof e[o]&&!0===e[o]}},m="AI_APICallError",y=`vercel.ai.error.${m}`,v=Symbol.for(y),C=class extends(u=g,p=v,u){constructor({message:e,url:t,requestBodyValues:o,statusCode:r,responseHeaders:i,responseBody:n,cause:s,isRetryable:a=null!=r&&(408===r||409===r||429===r||r>=500),data:l}){super({name:m,message:e,cause:s}),this[p]=!0,this.url=t,this.requestBodyValues=o,this.statusCode=r,this.responseHeaders=i,this.responseBody=n,this.isRetryable=a,this.data=l}static isInstance(e){return g.hasMarker(e,y)}},w="AI_EmptyResponseBodyError",E=`vercel.ai.error.${w}`,_=Symbol.for(E),b=class extends(d=g,c=_,d){constructor({message:e="Empty response body"}={}){super({name:w,message:e}),this[c]=!0}static isInstance(e){return g.hasMarker(e,E)}};function R(e){return null==e?"unknown error":"string"==typeof e?e:e instanceof Error?e.message:JSON.stringify(e)}var S,O,T,A,P,I,x,D,N,F,M,k,L,G,V,j,W,H,B,U,z,Y,q="AI_InvalidArgumentError",K=`vercel.ai.error.${q}`,$=Symbol.for(K),Z=class extends(O=g,S=$,O){constructor({message:e,cause:t,argument:o}){super({name:q,message:e,cause:t}),this[S]=!0,this.argument=o}static isInstance(e){return g.hasMarker(e,K)}},J="AI_InvalidPromptError",Q=`vercel.ai.error.${J}`,X=Symbol.for(Q),ee=class extends(A=g,T=X,A){constructor({prompt:e,message:t,cause:o}){super({name:J,message:`Invalid prompt: ${t}`,cause:o}),this[T]=!0,this.prompt=e}static isInstance(e){return g.hasMarker(e,Q)}},te="AI_InvalidResponseDataError",oe=`vercel.ai.error.${te}`,re=Symbol.for(oe),ie=class extends(I=g,P=re,I){constructor({data:e,message:t=`Invalid response data: ${JSON.stringify(e)}.`}){super({name:te,message:t}),this[P]=!0,this.data=e}static isInstance(e){return g.hasMarker(e,oe)}},ne="AI_JSONParseError",se=`vercel.ai.error.${ne}`,ae=Symbol.for(se),le=class extends(D=g,x=ae,D){constructor({text:e,cause:t}){super({name:ne,message:`JSON parsing failed: Text: ${e}.\nError message: ${R(t)}`,cause:t}),this[x]=!0,this.text=e}static isInstance(e){return g.hasMarker(e,se)}},pe="AI_LoadAPIKeyError",ue=`vercel.ai.error.${pe}`,ce=Symbol.for(ue),de=class extends(F=g,N=ce,F){constructor({message:e}){super({name:pe,message:e}),this[N]=!0}static isInstance(e){return g.hasMarker(e,ue)}},he="AI_LoadSettingError",fe=`vercel.ai.error.${he}`,ge=Symbol.for(fe),me=class extends(k=g,M=ge,k){constructor({message:e}){super({name:he,message:e}),this[M]=!0}static isInstance(e){return g.hasMarker(e,fe)}},ye="AI_NoContentGeneratedError",ve=`vercel.ai.error.${ye}`,Ce=Symbol.for(ve),we=class extends(G=g,L=Ce,G){constructor({message:e="No content generated."}={}){super({name:ye,message:e}),this[L]=!0}static isInstance(e){return g.hasMarker(e,ve)}},Ee="AI_NoSuchModelError",_e=`vercel.ai.error.${Ee}`,be=Symbol.for(_e),Re=class extends(j=g,V=be,j){constructor({errorName:e=Ee,modelId:t,modelType:o,message:r=`No such ${o}: ${t}`}){super({name:e,message:r}),this[V]=!0,this.modelId=t,this.modelType=o}static isInstance(e){return g.hasMarker(e,_e)}},Se="AI_TooManyEmbeddingValuesForCallError",Oe=`vercel.ai.error.${Se}`,Te=Symbol.for(Oe),Ae=class extends(H=g,W=Te,H){constructor(e){super({name:Se,message:`Too many values for a single embedding call. The ${e.provider} model "${e.modelId}" can only embed up to ${e.maxEmbeddingsPerCall} values per call, but ${e.values.length} values were provided.`}),this[W]=!0,this.provider=e.provider,this.modelId=e.modelId,this.maxEmbeddingsPerCall=e.maxEmbeddingsPerCall,this.values=e.values}static isInstance(e){return g.hasMarker(e,Oe)}},Pe="AI_TypeValidationError",Ie=`vercel.ai.error.${Pe}`,xe=Symbol.for(Ie),De=class e extends(U=g,B=xe,U){constructor({value:e,cause:t}){super({name:Pe,message:`Type validation failed: Value: ${JSON.stringify(e)}.\nError message: ${R(t)}`,cause:t}),this[B]=!0,this.value=e}static isInstance(e){return g.hasMarker(e,Ie)}static wrap({value:t,cause:o}){return e.isInstance(o)&&o.value===t?o:new e({value:t,cause:o})}},Ne="AI_UnsupportedFunctionalityError",Fe=`vercel.ai.error.${Ne}`,Me=Symbol.for(Fe),ke=class extends(Y=g,z=Me,Y){constructor({functionality:e,message:t=`'${e}' functionality not supported.`}){super({name:Ne,message:t}),this[z]=!0,this.functionality=e}static isInstance(e){return g.hasMarker(e,Fe)}};function Le(e){return null===e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e||(Array.isArray(e)?e.every(Le):"object"==typeof e&&Object.entries(e).every((([e,t])=>"string"==typeof e&&Le(t))))}function Ge(e){return Array.isArray(e)&&e.every(Le)}function Ve(e){return null!=e&&"object"==typeof e&&Object.entries(e).every((([e,t])=>"string"==typeof e&&Le(t)))}},10601:(e,t,o)=>{var r,i=o(9606).URL,n=o(67787).Buffer,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,p=Object.prototype.hasOwnProperty,u={};((e,t)=>{for(var o in t)s(e,o,{get:t[o],enumerable:!0})})(u,{GatewayAuthenticationError:()=>N,GatewayError:()=>P,GatewayInternalServerError:()=>Q,GatewayInvalidRequestError:()=>L,GatewayModelNotFoundError:()=>K,GatewayRateLimitError:()=>W,GatewayResponseError:()=>oe,createGateway:()=>We,createGatewayProvider:()=>We,gateway:()=>He}),e.exports=(r=u,((e,t,o,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of l(t))p.call(e,o)||undefined===o||s(e,o,{get:()=>t[o],enumerable:!(r=a(t,o))||r.enumerable});return e})(s({},"__esModule",{value:!0}),r));var c,d,h,f,g,m,y,v,C,w,E,_,b,R,S=o(94192),O=o(10292),T=o(19844),A=Symbol.for("vercel.ai.gateway.error"),P=class e extends(d=Error,c=A,d){constructor({message:e,statusCode:t=500,cause:o}){super(e),this[c]=!0,this.statusCode=t,this.cause=o}static isInstance(t){return e.hasMarker(t)}static hasMarker(e){return"object"==typeof e&&null!==e&&A in e&&!0===e[A]}},I="GatewayAuthenticationError",x=`vercel.ai.gateway.error.${I}`,D=Symbol.for(x),N=class e extends(f=P,h=D,f){constructor({message:e="Authentication failed",statusCode:t=401,cause:o}={}){super({message:e,statusCode:t,cause:o}),this[h]=!0,this.name=I,this.type="authentication_error"}static isInstance(e){return P.hasMarker(e)&&D in e}static createContextualError({apiKeyProvided:t,oidcTokenProvided:o,message:r="Authentication failed",statusCode:i=401,cause:n}){let s;return s=t?"AI Gateway authentication failed: Invalid API key.\n\nCreate a new API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys\n\nProvide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.":o?"AI Gateway authentication failed: Invalid OIDC token.\n\nRun 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.\n\nAlternatively, use an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys":"AI Gateway authentication failed: No authentication provided.\n\nOption 1 - API key:\nCreate an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys\nProvide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.\n\nOption 2 - OIDC token:\nRun 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.",new e({message:s,statusCode:i,cause:n})}},F="GatewayInvalidRequestError",M=`vercel.ai.gateway.error.${F}`,k=Symbol.for(M),L=class extends(m=P,g=k,m){constructor({message:e="Invalid request",statusCode:t=400,cause:o}={}){super({message:e,statusCode:t,cause:o}),this[g]=!0,this.name=F,this.type="invalid_request_error"}static isInstance(e){return P.hasMarker(e)&&k in e}},G="GatewayRateLimitError",V=`vercel.ai.gateway.error.${G}`,j=Symbol.for(V),W=class extends(v=P,y=j,v){constructor({message:e="Rate limit exceeded",statusCode:t=429,cause:o}={}){super({message:e,statusCode:t,cause:o}),this[y]=!0,this.name=G,this.type="rate_limit_exceeded"}static isInstance(e){return P.hasMarker(e)&&j in e}},H=o(19844),B=o(94192),U="GatewayModelNotFoundError",z=`vercel.ai.gateway.error.${U}`,Y=Symbol.for(z),q=(0,B.lazyValidator)((()=>(0,B.zodSchema)(H.z.object({modelId:H.z.string()})))),K=class extends(w=P,C=Y,w){constructor({message:e="Model not found",statusCode:t=404,modelId:o,cause:r}={}){super({message:e,statusCode:t,cause:r}),this[C]=!0,this.name=U,this.type="model_not_found",this.modelId=o}static isInstance(e){return P.hasMarker(e)&&Y in e}},$="GatewayInternalServerError",Z=`vercel.ai.gateway.error.${$}`,J=Symbol.for(Z),Q=class extends(_=P,E=J,_){constructor({message:e="Internal server error",statusCode:t=500,cause:o}={}){super({message:e,statusCode:t,cause:o}),this[E]=!0,this.name=$,this.type="internal_server_error"}static isInstance(e){return P.hasMarker(e)&&J in e}},X="GatewayResponseError",ee=`vercel.ai.gateway.error.${X}`,te=Symbol.for(ee),oe=class extends(R=P,b=te,R){constructor({message:e="Invalid response from Gateway",statusCode:t=502,response:o,validationError:r,cause:i}={}){super({message:e,statusCode:t,cause:i}),this[b]=!0,this.name=X,this.type="response_error",this.response=o,this.validationError=r}static isInstance(e){return P.hasMarker(e)&&te in e}},re=o(94192);async function ie({response:e,statusCode:t,defaultMessage:o="Gateway request failed",cause:r,authMethod:i}){const n=await(0,re.safeValidateTypes)({value:e,schema:ne});if(!n.success)return new oe({message:`Invalid error response format: ${o}`,statusCode:t,response:e,validationError:n.error,cause:r});const s=n.value,a=s.error.type,l=s.error.message;switch(a){case"authentication_error":return N.createContextualError({apiKeyProvided:"api-key"===i,oidcTokenProvided:"oidc"===i,statusCode:t,cause:r});case"invalid_request_error":return new L({message:l,statusCode:t,cause:r});case"rate_limit_exceeded":return new W({message:l,statusCode:t,cause:r});case"model_not_found":{const e=await(0,re.safeValidateTypes)({value:s.error.param,schema:q});return new K({message:l,statusCode:t,modelId:e.success?e.value.modelId:void 0,cause:r})}default:return new Q({message:l,statusCode:t,cause:r})}}var ne=(0,re.lazyValidator)((()=>(0,re.zodSchema)(T.z.object({error:T.z.object({message:T.z.string(),type:T.z.string().nullish(),param:T.z.unknown().nullish(),code:T.z.union([T.z.string(),T.z.number()]).nullish()})}))));function se(e,t){var o;return P.isInstance(e)?e:O.APICallError.isInstance(e)?ie({response:ae(e),statusCode:null!=(o=e.statusCode)?o:500,defaultMessage:"Gateway request failed",cause:e,authMethod:t}):ie({response:{},statusCode:500,defaultMessage:e instanceof Error?`Gateway request failed: ${e.message}`:"Unknown Gateway error",cause:e,authMethod:t})}function ae(e){if(void 0!==e.data)return e.data;if(null!=e.responseBody)try{return JSON.parse(e.responseBody)}catch(t){return e.responseBody}return{}}var le=o(19844),pe=o(94192),ue="ai-gateway-auth-method";async function ce(e){const t=await(0,pe.safeValidateTypes)({value:e[ue],schema:de});return t.success?t.value:void 0}var de=(0,pe.lazyValidator)((()=>(0,pe.zodSchema)(le.z.union([le.z.literal("api-key"),le.z.literal("oidc")])))),he=o(94192),fe=o(19844),ge=class{constructor(e){this.config=e}async getAvailableModels(){try{const{value:e}=await(0,he.getFromApi)({url:`${this.config.baseURL}/config`,headers:await(0,he.resolve)(this.config.headers()),successfulResponseHandler:(0,he.createJsonResponseHandler)(me),failedResponseHandler:(0,he.createJsonErrorResponseHandler)({errorSchema:fe.z.any(),errorToMessage:e=>e}),fetch:this.config.fetch});return e}catch(e){throw await se(e)}}async getCredits(){try{const e=new i(this.config.baseURL),{value:t}=await(0,he.getFromApi)({url:`${e.origin}/v1/credits`,headers:await(0,he.resolve)(this.config.headers()),successfulResponseHandler:(0,he.createJsonResponseHandler)(ye),failedResponseHandler:(0,he.createJsonErrorResponseHandler)({errorSchema:fe.z.any(),errorToMessage:e=>e}),fetch:this.config.fetch});return t}catch(e){throw await se(e)}}},me=(0,he.lazyValidator)((()=>(0,he.zodSchema)(fe.z.object({models:fe.z.array(fe.z.object({id:fe.z.string(),name:fe.z.string(),description:fe.z.string().nullish(),pricing:fe.z.object({input:fe.z.string(),output:fe.z.string(),input_cache_read:fe.z.string().nullish(),input_cache_write:fe.z.string().nullish()}).transform((({input:e,output:t,input_cache_read:o,input_cache_write:r})=>({input:e,output:t,...o?{cachedInputTokens:o}:{},...r?{cacheCreationInputTokens:r}:{}}))).nullish(),specification:fe.z.object({specificationVersion:fe.z.literal("v2"),provider:fe.z.string(),modelId:fe.z.string()}),modelType:fe.z.enum(["language","embedding","image"]).nullish()}))})))),ye=(0,he.lazyValidator)((()=>(0,he.zodSchema)(fe.z.object({balance:fe.z.string(),total_used:fe.z.string()}).transform((({balance:e,total_used:t})=>({balance:e,totalUsed:t})))))),ve=o(94192),Ce=o(19844),we=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v2",this.supportedUrls={"*/*":[/.*/]}}get provider(){return this.config.provider}async getArgs(e){const{abortSignal:t,...o}=e;return{args:this.maybeEncodeFileParts(o),warnings:[]}}async doGenerate(e){const{args:t,warnings:o}=await this.getArgs(e),{abortSignal:r}=e,i=await(0,ve.resolve)(this.config.headers());try{const{responseHeaders:n,value:s,rawValue:a}=await(0,ve.postJsonToApi)({url:this.getUrl(),headers:(0,ve.combineHeaders)(i,e.headers,this.getModelConfigHeaders(this.modelId,!1),await(0,ve.resolve)(this.config.o11yHeaders)),body:t,successfulResponseHandler:(0,ve.createJsonResponseHandler)(Ce.z.any()),failedResponseHandler:(0,ve.createJsonErrorResponseHandler)({errorSchema:Ce.z.any(),errorToMessage:e=>e}),...r&&{abortSignal:r},fetch:this.config.fetch});return{...s,request:{body:t},response:{headers:n,body:a},warnings:o}}catch(e){throw await se(e,await ce(i))}}async doStream(e){const{args:t,warnings:o}=await this.getArgs(e),{abortSignal:r}=e,i=await(0,ve.resolve)(this.config.headers());try{const{value:n,responseHeaders:s}=await(0,ve.postJsonToApi)({url:this.getUrl(),headers:(0,ve.combineHeaders)(i,e.headers,this.getModelConfigHeaders(this.modelId,!0),await(0,ve.resolve)(this.config.o11yHeaders)),body:t,successfulResponseHandler:(0,ve.createEventSourceResponseHandler)(Ce.z.any()),failedResponseHandler:(0,ve.createJsonErrorResponseHandler)({errorSchema:Ce.z.any(),errorToMessage:e=>e}),...r&&{abortSignal:r},fetch:this.config.fetch});return{stream:n.pipeThrough(new TransformStream({start(e){o.length>0&&e.enqueue({type:"stream-start",warnings:o})},transform(t,o){if(t.success){const r=t.value;if("raw"===r.type&&!e.includeRawChunks)return;"response-metadata"===r.type&&r.timestamp&&"string"==typeof r.timestamp&&(r.timestamp=new Date(r.timestamp)),o.enqueue(r)}else o.error(t.error)}})),request:{body:t},response:{headers:s}}}catch(e){throw await se(e,await ce(i))}}isFilePart(e){return e&&"object"==typeof e&&"type"in e&&"file"===e.type}maybeEncodeFileParts(e){for(const t of e.prompt)for(const e of t.content)if(this.isFilePart(e)){const t=e;if(t.data instanceof Uint8Array){const e=Uint8Array.from(t.data),o=n.from(e).toString("base64");t.data=new i(`data:${t.mediaType||"application/octet-stream"};base64,${o}`)}}return e}getUrl(){return`${this.config.baseURL}/language-model`}getModelConfigHeaders(e,t){return{"ai-language-model-specification-version":"2","ai-language-model-id":e,"ai-language-model-streaming":String(t)}}},Ee=o(94192),_e=o(19844),be=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v2",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0}get provider(){return this.config.provider}async doEmbed({values:e,headers:t,abortSignal:o,providerOptions:r}){var i;const n=await(0,Ee.resolve)(this.config.headers());try{const{responseHeaders:s,value:a,rawValue:l}=await(0,Ee.postJsonToApi)({url:this.getUrl(),headers:(0,Ee.combineHeaders)(n,null!=t?t:{},this.getModelConfigHeaders(),await(0,Ee.resolve)(this.config.o11yHeaders)),body:{input:1===e.length?e[0]:e,...r?{providerOptions:r}:{}},successfulResponseHandler:(0,Ee.createJsonResponseHandler)(Re),failedResponseHandler:(0,Ee.createJsonErrorResponseHandler)({errorSchema:_e.z.any(),errorToMessage:e=>e}),...o&&{abortSignal:o},fetch:this.config.fetch});return{embeddings:a.embeddings,usage:null!=(i=a.usage)?i:void 0,providerMetadata:a.providerMetadata,response:{headers:s,body:l}}}catch(e){throw await se(e,await ce(n))}}getUrl(){return`${this.config.baseURL}/embedding-model`}getModelConfigHeaders(){return{"ai-embedding-model-specification-version":"2","ai-model-id":this.modelId}}},Re=(0,Ee.lazyValidator)((()=>(0,Ee.zodSchema)(_e.z.object({embeddings:_e.z.array(_e.z.array(_e.z.number())),usage:_e.z.object({tokens:_e.z.number()}).nullish(),providerMetadata:_e.z.record(_e.z.string(),_e.z.record(_e.z.string(),_e.z.unknown())).optional()})))),Se=o(94192),Oe=o(19844),Te=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v2",this.maxImagesPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:e,n:t,size:o,aspectRatio:r,seed:i,providerOptions:n,headers:s,abortSignal:a}){var l;const p=await(0,Se.resolve)(this.config.headers());try{const{responseHeaders:u,value:c,rawValue:d}=await(0,Se.postJsonToApi)({url:this.getUrl(),headers:(0,Se.combineHeaders)(p,null!=s?s:{},this.getModelConfigHeaders(),await(0,Se.resolve)(this.config.o11yHeaders)),body:{prompt:e,n:t,...o&&{size:o},...r&&{aspectRatio:r},...i&&{seed:i},...n&&{providerOptions:n}},successfulResponseHandler:(0,Se.createJsonResponseHandler)(Pe),failedResponseHandler:(0,Se.createJsonErrorResponseHandler)({errorSchema:Oe.z.any(),errorToMessage:e=>e}),...a&&{abortSignal:a},fetch:this.config.fetch});return{images:c.images,warnings:null!=(l=c.warnings)?l:[],providerMetadata:c.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:u}}}catch(e){throw se(e,await ce(p))}}getUrl(){return`${this.config.baseURL}/image-model`}getModelConfigHeaders(){return{"ai-image-model-specification-version":"2","ai-model-id":this.modelId}}},Ae=Oe.z.object({images:Oe.z.array(Oe.z.unknown()).optional()}).catchall(Oe.z.unknown()),Pe=Oe.z.object({images:Oe.z.array(Oe.z.string()),warnings:Oe.z.array(Oe.z.object({type:Oe.z.literal("other"),message:Oe.z.string()})).optional(),providerMetadata:Oe.z.record(Oe.z.string(),Ae).optional()}),Ie=o(94192),xe=o(69761),De=(0,Ie.lazySchema)((()=>(0,Ie.zodSchema)(xe.z.object({query:xe.z.union([xe.z.string(),xe.z.array(xe.z.string())]).describe("Search query (string) or multiple queries (array of up to 5 strings). Multi-query searches return combined results from all queries."),max_results:xe.z.number().optional().describe("Maximum number of search results to return (1-20, default: 10)"),max_tokens_per_page:xe.z.number().optional().describe("Maximum number of tokens to extract per search result page (256-2048, default: 2048)"),max_tokens:xe.z.number().optional().describe("Maximum total tokens across all search results (default: 25000, max: 1000000)"),country:xe.z.string().optional().describe("Two-letter ISO 3166-1 alpha-2 country code for regional search results (e.g., 'US', 'GB', 'FR')"),search_domain_filter:xe.z.array(xe.z.string()).optional().describe("List of domains to include or exclude from search results (max 20). To include: ['nature.com', 'science.org']. To exclude: ['-example.com', '-spam.net']"),search_language_filter:xe.z.array(xe.z.string()).optional().describe("List of ISO 639-1 language codes to filter results (max 10, lowercase). Examples: ['en', 'fr', 'de']"),search_after_date:xe.z.string().optional().describe("Include only results published after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),search_before_date:xe.z.string().optional().describe("Include only results published before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),last_updated_after_filter:xe.z.string().optional().describe("Include only results last updated after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),last_updated_before_filter:xe.z.string().optional().describe("Include only results last updated before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),search_recency_filter:xe.z.enum(["day","week","month","year"]).optional().describe("Filter results by relative time period. Cannot be used with search_after_date or search_before_date.")})))),Ne=(0,Ie.lazySchema)((()=>(0,Ie.zodSchema)(xe.z.union([xe.z.object({results:xe.z.array(xe.z.object({title:xe.z.string(),url:xe.z.string(),snippet:xe.z.string(),date:xe.z.string().optional(),lastUpdated:xe.z.string().optional()})),id:xe.z.string()}),xe.z.object({error:xe.z.enum(["api_error","rate_limit","timeout","invalid_input","unknown"]),statusCode:xe.z.number().optional(),message:xe.z.string()})])))),Fe=(0,Ie.createProviderDefinedToolFactoryWithOutputSchema)({id:"gateway.perplexity_search",name:"perplexity_search",inputSchema:De,outputSchema:Ne}),Me={perplexitySearch:(e={})=>Fe(e)},ke=o(39889),Le=o(39889),Ge=o(94192),Ve="2.0.27",je="0.0.1";function We(e={}){var t,o;let r=null,i=null;const n=null!=(t=e.metadataCacheRefreshMillis)?t:3e5;let s=0;const a=null!=(o=(0,S.withoutTrailingSlash)(e.baseURL))?o:"https://ai-gateway.vercel.sh/v1/ai",l=async()=>{const t=await async function(e){const t=(0,S.loadOptionalSetting)({settingValue:e.apiKey,environmentVariableName:"AI_GATEWAY_API_KEY"});if(t)return{token:t,authMethod:"api-key"};try{return{token:await(0,Le.getVercelOidcToken)(),authMethod:"oidc"}}catch(e){return null}}(e);if(t)return(0,Ge.withUserAgentSuffix)({Authorization:`Bearer ${t.token}`,"ai-gateway-protocol-version":je,[ue]:t.authMethod,...e.headers},`ai-sdk/gateway/${Ve}`);throw N.createContextualError({apiKeyProvided:!1,oidcTokenProvided:!1,statusCode:401})},p=()=>{const e=(0,S.loadOptionalSetting)({settingValue:void 0,environmentVariableName:"VERCEL_DEPLOYMENT_ID"}),t=(0,S.loadOptionalSetting)({settingValue:void 0,environmentVariableName:"VERCEL_ENV"}),o=(0,S.loadOptionalSetting)({settingValue:void 0,environmentVariableName:"VERCEL_REGION"});return async()=>{const r=await async function(){var e;return null==(e=(0,ke.getContext)().headers)?void 0:e["x-vercel-id"]}();return{...e&&{"ai-o11y-deployment-id":e},...t&&{"ai-o11y-environment":t},...o&&{"ai-o11y-region":o},...r&&{"ai-o11y-request-id":r}}}},u=t=>new we(t,{provider:"gateway",baseURL:a,headers:l,fetch:e.fetch,o11yHeaders:p()}),c=function(e){if(new.target)throw new Error("The Gateway Provider model function cannot be called with the new keyword.");return u(e)};return c.getAvailableModels=async()=>{var t,o,p;const u=null!=(p=null==(o=null==(t=e._internal)?void 0:t.currentDate)?void 0:o.call(t).getTime())?p:Date.now();return(!r||u-s>n)&&(s=u,r=new ge({baseURL:a,headers:l,fetch:e.fetch}).getAvailableModels().then((e=>(i=e,e))).catch((async e=>{throw await se(e,await ce(await l()))}))),i?Promise.resolve(i):r},c.getCredits=async()=>new ge({baseURL:a,headers:l,fetch:e.fetch}).getCredits().catch((async e=>{throw await se(e,await ce(await l()))})),c.imageModel=t=>new Te(t,{provider:"gateway",baseURL:a,headers:l,fetch:e.fetch,o11yHeaders:p()}),c.languageModel=u,c.textEmbeddingModel=t=>new be(t,{provider:"gateway",baseURL:a,headers:l,fetch:e.fetch,o11yHeaders:p()}),c.tools=Me,c}var He=We()},12240:(e,t,o)=>{o.d(t,{Ch:()=>$,Di:()=>P,Kq:()=>j,hL:()=>h,iM:()=>X,u6:()=>k});var r,i,n,s,a="vercel.ai.error",l=Symbol.for(a),p=class e extends(i=Error,r=l,i){constructor({name:e,message:t,cause:o}){super(t),this[r]=!0,this.name=e,this.cause=o}static isInstance(t){return e.hasMarker(t,a)}static hasMarker(e,t){const o=Symbol.for(t);return null!=e&&"object"==typeof e&&o in e&&"boolean"==typeof e[o]&&!0===e[o]}},u="AI_APICallError",c=`vercel.ai.error.${u}`,d=Symbol.for(c),h=class extends(s=p,n=d,s){constructor({message:e,url:t,requestBodyValues:o,statusCode:r,responseHeaders:i,responseBody:s,cause:a,isRetryable:l=null!=r&&(408===r||409===r||429===r||r>=500),data:p}){super({name:u,message:e,cause:a}),this[n]=!0,this.url=t,this.requestBodyValues=o,this.statusCode=r,this.responseHeaders=i,this.responseBody=s,this.isRetryable=l,this.data=p}static isInstance(e){return p.hasMarker(e,c)}},f=Symbol.for("vercel.ai.error.AI_EmptyResponseBodyError");function g(e){return null==e?"unknown error":"string"==typeof e?e:e instanceof Error?e.message:JSON.stringify(e)}var m,y,v,C,w,E,_,b,R,S,O="AI_InvalidArgumentError",T=`vercel.ai.error.${O}`,A=Symbol.for(T),P=class extends(y=p,m=A,y){constructor({message:e,cause:t,argument:o}){super({name:O,message:e,cause:t}),this[m]=!0,this.argument=o}static isInstance(e){return p.hasMarker(e,T)}},I=Symbol.for("vercel.ai.error.AI_InvalidPromptError"),x=`vercel.ai.error.${"AI_InvalidResponseDataError"}`,D=Symbol.for(x),N="AI_JSONParseError",F=`vercel.ai.error.${N}`,M=Symbol.for(F),k=class extends(C=p,v=M,C){constructor({text:e,cause:t}){super({name:N,message:`JSON parsing failed: Text: ${e}.\nError message: ${g(t)}`,cause:t}),this[v]=!0,this.text=e}static isInstance(e){return p.hasMarker(e,F)}},L="AI_LoadAPIKeyError",G=`vercel.ai.error.${L}`,V=Symbol.for(G),j=class extends(E=p,w=V,E){constructor({message:e}){super({name:L,message:e}),this[w]=!0}static isInstance(e){return p.hasMarker(e,G)}},W=Symbol.for("vercel.ai.error.AI_LoadSettingError"),H=`vercel.ai.error.${"AI_NoContentGeneratedError"}`,B=Symbol.for(H),U=`vercel.ai.error.${"AI_NoSuchModelError"}`,z=Symbol.for(U),Y="AI_TooManyEmbeddingValuesForCallError",q=`vercel.ai.error.${Y}`,K=Symbol.for(q),$=class extends(b=p,_=K,b){constructor(e){super({name:Y,message:`Too many values for a single embedding call. The ${e.provider} model "${e.modelId}" can only embed up to ${e.maxEmbeddingsPerCall} values per call, but ${e.values.length} values were provided.`}),this[_]=!0,this.provider=e.provider,this.modelId=e.modelId,this.maxEmbeddingsPerCall=e.maxEmbeddingsPerCall,this.values=e.values}static isInstance(e){return p.hasMarker(e,q)}},Z="AI_TypeValidationError",J=`vercel.ai.error.${Z}`,Q=Symbol.for(J),X=class e extends(S=p,R=Q,S){constructor({value:e,cause:t}){super({name:Z,message:`Type validation failed: Value: ${JSON.stringify(e)}.\nError message: ${g(t)}`,cause:t}),this[R]=!0,this.value=e}static isInstance(e){return p.hasMarker(e,J)}static wrap({value:t,cause:o}){return e.isInstance(o)&&o.value===t?o:new e({value:t,cause:o})}},ee=Symbol.for("vercel.ai.error.AI_UnsupportedFunctionalityError")},12598:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.existingIds={}}return e.prototype.getInstanceIdForKey=function(e){var t,o=this.existingIds[e];return t="number"!=typeof o?0:o+1,this.existingIds[e]=t,t},e}();t.GroupInstanceIdCreator=o},13650:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a,l=o(22131),p=o(47721),u=o(72493),c=o(44081),d=o(83423);!function(e){e[e.MAIN=0]="MAIN",e[e.CONDITION=1]="CONDITION"}(a=t.FilterConditionType||(t.FilterConditionType={}));var h={loadingOoo:"Loading...",empty:"Choose One",equals:"Equals",notEqual:"Not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"In range",lessThanOrEqual:"Less than or equals",greaterThanOrEqual:"Greater than or equals",filterOoo:"Filter...",contains:"Contains",notContains:"Not contains",startsWith:"Starts with",endsWith:"Ends with",searchOoo:"Search...",selectAll:"Select All",applyFilter:"Apply Filter",clearFilter:"Clear Filter",andCondition:"AND",orCondition:"OR"},f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.customFilterOptions={},t}return i(t,e),t.prototype.init=function(e){var t=this;if(this.filterParams=e,this.defaultFilter=this.filterParams.defaultOption,e.filterOptions&&e.filterOptions.forEach((function(e){"string"!=typeof e&&(e.displayKey?e.displayName?e.test?t.customFilterOptions[e.displayKey]=e:console.warn("ag-Grid: ignoring FilterOptionDef as it doesn't contain a 'test'"):console.warn("ag-Grid: ignoring FilterOptionDef as it doesn't contain a 'displayName'"):console.warn("ag-Grid: ignoring FilterOptionDef as it doesn't contain a 'displayKey'"))})),this.filterParams.filterOptions&&!this.defaultFilter){var o=this.filterParams.filterOptions[0];"string"==typeof o?this.defaultFilter=o:o.displayKey?this.defaultFilter=o.displayKey:console.warn("ag-Grid: invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'")}this.customInit(),this.selectedFilter=this.defaultFilter,this.selectedFilterCondition=this.defaultFilter,this.clearActive=!0===e.clearButton,this.applyActive=!0===e.applyButton||!0===e.apply,this.newRowsActionKeep="keep"===e.newRowsAction,this.setTemplate(this.generateTemplate()),d._.setVisible(this.eApplyButton,this.applyActive),this.applyActive&&this.addDestroyableEventListener(this.eApplyButton,"click",this.filterParams.filterChangedCallback),d._.setVisible(this.eClearButton,this.clearActive),this.clearActive&&this.addDestroyableEventListener(this.eClearButton,"click",this.onClearButton.bind(this));var r=this.applyActive||this.clearActive;d._.setVisible(this.eButtonsPanel,r),this.initialiseFilterBodyUi(a.MAIN),this.refreshFilterBodyUi(a.MAIN)},t.prototype.onClearButton=function(){this.setModel(null),this.onFilterChanged()},t.prototype.floatingFilter=function(e){if(""!==e){var t=this.modelFromFloatingFilter(e);this.setModel(t)}else this.resetState();this.onFilterChanged()},t.prototype.onNewRowsLoaded=function(){this.newRowsActionKeep||this.resetState()},t.prototype.getModel=function(){return this.isFilterActive()?this.isFilterConditionActive(a.CONDITION)?{condition1:this.serialize(a.MAIN),condition2:this.serialize(a.CONDITION),operator:this.conditionValue}:this.serialize(a.MAIN):null},t.prototype.getNullableModel=function(){return this.isFilterConditionActive(a.CONDITION)?{condition1:this.serialize(a.MAIN),condition2:this.serialize(a.CONDITION),operator:this.conditionValue}:this.serialize(a.MAIN)},t.prototype.setModel=function(e){if(e)if(e.operator){var t=e;this.parse(t.condition1,a.MAIN),this.parse(t.condition2,a.CONDITION),this.conditionValue=t.operator}else this.resetState(),this.parse(e,a.MAIN);else this.resetState();this.redrawCondition(),this.refreshFilterBodyUi(a.MAIN),this.refreshFilterBodyUi(a.CONDITION)},t.prototype.doOnFilterChanged=function(e){void 0===e&&(e=!1),this.filterParams.filterModifiedCallback();var t=this.applyActive&&e,o=!this.applyActive||t;return o&&this.filterParams.filterChangedCallback(),this.refreshFilterBodyUi(a.MAIN),this.refreshFilterBodyUi(a.CONDITION),o},t.prototype.onFilterChanged=function(e){void 0===e&&(e=!1),this.doOnFilterChanged(e),this.redrawCondition(),this.refreshFilterBodyUi(a.MAIN),this.refreshFilterBodyUi(a.CONDITION)},t.prototype.redrawCondition=function(){var e=this,t=this.eFilterBodyWrapper.querySelector(".ag-filter-condition");if(!t&&this.isFilterActive()&&this.acceptsBooleanLogic()){this.eConditionWrapper=d._.loadTemplate(this.createConditionTemplate(a.CONDITION)),this.eFilterBodyWrapper.appendChild(this.eConditionWrapper),this.wireQuerySelectors();var o=this.refreshOperatorUi(),r=o.andButton,i=o.orButton;this.addDestroyableEventListener(r,"change",(function(){e.conditionValue="AND",e.onFilterChanged()})),this.addDestroyableEventListener(i,"change",(function(){e.conditionValue="OR",e.onFilterChanged()})),this.initialiseFilterBodyUi(a.CONDITION)}else t&&!this.isFilterActive()?(this.conditionValue="AND",this.resetState(!0),this.eFilterBodyWrapper.removeChild(this.eConditionWrapper),this.eConditionWrapper=null):(this.refreshFilterBodyUi(a.CONDITION),this.eConditionWrapper&&this.refreshOperatorUi())},t.prototype.refreshOperatorUi=function(){var e=this.eConditionWrapper.querySelector(".and"),t=this.eConditionWrapper.querySelector(".or");return this.conditionValue=null==this.conditionValue?"AND":this.conditionValue,e.checked="AND"===this.conditionValue,t.checked="OR"===this.conditionValue,{andButton:e,orButton:t}},t.prototype.onFloatingFilterChanged=function(e){var t=e;if(null==t)this.setModel(null);else if(this.isFilterConditionActive(a.CONDITION)){var o={condition1:t.model,condition2:this.serialize(a.CONDITION),operator:this.conditionValue};this.setModel(o)}else this.setModel(t?t.model:null);return this.doOnFilterChanged(!!t&&t.apply)},t.prototype.generateFilterHeader=function(e){return""},t.prototype.generateTemplate=function(){var e=this.translate.bind(this),t=this.createConditionBody(a.MAIN);return"<div>\n <div class='ag-filter-body-wrapper'>"+(this.acceptsBooleanLogic()?this.wrapCondition(t):t)+'</div>\n <div class="ag-filter-apply-panel" id="applyPanel">\n <button type="button" id="clearButton">'+e("clearFilter")+'</button>\n <button type="button" id="applyButton">'+e("applyFilter")+"</button>\n </div>\n </div>"},t.prototype.acceptsBooleanLogic=function(){return!1},t.prototype.wrapCondition=function(e){return this.isFilterActive()?""+e+this.createConditionTemplate(a.CONDITION):e},t.prototype.createConditionTemplate=function(e){return'<div class="ag-filter-condition">\n <input id="andId" type="radio" class="and" name="booleanLogic" value='+this.translate("AND")+'\n checked="checked" /><label style="display: inline" for="andId">'+this.translate("andCondition")+'</label>\n <input id="orId" type="radio" class="or" name="booleanLogic" value="OR" /><label style="display: inline"\n for="orId">'+this.translate("orCondition")+"</label>\n <div>"+this.createConditionBody(e)+"</div>\n </div>"},t.prototype.createConditionBody=function(e){var t=this.bodyTemplate(e);return this.generateFilterHeader(e)+t},t.prototype.translate=function(e){var t=this.gridOptionsWrapper.getLocaleTextFunc(),o=h[e];return!o&&this.customFilterOptions[e]&&(o=this.customFilterOptions[e].displayName),t(e,o)},t.prototype.getDebounceMs=function(e){return this.applyActive?(null!=e.debounceMs&&console.warn("ag-Grid: debounceMs is ignored when applyButton = true"),0):null!=e.debounceMs?e.debounceMs:500},t.prototype.doesFilterHaveHiddenInput=function(e){var t=this.customFilterOptions[e];return t&&t.hideFilterInput},t.EMPTY="empty",t.EQUALS="equals",t.NOT_EQUAL="notEqual",t.LESS_THAN="lessThan",t.LESS_THAN_OR_EQUAL="lessThanOrEqual",t.GREATER_THAN="greaterThan",t.GREATER_THAN_OR_EQUAL="greaterThanOrEqual",t.IN_RANGE="inRange",t.CONTAINS="contains",t.NOT_CONTAINS="notContains",t.STARTS_WITH="startsWith",t.ENDS_WITH="endsWith",n([p.QuerySelector("#applyPanel"),s("design:type",HTMLElement)],t.prototype,"eButtonsPanel",void 0),n([p.QuerySelector(".ag-filter-body-wrapper"),s("design:type",HTMLElement)],t.prototype,"eFilterBodyWrapper",void 0),n([p.QuerySelector("#applyButton"),s("design:type",HTMLElement)],t.prototype,"eApplyButton",void 0),n([p.QuerySelector("#clearButton"),s("design:type",HTMLElement)],t.prototype,"eClearButton",void 0),n([u.Autowired("gridOptionsWrapper"),s("design:type",c.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),t}(l.Component);t.BaseFilter=f;var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.doesFilterPass=function(e){var t=this.individualFilterPasses(e,a.MAIN);if(null==this.eTypeConditionSelector)return t;var o=this.individualFilterPasses(e,a.CONDITION);return"AND"===this.conditionValue?t&&o:t||o},t.prototype.init=function(t){e.prototype.init.call(this,t),this.suppressAndOrCondition=t.suppressAndOrCondition},t.prototype.customInit=function(){this.defaultFilter||(this.defaultFilter=this.getDefaultType())},t.prototype.acceptsBooleanLogic=function(){return!0!==this.suppressAndOrCondition},t.prototype.generateFilterHeader=function(e){var t=this,o=this.getApplicableFilterTypes(),r=(this.filterParams.filterOptions||o).map((function(e){var o="string"==typeof e?e:e.displayKey;return'<option value="'+o+'">'+t.translate(o)+"</option>"})),i=1==r.length?"disabled":"",n=e==a.MAIN?"filterType":"filterConditionType";return r.length<=0?"":'<div>\n <select class="ag-filter-select" id="'+n+'" '+i+">\n "+r.join("")+"\n </select>\n </div>"},t.prototype.initialiseFilterBodyUi=function(e){var t=this;e===a.MAIN?(this.setFilterType(this.selectedFilter,e),this.addDestroyableEventListener(this.eTypeSelector,"change",(function(){return t.onFilterTypeChanged(e)}))):(this.setFilterType(this.selectedFilterCondition,e),this.addDestroyableEventListener(this.eTypeConditionSelector,"change",(function(){return t.onFilterTypeChanged(e)})))},t.prototype.onFilterTypeChanged=function(e){var t=this.selectedFilter;e===a.MAIN?this.selectedFilter=this.eTypeSelector.value:this.selectedFilterCondition=this.eTypeConditionSelector.value,this.refreshFilterBodyUi(e);var o=this.doesFilterHaveHiddenInput(t);(this.isFilterActive()||o)&&(this.selectedFilter===f.EMPTY&&this.resetState(),this.onFilterChanged())},t.prototype.isFilterActive=function(){if(this.doesFilterHaveHiddenInput(this.selectedFilter))return!0;var e=this.filterValues(a.MAIN);if(e&&this.selectedFilter===f.IN_RANGE){var t=e;return null!=t[0]&&null!=t[1]}return null!=e},t.prototype.setFilterType=function(e,t){if(t===a.MAIN){if(this.selectedFilter=e,!this.eTypeSelector)return;this.eTypeSelector.value=e}else{if(this.selectedFilterCondition=e,!this.eTypeConditionSelector)return;this.eTypeConditionSelector.value=e}},t.prototype.isFilterConditionActive=function(e){return null!=this.filterValues(e)},n([p.QuerySelector("#filterType"),s("design:type",HTMLSelectElement)],t.prototype,"eTypeSelector",void 0),n([p.QuerySelector("#filterConditionType"),s("design:type",HTMLSelectElement)],t.prototype,"eTypeConditionSelector",void 0),t}(f);t.ComparableBaseFilter=g;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.nullComparator=function(e){var t=this;return function(o,r){if(null==r){var i=t.translateNull(e);if(t.selectedFilter===f.EMPTY)return 0;if(t.selectedFilter===f.EQUALS)return i?0:1;if(t.selectedFilter===f.GREATER_THAN)return i?1:-1;if(t.selectedFilter===f.GREATER_THAN_OR_EQUAL)return i?1:-1;if(t.selectedFilter===f.LESS_THAN_OR_EQUAL)return i?-1:1;if(t.selectedFilter===f.LESS_THAN)return i?-1:1;if(t.selectedFilter===f.NOT_EQUAL)return i?1:0}return t.comparator()(o,r)}},t.prototype.getDefaultType=function(){return f.EQUALS},t.prototype.translateNull=function(e){var o=e.indexOf("greater")>-1?"greaterThan":e.indexOf("lessThan")>-1?"lessThan":"equals";return this.filterParams.nullComparator&&this.filterParams.nullComparator[o]?this.filterParams.nullComparator[o]:t.DEFAULT_NULL_COMPARATOR[o]},t.prototype.individualFilterPasses=function(e,t){return this.doIndividualFilterPasses(e,t,t===a.MAIN?this.selectedFilter:this.selectedFilterCondition)},t.prototype.doIndividualFilterPasses=function(e,t,o){var r=this.filterParams.valueGetter(e.node),i=this.filterValues(t),n=Array.isArray(i)?i[0]:i,s=this.customFilterOptions[o];if(s&&(null!=n||s.hideFilterInput))return s.test(n,r);if(null==n)return t===a.MAIN||"AND"===this.conditionValue;var l=this.nullComparator(o),p=l(n,r);if(o===f.EMPTY)return!1;if(o===f.EQUALS)return 0===p;if(o===f.GREATER_THAN)return p>0;if(o===f.GREATER_THAN_OR_EQUAL)return p>=0;if(o===f.LESS_THAN_OR_EQUAL)return p<=0;if(o===f.LESS_THAN)return p<0;if(o===f.NOT_EQUAL)return 0!=p;var u=l(i[1],r);if(o===f.IN_RANGE)return this.filterParams.inRangeInclusive?p>=0&&u<=0:p>0&&u<0;throw new Error("Unexpected type of filter: "+o)},t.DEFAULT_NULL_COMPARATOR={equals:!1,lessThan:!1,greaterThan:!1},t}(g);t.ScalarBaseFilter=m},13887:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(60843),a=o(85786),l=o(98239),p=o(44871),u=o(40797),c=o(44081),d=function(){function e(){}return e.prototype.setScrollsVisible=function(e){if(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing){this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing;var t={type:a.Events.EVENT_SCROLL_VISIBILITY_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)}},e.prototype.isHorizontalScrollShowing=function(){return this.horizontalScrollShowing},e.prototype.isVerticalScrollShowing=function(){return this.verticalScrollShowing},r([n.Autowired("eventService"),i("design:type",s.EventService)],e.prototype,"eventService",void 0),r([n.Autowired("columnController"),i("design:type",l.ColumnController)],e.prototype,"columnController",void 0),r([n.Autowired("columnApi"),i("design:type",p.ColumnApi)],e.prototype,"columnApi",void 0),r([n.Autowired("gridApi"),i("design:type",u.GridApi)],e.prototype,"gridApi",void 0),r([n.Autowired("gridOptionsWrapper"),i("design:type",c.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.Bean("scrollVisibleService")],e)}();t.ScrollVisibleService=d},15068:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(60843),s=o(85786),a=o(44081),l=o(54828),p=o(24463),u=o(98239),c=o(44871),d=o(72493),h=o(45727),f=o(88842),g=o(40797),m=o(83423),y=function(){function e(){this.childrenMapped={},this.selectable=!0,this.__objectId=e.OBJECT_ID_SEQUENCE++,this.alreadyRendered=!1,this.selected=!1}return e.prototype.setData=function(e){var t=this.data;this.data=e,this.valueCache.onDataChanged(),this.updateDataOnDetailNode(),this.checkRowSelectable();var o=this.createDataChangedEvent(e,t,!1);this.dispatchLocalEvent(o)},e.prototype.updateDataOnDetailNode=function(){this.detailNode&&(this.detailNode.data=this.data)},e.prototype.createDataChangedEvent=function(t,o,r){return{type:e.EVENT_DATA_CHANGED,node:this,oldData:o,newData:t,update:r}},e.prototype.createLocalRowEvent=function(e){return{type:e,node:this}},e.prototype.updateData=function(e){var t=this.data;this.data=e,this.updateDataOnDetailNode(),this.checkRowSelectable(),this.updateDataOnDetailNode();var o=this.createDataChangedEvent(e,t,!0);this.dispatchLocalEvent(o)},e.prototype.getRowIndexString=function(){return this.rowPinned===h.Constants.PINNED_TOP?"t-"+this.rowIndex:this.rowPinned===h.Constants.PINNED_BOTTOM?"b-"+this.rowIndex:this.rowIndex.toString()},e.prototype.createDaemonNode=function(){var t=new e;return this.context.wireBean(t),t.id=this.id,t.data=this.data,t.daemon=!0,t.selected=this.selected,t.level=this.level,t},e.prototype.setDataAndId=function(e,t){var o=m._.exists(this.id)?this.createDaemonNode():null,r=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),this.selectionController.syncInRowNode(this,o),this.checkRowSelectable();var i=this.createDataChangedEvent(e,r,!1);this.dispatchLocalEvent(i)},e.prototype.checkRowSelectable=function(){var e=this.gridOptionsWrapper.getIsRowSelectableFunc(),t=e&&m._.exists(this);this.setRowSelectable(!t||e(this))},e.prototype.setRowSelectable=function(t){this.selectable!==t&&(this.selectable=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_SELECTABLE_CHANGED)))},e.prototype.setId=function(e){var t=this.gridOptionsWrapper.getRowNodeIdFunc();t?this.data?this.id=t(this.data):this.id=void 0:this.id=e},e.prototype.isPixelInRange=function(e){return e>=this.rowTop&&e<this.rowTop+this.rowHeight},e.prototype.clearRowTop=function(){this.oldRowTop=this.rowTop,this.setRowTop(null)},e.prototype.setFirstChild=function(t){this.firstChild!==t&&(this.firstChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_FIRST_CHILD_CHANGED)))},e.prototype.setLastChild=function(t){this.lastChild!==t&&(this.lastChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_LAST_CHILD_CHANGED)))},e.prototype.setChildIndex=function(t){this.childIndex!==t&&(this.childIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_CHILD_INDEX_CHANGED)))},e.prototype.setRowTop=function(t){this.rowTop!==t&&(this.rowTop=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_TOP_CHANGED)))},e.prototype.setDragging=function(t){this.dragging!==t&&(this.dragging=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_DRAGGING_CHANGED)))},e.prototype.setAllChildrenCount=function(t){this.allChildrenCount!==t&&(this.allChildrenCount=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_ALL_CHILDREN_COUNT_CHANGED)))},e.prototype.setRowHeight=function(t,o){void 0===o&&(o=!1),this.rowHeight=t,this.rowHeightEstimated=o,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HEIGHT_CHANGED))},e.prototype.setRowIndex=function(t){this.rowIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_ROW_INDEX_CHANGED))},e.prototype.setUiLevel=function(t){this.uiLevel!==t&&(this.uiLevel=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_UI_LEVEL_CHANGED)))},e.prototype.setExpanded=function(t){if(this.expanded!==t){this.expanded=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_EXPANDED_CHANGED));var o=this.createGlobalRowEvent(s.Events.EVENT_ROW_GROUP_OPENED);this.mainEventService.dispatchEvent(o),this.gridOptionsWrapper.isGroupIncludeFooter()&&this.gridApi.redrawRows({rowNodes:[this]})}},e.prototype.createGlobalRowEvent=function(e){return{type:e,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned,context:this.gridOptionsWrapper.getContext(),api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi()}},e.prototype.dispatchLocalEvent=function(e){this.eventService&&this.eventService.dispatchEvent(e)},e.prototype.setDataValue=function(e,t){var o=this.columnController.getPrimaryColumn(e);this.valueService.setValue(this,o,t),this.dispatchCellChangedEvent(o,t)},e.prototype.setGroupValue=function(e,t){var o=this.columnController.getGridColumn(e);m._.missing(this.groupData)&&(this.groupData={}),this.groupData[o.getColId()]=t,this.dispatchCellChangedEvent(o,t)},e.prototype.setAggData=function(e){var t=this,o=m._.getAllKeysInObjects([this.aggData,e]);this.aggData=e,this.eventService&&o.forEach((function(e){var o=t.columnController.getGridColumn(e),r=t.aggData?t.aggData[e]:void 0;t.dispatchCellChangedEvent(o,r)}))},e.prototype.hasChildren=function(){return this.group||this.childrenAfterGroup&&this.childrenAfterGroup.length>0},e.prototype.isEmptyFillerNode=function(){return this.group&&m._.missingOrEmpty(this.childrenAfterGroup)},e.prototype.dispatchCellChangedEvent=function(t,o){var r={type:e.EVENT_CELL_CHANGED,node:this,column:t,newValue:o};this.dispatchLocalEvent(r)},e.prototype.resetQuickFilterAggregateText=function(){this.quickFilterAggregateText=null},e.prototype.isExpandable=function(){return this.hasChildren()||this.master},e.prototype.isSelected=function(){return this.footer?this.sibling.isSelected():this.selected},e.prototype.depthFirstSearch=function(e){this.childrenAfterGroup&&this.childrenAfterGroup.forEach((function(t){return t.depthFirstSearch(e)})),e(this)},e.prototype.calculateSelectedFromChildren=function(){var e,t=!1,o=!1,r=!1;if(this.childrenAfterGroup)for(var i=0;i<this.childrenAfterGroup.length;i++){var n=this.childrenAfterGroup[i];if(n.selectable)switch(n.isSelected()){case!0:t=!0;break;case!1:o=!0;break;default:r=!0}}e=r?void 0:!(!t||o)||!(!t&&o)&&void 0,this.selectThisNode(e)},e.prototype.setSelectedInitialValue=function(e){this.selected=e},e.prototype.setSelected=function(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=!1),this.setSelectedParams({newValue:e,clearSelection:t,suppressFinishActions:o,rangeSelect:!1})},e.prototype.isRowPinned=function(){return this.rowPinned===h.Constants.PINNED_TOP||this.rowPinned===h.Constants.PINNED_BOTTOM},e.prototype.setSelectedParams=function(e){var t=this.gridOptionsWrapper.isGroupSelectsChildren(),o=!0===e.newValue,r=!0===e.clearSelection,i=!0===e.suppressFinishActions,n=!0===e.rangeSelect,a=t&&!0===e.groupSelectsFiltered;if(void 0===this.id)return console.warn("ag-Grid: cannot select node until id for node is known"),0;if(this.rowPinned)return console.warn("ag-Grid: cannot select pinned rows"),0;if(this.footer)return this.sibling.setSelectedParams(e);if(n){var l=this.selectionController.getLastSelectedNode()!==this,p=this.gridOptionsWrapper.isRowSelectionMulti();if(l&&p)return this.doRowRangeSelection()}var u=0;if(a&&this.group||this.selectThisNode(o)&&u++,t&&this.group&&(u+=this.selectChildNodes(o,a)),!i){if(o&&(r||!this.gridOptionsWrapper.isRowSelectionMulti())&&(u+=this.selectionController.clearOtherNodes(this)),u>0){this.selectionController.updateGroupsFromChildrenSelections();var c={type:s.Events.EVENT_SELECTION_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.mainEventService.dispatchEvent(c)}o&&this.selectionController.setLastSelectedNode(this)}return u},e.prototype.doRowRangeSelection=function(){var e=0,t=this.gridOptionsWrapper.isGroupSelectsChildren(),o=this.selectionController.getLastSelectedNode();this.rowModel.getNodesInRangeForSelection(this,o).forEach((function(o){o.group&&t||o.selectThisNode(!0)&&e++})),this.selectionController.updateGroupsFromChildrenSelections();var r={type:s.Events.EVENT_SELECTION_CHANGED,api:this.gridApi,columnApi:this.columnApi};return this.mainEventService.dispatchEvent(r),e},e.prototype.isParentOfNode=function(e){for(var t=this.parent;t;){if(t===e)return!0;t=t.parent}return!1},e.prototype.selectThisNode=function(t){if(!this.selectable||this.selected===t)return!1;this.selected=t,this.eventService&&this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_ROW_SELECTED));var o=this.createGlobalRowEvent(s.Events.EVENT_ROW_SELECTED);return this.mainEventService.dispatchEvent(o),!0},e.prototype.selectChildNodes=function(e,t){var o=t?this.childrenAfterFilter:this.childrenAfterGroup,r=0;if(!m._.missing(o)){for(var i=0;i<o.length;i++)r+=o[i].setSelectedParams({newValue:e,clearSelection:!1,suppressFinishActions:!0,groupSelectsFiltered:t});return r}},e.prototype.addEventListener=function(e,t){this.eventService||(this.eventService=new n.EventService),this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService.removeEventListener(e,t)},e.prototype.onMouseEnter=function(){this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_MOUSE_ENTER))},e.prototype.onMouseLeave=function(){this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_MOUSE_LEAVE))},e.prototype.getFirstChildOfFirstChild=function(e){for(var t,o=this,r=!0,i=!1;r&&!i;){var n=o.parent;m._.exists(n)&&o.firstChild?n.rowGroupColumn===e&&(i=!0,t=n):r=!1,o=n}return i?t:null},e.OBJECT_ID_SEQUENCE=0,e.EVENT_ROW_SELECTED="rowSelected",e.EVENT_DATA_CHANGED="dataChanged",e.EVENT_CELL_CHANGED="cellChanged",e.EVENT_ALL_CHILDREN_COUNT_CHANGED="allChildrenCountChanged",e.EVENT_MOUSE_ENTER="mouseEnter",e.EVENT_MOUSE_LEAVE="mouseLeave",e.EVENT_HEIGHT_CHANGED="heightChanged",e.EVENT_TOP_CHANGED="topChanged",e.EVENT_FIRST_CHILD_CHANGED="firstChildChanged",e.EVENT_LAST_CHILD_CHANGED="lastChildChanged",e.EVENT_CHILD_INDEX_CHANGED="childIndexChanged",e.EVENT_ROW_INDEX_CHANGED="rowIndexChanged",e.EVENT_EXPANDED_CHANGED="expandedChanged",e.EVENT_SELECTABLE_CHANGED="selectableChanged",e.EVENT_UI_LEVEL_CHANGED="uiLevelChanged",e.EVENT_DRAGGING_CHANGED="draggingChanged",r([d.Autowired("eventService"),i("design:type",n.EventService)],e.prototype,"mainEventService",void 0),r([d.Autowired("gridOptionsWrapper"),i("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([d.Autowired("selectionController"),i("design:type",l.SelectionController)],e.prototype,"selectionController",void 0),r([d.Autowired("columnController"),i("design:type",u.ColumnController)],e.prototype,"columnController",void 0),r([d.Autowired("valueService"),i("design:type",p.ValueService)],e.prototype,"valueService",void 0),r([d.Autowired("rowModel"),i("design:type",Object)],e.prototype,"rowModel",void 0),r([d.Autowired("context"),i("design:type",d.Context)],e.prototype,"context",void 0),r([d.Autowired("valueCache"),i("design:type",f.ValueCache)],e.prototype,"valueCache",void 0),r([d.Autowired("columnApi"),i("design:type",c.ColumnApi)],e.prototype,"columnApi",void 0),r([d.Autowired("gridApi"),i("design:type",g.GridApi)],e.prototype,"gridApi",void 0),e}();t.RowNode=y},15724:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(46379),l=o(72493),p=o(44081),u=o(83423),c=function(e){function t(t){var o=e.call(this,'<div class="ag-popup-editor" tabindex="-1"/>')||this;return o.getGuiCalledOnChild=!1,o.cellEditor=t,o}return i(t,e),t.prototype.onKeyDown=function(e){u._.isUserSuppressingKeyboardEvent(this.gridOptionsWrapper,e,this.params.node,this.params.column,!0)||this.params.onKeyDown(e)},t.prototype.getGui=function(){return this.getGuiCalledOnChild||(this.appendChild(this.cellEditor.getGui()),this.getGuiCalledOnChild=!0),e.prototype.getGui.call(this)},t.prototype.init=function(o){var r=this;this.params=o,this.gridOptionsWrapper.setDomData(this.getGui(),t.DOM_KEY_POPUP_EDITOR_WRAPPER,!0),this.addDestroyFunc((function(){r.cellEditor.destroy&&r.cellEditor.destroy()})),this.addDestroyableEventListener(e.prototype.getGui.call(this),"keydown",this.onKeyDown.bind(this))},t.prototype.afterGuiAttached=function(){this.cellEditor.afterGuiAttached&&this.cellEditor.afterGuiAttached()},t.prototype.getValue=function(){return this.cellEditor.getValue()},t.prototype.isCancelBeforeStart=function(){if(this.cellEditor.isCancelBeforeStart)return this.cellEditor.isCancelBeforeStart()},t.prototype.isCancelAfterEnd=function(){if(this.cellEditor.isCancelAfterEnd)return this.cellEditor.isCancelAfterEnd()},t.prototype.focusIn=function(){this.cellEditor.focusIn&&this.cellEditor.focusIn()},t.prototype.focusOut=function(){this.cellEditor.focusOut&&this.cellEditor.focusOut()},t.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper",n([l.Autowired("gridOptionsWrapper"),s("design:type",p.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),t}(a.PopupComponent);t.PopupEditorWrapper=c},15774:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a,l=o(22131),p=o(72493),u=o(44081),c=o(98239),d=o(26016),h=o(60843),f=o(85786),g=o(78481),m=o(18985),y=o(55e3),v=o(40797),C=o(45727),w=o(83423),E=o(32590);!function(e){e[e.COLUMN_GROUP=0]="COLUMN_GROUP",e[e.COLUMN=1]="COLUMN",e[e.FLOATING_FILTER=2]="FLOATING_FILTER"}(a=t.HeaderRowType||(t.HeaderRowType={}));var _=function(e){function t(t,o,r,i){var n=e.call(this,'<div class="ag-header-row" role="presentation"/>')||this;return n.headerComps={},n.dept=t,n.type=o,n.pinned=r,n.dropTarget=i,n}return i(t,e),t.prototype.forEachHeaderElement=function(e){var t=this;Object.keys(this.headerComps).forEach((function(o){e(t.headerComps[o])}))},t.prototype.destroy=function(){var t=Object.keys(this.headerComps);this.removeAndDestroyChildComponents(t),e.prototype.destroy.call(this)},t.prototype.removeAndDestroyChildComponents=function(e){var t=this;e.forEach((function(e){var o=t.headerComps[e];t.getGui().removeChild(o.getGui()),o.destroy(),delete t.headerComps[e]}))},t.prototype.onRowHeightChanged=function(){var e,t,o=this.columnController.getHeaderRowCount(),r=[],i=0;this.columnController.isPivotMode()?(i=0,e=this.gridOptionsWrapper.getPivotGroupHeaderHeight(),t=this.gridOptionsWrapper.getPivotHeaderHeight()):(this.gridOptionsWrapper.isFloatingFilter()&&o++,i=this.gridOptionsWrapper.isFloatingFilter()?1:0,e=this.gridOptionsWrapper.getGroupHeaderHeight(),t=this.gridOptionsWrapper.getHeaderHeight());for(var n=o-(1+i),s=0;s<n;s++)r.push(e);for(r.push(t),s=0;s<i;s++)r.push(this.gridOptionsWrapper.getFloatingFiltersHeight());var a=0;for(s=0;s<this.dept;s++)a+=r[s];this.getGui().style.top=a+"px",this.getGui().style.height=r[this.dept]+"px"},t.prototype.init=function(){this.onRowHeightChanged(),this.onVirtualColumnsChanged(),this.setWidth(),this.addDestroyableEventListener(this.gridOptionsWrapper,u.GridOptionsWrapper.PROP_HEADER_HEIGHT,this.onRowHeightChanged.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,u.GridOptionsWrapper.PROP_PIVOT_HEADER_HEIGHT,this.onRowHeightChanged.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,u.GridOptionsWrapper.PROP_GROUP_HEADER_HEIGHT,this.onRowHeightChanged.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,u.GridOptionsWrapper.PROP_PIVOT_GROUP_HEADER_HEIGHT,this.onRowHeightChanged.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,u.GridOptionsWrapper.PROP_FLOATING_FILTERS_HEIGHT,this.onRowHeightChanged.bind(this)),this.addDestroyableEventListener(this.eventService,f.Events.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addDestroyableEventListener(this.eventService,f.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addDestroyableEventListener(this.eventService,f.Events.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addDestroyableEventListener(this.eventService,f.Events.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this))},t.prototype.onColumnResized=function(){this.setWidth()},t.prototype.setWidth=function(){var e=this.getWidthForRow();this.getGui().style.width=e+"px"},t.prototype.getWidthForRow=function(){return this.gridOptionsWrapper.getDomLayout()===C.Constants.DOM_LAYOUT_PRINT?w._.missing(this.pinned)?this.columnController.getContainerWidth(d.Column.PINNED_RIGHT)+this.columnController.getContainerWidth(d.Column.PINNED_LEFT)+this.columnController.getContainerWidth(null):0:this.columnController.getContainerWidth(this.pinned)},t.prototype.onGridColumnsChanged=function(){this.removeAndDestroyAllChildComponents()},t.prototype.removeAndDestroyAllChildComponents=function(){var e=Object.keys(this.headerComps);this.removeAndDestroyChildComponents(e)},t.prototype.onDisplayedColumnsChanged=function(){this.onVirtualColumnsChanged(),this.setWidth()},t.prototype.getItemsAtDept=function(){var e=this;if(this.gridOptionsWrapper.getDomLayout()===C.Constants.DOM_LAYOUT_PRINT){if(w._.missing(this.pinned)){var t=[];return[d.Column.PINNED_LEFT,null,d.Column.PINNED_RIGHT].forEach((function(o){var r=e.columnController.getVirtualHeaderGroupRow(o,e.type==a.FLOATING_FILTER?e.dept-1:e.dept);t=t.concat(r)})),t}return[]}return this.columnController.getVirtualHeaderGroupRow(this.pinned,this.type==a.FLOATING_FILTER?this.dept-1:this.dept)},t.prototype.onVirtualColumnsChanged=function(){var e,t=this,o=Object.keys(this.headerComps),r=this.getItemsAtDept(),i=this.gridOptionsWrapper.isEnsureDomOrder();r.forEach((function(r){if(!r.isEmptyGroup()){var n,s,a=r.getUniqueId(),l=t.getGui();o.indexOf(a)>=0?(w._.removeFromArray(o,a),s=(n=t.headerComps[a]).getGui(),i&&w._.ensureDomOrder(l,s,e),e=s):(n=t.createHeaderComp(r),t.headerComps[a]=n,s=n.getGui(),i?w._.insertWithDomOrder(l,s,e):l.appendChild(s),e=s)}})),this.removeAndDestroyChildComponents(o)},t.prototype.createHeaderComp=function(e){var t;switch(this.type){case a.COLUMN:t=new g.HeaderWrapperComp(e,this.dropTarget,this.pinned);break;case a.COLUMN_GROUP:t=new m.HeaderGroupWrapperComp(e,this.dropTarget,this.pinned);break;case a.FLOATING_FILTER:t=new E.FloatingFilterWrapper(e)}return this.getContext().wireBean(t),t},n([p.Autowired("gridOptionsWrapper"),s("design:type",u.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([p.Autowired("gridApi"),s("design:type",v.GridApi)],t.prototype,"gridApi",void 0),n([p.Autowired("columnController"),s("design:type",c.ColumnController)],t.prototype,"columnController",void 0),n([p.Autowired("eventService"),s("design:type",h.EventService)],t.prototype,"eventService",void 0),n([p.Autowired("filterManager"),s("design:type",y.FilterManager)],t.prototype,"filterManager",void 0),n([p.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"init",null),t}(l.Component);t.HeaderRowComp=_},15959:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var n=o(22131),s=o(83423),a=function(e){function t(){var o=e.call(this,t.TEMPLATE)||this;return o.refreshCount=0,o}return i(t,e),t.prototype.init=function(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e)},t.prototype.showDelta=function(e,t){var o=Math.abs(t),r=e.formatValue(o),i=s._.exists(r)?r:o,n=t>=0;this.eDelta.innerHTML=n?"↑"+i:"↓"+i,s._.addOrRemoveCssClass(this.eDelta,"ag-value-change-delta-up",n),s._.addOrRemoveCssClass(this.eDelta,"ag-value-change-delta-down",!n)},t.prototype.setTimerToRemoveDelta=function(){var e=this;this.refreshCount++;var t=this.refreshCount;window.setTimeout((function(){t===e.refreshCount&&e.hideDeltaValue()}),2e3)},t.prototype.hideDeltaValue=function(){s._.removeCssClass(this.eValue,"ag-value-change-value-highlight"),s._.clearElement(this.eDelta)},t.prototype.refresh=function(e){var t=e.value;if(t!==this.lastValue){if(s._.exists(e.valueFormatted)?this.eValue.innerHTML=e.valueFormatted:s._.exists(e.value)?this.eValue.innerHTML=t:s._.clearElement(this.eValue),"number"==typeof t&&"number"==typeof this.lastValue){var o=t-this.lastValue;this.showDelta(e,o)}return this.lastValue&&s._.addCssClass(this.eValue,"ag-value-change-value-highlight"),this.setTimerToRemoveDelta(),this.lastValue=t,!0}},t.TEMPLATE='<span><span class="ag-value-change-delta"></span><span class="ag-value-change-value"></span></span>',t}(n.Component);t.AnimateShowChangeCellRenderer=a},18954:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(44081),a=o(2461),l=o(86608),p=o(98239),u=o(83423),c=function(){function e(){}return e.prototype.execute=function(e){var t=this.sortController.getSortForRowController(),o=u._.exists(t)&&t.length>0,r=o&&u._.exists(e.rowNodeTransactions)&&this.gridOptionsWrapper.isDeltaSort(),i=r?this.calculateDirtyNodes(e.rowNodeTransactions):null,n=this.columnController.getValueColumns(),s=u._.missingOrEmpty(n);this.sortService.sort(t,o,r,i,e.changedPath,s)},e.prototype.calculateDirtyNodes=function(e){var t={},o=function(e){e&&e.forEach((function(e){return t[e.id]=!0}))};return e.forEach((function(e){o(e.add),o(e.update),o(e.remove)})),t},r([n.Autowired("gridOptionsWrapper"),i("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.Autowired("sortService"),i("design:type",a.SortService)],e.prototype,"sortService",void 0),r([n.Autowired("sortController"),i("design:type",l.SortController)],e.prototype,"sortController",void 0),r([n.Autowired("columnController"),i("design:type",p.ColumnController)],e.prototype,"columnController",void 0),r([n.Bean("sortStage")],e)}();t.SortStage=c},18985:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(22131),l=o(26016),p=o(74517),u=o(44871),c=o(98239),d=o(44081),h=o(97177),f=o(72493),g=o(34506),m=o(58342),y=o(38152),v=o(40797),C=o(85910),w=o(55090),E=o(81604),_=o(83423),b=function(e){function t(o,r,i){var n=e.call(this,t.TEMPLATE)||this;return n.childColumnsDestroyFuncs=[],n.columnGroup=o,n.dragSourceDropTarget=r,n.pinned=i,n}return i(t,e),t.prototype.postConstruct=function(){g.CssClassApplier.addHeaderClassesFromColDef(this.getComponentHolder(),this.getGui(),this.gridOptionsWrapper,null,this.columnGroup);var e=this.columnController.getDisplayNameForColumnGroup(this.columnGroup,"header");this.appendHeaderGroupComp(e),this.setupResize(),this.addClasses(),this.setupWidth(),this.addAttributes(),this.setupMovingCss(),this.setupTooltip(),this.addFeature(this.getContext(),new E.HoverFeature(this.columnGroup.getOriginalColumnGroup().getLeafColumns(),this.getGui()));var t=new y.SetLeftFeature(this.columnGroup,this.getGui(),this.beans);t.init(),this.addDestroyFunc(t.destroy.bind(t))},t.prototype.setupMovingCss=function(){var e=this;this.columnGroup.getOriginalColumnGroup().getLeafColumns().forEach((function(t){e.addDestroyableEventListener(t,l.Column.EVENT_MOVING_CHANGED,e.onColumnMovingChanged.bind(e))})),this.onColumnMovingChanged()},t.prototype.getComponentHolder=function(){return this.columnGroup.getColGroupDef()},t.prototype.getTooltipText=function(){var e=this.getComponentHolder();return e&&e.headerTooltip},t.prototype.setupTooltip=function(){var e=this.getTooltipText();null!=e&&(this.gridOptionsWrapper.isEnableBrowserTooltips()?this.getGui().setAttribute("title",e):this.beans.tooltipManager.registerTooltip(this))},t.prototype.onColumnMovingChanged=function(){_._.addOrRemoveCssClass(this.getGui(),"ag-header-cell-moving",this.columnGroup.isMoving())},t.prototype.addAttributes=function(){this.getGui().setAttribute("col-id",this.columnGroup.getUniqueId())},t.prototype.appendHeaderGroupComp=function(e){var t=this,o={displayName:e,columnGroup:this.columnGroup,setExpanded:function(e){t.columnController.setColumnGroupOpened(t.columnGroup.getOriginalColumnGroup(),e,"gridInitializing")},api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsWrapper.getContext()};if(!e){for(var r=this.columnGroup,i=r.getLeafColumns();r.getParent()&&r.getParent().getLeafColumns().length===i.length;)r=r.getParent();var n=r.getColGroupDef();n&&(e=n.headerName),e||(e=i?this.columnController.getDisplayNameForColumn(i[0],"header",!0):"")}var s=this.afterHeaderCompCreated.bind(this,e);this.userComponentFactory.newHeaderGroupComponent(o).then(s)},t.prototype.afterHeaderCompCreated=function(e,t){this.appendChild(t),this.setupMove(t.getGui(),e)},t.prototype.addClasses=function(){this.columnGroup.isPadding()?this.addCssClass("ag-header-group-cell-no-group"):this.addCssClass("ag-header-group-cell-with-group")},t.prototype.setupMove=function(e,t){var o=this;if(e&&!this.isSuppressMoving()){var r=this.columnGroup.getOriginalColumnGroup().getLeafColumns();if(e){var i={type:m.DragSourceType.HeaderCell,eElement:e,dragItemName:t,dragItemCallback:this.getDragItemForGroup.bind(this),dragSourceDropTarget:this.dragSourceDropTarget,dragStarted:function(){return r.forEach((function(e){return e.setMoving(!0,"uiColumnDragged")}))},dragStopped:function(){return r.forEach((function(e){return e.setMoving(!1,"uiColumnDragged")}))}};this.dragAndDropService.addDragSource(i,!0),this.addDestroyFunc((function(){return o.dragAndDropService.removeDragSource(i)}))}}},t.prototype.getDragItemForGroup=function(){var e=this.columnGroup.getOriginalColumnGroup().getLeafColumns(),t={};e.forEach((function(e){return t[e.getId()]=e.isVisible()}));var o=[];return this.columnController.getAllDisplayedColumns().forEach((function(t){e.indexOf(t)>=0&&(o.push(t),_._.removeFromArray(e,t))})),e.forEach((function(e){return o.push(e)})),{columns:o,visibleState:t}},t.prototype.isSuppressMoving=function(){var e=!1;return this.columnGroup.getLeafColumns().forEach((function(t){(t.getColDef().suppressMovable||t.isLockPosition())&&(e=!0)})),e||this.gridOptionsWrapper.isSuppressMovableColumns()},t.prototype.setupWidth=function(){this.addListenersToChildrenColumns(),this.addDestroyableEventListener(this.columnGroup,p.ColumnGroup.EVENT_DISPLAYED_CHILDREN_CHANGED,this.onDisplayedChildrenChanged.bind(this)),this.onWidthChanged(),this.addDestroyFunc(this.destroyListenersOnChildrenColumns.bind(this))},t.prototype.onDisplayedChildrenChanged=function(){this.addListenersToChildrenColumns(),this.onWidthChanged()},t.prototype.addListenersToChildrenColumns=function(){var e=this;this.destroyListenersOnChildrenColumns();var t=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach((function(o){o.addEventListener(l.Column.EVENT_WIDTH_CHANGED,t),o.addEventListener(l.Column.EVENT_VISIBLE_CHANGED,t),e.childColumnsDestroyFuncs.push((function(){o.removeEventListener(l.Column.EVENT_WIDTH_CHANGED,t),o.removeEventListener(l.Column.EVENT_VISIBLE_CHANGED,t)}))}))},t.prototype.destroyListenersOnChildrenColumns=function(){this.childColumnsDestroyFuncs.forEach((function(e){return e()})),this.childColumnsDestroyFuncs=[]},t.prototype.onWidthChanged=function(){this.getGui().style.width=this.columnGroup.getActualWidth()+"px"},t.prototype.setupResize=function(){var e=this;if(this.eHeaderCellResize=this.getRefElement("agResize"),this.columnGroup.isResizable()){var t=this.horizontalResizeService.addResizeBar({eResizeBar:this.eHeaderCellResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(t),this.gridOptionsWrapper.isSuppressAutoSize()||this.eHeaderCellResize.addEventListener("dblclick",(function(t){var o=[];e.columnGroup.getDisplayedLeafColumns().forEach((function(e){e.getColDef().suppressAutoSize||o.push(e.getColId())})),o.length>0&&e.columnController.autoSizeColumns(o,"uiColumnResized")}))}else _._.removeFromParent(this.eHeaderCellResize)},t.prototype.onResizeStart=function(e){var t=this,o=this.columnGroup.getDisplayedLeafColumns();this.resizeCols=_._.filter(o,(function(e){return e.isResizable()})),this.resizeStartWidth=0,this.resizeCols.forEach((function(e){return t.resizeStartWidth+=e.getActualWidth()})),this.resizeRatios=[],this.resizeCols.forEach((function(e){return t.resizeRatios.push(e.getActualWidth()/t.resizeStartWidth)}));var r=null;if(e&&(r=this.columnController.getDisplayedGroupAfter(this.columnGroup)),r){var i=r.getDisplayedLeafColumns();this.resizeTakeFromCols=_._.filter(i,(function(e){return e.isResizable()})),this.resizeTakeFromStartWidth=0,this.resizeTakeFromCols.forEach((function(e){return t.resizeTakeFromStartWidth+=e.getActualWidth()})),this.resizeTakeFromRatios=[],this.resizeTakeFromCols.forEach((function(e){return t.resizeTakeFromRatios.push(e.getActualWidth()/t.resizeTakeFromStartWidth)}))}else this.resizeTakeFromCols=null,this.resizeTakeFromStartWidth=null,this.resizeTakeFromRatios=null;_._.addCssClass(this.getGui(),"ag-column-resizing")},t.prototype.onResizing=function(e,t){var o=[],r=this.normaliseDragChange(t);o.push({columns:this.resizeCols,ratios:this.resizeRatios,width:this.resizeStartWidth+r}),this.resizeTakeFromCols&&o.push({columns:this.resizeTakeFromCols,ratios:this.resizeTakeFromRatios,width:this.resizeTakeFromStartWidth-r}),this.columnController.resizeColumnSets(o,e,"uiColumnDragged"),e&&_._.removeCssClass(this.getGui(),"ag-column-resizing")},t.prototype.normaliseDragChange=function(e){var t=e;return this.gridOptionsWrapper.isEnableRtl()?this.pinned!==l.Column.PINNED_LEFT&&(t*=-1):this.pinned===l.Column.PINNED_RIGHT&&(t*=-1),t},t.TEMPLATE='<div class="ag-header-group-cell"><div ref="agResize" class="ag-header-cell-resize"></div></div>',n([f.Autowired("gridOptionsWrapper"),s("design:type",d.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([f.Autowired("columnController"),s("design:type",c.ColumnController)],t.prototype,"columnController",void 0),n([f.Autowired("horizontalResizeService"),s("design:type",h.HorizontalResizeService)],t.prototype,"horizontalResizeService",void 0),n([f.Autowired("dragAndDropService"),s("design:type",m.DragAndDropService)],t.prototype,"dragAndDropService",void 0),n([f.Autowired("userComponentFactory"),s("design:type",C.UserComponentFactory)],t.prototype,"userComponentFactory",void 0),n([f.Autowired("gridApi"),s("design:type",v.GridApi)],t.prototype,"gridApi",void 0),n([f.Autowired("columnApi"),s("design:type",u.ColumnApi)],t.prototype,"columnApi",void 0),n([f.Autowired("beans"),s("design:type",w.Beans)],t.prototype,"beans",void 0),n([f.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(a.Component);t.HeaderGroupWrapperComp=b},19378:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s=o(23054),a=o(15068),l=o(26016),p=o(85786),u=o(22131),c=o(83423),d=function(e){function t(t,o,r,i,n,s,a,l,p,u,c){var d=e.call(this)||this;return d.eAllRowContainers=[],d.active=!0,d.rowContainerReadyCount=0,d.refreshNeeded=!1,d.columnRefreshPending=!1,d.cellComps={},d.createSecondPassFuncs=[],d.removeFirstPassFuncs=[],d.removeSecondPassFuncs=[],d.initialised=!1,d.parentScope=t,d.beans=a,d.bodyContainerComp=o,d.pinnedLeftContainerComp=r,d.pinnedRightContainerComp=i,d.fullWidthContainerComp=n,d.rowNode=s,d.rowIsEven=d.rowNode.rowIndex%2==0,d.paginationPage=d.beans.paginationProxy.getCurrentPage(),d.useAnimationFrameForCreate=p,d.printLayout=u,d.embedFullWidth=c,d.setAnimateFlags(l),d}return i(t,e),t.prototype.init=function(){var e=this;this.rowFocused=this.beans.focusedCellController.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.scope=this.createChildScopeOrNull(this.rowNode.data),this.setupRowContainers(),this.addListeners(),this.slideRowIn&&this.createSecondPassFuncs.push((function(){e.onTopChanged()})),this.fadeRowIn&&this.createSecondPassFuncs.push((function(){e.eAllRowContainers.forEach((function(e){return c._.removeCssClass(e,"ag-opacity-zero")}))}))},t.prototype.createTemplate=function(e,t){void 0===t&&(t=null);var o=[],r=this.rowNode.rowHeight,i=this.getInitialRowClasses(t).join(" "),n=c._.escape(this.rowNode.id),s=this.preProcessStylesFromGridOptions(),a=this.getRowBusinessKey(),l=c._.escape(a),p=this.getInitialRowTopStyle();return o.push("<div"),o.push(' role="row"'),o.push(' row-index="'+this.rowNode.getRowIndexString()+'"'),o.push(n?' row-id="'+n+'"':""),o.push(a?' row-business-key="'+l+'"':""),o.push(' comp-id="'+this.getCompId()+'"'),o.push(' class="'+i+'"'),o.push(' style="height: '+r+"px; "+p+" "+s+'">'),o.push(e),o.push("</div>"),o.join("")},t.prototype.getCellForCol=function(e){var t=this.cellComps[e.getColId()];return t?t.getGui():null},t.prototype.afterFlush=function(){this.initialised||(this.initialised=!0,this.executeProcessRowPostCreateFunc())},t.prototype.executeProcessRowPostCreateFunc=function(){var e=this.beans.gridOptionsWrapper.getProcessRowPostCreateFunc();e&&e({eRow:this.eBodyRow,ePinnedLeftRow:this.ePinnedLeftRow,ePinnedRightRow:this.ePinnedRightRow,node:this.rowNode,api:this.beans.gridOptionsWrapper.getApi(),rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext()})},t.prototype.getInitialRowTopStyle=function(){if(this.printLayout)return"";var e=this.slideRowIn?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop,t=this.applyPaginationOffset(e),o=this.beans.maxDivHeightScaler.getRealPixelPosition(t);return this.beans.gridOptionsWrapper.isSuppressRowTransform()?"top: "+o+"px; ":"transform: translateY("+o+"px);"},t.prototype.getRowBusinessKey=function(){var e=this.beans.gridOptionsWrapper.getBusinessKeyForNodeFunc();if("function"==typeof e)return e(this.rowNode)},t.prototype.areAllContainersReady=function(){return 3===this.rowContainerReadyCount},t.prototype.lazyCreateCells=function(e,t){if(this.active){var o=this.createCells(e);t.innerHTML=o.template,this.callAfterRowAttachedOnCells(o.cellComps,t),this.rowContainerReadyCount++,this.areAllContainersReady()&&this.refreshNeeded&&this.refreshCells()}},t.prototype.createRowContainer=function(e,t,o){var r=this,i=this.useAnimationFrameForCreate,n=i?{cellComps:[],template:""}:this.createCells(t),s=this.createTemplate(n.template);e.appendRowTemplate(s,(function(){var s=e.getRowElement(r.getCompId());r.afterRowAttached(e,s),o(s),i?r.beans.taskQueue.addP1Task(r.lazyCreateCells.bind(r,t,s),r.rowNode.rowIndex):(r.callAfterRowAttachedOnCells(n.cellComps,s),r.rowContainerReadyCount=3)}))},t.prototype.createChildScopeOrNull=function(e){if(!this.beans.gridOptionsWrapper.isAngularCompileRows())return null;var t=this.parentScope.$new();return t.data=n({},e),t.rowNode=this.rowNode,t.context=this.beans.gridOptionsWrapper.getContext(),this.addDestroyFunc((function(){t.$destroy(),t.data=null,t.rowNode=null,t.context=null})),t},t.prototype.setupRowContainers=function(){var e=this.beans.gridOptionsWrapper.getIsFullWidthCellFunc(),o=!!e&&e(this.rowNode),r=this.beans.doingMasterDetail&&this.rowNode.detail,i=this.rowNode.group&&this.beans.gridOptionsWrapper.isGroupUseEntireRow();this.rowNode.stub?this.createFullWidthRows(t.LOADING_CELL_RENDERER,t.LOADING_CELL_RENDERER_COMP_NAME):r?this.createFullWidthRows(t.DETAIL_CELL_RENDERER,t.DETAIL_CELL_RENDERER_COMP_NAME):o?this.createFullWidthRows(t.FULL_WIDTH_CELL_RENDERER,null):i?this.createFullWidthRows(t.GROUP_ROW_RENDERER,t.GROUP_ROW_RENDERER_COMP_NAME):this.setupNormalRowContainers()},t.prototype.setupNormalRowContainers=function(){var e,t,o,r=this;this.printLayout?(e=this.beans.columnController.getAllDisplayedColumns(),t=[],o=[]):(e=this.beans.columnController.getAllDisplayedCenterVirtualColumnsForRow(this.rowNode),t=this.beans.columnController.getDisplayedLeftColumnsForRow(this.rowNode),o=this.beans.columnController.getDisplayedRightColumnsForRow(this.rowNode)),this.createRowContainer(this.bodyContainerComp,e,(function(e){return r.eBodyRow=e})),this.createRowContainer(this.pinnedRightContainerComp,o,(function(e){return r.ePinnedRightRow=e})),this.createRowContainer(this.pinnedLeftContainerComp,t,(function(e){return r.ePinnedLeftRow=e}))},t.prototype.createFullWidthRows=function(e,t){var o=this;this.fullWidthRow=!0,this.embedFullWidth?(this.createFullWidthRowContainer(this.bodyContainerComp,null,null,e,t,(function(e){o.eFullWidthRowBody=e}),(function(e){o.fullWidthRowComponentBody=e})),this.printLayout||(this.createFullWidthRowContainer(this.pinnedLeftContainerComp,l.Column.PINNED_LEFT,"ag-cell-last-left-pinned",e,t,(function(e){o.eFullWidthRowLeft=e}),(function(e){o.fullWidthRowComponentLeft=e})),this.createFullWidthRowContainer(this.pinnedRightContainerComp,l.Column.PINNED_RIGHT,"ag-cell-first-right-pinned",e,t,(function(e){o.eFullWidthRowRight=e}),(function(e){o.fullWidthRowComponentRight=e})))):this.createFullWidthRowContainer(this.fullWidthContainerComp,null,null,e,t,(function(e){o.eFullWidthRow=e}),(function(e){o.fullWidthRowComponent=e}))},t.prototype.setAnimateFlags=function(e){if(e){var t=c._.exists(this.rowNode.oldRowTop);this.slideRowIn=t,this.fadeRowIn=!t}else this.slideRowIn=!1,this.fadeRowIn=!1},t.prototype.isEditing=function(){return this.editingRow},t.prototype.stopRowEditing=function(e){this.stopEditing(e)},t.prototype.isFullWidth=function(){return this.fullWidthRow},t.prototype.addListeners=function(){this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_ROW_SELECTED,this.onRowSelected.bind(this)),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_TOP_CHANGED,this.onTopChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_EXPANDED_CHANGED,this.onExpandedChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_CELL_CHANGED,this.onRowNodeCellChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_DRAGGING_CHANGED,this.onRowNodeDraggingChanged.bind(this));var e=this.beans.eventService;this.addDestroyableEventListener(e,p.Events.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this)),this.addDestroyableEventListener(e,p.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addDestroyableEventListener(e,p.Events.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addDestroyableEventListener(e,p.Events.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addDestroyableEventListener(e,p.Events.EVENT_CELL_FOCUSED,this.onCellFocusChanged.bind(this)),this.addDestroyableEventListener(e,p.Events.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addDestroyableEventListener(e,p.Events.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addDestroyableEventListener(e,p.Events.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this))},t.prototype.onGridColumnsChanged=function(){this.removeRenderedCells(Object.keys(this.cellComps))},t.prototype.onRowNodeDataChanged=function(e){this.forEachCellComp((function(t){return t.refreshCell({suppressFlash:!e.update,newData:!e.update})})),this.onRowSelected(),this.postProcessCss()},t.prototype.onRowNodeCellChanged=function(e){this.postProcessCss()},t.prototype.postProcessCss=function(){this.postProcessStylesFromGridOptions(),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()},t.prototype.onRowNodeDraggingChanged=function(){this.postProcessRowDragging()},t.prototype.postProcessRowDragging=function(){var e=this.rowNode.dragging;this.eAllRowContainers.forEach((function(t){return c._.addOrRemoveCssClass(t,"ag-row-dragging",e)}))},t.prototype.onExpandedChanged=function(){var e=this.rowNode;this.eAllRowContainers.forEach((function(t){return c._.addOrRemoveCssClass(t,"ag-row-group-expanded",e.expanded)})),this.eAllRowContainers.forEach((function(t){return c._.addOrRemoveCssClass(t,"ag-row-group-contracted",!e.expanded)}))},t.prototype.onDisplayedColumnsChanged=function(){this.fullWidthRow||this.refreshCells()},t.prototype.destroyFullWidthComponents=function(){this.fullWidthRowComponent&&(this.fullWidthRowComponent.destroy&&this.fullWidthRowComponent.destroy(),this.fullWidthRowComponent=null),this.fullWidthRowComponentBody&&(this.fullWidthRowComponentBody.destroy&&this.fullWidthRowComponentBody.destroy(),this.fullWidthRowComponent=null),this.fullWidthRowComponentLeft&&(this.fullWidthRowComponentLeft.destroy&&this.fullWidthRowComponentLeft.destroy(),this.fullWidthRowComponentLeft=null),this.fullWidthRowComponentRight&&(this.fullWidthRowComponentRight.destroy&&this.fullWidthRowComponentRight.destroy(),this.fullWidthRowComponent=null)},t.prototype.getContainerForCell=function(e){switch(e){case l.Column.PINNED_LEFT:return this.ePinnedLeftRow;case l.Column.PINNED_RIGHT:return this.ePinnedRightRow;default:return this.eBodyRow}},t.prototype.onVirtualColumnsChanged=function(){this.fullWidthRow||this.refreshCells()},t.prototype.onColumnResized=function(){this.fullWidthRow||this.refreshCells()},t.prototype.refreshCells=function(){if(this.areAllContainersReady())if(this.beans.gridOptionsWrapper.isSuppressAnimationFrame()||this.printLayout)this.refreshCellsInAnimationFrame();else{if(this.columnRefreshPending)return;this.beans.taskQueue.addP1Task(this.refreshCellsInAnimationFrame.bind(this),this.rowNode.rowIndex)}else this.refreshNeeded=!0},t.prototype.refreshCellsInAnimationFrame=function(){if(this.active){var e,t,o;this.columnRefreshPending=!1,this.printLayout?(e=this.beans.columnController.getAllDisplayedColumns(),t=[],o=[]):(e=this.beans.columnController.getAllDisplayedCenterVirtualColumnsForRow(this.rowNode),t=this.beans.columnController.getDisplayedLeftColumnsForRow(this.rowNode),o=this.beans.columnController.getDisplayedRightColumnsForRow(this.rowNode)),this.insertCellsIntoContainer(this.eBodyRow,e),this.insertCellsIntoContainer(this.ePinnedLeftRow,t),this.insertCellsIntoContainer(this.ePinnedRightRow,o);var r=Object.keys(this.cellComps);e.forEach((function(e){return c._.removeFromArray(r,e.getId())})),t.forEach((function(e){return c._.removeFromArray(r,e.getId())})),o.forEach((function(e){return c._.removeFromArray(r,e.getId())}));var i=c._.filter(r,this.isCellEligibleToBeRemoved.bind(this));this.removeRenderedCells(i)}},t.prototype.removeRenderedCells=function(e){var t=this;e.forEach((function(e){var o=t.cellComps[e];c._.missing(o)||(o.detach(),o.destroy(),t.cellComps[e]=null)}))},t.prototype.isCellEligibleToBeRemoved=function(e){var t=this.beans.columnController.getAllDisplayedColumns(),o=!0,r=this.cellComps[e];if(!r)return o;if(this.isCellInWrongRow(r))return o;var i=r.isEditing(),n=this.beans.focusedCellController.isCellFocused(r.getGridCell());if(i||n){var s=r.getColumn();return!(t.indexOf(s)>=0)&&o}return o},t.prototype.ensureCellInCorrectContainer=function(e){if(!this.printLayout){var t=e.getGui(),o=e.getColumn().getPinned(),r=this.getContainerForCell(o),i=e.getParentRow();i!==r&&(i&&i.removeChild(t),r.appendChild(t),e.setParentRow(r))}},t.prototype.isCellInWrongRow=function(e){var t=e.getColumn(),o=this.getContainerForCell(t.getPinned());return e.getParentRow()!==o},t.prototype.insertCellsIntoContainer=function(e,t){var o=this;if(e){var r=[],i=[];t.forEach((function(t){var n=t.getId(),s=o.cellComps[n];s?o.ensureCellInCorrectContainer(s):o.createNewCell(t,e,r,i)})),r.length>0&&(c._.appendHtml(e,r.join("")),this.callAfterRowAttachedOnCells(i,e))}},t.prototype.addDomData=function(e){var o=this.beans.gridOptionsWrapper;o.setDomData(e,t.DOM_DATA_KEY_RENDERED_ROW,this),this.addDestroyFunc((function(){o.setDomData(e,t.DOM_DATA_KEY_RENDERED_ROW,null)}))},t.prototype.createNewCell=function(e,t,o,r){var i=new s.CellComp(this.scope,this.beans,e,this.rowNode,this,!1,this.printLayout),n=i.getCreateTemplate();o.push(n),r.push(i),this.cellComps[e.getId()]=i,i.setParentRow(t)},t.prototype.onMouseEvent=function(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t)}},t.prototype.createRowEvent=function(e,t){return{type:e,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,context:this.beans.gridOptionsWrapper.getContext(),api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),event:t}},t.prototype.createRowEventWithSource=function(e,t){var o=this.createRowEvent(e,t);return o.source=this,o},t.prototype.onRowDblClick=function(e){if(!c._.isStopPropagationForAgGrid(e)){var t=this.createRowEventWithSource(p.Events.EVENT_ROW_DOUBLE_CLICKED,e);this.beans.eventService.dispatchEvent(t)}},t.prototype.onRowClick=function(e){if(!c._.isStopPropagationForAgGrid(e)){var t=this.createRowEventWithSource(p.Events.EVENT_ROW_CLICKED,e);this.beans.eventService.dispatchEvent(t);var o=e.ctrlKey||e.metaKey,r=e.shiftKey;if(!this.rowNode.group&&this.rowNode.selectable&&!this.rowNode.rowPinned&&this.beans.gridOptionsWrapper.isRowSelection()&&!this.beans.gridOptionsWrapper.isSuppressRowClickSelection()){var i=this.beans.gridOptionsWrapper.isRowMultiSelectWithClick(),n=this.beans.gridOptionsWrapper.isRowDeselection();if(this.rowNode.isSelected())i?this.rowNode.setSelectedParams({newValue:!1}):o?n&&this.rowNode.setSelectedParams({newValue:!1}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!0});else{var s=!i&&!o;this.rowNode.setSelectedParams({newValue:!0,clearSelection:s,rangeSelect:r})}}}},t.prototype.createFullWidthRowContainer=function(e,t,o,r,i,n,s){var a=this,l=this.createTemplate("",o);e.appendRowTemplate(l,(function(){var o=e.getRowElement(a.getCompId()),l=a.createFullWidthParams(o,t),p=a.beans.userComponentFactory.newFullWidthCellRenderer(l,r,i);p?(p.then((function(e){if(a.isAlive()){var t=e.getGui();o.appendChild(t),s(e)}else e.destroy&&e.destroy()})),a.afterRowAttached(e,o),n(o),a.beans.doingMasterDetail&&a.rowNode.detail||a.angular1Compile(o)):console.error("ag-Grid: fullWidthCellRenderer not defined")}))},t.prototype.angular1Compile=function(e){this.scope&&this.beans.$compile(e)(this.scope)},t.prototype.createFullWidthParams=function(e,t){return{fullWidth:!0,data:this.rowNode.data,node:this.rowNode,value:this.rowNode.key,$scope:this.scope?this.scope:this.parentScope,$compile:this.beans.$compile,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext(),eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this)}},t.prototype.getInitialRowClasses=function(e){var t=[],o=this.beans.gridOptionsWrapper.isTreeData(),r=this.rowNode;return c._.exists(e)&&t.push(e),t.push("ag-row"),t.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeRowIn&&t.push("ag-opacity-zero"),t.push(this.rowIsEven?"ag-row-even":"ag-row-odd"),r.isSelected()&&t.push("ag-row-selected"),r.group?(t.push("ag-row-group"),t.push("ag-row-level-"+r.level),r.footer&&t.push("ag-row-footer")):t.push("ag-row-level-"+(r.parent?r.parent.level+1:"0")),r.stub&&t.push("ag-row-stub"),this.fullWidthRow&&t.push("ag-full-width-row"),(o?r.allChildrenCount:r.group&&!r.footer)&&t.push(r.expanded?"ag-row-group-expanded":"ag-row-group-contracted"),r.dragging&&t.push("ag-row-dragging"),c._.pushAll(t,this.processClassesFromGridOptions()),c._.pushAll(t,this.preProcessRowClassRules()),t.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.firstRowOnPage=this.isFirstRowOnPage(),this.lastRowOnPage=this.isLastRowOnPage(),this.firstRowOnPage&&t.push("ag-row-first"),this.lastRowOnPage&&t.push("ag-row-last"),t},t.prototype.isFirstRowOnPage=function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageFirstRow()},t.prototype.isLastRowOnPage=function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageLastRow()},t.prototype.onModelUpdated=function(){var e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.eAllRowContainers.forEach((function(t){return c._.addOrRemoveCssClass(t,"ag-row-first",e)}))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.eAllRowContainers.forEach((function(e){return c._.addOrRemoveCssClass(e,"ag-row-last",t)})))},t.prototype.preProcessRowClassRules=function(){var e=[];return this.processRowClassRules((function(t){e.push(t)}),(function(e){})),e},t.prototype.processRowClassRules=function(e,t){this.beans.stylingService.processClassRules(this.beans.gridOptionsWrapper.rowClassRules(),{value:void 0,colDef:void 0,data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsWrapper.getApi(),$scope:this.scope,context:this.beans.gridOptionsWrapper.getContext()},e,t)},t.prototype.stopEditing=function(e){if(void 0===e&&(e=!1),this.forEachCellComp((function(t){t.stopEditing(e)})),this.editingRow){if(!e){var t=this.createRowEvent(p.Events.EVENT_ROW_VALUE_CHANGED);this.beans.eventService.dispatchEvent(t)}this.setEditingRow(!1)}},t.prototype.setEditingRow=function(e){this.editingRow=e,this.eAllRowContainers.forEach((function(t){return c._.addOrRemoveCssClass(t,"ag-row-editing",e)}));var t=e?this.createRowEvent(p.Events.EVENT_ROW_EDITING_STARTED):this.createRowEvent(p.Events.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(t)},t.prototype.startRowEditing=function(e,t,o){void 0===e&&(e=null),void 0===t&&(t=null),void 0===o&&(o=null),this.editingRow||(this.forEachCellComp((function(r){var i=r===o;i?r.startEditingIfEnabled(e,t,i):r.startEditingIfEnabled(null,null,i)})),this.setEditingRow(!0))},t.prototype.forEachCellComp=function(e){c._.iterateObject(this.cellComps,(function(t,o){o&&e(o)}))},t.prototype.postProcessClassesFromGridOptions=function(){var e=this,t=this.processClassesFromGridOptions();t&&t.length&&t.forEach((function(t){e.eAllRowContainers.forEach((function(e){return c._.addCssClass(e,t)}))}))},t.prototype.postProcessRowClassRules=function(){var e=this;this.processRowClassRules((function(t){e.eAllRowContainers.forEach((function(e){return c._.addCssClass(e,t)}))}),(function(t){e.eAllRowContainers.forEach((function(e){return c._.removeCssClass(e,t)}))}))},t.prototype.processClassesFromGridOptions=function(){var e=[],t=function(t){"string"==typeof t?e.push(t):Array.isArray(t)&&t.forEach((function(t){return e.push(t)}))},o=this.beans.gridOptionsWrapper.getRowClass();if(o){if("function"==typeof o)return void console.warn("ag-Grid: rowClass should not be a function, please use getRowClass instead");t(o)}var r=this.beans.gridOptionsWrapper.getRowClassFunc();return r&&t(r({node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,context:this.beans.gridOptionsWrapper.getContext(),api:this.beans.gridOptionsWrapper.getApi()})),e},t.prototype.preProcessStylesFromGridOptions=function(){var e=this.processStylesFromGridOptions();return c._.cssStyleObjectToMarkup(e)},t.prototype.postProcessStylesFromGridOptions=function(){var e=this.processStylesFromGridOptions();this.eAllRowContainers.forEach((function(t){return c._.addStylesToElement(t,e)}))},t.prototype.processStylesFromGridOptions=function(){var e=this.beans.gridOptionsWrapper.getRowStyle();if(!e||"function"!=typeof e){var t,o=this.beans.gridOptionsWrapper.getRowStyleFunc();return o&&(t=o({data:this.rowNode.data,node:this.rowNode,api:this.beans.gridOptionsWrapper.getApi(),context:this.beans.gridOptionsWrapper.getContext(),$scope:this.scope})),c._.assign({},e,t)}console.warn("ag-Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead")},t.prototype.createCells=function(e){var t=this,o=[],r=[];return e.forEach((function(e){var i=new s.CellComp(t.scope,t.beans,e,t.rowNode,t,!1,t.printLayout),n=i.getCreateTemplate();o.push(n),r.push(i),t.cellComps[e.getId()]=i})),{template:o.join(""),cellComps:r}},t.prototype.onRowSelected=function(){var e=this.rowNode.isSelected();this.eAllRowContainers.forEach((function(t){return c._.addOrRemoveCssClass(t,"ag-row-selected",e)}))},t.prototype.callAfterRowAttachedOnCells=function(e,t){var o=this;e.forEach((function(e){e.setParentRow(t),e.afterAttached(),o.editingRow&&e.startEditingIfEnabled()}))},t.prototype.afterRowAttached=function(e,t){var o=this;this.addDomData(t),this.removeSecondPassFuncs.push((function(){e.removeRowElement(t)})),this.removeFirstPassFuncs.push((function(){if(c._.exists(o.rowNode.rowTop)){var e=o.roundRowTopToBounds(o.rowNode.rowTop);o.setRowTop(e)}else c._.addCssClass(t,"ag-opacity-zero")})),this.eAllRowContainers.push(t),this.useAnimationFrameForCreate?this.beans.taskQueue.addP2Task(this.addHoverFunctionality.bind(this,t)):this.addHoverFunctionality(t)},t.prototype.addHoverFunctionality=function(e){var t=this;this.active&&(this.addDestroyableEventListener(e,"mouseenter",(function(){return t.rowNode.onMouseEnter()})),this.addDestroyableEventListener(e,"mouseleave",(function(){return t.rowNode.onMouseLeave()})),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_MOUSE_ENTER,(function(){t.beans.gridOptionsWrapper.isSuppressRowHoverHighlight()||c._.addCssClass(e,"ag-row-hover")})),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_MOUSE_LEAVE,(function(){c._.removeCssClass(e,"ag-row-hover")})))},t.prototype.roundRowTopToBounds=function(e){var t=this.beans.gridPanel.getVScrollPosition(),o=this.applyPaginationOffset(t.top,!0)-100,r=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(o,e),r)},t.prototype.onRowHeightChanged=function(){if(c._.exists(this.rowNode.rowHeight)){var e=this.rowNode.rowHeight+"px";this.eAllRowContainers.forEach((function(t){return t.style.height=e}))}},t.prototype.addEventListener=function(t,o){"renderedRowRemoved"!==t&&"rowRemoved"!==t||(t=p.Events.EVENT_VIRTUAL_ROW_REMOVED,console.warn("ag-Grid: Since version 11, event renderedRowRemoved is now called "+p.Events.EVENT_VIRTUAL_ROW_REMOVED)),e.prototype.addEventListener.call(this,t,o)},t.prototype.removeEventListener=function(t,o){"renderedRowRemoved"!==t&&"rowRemoved"!==t||(t=p.Events.EVENT_VIRTUAL_ROW_REMOVED,console.warn("ag-Grid: Since version 11, event renderedRowRemoved and rowRemoved is now called "+p.Events.EVENT_VIRTUAL_ROW_REMOVED)),e.prototype.removeEventListener.call(this,t,o)},t.prototype.destroy=function(t){void 0===t&&(t=!1),e.prototype.destroy.call(this),this.active=!1,this.destroyFullWidthComponents(),t?(this.removeFirstPassFuncs.forEach((function(e){return e()})),this.removeSecondPassFuncs.push(this.destroyContainingCells.bind(this))):(this.destroyContainingCells(),this.getAndClearDelayedDestroyFunctions().forEach((function(e){return e()})));var o=this.createRowEvent(p.Events.EVENT_VIRTUAL_ROW_REMOVED);this.dispatchEvent(o),this.beans.eventService.dispatchEvent(o)},t.prototype.destroyContainingCells=function(){this.forEachCellComp((function(e){return e.destroy()})),this.destroyFullWidthComponents()},t.prototype.getAndClearDelayedDestroyFunctions=function(){var e=this.removeSecondPassFuncs;return this.removeSecondPassFuncs=[],e},t.prototype.onCellFocusChanged=function(){var e=this.beans.focusedCellController.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);e!==this.rowFocused&&(this.eAllRowContainers.forEach((function(t){return c._.addOrRemoveCssClass(t,"ag-row-focus",e)})),this.eAllRowContainers.forEach((function(t){return c._.addOrRemoveCssClass(t,"ag-row-no-focus",!e)})),this.rowFocused=e),!e&&this.editingRow&&this.stopEditing(!1)},t.prototype.onPaginationChanged=function(){var e=this.beans.paginationProxy.getCurrentPage();this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged())},t.prototype.onTopChanged=function(){this.setRowTop(this.rowNode.rowTop)},t.prototype.applyPaginationOffset=function(e,t){return void 0===t&&(t=!1),this.rowNode.isRowPinned()?e:e+this.beans.paginationProxy.getPixelOffset()*(t?1:-1)},t.prototype.setRowTop=function(e){if(!this.printLayout&&c._.exists(e)){var t=this.applyPaginationOffset(e),o=this.beans.maxDivHeightScaler.getRealPixelPosition(t)+"px";this.beans.gridOptionsWrapper.isSuppressRowTransform()?this.eAllRowContainers.forEach((function(e){return e.style.top=o})):this.eAllRowContainers.forEach((function(e){return e.style.transform="translateY("+o+")"}))}},t.prototype.getAndClearNextVMTurnFunctions=function(){var e=this.createSecondPassFuncs;return this.createSecondPassFuncs=[],e},t.prototype.getRowNode=function(){return this.rowNode},t.prototype.getRenderedCellForColumn=function(e){var t=this,o=this.cellComps[e.getColId()];if(o)return o;var r=Object.keys(this.cellComps).map((function(e){return t.cellComps[e]})).filter((function(t){return-1!==t.getColSpanningList().indexOf(e)}));return r.length?r[0]:void 0},t.prototype.onRowIndexChanged=function(){this.onCellFocusChanged(),this.updateRowIndexes()},t.prototype.updateRowIndexes=function(){var e=this.rowNode.getRowIndexString(),t=this.rowNode.rowIndex%2==0,o=this.rowIsEven!==t;o&&(this.rowIsEven=t),this.eAllRowContainers.forEach((function(r){r.setAttribute("row-index",e),o&&(c._.addOrRemoveCssClass(r,"ag-row-even",t),c._.addOrRemoveCssClass(r,"ag-row-odd",!t))}))},t.prototype.ensureDomOrder=function(){[{el:this.getBodyRowElement(),ct:this.bodyContainerComp},{el:this.getPinnedLeftRowElement(),ct:this.pinnedLeftContainerComp},{el:this.getPinnedRightRowElement(),ct:this.pinnedRightContainerComp},{el:this.getFullWidthRowElement(),ct:this.fullWidthContainerComp}].forEach((function(e){e.el&&e.ct.ensureDomOrder(e.el)}))},t.prototype.getPinnedLeftRowElement=function(){return this.ePinnedLeftRow?this.ePinnedLeftRow:this.eFullWidthRowLeft},t.prototype.getPinnedRightRowElement=function(){return this.ePinnedRightRow?this.ePinnedRightRow:this.eFullWidthRowRight},t.prototype.getBodyRowElement=function(){return this.eBodyRow?this.eBodyRow:this.eFullWidthRowBody},t.prototype.getFullWidthRowElement=function(){return this.eFullWidthRow},t.DOM_DATA_KEY_RENDERED_ROW="renderedRow",t.FULL_WIDTH_CELL_RENDERER="fullWidthCellRenderer",t.GROUP_ROW_RENDERER="groupRowRenderer",t.GROUP_ROW_RENDERER_COMP_NAME="agGroupRowRenderer",t.LOADING_CELL_RENDERER="loadingCellRenderer",t.LOADING_CELL_RENDERER_COMP_NAME="agLoadingCellRenderer",t.DETAIL_CELL_RENDERER="detailCellRenderer",t.DETAIL_CELL_RENDERER_COMP_NAME="agDetailCellRenderer",t}(u.Component);t.RowComp=d},20080:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(58342),s=o(98239),a=o(72493),l=o(44081),p=function(){function e(e){this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=e}return e.prototype.onDragEnter=function(e){var t=this;this.clearColumnsList(),this.gridOptionsWrapper.isFunctionsReadOnly()||e.dragItem.columns.forEach((function(e){e.isPrimary()&&(e.isAnyFunctionActive()||(e.isAllowValue()?t.columnsToAggregate.push(e):e.isAllowRowGroup()?t.columnsToGroup.push(e):e.isAllowRowGroup()&&t.columnsToPivot.push(e)))}))},e.prototype.getIconName=function(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?n.DragAndDropService.ICON_PINNED:n.DragAndDropService.ICON_MOVE:null},e.prototype.onDragLeave=function(e){this.clearColumnsList()},e.prototype.clearColumnsList=function(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0},e.prototype.onDragging=function(e){},e.prototype.onDragStop=function(e){this.columnsToAggregate.length>0&&this.columnController.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&this.columnController.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&this.columnController.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop")},r([a.Autowired("columnController"),i("design:type",s.ColumnController)],e.prototype,"columnController",void 0),r([a.Autowired("gridOptionsWrapper"),i("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),e}();t.BodyDropPivotTarget=p},21914:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(22131),l=o(72493),p=o(44081),u=o(47721),c=o(60843),d=o(85786),h=o(10042),f=o(41451),g=o(83423),m=function(e){function t(){return e.call(this)||this}return i(t,e),t.prototype.postConstruct=function(){this.setTemplate(this.getTemplate()),this.gridOptionsWrapper.isPagination()&&!this.gridOptionsWrapper.isSuppressPaginationPanel()?(this.addDestroyableEventListener(this.eventService,d.Events.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addDestroyableEventListener(this.btFirst,"click",this.onBtFirst.bind(this)),this.addDestroyableEventListener(this.btLast,"click",this.onBtLast.bind(this)),this.addDestroyableEventListener(this.btNext,"click",this.onBtNext.bind(this)),this.addDestroyableEventListener(this.btPrevious,"click",this.onBtPrevious.bind(this)),this.onPaginationChanged()):this.setVisible(!1)},t.prototype.onPaginationChanged=function(){this.enableOrDisableButtons(),this.updateRowLabels(),this.setCurrentPageLabel(),this.setTotalLabels()},t.prototype.setCurrentPageLabel=function(){var e=this.paginationProxy.getTotalPages()>0,t=this.paginationProxy.getCurrentPage(),o=e?t+1:0;this.lbCurrent.innerHTML=this.formatNumber(o)},t.prototype.formatNumber=function(e){var t=this.gridOptionsWrapper.getPaginationNumberFormatterFunc();return t?t({value:e}):g._.formatNumberCommas(e)},t.prototype.getTemplate=function(){var e=this.gridOptionsWrapper.getLocaleTextFunc(),t=e("page","Page"),o=e("to","to"),r=e("of","of");return'<div class="ag-paging-panel ag-unselectable">\n <span ref="eSummaryPanel" class="ag-paging-row-summary-panel">\n <span ref="lbFirstRowOnPage"></span> '+o+' <span ref="lbLastRowOnPage"></span> '+r+' <span ref="lbRecordCount"></span>\n </span>\n <span class="ag-paging-page-summary-panel">\n <button type="button" class="ag-paging-button" ref="btFirst">'+e("first","First")+'</button>\n <button type="button" class="ag-paging-button" ref="btPrevious">'+e("previous","Previous")+"</button>\n "+t+' <span ref="lbCurrent"></span> '+r+' <span ref="lbTotal"></span>\n <button type="button" class="ag-paging-button" ref="btNext">'+e("next","Next")+'</button>\n <button type="button" class="ag-paging-button" ref="btLast">'+e("last","Last")+"</button>\n </span>\n </div>"},t.prototype.onBtNext=function(){this.paginationProxy.goToNextPage()},t.prototype.onBtPrevious=function(){this.paginationProxy.goToPreviousPage()},t.prototype.onBtFirst=function(){this.paginationProxy.goToFirstPage()},t.prototype.onBtLast=function(){this.paginationProxy.goToLastPage()},t.prototype.enableOrDisableButtons=function(){var e=this.paginationProxy.getCurrentPage(),t=this.paginationProxy.isLastPageFound(),o=this.paginationProxy.getTotalPages(),r=0===e;this.btPrevious.disabled=r,this.btFirst.disabled=r;var i=this.isZeroPagesToDisplay(),n=t&&e===o-1||i;this.btNext.disabled=n;var s=!t||i||e===o-1;this.btLast.disabled=s},t.prototype.updateRowLabels=function(){var e,t,o=this.paginationProxy.getCurrentPage(),r=this.paginationProxy.getPageSize(),i=this.paginationProxy.isLastPageFound(),n=this.paginationProxy.isLastPageFound()?this.paginationProxy.getTotalRowCount():null;this.isZeroPagesToDisplay()?(e=0,t=0):(t=(e=r*o+1)+r-1,i&&t>n&&(t=n)),this.lbFirstRowOnPage.innerHTML=this.formatNumber(e),this.lbLastRowOnPage.innerHTML=this.formatNumber(t)},t.prototype.isZeroPagesToDisplay=function(){var e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages();return e&&0===t},t.prototype.setTotalLabels=function(){var e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages(),o=this.paginationProxy.isLastPageFound()?this.paginationProxy.getTotalRowCount():null;if(e)this.lbTotal.innerHTML=this.formatNumber(t),this.lbRecordCount.innerHTML=this.formatNumber(o);else{var r=this.gridOptionsWrapper.getLocaleTextFunc()("more","more");this.lbTotal.innerHTML=r,this.lbRecordCount.innerHTML=r}},n([l.Autowired("gridOptionsWrapper"),s("design:type",p.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([l.Autowired("eventService"),s("design:type",c.EventService)],t.prototype,"eventService",void 0),n([l.Autowired("paginationProxy"),s("design:type",f.PaginationProxy)],t.prototype,"paginationProxy",void 0),n([l.Autowired("rowRenderer"),s("design:type",h.RowRenderer)],t.prototype,"rowRenderer",void 0),n([u.RefSelector("btFirst"),s("design:type",HTMLButtonElement)],t.prototype,"btFirst",void 0),n([u.RefSelector("btPrevious"),s("design:type",HTMLButtonElement)],t.prototype,"btPrevious",void 0),n([u.RefSelector("btNext"),s("design:type",HTMLButtonElement)],t.prototype,"btNext",void 0),n([u.RefSelector("btLast"),s("design:type",HTMLButtonElement)],t.prototype,"btLast",void 0),n([u.RefSelector("lbRecordCount"),s("design:type",Object)],t.prototype,"lbRecordCount",void 0),n([u.RefSelector("lbFirstRowOnPage"),s("design:type",Object)],t.prototype,"lbFirstRowOnPage",void 0),n([u.RefSelector("lbLastRowOnPage"),s("design:type",Object)],t.prototype,"lbLastRowOnPage",void 0),n([u.RefSelector("eSummaryPanel"),s("design:type",Object)],t.prototype,"eSummaryPanel",void 0),n([u.RefSelector("lbCurrent"),s("design:type",Object)],t.prototype,"lbCurrent",void 0),n([u.RefSelector("lbTotal"),s("design:type",Object)],t.prototype,"lbTotal",void 0),n([l.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(a.Component);t.PaginationComp=m},21951:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(22131),l=o(47721),p=o(72493),u=o(44081),c=o(83423),d=function(e){function t(){var t=e.call(this)||this;return t.selected=!1,t.readOnly=!1,t.passive=!1,t}return i(t,e),t.prototype.preConstruct=function(){this.setTemplate(t.TEMPLATE)},t.prototype.postConstruct=function(){this.loadIcons(),this.updateIcons()},t.prototype.setLabel=function(e){this.eLabel.innerText=e},t.prototype.loadIcons=function(){c._.clearElement(this.eChecked),c._.clearElement(this.eUnchecked),c._.clearElement(this.eIndeterminate),this.readOnly?(this.eChecked.appendChild(c._.createIconNoSpan("checkboxCheckedReadOnly",this.gridOptionsWrapper,null)),this.eUnchecked.appendChild(c._.createIconNoSpan("checkboxUncheckedReadOnly",this.gridOptionsWrapper,null)),this.eIndeterminate.appendChild(c._.createIconNoSpan("checkboxIndeterminateReadOnly",this.gridOptionsWrapper,null))):(this.eChecked.appendChild(c._.createIconNoSpan("checkboxChecked",this.gridOptionsWrapper,null)),this.eUnchecked.appendChild(c._.createIconNoSpan("checkboxUnchecked",this.gridOptionsWrapper,null)),this.eIndeterminate.appendChild(c._.createIconNoSpan("checkboxIndeterminate",this.gridOptionsWrapper,null)))},t.prototype.onClick=function(e){c._.addAgGridEventPath(e),this.readOnly||this.toggle()},t.prototype.getNextValue=function(){return void 0===this.selected||!this.selected},t.prototype.setPassive=function(e){this.passive=e},t.prototype.setReadOnly=function(e){this.readOnly=e,this.loadIcons()},t.prototype.isReadOnly=function(){return this.readOnly},t.prototype.isSelected=function(){return this.selected},t.prototype.toggle=function(){var e=this.getNextValue();if(this.passive){var o={type:t.EVENT_CHANGED,selected:e};this.dispatchEvent(o)}else this.setSelected(e)},t.prototype.setSelected=function(e){if(this.selected!==e){this.selected=!0===e||!1!==e&&void 0,this.updateIcons();var o={type:t.EVENT_CHANGED,selected:this.selected};this.dispatchEvent(o)}},t.prototype.updateIcons=function(){c._.setVisible(this.eChecked,!0===this.selected),c._.setVisible(this.eUnchecked,!1===this.selected),c._.setVisible(this.eIndeterminate,void 0===this.selected)},t.EVENT_CHANGED="change",t.TEMPLATE='<span class="ag-checkbox" role="presentation"> <span class="ag-checkbox-checked" role="presentation"></span> <span class="ag-checkbox-unchecked" role="presentation"></span> <span class="ag-checkbox-indeterminate" role="presentation"></span> <span class="ag-checkbox-label" role="presentation"></span></span>',n([p.Autowired("gridOptionsWrapper"),s("design:type",u.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([l.QuerySelector(".ag-checkbox-checked"),s("design:type",HTMLElement)],t.prototype,"eChecked",void 0),n([l.QuerySelector(".ag-checkbox-unchecked"),s("design:type",HTMLElement)],t.prototype,"eUnchecked",void 0),n([l.QuerySelector(".ag-checkbox-indeterminate"),s("design:type",HTMLElement)],t.prototype,"eIndeterminate",void 0),n([l.QuerySelector(".ag-checkbox-label"),s("design:type",HTMLElement)],t.prototype,"eLabel",void 0),n([p.PreConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"preConstruct",null),n([p.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),n([l.Listener("click"),s("design:type",Function),s("design:paramtypes",[MouseEvent]),s("design:returntype",void 0)],t.prototype,"onClick",null),t}(a.Component);t.AgCheckbox=d},22131:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(72493),l=o(8534),p=o(83423),u=new p.NumberSequence,c=function(e){function t(t){var o=e.call(this)||this;return o.childComponents=[],o.annotatedEventListeners=[],o.visible=!0,o.compId=u.next(),t&&o.setTemplate(t),o}return i(t,e),t.prototype.getCompId=function(){return this.compId},t.prototype.createChildComponentsFromTags=function(e){var t=this;p._.copyNodeList(e.childNodes).forEach((function(o){var r=t.getContext().createComponentFromElement(o,(function(e){t.copyAttributesFromNode(o,e.getGui())}));r?t.swapComponentForNode(r,e,o):o.childNodes&&t.createChildComponentsFromTags(o)}))},t.prototype.copyAttributesFromNode=function(e,t){p._.iterateNamedNodeMap(e.attributes,(function(e,o){t.setAttribute(e,o)}))},t.prototype.swapComponentForNode=function(e,t,o){var r=e.getGui();t.replaceChild(r,o),t.insertBefore(document.createComment(o.nodeName),r),this.childComponents.push(e),this.swapInComponentForQuerySelectors(e,o)},t.prototype.swapInComponentForQuerySelectors=function(e,t){for(var o=Object.getPrototypeOf(this),r=this;null!=o;){var i=o.__agComponentMetaData,n=o.constructor.name;i&&i[n]&&i[n].querySelectors&&i[n].querySelectors.forEach((function(o){r[o.attributeName]===t&&(r[o.attributeName]=e)})),o=Object.getPrototypeOf(o)}},t.prototype.setTemplate=function(e){var t=p._.loadTemplate(e);this.setTemplateFromElement(t)},t.prototype.setTemplateFromElement=function(e){this.eGui=e,this.eGui.__agComponent=this,this.addAnnotatedEventListeners(),this.wireQuerySelectors(),this.getContext()&&this.createChildComponentsFromTags(this.getGui())},t.prototype.createChildComponentsPreConstruct=function(){this.getGui()&&this.createChildComponentsFromTags(this.getGui())},t.prototype.wireQuerySelectors=function(){var e=this;if(this.eGui)for(var t=Object.getPrototypeOf(this),o=function(){var o=t.__agComponentMetaData,i=t.constructor.name;if(o&&o[i]&&o[i].querySelectors){var n=r;o[i].querySelectors.forEach((function(t){var o=e.eGui.querySelector(t.querySelector);if(o){var r=o.__agComponent;n[t.attributeName]=r||o}}))}t=Object.getPrototypeOf(t)},r=this;null!=t;)o()},t.prototype.addAnnotatedEventListeners=function(){var e=this;if(this.removeAnnotatedEventListeners(),this.eGui){var t=this.getAgComponentMetaData("listenerMethods");p._.missingOrEmpty(t)||(this.annotatedEventListeners||(this.annotatedEventListeners=[]),t.forEach((function(t){var o=e[t.methodName].bind(e);e.eGui.addEventListener(t.eventName,o),e.annotatedEventListeners.push({eventName:t.eventName,listener:o})})))}},t.prototype.getAgComponentMetaData=function(e){for(var t=[],o=Object.getPrototypeOf(this);null!=o;){var r=o.__agComponentMetaData,i=o.constructor.name;r&&r[i]&&r[i][e]&&(t=t.concat(r[i][e])),o=Object.getPrototypeOf(o)}return t},t.prototype.removeAnnotatedEventListeners=function(){var e=this;this.annotatedEventListeners&&this.eGui&&(this.annotatedEventListeners.forEach((function(t){e.eGui.removeEventListener(t.eventName,t.listener)})),this.annotatedEventListeners=[])},t.prototype.getGui=function(){return this.eGui},t.prototype.setGui=function(e){this.eGui=e},t.prototype.queryForHtmlElement=function(e){return this.eGui.querySelector(e)},t.prototype.queryForHtmlInputElement=function(e){return this.eGui.querySelector(e)},t.prototype.appendChild=function(e){if(p._.isNodeOrElement(e))this.eGui.appendChild(e);else{var t=e;this.eGui.appendChild(t.getGui()),this.childComponents.push(t)}},t.prototype.addFeature=function(e,t){e.wireBean(t),t.destroy&&this.addDestroyFunc(t.destroy.bind(t))},t.prototype.isVisible=function(){return this.visible},t.prototype.setVisible=function(e,o){var r="visibility"!==o;if(e!==this.visible){this.visible=e,p._.addOrRemoveCssClass(this.eGui,r?"ag-hidden":"ag-invisible",!e);var i={type:t.EVENT_VISIBLE_CHANGED,visible:this.visible};this.dispatchEvent(i)}},t.prototype.addOrRemoveCssClass=function(e,t){p._.addOrRemoveCssClass(this.eGui,e,t)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.childComponents.forEach((function(e){e&&e.destroy&&e.destroy()})),this.childComponents.length=0,this.removeAnnotatedEventListeners()},t.prototype.addGuiEventListener=function(e,t){var o=this;this.getGui().addEventListener(e,t),this.addDestroyFunc((function(){return o.getGui().removeEventListener(e,t)}))},t.prototype.addCssClass=function(e){p._.addCssClass(this.getGui(),e)},t.prototype.removeCssClass=function(e){p._.removeCssClass(this.getGui(),e)},t.prototype.getAttribute=function(e){var t=this.getGui();return t?t.getAttribute(e):null},t.prototype.getRefElement=function(e){return this.queryForHtmlElement('[ref="'+e+'"]')},t.EVENT_VISIBLE_CHANGED="visibleChanged",n([a.PreConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"createChildComponentsPreConstruct",null),t}(l.BeanStub);t.Component=c},22743:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(69638),a=function(){function e(){}return e.prototype.postConstruct=function(){this.componentMetaData={dateComponent:{mandatoryMethodList:["getDate","setDate"],optionalMethodList:["afterGuiAttached"]},detailCellRenderer:{mandatoryMethodList:[],optionalMethodList:[]},headerComponent:{mandatoryMethodList:[],optionalMethodList:[]},headerGroupComponent:{mandatoryMethodList:[],optionalMethodList:[]},loadingCellRenderer:{mandatoryMethodList:[],optionalMethodList:[]},loadingOverlayComponent:{mandatoryMethodList:[],optionalMethodList:[]},noRowsOverlayComponent:{mandatoryMethodList:[],optionalMethodList:[]},floatingFilterComponent:{mandatoryMethodList:["onParentModelChanged"],optionalMethodList:["afterGuiAttached"]},floatingFilterWrapperComponent:{mandatoryMethodList:[],optionalMethodList:[]},cellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},cellEditor:{mandatoryMethodList:["getValue"],optionalMethodList:["isPopup","isCancelBeforeStart","isCancelAfterEnd","focusIn","focusOut","afterGuiAttached"]},innerRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},fullWidthCellRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},pinnedRowCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},groupRowInnerRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},groupRowRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},filter:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged"]},filterComponent:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged"]},statusPanel:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"]},toolPanel:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"]},tooltipComponent:{mandatoryMethodList:[],optionalMethodList:[]}}},e.prototype.retrieve=function(e){return this.componentMetaData[e]},r([n.Autowired("agComponentUtils"),i("design:type",s.AgComponentUtils)],e.prototype,"agComponentUtils",void 0),r([n.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"postConstruct",null),r([n.Bean("componentMetadataProvider")],e)}();t.ComponentMetadataProvider=a},23054:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s=o(26016),a=o(15068),l=o(45727),p=o(85786),u=o(34782),c=o(22131),d=o(95125),h=o(87952),f=o(15724),g=o(83423),m=function(e){function t(t,o,r,i,n,s,a){var l=e.call(this)||this;return l.editingCell=!1,l.suppressRefreshCell=!1,l.scope=null,l.cellEditorVersion=0,l.cellRendererVersion=0,l.scope=t,l.beans=o,l.column=r,l.rowNode=i,l.rowComp=n,l.autoHeightCell=s,l.printLayout=a,l.createGridCellVo(),l.rangeSelectionEnabled=o.enterprise&&o.gridOptionsWrapper.isEnableRangeSelection(),l.cellFocused=l.beans.focusedCellController.isCellFocused(l.gridCell),l.firstRightPinned=l.column.isFirstRightPinned(),l.lastLeftPinned=l.column.isLastLeftPinned(),l.rangeSelectionEnabled&&(l.rangeCount=l.beans.rangeController.getCellRangeCount(l.gridCell)),l.getValueAndFormat(),l.setUsingWrapper(),l.chooseCellRenderer(),l.setupColSpan(),l.rowSpan=l.column.getRowSpan(l.rowNode),l}return i(t,e),t.prototype.getCreateTemplate=function(){var e=this.beans.gridOptionsWrapper.isEnableCellTextSelection()?"":'unselectable="on"',t=[],o=this.column,r=this.getCellWidth(),i=this.modifyLeftForPrintLayout(o.getLeft()),n=this.getInitialValueToRender(),s=g._.get(this.column,"colDef.template",null)?n:g._.escape(n);this.tooltip=this.getToolTip();var a=g._.escape(this.tooltip),l=g._.escape(o.getId()),p="",u="",c=this.preProcessStylesFromColDef(),d=this.getInitialCssClasses(),h=this.getStylesForRowSpanning();return this.usingWrapper&&(p='<span ref="eCellWrapper" class="ag-cell-wrapper"><span ref="eCellValue" class="ag-cell-value" '+e+">",u="</span></span>"),t.push("<div"),t.push(' tabindex="-1"'),t.push(" "+e),t.push(' role="gridcell"'),t.push(' comp-id="'+this.getCompId()+'" '),t.push(' col-id="'+l+'"'),t.push(' class="'+d.join(" ")+'"'),this.beans.gridOptionsWrapper.isEnableBrowserTooltips()&&g._.exists(a)&&t.push('title="'+a+'"'),t.push(' style="width: '+r+"px; left: "+i+"px; "+c+" "+h+'" >'),t.push(p),g._.exists(s,!0)&&t.push(s),t.push(u),t.push("</div>"),t.join("")},t.prototype.getStylesForRowSpanning=function(){return 1===this.rowSpan?"":"height: "+this.beans.gridOptionsWrapper.getRowHeightAsNumber()*this.rowSpan+"px; z-index: 1;"},t.prototype.afterAttached=function(){var e='[comp-id="'+this.getCompId()+'"]',t=this.eParentRow.querySelector(e);this.setGui(t),this.addDomData(),this.populateTemplate(),this.attachCellRenderer(),this.angular1Compile(),this.addDestroyableEventListener(this.beans.eventService,p.Events.EVENT_CELL_FOCUSED,this.onCellFocused.bind(this)),this.addDestroyableEventListener(this.beans.eventService,p.Events.EVENT_FLASH_CELLS,this.onFlashCells.bind(this)),this.addDestroyableEventListener(this.beans.eventService,p.Events.EVENT_COLUMN_HOVER_CHANGED,this.onColumnHover.bind(this)),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_CELL_CHANGED,this.onCellChanged.bind(this)),this.addDestroyableEventListener(this.column,s.Column.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.addDestroyableEventListener(this.column,s.Column.EVENT_WIDTH_CHANGED,this.onWidthChanged.bind(this)),this.addDestroyableEventListener(this.column,s.Column.EVENT_FIRST_RIGHT_PINNED_CHANGED,this.onFirstRightPinnedChanged.bind(this)),this.addDestroyableEventListener(this.column,s.Column.EVENT_LAST_LEFT_PINNED_CHANGED,this.onLastLeftPinnedChanged.bind(this)),this.printLayout&&this.addDestroyableEventListener(this.beans.eventService,p.Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onLeftChanged.bind(this)),this.rangeSelectionEnabled&&this.addDestroyableEventListener(this.beans.eventService,p.Events.EVENT_RANGE_SELECTION_CHANGED,this.onRangeSelectionChanged.bind(this)),this.tooltip&&!this.beans.gridOptionsWrapper.isEnableBrowserTooltips()&&this.beans.tooltipManager.registerTooltip(this)},t.prototype.onColumnHover=function(){var e=this.beans.columnHoverService.isHovered(this.column);g._.addOrRemoveCssClass(this.getGui(),"ag-column-hover",e)},t.prototype.onCellChanged=function(e){e.column===this.column&&this.refreshCell({})},t.prototype.getCellLeft=function(){return(this.beans.gridOptionsWrapper.isEnableRtl()&&this.colsSpanning?this.colsSpanning[this.colsSpanning.length-1]:this.column).getLeft()},t.prototype.getCellWidth=function(){if(!this.colsSpanning)return this.column.getActualWidth();var e=0;return this.colsSpanning.forEach((function(t){return e+=t.getActualWidth()})),e},t.prototype.onFlashCells=function(e){var t=this.gridCell.createId();e.cells[t]&&this.animateCell("highlight")},t.prototype.setupColSpan=function(){g._.missing(this.getComponentHolder().colSpan)||(this.addDestroyableEventListener(this.beans.eventService,p.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayColumnsChanged.bind(this)),this.addDestroyableEventListener(this.beans.eventService,p.Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onWidthChanged.bind(this)),this.colsSpanning=this.getColSpanningList())},t.prototype.getColSpanningList=function(){var e=this.column.getColSpan(this.rowNode),t=[];if(1===e)t.push(this.column);else for(var o=this.column,r=this.column.getPinned(),i=0;o&&i<e&&(t.push(o),(o=this.beans.columnController.getDisplayedColAfter(o))&&!g._.missing(o))&&r===o.getPinned();i++);return t},t.prototype.onDisplayColumnsChanged=function(){var e=this.getColSpanningList();g._.compareArrays(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())},t.prototype.getInitialCssClasses=function(){var e=["ag-cell","ag-cell-not-inline-editing"];return this.autoHeightCell||e.push("ag-cell-with-height"),!this.beans.gridOptionsWrapper.isSuppressCellSelection()&&this.cellFocused&&e.push("ag-cell-focus"),this.firstRightPinned&&e.push("ag-cell-first-right-pinned"),this.lastLeftPinned&&e.push("ag-cell-last-left-pinned"),this.beans.columnHoverService.isHovered(this.column)&&e.push("ag-column-hover"),g._.pushAll(e,this.preProcessClassesFromColDef()),g._.pushAll(e,this.preProcessCellClassRules()),g._.pushAll(e,this.getRangeClasses()),this.usingWrapper||e.push("ag-cell-value"),e},t.prototype.getInitialValueToRender=function(){if(this.usingCellRenderer)return"string"==typeof this.cellRendererGui?this.cellRendererGui:"";var e=this.getComponentHolder();return e.template?e.template:e.templateUrl?this.beans.templateService.getTemplate(e.templateUrl,this.refreshCell.bind(this,!0))||"":this.getValueToUse()},t.prototype.getRenderedRow=function(){return this.rowComp},t.prototype.isSuppressNavigable=function(){return this.column.isSuppressNavigable(this.rowNode)},t.prototype.getCellRenderer=function(){return this.cellRenderer},t.prototype.getCellEditor=function(){return this.cellEditor},t.prototype.refreshCell=function(e){if(!this.editingCell&&!this.suppressRefreshCell){var t=this.getComponentHolder(),o=e&&e.newData,r=e&&e.suppressFlash||t.suppressCellFlash,i=e&&e.forceRefresh,n=this.value;this.getValueAndFormat();var s=!this.valuesAreEqual(n,this.value);(i||s)&&(!o&&this.attemptCellRendererRefresh()||this.replaceContentsAfterRefresh(),!r&&(this.beans.gridOptionsWrapper.isEnableCellChangeFlash()||t.enableCellChangeFlash)&&this.flashCell(),this.postProcessStylesFromColDef(),this.postProcessClassesFromColDef()),this.updateAngular1ScopeAndCompile(),this.refreshToolTip(),this.postProcessCellClassRules()}},t.prototype.flashCell=function(){this.animateCell("data-changed")},t.prototype.animateCell=function(e){var t="ag-cell-"+e,o="ag-cell-"+e+"-animation",r=this.getGui();g._.addCssClass(r,t),g._.removeCssClass(r,o),window.setTimeout((function(){g._.removeCssClass(r,t),g._.addCssClass(r,o),window.setTimeout((function(){g._.removeCssClass(r,o)}),1e3)}),500)},t.prototype.replaceContentsAfterRefresh=function(){g._.clearElement(this.eParentOfValue),this.cellRenderer&&this.cellRenderer.destroy&&this.cellRenderer.destroy(),this.cellRenderer=null,this.cellRendererGui=null,this.putDataIntoCellAfterRefresh(),this.updateAngular1ScopeAndCompile()},t.prototype.updateAngular1ScopeAndCompile=function(){this.beans.gridOptionsWrapper.isAngularCompileRows()&&this.scope&&(this.scope.data=n({},this.rowNode.data),this.angular1Compile())},t.prototype.angular1Compile=function(){if(this.beans.gridOptionsWrapper.isAngularCompileRows()){var e=this.getGui();if(!e.classList.contains("ng-scope")||0===e.childElementCount){var t=this.beans.$compile(e)(this.scope);this.addDestroyFunc((function(){t.remove()}))}}},t.prototype.postProcessStylesFromColDef=function(){var e=this.processStylesFromColDef();e&&g._.addStylesToElement(this.getGui(),e)},t.prototype.preProcessStylesFromColDef=function(){var e=this.processStylesFromColDef();return g._.cssStyleObjectToMarkup(e)},t.prototype.processStylesFromColDef=function(){var e=this.getComponentHolder();if(e.cellStyle){var t=void 0;if("function"==typeof e.cellStyle){var o={value:this.value,data:this.rowNode.data,node:this.rowNode,colDef:e,column:this.column,$scope:this.scope,context:this.beans.gridOptionsWrapper.getContext(),api:this.beans.gridOptionsWrapper.getApi()};t=(0,e.cellStyle)(o)}else t=e.cellStyle;return t}},t.prototype.postProcessClassesFromColDef=function(){var e=this;this.processClassesFromColDef((function(t){return g._.addCssClass(e.getGui(),t)}))},t.prototype.preProcessClassesFromColDef=function(){var e=[];return this.processClassesFromColDef((function(t){return e.push(t)})),e},t.prototype.processClassesFromColDef=function(e){var t=this.getComponentHolder();this.beans.stylingService.processStaticCellClasses(t,{value:this.value,data:this.rowNode.data,node:this.rowNode,colDef:t,rowIndex:this.rowNode.rowIndex,$scope:this.scope,api:this.beans.gridOptionsWrapper.getApi(),context:this.beans.gridOptionsWrapper.getContext()},e)},t.prototype.putDataIntoCellAfterRefresh=function(){var e=this.getComponentHolder();if(e.template)this.eParentOfValue.innerHTML=e.template;else if(e.templateUrl){var t=this.beans.templateService.getTemplate(e.templateUrl,this.refreshCell.bind(this,!0));t&&(this.eParentOfValue.innerHTML=t)}else if(this.usingCellRenderer&&(this.attachCellRenderer()||(this.usingCellRenderer=!1)),!this.usingCellRenderer){var o=this.getValueToUse();null!=o&&(this.eParentOfValue.innerHTML=g._.escape(o))}},t.prototype.attemptCellRendererRefresh=function(){if(g._.missing(this.cellRenderer)||!this.cellRenderer||g._.missing(this.cellRenderer.refresh))return!1;var e=this.createCellRendererParams(),t=this.beans.userComponentFactory.createFinalParams(this.getComponentHolder(),this.cellRendererType,e),o=this.cellRenderer.refresh(t);return!0===o||void 0===o},t.prototype.refreshToolTip=function(){var e=this.getToolTip();if(this.tooltip!==e){if(this.tooltip=e,!this.beans.gridOptionsWrapper.isEnableBrowserTooltips())return;if(g._.exists(e)){var t=g._.escape(this.tooltip);this.eParentOfValue.setAttribute("title",t)}else this.eParentOfValue.removeAttribute("title")}},t.prototype.valuesAreEqual=function(e,t){var o=this.getComponentHolder(),r=o?o.equals:null;return r?r(e,t):e===t},t.prototype.getToolTip=function(){var e=this.getComponentHolder(),t=this.rowNode.data;if(e.tooltipField&&g._.exists(t))return g._.getValueUsingField(t,e.tooltipField,this.column.isTooltipFieldContainsDots());var o=e.tooltipValueGetter||e.tooltip;return o?o({api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),colDef:e,column:this.getColumn(),context:this.beans.gridOptionsWrapper.getContext(),value:this.value,valueFormatted:this.valueFormatted,rowIndex:this.gridCell.rowIndex,node:this.rowNode,data:this.rowNode.data,$scope:this.scope}):null},t.prototype.getTooltipText=function(e){return void 0===e&&(e=!0),e?g._.escape(this.tooltip):this.tooltip},t.prototype.processCellClassRules=function(e,t){var o=this.getComponentHolder();this.beans.stylingService.processClassRules(o.cellClassRules,{value:this.value,data:this.rowNode.data,node:this.rowNode,colDef:o,rowIndex:this.gridCell.rowIndex,api:this.beans.gridOptionsWrapper.getApi(),$scope:this.scope,context:this.beans.gridOptionsWrapper.getContext()},e,t)},t.prototype.postProcessCellClassRules=function(){var e=this;this.processCellClassRules((function(t){g._.addCssClass(e.getGui(),t)}),(function(t){g._.removeCssClass(e.getGui(),t)}))},t.prototype.preProcessCellClassRules=function(){var e=[];return this.processCellClassRules((function(t){e.push(t)}),(function(e){})),e},t.prototype.setUsingWrapper=function(){var e=this.getComponentHolder();if(this.rowNode.rowPinned)return this.usingWrapper=!1,this.includeSelectionComponent=!1,void(this.includeRowDraggingComponent=!1);var t="function"==typeof e.checkboxSelection,o="function"==typeof e.rowDrag;this.includeSelectionComponent=t||!0===e.checkboxSelection,this.includeRowDraggingComponent=o||!0===e.rowDrag,this.usingWrapper=this.includeRowDraggingComponent||this.includeSelectionComponent},t.prototype.chooseCellRenderer=function(){var e=this.getComponentHolder();if(e.template||e.templateUrl)this.usingCellRenderer=!1;else{var o=this.createCellRendererParams(),r=this.beans.userComponentFactory.lookupComponentClassDef(e,"cellRenderer",o);this.beans.userComponentFactory.lookupComponentClassDef(e,"pinnedRowCellRenderer",o)&&this.rowNode.rowPinned?(this.cellRendererType=t.CELL_RENDERER_TYPE_PINNED,this.usingCellRenderer=!0):r?(this.cellRendererType=t.CELL_RENDERER_TYPE_NORMAL,this.usingCellRenderer=!0):this.usingCellRenderer=!1}},t.prototype.createCellRendererInstance=function(){var e=this.createCellRendererParams();this.cellRendererVersion++;var o,r=this.afterCellRendererCreated.bind(this,this.cellRendererVersion);return!!(o=this.cellRendererType===t.CELL_RENDERER_TYPE_NORMAL?this.beans.userComponentFactory.newCellRenderer(this.getComponentHolder(),e):this.beans.userComponentFactory.newPinnedRowCellRenderer(this.getComponentHolder(),e))&&(o.then(r),!0)},t.prototype.afterCellRendererCreated=function(e,t){this.isAlive()&&e===this.cellRendererVersion?(this.cellRenderer=t,this.cellRendererGui=this.cellRenderer.getGui(),g._.missing(this.cellRendererGui)||this.editingCell||this.eParentOfValue.appendChild(this.cellRendererGui)):t.destroy&&t.destroy()},t.prototype.attachCellRenderer=function(){return!!this.usingCellRenderer&&this.createCellRendererInstance()},t.prototype.createCellRendererParams=function(){var e=this;return{value:this.value,valueFormatted:this.valueFormatted,getValue:this.getValue.bind(this),setValue:function(t){e.beans.valueService.setValue(e.rowNode,e.column,t)},formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,colDef:this.getComponentHolder(),column:this.column,$scope:this.scope,rowIndex:this.gridCell.rowIndex,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext(),refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.eParentOfValue,addRowCompListener:this.rowComp?this.rowComp.addEventListener.bind(this.rowComp):null,addRenderedRowListener:function(t,o){console.warn("ag-Grid: since ag-Grid .v11, params.addRenderedRowListener() is now params.addRowCompListener()"),e.rowComp&&e.rowComp.addEventListener(t,o)}}},t.prototype.formatValue=function(e){var t=this.beans.valueFormatterService.formatValue(this.column,this.rowNode,this.scope,e);return null!=t?t:e},t.prototype.getValueToUse=function(){return null!==this.valueFormatted&&void 0!==this.valueFormatted?this.valueFormatted:this.value},t.prototype.getValueAndFormat=function(){this.value=this.getValue(),this.valueFormatted=this.beans.valueFormatterService.formatValue(this.column,this.rowNode,this.scope,this.value)},t.prototype.getValue=function(){var e=this.rowNode.leafGroup&&this.beans.columnController.isPivotMode(),t=this.rowNode.group&&this.rowNode.expanded&&!this.rowNode.footer&&!e,o=this.beans.gridOptionsWrapper.isGroupIncludeFooter(),r=this.beans.gridOptionsWrapper.isGroupSuppressBlankHeader(),i=t&&o&&!r;return this.beans.valueService.getValue(this.column,this.rowNode,!1,i)},t.prototype.onMouseEvent=function(e,t){if(!g._.isStopPropagationForAgGrid(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t)}},t.prototype.dispatchCellContextMenuEvent=function(e){var t=this.getComponentHolder(),o=this.createEvent(e,p.Events.EVENT_CELL_CONTEXT_MENU);this.beans.eventService.dispatchEvent(o),t.onCellContextMenu&&window.setTimeout((function(){return t.onCellContextMenu(o)}),0)},t.prototype.createEvent=function(e,t){var o={node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.getComponentHolder(),context:this.beans.gridOptionsWrapper.getContext(),api:this.beans.gridApi,columnApi:this.beans.columnApi,rowPinned:this.rowNode.rowPinned,event:e,type:t,rowIndex:this.rowNode.rowIndex};return this.scope&&(o.$scope=this.scope),o},t.prototype.onMouseOut=function(e){var t=this.createEvent(e,p.Events.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.clearMouseOver()},t.prototype.onMouseOver=function(e){var t=this.createEvent(e,p.Events.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.setMouseOver([this.column])},t.prototype.onCellDoubleClicked=function(e){var t=this.getComponentHolder(),o=this.createEvent(e,p.Events.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(o),"function"==typeof t.onCellDoubleClicked&&window.setTimeout((function(){return t.onCellDoubleClicked(o)}),0),!this.beans.gridOptionsWrapper.isSingleClickEdit()&&!this.beans.gridOptionsWrapper.isSuppressClickEdit()&&this.startRowOrCellEdit()},t.prototype.startRowOrCellEdit=function(e,t){this.beans.gridOptionsWrapper.isFullRowEdit()?this.rowComp.startRowEditing(e,t,this):this.startEditingIfEnabled(e,t,!0)},t.prototype.isCellEditable=function(){return this.column.isCellEditable(this.rowNode)},t.prototype.startEditingIfEnabled=function(e,t,o){if(void 0===e&&(e=null),void 0===t&&(t=null),void 0===o&&(o=!1),this.isCellEditable()&&!this.editingCell){this.editingCell=!0,this.cellEditorVersion++;var r=this.afterCellEditorCreated.bind(this,this.cellEditorVersion),i=this.createCellEditorParams(e,t,o);this.createCellEditor(i).then(r),g._.missing(this.cellEditor)&&o&&this.focusCell(!0)}},t.prototype.createCellEditor=function(e){var t=this;return this.beans.userComponentFactory.newCellEditor(this.column.getColDef(),e).map((function(o){if(!o.isPopup||!o.isPopup())return o;t.beans.gridOptionsWrapper.isFullRowEdit()&&console.warn("ag-Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");var r=new f.PopupEditorWrapper(o);return t.beans.context.wireBean(r),r.init(e),r}))},t.prototype.afterCellEditorCreated=function(e,t){if(e===this.cellEditorVersion&&this.editingCell){if(t.isCancelBeforeStart&&t.isCancelBeforeStart())return t.destroy&&t.destroy(),void(this.editingCell=!1);if(!t.getGui)return console.warn("ag-Grid: cellEditor for column "+this.column.getId()+" is missing getGui() method"),t.render&&console.warn("ag-Grid: we found 'render' on the component, are you trying to set a React renderer but added it as colDef.cellEditor instead of colDef.cellEditorFmk?"),t.destroy&&t.destroy(),void(this.editingCell=!1);this.cellEditor=t,this.cellEditorInPopup=void 0!==t.isPopup&&t.isPopup(),this.setInlineEditingClass(),this.cellEditorInPopup?this.addPopupCellEditor():this.addInCellEditor(),t.afterGuiAttached&&t.afterGuiAttached();var o=this.createEvent(null,p.Events.EVENT_CELL_EDITING_STARTED);this.beans.eventService.dispatchEvent(o)}else t.destroy&&t.destroy()},t.prototype.addInCellEditor=function(){g._.clearElement(this.getGui()),this.cellEditor&&this.getGui().appendChild(this.cellEditor.getGui()),this.angular1Compile()},t.prototype.addPopupCellEditor=function(){var e=this,t=this.cellEditor?this.cellEditor.getGui():null;this.hideEditorPopup=this.beans.popupService.addAsModalPopup(t,!0,(function(){e.onPopupEditorClosed()})),this.beans.popupService.positionPopupOverComponent({column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),ePopup:t,keepWithinBounds:!0}),this.angular1Compile()},t.prototype.onPopupEditorClosed=function(){this.editingCell&&(this.stopRowOrCellEdit(),this.beans.focusedCellController.isCellFocused(this.gridCell)&&this.focusCell(!0))},t.prototype.setInlineEditingClass=function(){var e=this.editingCell&&!this.cellEditorInPopup,t=this.editingCell&&this.cellEditorInPopup;g._.addOrRemoveCssClass(this.getGui(),"ag-cell-inline-editing",e),g._.addOrRemoveCssClass(this.getGui(),"ag-cell-not-inline-editing",!e),g._.addOrRemoveCssClass(this.getGui(),"ag-cell-popup-editing",t),g._.addOrRemoveCssClass(this.getGui().parentNode,"ag-row-inline-editing",e),g._.addOrRemoveCssClass(this.getGui().parentNode,"ag-row-not-inline-editing",!e)},t.prototype.createCellEditorParams=function(e,t,o){return{value:this.getValue(),keyPress:e,charPress:t,column:this.column,colDef:this.column.getColDef(),rowIndex:this.gridCell.rowIndex,node:this.rowNode,data:this.rowNode.data,api:this.beans.gridOptionsWrapper.getApi(),cellStartedEdit:o,columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext(),$scope:this.scope,onKeyDown:this.onKeyDown.bind(this),stopEditing:this.stopEditingAndFocus.bind(this),eGridCell:this.getGui(),parseValue:this.parseValue.bind(this),formatValue:this.formatValue.bind(this)}},t.prototype.stopEditingAndFocus=function(e){void 0===e&&(e=!1),this.stopRowOrCellEdit(),this.focusCell(!0),e||this.navigateAfterEdit()},t.prototype.parseValue=function(e){var t=this.getComponentHolder(),o={node:this.rowNode,data:this.rowNode.data,oldValue:this.value,newValue:e,colDef:t,column:this.column,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext()},r=t.valueParser;return g._.exists(r)?this.beans.expressionService.evaluate(r,o):e},t.prototype.focusCell=function(e){void 0===e&&(e=!1),this.beans.focusedCellController.setFocusedCell(this.gridCell.rowIndex,this.column,this.rowNode.rowPinned,e)},t.prototype.setFocusInOnEditor=function(){this.editingCell&&(this.cellEditor&&this.cellEditor.focusIn?this.cellEditor.focusIn():this.focusCell(!0))},t.prototype.isEditing=function(){return this.editingCell},t.prototype.onKeyDown=function(e){var t=e.which||e.keyCode;switch(t){case l.Constants.KEY_ENTER:this.onEnterKeyDown();break;case l.Constants.KEY_F2:this.onF2KeyDown();break;case l.Constants.KEY_ESCAPE:this.onEscapeKeyDown();break;case l.Constants.KEY_TAB:this.onTabKeyDown(e);break;case l.Constants.KEY_BACKSPACE:case l.Constants.KEY_DELETE:this.onBackspaceOrDeleteKeyPressed(t);break;case l.Constants.KEY_DOWN:case l.Constants.KEY_UP:case l.Constants.KEY_RIGHT:case l.Constants.KEY_LEFT:this.onNavigationKeyPressed(e,t)}},t.prototype.setFocusOutOnEditor=function(){this.editingCell&&this.cellEditor&&this.cellEditor.focusOut&&this.cellEditor.focusOut()},t.prototype.onNavigationKeyPressed=function(e,t){this.editingCell||(e.shiftKey&&this.rangeSelectionEnabled?this.onShiftRangeSelect(t):this.beans.rowRenderer.navigateToNextCell(e,t,this.gridCell,!0),e.preventDefault())},t.prototype.onShiftRangeSelect=function(e){if(this.beans.rangeController.extendRangeInDirection(this.gridCell,e)){var t=this.beans.rangeController.getCellRanges();if(!g._.missing(t)&&t&&1===t.length){var o=t[0].end;this.beans.rowRenderer.ensureCellVisible(o)}}},t.prototype.onTabKeyDown=function(e){this.beans.rowRenderer.onTabKeyDown(this,e)},t.prototype.onBackspaceOrDeleteKeyPressed=function(e){this.editingCell||this.startRowOrCellEdit(e)},t.prototype.onEnterKeyDown=function(){this.editingCell||this.rowComp.isEditing()?this.stopEditingAndFocus():this.beans.gridOptionsWrapper.isEnterMovesDown()?this.beans.rowRenderer.navigateToNextCell(null,l.Constants.KEY_DOWN,this.gridCell,!1):this.startRowOrCellEdit(l.Constants.KEY_ENTER)},t.prototype.navigateAfterEdit=function(){this.beans.gridOptionsWrapper.isFullRowEdit()||this.beans.gridOptionsWrapper.isEnterMovesDownAfterEdit()&&this.beans.rowRenderer.navigateToNextCell(null,l.Constants.KEY_DOWN,this.gridCell,!1)},t.prototype.onF2KeyDown=function(){this.editingCell||this.startRowOrCellEdit(l.Constants.KEY_F2)},t.prototype.onEscapeKeyDown=function(){this.editingCell&&(this.stopRowOrCellEdit(!0),this.focusCell(!0))},t.prototype.onKeyPress=function(e){if(g._.getTarget(e)===this.getGui()&&!this.editingCell){var t=String.fromCharCode(e.charCode);" "===t?this.onSpaceKeyPressed(e):g._.isEventFromPrintableCharacter(e)&&(this.startRowOrCellEdit(null,t),e.preventDefault())}},t.prototype.onSpaceKeyPressed=function(e){if(!this.editingCell&&this.beans.gridOptionsWrapper.isRowSelection()){var t=this.rowNode.isSelected();this.rowNode.setSelected(!t)}e.preventDefault()},t.prototype.onMouseDown=function(e){var t=!1;if(!g._.isElementChildOfClass(e.target,"ag-selection-checkbox",3)){if(g._.isBrowserIE()&&e.target.classList.contains("ag-cell")&&(t=!0),this.focusCell(t),g._.isLeftClick(e)&&this.beans.rangeController){var o=this.gridCell;if(e.shiftKey)this.beans.rangeController.extendRangeToCell(o);else{var r=e.ctrlKey||e.metaKey;this.beans.rangeController.setRangeToCell(o,r)}}var i=this.createEvent(e,p.Events.EVENT_CELL_MOUSE_DOWN);this.beans.eventService.dispatchEvent(i)}},t.prototype.isDoubleClickOnIPad=function(){if(!g._.isUserAgentIPad())return!1;var e=(new Date).getTime(),t=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,t},t.prototype.onCellClicked=function(e){if(this.isDoubleClickOnIPad())return this.onCellDoubleClicked(e),void e.preventDefault();var t=this.createEvent(e,p.Events.EVENT_CELL_CLICKED);this.beans.eventService.dispatchEvent(t);var o=this.getComponentHolder();o.onCellClicked&&window.setTimeout((function(){return o.onCellClicked(t)}),0),(this.beans.gridOptionsWrapper.isSingleClickEdit()||o.singleClickEdit)&&!this.beans.gridOptionsWrapper.isSuppressClickEdit()&&this.startRowOrCellEdit(),g._.doIeFocusHack(this.getGui())},t.prototype.createGridCellVo=function(){var e={rowIndex:this.rowNode.rowIndex,floating:this.rowNode.rowPinned,column:this.column};this.gridCell=new u.GridCell(e)},t.prototype.getGridCell=function(){return this.gridCell},t.prototype.getParentRow=function(){return this.eParentRow},t.prototype.setParentRow=function(e){this.eParentRow=e},t.prototype.getColumn=function(){return this.column},t.prototype.getComponentHolder=function(){return this.column.getColDef()},t.prototype.detach=function(){this.eParentRow.removeChild(this.getGui())},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.cellEditor&&this.cellEditor.destroy&&(this.cellEditor.destroy(),this.cellEditor=null),this.cellRenderer&&this.cellRenderer.destroy&&(this.cellRenderer.destroy(),this.cellRenderer=null)},t.prototype.onLeftChanged=function(){var e=this.modifyLeftForPrintLayout(this.getCellLeft());this.getGui().style.left=e+"px"},t.prototype.modifyLeftForPrintLayout=function(e){return this.printLayout?this.column.getPinned()===s.Column.PINNED_LEFT?e:this.column.getPinned()===s.Column.PINNED_RIGHT?this.beans.columnController.getPinnedLeftContainerWidth()+this.beans.columnController.getBodyContainerWidth()+e:this.beans.columnController.getPinnedLeftContainerWidth()+e:e},t.prototype.onWidthChanged=function(){var e=this.getCellWidth();this.getGui().style.width=e+"px"},t.prototype.getRangeClasses=function(){var e=[];return this.rangeSelectionEnabled?(0!==this.rangeCount&&e.push("ag-cell-range-selected"),1===this.rangeCount&&e.push("ag-cell-range-selected-1"),2===this.rangeCount&&e.push("ag-cell-range-selected-2"),3===this.rangeCount&&e.push("ag-cell-range-selected-3"),this.rangeCount>=4&&e.push("ag-cell-range-selected-4"),e):e},t.prototype.onRowIndexChanged=function(){this.createGridCellVo(),this.onCellFocused(),this.onRangeSelectionChanged()},t.prototype.onRangeSelectionChanged=function(){if(this.beans.enterprise){var e=this.beans.rangeController.getCellRangeCount(this.gridCell),t=this.getGui();this.rangeCount!==e&&(g._.addOrRemoveCssClass(t,"ag-cell-range-selected",0!==e),g._.addOrRemoveCssClass(t,"ag-cell-range-selected-1",1===e),g._.addOrRemoveCssClass(t,"ag-cell-range-selected-2",2===e),g._.addOrRemoveCssClass(t,"ag-cell-range-selected-3",3===e),g._.addOrRemoveCssClass(t,"ag-cell-range-selected-4",e>=4),this.rangeCount=e)}},t.prototype.onFirstRightPinnedChanged=function(){var e=this.column.isFirstRightPinned();this.firstRightPinned!==e&&(this.firstRightPinned=e,g._.addOrRemoveCssClass(this.getGui(),"ag-cell-first-right-pinned",e))},t.prototype.onLastLeftPinnedChanged=function(){var e=this.column.isLastLeftPinned();this.lastLeftPinned!==e&&(this.lastLeftPinned=e,g._.addOrRemoveCssClass(this.getGui(),"ag-cell-last-left-pinned",e))},t.prototype.populateTemplate=function(){this.usingWrapper?(this.eParentOfValue=this.getRefElement("eCellValue"),this.eCellWrapper=this.getRefElement("eCellWrapper"),this.includeRowDraggingComponent&&this.addRowDragging(),this.includeSelectionComponent&&this.addSelectionCheckbox()):this.eParentOfValue=this.getGui()},t.prototype.addRowDragging=function(){if(this.beans.gridOptionsWrapper.isRowModelDefault())if(this.beans.gridOptionsWrapper.isPagination())g._.doOnce((function(){return console.warn("ag-Grid: row dragging is not possible when doing pagination")}),"CellComp.addRowDragging");else{var e=new h.RowDragComp(this.rowNode,this.column,this.getValueToUse(),this.beans);this.addFeature(this.beans.context,e),this.eCellWrapper.insertBefore(e.getGui(),this.eParentOfValue)}else g._.doOnce((function(){return console.warn("ag-Grid: row dragging is only allowed in the In Memory Row Model")}),"CellComp.addRowDragging")},t.prototype.addSelectionCheckbox=function(){var e=new d.CheckboxSelectionComponent;this.beans.context.wireBean(e);var t=this.getComponentHolder().checkboxSelection;t="function"==typeof t?t:null,e.init({rowNode:this.rowNode,column:this.column,visibleFunc:t}),this.addDestroyFunc((function(){return e.destroy()})),this.eCellWrapper.insertBefore(e.getGui(),this.eParentOfValue)},t.prototype.addDomData=function(){var e=this,o=this.getGui();this.beans.gridOptionsWrapper.setDomData(o,t.DOM_DATA_KEY_CELL_COMP,this),this.addDestroyFunc((function(){return e.beans.gridOptionsWrapper.setDomData(o,t.DOM_DATA_KEY_CELL_COMP,null)}))},t.prototype.onCellFocused=function(e){var t=this.beans.focusedCellController.isCellFocused(this.gridCell);if(t!==this.cellFocused&&(!this.beans.gridOptionsWrapper.isSuppressCellSelection()&&g._.addOrRemoveCssClass(this.getGui(),"ag-cell-focus",t),this.cellFocused=t),t&&e&&e.forceBrowserFocus){var o=this.getGui();o.focus(),g._.doIeFocusHack(o)}var r=this.beans.gridOptionsWrapper.isFullRowEdit();t||r||!this.editingCell||this.stopRowOrCellEdit()},t.prototype.stopRowOrCellEdit=function(e){void 0===e&&(e=!1),this.beans.gridOptionsWrapper.isFullRowEdit()?this.rowComp.stopRowEditing(e):this.stopEditing(e)},t.prototype.stopEditing=function(e){if(void 0===e&&(e=!1),this.editingCell)if(this.cellEditor){var t,o=!1;if(e||this.cellEditor.isCancelAfterEnd&&this.cellEditor.isCancelAfterEnd()||(t=this.cellEditor.getValue(),o=!0),this.editingCell=!1,this.cellEditor.destroy&&this.cellEditor.destroy(),this.cellEditor=null,this.cellEditorInPopup&&this.hideEditorPopup)this.hideEditorPopup(),this.hideEditorPopup=null;else if(g._.clearElement(this.getGui()),this.usingWrapper)this.getGui().appendChild(this.eCellWrapper);else if(this.cellRenderer){var r=this.cellRendererGui;r&&this.getGui().appendChild(r)}this.setInlineEditingClass(),o&&(this.suppressRefreshCell=!0,this.rowNode.setDataValue(this.column,t),this.suppressRefreshCell=!1),this.refreshCell({forceRefresh:!0,suppressFlash:!0});var i=this.createEvent(null,p.Events.EVENT_CELL_EDITING_STOPPED);this.beans.eventService.dispatchEvent(i)}else this.editingCell=!1},t.DOM_DATA_KEY_CELL_COMP="cellComp",t.CELL_RENDERER_TYPE_NORMAL="cellRenderer",t.CELL_RENDERER_TYPE_PINNED="pinnedRowCellRenderer",t}(c.Component);t.CellComp=m},23801:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(55090),a=o(23054),l=o(98239),p=o(83423),u=function(){function e(){}return e.prototype.registerGridComp=function(e){this.gridPanel=e},e.prototype.getPreferredHeightForRow=function(e){var t=this;this.eDummyContainer||(this.eDummyContainer=document.createElement("div"),p._.addCssClass(this.eDummyContainer,"ag-row ag-row-no-focus"));var o=this.gridPanel.getCenterContainer();o.appendChild(this.eDummyContainer);var r=[];this.columnController.getAllAutoRowHeightCols().filter((function(e){return e.isVisible()})).forEach((function(o){var i=new a.CellComp(t.$scope,t.beans,o,e,null,!0,!1);i.setParentRow(t.eDummyContainer),r.push(i)}));var i=r.map((function(e){return e.getCreateTemplate()})).join(" ");this.eDummyContainer.innerHTML=i,r.forEach((function(e){return e.afterAttached()}));for(var n=0,s=0;s<this.eDummyContainer.children.length;s++){var l=this.eDummyContainer.children[s];l.offsetHeight>n&&(n=l.offsetHeight)}return o.removeChild(this.eDummyContainer),r.forEach((function(e){e.detach(),e.destroy()})),p._.clearElement(this.eDummyContainer),n},r([n.Autowired("beans"),i("design:type",s.Beans)],e.prototype,"beans",void 0),r([n.Autowired("$scope"),i("design:type",Object)],e.prototype,"$scope",void 0),r([n.Autowired("columnController"),i("design:type",l.ColumnController)],e.prototype,"columnController",void 0),r([n.Bean("autoHeightCalculator")],e)}();t.AutoHeightCalculator=u},24048:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(44081),a=o(663),l=o(4889),p=function(){function e(){}return e.prototype.execute=function(e){var t=e.rowNode,o=e.changedPath;this.filterService.filter(o),this.selectableService.updateSelectableAfterFiltering(t)},r([n.Autowired("gridOptionsWrapper"),i("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.Autowired("selectableService"),i("design:type",l.SelectableService)],e.prototype,"selectableService",void 0),r([n.Autowired("filterService"),i("design:type",a.FilterService)],e.prototype,"filterService",void 0),r([n.Bean("filterStage")],e)}();t.FilterStage=p},24144:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(44081),l=o(72493),p=function(e){function t(){return e.call(this)||this}return i(t,e),t.prototype.init=function(e){var o=this.gridOptionsWrapper.getOverlayLoadingTemplate()?this.gridOptionsWrapper.getOverlayLoadingTemplate():t.DEFAULT_LOADING_OVERLAY_TEMPLATE,r=this.gridOptionsWrapper.getLocaleTextFunc(),i=o.replace("[LOADING...]",r("loadingOoo","Loading..."));this.setTemplate(i)},t.DEFAULT_LOADING_OVERLAY_TEMPLATE='<span class="ag-overlay-loading-center">[LOADING...]</span>',n([l.Autowired("gridOptionsWrapper"),s("design:type",a.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),t}(o(22131).Component);t.LoadingOverlayComponent=p},24463:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(44081),s=o(40634),a=o(98239),l=o(72493),p=o(85786),u=o(60843),c=o(88842),d=o(83423),h=function(){function e(){this.initialised=!1}return e.prototype.init=function(){this.cellExpressions=this.gridOptionsWrapper.isEnableCellExpressions(),this.initialised=!0},e.prototype.getValue=function(e,t,o,r){if(void 0===o&&(o=!1),void 0===r&&(r=!1),this.initialised||this.init(),t){var i,n=e.getColDef(),s=n.field,a=e.getId(),l=t.data,p=t.groupData&&void 0!==t.groupData[a],u=!r&&t.aggData&&void 0!==t.aggData[a];if(o&&n.filterValueGetter?i=this.executeFilterValueGetter(n.filterValueGetter,l,e,t):this.gridOptionsWrapper.isTreeData()&&u?i=t.aggData[a]:this.gridOptionsWrapper.isTreeData()&&n.valueGetter?i=this.executeValueGetter(n.valueGetter,l,e,t):this.gridOptionsWrapper.isTreeData()&&s&&l?i=d._.getValueUsingField(l,s,e.isFieldContainsDots()):p?i=t.groupData[a]:u?i=t.aggData[a]:n.valueGetter?i=this.executeValueGetter(n.valueGetter,l,e,t):s&&l&&(i=d._.getValueUsingField(l,s,e.isFieldContainsDots())),this.cellExpressions&&"string"==typeof i&&0===i.indexOf("=")){var c=i.substring(1);i=this.executeValueGetter(c,l,e,t)}return i}},e.prototype.setValue=function(e,t,o){var r=this.columnController.getPrimaryColumn(t);if(e&&r){var i=e.data;d._.missing(i)&&(e.data={});var n=r.getColDef(),s=n.field,a=n.newValueHandler,l=n.valueSetter;if(d._.missing(s)&&d._.missing(a)&&d._.missing(l))console.warn("ag-Grid: you need either field or valueSetter set on colDef for editing to work");else{var u,c={node:e,data:e.data,oldValue:this.getValue(r,e),newValue:o,colDef:r.getColDef(),column:r,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()};if(c.newValue=o,void 0===(u=a&&d._.exists(a)?a(c):d._.exists(l)?this.expressionService.evaluate(l,c):this.setValueUsingField(i,s,o,r.isFieldContainsDots()))&&(u=!0),u){e.resetQuickFilterAggregateText(),this.valueCache.onDataChanged(),c.newValue=this.getValue(r,e);var h=r.getColDef().onCellValueChanged;"function"==typeof h&&setTimeout((function(){return h(c)}),0);var f={type:p.Events.EVENT_CELL_VALUE_CHANGED,event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:c.column,api:c.api,colDef:c.colDef,columnApi:c.columnApi,context:c.context,data:e.data,node:e,oldValue:c.oldValue,newValue:c.newValue,value:c.newValue};this.eventService.dispatchEvent(f)}}}},e.prototype.setValueUsingField=function(e,t,o,r){if(!t)return!1;if(r)for(var i=t.split("."),n=e;i.length>0&&n;){var s=i.shift();0===i.length?n[s]=o:n=n[s]}else e[t]=o;return!0},e.prototype.executeFilterValueGetter=function(e,t,o,r){var i={data:t,node:r,column:o,colDef:o.getColDef(),api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext(),getValue:this.getValueCallback.bind(this,r)};return this.expressionService.evaluate(e,i)},e.prototype.executeValueGetter=function(e,t,o,r){var i=o.getId(),n=this.valueCache.getValue(r,i);if(void 0!==n)return n;var s={data:t,node:r,column:o,colDef:o.getColDef(),api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext(),getValue:this.getValueCallback.bind(this,r)},a=this.expressionService.evaluate(e,s);return this.valueCache.setValue(r,i,a),a},e.prototype.getValueCallback=function(e,t){var o=this.columnController.getPrimaryColumn(t);return o?this.getValue(o,e):null},e.prototype.getKeyForNode=function(e,t){var o=this.getValue(e,t),r=e.getColDef().keyCreator,i=r?r({value:o}):o;return"string"==typeof i||null==i||"[object Object]"===(i=String(i))&&d._.doOnce((function(){console.warn("ag-Grid: a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (se ag-Grid docs) or b) to toString() on the object to return a key")}),"getKeyForNode - warn about [object,object]"),i},r([l.Autowired("gridOptionsWrapper"),i("design:type",n.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([l.Autowired("expressionService"),i("design:type",s.ExpressionService)],e.prototype,"expressionService",void 0),r([l.Autowired("columnController"),i("design:type",a.ColumnController)],e.prototype,"columnController",void 0),r([l.Autowired("eventService"),i("design:type",u.EventService)],e.prototype,"eventService",void 0),r([l.Autowired("valueCache"),i("design:type",c.ValueCache)],e.prototype,"valueCache",void 0),r([l.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),r([l.Bean("valueService")],e)}();t.ValueService=h},25230:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(37132),a=o(60843),l=o(85786),p=o(44081),u=o(44871),c=o(40797),d=o(83423),h=function(){function e(){this.onMouseUpListener=this.onMouseUp.bind(this),this.onMouseMoveListener=this.onMouseMove.bind(this),this.onTouchEndListener=this.onTouchUp.bind(this),this.onTouchMoveListener=this.onTouchMove.bind(this),this.dragEndFunctions=[],this.dragSources=[]}return e.prototype.init=function(){this.logger=this.loggerFactory.create("DragService")},e.prototype.destroy=function(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0},e.prototype.removeListener=function(e){var t=e.dragSource.eElement,o=e.mouseDownListener;if(t.removeEventListener("mousedown",o),e.touchEnabled){var r=e.touchStartListener;t.removeEventListener("touchstart",r,{passive:!0})}},e.prototype.removeDragSource=function(e){var t=d._.find(this.dragSources,(function(t){return t.dragSource===e}));t&&(this.removeListener(t),d._.removeFromArray(this.dragSources,t))},e.prototype.setNoSelectToBody=function(e){var t=this.gridOptionsWrapper.getDocument().querySelector("body");d._.exists(t)&&d._.addOrRemoveCssClass(t,"ag-unselectable",e)},e.prototype.addDragSource=function(e,t){void 0===t&&(t=!1);var o=this.onMouseDown.bind(this,e);e.eElement.addEventListener("mousedown",o);var r=null,i=this.gridOptionsWrapper.isSuppressTouch();t&&!i&&(r=this.onTouchStart.bind(this,e),e.eElement.addEventListener("touchstart",r,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:o,touchStartListener:r,touchEnabled:t})},e.prototype.onTouchStart=function(e,t){var o=this;this.currentDragParams=e,this.dragging=!1;var r=t.touches[0];this.touchLastTime=r,this.touchStart=r,t.preventDefault(),e.eElement.addEventListener("touchmove",this.onTouchMoveListener,{passive:!0}),e.eElement.addEventListener("touchend",this.onTouchEndListener,{passive:!0}),e.eElement.addEventListener("touchcancel",this.onTouchEndListener,{passive:!0}),this.dragEndFunctions.push((function(){e.eElement.removeEventListener("touchmove",o.onTouchMoveListener,{passive:!0}),e.eElement.removeEventListener("touchend",o.onTouchEndListener,{passive:!0}),e.eElement.removeEventListener("touchcancel",o.onTouchEndListener,{passive:!0})})),0===e.dragStartPixels&&this.onCommonMove(r,this.touchStart)},e.prototype.onMouseDown=function(e,t){var o=this;if(!(e.skipMouseEvent&&e.skipMouseEvent(t)||t._alreadyProcessedByDragService||(t._alreadyProcessedByDragService=!0,0!==t.button))){this.currentDragParams=e,this.dragging=!1,this.mouseEventLastTime=t,this.mouseStartEvent=t;var r=this.gridOptionsWrapper.getDocument();r.addEventListener("mousemove",this.onMouseMoveListener),r.addEventListener("mouseup",this.onMouseUpListener),this.dragEndFunctions.push((function(){r.removeEventListener("mousemove",o.onMouseMoveListener),r.removeEventListener("mouseup",o.onMouseUpListener)})),0===e.dragStartPixels&&this.onMouseMove(t)}},e.prototype.isEventNearStartEvent=function(e,t){var o=this.currentDragParams.dragStartPixels,r=d._.exists(o)?o:4;return d._.areEventsNear(e,t,r)},e.prototype.getFirstActiveTouch=function(e){for(var t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null},e.prototype.onCommonMove=function(e,t){if(!this.dragging){if(!this.dragging&&this.isEventNearStartEvent(e,t))return;this.dragging=!0;var o={type:l.Events.EVENT_DRAG_STARTED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(o),this.currentDragParams.onDragStart(t),this.setNoSelectToBody(!0)}this.currentDragParams.onDragging(e)},e.prototype.onTouchMove=function(e){var t=this.getFirstActiveTouch(e.touches);t&&this.onCommonMove(t,this.touchStart)},e.prototype.onMouseMove=function(e){this.onCommonMove(e,this.mouseStartEvent)},e.prototype.onTouchUp=function(e){var t=this.getFirstActiveTouch(e.changedTouches);t||(t=this.touchLastTime),this.onUpCommon(t)},e.prototype.onMouseUp=function(e){this.onUpCommon(e)},e.prototype.onUpCommon=function(e){if(this.dragging){this.dragging=!1,this.currentDragParams.onDragStop(e);var t={type:l.Events.EVENT_DRAG_STOPPED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)}this.setNoSelectToBody(!1),this.mouseStartEvent=null,this.mouseEventLastTime=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null,this.dragEndFunctions.forEach((function(e){return e()})),this.dragEndFunctions.length=0},r([n.Autowired("loggerFactory"),i("design:type",s.LoggerFactory)],e.prototype,"loggerFactory",void 0),r([n.Autowired("eventService"),i("design:type",a.EventService)],e.prototype,"eventService",void 0),r([n.Autowired("gridOptionsWrapper"),i("design:type",p.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.Autowired("columnApi"),i("design:type",u.ColumnApi)],e.prototype,"columnApi",void 0),r([n.Autowired("gridApi"),i("design:type",c.GridApi)],e.prototype,"gridApi",void 0),r([n.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),r([n.PreDestroy,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"destroy",null),r([n.Bean("dragService")],e)}();t.DragService=h},25358:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(22131),l=o(26016),p=o(72493),u=o(44081),c=o(86608),d=o(66419),h=o(60843),f=o(47721),g=o(85786),m=o(83423),y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastMovingChanged=0,t}return i(t,e),t.prototype.init=function(e){var o=m._.firstExistingValue(e.template,t.TEMPLATE);o=o&&o.trim?o.trim():o,this.setTemplate(o),this.params=e,this.setupTap(),this.setupIcons(e.column),this.setupMenu(),this.setupSort(),this.setupFilterIcon(),this.setupText(e.displayName)},t.prototype.setupText=function(e){var t=m._.escape(e);this.eText&&(this.eText.innerHTML=t)},t.prototype.setupIcons=function(e){this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addInIcon("menu",this.eMenu,e),this.addInIcon("filter",this.eFilter,e)},t.prototype.addInIcon=function(e,t,o){if(null!=t){var r=m._.createIconNoSpan(e,this.gridOptionsWrapper,o);t.appendChild(r)}},t.prototype.setupTap=function(){var e=this,t=this.gridOptionsWrapper;if(!t.isSuppressTouch()){var o=t.isSuppressMenuHide(),r=new d.TouchListener(this.getGui(),!0),i=o?new d.TouchListener(this.eMenu,!0):r;if(this.params.enableMenu){var n=o?"EVENT_TAP":"EVENT_LONG_TAP";this.addDestroyableEventListener(i,d.TouchListener[n],(function(o){t.getApi().showColumnMenuAfterMouseClick(e.params.column,o.touchStart)}))}this.params.enableSorting&&this.addDestroyableEventListener(r,d.TouchListener.EVENT_TAP,(function(t){var r=t.touchStart.target;o&&e.eMenu.contains(r)||e.sortController.progressSort(e.params.column,!1,"uiColumnSorted")})),this.addDestroyFunc((function(){return r.destroy()})),i!==r&&this.addDestroyFunc((function(){return i.destroy()}))}},t.prototype.setupMenu=function(){var e=this;if(this.eMenu){var t=this.gridOptionsWrapper.isSuppressMenuHide();if(!this.params.enableMenu||m._.isUserAgentIPad()&&!t)m._.removeFromParent(this.eMenu);else{this.addDestroyableEventListener(this.eMenu,"click",(function(){return e.showMenu(e.eMenu)})),t||(this.eMenu.style.opacity="0",this.addGuiEventListener("mouseover",(function(){e.eMenu.style.opacity="1"})),this.addGuiEventListener("mouseout",(function(){e.eMenu.style.opacity="0"})));var o=this.eMenu.style;o.transition="opacity 0.2s, border 0.2s",o["-webkit-transition"]="opacity 0.2s, border 0.2s"}}},t.prototype.showMenu=function(e){this.menuFactory.showMenuAfterButtonClick(this.params.column,e)},t.prototype.removeSortIcons=function(){m._.removeFromParent(this.eSortAsc),m._.removeFromParent(this.eSortDesc),m._.removeFromParent(this.eSortNone),m._.removeFromParent(this.eSortOrder)},t.prototype.setupSort=function(){var e=this;if(this.params.enableSorting){var t=this.gridOptionsWrapper.isMultiSortKeyCtrl();this.addDestroyableEventListener(this.params.column,l.Column.EVENT_MOVING_CHANGED,(function(){e.lastMovingChanged=(new Date).getTime()})),this.eLabel&&this.addDestroyableEventListener(this.eLabel,"click",(function(o){var r=e.params.column.isMoving(),i=(new Date).getTime()-e.lastMovingChanged<50;if(!r&&!i){var n=t?o.ctrlKey||o.metaKey:o.shiftKey;e.params.progressSort(n)}})),this.addDestroyableEventListener(this.params.column,l.Column.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.onSortChanged(),this.addDestroyableEventListener(this.eventService,g.Events.EVENT_SORT_CHANGED,this.setMultiSortOrder.bind(this)),this.setMultiSortOrder()}else this.removeSortIcons()},t.prototype.onSortChanged=function(){if(m._.addOrRemoveCssClass(this.getGui(),"ag-header-cell-sorted-asc",this.params.column.isSortAscending()),m._.addOrRemoveCssClass(this.getGui(),"ag-header-cell-sorted-desc",this.params.column.isSortDescending()),m._.addOrRemoveCssClass(this.getGui(),"ag-header-cell-sorted-none",this.params.column.isSortNone()),this.eSortAsc&&m._.addOrRemoveCssClass(this.eSortAsc,"ag-hidden",!this.params.column.isSortAscending()),this.eSortDesc&&m._.addOrRemoveCssClass(this.eSortDesc,"ag-hidden",!this.params.column.isSortDescending()),this.eSortNone){var e=!this.params.column.getColDef().unSortIcon&&!this.gridOptionsWrapper.isUnSortIcon();m._.addOrRemoveCssClass(this.eSortNone,"ag-hidden",e||!this.params.column.isSortNone())}},t.prototype.setMultiSortOrder=function(){if(this.eSortOrder){var e=this.params.column,t=this.sortController.getColumnsWithSortingOrdered(),o=t.indexOf(e),r=t.length>1,i=e.isSorting()&&r;m._.setVisible(this.eSortOrder,i),o>=0?this.eSortOrder.innerHTML=(o+1).toString():m._.clearElement(this.eSortOrder)}},t.prototype.setupFilterIcon=function(){this.eFilter&&(this.addDestroyableEventListener(this.params.column,l.Column.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.onFilterChanged())},t.prototype.onFilterChanged=function(){var e=this.params.column.isFilterActive();m._.addOrRemoveCssClass(this.eFilter,"ag-hidden",!e)},t.TEMPLATE='<div class="ag-cell-label-container" role="presentation"> <span ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span> <div ref="eLabel" class="ag-header-cell-label" role="presentation" unselectable="on"> <span ref="eText" class="ag-header-cell-text" role="columnheader" unselectable="on"></span> <span ref="eFilter" class="ag-header-icon ag-filter-icon" aria-hidden="true"></span> <span ref="eSortOrder" class="ag-header-icon ag-sort-order" aria-hidden="true"></span> <span ref="eSortAsc" class="ag-header-icon ag-sort-ascending-icon" aria-hidden="true"></span> <span ref="eSortDesc" class="ag-header-icon ag-sort-descending-icon" aria-hidden="true"></span> <span ref="eSortNone" class="ag-header-icon ag-sort-none-icon" aria-hidden="true"></span> </div></div>',n([p.Autowired("gridOptionsWrapper"),s("design:type",u.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([p.Autowired("sortController"),s("design:type",c.SortController)],t.prototype,"sortController",void 0),n([p.Autowired("menuFactory"),s("design:type",Object)],t.prototype,"menuFactory",void 0),n([p.Autowired("eventService"),s("design:type",h.EventService)],t.prototype,"eventService",void 0),n([f.RefSelector("eFilter"),s("design:type",HTMLElement)],t.prototype,"eFilter",void 0),n([f.RefSelector("eSortAsc"),s("design:type",HTMLElement)],t.prototype,"eSortAsc",void 0),n([f.RefSelector("eSortDesc"),s("design:type",HTMLElement)],t.prototype,"eSortDesc",void 0),n([f.RefSelector("eSortNone"),s("design:type",HTMLElement)],t.prototype,"eSortNone",void 0),n([f.RefSelector("eSortOrder"),s("design:type",HTMLElement)],t.prototype,"eSortOrder",void 0),n([f.RefSelector("eMenu"),s("design:type",HTMLElement)],t.prototype,"eMenu",void 0),n([f.RefSelector("eLabel"),s("design:type",HTMLElement)],t.prototype,"eLabel",void 0),n([f.RefSelector("eText"),s("design:type",HTMLElement)],t.prototype,"eText",void 0),t}(a.Component);t.HeaderComp=y},26016:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(60843),s=o(83423),a=o(72493),l=o(44081),p=o(814),u=o(44871),c=o(40797),d=function(){function e(e,t,o,r){this.moving=!1,this.menuVisible=!1,this.filterActive=!1,this.eventService=new n.EventService,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.visible=!e.hide,this.sort=e.sort,this.sortedAt=e.sortedAt,this.colId=o,this.primary=r,this.lockPosition=!0===e.lockPosition,this.lockPinned=!0===e.lockPinned,this.lockVisible=!0===e.lockVisible}return e.prototype.setColDef=function(e,t){this.colDef=e,this.userProvidedColDef=t},e.prototype.getUserProvidedColDef=function(){return this.userProvidedColDef},e.prototype.isLockPosition=function(){return this.lockPosition},e.prototype.isLockVisible=function(){return this.lockVisible},e.prototype.isLockPinned=function(){return this.lockPinned},e.prototype.setParent=function(e){this.parent=e},e.prototype.getParent=function(){return this.parent},e.prototype.setOriginalParent=function(e){this.originalParent=e},e.prototype.getOriginalParent=function(){return this.originalParent},e.prototype.initialise=function(){this.setPinned(this.colDef.pinned);var e=this.gridOptionsWrapper.getMinColWidth(),t=this.gridOptionsWrapper.getMaxColWidth();this.colDef.minWidth?this.minWidth=this.colDef.minWidth:this.minWidth=e,this.colDef.maxWidth?this.maxWidth=this.colDef.maxWidth:this.maxWidth=t,this.actualWidth=this.columnUtils.calculateColInitialWidth(this.colDef);var o=this.gridOptionsWrapper.isSuppressFieldDotNotation();this.fieldContainsDots=s._.exists(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!o,this.tooltipFieldContainsDots=s._.exists(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!o,this.validate()},e.prototype.isEmptyGroup=function(){return!1},e.prototype.isRowGroupDisplayed=function(e){if(s._.missing(this.colDef)||s._.missing(this.colDef.showRowGroup))return!1;var t=!0===this.colDef.showRowGroup,o=this.colDef.showRowGroup===e;return t||o},e.prototype.getUniqueId=function(){return this.getId()},e.prototype.isPrimary=function(){return this.primary},e.prototype.isFilterAllowed=function(){var e=!!this.colDef.filter||!!this.colDef.filterFramework;return this.primary&&e},e.prototype.isFieldContainsDots=function(){return this.fieldContainsDots},e.prototype.isTooltipFieldContainsDots=function(){return this.tooltipFieldContainsDots},e.prototype.validate=function(){var e=this.colDef;this.gridOptionsWrapper.isEnterprise()||["enableRowGroup","rowGroup","rowGroupIndex","enablePivot","pivot","pivotIndex","aggFunc"].forEach((function(t){s._.exists(e[t])&&console.warn("ag-Grid: "+t+" is only valid in ag-Grid-Enterprise, your column definition should not have "+t)})),this.gridOptionsWrapper.isTreeData()&&["rowGroup","rowGroupIndex","pivot","pivotIndex"].forEach((function(t){s._.exists(e[t])&&console.warn("ag-Grid: "+t+" is not possible when doing tree data, your column definition should not have "+t)})),s._.exists(this.colDef.width)&&"number"!=typeof this.colDef.width&&console.warn("ag-Grid: colDef.width should be a number, not "+typeof this.colDef.width),s._.get(this,"colDef.cellRendererParams.restrictToOneGroup",null)&&console.warn("ag-Grid: Since ag-grid 11.0.0 cellRendererParams.restrictToOneGroup is deprecated. You should use showRowGroup"),s._.get(this,"colDef.cellRendererParams.keyMap",null)&&console.warn("ag-Grid: Since ag-grid 11.0.0 cellRendererParams.keyMap is deprecated. You should use colDef.keyCreator"),s._.get(this,"colDef.cellRendererParams.keyMap",null)&&console.warn("ag-Grid: Since ag-grid 11.0.0 cellRendererParams.keyMap is deprecated. You should use colDef.keyCreator"),e.floatingCellRenderer&&(console.warn("ag-Grid: since v11, floatingCellRenderer is now pinnedRowCellRenderer"),this.colDef.pinnedRowCellRenderer=e.floatingCellRenderer),e.floatingRendererFramework&&(console.warn("ag-Grid: since v11, floatingRendererFramework is now pinnedRowCellRendererFramework"),this.colDef.pinnedRowCellRendererFramework=e.floatingRendererFramework),e.floatingRendererParams&&(console.warn("ag-Grid: since v11, floatingRendererParams is now pinnedRowCellRendererParams"),this.colDef.pinnedRowCellRendererParams=e.floatingRendererParams),e.floatingValueFormatter&&(console.warn("ag-Grid: since v11, floatingValueFormatter is now pinnedRowValueFormatter"),this.colDef.pinnedRowValueFormatter=e.floatingValueFormatter),e.cellFormatter&&(console.warn("ag-Grid: since v12, cellFormatter is now valueFormatter"),s._.missing(this.colDef.valueFormatter)&&(this.colDef.valueFormatter=e.cellFormatter)),e.headerCellTemplate&&console.warn("ag-Grid: since v15, headerCellTemplate is gone, use header component instead."),e.headerCellRenderer&&console.warn("ag-Grid: since v15, headerCellRenderer is gone, use header component instead."),e.volatile&&console.warn("ag-Grid: since v16, colDef.volatile is gone, please check refresh docs on how to refresh specific cells."),e.suppressSorting&&(console.warn("ag-Grid: since v20, colDef.suppressSorting is gone, instead use colDef.sortable=false.",this.colDef),this.colDef.sortable=!1),e.suppressFilter&&(console.warn("ag-Grid: since v20, colDef.suppressFilter is gone, instead use colDef.filter=false.",this.colDef),this.colDef.filter=!1),e.suppressResize&&(console.warn("ag-Grid: since v20, colDef.suppressResize is gone, instead use colDef.resizable=false.",this.colDef),this.colDef.resizable=!1),e.tooltip&&(console.warn("ag-Grid: since v20.1, colDef.tooltip is gone, instead use colDef.tooltipValueGetter.",this.colDef),this.colDef.tooltipValueGetter=e.tooltip)},e.prototype.addEventListener=function(e,t){this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService.removeEventListener(e,t)},e.prototype.createIsColumnFuncParams=function(e){return{node:e,data:e.data,column:this,colDef:this.colDef,context:this.gridOptionsWrapper.getContext(),api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi()}},e.prototype.isSuppressNavigable=function(e){if("boolean"==typeof this.colDef.suppressNavigable)return this.colDef.suppressNavigable;if("function"==typeof this.colDef.suppressNavigable){var t=this.createIsColumnFuncParams(e);return(0,this.colDef.suppressNavigable)(t)}return!1},e.prototype.isCellEditable=function(e){return!(e.group&&!this.gridOptionsWrapper.isEnableGroupEdit())&&this.isColumnFunc(e,this.colDef.editable)},e.prototype.isRowDrag=function(e){return this.isColumnFunc(e,this.colDef.rowDrag)},e.prototype.isCellCheckboxSelection=function(e){return this.isColumnFunc(e,this.colDef.checkboxSelection)},e.prototype.isSuppressPaste=function(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)},e.prototype.isResizable=function(){return!0===this.colDef.resizable},e.prototype.isColumnFunc=function(e,t){return"boolean"==typeof t?t:"function"==typeof t&&t(this.createIsColumnFuncParams(e))},e.prototype.setMoving=function(t,o){void 0===o&&(o="api"),this.moving=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_MOVING_CHANGED,o))},e.prototype.createColumnEvent=function(e,t){return{api:this.gridApi,columnApi:this.columnApi,type:e,column:this,columns:[this],source:t}},e.prototype.isMoving=function(){return this.moving},e.prototype.getSort=function(){return this.sort},e.prototype.setSort=function(t,o){void 0===o&&(o="api"),this.sort!==t&&(this.sort=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_SORT_CHANGED,o)))},e.prototype.setMenuVisible=function(t,o){void 0===o&&(o="api"),this.menuVisible!==t&&(this.menuVisible=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_MENU_VISIBLE_CHANGED,o)))},e.prototype.isMenuVisible=function(){return this.menuVisible},e.prototype.isSortAscending=function(){return this.sort===e.SORT_ASC},e.prototype.isSortDescending=function(){return this.sort===e.SORT_DESC},e.prototype.isSortNone=function(){return s._.missing(this.sort)},e.prototype.isSorting=function(){return s._.exists(this.sort)},e.prototype.getSortedAt=function(){return this.sortedAt},e.prototype.setSortedAt=function(e){this.sortedAt=e},e.prototype.setAggFunc=function(e){this.aggFunc=e},e.prototype.getAggFunc=function(){return this.aggFunc},e.prototype.getLeft=function(){return this.left},e.prototype.getOldLeft=function(){return this.oldLeft},e.prototype.getRight=function(){return this.left+this.actualWidth},e.prototype.setLeft=function(t,o){void 0===o&&(o="api"),this.oldLeft=this.left,this.left!==t&&(this.left=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_LEFT_CHANGED,o)))},e.prototype.isFilterActive=function(){return this.filterActive},e.prototype.setFilterActive=function(t,o){void 0===o&&(o="api"),this.filterActive!==t&&(this.filterActive=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_FILTER_ACTIVE_CHANGED,o))),this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_FILTER_CHANGED,o))},e.prototype.setPinned=function(t){!0===t||t===e.PINNED_LEFT?this.pinned=e.PINNED_LEFT:t===e.PINNED_RIGHT?this.pinned=e.PINNED_RIGHT:this.pinned=null},e.prototype.setFirstRightPinned=function(t,o){void 0===o&&(o="api"),this.firstRightPinned!==t&&(this.firstRightPinned=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_FIRST_RIGHT_PINNED_CHANGED,o)))},e.prototype.setLastLeftPinned=function(t,o){void 0===o&&(o="api"),this.lastLeftPinned!==t&&(this.lastLeftPinned=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_LAST_LEFT_PINNED_CHANGED,o)))},e.prototype.isFirstRightPinned=function(){return this.firstRightPinned},e.prototype.isLastLeftPinned=function(){return this.lastLeftPinned},e.prototype.isPinned=function(){return this.pinned===e.PINNED_LEFT||this.pinned===e.PINNED_RIGHT},e.prototype.isPinnedLeft=function(){return this.pinned===e.PINNED_LEFT},e.prototype.isPinnedRight=function(){return this.pinned===e.PINNED_RIGHT},e.prototype.getPinned=function(){return this.pinned},e.prototype.setVisible=function(t,o){void 0===o&&(o="api");var r=!0===t;this.visible!==r&&(this.visible=r,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_VISIBLE_CHANGED,o)))},e.prototype.isVisible=function(){return this.visible},e.prototype.getColDef=function(){return this.colDef},e.prototype.getColumnGroupShow=function(){return this.colDef.columnGroupShow},e.prototype.getColId=function(){return this.colId},e.prototype.getId=function(){return this.getColId()},e.prototype.getDefinition=function(){return this.colDef},e.prototype.getActualWidth=function(){return this.actualWidth},e.prototype.createBaseColDefParams=function(e){return{node:e,data:e.data,colDef:this.colDef,column:this,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()}},e.prototype.getColSpan=function(e){if(s._.missing(this.colDef.colSpan))return 1;var t=this.createBaseColDefParams(e),o=this.colDef.colSpan(t);return Math.max(o,1)},e.prototype.getRowSpan=function(e){if(s._.missing(this.colDef.rowSpan))return 1;var t=this.createBaseColDefParams(e),o=this.colDef.rowSpan(t);return Math.max(o,1)},e.prototype.setActualWidth=function(t,o){void 0===o&&(o="api"),this.actualWidth!==t&&(this.actualWidth=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_WIDTH_CHANGED,o)))},e.prototype.isGreaterThanMax=function(e){return!!this.maxWidth&&e>this.maxWidth},e.prototype.getMinWidth=function(){return this.minWidth},e.prototype.getMaxWidth=function(){return this.maxWidth},e.prototype.setMinimum=function(e){void 0===e&&(e="api"),this.setActualWidth(this.minWidth,e)},e.prototype.setRowGroupActive=function(t,o){void 0===o&&(o="api"),this.rowGroupActive!==t&&(this.rowGroupActive=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_ROW_GROUP_CHANGED,o)))},e.prototype.isRowGroupActive=function(){return this.rowGroupActive},e.prototype.setPivotActive=function(t,o){void 0===o&&(o="api"),this.pivotActive!==t&&(this.pivotActive=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_PIVOT_CHANGED,o)))},e.prototype.isPivotActive=function(){return this.pivotActive},e.prototype.isAnyFunctionActive=function(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()},e.prototype.isAnyFunctionAllowed=function(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()},e.prototype.setValueActive=function(t,o){void 0===o&&(o="api"),this.aggregationActive!==t&&(this.aggregationActive=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_VALUE_CHANGED,o)))},e.prototype.isValueActive=function(){return this.aggregationActive},e.prototype.isAllowPivot=function(){return!0===this.colDef.enablePivot},e.prototype.isAllowValue=function(){return!0===this.colDef.enableValue},e.prototype.isAllowRowGroup=function(){return!0===this.colDef.enableRowGroup},e.prototype.getMenuTabs=function(e){var t=this.getColDef().menuTabs;return null==t&&(t=e),t},e.EVENT_MOVING_CHANGED="movingChanged",e.EVENT_LEFT_CHANGED="leftChanged",e.EVENT_WIDTH_CHANGED="widthChanged",e.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged",e.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged",e.EVENT_VISIBLE_CHANGED="visibleChanged",e.EVENT_FILTER_CHANGED="filterChanged",e.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged",e.EVENT_SORT_CHANGED="sortChanged",e.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged",e.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged",e.EVENT_PIVOT_CHANGED="columnPivotChanged",e.EVENT_VALUE_CHANGED="columnValueChanged",e.PINNED_RIGHT="right",e.PINNED_LEFT="left",e.SORT_ASC="asc",e.SORT_DESC="desc",r([a.Autowired("gridOptionsWrapper"),i("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([a.Autowired("columnUtils"),i("design:type",p.ColumnUtils)],e.prototype,"columnUtils",void 0),r([a.Autowired("frameworkFactory"),i("design:type",Object)],e.prototype,"frameworkFactory",void 0),r([a.Autowired("columnApi"),i("design:type",u.ColumnApi)],e.prototype,"columnApi",void 0),r([a.Autowired("gridApi"),i("design:type",c.GridApi)],e.prototype,"gridApi",void 0),r([a.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"initialise",null),e}();t.Column=d},27887:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(37132),a=o(98239),l=o(26016),p=o(83423),u=o(58342),c=o(44081),d=function(){function e(e,t){this.needToMoveLeft=!1,this.needToMoveRight=!1,this.pinned=e,this.eContainer=t,this.centerContainer=!p._.exists(e)}return e.prototype.registerGridComp=function(e){this.gridPanel=e},e.prototype.init=function(){this.logger=this.loggerFactory.create("MoveColumnController")},e.prototype.getIconName=function(){return this.pinned?u.DragAndDropService.ICON_PINNED:u.DragAndDropService.ICON_MOVE},e.prototype.onDragEnter=function(e){var t=e.dragItem.columns;if(e.dragSource.type===u.DragSourceType.ToolPanel)this.setColumnsVisible(t,!0,"uiColumnDragged");else{var o=e.dragItem.visibleState,r=t.filter((function(e){return o[e.getId()]}));this.setColumnsVisible(r,!0,"uiColumnDragged")}this.setColumnsPinned(t,this.pinned,"uiColumnDragged"),this.onDragging(e,!0)},e.prototype.onDragLeave=function(e){if(!this.gridOptionsWrapper.isSuppressDragLeaveHidesColumns()&&!e.fromNudge){var t=e.dragSource.dragItemCallback().columns;this.setColumnsVisible(t,!1,"uiColumnDragged")}this.ensureIntervalCleared()},e.prototype.setColumnsVisible=function(e,t,o){if(void 0===o&&(o="api"),e){var r=e.filter((function(e){return!e.isLockVisible()}));this.columnController.setColumnsVisible(r,t,o)}},e.prototype.setColumnsPinned=function(e,t,o){if(void 0===o&&(o="api"),e){var r=e.filter((function(e){return!e.isLockPinned()}));this.columnController.setColumnsPinned(r,t,o)}},e.prototype.onDragStop=function(){this.ensureIntervalCleared()},e.prototype.normaliseX=function(e){return this.gridOptionsWrapper.isEnableRtl()&&(e=this.eContainer.clientWidth-e),this.centerContainer&&(e+=this.gridPanel.getCenterViewportScrollLeft()),e},e.prototype.checkCenterForScrolling=function(e){if(this.centerContainer){var t=this.gridPanel.getCenterViewportScrollLeft(),o=t+this.gridPanel.getCenterWidth();this.gridOptionsWrapper.isEnableRtl()?(this.needToMoveRight=e<t+50,this.needToMoveLeft=e>o-50):(this.needToMoveLeft=e<t+50,this.needToMoveRight=e>o-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}},e.prototype.onDragging=function(e,t){var o=this;if(void 0===t&&(t=!1),this.lastDraggingEvent=e,!p._.missing(e.hDirection)){var r=this.normaliseX(e.x);t||this.checkCenterForScrolling(r);var i=this.normaliseDirection(e.hDirection),n=e.dragSource.type,s=e.dragSource.dragItemCallback().columns;s=s.filter((function(e){return!e.isLockPinned()||e.getPinned()==o.pinned})),this.attemptMoveColumns(n,s,i,r,t)}},e.prototype.normaliseDirection=function(e){if(!this.gridOptionsWrapper.isEnableRtl())return e;switch(e){case u.HDirection.Left:return u.HDirection.Right;case u.HDirection.Right:return u.HDirection.Left;default:console.error("ag-Grid: Unknown direction "+e)}},e.prototype.calculateOldIndex=function(e){var t=this.columnController.getAllGridColumns(),o=[];e.forEach((function(e){return o.push(t.indexOf(e))})),p._.sortNumberArray(o);var r=o[0];return o[o.length-1]-r!=o.length-1?null:r},e.prototype.attemptMoveColumns=function(e,t,o,r,i){for(var n=o===u.HDirection.Left,s=o===u.HDirection.Right,a=this.calculateValidMoves(t,s,r),l=this.calculateOldIndex(t),p=0;p<a.length;p++){var c=a[p],d=null!==l&&!i;if(e==u.DragSourceType.HeaderCell&&(d=null!==l),d){if(n&&c>=l)continue;if(s&&c<=l)continue}if(this.columnController.doesMovePassRules(t,c))return void this.columnController.moveColumns(t,c,"uiColumnDragged")}},e.prototype.calculateValidMoves=function(e,t,o){var r,i=this.columnController.getDisplayedColumns(this.pinned),n=this.columnController.getAllGridColumns(),s=function(t){return e.indexOf(t)<0},a=i.filter((function(t){return e.indexOf(t)>=0})),l=i.filter(s),u=n.filter(s),c=0,d=o;if(t){var h=0;a.forEach((function(e){return h+=e.getActualWidth()})),d-=h}if(d>0){for(var f=0;f<l.length&&!((d-=l[f].getActualWidth())<0);f++)c++;t&&c++}if(c>0){var g=l[c-1];r=u.indexOf(g)+1}else r=0;for(var m=[r],y=n[r];p._.exists(y)&&this.isColumnHidden(i,y);)r++,m.push(r),y=n[r];return m},e.prototype.isColumnHidden=function(e,t){return e.indexOf(t)<0},e.prototype.ensureIntervalStarted=function(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.needToMoveLeft?this.dragAndDropService.setGhostIcon(u.DragAndDropService.ICON_LEFT,!0):this.dragAndDropService.setGhostIcon(u.DragAndDropService.ICON_RIGHT,!0))},e.prototype.ensureIntervalCleared=function(){this.moveInterval&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(u.DragAndDropService.ICON_MOVE))},e.prototype.moveInterval=function(){var e,t;if(this.intervalCount++,(e=10+5*this.intervalCount)>100&&(e=100),this.needToMoveLeft?t=this.gridPanel.scrollHorizontally(-e):this.needToMoveRight&&(t=this.gridPanel.scrollHorizontally(e)),0!==t)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;var o=this.lastDraggingEvent.dragItem.columns.filter((function(e){return!e.isLockPinned()}));if(o.length>0&&(this.dragAndDropService.setGhostIcon(u.DragAndDropService.ICON_PINNED),this.failedMoveAttempts>7)){var r=this.needToMoveLeft?l.Column.PINNED_LEFT:l.Column.PINNED_RIGHT;this.setColumnsPinned(o,r,"uiColumnDragged"),this.dragAndDropService.nudge()}}},r([n.Autowired("loggerFactory"),i("design:type",s.LoggerFactory)],e.prototype,"loggerFactory",void 0),r([n.Autowired("columnController"),i("design:type",a.ColumnController)],e.prototype,"columnController",void 0),r([n.Autowired("dragAndDropService"),i("design:type",u.DragAndDropService)],e.prototype,"dragAndDropService",void 0),r([n.Autowired("gridOptionsWrapper"),i("design:type",c.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),e}();t.MoveColumnController=d},28771:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(15068),i=o(85786),n=o(83423),s=function(){function e(t,o,r,i,n,s,a,l){this.nextId=0,this.allNodesMap={},this.rootNode=t,this.gridOptionsWrapper=o,this.context=r,this.eventService=i,this.columnController=n,this.gridApi=s,this.columnApi=a,this.selectionController=l,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id=e.ROOT_NODE_ID,this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterFilter=[],this.postConstruct()}return e.prototype.postConstruct=function(){this.getNodeChildDetails=this.gridOptionsWrapper.getNodeChildDetailsFunc(),this.suppressParentsInRowNodes=this.gridOptionsWrapper.isSuppressParentsInRowNodes(),this.doesDataFlower=this.gridOptionsWrapper.getDoesDataFlowerFunc(),this.isRowMasterFunc=this.gridOptionsWrapper.getIsRowMasterFunc(),this.doingLegacyTreeData=n._.exists(this.getNodeChildDetails),this.doingMasterDetail=this.gridOptionsWrapper.isMasterDetail()},e.prototype.getCopyOfNodesMap=function(){return n._.cloneObject(this.allNodesMap)},e.prototype.getRowNode=function(e){return this.allNodesMap[e]},e.prototype.setRowData=function(t){if(this.rootNode.childrenAfterFilter=null,this.rootNode.childrenAfterGroup=null,this.rootNode.childrenAfterSort=null,this.rootNode.childrenMapped=null,this.nextId=0,this.allNodesMap={},!t)return this.rootNode.allLeafChildren=[],void(this.rootNode.childrenAfterGroup=[]);var o=this.recursiveFunction(t,this.rootNode,e.TOP_LEVEL);this.doingLegacyTreeData?(this.rootNode.childrenAfterGroup=o,this.setLeafChildren(this.rootNode)):this.rootNode.allLeafChildren=o},e.prototype.updateRowData=function(e,t){var o=this;if(this.isLegacyTreeData())return null;var r=e.add,s=e.addIndex,a=e.remove,l=e.update,p={remove:[],update:[],add:[]};if(n._.exists(r)&&("number"==typeof s&&s>=0?r.reverse().forEach((function(e){var t=o.addRowNode(e,s);p.add.push(t)})):r.forEach((function(e){var t=o.addRowNode(e);p.add.push(t)}))),n._.exists(a)){var u=!1;if(a.forEach((function(e){var t=o.lookupRowNode(e);t&&(t.isSelected()&&(u=!0),o.updatedRowNode(t,e,!1),p.remove.push(t))})),u){this.selectionController.updateGroupsFromChildrenSelections();var c={type:i.Events.EVENT_SELECTION_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(c)}}return n._.exists(l)&&l.forEach((function(e){var t=o.lookupRowNode(e);t&&(o.updatedRowNode(t,e,!0),p.update.push(t))})),t&&n._.sortRowNodesByOrder(this.rootNode.allLeafChildren,t),p},e.prototype.addRowNode=function(t,o){var r=this.createNode(t,this.rootNode,e.TOP_LEVEL);return n._.exists(o)?n._.insertIntoArray(this.rootNode.allLeafChildren,r,o):this.rootNode.allLeafChildren.push(r),r},e.prototype.lookupRowNode=function(e){var t,o=this.gridOptionsWrapper.getRowNodeIdFunc();if(n._.exists(o)){var r=o(e);if(!(t=this.allNodesMap[r]))return console.error("ag-Grid: could not find row id="+r+", data item was not found for this id"),null}else if(!(t=n._.find(this.rootNode.allLeafChildren,(function(t){return t.data===e}))))return console.error("ag-Grid: could not find data item as object was not found",e),null;return t},e.prototype.updatedRowNode=function(e,t,o){o?e.updateData(t):(e.setSelected(!1,!1,!0),e.clearRowTop(),n._.removeFromArray(this.rootNode.allLeafChildren,e),delete this.allNodesMap[e.id])},e.prototype.recursiveFunction=function(e,t,o){var r=this;if("string"!=typeof e){var i=[];return e.forEach((function(e){var n=r.createNode(e,t,o);i.push(n)})),i}console.warn("ag-Grid: rowData must be an array, however you passed in a string. If you are loading JSON, make sure you convert the JSON string to JavaScript objects first")},e.prototype.createNode=function(e,t,o){var i=new r.RowNode;this.context.wireBean(i);var s=this.gridOptionsWrapper.isTreeData(),a=!s&&n._.exists(this.getNodeChildDetails)?this.getNodeChildDetails(e):null;if(a&&a.group)i.group=!0,i.childrenAfterGroup=this.recursiveFunction(a.children,i,o+1),i.expanded=!0===a.expanded,i.field=a.field,i.key=a.key,i.canFlower=i.master,this.setLeafChildren(i);else if(i.group=!1,s)i.master=!1,i.expanded=!1;else{this.doesDataFlower?i.master=this.doesDataFlower(e):this.doingMasterDetail?this.isRowMasterFunc?i.master=this.isRowMasterFunc(e):i.master=!0:i.master=!1;var l=this.columnController.getRowGroupColumns(),p=o+(l?l.length:0);i.expanded=!!i.master&&this.isExpanded(p)}return i.canFlower=i.master,t&&!this.suppressParentsInRowNodes&&(i.parent=t),i.level=o,i.setDataAndId(e,this.nextId.toString()),this.allNodesMap[i.id]&&console.warn("ag-grid: duplicate node id '"+i.id+"' detected from getRowNodeId callback, this could cause issues in your grid."),this.allNodesMap[i.id]=i,this.nextId++,i},e.prototype.isExpanded=function(e){var t=this.gridOptionsWrapper.getGroupDefaultExpanded();return-1===t||e<t},e.prototype.setLeafChildren=function(e){e.allLeafChildren=[],e.childrenAfterGroup&&e.childrenAfterGroup.forEach((function(t){t.group?t.allLeafChildren&&t.allLeafChildren.forEach((function(t){return e.allLeafChildren.push(t)})):e.allLeafChildren.push(t)}))},e.prototype.isLegacyTreeData=function(){return!!n._.exists(this.gridOptionsWrapper.getNodeChildDetailsFunc())&&(console.warn("ag-Grid: adding and removing rows is not supported when using nodeChildDetailsFunc, ie it is not supported for legacy tree data. Please see the docs on the new preferred way of providing tree data that works with delta updates."),!0)},e.TOP_LEVEL=0,e.ROOT_NODE_ID="ROOT_NODE_ID",e}();t.ClientSideNodeManager=s},28921:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(44081),l=o(72493),p=o(44329),u=o(10042),c=o(83423),d=function(e){function t(t,o){var r=e.call(this,t,o)||this;return r.cacheParams=o,r}return i(t,e),t.prototype.createBlankRowNode=function(t){var o=e.prototype.createBlankRowNode.call(this,t);return o.uiLevel=0,this.setIndexAndTopOnRowNode(o,t),o},t.prototype.setDataAndId=function(e,t,o){c._.exists(t)?e.setDataAndId(t,o.toString()):e.setDataAndId(void 0,void 0)},t.prototype.setRowNode=function(t,o){e.prototype.setRowNode.call(this,t,o),this.setIndexAndTopOnRowNode(o,t)},t.prototype.init=function(){e.prototype.init.call(this,{context:this.getContext(),rowRenderer:this.rowRenderer})},t.prototype.getNodeIdPrefix=function(){return null},t.prototype.getRow=function(e){return this.getRowUsingLocalIndex(e)},t.prototype.setIndexAndTopOnRowNode=function(e,t){e.setRowIndex(t),e.rowTop=this.cacheParams.rowHeight*t},t.prototype.loadFromDatasource=function(){var e=this,t={startRow:this.getStartRow(),endRow:this.getEndRow(),successCallback:this.pageLoaded.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this),sortModel:this.cacheParams.sortModel,filterModel:this.cacheParams.filterModel,context:this.gridOptionsWrapper.getContext()};c._.missing(this.cacheParams.datasource.getRows)?console.warn("ag-Grid: datasource is missing getRows method"):(c._.getFunctionParameters(this.cacheParams.datasource.getRows).length>1&&(console.warn("ag-grid: It looks like your paging datasource is of the old type, taking more than one parameter."),console.warn("ag-grid: From ag-grid 1.9.0, now the getRows takes one parameter. See the documentation for details.")),window.setTimeout((function(){e.cacheParams.datasource.getRows(t)}),0))},n([l.Autowired("gridOptionsWrapper"),s("design:type",a.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([l.Autowired("rowRenderer"),s("design:type",u.RowRenderer)],t.prototype,"rowRenderer",void 0),n([l.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"init",null),t}(p.RowNodeBlock);t.InfiniteBlock=d},30811:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var n=o(22131),s=o(83423),a=function(e){function t(){var o=e.call(this,t.TEMPLATE)||this;return o.refreshCount=0,o.eCurrent=o.queryForHtmlElement(".ag-value-slide-current"),o}return i(t,e),t.prototype.init=function(e){this.params=e,this.refresh(e)},t.prototype.addSlideAnimation=function(){var e=this;this.refreshCount++;var t=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious),this.ePrevious=s._.loadTemplate('<span class="ag-value-slide-previous ag-value-slide-out"></span>'),this.ePrevious.innerHTML=this.eCurrent.innerHTML,this.getGui().insertBefore(this.ePrevious,this.eCurrent),window.setTimeout((function(){t===e.refreshCount&&s._.addCssClass(e.ePrevious,"ag-value-slide-out-end")}),50),window.setTimeout((function(){t===e.refreshCount&&(e.getGui().removeChild(e.ePrevious),e.ePrevious=null)}),3e3)},t.prototype.refresh=function(e){var t=e.value;if(s._.missing(t)&&(t=""),t!==this.lastValue)return this.addSlideAnimation(),this.lastValue=t,s._.exists(e.valueFormatted)?this.eCurrent.innerHTML=e.valueFormatted:s._.exists(e.value)?this.eCurrent.innerHTML=t:s._.clearElement(this.eCurrent),!0},t.TEMPLATE='<span><span class="ag-value-slide-current"></span></span>',t}(n.Component);t.AnimateSlideCellRenderer=a},30844:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.prototype.hasMethod=function(e){var t=this.getFrameworkComponentInstance();return null!=t&&null!=t[e]},e.prototype.callMethod=function(e,t){var o=this,r=this.getFrameworkComponentInstance();if(null!=r){var i=this.getFrameworkComponentInstance()[e];if(null==i)return;return i.apply(r,t)}window.setTimeout((function(){return o.callMethod(e,t)}),100)},e.prototype.addMethod=function(e,t){this[e]=t},e}();t.BaseReactComponent=o},30971:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(44081),l=o(72493),p=o(60843),u=o(54828),c=o(85786),d=o(86608),h=o(55e3),f=o(45727),g=o(99162),m=o(8534),y=o(65802),v=o(84210),C=o(40797),w=o(44871),E=o(83423),_=o(10042),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getRowBounds=function(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}},t.prototype.ensureRowHeightsValid=function(e,t,o,r){return!1},t.prototype.init=function(){var e=this;this.gridOptionsWrapper.isRowModelInfinite()&&(this.rowHeight=this.gridOptionsWrapper.getRowHeightAsNumber(),this.addEventListeners(),this.setDatasource(this.gridOptionsWrapper.getDatasource()),this.addDestroyFunc((function(){return e.destroyCache()})))},t.prototype.destroyDatasource=function(){this.datasource&&(this.datasource.destroy&&this.datasource.destroy(),this.rowRenderer.datasourceChanged(),this.datasource=null)},t.prototype.isLastRowFound=function(){return!!this.infiniteCache&&this.infiniteCache.isMaxRowFound()},t.prototype.addEventListeners=function(){this.addDestroyableEventListener(this.eventService,c.Events.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addDestroyableEventListener(this.eventService,c.Events.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addDestroyableEventListener(this.eventService,c.Events.EVENT_COLUMN_EVERYTHING_CHANGED,this.onColumnEverything.bind(this))},t.prototype.onFilterChanged=function(){this.reset()},t.prototype.onSortChanged=function(){this.reset()},t.prototype.onColumnEverything=function(){(!this.cacheParams||this.isSortModelDifferent())&&this.reset()},t.prototype.isSortModelDifferent=function(){return!E._.jsonEquals(this.cacheParams.sortModel,this.sortController.getSortModel())},t.prototype.getType=function(){return f.Constants.ROW_MODEL_TYPE_INFINITE},t.prototype.setDatasource=function(e){this.destroyDatasource(),this.datasource=e,e&&(this.checkForDeprecated(),this.reset())},t.prototype.checkForDeprecated=function(){var e=this.datasource;E._.exists(e.maxConcurrentRequests)&&console.error("ag-Grid: since version 5.1.x, maxConcurrentRequests is replaced with grid property maxConcurrentDatasourceRequests"),E._.exists(e.maxPagesInCache)&&console.error("ag-Grid: since version 5.1.x, maxPagesInCache is replaced with grid property maxPagesInPaginationCache"),E._.exists(e.overflowSize)&&console.error("ag-Grid: since version 5.1.x, overflowSize is replaced with grid property paginationOverflowSize"),E._.exists(e.blockSize)&&console.error("ag-Grid: since version 5.1.x, pageSize/blockSize is replaced with grid property infinitePageSize")},t.prototype.isEmpty=function(){return E._.missing(this.infiniteCache)},t.prototype.isRowsToRender=function(){return E._.exists(this.infiniteCache)},t.prototype.getNodesInRangeForSelection=function(e,t){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(e,t):[]},t.prototype.reset=function(){if(!E._.missing(this.datasource)){E._.exists(this.gridOptionsWrapper.getRowNodeIdFunc())||this.selectionController.reset(),this.resetCache();var e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}},t.prototype.createModelUpdatedEvent=function(){return{type:c.Events.EVENT_MODEL_UPDATED,api:this.gridApi,columnApi:this.columnApi,newPage:!1,newData:!1,keepRenderedRows:!1,animate:!1}},t.prototype.resetCache=function(){this.destroyCache();var e=this.gridOptionsWrapper.getMaxConcurrentDatasourceRequests(),t=this.gridOptionsWrapper.getBlockLoadDebounceMillis();this.rowNodeBlockLoader=new v.RowNodeBlockLoader(e,t),this.getContext().wireBean(this.rowNodeBlockLoader),this.cacheParams={datasource:this.datasource,filterModel:this.filterManager.getFilterModel(),sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,maxConcurrentRequests:e,overflowSize:this.gridOptionsWrapper.getCacheOverflowSize(),initialRowCount:this.gridOptionsWrapper.getInfiniteInitialRowCount(),maxBlocksInCache:this.gridOptionsWrapper.getMaxBlocksInCache(),blockSize:this.gridOptionsWrapper.getCacheBlockSize(),rowHeight:this.gridOptionsWrapper.getRowHeightAsNumber(),lastAccessedSequence:new E.NumberSequence},this.cacheParams.maxConcurrentRequests&&this.cacheParams.maxConcurrentRequests>=1||(this.cacheParams.maxConcurrentRequests=2),this.cacheParams.blockSize&&this.cacheParams.blockSize>=1||(this.cacheParams.blockSize=100),this.cacheParams.initialRowCount>=1||(this.cacheParams.initialRowCount=0),this.cacheParams.overflowSize>=1||(this.cacheParams.overflowSize=1),this.infiniteCache=new g.InfiniteCache(this.cacheParams),this.getContext().wireBean(this.infiniteCache),this.infiniteCache.addEventListener(y.RowNodeCache.EVENT_CACHE_UPDATED,this.onCacheUpdated.bind(this))},t.prototype.destroyCache=function(){this.infiniteCache&&(this.infiniteCache.destroy(),this.infiniteCache=null),this.rowNodeBlockLoader&&(this.rowNodeBlockLoader.destroy(),this.rowNodeBlockLoader=null)},t.prototype.onCacheUpdated=function(){var e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)},t.prototype.getRow=function(e){return this.infiniteCache?this.infiniteCache.getRow(e):null},t.prototype.getRowNode=function(e){var t=null;return this.forEachNode((function(o){o.id===e&&(t=o)})),t},t.prototype.forEachNode=function(e){this.infiniteCache&&this.infiniteCache.forEachNodeDeep(e,new E.NumberSequence)},t.prototype.getCurrentPageHeight=function(){return this.getRowCount()*this.rowHeight},t.prototype.getRowIndexAtPixel=function(e){if(0!==this.rowHeight){var t=Math.floor(e/this.rowHeight);return t>this.getPageLastRow()?this.getPageLastRow():t}return 0},t.prototype.getPageFirstRow=function(){return 0},t.prototype.getPageLastRow=function(){return this.infiniteCache?this.infiniteCache.getVirtualRowCount()-1:0},t.prototype.getRowCount=function(){return this.infiniteCache?this.infiniteCache.getVirtualRowCount():0},t.prototype.updateRowData=function(e){E._.exists(e.remove)||E._.exists(e.update)?console.warn("ag-Grid: updateRowData for InfiniteRowModel does not support remove or update, only add"):E._.missing(e.addIndex)?console.warn("ag-Grid: updateRowData for InfiniteRowModel requires add and addIndex to be set"):this.infiniteCache&&this.infiniteCache.insertItemsAtIndex(e.addIndex,e.add)},t.prototype.isRowPresent=function(e){return!1},t.prototype.refreshCache=function(){this.infiniteCache&&this.infiniteCache.refreshCache()},t.prototype.purgeCache=function(){this.infiniteCache&&this.infiniteCache.purgeCache()},t.prototype.getVirtualRowCount=function(){return this.infiniteCache?this.infiniteCache.getVirtualRowCount():null},t.prototype.isMaxRowFound=function(){if(this.infiniteCache)return this.infiniteCache.isMaxRowFound()},t.prototype.setVirtualRowCount=function(e,t){this.infiniteCache&&this.infiniteCache.setVirtualRowCount(e,t)},t.prototype.getBlockState=function(){return this.rowNodeBlockLoader?this.rowNodeBlockLoader.getBlockState():null},n([l.Autowired("gridOptionsWrapper"),s("design:type",a.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([l.Autowired("filterManager"),s("design:type",h.FilterManager)],t.prototype,"filterManager",void 0),n([l.Autowired("sortController"),s("design:type",d.SortController)],t.prototype,"sortController",void 0),n([l.Autowired("selectionController"),s("design:type",u.SelectionController)],t.prototype,"selectionController",void 0),n([l.Autowired("eventService"),s("design:type",p.EventService)],t.prototype,"eventService",void 0),n([l.Autowired("gridApi"),s("design:type",C.GridApi)],t.prototype,"gridApi",void 0),n([l.Autowired("columnApi"),s("design:type",w.ColumnApi)],t.prototype,"columnApi",void 0),n([l.Autowired("rowRenderer"),s("design:type",_.RowRenderer)],t.prototype,"rowRenderer",void 0),n([l.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"init",null),n([l.PreDestroy,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"destroyDatasource",null),n([l.Bean("rowModel")],t)}(m.BeanStub);t.InfiniteRowModel=b},31887:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(814),a=o(74517),l=o(72948),p=o(72493),u=o(83423),c=function(){function e(){}return e.prototype.createDisplayedGroups=function(e,t,o,r,i){var n,s,a=this,l=[],p=this.mapOldGroupsById(i);return e.forEach((function(e){for(var i=a.getOriginalPathForColumn(t,e),u=[],c=!s,d=0;d<i.length;d++)if(c||i[d]!==s[d]){var h=a.createColumnGroup(i[d],o,p,r);u[d]=h,0==d?l.push(h):u[d-1].addChild(h)}else u[d]=n[d];0===u.length?l.push(e):u[u.length-1].addChild(e),n=u,s=i})),this.setupParentsIntoColumns(l,null),l},e.prototype.createColumnGroup=function(e,t,o,r){var i=e.getGroupId(),n=t.getInstanceIdForKey(i),s=o[a.ColumnGroup.createUniqueId(i,n)];return s&&s.getOriginalColumnGroup()!==e&&(s=null),u._.exists(s)?s.reset():(s=new a.ColumnGroup(e,i,n,r),this.context.wireBean(s)),s},e.prototype.mapOldGroupsById=function(e){var t={},o=function(e){e.forEach((function(e){if(e instanceof a.ColumnGroup){var r=e;t[e.getUniqueId()]=r,o(r.getChildren())}}))};return e&&o(e),t},e.prototype.setupParentsIntoColumns=function(e,t){var o=this;e.forEach((function(e){if(e.setParent(t),e instanceof a.ColumnGroup){var r=e;o.setupParentsIntoColumns(r.getChildren(),r)}}))},e.prototype.getOriginalPathForColumn=function(e,t){var o=[],r=!1;return function e(i,n){for(var s=0;s<i.length;s++){if(r)return;var a=i[s];a instanceof l.OriginalColumnGroup?(e(a.getChildren(),n+1),o[n]=a):a===t&&(r=!0)}}(e,0),r?o:(console.warn("could not get path"),null)},r([n.Autowired("columnUtils"),i("design:type",s.ColumnUtils)],e.prototype,"columnUtils",void 0),r([n.Autowired("context"),i("design:type",p.Context)],e.prototype,"context",void 0),r([p.Bean("displayedGroupCreator")],e)}();t.DisplayedGroupCreator=c},31923:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.isPopup=function(){return!0},t}(o(84715).SelectCellEditor);t.PopupSelectCellEditor=n},32090:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(22131),l=o(47721),p=o(72493),u=o(73575),c=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return i(t,e),t.prototype.postConstruct=function(){this.closePopup=this.popupService.addPopup(!1,this.getGui(),!1,this.destroy.bind(this)),this.addDestroyableEventListener(this.eClose,"click",this.onBtClose.bind(this))},t.prototype.setBody=function(e){this.eContentWrapper.appendChild(e)},t.prototype.setTitle=function(e){this.eTitle.innerText=e},t.prototype.onBtClose=function(){this.closePopup()},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.dispatchEvent({type:t.DESTROY_EVENT})},t.TEMPLATE='<div class="ag-popup-window" style="top: 40px; left: 40px; border: 1px solid black; position: fixed; background-color: white;">\n <div class="ag-popup-window-title-bar" style="background: #00e5ff; border-bottom: 1px solid black;">\n <span ref="eClose" class="ag-popup-window-close" style="margin: 2px; border: 1px solid grey; border-radius: 2px;">X</span>\n <span ref="eTitle" class="ag-popup-window-title" style="padding: 2px;">New Chart</span>\n </div>\n <div ref="eContentWrapper" class="ag-popup-window-content-wrapper"></div>\n </div>',t.DESTROY_EVENT="destroy",n([p.Autowired("popupService"),s("design:type",u.PopupService)],t.prototype,"popupService",void 0),n([l.RefSelector("eContentWrapper"),s("design:type",HTMLElement)],t.prototype,"eContentWrapper",void 0),n([l.RefSelector("eTitle"),s("design:type",HTMLElement)],t.prototype,"eTitle",void 0),n([l.RefSelector("eClose"),s("design:type",HTMLElement)],t.prototype,"eClose",void 0),n([p.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(a.Component);t.PopupWindow=c},32590:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(72493),l=o(26016),p=o(38152),u=o(69397),c=o(22131),d=o(47721),h=o(44081),f=o(55090),g=o(81604),m=o(85786),y=o(60843),v=o(93830),C=o(83423),w=o(85910),E=o(40797),_=o(44871),b=o(55e3),R=function(e){function t(o){var r=e.call(this,t.TEMPLATE)||this;return r.column=o,r}return i(t,e),t.prototype.postConstruct=function(){this.setupFloatingFilter(),this.setupWidth(),this.setupLeftPositioning(),this.setupColumnHover(),this.addFeature(this.getContext(),new g.HoverFeature([this.column],this.getGui())),this.addDestroyableEventListener(this.eButtonShowMainFilter,"click",this.showParentFilter.bind(this))},t.prototype.setupFloatingFilter=function(){var e=this;this.column.getColDef().filter?(this.floatingFilterCompPromise=this.getFloatingFilterInstance(),this.floatingFilterCompPromise?this.floatingFilterCompPromise.then((function(t){t?e.setupWithFloatingFilter(t):e.setupEmpty()})):this.setupEmpty(),this.setupSyncWithFilter()):this.setupEmpty()},t.prototype.setupLeftPositioning=function(){var e=new p.SetLeftFeature(this.column,this.getGui(),this.beans);e.init(),this.addDestroyFunc(e.destroy.bind(e))},t.prototype.setupSyncWithFilter=function(){var e=this,t=function(){var t=e.filterManager.getFilterComponent(e.column,"NO_UI");e.onParentModelChanged(t.resolveNow(null,(function(e){return e.getModel()})))};this.addDestroyableEventListener(this.column,l.Column.EVENT_FILTER_CHANGED,t),this.filterManager.cachedFilter(this.column)&&t()},t.prototype.showParentFilter=function(){this.menuFactory.showMenuAfterButtonClick(this.column,this.eButtonShowMainFilter,"filterMenuTab",["filterMenuTab"])},t.prototype.setupColumnHover=function(){this.addDestroyableEventListener(this.eventService,m.Events.EVENT_COLUMN_HOVER_CHANGED,this.onColumnHover.bind(this)),this.onColumnHover()},t.prototype.onColumnHover=function(){var e=this.columnHoverService.isHovered(this.column);C._.addOrRemoveCssClass(this.getGui(),"ag-column-hover",e)},t.prototype.setupWidth=function(){this.addDestroyableEventListener(this.column,l.Column.EVENT_WIDTH_CHANGED,this.onColumnWidthChanged.bind(this)),this.onColumnWidthChanged()},t.prototype.onColumnWidthChanged=function(){this.getGui().style.width=this.column.getActualWidth()+"px"},t.prototype.setupWithFloatingFilter=function(e){var t=function(){e.destroy&&e.destroy()};if(this.isAlive()){this.addDestroyFunc(t);var o=e.getGui();C._.addOrRemoveCssClass(this.eFloatingFilterBody,"ag-floating-filter-body",!this.suppressFilterButton),C._.addOrRemoveCssClass(this.eFloatingFilterBody,"ag-floating-filter-full-body",this.suppressFilterButton),C._.setVisible(this.eButtonWrapper,!this.suppressFilterButton);var r=C._.createIconNoSpan("filter",this.gridOptionsWrapper,this.column);this.eButtonShowMainFilter.appendChild(r),this.eFloatingFilterBody.appendChild(o),e.afterGuiAttached&&e.afterGuiAttached(),this.wireQuerySelectors()}else t()},t.prototype.getFloatingFilterInstance=function(){var e,o=this,r=this.column.getColDef();"string"==typeof r.filter?e=t.filterToFloatingFilterNames[r.filter]:!0===r.filter&&(e=this.gridOptionsWrapper.isEnterprise()?"agSetColumnFloatingFilter":"agTextColumnFloatingFilter");var i={api:this.gridApi,column:this.column,currentParentModel:this.currentParentModel.bind(this),onFloatingFilterChanged:this.onFloatingFilterChanged.bind(this),suppressFilterButton:!1};this.suppressFilterButton=!!r.floatingFilterComponentParams&&!!r.floatingFilterComponentParams.suppressFilterButton;var n=this.userComponentFactory.newFloatingFilterComponent(r,i,e);if(!n){var s=this.getFilterComponentPrototype(r);if(s&&s.prototype&&s.prototype.getModelAsString){var a=i.currentParentModel;i.currentParentModel=function(){return o.filterManager.getFilterComponent(o.column,"NO_UI").resolveNow(null,(function(e){return e.getModelAsString?e.getModelAsString(a()):null}))};var l=this.userComponentFactory.createUserComponentFromConcreteClass(u.ReadModelAsStringFloatingFilterComp,i);n=C.Promise.resolve(l)}}return n},t.prototype.createDynamicParams=function(){return{column:this.column,colDef:this.column.getColDef(),api:this.gridApi,columnApi:this.columnApi}},t.prototype.getFilterComponentPrototype=function(e){var t=this.userComponentFactory.lookupComponentClassDef(e,"filter",this.createDynamicParams());return t?t.component:null},t.prototype.setupEmpty=function(){C._.setVisible(this.eButtonWrapper,!1)},t.prototype.currentParentModel=function(){var e=this.filterManager.getFilterComponent(this.column,"NO_UI").resolveNow(null,(function(e){return e.getNullableModel?e.getNullableModel():e.getModel()}));return e&&null!=e.operator?e.condition1:e},t.prototype.onFloatingFilterChanged=function(e){var t,o=this,r=new C.Promise((function(e){t=e}));return this.filterManager.getFilterComponent(this.column,"NO_UI").then((function(r){if(r.onFloatingFilterChanged){var i=r.onFloatingFilterChanged(e);t(i)}else r.setModel(e),o.filterManager.onFilterChanged(),t(!0)})),r.resolveNow(!0,(function(e){return e}))},t.prototype.onParentModelChanged=function(e){if(this.floatingFilterCompPromise){var t,o;o=e&&e.operator?(t=e).condition1:e,this.floatingFilterCompPromise.then((function(e){e.onParentModelChanged(o,t)}))}},t.filterToFloatingFilterNames={set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"},t.TEMPLATE='<div class="ag-header-cell" aria-hidden="true">\n <div ref="eFloatingFilterBody" aria-hidden="true"></div>\n <div class="ag-floating-filter-button" ref="eButtonWrapper" aria-hidden="true">\n <button type="button" ref="eButtonShowMainFilter"></button>\n </div>\n </div>',n([a.Autowired("columnHoverService"),s("design:type",v.ColumnHoverService)],t.prototype,"columnHoverService",void 0),n([a.Autowired("eventService"),s("design:type",y.EventService)],t.prototype,"eventService",void 0),n([a.Autowired("beans"),s("design:type",f.Beans)],t.prototype,"beans",void 0),n([a.Autowired("gridOptionsWrapper"),s("design:type",h.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([a.Autowired("userComponentFactory"),s("design:type",w.UserComponentFactory)],t.prototype,"userComponentFactory",void 0),n([a.Autowired("gridApi"),s("design:type",E.GridApi)],t.prototype,"gridApi",void 0),n([a.Autowired("columnApi"),s("design:type",_.ColumnApi)],t.prototype,"columnApi",void 0),n([a.Autowired("filterManager"),s("design:type",b.FilterManager)],t.prototype,"filterManager",void 0),n([a.Autowired("menuFactory"),s("design:type",Object)],t.prototype,"menuFactory",void 0),n([d.RefSelector("eFloatingFilterBody"),s("design:type",HTMLElement)],t.prototype,"eFloatingFilterBody",void 0),n([d.RefSelector("eButtonWrapper"),s("design:type",HTMLElement)],t.prototype,"eButtonWrapper",void 0),n([d.RefSelector("eButtonShowMainFilter"),s("design:type",HTMLElement)],t.prototype,"eButtonShowMainFilter",void 0),n([a.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(c.Component);t.FloatingFilterWrapper=R},33467:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),n=function(){function e(){}return e.prototype.download=function(e,t){if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(t,e);else{var o=document.createElement("a"),r=window.URL.createObjectURL(t);o.setAttribute("href",r),o.setAttribute("download",e),o.style.display="none",document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(r),document.body.removeChild(o)}},r([i.Bean("downloader")],e)}();t.Downloader=n},34255:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(22131),l=o(47721),p=o(13650),u=o(72493),c=o(85910),d=o(83423),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.modelFromFloatingFilter=function(e){return{dateFrom:e,dateTo:this.getDateTo(),type:this.selectedFilter,filterType:"date"}},t.prototype.getApplicableFilterTypes=function(){return[p.BaseFilter.EQUALS,p.BaseFilter.GREATER_THAN,p.BaseFilter.LESS_THAN,p.BaseFilter.NOT_EQUAL,p.BaseFilter.IN_RANGE]},t.prototype.bodyTemplate=function(e){return'<div class="ag-filter-body">\n <div class="ag-filter-date-from" id="'+(e==p.FilterConditionType.MAIN?"filterDateFromPanel":"filterDateFromConditionPanel")+'">\n </div>\n <div class="ag-filter-date-to" id="'+(e==p.FilterConditionType.MAIN?"filterDateToPanel":"filterDateToConditionPanel")+'">\n </div>\n </div>'},t.prototype.initialiseFilterBodyUi=function(t){e.prototype.initialiseFilterBodyUi.call(this,t),this.createComponents(t),t===p.FilterConditionType.MAIN?(this.setDateFrom_date(this.dateFrom,p.FilterConditionType.MAIN),this.setDateTo_date(this.dateTo,p.FilterConditionType.MAIN),this.setFilterType(this.selectedFilter,p.FilterConditionType.MAIN)):(this.setDateFrom_date(this.dateFromCondition,p.FilterConditionType.CONDITION),this.setDateTo_date(this.dateToCondition,p.FilterConditionType.CONDITION),this.setFilterType(this.selectedFilterCondition,p.FilterConditionType.CONDITION))},t.prototype.createComponents=function(e){var t=this,o={onDateChanged:function(){t.onDateChanged(e)},filterParams:this.filterParams};this.userComponentFactory.newDateComponent(o).then((function(o){e===p.FilterConditionType.MAIN?t.dateToComponent=o:t.dateToConditionComponent=o;var r=o.getGui();e===p.FilterConditionType.MAIN?(t.eDateToPanel.appendChild(r),t.dateToComponent.afterGuiAttached&&t.dateToComponent.afterGuiAttached()):(t.eDateToConditionPanel.appendChild(r),t.dateToConditionComponent.afterGuiAttached&&t.dateToConditionComponent.afterGuiAttached())})),this.userComponentFactory.newDateComponent(o).then((function(o){e===p.FilterConditionType.MAIN?t.dateFromComponent=o:t.dateFromConditionComponent=o;var r=o.getGui();e===p.FilterConditionType.MAIN?(t.eDateFromPanel.appendChild(r),t.dateFromComponent.afterGuiAttached&&t.dateFromComponent.afterGuiAttached()):(t.eDateFromConditionPanel.appendChild(r),t.dateFromConditionComponent.afterGuiAttached&&t.dateFromConditionComponent.afterGuiAttached())}))},t.prototype.onDateChanged=function(e){e===p.FilterConditionType.MAIN?(this.dateFrom=t.removeTimezone(this.dateFromComponent.getDate()),this.dateTo=t.removeTimezone(this.dateToComponent.getDate())):(this.dateFromCondition=t.removeTimezone(this.dateFromComponent.getDate()),this.dateToCondition=t.removeTimezone(this.dateToComponent.getDate())),this.onFilterChanged()},t.prototype.refreshFilterBodyUi=function(e){var t,o;if(e===p.FilterConditionType.MAIN?(t=this.eDateToPanel,o=this.selectedFilter):(t=this.eDateToConditionPanel,o=this.selectedFilterCondition),t){var r=o===p.BaseFilter.IN_RANGE;d._.setVisible(t,r)}var i=e===p.FilterConditionType.MAIN?this.eDateFromPanel:this.eDateFromConditionPanel;if(i){var n=!this.doesFilterHaveHiddenInput(o)&&o!==p.BaseFilter.EMPTY;d._.setVisible(i,n)}},t.prototype.comparator=function(){return this.filterParams.comparator?this.filterParams.comparator:this.defaultComparator.bind(this)},t.prototype.defaultComparator=function(e,t){return t<e?-1:t>e?1:null!=t?0:-1},t.prototype.serialize=function(e){var t=e===p.FilterConditionType.MAIN?this.dateToComponent:this.dateToConditionComponent,o=e===p.FilterConditionType.MAIN?this.dateFromComponent:this.dateFromConditionComponent,r=e===p.FilterConditionType.MAIN?this.selectedFilter:this.selectedFilterCondition;return{dateTo:d._.serializeDateToYyyyMmDd(t.getDate(),"-"),dateFrom:d._.serializeDateToYyyyMmDd(o.getDate(),"-"),type:r||this.defaultFilter,filterType:"date"}},t.prototype.filterValues=function(e){return e===p.FilterConditionType.MAIN?this.dateFromComponent?this.selectedFilter!==p.BaseFilter.IN_RANGE?this.dateFromComponent.getDate():[this.dateFromComponent.getDate(),this.dateToComponent.getDate()]:null:this.dateFromConditionComponent?this.selectedFilterCondition!==p.BaseFilter.IN_RANGE?this.dateFromConditionComponent.getDate():[this.dateFromConditionComponent.getDate(),this.dateToConditionComponent.getDate()]:null},t.prototype.getDateFrom=function(){return d._.serializeDateToYyyyMmDd(this.dateFromComponent.getDate(),"-")},t.prototype.getDateTo=function(){return d._.serializeDateToYyyyMmDd(this.dateToComponent.getDate(),"-")},t.prototype.getFilterType=function(){return this.selectedFilter},t.prototype.setDateFrom=function(e,t){var o=d._.parseYyyyMmDdToDate(e,"-");this.setDateFrom_date(o,t)},t.prototype.setDateFrom_date=function(e,t){if(t===p.FilterConditionType.MAIN){if(this.dateFrom=e,!this.dateFromComponent)return;this.dateFromComponent.setDate(this.dateFrom)}else{if(this.dateFromCondition=e,!this.dateFromConditionComponent)return;this.dateFromConditionComponent.setDate(this.dateFromCondition)}},t.prototype.setDateTo=function(e,t){var o=d._.parseYyyyMmDdToDate(e,"-");this.setDateTo_date(o,t)},t.prototype.setDateTo_date=function(e,t){if(t===p.FilterConditionType.MAIN){if(this.dateTo=e,!this.dateToComponent)return;this.dateToComponent.setDate(this.dateTo)}else{if(this.dateToCondition=e,!this.dateToConditionComponent)return;this.dateToConditionComponent.setDate(this.dateToCondition)}},t.prototype.resetState=function(e){void 0===e&&(e=!1),e||(this.setDateFrom(null,p.FilterConditionType.MAIN),this.setDateTo(null,p.FilterConditionType.MAIN),this.setFilterType(this.defaultFilter,p.FilterConditionType.MAIN)),this.setFilterType(this.defaultFilter,p.FilterConditionType.CONDITION),this.setDateFrom(null,p.FilterConditionType.CONDITION),this.setDateTo(null,p.FilterConditionType.CONDITION)},t.prototype.parse=function(e,t){this.setDateFrom(e.dateFrom,t),this.setDateTo(e.dateTo,t),this.setFilterType(e.type,t)},t.prototype.setType=function(e,t){this.setFilterType(e,t)},t.removeTimezone=function(e){return e?new Date(e.getFullYear(),e.getMonth(),e.getDate()):null},n([u.Autowired("userComponentFactory"),s("design:type",c.UserComponentFactory)],t.prototype,"userComponentFactory",void 0),n([l.QuerySelector("#filterDateFromPanel"),s("design:type",HTMLElement)],t.prototype,"eDateFromPanel",void 0),n([l.QuerySelector("#filterDateFromConditionPanel"),s("design:type",HTMLElement)],t.prototype,"eDateFromConditionPanel",void 0),n([l.QuerySelector("#filterDateToPanel"),s("design:type",HTMLElement)],t.prototype,"eDateToPanel",void 0),n([l.QuerySelector("#filterDateToConditionPanel"),s("design:type",HTMLElement)],t.prototype,"eDateToConditionPanel",void 0),t}(p.ScalarBaseFilter);t.DateFilter=h;var f=function(e){function t(){return e.call(this,'<div class="ag-input-text-wrapper"><input class="ag-filter-filter" type="text" placeholder="yyyy-mm-dd"></div>')||this}return i(t,e),t.prototype.init=function(e){this.eDateInput=this.getGui().querySelector("input"),(d._.isBrowserChrome()||e.filterParams.browserDatePicker)&&(d._.isBrowserIE()?console.warn("ag-grid: browserDatePicker is specified to true, but it is not supported in IE 11, reverting to plain text date picker"):this.eDateInput.type="date"),this.listener=e.onDateChanged,this.addGuiEventListener("input",this.listener)},t.prototype.getDate=function(){return d._.parseYyyyMmDdToDate(this.eDateInput.value,"-")},t.prototype.setDate=function(e){this.eDateInput.value=d._.serializeDateToYyyyMmDd(e,"-")},t}(a.Component);t.DefaultDateComponent=f},34470:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(44081),a=o(60843),l=o(40634),p=o(30811),u=o(15959),c=o(79886),d=o(83423),h=function(){function e(){this.cellRendererMap={}}var t;return t=e,e.prototype.init=function(){this.cellRendererMap[t.ANIMATE_SLIDE]=p.AnimateSlideCellRenderer,this.cellRendererMap[t.ANIMATE_SHOW_CHANGE]=u.AnimateShowChangeCellRenderer,this.cellRendererMap[t.GROUP]=c.GroupCellRenderer},e.prototype.addCellRenderer=function(e,t){this.cellRendererMap[e]=t},e.prototype.getCellRenderer=function(e){var t=this.cellRendererMap[e];return d._.missing(t)?(console.warn("ag-Grid: unable to find cellRenderer for key "+e),null):t},e.ANIMATE_SLIDE="animateSlide",e.ANIMATE_SHOW_CHANGE="animateShowChange",e.GROUP="group",r([n.Autowired("gridOptionsWrapper"),i("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.Autowired("expressionService"),i("design:type",l.ExpressionService)],e.prototype,"expressionService",void 0),r([n.Autowired("eventService"),i("design:type",a.EventService)],e.prototype,"eventService",void 0),r([n.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),t=r([n.Bean("cellRendererFactory")],e)}();t.CellRendererFactory=h},34506:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(83423),i=function(){function e(){}return e.addHeaderClassesFromColDef=function(e,t,o,i,n){r._.missing(e)||this.addColumnClassesFromCollDef(e.headerClass,e,t,o,i,n)},e.addToolPanelClassesFromColDef=function(e,t,o,i,n){r._.missing(e)||this.addColumnClassesFromCollDef(e.toolPanelClass,e,t,o,i,n)},e.addColumnClassesFromCollDef=function(e,t,o,i,n,s){var a;r._.missing(e)||("string"==typeof(a="function"==typeof e?e({colDef:t,column:n,columnGroup:s,context:i.getContext(),api:i.getApi()}):e)?r._.addCssClass(o,a):Array.isArray(a)&&a.forEach((function(e){r._.addCssClass(o,e)})))},e}();t.CssClassApplier=i},34782:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(3976),i=o(83423),n=function(){function e(e){this.rowIndex=e.rowIndex,this.column=e.column,this.floating=i._.makeNull(e.floating)}return e.prototype.getGridCellDef=function(){return{rowIndex:this.rowIndex,column:this.column,floating:this.floating}},e.prototype.getGridRow=function(){return new r.GridRow(this.rowIndex,this.floating)},e.prototype.toString=function(){return"rowIndex = "+this.rowIndex+", floating = "+this.floating+", column = "+(this.column?this.column.getId():null)},e.prototype.createId=function(){return this.rowIndex+"."+this.floating+"."+this.column.getId()},e.prototype.equals=function(e){var t=this.column===e.column,o=this.floating===e.floating,r=this.rowIndex===e.rowIndex;return t&&o&&r},e}();t.GridCell=n},36777:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n,s=o(71616),a=o(72493),l=o(34255),p=o(25358),u=o(95574),c=o(69397),d=o(79886),h=o(15959),f=o(30811),g=o(99093),m=o(84715),y=o(5448),v=o(31923),C=o(49281),w=o(99104),E=o(92378),_=o(24144),b=o(50298),R=o(75167),S=o(83423);!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.REGISTERED=1]="REGISTERED"}(n=t.RegisteredComponentSource||(t.RegisteredComponentSource={}));var O=function(){function e(){this.agGridDefaults={agDateInput:l.DefaultDateComponent,agColumnHeader:p.HeaderComp,agColumnGroupHeader:u.HeaderGroupComp,agSetColumnFloatingFilter:c.SetFloatingFilterComp,agTextColumnFloatingFilter:c.TextFloatingFilterComp,agNumberColumnFloatingFilter:c.NumberFloatingFilterComp,agDateColumnFloatingFilter:c.DateFloatingFilterComp,agAnimateShowChangeCellRenderer:h.AnimateShowChangeCellRenderer,agAnimateSlideCellRenderer:f.AnimateSlideCellRenderer,agGroupCellRenderer:d.GroupCellRenderer,agGroupRowRenderer:d.GroupCellRenderer,agLoadingCellRenderer:g.LoadingCellRenderer,agCellEditor:s.TextCellEditor,agTextCellEditor:s.TextCellEditor,agSelectCellEditor:m.SelectCellEditor,agPopupTextCellEditor:y.PopupTextCellEditor,agPopupSelectCellEditor:v.PopupSelectCellEditor,agLargeTextCellEditor:C.LargeTextCellEditor,agTextColumnFilter:w.TextFilter,agNumberColumnFilter:E.NumberFilter,agDateColumnFilter:l.DateFilter,agLoadingOverlay:_.LoadingOverlayComponent,agNoRowsOverlay:b.NoRowsOverlayComponent,agTooltipComponent:R.TooltipComponent},this.agDeprecatedNames={set:{newComponentName:"agSetColumnFilter",propertyHolder:"filter"},text:{newComponentName:"agTextColumnFilter",propertyHolder:"filter"},number:{newComponentName:"agNumberColumnFilter",propertyHolder:"filter"},date:{newComponentName:"agDateColumnFilter",propertyHolder:"filter"},group:{newComponentName:"agGroupCellRenderer",propertyHolder:"cellRenderer"},animateShowChange:{newComponentName:"agAnimateShowChangeCellRenderer",propertyHolder:"cellRenderer"},animateSlide:{newComponentName:"agAnimateSlideCellRenderer",propertyHolder:"cellRenderer"},select:{newComponentName:"agSelectCellEditor",propertyHolder:"cellEditor"},largeText:{newComponentName:"agLargeTextCellEditor",propertyHolder:"cellEditor"},popupSelect:{newComponentName:"agPopupSelectCellEditor",propertyHolder:"cellEditor"},popupText:{newComponentName:"agPopupTextCellEditor",propertyHolder:"cellEditor"},richSelect:{newComponentName:"agRichSelectCellEditor",propertyHolder:"cellEditor"},headerComponent:{newComponentName:"agColumnHeader",propertyHolder:"headerComponent"}},this.jsComponents={},this.frameworkComponents={}}return e.prototype.init=function(){var e=this,t=this.context.getEnterpriseDefaultComponents();t&&S._.forEach(t,(function(t){e.registerDefaultComponent(t.componentName,t.theClass)})),null!=this.gridOptions.components&&Object.keys(this.gridOptions.components).forEach((function(t){e.registerComponent(t,e.gridOptions.components[t])})),null!=this.gridOptions.frameworkComponents&&Object.keys(this.gridOptions.frameworkComponents).forEach((function(t){e.registerFwComponent(t,e.gridOptions.frameworkComponents[t])}))},e.prototype.registerDefaultComponent=function(e,t){var o=this.translateIfDeprecated(e);this.agGridDefaults[o]?console.error("Trying to overwrite a default component. You should call registerComponent"):this.agGridDefaults[o]=t},e.prototype.registerComponent=function(e,t){var o=this.translateIfDeprecated(e);this.frameworkComponents[o]?console.error("Trying to register a component that you have already registered for frameworks: "+o):this.jsComponents[o]=t},e.prototype.registerFwComponent=function(e,t){var o=this.translateIfDeprecated(e);this.jsComponents[o]?console.error("Trying to register a component that you have already registered for plain javascript: "+o):this.frameworkComponents[o]=t},e.prototype.retrieve=function(e){var t=this.translateIfDeprecated(e);return this.frameworkComponents[t]?{componentFromFramework:!0,component:this.frameworkComponents[t],source:n.REGISTERED}:this.jsComponents[t]?{componentFromFramework:!1,component:this.jsComponents[t],source:n.REGISTERED}:this.agGridDefaults[t]?this.agGridDefaults[t]?{componentFromFramework:!1,component:this.agGridDefaults[t],source:n.DEFAULT}:null:(Object.keys(this.agGridDefaults).indexOf(t)<0&&console.warn("ag-grid: Looking for component ["+t+"] but it wasn't found."),null)},e.prototype.translateIfDeprecated=function(e){var t=this.agDeprecatedNames[e];return null!=t?(S._.doOnce((function(){console.warn("ag-grid. Since v15.0 component names have been renamed to be namespaced. You should rename "+t.propertyHolder+":"+e+" to "+t.propertyHolder+":"+t.newComponentName)}),"DEPRECATE_COMPONENT_"+e),t.newComponentName):e},r([a.Autowired("gridOptions"),i("design:type",Object)],e.prototype,"gridOptions",void 0),r([a.Autowired("context"),i("design:type",a.Context)],e.prototype,"context",void 0),r([a.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),r([a.Bean("userComponentRegistry")],e)}();t.UserComponentRegistry=O},36819:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(58342),s=o(72493),a=o(42195),l=o(44081),p=o(60843),u=o(85222),c=o(45727),d=function(){function e(e,t){this.eContainer=e,this.gridPanel=t}return e.prototype.postConstruct=function(){this.gridOptionsWrapper.isRowModelDefault()&&(this.clientSideRowModel=this.rowModel)},e.prototype.getContainer=function(){return this.eContainer},e.prototype.isInterestedIn=function(e){return e===n.DragSourceType.RowDrag},e.prototype.getIconName=function(){return n.DragAndDropService.ICON_MOVE},e.prototype.onDragEnter=function(e){this.dispatchEvent(u.Events.EVENT_ROW_DRAG_ENTER,e),this.dragAndDropService.setGhostIcon(n.DragAndDropService.ICON_MOVE),e.dragItem.rowNode.setDragging(!0),this.onEnterOrDragging(e)},e.prototype.onDragging=function(e){this.onEnterOrDragging(e)},e.prototype.onEnterOrDragging=function(e){this.dispatchEvent(u.Events.EVENT_ROW_DRAG_MOVE,e),this.lastDraggingEvent=e;var t=this.normaliseForScroll(e.y);this.gridOptionsWrapper.isRowDragManaged()&&this.doManagedDrag(e,t),this.checkCenterForScrolling(t)},e.prototype.doManagedDrag=function(e,t){var o=e.dragItem.rowNode;this.clientSideRowModel.ensureRowAtPixel(o,t)&&(this.focusedCellController.clearFocusedCell(),this.rangeController&&this.rangeController.clearSelection())},e.prototype.normaliseForScroll=function(e){return this.gridOptionsWrapper.getDomLayout()===c.Constants.DOM_LAYOUT_NORMAL?e+this.gridPanel.getVScrollPosition().top:e},e.prototype.checkCenterForScrolling=function(e){var t=this.gridPanel.getVScrollPosition();this.needToMoveUp=e<t.top+50,this.needToMoveDown=e>t.bottom-50,this.needToMoveUp||this.needToMoveDown?this.ensureIntervalStarted():this.ensureIntervalCleared()},e.prototype.ensureIntervalStarted=function(){this.movingIntervalId||(this.intervalCount=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100))},e.prototype.ensureIntervalCleared=function(){this.moveInterval&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null)},e.prototype.moveInterval=function(){var e,t;this.intervalCount++,(e=10+5*this.intervalCount)>100&&(e=100),this.needToMoveDown?t=this.gridPanel.scrollVertically(e):this.needToMoveUp&&(t=this.gridPanel.scrollVertically(-e)),0!==t&&this.onDragging(this.lastDraggingEvent)},e.prototype.dispatchEvent=function(e,t){var o,r=this.normaliseForScroll(t.y),i=-1,s=null;switch(r>this.rowModel.getCurrentPageHeight()||(i=this.rowModel.getRowIndexAtPixel(r),s=this.rowModel.getRow(i)),t.vDirection){case n.VDirection.Down:o="down";break;case n.VDirection.Up:o="up";break;default:o=null}var a={type:e,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),event:t.event,node:t.dragItem.rowNode,overIndex:i,overNode:s,y:r,vDirection:o};this.eventService.dispatchEvent(a)},e.prototype.onDragLeave=function(e){this.dispatchEvent(u.Events.EVENT_ROW_DRAG_LEAVE,e),this.stopDragging(e)},e.prototype.onDragStop=function(e){this.dispatchEvent(u.Events.EVENT_ROW_DRAG_END,e),this.stopDragging(e)},e.prototype.stopDragging=function(e){this.ensureIntervalCleared(),e.dragItem.rowNode.setDragging(!1)},r([s.Autowired("dragAndDropService"),i("design:type",n.DragAndDropService)],e.prototype,"dragAndDropService",void 0),r([s.Autowired("rowModel"),i("design:type",Object)],e.prototype,"rowModel",void 0),r([s.Autowired("focusedCellController"),i("design:type",a.FocusedCellController)],e.prototype,"focusedCellController",void 0),r([s.Autowired("gridOptionsWrapper"),i("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([s.Optional("rangeController"),i("design:type",Object)],e.prototype,"rangeController",void 0),r([s.Autowired("eventService"),i("design:type",p.EventService)],e.prototype,"eventService",void 0),r([s.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"postConstruct",null),e}();t.RowDragFeature=d},37132:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},n=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(44081),a=o(72493),l=o(72493),p=function(){function e(){}return e.prototype.setBeans=function(e){this.logging=e.isDebug()},e.prototype.create=function(e){return new u(e,this.isLogging.bind(this))},e.prototype.isLogging=function(){return this.logging},r([n(0,l.Qualifier("gridOptionsWrapper")),i("design:type",Function),i("design:paramtypes",[s.GridOptionsWrapper]),i("design:returntype",void 0)],e.prototype,"setBeans",null),r([a.Bean("loggerFactory")],e)}();t.LoggerFactory=p;var u=function(){function e(e,t){this.name=e,this.isLoggingFunc=t}return e.prototype.isLogging=function(){return this.isLoggingFunc()},e.prototype.log=function(e){this.isLoggingFunc()&&console.log("ag-Grid."+this.name+": "+e)},e}();t.Logger=u},37789:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.STRING_PROPERTIES=["sortingOrder","rowClass","rowSelection","overlayLoadingTemplate","overlayNoRowsTemplate","quickFilterText","rowModelType","editType","domLayout","clipboardDeliminator","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow"],e.OBJECT_PROPERTIES=["components","frameworkComponents","rowStyle","context","autoGroupColumnDef","groupColumnDef","localeText","icons","datasource","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultExportParams","columnTypes","rowClassRules","detailGridOptions","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","colResizeDefault","reduxStore","statusBar","sideBar"],e.ARRAY_PROPERTIES=["slaveGrids","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData"],e.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","colWidth","headerHeight","groupHeaderHeight","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","minColWidth","maxColWidth","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","scrollbarWidth","paginationStartPage","infiniteBlockSize","batchUpdateWaitMillis","blockLoadDebounceMillis"],e.BOOLEAN_PROPERTIES=["toolPanelSuppressRowGroups","toolPanelSuppressValues","toolPanelSuppressPivots","toolPanelSuppressPivotMode","toolPanelSuppressSideButtons","toolPanelSuppressColumnFilter","toolPanelSuppressColumnSelectAll","toolPanelSuppressColumnExpandAll","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellSelection","suppressHorizontalScroll","debug","enableBrowserTooltips","enableColResize","enableCellExpressions","enableSorting","enableServerSideSorting","enableFilter","enableServerSideFilter","angularCompileRows","angularCompileFilters","angularCompileHeaders","groupSuppressAutoColumn","groupSelectsChildren","groupIncludeFooter","groupIncludeTotalFooter","groupUseEntireRow","groupSuppressRow","groupSuppressBlankHeader","forPrint","suppressMenuHide","rowDeselection","unSortIcon","suppressMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","suppressParentsInRowNodes","showToolPanel","suppressColumnMoveAnimation","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","suppressMenuFilterPanel","suppressMenuMainPanel","suppressMenuColumnPanel","rememberGroupStateWhenNewData","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressUseColIdForGroups","suppressCopyRowsToClipboard","copyHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","suppressAggAtRootLevel","suppressFocusAfterRefresh","functionsPassive","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragManaged","suppressRowDrag","enableGroupEdit","embedFullWidthRows","deprecatedEmbedFullWidthRows","suppressTabbing","suppressPaginationPanel","floatingFilter","groupHideOpenParents","groupMultiAutoColumn","pagination","stopEditingWhenGridLosesFocus","paginationAutoPageSize","suppressScrollOnNewData","purgeClosedRowNodes","cacheQuickFilter","deltaRowDataMode","ensureDomOrder","accentedSort","pivotTotals","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","treeData","masterDetail","suppressMultiRangeSelection","enterMovesDownAfterEdit","enterMovesDown","suppressPropertyNamesCheck","rowMultiSelectWithClick","contractColumnSelection","suppressEnterpriseResetOnNewColumns","enableOldSetFilterModel","suppressRowHoverHighlight","gridAutoHeight","suppressRowTransform","suppressClipboardPaste","serverSideSortingAlwaysResets","reactNext","suppressSetColumnStateEvents","enableCharts","deltaColumnMode","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering"],e.FUNCTION_PROPERTIES=["localeTextFunc","groupRowInnerRenderer","groupRowInnerRendererFramework","dateComponent","dateComponentFramework","groupRowRenderer","groupRowRendererFramework","isExternalFilterPresent","getRowHeight","doesExternalFilterPass","getRowClass","getRowStyle","getRowClassRules","traverseNode","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getNodeChildDetails","groupRowAggNodes","getRowNodeId","isFullWidthCell","fullWidthCellRenderer","fullWidthCellRendererFramework","doesDataFlower","processSecondaryColDef","processSecondaryColGroupDef","getBusinessKeyForNode","sendToClipboard","navigateToNextCell","tabToNextCell","getDetailRowData","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","loadingCellRenderer","loadingCellRendererFramework","loadingOverlayComponent","loadingOverlayComponentFramework","noRowsOverlayComponent","noRowsOverlayComponentFramework","detailCellRenderer","detailCellRendererFramework","onGridReady","defaultGroupSortComparator","isRowMaster","isRowSelectable","postSort","processHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","suppressKeyboardEvent"],e.ALL_PROPERTIES=e.ARRAY_PROPERTIES.concat(e.OBJECT_PROPERTIES).concat(e.STRING_PROPERTIES).concat(e.NUMBER_PROPERTIES).concat(e.FUNCTION_PROPERTIES).concat(e.BOOLEAN_PROPERTIES),e.FRAMEWORK_PROPERTIES=["__ob__","__metadata__","mappedColumnProperties","hasChildColumns","toColDef","createColDefFromGridColumn"],e}();t.PropertyKeys=o},38152:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var n=o(26016),s=o(8534),a=o(45727),l=o(83423),p=function(e){function t(t,o,r,i){var n=e.call(this)||this;return n.columnOrGroup=t,n.eCell=o,n.colsSpanning=i,n.beans=r,n.printLayout=r.gridOptionsWrapper.getDomLayout()===a.Constants.DOM_LAYOUT_PRINT,n}return i(t,e),t.prototype.setColsSpanning=function(e){this.colsSpanning=e,this.onLeftChanged()},t.prototype.getColumnOrGroup=function(){return this.beans.gridOptionsWrapper.isEnableRtl()&&this.colsSpanning?this.colsSpanning[this.colsSpanning.length-1]:this.columnOrGroup},t.prototype.init=function(){this.addDestroyableEventListener(this.columnOrGroup,n.Column.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.setLeftFirstTime()},t.prototype.setLeftFirstTime=function(){var e=this.beans.gridOptionsWrapper.isSuppressColumnMoveAnimation(),t=l._.exists(this.columnOrGroup.getOldLeft());this.beans.columnAnimationService.isActive()&&t&&!e?this.animateInLeft():this.onLeftChanged()},t.prototype.animateInLeft=function(){var e=this,t=this.getColumnOrGroup().getLeft(),o=this.getColumnOrGroup().getOldLeft();this.setLeft(o),this.actualLeft=t,this.beans.columnAnimationService.executeNextVMTurn((function(){e.actualLeft===t&&e.setLeft(t)}))},t.prototype.onLeftChanged=function(){var e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)},t.prototype.modifyLeftForPrintLayout=function(e,t){return this.printLayout?e.getPinned()===n.Column.PINNED_LEFT?t:e.getPinned()===n.Column.PINNED_RIGHT?this.beans.columnController.getPinnedLeftContainerWidth()+this.beans.columnController.getBodyContainerWidth()+t:this.beans.columnController.getPinnedLeftContainerWidth()+t:t},t.prototype.setLeft=function(e){l._.exists(e)&&(this.eCell.style.left=e+"px")},t}(s.BeanStub);t.SetLeftFeature=p},38427:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(45727),a=o(98239),l=o(3976),p=o(34782),u=o(44081),c=o(50580),d=o(83423),h=function(){function e(){}return e.prototype.getNextCellToFocus=function(e,t){for(var o=t,r=!1;!r;){switch(e){case s.Constants.KEY_UP:o=this.getCellAbove(o);break;case s.Constants.KEY_DOWN:o=this.getCellBelow(o);break;case s.Constants.KEY_RIGHT:o=this.gridOptionsWrapper.isEnableRtl()?this.getCellToLeft(o):this.getCellToRight(o);break;case s.Constants.KEY_LEFT:o=this.gridOptionsWrapper.isEnableRtl()?this.getCellToRight(o):this.getCellToLeft(o);break;default:o=null,console.warn("ag-Grid: unknown key for navigation "+e)}r=!o||this.isCellGoodToFocusOn(o)}return o},e.prototype.isCellGoodToFocusOn=function(e){var t,o=e.column;switch(e.floating){case s.Constants.PINNED_TOP:t=this.pinnedRowModel.getPinnedTopRow(e.rowIndex);break;case s.Constants.PINNED_BOTTOM:t=this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);break;default:t=this.rowModel.getRow(e.rowIndex)}return!o.isSuppressNavigable(t)},e.prototype.getCellToLeft=function(e){if(!e)return null;var t=this.columnController.getDisplayedColBefore(e.column);if(t){var o={rowIndex:e.rowIndex,column:t,floating:e.floating};return new p.GridCell(o)}return null},e.prototype.getCellToRight=function(e){if(!e)return null;var t=this.columnController.getDisplayedColAfter(e.column);if(t){var o={rowIndex:e.rowIndex,column:t,floating:e.floating};return new p.GridCell(o)}return null},e.prototype.getRowBelow=function(e){return this.isLastRowInContainer(e)?e.isFloatingBottom()?null:e.isNotFloating()?this.pinnedRowModel.isRowsToRender(s.Constants.PINNED_BOTTOM)?new l.GridRow(0,s.Constants.PINNED_BOTTOM):null:this.rowModel.isRowsToRender()?new l.GridRow(0,null):this.pinnedRowModel.isRowsToRender(s.Constants.PINNED_BOTTOM)?new l.GridRow(0,s.Constants.PINNED_BOTTOM):null:new l.GridRow(e.rowIndex+1,e.floating)},e.prototype.getCellBelow=function(e){if(!e)return null;var t=this.getRowBelow(e.getGridRow());if(t){var o={rowIndex:t.rowIndex,column:e.column,floating:t.floating};return new p.GridCell(o)}return null},e.prototype.isLastRowInContainer=function(e){return e.isFloatingTop()?this.pinnedRowModel.getPinnedTopRowData().length-1<=e.rowIndex:e.isFloatingBottom()?this.pinnedRowModel.getPinnedBottomRowData().length-1<=e.rowIndex:this.rowModel.getPageLastRow()<=e.rowIndex},e.prototype.getRowAbove=function(e){return 0===e.rowIndex?e.isFloatingTop()?null:e.isNotFloating()?this.pinnedRowModel.isRowsToRender(s.Constants.PINNED_TOP)?this.getLastFloatingTopRow():null:this.rowModel.isRowsToRender()?this.getLastBodyCell():this.pinnedRowModel.isRowsToRender(s.Constants.PINNED_TOP)?this.getLastFloatingTopRow():null:new l.GridRow(e.rowIndex-1,e.floating)},e.prototype.getCellAbove=function(e){if(!e)return null;var t=this.getRowAbove(e.getGridRow());if(t){var o={rowIndex:t.rowIndex,column:e.column,floating:t.floating};return new p.GridCell(o)}return null},e.prototype.getLastBodyCell=function(){var e=this.rowModel.getPageLastRow();return new l.GridRow(e,null)},e.prototype.getLastFloatingTopRow=function(){var e=this.pinnedRowModel.getPinnedTopRowData().length-1;return new l.GridRow(e,s.Constants.PINNED_TOP)},e.prototype.getNextTabbedCell=function(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)},e.prototype.getNextTabbedCellForwards=function(e){var t=this.columnController.getAllDisplayedColumns(),o=e.rowIndex,r=e.floating,i=this.columnController.getDisplayedColAfter(e.column);if(!i){i=t[0];var n=this.getRowBelow(e.getGridRow());if(d._.missing(n))return null;o=n?n.rowIndex:null,r=n?n.floating:null}var s={rowIndex:o,column:i,floating:r};return new p.GridCell(s)},e.prototype.getNextTabbedCellBackwards=function(e){var t=this.columnController.getAllDisplayedColumns(),o=e.rowIndex,r=e.floating,i=this.columnController.getDisplayedColBefore(e.column);if(!i){i=t[t.length-1];var n=this.getRowAbove(e.getGridRow());if(d._.missing(n))return null;o=n?n.rowIndex:null,r=n?n.floating:null}var s={rowIndex:o,column:i,floating:r};return new p.GridCell(s)},r([n.Autowired("columnController"),i("design:type",a.ColumnController)],e.prototype,"columnController",void 0),r([n.Autowired("rowModel"),i("design:type",Object)],e.prototype,"rowModel",void 0),r([n.Autowired("pinnedRowModel"),i("design:type",c.PinnedRowModel)],e.prototype,"pinnedRowModel",void 0),r([n.Autowired("gridOptionsWrapper"),i("design:type",u.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.Bean("cellNavigationService")],e)}();t.CellNavigationService=h},38848:(e,t,o)=>{o.d(t,{GU:()=>w,WL:()=>c,ae:()=>O,cV:()=>b,m2:()=>n,sl:()=>_,xI:()=>v});var r=o(12240),i=o(65994).process;function n(...e){return e.reduce(((e,t)=>({...e,...null!=t?t:{}})),{})}function s(e){return Object.fromEntries([...e.headers])}function a(e){return(e instanceof Error||e instanceof DOMException)&&("AbortError"===e.name||"ResponseAborted"===e.name||"TimeoutError"===e.name)}(({prefix:e,size:t=16,alphabet:o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:i="-"}={})=>{if(null==e)return()=>{const e=o.length,r=new Array(t);for(let i=0;i<t;i++)r[i]=o[Math.random()*e|0];return r.join("")};if(o.includes(i))throw new r.Di({argument:"separator",message:`The separator "${i}" must not be part of the alphabet "${o}".`})})();var l=["fetch failed","failed to fetch"];function p(e=globalThis){var t,o,r;return e.window?"runtime/browser":(null==(t=e.navigator)?void 0:t.userAgent)?`runtime/${e.navigator.userAgent.toLowerCase()}`:(null==(r=null==(o=e.process)?void 0:o.versions)?void 0:r.node)?`runtime/node.js/${e.process.version.substring(0)}`:e.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function u(e,...t){const o=new Headers(function(e){if(null==e)return{};const t={};if(e instanceof Headers)e.forEach(((e,o)=>{t[o.toLowerCase()]=e}));else{Array.isArray(e)||(e=Object.entries(e));for(const[o,r]of e)null!=r&&(t[o.toLowerCase()]=r)}return t}(e)),r=o.get("user-agent")||"";return o.set("user-agent",[r,...t].filter(Boolean).join(" ")),Object.fromEntries(o.entries())}function c({apiKey:e,environmentVariableName:t,apiKeyParameterName:o="apiKey",description:n}){if("string"==typeof e)return e;if(null!=e)throw new r.Kq({message:`${n} API key must be a string.`});if(void 0===i)throw new r.Kq({message:`${n} API key is missing. Pass it using the '${o}' parameter. Environment variables is not supported in this environment.`});if(null==(e=i.env[t]))throw new r.Kq({message:`${n} API key is missing. Pass it using the '${o}' parameter or the ${t} environment variable.`});if("string"!=typeof e)throw new r.Kq({message:`${n} API key must be a string. The value of the ${t} environment variable is not a string.`});return e}var d=/"__proto__"\s*:/,h=/"constructor"\s*:/;function f(e){const t=JSON.parse(e);return null===t||"object"!=typeof t||!1===d.test(e)&&!1===h.test(e)?t:function(e){let t=[e];for(;t.length;){const e=t;t=[];for(const o of e){if(Object.prototype.hasOwnProperty.call(o,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(o,"constructor")&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const e in o){const r=o[e];r&&"object"==typeof r&&t.push(r)}}}return e}(t)}function g(e){const{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch(t){return f(e)}try{return f(e)}finally{Error.stackTraceLimit=t}}var m=Symbol.for("vercel.ai.validator");async function y({value:e,schema:t}){const o=function(e){return function(e){return"object"==typeof e&&null!==e&&m in e&&!0===e[m]&&"validate"in e}(e)?e:"function"==typeof e?e():(t=e,o=async e=>{const o=await t["~standard"].validate(e);return null==o.issues?{success:!0,value:o.value}:{success:!1,error:new r.iM({value:e,cause:o.issues})}},{[m]:!0,validate:o});var t,o}(t);try{if(null==o.validate)return{success:!0,value:e,rawValue:e};const t=await o.validate(e);return t.success?{success:!0,value:t.value,rawValue:e}:{success:!1,error:r.iM.wrap({value:e,cause:t.error}),rawValue:e}}catch(t){return{success:!1,error:r.iM.wrap({value:e,cause:t}),rawValue:e}}}async function v({provider:e,providerOptions:t,schema:o}){if(null==(null==t?void 0:t[e]))return;const i=await y({value:t[e],schema:o});if(!i.success)throw new r.Di({argument:"providerOptions",message:`invalid ${e} provider options`,cause:i.error});return i.value}var C=()=>globalThis.fetch,w=async({url:e,headers:t,body:o,failedResponseHandler:r,successfulResponseHandler:i,abortSignal:n,fetch:s})=>E({url:e,headers:{"Content-Type":"application/json",...t},body:{content:JSON.stringify(o),values:o},failedResponseHandler:r,successfulResponseHandler:i,abortSignal:n,fetch:s}),E=async({url:e,headers:t={},body:o,successfulResponseHandler:i,failedResponseHandler:n,abortSignal:c,fetch:d=C()})=>{try{const l=await d(e,{method:"POST",headers:u(t,"ai-sdk/provider-utils/3.0.20",p()),body:o.content,signal:c}),h=s(l);if(!l.ok){let t;try{t=await n({response:l,url:e,requestBodyValues:o.values})}catch(t){if(a(t)||r.hL.isInstance(t))throw t;throw new r.hL({message:"Failed to process error response",cause:t,statusCode:l.status,url:e,responseHeaders:h,requestBodyValues:o.values})}throw t.value}try{return await i({response:l,url:e,requestBodyValues:o.values})}catch(t){if(t instanceof Error&&(a(t)||r.hL.isInstance(t)))throw t;throw new r.hL({message:"Failed to process successful response",cause:t,statusCode:l.status,url:e,responseHeaders:h,requestBodyValues:o.values})}}catch(t){throw function({error:e,url:t,requestBodyValues:o}){if(a(e))return e;if(e instanceof TypeError&&l.includes(e.message.toLowerCase())){const i=e.cause;if(null!=i)return new r.hL({message:`Cannot connect to API: ${i.message}`,cause:i,url:t,requestBodyValues:o,isRetryable:!0})}return e}({error:t,url:e,requestBodyValues:o.values})}},_=({errorSchema:e,errorToMessage:t,isRetryable:o})=>async({response:i,url:n,requestBodyValues:a})=>{const l=await i.text(),p=s(i);if(""===l.trim())return{responseHeaders:p,value:new r.hL({message:i.statusText,url:n,requestBodyValues:a,statusCode:i.status,responseHeaders:p,responseBody:l,isRetryable:null==o?void 0:o(i)})};try{const s=await async function({text:e,schema:t}){try{const o=g(e);return null==t?o:async function({value:e,schema:t}){const o=await y({value:e,schema:t});if(!o.success)throw r.iM.wrap({value:e,cause:o.error});return o.value}({value:o,schema:t})}catch(t){if(r.u6.isInstance(t)||r.iM.isInstance(t))throw t;throw new r.u6({text:e,cause:t})}}({text:l,schema:e});return{responseHeaders:p,value:new r.hL({message:t(s),url:n,requestBodyValues:a,statusCode:i.status,responseHeaders:p,responseBody:l,data:s,isRetryable:null==o?void 0:o(i,s)})}}catch(e){return{responseHeaders:p,value:new r.hL({message:i.statusText,url:n,requestBodyValues:a,statusCode:i.status,responseHeaders:p,responseBody:l,isRetryable:null==o?void 0:o(i)})}}},b=e=>async({response:t,url:o,requestBodyValues:i})=>{const n=await t.text(),a=await async function({text:e,schema:t}){try{const o=g(e);return null==t?{success:!0,value:o,rawValue:o}:await y({value:o,schema:t})}catch(t){return{success:!1,error:r.u6.isInstance(t)?t:new r.u6({text:e,cause:t}),rawValue:void 0}}}({text:n,schema:e}),l=s(t);if(!a.success)throw new r.hL({message:"Invalid JSON response",cause:a.error,statusCode:t.status,responseHeaders:l,responseBody:n,url:o,requestBodyValues:i});return{responseHeaders:l,value:a.value,rawValue:a.rawValue}};Symbol("Let zodToJsonSchema decide on which parser to use"),new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"),Symbol.for("vercel.ai.schema");var{btoa:R,atob:S}=globalThis;function O(e){return null==e?void 0:e.replace(/\/$/,"")}},39984:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(73575),a=o(85910),l=o(44081),p=o(44871),u=o(40797),c=o(83423),d=function(){function e(){this.DEFAULT_HIDE_TOOLTIP_TIMEOUT=1e4,this.MOUSEOUT_HIDE_TOOLTIP_TIMEOUT=1e3,this.MOUSEOVER_SHOW_TOOLTIP_TIMEOUT=2e3,this.HIDE_SHOW_ONLY=!0,this.showTimeoutId=0,this.hideTimeoutId=0,this.registeredComponents={}}return e.prototype.registerTooltip=function(e){var t=this,o=e.getGui(),r=e.getCompId();e.addDestroyableEventListener(o,"mouseover",(function(o){return t.processMouseOver(o,e)})),e.addDestroyableEventListener(o,"mousemove",(function(e){return t.processMouseMove(e)})),e.addDestroyableEventListener(o,"mousedown",this.hideTooltip.bind(this)),e.addDestroyableEventListener(o,"mouseout",this.processMouseOut.bind(this)),this.registeredComponents[r]={tooltipComp:void 0,destroyFunc:void 0},e.addDestroyFunc((function(){return t.unregisterTooltip(e)}))},e.prototype.unregisterTooltip=function(e){var t=e.getCompId();this.activeComponent===e&&this.hideTooltip(),delete this.registeredComponents[t]},e.prototype.processMouseOver=function(e,t){var o=this.MOUSEOVER_SHOW_TOOLTIP_TIMEOUT;if(this.activeComponent){if(this.lastHoveredComponent===this.activeComponent)return;o=200}else if(this.showTimeoutId&&this.lastHoveredComponent===t)return;this.clearTimers(this.HIDE_SHOW_ONLY),this.lastHoveredComponent!==t&&(this.lastHoveredComponent=t,this.lastMouseEvent=e,this.showTimeoutId=window.setTimeout(this.showTooltip.bind(this),o,e))},e.prototype.processMouseOut=function(e){var t=this.activeComponent,o=e.relatedTarget;if(t){if(!t.getGui().contains(o)){var r=this.registeredComponents[t.getCompId()];c._.addCssClass(r.tooltipComp.getGui(),"ag-tooltip-hiding"),this.lastHoveredComponent=void 0,this.clearTimers(),this.hideTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.MOUSEOUT_HIDE_TOOLTIP_TIMEOUT)}}else{if(this.lastHoveredComponent){var i=this.lastHoveredComponent.getGui().contains(o);if(this.showTimeoutId&&i)return;i||(this.lastHoveredComponent=void 0)}this.clearTimers()}},e.prototype.processMouseMove=function(e){this.lastMouseEvent=e},e.prototype.showTooltip=function(e){var t=this.lastHoveredComponent,o=t,r=this.registeredComponents[t.getCompId()];this.hideTooltip();var i={api:this.gridApi,columnApi:this.columnApi,colDef:t.getComponentHolder(),column:o.getColumn&&o.getColumn(),context:this.gridOptionsWrapper.getContext(),rowIndex:o.getGridCell&&o.getGridCell().rowIndex,value:t.getTooltipText()};this.createTooltipComponent(i,r,e)},e.prototype.createTooltipComponent=function(e,t,o){var r=this;this.userComponentFactory.newTooltipComponent(e).then((function(e){if(t){t.tooltipComp=e;var o=e.getGui(),i=r.popupService.addPopup(!1,o,!1);t.destroyFunc=function(){i(),e.destroy&&e.destroy()},r.popupService.positionPopupUnderMouseEvent({type:"tooltip",mouseEvent:r.lastMouseEvent,ePopup:o,nudgeY:18}),r.activeComponent=r.lastHoveredComponent,r.hideTimeoutId=window.setTimeout(r.hideTooltip.bind(r),r.DEFAULT_HIDE_TOOLTIP_TIMEOUT)}}))},e.prototype.hideTooltip=function(){var e=this.activeComponent;if(this.clearTimers(),e){var t=e.getCompId(),o=this.registeredComponents[t];this.activeComponent=void 0,o&&(o.destroyFunc&&o.destroyFunc(),this.clearRegisteredComponent(o))}},e.prototype.clearRegisteredComponent=function(e){delete e.destroyFunc,delete e.tooltipComp},e.prototype.clearTimers=function(e){void 0===e&&(e=!1),this.hideTimeoutId&&!e&&(window.clearTimeout(this.hideTimeoutId),this.hideTimeoutId=0),this.showTimeoutId&&(window.clearTimeout(this.showTimeoutId),this.showTimeoutId=0)},r([n.Autowired("popupService"),i("design:type",s.PopupService)],e.prototype,"popupService",void 0),r([n.Autowired("userComponentFactory"),i("design:type",a.UserComponentFactory)],e.prototype,"userComponentFactory",void 0),r([n.Autowired("columnApi"),i("design:type",p.ColumnApi)],e.prototype,"columnApi",void 0),r([n.Autowired("gridApi"),i("design:type",u.GridApi)],e.prototype,"gridApi",void 0),r([n.Autowired("gridOptionsWrapper"),i("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.Bean("tooltipManager")],e)}();t.TooltipManager=d},40634:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},n=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(37132),a=o(72493),l=o(72493),p=function(){function e(){this.expressionToFunctionCache={}}return e.prototype.setBeans=function(e){this.logger=e.create("ExpressionService")},e.prototype.evaluate=function(e,t){if("function"==typeof e)return e(t);if("string"==typeof e){var o=e;return this.evaluateExpression(o,t)}console.error("ag-Grid: value should be either a string or a function",e)},e.prototype.evaluateExpression=function(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.columnApi,t.getValue,t.column,t.columnGroup)}catch(t){return console.log("Processing of the expression failed"),console.log("Expression = "+e),console.log("Exception = "+t),null}},e.prototype.createExpressionFunction=function(e){if(this.expressionToFunctionCache[e])return this.expressionToFunctionCache[e];var t=this.createFunctionBody(e),o=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, columnApi, getValue, column, columnGroup",t);return this.expressionToFunctionCache[e]=o,o},e.prototype.createFunctionBody=function(e){return e.indexOf("return")>=0?e:"return "+e+";"},r([n(0,l.Qualifier("loggerFactory")),i("design:type",Function),i("design:paramtypes",[s.LoggerFactory]),i("design:returntype",void 0)],e.prototype,"setBeans",null),r([a.Bean("expressionService")],e)}();t.ExpressionService=p},40706:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(44081),s=o(72493),a=o(58342),l=o(98239),p=o(60843),u=o(85786),c=o(15774),d=o(69992),h=o(26016),f=o(13887),g=o(83423),m=function(){function e(e,t,o){this.headerRowComps=[],this.eContainer=e,this.pinned=o,this.eViewport=t}return e.prototype.registerGridComp=function(e){this.setupDragAndDrop(e)},e.prototype.forEachHeaderElement=function(e){this.headerRowComps.forEach((function(t){return t.forEachHeaderElement(e)}))},e.prototype.init=function(){this.scrollWidth=this.gridOptionsWrapper.getScrollbarWidth(),this.eventService.addEventListener(u.Events.EVENT_COLUMN_VALUE_CHANGED,this.onColumnValueChanged.bind(this)),this.eventService.addEventListener(u.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onColumnRowGroupChanged.bind(this)),this.eventService.addEventListener(u.Events.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.eventService.addEventListener(u.Events.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.eventService.addEventListener(u.Events.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.eventService.addEventListener(u.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this))},e.prototype.onColumnRowGroupChanged=function(){this.onGridColumnsChanged()},e.prototype.onColumnValueChanged=function(){this.onGridColumnsChanged()},e.prototype.onColumnResized=function(){this.setWidthOfPinnedContainer()},e.prototype.onDisplayedColumnsChanged=function(){this.setWidthOfPinnedContainer()},e.prototype.onScrollVisibilityChanged=function(){this.setWidthOfPinnedContainer()},e.prototype.setWidthOfPinnedContainer=function(){var e=this.pinned===h.Column.PINNED_LEFT,t=this.pinned===h.Column.PINNED_RIGHT,o=this.columnController,r=this.gridOptionsWrapper.isEnableRtl();if(e||t){var i=o[e?"getPinnedLeftContainerWidth":"getPinnedRightContainerWidth"]();this.scrollVisibleService.isVerticalScrollShowing()&&(r&&e||!r&&t)&&(i+=this.scrollWidth),g._.setFixedWidth(this.eContainer,i)}},e.prototype.destroy=function(){this.removeHeaderRowComps()},e.prototype.onGridColumnsChanged=function(){this.removeAndCreateAllRowComps()},e.prototype.removeAndCreateAllRowComps=function(){this.removeHeaderRowComps(),this.createHeaderRowComps()},e.prototype.refresh=function(){this.removeAndCreateAllRowComps()},e.prototype.setupDragAndDrop=function(e){var t=this.eViewport?this.eViewport:this.eContainer,o=new d.BodyDropTarget(this.pinned,t);this.context.wireBean(o),o.registerGridComp(e)},e.prototype.removeHeaderRowComps=function(){this.headerRowComps.forEach((function(e){e.destroy()})),this.headerRowComps.length=0,g._.clearElement(this.eContainer)},e.prototype.createHeaderRowComps=function(){for(var e=this.columnController.getHeaderRowCount(),t=0;t<e;t++){var o=t!==e-1?c.HeaderRowType.COLUMN_GROUP:c.HeaderRowType.COLUMN,r=new c.HeaderRowComp(t,o,this.pinned,this.dropTarget);this.context.wireBean(r),this.headerRowComps.push(r),this.eContainer.appendChild(r.getGui())}this.gridOptionsWrapper.isFloatingFilter()&&!this.columnController.isPivotMode()&&(r=new c.HeaderRowComp(e,c.HeaderRowType.FLOATING_FILTER,this.pinned,this.dropTarget),this.context.wireBean(r),this.headerRowComps.push(r),this.eContainer.appendChild(r.getGui()))},r([s.Autowired("gridOptionsWrapper"),i("design:type",n.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([s.Autowired("context"),i("design:type",s.Context)],e.prototype,"context",void 0),r([s.Autowired("$scope"),i("design:type",Object)],e.prototype,"$scope",void 0),r([s.Autowired("dragAndDropService"),i("design:type",a.DragAndDropService)],e.prototype,"dragAndDropService",void 0),r([s.Autowired("columnController"),i("design:type",l.ColumnController)],e.prototype,"columnController",void 0),r([s.Autowired("eventService"),i("design:type",p.EventService)],e.prototype,"eventService",void 0),r([s.Autowired("scrollVisibleService"),i("design:type",f.ScrollVisibleService)],e.prototype,"scrollVisibleService",void 0),r([s.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),e}();t.HeaderContainer=m},40797:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(43460),s=o(10042),a=o(55e3),l=o(98239),p=o(54828),u=o(44081),c=o(24463),d=o(60843),h=o(45727),f=o(72493),g=o(86608),m=o(42195),y=o(34782),v=o(34470),C=o(41451),w=o(76133),E=o(88842),_=o(10190),b=o(50580),R=o(69065),S=o(83423),O=function(){function e(){this.detailGridInfoMap={}}return e.prototype.registerGridComp=function(e){this.gridPanel=e},e.prototype.registerGridCore=function(e){this.gridCore=e},e.prototype.registerHeaderRootComp=function(e){this.headerRootComp=e},e.prototype.init=function(){switch(this.rowModel.getType()){case h.Constants.ROW_MODEL_TYPE_CLIENT_SIDE:this.clientSideRowModel=this.rowModel;break;case h.Constants.ROW_MODEL_TYPE_INFINITE:this.infinitePageRowModel=this.rowModel;break;case h.Constants.ROW_MODEL_TYPE_SERVER_SIDE:this.serverSideRowModel=this.rowModel}},e.prototype.__getAlignedGridService=function(){return this.alignedGridsService},e.prototype.addDetailGridInfo=function(e,t){this.detailGridInfoMap[e]=t},e.prototype.removeDetailGridInfo=function(e){this.detailGridInfoMap[e]=void 0},e.prototype.getDetailGridInfo=function(e){return this.detailGridInfoMap[e]},e.prototype.forEachDetailGridInfo=function(e){var t=0;S._.iterateObject(this.detailGridInfoMap,(function(o,r){S._.exists(r)&&(e(r,t),t++)}))},e.prototype.getDataAsCsv=function(e){return this.csvCreator.getDataAsCsv(e)},e.prototype.exportDataAsCsv=function(e){this.csvCreator.exportDataAsCsv(e)},e.prototype.getDataAsExcel=function(e){return this.excelCreator||console.warn("ag-Grid: Excel export is only available in ag-Grid Enterprise"),this.excelCreator.getDataAsExcelXml(e)},e.prototype.exportDataAsExcel=function(e){this.excelCreator||console.warn("ag-Grid: Excel export is only available in ag-Grid Enterprise"),this.excelCreator.exportDataAsExcel(e)},e.prototype.setEnterpriseDatasource=function(e){console.warn("ag-grid: since version 18.x, api.setEnterpriseDatasource() should be replaced with api.setServerSideDatasource()"),this.setServerSideDatasource(e)},e.prototype.setServerSideDatasource=function(e){this.gridOptionsWrapper.isRowModelServerSide()?this.rowModel.setDatasource(e):console.warn("ag-Grid: you can only use an enterprise datasource when gridOptions.rowModelType is '"+h.Constants.ROW_MODEL_TYPE_SERVER_SIDE+"'")},e.prototype.setDatasource=function(e){this.gridOptionsWrapper.isRowModelInfinite()?this.rowModel.setDatasource(e):console.warn("ag-Grid: you can only use a datasource when gridOptions.rowModelType is '"+h.Constants.ROW_MODEL_TYPE_INFINITE+"'")},e.prototype.setViewportDatasource=function(e){this.gridOptionsWrapper.isRowModelViewport()?this.rowModel.setViewportDatasource(e):console.warn("ag-Grid: you can only use a viewport datasource when gridOptions.rowModelType is '"+h.Constants.ROW_MODEL_TYPE_VIEWPORT+"'")},e.prototype.setRowData=function(e){if(this.gridOptionsWrapper.isRowModelDefault())if(this.gridOptionsWrapper.isDeltaRowDataMode()){var t=this.immutableService.createTransactionForRowData(e),o=t[0],r=t[1];this.clientSideRowModel.updateRowData(o,r),this.rowRenderer.refreshFullWidthRows()}else this.selectionController.reset(),this.clientSideRowModel.setRowData(e);else console.warn("cannot call setRowData unless using normal row model")},e.prototype.setFloatingTopRowData=function(e){console.warn("ag-Grid: since v12, api.setFloatingTopRowData() is now api.setPinnedTopRowData()"),this.setPinnedTopRowData(e)},e.prototype.setFloatingBottomRowData=function(e){console.warn("ag-Grid: since v12, api.setFloatingBottomRowData() is now api.setPinnedBottomRowData()"),this.setPinnedBottomRowData(e)},e.prototype.getFloatingTopRowCount=function(){return console.warn("ag-Grid: since v12, api.getFloatingTopRowCount() is now api.getPinnedTopRowCount()"),this.getPinnedTopRowCount()},e.prototype.getFloatingBottomRowCount=function(){return console.warn("ag-Grid: since v12, api.getFloatingBottomRowCount() is now api.getPinnedBottomRowCount()"),this.getPinnedBottomRowCount()},e.prototype.getFloatingTopRow=function(e){return console.warn("ag-Grid: since v12, api.getFloatingTopRow() is now api.getPinnedTopRow()"),this.getPinnedTopRow(e)},e.prototype.getFloatingBottomRow=function(e){return console.warn("ag-Grid: since v12, api.getFloatingBottomRow() is now api.getPinnedBottomRow()"),this.getPinnedBottomRow(e)},e.prototype.setPinnedTopRowData=function(e){this.pinnedRowModel.setPinnedTopRowData(e)},e.prototype.setPinnedBottomRowData=function(e){this.pinnedRowModel.setPinnedBottomRowData(e)},e.prototype.getPinnedTopRowCount=function(){return this.pinnedRowModel.getPinnedTopRowCount()},e.prototype.getPinnedBottomRowCount=function(){return this.pinnedRowModel.getPinnedBottomRowCount()},e.prototype.getPinnedTopRow=function(e){return this.pinnedRowModel.getPinnedTopRow(e)},e.prototype.getPinnedBottomRow=function(e){return this.pinnedRowModel.getPinnedBottomRow(e)},e.prototype.setColumnDefs=function(e,t){void 0===t&&(t="api"),this.columnController.setColumnDefs(e,t)},e.prototype.expireValueCache=function(){this.valueCache.expire()},e.prototype.getVerticalPixelRange=function(){return this.gridPanel.getVScrollPosition()},e.prototype.getHorizontalPixelRange=function(){return this.gridPanel.getHScrollPosition()},e.prototype.setAlwaysShowVerticalScroll=function(e){this.gridOptionsWrapper.setProperty("alwaysShowVerticalScroll",e)},e.prototype.refreshToolPanel=function(){this.gridCore.refreshSideBar()},e.prototype.refreshCells=function(e){void 0===e&&(e={}),Array.isArray(e)?console.warn("since ag-Grid v11.1, refreshCells() now takes parameters, please see the documentation."):this.rowRenderer.refreshCells(e)},e.prototype.flashCells=function(e){void 0===e&&(e={}),this.rowRenderer.flashCells(e)},e.prototype.redrawRows=function(e){void 0===e&&(e={}),e&&e.rowNodes?this.rowRenderer.redrawRows(e.rowNodes):this.rowRenderer.redrawAfterModelUpdate()},e.prototype.timeFullRedraw=function(e){void 0===e&&(e=1);var t=0,o=0,r=0,i=this;!function n(){var s=(new Date).getTime();i.rowRenderer.redrawAfterModelUpdate();var a=(new Date).getTime();window.setTimeout((function(){var i=(new Date).getTime(),l=a-s,p=i-a;console.log("duration: processing = "+l+"ms, reflow = "+p+"ms"),t++,o+=l,r+=p,t<e?window.setTimeout(n,1e3):(console.log("tests complete. iteration count = "+t),console.log("average processing = "+o/t+"ms"),console.log("average reflow = "+r/t+"ms"))}),0)}()},e.prototype.refreshView=function(){console.warn("ag-Grid: since v11.1, refreshView() is deprecated, please call refreshCells() or redrawRows() instead"),this.redrawRows()},e.prototype.refreshRows=function(e){console.warn("since ag-Grid v11.1, refreshRows() is deprecated, please use refreshCells({rowNodes: rows}) or redrawRows({rowNodes: rows}) instead"),this.refreshCells({rowNodes:e})},e.prototype.rowDataChanged=function(e){console.warn("ag-Grid: rowDataChanged is deprecated, either call refreshView() to refresh everything, or call rowNode.setRowData(newData) to set value on a particular node"),this.redrawRows()},e.prototype.softRefreshView=function(){console.error("ag-Grid: since v16, softRefreshView() is no longer supported. Please check the documentation on how to refresh.")},e.prototype.refreshGroupRows=function(){console.warn("ag-Grid: since v11.1, refreshGroupRows() is no longer supported, call refreshCells() instead. Because refreshCells() now does dirty checking, it will only refresh cells that have changed, so it should not be necessary to only refresh the group rows."),this.refreshCells()},e.prototype.setFunctionsReadOnly=function(e){this.gridOptionsWrapper.setProperty("functionsReadOnly",e)},e.prototype.refreshHeader=function(){this.headerRootComp.refreshHeader(),this.gridPanel.setHeaderAndFloatingHeights()},e.prototype.isAnyFilterPresent=function(){return this.filterManager.isAnyFilterPresent()},e.prototype.isAdvancedFilterPresent=function(){return console.warn("ag-Grid: isAdvancedFilterPresent() is deprecated, please use isColumnFilterPresent()"),this.isColumnFilterPresent()},e.prototype.isColumnFilterPresent=function(){return this.filterManager.isAdvancedFilterPresent()},e.prototype.isQuickFilterPresent=function(){return this.filterManager.isQuickFilterPresent()},e.prototype.getModel=function(){return this.rowModel},e.prototype.onGroupExpandedOrCollapsed=function(e){S._.missing(this.clientSideRowModel)&&console.warn("ag-Grid: cannot call onGroupExpandedOrCollapsed unless using normal row model"),S._.exists(e)&&console.warn("ag-Grid: api.onGroupExpandedOrCollapsed - refreshFromIndex parameter is no longer used, the grid will refresh all rows"),this.clientSideRowModel.refreshModel({step:h.Constants.STEP_MAP})},e.prototype.refreshInMemoryRowModel=function(e){console.warn("ag-grid: since version 18.x, api.refreshInMemoryRowModel() should be replaced with api.refreshClientSideRowModel()"),this.refreshClientSideRowModel(e)},e.prototype.refreshClientSideRowModel=function(e){S._.missing(this.clientSideRowModel)&&console.warn("cannot call refreshClientSideRowModel unless using normal row model");var t=h.Constants.STEP_EVERYTHING,o={group:h.Constants.STEP_EVERYTHING,filter:h.Constants.STEP_FILTER,map:h.Constants.STEP_MAP,aggregate:h.Constants.STEP_AGGREGATE,sort:h.Constants.STEP_SORT,pivot:h.Constants.STEP_PIVOT};if(S._.exists(e)&&(t=o[e]),S._.missing(t))console.error("ag-Grid: invalid step "+e+", available steps are "+Object.keys(o).join(", "));else{var r={step:t,keepRenderedRows:!0,animate:!0,keepEditingRows:!0};this.clientSideRowModel.refreshModel(r)}},e.prototype.isAnimationFrameQueueEmpty=function(){return this.animationFrameService.isQueueEmpty()},e.prototype.getRowNode=function(e){return this.rowModel.getRowNode(e)},e.prototype.expandAll=function(){S._.missing(this.clientSideRowModel)?console.warn("ag-Grid: cannot call expandAll unless using normal row model"):this.clientSideRowModel.expandOrCollapseAll(!0)},e.prototype.collapseAll=function(){S._.missing(this.clientSideRowModel)?console.warn("ag-Grid: cannot call collapseAll unless using normal row model"):this.clientSideRowModel.expandOrCollapseAll(!1)},e.prototype.addVirtualRowListener=function(e,t,o){"string"!=typeof e&&console.warn("ag-Grid: addVirtualRowListener is deprecated, please use addRenderedRowListener."),this.addRenderedRowListener(e,t,o)},e.prototype.addRenderedRowListener=function(e,t,o){"virtualRowSelected"===e&&console.warn("ag-Grid: event virtualRowSelected is deprecated, to register for individual row\n selection events, add a listener directly to the row node."),this.rowRenderer.addRenderedRowListener(e,t,o)},e.prototype.setQuickFilter=function(e){this.filterManager.setQuickFilter(e)},e.prototype.selectIndex=function(e,t,o){console.warn("ag-Grid: do not use api for selection, call node.setSelected(value) instead"),o&&console.warn("ag-Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it"),this.selectionController.selectIndex(e,t)},e.prototype.deselectIndex=function(e,t){void 0===t&&(t=!1),console.warn("ag-Grid: do not use api for selection, call node.setSelected(value) instead"),t&&console.warn("ag-Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it"),this.selectionController.deselectIndex(e)},e.prototype.selectNode=function(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=!1),console.warn("ag-Grid: API for selection is deprecated, call node.setSelected(value) instead"),o&&console.warn("ag-Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it"),e.setSelectedParams({newValue:!0,clearSelection:!t})},e.prototype.deselectNode=function(e,t){void 0===t&&(t=!1),console.warn("ag-Grid: API for selection is deprecated, call node.setSelected(value) instead"),t&&console.warn("ag-Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it"),e.setSelectedParams({newValue:!1})},e.prototype.selectAll=function(){this.selectionController.selectAllRowNodes()},e.prototype.deselectAll=function(){this.selectionController.deselectAllRowNodes()},e.prototype.selectAllFiltered=function(){this.selectionController.selectAllRowNodes(!0)},e.prototype.deselectAllFiltered=function(){this.selectionController.deselectAllRowNodes(!0)},e.prototype.recomputeAggregates=function(){S._.missing(this.clientSideRowModel)&&console.warn("cannot call recomputeAggregates unless using normal row model"),console.warn("recomputeAggregates is deprecated, please call api.refreshClientSideRowModel('aggregate') instead"),this.clientSideRowModel.refreshModel({step:h.Constants.STEP_AGGREGATE})},e.prototype.sizeColumnsToFit=function(){this.gridPanel.sizeColumnsToFit()},e.prototype.showLoadingOverlay=function(){this.gridPanel.showLoadingOverlay()},e.prototype.showNoRowsOverlay=function(){this.gridPanel.showNoRowsOverlay()},e.prototype.hideOverlay=function(){this.gridPanel.hideOverlay()},e.prototype.isNodeSelected=function(e){return console.warn("ag-Grid: no need to call api.isNodeSelected(), just call node.isSelected() instead"),e.isSelected()},e.prototype.getSelectedNodesById=function(){return console.error("ag-Grid: since version 3.4, getSelectedNodesById no longer exists, use getSelectedNodes() instead"),null},e.prototype.getSelectedNodes=function(){return this.selectionController.getSelectedNodes()},e.prototype.getSelectedRows=function(){return this.selectionController.getSelectedRows()},e.prototype.getBestCostNodeSelection=function(){return this.selectionController.getBestCostNodeSelection()},e.prototype.getRenderedNodes=function(){return this.rowRenderer.getRenderedNodes()},e.prototype.ensureColIndexVisible=function(e){console.warn("ag-Grid: ensureColIndexVisible(index) no longer supported, use ensureColumnVisible(colKey) instead.")},e.prototype.ensureColumnVisible=function(e){this.gridPanel.ensureColumnVisible(e)},e.prototype.ensureIndexVisible=function(e,t){this.gridPanel.ensureIndexVisible(e,t)},e.prototype.ensureNodeVisible=function(e,t){this.gridCore.ensureNodeVisible(e,t)},e.prototype.forEachLeafNode=function(e){S._.missing(this.clientSideRowModel)&&console.warn("cannot call forEachNode unless using normal row model"),this.clientSideRowModel.forEachLeafNode(e)},e.prototype.forEachNode=function(e){this.rowModel.forEachNode(e)},e.prototype.forEachNodeAfterFilter=function(e){S._.missing(this.clientSideRowModel)&&console.warn("cannot call forEachNodeAfterFilter unless using normal row model"),this.clientSideRowModel.forEachNodeAfterFilter(e)},e.prototype.forEachNodeAfterFilterAndSort=function(e){S._.missing(this.clientSideRowModel)&&console.warn("cannot call forEachNodeAfterFilterAndSort unless using normal row model"),this.clientSideRowModel.forEachNodeAfterFilterAndSort(e)},e.prototype.getFilterApiForColDef=function(e){return console.warn("ag-grid API method getFilterApiForColDef deprecated, use getFilterApi instead"),this.getFilterInstance(e)},e.prototype.getFilterInstance=function(e){var t=this.columnController.getPrimaryColumn(e);if(t)return this.filterManager.getFilterComponent(t,"NO_UI").resolveNow(null,(function(e){return e}))},e.prototype.getFilterApi=function(e){return console.warn("ag-Grid: getFilterApi is deprecated, use getFilterInstance instead"),this.getFilterInstance(e)},e.prototype.destroyFilter=function(e){var t=this.columnController.getPrimaryColumn(e);if(t)return this.filterManager.destroyFilter(t,"filterDestroyed")},e.prototype.getStatusPanel=function(e){if(this.statusBarService)return this.statusBarService.getStatusPanel(e)},e.prototype.getColumnDef=function(e){var t=this.columnController.getPrimaryColumn(e);return t?t.getColDef():null},e.prototype.onFilterChanged=function(){this.filterManager.onFilterChanged()},e.prototype.onSortChanged=function(){this.sortController.onSortChanged()},e.prototype.setSortModel=function(e,t){void 0===t&&(t="api"),this.sortController.setSortModel(e,t)},e.prototype.getSortModel=function(){return this.sortController.getSortModel()},e.prototype.setFilterModel=function(e){this.filterManager.setFilterModel(e)},e.prototype.getFilterModel=function(){return this.filterManager.getFilterModel()},e.prototype.getFocusedCell=function(){return this.focusedCellController.getFocusedCell()},e.prototype.clearFocusedCell=function(){return this.focusedCellController.clearFocusedCell()},e.prototype.setFocusedCell=function(e,t,o){this.focusedCellController.setFocusedCell(e,t,o,!0)},e.prototype.setSuppressRowDrag=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_SUPPRESS_ROW_DRAG,e)},e.prototype.setHeaderHeight=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_HEADER_HEIGHT,e),this.doLayout()},e.prototype.setGridAutoHeight=function(e){console.warn("api.setGridAutoHeight(boolean) is deprecated, please use api.setDomLayout() instead"),this.setDomLayout(e?"autoHeight":"normal")},e.prototype.setDomLayout=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_DOM_LAYOUT,e)},e.prototype.setEnableCellTextSelection=function(e){this.gridPanel.setCellTextSelection(e)},e.prototype.setGroupHeaderHeight=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_GROUP_HEADER_HEIGHT,e),this.doLayout()},e.prototype.setFloatingFiltersHeight=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_FLOATING_FILTERS_HEIGHT,e),this.doLayout()},e.prototype.setPivotGroupHeaderHeight=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_PIVOT_GROUP_HEADER_HEIGHT,e),this.doLayout()},e.prototype.setPivotHeaderHeight=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_PIVOT_HEADER_HEIGHT,e),this.doLayout()},e.prototype.isSideBarVisible=function(){return this.gridCore.isSideBarVisible()},e.prototype.setSideBarVisible=function(e){this.gridCore.setSideBarVisible(e)},e.prototype.showToolPanel=function(e){console.warn("ag-grid: from v19 api.showToolPanel has been deprecated in favour of api.setSideBarVisible"),this.setSideBarVisible(e)},e.prototype.openToolPanel=function(e){this.gridCore.openToolPanel(e)},e.prototype.closeToolPanel=function(){this.gridCore.closeToolPanel()},e.prototype.getOpenedToolPanel=function(){return this.gridCore.getOpenedToolPanel()},e.prototype.getSideBar=function(){return this.gridCore.getSideBar()},e.prototype.setSideBar=function(e){return this.gridCore.setSideBar(e)},e.prototype.setSuppressClipboardPaste=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_SUPPRESS_CLIPBOARD_PASTE,e)},e.prototype.isToolPanelShowing=function(){return this.gridCore.isToolPanelShowing()},e.prototype.doLayout=function(){this.gridPanel.checkViewportAndScrolls()},e.prototype.resetRowHeights=function(){S._.exists(this.clientSideRowModel)&&this.clientSideRowModel.resetRowHeights()},e.prototype.setGroupRemoveSingleChildren=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_GROUP_REMOVE_SINGLE_CHILDREN,e)},e.prototype.setGroupRemoveLowestSingleChildren=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN,e)},e.prototype.onRowHeightChanged=function(){S._.exists(this.clientSideRowModel)&&this.clientSideRowModel.onRowHeightChanged()},e.prototype.getValue=function(e,t){var o=this.columnController.getPrimaryColumn(e);return S._.missing(o)&&(o=this.columnController.getGridColumn(e)),S._.missing(o)?null:this.valueService.getValue(o,t)},e.prototype.addEventListener=function(e,t){var o=this.gridOptionsWrapper.useAsyncEvents();this.eventService.addEventListener(e,t,o)},e.prototype.addGlobalListener=function(e){var t=this.gridOptionsWrapper.useAsyncEvents();this.eventService.addGlobalListener(e,t)},e.prototype.removeEventListener=function(e,t){var o=this.gridOptionsWrapper.useAsyncEvents();this.eventService.removeEventListener(e,t,o)},e.prototype.removeGlobalListener=function(e){var t=this.gridOptionsWrapper.useAsyncEvents();this.eventService.removeGlobalListener(e,t)},e.prototype.dispatchEvent=function(e){this.eventService.dispatchEvent(e)},e.prototype.destroy=function(){this.gridCore.destroy(),this.context.destroy()},e.prototype.resetQuickFilter=function(){this.rowModel.forEachNode((function(e){return e.quickFilterAggregateText=null}))},e.prototype.getRangeSelections=function(){return this.rangeController?this.rangeController.getCellRanges():(console.warn("ag-Grid: cell range selection is only available in ag-Grid Enterprise"),null)},e.prototype.camelCaseToHumanReadable=function(e){return S._.camelCaseToHumanText(e)},e.prototype.addRangeSelection=function(e){this.rangeController||console.warn("ag-Grid: cell range selection is only available in ag-Grid Enterprise"),this.rangeController.addRange(e)},e.prototype.clearRangeSelection=function(){this.rangeController||console.warn("ag-Grid: cell range selection is only available in ag-Grid Enterprise"),this.rangeController.clearSelection()},e.prototype.copySelectedRowsToClipboard=function(e,t){this.clipboardService||console.warn("ag-Grid: clipboard is only available in ag-Grid Enterprise"),this.clipboardService.copySelectedRowsToClipboard(e,t)},e.prototype.copySelectedRangeToClipboard=function(e){this.clipboardService||console.warn("ag-Grid: clipboard is only available in ag-Grid Enterprise"),this.clipboardService.copySelectedRangeToClipboard(e)},e.prototype.copySelectedRangeDown=function(){this.clipboardService||console.warn("ag-Grid: clipboard is only available in ag-Grid Enterprise"),this.clipboardService.copyRangeDown()},e.prototype.showColumnMenuAfterButtonClick=function(e,t){var o=this.columnController.getPrimaryColumn(e);this.menuFactory.showMenuAfterButtonClick(o,t)},e.prototype.showColumnMenuAfterMouseClick=function(e,t){var o=this.columnController.getPrimaryColumn(e);this.menuFactory.showMenuAfterMouseEvent(o,t)},e.prototype.hidePopupMenu=function(){this.contextMenuFactory&&this.contextMenuFactory.hideActiveMenu(),this.menuFactory.hideActiveMenu()},e.prototype.setPopupParent=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_POPUP_PARENT,e)},e.prototype.tabToNextCell=function(){return this.rowRenderer.tabToNextCell(!1)},e.prototype.tabToPreviousCell=function(){return this.rowRenderer.tabToNextCell(!0)},e.prototype.getCellRendererInstances=function(e){return void 0===e&&(e={}),this.rowRenderer.getCellRendererInstances(e)},e.prototype.getCellEditorInstances=function(e){return void 0===e&&(e={}),this.rowRenderer.getCellEditorInstances(e)},e.prototype.getEditingCells=function(){return this.rowRenderer.getEditingCells()},e.prototype.stopEditing=function(e){void 0===e&&(e=!1),this.rowRenderer.stopEditing(e)},e.prototype.startEditingCell=function(e){var t=this.columnController.getGridColumn(e.colKey);if(t){var o={rowIndex:e.rowIndex,floating:e.rowPinned,column:t},r=new y.GridCell(o);S._.missing(e.rowPinned)&&this.gridPanel.ensureIndexVisible(e.rowIndex),this.rowRenderer.startEditingCell(r,e.keyPress,e.charPress)}else console.warn("ag-Grid: no column found for "+e.colKey)},e.prototype.addAggFunc=function(e,t){this.aggFuncService&&this.aggFuncService.addAggFunc(e,t)},e.prototype.addAggFuncs=function(e){this.aggFuncService&&this.aggFuncService.addAggFuncs(e)},e.prototype.clearAggFuncs=function(){this.aggFuncService&&this.aggFuncService.clear()},e.prototype.updateRowData=function(e){var t=null;return this.clientSideRowModel?t=this.clientSideRowModel.updateRowData(e):this.infinitePageRowModel?this.infinitePageRowModel.updateRowData(e):console.error("ag-Grid: updateRowData() only works with ClientSideRowModel and InfiniteRowModel."),this.rowRenderer.refreshFullWidthRows(),this.gridOptionsWrapper.isSuppressChangeDetection()||this.rowRenderer.refreshCells(),t},e.prototype.batchUpdateRowData=function(e,t){this.clientSideRowModel?this.clientSideRowModel.batchUpdateRowData(e,t):console.error("ag-Grid: api.batchUpdateRowData() only works with ClientSideRowModel.")},e.prototype.insertItemsAtIndex=function(e,t,o){void 0===o&&(o=!1),console.warn("ag-Grid: insertItemsAtIndex() is deprecated, use updateRowData(transaction) instead."),this.updateRowData({add:t,addIndex:e,update:null,remove:null})},e.prototype.removeItems=function(e,t){void 0===t&&(t=!1),console.warn("ag-Grid: removeItems() is deprecated, use updateRowData(transaction) instead.");var o=e.map((function(e){return e.data}));this.updateRowData({add:null,addIndex:null,update:null,remove:o})},e.prototype.addItems=function(e,t){void 0===t&&(t=!1),console.warn("ag-Grid: addItems() is deprecated, use updateRowData(transaction) instead."),this.updateRowData({add:e,addIndex:null,update:null,remove:null})},e.prototype.refreshVirtualPageCache=function(){console.warn("ag-Grid: refreshVirtualPageCache() is now called refreshInfiniteCache(), please call refreshInfiniteCache() instead"),this.refreshInfiniteCache()},e.prototype.refreshInfinitePageCache=function(){console.warn("ag-Grid: refreshInfinitePageCache() is now called refreshInfiniteCache(), please call refreshInfiniteCache() instead"),this.refreshInfiniteCache()},e.prototype.refreshInfiniteCache=function(){this.infinitePageRowModel?this.infinitePageRowModel.refreshCache():console.warn("ag-Grid: api.refreshInfiniteCache is only available when rowModelType='infinite'.")},e.prototype.purgeVirtualPageCache=function(){console.warn("ag-Grid: purgeVirtualPageCache() is now called purgeInfiniteCache(), please call purgeInfiniteCache() instead"),this.purgeInfinitePageCache()},e.prototype.purgeInfinitePageCache=function(){console.warn("ag-Grid: purgeInfinitePageCache() is now called purgeInfiniteCache(), please call purgeInfiniteCache() instead"),this.purgeInfiniteCache()},e.prototype.purgeInfiniteCache=function(){this.infinitePageRowModel?this.infinitePageRowModel.purgeCache():console.warn("ag-Grid: api.purgeInfiniteCache is only available when rowModelType='infinite'.")},e.prototype.purgeEnterpriseCache=function(e){console.warn("ag-grid: since version 18.x, api.purgeEnterpriseCache() should be replaced with api.purgeServerSideCache()"),this.purgeServerSideCache(e)},e.prototype.purgeServerSideCache=function(e){this.serverSideRowModel?this.serverSideRowModel.purgeCache(e):console.warn("ag-Grid: api.purgeServerSideCache is only available when rowModelType='enterprise'.")},e.prototype.getVirtualRowCount=function(){return console.warn("ag-Grid: getVirtualRowCount() is now called getInfiniteRowCount(), please call getInfiniteRowCount() instead"),this.getInfiniteRowCount()},e.prototype.getInfiniteRowCount=function(){if(this.infinitePageRowModel)return this.infinitePageRowModel.getVirtualRowCount();console.warn("ag-Grid: api.getVirtualRowCount is only available when rowModelType='virtual'.")},e.prototype.isMaxRowFound=function(){if(this.infinitePageRowModel)return this.infinitePageRowModel.isMaxRowFound();console.warn("ag-Grid: api.isMaxRowFound is only available when rowModelType='virtual'.")},e.prototype.setVirtualRowCount=function(e,t){console.warn("ag-Grid: setVirtualRowCount() is now called setInfiniteRowCount(), please call setInfiniteRowCount() instead"),this.setInfiniteRowCount(e,t)},e.prototype.setInfiniteRowCount=function(e,t){this.infinitePageRowModel?this.infinitePageRowModel.setVirtualRowCount(e,t):console.warn("ag-Grid: api.setVirtualRowCount is only available when rowModelType='virtual'.")},e.prototype.getVirtualPageState=function(){return console.warn("ag-Grid: getVirtualPageState() is now called getCacheBlockState(), please call getCacheBlockState() instead"),this.getCacheBlockState()},e.prototype.getInfinitePageState=function(){return console.warn("ag-Grid: getInfinitePageState() is now called getCacheBlockState(), please call getCacheBlockState() instead"),this.getCacheBlockState()},e.prototype.getCacheBlockState=function(){return this.infinitePageRowModel?this.infinitePageRowModel.getBlockState():this.serverSideRowModel?this.serverSideRowModel.getBlockState():void console.warn("ag-Grid: api.getCacheBlockState() is only available when rowModelType='infinite' or rowModelType='serverSide'.")},e.prototype.checkGridSize=function(){this.gridPanel.setHeaderAndFloatingHeights()},e.prototype.getFirstRenderedRow=function(){return console.warn("in ag-Grid v12, getFirstRenderedRow() was renamed to getFirstDisplayedRow()"),this.getFirstDisplayedRow()},e.prototype.getFirstDisplayedRow=function(){return this.rowRenderer.getFirstVirtualRenderedRow()},e.prototype.getLastRenderedRow=function(){return console.warn("in ag-Grid v12, getLastRenderedRow() was renamed to getLastDisplayedRow()"),this.getLastDisplayedRow()},e.prototype.getLastDisplayedRow=function(){return this.rowRenderer.getLastVirtualRenderedRow()},e.prototype.getDisplayedRowAtIndex=function(e){return this.rowModel.getRow(e)},e.prototype.getDisplayedRowCount=function(){return this.rowModel.getRowCount()},e.prototype.paginationIsLastPageFound=function(){return this.paginationProxy.isLastPageFound()},e.prototype.paginationGetPageSize=function(){return this.paginationProxy.getPageSize()},e.prototype.paginationSetPageSize=function(e){this.gridOptionsWrapper.setProperty("paginationPageSize",e)},e.prototype.paginationGetCurrentPage=function(){return this.paginationProxy.getCurrentPage()},e.prototype.paginationGetTotalPages=function(){return this.paginationProxy.getTotalPages()},e.prototype.paginationGetRowCount=function(){return this.paginationProxy.getTotalRowCount()},e.prototype.paginationGoToNextPage=function(){this.paginationProxy.goToNextPage()},e.prototype.paginationGoToPreviousPage=function(){this.paginationProxy.goToPreviousPage()},e.prototype.paginationGoToFirstPage=function(){this.paginationProxy.goToFirstPage()},e.prototype.paginationGoToLastPage=function(){this.paginationProxy.goToLastPage()},e.prototype.paginationGoToPage=function(e){this.paginationProxy.goToPage(e)},r([f.Autowired("immutableService"),i("design:type",w.ImmutableService)],e.prototype,"immutableService",void 0),r([f.Autowired("csvCreator"),i("design:type",n.CsvCreator)],e.prototype,"csvCreator",void 0),r([f.Optional("excelCreator"),i("design:type",Object)],e.prototype,"excelCreator",void 0),r([f.Autowired("rowRenderer"),i("design:type",s.RowRenderer)],e.prototype,"rowRenderer",void 0),r([f.Autowired("filterManager"),i("design:type",a.FilterManager)],e.prototype,"filterManager",void 0),r([f.Autowired("columnController"),i("design:type",l.ColumnController)],e.prototype,"columnController",void 0),r([f.Autowired("selectionController"),i("design:type",p.SelectionController)],e.prototype,"selectionController",void 0),r([f.Autowired("gridOptionsWrapper"),i("design:type",u.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([f.Autowired("valueService"),i("design:type",c.ValueService)],e.prototype,"valueService",void 0),r([f.Autowired("alignedGridsService"),i("design:type",_.AlignedGridsService)],e.prototype,"alignedGridsService",void 0),r([f.Autowired("eventService"),i("design:type",d.EventService)],e.prototype,"eventService",void 0),r([f.Autowired("pinnedRowModel"),i("design:type",b.PinnedRowModel)],e.prototype,"pinnedRowModel",void 0),r([f.Autowired("context"),i("design:type",f.Context)],e.prototype,"context",void 0),r([f.Autowired("rowModel"),i("design:type",Object)],e.prototype,"rowModel",void 0),r([f.Autowired("sortController"),i("design:type",g.SortController)],e.prototype,"sortController",void 0),r([f.Autowired("paginationProxy"),i("design:type",C.PaginationProxy)],e.prototype,"paginationProxy",void 0),r([f.Autowired("focusedCellController"),i("design:type",m.FocusedCellController)],e.prototype,"focusedCellController",void 0),r([f.Optional("rangeController"),i("design:type",Object)],e.prototype,"rangeController",void 0),r([f.Optional("clipboardService"),i("design:type",Object)],e.prototype,"clipboardService",void 0),r([f.Optional("aggFuncService"),i("design:type",Object)],e.prototype,"aggFuncService",void 0),r([f.Autowired("menuFactory"),i("design:type",Object)],e.prototype,"menuFactory",void 0),r([f.Optional("contextMenuFactory"),i("design:type",Object)],e.prototype,"contextMenuFactory",void 0),r([f.Autowired("cellRendererFactory"),i("design:type",v.CellRendererFactory)],e.prototype,"cellRendererFactory",void 0),r([f.Autowired("valueCache"),i("design:type",E.ValueCache)],e.prototype,"valueCache",void 0),r([f.Optional("sideBarComp"),i("design:type",Object)],e.prototype,"sideBarComp",void 0),r([f.Autowired("animationFrameService"),i("design:type",R.AnimationFrameService)],e.prototype,"animationFrameService",void 0),r([f.Optional("statusBarService"),i("design:type",Object)],e.prototype,"statusBarService",void 0),r([f.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),r([f.Bean("gridApi")],e)}();t.GridApi=O},41451:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(8534),l=o(60843),p=o(85786),u=o(72493),c=o(44081),d=o(13887),h=o(54828),f=o(44871),g=o(40797),m=o(83423),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.registerGridComp=function(e){this.gridPanel=e,this.addDestroyableEventListener(this.eventService,p.Events.EVENT_BODY_HEIGHT_CHANGED,this.onBodyHeightChanged.bind(this)),this.addDestroyableEventListener(this.eventService,p.Events.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.checkPageSize()},t.prototype.notActive=function(){return!this.gridOptionsWrapper.isPaginationAutoPageSize()},t.prototype.onScrollVisibilityChanged=function(){this.checkPageSize()},t.prototype.onBodyHeightChanged=function(){this.checkPageSize()},t.prototype.checkPageSize=function(){if(!this.notActive()){var e=this.gridOptionsWrapper.getRowHeightAsNumber(),t=this.gridPanel.getBodyHeight();if(t>0){var o=Math.floor(t/e);this.gridOptionsWrapper.setProperty("paginationPageSize",o)}}},n([u.Autowired("eventService"),s("design:type",l.EventService)],t.prototype,"eventService",void 0),n([u.Autowired("gridOptionsWrapper"),s("design:type",c.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([u.Autowired("scrollVisibleService"),s("design:type",d.ScrollVisibleService)],t.prototype,"scrollVisibleService",void 0),n([u.Bean("paginationAutoPageSizeService")],t)}(a.BeanStub);t.PaginationAutoPageSizeService=y;var v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.currentPage=0,t.topRowIndex=0,t.bottomRowIndex=0,t.pixelOffset=0,t}return i(t,e),t.prototype.postConstruct=function(){this.active=this.gridOptionsWrapper.isPagination(),this.addDestroyableEventListener(this.eventService,p.Events.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,"paginationPageSize",this.onModelUpdated.bind(this)),this.onModelUpdated()},t.prototype.ensureRowHeightsValid=function(e,t,o,r){var i=this.rowModel.ensureRowHeightsValid(e,t,this.getPageFirstRow(),this.getPageLastRow());return i&&this.setIndexesAndBounds(),i},t.prototype.isLastRowFound=function(){return this.rowModel.isLastRowFound()},t.prototype.onModelUpdated=function(e){this.setIndexesAndBounds();var t={type:p.Events.EVENT_PAGINATION_CHANGED,animate:!!e&&e.animate,newData:!!e&&e.newData,newPage:!!e&&e.newPage,keepRenderedRows:!!e&&e.keepRenderedRows,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)},t.prototype.goToPage=function(e){if(this.active&&this.currentPage!==e){this.currentPage=e;var t={type:p.Events.EVENT_MODEL_UPDATED,animate:!1,keepRenderedRows:!1,newData:!1,newPage:!0,api:this.gridApi,columnApi:this.columnApi};this.onModelUpdated(t)}},t.prototype.getPixelOffset=function(){return this.pixelOffset},t.prototype.getRow=function(e){return this.rowModel.getRow(e)},t.prototype.getRowNode=function(e){return this.rowModel.getRowNode(e)},t.prototype.getRowIndexAtPixel=function(e){return this.rowModel.getRowIndexAtPixel(e)},t.prototype.getCurrentPageHeight=function(){return m._.missing(this.topRowBounds)||m._.missing(this.bottomRowBounds)?0:this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop},t.prototype.isRowPresent=function(e){return!!this.rowModel.isRowPresent(e)&&e.rowIndex>=this.topRowIndex&&e.rowIndex<=this.bottomRowIndex},t.prototype.isEmpty=function(){return this.rowModel.isEmpty()},t.prototype.isRowsToRender=function(){return this.rowModel.isRowsToRender()},t.prototype.getNodesInRangeForSelection=function(e,t){return this.rowModel.getNodesInRangeForSelection(e,t)},t.prototype.forEachNode=function(e){return this.rowModel.forEachNode(e)},t.prototype.getType=function(){return this.rowModel.getType()},t.prototype.getRowBounds=function(e){return this.rowModel.getRowBounds(e)},t.prototype.getPageFirstRow=function(){return this.pageSize*this.currentPage},t.prototype.getPageLastRow=function(){var e=this.pageSize*(this.currentPage+1)-1,t=this.rowModel.getPageLastRow();return t>e?e:t},t.prototype.getRowCount=function(){return this.rowModel.getRowCount()},t.prototype.goToPageWithIndex=function(e){if(this.active){var t=Math.floor(e/this.pageSize);this.goToPage(t)}},t.prototype.getTotalRowCount=function(){return this.rowModel.getPageLastRow()+1},t.prototype.isLastPageFound=function(){return this.rowModel.isLastRowFound()},t.prototype.getCurrentPage=function(){return this.currentPage},t.prototype.goToNextPage=function(){this.goToPage(this.currentPage+1)},t.prototype.goToPreviousPage=function(){this.goToPage(this.currentPage-1)},t.prototype.goToFirstPage=function(){this.goToPage(0)},t.prototype.goToLastPage=function(){var e=this.rowModel.getPageLastRow()+1,t=Math.floor(e/this.pageSize);this.goToPage(t)},t.prototype.getPageSize=function(){return this.pageSize},t.prototype.getTotalPages=function(){return this.totalPages},t.prototype.setPageSize=function(){this.pageSize=this.gridOptionsWrapper.getPaginationPageSize(),this.pageSize>=1||(this.pageSize=100)},t.prototype.setIndexesAndBounds=function(){if(this.active){this.setPageSize();var e=this.getTotalRowCount();this.totalPages=Math.floor((e-1)/this.pageSize)+1,this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!m._.isNumeric(this.currentPage)||this.currentPage<0)&&(this.currentPage=0),this.topRowIndex=this.pageSize*this.currentPage,this.bottomRowIndex=this.pageSize*(this.currentPage+1)-1;var t=this.rowModel.getPageLastRow();this.bottomRowIndex>t&&(this.bottomRowIndex=t)}else this.pageSize=this.rowModel.getPageLastRow()+1,this.totalPages=1,this.currentPage=0,this.topRowIndex=0,this.bottomRowIndex=this.rowModel.getPageLastRow();this.topRowBounds=this.rowModel.getRowBounds(this.topRowIndex),this.bottomRowBounds=this.rowModel.getRowBounds(this.bottomRowIndex),this.pixelOffset=m._.exists(this.topRowBounds)?this.topRowBounds.rowTop:0},n([u.Autowired("rowModel"),s("design:type",Object)],t.prototype,"rowModel",void 0),n([u.Autowired("eventService"),s("design:type",l.EventService)],t.prototype,"eventService",void 0),n([u.Autowired("gridOptionsWrapper"),s("design:type",c.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([u.Autowired("selectionController"),s("design:type",h.SelectionController)],t.prototype,"selectionController",void 0),n([u.Autowired("columnApi"),s("design:type",f.ColumnApi)],t.prototype,"columnApi",void 0),n([u.Autowired("gridApi"),s("design:type",g.GridApi)],t.prototype,"gridApi",void 0),n([u.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),n([u.Bean("paginationProxy")],t)}(a.BeanStub);t.PaginationProxy=v},41832:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(10042),s=o(72493),a=o(44081),l=o(78481),p=function(){function e(){}return e.prototype.registerGridComp=function(e){this.gridPanel=e},e.prototype.registerHeaderRootComp=function(e){this.headerRootComp=e},e.prototype.getPreferredWidthForColumn=function(e){var t=this.getHeaderCellForColumn(e);if(!t)return-1;var o=document.createElement("span");o.style.position="fixed";var r=this.gridPanel.getCenterContainer();r.appendChild(o),this.putRowCellsIntoDummyContainer(e,o),this.cloneItemIntoDummy(t,o);var i=o.offsetWidth;return r.removeChild(o),i+this.gridOptionsWrapper.getAutoSizePadding()},e.prototype.getHeaderCellForColumn=function(e){var t=null;return this.headerRootComp.forEachHeaderElement((function(o){if(o instanceof l.HeaderWrapperComp){var r=o;r.getColumn()===e&&(t=r)}})),t?t.getGui():null},e.prototype.putRowCellsIntoDummyContainer=function(e,t){var o=this;this.rowRenderer.getAllCellsForColumn(e).forEach((function(e){return o.cloneItemIntoDummy(e,t)}))},e.prototype.cloneItemIntoDummy=function(e,t){var o=e.cloneNode(!0);o.style.width="",o.style.position="static",o.style.left="";var r=document.createElement("div");r.style.display="table-row",r.appendChild(o),t.appendChild(r)},r([s.Autowired("rowRenderer"),i("design:type",n.RowRenderer)],e.prototype,"rowRenderer",void 0),r([s.Autowired("gridOptionsWrapper"),i("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([s.Bean("autoWidthCalculator")],e)}();t.AutoWidthCalculator=p},42195:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(60843),a=o(85786),l=o(44081),p=o(44871),u=o(98239),c=o(34782),d=o(40797),h=o(23054),f=o(83423),g=function(){function e(){}return e.prototype.init=function(){this.eventService.addEventListener(a.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.clearFocusedCell.bind(this)),this.eventService.addEventListener(a.Events.EVENT_COLUMN_EVERYTHING_CHANGED,this.clearFocusedCell.bind(this)),this.eventService.addEventListener(a.Events.EVENT_COLUMN_GROUP_OPENED,this.clearFocusedCell.bind(this)),this.eventService.addEventListener(a.Events.EVENT_COLUMN_MOVED,this.clearFocusedCell.bind(this)),this.eventService.addEventListener(a.Events.EVENT_COLUMN_PINNED,this.clearFocusedCell.bind(this)),this.eventService.addEventListener(a.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,this.clearFocusedCell.bind(this)),this.eventService.addEventListener(a.Events.EVENT_COLUMN_VISIBLE,this.clearFocusedCell.bind(this))},e.prototype.clearFocusedCell=function(){this.focusedCell=null,this.onCellFocused(!1)},e.prototype.getFocusedCell=function(){return this.focusedCell},e.prototype.getFocusCellToUseAfterRefresh=function(){return this.gridOptionsWrapper.isSuppressFocusAfterRefresh()?null:this.focusedCell&&this.getGridCellForDomElement(document.activeElement)?this.focusedCell:null},e.prototype.getGridCellForDomElement=function(e){for(var t=e;t;){var o=this.gridOptionsWrapper.getDomData(t,h.CellComp.DOM_DATA_KEY_CELL_COMP);if(o)return o.getGridCell();t=t.parentNode}return null},e.prototype.setFocusedCell=function(e,t,o,r){void 0===r&&(r=!1);var i=f._.makeNull(this.columnController.getGridColumn(t));this.focusedCell=new c.GridCell({rowIndex:e,floating:f._.makeNull(o),column:i}),this.onCellFocused(r)},e.prototype.isCellFocused=function(e){return!f._.missing(this.focusedCell)&&this.focusedCell.column===e.column&&this.isRowFocused(e.rowIndex,e.floating)},e.prototype.isRowNodeFocused=function(e){return this.isRowFocused(e.rowIndex,e.rowPinned)},e.prototype.isAnyCellFocused=function(){return!!this.focusedCell},e.prototype.isRowFocused=function(e,t){if(f._.missing(this.focusedCell))return!1;var o=f._.makeNull(t);return this.focusedCell.rowIndex===e&&this.focusedCell.floating===o},e.prototype.onCellFocused=function(e){var t={type:a.Events.EVENT_CELL_FOCUSED,forceBrowserFocus:e,rowIndex:null,column:null,floating:null,api:this.gridApi,columnApi:this.columnApi,rowPinned:null};this.focusedCell&&(t.rowIndex=this.focusedCell.rowIndex,t.column=this.focusedCell.column,t.rowPinned=this.focusedCell.floating),this.eventService.dispatchEvent(t)},r([n.Autowired("eventService"),i("design:type",s.EventService)],e.prototype,"eventService",void 0),r([n.Autowired("gridOptionsWrapper"),i("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.Autowired("columnController"),i("design:type",u.ColumnController)],e.prototype,"columnController",void 0),r([n.Autowired("columnApi"),i("design:type",p.ColumnApi)],e.prototype,"columnApi",void 0),r([n.Autowired("gridApi"),i("design:type",d.GridApi)],e.prototype,"gridApi",void 0),r([n.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),r([n.Bean("focusedCellController")],e)}();t.FocusedCellController=g},42664:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(98239),a=o(45727),l=o(54828),p=o(44081),u=o(31887),c=o(7897),d=o(12598),h=o(74517),f=o(50580),g=o(83423),m=function(){function e(e){var t=e.columnController,o=e.valueService,r=e.gridOptionsWrapper,i=e.processCellCallback,n=e.processHeaderCallback,s=e.cellAndHeaderEscaper;this.columnController=t,this.valueService=o,this.gridOptionsWrapper=r,this.processCellCallback=i,this.processHeaderCallback=n,this.cellAndHeaderEscaper=s}return e.prototype.extractHeaderValue=function(e){var t=this.getHeaderName(this.processHeaderCallback,e);return null==t&&(t=""),this.cellAndHeaderEscaper?this.cellAndHeaderEscaper(t):t},e.prototype.extractRowCellValue=function(e,t,o,r){var i,n=this.columnController.getRowGroupColumns().length>0;return i=r&&r.group&&n&&0===t?this.createValueForGroupNode(r):this.valueService.getValue(e,r),null==(i=this.processCell(r,e,i,this.processCellCallback,o))&&(i=""),this.cellAndHeaderEscaper?this.cellAndHeaderEscaper(i):i},e.prototype.getHeaderName=function(e,t){return e?e({column:t,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()}):this.columnController.getDisplayNameForColumn(t,"csv",!0)},e.prototype.createValueForGroupNode=function(e){for(var t=[e.key];e.parent;)e=e.parent,t.push(e.key);return t.reverse().join(" -> ")},e.prototype.processCell=function(e,t,o,r,i){return r?r({column:t,node:e,value:o,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext(),type:i}):o},e}();t.BaseGridSerializingSession=m;var y,v=function(){function e(){}return e.prototype.serialize=function(e,t){var o=t&&t.skipGroups,r=t&&t.skipHeader,i=t&&t.columnGroups,n=t&&t.skipFooters,s=t&&t.skipPinnedTop,l=t&&t.skipPinnedBottom,p=t&&t.customHeader,u=t&&t.customFooter,c=t&&t.allColumns,h=t&&t.onlySelected,f=t&&t.columnKeys,m=t&&t.onlySelectedAllPages,y=t&&t.shouldRowBeSkipped||function(){return!1},v=this.gridOptionsWrapper.getApi(),C=this.gridOptionsWrapper.isGroupRemoveSingleChildren(),w=this.gridOptionsWrapper.isGroupRemoveLowestSingleChildren(),E=this.gridOptionsWrapper.getContext(),_=this.columnController.isPivotMode(),b=this.rowModel.getType()===a.Constants.ROW_MODEL_TYPE_CLIENT_SIDE,R=!b&&h,S=[];if(S=g._.existsAndNotEmpty(f)?this.columnController.getGridColumns(f):c&&!_?(S=this.gridOptionsWrapper.isTreeData()?this.columnController.getGridColumns([a.Constants.GROUP_AUTO_COLUMN_ID]):[]).concat(this.columnController.getAllPrimaryColumns()||[]):this.columnController.getAllDisplayedColumns(),p&&e.addCustomHeader(p),e.prepare(S),i){var O=new d.GroupInstanceIdCreator,T=this.displayedGroupCreator.createDisplayedGroups(S,this.columnController.getGridBalancedTree(),O,null);this.recursivelyAddHeaderGroups(T,e)}if(!r){var A=e.onNewHeaderRow();S.forEach((function(e,t){A.onColumn(e,t,void 0)}))}function P(t){var r=w&&t.leafGroup,i=1===t.allChildrenCount&&(C||r);if((!t.group||!o&&!i)&&(!n||!t.footer)&&(!h||t.isSelected())&&(!s||"top"!==t.rowPinned)&&(!l||"bottom"!==t.rowPinned)&&(-1!==t.level||t.leafGroup)&&!y({node:t,api:v,context:E})){var a=e.onNewBodyRow();S.forEach((function(e,o){a.onColumn(e,o,t)}))}}return this.pinnedRowModel.forEachPinnedTopRow(P),_?this.rowModel.forEachPivotNode?this.rowModel.forEachPivotNode(P):this.rowModel.forEachNode(P):m||R?this.selectionController.getSelectedNodes().forEach((function(e){P(e)})):b?this.rowModel.forEachNodeAfterFilterAndSort(P):this.rowModel.forEachNode(P),this.pinnedRowModel.forEachPinnedBottomRow(P),u&&e.addCustomFooter(u),e.parse()},e.prototype.recursivelyAddHeaderGroups=function(e,t){var o=[];e.forEach((function(e){var t=e;t.getChildren&&t.getChildren().forEach((function(e){return o.push(e)}))})),e.length>0&&e[0]instanceof h.ColumnGroup&&this.doAddHeaderHeader(t,e),o&&o.length>0&&this.recursivelyAddHeaderGroups(o,t)},e.prototype.doAddHeaderHeader=function(e,t){var o=this,r=e.onNewHeaderGroupingRow(),i=0;t.forEach((function(e){var t=e,n=o.columnController.getDisplayNameForColumnGroup(t,"header");r.onColumn(n||"",i++,t.getLeafColumns().length-1)}))},r([n.Autowired("displayedGroupCreator"),i("design:type",u.DisplayedGroupCreator)],e.prototype,"displayedGroupCreator",void 0),r([n.Autowired("columnController"),i("design:type",s.ColumnController)],e.prototype,"columnController",void 0),r([n.Autowired("rowModel"),i("design:type",Object)],e.prototype,"rowModel",void 0),r([n.Autowired("pinnedRowModel"),i("design:type",f.PinnedRowModel)],e.prototype,"pinnedRowModel",void 0),r([n.Autowired("selectionController"),i("design:type",l.SelectionController)],e.prototype,"selectionController",void 0),r([n.Autowired("columnFactory"),i("design:type",c.ColumnFactory)],e.prototype,"columnFactory",void 0),r([n.Autowired("gridOptionsWrapper"),i("design:type",p.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.Bean("gridSerializer")],e)}();t.GridSerializer=v,(y=t.RowType||(t.RowType={}))[y.HEADER_GROUPING=0]="HEADER_GROUPING",y[y.HEADER=1]="HEADER",y[y.BODY=2]="BODY"},42726:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(55e3),a=o(73575),l=o(44081),p=o(60843),u=o(83423),c=function(){function e(){}return e.prototype.hideActiveMenu=function(){this.hidePopup&&this.hidePopup()},e.prototype.showMenuAfterMouseEvent=function(e,t){var o=this;this.showPopup(e,(function(r){o.popupService.positionPopupUnderMouseEvent({column:e,type:"columnMenu",mouseEvent:t,ePopup:r})}))},e.prototype.showMenuAfterButtonClick=function(e,t){var o=this;this.showPopup(e,(function(r){o.popupService.positionPopupUnderComponent({type:"columnMenu",eventSource:t,ePopup:r,keepWithinBounds:!0,column:e})}))},e.prototype.showPopup=function(e,t){var o,r=this,i=this.filterManager.getOrCreateFilterWrapper(e,"COLUMN_MENU"),n=document.createElement("div");u._.addCssClass(n,"ag-menu"),i.guiPromise.promise.then((function(e){n.appendChild(e)}));var s=function(e){"horizontal"===e.direction&&o()};this.eventService.addEventListener("bodyScroll",s),o=this.popupService.addAsModalPopup(n,!0,(function(){r.eventService.removeEventListener("bodyScroll",s),e.setMenuVisible(!1,"contextMenu")})),t(n),i.filterPromise.then((function(e){if(e.afterGuiAttached){var t={hidePopup:o};e.afterGuiAttached(t)}})),this.hidePopup=o,e.setMenuVisible(!0,"contextMenu")},e.prototype.isMenuEnabled=function(e){return e.isFilterAllowed()},r([n.Autowired("eventService"),i("design:type",p.EventService)],e.prototype,"eventService",void 0),r([n.Autowired("filterManager"),i("design:type",s.FilterManager)],e.prototype,"filterManager",void 0),r([n.Autowired("popupService"),i("design:type",a.PopupService)],e.prototype,"popupService",void 0),r([n.Autowired("gridOptionsWrapper"),i("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.Bean("menuFactory")],e)}();t.StandardMenuFactory=c},43389:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.IdentityCheck="IdentityCheck",e.DeepValueCheck="DeepValueCheck",e.NoCheck="NoCheck"}(o=t.ChangeDetectionStrategyType||(t.ChangeDetectionStrategyType={}));var r=function(){function e(){var e;this.strategyMap=((e={})[o.DeepValueCheck]=new n,e[o.IdentityCheck]=new i((function(e,t){return e===t})),e[o.NoCheck]=new i((function(e,t){return!0})),e)}return e.prototype.getStrategy=function(e){return this.strategyMap[e]},e}();t.ChangeDetectionService=r;var i=function(){function e(e){this.strategy=e}return e.prototype.areEqual=function(e,t){return this.strategy(e,t)},e}(),n=function(){function e(){}return e.prototype.areEqual=function(t,o){return e.areEquivalent(e.copy(t),e.copy(o))},e.unwrapStringOrNumber=function(e){return e instanceof Number||e instanceof String?e.valueOf():e},e.copy=function(e){if(!e)return e;if(Array.isArray(e)){for(var t=[],o=0;o<e.length;o++)t.push(this.copy(e[o]));return t}return"object"!=typeof e?e:[{},e].reduce((function(e,t){return Object.keys(t).forEach((function(o){e[o]=t[o]})),e}),{})},e.areEquivalent=function(t,o){if(t=e.unwrapStringOrNumber(t),o=e.unwrapStringOrNumber(o),t===o)return!0;if(null===t||null===o||typeof t!=typeof o)return!1;if(t instanceof Date)return o instanceof Date&&t.valueOf()===o.valueOf();if("function"==typeof t)return t.toString()===o.toString();if("object"!=typeof t)return t==o;var r=void 0===t.areEquivPropertyTracking,i=void 0===o.areEquivPropertyTracking;try{var n=void 0;if(r)t.areEquivPropertyTracking=[];else if(t.areEquivPropertyTracking.some((function(e){return e===o})))return!0;if(i)o.areEquivPropertyTracking=[];else if(o.areEquivPropertyTracking.some((function(e){return e===t})))return!0;t.areEquivPropertyTracking.push(o),o.areEquivPropertyTracking.push(t);var s={};for(n in t)"areEquivPropertyTracking"!=n&&(s[n]=null);for(n in o)"areEquivPropertyTracking"!=n&&(s[n]=null);for(n in s)if(!this.areEquivalent(t[n],o[n]))return!1;return!0}finally{r&&delete t.areEquivPropertyTracking,i&&delete o.areEquivPropertyTracking}},e}()},43460:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(72493),l=o(42664),p=o(33467),u=o(98239),c=o(24463),d=o(44081),h=o(45727),f=o(83423),g="\r\n",m=function(e){function t(t){var o=e.call(this,{columnController:t.columnController,valueService:t.valueService,gridOptionsWrapper:t.gridOptionsWrapper,processCellCallback:t.processCellCallback,processHeaderCallback:t.processHeaderCallback})||this;o.result="",o.lineOpened=!1;var r=t.suppressQuotes,i=t.columnSeparator;return o.suppressQuotes=r,o.columnSeparator=i,o}return i(t,e),t.prototype.prepare=function(e){},t.prototype.addCustomHeader=function(e){e&&(this.result+=e+g)},t.prototype.addCustomFooter=function(e){e&&(this.result+=e+g)},t.prototype.onNewHeaderGroupingRow=function(){return this.lineOpened&&(this.result+=g),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}},t.prototype.onNewHeaderGroupingRowColumn=function(e,t,o){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(e,this.suppressQuotes);for(var r=1;r<=o;r++)this.result+=this.columnSeparator+this.putInQuotes("",this.suppressQuotes);this.lineOpened=!0},t.prototype.onNewHeaderRow=function(){return this.lineOpened&&(this.result+=g),{onColumn:this.onNewHeaderRowColumn.bind(this)}},t.prototype.onNewHeaderRowColumn=function(e,t,o){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e),this.suppressQuotes),this.lineOpened=!0},t.prototype.onNewBodyRow=function(){return this.lineOpened&&(this.result+=g),{onColumn:this.onNewBodyRowColumn.bind(this)}},t.prototype.onNewBodyRowColumn=function(e,t,o){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractRowCellValue(e,t,h.Constants.EXPORT_TYPE_CSV,o),this.suppressQuotes),this.lineOpened=!0},t.prototype.putInQuotes=function(e,t){return t?e:null==e?'""':("string"==typeof e?o=e:"function"==typeof e.toString?o=e.toString():(console.warn("unknown value type during csv conversion"),o=""),'"'+o.replace(/"/g,'""')+'"');var o},t.prototype.parse=function(){return this.result},t}(l.BaseGridSerializingSession);t.CsvSerializingSession=m;var y=function(){function e(){}return e.prototype.setBeans=function(e){this.beans=e},e.prototype.export=function(e){if(this.isExportSuppressed())return console.warn("ag-grid: Export cancelled. Export is not allowed as per your configuration."),"";var t=this.getMergedParamsAndData(e),o=t.mergedParams,r=t.data,i=o&&o.fileName&&0!==o.fileName.length?o.fileName:this.getDefaultFileName();return-1===i.indexOf(".")&&(i=i+"."+this.getDefaultFileExtension()),this.beans.downloader.download(i,this.packageFile(r)),r},e.prototype.getData=function(e){return this.getMergedParamsAndData(e).data},e.prototype.getMergedParamsAndData=function(e){var t=this.mergeDefaultParams(e);return{mergedParams:t,data:this.beans.gridSerializer.serialize(this.createSerializingSession(t),t)}},e.prototype.mergeDefaultParams=function(e){var t=this.beans.gridOptionsWrapper.getDefaultExportParams(),o={};return f._.assign(o,t),f._.assign(o,e),o},e.prototype.packageFile=function(e){return new Blob(["\ufeff",e],{type:window.navigator.msSaveOrOpenBlob?this.getMimeType():"octet/stream"})},e}();t.BaseCreator=y;var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.postConstruct=function(){this.setBeans({downloader:this.downloader,gridSerializer:this.gridSerializer,gridOptionsWrapper:this.gridOptionsWrapper})},t.prototype.exportDataAsCsv=function(e){return this.export(e)},t.prototype.getDataAsCsv=function(e){return this.getData(e)},t.prototype.getMimeType=function(){return"text/csv;charset=utf-8;"},t.prototype.getDefaultFileName=function(){return"export.csv"},t.prototype.getDefaultFileExtension=function(){return"csv"},t.prototype.createSerializingSession=function(e){var t=this,o=t.columnController,r=t.valueService,i=t.gridOptionsWrapper,n=e,s=n.processCellCallback,a=n.processHeaderCallback,l=n.suppressQuotes,p=n.columnSeparator;return new m({columnController:o,valueService:r,gridOptionsWrapper:i,processCellCallback:s||void 0,processHeaderCallback:a||void 0,suppressQuotes:l||!1,columnSeparator:p||","})},t.prototype.isExportSuppressed=function(){return this.gridOptionsWrapper.isSuppressCsvExport()},n([a.Autowired("columnController"),s("design:type",u.ColumnController)],t.prototype,"columnController",void 0),n([a.Autowired("valueService"),s("design:type",c.ValueService)],t.prototype,"valueService",void 0),n([a.Autowired("downloader"),s("design:type",p.Downloader)],t.prototype,"downloader",void 0),n([a.Autowired("gridSerializer"),s("design:type",l.GridSerializer)],t.prototype,"gridSerializer",void 0),n([a.Autowired("gridOptionsWrapper"),s("design:type",d.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([a.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),n([a.Bean("csvCreator")],t)}(y);t.CsvCreator=v},43878:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(26016),a=o(44081),l=o(98239),p=o(7897),u=o(45727),c=o(83423),d=function(){function e(){}var t;return t=e,e.prototype.createAutoGroupColumns=function(e){var t=this,o=[],r=this.gridOptionsWrapper.isTreeData(),i=this.gridOptionsWrapper.isGroupMultiAutoColumn();return r&&i&&(console.warn("ag-Grid: you cannot mix groupMultiAutoColumn with treeData, only one column can be used to display groups when doing tree data"),i=!1),i?e.forEach((function(e,r){o.push(t.createOneAutoGroupColumn(e,r))})):o.push(this.createOneAutoGroupColumn()),o},e.prototype.createOneAutoGroupColumn=function(e,o){var r,i=this.generateDefaultColDef(e);r=e?u.Constants.GROUP_AUTO_COLUMN_ID+"-"+e.getId():t.GROUP_AUTO_COLUMN_BUNDLE_ID;var n=this.gridOptionsWrapper.getAutoGroupColumnDef();c._.mergeDeep(i,n),(i=this.columnFactory.mergeColDefs(i)).colId=r,this.gridOptionsWrapper.isTreeData()||c._.missing(i.field)&&c._.missing(i.valueGetter)&&c._.missing(i.filterValueGetter)&&(i.filter=!1),o&&o>0&&(i.headerCheckboxSelection=!1);var a=new s.Column(i,null,r,!0);return this.context.wireBean(a),a},e.prototype.generateDefaultColDef=function(e){var t=this.gridOptionsWrapper.getAutoGroupColumnDef(),o={headerName:this.gridOptionsWrapper.getLocaleTextFunc()("group","Group"),enableRowGroup:!0};if(t&&(t.cellRenderer||t.cellRendererFramework)||(o.cellRenderer="agGroupCellRenderer"),e){var r=e.getColDef();c._.assign(o,{headerName:this.columnController.getDisplayNameForColumn(e,"header"),headerValueGetter:r.headerValueGetter}),r.cellRenderer&&c._.assign(o,{cellRendererParams:{innerRenderer:r.cellRenderer,innerRendererParams:r.cellRendererParams}}),o.showRowGroup=e.getColId()}else o.showRowGroup=!0;return o},e.GROUP_AUTO_COLUMN_BUNDLE_ID=u.Constants.GROUP_AUTO_COLUMN_ID,r([n.Autowired("gridOptionsWrapper"),i("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.Autowired("context"),i("design:type",n.Context)],e.prototype,"context",void 0),r([n.Autowired("columnController"),i("design:type",l.ColumnController)],e.prototype,"columnController",void 0),r([n.Autowired("columnFactory"),i("design:type",p.ColumnFactory)],e.prototype,"columnFactory",void 0),t=r([n.Bean("autoGroupColService")],e)}();t.AutoGroupColService=d},44081:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},n=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(60843),a=o(45727),l=o(97156),p=o(40797),u=o(72493),c=o(44871),d=o(98239),h=o(59007),f=o(37789),g=o(80834),m=o(85222),y=o(23801),v=o(96896),C=o(83423);function w(e){return!0===e||"true"===e}var E=function(){function e(){this.propertyEventService=new s.EventService,this.domDataKey="__AG_"+Math.random().toString(),this.layoutElements=[]}var t;return t=e,e.prototype.agWire=function(e,t){this.gridOptions.api=e,this.gridOptions.columnApi=t,this.checkForDeprecated(),this.checkForViolations()},e.prototype.destroy=function(){this.gridOptions.api=null,this.gridOptions.columnApi=null},e.prototype.init=function(){!0!==this.gridOptions.suppressPropertyNamesCheck&&(this.checkGridOptionsProperties(),this.checkColumnDefProperties());var e=this.useAsyncEvents();this.eventService.addGlobalListener(this.globalEventHandler.bind(this),e),this.isGroupSelectsChildren()&&this.isSuppressParentsInRowNodes()&&console.warn("ag-Grid: groupSelectsChildren does not work wth suppressParentsInRowNodes, this selection method needs the part in rowNode to work"),this.isGroupSelectsChildren()&&(this.isRowSelectionMulti()||console.warn("ag-Grid: rowSelection must be 'multiple' for groupSelectsChildren to make sense"),this.isRowModelServerSide()&&console.warn("ag-Grid: group selects children is NOT support for Server Side Row Model. This is because the rows are lazy loaded, so selecting a group is not possible asthe grid has no way of knowing what the children are.")),this.isGroupRemoveSingleChildren()&&this.isGroupHideOpenParents()&&console.warn("ag-Grid: groupRemoveSingleChildren and groupHideOpenParents do not work with each other, you need to pick one. And don't ask us how to us these together on our support forum either you will get the same answer!"),this.addEventListener(t.PROP_DOM_LAYOUT,this.updateLayoutClasses.bind(this))},e.prototype.checkColumnDefProperties=function(){var e=this;null!=this.gridOptions.columnDefs&&this.gridOptions.columnDefs.forEach((function(t){var o=Object.getOwnPropertyNames(t),r=g.ColDefUtil.ALL_PROPERTIES.concat(g.ColDefUtil.FRAMEWORK_PROPERTIES);e.checkProperties(o,r,r,"colDef","https://www.ag-grid.com/javascript-grid-column-properties/")}))},e.prototype.checkGridOptionsProperties=function(){var e=Object.getOwnPropertyNames(this.gridOptions),t=f.PropertyKeys.ALL_PROPERTIES.concat(f.PropertyKeys.FRAMEWORK_PROPERTIES);Object.keys(m.Events).forEach((function(e){return t.push(l.ComponentUtil.getCallbackForEvent(m.Events[e]))}));var o=t.concat("api","columnApi");this.checkProperties(e,o,t,"gridOptions","https://www.ag-grid.com/javascript-grid-properties/")},e.prototype.checkProperties=function(e,t,o,r,i){var n=C._.fuzzyCheckStrings(e,t,o),s=Object.keys(n);s.forEach((function(e){var t=n[e];console.warn("ag-grid: invalid "+r+" property '"+e+"' did you mean any of these: "+t.slice(0,8).join(","))})),s.length>0&&console.warn("ag-grid: to see all the valid "+r+" properties please check: "+i)},e.prototype.getDomData=function(e,t){var o=e[this.domDataKey];if(o)return o[t]},e.prototype.setDomData=function(e,t,o){var r=e[this.domDataKey];C._.missing(r)&&(r={},e[this.domDataKey]=r),r[t]=o},e.prototype.isEnterprise=function(){return this.enterprise},e.prototype.isRowSelection=function(){return"single"===this.gridOptions.rowSelection||"multiple"===this.gridOptions.rowSelection},e.prototype.isRowDeselection=function(){return w(this.gridOptions.rowDeselection)},e.prototype.isRowSelectionMulti=function(){return"multiple"===this.gridOptions.rowSelection},e.prototype.isRowMultiSelectWithClick=function(){return w(this.gridOptions.rowMultiSelectWithClick)},e.prototype.getContext=function(){return this.gridOptions.context},e.prototype.isPivotMode=function(){return w(this.gridOptions.pivotMode)},e.prototype.isPivotTotals=function(){return w(this.gridOptions.pivotTotals)},e.prototype.getPivotColumnGroupTotals=function(){return this.gridOptions.pivotColumnGroupTotals},e.prototype.getPivotRowTotals=function(){return this.gridOptions.pivotRowTotals},e.prototype.isRowModelInfinite=function(){return this.gridOptions.rowModelType===a.Constants.ROW_MODEL_TYPE_INFINITE},e.prototype.isRowModelViewport=function(){return this.gridOptions.rowModelType===a.Constants.ROW_MODEL_TYPE_VIEWPORT},e.prototype.isRowModelServerSide=function(){return this.gridOptions.rowModelType===a.Constants.ROW_MODEL_TYPE_SERVER_SIDE},e.prototype.isRowModelDefault=function(){return C._.missing(this.gridOptions.rowModelType)||this.gridOptions.rowModelType===a.Constants.ROW_MODEL_TYPE_CLIENT_SIDE||this.gridOptions.rowModelType===a.Constants.DEPRECATED_ROW_MODEL_TYPE_NORMAL},e.prototype.isFullRowEdit=function(){return"fullRow"===this.gridOptions.editType},e.prototype.isSuppressFocusAfterRefresh=function(){return w(this.gridOptions.suppressFocusAfterRefresh)},e.prototype.isSuppressBrowserResizeObserver=function(){return w(this.gridOptions.suppressBrowserResizeObserver)},e.prototype.isSuppressMaintainUnsortedOrder=function(){return w(this.gridOptions.suppressMaintainUnsortedOrder)},e.prototype.isShowToolPanel=function(){return w(this.gridOptions.sideBar&&Array.isArray(this.getSideBar().toolPanels))},e.prototype.getSideBar=function(){return this.gridOptions.sideBar},e.prototype.isSuppressTouch=function(){return w(this.gridOptions.suppressTouch)},e.prototype.isSuppressRowTransform=function(){return w(this.gridOptions.suppressRowTransform)},e.prototype.isSuppressSetColumnStateEvents=function(){return w(this.gridOptions.suppressSetColumnStateEvents)},e.prototype.useAsyncEvents=function(){return!w(this.gridOptions.suppressAsyncEvents)},e.prototype.isEnableCellChangeFlash=function(){return w(this.gridOptions.enableCellChangeFlash)},e.prototype.isGroupSelectsChildren=function(){var e=w(this.gridOptions.groupSelectsChildren);return e&&this.isTreeData()?(console.warn("ag-Grid: groupSelectsChildren does not work with tree data"),!1):e},e.prototype.isSuppressRowHoverHighlight=function(){return w(this.gridOptions.suppressRowHoverHighlight)},e.prototype.isGroupSelectsFiltered=function(){return w(this.gridOptions.groupSelectsFiltered)},e.prototype.isGroupHideOpenParents=function(){return w(this.gridOptions.groupHideOpenParents)},e.prototype.isGroupMultiAutoColumn=function(){return w(this.gridOptions.groupMultiAutoColumn)||w(this.gridOptions.groupHideOpenParents)},e.prototype.isGroupRemoveSingleChildren=function(){return w(this.gridOptions.groupRemoveSingleChildren)},e.prototype.isGroupRemoveLowestSingleChildren=function(){return w(this.gridOptions.groupRemoveLowestSingleChildren)},e.prototype.isGroupIncludeFooter=function(){return w(this.gridOptions.groupIncludeFooter)},e.prototype.isGroupIncludeTotalFooter=function(){return w(this.gridOptions.groupIncludeTotalFooter)},e.prototype.isGroupSuppressBlankHeader=function(){return w(this.gridOptions.groupSuppressBlankHeader)},e.prototype.isSuppressRowClickSelection=function(){return w(this.gridOptions.suppressRowClickSelection)},e.prototype.isSuppressCellSelection=function(){return w(this.gridOptions.suppressCellSelection)},e.prototype.isSuppressMultiSort=function(){return w(this.gridOptions.suppressMultiSort)},e.prototype.isMultiSortKeyCtrl=function(){return"ctrl"===this.gridOptions.multiSortKey},e.prototype.isGroupSuppressAutoColumn=function(){return w(this.gridOptions.groupSuppressAutoColumn)},e.prototype.isSuppressDragLeaveHidesColumns=function(){return w(this.gridOptions.suppressDragLeaveHidesColumns)},e.prototype.isSuppressScrollOnNewData=function(){return w(this.gridOptions.suppressScrollOnNewData)},e.prototype.isRowDragManaged=function(){return w(this.gridOptions.rowDragManaged)},e.prototype.isSuppressRowDrag=function(){return w(this.gridOptions.suppressRowDrag)},e.prototype.getDomLayout=function(){var e=this,t=this.gridOptions.domLayout;return t===a.Constants.DOM_LAYOUT_PRINT||t===a.Constants.DOM_LAYOUT_AUTO_HEIGHT||t===a.Constants.DOM_LAYOUT_NORMAL?t:(null==t||C._.doOnce((function(){return console.warn("ag-Grid: "+e.gridOptions.domLayout+" is not valid for DOM Layout, valid values are "+a.Constants.DOM_LAYOUT_NORMAL+", "+a.Constants.DOM_LAYOUT_AUTO_HEIGHT+" and "+a.Constants.DOM_LAYOUT_PRINT)}),"warn about dom layout values"),a.Constants.DOM_LAYOUT_NORMAL)},e.prototype.isSuppressHorizontalScroll=function(){return w(this.gridOptions.suppressHorizontalScroll)},e.prototype.isSuppressMaxRenderedRowRestriction=function(){return w(this.gridOptions.suppressMaxRenderedRowRestriction)},e.prototype.isExcludeChildrenWhenTreeDataFiltering=function(){return w(this.gridOptions.excludeChildrenWhenTreeDataFiltering)},e.prototype.isAlwaysShowVerticalScroll=function(){return w(this.gridOptions.alwaysShowVerticalScroll)},e.prototype.isSuppressLoadingOverlay=function(){return w(this.gridOptions.suppressLoadingOverlay)},e.prototype.isSuppressNoRowsOverlay=function(){return w(this.gridOptions.suppressNoRowsOverlay)},e.prototype.isSuppressFieldDotNotation=function(){return w(this.gridOptions.suppressFieldDotNotation)},e.prototype.getPinnedTopRowData=function(){return this.gridOptions.pinnedTopRowData},e.prototype.getPinnedBottomRowData=function(){return this.gridOptions.pinnedBottomRowData},e.prototype.isFunctionsPassive=function(){return w(this.gridOptions.functionsPassive)},e.prototype.isSuppressTabbing=function(){return w(this.gridOptions.suppressTabbing)},e.prototype.isSuppressChangeDetection=function(){return w(this.gridOptions.suppressChangeDetection)},e.prototype.isSuppressAnimationFrame=function(){return w(this.gridOptions.suppressAnimationFrame)},e.prototype.getQuickFilterText=function(){return this.gridOptions.quickFilterText},e.prototype.isCacheQuickFilter=function(){return w(this.gridOptions.cacheQuickFilter)},e.prototype.isUnSortIcon=function(){return w(this.gridOptions.unSortIcon)},e.prototype.isSuppressMenuHide=function(){return w(this.gridOptions.suppressMenuHide)},e.prototype.isEnterMovesDownAfterEdit=function(){return w(this.gridOptions.enterMovesDownAfterEdit)},e.prototype.isEnterMovesDown=function(){return w(this.gridOptions.enterMovesDown)},e.prototype.getRowStyle=function(){return this.gridOptions.rowStyle},e.prototype.getRowClass=function(){return this.gridOptions.rowClass},e.prototype.getRowStyleFunc=function(){return this.gridOptions.getRowStyle},e.prototype.getRowClassFunc=function(){return this.gridOptions.getRowClass},e.prototype.rowClassRules=function(){return this.gridOptions.rowClassRules},e.prototype.getPopupParent=function(){return this.gridOptions.popupParent},e.prototype.getBlockLoadDebounceMillis=function(){return this.gridOptions.blockLoadDebounceMillis},e.prototype.getPostProcessPopupFunc=function(){return this.gridOptions.postProcessPopup},e.prototype.getDoesDataFlowerFunc=function(){return this.gridOptions.doesDataFlower},e.prototype.getPaginationNumberFormatterFunc=function(){return this.gridOptions.paginationNumberFormatter},e.prototype.getChildCountFunc=function(){return this.gridOptions.getChildCount},e.prototype.getDefaultGroupSortComparator=function(){return this.gridOptions.defaultGroupSortComparator},e.prototype.getIsFullWidthCellFunc=function(){return this.gridOptions.isFullWidthCell},e.prototype.getFullWidthCellRendererParams=function(){return this.gridOptions.fullWidthCellRendererParams},e.prototype.isEmbedFullWidthRows=function(){return w(this.gridOptions.deprecatedEmbedFullWidthRows)},e.prototype.getSuppressKeyboardEventFunc=function(){return this.gridOptions.suppressKeyboardEvent},e.prototype.getBusinessKeyForNodeFunc=function(){return this.gridOptions.getBusinessKeyForNode},e.prototype.getApi=function(){return this.gridOptions.api},e.prototype.getColumnApi=function(){return this.gridOptions.columnApi},e.prototype.isDeltaRowDataMode=function(){return w(this.gridOptions.deltaRowDataMode)},e.prototype.isDeltaColumnMode=function(){return w(this.gridOptions.deltaColumnMode)},e.prototype.isEnsureDomOrder=function(){return w(this.gridOptions.ensureDomOrder)},e.prototype.isEnableCharts=function(){return w(this.gridOptions.enableCharts)},e.prototype.getColResizeDefault=function(){return this.gridOptions.colResizeDefault},e.prototype.isSingleClickEdit=function(){return w(this.gridOptions.singleClickEdit)},e.prototype.isSuppressClickEdit=function(){return w(this.gridOptions.suppressClickEdit)},e.prototype.isStopEditingWhenGridLosesFocus=function(){return w(this.gridOptions.stopEditingWhenGridLosesFocus)},e.prototype.getGroupDefaultExpanded=function(){return this.gridOptions.groupDefaultExpanded},e.prototype.getMaxConcurrentDatasourceRequests=function(){return this.gridOptions.maxConcurrentDatasourceRequests},e.prototype.getMaxBlocksInCache=function(){return this.gridOptions.maxBlocksInCache},e.prototype.getCacheOverflowSize=function(){return this.gridOptions.cacheOverflowSize},e.prototype.getPaginationPageSize=function(){return this.gridOptions.paginationPageSize},e.prototype.getCacheBlockSize=function(){return this.gridOptions.cacheBlockSize},e.prototype.getInfiniteInitialRowCount=function(){return this.gridOptions.infiniteInitialRowCount},e.prototype.isPurgeClosedRowNodes=function(){return w(this.gridOptions.purgeClosedRowNodes)},e.prototype.isSuppressPaginationPanel=function(){return w(this.gridOptions.suppressPaginationPanel)},e.prototype.getRowData=function(){return this.gridOptions.rowData},e.prototype.isGroupUseEntireRow=function(){return w(this.gridOptions.groupUseEntireRow)},e.prototype.isEnableRtl=function(){return w(this.gridOptions.enableRtl)},e.prototype.getAutoGroupColumnDef=function(){return this.gridOptions.autoGroupColumnDef},e.prototype.isGroupSuppressRow=function(){return w(this.gridOptions.groupSuppressRow)},e.prototype.getRowGroupPanelShow=function(){return this.gridOptions.rowGroupPanelShow},e.prototype.getPivotPanelShow=function(){return this.gridOptions.pivotPanelShow},e.prototype.isAngularCompileRows=function(){return w(this.gridOptions.angularCompileRows)},e.prototype.isAngularCompileFilters=function(){return w(this.gridOptions.angularCompileFilters)},e.prototype.isAngularCompileHeaders=function(){return w(this.gridOptions.angularCompileHeaders)},e.prototype.isDebug=function(){return w(this.gridOptions.debug)},e.prototype.getColumnDefs=function(){return this.gridOptions.columnDefs},e.prototype.getColumnTypes=function(){return this.gridOptions.columnTypes},e.prototype.getDatasource=function(){return this.gridOptions.datasource},e.prototype.getViewportDatasource=function(){return this.gridOptions.viewportDatasource},e.prototype.getServerSideDatasource=function(){return this.gridOptions.serverSideDatasource},e.prototype.isAccentedSort=function(){return w(this.gridOptions.accentedSort)},e.prototype.isEnableBrowserTooltips=function(){return w(this.gridOptions.enableBrowserTooltips)},e.prototype.isEnableCellExpressions=function(){return w(this.gridOptions.enableCellExpressions)},e.prototype.isEnableGroupEdit=function(){return w(this.gridOptions.enableGroupEdit)},e.prototype.isSuppressMiddleClickScrolls=function(){return w(this.gridOptions.suppressMiddleClickScrolls)},e.prototype.isSuppressPreventDefaultOnMouseWheel=function(){return w(this.gridOptions.suppressPreventDefaultOnMouseWheel)},e.prototype.isSuppressColumnVirtualisation=function(){return w(this.gridOptions.suppressColumnVirtualisation)},e.prototype.isSuppressContextMenu=function(){return w(this.gridOptions.suppressContextMenu)},e.prototype.isAllowContextMenuWithControlKey=function(){return w(this.gridOptions.allowContextMenuWithControlKey)},e.prototype.isSuppressCopyRowsToClipboard=function(){return w(this.gridOptions.suppressCopyRowsToClipboard)},e.prototype.isCopyHeadersToClipboard=function(){return w(this.gridOptions.copyHeadersToClipboard)},e.prototype.isSuppressClipboardPaste=function(){return w(this.gridOptions.suppressClipboardPaste)},e.prototype.isPagination=function(){return w(this.gridOptions.pagination)},e.prototype.isSuppressEnterpriseResetOnNewColumns=function(){return w(this.gridOptions.suppressEnterpriseResetOnNewColumns)},e.prototype.getProcessDataFromClipboardFunc=function(){return this.gridOptions.processDataFromClipboard},e.prototype.getBatchUpdateWaitMillis=function(){return C._.exists(this.gridOptions.batchUpdateWaitMillis)?this.gridOptions.batchUpdateWaitMillis:a.Constants.BATCH_WAIT_MILLIS},e.prototype.isSuppressMovableColumns=function(){return w(this.gridOptions.suppressMovableColumns)},e.prototype.isAnimateRows=function(){return!this.isEnsureDomOrder()&&w(this.gridOptions.animateRows)},e.prototype.isSuppressColumnMoveAnimation=function(){return w(this.gridOptions.suppressColumnMoveAnimation)},e.prototype.isSuppressAggFuncInHeader=function(){return w(this.gridOptions.suppressAggFuncInHeader)},e.prototype.isSuppressAggAtRootLevel=function(){return w(this.gridOptions.suppressAggAtRootLevel)},e.prototype.isEnableRangeSelection=function(){return w(this.gridOptions.enableRangeSelection)},e.prototype.isSuppressMultiRangeSelection=function(){return w(this.gridOptions.suppressMultiRangeSelection)},e.prototype.isPaginationAutoPageSize=function(){return w(this.gridOptions.paginationAutoPageSize)},e.prototype.isRememberGroupStateWhenNewData=function(){return w(this.gridOptions.rememberGroupStateWhenNewData)},e.prototype.getIcons=function(){return this.gridOptions.icons},e.prototype.getAggFuncs=function(){return this.gridOptions.aggFuncs},e.prototype.getSortingOrder=function(){return this.gridOptions.sortingOrder},e.prototype.getAlignedGrids=function(){return this.gridOptions.alignedGrids},e.prototype.isMasterDetail=function(){var e=this,t=w(this.gridOptions.masterDetail);return C._.doOnce((function(){t&&!e.enterprise&&console.warn("ag-grid: Master Detail is an Enterprise feature of ag-Grid.")}),"MasterDetailEnterpriseCheck"),t&&this.enterprise},e.prototype.getIsRowMasterFunc=function(){return this.gridOptions.isRowMaster},e.prototype.getIsRowSelectableFunc=function(){return this.gridOptions.isRowSelectable},e.prototype.getGroupRowRendererParams=function(){return this.gridOptions.groupRowRendererParams},e.prototype.getOverlayLoadingTemplate=function(){return this.gridOptions.overlayLoadingTemplate},e.prototype.getOverlayNoRowsTemplate=function(){return this.gridOptions.overlayNoRowsTemplate},e.prototype.isSuppressAutoSize=function(){return w(this.gridOptions.suppressAutoSize)},e.prototype.isEnableCellTextSelection=function(){return w(this.gridOptions.enableCellTextSelection)},e.prototype.isSuppressParentsInRowNodes=function(){return w(this.gridOptions.suppressParentsInRowNodes)},e.prototype.isFunctionsReadOnly=function(){return w(this.gridOptions.functionsReadOnly)},e.prototype.isFloatingFilter=function(){return this.gridOptions.floatingFilter},e.prototype.isEnableCellTextSelect=function(){return w(this.gridOptions.enableCellTextSelection)},e.prototype.isEnableOldSetFilterModel=function(){return w(this.gridOptions.enableOldSetFilterModel)},e.prototype.getDefaultColDef=function(){return this.gridOptions.defaultColDef},e.prototype.getDefaultColGroupDef=function(){return this.gridOptions.defaultColGroupDef},e.prototype.getDefaultExportParams=function(){return this.gridOptions.defaultExportParams},e.prototype.isSuppressCsvExport=function(){return w(this.gridOptions.suppressCsvExport)},e.prototype.isSuppressExcelExport=function(){return w(this.gridOptions.suppressExcelExport)},e.prototype.isSuppressMakeColumnVisibleAfterUnGroup=function(){return w(this.gridOptions.suppressMakeColumnVisibleAfterUnGroup)},e.prototype.getNodeChildDetailsFunc=function(){return this.gridOptions.getNodeChildDetails},e.prototype.getDataPathFunc=function(){return this.gridOptions.getDataPath},e.prototype.getIsServerSideGroupFunc=function(){return this.gridOptions.isServerSideGroup},e.prototype.getServerSideGroupKeyFunc=function(){return this.gridOptions.getServerSideGroupKey},e.prototype.getGroupRowAggNodesFunc=function(){return this.gridOptions.groupRowAggNodes},e.prototype.getContextMenuItemsFunc=function(){return this.gridOptions.getContextMenuItems},e.prototype.getMainMenuItemsFunc=function(){return this.gridOptions.getMainMenuItems},e.prototype.getRowNodeIdFunc=function(){return this.gridOptions.getRowNodeId},e.prototype.getNavigateToNextCellFunc=function(){return this.gridOptions.navigateToNextCell},e.prototype.getTabToNextCellFunc=function(){return this.gridOptions.tabToNextCell},e.prototype.isTreeData=function(){var e=this,t=w(this.gridOptions.treeData);return C._.doOnce((function(){t&&!e.enterprise&&console.warn("ag-grid: TreeData is an Enterprise feature of ag-Grid.")}),"TreeDataEnterpriseCheck"),t},e.prototype.isValueCache=function(){return w(this.gridOptions.valueCache)},e.prototype.isValueCacheNeverExpires=function(){return w(this.gridOptions.valueCacheNeverExpires)},e.prototype.isDeltaSort=function(){return w(this.gridOptions.deltaSort)},e.prototype.isAggregateOnlyChangedColumns=function(){return w(this.gridOptions.aggregateOnlyChangedColumns)},e.prototype.getProcessSecondaryColDefFunc=function(){return this.gridOptions.processSecondaryColDef},e.prototype.getProcessSecondaryColGroupDefFunc=function(){return this.gridOptions.processSecondaryColGroupDef},e.prototype.getSendToClipboardFunc=function(){return this.gridOptions.sendToClipboard},e.prototype.getProcessRowPostCreateFunc=function(){return this.gridOptions.processRowPostCreate},e.prototype.getProcessCellForClipboardFunc=function(){return this.gridOptions.processCellForClipboard},e.prototype.getProcessHeaderForClipboardFunc=function(){return this.gridOptions.processHeaderForClipboard},e.prototype.getProcessCellFromClipboardFunc=function(){return this.gridOptions.processCellFromClipboard},e.prototype.getViewportRowModelPageSize=function(){return(e=this.gridOptions.viewportRowModelPageSize)>0?e:5;var e},e.prototype.getViewportRowModelBufferSize=function(){return(e=this.gridOptions.viewportRowModelBufferSize)>=0?e:5;var e},e.prototype.isServerSideSortingAlwaysResets=function(){return w(this.gridOptions.serverSideSortingAlwaysResets)},e.prototype.getPostSortFunc=function(){return this.gridOptions.postSort},e.prototype.getClipboardDeliminator=function(){return C._.exists(this.gridOptions.clipboardDeliminator)?this.gridOptions.clipboardDeliminator:"\t"},e.prototype.setProperty=function(e,t){var o=this.gridOptions,r=o[e];if(r!==t){o[e]=t;var i={type:e,currentValue:t,previousValue:r};this.propertyEventService.dispatchEvent(i)}},e.prototype.addLayoutElement=function(e){this.layoutElements.push(e),this.updateLayoutClasses()},e.prototype.updateLayoutClasses=function(){var e=this.getDomLayout(),t=e===a.Constants.DOM_LAYOUT_AUTO_HEIGHT,o=e===a.Constants.DOM_LAYOUT_PRINT,r=e===a.Constants.DOM_LAYOUT_NORMAL;this.layoutElements.forEach((function(e){C._.addOrRemoveCssClass(e,"ag-layout-auto-height",t),C._.addOrRemoveCssClass(e,"ag-layout-normal",r),C._.addOrRemoveCssClass(e,"ag-layout-print",o)}))},e.prototype.addEventListener=function(e,o){t.checkEventDeprecation(e),this.propertyEventService.addEventListener(e,o)},e.checkEventDeprecation=function(e){"floatingRowDataChanged"===e&&console.warn("ag-Grid: floatingRowDataChanged is now called pinnedRowDataChanged")},e.prototype.removeEventListener=function(e,t){this.propertyEventService.removeEventListener(e,t)},e.prototype.getAutoSizePadding=function(){return this.gridOptions.autoSizePadding&&this.gridOptions.autoSizePadding>0?this.gridOptions.autoSizePadding:20},e.prototype.getHeaderHeight=function(){return"number"==typeof this.gridOptions.headerHeight?this.gridOptions.headerHeight:this.specialForNewMaterial(25,"headerHeight")},e.prototype.getFloatingFiltersHeight=function(){return"number"==typeof this.gridOptions.floatingFiltersHeight?this.gridOptions.floatingFiltersHeight:this.specialForNewMaterial(25,"headerHeight")},e.prototype.getGroupHeaderHeight=function(){return"number"==typeof this.gridOptions.groupHeaderHeight?this.gridOptions.groupHeaderHeight:this.getHeaderHeight()},e.prototype.getPivotHeaderHeight=function(){return"number"==typeof this.gridOptions.pivotHeaderHeight?this.gridOptions.pivotHeaderHeight:this.getHeaderHeight()},e.prototype.getPivotGroupHeaderHeight=function(){return"number"==typeof this.gridOptions.pivotGroupHeaderHeight?this.gridOptions.pivotGroupHeaderHeight:this.getGroupHeaderHeight()},e.prototype.isExternalFilterPresent=function(){return"function"==typeof this.gridOptions.isExternalFilterPresent&&this.gridOptions.isExternalFilterPresent()},e.prototype.doesExternalFilterPass=function(e){return"function"==typeof this.gridOptions.doesExternalFilterPass&&this.gridOptions.doesExternalFilterPass(e)},e.prototype.getDocument=function(){var e=null;return this.gridOptions.getDocument&&C._.exists(this.gridOptions.getDocument)&&(e=this.gridOptions.getDocument()),e&&C._.exists(e)?e:document},e.prototype.getMinColWidth=function(){return this.gridOptions.minColWidth&&this.gridOptions.minColWidth>t.MIN_COL_WIDTH?this.gridOptions.minColWidth:t.MIN_COL_WIDTH},e.prototype.getMaxColWidth=function(){return this.gridOptions.maxColWidth&&this.gridOptions.maxColWidth>t.MIN_COL_WIDTH?this.gridOptions.maxColWidth:null},e.prototype.getColWidth=function(){return"number"!=typeof this.gridOptions.colWidth||this.gridOptions.colWidth<t.MIN_COL_WIDTH?200:this.gridOptions.colWidth},e.prototype.getRowBufferInPixels=function(){var e;return"number"==typeof this.gridOptions.rowBuffer?this.gridOptions.rowBuffer<0?(C._.doOnce((function(){return console.warn("ag-Grid: rowBuffer should not be negative")}),"warn rowBuffer negative"),e=0):e=this.gridOptions.rowBuffer:e=a.Constants.ROW_BUFFER_SIZE,e*this.getRowHeightAsNumber()},e.prototype.getScrollbarWidth=function(){var e=this.gridOptions.scrollbarWidth;return("number"!=typeof e||e<0)&&(e=C._.getScrollbarWidth()),e},e.prototype.checkForDeprecated=function(){var e=this,t=this.gridOptions;t.suppressUnSort&&console.warn("ag-grid: as of v1.12.4 suppressUnSort is not used. Please use sortingOrder instead."),t.suppressDescSort&&console.warn("ag-grid: as of v1.12.4 suppressDescSort is not used. Please use sortingOrder instead."),t.groupAggFields&&console.warn("ag-grid: as of v3 groupAggFields is not used. Please add appropriate agg fields to your columns."),t.groupHidePivotColumns&&console.warn("ag-grid: as of v3 groupHidePivotColumns is not used as pivot columns are now called rowGroup columns. Please refer to the documentation"),t.groupKeys&&console.warn("ag-grid: as of v3 groupKeys is not used. You need to set rowGroupIndex on the columns to group. Please refer to the documentation"),"boolean"==typeof t.groupDefaultExpanded&&console.warn("ag-grid: groupDefaultExpanded can no longer be boolean. for groupDefaultExpanded=true, use groupDefaultExpanded=9999 instead, to expand all the groups"),(t.onRowDeselected||t.rowDeselected)&&console.warn("ag-grid: since version 3.4 event rowDeselected no longer exists, please check the docs"),t.rowsAlreadyGrouped&&console.warn("ag-grid: since version 3.4 rowsAlreadyGrouped no longer exists, please use getNodeChildDetails() instead"),t.groupAggFunction&&console.warn("ag-grid: since version 4.3.x groupAggFunction is now called groupRowAggNodes"),t.checkboxSelection&&console.warn("ag-grid: since version 8.0.x checkboxSelection is not supported as a grid option. If you want this on all columns, use defaultColDef instead and set it there"),t.paginationInitialRowCount&&console.warn("ag-grid: since version 9.0.x paginationInitialRowCount is now called infiniteInitialRowCount"),t.infinitePageSize&&console.warn("ag-grid: since version 9.0.x infinitePageSize is now called cacheBlockSize"),t.infiniteBlockSize&&console.warn("ag-grid: since version 10.0.x infiniteBlockSize is now called cacheBlockSize"),t.maxPagesInCache&&console.warn("ag-grid: since version 10.0.x maxPagesInCache is now called maxBlocksInCache"),t.paginationOverflowSize&&console.warn("ag-grid: since version 10.0.x paginationOverflowSize is now called cacheOverflowSize"),t.suppressMenuFilterPanel&&console.warn("ag-grid: since version 11.0.x, use property colDef.menuTabs=['generalMenuTab','columnsMenuTab'] instead of suppressMenuFilterPanel=true"),t.suppressMenuMainPanel&&console.warn("ag-grid: since version 11.0.x, use property colDef.menuTabs=['filterMenuTab','columnsMenuTab'] instead of suppressMenuMainPanel=true"),t.suppressMenuColumnPanel&&console.warn("ag-grid: since version 11.0.x, use property colDef.menuTabs=['generalMenuTab','filterMenuTab'] instead of suppressMenuColumnPanel=true"),t.suppressUseColIdForGroups&&console.warn("ag-grid: since version 11.0.x, this is not in use anymore. You should be able to remove it from your definition"),t.groupSuppressRow&&console.warn("ag-grid: since version 18.2.x, 'groupSuppressRow' should not be used anymore. Instead remove row groups and perform custom sorting."),t.groupColumnDef&&console.warn("ag-grid: since version 11.0.x, groupColumnDef has been renamed, this property is now called autoGroupColumnDef. Please change your configuration accordingly"),t.slaveGrids&&console.warn("ag-grid: since version 12.x, slaveGrids has been renamed, this property is now called alignedGrids. Please change your configuration accordingly"),t.floatingTopRowData&&console.warn("ag-grid: since version 12.x, floatingTopRowData is now called pinnedTopRowData"),t.floatingBottomRowData&&console.warn("ag-grid: since version 12.x, floatingBottomRowData is now called pinnedBottomRowData"),t.paginationStartPage&&console.warn("ag-grid: since version 12.x, paginationStartPage is gone, please call api.paginationGoToPage("+t.paginationStartPage+") instead."),t.getHeaderCellTemplate&&console.warn("ag-grid: since version 15.x, getHeaderCellTemplate is gone, please check the header documentation on how to set header templates."),t.headerCellTemplate&&console.warn("ag-grid: since version 15.x, headerCellTemplate is gone, please check the header documentation on how to set header templates."),t.headerCellRenderer&&console.warn("ag-grid: since version 15.x, headerCellRenderer is gone, please check the header documentation on how to set header templates."),t.angularCompileHeaders&&console.warn("ag-grid: since version 15.x, angularCompileHeaders is gone, please see the getting started for Angular 1 docs to see how to do headers in Angular 1.x."),t.pivotTotals&&(console.warn("ag-grid: since version 18.x, pivotTotals has been removed, instead if using pivotTotals, set pivotColumnGroupTotals='before'|'after'."),t.pivotColumnGroupTotals="before"),"inMemory"===t.rowModelType&&(console.warn("ag-grid: since version 18.x, The In Memory Row Model has been renamed to the Client Side Row Model, set rowModelType='clientSide' instead."),t.rowModelType="clientSide"),"enterprise"===t.rowModelType&&(console.warn("ag-grid: since version 18.x, The Enterprise Row Model has been renamed to the Server Side Row Model, set rowModelType='serverSide' instead."),t.rowModelType="serverSide"),t.layoutInterval&&console.warn("ag-grid: since version 18.x, layoutInterval is no longer a property. This is because the grid now uses CSS Flex for layout."),t.gridAutoHeight&&(console.warn("ag-grid: since version 19.x, gridAutoHeight is gone, please use domLayout=autoHeight instead"),t.domLayout="autoHeight"),!0===t.showToolPanel&&(console.warn("ag-grid: since version 19.x, showToolPanel is gone, please specify toolPanel components. See https://www.ag-grid.com/javascript-grid-tool-panel/"),t.showToolPanel=void 0,t.sideBar=t.sideBar||!0),!1===t.showToolPanel&&(console.warn("ag-grid: since version 19.x, showToolPanel is gone, please specify toolPanel components. See https://www.ag-grid.com/javascript-grid-tool-panel/"),t.showToolPanel=void 0,t.sideBar=t.sideBar||!1);var o={toolPanelSuppressRowGroups:"suppressRowGroups",toolPanelSuppressValues:"suppressValues",toolPanelSuppressPivots:"suppressPivots",toolPanelSuppressPivotMode:"suppressPivotMode",toolPanelSuppressColumnFilter:"suppressColumnFilter",toolPanelSuppressColumnSelectAll:"suppressColumnSelectAll",toolPanelSuppressSideButtons:"suppressSideButtons",toolPanelSuppressColumnExpandAll:"suppressColumnExpandAll",contractColumnSelection:"contractColumnSelection"},r={};Object.keys(o).forEach((function(t){var i=o[t],n=e.gridOptions[t];if(void 0!==n){if("toolPanelSuppressSideButtons"===t)return void console.warn("ag-grid: since v19.0 toolPanelSuppressSideButtons has been completely removed. See https://www.ag-grid.com/javascript-grid-tool-panel/");console.warn("ag-grid: since v19.0 gridOptions."+t+" is deprecated, please use gridOptions.sideBar.toolPanel[columnsIndex].componentParams."+i),r[i]=n}})),Object.keys(r).length>0&&!C._.exists(t.sideBar)&&(console.warn("ag-grid: since version 19.x, sideBar is mandatory if using toolPanel related properties. See https://www.ag-grid.com/javascript-grid-tool-panel/"),t.sideBar=!0),null!=t.sideBar&&(t.sideBar=v.SideBarDefParser.parse(t.sideBar));var i=this.gridOptions.sideBar;if(Object.keys(r).length>0&&i&&i.toolPanels){var n=i.toolPanels.filter((function(e){return"columns"===e.id}));1===n.length&&C._.mergeDeep(n[0],{componentParams:r})}t.enableStatusBar&&(console.warn("ag-grid: since version 19.x, enableStatusBar is gone, please specify statusBar components"),t.statusBar=t.statusBar||{components:[{component:"agAggregationComponent"}]}),t.alwaysShowStatusBar&&console.warn("ag-grid: since version 19.x, alwaysShowStatusBar is gone. Please specify a min-height on the ag-status-bar css class, eg .ag-status-bar {min-height: 35px; }"),(t.enableServerSideSorting||t.enableSorting)&&(console.warn("ag-Grid: since v20, grid options enableSorting and enableServerSideSorting are gone. Instead set sortable=true on the column definition for the columns sorting are allowed on. To migrate from gridOption.enableSorting=true, set gridOptions.defaultColDef.sortable=true"),t.defaultColDef||(t.defaultColDef={}),t.defaultColDef.sortable||(t.defaultColDef.sortable=!0)),(t.enableFilter||t.enableServerSideFilter)&&(console.warn("ag-Grid: since v20, grid options enableFilter and enableServerSideFilter are gone. Instead set filter=true (if not already specifying a specific filter) on the column definition for the columns filtering is allowed on. To migrate from gridOptions.enableFilter=true, set gridOptions.defaultColDef.filter=true. If you are explicitly setting specific filters for each column (ie colDef.filter is already set) the you don't need to do anything."),t.defaultColDef||(t.defaultColDef={}),t.defaultColDef.filter||(t.defaultColDef.filter=!0)),t.enableColResize&&(console.warn("ag-Grid: since v20, grid options enableColResize is gone. Instead set resizable=true on the column definition for the columns resizing are allowed on. To migrate from gridOption.enableColResize=true, set gridOptions.defaultColDef.resizable=true"),t.defaultColDef||(t.defaultColDef={}),t.defaultColDef.resizable||(t.defaultColDef.resizable=!0)),t.embedFullWidthRows&&console.warn("ag-Grid: since v20.1, embedFullWidthRows is now gone. This property was introduced to allow faster vertical scrolling when using slow browsers (IE) and full width rows. However in v20 the dom layout was redesigned and this performance problem no longer exists, hence this property 'hack' is no longer necessary."),t.suppressTabbing&&console.warn("ag-Grid: since v20.1, suppressTabbing is replaced with the more powerful grid callback suppressKeyboardEvent(params) which can suppress any keyboard event including tabbing.")},e.prototype.checkForViolations=function(){this.isTreeData()&&this.treeDataViolations()},e.prototype.treeDataViolations=function(){this.isRowModelDefault()&&C._.missing(this.getDataPathFunc())&&console.warn("ag-Grid: property usingTreeData=true with rowModel=clientSide, but you did not provide getDataPath function, please provide getDataPath function if using tree data."),this.isRowModelServerSide()&&(C._.missing(this.getIsServerSideGroupFunc())&&console.warn("ag-Grid: property usingTreeData=true with rowModel=serverSide, but you did not provide isServerSideGroup function, please provide isServerSideGroup function if using tree data."),C._.missing(this.getServerSideGroupKeyFunc())&&console.warn("ag-Grid: property usingTreeData=true with rowModel=serverSide, but you did not provide getServerSideGroupKey function, please provide getServerSideGroupKey function if using tree data."))},e.prototype.getLocaleTextFunc=function(){if(this.gridOptions.localeTextFunc)return this.gridOptions.localeTextFunc;var e=this;return function(t,o){var r=e.gridOptions.localeText;return r&&r[t]?r[t]:o}},e.prototype.globalEventHandler=function(e,t){var o=l.ComponentUtil.getCallbackForEvent(e);"function"==typeof this.gridOptions[o]&&this.gridOptions[o](t)},e.prototype.getRowHeightAsNumber=function(){return!this.gridOptions.rowHeight||C._.missing(this.gridOptions.rowHeight)?this.getDefaultRowHeight():this.gridOptions.rowHeight&&this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:(console.warn("ag-Grid row height must be a number if not using standard row model"),this.getDefaultRowHeight())},e.prototype.getRowHeightForNode=function(e,t){if(void 0===t&&(t=!1),"function"==typeof this.gridOptions.getRowHeight){if(t)return{height:this.getDefaultRowHeight(),estimated:!0};var o={node:e,data:e.data,api:this.gridOptions.api,context:this.gridOptions.context};return{height:this.gridOptions.getRowHeight(o),estimated:!1}}if(e.detail&&this.isMasterDetail())return this.isNumeric(this.gridOptions.detailRowHeight)?{height:this.gridOptions.detailRowHeight,estimated:!1}:{height:300,estimated:!1};var r=this.getDefaultRowHeight(),i=this.gridOptions.rowHeight&&this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:r;if(this.columnController.isAutoRowHeightActive()){if(t)return{height:i,estimated:!0};var n=this.autoHeightCalculator.getPreferredHeightForRow(e);return{height:Math.max(n,r),estimated:!1}}return{height:i,estimated:!1}},e.prototype.isDynamicRowHeight=function(){return"function"==typeof this.gridOptions.getRowHeight},e.prototype.getVirtualItemHeight=function(){return this.specialForNewMaterial(20,"virtualItemHeight")},e.prototype.isNumeric=function(e){return!isNaN(e)&&"number"==typeof e},e.prototype.specialForNewMaterial=function(e,t){var o=this.environment.getTheme();return o&&0===o.indexOf("ag-theme")?this.environment.getSassVariable(o,t):e},e.prototype.getDefaultRowHeight=function(){return this.specialForNewMaterial(25,"rowHeight")},e.MIN_COL_WIDTH=10,e.PROP_HEADER_HEIGHT="headerHeight",e.PROP_GROUP_REMOVE_SINGLE_CHILDREN="groupRemoveSingleChildren",e.PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN="groupRemoveLowestSingleChildren",e.PROP_PIVOT_HEADER_HEIGHT="pivotHeaderHeight",e.PROP_SUPPRESS_CLIPBOARD_PASTE="suppressClipboardPaste",e.PROP_GROUP_HEADER_HEIGHT="groupHeaderHeight",e.PROP_PIVOT_GROUP_HEADER_HEIGHT="pivotGroupHeaderHeight",e.PROP_FLOATING_FILTERS_HEIGHT="floatingFiltersHeight",e.PROP_SUPPRESS_ROW_DRAG="suppressRowDrag",e.PROP_POPUP_PARENT="popupParent",e.PROP_DOM_LAYOUT="domLayout",r([u.Autowired("gridOptions"),i("design:type",Object)],e.prototype,"gridOptions",void 0),r([u.Autowired("columnController"),i("design:type",d.ColumnController)],e.prototype,"columnController",void 0),r([u.Autowired("eventService"),i("design:type",s.EventService)],e.prototype,"eventService",void 0),r([u.Autowired("enterprise"),i("design:type",Boolean)],e.prototype,"enterprise",void 0),r([u.Autowired("frameworkFactory"),i("design:type",Object)],e.prototype,"frameworkFactory",void 0),r([u.Autowired("gridApi"),i("design:type",p.GridApi)],e.prototype,"gridApi",void 0),r([u.Autowired("columnApi"),i("design:type",c.ColumnApi)],e.prototype,"columnApi",void 0),r([u.Autowired("environment"),i("design:type",h.Environment)],e.prototype,"environment",void 0),r([u.Autowired("autoHeightCalculator"),i("design:type",y.AutoHeightCalculator)],e.prototype,"autoHeightCalculator",void 0),r([n(0,u.Qualifier("gridApi")),n(1,u.Qualifier("columnApi")),i("design:type",Function),i("design:paramtypes",[p.GridApi,c.ColumnApi]),i("design:returntype",void 0)],e.prototype,"agWire",null),r([u.PreDestroy,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"destroy",null),r([u.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),t=r([u.Bean("gridOptionsWrapper")],e)}();t.GridOptionsWrapper=E},44329:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var n=o(83423),s=o(15068),a=function(e){function t(o,r){var i=e.call(this)||this;return i.version=0,i.state=t.STATE_DIRTY,i.rowNodeCacheParams=r,i.blockNumber=o,i.startRow=o*r.blockSize,i.endRow=i.startRow+r.blockSize,i}return i(t,e),t.prototype.isAnyNodeOpen=function(e){var t=!1;return this.forEachNodeCallback((function(e){e.expanded&&(t=!0)}),e),t},t.prototype.forEachNodeCallback=function(e,t){for(var o=this.startRow;o<this.endRow;o++)o<t&&e(this.getRowUsingLocalIndex(o),o)},t.prototype.forEachNode=function(e,t,o,r){this.forEachNodeCallback((function(o){e(o,t.next()),r&&o.childrenCache&&o.childrenCache.forEachNodeDeep(e,t)}),o)},t.prototype.forEachNodeDeep=function(e,t,o){this.forEachNode(e,t,o,!0)},t.prototype.forEachNodeShallow=function(e,t,o){this.forEachNode(e,t,o,!1)},t.prototype.getVersion=function(){return this.version},t.prototype.getLastAccessed=function(){return this.lastAccessed},t.prototype.getRowUsingLocalIndex=function(e,t){void 0===t&&(t=!1),t||(this.lastAccessed=this.rowNodeCacheParams.lastAccessedSequence.next());var o=e-this.startRow;return this.rowNodes[o]},t.prototype.init=function(e){this.beans=e,this.createRowNodes()},t.prototype.getStartRow=function(){return this.startRow},t.prototype.getEndRow=function(){return this.endRow},t.prototype.getBlockNumber=function(){return this.blockNumber},t.prototype.setDirty=function(){this.version++,this.state=t.STATE_DIRTY},t.prototype.setDirtyAndPurge=function(){this.setDirty(),this.rowNodes.forEach((function(e){e.setData(null)}))},t.prototype.getState=function(){return this.state},t.prototype.setRowNode=function(e,t){var o=e-this.startRow;this.rowNodes[o]=t},t.prototype.setBlankRowNode=function(e){var t=e-this.startRow,o=this.createBlankRowNode(e);return this.rowNodes[t]=o,o},t.prototype.setNewData=function(e,t){var o=this.setBlankRowNode(e);return this.setDataAndId(o,t,this.startRow+e),o},t.prototype.createBlankRowNode=function(e){var t=new s.RowNode;return this.beans.context.wireBean(t),t.setRowHeight(this.rowNodeCacheParams.rowHeight),t},t.prototype.createRowNodes=function(){this.rowNodes=[];for(var e=0;e<this.rowNodeCacheParams.blockSize;e++){var t=this.startRow+e,o=this.createBlankRowNode(t);this.rowNodes.push(o)}},t.prototype.load=function(){this.state=t.STATE_LOADING,this.loadFromDatasource()},t.prototype.pageLoadFailed=function(){this.state=t.STATE_FAILED;var e={type:t.EVENT_LOAD_COMPLETE,success:!1,page:this,lastRow:null};this.dispatchEvent(e)},t.prototype.populateWithRowData=function(e){var t=this,o=[];this.rowNodes.forEach((function(r,i){var n=e[i];r.stub&&o.push(r),t.setDataAndId(r,n,t.startRow+i)})),o.length>0&&this.beans.rowRenderer.redrawRows(o)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.rowNodes.forEach((function(e){e.childrenCache&&(e.childrenCache.destroy(),e.childrenCache=null),e.clearRowTop()}))},t.prototype.pageLoaded=function(e,o,r){e===this.version&&(this.state=t.STATE_LOADED,this.populateWithRowData(o)),r=n._.cleanNumber(r);var i={type:t.EVENT_LOAD_COMPLETE,success:!0,page:this,lastRow:r};this.dispatchEvent(i)},t.EVENT_LOAD_COMPLETE="loadComplete",t.STATE_DIRTY="dirty",t.STATE_LOADING="loading",t.STATE_LOADED="loaded",t.STATE_FAILED="failed",t}(o(8534).BeanStub);t.RowNodeBlock=a},44859:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(83423);t.defaultGroupComparator=function(e,t,o,i,n){void 0===n&&(n=!1),console.warn("ag-Grid: Since ag-grid 11.0.0 defaultGroupComparator is not necessary. You can remove this from your colDef");var s=r._.exists(o)&&o.group,a=r._.exists(i)&&i.group,l=!s&&!a;return s&&a?r._.defaultComparator(o.key,i.key,n):l?r._.defaultComparator(e,t,n):s?1:-1}},44871:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(98239),s=o(72493),a=function(){function e(){}return e.prototype.sizeColumnsToFit=function(e){this.columnController.sizeColumnsToFit(e,"api")},e.prototype.setColumnGroupOpened=function(e,t){this.columnController.setColumnGroupOpened(e,t,"api")},e.prototype.getColumnGroup=function(e,t){return this.columnController.getColumnGroup(e,t)},e.prototype.getOriginalColumnGroup=function(e){return this.columnController.getOriginalColumnGroup(e)},e.prototype.getDisplayNameForColumn=function(e,t){return this.columnController.getDisplayNameForColumn(e,t)},e.prototype.getDisplayNameForColumnGroup=function(e,t){return this.columnController.getDisplayNameForColumnGroup(e,t)},e.prototype.getColumn=function(e){return this.columnController.getPrimaryColumn(e)},e.prototype.setColumnState=function(e){return this.columnController.setColumnState(e,!1,"api")},e.prototype.getColumnState=function(){return this.columnController.getColumnState()},e.prototype.resetColumnState=function(){this.columnController.resetColumnState(!1,"api")},e.prototype.getColumnGroupState=function(){return this.columnController.getColumnGroupState()},e.prototype.setColumnGroupState=function(e){this.columnController.setColumnGroupState(e,"api")},e.prototype.resetColumnGroupState=function(){this.columnController.resetColumnGroupState("api")},e.prototype.isPinning=function(){return this.columnController.isPinningLeft()||this.columnController.isPinningRight()},e.prototype.isPinningLeft=function(){return this.columnController.isPinningLeft()},e.prototype.isPinningRight=function(){return this.columnController.isPinningRight()},e.prototype.getDisplayedColAfter=function(e){return this.columnController.getDisplayedColAfter(e)},e.prototype.getDisplayedColBefore=function(e){return this.columnController.getDisplayedColBefore(e)},e.prototype.setColumnVisible=function(e,t){this.columnController.setColumnVisible(e,t,"api")},e.prototype.setColumnsVisible=function(e,t){this.columnController.setColumnsVisible(e,t,"api")},e.prototype.setColumnPinned=function(e,t){this.columnController.setColumnPinned(e,t,"api")},e.prototype.setColumnsPinned=function(e,t){this.columnController.setColumnsPinned(e,t,"api")},e.prototype.getAllColumns=function(){return this.columnController.getAllPrimaryColumns()},e.prototype.getAllGridColumns=function(){return this.columnController.getAllGridColumns()},e.prototype.getDisplayedLeftColumns=function(){return this.columnController.getDisplayedLeftColumns()},e.prototype.getDisplayedCenterColumns=function(){return this.columnController.getDisplayedCenterColumns()},e.prototype.getDisplayedRightColumns=function(){return this.columnController.getDisplayedRightColumns()},e.prototype.getAllDisplayedColumns=function(){return this.columnController.getAllDisplayedColumns()},e.prototype.getAllDisplayedVirtualColumns=function(){return this.columnController.getAllDisplayedVirtualColumns()},e.prototype.moveColumn=function(e,t){"number"==typeof e?(console.warn("ag-Grid: you are using moveColumn(fromIndex, toIndex) - moveColumn takes a column key and a destination index, not two indexes, to move with indexes use moveColumnByIndex(from,to) instead"),this.columnController.moveColumnByIndex(e,t,"api")):this.columnController.moveColumn(e,t,"api")},e.prototype.moveColumnByIndex=function(e,t){this.columnController.moveColumnByIndex(e,t,"api")},e.prototype.moveColumns=function(e,t){this.columnController.moveColumns(e,t,"api")},e.prototype.moveRowGroupColumn=function(e,t){this.columnController.moveRowGroupColumn(e,t)},e.prototype.setColumnAggFunc=function(e,t){this.columnController.setColumnAggFunc(e,t)},e.prototype.setColumnWidth=function(e,t,o){void 0===o&&(o=!0),this.columnController.setColumnWidth(e,t,!1,o)},e.prototype.setPivotMode=function(e){this.columnController.setPivotMode(e)},e.prototype.isPivotMode=function(){return this.columnController.isPivotMode()},e.prototype.getSecondaryPivotColumn=function(e,t){return this.columnController.getSecondaryPivotColumn(e,t)},e.prototype.setValueColumns=function(e){this.columnController.setValueColumns(e,"api")},e.prototype.getValueColumns=function(){return this.columnController.getValueColumns()},e.prototype.removeValueColumn=function(e){this.columnController.removeValueColumn(e,"api")},e.prototype.removeValueColumns=function(e){this.columnController.removeValueColumns(e,"api")},e.prototype.addValueColumn=function(e){this.columnController.addValueColumn(e,"api")},e.prototype.addValueColumns=function(e){this.columnController.addValueColumns(e,"api")},e.prototype.setRowGroupColumns=function(e){this.columnController.setRowGroupColumns(e,"api")},e.prototype.removeRowGroupColumn=function(e){this.columnController.removeRowGroupColumn(e,"api")},e.prototype.removeRowGroupColumns=function(e){this.columnController.removeRowGroupColumns(e,"api")},e.prototype.addRowGroupColumn=function(e){this.columnController.addRowGroupColumn(e,"api")},e.prototype.addRowGroupColumns=function(e){this.columnController.addRowGroupColumns(e,"api")},e.prototype.getRowGroupColumns=function(){return this.columnController.getRowGroupColumns()},e.prototype.setPivotColumns=function(e){this.columnController.setPivotColumns(e,"api")},e.prototype.removePivotColumn=function(e){this.columnController.removePivotColumn(e,"api")},e.prototype.removePivotColumns=function(e){this.columnController.removePivotColumns(e,"api")},e.prototype.addPivotColumn=function(e){this.columnController.addPivotColumn(e,"api")},e.prototype.addPivotColumns=function(e){this.columnController.addPivotColumns(e,"api")},e.prototype.getPivotColumns=function(){return this.columnController.getPivotColumns()},e.prototype.getLeftDisplayedColumnGroups=function(){return this.columnController.getLeftDisplayedColumnGroups()},e.prototype.getCenterDisplayedColumnGroups=function(){return this.columnController.getCenterDisplayedColumnGroups()},e.prototype.getRightDisplayedColumnGroups=function(){return this.columnController.getRightDisplayedColumnGroups()},e.prototype.getAllDisplayedColumnGroups=function(){return this.columnController.getAllDisplayedColumnGroups()},e.prototype.autoSizeColumn=function(e){return this.columnController.autoSizeColumn(e,"api")},e.prototype.autoSizeColumns=function(e){return this.columnController.autoSizeColumns(e,"api")},e.prototype.autoSizeAllColumns=function(){this.columnController.autoSizeAllColumns("api")},e.prototype.setSecondaryColumns=function(e){this.columnController.setSecondaryColumns(e,"api")},e.prototype.getSecondaryColumns=function(){return this.columnController.getSecondaryColumns()},e.prototype.getPrimaryColumns=function(){return this.columnController.getAllPrimaryColumns()},e.prototype.columnGroupOpened=function(e,t){console.error("ag-Grid: columnGroupOpened no longer exists, use setColumnGroupOpened"),this.setColumnGroupOpened(e,t)},e.prototype.hideColumns=function(e,t){console.error("ag-Grid: hideColumns is deprecated, use setColumnsVisible"),this.columnController.setColumnsVisible(e,!t,"api")},e.prototype.hideColumn=function(e,t){console.error("ag-Grid: hideColumn is deprecated, use setColumnVisible"),this.columnController.setColumnVisible(e,!t,"api")},e.prototype.setState=function(e){return console.error("ag-Grid: setState is deprecated, use setColumnState"),this.setColumnState(e)},e.prototype.getState=function(){return console.error("ag-Grid: getState is deprecated, use getColumnState"),this.getColumnState()},e.prototype.resetState=function(){console.error("ag-Grid: resetState is deprecated, use resetColumnState"),this.resetColumnState()},e.prototype.getAggregationColumns=function(){return console.error("ag-Grid: getAggregationColumns is deprecated, use getValueColumns"),this.columnController.getValueColumns()},e.prototype.removeAggregationColumn=function(e){console.error("ag-Grid: removeAggregationColumn is deprecated, use removeValueColumn"),this.columnController.removeValueColumn(e,"api")},e.prototype.removeAggregationColumns=function(e){console.error("ag-Grid: removeAggregationColumns is deprecated, use removeValueColumns"),this.columnController.removeValueColumns(e,"api")},e.prototype.addAggregationColumn=function(e){console.error("ag-Grid: addAggregationColumn is deprecated, use addValueColumn"),this.columnController.addValueColumn(e,"api")},e.prototype.addAggregationColumns=function(e){console.error("ag-Grid: addAggregationColumns is deprecated, use addValueColumns"),this.columnController.addValueColumns(e,"api")},e.prototype.setColumnAggFunction=function(e,t){console.error("ag-Grid: setColumnAggFunction is deprecated, use setColumnAggFunc"),this.columnController.setColumnAggFunc(e,t,"api")},e.prototype.getDisplayNameForCol=function(e){return console.error("ag-Grid: getDisplayNameForCol is deprecated, use getDisplayNameForColumn"),this.getDisplayNameForColumn(e,null)},r([s.Autowired("columnController"),i("design:type",n.ColumnController)],e.prototype,"columnController",void 0),r([s.Bean("columnApi")],e)}();t.ColumnApi=a},45697:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a,l=o(44081),p=o(72493),u=o(22131),c=o(85910),d=o(47721),h=o(83423);!function(e){e[e.Loading=0]="Loading",e[e.NoRows=1]="NoRows"}(a||(a={}));var f=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return i(t,e),t.prototype.postConstruct=function(){this.gridOptionsWrapper.addLayoutElement(this.eOverlayWrapper),this.setVisible(!1)},t.prototype.setWrapperTypeClass=function(e){h._.addOrRemoveCssClass(this.eOverlayWrapper,"ag-overlay-loading-wrapper",e===a.Loading),h._.addOrRemoveCssClass(this.eOverlayWrapper,"ag-overlay-no-rows-wrapper",e===a.NoRows)},t.prototype.showLoadingOverlay=function(){var e=this;this.setWrapperTypeClass(a.Loading),this.destroyActiveOverlay();var t={api:this.gridOptionsWrapper.getApi()};this.userComponentFactory.newLoadingOverlayComponent(t).then((function(t){e.eOverlayWrapper.appendChild(t.getGui()),e.activeOverlay=t})),this.setVisible(!0)},t.prototype.showNoRowsOverlay=function(){var e=this;this.setWrapperTypeClass(a.NoRows),this.destroyActiveOverlay();var t={api:this.gridOptionsWrapper.getApi()};this.userComponentFactory.newNoRowsOverlayComponent(t).then((function(t){e.eOverlayWrapper.appendChild(t.getGui()),e.activeOverlay=t})),this.setVisible(!0)},t.prototype.destroyActiveOverlay=function(){this.activeOverlay&&(this.activeOverlay.destroy&&this.activeOverlay.destroy(),this.activeOverlay=void 0,h._.clearElement(this.eOverlayWrapper))},t.prototype.hideOverlay=function(){this.destroyActiveOverlay(),this.setVisible(!1)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.destroyActiveOverlay()},t.TEMPLATE='<div class="ag-overlay">\n <div class="ag-overlay-panel" role="presentation">\n <div class="ag-overlay-wrapper" ref="eOverlayWrapper"></div>\n </div>\n </div>',n([p.Autowired("gridOptionsWrapper"),s("design:type",l.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([p.Autowired("userComponentFactory"),s("design:type",c.UserComponentFactory)],t.prototype,"userComponentFactory",void 0),n([d.RefSelector("eOverlayWrapper"),s("design:type",HTMLElement)],t.prototype,"eOverlayWrapper",void 0),n([p.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(u.Component);t.OverlayWrapperComponent=f},45727:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.STEP_EVERYTHING=0,e.STEP_FILTER=1,e.STEP_SORT=2,e.STEP_MAP=3,e.STEP_AGGREGATE=4,e.STEP_PIVOT=5,e.ROW_BUFFER_SIZE=10,e.LAYOUT_INTERVAL=500,e.BATCH_WAIT_MILLIS=50,e.EXPORT_TYPE_DRAG_COPY="dragCopy",e.EXPORT_TYPE_CLIPBOARD="clipboard",e.EXPORT_TYPE_EXCEL="excel",e.EXPORT_TYPE_CSV="csv",e.KEY_BACKSPACE=8,e.KEY_TAB=9,e.KEY_NEW_LINE=10,e.KEY_ENTER=13,e.KEY_SHIFT=16,e.KEY_ESCAPE=27,e.KEY_SPACE=32,e.KEY_LEFT=37,e.KEY_UP=38,e.KEY_RIGHT=39,e.KEY_DOWN=40,e.KEY_DELETE=46,e.KEY_A=65,e.KEY_C=67,e.KEY_V=86,e.KEY_D=68,e.KEY_F2=113,e.KEY_PAGE_UP=33,e.KEY_PAGE_DOWN=34,e.KEY_PAGE_HOME=36,e.KEY_PAGE_END=35,e.ROW_MODEL_TYPE_INFINITE="infinite",e.ROW_MODEL_TYPE_VIEWPORT="viewport",e.ROW_MODEL_TYPE_CLIENT_SIDE="clientSide",e.ROW_MODEL_TYPE_SERVER_SIDE="serverSide",e.DEPRECATED_ROW_MODEL_TYPE_NORMAL="normal",e.ALWAYS="always",e.ONLY_WHEN_GROUPING="onlyWhenGrouping",e.PINNED_TOP="top",e.PINNED_BOTTOM="bottom",e.DOM_LAYOUT_NORMAL="normal",e.DOM_LAYOUT_PRINT="print",e.DOM_LAYOUT_AUTO_HEIGHT="autoHeight",e.GROUP_AUTO_COLUMN_ID="ag-Grid-AutoColumn",e}();t.Constants=o},46379:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.isPopup=function(){return!0},t}(o(22131).Component);t.PopupComponent=n},47008:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=void 0===o.g?{}:o.g;r.HTMLElement="undefined"==typeof HTMLElement?{}:HTMLElement,r.HTMLButtonElement="undefined"==typeof HTMLButtonElement?{}:HTMLButtonElement,r.HTMLSelectElement="undefined"==typeof HTMLSelectElement?{}:HTMLSelectElement,r.HTMLInputElement="undefined"==typeof HTMLInputElement?{}:HTMLInputElement,r.Node="undefined"==typeof Node?{}:Node,r.MouseEvent="undefined"==typeof MouseEvent?{}:MouseEvent;var i=o(7897);t.ColumnFactory=i.ColumnFactory;var n=o(98239);t.ColumnController=n.ColumnController;var s=o(69734);t.ColumnKeyCreator=s.ColumnKeyCreator;var a=o(814);t.ColumnUtils=a.ColumnUtils;var l=o(31887);t.DisplayedGroupCreator=l.DisplayedGroupCreator;var p=o(12598);t.GroupInstanceIdCreator=p.GroupInstanceIdCreator;var u=o(97156);t.ComponentUtil=u.ComponentUtil;var c=o(80834);t.ColDefUtil=c.ColDefUtil;var d=o(36777);t.UserComponentRegistry=d.UserComponentRegistry;var h=o(85910);t.UserComponentFactory=h.UserComponentFactory;var f=o(75013);t.initialiseAgGridWithAngular1=f.initialiseAgGridWithAngular1;var g=o(61862);t.initialiseAgGridWithWebComponents=g.initialiseAgGridWithWebComponents;var m=o(8534);t.BeanStub=m.BeanStub;var y=o(72493);t.Context=y.Context,t.Autowired=y.Autowired,t.PostConstruct=y.PostConstruct,t.PreConstruct=y.PreConstruct,t.Optional=y.Optional,t.Bean=y.Bean,t.Qualifier=y.Qualifier,t.PreDestroy=y.PreDestroy;var v=o(47721);t.QuerySelector=v.QuerySelector,t.Listener=v.Listener,t.RefSelector=v.RefSelector;var C=o(58342);t.DragAndDropService=C.DragAndDropService,t.DragSourceType=C.DragSourceType,t.HDirection=C.HDirection,t.VDirection=C.VDirection;var w=o(25230);t.DragService=w.DragService;var E=o(26016);t.Column=E.Column;var _=o(74517);t.ColumnGroup=_.ColumnGroup;var b=o(34782);t.GridCell=b.GridCell;var R=o(3976);t.GridRow=R.GridRow;var S=o(72948);t.OriginalColumnGroup=S.OriginalColumnGroup;var O=o(15068);t.RowNode=O.RowNode;var T=o(13650);t.BaseFilter=T.BaseFilter;var A=o(34255);t.DateFilter=A.DateFilter;var P=o(55e3);t.FilterManager=P.FilterManager;var I=o(92378);t.NumberFilter=I.NumberFilter;var x=o(99104);t.TextFilter=x.TextFilter;var D=o(64229);t.GridPanel=D.GridPanel;var N=o(13887);t.ScrollVisibleService=N.ScrollVisibleService;var F=o(1571);t.MouseEventService=F.MouseEventService;var M=o(20080);t.BodyDropPivotTarget=M.BodyDropPivotTarget;var k=o(69992);t.BodyDropTarget=k.BodyDropTarget;var L=o(34506);t.CssClassApplier=L.CssClassApplier;var G=o(40706);t.HeaderContainer=G.HeaderContainer;var V=o(89929);t.HeaderRootComp=V.HeaderRootComp;var j=o(15774);t.HeaderRowComp=j.HeaderRowComp;var W=o(97177);t.HorizontalResizeService=W.HorizontalResizeService;var H=o(27887);t.MoveColumnController=H.MoveColumnController;var B=o(42726);t.StandardMenuFactory=B.StandardMenuFactory;var U=o(88333);t.TabbedLayout=U.TabbedLayout;var z=o(72955);t.VerticalStack=z.VerticalStack;var Y=o(7760);t.simpleHttpRequest=Y.simpleHttpRequest;var q=o(49281);t.LargeTextCellEditor=q.LargeTextCellEditor;var K=o(15724);t.PopupEditorWrapper=K.PopupEditorWrapper;var $=o(31923);t.PopupSelectCellEditor=$.PopupSelectCellEditor;var Z=o(5448);t.PopupTextCellEditor=Z.PopupTextCellEditor;var J=o(84715);t.SelectCellEditor=J.SelectCellEditor;var Q=o(71616);t.TextCellEditor=Q.TextCellEditor;var X=o(15959);t.AnimateShowChangeCellRenderer=X.AnimateShowChangeCellRenderer;var ee=o(30811);t.AnimateSlideCellRenderer=ee.AnimateSlideCellRenderer;var te=o(79886);t.GroupCellRenderer=te.GroupCellRenderer;var oe=o(38152);t.SetLeftFeature=oe.SetLeftFeature;var re=o(41832);t.AutoWidthCalculator=re.AutoWidthCalculator;var ie=o(34470);t.CellRendererFactory=ie.CellRendererFactory;var ne=o(95125);t.CheckboxSelectionComponent=ne.CheckboxSelectionComponent;var se=o(23054);t.CellComp=se.CellComp;var ae=o(19378);t.RowComp=ae.RowComp;var le=o(10042);t.RowRenderer=le.RowRenderer;var pe=o(93121);t.ValueFormatterService=pe.ValueFormatterService;var ue=o(24048);t.FilterStage=ue.FilterStage;var ce=o(57498);t.FlattenStage=ce.FlattenStage;var de=o(18954);t.SortStage=de.SortStage;var he=o(50580);t.PinnedRowModel=he.PinnedRowModel;var fe=o(719);t.ClientSideRowModel=fe.ClientSideRowModel;var ge=o(68363);t.ChangedPath=ge.ChangedPath;var me=o(28771);t.ClientSideNodeManager=me.ClientSideNodeManager;var ye=o(30971);t.InfiniteRowModel=ye.InfiniteRowModel;var ve=o(44329);t.RowNodeBlock=ve.RowNodeBlock;var Ce=o(84210);t.RowNodeBlockLoader=Ce.RowNodeBlockLoader;var we=o(41451);t.PaginationProxy=we.PaginationProxy;var Ee=o(65802);t.RowNodeCache=Ee.RowNodeCache;var _e=o(66490);t.StylingService=_e.StylingService;var be=o(21951);t.AgCheckbox=be.AgCheckbox;var Re=o(32090);t.PopupWindow=Re.PopupWindow;var Se=o(57322);t.PopupMessageBox=Se.PopupMessageBox;var Oe=o(22131);t.Component=Oe.Component;var Te=o(46379);t.PopupComponent=Te.PopupComponent;var Ae=o(73575);t.PopupService=Ae.PopupService;var Pe=o(66419);t.TouchListener=Pe.TouchListener;var Ie=o(43460);t.CsvCreator=Ie.CsvCreator,t.BaseCreator=Ie.BaseCreator;var xe=o(33467);t.Downloader=xe.Downloader;var De=o(59873);t.XmlFactory=De.XmlFactory;var Ne=o(42664);t.BaseGridSerializingSession=Ne.BaseGridSerializingSession,t.GridSerializer=Ne.GridSerializer;var Fe=o(42664);t.RowType=Fe.RowType;var Me=o(9018);t.ZipContainer=Me.ZipContainer;var ke=o(86895);t.BaseFrameworkFactory=ke.BaseFrameworkFactory;var Le=o(38427);t.CellNavigationService=Le.CellNavigationService;var Ge=o(10190);t.AlignedGridsService=Ge.AlignedGridsService;var Ve=o(45727);t.Constants=Ve.Constants;var je=o(65360);t.Grid=je.Grid;var We=o(40797);t.GridApi=We.GridApi;var He=o(85222);t.Events=He.Events;var Be=o(42195);t.FocusedCellController=Be.FocusedCellController;var Ue=o(44859);t.defaultGroupComparator=Ue.defaultGroupComparator;var ze=o(44081);t.GridOptionsWrapper=ze.GridOptionsWrapper;var Ye=o(60843);t.EventService=Ye.EventService;var qe=o(4889);t.SelectableService=qe.SelectableService;var Ke=o(81999);t.GridCore=Ke.GridCore;var $e=o(37132);t.Logger=$e.Logger;var Ze=o(54828);t.SelectionController=Ze.SelectionController;var Je=o(86608);t.SortController=Je.SortController;var Qe=o(92427);t.TemplateService=Qe.TemplateService;var Xe=o(83423);t.Utils=Xe.Utils,t.NumberSequence=Xe.NumberSequence,t._=Xe._,t.Promise=Xe.Promise;var et=o(24463);t.ValueService=et.ValueService;var tt=o(40634);t.ExpressionService=tt.ExpressionService;var ot=o(37132);t.LoggerFactory=ot.LoggerFactory;var rt=o(44871);t.ColumnApi=rt.ColumnApi;var it=o(52814);t.BaseComponentWrapper=it.BaseComponentWrapper;var nt=o(59007);t.Environment=nt.Environment;var st=o(39984);t.TooltipManager=st.TooltipManager},47721:(e,t)=>{function o(e,t,o,r){null!==e?"number"!=typeof r?n(t,"querySelectors",{attributeName:o,querySelector:e}):console.error("ag-Grid: QuerySelector should be on an attribute"):console.error("ag-Grid: QuerySelector selector should not be null")}function r(e,t,o){null!==e?n(t,"listenerMethods",{methodName:o,eventName:e}):console.error("ag-Grid: EventListener eventName should not be null")}function i(e,t,o){null!==e?n(t,"methods",{methodName:o,alias:e}):console.error("ag-Grid: EventListener eventName should not be null")}function n(e,t,o){var r=function(e,t){return e.__agComponentMetaData||(e.__agComponentMetaData={}),e.__agComponentMetaData[t]||(e.__agComponentMetaData[t]={}),e.__agComponentMetaData[t]}(e,e.constructor.name);r[t]||(r[t]=[]),r[t].push(o)}Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySelector=function(e){return o.bind(this,e)},t.RefSelector=function(e){return o.bind(this,"[ref="+e+"]")},t.Listener=function(e){return r.bind(this,e)},t.Method=function(e){return i.bind(this,e)}},48011:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(44081),a=o(83423),l=function(){function e(e){this.childCount=0,this.rowTemplatesToAdd=[],this.afterGuiAttachedCallbacks=[],this.lastMadeVisibleTime=0,this.eContainer=e.eContainer,this.eViewport=e.eViewport,e.eWrapper&&(this.eWrapper=e.eWrapper),this.hideWhenNoChildren=e.hideWhenNoChildren}return e.prototype.setVerticalScrollPosition=function(e){this.scrollTop=e},e.prototype.postConstruct=function(){this.checkDomOrder(),this.checkVisibility(),this.gridOptionsWrapper.addEventListener(s.GridOptionsWrapper.PROP_DOM_LAYOUT,this.checkDomOrder.bind(this))},e.prototype.checkDomOrder=function(){this.domOrder=this.gridOptionsWrapper.isEnsureDomOrder()},e.prototype.getRowElement=function(e){return this.eContainer.querySelector('[comp-id="'+e+'"]')},e.prototype.setHeight=function(e){null!=e?(this.eContainer.style.height=e+"px",this.eWrapper&&(this.eWrapper.style.height=e+"px")):this.eContainer.style.height=""},e.prototype.flushRowTemplates=function(){if(0!==this.rowTemplatesToAdd.length){var e=this.rowTemplatesToAdd.join("");a._.appendHtml(this.eContainer,e),this.rowTemplatesToAdd.length=0}this.afterGuiAttachedCallbacks.forEach((function(e){return e()})),this.afterGuiAttachedCallbacks.length=0,this.lastPlacedElement=null},e.prototype.appendRowTemplate=function(e,t){this.domOrder?this.lastPlacedElement=a._.insertTemplateWithDomOrder(this.eContainer,e,this.lastPlacedElement):this.rowTemplatesToAdd.push(e),this.afterGuiAttachedCallbacks.push(t),this.childCount++,this.checkVisibility()},e.prototype.ensureDomOrder=function(e){this.domOrder&&(a._.ensureDomOrder(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)},e.prototype.removeRowElement=function(e){this.eContainer.removeChild(e),this.childCount--,this.checkVisibility()},e.prototype.checkVisibility=function(){if(this.hideWhenNoChildren){var e=this.eViewport?this.eViewport:this.eContainer,t=this.childCount>0;this.visible!==t&&(this.visible=t,this.lastMadeVisibleTime=(new Date).getTime(),a._.setVisible(e,t),t&&this.eViewport&&(this.eViewport.scrollTop=this.scrollTop))}},e.prototype.isMadeVisibleRecently=function(){return(new Date).getTime()-this.lastMadeVisibleTime<500},r([n.Autowired("gridOptionsWrapper"),i("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"postConstruct",null),e}();t.RowContainerComponent=l},49281:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var n=o(46379),s=o(45727),a=o(83423),l=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return i(t,e),t.prototype.init=function(e){this.params=e,this.focusAfterAttached=e.cellStartedEdit,this.textarea=document.createElement("textarea"),this.textarea.maxLength=e.maxLength?e.maxLength:"200",this.textarea.cols=e.cols?e.cols:"60",this.textarea.rows=e.rows?e.rows:"10",a._.exists(e.value)&&(this.textarea.value=e.value.toString()),this.getGui().querySelector(".ag-large-textarea").appendChild(this.textarea),this.addGuiEventListener("keydown",this.onKeyDown.bind(this))},t.prototype.onKeyDown=function(e){var t=e.which||e.keyCode;(t==s.Constants.KEY_LEFT||t==s.Constants.KEY_UP||t==s.Constants.KEY_RIGHT||t==s.Constants.KEY_DOWN||e.shiftKey&&t==s.Constants.KEY_ENTER)&&e.stopPropagation()},t.prototype.afterGuiAttached=function(){this.focusAfterAttached&&this.textarea.focus()},t.prototype.getValue=function(){return this.params.parseValue(this.textarea.value)},t.TEMPLATE='<div class="ag-large-text" tabindex="0"><div class="ag-large-textarea"></div></div>',t}(n.PopupComponent);t.LargeTextCellEditor=l},49498:(e,t,o)=>{t.AgGridReact=o(83684).AgGridReact,o(85397).AgGridColumn},50298:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(44081),l=o(72493),p=function(e){function t(){return e.call(this)||this}return i(t,e),t.prototype.init=function(e){var o=this.gridOptionsWrapper.getOverlayNoRowsTemplate()?this.gridOptionsWrapper.getOverlayNoRowsTemplate():t.DEFAULT_NO_ROWS_TEMPLATE,r=this.gridOptionsWrapper.getLocaleTextFunc(),i=o.replace("[NO_ROWS_TO_SHOW]",r("noRowsToShow","No Rows To Show"));this.setTemplate(i)},t.DEFAULT_NO_ROWS_TEMPLATE='<span class="ag-overlay-no-rows-center">[NO_ROWS_TO_SHOW]</span>',n([l.Autowired("gridOptionsWrapper"),s("design:type",a.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),t}(o(22131).Component);t.NoRowsOverlayComponent=p},50580:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(44081),s=o(15068),a=o(72493),l=o(60843),p=o(85786),u=o(45727),c=o(44871),d=o(40797),h=o(83423),f=function(){function e(){}return e.prototype.init=function(){this.setPinnedTopRowData(this.gridOptionsWrapper.getPinnedTopRowData()),this.setPinnedBottomRowData(this.gridOptionsWrapper.getPinnedBottomRowData())},e.prototype.isEmpty=function(e){var t=e===u.Constants.PINNED_TOP?this.pinnedTopRows:this.pinnedBottomRows;return h._.missingOrEmpty(t)},e.prototype.isRowsToRender=function(e){return!this.isEmpty(e)},e.prototype.getRowAtPixel=function(e,t){var o=t===u.Constants.PINNED_TOP?this.pinnedTopRows:this.pinnedBottomRows;if(h._.missingOrEmpty(o))return 0;for(var r=0;r<o.length;r++){var i=o[r];if(i.rowTop+i.rowHeight-1>=e)return r}return o.length-1},e.prototype.setPinnedTopRowData=function(e){this.pinnedTopRows=this.createNodesFromData(e,!0);var t={type:p.Events.EVENT_PINNED_ROW_DATA_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)},e.prototype.setPinnedBottomRowData=function(e){this.pinnedBottomRows=this.createNodesFromData(e,!1);var t={type:p.Events.EVENT_PINNED_ROW_DATA_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)},e.prototype.createNodesFromData=function(e,t){var o=this,r=[];if(e){var i=0;e.forEach((function(e,n){var a=new s.RowNode;o.context.wireBean(a),a.data=e,a.rowPinned=t?u.Constants.PINNED_TOP:u.Constants.PINNED_BOTTOM,a.setRowTop(i),a.setRowHeight(o.gridOptionsWrapper.getRowHeightForNode(a).height),a.setRowIndex(n),i+=a.rowHeight,r.push(a)}))}return r},e.prototype.getPinnedTopRowData=function(){return this.pinnedTopRows},e.prototype.getPinnedBottomRowData=function(){return this.pinnedBottomRows},e.prototype.getPinnedTopTotalHeight=function(){return this.getTotalHeight(this.pinnedTopRows)},e.prototype.getPinnedTopRowCount=function(){return this.pinnedTopRows?this.pinnedTopRows.length:0},e.prototype.getPinnedBottomRowCount=function(){return this.pinnedBottomRows?this.pinnedBottomRows.length:0},e.prototype.getPinnedTopRow=function(e){return this.pinnedTopRows[e]},e.prototype.getPinnedBottomRow=function(e){return this.pinnedBottomRows[e]},e.prototype.forEachPinnedTopRow=function(e){h._.missingOrEmpty(this.pinnedTopRows)||this.pinnedTopRows.forEach(e)},e.prototype.forEachPinnedBottomRow=function(e){h._.missingOrEmpty(this.pinnedBottomRows)||this.pinnedBottomRows.forEach(e)},e.prototype.getPinnedBottomTotalHeight=function(){return this.getTotalHeight(this.pinnedBottomRows)},e.prototype.getTotalHeight=function(e){if(e&&0!==e.length){var t=e[e.length-1];return t.rowTop+t.rowHeight}return 0},r([a.Autowired("gridOptionsWrapper"),i("design:type",n.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([a.Autowired("eventService"),i("design:type",l.EventService)],e.prototype,"eventService",void 0),r([a.Autowired("context"),i("design:type",a.Context)],e.prototype,"context",void 0),r([a.Autowired("columnApi"),i("design:type",c.ColumnApi)],e.prototype,"columnApi",void 0),r([a.Autowired("gridApi"),i("design:type",d.GridApi)],e.prototype,"gridApi",void 0),r([a.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),r([a.Bean("pinnedRowModel")],e)}();t.PinnedRowModel=f},51755:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(8534),l=o(72493),p=o(60843),u=o(85222),c=o(83423),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.scrollY=0,t.uiBodyHeight=0,t}return i(t,e),t.prototype.postConstruct=function(){this.addDestroyableEventListener(this.eventService,u.Events.EVENT_BODY_HEIGHT_CHANGED,this.updateOffset.bind(this)),this.scrollBarWidth=c._.getScrollbarWidth(),this.maxDivHeight=c._.getMaxDivHeight()},t.prototype.registerGridComp=function(e){this.gridPanel=e},t.prototype.isScaling=function(){return this.scaling},t.prototype.getOffset=function(){return this.offset},t.prototype.updateOffset=function(){if(this.scaling){var e=this.gridPanel.getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}},t.prototype.calculateOffset=function(){this.uiContainerHeight=this.maxDivHeight,this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;var e=this.scrollY/this.maxScrollY;this.setOffset(e*this.pixelsToShave)},t.prototype.clearOffset=function(){this.uiContainerHeight=this.modelHeight,this.pixelsToShave=0,this.setOffset(0)},t.prototype.setOffset=function(e){var t="number"==typeof e?Math.floor(e):null;this.offset!==t&&(this.offset=t,this.eventService.dispatchEvent({type:u.Events.EVENT_HEIGHT_SCALE_CHANGED}))},t.prototype.setModelHeight=function(e){this.modelHeight=e,this.scaling=this.maxDivHeight>0&&e>this.maxDivHeight,this.scaling?this.calculateOffset():this.clearOffset()},t.prototype.getUiContainerHeight=function(){return this.uiContainerHeight},t.prototype.getRealPixelPosition=function(e){return e-this.offset},t.prototype.getUiBodyHeight=function(){var e=this.gridPanel.getVScrollPosition();return e.bottom-e.top},t.prototype.getScrollPositionForPixel=function(e){if(this.pixelsToShave<=0)return e;var t=e/(this.modelHeight-this.getUiBodyHeight());return this.maxScrollY*t},n([l.Autowired("eventService"),s("design:type",p.EventService)],t.prototype,"eventService",void 0),n([l.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),n([l.Bean("maxDivHeightScaler")],t)}(a.BeanStub);t.MaxDivHeightScaler=d},52814:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.prototype.wrap=function(e,t,o,r){var i=this;void 0===o&&(o=[]);var n=this.createWrapper(e,r);return t.forEach((function(e){i.createMethod(n,e,!0)})),o.forEach((function(e){i.createMethod(n,e,!1)})),n},e.prototype.createMethod=function(e,t,o){e.addMethod(t,this.createMethodProxy(e,t,o))},e.prototype.createMethodProxy=function(e,t,o){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(o&&console.warn("ag-Grid: Framework component is missing the method "+t+"()"),null)}},e}();t.BaseComponentWrapper=o},54828:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},n=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(72493),a=o(72493),l=o(37132),p=o(60843),u=o(85786),c=o(72493),d=o(44081),h=o(72493),f=o(45727),g=o(44871),m=o(40797),y=o(83423),v=o(68363),C=function(){function e(){}return e.prototype.setBeans=function(e){this.logger=e.create("SelectionController"),this.reset(),this.gridOptionsWrapper.isRowModelDefault()?this.eventService.addEventListener(u.Events.EVENT_ROW_DATA_CHANGED,this.reset.bind(this)):this.logger.log("dont know what to do here")},e.prototype.init=function(){this.groupSelectsChildren=this.gridOptionsWrapper.isGroupSelectsChildren(),this.eventService.addEventListener(u.Events.EVENT_ROW_SELECTED,this.onRowSelected.bind(this))},e.prototype.setLastSelectedNode=function(e){this.lastSelectedNode=e},e.prototype.getLastSelectedNode=function(){return this.lastSelectedNode},e.prototype.getSelectedNodes=function(){var e=[];return y._.iterateObject(this.selectedNodes,(function(t,o){o&&e.push(o)})),e},e.prototype.getSelectedRows=function(){var e=[];return y._.iterateObject(this.selectedNodes,(function(t,o){o&&o.data&&e.push(o.data)})),e},e.prototype.removeGroupsFromSelection=function(){var e=this;y._.iterateObject(this.selectedNodes,(function(t,o){o&&o.group&&(e.selectedNodes[o.id]=void 0)}))},e.prototype.updateGroupsFromChildrenSelections=function(e){if(this.gridOptionsWrapper.isGroupSelectsChildren()&&this.rowModel.getType()===f.Constants.ROW_MODEL_TYPE_CLIENT_SIDE){var t=this.rowModel.getRootNode();e||(e=new v.ChangedPath(!0,t)).setInactive(),e.forEachChangedNodeDepthFirst((function(e){e!==t&&e.calculateSelectedFromChildren()}))}},e.prototype.getNodeForIdIfSelected=function(e){return this.selectedNodes[e]},e.prototype.clearOtherNodes=function(e){var t=this,o={},r=0;return y._.iterateObject(this.selectedNodes,(function(i,n){if(n&&n.id!==e.id){var s=t.selectedNodes[n.id];r+=s.setSelectedParams({newValue:!1,clearSelection:!1,suppressFinishActions:!0}),t.groupSelectsChildren&&n.parent&&(o[n.parent.id]=n.parent)}})),y._.iterateObject(o,(function(e,t){t.calculateSelectedFromChildren()})),r},e.prototype.onRowSelected=function(e){var t=e.node;this.groupSelectsChildren&&t.group||(t.isSelected()?this.selectedNodes[t.id]=t:this.selectedNodes[t.id]=void 0)},e.prototype.syncInRowNode=function(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)},e.prototype.syncInOldRowNode=function(e,t){y._.exists(t)&&e.id!==t.id&&y._.exists(this.selectedNodes[t.id])&&(this.selectedNodes[t.id]=t)},e.prototype.syncInNewRowNode=function(e){y._.exists(this.selectedNodes[e.id])?(e.setSelectedInitialValue(!0),this.selectedNodes[e.id]=e):e.setSelectedInitialValue(!1)},e.prototype.reset=function(){this.logger.log("reset"),this.selectedNodes={},this.lastSelectedNode=null},e.prototype.getBestCostNodeSelection=function(){this.rowModel.getType()!==f.Constants.ROW_MODEL_TYPE_CLIENT_SIDE&&console.warn("getBestCostNodeSelection is only available when using normal row model");var e=this.rowModel.getTopLevelNodes();if(null!==e){var t=[];return function e(o){for(var r=0,i=o.length;r<i;r++){var n=o[r];n.isSelected()?t.push(n):n.group&&n.children&&e(n.children)}}(e),t}console.warn("selectAll not available doing rowModel=virtual")},e.prototype.setRowModel=function(e){this.rowModel=e},e.prototype.isEmpty=function(){var e=0;return y._.iterateObject(this.selectedNodes,(function(t,o){o&&e++})),0===e},e.prototype.deselectAllRowNodes=function(e){void 0===e&&(e=!1);var t=function(e){return e.selectThisNode(!1)},o=this.rowModel.getType()===f.Constants.ROW_MODEL_TYPE_CLIENT_SIDE;if(e){if(!o)return void console.error("ag-Grid: selecting just filtered only works with In Memory Row Model");this.rowModel.forEachNodeAfterFilter(t)}else y._.iterateObject(this.selectedNodes,(function(e,o){o&&t(o)})),this.reset();o&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections();var r={type:u.Events.EVENT_SELECTION_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(r)},e.prototype.selectAllRowNodes=function(e){if(void 0===e&&(e=!1),this.rowModel.getType()!==f.Constants.ROW_MODEL_TYPE_CLIENT_SIDE)throw new Error("selectAll only available with normal row model, ie not "+this.rowModel.getType());var t=this.rowModel,o=function(e){return e.selectThisNode(!0)};e?t.forEachNodeAfterFilter(o):t.forEachNode(o),this.rowModel.getType()===f.Constants.ROW_MODEL_TYPE_CLIENT_SIDE&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections();var r={type:u.Events.EVENT_SELECTION_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(r)},e.prototype.selectNode=function(e,t){e&&e.setSelectedParams({newValue:!0,clearSelection:!t})},e.prototype.deselectIndex=function(e){var t=this.rowModel.getRow(e);this.deselectNode(t)},e.prototype.deselectNode=function(e){e&&e.setSelectedParams({newValue:!1,clearSelection:!1})},e.prototype.selectIndex=function(e,t){var o=this.rowModel.getRow(e);this.selectNode(o,t)},r([c.Autowired("eventService"),i("design:type",p.EventService)],e.prototype,"eventService",void 0),r([c.Autowired("rowModel"),i("design:type",Object)],e.prototype,"rowModel",void 0),r([c.Autowired("gridOptionsWrapper"),i("design:type",d.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([c.Autowired("columnApi"),i("design:type",g.ColumnApi)],e.prototype,"columnApi",void 0),r([c.Autowired("gridApi"),i("design:type",m.GridApi)],e.prototype,"gridApi",void 0),r([n(0,a.Qualifier("loggerFactory")),i("design:type",Function),i("design:paramtypes",[l.LoggerFactory]),i("design:returntype",void 0)],e.prototype,"setBeans",null),r([h.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),r([s.Bean("selectionController")],e)}();t.SelectionController=C},55e3:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(83423),s=o(44081),a=o(73575),l=o(24463),p=o(98239),u=o(44871),c=o(72493),d=o(60843),h=o(85786),f=o(40797),g=o(85910),m=function(){function e(){this.allFilters={},this.quickFilter=null,this.quickFilterParts=null}var t;return t=e,e.prototype.registerGridCore=function(e){this.gridCore=e},e.prototype.init=function(){this.eventService.addEventListener(h.Events.EVENT_ROW_DATA_CHANGED,this.onNewRowsLoaded.bind(this)),this.eventService.addEventListener(h.Events.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.quickFilter=this.parseQuickFilter(this.gridOptionsWrapper.getQuickFilterText()),this.setQuickFilterParts(),this.checkExternalFilter()},e.prototype.setQuickFilterParts=function(){this.quickFilter?this.quickFilterParts=this.quickFilter.split(" "):this.quickFilterParts=null},e.prototype.setFilterModel=function(e){var t=this,o=[];if(e){var r=Object.keys(e);n._.iterateObject(this.allFilters,(function(i,s){n._.removeFromArray(r,i);var a=e[i];t.setModelOnFilterWrapper(s.filterPromise,a),o.push(s.filterPromise)})),n._.iterateArray(r,(function(r){var i=t.columnController.getPrimaryColumn(r);if(i){var n=t.getOrCreateFilterWrapper(i,"NO_UI");t.setModelOnFilterWrapper(n.filterPromise,e[r]),o.push(n.filterPromise)}else console.warn("Warning ag-grid setFilterModel - no column found for colId "+r)}))}else n._.iterateObject(this.allFilters,(function(e,r){t.setModelOnFilterWrapper(r.filterPromise,null),o.push(r.filterPromise)}));n.Promise.all(o).then((function(e){t.onFilterChanged()}))},e.prototype.setModelOnFilterWrapper=function(e,t){e.then((function(e){"function"==typeof e.setModel?e.setModel(t):console.warn("Warning ag-grid - filter missing setModel method, which is needed for setFilterModel")}))},e.prototype.getFilterModel=function(){var e={};return n._.iterateObject(this.allFilters,(function(t,o){var r=o.filterPromise.resolveNow(null,(function(e){return e}));if(null==r)return null;if("function"==typeof r.getModel){var i=r.getModel();n._.exists(i)&&(e[t]=i)}else console.warn("Warning ag-grid - filter API missing getModel method, which is needed for getFilterModel")})),e},e.prototype.isAdvancedFilterPresent=function(){return this.advancedFilterPresent},e.prototype.setAdvancedFilterPresent=function(){var e=!1;n._.iterateObject(this.allFilters,(function(t,o){o.filterPromise.resolveNow(!1,(function(e){return e.isFilterActive()}))&&(e=!0)})),this.advancedFilterPresent=e},e.prototype.updateFilterFlagInColumns=function(e){n._.iterateObject(this.allFilters,(function(t,o){var r=o.filterPromise.resolveNow(!1,(function(e){return e.isFilterActive()}));o.column.setFilterActive(r,e)}))},e.prototype.isAnyFilterPresent=function(){return this.isQuickFilterPresent()||this.advancedFilterPresent||this.externalFilterPresent},e.prototype.doesFilterPass=function(e,t){for(var o=e.data,r=Object.keys(this.allFilters),i=0,n=r.length;i<n;i++){var s=r[i],a=this.allFilters[s];if(void 0!==a){var l=a.filterPromise.resolveNow(void 0,(function(e){return e}));if(void 0!==l&&l!==t&&l.isFilterActive()){l.doesFilterPass||console.error("Filter is missing method doesFilterPass");var p={node:e,data:o};if(!l.doesFilterPass(p))return!1}}}return!0},e.prototype.parseQuickFilter=function(e){return n._.missing(e)||""===e?null:this.gridOptionsWrapper.isRowModelDefault()?e.toUpperCase():(console.warn("ag-grid: quick filtering only works with the Client-side Row Model"),null)},e.prototype.setQuickFilter=function(e){var t=this.parseQuickFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setQuickFilterParts(),this.onFilterChanged())},e.prototype.checkExternalFilter=function(){this.externalFilterPresent=this.gridOptionsWrapper.isExternalFilterPresent()},e.prototype.onFilterChanged=function(){this.setAdvancedFilterPresent(),this.updateFilterFlagInColumns("filterChanged"),this.checkExternalFilter(),n._.iterateObject(this.allFilters,(function(e,t){t.filterPromise.then((function(e){e.onAnyFilterChanged&&e.onAnyFilterChanged()}))}));var e={type:h.Events.EVENT_FILTER_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(e)},e.prototype.isQuickFilterPresent=function(){return null!==this.quickFilter},e.prototype.doesRowPassOtherFilters=function(e,t){return this.doesRowPassFilter(t,e)},e.prototype.doesRowPassQuickFilterNoCache=function(e,t){var o=this,r=this.columnController.getAllColumnsForQuickFilter(),i=!1;return r.forEach((function(r){if(!i){var s=o.getQuickFilterTextForColumn(r,e);n._.exists(s)&&s.indexOf(t)>=0&&(i=!0)}})),i},e.prototype.doesRowPassQuickFilterCache=function(e,t){return e.quickFilterAggregateText||this.aggregateRowForQuickFilter(e),e.quickFilterAggregateText.indexOf(t)>=0},e.prototype.doesRowPassQuickFilter=function(e){var t=this,o=!0,r=this.gridOptionsWrapper.isCacheQuickFilter();return this.quickFilterParts.forEach((function(i){(r?t.doesRowPassQuickFilterCache(e,i):t.doesRowPassQuickFilterNoCache(e,i))||(o=!1)})),o},e.prototype.doesRowPassFilter=function(e,t){return!(this.isQuickFilterPresent()&&!this.doesRowPassQuickFilter(e)||this.externalFilterPresent&&!this.gridOptionsWrapper.doesExternalFilterPass(e)||this.advancedFilterPresent&&!this.doesFilterPass(e,t))},e.prototype.getQuickFilterTextForColumn=function(e,t){var o,r=this.valueService.getValue(e,t,!0),i=e.getColDef();if(e.getColDef().getQuickFilterText){var s={value:r,node:t,data:t.data,column:e,colDef:i};o=e.getColDef().getQuickFilterText(s)}else o=r;return n._.exists(o)?o.toString().toUpperCase():null},e.prototype.aggregateRowForQuickFilter=function(e){var o=this,r=[];this.columnController.getAllColumnsForQuickFilter().forEach((function(t){var i=o.getQuickFilterTextForColumn(t,e);n._.exists(i)&&r.push(i)})),e.quickFilterAggregateText=r.join(t.QUICK_FILTER_SEPARATOR)},e.prototype.onNewRowsLoaded=function(e){n._.iterateObject(this.allFilters,(function(e,t){t.filterPromise.then((function(e){e.onNewRowsLoaded&&e.onNewRowsLoaded()}))})),this.updateFilterFlagInColumns(e),this.setAdvancedFilterPresent()},e.prototype.createValueGetter=function(e){var t=this;return function(o){return t.valueService.getValue(e,o,!0)}},e.prototype.getFilterComponent=function(e,t){return this.getOrCreateFilterWrapper(e,t).filterPromise},e.prototype.isFilterActive=function(e){var t=this.cachedFilter(e);return!!t&&t.filterPromise.resolveNow(!1,(function(e){return e.isFilterActive()}))},e.prototype.getOrCreateFilterWrapper=function(e,t){var o=this.cachedFilter(e);return o?"NO_UI"!==t&&this.putIntoGui(o,t):(o=this.createFilterWrapper(e,t),this.allFilters[e.getColId()]=o),o},e.prototype.cachedFilter=function(e){return this.allFilters[e.getColId()]},e.prototype.createFilterInstance=function(e,t){var o=this,r="agTextColumnFilter";this.gridOptionsWrapper.isEnterprise()&&(r="agSetColumnFilter");var i=n._.cloneObject(e.getColDef()),s={type:h.Events.EVENT_FILTER_MODIFIED,api:this.gridApi,columnApi:this.columnApi},a=this.onFilterChanged.bind(this),l={api:this.gridOptionsWrapper.getApi(),column:e,colDef:i,rowModel:this.rowModel,filterChangedCallback:a,filterModifiedCallback:function(){return o.eventService.dispatchEvent(s)},valueGetter:this.createValueGetter(e),context:this.gridOptionsWrapper.getContext(),doesRowPassOtherFilter:null,$scope:t};return this.userComponentFactory.newFilterComponent(i,l,r,(function(e,t){return n._.assign(e,{doesRowPassOtherFilter:o.doesRowPassOtherFilters.bind(o,t)})}))},e.prototype.createFilterWrapper=function(e,t){var o={column:e,filterPromise:null,scope:null,compiledElement:null,guiPromise:n.Promise.external()};return o.scope=this.gridOptionsWrapper.isAngularCompileFilters()?this.$scope.$new():null,o.filterPromise=this.createFilterInstance(e,o.scope),this.putIntoGui(o,t),o},e.prototype.putIntoGui=function(e,t){var o=this,r=document.createElement("div");r.className="ag-filter",e.filterPromise.then((function(i){var s=i.getGui();if(n._.missing(s)&&console.warn("getGui method from filter returned "+s+", it should be a DOM element or an HTML template string."),"string"==typeof s&&(s=n._.loadTemplate(s)),r.appendChild(s),e.scope){var a=o.$compile(r)(e.scope);e.compiledElement=a,window.setTimeout((function(){return e.scope.$apply()}),0)}e.guiPromise.resolve(r),o.eventService.dispatchEvent({type:h.Events.EVENT_FILTER_OPENED,column:e.column,source:t,eGui:r,api:o.gridApi,columnApi:o.columnApi})}))},e.prototype.onNewColumnsLoaded=function(){var e=this,t=!1;n._.iterateObject(this.allFilters,(function(o,r){!e.columnController.getPrimaryColumn(r.column)&&(t=!0,e.disposeFilterWrapper(r,"filterDestroyed"))})),t&&this.onFilterChanged()},e.prototype.destroyFilter=function(e,t){void 0===t&&(t="api");var o=this.allFilters[e.getColId()];o&&(this.disposeFilterWrapper(o,t),this.onFilterChanged())},e.prototype.disposeFilterWrapper=function(e,t){var o=this;e.filterPromise.then((function(r){r.setModel(null),r.destroy&&r.destroy(),e.column.setFilterActive(!1,t),e.scope&&(e.compiledElement&&e.compiledElement.remove(),e.scope.$destroy()),delete o.allFilters[e.column.getColId()]}))},e.prototype.destroy=function(){var e=this;n._.iterateObject(this.allFilters,(function(t,o){e.disposeFilterWrapper(o,"filterDestroyed")}))},e.QUICK_FILTER_SEPARATOR="\n",r([c.Autowired("$compile"),i("design:type",Object)],e.prototype,"$compile",void 0),r([c.Autowired("$scope"),i("design:type",Object)],e.prototype,"$scope",void 0),r([c.Autowired("gridOptionsWrapper"),i("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([c.Autowired("popupService"),i("design:type",a.PopupService)],e.prototype,"popupService",void 0),r([c.Autowired("valueService"),i("design:type",l.ValueService)],e.prototype,"valueService",void 0),r([c.Autowired("columnController"),i("design:type",p.ColumnController)],e.prototype,"columnController",void 0),r([c.Autowired("rowModel"),i("design:type",Object)],e.prototype,"rowModel",void 0),r([c.Autowired("eventService"),i("design:type",d.EventService)],e.prototype,"eventService",void 0),r([c.Autowired("enterprise"),i("design:type",Boolean)],e.prototype,"enterprise",void 0),r([c.Autowired("context"),i("design:type",c.Context)],e.prototype,"context",void 0),r([c.Autowired("columnApi"),i("design:type",u.ColumnApi)],e.prototype,"columnApi",void 0),r([c.Autowired("gridApi"),i("design:type",f.GridApi)],e.prototype,"gridApi",void 0),r([c.Autowired("userComponentFactory"),i("design:type",g.UserComponentFactory)],e.prototype,"userComponentFactory",void 0),r([c.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),r([c.PreDestroy,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"destroy",null),t=r([c.Bean("filterManager")],e)}();t.FilterManager=m},55090:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(44871),a=o(98239),l=o(40797),p=o(44081),u=o(40634),c=o(10042),d=o(92427),h=o(24463),f=o(60843),g=o(64314),m=o(42195),y=o(34470),v=o(73575),C=o(93121),w=o(66490),E=o(93830),_=o(41451),b=o(69065),R=o(85910),S=o(58342),O=o(86608),T=o(55e3),A=o(51755),P=o(39984),I=function(){function e(){}return e.prototype.registerGridComp=function(e){this.gridPanel=e},e.prototype.postConstruct=function(){this.doingMasterDetail=this.gridOptionsWrapper.isMasterDetail()},r([n.Autowired("paginationProxy"),i("design:type",_.PaginationProxy)],e.prototype,"paginationProxy",void 0),r([n.Autowired("context"),i("design:type",n.Context)],e.prototype,"context",void 0),r([n.Autowired("columnApi"),i("design:type",s.ColumnApi)],e.prototype,"columnApi",void 0),r([n.Autowired("gridApi"),i("design:type",l.GridApi)],e.prototype,"gridApi",void 0),r([n.Autowired("gridOptionsWrapper"),i("design:type",p.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.Autowired("expressionService"),i("design:type",u.ExpressionService)],e.prototype,"expressionService",void 0),r([n.Autowired("rowRenderer"),i("design:type",c.RowRenderer)],e.prototype,"rowRenderer",void 0),r([n.Autowired("$compile"),i("design:type",Object)],e.prototype,"$compile",void 0),r([n.Autowired("templateService"),i("design:type",d.TemplateService)],e.prototype,"templateService",void 0),r([n.Autowired("valueService"),i("design:type",h.ValueService)],e.prototype,"valueService",void 0),r([n.Autowired("eventService"),i("design:type",f.EventService)],e.prototype,"eventService",void 0),r([n.Autowired("columnController"),i("design:type",a.ColumnController)],e.prototype,"columnController",void 0),r([n.Autowired("columnAnimationService"),i("design:type",g.ColumnAnimationService)],e.prototype,"columnAnimationService",void 0),r([n.Optional("rangeController"),i("design:type",Object)],e.prototype,"rangeController",void 0),r([n.Autowired("focusedCellController"),i("design:type",m.FocusedCellController)],e.prototype,"focusedCellController",void 0),r([n.Optional("contextMenuFactory"),i("design:type",Object)],e.prototype,"contextMenuFactory",void 0),r([n.Autowired("cellRendererFactory"),i("design:type",y.CellRendererFactory)],e.prototype,"cellRendererFactory",void 0),r([n.Autowired("popupService"),i("design:type",v.PopupService)],e.prototype,"popupService",void 0),r([n.Autowired("valueFormatterService"),i("design:type",C.ValueFormatterService)],e.prototype,"valueFormatterService",void 0),r([n.Autowired("stylingService"),i("design:type",w.StylingService)],e.prototype,"stylingService",void 0),r([n.Autowired("columnHoverService"),i("design:type",E.ColumnHoverService)],e.prototype,"columnHoverService",void 0),r([n.Autowired("enterprise"),i("design:type",Boolean)],e.prototype,"enterprise",void 0),r([n.Autowired("userComponentFactory"),i("design:type",R.UserComponentFactory)],e.prototype,"userComponentFactory",void 0),r([n.Autowired("animationFrameService"),i("design:type",b.AnimationFrameService)],e.prototype,"taskQueue",void 0),r([n.Autowired("dragAndDropService"),i("design:type",S.DragAndDropService)],e.prototype,"dragAndDropService",void 0),r([n.Autowired("sortController"),i("design:type",O.SortController)],e.prototype,"sortController",void 0),r([n.Autowired("filterManager"),i("design:type",T.FilterManager)],e.prototype,"filterManager",void 0),r([n.Autowired("maxDivHeightScaler"),i("design:type",A.MaxDivHeightScaler)],e.prototype,"maxDivHeightScaler",void 0),r([n.Autowired("tooltipManager"),i("design:type",P.TooltipManager)],e.prototype,"tooltipManager",void 0),r([n.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"postConstruct",null),r([n.Bean("beans")],e)}();t.Beans=I},57322:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(32090),l=o(72493),p=o(22131),u=o(47721),c=function(e){function t(t,o){var r=e.call(this)||this;return r.title=t,r.message=o,r}return i(t,e),t.prototype.postConstruct=function(){var t=this;e.prototype.postConstruct.call(this),this.setTitle(this.title);var o=new d;this.addFeature(this.getContext(),o),o.setMessage(this.message),this.setBody(o.getGui()),this.addDestroyableEventListener(o,"onBtOk",(function(){return t.closePopup()}))},t}(a.PopupWindow);t.PopupMessageBox=c;var d=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return i(t,e),t.prototype.setMessage=function(e){this.eCenter.innerText=e},t.prototype.postConstruct=function(){this.addDestroyableEventListener(this.eOk,"click",this.onBtOk.bind(this))},t.prototype.onBtOk=function(){this.dispatchEvent({type:"onBtOk"})},t.TEMPLATE='<div>\n <div ref="eCenter"></div>\n <div ref="eButtons">\n <button ref="eOk">OK</button>\n </div>\n </div>',n([u.RefSelector("eCenter"),s("design:type",HTMLElement)],t.prototype,"eCenter",void 0),n([u.RefSelector("eOk"),s("design:type",HTMLElement)],t.prototype,"eOk",void 0),n([l.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(p.Component)},57498:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(15068),a=o(44081),l=o(54828),p=o(60843),u=o(98239),c=o(83423),d=function(){function e(){}return e.prototype.execute=function(e){var t=e.rowNode,o=[],r={value:0},i=this.columnController.isPivotMode(),n=i&&t.leafGroup,s=n?[t]:t.childrenAfterSort;return this.recursivelyAddToRowsToDisplay(s,o,r,i,0),!n&&this.gridOptionsWrapper.isGroupIncludeTotalFooter()&&(this.ensureFooterNodeExists(t),this.addRowNodeToRowsToDisplay(t.sibling,o,r,0)),o},e.prototype.recursivelyAddToRowsToDisplay=function(e,t,o,r,i){if(!c._.missingOrEmpty(e))for(var n=this.gridOptionsWrapper.isGroupSuppressRow(),s=this.gridOptionsWrapper.isGroupHideOpenParents(),a=this.gridOptionsWrapper.isGroupRemoveSingleChildren(),l=!a&&this.gridOptionsWrapper.isGroupRemoveLowestSingleChildren(),p=0;p<e.length;p++){var u=e[p],d=u.hasChildren(),h=n&&d,f=r&&!d,g=a&&d&&1===u.childrenAfterGroup.length,m=l&&d&&u.leafGroup&&1===u.childrenAfterGroup.length,y=r&&u.leafGroup,v=s&&u.expanded&&!y;if(!(f||h||v||g||m)&&this.addRowNodeToRowsToDisplay(u,t,o,i),!r||!u.leafGroup)if(d){var C=g||m;if(u.expanded||C){var w=C?i:i+1;this.recursivelyAddToRowsToDisplay(u.childrenAfterSort,t,o,r,w),this.gridOptionsWrapper.isGroupIncludeFooter()&&(this.ensureFooterNodeExists(u),this.addRowNodeToRowsToDisplay(u.sibling,t,o,i))}}else if(u.master&&u.expanded){var E=this.createDetailNode(u);this.addRowNodeToRowsToDisplay(E,t,o,i)}}},e.prototype.addRowNodeToRowsToDisplay=function(e,t,o,r){t.push(e);var i=this.gridOptionsWrapper.isGroupMultiAutoColumn();e.setUiLevel(i?0:r)},e.prototype.ensureFooterNodeExists=function(e){if(!c._.exists(e.sibling)){var t=new s.RowNode;this.context.wireBean(t),Object.keys(e).forEach((function(o){t[o]=e[o]})),t.footer=!0,t.rowTop=null,t.oldRowTop=null,c._.exists(t.id)&&(t.id="rowGroupFooter_"+t.id),t.sibling=e,e.sibling=t}},e.prototype.createDetailNode=function(e){if(c._.exists(e.detailNode))return e.detailNode;var t=new s.RowNode;return this.context.wireBean(t),t.detail=!0,t.selectable=!1,t.flower=t.detail,t.parent=e,c._.exists(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,e.childFlower=e.detailNode,t},r([n.Autowired("gridOptionsWrapper"),i("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.Autowired("selectionController"),i("design:type",l.SelectionController)],e.prototype,"selectionController",void 0),r([n.Autowired("eventService"),i("design:type",p.EventService)],e.prototype,"eventService",void 0),r([n.Autowired("context"),i("design:type",n.Context)],e.prototype,"context",void 0),r([n.Autowired("columnController"),i("design:type",u.ColumnController)],e.prototype,"columnController",void 0),r([n.Bean("flattenStage")],e)}();t.FlattenStage=d},58342:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},n=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s,a,l,p=o(37132),u=o(72493),c=o(44081),d=o(25230),h=o(98239),f=o(59007),g=o(83423);!function(e){e[e.ToolPanel=0]="ToolPanel",e[e.HeaderCell=1]="HeaderCell",e[e.RowDrag=2]="RowDrag"}(s=t.DragSourceType||(t.DragSourceType={})),function(e){e[e.Up=0]="Up",e[e.Down=1]="Down"}(a=t.VDirection||(t.VDirection={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(l=t.HDirection||(t.HDirection={}));var m=function(){function e(){this.dragSourceAndParamsList=[],this.dropTargets=[]}var t;return t=e,e.prototype.init=function(){this.ePinnedIcon=g._.createIcon("columnMovePin",this.gridOptionsWrapper,null),this.ePlusIcon=g._.createIcon("columnMoveAdd",this.gridOptionsWrapper,null),this.eHiddenIcon=g._.createIcon("columnMoveHide",this.gridOptionsWrapper,null),this.eMoveIcon=g._.createIcon("columnMoveMove",this.gridOptionsWrapper,null),this.eLeftIcon=g._.createIcon("columnMoveLeft",this.gridOptionsWrapper,null),this.eRightIcon=g._.createIcon("columnMoveRight",this.gridOptionsWrapper,null),this.eGroupIcon=g._.createIcon("columnMoveGroup",this.gridOptionsWrapper,null),this.eAggregateIcon=g._.createIcon("columnMoveValue",this.gridOptionsWrapper,null),this.ePivotIcon=g._.createIcon("columnMovePivot",this.gridOptionsWrapper,null),this.eDropNotAllowedIcon=g._.createIcon("dropNotAllowed",this.gridOptionsWrapper,null)},e.prototype.setBeans=function(e){this.logger=e.create("OldToolPanelDragAndDropService")},e.prototype.getStringType=function(e){switch(e){case s.RowDrag:return"row";case s.HeaderCell:return"headerCell";case s.ToolPanel:return"toolPanel";default:return console.warn("ag-Grid: bug - unknown drag type "+e),null}},e.prototype.addDragSource=function(e,t){void 0===t&&(t=!1);var o={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this)};this.dragSourceAndParamsList.push({params:o,dragSource:e}),this.dragService.addDragSource(o,t)},e.prototype.removeDragSource=function(e){var t=g._.find(this.dragSourceAndParamsList,(function(t){return t.dragSource===e}));t&&(this.dragService.removeDragSource(t.params),g._.removeFromArray(this.dragSourceAndParamsList,t))},e.prototype.destroy=function(){var e=this;this.dragSourceAndParamsList.forEach((function(t){e.dragService.removeDragSource(t.params)})),this.dragSourceAndParamsList.length=0},e.prototype.nudge=function(){this.dragging&&this.onDragging(this.eventLastTime,!0)},e.prototype.onDragStart=function(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=this.dragSource.dragItemCallback(),this.lastDropTarget=this.dragSource.dragSourceDropTarget,this.dragSource.dragStarted&&this.dragSource.dragStarted(),this.createGhost()},e.prototype.onDragStop=function(e){if(this.eventLastTime=null,this.dragging=!1,this.dragSource.dragStopped&&this.dragSource.dragStopped(),this.lastDropTarget&&this.lastDropTarget.onDragStop){var t=this.createDropTargetEvent(this.lastDropTarget,e,null,null,!1);this.lastDropTarget.onDragStop(t)}this.lastDropTarget=null,this.dragItem=null,this.removeGhost()},e.prototype.onDragging=function(e,t){var o=this.workOutHDirection(e),r=this.workOutVDirection(e);this.eventLastTime=e,this.positionGhost(e);var i=g._.find(this.dropTargets,this.isMouseOnDropTarget.bind(this,e));if(i!==this.lastDropTarget)this.leaveLastTargetIfExists(e,o,r,t),this.enterDragTargetIfExists(i,e,o,r,t),this.lastDropTarget=i;else if(i){var n=this.createDropTargetEvent(i,e,o,r,t);i.onDragging(n)}},e.prototype.enterDragTargetIfExists=function(e,t,o,r,i){if(e){var n=this.createDropTargetEvent(e,t,o,r,i);e.onDragEnter(n),this.setGhostIcon(e.getIconName?e.getIconName():null)}},e.prototype.leaveLastTargetIfExists=function(e,t,o,r){if(this.lastDropTarget){var i=this.createDropTargetEvent(this.lastDropTarget,e,t,o,r);this.lastDropTarget.onDragLeave(i),this.setGhostIcon(null)}},e.prototype.getAllContainersFromDropTarget=function(e){var t=[e.getContainer()],o=e.getSecondaryContainers?e.getSecondaryContainers():null;return o&&(t=t.concat(o)),t},e.prototype.isMouseOnDropTarget=function(e,t){var o=this.getAllContainersFromDropTarget(t),r=!1;return o.forEach((function(t){if(t){var o=t.getBoundingClientRect();if(0!==o.width&&0!==o.height){var i=e.clientX>=o.left&&e.clientX<=o.right,n=e.clientY>=o.top&&e.clientY<=o.bottom;i&&n&&(r=!0)}}})),!!r&&t.isInterestedIn(this.dragSource.type)},e.prototype.addDropTarget=function(e){this.dropTargets.push(e)},e.prototype.workOutHDirection=function(e){return this.eventLastTime.clientX>e.clientX?l.Left:this.eventLastTime.clientX<e.clientX?l.Right:null},e.prototype.workOutVDirection=function(e){return this.eventLastTime.clientY>e.clientY?a.Up:this.eventLastTime.clientY<e.clientY?a.Down:null},e.prototype.createDropTargetEvent=function(e,t,o,r,i){var n=e.getContainer().getBoundingClientRect();return{event:t,x:t.clientX-n.left,y:t.clientY-n.top,vDirection:r,hDirection:o,dragSource:this.dragSource,fromNudge:i,dragItem:this.dragItem}},e.prototype.positionGhost=function(e){var t=this.eGhost.getBoundingClientRect().height,o=g._.getBodyWidth()-2,r=g._.getBodyHeight()-2,i=e.pageY-t/2,n=e.pageX-30,s=this.gridOptionsWrapper.getDocument(),a=window.pageYOffset||s.documentElement.scrollTop,l=window.pageXOffset||s.documentElement.scrollLeft;o>0&&n+this.eGhost.clientWidth>o+l&&(n=o+l-this.eGhost.clientWidth),n<0&&(n=0),r>0&&i+this.eGhost.clientHeight>r+a&&(i=r+a-this.eGhost.clientHeight),i<0&&(i=0),this.eGhost.style.left=n+"px",this.eGhost.style.top=i+"px"},e.prototype.removeGhost=function(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null},e.prototype.createGhost=function(){this.eGhost=g._.loadTemplate(t.GHOST_TEMPLATE);var e=this.environment.getTheme();e&&g._.addCssClass(this.eGhost,e),this.eGhostIcon=this.eGhost.querySelector(".ag-dnd-ghost-icon"),this.setGhostIcon(null),this.eGhost.querySelector(".ag-dnd-ghost-label").innerHTML=g._.escape(this.dragSource.dragItemName),this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";var o=this.gridOptionsWrapper.getDocument();this.eGhostParent=o.querySelector("body"),this.eGhostParent?this.eGhostParent.appendChild(this.eGhost):console.warn("ag-Grid: could not find document body, it is needed for dragging columns")},e.prototype.setGhostIcon=function(e,o){var r;switch(void 0===o&&(o=!1),g._.clearElement(this.eGhostIcon),e){case t.ICON_ADD:r=this.ePlusIcon;break;case t.ICON_PINNED:r=this.ePinnedIcon;break;case t.ICON_MOVE:r=this.eMoveIcon;break;case t.ICON_LEFT:r=this.eLeftIcon;break;case t.ICON_RIGHT:r=this.eRightIcon;break;case t.ICON_GROUP:r=this.eGroupIcon;break;case t.ICON_AGGREGATE:r=this.eAggregateIcon;break;case t.ICON_PIVOT:r=this.ePivotIcon;break;case t.ICON_NOT_ALLOWED:r=this.eDropNotAllowedIcon;break;default:r=this.eHiddenIcon}this.eGhostIcon.appendChild(r),g._.addOrRemoveCssClass(this.eGhostIcon,"ag-shake-left-to-right",o)},e.ICON_PINNED="pinned",e.ICON_ADD="add",e.ICON_MOVE="move",e.ICON_LEFT="left",e.ICON_RIGHT="right",e.ICON_GROUP="group",e.ICON_AGGREGATE="aggregate",e.ICON_PIVOT="pivot",e.ICON_NOT_ALLOWED="notAllowed",e.GHOST_TEMPLATE='<div class="ag-dnd-ghost"> <span class="ag-dnd-ghost-icon ag-shake-left-to-right"></span> <div class="ag-dnd-ghost-label"> </div></div>',r([u.Autowired("gridOptionsWrapper"),i("design:type",c.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([u.Autowired("dragService"),i("design:type",d.DragService)],e.prototype,"dragService",void 0),r([u.Autowired("environment"),i("design:type",f.Environment)],e.prototype,"environment",void 0),r([u.Autowired("columnController"),i("design:type",h.ColumnController)],e.prototype,"columnController",void 0),r([u.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),r([n(0,u.Qualifier("loggerFactory")),i("design:type",Function),i("design:paramtypes",[p.LoggerFactory]),i("design:returntype",void 0)],e.prototype,"setBeans",null),r([u.PreDestroy,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"destroy",null),t=r([u.Bean("dragAndDropService")],e)}();t.DragAndDropService=m},59007:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(83423),a={"ag-theme-material":{headerHeight:56,virtualItemHeight:40,rowHeight:48},"ag-theme-classic":{headerHeight:25,virtualItemHeight:20,rowHeight:25},"ag-theme-balham":{headerHeight:32,virtualItemHeight:28,rowHeight:28}},l=function(){function e(){}return e.prototype.getSassVariable=function(e,t){return"ag-theme-material"==e?a["ag-theme-material"][t]:"ag-theme-balham"==e||"ag-theme-balham-dark"==e?a["ag-theme-balham"][t]:a["ag-theme-classic"][t]},e.prototype.getTheme=function(){for(var e,t=/\bag-(fresh|dark|blue|material|bootstrap|(?:theme-([\w\-]*)))\b/,o=this.eGridDiv;o&&(e=t.exec(o.className),null!=(o=o.parentElement)&&!e););if(e){var r=e[0];if(void 0===e[2]){var i=r.replace("ag-","ag-theme-");s._.doOnce((function(){return console.warn("ag-Grid: As of v19 old theme are no longer provided. Please replace "+r+" with "+i+".")}),"using-old-theme")}return r}},r([n.Autowired("eGridDiv"),i("design:type",HTMLElement)],e.prototype,"eGridDiv",void 0),r([n.Bean("environment")],e)}();t.Environment=l},59873:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),n="\r\n",s=function(){function e(){}return e.prototype.createHeader=function(e){void 0===e&&(e={});var t=["version"];return e.version||(e.version="1.0"),e.encoding&&t.push("encoding"),e.standalone&&t.push("standalone"),"<?xml "+t.map((function(t){return t+'="'+e[t]+'"'})).join(" ")+" ?>"},e.prototype.createXml=function(e,t){var o=this,r="";e.properties&&(e.properties.prefixedAttributes&&e.properties.prefixedAttributes.forEach((function(e){Object.keys(e.map).forEach((function(i){r+=o.returnAttributeIfPopulated(e.prefix+i,e.map[i],t)}))})),e.properties.rawMap&&Object.keys(e.properties.rawMap).forEach((function(i){r+=o.returnAttributeIfPopulated(i,e.properties.rawMap[i],t)})));var i="<"+e.name+r;return e.children||null!=e.textNode?null!=e.textNode?i+">"+e.textNode+"</"+e.name+">"+n:(i+=">\r\n",e.children&&e.children.forEach((function(e){i+=o.createXml(e,t)})),i+"</"+e.name+">"+n):i+"/>"+n},e.prototype.returnAttributeIfPopulated=function(e,t,o){if(!t&&""!==t&&0!==t)return"";var r=t;return"boolean"==typeof t&&o&&(r=o(t))," "+e+'="'+r+'"'},r([i.Bean("xmlFactory")],e)}();t.XmlFactory=s},60843:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},n=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(37132),a=o(72493),l=o(72493),p=o(44081),u=o(83423),c=function(){function e(){this.allSyncListeners={},this.allAsyncListeners={},this.globalSyncListeners=[],this.globalAsyncListeners=[],this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}var t;return t=e,e.prototype.setBeans=function(e,t,o){if(void 0===o&&(o=null),this.logger=e.create("EventService"),o){var r=t.useAsyncEvents();this.addGlobalListener(o,r)}},e.prototype.getListenerList=function(e,t){var o=t?this.allAsyncListeners:this.allSyncListeners,r=o[e];return r||(r=[],o[e]=r),r},e.prototype.addEventListener=function(e,t,o){void 0===o&&(o=!1);var r=this.getListenerList(e,o);r.indexOf(t)<0&&r.push(t)},e.prototype.addModalPriorityEventListener=function(e,o,r){void 0===r&&(r=!1),this.addEventListener(e+t.PRIORITY,o,r)},e.prototype.addGlobalListener=function(e,t){void 0===t&&(t=!1),t?this.globalAsyncListeners.push(e):this.globalSyncListeners.push(e)},e.prototype.removeEventListener=function(e,t,o){void 0===o&&(o=!1);var r=this.getListenerList(e,o);u._.removeFromArray(r,t)},e.prototype.removeGlobalListener=function(e,t){void 0===t&&(t=!1),t?u._.removeFromArray(this.globalAsyncListeners,e):u._.removeFromArray(this.globalSyncListeners,e)},e.prototype.dispatchEvent=function(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0},e.prototype.dispatchEventOnce=function(e){this.firedEvents[e.type]||this.dispatchEvent(e)},e.prototype.dispatchToListeners=function(e,o){var r=this,i=o?this.globalAsyncListeners:this.globalSyncListeners,n=e.type,s=this.getListenerList(n+t.PRIORITY,o);u._.forEachSnapshotFirst(s,(function(t){o?r.dispatchAsync((function(){return t(e)})):t(e)}));var a=this.getListenerList(n,o);u._.forEachSnapshotFirst(a,(function(t){o?r.dispatchAsync((function(){return t(e)})):t(e)})),u._.forEachSnapshotFirst(i,(function(t){o?r.dispatchAsync((function(){return t(n,e)})):t(n,e)}))},e.prototype.dispatchAsync=function(e){this.asyncFunctionsQueue.push(e),this.scheduled||(window.setTimeout(this.flushAsyncQueue.bind(this),0),this.scheduled=!0)},e.prototype.flushAsyncQueue=function(){this.scheduled=!1;var e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach((function(e){return e()}))},e.PRIORITY="-P1",r([n(0,l.Qualifier("loggerFactory")),n(1,l.Qualifier("gridOptionsWrapper")),n(2,l.Qualifier("globalEventListener")),i("design:type",Function),i("design:paramtypes",[s.LoggerFactory,p.GridOptionsWrapper,Function]),i("design:returntype",void 0)],e.prototype,"setBeans",null),t=r([a.Bean("eventService")],e)}();t.EventService=c},61862:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(97156),i=o(65360),n=!1;t.initialiseAgGridWithWebComponents=function(){if(console.warn("ag-grid: initialiseAgGridWithWebComponents is deprecated. Please use the ag-grid-webcomponent dependency instead. "),!n){n=!0,"undefined"!=typeof document&&document.registerElement||console.error("ag-Grid: unable to find document.registerElement() function, unable to initialise ag-Grid as a Web Component");var e=Object.create(HTMLElement.prototype);r.ComponentUtil.ALL_PROPERTIES.forEach((function(t){Object.defineProperty(e,t,{set:function(e){this.__agGridSetProperty(t,e)},get:function(){return this.__agGridGetProperty(t)},enumerable:!0,configurable:!0})}));var t=e;t.__agGridSetProperty=function(e,t){this.__attributes||(this.__attributes={}),this.__attributes[e]=t;var o={};o[e]={currentValue:t},this.onChange(o)},t.onChange=function(e){this._initialised&&r.ComponentUtil.processOnChange(e,this._gridOptions,this.api,this.columnApi)},t.__agGridGetProperty=function(e){return this.__attributes||(this.__attributes={}),this.__attributes[e]},t.setGridOptions=function(e){var t=this.globalEventListener.bind(this);this._gridOptions=r.ComponentUtil.copyAttributesToGridOptions(e,this);var o={globalEventListener:t};this._agGrid=new i.Grid(this,this._gridOptions,o),this.api=e.api,this.columnApi=e.columnApi,this._initialised=!0},t.createdCallback=function(){for(var e=0;e<this.attributes.length;e++){var t=this.attributes[e];this.setPropertyFromAttribute(t)}},t.setPropertyFromAttribute=function(e){var t,o="string"==typeof(t=e.nodeName)?t.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()})):t,i=e.nodeValue;r.ComponentUtil.ALL_PROPERTIES.indexOf(o)>=0&&(this[o]=i)},t.attachedCallback=function(e){},t.detachedCallback=function(e){},t.attributeChangedCallback=function(e){var t=this.attributes[e];this.setPropertyFromAttribute(t)},t.globalEventListener=function(e,t){var o=e.toLowerCase(),r=new Event(o);r.agGridDetails=t,this.dispatchEvent(r);var i="on"+o;"function"==typeof this[i]&&this[i](r)},document.registerElement("ag-grid",{prototype:e})}}},64229:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(44081),l=o(98239),p=o(44871),u=o(10042),c=o(72493),d=o(60843),h=o(85786),f=o(25230),g=o(45727),m=o(1571),y=o(42195),v=o(13887),C=o(48011),w=o(41451),E=o(15724),_=o(10190),b=o(50580),R=o(40797),S=o(69065),O=o(19378),T=o(8894),A=o(24463),P=o(66419),I=o(58342),x=o(36819),D=o(51755),N=o(45697),F=o(22131),M=o(23801),k=o(64314),L=o(41832),G=o(55090),V=o(47721),j=o(89929),W=o(68198),H=o(83423),B=function(e){function t(){var t=e.call(this,'<div class="ag-root ag-unselectable" role="grid" unselectable="on">\n <ag-header-root ref="headerRoot" unselectable="on"></ag-header-root>\n <div class="ag-floating-top" ref="eTop" role="presentation" unselectable="on">\n <div class="ag-pinned-left-floating-top" ref="eLeftTop" role="presentation" unselectable="on"></div>\n <div class="ag-floating-top-viewport" ref="eTopViewport" role="presentation" unselectable="on">\n <div class="ag-floating-top-container" ref="eTopContainer" role="presentation" unselectable="on"></div>\n </div>\n <div class="ag-pinned-right-floating-top" ref="eRightTop" role="presentation" unselectable="on"></div>\n <div class="ag-floating-top-full-width-container" ref="eTopFullWidthContainer" role="presentation" unselectable="on"></div>\n </div>\n <div class="ag-body-viewport" ref="eBodyViewport" role="presentation" unselectable="on">\n <div class="ag-pinned-left-cols-container" ref="eLeftContainer" role="presentation" unselectable="on"></div>\n <div class="ag-center-cols-clipper" ref="eCenterColsClipper">\n <div class="ag-center-cols-viewport" ref="eCenterViewport" role="presentation" unselectable="on">\n <div class="ag-center-cols-container" ref="eCenterContainer" role="presentation" unselectable="on"></div>\n </div>\n </div>\n <div class="ag-pinned-right-cols-container" ref="eRightContainer" role="presentation" unselectable="on"></div>\n <div class="ag-full-width-container" ref="eFullWidthContainer" role="presentation" unselectable="on"></div>\n </div>\n <div class="ag-floating-bottom" ref="eBottom" role="presentation" unselectable="on">\n <div class="ag-pinned-left-floating-bottom" ref="eLeftBottom" role="presentation" unselectable="on"></div>\n <div class="ag-floating-bottom-viewport" ref="eBottomViewport" role="presentation" unselectable="on">\n <div class="ag-floating-bottom-container" ref="eBottomContainer" role="presentation" unselectable="on"></div>\n </div>\n <div class="ag-pinned-right-floating-bottom" ref="eRightBottom" role="presentation" unselectable="on"></div>\n <div class="ag-floating-bottom-full-width-container" ref="eBottomFullWidthContainer" role="presentation" unselectable="on"></div>\n </div>\n <div class="ag-body-horizontal-scroll" ref="eHorizontalScrollBody">\n <div class="ag-horizontal-left-spacer" ref="eHorizontalLeftSpacer"></div>\n <div class="ag-body-horizontal-scroll-viewport" ref="eBodyHorizontalScrollViewport">\n <div class="ag-body-horizontal-scroll-container" ref="eBodyHorizontalScrollContainer"></div>\n </div>\n <div class="ag-horizontal-right-spacer" ref="eHorizontalRightSpacer"></div>\n </div>\n <ag-overlay-wrapper ref="overlayWrapper"></ag-overlay-wrapper>\n </div>')||this;return t.scrollLeft=-1,t.scrollTop=-1,t.resetLastHorizontalScrollElementDebounce=H._.debounce(t.resetLastHorizontalScrollElement.bind(t),500),t}return i(t,e),t.prototype.getVScrollPosition=function(){return{top:this.eBodyViewport.scrollTop,bottom:this.eBodyViewport.scrollTop+this.eBodyViewport.offsetHeight}},t.prototype.getHScrollPosition=function(){return{left:this.eCenterViewport.scrollLeft,right:this.eCenterViewport.scrollLeft+this.eCenterViewport.offsetWidth}},t.prototype.onRowDataChanged=function(){this.showOrHideOverlay()},t.prototype.showOrHideOverlay=function(){var e=this.paginationProxy.isEmpty(),t=this.gridOptionsWrapper.isSuppressNoRowsOverlay();this[e&&!t?"showNoRowsOverlay":"hideOverlay"]()},t.prototype.onNewColumnsLoaded=function(){this.columnController.isReady()&&!this.paginationProxy.isEmpty()&&this.hideOverlay()},t.prototype.init=function(){var e=this;this.scrollWidth=this.gridOptionsWrapper.getScrollbarWidth(),this.enableRtl=this.gridOptionsWrapper.isEnableRtl(),this.printLayout=this.gridOptionsWrapper.getDomLayout()===g.Constants.DOM_LAYOUT_PRINT,this.gridOptionsWrapper.addLayoutElement(this.getGui()),this.gridOptionsWrapper.addLayoutElement(this.eBodyViewport),this.suppressScrollOnFloatingRow(),this.setupRowAnimationCssClass(),this.buildRowContainerComponents(),this.addEventListeners(),this.addDragListeners(),this.addScrollListener(),this.gridOptionsWrapper.isRowModelDefault()&&!this.gridOptionsWrapper.getRowData()&&this.showLoadingOverlay(),this.setCellTextSelection(this.gridOptionsWrapper.isEnableCellTextSelect()),this.setPinnedContainerSize(),this.setHeaderAndFloatingHeights(),this.disableBrowserDragging(),this.addMouseListeners(),this.addKeyboardEvents(),this.addBodyViewportListener(),this.addStopEditingWhenGridLosesFocus(),this.mockContextMenuForIPad(),this.addRowDragListener(),this.$scope&&this.addAngularApplyCheck(),this.onDisplayedColumnsWidthChanged(),this.gridApi.registerGridComp(this),this.alignedGridsService.registerGridComp(this),this.headerRootComp.registerGridComp(this),this.navigationService.registerGridComp(this),this.heightScaler.registerGridComp(this),this.autoHeightCalculator.registerGridComp(this),this.columnAnimationService.registerGridComp(this),this.autoWidthCalculator.registerGridComp(this),this.paginationAutoPageSizeService.registerGridComp(this),this.beans.registerGridComp(this),this.rowRenderer.registerGridComp(this),this.rangeController&&this.rangeController.registerGridComp(this),[this.eCenterViewport,this.eBodyViewport].forEach((function(t){var o=e.resizeObserverService.observeResize(t,e.onCenterViewportResized.bind(e));e.addDestroyFunc((function(){return o()}))}))},t.prototype.onDomLayoutChanged=function(){var e=this.gridOptionsWrapper.getDomLayout()===g.Constants.DOM_LAYOUT_PRINT;this.printLayout!==e&&(this.printLayout=e,this.setWidthsOfContainers(),this.setPinnedContainerSize())},t.prototype.onCenterViewportResized=function(){this.checkViewportAndScrolls()},t.prototype.setColumnMovingCss=function(e){this.addOrRemoveCssClass("ag-column-moving",e)},t.prototype.setCellTextSelection=function(e){void 0===e&&(e=!1),[this.eTop,this.eCenterContainer,this.eBottom].forEach((function(t){return H._.addOrRemoveCssClass(t,"ag-selectable",e)}))},t.prototype.addRowDragListener=function(){var e=new x.RowDragFeature(this.eBodyViewport,this);this.getContext().wireBean(e),this.dragAndDropService.addDropTarget(e)},t.prototype.addStopEditingWhenGridLosesFocus=function(){var e=this;if(this.gridOptionsWrapper.isStopEditingWhenGridLosesFocus()){var t=function(t){for(var o=!1,r=t.relatedTarget;H._.exists(r)&&!o;){var i=!!e.gridOptionsWrapper.getDomData(r,E.PopupEditorWrapper.DOM_KEY_POPUP_EDITOR_WRAPPER),n=e.eBodyViewport===r||e.eBottom===r||e.eTop===r;o=i||n,r=r.parentNode}o||e.rowRenderer.stopEditing()};this.addDestroyableEventListener(this.eBodyViewport,"focusout",t),this.addDestroyableEventListener(this.eTop,"focusout",t),this.addDestroyableEventListener(this.eBottom,"focusout",t)}},t.prototype.addAngularApplyCheck=function(){var e=this,t=!1,o=function(){t||(t=!0,window.setTimeout((function(){t=!1,e.$scope.$apply()}),0))};this.addDestroyableEventListener(this.eventService,h.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,o),this.addDestroyableEventListener(this.eventService,h.Events.EVENT_VIRTUAL_COLUMNS_CHANGED,o)},t.prototype.disableBrowserDragging=function(){this.addGuiEventListener("dragstart",(function(e){if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}))},t.prototype.addEventListeners=function(){this.addDestroyableEventListener(this.eventService,h.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addDestroyableEventListener(this.eventService,h.Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.addDestroyableEventListener(this.eventService,h.Events.EVENT_PINNED_ROW_DATA_CHANGED,this.setHeaderAndFloatingHeights.bind(this)),this.addDestroyableEventListener(this.eventService,h.Events.EVENT_ROW_DATA_CHANGED,this.onRowDataChanged.bind(this)),this.addDestroyableEventListener(this.eventService,h.Events.EVENT_ROW_DATA_UPDATED,this.onRowDataChanged.bind(this)),this.addDestroyableEventListener(this.eventService,h.Events.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,a.GridOptionsWrapper.PROP_HEADER_HEIGHT,this.setHeaderAndFloatingHeights.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,a.GridOptionsWrapper.PROP_PIVOT_HEADER_HEIGHT,this.setHeaderAndFloatingHeights.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,a.GridOptionsWrapper.PROP_GROUP_HEADER_HEIGHT,this.setHeaderAndFloatingHeights.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,a.GridOptionsWrapper.PROP_PIVOT_GROUP_HEADER_HEIGHT,this.setHeaderAndFloatingHeights.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,a.GridOptionsWrapper.PROP_FLOATING_FILTERS_HEIGHT,this.setHeaderAndFloatingHeights.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,a.GridOptionsWrapper.PROP_DOM_LAYOUT,this.onDomLayoutChanged.bind(this))},t.prototype.addDragListeners=function(){var e=this;this.gridOptionsWrapper.isEnableRangeSelection()&&!H._.missing(this.rangeController)&&[this.eLeftContainer,this.eRightContainer,this.eCenterContainer,this.eTop,this.eBottom].forEach((function(t){var o={eElement:t,onDragStart:e.rangeController.onDragStart.bind(e.rangeController),onDragStop:e.rangeController.onDragStop.bind(e.rangeController),onDragging:e.rangeController.onDragging.bind(e.rangeController),skipMouseEvent:function(e){return e.shiftKey}};e.dragService.addDragSource(o),e.addDestroyFunc((function(){return e.dragService.removeDragSource(o)}))}))},t.prototype.addMouseListeners=function(){var e=this;["click","mousedown","dblclick","contextmenu","mouseover","mouseout"].forEach((function(t){var o=e.processMouseEvent.bind(e,t);e.eAllCellContainers.forEach((function(r){return e.addDestroyableEventListener(r,t,o)}))}))},t.prototype.addKeyboardEvents=function(){var e=this;["keydown","keypress"].forEach((function(t){var o=e.processKeyboardEvent.bind(e,t);e.eAllCellContainers.forEach((function(r){e.addDestroyableEventListener(r,t,o,!0)}))}))},t.prototype.addBodyViewportListener=function(){var e=this;this.addDestroyableEventListener(this.eBodyViewport,"contextmenu",(function(t){var o=H._.getTarget(t);o!==e.eBodyViewport&&o!==e.eCenterViewport||(e.onContextMenu(t,null,null,null,null),e.preventDefaultOnContextMenu(t))}))},t.prototype.getBodyClientRect=function(){if(this.eBodyViewport)return this.eBodyViewport.getBoundingClientRect()},t.prototype.getRowForEvent=function(e){for(var t=H._.getTarget(e);t;){var o=this.gridOptionsWrapper.getDomData(t,O.RowComp.DOM_DATA_KEY_RENDERED_ROW);if(o)return o;t=t.parentElement}return null},t.prototype.processKeyboardEvent=function(e,t){var o=H._.getCellCompForEvent(this.gridOptionsWrapper,t),r=o.getRenderedRow().getRowNode(),i=o.getColumn(),n=o.isEditing();if(o){if(H._.isUserSuppressingKeyboardEvent(this.gridOptionsWrapper,t,r,i,n))t.preventDefault();else switch(e){case"keydown":this.navigationService.handlePageScrollingKey(t)||o.onKeyDown(t),this.doClipboardOperations(t,o);break;case"keypress":o.onKeyPress(t)}if("keydown"===e){var s=o.createEvent(t,h.Events.EVENT_CELL_KEY_DOWN);this.beans.eventService.dispatchEvent(s)}if("keypress"===e){var a=o.createEvent(t,h.Events.EVENT_CELL_KEY_PRESS);this.beans.eventService.dispatchEvent(a)}}},t.prototype.doClipboardOperations=function(e,t){if((e.ctrlKey||e.metaKey)&&!t.isEditing()&&this.mouseEventService.isEventFromThisGrid(e))switch(e.which){case g.Constants.KEY_A:return this.onCtrlAndA(e);case g.Constants.KEY_C:return this.onCtrlAndC(e);case g.Constants.KEY_V:return this.onCtrlAndV();case g.Constants.KEY_D:return this.onCtrlAndD(e)}},t.prototype.scrollToTop=function(){this.eBodyViewport.scrollTop=0},t.prototype.processMouseEvent=function(e,t){if(this.mouseEventService.isEventFromThisGrid(t)&&!H._.isStopPropagationForAgGrid(t)){var o=this.getRowForEvent(t),r=this.mouseEventService.getRenderedCellForEvent(t);"contextmenu"===e?this.handleContextMenuMouseEvent(t,null,o,r):(r&&r.onMouseEvent(e,t),o&&o.onMouseEvent(e,t)),this.preventDefaultOnContextMenu(t)}},t.prototype.mockContextMenuForIPad=function(){var e=this;H._.isUserAgentIPad()&&this.eAllCellContainers.forEach((function(t){var o=new P.TouchListener(t);e.addDestroyableEventListener(o,P.TouchListener.EVENT_LONG_TAP,(function(t){var o=e.getRowForEvent(t.touchEvent),r=e.mouseEventService.getRenderedCellForEvent(t.touchEvent);e.handleContextMenuMouseEvent(null,t.touchEvent,o,r)})),e.addDestroyFunc((function(){return o.destroy()}))}))},t.prototype.handleContextMenuMouseEvent=function(e,t,o,r){var i=o?o.getRowNode():null,n=r?r.getColumn():null,s=null;if(n){var a=e||t;r.dispatchCellContextMenuEvent(a),s=this.valueService.getValue(n,i)}this.onContextMenu(e,t,i,n,s)},t.prototype.onContextMenu=function(e,t,o,r,i){if((this.gridOptionsWrapper.isAllowContextMenuWithControlKey()||!e||!e.ctrlKey&&!e.metaKey)&&this.contextMenuFactory&&!this.gridOptionsWrapper.isSuppressContextMenu()){var n=e||t.touches[0];this.contextMenuFactory.showMenu(o,r,i,n),(e||t).preventDefault()}},t.prototype.preventDefaultOnContextMenu=function(e){this.gridOptionsWrapper.isSuppressMiddleClickScrolls()&&2===e.which&&e.preventDefault()},t.prototype.onCtrlAndA=function(e){var t=this,o=t.columnController,r=t.pinnedRowModel,i=t.paginationProxy,n=t.rangeController,s=g.Constants.PINNED_BOTTOM,a=g.Constants.PINNED_TOP;if(n&&i.isRowsToRender()){var l=[r.isEmpty(a),r.isEmpty(s)],p=l[0]?null:a,u=void 0,c=void 0;l[1]?(u=null,c=this.paginationProxy.getTotalRowCount()-1):(u=s,c=r.getPinnedBottomRowData().length-1);var d=o.getAllDisplayedColumns();if(H._.missingOrEmpty(d))return;n.setRange({rowStart:0,floatingStart:p,rowEnd:c,floatingEnd:u,columnStart:d[0],columnEnd:d[d.length-1]})}e.preventDefault()},t.prototype.onCtrlAndC=function(e){if(this.clipboardService&&!this.gridOptionsWrapper.isEnableCellTextSelection()){var t=this.focusedCellController.getFocusedCell();this.clipboardService.copyToClipboard(),e.preventDefault(),t&&this.focusedCellController.setFocusedCell(t.rowIndex,t.column,t.floating,!0)}},t.prototype.onCtrlAndV=function(){this.enterprise&&!this.gridOptionsWrapper.isSuppressClipboardPaste()&&this.clipboardService.pasteFromClipboard()},t.prototype.onCtrlAndD=function(e){this.enterprise&&(this.clipboardService.copyRangeDown(),e.preventDefault())},t.prototype.ensureIndexVisible=function(e,t){if(!this.printLayout){var o=this.paginationProxy.getTotalRowCount();if("number"!=typeof e||e<0||e>=o)console.warn("invalid row index for ensureIndexVisible: "+e);else{this.paginationProxy.goToPageWithIndex(e);var r,i=this.paginationProxy.getRow(e);do{var n=i.rowTop,s=i.rowHeight,a=this.paginationProxy.getPixelOffset(),l=i.rowTop-a,p=l+i.rowHeight,u=this.getVScrollPosition(),c=this.heightScaler.getOffset(),d=u.top+c,h=u.bottom+c,f=h-d,g=this.heightScaler.getScrollPositionForPixel(l),m=this.heightScaler.getScrollPositionForPixel(p-f),y=Math.min((g+m)/2,l),v=null;"top"===t?v=g:"bottom"===t?v=m:"middle"===t?v=y:d>l?v=g:h<p&&(v=m),null!==v&&(this.eBodyViewport.scrollTop=v,this.rowRenderer.redrawAfterScroll()),r=n!==i.rowTop||s!==i.rowHeight}while(r);this.animationFrameService.flushAllFrames()}}},t.prototype.getCenterWidth=function(){return this.eCenterViewport.clientWidth},t.prototype.isVerticalScrollShowing=function(){var e=this.gridOptionsWrapper.isAlwaysShowVerticalScroll();return H._.addOrRemoveCssClass(this.eBodyViewport,"ag-force-vertical-scroll",e),e||H._.isVerticalScrollShowing(this.eBodyViewport)},t.prototype.isHorizontalScrollShowing=function(){return H._.isHorizontalScrollShowing(this.eCenterViewport)},t.prototype.checkViewportAndScrolls=function(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.setPinnedContainerSize()},t.prototype.updateScrollVisibleService=function(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)},t.prototype.updateScrollVisibleServiceImpl=function(){var e={horizontalScrollShowing:!1,verticalScrollShowing:!1};e.verticalScrollShowing=this.isVerticalScrollShowing(),e.horizontalScrollShowing=this.isHorizontalScrollShowing(),this.scrollVisibleService.setScrollsVisible(e),this.setHorizontalScrollVisible(e.horizontalScrollShowing),this.setVerticalScrollPaddingVisible(e.verticalScrollShowing)},t.prototype.setHorizontalScrollVisible=function(e){var t=this.gridOptionsWrapper.isSuppressHorizontalScroll(),o=e&&this.gridOptionsWrapper.getScrollbarWidth()||0,r=t?0:o,i=H._.isBrowserIE()&&e;this.eCenterViewport.style.height="calc(100% + "+o+"px)",H._.setFixedHeight(this.eHorizontalScrollBody,r),H._.setFixedHeight(this.eBodyHorizontalScrollViewport,r+(i?1:0)),i&&(this.eBodyHorizontalScrollViewport.style.bottom="1px"),H._.setFixedHeight(this.eBodyHorizontalScrollContainer,r)},t.prototype.setVerticalScrollPaddingVisible=function(e){var t=e?"scroll":"hidden";this.eTop.style.overflowY=this.eBottom.style.overflowY=t,this.setFakeHScrollSpacerWidths()},t.prototype.ensureColumnVisible=function(e){var t=this.columnController.getGridColumn(e);if(t)if(t.isPinned())console.warn("calling ensureIndexVisible on a "+t.getPinned()+" pinned column doesn't make sense for column "+t.getColId());else if(this.columnController.isColumnDisplayed(t)){var o,r,i=t.getLeft(),n=i+t.getActualWidth(),s=this.eCenterViewport.clientWidth,a=this.getCenterViewportScrollLeft(),l=this.columnController.getBodyContainerWidth();this.enableRtl?(o=l-a-s,r=l-a):(o=a,r=s+a);var p=o>i,u=r<n,c=s<t.getActualWidth(),d=p||c,h=u,f=this.getCenterViewportScrollLeft();(d||h)&&(f=this.enableRtl?d?l-s-i:l-n:d?i:n-s,this.setCenterViewportScrollLeft(f)),this.onHorizontalViewportChanged(),this.animationFrameService.flushAllFrames()}else console.warn("column is not currently visible")},t.prototype.showLoadingOverlay=function(){this.gridOptionsWrapper.isSuppressLoadingOverlay()||this.overlayWrapper.showLoadingOverlay()},t.prototype.showNoRowsOverlay=function(){this.gridOptionsWrapper.isSuppressNoRowsOverlay()||this.overlayWrapper.showNoRowsOverlay()},t.prototype.hideOverlay=function(){this.overlayWrapper.hideOverlay()},t.prototype.sizeColumnsToFit=function(e){var t=this,o=this.eBodyViewport.clientWidth;o>0?this.columnController.sizeColumnsToFit(o,"sizeColumnsToFit"):void 0===e?window.setTimeout((function(){t.sizeColumnsToFit(100)}),0):100===e?window.setTimeout((function(){t.sizeColumnsToFit(500)}),100):500===e?window.setTimeout((function(){t.sizeColumnsToFit(-1)}),500):console.warn("ag-Grid: tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?")},t.prototype.getCenterContainer=function(){return this.eCenterContainer},t.prototype.getDropTargetBodyContainers=function(){return[this.eCenterViewport,this.eTopViewport,this.eBottomViewport]},t.prototype.getDropTargetLeftContainers=function(){return[this.eLeftContainer,this.eLeftBottom,this.eLeftTop]},t.prototype.getDropTargetRightContainers=function(){return[this.eRightContainer,this.eRightBottom,this.eRightTop]},t.prototype.buildRowContainerComponents=function(){var e=this;this.eAllCellContainers=[this.eLeftContainer,this.eRightContainer,this.eCenterContainer,this.eTop,this.eBottom,this.eFullWidthContainer],this.rowContainerComponents={body:new C.RowContainerComponent({eContainer:this.eCenterContainer,eWrapper:this.eCenterColsClipper,eViewport:this.eBodyViewport}),fullWidth:new C.RowContainerComponent({eContainer:this.eFullWidthContainer}),pinnedLeft:new C.RowContainerComponent({eContainer:this.eLeftContainer}),pinnedRight:new C.RowContainerComponent({eContainer:this.eRightContainer}),floatingTop:new C.RowContainerComponent({eContainer:this.eTopContainer}),floatingTopPinnedLeft:new C.RowContainerComponent({eContainer:this.eLeftTop}),floatingTopPinnedRight:new C.RowContainerComponent({eContainer:this.eRightTop}),floatingTopFullWidth:new C.RowContainerComponent({eContainer:this.eTopFullWidthContainer,hideWhenNoChildren:!0}),floatingBottom:new C.RowContainerComponent({eContainer:this.eBottomContainer}),floatingBottomPinnedLeft:new C.RowContainerComponent({eContainer:this.eLeftBottom}),floatingBottomPinnedRight:new C.RowContainerComponent({eContainer:this.eRightBottom}),floatingBottomFullWith:new C.RowContainerComponent({eContainer:this.eBottomFullWidthContainer,hideWhenNoChildren:!0})},H._.iterateObject(this.rowContainerComponents,(function(t,o){o&&e.getContext().wireBean(o)}))},t.prototype.setupRowAnimationCssClass=function(){var e=this,t=function(){var t=e.gridOptionsWrapper.isAnimateRows()&&!e.heightScaler.isScaling();H._.addOrRemoveCssClass(e.eBodyViewport,"ag-row-animation",t),H._.addOrRemoveCssClass(e.eBodyViewport,"ag-row-no-animation",!t)};t(),this.addDestroyableEventListener(this.eventService,h.Events.EVENT_HEIGHT_SCALE_CHANGED,t)},t.prototype.suppressScrollOnFloatingRow=function(){var e=this;this.addDestroyableEventListener(this.eTopViewport,"scroll",(function(){return e.eTopViewport.scrollLeft=0})),this.addDestroyableEventListener(this.eBottomViewport,"scroll",(function(){return e.eTopViewport.scrollLeft=0}))},t.prototype.getRowContainers=function(){return this.rowContainerComponents},t.prototype.getFloatingTopBottom=function(){return[this.eTop,this.eBottom]},t.prototype.onDisplayedColumnsChanged=function(){this.setPinnedContainerSize(),this.setHeaderAndFloatingHeights(),this.onHorizontalViewportChanged(),this.updateScrollVisibleService()},t.prototype.onDisplayedColumnsWidthChanged=function(){this.setWidthsOfContainers(),this.onHorizontalViewportChanged(),this.updateScrollVisibleService(),this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()},t.prototype.setWidthsOfContainers=function(){this.setCenterWidth(),this.setPinnedContainerSize()},t.prototype.setCenterWidth=function(){var e=this.columnController.getBodyContainerWidth();this.printLayout&&(e+=this.columnController.getPinnedLeftContainerWidth()+this.columnController.getPinnedRightContainerWidth()),this.headerRootComp.setHeaderContainerWidth(e);var t=e+"px";this.eCenterContainer.style.width=t,this.eBottomContainer.style.width=t,this.eTopContainer.style.width=t,this.printLayout||(this.eBodyHorizontalScrollContainer.style.width=t)},t.prototype.setPinnedLeftWidth=function(){var e=this,t=this.pinningLeft,o=this.columnController.getPinnedLeftContainerWidth(),r=this.pinningLeft=!this.printLayout&&o>0,i=[this.eLeftContainer,this.eLeftTop,this.eLeftBottom];t!==r&&this.headerRootComp.setLeftVisible(r),i.forEach((function(t){return H._.setVisible(t,e.pinningLeft)})),r&&i.forEach((function(e){return H._.setFixedWidth(e,o)}))},t.prototype.setPinnedRightWidth=function(){var e=this.pinningRight,t=this.columnController.getPinnedRightContainerWidth(),o=this.pinningRight=!this.printLayout&&t>0,r=[this.eRightContainer,this.eRightTop,this.eRightBottom];e!==o&&this.headerRootComp.setRightVisible(o),r.forEach((function(e){return H._.setVisible(e,o)})),o&&r.forEach((function(e){return H._.setFixedWidth(e,t)}))},t.prototype.setPinnedContainerSize=function(){this.setPinnedLeftWidth(),this.setPinnedRightWidth(),this.setFakeHScrollSpacerWidths()},t.prototype.setFakeHScrollSpacerWidths=function(){var e=this.columnController.getPinnedRightContainerWidth();!this.enableRtl&&this.isVerticalScrollShowing()&&(e+=this.scrollWidth),H._.setFixedWidth(this.eHorizontalRightSpacer,e),H._.addOrRemoveCssClass(this.eHorizontalRightSpacer,"ag-scroller-corner",e<=this.scrollWidth);var t=this.columnController.getPinnedLeftContainerWidth();this.enableRtl&&this.isVerticalScrollShowing()&&(t+=this.scrollWidth),H._.setFixedWidth(this.eHorizontalLeftSpacer,t),H._.addOrRemoveCssClass(this.eHorizontalLeftSpacer,"ag-scroller-corner",t<=this.scrollWidth)},t.prototype.checkBodyHeight=function(){var e=this.eBodyViewport.clientHeight;if(this.bodyHeight!==e){this.bodyHeight=e;var t={type:h.Events.EVENT_BODY_HEIGHT_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)}},t.prototype.setHeaderAndFloatingHeights=function(){var e,t,o,r=this,i=r.columnController,n=r.gridOptionsWrapper,s=r.pinnedRowModel,a=r.eTop,l=r.eBottom,p=0,u=i.getHeaderRowCount();i.isPivotMode()?(p=0,t=n.getPivotGroupHeaderHeight(),o=n.getPivotHeaderHeight()):(n.isFloatingFilter()&&u++,p=n.isFloatingFilter()?1:0,t=n.getGroupHeaderHeight(),o=n.getHeaderHeight());var c=u-(1+p);e=p*n.getFloatingFiltersHeight(),e+=c*t,e+=o,this.headerRootComp.setHeight(e);var d=s.getPinnedTopTotalHeight();d&&(d+=1);var h=s.getPinnedBottomTotalHeight();h&&(h+=1);var f=d+"px",g=h+"px";a.style.minHeight=f,a.style.height=f,a.style.display=d?"inherit":"none",l.style.minHeight=g,l.style.height=g,l.style.display=h?"inherit":"none",this.checkBodyHeight()},t.prototype.getBodyHeight=function(){return this.bodyHeight},t.prototype.setHorizontalScrollPosition=function(e){this.eCenterViewport.scrollLeft=e,this.doHorizontalScroll(e)},t.prototype.setVerticalScrollPosition=function(e){this.eBodyViewport.scrollTop=e},t.prototype.scrollHorizontally=function(e){var t=this.eCenterViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.eCenterViewport.scrollLeft-t},t.prototype.scrollVertically=function(e){var t=this.eBodyViewport.scrollTop;return this.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t},t.prototype.addScrollListener=function(){this.addDestroyableEventListener(this.eCenterViewport,"scroll",this.onCenterViewportScroll.bind(this)),this.addDestroyableEventListener(this.eBodyHorizontalScrollViewport,"scroll",this.onFakeHorizontalScroll.bind(this)),this.addDestroyableEventListener(this.eBodyViewport,"scroll",this.onVerticalScroll.bind(this))},t.prototype.onVerticalScroll=function(){var e=this.eBodyViewport.scrollTop;this.scrollTop=e,this.animationFrameService.setScrollTop(e),this.redrawRowsAfterScroll()},t.prototype.isControllingScroll=function(e){return this.lastHorizontalScrollElement?e===this.lastHorizontalScrollElement:(this.lastHorizontalScrollElement=e,!0)},t.prototype.onFakeHorizontalScroll=function(){this.isControllingScroll(this.eBodyHorizontalScrollViewport)&&this.onBodyHorizontalScroll(this.eBodyHorizontalScrollViewport)},t.prototype.onCenterViewportScroll=function(){this.isControllingScroll(this.eCenterViewport)&&this.onBodyHorizontalScroll(this.eCenterViewport)},t.prototype.onBodyHorizontalScroll=function(e){var t=this.eCenterViewport,o=t.scrollWidth,r=t.clientWidth,i=Math.floor(H._.getScrollLeft(e,this.enableRtl));i<0||i+r>o||(this.doHorizontalScroll(i),this.resetLastHorizontalScrollElementDebounce())},t.prototype.resetLastHorizontalScrollElement=function(){this.lastHorizontalScrollElement=null},t.prototype.doHorizontalScroll=function(e){this.scrollLeft=e;var t={type:h.Events.EVENT_BODY_SCROLL,api:this.gridApi,columnApi:this.columnApi,direction:"horizontal",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(t),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.onHorizontalViewportChanged()},t.prototype.redrawRowsAfterScroll=function(){var e={type:h.Events.EVENT_BODY_SCROLL,direction:"vertical",api:this.gridApi,columnApi:this.columnApi,left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(e)},t.prototype.onHorizontalViewportChanged=function(){var e=this.eCenterViewport.clientWidth,t=this.getCenterViewportScrollLeft();this.columnController.setVirtualViewportPosition(e,t)},t.prototype.getCenterViewportScrollLeft=function(){return H._.getScrollLeft(this.eCenterViewport,this.enableRtl)},t.prototype.setCenterViewportScrollLeft=function(e){H._.setScrollLeft(this.eCenterViewport,e,this.enableRtl)},t.prototype.horizontallyScrollHeaderCenterAndFloatingCenter=function(e){void 0===e&&(e=this.getCenterViewportScrollLeft());var t=this.enableRtl?e:-e,o=this.eCenterViewport,r=o.clientWidth,i=o.scrollWidth;if(!(Math.abs(t)+r>i||this.enableRtl&&t<0||!this.enableRtl&&t>0)){this.headerRootComp.setHorizontalScroll(t),this.eBottomContainer.style.transform="translateX("+t+"px)",this.eTopContainer.style.transform="translateX("+t+"px)";var n=this.lastHorizontalScrollElement===this.eCenterViewport?this.eBodyHorizontalScrollViewport:this.eCenterViewport;H._.setScrollLeft(n,e,this.enableRtl)}},t.prototype.addScrollEventListener=function(e){this.eBodyViewport.addEventListener("scroll",e)},t.prototype.removeScrollEventListener=function(e){this.eBodyViewport.removeEventListener("scroll",e)},n([c.Autowired("alignedGridsService"),s("design:type",_.AlignedGridsService)],t.prototype,"alignedGridsService",void 0),n([c.Autowired("gridOptionsWrapper"),s("design:type",a.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([c.Autowired("columnController"),s("design:type",l.ColumnController)],t.prototype,"columnController",void 0),n([c.Autowired("rowRenderer"),s("design:type",u.RowRenderer)],t.prototype,"rowRenderer",void 0),n([c.Autowired("pinnedRowModel"),s("design:type",b.PinnedRowModel)],t.prototype,"pinnedRowModel",void 0),n([c.Autowired("eventService"),s("design:type",d.EventService)],t.prototype,"eventService",void 0),n([c.Autowired("animationFrameService"),s("design:type",S.AnimationFrameService)],t.prototype,"animationFrameService",void 0),n([c.Autowired("navigationService"),s("design:type",T.NavigationService)],t.prototype,"navigationService",void 0),n([c.Autowired("autoHeightCalculator"),s("design:type",M.AutoHeightCalculator)],t.prototype,"autoHeightCalculator",void 0),n([c.Autowired("columnAnimationService"),s("design:type",k.ColumnAnimationService)],t.prototype,"columnAnimationService",void 0),n([c.Autowired("autoWidthCalculator"),s("design:type",L.AutoWidthCalculator)],t.prototype,"autoWidthCalculator",void 0),n([c.Autowired("paginationAutoPageSizeService"),s("design:type",w.PaginationAutoPageSizeService)],t.prototype,"paginationAutoPageSizeService",void 0),n([c.Autowired("beans"),s("design:type",G.Beans)],t.prototype,"beans",void 0),n([c.Autowired("paginationProxy"),s("design:type",w.PaginationProxy)],t.prototype,"paginationProxy",void 0),n([c.Autowired("columnApi"),s("design:type",p.ColumnApi)],t.prototype,"columnApi",void 0),n([c.Autowired("gridApi"),s("design:type",R.GridApi)],t.prototype,"gridApi",void 0),n([c.Autowired("dragService"),s("design:type",f.DragService)],t.prototype,"dragService",void 0),n([c.Autowired("mouseEventService"),s("design:type",m.MouseEventService)],t.prototype,"mouseEventService",void 0),n([c.Autowired("focusedCellController"),s("design:type",y.FocusedCellController)],t.prototype,"focusedCellController",void 0),n([c.Autowired("$scope"),s("design:type",Object)],t.prototype,"$scope",void 0),n([c.Autowired("scrollVisibleService"),s("design:type",v.ScrollVisibleService)],t.prototype,"scrollVisibleService",void 0),n([c.Autowired("valueService"),s("design:type",A.ValueService)],t.prototype,"valueService",void 0),n([c.Autowired("dragAndDropService"),s("design:type",I.DragAndDropService)],t.prototype,"dragAndDropService",void 0),n([c.Autowired("maxDivHeightScaler"),s("design:type",D.MaxDivHeightScaler)],t.prototype,"heightScaler",void 0),n([c.Autowired("enterprise"),s("design:type",Boolean)],t.prototype,"enterprise",void 0),n([c.Autowired("resizeObserverService"),s("design:type",W.ResizeObserverService)],t.prototype,"resizeObserverService",void 0),n([c.Optional("rangeController"),s("design:type",Object)],t.prototype,"rangeController",void 0),n([c.Optional("contextMenuFactory"),s("design:type",Object)],t.prototype,"contextMenuFactory",void 0),n([c.Optional("clipboardService"),s("design:type",Object)],t.prototype,"clipboardService",void 0),n([V.RefSelector("eBodyViewport"),s("design:type",HTMLElement)],t.prototype,"eBodyViewport",void 0),n([V.RefSelector("eCenterContainer"),s("design:type",HTMLElement)],t.prototype,"eCenterContainer",void 0),n([V.RefSelector("eCenterViewport"),s("design:type",HTMLElement)],t.prototype,"eCenterViewport",void 0),n([V.RefSelector("eLeftContainer"),s("design:type",HTMLElement)],t.prototype,"eLeftContainer",void 0),n([V.RefSelector("eRightContainer"),s("design:type",HTMLElement)],t.prototype,"eRightContainer",void 0),n([V.RefSelector("eCenterColsClipper"),s("design:type",HTMLElement)],t.prototype,"eCenterColsClipper",void 0),n([V.RefSelector("eHorizontalScrollBody"),s("design:type",HTMLElement)],t.prototype,"eHorizontalScrollBody",void 0),n([V.RefSelector("eHorizontalLeftSpacer"),s("design:type",HTMLElement)],t.prototype,"eHorizontalLeftSpacer",void 0),n([V.RefSelector("eHorizontalRightSpacer"),s("design:type",HTMLElement)],t.prototype,"eHorizontalRightSpacer",void 0),n([V.RefSelector("eBodyHorizontalScrollViewport"),s("design:type",HTMLElement)],t.prototype,"eBodyHorizontalScrollViewport",void 0),n([V.RefSelector("eBodyHorizontalScrollContainer"),s("design:type",HTMLElement)],t.prototype,"eBodyHorizontalScrollContainer",void 0),n([V.RefSelector("eFullWidthContainer"),s("design:type",HTMLElement)],t.prototype,"eFullWidthContainer",void 0),n([V.RefSelector("eTop"),s("design:type",HTMLElement)],t.prototype,"eTop",void 0),n([V.RefSelector("eLeftTop"),s("design:type",HTMLElement)],t.prototype,"eLeftTop",void 0),n([V.RefSelector("eRightTop"),s("design:type",HTMLElement)],t.prototype,"eRightTop",void 0),n([V.RefSelector("eTopContainer"),s("design:type",HTMLElement)],t.prototype,"eTopContainer",void 0),n([V.RefSelector("eTopViewport"),s("design:type",HTMLElement)],t.prototype,"eTopViewport",void 0),n([V.RefSelector("eTopFullWidthContainer"),s("design:type",HTMLElement)],t.prototype,"eTopFullWidthContainer",void 0),n([V.RefSelector("eBottom"),s("design:type",HTMLElement)],t.prototype,"eBottom",void 0),n([V.RefSelector("eLeftBottom"),s("design:type",HTMLElement)],t.prototype,"eLeftBottom",void 0),n([V.RefSelector("eRightBottom"),s("design:type",HTMLElement)],t.prototype,"eRightBottom",void 0),n([V.RefSelector("eBottomContainer"),s("design:type",HTMLElement)],t.prototype,"eBottomContainer",void 0),n([V.RefSelector("eBottomViewport"),s("design:type",HTMLElement)],t.prototype,"eBottomViewport",void 0),n([V.RefSelector("eBottomFullWidthContainer"),s("design:type",HTMLElement)],t.prototype,"eBottomFullWidthContainer",void 0),n([V.RefSelector("headerRoot"),s("design:type",j.HeaderRootComp)],t.prototype,"headerRootComp",void 0),n([V.RefSelector("overlayWrapper"),s("design:type",N.OverlayWrapperComponent)],t.prototype,"overlayWrapper",void 0),n([c.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"init",null),t}(F.Component);t.GridPanel=B},64279:e=>{const{AbortController:t,AbortSignal:o}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=o,e.exports.default=t},64314:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(44081),a=function(){function e(){this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.animationThreadCount=0}return e.prototype.registerGridComp=function(e){this.gridPanel=e},e.prototype.isActive=function(){return this.active},e.prototype.start=function(){this.active||this.gridOptionsWrapper.isSuppressColumnMoveAnimation()||this.gridOptionsWrapper.isEnableRtl()||(this.ensureAnimationCssClassPresent(),this.active=!0)},e.prototype.finish=function(){this.active&&(this.flush(),this.active=!1)},e.prototype.executeNextVMTurn=function(e){this.active?this.executeNextFuncs.push(e):e()},e.prototype.executeLaterVMTurn=function(e){this.active?this.executeLaterFuncs.push(e):e()},e.prototype.ensureAnimationCssClassPresent=function(){var e=this;this.animationThreadCount++;var t=this.animationThreadCount;this.gridPanel.setColumnMovingCss(!0),this.executeLaterFuncs.push((function(){e.animationThreadCount===t&&e.gridPanel.setColumnMovingCss(!1)}))},e.prototype.flush=function(){var e=this.executeNextFuncs;this.executeNextFuncs=[];var t=this.executeLaterFuncs;this.executeLaterFuncs=[],0===e.length&&0===t.length||(window.setTimeout((function(){return e.forEach((function(e){return e()}))}),0),window.setTimeout((function(){return t.forEach((function(e){return e()}))}),300))},r([n.Autowired("gridOptionsWrapper"),i("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.Bean("columnAnimationService")],e)}();t.ColumnAnimationService=a},65360:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(44081),i=o(54828),n=o(44871),s=o(98239),a=o(10042),l=o(89929),p=o(55e3),u=o(24463),c=o(60843),d=o(64229),h=o(40797),f=o(7897),g=o(31887),m=o(40634),y=o(92427),v=o(73575),C=o(37132),w=o(814),E=o(41832),_=o(97177),b=o(72493),R=o(43460),S=o(81999),O=o(42726),T=o(58342),A=o(25230),P=o(86608),I=o(42195),x=o(1571),D=o(38427),N=o(24048),F=o(18954),M=o(57498),k=o(85786),L=o(30971),G=o(719),V=o(34470),j=o(93121),W=o(21951),H=o(86895),B=o(13887),U=o(33467),z=o(59873),Y=o(42664),q=o(66490),K=o(93830),$=o(64314),Z=o(2461),J=o(663),Q=o(43878),X=o(41451),ee=o(76133),te=o(45727),oe=o(88842),re=o(6065),ie=o(10190),ne=o(50580),se=o(85910),ae=o(36777),le=o(69638),pe=o(22743),ue=o(55090),ce=o(59007),de=o(69065),he=o(8894),fe=o(51755),ge=o(4889),me=o(23801),ye=o(21914),ve=o(68198),Ce=o(9018),we=o(83423),Ee=o(39984),_e=o(45697),be=function(){function e(t,o,k){t||console.error("ag-Grid: no div element provided to the grid"),o||console.error("ag-Grid: no gridOptions provided to the grid"),this.gridOptions=o;var L=this.getRowModelClass(o),G=we._.exists(e.enterpriseBeans),te=k?k.frameworkFactory:null;we._.missing(te)&&(te=new H.BaseFrameworkFactory);var be=[];e.enterpriseBeans&&(be=be.concat(e.enterpriseBeans)),e.frameworkBeans&&(be=be.concat(e.frameworkBeans));var Re={enterprise:G,gridOptions:o,eGridDiv:t,$scope:k?k.$scope:null,$compile:k?k.$compile:null,quickFilterOnScope:k?k.quickFilterOnScope:null,globalEventListener:k?k.globalEventListener:null,frameworkFactory:te};k&&k.seedBeanInstances&&we._.assign(Re,k.seedBeanInstances);var Se=[{componentName:"AgCheckbox",theClass:W.AgCheckbox},{componentName:"AgGridComp",theClass:d.GridPanel},{componentName:"AgHeaderRoot",theClass:l.HeaderRootComp},{componentName:"AgPagination",theClass:ye.PaginationComp},{componentName:"AgOverlayWrapper",theClass:_e.OverlayWrapperComponent}];e.enterpriseComponents&&(Se=Se.concat(e.enterpriseComponents));var Oe={overrideBeans:be,seed:Re,beans:[L,ue.Beans,X.PaginationAutoPageSizeService,h.GridApi,ae.UserComponentRegistry,le.AgComponentUtils,pe.ComponentMetadataProvider,ve.ResizeObserverService,ae.UserComponentRegistry,se.UserComponentFactory,fe.MaxDivHeightScaler,me.AutoHeightCalculator,V.CellRendererFactory,_.HorizontalResizeService,ne.PinnedRowModel,A.DragService,g.DisplayedGroupCreator,c.EventService,r.GridOptionsWrapper,v.PopupService,i.SelectionController,p.FilterManager,s.ColumnController,X.PaginationProxy,a.RowRenderer,m.ExpressionService,f.ColumnFactory,R.CsvCreator,U.Downloader,z.XmlFactory,Y.GridSerializer,y.TemplateService,ie.AlignedGridsService,he.NavigationService,v.PopupService,oe.ValueCache,u.ValueService,C.LoggerFactory,w.ColumnUtils,E.AutoWidthCalculator,O.StandardMenuFactory,T.DragAndDropService,n.ColumnApi,I.FocusedCellController,x.MouseEventService,ce.Environment,D.CellNavigationService,N.FilterStage,F.SortStage,M.FlattenStage,J.FilterService,j.ValueFormatterService,q.StylingService,B.ScrollVisibleService,P.SortController,K.ColumnHoverService,$.ColumnAnimationService,Z.SortService,ge.SelectableService,Q.AutoGroupColService,ee.ImmutableService,re.ChangeDetectionService,de.AnimationFrameService,Ee.TooltipManager,Ce.ZipContainer],components:Se,enterpriseDefaultComponents:e.enterpriseDefaultComponents,debug:!!o.debug};this.logger=new C.Logger("ag-Grid",(function(){return o.debug}));var Te=new C.Logger("Context",(function(){return Oe.debug}));this.context=new b.Context(Oe,Te);var Ae=new S.GridCore;this.context.wireBean(Ae),this.setColumnsAndData(),this.dispatchGridReadyEvent(o),this.logger.log("initialised successfully, enterprise = "+G)}return e.setEnterpriseBeans=function(t,o){this.enterpriseBeans=t,we._.iterateObject(o,(function(t,o){return e.RowModelClasses[t]=o}))},e.setEnterpriseComponents=function(e){this.enterpriseComponents=e},e.setFrameworkBeans=function(e){this.frameworkBeans=e},e.setEnterpriseDefaultComponents=function(e){this.enterpriseDefaultComponents=e},e.prototype.setColumnsAndData=function(){var e=this.context.getBean("gridOptionsWrapper"),t=this.context.getBean("columnController"),o=this.context.getBean("rowModel"),r=e.getColumnDefs(),i=e.getRowData();we._.missing(r)&&we._.missing(i)||(we._.exists(r)&&t.setColumnDefs(r,"gridInitializing"),we._.exists(i)&&o.getType()===te.Constants.ROW_MODEL_TYPE_CLIENT_SIDE&&o.setRowData(i))},e.prototype.dispatchGridReadyEvent=function(e){var t=this.context.getBean("eventService"),o={type:k.Events.EVENT_GRID_READY,api:e.api,columnApi:e.columnApi};t.dispatchEvent(o)},e.prototype.getRowModelClass=function(t){var o=t.rowModelType;if(o="enterprise"===o?te.Constants.ROW_MODEL_TYPE_SERVER_SIDE:o,we._.exists(o)){var r=e.RowModelClasses[o];if(we._.exists(r))return r;if("normal"===o)return console.warn("ag-Grid: normal rowModel deprecated. Should now be called client side row model instead."),G.ClientSideRowModel;console.error("ag-Grid: could not find matching row model for rowModelType "+o),o===te.Constants.ROW_MODEL_TYPE_VIEWPORT&&console.error("ag-Grid: rowModelType viewport is only available in ag-Grid Enterprise"),o===te.Constants.ROW_MODEL_TYPE_SERVER_SIDE&&console.error("ag-Grid: rowModelType server side is only available in ag-Grid Enterprise")}return G.ClientSideRowModel},e.prototype.destroy=function(){this.gridOptions.api.destroy()},e.RowModelClasses={infinite:L.InfiniteRowModel,clientSide:G.ClientSideRowModel},e}();t.Grid=be},65802:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var n=o(8534),s=o(44329),a=o(83423),l=function(e){function t(t){var o=e.call(this)||this;return o.maxRowFound=!1,o.blocks={},o.blockCount=0,o.virtualRowCount=t.initialRowCount,o.cacheParams=t,o}return i(t,e),t.prototype.destroy=function(){var t=this;e.prototype.destroy.call(this),this.forEachBlockInOrder((function(e){return t.destroyBlock(e)}))},t.prototype.init=function(){var e=this;this.active=!0,this.addDestroyFunc((function(){return e.active=!1}))},t.prototype.isActive=function(){return this.active},t.prototype.getVirtualRowCount=function(){return this.virtualRowCount},t.prototype.hack_setVirtualRowCount=function(e){this.virtualRowCount=e},t.prototype.isMaxRowFound=function(){return this.maxRowFound},t.prototype.onPageLoaded=function(e){this.cacheParams.rowNodeBlockLoader.loadComplete(),this.checkBlockToLoad(),this.isActive()&&(this.logger.log("onPageLoaded: page = "+e.page.getBlockNumber()+", lastRow = "+e.lastRow),e.success&&this.checkVirtualRowCount(e.page,e.lastRow))},t.prototype.purgeBlocksIfNeeded=function(e){var o=this,r=[];this.forEachBlockInOrder((function(t){t!==e&&r.push(t)})),r.sort((function(e,t){return t.getLastAccessed()-e.getLastAccessed()}));var i=this.cacheParams.maxBlocksInCache>0,n=i?this.cacheParams.maxBlocksInCache-1:null,a=t.MAX_EMPTY_BLOCKS_TO_KEEP-1;r.forEach((function(e,t){if(e.getState()===s.RowNodeBlock.STATE_DIRTY&&t>=a||i&&t>=n){if(e.isAnyNodeOpen(o.virtualRowCount))return;o.removeBlockFromCache(e)}}))},t.prototype.postCreateBlock=function(e){e.addEventListener(s.RowNodeBlock.EVENT_LOAD_COMPLETE,this.onPageLoaded.bind(this)),this.setBlock(e.getBlockNumber(),e),this.purgeBlocksIfNeeded(e),this.checkBlockToLoad()},t.prototype.removeBlockFromCache=function(e){e&&this.destroyBlock(e)},t.prototype.checkBlockToLoad=function(){this.cacheParams.rowNodeBlockLoader.checkBlockToLoad()},t.prototype.checkVirtualRowCount=function(e,t){if("number"==typeof t&&t>=0)this.virtualRowCount=t,this.maxRowFound=!0,this.onCacheUpdated();else if(!this.maxRowFound){var o=(e.getBlockNumber()+1)*this.cacheParams.blockSize+this.cacheParams.overflowSize;this.virtualRowCount<o?(this.virtualRowCount=o,this.onCacheUpdated()):this.cacheParams.dynamicRowHeight&&this.onCacheUpdated()}},t.prototype.setVirtualRowCount=function(e,t){this.virtualRowCount=e,a._.exists(t)&&(this.maxRowFound=t),this.maxRowFound||this.virtualRowCount%this.cacheParams.blockSize==0&&this.virtualRowCount++,this.onCacheUpdated()},t.prototype.forEachNodeDeep=function(e,t){var o=this;this.forEachBlockInOrder((function(r){r.forEachNodeDeep(e,t,o.virtualRowCount)}))},t.prototype.forEachBlockInOrder=function(e){var t=this.getBlockIdsSorted();this.forEachBlockId(t,e)},t.prototype.forEachBlockInReverseOrder=function(e){var t=this.getBlockIdsSorted().reverse();this.forEachBlockId(t,e)},t.prototype.forEachBlockId=function(e,t){var o=this;e.forEach((function(e){var r=o.blocks[e];t(r,e)}))},t.prototype.getBlockIdsSorted=function(){return Object.keys(this.blocks).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t}))},t.prototype.getBlock=function(e){return this.blocks[e]},t.prototype.setBlock=function(e,t){this.blocks[e]=t,this.blockCount++,this.cacheParams.rowNodeBlockLoader.addBlock(t)},t.prototype.destroyBlock=function(e){delete this.blocks[e.getBlockNumber()],e.destroy(),this.blockCount--,this.cacheParams.rowNodeBlockLoader.removeBlock(e)},t.prototype.onCacheUpdated=function(){if(this.isActive()){var e={type:t.EVENT_CACHE_UPDATED};this.dispatchEvent(e)}},t.prototype.purgeCache=function(){var e=this;this.forEachBlockInOrder((function(t){return e.removeBlockFromCache(t)})),this.virtualRowCount=this.cacheParams.initialRowCount,this.maxRowFound=!1,this.onCacheUpdated()},t.prototype.getRowNodesInRange=function(e,t){var o=this,r=[],i=-1,n=!1,s=new a.NumberSequence;a._.missing(e)&&(n=!0);var l=!1;return this.forEachBlockInOrder((function(a,p){l||(n&&i+1!==p?l=!0:(i=p,a.forEachNodeShallow((function(o){var i=o===e||o===t;(n||i)&&r.push(o),i&&(n=!n)}),s,o.virtualRowCount)))})),l||n?[]:r},t.EVENT_CACHE_UPDATED="cacheUpdated",t.MAX_EMPTY_BLOCKS_TO_KEEP=2,t}(n.BeanStub);t.RowNodeCache=l},66419:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(60843),i=o(83423),n=function(){function e(e,t){void 0===t&&(t=!1);var o=this;this.destroyFuncs=[],this.touching=!1,this.eventService=new r.EventService,this.eElement=e,this.preventMouseClick=t;var i=this.onTouchStart.bind(this),n=this.onTouchMove.bind(this),s=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",i,{passive:!0}),this.eElement.addEventListener("touchmove",n,{passive:!0}),this.eElement.addEventListener("touchend",s,{passive:!1}),this.destroyFuncs.push((function(){o.eElement.removeEventListener("touchstart",i,{passive:!0}),o.eElement.removeEventListener("touchmove",n,{passive:!0}),o.eElement.removeEventListener("touchend",s,{passive:!1})}))}return e.prototype.getActiveTouch=function(e){for(var t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null},e.prototype.addEventListener=function(e,t){this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService.removeEventListener(e,t)},e.prototype.onTouchStart=function(t){var o=this;if(!this.touching){this.touchStart=t.touches[0],this.touching=!0,this.moved=!1;var r=this.touchStart;window.setTimeout((function(){var i=o.touchStart===r;if(o.touching&&i&&!o.moved){o.moved=!0;var n={type:e.EVENT_LONG_TAP,touchStart:o.touchStart,touchEvent:t};o.eventService.dispatchEvent(n)}}),500)}},e.prototype.onTouchMove=function(e){if(this.touching){var t=this.getActiveTouch(e.touches);t&&!i._.areEventsNear(t,this.touchStart,4)&&(this.moved=!0)}},e.prototype.onTouchEnd=function(t){if(this.touching){if(!this.moved){var o={type:e.EVENT_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(o),this.checkForDoubleTap()}this.preventMouseClick&&t.preventDefault(),this.touching=!1}},e.prototype.checkForDoubleTap=function(){var t=(new Date).getTime();if(this.lastTapTime&&this.lastTapTime>0)if(t-this.lastTapTime>e.DOUBLE_TAP_MILLIS){var o={type:e.EVENT_DOUBLE_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(o),this.lastTapTime=null}else this.lastTapTime=t;else this.lastTapTime=t},e.prototype.destroy=function(){this.destroyFuncs.forEach((function(e){return e()}))},e.EVENT_TAP="tap",e.EVENT_DOUBLE_TAP="doubleTap",e.EVENT_LONG_TAP="longTap",e.DOUBLE_TAP_MILLIS=500,e}();t.TouchListener=n},66490:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(40634),a=function(){function e(){}return e.prototype.processAllCellClasses=function(e,t,o,r){this.processClassRules(e.cellClassRules,t,o,r),this.processStaticCellClasses(e,t,o)},e.prototype.processClassRules=function(e,t,o,r){if("object"==typeof e&&null!==e)for(var i=Object.keys(e),n=0;n<i.length;n++){var s=i[n],a=e[s],l=void 0;"string"==typeof a?l=this.expressionService.evaluate(a,t):"function"==typeof a&&(l=a(t)),l?o(s):r&&r(s)}},e.prototype.processStaticCellClasses=function(e,t,o){if(e.cellClass){var r=void 0;"string"==typeof(r="function"==typeof e.cellClass?(0,e.cellClass)(t):e.cellClass)?o(r):Array.isArray(r)&&r.forEach((function(e){o(e)}))}},r([n.Autowired("expressionService"),i("design:type",s.ExpressionService)],e.prototype,"expressionService",void 0),r([n.Bean("stylingService")],e)}();t.StylingService=a},68198:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(44081),a=o(83423),l=function(){function e(){}return e.prototype.observeResize=function(e,t){var o,r,i,n,s,l=this.frameworkFactory,p=this.gridOptionsWrapper.isSuppressBrowserResizeObserver();return window.ResizeObserver&&!p?((s=new window.ResizeObserver(t)).observe(e),function(){return s.disconnect()}):(o=a._.offsetWidth(e),r=a._.offsetHeight(e),i=!0,(n=function(){if(i){var s=a._.offsetWidth(e),p=a._.offsetHeight(e);(s!==o||p!==r)&&(o=s,r=p,t()),l.setTimeout(n,500)}})(),function(){return i=!1})},r([n.Autowired("gridOptionsWrapper"),i("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.Autowired("frameworkFactory"),i("design:type",Object)],e.prototype,"frameworkFactory",void 0),r([n.Bean("resizeObserverService")],e)}();t.ResizeObserverService=l},68363:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}return e.prototype.setInactive=function(){this.active=!1},e.prototype.isActive=function(){return this.active},e.prototype.depthFirstSearchChangedPath=function(e,t){if(e.children)for(var o=0;o<e.children.length;o++)this.depthFirstSearchChangedPath(e.children[o],t);t(e.rowNode)},e.prototype.depthFirstSearchEverything=function(e,t,o){if(e.childrenAfterGroup)for(var r=0;r<e.childrenAfterGroup.length;r++){var i=e.childrenAfterGroup[r];i.childrenAfterGroup?this.depthFirstSearchEverything(e.childrenAfterGroup[r],t,o):o&&t(i)}t(e)},e.prototype.forEachChangedNodeDepthFirst=function(e,t){void 0===t&&(t=!1),this.active?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)},e.prototype.executeFromRootNode=function(e){e(this.pathRoot.rowNode)},e.prototype.createPathItems=function(e){for(var t=e,o=0;!this.mapToItems[t.id];){var r={rowNode:t,children:null};this.mapToItems[t.id]=r,o++,t=t.parent}return o},e.prototype.populateColumnsMap=function(e,t){var o=this;if(this.keepingColumns&&t)for(var r=e;r;)this.nodeIdsToColumns[r.id]||(this.nodeIdsToColumns[r.id]={}),t.forEach((function(e){return o.nodeIdsToColumns[r.id][e.getId()]=!0})),r=r.parent},e.prototype.linkPathItems=function(e,t){for(var o=e,r=0;r<t;r++){var i=this.mapToItems[o.id],n=this.mapToItems[o.parent.id];n.children||(n.children=[]),n.children.push(i),o=o.parent}},e.prototype.addParentNode=function(e,t){var o=this.createPathItems(e);this.linkPathItems(e,o),this.populateColumnsMap(e,t)},e.prototype.canSkip=function(e){return this.active&&!this.mapToItems[e.id]},e.prototype.getValueColumnsForNode=function(e,t){if(!this.keepingColumns)return t;var o=this.nodeIdsToColumns[e.id];return t.filter((function(e){return o[e.getId()]}))},e.prototype.getNotValueColumnsForNode=function(e,t){if(!this.keepingColumns)return null;var o=this.nodeIdsToColumns[e.id];return t.filter((function(e){return!o[e.getId()]}))},e}();t.ChangedPath=o},69065:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(44081),a=o(85222),l=o(60843),p=function(){function e(){this.createRowTasks=[],this.destroyRowTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0}return e.prototype.setScrollTop=function(e){this.scrollGoingDown=e>this.lastScrollTop,this.lastScrollTop=e},e.prototype.init=function(){this.useAnimationFrame=!this.gridOptionsWrapper.isSuppressAnimationFrame()},e.prototype.verifyAnimationFrameOn=function(e){!1===this.useAnimationFrame&&console.warn("ag-Grid: AnimationFrameService."+e+" called but animation frames are off")},e.prototype.addP1Task=function(e,t){this.verifyAnimationFrameOn("addP1Task");var o={task:e,index:t};this.createRowTasks.push(o),this.schedule()},e.prototype.addP2Task=function(e){this.verifyAnimationFrameOn("addP2Task"),this.destroyRowTasks.push(e),this.schedule()},e.prototype.executeFrame=function(e){this.verifyAnimationFrameOn("executeFrame"),this.scrollGoingDown?this.createRowTasks.sort((function(e,t){return t.index-e.index})):this.createRowTasks.sort((function(e,t){return e.index-t.index}));for(var t=(new Date).getTime(),o=(new Date).getTime()-t,r=e<=0;r||o<e;){if(this.createRowTasks.length>0)this.createRowTasks.pop().task();else{if(!(this.destroyRowTasks.length>0))break;this.destroyRowTasks.pop()()}o=(new Date).getTime()-t}this.createRowTasks.length>0||this.destroyRowTasks.length>0?this.requestFrame():this.stopTicking()},e.prototype.stopTicking=function(){this.ticking=!1;var e={type:a.Events.EVENT_ANIMATION_QUEUE_EMPTY,columnApi:this.gridOptionsWrapper.getColumnApi(),api:this.gridOptionsWrapper.getApi()};this.eventService.dispatchEvent(e)},e.prototype.flushAllFrames=function(){this.useAnimationFrame&&this.executeFrame(-1)},e.prototype.schedule=function(){this.useAnimationFrame&&(this.ticking||(this.ticking=!0,this.requestFrame()))},e.prototype.requestFrame=function(){var e=this.executeFrame.bind(this,60);window.requestAnimationFrame?window.requestAnimationFrame(e):window.webkitRequestAnimationFrame?window.webkitRequestAnimationFrame(e):window.setTimeout(e,0)},e.prototype.isQueueEmpty=function(){return this.ticking},r([n.Autowired("gridOptionsWrapper"),i("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.Autowired("eventService"),i("design:type",l.EventService)],e.prototype,"eventService",void 0),r([n.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),r([n.Bean("animationFrameService")],e)}();t.AnimationFrameService=p},69397:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(72493),l=o(34255),p=o(47721),u=o(85910),c=o(22131),d=o(45727),h=o(83423),f=function(e){function t(){var t=e.call(this,'<div class="ag-input-text-wrapper"><input ref="eColumnFloatingFilter" class="ag-floating-filter-input"></div>')||this;return t.lastKnownModel=null,t}return i(t,e),t.prototype.init=function(e){this.onFloatingFilterChanged=e.onFloatingFilterChanged,this.currentParentModel=e.currentParentModel;var t=null!=e.debounceMs?e.debounceMs:500,o=h._.debounce(this.syncUpWithParentFilter.bind(this),t);this.addDestroyableEventListener(this.eColumnFloatingFilter,"input",o),this.addDestroyableEventListener(this.eColumnFloatingFilter,"keypress",o),this.addDestroyableEventListener(this.eColumnFloatingFilter,"keydown",o);var r=e.column.getDefinition();r.filterParams&&r.filterParams.filterOptions&&1===r.filterParams.filterOptions.length&&"inRange"===r.filterParams.filterOptions[0]&&(this.eColumnFloatingFilter.disabled=!0)},t.prototype.onParentModelChanged=function(e,t){if(null!=t)return this.eColumnFloatingFilter.value=this.parseAsText(t.condition1)+" "+t.operator+" "+this.parseAsText(t.condition2),this.eColumnFloatingFilter.disabled=!0,this.lastKnownModel=null,this.eColumnFloatingFilter.title=this.eColumnFloatingFilter.value,void(this.eColumnFloatingFilter.style.cursor="default");if(this.eColumnFloatingFilter.disabled=!1,this.equalModels(this.lastKnownModel,e))this.lastKnownModel||e||(this.eColumnFloatingFilter.value="");else{this.lastKnownModel=e;var o=this.asFloatingFilterText(e);o!==this.eColumnFloatingFilter.value&&(this.eColumnFloatingFilter.value=o,this.eColumnFloatingFilter.title="")}},t.prototype.syncUpWithParentFilter=function(e){var t=this.asParentModel();this.equalModels(this.lastKnownModel,t)||(h._.isKeyPressed(e,d.Constants.KEY_ENTER)?this.onFloatingFilterChanged({model:t,apply:!0}):this.onFloatingFilterChanged({model:t,apply:!1}))&&(this.lastKnownModel=t)},t.prototype.equalModels=function(e,t){return!!h._.referenceCompare(e,t)||!(!e||!t)&&!Array.isArray(e)&&!Array.isArray(t)&&h._.referenceCompare(e.type,t.type)&&h._.referenceCompare(e.filter,t.filter)&&h._.referenceCompare(e.filterTo,t.filterTo)&&h._.referenceCompare(e.filterType,t.filterType)},n([p.RefSelector("eColumnFloatingFilter"),s("design:type",HTMLInputElement)],t.prototype,"eColumnFloatingFilter",void 0),t}(c.Component);t.InputTextFloatingFilterComp=f;var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.asFloatingFilterText=function(e){return e?e.filter:""},t.prototype.asParentModel=function(){return{type:this.currentParentModel().type,filter:this.eColumnFloatingFilter.value,filterType:"text"}},t.prototype.parseAsText=function(e){return this.asFloatingFilterText(e)},t}(f);t.TextFloatingFilterComp=g;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastKnownModel=null,t}return i(t,e),t.prototype.init=function(e){this.onFloatingFilterChanged=e.onFloatingFilterChanged,this.currentParentModel=e.currentParentModel;var t=null!=e.debounceMs?e.debounceMs:500,o={onDateChanged:h._.debounce(this.onDateChanged.bind(this),t),filterParams:e.column.getColDef().filterParams};this.dateComponentPromise=this.userComponentFactory.newDateComponent(o);var r=h._.loadTemplate("<div></div>");this.dateComponentPromise.then((function(t){r.appendChild(t.getGui());var o=e.column.getDefinition(),i=o.filterParams&&o.filterParams.filterOptions&&1===o.filterParams.filterOptions.length&&"inRange"===o.filterParams.filterOptions[0];t.eDateInput&&(t.eDateInput.disabled=i)})),r.style.width="100%",r.style.height="100%",this.setTemplateFromElement(r)},t.prototype.onDateChanged=function(){var e=this.currentParentModel(),t=this.asParentModel();this.equalModels(e,t)||(this.onFloatingFilterChanged({model:t,apply:!0}),this.lastKnownModel=t)},t.prototype.equalModels=function(e,t){return!!h._.referenceCompare(e,t)||!(!e||!t)&&!Array.isArray(e)&&!Array.isArray(t)&&h._.referenceCompare(e.type,t.type)&&h._.referenceCompare(e.dateFrom,t.dateFrom)&&h._.referenceCompare(e.dateTo,t.dateTo)&&h._.referenceCompare(e.filterType,t.filterType)},t.prototype.asParentModel=function(){var e=this.currentParentModel(),t=this.dateComponentPromise.resolveNow(null,(function(e){return e.getDate()})),o=h._.serializeDateToYyyyMmDd(l.DateFilter.removeTimezone(t),"-");return{type:e.type,dateFrom:o,dateTo:e?e.dateTo:null,filterType:"date"}},t.prototype.onParentModelChanged=function(e){var t=this;this.lastKnownModel=e,this.dateComponentPromise.then((function(o){e&&e.dateFrom?(t.enrichDateInput(e.type,e.dateFrom,e.dateTo,o),o.setDate(h._.parseYyyyMmDdToDate(e.dateFrom,"-"))):o.setDate(null)}))},t.prototype.enrichDateInput=function(e,t,o,r){r.eDateInput&&("inRange"===e?(r.eDateInput.title=t+" to "+o,r.eDateInput.disabled=!0):(r.eDateInput.title="",r.eDateInput.disabled=!1))},n([a.Autowired("userComponentFactory"),s("design:type",u.UserComponentFactory)],t.prototype,"userComponentFactory",void 0),t}(c.Component);t.DateFloatingFilterComp=m;var y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.asFloatingFilterText=function(e){var t=this.currentParentModel();return null==e&&null==t?"":null==e&&null!=t&&"inRange"!==t.type?(this.eColumnFloatingFilter.disabled=!1,""):null!=t&&"inRange"===t.type?(this.eColumnFloatingFilter.disabled=!0,this.parseAsText(t)):(this.eColumnFloatingFilter.disabled=!1,this.parseAsText(e))},t.prototype.parseAsText=function(e){var t=this.asNumber(e.filter);if(e.type&&"inRange"===e.type){var o=this.asNumber(e.filterTo);return(t?t+"":"")+"-"+(o?o+"":"")}return null!=t?t+"":""},t.prototype.asParentModel=function(){var e,t=this.currentParentModel(),o=this.asNumber(this.eColumnFloatingFilter.value),r=this.eColumnFloatingFilter.value;return e=null==o&&""===r?null:null==o?t.filter:o,{type:t.type,filter:e,filterTo:t?t.filterTo:null,filterType:"number"}},t.prototype.asNumber=function(e){if(null==e)return null;if(""===e)return null;var t=Number(e);return h._.isNumeric(t)?t:null},t}(f);t.NumberFloatingFilterComp=y;var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.init=function(t){e.prototype.init.call(this,t),this.eColumnFloatingFilter.disabled=!0},t.prototype.asFloatingFilterText=function(e){if(this.eColumnFloatingFilter.disabled=!0,!e)return"";var t=e instanceof Array?e:e.values;if(0===t.length)return"";var o=t.length>10?t.slice(0,10).concat("..."):t;return"("+t.length+") "+o.join(",")},t.prototype.parseAsText=function(e){return this.asFloatingFilterText(e)},t.prototype.asParentModel=function(){return null==this.eColumnFloatingFilter.value||""===this.eColumnFloatingFilter.value?{values:[],filterType:"set"}:{values:this.eColumnFloatingFilter.value.split(","),filterType:"set"}},t.prototype.equalModels=function(e,t){return!1},t}(f);t.SetFloatingFilterComp=v;var C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.init=function(t){e.prototype.init.call(this,t),this.eColumnFloatingFilter.disabled=!0},t.prototype.onParentModelChanged=function(e){this.eColumnFloatingFilter.value=this.asFloatingFilterText(this.currentParentModel())},t.prototype.asFloatingFilterText=function(e){return e},t.prototype.parseAsText=function(e){return e},t.prototype.asParentModel=function(){return null},t}(f);t.ReadModelAsStringFloatingFilterComp=C},69638:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(22743),a=o(83423),l=function(){function e(){}return e.prototype.adaptFunction=function(e,t,o,r){if(null==t)return{component:null,componentFromFramework:o,source:r,paramsFromSelector:null};var i=this.componentMetadataProvider.retrieve(e);return i&&i.functionAdapter?{componentFromFramework:o,component:i.functionAdapter(t),source:r,paramsFromSelector:null}:null},e.prototype.adaptCellRendererFunction=function(e){return function(){function t(){}return t.prototype.refresh=function(e){return!1},t.prototype.getGui=function(){var t=e(this.params),o=typeof t;return"string"===o||"number"===o||"boolean"===o?a._.loadTemplate("<span>"+t+"</span>"):t},t.prototype.init=function(e){this.params=e},t}()},e.prototype.doesImplementIComponent=function(e){return!!e&&e.prototype&&"getGui"in e.prototype},r([n.Autowired("componentMetadataProvider"),i("design:type",s.ComponentMetadataProvider)],e.prototype,"componentMetadataProvider",void 0),r([n.Bean("agComponentUtils")],e)}();t.AgComponentUtils=l},69734:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(83423),i=function(){function e(){this.existingKeys=[]}return e.prototype.addExistingKeys=function(e){this.existingKeys=this.existingKeys.concat(e)},e.prototype.getUniqueKey=function(e,t){e=r._.toStringOrNull(e);for(var o=0;;){var i=void 0;if(e?(i=e,0!==o&&(i+="_"+o)):t?(i=t,0!==o&&(i+="_"+o)):i=""+o,this.existingKeys.indexOf(i)<0)return this.existingKeys.push(i),i;o++}},e}();t.ColumnKeyCreator=i},69992:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n,s=o(58342),a=o(72493),l=o(27887),p=o(26016),u=o(20080),c=o(98239);!function(e){e[e.ColumnMove=0]="ColumnMove",e[e.Pivot=1]="Pivot"}(n||(n={}));var d=function(){function e(e,t){this.dropListeners={},this.pinned=e,this.eContainer=t}return e.prototype.registerGridComp=function(e){switch(this.gridPanel=e,this.moveColumnController.registerGridComp(e),this.pinned){case p.Column.PINNED_LEFT:this.eSecondaryContainers=this.gridPanel.getDropTargetLeftContainers();break;case p.Column.PINNED_RIGHT:this.eSecondaryContainers=this.gridPanel.getDropTargetRightContainers();break;default:this.eSecondaryContainers=this.gridPanel.getDropTargetBodyContainers()}},e.prototype.isInterestedIn=function(e){return e===s.DragSourceType.HeaderCell||e===s.DragSourceType.ToolPanel},e.prototype.getSecondaryContainers=function(){return this.eSecondaryContainers},e.prototype.getContainer=function(){return this.eContainer},e.prototype.init=function(){this.moveColumnController=new l.MoveColumnController(this.pinned,this.eContainer),this.context.wireBean(this.moveColumnController);var e=new u.BodyDropPivotTarget(this.pinned);this.context.wireBean(e),this.dropListeners[n.ColumnMove]=this.moveColumnController,this.dropListeners[n.Pivot]=e,this.dragAndDropService.addDropTarget(this)},e.prototype.getIconName=function(){return this.currentDropListener.getIconName()},e.prototype.getDropType=function(e){return this.columnController.isPivotMode()&&e.dragSource.type===s.DragSourceType.ToolPanel?n.Pivot:n.ColumnMove},e.prototype.onDragEnter=function(e){var t=this.getDropType(e);this.currentDropListener=this.dropListeners[t],this.currentDropListener.onDragEnter(e)},e.prototype.onDragLeave=function(e){this.currentDropListener.onDragLeave(e)},e.prototype.onDragging=function(e){this.currentDropListener.onDragging(e)},e.prototype.onDragStop=function(e){this.currentDropListener.onDragStop(e)},r([a.Autowired("context"),i("design:type",a.Context)],e.prototype,"context",void 0),r([a.Autowired("dragAndDropService"),i("design:type",s.DragAndDropService)],e.prototype,"dragAndDropService",void 0),r([a.Autowired("columnController"),i("design:type",c.ColumnController)],e.prototype,"columnController",void 0),r([a.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),e}();t.BodyDropTarget=d},71616:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var n=o(45727),s=o(46379),a=o(83423),l=function(e){function t(){var o=e.call(this,t.TEMPLATE)||this;return o.eInput=o.getGui().querySelector("input"),o}return i(t,e),t.prototype.init=function(e){this.params=e;var t,o=this.eInput;e.cellStartedEdit?(this.focusAfterAttached=!0,e.keyPress===n.Constants.KEY_BACKSPACE||e.keyPress===n.Constants.KEY_DELETE?t="":e.charPress?t=e.charPress:(t=this.getStartValue(e),e.keyPress!==n.Constants.KEY_F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,t=this.getStartValue(e)),a._.exists(t)&&(o.value=t),this.addDestroyableEventListener(o,"keydown",(function(e){if(e.keyCode===n.Constants.KEY_LEFT||e.keyCode===n.Constants.KEY_RIGHT||e.keyCode===n.Constants.KEY_UP||e.keyCode===n.Constants.KEY_DOWN||e.keyCode===n.Constants.KEY_PAGE_DOWN||e.keyCode===n.Constants.KEY_PAGE_UP||e.keyCode===n.Constants.KEY_PAGE_HOME||e.keyCode===n.Constants.KEY_PAGE_END){e.stopPropagation();var t=e.keyCode===n.Constants.KEY_PAGE_UP,o=e.keyCode===n.Constants.KEY_PAGE_DOWN;(t||o)&&e.preventDefault()}}))},t.prototype.afterGuiAttached=function(){if(this.focusAfterAttached){var e=this.eInput;if(e.focus(),this.highlightAllOnFocus)e.select();else{var t=e.value?e.value.length:0;t>0&&e.setSelectionRange(t,t)}}},t.prototype.focusIn=function(){var e=this.eInput;e.focus(),e.select()},t.prototype.getValue=function(){var e=this.eInput;return this.params.parseValue(e.value)},t.prototype.getStartValue=function(e){return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value},t.prototype.isPopup=function(){return!1},t.TEMPLATE='<div class="ag-input-text-wrapper"><input class="ag-cell-edit-input" type="text"/></div>',t}(s.PopupComponent);t.TextCellEditor=l},72493:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(83423),i=function(){function e(e,t){if(this.beanWrappers={},this.componentsMappedByName={},this.destroyed=!1,e&&e.beans){this.contextParams=e,this.logger=t,this.logger.log(">> creating ag-Application Context"),this.setupComponents(),this.createBeans();var o=this.getBeanInstances();this.wireBeans(o),this.logger.log(">> ag-Application Context ready - component is alive")}}return e.prototype.getBeanInstances=function(){return r._.mapObject(this.beanWrappers,(function(e){return e.beanInstance}))},e.prototype.setupComponents=function(){var e=this;this.contextParams.components&&this.contextParams.components.forEach((function(t){return e.addComponent(t)}))},e.prototype.addComponent=function(e){var t=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().toUpperCase();this.componentsMappedByName[t]=e.theClass},e.prototype.createComponentFromElement=function(e,t){var o=e.nodeName;if(this.componentsMappedByName&&this.componentsMappedByName[o]){var r=new this.componentsMappedByName[o];return this.wireBean(r,t),r}return null},e.prototype.wireBean=function(e,t){if(!e)throw Error("Can't wire to bean since it is null");this.wireBeans([e],t)},e.prototype.wireBeans=function(e,t){this.autoWireBeans(e),this.methodWireBeans(e),this.callLifeCycleMethods(e,"preConstructMethods"),r._.exists(t)&&e.forEach(t),this.callLifeCycleMethods(e,"postConstructMethods")},e.prototype.createBeans=function(){var e=this;this.contextParams.beans.forEach(this.createBeanWrapper.bind(this)),this.contextParams.overrideBeans&&this.contextParams.overrideBeans.forEach(this.createBeanWrapper.bind(this)),r._.iterateObject(this.beanWrappers,(function(t,o){var r;o.bean.__agBeanMetaData&&o.bean.__agBeanMetaData.autowireMethods&&o.bean.__agBeanMetaData.autowireMethods.agConstructor&&(r=o.bean.__agBeanMetaData.autowireMethods.agConstructor);var i,n,s=e.getBeansForParameters(r,o.bean.name),a=(i=o.bean,n=[null].concat(s),new(i.bind.apply(i,n)));o.beanInstance=a,e.logger.log("bean "+e.getBeanName(a)+" created")}))},e.prototype.createBeanWrapper=function(e){var t=e.__agBeanMetaData;if(!t){var o;return o=e.prototype.constructor?e.prototype.constructor.name:""+e,void console.error("context item "+o+" is not a bean")}var r={bean:e,beanInstance:null,beanName:t.beanName};this.beanWrappers[t.beanName]=r},e.prototype.autoWireBeans=function(e){var t=this;e.forEach((function(e){t.forEachMetaDataInHierarchy(e,(function(o,r){var i=o.agClassAttributes;i&&i.forEach((function(o){var i=t.lookupBeanInstance(r,o.beanName,o.optional);e[o.attributeName]=i}))}))}))},e.prototype.methodWireBeans=function(e){var t=this;e.forEach((function(e){t.forEachMetaDataInHierarchy(e,(function(o,i){r._.iterateObject(o.autowireMethods,(function(o,r){if("agConstructor"!==o){var n=t.getBeansForParameters(r,i);e[o].apply(e,n)}}))}))}))},e.prototype.forEachMetaDataInHierarchy=function(e,t){for(var o=Object.getPrototypeOf(e);null!=o;){var r=o.constructor;r.hasOwnProperty("__agBeanMetaData")&&t(r.__agBeanMetaData,this.getBeanName(r)),o=Object.getPrototypeOf(o)}},e.prototype.getBeanName=function(e){if(e.__agBeanMetaData&&e.__agBeanMetaData.beanName)return e.__agBeanMetaData.beanName;var t=e.toString();return t.substring(9,t.indexOf("("))},e.prototype.getBeansForParameters=function(e,t){var o=this,i=[];return e&&r._.iterateObject(e,(function(e,r){var n=o.lookupBeanInstance(t,r);i[Number(e)]=n})),i},e.prototype.lookupBeanInstance=function(e,t,o){if(void 0===o&&(o=!1),"context"===t)return this;if(this.contextParams.seed&&this.contextParams.seed.hasOwnProperty(t))return this.contextParams.seed[t];var r=this.beanWrappers[t];return r?r.beanInstance:(o||console.error("ag-Grid: unable to find bean reference "+t+" while initialising "+e),null)},e.prototype.callLifeCycleMethods=function(e,t){var o=this;e.forEach((function(e){o.forEachMetaDataInHierarchy(e,(function(o){var r=o[t];r&&r.forEach((function(t){return e[t]()}))}))}))},e.prototype.getBean=function(e){return this.lookupBeanInstance("getBean",e,!0)},e.prototype.getEnterpriseDefaultComponents=function(){return this.contextParams.enterpriseDefaultComponents},e.prototype.destroy=function(){if(!this.destroyed){this.logger.log(">> Shutting down ag-Application Context");var e=this.getBeanInstances();this.callLifeCycleMethods(e,"preDestroyMethods"),this.contextParams.seed=null,this.destroyed=!0,this.logger.log(">> ag-Application Context shut down - component is dead")}},e}();function n(e,t,o,r,i,n){if(null!==t)if("number"!=typeof n){var a=s(e.constructor);a.agClassAttributes||(a.agClassAttributes=[]),a.agClassAttributes.push({attributeName:i,beanName:t,optional:o})}else console.error("ag-Grid: Autowired should be on an attribute");else console.error("ag-Grid: Autowired name should not be null")}function s(e){return e.hasOwnProperty("__agBeanMetaData")||(e.__agBeanMetaData={}),e.__agBeanMetaData}t.Context=i,t.PreConstruct=function(e,t,o){var r=s(e.constructor);r.postConstructMethods||(r.preConstructMethods=[]),r.preConstructMethods.push(t)},t.PostConstruct=function(e,t,o){var r=s(e.constructor);r.postConstructMethods||(r.postConstructMethods=[]),r.postConstructMethods.push(t)},t.PreDestroy=function(e,t,o){var r=s(e.constructor);r.preDestroyMethods||(r.preDestroyMethods=[]),r.preDestroyMethods.push(t)},t.Bean=function(e){return function(t){s(t).beanName=e}},t.Autowired=function(e){return function(t,o,r){n(t,e,!1,0,o,null)}},t.Optional=function(e){return function(t,o,r){n(t,e,!0,0,o,null)}},t.Qualifier=function(e){return function(t,o,r){var i,n="function"==typeof t?t:t.constructor;if("number"==typeof r){var a=void 0;o?(i=s(n),a=o):(i=s(n),a="agConstructor"),i.autowireMethods||(i.autowireMethods={}),i.autowireMethods[a]||(i.autowireMethods[a]={}),i.autowireMethods[a][r]=e}}}},72948:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(74517),a=o(26016),l=o(60843),p=o(44871),u=o(40797),c=function(){function e(e,t,o,r){this.localEventService=new l.EventService,this.expandable=!1,this.colGroupDef=e,this.groupId=t,this.expanded=e&&!!e.openByDefault,this.padding=o,this.level=r}return e.prototype.setOriginalParent=function(e){this.originalParent=this.originalParent},e.prototype.getOriginalParent=function(){return this.originalParent},e.prototype.getLevel=function(){return this.level},e.prototype.isVisible=function(){return!!this.children&&this.children.some((function(e){return e.isVisible()}))},e.prototype.isPadding=function(){return this.padding},e.prototype.setExpanded=function(t){this.expanded=void 0!==t&&t;var o={type:e.EVENT_EXPANDED_CHANGED};this.localEventService.dispatchEvent(o)},e.prototype.isExpandable=function(){return this.expandable},e.prototype.isExpanded=function(){return this.expanded},e.prototype.getGroupId=function(){return this.groupId},e.prototype.getId=function(){return this.getGroupId()},e.prototype.setChildren=function(e){this.children=e},e.prototype.getChildren=function(){return this.children},e.prototype.getColGroupDef=function(){return this.colGroupDef},e.prototype.getLeafColumns=function(){var e=[];return this.addLeafColumns(e),e},e.prototype.addLeafColumns=function(t){this.children&&this.children.forEach((function(o){o instanceof a.Column?t.push(o):o instanceof e&&o.addLeafColumns(t)}))},e.prototype.getColumnGroupShow=function(){return this.padding?this.children[0].getColumnGroupShow():this.colGroupDef.columnGroupShow},e.prototype.setupExpandable=function(){var e=this;this.setExpandable(),this.getLeafColumns().forEach((function(t){return t.addEventListener(a.Column.EVENT_VISIBLE_CHANGED,e.onColumnVisibilityChanged.bind(e))}))},e.prototype.setExpandable=function(){if(!this.isPadding()){for(var t=!1,o=!1,r=!1,i=this.findChildren(),n=0,a=i.length;n<a;n++){var l=i[n];if(l.isVisible()){var p=l.getColumnGroupShow();p===s.ColumnGroup.HEADER_GROUP_SHOW_OPEN?(t=!0,r=!0):p===s.ColumnGroup.HEADER_GROUP_SHOW_CLOSED?(o=!0,r=!0):(t=!0,o=!0)}}var u=t&&o&&r;if(this.expandable!==u){this.expandable=u;var c={type:e.EVENT_EXPANDABLE_CHANGED};this.localEventService.dispatchEvent(c)}}},e.prototype.findChildren=function(){var t=this.children,o=t[0];if(o&&(!o.isPadding||!o.isPadding()))return t;for(;1===t.length&&t[0]instanceof e;)t=t[0].children;return t},e.prototype.onColumnVisibilityChanged=function(){this.setExpandable()},e.prototype.addEventListener=function(e,t){this.localEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.localEventService.removeEventListener(e,t)},e.EVENT_EXPANDED_CHANGED="expandedChanged",e.EVENT_EXPANDABLE_CHANGED="expandableChanged",r([n.Autowired("columnApi"),i("design:type",p.ColumnApi)],e.prototype,"columnApi",void 0),r([n.Autowired("gridApi"),i("design:type",u.GridApi)],e.prototype,"gridApi",void 0),e}();t.OriginalColumnGroup=c},72955:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.isLayoutPanel=!0,this.childPanels=[],this.eGui=document.createElement("div"),this.eGui.style.height="100%"}return e.prototype.addPanel=function(e,t){var o;e.isLayoutPanel?(this.childPanels.push(e),o=e.getGui()):o=e,t&&(o.style.height=t),this.eGui.appendChild(o)},e.prototype.getGui=function(){return this.eGui},e.prototype.doLayout=function(){for(var e=0;e<this.childPanels.length;e++)this.childPanels[e].doLayout()},e}();t.VerticalStack=o},73575:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(45727),s=o(72493),a=o(44081),l=o(59007),p=o(60843),u=o(85786),c=o(83423),d=function(){function e(){this.activePopupElements=[]}return e.prototype.registerGridCore=function(e){this.gridCore=e},e.prototype.getDocument=function(){return this.gridOptionsWrapper.getDocument()},e.prototype.getPopupParent=function(){return this.gridOptionsWrapper.getPopupParent()||this.gridCore.getRootGui()},e.prototype.positionPopupForMenu=function(e){var t,o=e.eventSource.getBoundingClientRect(),r=this.getDocument(),i=this.getPopupParent();t=i===r.body?r.documentElement.getBoundingClientRect():i.getBoundingClientRect();var n=o.top-t.top;n=this.keepYWithinBounds(e,n);var s=e.ePopup.clientWidth>0?e.ePopup.clientWidth:200;e.ePopup.style.minWidth=s+"px";var a,l=t.right-t.left-s;function p(){return o.right-t.left-2}function u(){return o.left-t.left-s}this.gridOptionsWrapper.isEnableRtl()?((a=u())<0&&(a=p()),a>l&&(a=0)):((a=p())>l&&(a=u()),a<0&&(a=0)),e.ePopup.style.left=a+"px",e.ePopup.style.top=n+"px"},e.prototype.positionPopupUnderMouseEvent=function(e){var t=this.calculatePointerAlign(e.mouseEvent),o=t.x,r=t.y,i=e.ePopup,n=e.nudgeX,s=e.nudgeY;this.positionPopup({ePopup:i,x:o,y:r,nudgeX:n,nudgeY:s,keepWithinBounds:!0}),this.callPostProcessPopup(e.ePopup,null,e.mouseEvent,e.type,e.column,e.rowNode)},e.prototype.calculatePointerAlign=function(e){var t=this.getDocument(),o=this.getPopupParent(),r=o.getBoundingClientRect(),i=t.documentElement.getBoundingClientRect();return{x:e.clientX-(o===t.body?i.left:r.left),y:e.clientY-(o===t.body?i.top:r.top)}},e.prototype.positionPopupUnderComponent=function(e){var t,o=e.eventSource.getBoundingClientRect(),r=this.getDocument(),i=this.getPopupParent();t=i===r.body?r.documentElement.getBoundingClientRect():i.getBoundingClientRect(),this.positionPopup({ePopup:e.ePopup,minWidth:e.minWidth,minHeight:e.minHeight,nudgeX:e.nudgeX,nudgeY:e.nudgeY,x:o.left-t.left,y:o.top-t.top+o.height,keepWithinBounds:e.keepWithinBounds}),this.callPostProcessPopup(e.ePopup,e.eventSource,null,e.type,e.column,e.rowNode)},e.prototype.callPostProcessPopup=function(e,t,o,r,i,n){var s=this.gridOptionsWrapper.getPostProcessPopupFunc();s&&s({column:i,rowNode:n,ePopup:e,type:r,eventSource:t,mouseEvent:o})},e.prototype.positionPopupOverComponent=function(e){var t,o=e.eventSource.getBoundingClientRect(),r=this.getDocument(),i=this.getPopupParent();t=i===r.body?r.documentElement.getBoundingClientRect():i.getBoundingClientRect(),this.positionPopup({ePopup:e.ePopup,minWidth:e.minWidth,nudgeX:e.nudgeX,nudgeY:e.nudgeY,x:o.left-t.left,y:o.top-t.top,keepWithinBounds:e.keepWithinBounds}),this.callPostProcessPopup(e.ePopup,e.eventSource,null,e.type,e.column,e.rowNode)},e.prototype.positionPopup=function(e){var t=e.x,o=e.y;e.nudgeX&&(t+=e.nudgeX),e.nudgeY&&(o+=e.nudgeY),e.keepWithinBounds&&(t=this.keepXWithinBounds(e,t),o=this.keepYWithinBounds(e,o)),e.ePopup.style.left=t+"px",e.ePopup.style.top=o+"px"},e.prototype.keepYWithinBounds=function(e,t){var o=this.gridOptionsWrapper.getDocument(),r=o.documentElement,i=this.getPopupParent(),n=i.getBoundingClientRect(),s=o.documentElement.getBoundingClientRect(),a=i===o.body,l=Math.min(200,n.height),p=0;e.minHeight&&e.minHeight<l?l=e.minHeight:e.ePopup.offsetHeight>0&&(l=e.ePopup.clientHeight,p=c._.getAbsoluteHeight(e.ePopup)-l);var u=a?c._.getAbsoluteHeight(r)+r.scrollTop:n.height;a&&(u-=Math.abs(s.top-n.top));var d=u-l-p-3;return Math.min(Math.max(t,0),Math.abs(d))},e.prototype.keepXWithinBounds=function(e,t){var o=this.gridOptionsWrapper.getDocument(),r=o.documentElement,i=this.getPopupParent(),n=i.getBoundingClientRect(),s=o.documentElement.getBoundingClientRect(),a=i===o.body,l=Math.min(200,n.width),p=0;e.minWidth&&e.minWidth<l?l=e.minWidth:e.ePopup.clientWidth>0&&(l=e.ePopup.clientWidth,e.ePopup.style.minWidth=l+"px",p=c._.getAbsoluteWidth(e.ePopup)-l);var u=a?c._.getAbsoluteWidth(r)+r.scrollLeft:n.width;a&&(u-=Math.abs(s.left-n.left));var d=u-l-p-3;return Math.min(Math.max(t,0),Math.abs(d))},e.prototype.addAsModalPopup=function(e,t,o,r){return this.addPopup(!0,e,t,o,r)},e.prototype.addPopup=function(e,t,o,r,i){var s=this,a=this.gridOptionsWrapper.getDocument();if(!a)return console.warn("ag-grid: could not find the document, document is empty"),function(){};t.style.top="0px",t.style.left="0px";var l=this.getPopupParent();if(c._.isVisible(t)&&l.contains(t))return function(){};var p=document.createElement("div"),d=this.environment.getTheme();d&&c._.addCssClass(p,d),p.appendChild(t),l.appendChild(p),this.activePopupElements.push(t);var h=!1,f=function(e){(e.which||e.keyCode)===n.Constants.KEY_ESCAPE&&y(null)},g=function(e){y(e)},m=function(e){y(null,e)},y=function(e,o){s.isEventFromCurrentPopup(e,o,t)||s.isEventSameChainAsOriginalEvent(i,e,o)||h||(h=!0,l.removeChild(p),c._.removeFromArray(s.activePopupElements,t),a.removeEventListener("keydown",f),a.removeEventListener("click",g),a.removeEventListener("touchstart",m),a.removeEventListener("contextmenu",g),s.eventService.removeEventListener(u.Events.EVENT_DRAG_STARTED,g),r&&r())};return window.setTimeout((function(){o&&a.addEventListener("keydown",f),e&&(a.addEventListener("click",g),s.eventService.addEventListener(u.Events.EVENT_DRAG_STARTED,g),a.addEventListener("touchstart",m),a.addEventListener("contextmenu",g))}),0),y},e.prototype.isEventFromCurrentPopup=function(e,t,o){var r=e||t;if(r){for(var i=this.activePopupElements.indexOf(o);i<this.activePopupElements.length;i++){var n=this.activePopupElements[i];if(c._.isElementInEventPath(n,r))return!0}for(var s=r.target;s&&s!=document.body;){if(s.classList.contains("ag-custom-component-popup")||null===s.parentElement)return!0;s=s.parentElement}}return!1},e.prototype.isEventSameChainAsOriginalEvent=function(e,t,o){var r=null;if(t?r=t:o&&(r=o.touches[0]),r&&e){var i=t?t.screenX:0,n=t?t.screenY:0,s=Math.abs(e.screenX-i)<5,a=Math.abs(e.screenY-n)<5;if(s&&a)return!0}return!1},r([s.Autowired("gridOptionsWrapper"),i("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([s.Autowired("environment"),i("design:type",l.Environment)],e.prototype,"environment",void 0),r([s.Autowired("eventService"),i("design:type",p.EventService)],e.prototype,"eventService",void 0),r([s.Bean("popupService")],e)}();t.PopupService=d},74517:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(26016),s=o(60843),a=o(72493),l=o(44081),p=o(44871),u=o(40797),c=function(){function e(e,t,o,r){this.displayedChildren=[],this.localEventService=new s.EventService,this.groupId=t,this.instanceId=o,this.originalColumnGroup=e,this.pinned=r}return e.createUniqueId=function(e,t){return e+"_"+t},e.prototype.reset=function(){this.parent=null,this.children=null,this.displayedChildren=null},e.prototype.getParent=function(){return this.parent},e.prototype.setParent=function(e){this.parent=e},e.prototype.getUniqueId=function(){return e.createUniqueId(this.groupId,this.instanceId)},e.prototype.isEmptyGroup=function(){return 0===this.displayedChildren.length},e.prototype.isMoving=function(){var e=this.getOriginalColumnGroup().getLeafColumns();if(!e||0===e.length)return!1;var t=!0;return e.forEach((function(e){e.isMoving()||(t=!1)})),t},e.prototype.checkLeft=function(){if(this.displayedChildren.forEach((function(t){t instanceof e&&t.checkLeft()})),this.displayedChildren.length>0)if(this.gridOptionsWrapper.isEnableRtl()){var t=this.displayedChildren[this.displayedChildren.length-1].getLeft();this.setLeft(t)}else{var o=this.displayedChildren[0].getLeft();this.setLeft(o)}else this.setLeft(null)},e.prototype.getLeft=function(){return this.left},e.prototype.getOldLeft=function(){return this.oldLeft},e.prototype.setLeft=function(t){this.oldLeft=t,this.left!==t&&(this.left=t,this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_LEFT_CHANGED)))},e.prototype.getPinned=function(){return this.pinned},e.prototype.createAgEvent=function(e){return{type:e}},e.prototype.addEventListener=function(e,t){this.localEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.localEventService.removeEventListener(e,t)},e.prototype.getGroupId=function(){return this.groupId},e.prototype.getInstanceId=function(){return this.instanceId},e.prototype.isChildInThisGroupDeepSearch=function(t){var o=!1;return this.children.forEach((function(r){t===r&&(o=!0),r instanceof e&&r.isChildInThisGroupDeepSearch(t)&&(o=!0)})),o},e.prototype.getActualWidth=function(){var e=0;return this.displayedChildren&&this.displayedChildren.forEach((function(t){e+=t.getActualWidth()})),e},e.prototype.isResizable=function(){if(!this.displayedChildren)return!1;var e=!1;return this.displayedChildren.forEach((function(t){t.isResizable()&&(e=!0)})),e},e.prototype.getMinWidth=function(){var e=0;return this.displayedChildren.forEach((function(t){e+=t.getMinWidth()})),e},e.prototype.addChild=function(e){this.children||(this.children=[]),this.children.push(e)},e.prototype.getDisplayedChildren=function(){return this.displayedChildren},e.prototype.getLeafColumns=function(){var e=[];return this.addLeafColumns(e),e},e.prototype.getDisplayedLeafColumns=function(){var e=[];return this.addDisplayedLeafColumns(e),e},e.prototype.getDefinition=function(){return this.originalColumnGroup.getColGroupDef()},e.prototype.getColGroupDef=function(){return this.originalColumnGroup.getColGroupDef()},e.prototype.isPadding=function(){return this.originalColumnGroup.isPadding()},e.prototype.isExpandable=function(){return this.originalColumnGroup.isExpandable()},e.prototype.isExpanded=function(){return this.originalColumnGroup.isExpanded()},e.prototype.setExpanded=function(e){this.originalColumnGroup.setExpanded(e)},e.prototype.addDisplayedLeafColumns=function(t){this.displayedChildren.forEach((function(o){o instanceof n.Column?t.push(o):o instanceof e&&o.addDisplayedLeafColumns(t)}))},e.prototype.addLeafColumns=function(t){this.children.forEach((function(o){o instanceof n.Column?t.push(o):o instanceof e&&o.addLeafColumns(t)}))},e.prototype.getChildren=function(){return this.children},e.prototype.getColumnGroupShow=function(){return this.originalColumnGroup.getColumnGroupShow()},e.prototype.getOriginalColumnGroup=function(){return this.originalColumnGroup},e.prototype.calculateDisplayedColumns=function(){var t=this;this.displayedChildren=[];var o=this;if(this.isPadding())for(;o.getParent()&&o.isPadding();)o=o.getParent();o.originalColumnGroup.isExpandable()?this.children.forEach((function(r){switch(r.getColumnGroupShow()){case e.HEADER_GROUP_SHOW_OPEN:o.originalColumnGroup.isExpanded()&&t.displayedChildren.push(r);break;case e.HEADER_GROUP_SHOW_CLOSED:o.originalColumnGroup.isExpanded()||t.displayedChildren.push(r);break;default:t.displayedChildren.push(r)}})):this.displayedChildren=this.children,this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_DISPLAYED_CHILDREN_CHANGED))},e.HEADER_GROUP_SHOW_OPEN="open",e.HEADER_GROUP_SHOW_CLOSED="closed",e.EVENT_LEFT_CHANGED="leftChanged",e.EVENT_DISPLAYED_CHILDREN_CHANGED="displayedChildrenChanged",r([a.Autowired("gridOptionsWrapper"),i("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([a.Autowired("columnApi"),i("design:type",p.ColumnApi)],e.prototype,"columnApi",void 0),r([a.Autowired("gridApi"),i("design:type",u.GridApi)],e.prototype,"gridApi",void 0),e}();t.ColumnGroup=c},75013:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(65360);function i(e,t,o,i){var n,s,a=i.agGrid;if(s=a+".quickFilterText",n=t.$eval(a)){var l=e[0],p={$scope:t,$compile:o,quickFilterOnScope:s},u=new r.Grid(l,n,p);t.$on("$destroy",(function(){u.destroy(),u=null}))}else console.warn("WARNING - grid options for ag-Grid not found. Please ensure the attribute ag-grid points to a valid object on the scope")}t.initialiseAgGridWithAngular1=function(e){e.module("agGrid",[]).directive("agGrid",(function(){return{restrict:"A",controller:["$element","$scope","$compile","$attrs",i],scope:!0}}))}},75167:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(){return e.call(this,'<div class="ag-tooltip"></div>')||this}return i(t,e),t.prototype.init=function(e){var t=e.value;this.getGui().innerHTML=t},t}(o(46379).PopupComponent);t.TooltipComponent=n},75449:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var n=o(96652),s=o(46410),a=o(47008),l=o(47008),p=function(e){function t(o,r){var i=e.call(this)||this;return i.portal=null,i.componentWrappingElement="div",i.reactComponent=o,i.parentComponent=r,i.statelessComponent=t.isStateless(i.reactComponent),i}return i(t,e),t.prototype.getFrameworkComponentInstance=function(){return this.componentInstance},t.prototype.isStatelesComponent=function(){return this.statelessComponent},t.prototype.getReactComponentName=function(){return this.reactComponent.name},t.prototype.init=function(e){var t=this;return new l.Promise((function(o){t.eParentElement=t.createParentElement(e),t.createReactComponent(e,o)}))},t.prototype.getGui=function(){return this.eParentElement},t.prototype.destroy=function(){return this.parentComponent.destroyPortal(this.portal)},t.prototype.createReactComponent=function(e,t){var o=this;this.statelessComponent||(e.ref=function(e){o.componentInstance=e});var r=n.createElement(this.reactComponent,e),i=s.createPortal(r,this.eParentElement);this.portal=i,this.parentComponent.mountReactPortal(i,this,t)},t.prototype.createParentElement=function(e){var t=document.createElement(this.parentComponent.props.componentWrappingElement||"div");return a.Utils.addCssClass(t,"ag-react-container"),e.reactContainer=this.eParentElement,t},t.isStateless=function(e){return"function"==typeof e&&!(e.prototype&&e.prototype.isReactComponent)},t}(o(30844).BaseReactComponent);t.ReactComponent=p},76133:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(45727),a=o(44081),l=o(83423),p=function(){function e(){}return e.prototype.postConstruct=function(){this.rowModel.getType()===s.Constants.ROW_MODEL_TYPE_CLIENT_SIDE&&(this.clientSideRowModel=this.rowModel)},e.prototype.createTransactionForRowData=function(e){if(l._.missing(this.clientSideRowModel))console.error("ag-Grid: ImmutableService only works with ClientSideRowModel");else{var t=this.gridOptionsWrapper.getRowNodeIdFunc();if(t&&!l._.missing(t)){var o={remove:[],update:[],add:[]},r=this.clientSideRowModel.getCopyOfNodesMap(),i=this.gridOptionsWrapper.isSuppressMaintainUnsortedOrder()?null:{};return l._.exists(e)&&e.forEach((function(e,n){var s=t(e),a=r[s];i&&(i[s]=n),a?(a.data!==e&&o.update.push(e),r[s]=void 0):o.add.push(e)})),l._.iterateObject(r,(function(e,t){t&&o.remove.push(t.data)})),[o,i]}console.error("ag-Grid: ImmutableService requires getRowNodeId() callback to be implemented, your row data need IDs!")}},r([n.Autowired("rowModel"),i("design:type",Object)],e.prototype,"rowModel",void 0),r([n.Autowired("gridOptionsWrapper"),i("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"postConstruct",null),r([n.Bean("immutableService")],e)}();t.ImmutableService=p},78115:(e,t,o)=>{o.d(t,{ry:()=>nr});var r,i,n,s,a,l,p="vercel.ai.error",u=Symbol.for(p),c=class e extends(i=Error,r=u,i){constructor({name:e,message:t,cause:o}){super(t),this[r]=!0,this.name=e,this.cause=o}static isInstance(t){return e.hasMarker(t,p)}static hasMarker(e,t){const o=Symbol.for(t);return null!=e&&"object"==typeof e&&o in e&&"boolean"==typeof e[o]&&!0===e[o]}},d="AI_APICallError",h=`vercel.ai.error.${d}`,f=Symbol.for(h),g=class extends(s=c,n=f,s){constructor({message:e,url:t,requestBodyValues:o,statusCode:r,responseHeaders:i,responseBody:s,cause:a,isRetryable:l=null!=r&&(408===r||409===r||429===r||r>=500),data:p}){super({name:d,message:e,cause:a}),this[n]=!0,this.url=t,this.requestBodyValues=o,this.statusCode=r,this.responseHeaders=i,this.responseBody=s,this.isRetryable=l,this.data=p}static isInstance(e){return c.hasMarker(e,h)}},m="AI_EmptyResponseBodyError",y=`vercel.ai.error.${m}`,v=Symbol.for(y),C=class extends(l=c,a=v,l){constructor({message:e="Empty response body"}={}){super({name:m,message:e}),this[a]=!0}static isInstance(e){return c.hasMarker(e,y)}};function w(e){return null==e?"unknown error":"string"==typeof e?e:e instanceof Error?e.message:JSON.stringify(e)}var E,_,b,R,S,O,T,A,P,I,x,D,N,F,M,k,L="AI_InvalidArgumentError",G=`vercel.ai.error.${L}`,V=Symbol.for(G),j=class extends(_=c,E=V,_){constructor({message:e,cause:t,argument:o}){super({name:L,message:e,cause:t}),this[E]=!0,this.argument=o}static isInstance(e){return c.hasMarker(e,G)}},W="AI_InvalidPromptError",H=`vercel.ai.error.${W}`,B=Symbol.for(H),U=class extends(R=c,b=B,R){constructor({prompt:e,message:t,cause:o}){super({name:W,message:`Invalid prompt: ${t}`,cause:o}),this[b]=!0,this.prompt=e}static isInstance(e){return c.hasMarker(e,H)}},z="AI_InvalidResponseDataError",Y=`vercel.ai.error.${z}`,q=Symbol.for(Y),K=class extends(O=c,S=q,O){constructor({data:e,message:t=`Invalid response data: ${JSON.stringify(e)}.`}){super({name:z,message:t}),this[S]=!0,this.data=e}static isInstance(e){return c.hasMarker(e,Y)}},$="AI_JSONParseError",Z=`vercel.ai.error.${$}`,J=Symbol.for(Z),Q=class extends(A=c,T=J,A){constructor({text:e,cause:t}){super({name:$,message:`JSON parsing failed: Text: ${e}.\nError message: ${w(t)}`,cause:t}),this[T]=!0,this.text=e}static isInstance(e){return c.hasMarker(e,Z)}},X="AI_LoadAPIKeyError",ee=`vercel.ai.error.${X}`,te=Symbol.for(ee),oe=class extends(I=c,P=te,I){constructor({message:e}){super({name:X,message:e}),this[P]=!0}static isInstance(e){return c.hasMarker(e,ee)}},re=Symbol.for("vercel.ai.error.AI_LoadSettingError"),ie=`vercel.ai.error.${"AI_NoContentGeneratedError"}`,ne=Symbol.for(ie),se=`vercel.ai.error.${"AI_NoSuchModelError"}`,ae=Symbol.for(se),le="AI_TooManyEmbeddingValuesForCallError",pe=`vercel.ai.error.${le}`,ue=Symbol.for(pe),ce=class extends(D=c,x=ue,D){constructor(e){super({name:le,message:`Too many values for a single embedding call. The ${e.provider} model "${e.modelId}" can only embed up to ${e.maxEmbeddingsPerCall} values per call, but ${e.values.length} values were provided.`}),this[x]=!0,this.provider=e.provider,this.modelId=e.modelId,this.maxEmbeddingsPerCall=e.maxEmbeddingsPerCall,this.values=e.values}static isInstance(e){return c.hasMarker(e,pe)}},de="AI_TypeValidationError",he=`vercel.ai.error.${de}`,fe=Symbol.for(he),ge=class e extends(F=c,N=fe,F){constructor({value:e,cause:t}){super({name:de,message:`Type validation failed: Value: ${JSON.stringify(e)}.\nError message: ${w(t)}`,cause:t}),this[N]=!0,this.value=e}static isInstance(e){return c.hasMarker(e,he)}static wrap({value:t,cause:o}){return e.isInstance(o)&&o.value===t?o:new e({value:t,cause:o})}},me="AI_UnsupportedFunctionalityError",ye=`vercel.ai.error.${me}`,ve=Symbol.for(ye),Ce=class extends(k=c,M=ve,k){constructor({functionality:e,message:t=`'${e}' functionality not supported.`}){super({name:me,message:t}),this[M]=!0,this.functionality=e}static isInstance(e){return c.hasMarker(e,ye)}},we=o(21935),Ee=o(67299),_e=o(84340),be=o(29744),Re=o(65994).process;function Se(...e){return e.reduce(((e,t)=>({...e,...null!=t?t:{}})),{})}function Oe(e){return Object.fromEntries([...e.headers])}var{btoa:Te,atob:Ae}=globalThis;function Pe(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),o=Ae(t);return Uint8Array.from(o,(e=>e.codePointAt(0)))}function Ie(e){return e instanceof Uint8Array?function(e){let t="";for(let o=0;o<e.length;o++)t+=String.fromCodePoint(e[o]);return Te(t)}(e):e}function xe(e,t={}){const{useArrayBrackets:o=!0}=t,r=new FormData;for(const[t,i]of Object.entries(e))if(null!=i)if(Array.isArray(i)){if(1===i.length){r.append(t,i[0]);continue}const e=o?`${t}[]`:t;for(const t of i)r.append(e,t)}else r.append(t,i);return r}var De,Ne,Fe="AI_DownloadError",Me=`vercel.ai.error.${Fe}`,ke=Symbol.for(Me),Le=class extends(Ne=c,De=ke,Ne){constructor({url:e,statusCode:t,statusText:o,cause:r,message:i=(null==r?`Failed to download ${e}: ${t} ${o}`:`Failed to download ${e}: ${r}`)}){super({name:Fe,message:i,cause:r}),this[De]=!0,this.url=e,this.statusCode=t,this.statusText=o}static isInstance(e){return c.hasMarker(e,Me)}};async function Ge(e){try{const t=await fetch(e);if(!t.ok)throw new Le({url:e,statusCode:t.status,statusText:t.statusText});return await t.blob()}catch(t){if(Le.isInstance(t))throw t;throw new Le({url:e,cause:t})}}var Ve=(({prefix:e,size:t=16,alphabet:o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const i=()=>{const e=o.length,r=new Array(t);for(let i=0;i<t;i++)r[i]=o[Math.random()*e|0];return r.join("")};if(null==e)return i;if(o.includes(r))throw new j({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${o}".`});return()=>`${e}${r}${i()}`})();function je(e){return(e instanceof Error||e instanceof DOMException)&&("AbortError"===e.name||"ResponseAborted"===e.name||"TimeoutError"===e.name)}var We=["fetch failed","failed to fetch"];function He(e=globalThis){var t,o,r;return e.window?"runtime/browser":(null==(t=e.navigator)?void 0:t.userAgent)?`runtime/${e.navigator.userAgent.toLowerCase()}`:(null==(r=null==(o=e.process)?void 0:o.versions)?void 0:r.node)?`runtime/node.js/${e.process.version.substring(0)}`:e.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function Be(e,...t){const o=new Headers(function(e){if(null==e)return{};const t={};if(e instanceof Headers)e.forEach(((e,o)=>{t[o.toLowerCase()]=e}));else{Array.isArray(e)||(e=Object.entries(e));for(const[o,r]of e)null!=r&&(t[o.toLowerCase()]=r)}return t}(e)),r=o.get("user-agent")||"";return o.set("user-agent",[r,...t].filter(Boolean).join(" ")),Object.fromEntries(o.entries())}function Ue(e){return null!=e}function ze({apiKey:e,environmentVariableName:t,apiKeyParameterName:o="apiKey",description:r}){if("string"==typeof e)return e;if(null!=e)throw new oe({message:`${r} API key must be a string.`});if(void 0===Re)throw new oe({message:`${r} API key is missing. Pass it using the '${o}' parameter. Environment variables is not supported in this environment.`});if(null==(e=Re.env[t]))throw new oe({message:`${r} API key is missing. Pass it using the '${o}' parameter or the ${t} environment variable.`});if("string"!=typeof e)throw new oe({message:`${r} API key must be a string. The value of the ${t} environment variable is not a string.`});return e}var Ye=/"__proto__"\s*:/,qe=/"constructor"\s*:/;function Ke(e){const t=JSON.parse(e);return null===t||"object"!=typeof t||!1===Ye.test(e)&&!1===qe.test(e)?t:function(e){let t=[e];for(;t.length;){const e=t;t=[];for(const o of e){if(Object.prototype.hasOwnProperty.call(o,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(o,"constructor")&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const e in o){const r=o[e];r&&"object"==typeof r&&t.push(r)}}}return e}(t)}function $e(e){const{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch(t){return Ke(e)}try{return Ke(e)}finally{Error.stackTraceLimit=t}}function Ze(e){if("object"===e.type||Array.isArray(e.type)&&e.type.includes("object")){e.additionalProperties=!1;const{properties:t}=e;if(null!=t)for(const e of Object.keys(t))t[e]=Je(t[e])}null!=e.items&&(e.items=Array.isArray(e.items)?e.items.map(Je):Je(e.items)),null!=e.anyOf&&(e.anyOf=e.anyOf.map(Je)),null!=e.allOf&&(e.allOf=e.allOf.map(Je)),null!=e.oneOf&&(e.oneOf=e.oneOf.map(Je));const{definitions:t}=e;if(null!=t)for(const e of Object.keys(t))t[e]=Je(t[e]);return e}function Je(e){return"boolean"==typeof e?e:Ze(e)}var Qe=Symbol("Let zodToJsonSchema decide on which parser to use"),Xe={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"};function et(e,t){return mt(e.type._def,t)}function tt(e,t,o){const r=null!=o?o:t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map(((o,r)=>tt(e,t,o)))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return ot(e)}}var ot=e=>{const t={type:"integer",format:"unix-time"};for(const o of e.checks)switch(o.kind){case"min":t.minimum=o.value;break;case"max":t.maximum=o.value}return t},rt=void 0,it={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(void 0===rt&&(rt=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),rt),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function nt(e,t){const o={type:"string"};if(e.checks)for(const r of e.checks)switch(r.kind){case"min":o.minLength="number"==typeof o.minLength?Math.max(o.minLength,r.value):r.value;break;case"max":o.maxLength="number"==typeof o.maxLength?Math.min(o.maxLength,r.value):r.value;break;case"email":switch(t.emailStrategy){case"format:email":lt(o,"email",r.message,t);break;case"format:idn-email":lt(o,"idn-email",r.message,t);break;case"pattern:zod":pt(o,it.email,r.message,t)}break;case"url":lt(o,"uri",r.message,t);break;case"uuid":lt(o,"uuid",r.message,t);break;case"regex":pt(o,r.regex,r.message,t);break;case"cuid":pt(o,it.cuid,r.message,t);break;case"cuid2":pt(o,it.cuid2,r.message,t);break;case"startsWith":pt(o,RegExp(`^${st(r.value,t)}`),r.message,t);break;case"endsWith":pt(o,RegExp(`${st(r.value,t)}$`),r.message,t);break;case"datetime":lt(o,"date-time",r.message,t);break;case"date":lt(o,"date",r.message,t);break;case"time":lt(o,"time",r.message,t);break;case"duration":lt(o,"duration",r.message,t);break;case"length":o.minLength="number"==typeof o.minLength?Math.max(o.minLength,r.value):r.value,o.maxLength="number"==typeof o.maxLength?Math.min(o.maxLength,r.value):r.value;break;case"includes":pt(o,RegExp(st(r.value,t)),r.message,t);break;case"ip":"v6"!==r.version&<(o,"ipv4",r.message,t),"v4"!==r.version&<(o,"ipv6",r.message,t);break;case"base64url":pt(o,it.base64url,r.message,t);break;case"jwt":pt(o,it.jwt,r.message,t);break;case"cidr":"v6"!==r.version&&pt(o,it.ipv4Cidr,r.message,t),"v4"!==r.version&&pt(o,it.ipv6Cidr,r.message,t);break;case"emoji":pt(o,it.emoji(),r.message,t);break;case"ulid":pt(o,it.ulid,r.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":lt(o,"binary",r.message,t);break;case"contentEncoding:base64":o.contentEncoding="base64";break;case"pattern:zod":pt(o,it.base64,r.message,t)}break;case"nanoid":pt(o,it.nanoid,r.message,t)}return o}function st(e,t){return"escape"===t.patternStrategy?function(e){let t="";for(let o=0;o<e.length;o++)at.has(e[o])||(t+="\\"),t+=e[o];return t}(e):e}var at=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function lt(e,t,o,r){var i;e.format||(null==(i=e.anyOf)?void 0:i.some((e=>e.format)))?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...o&&r.errorMessages&&{errorMessage:{format:o}}})):e.format=t}function pt(e,t,o,r){var i;e.pattern||(null==(i=e.allOf)?void 0:i.some((e=>e.pattern)))?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:ut(t,r),...o&&r.errorMessages&&{errorMessage:{pattern:o}}})):e.pattern=ut(t,r)}function ut(e,t){var o;if(!t.applyRegexFlags||!e.flags)return e.source;const r=e.flags.includes("i"),i=e.flags.includes("m"),n=e.flags.includes("s"),s=r?e.source.toLowerCase():e.source;let a="",l=!1,p=!1,u=!1;for(let e=0;e<s.length;e++)if(l)a+=s[e],l=!1;else{if(r)if(p){if(s[e].match(/[a-z]/)){u?(a+=s[e],a+=`${s[e-2]}-${s[e]}`.toUpperCase(),u=!1):"-"===s[e+1]&&(null==(o=s[e+2])?void 0:o.match(/[a-z]/))?(a+=s[e],u=!0):a+=`${s[e]}${s[e].toUpperCase()}`;continue}}else if(s[e].match(/[a-z]/)){a+=`[${s[e]}${s[e].toUpperCase()}]`;continue}if(i){if("^"===s[e]){a+="(^|(?<=[\r\n]))";continue}if("$"===s[e]){a+="($|(?=[\r\n]))";continue}}n&&"."===s[e]?a+=p?`${s[e]}\r\n`:`[${s[e]}\r\n]`:(a+=s[e],"\\"===s[e]?l=!0:p&&"]"===s[e]?p=!1:p||"["!==s[e]||(p=!0))}try{new RegExp(a)}catch(o){return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return a}function ct(e,t){var o,r,i,n,s,a;const l={type:"object",additionalProperties:null!=(o=mt(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))?o:t.allowedAdditionalProperties};if((null==(r=e.keyType)?void 0:r._def.typeName)===_e.kY.ZodString&&(null==(i=e.keyType._def.checks)?void 0:i.length)){const{type:o,...r}=nt(e.keyType._def,t);return{...l,propertyNames:r}}if((null==(n=e.keyType)?void 0:n._def.typeName)===_e.kY.ZodEnum)return{...l,propertyNames:{enum:e.keyType._def.values}};if((null==(s=e.keyType)?void 0:s._def.typeName)===_e.kY.ZodBranded&&e.keyType._def.type._def.typeName===_e.kY.ZodString&&(null==(a=e.keyType._def.type._def.checks)?void 0:a.length)){const{type:o,...r}=et(e.keyType._def,t);return{...l,propertyNames:r}}return l}var dt={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function ht(e){try{return e.isOptional()}catch(e){return!0}}var ft=(e,t,o)=>{switch(t){case _e.kY.ZodString:return nt(e,o);case _e.kY.ZodNumber:return function(e){const t={type:"number"};if(!e.checks)return t;for(const o of e.checks)switch(o.kind){case"int":t.type="integer";break;case"min":o.inclusive?t.minimum=o.value:t.exclusiveMinimum=o.value;break;case"max":o.inclusive?t.maximum=o.value:t.exclusiveMaximum=o.value;break;case"multipleOf":t.multipleOf=o.value}return t}(e);case _e.kY.ZodObject:return function(e,t){const o={type:"object",properties:{}},r=[],i=e.shape();for(const e in i){let n=i[e];if(void 0===n||void 0===n._def)continue;const s=ht(n),a=mt(n._def,{...t,currentPath:[...t.currentPath,"properties",e],propertyPath:[...t.currentPath,"properties",e]});void 0!==a&&(o.properties[e]=a,s||r.push(e))}r.length&&(o.required=r);const n=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return mt(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}(e,t);return void 0!==n&&(o.additionalProperties=n),o}(e,o);case _e.kY.ZodBigInt:return function(e){const t={type:"integer",format:"int64"};if(!e.checks)return t;for(const o of e.checks)switch(o.kind){case"min":o.inclusive?t.minimum=o.value:t.exclusiveMinimum=o.value;break;case"max":o.inclusive?t.maximum=o.value:t.exclusiveMaximum=o.value;break;case"multipleOf":t.multipleOf=o.value}return t}(e);case _e.kY.ZodBoolean:return{type:"boolean"};case _e.kY.ZodDate:return tt(e,o);case _e.kY.ZodUndefined:return{not:{}};case _e.kY.ZodNull:return{type:"null"};case _e.kY.ZodArray:return function(e,t){var o,r,i;const n={type:"array"};return(null==(o=e.type)?void 0:o._def)&&(null==(i=null==(r=e.type)?void 0:r._def)?void 0:i.typeName)!==_e.kY.ZodAny&&(n.items=mt(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(n.minItems=e.minLength.value),e.maxLength&&(n.maxItems=e.maxLength.value),e.exactLength&&(n.minItems=e.exactLength.value,n.maxItems=e.exactLength.value),n}(e,o);case _e.kY.ZodUnion:case _e.kY.ZodDiscriminatedUnion:return function(e,t){const o=e.options instanceof Map?Array.from(e.options.values()):e.options;if(o.every((e=>e._def.typeName in dt&&(!e._def.checks||!e._def.checks.length)))){const e=o.reduce(((e,t)=>{const o=dt[t._def.typeName];return o&&!e.includes(o)?[...e,o]:e}),[]);return{type:e.length>1?e:e[0]}}if(o.every((e=>"ZodLiteral"===e._def.typeName&&!e.description))){const e=o.reduce(((e,t)=>{const o=typeof t._def.value;switch(o){case"string":case"number":case"boolean":return[...e,o];case"bigint":return[...e,"integer"];case"object":if(null===t._def.value)return[...e,"null"];default:return e}}),[]);if(e.length===o.length){const t=e.filter(((e,t,o)=>o.indexOf(e)===t));return{type:t.length>1?t:t[0],enum:o.reduce(((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value]),[])}}}else if(o.every((e=>"ZodEnum"===e._def.typeName)))return{type:"string",enum:o.reduce(((e,t)=>[...e,...t._def.values.filter((t=>!e.includes(t)))]),[])};return((e,t)=>{const o=(e.options instanceof Map?Array.from(e.options.values()):e.options).map(((e,o)=>mt(e._def,{...t,currentPath:[...t.currentPath,"anyOf",`${o}`]}))).filter((e=>!!e&&(!t.strictUnions||"object"==typeof e&&Object.keys(e).length>0)));return o.length?{anyOf:o}:void 0})(e,t)}(e,o);case _e.kY.ZodIntersection:return function(e,t){const o=[mt(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),mt(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter((e=>!!e)),r=[];return o.forEach((e=>{if("type"in(t=e)&&"string"===t.type||!("allOf"in t)){let t=e;if("additionalProperties"in e&&!1===e.additionalProperties){const{additionalProperties:o,...r}=e;t=r}r.push(t)}else r.push(...e.allOf);var t})),r.length?{allOf:r}:void 0}(e,o);case _e.kY.ZodTuple:return function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map(((e,o)=>mt(e._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]}))).reduce(((e,t)=>void 0===t?e:[...e,t]),[]),additionalItems:mt(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map(((e,o)=>mt(e._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]}))).reduce(((e,t)=>void 0===t?e:[...e,t]),[])}}(e,o);case _e.kY.ZodRecord:return ct(e,o);case _e.kY.ZodLiteral:return function(e){const t=typeof e.value;return"bigint"!==t&&"number"!==t&&"boolean"!==t&&"string"!==t?{type:Array.isArray(e.value)?"array":"object"}:{type:"bigint"===t?"integer":t,const:e.value}}(e);case _e.kY.ZodEnum:return function(e){return{type:"string",enum:Array.from(e.values)}}(e);case _e.kY.ZodNativeEnum:return function(e){const t=e.values,o=Object.keys(e.values).filter((e=>"number"!=typeof t[t[e]])).map((e=>t[e])),r=Array.from(new Set(o.map((e=>typeof e))));return{type:1===r.length?"string"===r[0]?"string":"number":["string","number"],enum:o}}(e);case _e.kY.ZodNullable:return function(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[dt[e.innerType._def.typeName],"null"]};const o=mt(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return o&&{anyOf:[o,{type:"null"}]}}(e,o);case _e.kY.ZodOptional:return((e,t)=>{var o;if(t.currentPath.toString()===(null==(o=t.propertyPath)?void 0:o.toString()))return mt(e.innerType._def,t);const r=mt(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:{}},r]}:{}})(e,o);case _e.kY.ZodMap:return function(e,t){return"record"===t.mapStrategy?ct(e,t):{type:"array",maxItems:125,items:{type:"array",items:[mt(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||{},mt(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||{}],minItems:2,maxItems:2}}}(e,o);case _e.kY.ZodSet:return function(e,t){const o={type:"array",uniqueItems:!0,items:mt(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(o.minItems=e.minSize.value),e.maxSize&&(o.maxItems=e.maxSize.value),o}(e,o);case _e.kY.ZodLazy:return()=>e.getter()._def;case _e.kY.ZodPromise:return function(e,t){return mt(e.type._def,t)}(e,o);case _e.kY.ZodNaN:case _e.kY.ZodNever:return{not:{}};case _e.kY.ZodEffects:return function(e,t){return"input"===t.effectStrategy?mt(e.schema._def,t):{}}(e,o);case _e.kY.ZodAny:case _e.kY.ZodUnknown:return{};case _e.kY.ZodDefault:return function(e,t){return{...mt(e.innerType._def,t),default:e.defaultValue()}}(e,o);case _e.kY.ZodBranded:return et(e,o);case _e.kY.ZodReadonly:case _e.kY.ZodCatch:return((e,t)=>mt(e.innerType._def,t))(e,o);case _e.kY.ZodPipeline:return((e,t)=>{if("input"===t.pipeStrategy)return mt(e.in._def,t);if("output"===t.pipeStrategy)return mt(e.out._def,t);const o=mt(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]});return{allOf:[o,mt(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",o?"1":"0"]})].filter((e=>void 0!==e))}})(e,o);case _e.kY.ZodFunction:case _e.kY.ZodVoid:case _e.kY.ZodSymbol:default:return}},gt=(e,t)=>{let o=0;for(;o<e.length&&o<t.length&&e[o]===t[o];o++);return[(e.length-o).toString(),...t.slice(o)].join("/")};function mt(e,t,o=!1){var r;const i=t.seen.get(e);if(t.override){const n=null==(r=t.override)?void 0:r.call(t,e,t,i,o);if(n!==Qe)return n}if(i&&!o){const e=yt(i,t);if(void 0!==e)return e}const n={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,n);const s=ft(e,e.typeName,t),a="function"==typeof s?mt(s(),t):s;if(a&&vt(e,t,a),t.postProcess){const o=t.postProcess(a,e,t);return n.jsonSchema=a,o}return n.jsonSchema=a,a}var yt=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:gt(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every(((e,o)=>t.currentPath[o]===e))?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),{}):"seen"===t.$refStrategy?{}:void 0}},vt=(e,t,o)=>(e.description&&(o.description=e.description),o),Ct=(e,t)=>{var o;const r=(e=>{const t=(e=>"string"==typeof e?{...Xe,name:e}:{...Xe,...e})(e),o=void 0!==t.name?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:o,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map((([e,o])=>[o._def,{def:o._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}])))}})(t);let i="object"==typeof t&&t.definitions?Object.entries(t.definitions).reduce(((e,[t,o])=>{var i;return{...e,[t]:null!=(i=mt(o._def,{...r,currentPath:[...r.basePath,r.definitionPath,t]},!0))?i:{}}}),{}):void 0;const n="string"==typeof t?t:"title"===(null==t?void 0:t.nameStrategy)||null==t?void 0:t.name,s=null!=(o=mt(e._def,void 0===n?r:{...r,currentPath:[...r.basePath,r.definitionPath,n]},!1))?o:{},a="object"==typeof t&&void 0!==t.name&&"title"===t.nameStrategy?t.name:void 0;void 0!==a&&(s.title=a);const l=void 0===n?i?{...s,[r.definitionPath]:i}:s:{$ref:[..."relative"===r.$refStrategy?[]:r.basePath,r.definitionPath,n].join("/"),[r.definitionPath]:{...i,[n]:s}};return l.$schema="http://json-schema.org/draft-07/schema#",l},wt=Symbol.for("vercel.ai.schema");function Et(e){let t;return()=>(null==t&&(t=e()),t)}function _t(e,{validate:t}={}){return{[wt]:!0,_type:void 0,get jsonSchema(){return"function"==typeof e&&(e=e()),e},validate:t}}function bt(e,t){return function(e){return"_zod"in e}(e)?function(e,t){var o;const r=null!=(o=null==t?void 0:t.useReferences)&&o;return _t((()=>Ze(we.b(e,{target:"draft-7",io:"input",reused:r?"ref":"inline"}))),{validate:async t=>{const o=await Ee.bp(e,t);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}(e,t):function(e,t){var o;const r=null!=(o=null==t?void 0:t.useReferences)&&o;return _t((()=>Ct(e,{$refStrategy:r?"root":"none"})),{validate:async t=>{const o=await e.safeParseAsync(t);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}(e,t)}async function Rt({value:e,schema:t}){const o=await St({value:e,schema:t});if(!o.success)throw ge.wrap({value:e,cause:o.error});return o.value}async function St({value:e,schema:t}){const o=function(e){return null==e?_t({properties:{},additionalProperties:!1}):"object"==typeof(o=e)&&null!==o&&wt in o&&!0===o[wt]&&"jsonSchema"in o&&"validate"in o?e:"~standard"in e?"zod"===e["~standard"].vendor?bt(e):(t=e,_t((()=>Ze(t["~standard"].jsonSchema.input({target:"draft-07"}))),{validate:async e=>{const o=await t["~standard"].validate(e);return"value"in o?{success:!0,value:o.value}:{success:!1,error:new ge({value:e,cause:o.issues})}}})):e();var t,o}(t);try{if(null==o.validate)return{success:!0,value:e,rawValue:e};const t=await o.validate(e);return t.success?{success:!0,value:t.value,rawValue:e}:{success:!1,error:ge.wrap({value:e,cause:t.error}),rawValue:e}}catch(t){return{success:!1,error:ge.wrap({value:e,cause:t}),rawValue:e}}}async function Ot({text:e,schema:t}){try{const o=$e(e);return null==t?{success:!0,value:o,rawValue:o}:await St({value:o,schema:t})}catch(t){return{success:!1,error:Q.isInstance(t)?t:new Q({text:e,cause:t}),rawValue:void 0}}}function Tt(e){try{return $e(e),!0}catch(e){return!1}}function At({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new be.Z).pipeThrough(new TransformStream({async transform({data:e},o){"[DONE]"!==e&&o.enqueue(await Ot({text:e,schema:t}))}}))}async function Pt({provider:e,providerOptions:t,schema:o}){if(null==(null==t?void 0:t[e]))return;const r=await St({value:t[e],schema:o});if(!r.success)throw new j({argument:"providerOptions",message:`invalid ${e} provider options`,cause:r.error});return r.value}var It=()=>globalThis.fetch,xt=async({url:e,headers:t,body:o,failedResponseHandler:r,successfulResponseHandler:i,abortSignal:n,fetch:s})=>Nt({url:e,headers:{"Content-Type":"application/json",...t},body:{content:JSON.stringify(o),values:o},failedResponseHandler:r,successfulResponseHandler:i,abortSignal:n,fetch:s}),Dt=async({url:e,headers:t,formData:o,failedResponseHandler:r,successfulResponseHandler:i,abortSignal:n,fetch:s})=>Nt({url:e,headers:t,body:{content:o,values:Object.fromEntries(o.entries())},failedResponseHandler:r,successfulResponseHandler:i,abortSignal:n,fetch:s}),Nt=async({url:e,headers:t={},body:o,successfulResponseHandler:r,failedResponseHandler:i,abortSignal:n,fetch:s=It()})=>{try{const a=await s(e,{method:"POST",headers:Be(t,"ai-sdk/provider-utils/4.0.5",He()),body:o.content,signal:n}),l=Oe(a);if(!a.ok){let t;try{t=await i({response:a,url:e,requestBodyValues:o.values})}catch(t){if(je(t)||g.isInstance(t))throw t;throw new g({message:"Failed to process error response",cause:t,statusCode:a.status,url:e,responseHeaders:l,requestBodyValues:o.values})}throw t.value}try{return await r({response:a,url:e,requestBodyValues:o.values})}catch(t){if(t instanceof Error&&(je(t)||g.isInstance(t)))throw t;throw new g({message:"Failed to process successful response",cause:t,statusCode:a.status,url:e,responseHeaders:l,requestBodyValues:o.values})}}catch(t){throw function({error:e,url:t,requestBodyValues:o}){if(je(e))return e;if(e instanceof TypeError&&We.includes(e.message.toLowerCase())){const r=e.cause;if(null!=r)return new g({message:`Cannot connect to API: ${r.message}`,cause:r,url:t,requestBodyValues:o,isRetryable:!0})}return e}({error:t,url:e,requestBodyValues:o.values})}};function Ft({id:e,inputSchema:t,outputSchema:o,supportsDeferredResults:r}){return({execute:i,needsApproval:n,toModelOutput:s,onInputStart:a,onInputDelta:l,onInputAvailable:p,...u})=>({type:"provider",id:e,args:u,inputSchema:t,outputSchema:o,execute:i,needsApproval:n,toModelOutput:s,onInputStart:a,onInputDelta:l,onInputAvailable:p,supportsDeferredResults:r})}var Mt=e=>async({response:t})=>{const o=Oe(t);if(null==t.body)throw new C({});return{responseHeaders:o,value:At({stream:t.body,schema:e})}},kt=e=>async({response:t,url:o,requestBodyValues:r})=>{const i=await t.text(),n=await Ot({text:i,schema:e}),s=Oe(t);if(!n.success)throw new g({message:"Invalid JSON response",cause:n.error,statusCode:t.status,responseHeaders:s,responseBody:i,url:o,requestBodyValues:r});return{responseHeaders:s,value:n.value,rawValue:n.rawValue}},Lt=o(8645),Gt=o(94149),Vt=o(9606).URL,jt=Lt.Ik({error:Lt.Ik({message:Lt.Yj(),type:Lt.Yj().nullish(),param:Lt.bz().nullish(),code:Lt.KC([Lt.Yj(),Lt.ai()]).nullish()})}),Wt=(({errorSchema:e,errorToMessage:t,isRetryable:o})=>async({response:r,url:i,requestBodyValues:n})=>{const s=await r.text(),a=Oe(r);if(""===s.trim())return{responseHeaders:a,value:new g({message:r.statusText,url:i,requestBodyValues:n,statusCode:r.status,responseHeaders:a,responseBody:s,isRetryable:null==o?void 0:o(r)})};try{const l=await async function({text:e,schema:t}){try{const o=$e(e);return null==t?o:Rt({value:o,schema:t})}catch(t){if(Q.isInstance(t)||ge.isInstance(t))throw t;throw new Q({text:e,cause:t})}}({text:s,schema:e});return{responseHeaders:a,value:new g({message:t(l),url:i,requestBodyValues:n,statusCode:r.status,responseHeaders:a,responseBody:s,data:l,isRetryable:null==o?void 0:o(r,l)})}}catch(e){return{responseHeaders:a,value:new g({message:r.statusText,url:i,requestBodyValues:n,statusCode:r.status,responseHeaders:a,responseBody:s,isRetryable:null==o?void 0:o(r)})}}})({errorSchema:jt,errorToMessage:e=>e.error.message});function Ht(e){const t=e.startsWith("o3")||e.startsWith("o4-mini")||e.startsWith("gpt-5")&&!e.startsWith("gpt-5-chat"),o=e.startsWith("gpt-4")||e.startsWith("gpt-5-mini")||e.startsWith("gpt-5")&&!e.startsWith("gpt-5-nano")&&!e.startsWith("gpt-5-chat")||e.startsWith("o3")||e.startsWith("o4-mini"),r=e.startsWith("o1")||e.startsWith("o3")||e.startsWith("o4-mini")||e.startsWith("codex-mini")||e.startsWith("computer-use-preview")||e.startsWith("gpt-5")&&!e.startsWith("gpt-5-chat");return{supportsFlexProcessing:t,supportsPriorityProcessing:o,isReasoningModel:r,systemMessageMode:r?"developer":"system",supportsNonReasoningParameters:e.startsWith("gpt-5.1")||e.startsWith("gpt-5.2")}}function Bt(e){var t,o,r,i,n,s;if(null==e)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};const a=null!=(t=e.prompt_tokens)?t:0,l=null!=(o=e.completion_tokens)?o:0,p=null!=(i=null==(r=e.prompt_tokens_details)?void 0:r.cached_tokens)?i:0,u=null!=(s=null==(n=e.completion_tokens_details)?void 0:n.reasoning_tokens)?s:0;return{inputTokens:{total:a,noCache:a-p,cacheRead:p,cacheWrite:void 0},outputTokens:{total:l,text:l-u,reasoning:u},raw:e}}function Ut({id:e,model:t,created:o}){return{id:null!=e?e:void 0,modelId:null!=t?t:void 0,timestamp:o?new Date(1e3*o):void 0}}function zt(e){switch(e){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var Yt=Et((()=>bt(Lt.Ik({id:Lt.Yj().nullish(),created:Lt.ai().nullish(),model:Lt.Yj().nullish(),choices:Lt.YO(Lt.Ik({message:Lt.Ik({role:Lt.eu("assistant").nullish(),content:Lt.Yj().nullish(),tool_calls:Lt.YO(Lt.Ik({id:Lt.Yj().nullish(),type:Lt.eu("function"),function:Lt.Ik({name:Lt.Yj(),arguments:Lt.Yj()})})).nullish(),annotations:Lt.YO(Lt.Ik({type:Lt.eu("url_citation"),url_citation:Lt.Ik({start_index:Lt.ai(),end_index:Lt.ai(),url:Lt.Yj(),title:Lt.Yj()})})).nullish()}),index:Lt.ai(),logprobs:Lt.Ik({content:Lt.YO(Lt.Ik({token:Lt.Yj(),logprob:Lt.ai(),top_logprobs:Lt.YO(Lt.Ik({token:Lt.Yj(),logprob:Lt.ai()}))})).nullish()}).nullish(),finish_reason:Lt.Yj().nullish()})),usage:Lt.Ik({prompt_tokens:Lt.ai().nullish(),completion_tokens:Lt.ai().nullish(),total_tokens:Lt.ai().nullish(),prompt_tokens_details:Lt.Ik({cached_tokens:Lt.ai().nullish()}).nullish(),completion_tokens_details:Lt.Ik({reasoning_tokens:Lt.ai().nullish(),accepted_prediction_tokens:Lt.ai().nullish(),rejected_prediction_tokens:Lt.ai().nullish()}).nullish()}).nullish()})))),qt=Et((()=>bt(Lt.KC([Lt.Ik({id:Lt.Yj().nullish(),created:Lt.ai().nullish(),model:Lt.Yj().nullish(),choices:Lt.YO(Lt.Ik({delta:Lt.Ik({role:Lt.k5(["assistant"]).nullish(),content:Lt.Yj().nullish(),tool_calls:Lt.YO(Lt.Ik({index:Lt.ai(),id:Lt.Yj().nullish(),type:Lt.eu("function").nullish(),function:Lt.Ik({name:Lt.Yj().nullish(),arguments:Lt.Yj().nullish()})})).nullish(),annotations:Lt.YO(Lt.Ik({type:Lt.eu("url_citation"),url_citation:Lt.Ik({start_index:Lt.ai(),end_index:Lt.ai(),url:Lt.Yj(),title:Lt.Yj()})})).nullish()}).nullish(),logprobs:Lt.Ik({content:Lt.YO(Lt.Ik({token:Lt.Yj(),logprob:Lt.ai(),top_logprobs:Lt.YO(Lt.Ik({token:Lt.Yj(),logprob:Lt.ai()}))})).nullish()}).nullish(),finish_reason:Lt.Yj().nullish(),index:Lt.ai()})),usage:Lt.Ik({prompt_tokens:Lt.ai().nullish(),completion_tokens:Lt.ai().nullish(),total_tokens:Lt.ai().nullish(),prompt_tokens_details:Lt.Ik({cached_tokens:Lt.ai().nullish()}).nullish(),completion_tokens_details:Lt.Ik({reasoning_tokens:Lt.ai().nullish(),accepted_prediction_tokens:Lt.ai().nullish(),rejected_prediction_tokens:Lt.ai().nullish()}).nullish()}).nullish()}),jt])))),Kt=Et((()=>bt(Lt.Ik({logitBias:Lt.g1(Gt.ai(),Lt.ai()).optional(),logprobs:Lt.KC([Lt.zM(),Lt.ai()]).optional(),parallelToolCalls:Lt.zM().optional(),user:Lt.Yj().optional(),reasoningEffort:Lt.k5(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:Lt.ai().optional(),store:Lt.zM().optional(),metadata:Lt.g1(Lt.Yj().max(64),Lt.Yj().max(512)).optional(),prediction:Lt.g1(Lt.Yj(),Lt.bz()).optional(),serviceTier:Lt.k5(["auto","flex","priority","default"]).optional(),strictJsonSchema:Lt.zM().optional(),textVerbosity:Lt.k5(["low","medium","high"]).optional(),promptCacheKey:Lt.Yj().optional(),promptCacheRetention:Lt.k5(["in_memory","24h"]).optional(),safetyIdentifier:Lt.Yj().optional(),systemMessageMode:Lt.k5(["system","developer","remove"]).optional(),forceReasoning:Lt.zM().optional()})))),$t=class{constructor(e,t){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=e,this.config=t}get provider(){return this.config.provider}async getArgs({prompt:e,maxOutputTokens:t,temperature:o,topP:r,topK:i,frequencyPenalty:n,presencePenalty:s,stopSequences:a,responseFormat:l,seed:p,tools:u,toolChoice:c,providerOptions:d}){var h,f,g,m,y;const v=[],C=null!=(h=await Pt({provider:"openai",providerOptions:d,schema:Kt}))?h:{},w=Ht(this.modelId),E=null!=(f=C.forceReasoning)?f:w.isReasoningModel;null!=i&&v.push({type:"unsupported",feature:"topK"});const{messages:_,warnings:b}=function({prompt:e,systemMessageMode:t="system"}){var o;const r=[],i=[];for(const{role:n,content:s}of e)switch(n){case"system":switch(t){case"system":r.push({role:"system",content:s});break;case"developer":r.push({role:"developer",content:s});break;case"remove":i.push({type:"other",message:"system messages are removed for this model"});break;default:throw new Error(`Unsupported system message mode: ${t}`)}break;case"user":if(1===s.length&&"text"===s[0].type){r.push({role:"user",content:s[0].text});break}r.push({role:"user",content:s.map(((e,t)=>{var o,r,i;switch(e.type){case"text":return{type:"text",text:e.text};case"file":if(e.mediaType.startsWith("image/")){const t="image/*"===e.mediaType?"image/jpeg":e.mediaType;return{type:"image_url",image_url:{url:e.data instanceof Vt?e.data.toString():`data:${t};base64,${Ie(e.data)}`,detail:null==(r=null==(o=e.providerOptions)?void 0:o.openai)?void 0:r.imageDetail}}}if(!e.mediaType.startsWith("audio/")){if("application/pdf"===e.mediaType){if(e.data instanceof Vt)throw new Ce({functionality:"PDF file parts with URLs"});return{type:"file",file:"string"==typeof e.data&&e.data.startsWith("file-")?{file_id:e.data}:{filename:null!=(i=e.filename)?i:`part-${t}.pdf`,file_data:`data:application/pdf;base64,${Ie(e.data)}`}}}throw new Ce({functionality:`file part media type ${e.mediaType}`})}if(e.data instanceof Vt)throw new Ce({functionality:"audio file parts with URLs"});switch(e.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:Ie(e.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:Ie(e.data),format:"mp3"}};default:throw new Ce({functionality:`audio content parts with media type ${e.mediaType}`})}}}))});break;case"assistant":{let e="";const t=[];for(const o of s)switch(o.type){case"text":e+=o.text;break;case"tool-call":t.push({id:o.toolCallId,type:"function",function:{name:o.toolName,arguments:JSON.stringify(o.input)}})}r.push({role:"assistant",content:e,tool_calls:t.length>0?t:void 0});break}case"tool":for(const e of s){if("tool-approval-response"===e.type)continue;const t=e.output;let i;switch(t.type){case"text":case"error-text":i=t.value;break;case"execution-denied":i=null!=(o=t.reason)?o:"Tool execution denied.";break;case"content":case"json":case"error-json":i=JSON.stringify(t.value)}r.push({role:"tool",tool_call_id:e.toolCallId,content:i})}break;default:throw new Error(`Unsupported role: ${n}`)}return{messages:r,warnings:i}}({prompt:e,systemMessageMode:null!=(g=C.systemMessageMode)?g:E?"developer":w.systemMessageMode});v.push(...b);const R=null==(m=C.strictJsonSchema)||m,S={model:this.modelId,logit_bias:C.logitBias,logprobs:!0===C.logprobs||"number"==typeof C.logprobs||void 0,top_logprobs:"number"==typeof C.logprobs?C.logprobs:"boolean"==typeof C.logprobs&&C.logprobs?0:void 0,user:C.user,parallel_tool_calls:C.parallelToolCalls,max_tokens:t,temperature:o,top_p:r,frequency_penalty:n,presence_penalty:s,response_format:"json"===(null==l?void 0:l.type)?null!=l.schema?{type:"json_schema",json_schema:{schema:l.schema,strict:R,name:null!=(y=l.name)?y:"response",description:l.description}}:{type:"json_object"}:void 0,stop:a,seed:p,verbosity:C.textVerbosity,max_completion_tokens:C.maxCompletionTokens,store:C.store,metadata:C.metadata,prediction:C.prediction,reasoning_effort:C.reasoningEffort,service_tier:C.serviceTier,prompt_cache_key:C.promptCacheKey,prompt_cache_retention:C.promptCacheRetention,safety_identifier:C.safetyIdentifier,messages:_};E?("none"===C.reasoningEffort&&w.supportsNonReasoningParameters||(null!=S.temperature&&(S.temperature=void 0,v.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"})),null!=S.top_p&&(S.top_p=void 0,v.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"})),null!=S.logprobs&&(S.logprobs=void 0,v.push({type:"other",message:"logprobs is not supported for reasoning models"}))),null!=S.frequency_penalty&&(S.frequency_penalty=void 0,v.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"})),null!=S.presence_penalty&&(S.presence_penalty=void 0,v.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"})),null!=S.logit_bias&&(S.logit_bias=void 0,v.push({type:"other",message:"logitBias is not supported for reasoning models"})),null!=S.top_logprobs&&(S.top_logprobs=void 0,v.push({type:"other",message:"topLogprobs is not supported for reasoning models"})),null!=S.max_tokens&&(null==S.max_completion_tokens&&(S.max_completion_tokens=S.max_tokens),S.max_tokens=void 0)):(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview"))&&null!=S.temperature&&(S.temperature=void 0,v.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})),"flex"!==C.serviceTier||w.supportsFlexProcessing||(v.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),S.service_tier=void 0),"priority"!==C.serviceTier||w.supportsPriorityProcessing||(v.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),S.service_tier=void 0);const{tools:O,toolChoice:T,toolWarnings:A}=function({tools:e,toolChoice:t}){const o=[];if(null==(e=(null==e?void 0:e.length)?e:void 0))return{tools:void 0,toolChoice:void 0,toolWarnings:o};const r=[];for(const t of e)"function"===t.type?r.push({type:"function",function:{name:t.name,description:t.description,parameters:t.inputSchema,...null!=t.strict?{strict:t.strict}:{}}}):o.push({type:"unsupported",feature:`tool type: ${t.type}`});if(null==t)return{tools:r,toolChoice:void 0,toolWarnings:o};const i=t.type;switch(i){case"auto":case"none":case"required":return{tools:r,toolChoice:i,toolWarnings:o};case"tool":return{tools:r,toolChoice:{type:"function",function:{name:t.toolName}},toolWarnings:o};default:throw new Ce({functionality:`tool choice type: ${i}`})}}({tools:u,toolChoice:c});return{args:{...S,tools:O,tool_choice:T},warnings:[...v,...A]}}async doGenerate(e){var t,o,r,i,n,s,a;const{args:l,warnings:p}=await this.getArgs(e),{responseHeaders:u,value:c,rawValue:d}=await xt({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:Se(this.config.headers(),e.headers),body:l,failedResponseHandler:Wt,successfulResponseHandler:kt(Yt),abortSignal:e.abortSignal,fetch:this.config.fetch}),h=c.choices[0],f=[],g=h.message.content;null!=g&&g.length>0&&f.push({type:"text",text:g});for(const e of null!=(t=h.message.tool_calls)?t:[])f.push({type:"tool-call",toolCallId:null!=(o=e.id)?o:Ve(),toolName:e.function.name,input:e.function.arguments});for(const e of null!=(r=h.message.annotations)?r:[])f.push({type:"source",sourceType:"url",id:Ve(),url:e.url_citation.url,title:e.url_citation.title});const m=null==(i=c.usage)?void 0:i.completion_tokens_details,y=(null==(n=c.usage)||n.prompt_tokens_details,{openai:{}});return null!=(null==m?void 0:m.accepted_prediction_tokens)&&(y.openai.acceptedPredictionTokens=null==m?void 0:m.accepted_prediction_tokens),null!=(null==m?void 0:m.rejected_prediction_tokens)&&(y.openai.rejectedPredictionTokens=null==m?void 0:m.rejected_prediction_tokens),null!=(null==(s=h.logprobs)?void 0:s.content)&&(y.openai.logprobs=h.logprobs.content),{content:f,finishReason:{unified:zt(h.finish_reason),raw:null!=(a=h.finish_reason)?a:void 0},usage:Bt(c.usage),request:{body:l},response:{...Ut(c),headers:u,body:d},warnings:p,providerMetadata:y}}async doStream(e){const{args:t,warnings:o}=await this.getArgs(e),r={...t,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:i,value:n}=await xt({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:Se(this.config.headers(),e.headers),body:r,failedResponseHandler:Wt,successfulResponseHandler:Mt(qt),abortSignal:e.abortSignal,fetch:this.config.fetch}),s=[];let a,l={unified:"other",raw:void 0},p=!1,u=!1;const c={openai:{}};return{stream:n.pipeThrough(new TransformStream({start(e){e.enqueue({type:"stream-start",warnings:o})},transform(t,o){var r,i,n,d,h,f,g,m,y,v,C,w,E,_,b,R,S;if(e.includeRawChunks&&o.enqueue({type:"raw",rawValue:t.rawValue}),!t.success)return l={unified:"error",raw:void 0},void o.enqueue({type:"error",error:t.error});const O=t.value;if("error"in O)return l={unified:"error",raw:void 0},void o.enqueue({type:"error",error:O.error});if(!p){const e=Ut(O);Object.values(e).some(Boolean)&&(p=!0,o.enqueue({type:"response-metadata",...Ut(O)}))}null!=O.usage&&(a=O.usage,null!=(null==(r=O.usage.completion_tokens_details)?void 0:r.accepted_prediction_tokens)&&(c.openai.acceptedPredictionTokens=null==(i=O.usage.completion_tokens_details)?void 0:i.accepted_prediction_tokens),null!=(null==(n=O.usage.completion_tokens_details)?void 0:n.rejected_prediction_tokens)&&(c.openai.rejectedPredictionTokens=null==(d=O.usage.completion_tokens_details)?void 0:d.rejected_prediction_tokens));const T=O.choices[0];if(null!=(null==T?void 0:T.finish_reason)&&(l={unified:zt(T.finish_reason),raw:T.finish_reason}),null!=(null==(h=null==T?void 0:T.logprobs)?void 0:h.content)&&(c.openai.logprobs=T.logprobs.content),null==(null==T?void 0:T.delta))return;const A=T.delta;if(null!=A.content&&(u||(o.enqueue({type:"text-start",id:"0"}),u=!0),o.enqueue({type:"text-delta",id:"0",delta:A.content})),null!=A.tool_calls)for(const e of A.tool_calls){const t=e.index;if(null==s[t]){if("function"!==e.type)throw new K({data:e,message:"Expected 'function' type."});if(null==e.id)throw new K({data:e,message:"Expected 'id' to be a string."});if(null==(null==(f=e.function)?void 0:f.name))throw new K({data:e,message:"Expected 'function.name' to be a string."});o.enqueue({type:"tool-input-start",id:e.id,toolName:e.function.name}),s[t]={id:e.id,type:"function",function:{name:e.function.name,arguments:null!=(g=e.function.arguments)?g:""},hasFinished:!1};const r=s[t];null!=(null==(m=r.function)?void 0:m.name)&&null!=(null==(y=r.function)?void 0:y.arguments)&&(r.function.arguments.length>0&&o.enqueue({type:"tool-input-delta",id:r.id,delta:r.function.arguments}),Tt(r.function.arguments)&&(o.enqueue({type:"tool-input-end",id:r.id}),o.enqueue({type:"tool-call",toolCallId:null!=(v=r.id)?v:Ve(),toolName:r.function.name,input:r.function.arguments}),r.hasFinished=!0));continue}const r=s[t];r.hasFinished||(null!=(null==(C=e.function)?void 0:C.arguments)&&(r.function.arguments+=null!=(E=null==(w=e.function)?void 0:w.arguments)?E:""),o.enqueue({type:"tool-input-delta",id:r.id,delta:null!=(_=e.function.arguments)?_:""}),null!=(null==(b=r.function)?void 0:b.name)&&null!=(null==(R=r.function)?void 0:R.arguments)&&Tt(r.function.arguments)&&(o.enqueue({type:"tool-input-end",id:r.id}),o.enqueue({type:"tool-call",toolCallId:null!=(S=r.id)?S:Ve(),toolName:r.function.name,input:r.function.arguments}),r.hasFinished=!0))}if(null!=A.annotations)for(const e of A.annotations)o.enqueue({type:"source",sourceType:"url",id:Ve(),url:e.url_citation.url,title:e.url_citation.title})},flush(e){u&&e.enqueue({type:"text-end",id:"0"}),e.enqueue({type:"finish",finishReason:l,usage:Bt(a),...null!=c?{providerMetadata:c}:{}})}})),request:{body:r},response:{headers:i}}}};function Zt(e){var t,o,r,i;if(null==e)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};const n=null!=(t=e.prompt_tokens)?t:0,s=null!=(o=e.completion_tokens)?o:0;return{inputTokens:{total:null!=(r=e.prompt_tokens)?r:void 0,noCache:n,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:null!=(i=e.completion_tokens)?i:void 0,text:s,reasoning:void 0},raw:e}}function Jt({id:e,model:t,created:o}){return{id:null!=e?e:void 0,modelId:null!=t?t:void 0,timestamp:null!=o?new Date(1e3*o):void 0}}function Qt(e){switch(e){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var Xt=Et((()=>bt(Lt.Ik({id:Lt.Yj().nullish(),created:Lt.ai().nullish(),model:Lt.Yj().nullish(),choices:Lt.YO(Lt.Ik({text:Lt.Yj(),finish_reason:Lt.Yj(),logprobs:Lt.Ik({tokens:Lt.YO(Lt.Yj()),token_logprobs:Lt.YO(Lt.ai()),top_logprobs:Lt.YO(Lt.g1(Lt.Yj(),Lt.ai())).nullish()}).nullish()})),usage:Lt.Ik({prompt_tokens:Lt.ai(),completion_tokens:Lt.ai(),total_tokens:Lt.ai()}).nullish()})))),eo=Et((()=>bt(Lt.KC([Lt.Ik({id:Lt.Yj().nullish(),created:Lt.ai().nullish(),model:Lt.Yj().nullish(),choices:Lt.YO(Lt.Ik({text:Lt.Yj(),finish_reason:Lt.Yj().nullish(),index:Lt.ai(),logprobs:Lt.Ik({tokens:Lt.YO(Lt.Yj()),token_logprobs:Lt.YO(Lt.ai()),top_logprobs:Lt.YO(Lt.g1(Lt.Yj(),Lt.ai())).nullish()}).nullish()})),usage:Lt.Ik({prompt_tokens:Lt.ai(),completion_tokens:Lt.ai(),total_tokens:Lt.ai()}).nullish()}),jt])))),to=Et((()=>bt(Lt.Ik({echo:Lt.zM().optional(),logitBias:Lt.g1(Lt.Yj(),Lt.ai()).optional(),suffix:Lt.Yj().optional(),user:Lt.Yj().optional(),logprobs:Lt.KC([Lt.zM(),Lt.ai()]).optional()})))),oo=class{constructor(e,t){this.specificationVersion="v3",this.supportedUrls={},this.modelId=e,this.config=t}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get provider(){return this.config.provider}async getArgs({prompt:e,maxOutputTokens:t,temperature:o,topP:r,topK:i,frequencyPenalty:n,presencePenalty:s,stopSequences:a,responseFormat:l,tools:p,toolChoice:u,seed:c,providerOptions:d}){const h=[],f={...await Pt({provider:"openai",providerOptions:d,schema:to}),...await Pt({provider:this.providerOptionsName,providerOptions:d,schema:to})};null!=i&&h.push({type:"unsupported",feature:"topK"}),(null==p?void 0:p.length)&&h.push({type:"unsupported",feature:"tools"}),null!=u&&h.push({type:"unsupported",feature:"toolChoice"}),null!=l&&"text"!==l.type&&h.push({type:"unsupported",feature:"responseFormat",details:"JSON response format is not supported."});const{prompt:g,stopSequences:m}=function({prompt:e,user:t="user",assistant:o="assistant"}){let r="";"system"===e[0].role&&(r+=`${e[0].content}\n\n`,e=e.slice(1));for(const{role:i,content:n}of e)switch(i){case"system":throw new U({message:"Unexpected system message in prompt: ${content}",prompt:e});case"user":r+=`${t}:\n${n.map((e=>{if("text"===e.type)return e.text})).filter(Boolean).join("")}\n\n`;break;case"assistant":r+=`${o}:\n${n.map((e=>{switch(e.type){case"text":return e.text;case"tool-call":throw new Ce({functionality:"tool-call messages"})}})).join("")}\n\n`;break;case"tool":throw new Ce({functionality:"tool messages"});default:throw new Error(`Unsupported role: ${i}`)}return r+=`${o}:\n`,{prompt:r,stopSequences:[`\n${t}:`]}}({prompt:e}),y=[...null!=m?m:[],...null!=a?a:[]];return{args:{model:this.modelId,echo:f.echo,logit_bias:f.logitBias,logprobs:!0===(null==f?void 0:f.logprobs)?0:!1===(null==f?void 0:f.logprobs)||null==f?void 0:f.logprobs,suffix:f.suffix,user:f.user,max_tokens:t,temperature:o,top_p:r,frequency_penalty:n,presence_penalty:s,seed:c,prompt:g,stop:y.length>0?y:void 0},warnings:h}}async doGenerate(e){var t;const{args:o,warnings:r}=await this.getArgs(e),{responseHeaders:i,value:n,rawValue:s}=await xt({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:Se(this.config.headers(),e.headers),body:o,failedResponseHandler:Wt,successfulResponseHandler:kt(Xt),abortSignal:e.abortSignal,fetch:this.config.fetch}),a=n.choices[0],l={openai:{}};return null!=a.logprobs&&(l.openai.logprobs=a.logprobs),{content:[{type:"text",text:a.text}],usage:Zt(n.usage),finishReason:{unified:Qt(a.finish_reason),raw:null!=(t=a.finish_reason)?t:void 0},request:{body:o},response:{...Jt(n),headers:i,body:s},providerMetadata:l,warnings:r}}async doStream(e){const{args:t,warnings:o}=await this.getArgs(e),r={...t,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:i,value:n}=await xt({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:Se(this.config.headers(),e.headers),body:r,failedResponseHandler:Wt,successfulResponseHandler:Mt(eo),abortSignal:e.abortSignal,fetch:this.config.fetch});let s={unified:"other",raw:void 0};const a={openai:{}};let l,p=!0;return{stream:n.pipeThrough(new TransformStream({start(e){e.enqueue({type:"stream-start",warnings:o})},transform(t,o){if(e.includeRawChunks&&o.enqueue({type:"raw",rawValue:t.rawValue}),!t.success)return s={unified:"error",raw:void 0},void o.enqueue({type:"error",error:t.error});const r=t.value;if("error"in r)return s={unified:"error",raw:void 0},void o.enqueue({type:"error",error:r.error});p&&(p=!1,o.enqueue({type:"response-metadata",...Jt(r)}),o.enqueue({type:"text-start",id:"0"})),null!=r.usage&&(l=r.usage);const i=r.choices[0];null!=(null==i?void 0:i.finish_reason)&&(s={unified:Qt(i.finish_reason),raw:i.finish_reason}),null!=(null==i?void 0:i.logprobs)&&(a.openai.logprobs=i.logprobs),null!=(null==i?void 0:i.text)&&i.text.length>0&&o.enqueue({type:"text-delta",id:"0",delta:i.text})},flush(e){p||e.enqueue({type:"text-end",id:"0"}),e.enqueue({type:"finish",finishReason:s,providerMetadata:a,usage:Zt(l)})}})),request:{body:r},response:{headers:i}}}},ro=Et((()=>bt(Lt.Ik({dimensions:Lt.ai().optional(),user:Lt.Yj().optional()})))),io=Et((()=>bt(Lt.Ik({data:Lt.YO(Lt.Ik({embedding:Lt.YO(Lt.ai())})),usage:Lt.Ik({prompt_tokens:Lt.ai()}).nullish()})))),no=class{constructor(e,t){this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=e,this.config=t}get provider(){return this.config.provider}async doEmbed({values:e,headers:t,abortSignal:o,providerOptions:r}){var i;if(e.length>this.maxEmbeddingsPerCall)throw new ce({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:e});const n=null!=(i=await Pt({provider:"openai",providerOptions:r,schema:ro}))?i:{},{responseHeaders:s,value:a,rawValue:l}=await xt({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:Se(this.config.headers(),t),body:{model:this.modelId,input:e,encoding_format:"float",dimensions:n.dimensions,user:n.user},failedResponseHandler:Wt,successfulResponseHandler:kt(io),abortSignal:o,fetch:this.config.fetch});return{warnings:[],embeddings:a.data.map((e=>e.embedding)),usage:a.usage?{tokens:a.usage.prompt_tokens}:void 0,response:{headers:s,body:l}}}},so=Et((()=>bt(Lt.Ik({created:Lt.ai().nullish(),data:Lt.YO(Lt.Ik({b64_json:Lt.Yj(),revised_prompt:Lt.Yj().nullish()})),background:Lt.Yj().nullish(),output_format:Lt.Yj().nullish(),size:Lt.Yj().nullish(),quality:Lt.Yj().nullish(),usage:Lt.Ik({input_tokens:Lt.ai().nullish(),output_tokens:Lt.ai().nullish(),total_tokens:Lt.ai().nullish(),input_tokens_details:Lt.Ik({image_tokens:Lt.ai().nullish(),text_tokens:Lt.ai().nullish()}).nullish()}).nullish()})))),ao={"dall-e-3":1,"dall-e-2":10,"gpt-image-1":10,"gpt-image-1-mini":10,"gpt-image-1.5":10},lo=["gpt-image-1-mini","gpt-image-1.5","gpt-image-1"],po=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3"}get maxImagesPerCall(){var e;return null!=(e=ao[this.modelId])?e:1}get provider(){return this.config.provider}async doGenerate({prompt:e,files:t,mask:o,n:r,size:i,aspectRatio:n,seed:s,providerOptions:a,headers:l,abortSignal:p}){var u,c,d,h,f,g,m,y,v,C,w;const E=[];null!=n&&E.push({type:"unsupported",feature:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."}),null!=s&&E.push({type:"unsupported",feature:"seed"});const _=null!=(d=null==(c=null==(u=this.config._internal)?void 0:u.currentDate)?void 0:c.call(u))?d:new Date;if(null!=t){const{value:n,responseHeaders:s}=await Dt({url:this.config.url({path:"/images/edits",modelId:this.modelId}),headers:Se(this.config.headers(),l),formData:xe({model:this.modelId,prompt:e,image:await Promise.all(t.map((e=>"file"===e.type?new Blob([e.data instanceof Uint8Array?new Blob([e.data],{type:e.mediaType}):new Blob([Pe(e.data)],{type:e.mediaType})],{type:e.mediaType}):Ge(e.url)))),mask:null!=o?await uo(o):void 0,n:r,size:i,...null!=(h=a.openai)?h:{}}),failedResponseHandler:Wt,successfulResponseHandler:kt(so),abortSignal:p,fetch:this.config.fetch});return{images:n.data.map((e=>e.b64_json)),warnings:E,usage:null!=n.usage?{inputTokens:null!=(f=n.usage.input_tokens)?f:void 0,outputTokens:null!=(g=n.usage.output_tokens)?g:void 0,totalTokens:null!=(m=n.usage.total_tokens)?m:void 0}:void 0,response:{timestamp:_,modelId:this.modelId,headers:s},providerMetadata:{openai:{images:n.data.map((e=>{var t,o,r,i,s;return{...e.revised_prompt?{revisedPrompt:e.revised_prompt}:{},created:null!=(t=n.created)?t:void 0,size:null!=(o=n.size)?o:void 0,quality:null!=(r=n.quality)?r:void 0,background:null!=(i=n.background)?i:void 0,outputFormat:null!=(s=n.output_format)?s:void 0}}))}}}}const{value:b,responseHeaders:R}=await xt({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:Se(this.config.headers(),l),body:{model:this.modelId,prompt:e,n:r,size:i,...null!=(y=a.openai)?y:{},...(S=this.modelId,lo.some((e=>S.startsWith(e)))?{}:{response_format:"b64_json"})},failedResponseHandler:Wt,successfulResponseHandler:kt(so),abortSignal:p,fetch:this.config.fetch});var S;return{images:b.data.map((e=>e.b64_json)),warnings:E,usage:null!=b.usage?{inputTokens:null!=(v=b.usage.input_tokens)?v:void 0,outputTokens:null!=(C=b.usage.output_tokens)?C:void 0,totalTokens:null!=(w=b.usage.total_tokens)?w:void 0}:void 0,response:{timestamp:_,modelId:this.modelId,headers:R},providerMetadata:{openai:{images:b.data.map((e=>{var t,o,r,i,n;return{...e.revised_prompt?{revisedPrompt:e.revised_prompt}:{},created:null!=(t=b.created)?t:void 0,size:null!=(o=b.size)?o:void 0,quality:null!=(r=b.quality)?r:void 0,background:null!=(i=b.background)?i:void 0,outputFormat:null!=(n=b.output_format)?n:void 0}}))}}}}};async function uo(e){if(!e)return;if("url"===e.type)return Ge(e.url);const t=e.data instanceof Uint8Array?e.data:Pe(e.data);return new Blob([t],{type:e.mediaType})}var co=Et((()=>bt(Lt.Ik({callId:Lt.Yj(),operation:Lt.gM("type",[Lt.Ik({type:Lt.eu("create_file"),path:Lt.Yj(),diff:Lt.Yj()}),Lt.Ik({type:Lt.eu("delete_file"),path:Lt.Yj()}),Lt.Ik({type:Lt.eu("update_file"),path:Lt.Yj(),diff:Lt.Yj()})])})))),ho=Et((()=>bt(Lt.Ik({status:Lt.k5(["completed","failed"]),output:Lt.Yj().optional()})))),fo=(Et((()=>bt(Lt.Ik({})))),Ft({id:"openai.apply_patch",inputSchema:co,outputSchema:ho})),go=Et((()=>bt(Lt.Ik({code:Lt.Yj().nullish(),containerId:Lt.Yj()})))),mo=Et((()=>bt(Lt.Ik({outputs:Lt.YO(Lt.gM("type",[Lt.Ik({type:Lt.eu("logs"),logs:Lt.Yj()}),Lt.Ik({type:Lt.eu("image"),url:Lt.Yj()})])).nullish()})))),yo=Et((()=>bt(Lt.Ik({container:Lt.KC([Lt.Yj(),Lt.Ik({fileIds:Lt.YO(Lt.Yj()).optional()})]).optional()})))),vo=Ft({id:"openai.code_interpreter",inputSchema:go,outputSchema:mo}),Co=Lt.Ik({key:Lt.Yj(),type:Lt.k5(["eq","ne","gt","gte","lt","lte","in","nin"]),value:Lt.KC([Lt.Yj(),Lt.ai(),Lt.zM(),Lt.YO(Lt.Yj())])}),wo=Lt.Ik({type:Lt.k5(["and","or"]),filters:Lt.YO(Lt.KC([Co,Lt.RZ((()=>wo))]))}),Eo=Et((()=>bt(Lt.Ik({vectorStoreIds:Lt.YO(Lt.Yj()),maxNumResults:Lt.ai().optional(),ranking:Lt.Ik({ranker:Lt.Yj().optional(),scoreThreshold:Lt.ai().optional()}).optional(),filters:Lt.KC([Co,wo]).optional()})))),_o=Et((()=>bt(Lt.Ik({queries:Lt.YO(Lt.Yj()),results:Lt.YO(Lt.Ik({attributes:Lt.g1(Lt.Yj(),Lt.L5()),fileId:Lt.Yj(),filename:Lt.Yj(),score:Lt.ai(),text:Lt.Yj()})).nullable()})))),bo=Ft({id:"openai.file_search",inputSchema:Lt.Ik({}),outputSchema:_o}),Ro=Et((()=>bt(Lt.Ik({background:Lt.k5(["auto","opaque","transparent"]).optional(),inputFidelity:Lt.k5(["low","high"]).optional(),inputImageMask:Lt.Ik({fileId:Lt.Yj().optional(),imageUrl:Lt.Yj().optional()}).optional(),model:Lt.Yj().optional(),moderation:Lt.k5(["auto"]).optional(),outputCompression:Lt.ai().int().min(0).max(100).optional(),outputFormat:Lt.k5(["png","jpeg","webp"]).optional(),partialImages:Lt.ai().int().min(0).max(3).optional(),quality:Lt.k5(["auto","low","medium","high"]).optional(),size:Lt.k5(["1024x1024","1024x1536","1536x1024","auto"]).optional()}).strict()))),So=Ft({id:"openai.image_generation",inputSchema:Et((()=>bt(Lt.Ik({})))),outputSchema:Et((()=>bt(Lt.Ik({result:Lt.Yj()}))))}),Oo=Et((()=>bt(Lt.Ik({action:Lt.Ik({type:Lt.eu("exec"),command:Lt.YO(Lt.Yj()),timeoutMs:Lt.ai().optional(),user:Lt.Yj().optional(),workingDirectory:Lt.Yj().optional(),env:Lt.g1(Lt.Yj(),Lt.Yj()).optional()})})))),To=Et((()=>bt(Lt.Ik({output:Lt.Yj()})))),Ao=Ft({id:"openai.local_shell",inputSchema:Oo,outputSchema:To}),Po=Et((()=>bt(Lt.Ik({action:Lt.Ik({commands:Lt.YO(Lt.Yj()),timeoutMs:Lt.ai().optional(),maxOutputLength:Lt.ai().optional()})})))),Io=Et((()=>bt(Lt.Ik({output:Lt.YO(Lt.Ik({stdout:Lt.Yj(),stderr:Lt.Yj(),outcome:Lt.gM("type",[Lt.Ik({type:Lt.eu("timeout")}),Lt.Ik({type:Lt.eu("exit"),exitCode:Lt.ai()})])}))})))),xo=Ft({id:"openai.shell",inputSchema:Po,outputSchema:Io}),Do=Et((()=>bt(Lt.Ik({externalWebAccess:Lt.zM().optional(),filters:Lt.Ik({allowedDomains:Lt.YO(Lt.Yj()).optional()}).optional(),searchContextSize:Lt.k5(["low","medium","high"]).optional(),userLocation:Lt.Ik({type:Lt.eu("approximate"),country:Lt.Yj().optional(),city:Lt.Yj().optional(),region:Lt.Yj().optional(),timezone:Lt.Yj().optional()}).optional()})))),No=Ft({id:"openai.web_search",inputSchema:Et((()=>bt(Lt.Ik({})))),outputSchema:Et((()=>bt(Lt.Ik({action:Lt.gM("type",[Lt.Ik({type:Lt.eu("search"),query:Lt.Yj().optional()}),Lt.Ik({type:Lt.eu("openPage"),url:Lt.Yj().nullish()}),Lt.Ik({type:Lt.eu("findInPage"),url:Lt.Yj().nullish(),pattern:Lt.Yj().nullish()})]),sources:Lt.YO(Lt.gM("type",[Lt.Ik({type:Lt.eu("url"),url:Lt.Yj()}),Lt.Ik({type:Lt.eu("api"),name:Lt.Yj()})])).optional()}))))}),Fo=Et((()=>bt(Lt.Ik({searchContextSize:Lt.k5(["low","medium","high"]).optional(),userLocation:Lt.Ik({type:Lt.eu("approximate"),country:Lt.Yj().optional(),city:Lt.Yj().optional(),region:Lt.Yj().optional(),timezone:Lt.Yj().optional()}).optional()})))),Mo=Ft({id:"openai.web_search_preview",inputSchema:Et((()=>bt(Lt.Ik({})))),outputSchema:Et((()=>bt(Lt.Ik({action:Lt.gM("type",[Lt.Ik({type:Lt.eu("search"),query:Lt.Yj().optional()}),Lt.Ik({type:Lt.eu("openPage"),url:Lt.Yj().nullish()}),Lt.Ik({type:Lt.eu("findInPage"),url:Lt.Yj().nullish(),pattern:Lt.Yj().nullish()})])}))))}),ko=Lt.RZ((()=>Lt.KC([Lt.Yj(),Lt.ai(),Lt.zM(),Lt.ch(),Lt.YO(ko),Lt.g1(Lt.Yj(),ko)]))),Lo=Et((()=>bt(Lt.Ik({serverLabel:Lt.Yj(),allowedTools:Lt.KC([Lt.YO(Lt.Yj()),Lt.Ik({readOnly:Lt.zM().optional(),toolNames:Lt.YO(Lt.Yj()).optional()})]).optional(),authorization:Lt.Yj().optional(),connectorId:Lt.Yj().optional(),headers:Lt.g1(Lt.Yj(),Lt.Yj()).optional(),requireApproval:Lt.KC([Lt.k5(["always","never"]),Lt.Ik({never:Lt.Ik({toolNames:Lt.YO(Lt.Yj()).optional()}).optional()})]).optional(),serverDescription:Lt.Yj().optional(),serverUrl:Lt.Yj().optional()}).refine((e=>null!=e.serverUrl||null!=e.connectorId),"One of serverUrl or connectorId must be provided.")))),Go=Ft({id:"openai.mcp",inputSchema:Et((()=>bt(Lt.Ik({})))),outputSchema:Et((()=>bt(Lt.Ik({type:Lt.eu("call"),serverLabel:Lt.Yj(),name:Lt.Yj(),arguments:Lt.Yj(),output:Lt.Yj().nullish(),error:Lt.KC([Lt.Yj(),ko]).optional()}))))}),Vo={applyPatch:fo,codeInterpreter:(e={})=>vo(e),fileSearch:bo,imageGeneration:(e={})=>So(e),localShell:Ao,shell:xo,webSearchPreview:Mo,webSearch:(e={})=>No(e),mcp:e=>Go(e)};function jo(e){var t,o,r,i;if(null==e)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};const n=e.input_tokens,s=e.output_tokens,a=null!=(o=null==(t=e.input_tokens_details)?void 0:t.cached_tokens)?o:0,l=null!=(i=null==(r=e.output_tokens_details)?void 0:r.reasoning_tokens)?i:0;return{inputTokens:{total:n,noCache:n-a,cacheRead:a,cacheWrite:void 0},outputTokens:{total:s,text:s-l,reasoning:l},raw:e}}function Wo(e,t){return!!t&&t.some((t=>e.startsWith(t)))}var Ho=Lt.Ik({itemId:Lt.Yj().nullish(),reasoningEncryptedContent:Lt.Yj().nullish()});function Bo({finishReason:e,hasFunctionCall:t}){switch(e){case void 0:case null:return t?"tool-calls":"stop";case"max_output_tokens":return"length";case"content_filter":return"content-filter";default:return t?"tool-calls":"other"}}var Uo=Et((()=>bt(Lt.KC([Lt.Ik({type:Lt.eu("response.output_text.delta"),item_id:Lt.Yj(),delta:Lt.Yj(),logprobs:Lt.YO(Lt.Ik({token:Lt.Yj(),logprob:Lt.ai(),top_logprobs:Lt.YO(Lt.Ik({token:Lt.Yj(),logprob:Lt.ai()}))})).nullish()}),Lt.Ik({type:Lt.k5(["response.completed","response.incomplete"]),response:Lt.Ik({incomplete_details:Lt.Ik({reason:Lt.Yj()}).nullish(),usage:Lt.Ik({input_tokens:Lt.ai(),input_tokens_details:Lt.Ik({cached_tokens:Lt.ai().nullish()}).nullish(),output_tokens:Lt.ai(),output_tokens_details:Lt.Ik({reasoning_tokens:Lt.ai().nullish()}).nullish()}),service_tier:Lt.Yj().nullish()})}),Lt.Ik({type:Lt.eu("response.created"),response:Lt.Ik({id:Lt.Yj(),created_at:Lt.ai(),model:Lt.Yj(),service_tier:Lt.Yj().nullish()})}),Lt.Ik({type:Lt.eu("response.output_item.added"),output_index:Lt.ai(),item:Lt.gM("type",[Lt.Ik({type:Lt.eu("message"),id:Lt.Yj()}),Lt.Ik({type:Lt.eu("reasoning"),id:Lt.Yj(),encrypted_content:Lt.Yj().nullish()}),Lt.Ik({type:Lt.eu("function_call"),id:Lt.Yj(),call_id:Lt.Yj(),name:Lt.Yj(),arguments:Lt.Yj()}),Lt.Ik({type:Lt.eu("web_search_call"),id:Lt.Yj(),status:Lt.Yj()}),Lt.Ik({type:Lt.eu("computer_call"),id:Lt.Yj(),status:Lt.Yj()}),Lt.Ik({type:Lt.eu("file_search_call"),id:Lt.Yj()}),Lt.Ik({type:Lt.eu("image_generation_call"),id:Lt.Yj()}),Lt.Ik({type:Lt.eu("code_interpreter_call"),id:Lt.Yj(),container_id:Lt.Yj(),code:Lt.Yj().nullable(),outputs:Lt.YO(Lt.gM("type",[Lt.Ik({type:Lt.eu("logs"),logs:Lt.Yj()}),Lt.Ik({type:Lt.eu("image"),url:Lt.Yj()})])).nullable(),status:Lt.Yj()}),Lt.Ik({type:Lt.eu("mcp_call"),id:Lt.Yj(),status:Lt.Yj(),approval_request_id:Lt.Yj().nullish()}),Lt.Ik({type:Lt.eu("mcp_list_tools"),id:Lt.Yj()}),Lt.Ik({type:Lt.eu("mcp_approval_request"),id:Lt.Yj()}),Lt.Ik({type:Lt.eu("apply_patch_call"),id:Lt.Yj(),call_id:Lt.Yj(),status:Lt.k5(["in_progress","completed"]),operation:Lt.gM("type",[Lt.Ik({type:Lt.eu("create_file"),path:Lt.Yj(),diff:Lt.Yj()}),Lt.Ik({type:Lt.eu("delete_file"),path:Lt.Yj()}),Lt.Ik({type:Lt.eu("update_file"),path:Lt.Yj(),diff:Lt.Yj()})])}),Lt.Ik({type:Lt.eu("shell_call"),id:Lt.Yj(),call_id:Lt.Yj(),status:Lt.k5(["in_progress","completed","incomplete"]),action:Lt.Ik({commands:Lt.YO(Lt.Yj())})})])}),Lt.Ik({type:Lt.eu("response.output_item.done"),output_index:Lt.ai(),item:Lt.gM("type",[Lt.Ik({type:Lt.eu("message"),id:Lt.Yj()}),Lt.Ik({type:Lt.eu("reasoning"),id:Lt.Yj(),encrypted_content:Lt.Yj().nullish()}),Lt.Ik({type:Lt.eu("function_call"),id:Lt.Yj(),call_id:Lt.Yj(),name:Lt.Yj(),arguments:Lt.Yj(),status:Lt.eu("completed")}),Lt.Ik({type:Lt.eu("code_interpreter_call"),id:Lt.Yj(),code:Lt.Yj().nullable(),container_id:Lt.Yj(),outputs:Lt.YO(Lt.gM("type",[Lt.Ik({type:Lt.eu("logs"),logs:Lt.Yj()}),Lt.Ik({type:Lt.eu("image"),url:Lt.Yj()})])).nullable()}),Lt.Ik({type:Lt.eu("image_generation_call"),id:Lt.Yj(),result:Lt.Yj()}),Lt.Ik({type:Lt.eu("web_search_call"),id:Lt.Yj(),status:Lt.Yj(),action:Lt.gM("type",[Lt.Ik({type:Lt.eu("search"),query:Lt.Yj().nullish(),sources:Lt.YO(Lt.gM("type",[Lt.Ik({type:Lt.eu("url"),url:Lt.Yj()}),Lt.Ik({type:Lt.eu("api"),name:Lt.Yj()})])).nullish()}),Lt.Ik({type:Lt.eu("open_page"),url:Lt.Yj().nullish()}),Lt.Ik({type:Lt.eu("find_in_page"),url:Lt.Yj().nullish(),pattern:Lt.Yj().nullish()})])}),Lt.Ik({type:Lt.eu("file_search_call"),id:Lt.Yj(),queries:Lt.YO(Lt.Yj()),results:Lt.YO(Lt.Ik({attributes:Lt.g1(Lt.Yj(),Lt.KC([Lt.Yj(),Lt.ai(),Lt.zM()])),file_id:Lt.Yj(),filename:Lt.Yj(),score:Lt.ai(),text:Lt.Yj()})).nullish()}),Lt.Ik({type:Lt.eu("local_shell_call"),id:Lt.Yj(),call_id:Lt.Yj(),action:Lt.Ik({type:Lt.eu("exec"),command:Lt.YO(Lt.Yj()),timeout_ms:Lt.ai().optional(),user:Lt.Yj().optional(),working_directory:Lt.Yj().optional(),env:Lt.g1(Lt.Yj(),Lt.Yj()).optional()})}),Lt.Ik({type:Lt.eu("computer_call"),id:Lt.Yj(),status:Lt.eu("completed")}),Lt.Ik({type:Lt.eu("mcp_call"),id:Lt.Yj(),status:Lt.Yj(),arguments:Lt.Yj(),name:Lt.Yj(),server_label:Lt.Yj(),output:Lt.Yj().nullish(),error:Lt.KC([Lt.Yj(),Lt.Ik({type:Lt.Yj().optional(),code:Lt.KC([Lt.ai(),Lt.Yj()]).optional(),message:Lt.Yj().optional()}).loose()]).nullish(),approval_request_id:Lt.Yj().nullish()}),Lt.Ik({type:Lt.eu("mcp_list_tools"),id:Lt.Yj(),server_label:Lt.Yj(),tools:Lt.YO(Lt.Ik({name:Lt.Yj(),description:Lt.Yj().optional(),input_schema:Lt.bz(),annotations:Lt.g1(Lt.Yj(),Lt.L5()).optional()})),error:Lt.KC([Lt.Yj(),Lt.Ik({type:Lt.Yj().optional(),code:Lt.KC([Lt.ai(),Lt.Yj()]).optional(),message:Lt.Yj().optional()}).loose()]).optional()}),Lt.Ik({type:Lt.eu("mcp_approval_request"),id:Lt.Yj(),server_label:Lt.Yj(),name:Lt.Yj(),arguments:Lt.Yj(),approval_request_id:Lt.Yj().optional()}),Lt.Ik({type:Lt.eu("apply_patch_call"),id:Lt.Yj(),call_id:Lt.Yj(),status:Lt.k5(["in_progress","completed"]),operation:Lt.gM("type",[Lt.Ik({type:Lt.eu("create_file"),path:Lt.Yj(),diff:Lt.Yj()}),Lt.Ik({type:Lt.eu("delete_file"),path:Lt.Yj()}),Lt.Ik({type:Lt.eu("update_file"),path:Lt.Yj(),diff:Lt.Yj()})])}),Lt.Ik({type:Lt.eu("shell_call"),id:Lt.Yj(),call_id:Lt.Yj(),status:Lt.k5(["in_progress","completed","incomplete"]),action:Lt.Ik({commands:Lt.YO(Lt.Yj())})})])}),Lt.Ik({type:Lt.eu("response.function_call_arguments.delta"),item_id:Lt.Yj(),output_index:Lt.ai(),delta:Lt.Yj()}),Lt.Ik({type:Lt.eu("response.image_generation_call.partial_image"),item_id:Lt.Yj(),output_index:Lt.ai(),partial_image_b64:Lt.Yj()}),Lt.Ik({type:Lt.eu("response.code_interpreter_call_code.delta"),item_id:Lt.Yj(),output_index:Lt.ai(),delta:Lt.Yj()}),Lt.Ik({type:Lt.eu("response.code_interpreter_call_code.done"),item_id:Lt.Yj(),output_index:Lt.ai(),code:Lt.Yj()}),Lt.Ik({type:Lt.eu("response.output_text.annotation.added"),annotation:Lt.gM("type",[Lt.Ik({type:Lt.eu("url_citation"),start_index:Lt.ai(),end_index:Lt.ai(),url:Lt.Yj(),title:Lt.Yj()}),Lt.Ik({type:Lt.eu("file_citation"),file_id:Lt.Yj(),filename:Lt.Yj(),index:Lt.ai()}),Lt.Ik({type:Lt.eu("container_file_citation"),container_id:Lt.Yj(),file_id:Lt.Yj(),filename:Lt.Yj(),start_index:Lt.ai(),end_index:Lt.ai()}),Lt.Ik({type:Lt.eu("file_path"),file_id:Lt.Yj(),index:Lt.ai()})])}),Lt.Ik({type:Lt.eu("response.reasoning_summary_part.added"),item_id:Lt.Yj(),summary_index:Lt.ai()}),Lt.Ik({type:Lt.eu("response.reasoning_summary_text.delta"),item_id:Lt.Yj(),summary_index:Lt.ai(),delta:Lt.Yj()}),Lt.Ik({type:Lt.eu("response.reasoning_summary_part.done"),item_id:Lt.Yj(),summary_index:Lt.ai()}),Lt.Ik({type:Lt.eu("response.apply_patch_call_operation_diff.delta"),item_id:Lt.Yj(),output_index:Lt.ai(),delta:Lt.Yj(),obfuscation:Lt.Yj().nullish()}),Lt.Ik({type:Lt.eu("response.apply_patch_call_operation_diff.done"),item_id:Lt.Yj(),output_index:Lt.ai(),diff:Lt.Yj()}),Lt.Ik({type:Lt.eu("error"),sequence_number:Lt.ai(),error:Lt.Ik({type:Lt.Yj(),code:Lt.Yj(),message:Lt.Yj(),param:Lt.Yj().nullish()})}),Lt.Ik({type:Lt.Yj()}).loose().transform((e=>({type:"unknown_chunk",message:e.type})))])))),zo=Et((()=>bt(Lt.Ik({id:Lt.Yj().optional(),created_at:Lt.ai().optional(),error:Lt.Ik({message:Lt.Yj(),type:Lt.Yj(),param:Lt.Yj().nullish(),code:Lt.Yj()}).nullish(),model:Lt.Yj().optional(),output:Lt.YO(Lt.gM("type",[Lt.Ik({type:Lt.eu("message"),role:Lt.eu("assistant"),id:Lt.Yj(),content:Lt.YO(Lt.Ik({type:Lt.eu("output_text"),text:Lt.Yj(),logprobs:Lt.YO(Lt.Ik({token:Lt.Yj(),logprob:Lt.ai(),top_logprobs:Lt.YO(Lt.Ik({token:Lt.Yj(),logprob:Lt.ai()}))})).nullish(),annotations:Lt.YO(Lt.gM("type",[Lt.Ik({type:Lt.eu("url_citation"),start_index:Lt.ai(),end_index:Lt.ai(),url:Lt.Yj(),title:Lt.Yj()}),Lt.Ik({type:Lt.eu("file_citation"),file_id:Lt.Yj(),filename:Lt.Yj(),index:Lt.ai()}),Lt.Ik({type:Lt.eu("container_file_citation"),container_id:Lt.Yj(),file_id:Lt.Yj(),filename:Lt.Yj(),start_index:Lt.ai(),end_index:Lt.ai()}),Lt.Ik({type:Lt.eu("file_path"),file_id:Lt.Yj(),index:Lt.ai()})]))}))}),Lt.Ik({type:Lt.eu("web_search_call"),id:Lt.Yj(),status:Lt.Yj(),action:Lt.gM("type",[Lt.Ik({type:Lt.eu("search"),query:Lt.Yj().nullish(),sources:Lt.YO(Lt.gM("type",[Lt.Ik({type:Lt.eu("url"),url:Lt.Yj()}),Lt.Ik({type:Lt.eu("api"),name:Lt.Yj()})])).nullish()}),Lt.Ik({type:Lt.eu("open_page"),url:Lt.Yj().nullish()}),Lt.Ik({type:Lt.eu("find_in_page"),url:Lt.Yj().nullish(),pattern:Lt.Yj().nullish()})])}),Lt.Ik({type:Lt.eu("file_search_call"),id:Lt.Yj(),queries:Lt.YO(Lt.Yj()),results:Lt.YO(Lt.Ik({attributes:Lt.g1(Lt.Yj(),Lt.KC([Lt.Yj(),Lt.ai(),Lt.zM()])),file_id:Lt.Yj(),filename:Lt.Yj(),score:Lt.ai(),text:Lt.Yj()})).nullish()}),Lt.Ik({type:Lt.eu("code_interpreter_call"),id:Lt.Yj(),code:Lt.Yj().nullable(),container_id:Lt.Yj(),outputs:Lt.YO(Lt.gM("type",[Lt.Ik({type:Lt.eu("logs"),logs:Lt.Yj()}),Lt.Ik({type:Lt.eu("image"),url:Lt.Yj()})])).nullable()}),Lt.Ik({type:Lt.eu("image_generation_call"),id:Lt.Yj(),result:Lt.Yj()}),Lt.Ik({type:Lt.eu("local_shell_call"),id:Lt.Yj(),call_id:Lt.Yj(),action:Lt.Ik({type:Lt.eu("exec"),command:Lt.YO(Lt.Yj()),timeout_ms:Lt.ai().optional(),user:Lt.Yj().optional(),working_directory:Lt.Yj().optional(),env:Lt.g1(Lt.Yj(),Lt.Yj()).optional()})}),Lt.Ik({type:Lt.eu("function_call"),call_id:Lt.Yj(),name:Lt.Yj(),arguments:Lt.Yj(),id:Lt.Yj()}),Lt.Ik({type:Lt.eu("computer_call"),id:Lt.Yj(),status:Lt.Yj().optional()}),Lt.Ik({type:Lt.eu("reasoning"),id:Lt.Yj(),encrypted_content:Lt.Yj().nullish(),summary:Lt.YO(Lt.Ik({type:Lt.eu("summary_text"),text:Lt.Yj()}))}),Lt.Ik({type:Lt.eu("mcp_call"),id:Lt.Yj(),status:Lt.Yj(),arguments:Lt.Yj(),name:Lt.Yj(),server_label:Lt.Yj(),output:Lt.Yj().nullish(),error:Lt.KC([Lt.Yj(),Lt.Ik({type:Lt.Yj().optional(),code:Lt.KC([Lt.ai(),Lt.Yj()]).optional(),message:Lt.Yj().optional()}).loose()]).nullish(),approval_request_id:Lt.Yj().nullish()}),Lt.Ik({type:Lt.eu("mcp_list_tools"),id:Lt.Yj(),server_label:Lt.Yj(),tools:Lt.YO(Lt.Ik({name:Lt.Yj(),description:Lt.Yj().optional(),input_schema:Lt.bz(),annotations:Lt.g1(Lt.Yj(),Lt.L5()).optional()})),error:Lt.KC([Lt.Yj(),Lt.Ik({type:Lt.Yj().optional(),code:Lt.KC([Lt.ai(),Lt.Yj()]).optional(),message:Lt.Yj().optional()}).loose()]).optional()}),Lt.Ik({type:Lt.eu("mcp_approval_request"),id:Lt.Yj(),server_label:Lt.Yj(),name:Lt.Yj(),arguments:Lt.Yj(),approval_request_id:Lt.Yj().optional()}),Lt.Ik({type:Lt.eu("apply_patch_call"),id:Lt.Yj(),call_id:Lt.Yj(),status:Lt.k5(["in_progress","completed"]),operation:Lt.gM("type",[Lt.Ik({type:Lt.eu("create_file"),path:Lt.Yj(),diff:Lt.Yj()}),Lt.Ik({type:Lt.eu("delete_file"),path:Lt.Yj()}),Lt.Ik({type:Lt.eu("update_file"),path:Lt.Yj(),diff:Lt.Yj()})])}),Lt.Ik({type:Lt.eu("shell_call"),id:Lt.Yj(),call_id:Lt.Yj(),status:Lt.k5(["in_progress","completed","incomplete"]),action:Lt.Ik({commands:Lt.YO(Lt.Yj())})})])).optional(),service_tier:Lt.Yj().nullish(),incomplete_details:Lt.Ik({reason:Lt.Yj()}).nullish(),usage:Lt.Ik({input_tokens:Lt.ai(),input_tokens_details:Lt.Ik({cached_tokens:Lt.ai().nullish()}).nullish(),output_tokens:Lt.ai(),output_tokens_details:Lt.Ik({reasoning_tokens:Lt.ai().nullish()}).nullish()}).optional()})))),Yo=Et((()=>bt(Lt.Ik({conversation:Lt.Yj().nullish(),include:Lt.YO(Lt.k5(["reasoning.encrypted_content","file_search_call.results","message.output_text.logprobs"])).nullish(),instructions:Lt.Yj().nullish(),logprobs:Lt.KC([Lt.zM(),Lt.ai().min(1).max(20)]).optional(),maxToolCalls:Lt.ai().nullish(),metadata:Lt.bz().nullish(),parallelToolCalls:Lt.zM().nullish(),previousResponseId:Lt.Yj().nullish(),promptCacheKey:Lt.Yj().nullish(),promptCacheRetention:Lt.k5(["in_memory","24h"]).nullish(),reasoningEffort:Lt.Yj().nullish(),reasoningSummary:Lt.Yj().nullish(),safetyIdentifier:Lt.Yj().nullish(),serviceTier:Lt.k5(["auto","flex","priority","default"]).nullish(),store:Lt.zM().nullish(),strictJsonSchema:Lt.zM().nullish(),textVerbosity:Lt.k5(["low","medium","high"]).nullish(),truncation:Lt.k5(["auto","disabled"]).nullish(),user:Lt.Yj().nullish(),systemMessageMode:Lt.k5(["system","developer","remove"]).optional(),forceReasoning:Lt.zM().optional()}))));function qo(e){var t,o;const r={};for(const i of e)if("assistant"===i.role)for(const e of i.content){if("tool-call"!==e.type)continue;const i=null==(o=null==(t=e.providerOptions)?void 0:t.openai)?void 0:o.approvalRequestId;null!=i&&(r[i]=e.toolCallId)}return r}var Ko=class{constructor(e,t){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/]},this.modelId=e,this.config=t}get provider(){return this.config.provider}async getArgs({maxOutputTokens:e,temperature:t,stopSequences:o,topP:r,topK:i,presencePenalty:n,frequencyPenalty:s,seed:a,prompt:l,providerOptions:p,tools:u,toolChoice:c,responseFormat:d}){var h,f,g,m,y,v;const C=[],w=Ht(this.modelId);null!=i&&C.push({type:"unsupported",feature:"topK"}),null!=a&&C.push({type:"unsupported",feature:"seed"}),null!=n&&C.push({type:"unsupported",feature:"presencePenalty"}),null!=s&&C.push({type:"unsupported",feature:"frequencyPenalty"}),null!=o&&C.push({type:"unsupported",feature:"stopSequences"});const E=this.config.provider.includes("azure")?"azure":"openai";let _=await Pt({provider:E,providerOptions:p,schema:Yo});null==_&&"openai"!==E&&(_=await Pt({provider:"openai",providerOptions:p,schema:Yo}));const b=null!=(h=null==_?void 0:_.forceReasoning)?h:w.isReasoningModel;(null==_?void 0:_.conversation)&&(null==_?void 0:_.previousResponseId)&&C.push({type:"unsupported",feature:"conversation",details:"conversation and previousResponseId cannot be used together"});const R=function({tools:e=[],providerToolNames:t}){const o={},r={};for(const i of e)if("provider"===i.type&&i.id in t){const e=t[i.id];o[i.name]=e,r[e]=i.name}return{toProviderToolName:e=>{var t;return null!=(t=o[e])?t:e},toCustomToolName:e=>{var t;return null!=(t=r[e])?t:e}}}({tools:u,providerToolNames:{"openai.code_interpreter":"code_interpreter","openai.file_search":"file_search","openai.image_generation":"image_generation","openai.local_shell":"local_shell","openai.shell":"shell","openai.web_search":"web_search","openai.web_search_preview":"web_search_preview","openai.mcp":"mcp","openai.apply_patch":"apply_patch"}}),{input:S,warnings:O}=await async function({prompt:e,toolNameMapping:t,systemMessageMode:o,providerOptionsName:r,fileIdPrefixes:i,store:n,hasLocalShellTool:s=!1,hasShellTool:a=!1,hasApplyPatchTool:l=!1}){var p,u,c,d,h,f,g,m,y,v,C,w,E;const _=[],b=[],R=new Set;for(const{role:S,content:O}of e)switch(S){case"system":switch(o){case"system":_.push({role:"system",content:O});break;case"developer":_.push({role:"developer",content:O});break;case"remove":b.push({type:"other",message:"system messages are removed for this model"});break;default:throw new Error(`Unsupported system message mode: ${o}`)}break;case"user":_.push({role:"user",content:O.map(((e,t)=>{var o,n,s;switch(e.type){case"text":return{type:"input_text",text:e.text};case"file":if(e.mediaType.startsWith("image/")){const t="image/*"===e.mediaType?"image/jpeg":e.mediaType;return{type:"input_image",...e.data instanceof Vt?{image_url:e.data.toString()}:"string"==typeof e.data&&Wo(e.data,i)?{file_id:e.data}:{image_url:`data:${t};base64,${Ie(e.data)}`},detail:null==(n=null==(o=e.providerOptions)?void 0:o[r])?void 0:n.imageDetail}}if("application/pdf"===e.mediaType)return e.data instanceof Vt?{type:"input_file",file_url:e.data.toString()}:{type:"input_file",..."string"==typeof e.data&&Wo(e.data,i)?{file_id:e.data}:{filename:null!=(s=e.filename)?s:`part-${t}.pdf`,file_data:`data:application/pdf;base64,${Ie(e.data)}`}};throw new Ce({functionality:`file part media type ${e.mediaType}`})}}))});break;case"assistant":{const e={};for(const o of O)switch(o.type){case"text":{const e=null==(u=null==(p=o.providerOptions)?void 0:p[r])?void 0:u.itemId;if(n&&null!=e){_.push({type:"item_reference",id:e});break}_.push({role:"assistant",content:[{type:"output_text",text:o.text}],id:e});break}case"tool-call":{const e=null!=(g=null==(d=null==(c=o.providerOptions)?void 0:c[r])?void 0:d.itemId)?g:null==(f=null==(h=o.providerMetadata)?void 0:h[r])?void 0:f.itemId;if(o.providerExecuted){n&&null!=e&&_.push({type:"item_reference",id:e});break}if(n&&null!=e){_.push({type:"item_reference",id:e});break}const i=t.toProviderToolName(o.toolName);if(s&&"local_shell"===i){const t=await Rt({value:o.input,schema:Oo});_.push({type:"local_shell_call",call_id:o.toolCallId,id:e,action:{type:"exec",command:t.action.command,timeout_ms:t.action.timeoutMs,user:t.action.user,working_directory:t.action.workingDirectory,env:t.action.env}});break}if(a&&"shell"===i){const t=await Rt({value:o.input,schema:Po});_.push({type:"shell_call",call_id:o.toolCallId,id:e,status:"completed",action:{commands:t.action.commands,timeout_ms:t.action.timeoutMs,max_output_length:t.action.maxOutputLength}});break}_.push({type:"function_call",call_id:o.toolCallId,name:i,arguments:JSON.stringify(o.input),id:e});break}case"tool-result":if("execution-denied"===o.output.type||"json"===o.output.type&&"object"==typeof o.output.value&&null!=o.output.value&&"type"in o.output.value&&"execution-denied"===o.output.value.type)break;if(n){const e=null!=(v=null==(y=null==(m=o.providerMetadata)?void 0:m[r])?void 0:y.itemId)?v:o.toolCallId;_.push({type:"item_reference",id:e})}else b.push({type:"other",message:`Results for OpenAI tool ${o.toolName} are not sent to the API when store is false`});break;case"reasoning":{const t=await Pt({provider:r,providerOptions:o.providerOptions,schema:Ho}),i=null==t?void 0:t.itemId;if(null!=i){const r=e[i];if(n)void 0===r&&(_.push({type:"item_reference",id:i}),e[i]={type:"reasoning",id:i,summary:[]});else{const n=[];o.text.length>0?n.push({type:"summary_text",text:o.text}):void 0!==r&&b.push({type:"other",message:`Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(o)}.`}),void 0===r?(e[i]={type:"reasoning",id:i,encrypted_content:null==t?void 0:t.reasoningEncryptedContent,summary:n},_.push(e[i])):(r.summary.push(...n),null!=(null==t?void 0:t.reasoningEncryptedContent)&&(r.encrypted_content=t.reasoningEncryptedContent))}}else b.push({type:"other",message:`Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(o)}.`});break}}break}case"tool":for(const e of O){if("tool-approval-response"===e.type){const t=e;if(R.has(t.approvalId))continue;R.add(t.approvalId),n&&_.push({type:"item_reference",id:t.approvalId}),_.push({type:"mcp_approval_response",approval_request_id:t.approvalId,approve:t.approved});continue}const o=e.output;if("execution-denied"===o.type&&(null==(w=null==(C=o.providerOptions)?void 0:C.openai)?void 0:w.approvalId))continue;const r=t.toProviderToolName(e.toolName);if(s&&"local_shell"===r&&"json"===o.type){const t=await Rt({value:o.value,schema:To});_.push({type:"local_shell_call_output",call_id:e.toolCallId,output:t.output});continue}if(a&&"shell"===r&&"json"===o.type){const t=await Rt({value:o.value,schema:Io});_.push({type:"shell_call_output",call_id:e.toolCallId,output:t.output.map((e=>({stdout:e.stdout,stderr:e.stderr,outcome:"timeout"===e.outcome.type?{type:"timeout"}:{type:"exit",exit_code:e.outcome.exitCode}})))});continue}if(l&&"apply_patch"===e.toolName&&"json"===o.type){const t=await Rt({value:o.value,schema:ho});_.push({type:"apply_patch_call_output",call_id:e.toolCallId,status:t.status,output:t.output});continue}let i;switch(o.type){case"text":case"error-text":i=o.value;break;case"execution-denied":i=null!=(E=o.reason)?E:"Tool execution denied.";break;case"json":case"error-json":i=JSON.stringify(o.value);break;case"content":i=o.value.map((e=>{var t;switch(e.type){case"text":return{type:"input_text",text:e.text};case"image-data":return{type:"input_image",image_url:`data:${e.mediaType};base64,${e.data}`};case"image-url":return{type:"input_image",image_url:e.url};case"file-data":return{type:"input_file",filename:null!=(t=e.filename)?t:"data",file_data:`data:${e.mediaType};base64,${e.data}`};default:return void b.push({type:"other",message:`unsupported tool content part type: ${e.type}`})}})).filter(Ue)}_.push({type:"function_call_output",call_id:e.toolCallId,output:i})}break;default:throw new Error(`Unsupported role: ${S}`)}return{input:_,warnings:b}}({prompt:l,toolNameMapping:R,systemMessageMode:null!=(f=null==_?void 0:_.systemMessageMode)?f:b?"developer":w.systemMessageMode,providerOptionsName:E,fileIdPrefixes:this.config.fileIdPrefixes,store:null==(g=null==_?void 0:_.store)||g,hasLocalShellTool:I("openai.local_shell"),hasShellTool:I("openai.shell"),hasApplyPatchTool:I("openai.apply_patch")});C.push(...O);const T=null==(m=null==_?void 0:_.strictJsonSchema)||m;let A=null==_?void 0:_.include;function P(e){null==A?A=[e]:A.includes(e)||(A=[...A,e])}function I(e){return null!=(null==u?void 0:u.find((t=>"provider"===t.type&&t.id===e)))}const x="number"==typeof(null==_?void 0:_.logprobs)?null==_?void 0:_.logprobs:!0===(null==_?void 0:_.logprobs)?20:void 0;x&&P("message.output_text.logprobs");const D=null==(y=null==u?void 0:u.find((e=>"provider"===e.type&&("openai.web_search"===e.id||"openai.web_search_preview"===e.id))))?void 0:y.name;D&&P("web_search_call.action.sources"),I("openai.code_interpreter")&&P("code_interpreter_call.outputs");const N=null==_?void 0:_.store;!1===N&&b&&P("reasoning.encrypted_content");const F={model:this.modelId,input:S,temperature:t,top_p:r,max_output_tokens:e,...("json"===(null==d?void 0:d.type)||(null==_?void 0:_.textVerbosity))&&{text:{..."json"===(null==d?void 0:d.type)&&{format:null!=d.schema?{type:"json_schema",strict:T,name:null!=(v=d.name)?v:"response",description:d.description,schema:d.schema}:{type:"json_object"}},...(null==_?void 0:_.textVerbosity)&&{verbosity:_.textVerbosity}}},conversation:null==_?void 0:_.conversation,max_tool_calls:null==_?void 0:_.maxToolCalls,metadata:null==_?void 0:_.metadata,parallel_tool_calls:null==_?void 0:_.parallelToolCalls,previous_response_id:null==_?void 0:_.previousResponseId,store:N,user:null==_?void 0:_.user,instructions:null==_?void 0:_.instructions,service_tier:null==_?void 0:_.serviceTier,include:A,prompt_cache_key:null==_?void 0:_.promptCacheKey,prompt_cache_retention:null==_?void 0:_.promptCacheRetention,safety_identifier:null==_?void 0:_.safetyIdentifier,top_logprobs:x,truncation:null==_?void 0:_.truncation,...b&&(null!=(null==_?void 0:_.reasoningEffort)||null!=(null==_?void 0:_.reasoningSummary))&&{reasoning:{...null!=(null==_?void 0:_.reasoningEffort)&&{effort:_.reasoningEffort},...null!=(null==_?void 0:_.reasoningSummary)&&{summary:_.reasoningSummary}}}};b?"none"===(null==_?void 0:_.reasoningEffort)&&w.supportsNonReasoningParameters||(null!=F.temperature&&(F.temperature=void 0,C.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"})),null!=F.top_p&&(F.top_p=void 0,C.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"}))):(null!=(null==_?void 0:_.reasoningEffort)&&C.push({type:"unsupported",feature:"reasoningEffort",details:"reasoningEffort is not supported for non-reasoning models"}),null!=(null==_?void 0:_.reasoningSummary)&&C.push({type:"unsupported",feature:"reasoningSummary",details:"reasoningSummary is not supported for non-reasoning models"})),"flex"!==(null==_?void 0:_.serviceTier)||w.supportsFlexProcessing||(C.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),delete F.service_tier),"priority"!==(null==_?void 0:_.serviceTier)||w.supportsPriorityProcessing||(C.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),delete F.service_tier);const{tools:M,toolChoice:k,toolWarnings:L}=await async function({tools:e,toolChoice:t}){const o=[];if(null==(e=(null==e?void 0:e.length)?e:void 0))return{tools:void 0,toolChoice:void 0,toolWarnings:o};const r=[];for(const t of e)switch(t.type){case"function":r.push({type:"function",name:t.name,description:t.description,parameters:t.inputSchema,...null!=t.strict?{strict:t.strict}:{}});break;case"provider":switch(t.id){case"openai.file_search":{const e=await Rt({value:t.args,schema:Eo});r.push({type:"file_search",vector_store_ids:e.vectorStoreIds,max_num_results:e.maxNumResults,ranking_options:e.ranking?{ranker:e.ranking.ranker,score_threshold:e.ranking.scoreThreshold}:void 0,filters:e.filters});break}case"openai.local_shell":r.push({type:"local_shell"});break;case"openai.shell":r.push({type:"shell"});break;case"openai.apply_patch":r.push({type:"apply_patch"});break;case"openai.web_search_preview":{const e=await Rt({value:t.args,schema:Fo});r.push({type:"web_search_preview",search_context_size:e.searchContextSize,user_location:e.userLocation});break}case"openai.web_search":{const e=await Rt({value:t.args,schema:Do});r.push({type:"web_search",filters:null!=e.filters?{allowed_domains:e.filters.allowedDomains}:void 0,external_web_access:e.externalWebAccess,search_context_size:e.searchContextSize,user_location:e.userLocation});break}case"openai.code_interpreter":{const e=await Rt({value:t.args,schema:yo});r.push({type:"code_interpreter",container:null==e.container?{type:"auto",file_ids:void 0}:"string"==typeof e.container?e.container:{type:"auto",file_ids:e.container.fileIds}});break}case"openai.image_generation":{const e=await Rt({value:t.args,schema:Ro});r.push({type:"image_generation",background:e.background,input_fidelity:e.inputFidelity,input_image_mask:e.inputImageMask?{file_id:e.inputImageMask.fileId,image_url:e.inputImageMask.imageUrl}:void 0,model:e.model,moderation:e.moderation,partial_images:e.partialImages,quality:e.quality,output_compression:e.outputCompression,output_format:e.outputFormat,size:e.size});break}case"openai.mcp":{const e=await Rt({value:t.args,schema:Lo}),o=e=>({tool_names:e.toolNames}),i=e.requireApproval,n=null==i?void 0:"string"==typeof i?i:null!=i.never?{never:o(i.never)}:void 0;r.push({type:"mcp",server_label:e.serverLabel,allowed_tools:Array.isArray(e.allowedTools)?e.allowedTools:e.allowedTools?{read_only:e.allowedTools.readOnly,tool_names:e.allowedTools.toolNames}:void 0,authorization:e.authorization,connector_id:e.connectorId,headers:e.headers,require_approval:null!=n?n:"never",server_description:e.serverDescription,server_url:e.serverUrl});break}}break;default:o.push({type:"unsupported",feature:`function tool ${t}`})}if(null==t)return{tools:r,toolChoice:void 0,toolWarnings:o};const i=t.type;switch(i){case"auto":case"none":case"required":return{tools:r,toolChoice:i,toolWarnings:o};case"tool":return{tools:r,toolChoice:"code_interpreter"===t.toolName||"file_search"===t.toolName||"image_generation"===t.toolName||"web_search_preview"===t.toolName||"web_search"===t.toolName||"mcp"===t.toolName||"apply_patch"===t.toolName?{type:t.toolName}:{type:"function",name:t.toolName},toolWarnings:o};default:throw new Ce({functionality:`tool choice type: ${i}`})}}({tools:u,toolChoice:c});return{webSearchToolName:D,args:{...F,tools:M,tool_choice:k},warnings:[...C,...L],store:N,toolNameMapping:R,providerOptionsName:E}}async doGenerate(e){var t,o,r,i,n,s,a,l,p,u,c,d,h,f,m,y,v,C,w,E,_,b,R,S,O;const{args:T,warnings:A,webSearchToolName:P,toolNameMapping:I,providerOptionsName:x}=await this.getArgs(e),D=this.config.url({path:"/responses",modelId:this.modelId}),N=qo(e.prompt),{responseHeaders:F,value:M,rawValue:k}=await xt({url:D,headers:Se(this.config.headers(),e.headers),body:T,failedResponseHandler:Wt,successfulResponseHandler:kt(zo),abortSignal:e.abortSignal,fetch:this.config.fetch});if(M.error)throw new g({message:M.error.message,url:D,requestBodyValues:T,statusCode:400,responseHeaders:F,responseBody:k,isRetryable:!1});const L=[],G=[];let V=!1;for(const g of M.output)switch(g.type){case"reasoning":0===g.summary.length&&g.summary.push({type:"summary_text",text:""});for(const e of g.summary)L.push({type:"reasoning",text:e.text,providerMetadata:{[x]:{itemId:g.id,reasoningEncryptedContent:null!=(t=g.encrypted_content)?t:null}}});break;case"image_generation_call":L.push({type:"tool-call",toolCallId:g.id,toolName:I.toCustomToolName("image_generation"),input:"{}",providerExecuted:!0}),L.push({type:"tool-result",toolCallId:g.id,toolName:I.toCustomToolName("image_generation"),result:{result:g.result}});break;case"local_shell_call":L.push({type:"tool-call",toolCallId:g.call_id,toolName:I.toCustomToolName("local_shell"),input:JSON.stringify({action:g.action}),providerMetadata:{[x]:{itemId:g.id}}});break;case"shell_call":L.push({type:"tool-call",toolCallId:g.call_id,toolName:I.toCustomToolName("shell"),input:JSON.stringify({action:{commands:g.action.commands}}),providerMetadata:{[x]:{itemId:g.id}}});break;case"message":for(const t of g.content){(null==(r=null==(o=e.providerOptions)?void 0:o[x])?void 0:r.logprobs)&&t.logprobs&&G.push(t.logprobs);const y={itemId:g.id,...t.annotations.length>0&&{annotations:t.annotations}};L.push({type:"text",text:t.text,providerMetadata:{[x]:y}});for(const e of t.annotations)"url_citation"===e.type?L.push({type:"source",sourceType:"url",id:null!=(s=null==(n=(i=this.config).generateId)?void 0:n.call(i))?s:Ve(),url:e.url,title:e.title}):"file_citation"===e.type?L.push({type:"source",sourceType:"document",id:null!=(p=null==(l=(a=this.config).generateId)?void 0:l.call(a))?p:Ve(),mediaType:"text/plain",title:e.filename,filename:e.filename,providerMetadata:{[x]:{type:e.type,fileId:e.file_id,index:e.index}}}):"container_file_citation"===e.type?L.push({type:"source",sourceType:"document",id:null!=(d=null==(c=(u=this.config).generateId)?void 0:c.call(u))?d:Ve(),mediaType:"text/plain",title:e.filename,filename:e.filename,providerMetadata:{[x]:{type:e.type,fileId:e.file_id,containerId:e.container_id}}}):"file_path"===e.type&&L.push({type:"source",sourceType:"document",id:null!=(m=null==(f=(h=this.config).generateId)?void 0:f.call(h))?m:Ve(),mediaType:"application/octet-stream",title:e.file_id,filename:e.file_id,providerMetadata:{[x]:{type:e.type,fileId:e.file_id,index:e.index}}})}break;case"function_call":V=!0,L.push({type:"tool-call",toolCallId:g.call_id,toolName:g.name,input:g.arguments,providerMetadata:{[x]:{itemId:g.id}}});break;case"web_search_call":L.push({type:"tool-call",toolCallId:g.id,toolName:I.toCustomToolName(null!=P?P:"web_search"),input:JSON.stringify({}),providerExecuted:!0}),L.push({type:"tool-result",toolCallId:g.id,toolName:I.toCustomToolName(null!=P?P:"web_search"),result:Zo(g.action)});break;case"mcp_call":{const e=null!=g.approval_request_id&&null!=(y=N[g.approval_request_id])?y:g.id,t=`mcp.${g.name}`;L.push({type:"tool-call",toolCallId:e,toolName:t,input:g.arguments,providerExecuted:!0,dynamic:!0}),L.push({type:"tool-result",toolCallId:e,toolName:t,result:{type:"call",serverLabel:g.server_label,name:g.name,arguments:g.arguments,...null!=g.output?{output:g.output}:{},...null!=g.error?{error:g.error}:{}},providerMetadata:{[x]:{itemId:g.id}}});break}case"mcp_list_tools":break;case"mcp_approval_request":{const e=null!=(v=g.approval_request_id)?v:g.id,t=null!=(E=null==(w=(C=this.config).generateId)?void 0:w.call(C))?E:Ve(),o=`mcp.${g.name}`;L.push({type:"tool-call",toolCallId:t,toolName:o,input:g.arguments,providerExecuted:!0,dynamic:!0}),L.push({type:"tool-approval-request",approvalId:e,toolCallId:t});break}case"computer_call":L.push({type:"tool-call",toolCallId:g.id,toolName:I.toCustomToolName("computer_use"),input:"",providerExecuted:!0}),L.push({type:"tool-result",toolCallId:g.id,toolName:I.toCustomToolName("computer_use"),result:{type:"computer_use_tool_result",status:g.status||"completed"}});break;case"file_search_call":L.push({type:"tool-call",toolCallId:g.id,toolName:I.toCustomToolName("file_search"),input:"{}",providerExecuted:!0}),L.push({type:"tool-result",toolCallId:g.id,toolName:I.toCustomToolName("file_search"),result:{queries:g.queries,results:null!=(b=null==(_=g.results)?void 0:_.map((e=>({attributes:e.attributes,fileId:e.file_id,filename:e.filename,score:e.score,text:e.text}))))?b:null}});break;case"code_interpreter_call":L.push({type:"tool-call",toolCallId:g.id,toolName:I.toCustomToolName("code_interpreter"),input:JSON.stringify({code:g.code,containerId:g.container_id}),providerExecuted:!0}),L.push({type:"tool-result",toolCallId:g.id,toolName:I.toCustomToolName("code_interpreter"),result:{outputs:g.outputs}});break;case"apply_patch_call":L.push({type:"tool-call",toolCallId:g.call_id,toolName:I.toCustomToolName("apply_patch"),input:JSON.stringify({callId:g.call_id,operation:g.operation}),providerMetadata:{[x]:{itemId:g.id}}})}const j={[x]:{responseId:M.id}};G.length>0&&(j[x].logprobs=G),"string"==typeof M.service_tier&&(j[x].serviceTier=M.service_tier);const W=M.usage;return{content:L,finishReason:{unified:Bo({finishReason:null==(R=M.incomplete_details)?void 0:R.reason,hasFunctionCall:V}),raw:null!=(O=null==(S=M.incomplete_details)?void 0:S.reason)?O:void 0},usage:jo(W),request:{body:T},response:{id:M.id,timestamp:new Date(1e3*M.created_at),modelId:M.model,headers:F,body:k},providerMetadata:j,warnings:A}}async doStream(e){const{args:t,warnings:o,webSearchToolName:r,toolNameMapping:i,store:n,providerOptionsName:s}=await this.getArgs(e),{responseHeaders:a,value:l}=await xt({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:Se(this.config.headers(),e.headers),body:{...t,stream:!0},failedResponseHandler:Wt,successfulResponseHandler:Mt(Uo),abortSignal:e.abortSignal,fetch:this.config.fetch}),p=this,u=qo(e.prompt),c=new Map;let d,h={unified:"other",raw:void 0};const f=[];let g=null;const m={},y=[];let v=!1;const C={};let w;return{stream:l.pipeThrough(new TransformStream({start(e){e.enqueue({type:"stream-start",warnings:o})},transform(t,o){var a,l,E,_,b,R,S,O,T,A,P,I,x,D,N,F,M,k,L,G,V,j,W,H,B,U,z,Y,q,K;if(e.includeRawChunks&&o.enqueue({type:"raw",rawValue:t.rawValue}),!t.success)return h={unified:"error",raw:void 0},void o.enqueue({type:"error",error:t.error});const $=t.value;if($o($))if("function_call"===$.item.type)m[$.output_index]={toolName:$.item.name,toolCallId:$.item.call_id},o.enqueue({type:"tool-input-start",id:$.item.call_id,toolName:$.item.name});else if("web_search_call"===$.item.type)m[$.output_index]={toolName:i.toCustomToolName(null!=r?r:"web_search"),toolCallId:$.item.id},o.enqueue({type:"tool-input-start",id:$.item.id,toolName:i.toCustomToolName(null!=r?r:"web_search"),providerExecuted:!0}),o.enqueue({type:"tool-input-end",id:$.item.id}),o.enqueue({type:"tool-call",toolCallId:$.item.id,toolName:i.toCustomToolName(null!=r?r:"web_search"),input:JSON.stringify({}),providerExecuted:!0});else if("computer_call"===$.item.type)m[$.output_index]={toolName:i.toCustomToolName("computer_use"),toolCallId:$.item.id},o.enqueue({type:"tool-input-start",id:$.item.id,toolName:i.toCustomToolName("computer_use"),providerExecuted:!0});else if("code_interpreter_call"===$.item.type)m[$.output_index]={toolName:i.toCustomToolName("code_interpreter"),toolCallId:$.item.id,codeInterpreter:{containerId:$.item.container_id}},o.enqueue({type:"tool-input-start",id:$.item.id,toolName:i.toCustomToolName("code_interpreter"),providerExecuted:!0}),o.enqueue({type:"tool-input-delta",id:$.item.id,delta:`{"containerId":"${$.item.container_id}","code":"`});else if("file_search_call"===$.item.type)o.enqueue({type:"tool-call",toolCallId:$.item.id,toolName:i.toCustomToolName("file_search"),input:"{}",providerExecuted:!0});else if("image_generation_call"===$.item.type)o.enqueue({type:"tool-call",toolCallId:$.item.id,toolName:i.toCustomToolName("image_generation"),input:"{}",providerExecuted:!0});else if("mcp_call"===$.item.type||"mcp_list_tools"===$.item.type||"mcp_approval_request"===$.item.type);else if("apply_patch_call"===$.item.type){const{call_id:e,operation:t}=$.item;if(m[$.output_index]={toolName:i.toCustomToolName("apply_patch"),toolCallId:e,applyPatch:{hasDiff:"delete_file"===t.type,endEmitted:"delete_file"===t.type}},o.enqueue({type:"tool-input-start",id:e,toolName:i.toCustomToolName("apply_patch")}),"delete_file"===t.type){const r=JSON.stringify({callId:e,operation:t});o.enqueue({type:"tool-input-delta",id:e,delta:r}),o.enqueue({type:"tool-input-end",id:e})}else o.enqueue({type:"tool-input-delta",id:e,delta:`{"callId":"${Jo(e)}","operation":{"type":"${Jo(t.type)}","path":"${Jo(t.path)}","diff":"`})}else"shell_call"===$.item.type?m[$.output_index]={toolName:i.toCustomToolName("shell"),toolCallId:$.item.call_id}:"message"===$.item.type?(y.splice(0,y.length),o.enqueue({type:"text-start",id:$.item.id,providerMetadata:{[s]:{itemId:$.item.id}}})):$o($)&&"reasoning"===$.item.type&&(C[$.item.id]={encryptedContent:$.item.encrypted_content,summaryParts:{0:"active"}},o.enqueue({type:"reasoning-start",id:`${$.item.id}:0`,providerMetadata:{[s]:{itemId:$.item.id,reasoningEncryptedContent:null!=(a=$.item.encrypted_content)?a:null}}}));else if(function(e){return"response.output_item.done"===e.type}($)){if("message"===$.item.type)o.enqueue({type:"text-end",id:$.item.id,providerMetadata:{[s]:{itemId:$.item.id,...y.length>0&&{annotations:y}}}});else if("function_call"===$.item.type)m[$.output_index]=void 0,v=!0,o.enqueue({type:"tool-input-end",id:$.item.call_id}),o.enqueue({type:"tool-call",toolCallId:$.item.call_id,toolName:$.item.name,input:$.item.arguments,providerMetadata:{[s]:{itemId:$.item.id}}});else if("web_search_call"===$.item.type)m[$.output_index]=void 0,o.enqueue({type:"tool-result",toolCallId:$.item.id,toolName:i.toCustomToolName(null!=r?r:"web_search"),result:Zo($.item.action)});else if("computer_call"===$.item.type)m[$.output_index]=void 0,o.enqueue({type:"tool-input-end",id:$.item.id}),o.enqueue({type:"tool-call",toolCallId:$.item.id,toolName:i.toCustomToolName("computer_use"),input:"",providerExecuted:!0}),o.enqueue({type:"tool-result",toolCallId:$.item.id,toolName:i.toCustomToolName("computer_use"),result:{type:"computer_use_tool_result",status:$.item.status||"completed"}});else if("file_search_call"===$.item.type)m[$.output_index]=void 0,o.enqueue({type:"tool-result",toolCallId:$.item.id,toolName:i.toCustomToolName("file_search"),result:{queries:$.item.queries,results:null!=(E=null==(l=$.item.results)?void 0:l.map((e=>({attributes:e.attributes,fileId:e.file_id,filename:e.filename,score:e.score,text:e.text}))))?E:null}});else if("code_interpreter_call"===$.item.type)m[$.output_index]=void 0,o.enqueue({type:"tool-result",toolCallId:$.item.id,toolName:i.toCustomToolName("code_interpreter"),result:{outputs:$.item.outputs}});else if("image_generation_call"===$.item.type)o.enqueue({type:"tool-result",toolCallId:$.item.id,toolName:i.toCustomToolName("image_generation"),result:{result:$.item.result}});else if("mcp_call"===$.item.type){m[$.output_index]=void 0;const e=null!=(_=$.item.approval_request_id)?_:void 0,t=null!=e&&null!=(R=null!=(b=c.get(e))?b:u[e])?R:$.item.id,r=`mcp.${$.item.name}`;o.enqueue({type:"tool-call",toolCallId:t,toolName:r,input:$.item.arguments,providerExecuted:!0,dynamic:!0}),o.enqueue({type:"tool-result",toolCallId:t,toolName:r,result:{type:"call",serverLabel:$.item.server_label,name:$.item.name,arguments:$.item.arguments,...null!=$.item.output?{output:$.item.output}:{},...null!=$.item.error?{error:$.item.error}:{}},providerMetadata:{[s]:{itemId:$.item.id}}})}else if("mcp_list_tools"===$.item.type)m[$.output_index]=void 0;else if("apply_patch_call"===$.item.type){const e=m[$.output_index];(null==e?void 0:e.applyPatch)&&!e.applyPatch.endEmitted&&"delete_file"!==$.item.operation.type&&(e.applyPatch.hasDiff||o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:Jo($.item.operation.diff)}),o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:'"}}'}),o.enqueue({type:"tool-input-end",id:e.toolCallId}),e.applyPatch.endEmitted=!0),e&&"completed"===$.item.status&&o.enqueue({type:"tool-call",toolCallId:e.toolCallId,toolName:i.toCustomToolName("apply_patch"),input:JSON.stringify({callId:$.item.call_id,operation:$.item.operation}),providerMetadata:{[s]:{itemId:$.item.id}}}),m[$.output_index]=void 0}else if("mcp_approval_request"===$.item.type){m[$.output_index]=void 0;const e=null!=(T=null==(O=(S=p.config).generateId)?void 0:O.call(S))?T:Ve(),t=null!=(A=$.item.approval_request_id)?A:$.item.id;c.set(t,e);const r=`mcp.${$.item.name}`;o.enqueue({type:"tool-call",toolCallId:e,toolName:r,input:$.item.arguments,providerExecuted:!0,dynamic:!0}),o.enqueue({type:"tool-approval-request",approvalId:t,toolCallId:e})}else if("local_shell_call"===$.item.type)m[$.output_index]=void 0,o.enqueue({type:"tool-call",toolCallId:$.item.call_id,toolName:i.toCustomToolName("local_shell"),input:JSON.stringify({action:{type:"exec",command:$.item.action.command,timeoutMs:$.item.action.timeout_ms,user:$.item.action.user,workingDirectory:$.item.action.working_directory,env:$.item.action.env}}),providerMetadata:{[s]:{itemId:$.item.id}}});else if("shell_call"===$.item.type)m[$.output_index]=void 0,o.enqueue({type:"tool-call",toolCallId:$.item.call_id,toolName:i.toCustomToolName("shell"),input:JSON.stringify({action:{commands:$.item.action.commands}}),providerMetadata:{[s]:{itemId:$.item.id}}});else if("reasoning"===$.item.type){const e=C[$.item.id],t=Object.entries(e.summaryParts).filter((([e,t])=>"active"===t||"can-conclude"===t)).map((([e])=>e));for(const e of t)o.enqueue({type:"reasoning-end",id:`${$.item.id}:${e}`,providerMetadata:{[s]:{itemId:$.item.id,reasoningEncryptedContent:null!=(P=$.item.encrypted_content)?P:null}}});delete C[$.item.id]}}else if(function(e){return"response.function_call_arguments.delta"===e.type}($)){const e=m[$.output_index];null!=e&&o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:$.delta})}else if(function(e){return"response.apply_patch_call_operation_diff.delta"===e.type}($)){const e=m[$.output_index];(null==e?void 0:e.applyPatch)&&(o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:Jo($.delta)}),e.applyPatch.hasDiff=!0)}else if(function(e){return"response.apply_patch_call_operation_diff.done"===e.type}($)){const e=m[$.output_index];(null==e?void 0:e.applyPatch)&&!e.applyPatch.endEmitted&&(e.applyPatch.hasDiff||(o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:Jo($.diff)}),e.applyPatch.hasDiff=!0),o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:'"}}'}),o.enqueue({type:"tool-input-end",id:e.toolCallId}),e.applyPatch.endEmitted=!0)}else if(function(e){return"response.image_generation_call.partial_image"===e.type}($))o.enqueue({type:"tool-result",toolCallId:$.item_id,toolName:i.toCustomToolName("image_generation"),result:{result:$.partial_image_b64},preliminary:!0});else if(function(e){return"response.code_interpreter_call_code.delta"===e.type}($)){const e=m[$.output_index];null!=e&&o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:Jo($.delta)})}else if(function(e){return"response.code_interpreter_call_code.done"===e.type}($)){const e=m[$.output_index];null!=e&&(o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:'"}'}),o.enqueue({type:"tool-input-end",id:e.toolCallId}),o.enqueue({type:"tool-call",toolCallId:e.toolCallId,toolName:i.toCustomToolName("code_interpreter"),input:JSON.stringify({code:$.code,containerId:e.codeInterpreter.containerId}),providerExecuted:!0}))}else if(function(e){return"response.created"===e.type}($))g=$.response.id,o.enqueue({type:"response-metadata",id:$.response.id,timestamp:new Date(1e3*$.response.created_at),modelId:$.response.model});else if(function(e){return"response.output_text.delta"===e.type}($))o.enqueue({type:"text-delta",id:$.item_id,delta:$.delta}),(null==(x=null==(I=e.providerOptions)?void 0:I[s])?void 0:x.logprobs)&&$.logprobs&&f.push($.logprobs);else if("response.reasoning_summary_part.added"===$.type){if($.summary_index>0){const e=C[$.item_id];e.summaryParts[$.summary_index]="active";for(const t of Object.keys(e.summaryParts))"can-conclude"===e.summaryParts[t]&&(o.enqueue({type:"reasoning-end",id:`${$.item_id}:${t}`,providerMetadata:{[s]:{itemId:$.item_id}}}),e.summaryParts[t]="concluded");o.enqueue({type:"reasoning-start",id:`${$.item_id}:${$.summary_index}`,providerMetadata:{[s]:{itemId:$.item_id,reasoningEncryptedContent:null!=(N=null==(D=C[$.item_id])?void 0:D.encryptedContent)?N:null}}})}}else"response.reasoning_summary_text.delta"===$.type?o.enqueue({type:"reasoning-delta",id:`${$.item_id}:${$.summary_index}`,delta:$.delta,providerMetadata:{[s]:{itemId:$.item_id}}}):"response.reasoning_summary_part.done"===$.type?n?(o.enqueue({type:"reasoning-end",id:`${$.item_id}:${$.summary_index}`,providerMetadata:{[s]:{itemId:$.item_id}}}),C[$.item_id].summaryParts[$.summary_index]="concluded"):C[$.item_id].summaryParts[$.summary_index]="can-conclude":function(e){return"response.completed"===e.type||"response.incomplete"===e.type}($)?(h={unified:Bo({finishReason:null==(F=$.response.incomplete_details)?void 0:F.reason,hasFunctionCall:v}),raw:null!=(k=null==(M=$.response.incomplete_details)?void 0:M.reason)?k:void 0},d=$.response.usage,"string"==typeof $.response.service_tier&&(w=$.response.service_tier)):function(e){return"response.output_text.annotation.added"===e.type}($)?(y.push($.annotation),"url_citation"===$.annotation.type?o.enqueue({type:"source",sourceType:"url",id:null!=(V=null==(G=(L=p.config).generateId)?void 0:G.call(L))?V:Ve(),url:$.annotation.url,title:$.annotation.title}):"file_citation"===$.annotation.type?o.enqueue({type:"source",sourceType:"document",id:null!=(H=null==(W=(j=p.config).generateId)?void 0:W.call(j))?H:Ve(),mediaType:"text/plain",title:$.annotation.filename,filename:$.annotation.filename,providerMetadata:{[s]:{type:$.annotation.type,fileId:$.annotation.file_id,index:$.annotation.index}}}):"container_file_citation"===$.annotation.type?o.enqueue({type:"source",sourceType:"document",id:null!=(z=null==(U=(B=p.config).generateId)?void 0:U.call(B))?z:Ve(),mediaType:"text/plain",title:$.annotation.filename,filename:$.annotation.filename,providerMetadata:{[s]:{type:$.annotation.type,fileId:$.annotation.file_id,containerId:$.annotation.container_id}}}):"file_path"===$.annotation.type&&o.enqueue({type:"source",sourceType:"document",id:null!=(K=null==(q=(Y=p.config).generateId)?void 0:q.call(Y))?K:Ve(),mediaType:"application/octet-stream",title:$.annotation.file_id,filename:$.annotation.file_id,providerMetadata:{[s]:{type:$.annotation.type,fileId:$.annotation.file_id,index:$.annotation.index}}})):function(e){return"error"===e.type}($)&&o.enqueue({type:"error",error:$})},flush(e){const t={[s]:{responseId:g}};f.length>0&&(t[s].logprobs=f),void 0!==w&&(t[s].serviceTier=w),e.enqueue({type:"finish",finishReason:h,usage:jo(d),providerMetadata:t})}})),request:{body:t},response:{headers:a}}}};function $o(e){return"response.output_item.added"===e.type}function Zo(e){var t;switch(e.type){case"search":return{action:{type:"search",query:null!=(t=e.query)?t:void 0},...null!=e.sources&&{sources:e.sources}};case"open_page":return{action:{type:"openPage",url:e.url}};case"find_in_page":return{action:{type:"findInPage",url:e.url,pattern:e.pattern}}}}function Jo(e){return JSON.stringify(e).slice(1,-1)}var Qo=Et((()=>bt(Lt.Ik({instructions:Lt.Yj().nullish(),speed:Lt.ai().min(.25).max(4).default(1).nullish()})))),Xo=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3"}get provider(){return this.config.provider}async getArgs({text:e,voice:t="alloy",outputFormat:o="mp3",speed:r,instructions:i,language:n,providerOptions:s}){const a=[],l=await Pt({provider:"openai",providerOptions:s,schema:Qo}),p={model:this.modelId,input:e,voice:t,response_format:"mp3",speed:r,instructions:i};if(o&&(["mp3","opus","aac","flac","wav","pcm"].includes(o)?p.response_format=o:a.push({type:"unsupported",feature:"outputFormat",details:`Unsupported output format: ${o}. Using mp3 instead.`})),l){const e={};for(const t in e){const o=e[t];void 0!==o&&(p[t]=o)}}return n&&a.push({type:"unsupported",feature:"language",details:`OpenAI speech models do not support language selection. Language parameter "${n}" was ignored.`}),{requestBody:p,warnings:a}}async doGenerate(e){var t,o,r;const i=null!=(r=null==(o=null==(t=this.config._internal)?void 0:t.currentDate)?void 0:o.call(t))?r:new Date,{requestBody:n,warnings:s}=await this.getArgs(e),{value:a,responseHeaders:l,rawValue:p}=await xt({url:this.config.url({path:"/audio/speech",modelId:this.modelId}),headers:Se(this.config.headers(),e.headers),body:n,failedResponseHandler:Wt,successfulResponseHandler:async({response:e,url:t,requestBodyValues:o})=>{const r=Oe(e);if(!e.body)throw new g({message:"Response body is empty",url:t,requestBodyValues:o,statusCode:e.status,responseHeaders:r,responseBody:void 0});try{const t=await e.arrayBuffer();return{responseHeaders:r,value:new Uint8Array(t)}}catch(i){throw new g({message:"Failed to read response as array buffer",url:t,requestBodyValues:o,statusCode:e.status,responseHeaders:r,responseBody:void 0,cause:i})}},abortSignal:e.abortSignal,fetch:this.config.fetch});return{audio:a,warnings:s,request:{body:JSON.stringify(n)},response:{timestamp:i,modelId:this.modelId,headers:l,body:p}}}},er=Et((()=>bt(Lt.Ik({text:Lt.Yj(),language:Lt.Yj().nullish(),duration:Lt.ai().nullish(),words:Lt.YO(Lt.Ik({word:Lt.Yj(),start:Lt.ai(),end:Lt.ai()})).nullish(),segments:Lt.YO(Lt.Ik({id:Lt.ai(),seek:Lt.ai(),start:Lt.ai(),end:Lt.ai(),text:Lt.Yj(),tokens:Lt.YO(Lt.ai()),temperature:Lt.ai(),avg_logprob:Lt.ai(),compression_ratio:Lt.ai(),no_speech_prob:Lt.ai()})).nullish()})))),tr=Et((()=>bt(Lt.Ik({include:Lt.YO(Lt.Yj()).optional(),language:Lt.Yj().optional(),prompt:Lt.Yj().optional(),temperature:Lt.ai().min(0).max(1).default(0).optional(),timestampGranularities:Lt.YO(Lt.k5(["word","segment"])).default(["segment"]).optional()})))),or={afrikaans:"af",arabic:"ar",armenian:"hy",azerbaijani:"az",belarusian:"be",bosnian:"bs",bulgarian:"bg",catalan:"ca",chinese:"zh",croatian:"hr",czech:"cs",danish:"da",dutch:"nl",english:"en",estonian:"et",finnish:"fi",french:"fr",galician:"gl",german:"de",greek:"el",hebrew:"he",hindi:"hi",hungarian:"hu",icelandic:"is",indonesian:"id",italian:"it",japanese:"ja",kannada:"kn",kazakh:"kk",korean:"ko",latvian:"lv",lithuanian:"lt",macedonian:"mk",malay:"ms",marathi:"mr",maori:"mi",nepali:"ne",norwegian:"no",persian:"fa",polish:"pl",portuguese:"pt",romanian:"ro",russian:"ru",serbian:"sr",slovak:"sk",slovenian:"sl",spanish:"es",swahili:"sw",swedish:"sv",tagalog:"tl",tamil:"ta",thai:"th",turkish:"tr",ukrainian:"uk",urdu:"ur",vietnamese:"vi",welsh:"cy"},rr=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3"}get provider(){return this.config.provider}async getArgs({audio:e,mediaType:t,providerOptions:o}){const r=await Pt({provider:"openai",providerOptions:o,schema:tr}),i=new FormData,n=e instanceof Uint8Array?new Blob([e]):new Blob([Pe(e)]);i.append("model",this.modelId);const s=function(e){var t;const[o,r=""]=e.toLowerCase().split("/");return null!=(t={mpeg:"mp3","x-wav":"wav",opus:"ogg",mp4:"m4a","x-m4a":"m4a"}[r])?t:r}(t);if(i.append("file",new File([n],"audio",{type:t}),`audio.${s}`),r){const e={include:r.include,language:r.language,prompt:r.prompt,response_format:["gpt-4o-transcribe","gpt-4o-mini-transcribe"].includes(this.modelId)?"json":"verbose_json",temperature:r.temperature,timestamp_granularities:r.timestampGranularities};for(const[t,o]of Object.entries(e))if(null!=o)if(Array.isArray(o))for(const e of o)i.append(`${t}[]`,String(e));else i.append(t,String(o))}return{formData:i,warnings:[]}}async doGenerate(e){var t,o,r,i,n,s,a,l;const p=null!=(r=null==(o=null==(t=this.config._internal)?void 0:t.currentDate)?void 0:o.call(t))?r:new Date,{formData:u,warnings:c}=await this.getArgs(e),{value:d,responseHeaders:h,rawValue:f}=await Dt({url:this.config.url({path:"/audio/transcriptions",modelId:this.modelId}),headers:Se(this.config.headers(),e.headers),formData:u,failedResponseHandler:Wt,successfulResponseHandler:kt(er),abortSignal:e.abortSignal,fetch:this.config.fetch}),g=null!=d.language&&d.language in or?or[d.language]:void 0;return{text:d.text,segments:null!=(a=null!=(s=null==(i=d.segments)?void 0:i.map((e=>({text:e.text,startSecond:e.start,endSecond:e.end}))))?s:null==(n=d.words)?void 0:n.map((e=>({text:e.word,startSecond:e.start,endSecond:e.end}))))?a:[],language:g,durationInSeconds:null!=(l=d.duration)?l:void 0,warnings:c,response:{timestamp:p,modelId:this.modelId,headers:h,body:f}}}},ir="3.0.9";function nr(e={}){var t,o;const r=null!=(t=null==(i=function({settingValue:e,environmentVariableName:t}){return"string"==typeof e||null==e&&void 0!==Re&&null!=(e=Re.env[t])&&"string"==typeof e?e:void 0}({settingValue:e.baseURL,environmentVariableName:"OPENAI_BASE_URL"}))?void 0:i.replace(/\/$/,""))?t:"https://api.openai.com/v1";var i;const n=null!=(o=e.name)?o:"openai",s=()=>Be({Authorization:`Bearer ${ze({apiKey:e.apiKey,environmentVariableName:"OPENAI_API_KEY",description:"OpenAI"})}`,"OpenAI-Organization":e.organization,"OpenAI-Project":e.project,...e.headers},`ai-sdk/openai/${ir}`),a=t=>new no(t,{provider:`${n}.embedding`,url:({path:e})=>`${r}${e}`,headers:s,fetch:e.fetch}),l=t=>new po(t,{provider:`${n}.image`,url:({path:e})=>`${r}${e}`,headers:s,fetch:e.fetch}),p=t=>new rr(t,{provider:`${n}.transcription`,url:({path:e})=>`${r}${e}`,headers:s,fetch:e.fetch}),u=t=>new Xo(t,{provider:`${n}.speech`,url:({path:e})=>`${r}${e}`,headers:s,fetch:e.fetch}),c=e=>{if(new.target)throw new Error("The OpenAI model function cannot be called with the new keyword.");return d(e)},d=t=>new Ko(t,{provider:`${n}.responses`,url:({path:e})=>`${r}${e}`,headers:s,fetch:e.fetch,fileIdPrefixes:["file-"]}),h=function(e){return c(e)};return h.specificationVersion="v3",h.languageModel=c,h.chat=t=>new $t(t,{provider:`${n}.chat`,url:({path:e})=>`${r}${e}`,headers:s,fetch:e.fetch}),h.completion=t=>new oo(t,{provider:`${n}.completion`,url:({path:e})=>`${r}${e}`,headers:s,fetch:e.fetch}),h.responses=d,h.embedding=a,h.embeddingModel=a,h.textEmbedding=a,h.textEmbeddingModel=a,h.image=l,h.imageModel=l,h.transcription=p,h.transcriptionModel=p,h.speech=u,h.speechModel=u,h.tools=Vo,h}nr()},78481:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(22131),l=o(72493),p=o(26016),u=o(58342),c=o(44871),d=o(98239),h=o(97177),f=o(44081),g=o(34506),m=o(38152),y=o(40797),v=o(86608),C=o(60843),w=o(85910),E=o(21951),_=o(47721),b=o(2299),R=o(85786),S=o(93830),O=o(55090),T=o(81604),A=o(66419),P=o(83423),I=function(e){function t(o,r,i){var n=e.call(this,t.TEMPLATE)||this;return n.column=o,n.dragSourceDropTarget=r,n.pinned=i,n}return i(t,e),t.prototype.getColumn=function(){return this.column},t.prototype.getComponentHolder=function(){return this.column.getColDef()},t.prototype.init=function(){var e=this.getComponentHolder(),t=this.columnController.getDisplayNameForColumn(this.column,"header",!0),o=e.sortable,r=this.menuFactory.isMenuEnabled(this.column)&&!e.suppressMenu;this.appendHeaderComp(t,o,r),this.setupWidth(),this.setupMovingCss(),this.setupTooltip(),this.setupResize(),this.setupMenuClass(),this.setupSortableClass(o),this.addColumnHoverListener(),this.addFeature(this.getContext(),new T.HoverFeature([this.column],this.getGui())),this.addDestroyableEventListener(this.column,p.Column.EVENT_FILTER_ACTIVE_CHANGED,this.onFilterChanged.bind(this)),this.onFilterChanged(),this.addFeature(this.getContext(),new b.SelectAllFeature(this.cbSelectAll,this.column));var i=new m.SetLeftFeature(this.column,this.getGui(),this.beans);i.init(),this.addDestroyFunc(i.destroy.bind(i)),this.addAttributes(),g.CssClassApplier.addHeaderClassesFromColDef(e,this.getGui(),this.gridOptionsWrapper,this.column,null)},t.prototype.addColumnHoverListener=function(){this.addDestroyableEventListener(this.eventService,R.Events.EVENT_COLUMN_HOVER_CHANGED,this.onColumnHover.bind(this)),this.onColumnHover()},t.prototype.onColumnHover=function(){var e=this.columnHoverService.isHovered(this.column);P._.addOrRemoveCssClass(this.getGui(),"ag-column-hover",e)},t.prototype.setupSortableClass=function(e){if(e){var t=this.getGui();P._.addCssClass(t,"ag-header-cell-sortable")}},t.prototype.onFilterChanged=function(){var e=this.column.isFilterActive();P._.addOrRemoveCssClass(this.getGui(),"ag-header-cell-filtered",e)},t.prototype.appendHeaderComp=function(e,t,o){var r=this,i={column:this.column,displayName:e,enableSorting:t,enableMenu:o,showColumnMenu:function(e){r.gridApi.showColumnMenuAfterButtonClick(r.column,e)},progressSort:function(e){r.sortController.progressSort(r.column,!!e,"uiColumnSorted")},setSort:function(e,t){r.sortController.setSortForColumn(r.column,e,!!t,"uiColumnSorted")},api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsWrapper.getContext()},n=this.afterHeaderCompCreated.bind(this,e);this.userComponentFactory.newHeaderComponent(i).then(n)},t.prototype.afterHeaderCompCreated=function(e,t){this.appendChild(t),this.setupMove(t.getGui(),e)},t.prototype.onColumnMovingChanged=function(){this.column.isMoving()?P._.addCssClass(this.getGui(),"ag-header-cell-moving"):P._.removeCssClass(this.getGui(),"ag-header-cell-moving")},t.prototype.setupMove=function(e,t){var o=this;if(!(this.gridOptionsWrapper.isSuppressMovableColumns()||this.getComponentHolder().suppressMovable||this.column.isLockPosition())&&e){var r={type:u.DragSourceType.HeaderCell,eElement:e,dragItemCallback:function(){return o.createDragItem()},dragItemName:t,dragSourceDropTarget:this.dragSourceDropTarget,dragStarted:function(){return o.column.setMoving(!0,"uiColumnMoved")},dragStopped:function(){return o.column.setMoving(!1,"uiColumnMoved")}};this.dragAndDropService.addDragSource(r,!0),this.addDestroyFunc((function(){return o.dragAndDropService.removeDragSource(r)}))}},t.prototype.createDragItem=function(){var e={};return e[this.column.getId()]=this.column.isVisible(),{columns:[this.column],visibleState:e}},t.prototype.setupResize=function(){var e=this,t=this.getComponentHolder();if(this.eResize)if(this.column.isResizable()){var o=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(this.addDestroyFunc(o),!this.gridOptionsWrapper.isSuppressAutoSize()&&!t.suppressAutoSize){this.addDestroyableEventListener(this.eResize,"dblclick",(function(){e.columnController.autoSizeColumn(e.column,"uiColumnResized")}));var r=new A.TouchListener(this.eResize);this.addDestroyableEventListener(r,A.TouchListener.EVENT_DOUBLE_TAP,(function(){e.columnController.autoSizeColumn(e.column,"uiColumnResized")})),this.addDestroyFunc(r.destroy.bind(r))}}else P._.removeFromParent(this.eResize)},t.prototype.onResizing=function(e,t){var o=this.normaliseResizeAmount(t),r=this.resizeStartWidth+o;this.columnController.setColumnWidth(this.column,r,this.resizeWithShiftKey,e,"uiColumnDragged"),e&&P._.removeCssClass(this.getGui(),"ag-column-resizing")},t.prototype.onResizeStart=function(e){this.resizeStartWidth=this.column.getActualWidth(),this.resizeWithShiftKey=e,P._.addCssClass(this.getGui(),"ag-column-resizing")},t.prototype.getTooltipText=function(){return this.getComponentHolder().headerTooltip},t.prototype.setupTooltip=function(){var e=this.getTooltipText();null!=e&&(this.gridOptionsWrapper.isEnableBrowserTooltips()?this.getGui().setAttribute("title",e):this.beans.tooltipManager.registerTooltip(this))},t.prototype.setupMovingCss=function(){this.addDestroyableEventListener(this.column,p.Column.EVENT_MOVING_CHANGED,this.onColumnMovingChanged.bind(this)),this.onColumnMovingChanged()},t.prototype.addAttributes=function(){this.getGui().setAttribute("col-id",this.column.getColId())},t.prototype.setupWidth=function(){this.addDestroyableEventListener(this.column,p.Column.EVENT_WIDTH_CHANGED,this.onColumnWidthChanged.bind(this)),this.onColumnWidthChanged()},t.prototype.setupMenuClass=function(){this.addDestroyableEventListener(this.column,p.Column.EVENT_MENU_VISIBLE_CHANGED,this.onMenuVisible.bind(this)),this.onColumnWidthChanged()},t.prototype.onMenuVisible=function(){this.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())},t.prototype.onColumnWidthChanged=function(){this.getGui().style.width=this.column.getActualWidth()+"px"},t.prototype.normaliseResizeAmount=function(e){var t=e;return this.gridOptionsWrapper.isEnableRtl()?this.pinned!==p.Column.PINNED_LEFT&&(t*=-1):this.pinned===p.Column.PINNED_RIGHT&&(t*=-1),t},t.TEMPLATE='<div class="ag-header-cell" role="presentation" unselectable="on"><div ref="eResize" class="ag-header-cell-resize" role="presentation"></div><ag-checkbox ref="cbSelectAll" class="ag-header-select-all" role="presentation"></ag-checkbox></div>',n([l.Autowired("gridOptionsWrapper"),s("design:type",f.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([l.Autowired("dragAndDropService"),s("design:type",u.DragAndDropService)],t.prototype,"dragAndDropService",void 0),n([l.Autowired("columnController"),s("design:type",d.ColumnController)],t.prototype,"columnController",void 0),n([l.Autowired("horizontalResizeService"),s("design:type",h.HorizontalResizeService)],t.prototype,"horizontalResizeService",void 0),n([l.Autowired("menuFactory"),s("design:type",Object)],t.prototype,"menuFactory",void 0),n([l.Autowired("gridApi"),s("design:type",y.GridApi)],t.prototype,"gridApi",void 0),n([l.Autowired("columnApi"),s("design:type",c.ColumnApi)],t.prototype,"columnApi",void 0),n([l.Autowired("sortController"),s("design:type",v.SortController)],t.prototype,"sortController",void 0),n([l.Autowired("eventService"),s("design:type",C.EventService)],t.prototype,"eventService",void 0),n([l.Autowired("userComponentFactory"),s("design:type",w.UserComponentFactory)],t.prototype,"userComponentFactory",void 0),n([l.Autowired("columnHoverService"),s("design:type",S.ColumnHoverService)],t.prototype,"columnHoverService",void 0),n([l.Autowired("beans"),s("design:type",O.Beans)],t.prototype,"beans",void 0),n([_.RefSelector("eResize"),s("design:type",HTMLElement)],t.prototype,"eResize",void 0),n([_.RefSelector("cbSelectAll"),s("design:type",E.AgCheckbox)],t.prototype,"cbSelectAll",void 0),n([l.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"init",null),t}(a.Component);t.HeaderWrapperComp=I},79886:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(44081),l=o(40634),p=o(60843),u=o(45727),c=o(72493),d=o(22131),h=o(15068),f=o(93121),g=o(95125),m=o(98239),y=o(26016),v=o(47721),C=o(1571),w=o(85910),E=o(83423),_=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return i(t,e),t.prototype.init=function(e){this.params=e,this.gridOptionsWrapper.isGroupIncludeTotalFooter()&&this.assignBlankValueToGroupFooterCell(e);var t=this.isEmbeddedRowMismatch(),o=null==e.value;this.cellIsBlank=t||o,this.cellIsBlank||(this.setupDragOpenParents(),this.addExpandAndContract(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent())},t.prototype.assignBlankValueToGroupFooterCell=function(e){e.value||-1!=e.node.level||(e.value="")},t.prototype.isEmbeddedRowMismatch=function(){if(this.params.fullWidth&&this.gridOptionsWrapper.isEmbedFullWidthRows()){var e=this.params.pinned===y.Column.PINNED_LEFT,t=this.params.pinned===y.Column.PINNED_RIGHT,o=!e&&!t;return this.gridOptionsWrapper.isEnableRtl()?this.columnController.isPinningLeft()?!t:!o:this.columnController.isPinningLeft()?!e:!o}return!1},t.prototype.setIndent=function(){if(!this.gridOptionsWrapper.isGroupHideOpenParents()){var e=this.params,t=e.node.uiLevel;e.padding>=0?this.setPaddingDeprecatedWay(t,e.padding):(this.indentClass&&this.removeCssClass(this.indentClass),this.indentClass="ag-row-group-indent-"+t,this.addCssClass(this.indentClass))}},t.prototype.setPaddingDeprecatedWay=function(e,t){E._.doOnce((function(){return console.warn("ag-Grid: since v14.2, configuring padding for groupCellRenderer should be done with Sass variables and themes. Please see the ag-Grid documentation page for Themes, in particular the property $row-group-indent-size.")}),"groupCellRenderer->doDeprecatedWay");var o=e*t;this.gridOptionsWrapper.isEnableRtl()?this.getGui().style.paddingRight=o+"px":this.getGui().style.paddingLeft=o+"px"},t.prototype.setupIndent=function(){var e=this.params.node;this.params.suppressPadding||(this.addDestroyableEventListener(e,h.RowNode.EVENT_UI_LEVEL_CHANGED,this.setIndent.bind(this)),this.setIndent())},t.prototype.addValueElement=function(){var e=this.params,t=this.displayedGroup;t.footer?this.createFooterCell():t.hasChildren()||E._.get(e.colDef,"cellRendererParams.innerRenderer",null)||E._.get(e.colDef,"cellRendererParams.innerRendererFramework",null)?(this.createGroupCell(),t.hasChildren()&&this.addChildCount()):this.createLeafCell()},t.prototype.createFooterCell=function(){var e,t=this.params.footerValueGetter;if(t){var o=E._.cloneObject(this.params);o.value=this.params.value,"function"==typeof t?e=t(o):"string"==typeof t?e=this.expressionService.evaluate(t,o):console.warn("ag-Grid: footerValueGetter should be either a function or a string (expression)")}else e="Total "+this.params.value;this.eValue.innerHTML=e},t.prototype.createGroupCell=function(){var e,t=this,o=this.params,r=this.displayedGroup.rowGroupColumn||o.column,i=this.params.value,n=r?this.valueFormatterService.formatValue(r,o.node,o.scope,i):null;o.valueFormatted=n,(e=1==o.fullWidth?this.useFullWidth(o):this.useInnerRenderer(this.params.colDef.cellRendererParams,r.getColDef(),o))&&e.then((function(e){t.innerCellRenderer=e}))},t.prototype.useInnerRenderer=function(e,t,o){var r=this,i=null,n=this.userComponentFactory.lookupComponentClassDef(e,"innerRenderer");if(n&&null!=n.component&&n.source!=w.ComponentSource.DEFAULT)i=this.userComponentFactory.newInnerCellRenderer(e,o);else{var s=this.userComponentFactory.lookupComponentClassDef(t,"cellRenderer");i=s&&s.source!=w.ComponentSource.DEFAULT?this.userComponentFactory.newCellRenderer(t,o):s&&s.source==w.ComponentSource.DEFAULT&&E._.get(t,"cellRendererParams.innerRenderer",null)?this.userComponentFactory.newInnerCellRenderer(t.cellRendererParams,o):this.userComponentFactory.newCellRenderer({},o)}return null!=i?i.then((function(e){null!=e?E._.bindCellRendererToHtmlElement(i,r.eValue):r.eValue.innerText=null!=o.valueFormatted?o.valueFormatted:o.value})):this.eValue.innerText=null!=o.valueFormatted?o.valueFormatted:o.value,i},t.prototype.useFullWidth=function(e){var t=this.userComponentFactory.newFullWidthGroupRowInnerCellRenderer(e);return null!=t?E._.bindCellRendererToHtmlElement(t,this.eValue):this.eValue.innerText=null!=e.valueFormatted?e.valueFormatted:e.value,t},t.prototype.addChildCount=function(){this.params.suppressCount||(this.addDestroyableEventListener(this.displayedGroup,h.RowNode.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.updateChildCount.bind(this)),this.updateChildCount())},t.prototype.updateChildCount=function(){var e=this.displayedGroup.allChildrenCount;this.eChildCount.innerHTML=e>=0?"("+e+")":""},t.prototype.createLeafCell=function(){E._.exists(this.params.value)&&(this.eValue.innerHTML=this.params.valueFormatted?this.params.valueFormatted:this.params.value)},t.prototype.isUserWantsSelected=function(){var e=this.params.checkbox;return"function"==typeof e?e(this.params):!0===e},t.prototype.addCheckboxIfNeeded=function(){var e=this.displayedGroup,t=this.isUserWantsSelected()&&!e.footer&&!e.rowPinned&&!e.detail;if(t){var o=new g.CheckboxSelectionComponent;this.getContext().wireBean(o),o.init({rowNode:e,column:this.params.column}),this.eCheckbox.appendChild(o.getGui()),this.addDestroyFunc((function(){return o.destroy()}))}E._.addOrRemoveCssClass(this.eCheckbox,"ag-invisible",!t)},t.prototype.addExpandAndContract=function(){var e=this.params,t=e.eGridCell,o=E._.createIconNoSpan("groupExpanded",this.gridOptionsWrapper,null),r=E._.createIconNoSpan("groupContracted",this.gridOptionsWrapper,null);this.eExpanded.appendChild(o),this.eContracted.appendChild(r),this.addDestroyableEventListener(this.eExpanded,"click",this.onExpandClicked.bind(this)),this.addDestroyableEventListener(this.eContracted,"click",this.onExpandClicked.bind(this)),this.addDestroyableEventListener(t,"keydown",this.onKeyDown.bind(this),{capture:!0}),this.addDestroyableEventListener(e.node,h.RowNode.EVENT_EXPANDED_CHANGED,this.showExpandAndContractIcons.bind(this)),this.showExpandAndContractIcons(),this.addDestroyableEventListener(this.displayedGroup,h.RowNode.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.onAllChildrenCountChanged.bind(this)),this.gridOptionsWrapper.isEnableGroupEdit()||!this.isExpandable()||e.suppressDoubleClickExpand||this.addDestroyableEventListener(t,"dblclick",this.onCellDblClicked.bind(this))},t.prototype.onAllChildrenCountChanged=function(){this.showExpandAndContractIcons(),this.setIndent()},t.prototype.onKeyDown=function(e){if(!e.defaultPrevented&&E._.isKeyPressed(e,u.Constants.KEY_ENTER)){if(this.params.column.isCellEditable(this.params.node))return;e.preventDefault(),this.onExpandOrContract()}},t.prototype.setupDragOpenParents=function(){var e=this.params.column,t=this.params.node;if(this.gridOptionsWrapper.isGroupHideOpenParents())if(t.hasChildren()){var o=t.rowGroupColumn;this.draggedFromHideOpenParents=!e.isRowGroupDisplayed(o.getId())}else this.draggedFromHideOpenParents=!0;else this.draggedFromHideOpenParents=!1;if(this.draggedFromHideOpenParents)for(var r=t.parent;!E._.missing(r);){if(r.rowGroupColumn&&e.isRowGroupDisplayed(r.rowGroupColumn.getId())){this.displayedGroup=r;break}r=r.parent}E._.missing(this.displayedGroup)&&(this.displayedGroup=t)},t.prototype.onExpandClicked=function(e){E._.isStopPropagationForAgGrid(e)||(E._.stopPropagationForAgGrid(e),this.onExpandOrContract())},t.prototype.onCellDblClicked=function(e){E._.isStopPropagationForAgGrid(e)||E._.isElementInEventPath(this.eExpanded,e)||E._.isElementInEventPath(this.eContracted,e)||this.onExpandOrContract()},t.prototype.onExpandOrContract=function(){var e=this.displayedGroup;e.setExpanded(!e.expanded)},t.prototype.isExpandable=function(){var e=this.params.node,t=this.columnController.isPivotMode()&&e.leafGroup;return this.draggedFromHideOpenParents||e.isExpandable()&&!e.footer&&!t},t.prototype.showExpandAndContractIcons=function(){var e=this.params.node;if(this.isExpandable()){var t=!!this.draggedFromHideOpenParents||e.expanded;E._.setVisible(this.eContracted,!t),E._.setVisible(this.eExpanded,t)}else E._.setVisible(this.eExpanded,!1),E._.setVisible(this.eContracted,!1);var o=this.displayedGroup,r=this.columnController.isPivotMode()&&o.leafGroup,i=!o.isExpandable(),n=o.footer||i||r;this.addOrRemoveCssClass("ag-row-group-leaf-indent",n)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.innerCellRenderer&&this.innerCellRenderer.destroy&&this.innerCellRenderer.destroy()},t.prototype.refresh=function(){return!1},t.TEMPLATE='<span><span class="ag-group-expanded" ref="eExpanded"></span><span class="ag-group-contracted" ref="eContracted"></span><span class="ag-group-checkbox ag-invisible" ref="eCheckbox"></span><span class="ag-group-value" ref="eValue"></span><span class="ag-group-child-count" ref="eChildCount"></span></span>',n([c.Autowired("gridOptionsWrapper"),s("design:type",a.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([c.Autowired("expressionService"),s("design:type",l.ExpressionService)],t.prototype,"expressionService",void 0),n([c.Autowired("eventService"),s("design:type",p.EventService)],t.prototype,"eventService",void 0),n([c.Autowired("valueFormatterService"),s("design:type",f.ValueFormatterService)],t.prototype,"valueFormatterService",void 0),n([c.Autowired("columnController"),s("design:type",m.ColumnController)],t.prototype,"columnController",void 0),n([c.Autowired("mouseEventService"),s("design:type",C.MouseEventService)],t.prototype,"mouseEventService",void 0),n([c.Autowired("userComponentFactory"),s("design:type",w.UserComponentFactory)],t.prototype,"userComponentFactory",void 0),n([v.RefSelector("eExpanded"),s("design:type",HTMLElement)],t.prototype,"eExpanded",void 0),n([v.RefSelector("eContracted"),s("design:type",HTMLElement)],t.prototype,"eContracted",void 0),n([v.RefSelector("eCheckbox"),s("design:type",HTMLElement)],t.prototype,"eCheckbox",void 0),n([v.RefSelector("eValue"),s("design:type",HTMLElement)],t.prototype,"eValue",void 0),n([v.RefSelector("eChildCount"),s("design:type",HTMLElement)],t.prototype,"eChildCount",void 0),t}(d.Component);t.GroupCellRenderer=_},80834:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.STRING_PROPERTIES=["headerName","columnGroupShow","headerClass","toolPanelClass","headerValueGetter","pivotKeys","groupId","colId","sort","field","type","tooltipComponent","tooltipField","headerTooltip","cellClass","showRowGroup","template","templateUrl","filter","aggFunc","cellRenderer","cellEditor","pinned"],e.OBJECT_PROPERTIES=["headerGroupComponent","headerGroupComponentFramework","headerGroupComponentParams","cellStyle","cellRendererParams","cellEditorFramework","cellEditorParams","pinnedRowCellRendererFramework","pinnedRowCellRendererParams","filterFramework","filterParams","pivotValueColumn","headerComponent","headerComponentFramework","headerComponentParams","floatingFilterComponent","floatingFilterComponentParams","floatingFilterComponentFramework","tooltipComponent","tooltipComponentParams","tooltipComponentFramework","refData"],e.ARRAY_PROPERTIES=["children","sortingOrder","allowedAggFuncs","menuTabs","pivotTotalColumnIds","cellClassRules","icons"],e.NUMBER_PROPERTIES=["sortedAt","width","minWidth","maxWidth","rowGroupIndex","pivotIndex"],e.BOOLEAN_PROPERTIES=["suppressCellFlash","suppressToolPanel","openByDefault","marryChildren","hide","rowGroup","pivot","checkboxSelection","headerCheckboxSelection","headerCheckboxSelectionFilteredOnly","suppressMenu","suppressSorting","suppressMovable","suppressFilter","lockPosition","lockVisible","lockPinned","unSortIcon","suppressSizeToFit","suppressResize","suppressAutoSize","enableRowGroup","enablePivot","enableValue","editable","suppressPaste","suppressNavigable","enableCellChangeFlash","rowDrag","autoHeight","sortable","resizable","singleClickEdit"],e.FUNCTION_PROPERTIES=["valueGetter","valueSetter","filterValueGetter","keyCreator","cellRenderer","cellRendererFramework","pinnedRowCellRenderer","valueFormatter","pinnedRowValueFormatter","valueParser","comparator","equals","pivotComparator","suppressKeyboardEvent","colSpan","rowSpan","getQuickFilterText","newValueHandler","onCellValueChanged","onCellClicked","onCellDoubleClicked","onCellContextMenu","tooltip","tooltipValueGetter","tooltipComponent","tooltipComponentFramework","cellRendererSelector","cellEditorSelector"],e.ALL_PROPERTIES=e.ARRAY_PROPERTIES.concat(e.OBJECT_PROPERTIES).concat(e.STRING_PROPERTIES).concat(e.NUMBER_PROPERTIES).concat(e.FUNCTION_PROPERTIES).concat(e.BOOLEAN_PROPERTIES),e.FRAMEWORK_PROPERTIES=["__ob__","__metadata__","mappedColumnProperties","hasChildColumns","toColDef","createColDefFromGridColumn"],e}();t.ColDefUtil=o},81604:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(8534),l=o(72493),p=o(93830),u=function(e){function t(t,o){var r=e.call(this)||this;return r.columns=t,r.addMouseHoverListeners(o),r}return i(t,e),t.prototype.addMouseHoverListeners=function(e){this.addDestroyableEventListener(e,"mouseout",this.onMouseOut.bind(this)),this.addDestroyableEventListener(e,"mouseover",this.onMouseOver.bind(this))},t.prototype.onMouseOut=function(){this.columnHoverService.clearMouseOver()},t.prototype.onMouseOver=function(){this.columnHoverService.setMouseOver(this.columns)},n([l.Autowired("columnHoverService"),s("design:type",p.ColumnHoverService)],t.prototype,"columnHoverService",void 0),t}(a.BeanStub);t.HoverFeature=u},81999:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(44081),l=o(44871),p=o(98239),u=o(10042),c=o(55e3),d=o(60843),h=o(64229),f=o(37132),g=o(73575),m=o(72493),y=o(42195),v=o(22131),C=o(40797),w=o(47721),E=o(85786),_=o(68198),b=o(96896),R=o(83423),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.init=function(){var e=this;this.logger=this.loggerFactory.create("GridCore");var o=this.enterprise?t.TEMPLATE_ENTERPRISE:t.TEMPLATE_NORMAL;if(this.setTemplate(o),[this.gridApi,this.filterManager,this.rowRenderer,this.popupService].forEach((function(t){return t.registerGridCore(e)})),this.enterprise&&this.clipboardService.registerGridCore(this),this.gridOptionsWrapper.addLayoutElement(this.getGui()),this.setSideBarVisible(this.gridOptionsWrapper.isShowToolPanel()),this.eGridDiv.appendChild(this.getGui()),this.addDestroyFunc((function(){e.eGridDiv.removeChild(e.getGui())})),this.$scope){var r=this.$scope.$watch(this.quickFilterOnScope,(function(t){return e.filterManager.setQuickFilter(t)}));this.addDestroyFunc(r)}this.addRtlSupport(),this.logger.log("ready"),this.gridOptionsWrapper.addLayoutElement(this.eRootWrapperBody);var i=this.gridPanel.getGui();this.addDestroyableEventListener(i,"focusin",(function(){R._.addCssClass(i,"ag-has-focus")})),this.addDestroyableEventListener(i,"focusout",(function(e){i.contains(e.relatedTarget)||R._.removeCssClass(i,"ag-has-focus")}));var n=this.resizeObserverService.observeResize(this.eGridDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc((function(){return n()}))},t.prototype.onGridSizeChanged=function(){var e={type:E.Events.EVENT_GRID_SIZE_CHANGED,api:this.gridApi,columnApi:this.columnApi,clientWidth:this.eGridDiv.clientWidth,clientHeight:this.eGridDiv.clientHeight};this.eventService.dispatchEvent(e)},t.prototype.addRtlSupport=function(){var e=this.gridOptionsWrapper.isEnableRtl()?"ag-rtl":"ag-ltr";R._.addCssClass(this.getGui(),e)},t.prototype.getRootGui=function(){return this.getGui()},t.prototype.isSideBarVisible=function(){return!!this.sideBarComp&&this.sideBarComp.isVisible()},t.prototype.setSideBarVisible=function(e){this.sideBarComp?this.sideBarComp.setVisible(e):e&&console.warn("ag-Grid: toolPanel is only available in ag-Grid Enterprise")},t.prototype.closeToolPanel=function(){this.sideBarComp?this.sideBarComp.close():console.warn("ag-Grid: toolPanel is only available in ag-Grid Enterprise")},t.prototype.getSideBar=function(){return this.gridOptions.sideBar},t.prototype.refreshSideBar=function(){this.sideBarComp&&this.sideBarComp.refresh()},t.prototype.setSideBar=function(e){this.eRootWrapperBody.removeChild(this.sideBarComp.getGui()),this.gridOptions.sideBar=b.SideBarDefParser.parse(e),this.sideBarComp.reset(),this.eRootWrapperBody.appendChild(this.sideBarComp.getGui())},t.prototype.getOpenedToolPanel=function(){return this.sideBarComp?this.sideBarComp.openedItem():null},t.prototype.openToolPanel=function(e){this.sideBarComp?this.sideBarComp.openToolPanel(e):console.warn("ag-Grid: toolPanel is only available in ag-Grid Enterprise")},t.prototype.isToolPanelShowing=function(){return this.sideBarComp.isToolPanelShowing()},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.logger.log("Grid DOM removed")},t.prototype.ensureNodeVisible=function(e,t){if(void 0===t&&(t="top"),this.doingVirtualPaging)throw new Error("Cannot use ensureNodeVisible when doing virtual paging, as we cannot check rows that are not in memory");for(var o=this.rowModel.getPageLastRow()+1,r="function"==typeof e,i=-1,n=0;n<o;n++){var s=this.rowModel.getRow(n);if(r){if(e(s)){i=n;break}}else if(e===s||e===s.data){i=n;break}}i>=0&&this.gridPanel.ensureIndexVisible(i,t)},t.TEMPLATE_NORMAL='<div class="ag-root-wrapper">\n <div class="ag-root-wrapper-body" ref="rootWrapperBody">\n <ag-grid-comp ref="gridPanel"></ag-grid-comp>\n </div>\n <ag-pagination></ag-pagination>\n </div>',t.TEMPLATE_ENTERPRISE='<div class="ag-root-wrapper">\n <ag-grid-header-drop-zones></ag-grid-header-drop-zones>\n <div ref="rootWrapperBody" class="ag-root-wrapper-body">\n <ag-grid-comp ref="gridPanel"></ag-grid-comp>\n <ag-side-bar ref="sideBar"></ag-side-bar>\n </div>\n <ag-status-bar ref="statusBar"></ag-status-bar>\n <ag-pagination></ag-pagination>\n <ag-watermark></ag-watermark>\n </div>',n([m.Autowired("enterprise"),s("design:type",Boolean)],t.prototype,"enterprise",void 0),n([m.Autowired("gridOptions"),s("design:type",Object)],t.prototype,"gridOptions",void 0),n([m.Autowired("gridOptionsWrapper"),s("design:type",a.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([m.Autowired("rowModel"),s("design:type",Object)],t.prototype,"rowModel",void 0),n([m.Autowired("frameworkFactory"),s("design:type",Object)],t.prototype,"frameworkFactory",void 0),n([m.Autowired("resizeObserverService"),s("design:type",_.ResizeObserverService)],t.prototype,"resizeObserverService",void 0),n([m.Autowired("columnController"),s("design:type",p.ColumnController)],t.prototype,"columnController",void 0),n([m.Autowired("rowRenderer"),s("design:type",u.RowRenderer)],t.prototype,"rowRenderer",void 0),n([m.Autowired("filterManager"),s("design:type",c.FilterManager)],t.prototype,"filterManager",void 0),n([m.Autowired("eventService"),s("design:type",d.EventService)],t.prototype,"eventService",void 0),n([m.Autowired("eGridDiv"),s("design:type",HTMLElement)],t.prototype,"eGridDiv",void 0),n([m.Autowired("$scope"),s("design:type",Object)],t.prototype,"$scope",void 0),n([m.Autowired("quickFilterOnScope"),s("design:type",String)],t.prototype,"quickFilterOnScope",void 0),n([m.Autowired("popupService"),s("design:type",g.PopupService)],t.prototype,"popupService",void 0),n([m.Autowired("focusedCellController"),s("design:type",y.FocusedCellController)],t.prototype,"focusedCellController",void 0),n([m.Autowired("loggerFactory"),s("design:type",f.LoggerFactory)],t.prototype,"loggerFactory",void 0),n([m.Autowired("columnApi"),s("design:type",l.ColumnApi)],t.prototype,"columnApi",void 0),n([m.Autowired("gridApi"),s("design:type",C.GridApi)],t.prototype,"gridApi",void 0),n([m.Optional("clipboardService"),s("design:type",Object)],t.prototype,"clipboardService",void 0),n([w.RefSelector("gridPanel"),s("design:type",h.GridPanel)],t.prototype,"gridPanel",void 0),n([w.RefSelector("sideBar"),s("design:type",Object)],t.prototype,"sideBarComp",void 0),n([w.RefSelector("rootWrapperBody"),s("design:type",HTMLElement)],t.prototype,"eRootWrapperBody",void 0),n([m.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"init",null),t}(v.Component);t.GridCore=S},83423:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(45727),i=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,n=/([^\s,]+)/g,s="__ag_Grid_Stop_Propagation",a=function(){function e(){this.timestamp=(new Date).getTime()}return e.prototype.print=function(e){var t=(new Date).getTime()-this.timestamp;console.info(e+" = "+t),this.timestamp=(new Date).getTime()},e}();t.Timer=a;var l={"&":"&","<":"<",">":">",'"':""","'":"'"},p=/[&<>"']/g,u=function(){function e(){}return e.doIeFocusHack=function(e){(t._.isBrowserIE()||t._.isBrowserEdge())&&(t._.missing(document.activeElement)||document.activeElement===document.body)&&e.focus()},e.doOnce=function(e,t){this.doOnceFlags[t]||(e(),this.doOnceFlags[t]=!0)},e.isLeftClick=function(e){return"buttons"in e?1==e.buttons:1==(e.which||e.button)},e.areEventsNear=function(e,t,o){if(0===o)return!1;var r=Math.abs(e.clientX-t.clientX),i=Math.abs(e.clientY-t.clientY);return Math.max(r,i)<=o},e.jsonEquals=function(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)},e.shallowCompare=function(e,t){if(this.missing(e)&&this.missing(t))return!0;if(this.missing(e)||this.missing(t))return!1;if(e.length!==t.length)return!1;for(var o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0},e.getNameOfClass=function(e){var t=e.toString(),o=/function (.{1,})\(/.exec(t);return o&&o.length>1?o[1]:""},e.values=function(e){var t=[];return this.iterateObject(e,(function(e,o){t.push(o)})),t},e.getValueUsingField=function(e,t,o){if(t&&e){if(o){for(var r=t.split("."),i=e,n=0;n<r.length;n++)if(i=i[r[n]],this.missing(i))return null;return i}return e[t]}},e.getAbsoluteHeight=function(e){var t=window.getComputedStyle(e),o=parseFloat(t.marginTop)+parseFloat(t.marginBottom);return Math.ceil(e.offsetHeight+o)},e.getAbsoluteWidth=function(e){var t=window.getComputedStyle(e),o=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return Math.ceil(e.offsetWidth+o)},e.getScrollLeft=function(e,t){var o=e.scrollLeft;return t&&(o=Math.abs(o),this.isBrowserChrome()&&(o=e.scrollWidth-e.clientWidth-o)),o},e.cleanNumber=function(e){return"string"==typeof e&&(e=parseInt(e,10)),"number"==typeof e?Math.floor(e):null},e.setScrollLeft=function(e,t,o){o&&((this.isBrowserSafari()||this.isBrowserChrome())&&(t=e.scrollWidth-e.clientWidth-t),this.isBrowserFirefox()&&(t*=-1)),e.scrollLeft=t},e.iterateNamedNodeMap=function(e,t){if(e)for(var o=0;o<e.length;o++){var r=e[o];t(r.name,r.value)}},e.iterateObject=function(e,t){if(e&&!this.missing(e))if(Array.isArray(e))e.forEach((function(e,o){t(o+"",e)}));else for(var o=Object.keys(e),r=0;r<o.length;r++){var i=o[r],n=e[i];t(i,n)}},e.cloneObject=function(e){for(var t={},o=Object.keys(e),r=0;r<o.length;r++){var i=o[r],n=e[i];t[i]=n}return t},e.deepCloneObject=function(e){return JSON.parse(JSON.stringify(e))},e.map=function(e,t){for(var o=[],r=0;r<e.length;r++){var i=t(e[r],r);o.push(i)}return o},e.mapObject=function(t,o){var r=[];return e.iterateObject(t,(function(e,t){r.push(o(t))})),r},e.forEach=function(e,t){if(e)for(var o=0;o<e.length;o++)t(e[o],o)},e.filter=function(e,t){var o=[];return e.forEach((function(e){t(e)&&o.push(e)})),o},e.getAllKeysInObjects=function(e){var t={};return e.forEach((function(e){e&&Object.keys(e).forEach((function(e){return t[e]=null}))})),Object.keys(t)},e.mergeDeep=function(t,o){this.exists(o)&&this.iterateObject(o,(function(o,r){var i=t[o];i!==r&&("object"==typeof i&&"object"==typeof r?e.mergeDeep(i,r):t[o]=r)}))},e.assign=function(e){for(var t=this,o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];return o.forEach((function(o){t.exists(o)&&t.iterateObject(o,(function(t,o){e[t]=o}))})),e},e.parseYyyyMmDdToDate=function(e,t){try{if(!e)return null;if(-1===e.indexOf(t))return null;var o=e.split(t);return 3!=o.length?null:new Date(Number(o[0]),Number(o[1])-1,Number(o[2]))}catch(e){return null}},e.serializeDateToYyyyMmDd=function(t,o){return t?t.getFullYear()+o+e.pad(t.getMonth()+1,2)+o+e.pad(t.getDate(),2):null},e.pad=function(e,t){for(var o=e+"";o.length<t;)o="0"+o;return o},e.pushAll=function(e,t){this.missing(t)||this.missing(e)||t.forEach((function(t){return e.push(t)}))},e.createArrayOfNumbers=function(e,t){for(var o=[],r=e;r<=t;r++)o.push(r);return o},e.getFunctionParameters=function(e){var t=e.toString().replace(i,""),o=t.slice(t.indexOf("(")+1,t.indexOf(")")).match(n);return null===o?[]:o},e.find=function(e,t,o){if(null==e)return null;if(!Array.isArray(e)){var r=this.values(e);return this.find(r,t,o)}for(var i=e,n=null,s=0;s<i.length;s++){var a=i[s];if("string"==typeof t){if(a[t]===o){n=a;break}}else if(t(a)){n=a;break}}return n},e.toStrings=function(e){return this.map(e,(function(e){return null!=e&&e.toString?e.toString():null}))},e.iterateArray=function(e,t){for(var o=0;o<e.length;o++)t(e[o],o)},e.isNode=function(e){return"function"==typeof Node?e instanceof Node:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},e.isElement=function(e){return"function"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName},e.isNodeOrElement=function(e){return this.isNode(e)||this.isElement(e)},e.copyNodeList=function(e){for(var t=e?e.length:0,o=[],r=0;r<t;r++)o.push(e[r]);return o},e.isEventFromPrintableCharacter=function(o){var i=String.fromCharCode(o.charCode);if(this.isKeyPressed(o,r.Constants.KEY_NEW_LINE))return!1;if(o.altKey||o.ctrlKey)return!1;if(t._.exists(o.key)){var n=1===o.key.length,s=e.isNumpadDelWithNumlockOnForEdgeOrIe(o);return n||s}return e.PRINTABLE_CHARACTERS.indexOf(i)>=0},e.isUserSuppressingKeyboardEvent=function(e,t,o,r,i){var n=e.getSuppressKeyboardEventFunc(),s=r.getColDef().suppressKeyboardEvent;if(!n&&!s)return!1;var a={event:t,editing:i,column:r,api:e.getApi(),node:o,data:o.data,colDef:r.getColDef(),context:e.getContext(),columnApi:e.getColumnApi()};return!(!s||!s(a))||!!n&&n(a)},e.getCellCompForEvent=function(e,t){for(var o=this.getTarget(t);o;){var r=e.getDomData(o,"cellComp");if(r)return r;o=o.parentElement}return null},e.addChangeListener=function(e,t){e.addEventListener("changed",t),e.addEventListener("paste",t),e.addEventListener("input",t),e.addEventListener("keydown",t),e.addEventListener("keyup",t)},e.makeNull=function(e){return null==e||""===e?null:e},e.missing=function(e){return!this.exists(e)},e.missingOrEmpty=function(e){return!e||this.missing(e)||0===e.length},e.missingOrEmptyObject=function(e){return this.missing(e)||0===Object.keys(e).length},e.exists=function(e,t){return void 0===t&&(t=!1),null!=e&&(""!==e||t)},e.firstExistingValue=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];for(var r=0;r<e.length;r++){var i=e[r];if(t._.exists(i))return i}return null},e.anyExists=function(e){if(e)for(var t=0;t<e.length;t++)if(this.exists(e[t]))return!0;return!1},e.existsAndNotEmpty=function(e){return null!=e&&this.exists(e)&&e.length>0},e.clearElement=function(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)},e.removeElement=function(e,t){this.removeFromParent(e.querySelector(t))},e.removeFromParent=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},e.isVisible=function(e){return null!==e.offsetParent},e.loadTemplate=function(e){var t=document.createElement("div");return t.innerHTML=e,t.firstChild},e.appendHtml=function(e,t){e.lastChild?e.insertAdjacentHTML("afterbegin",t):e.innerHTML=t},e.addOrRemoveCssClass=function(e,t,o){o?this.addCssClass(e,t):this.removeCssClass(e,t)},e.callIfPresent=function(e){e&&e()},e.addCssClass=function(e,t){var o=this;if(t&&0!==t.length)if(t.indexOf(" ")>=0)t.split(" ").forEach((function(t){return o.addCssClass(e,t)}));else if(e.classList)e.classList.contains(t)||e.classList.add(t);else if(e.className&&e.className.length>0){var r=e.className.split(" ");r.indexOf(t)<0&&(r.push(t),e.setAttribute("class",r.join(" ")))}else e.setAttribute("class",t)},e.containsClass=function(e,t){if(e.classList)return e.classList.contains(t);if(e.className){var o=e.className===t,r=e.className.indexOf(" "+t+" ")>=0,i=0===e.className.indexOf(t+" "),n=e.className.lastIndexOf(" "+t)===e.className.length-t.length-1;return o||r||i||n}return!1},e.getElementAttribute=function(e,t){return e.attributes&&e.attributes[t]?e.attributes[t].value:null},e.offsetHeight=function(e){return e&&e.clientHeight?e.clientHeight:0},e.offsetWidth=function(e){return e&&e.clientWidth?e.clientWidth:0},e.sortNumberArray=function(e){e.sort((function(e,t){return e-t}))},e.removeCssClass=function(e,t){if(e.classList)e.classList.contains(t)&&e.classList.remove(t);else if(e.className&&e.className.length>0){var o=e.className.split(" ");if(o.indexOf(t)>=0){for(;o.indexOf(t)>=0;)o.splice(o.indexOf(t),1);e.setAttribute("class",o.join(" "))}}},e.removeRepeatsFromArray=function(e,t){if(e)for(var o=e.length-2;o>=0;o--){var r=e[o]===t,i=e[o+1]===t;r&&i&&e.splice(o+1,1)}},e.removeFromArray=function(e,t){e.indexOf(t)>=0&&e.splice(e.indexOf(t),1)},e.removeAllFromArray=function(e,t){t.forEach((function(t){e.indexOf(t)>=0&&e.splice(e.indexOf(t),1)}))},e.insertIntoArray=function(e,t,o){e.splice(o,0,t)},e.insertArrayIntoArray=function(e,t,o){if(!this.missing(e)&&!this.missing(t))for(var r=t.length-1;r>=0;r--){var i=t[r];this.insertIntoArray(e,i,o)}},e.moveInArray=function(e,t,o){var r=this;t.forEach((function(t){r.removeFromArray(e,t)})),t.slice().reverse().forEach((function(t){r.insertIntoArray(e,t,o)}))},e.defaultComparator=function(e,t,o){void 0===o&&(o=!1);var r=null==e,i=null==t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),r&&i)return 0;if(r)return-1;if(i)return 1;if("string"==typeof e){if(!o)return n(e,t);try{return e.localeCompare(t)}catch(o){return n(e,t)}}return e<t?-1:e>t?1:0;function n(e,t){return e>t?1:e<t?-1:0}},e.compareArrays=function(e,t){if(this.missing(e)&&this.missing(t))return!0;if(this.missing(e)||this.missing(t)||!e||!t)return!1;if(e.length!==t.length)return!1;for(var o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0},e.ensureDomOrder=function(e,t,o){o&&o.nextSibling===t||(o?o.nextSibling?e.insertBefore(t,o.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t))},e.insertWithDomOrder=function(e,t,o){o?o.nextSibling?e.insertBefore(t,o.nextSibling):e.appendChild(t):e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)},e.insertTemplateWithDomOrder=function(e,t,o){var r;return o?(o.insertAdjacentHTML("afterend",t),r=o.nextSibling):(e.firstChild?e.insertAdjacentHTML("afterbegin",t):e.innerHTML=t,r=e.firstChild),r},e.every=function(e,t){if(!e||0===e.length)return!0;for(var o=0;o<e.length;o++)if(!t(e[o]))return!1;return!0},e.toStringOrNull=function(e){return this.exists(e)&&e.toString?e.toString():null},e.formatSize=function(e){return"number"==typeof e?e+"px":e},e.formatNumberTwoDecimalPlacesAndCommas=function(e){return"number"!=typeof e?"":(Math.round(100*e)/100).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},e.formatNumberCommas=function(e){return"number"!=typeof e?"":e.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},e.prependDC=function(e,t){this.exists(e.firstChild)?e.insertBefore(t,e.firstChild):e.appendChild(t)},e.createIcon=function(e,t,o){var r=this.createIconNoSpan(e,t,o);if(r.className.indexOf("ag-icon")>-1)return r;var i=document.createElement("span");return i.appendChild(r),i},e.createIconNoSpan=function(e,t,o){var r=null,i=o&&o.getColDef().icons?o.getColDef().icons:null;if(i&&(r=i[e]),!r&&t.getIcons()&&(r=t.getIcons()[e]),r){var n=void 0;if("function"==typeof r)n=r();else{if("string"!=typeof r)throw new Error("icon from grid options needs to be a string or a function");n=r}if("string"==typeof n)return this.loadTemplate(n);if(this.isNodeOrElement(n))return n;throw new Error("iconRenderer should return back a string or a dom object")}var s=document.createElement("span"),a=this.iconNameClassMap[e];if(!a)throw new Error(e+" did not find class");return s.setAttribute("class","ag-icon ag-icon-"+a),s.setAttribute("unselectable","on"),s},e.addStylesToElement=function(e,t){var o=this;t&&Object.keys(t).forEach((function(r){var i=o.hyphenToCamelCase(r);i&&(e.style[i]=t[r])}))},e.isHorizontalScrollShowing=function(e){return e.clientWidth<e.scrollWidth},e.isVerticalScrollShowing=function(e){return e.clientHeight<e.scrollHeight},e.getMaxDivHeight=function(){if(!document.body)return-1;var e=1e6,t=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,o=this.loadTemplate("<div/>");for(document.body.appendChild(o);;){var r=2*e;if(o.style.height=r+"px",r>t||o.clientHeight!==r)break;e=r}return document.body.removeChild(o),e},e.getScrollbarWidth=function(){var e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var o=document.createElement("div");o.style.width="100%",e.appendChild(o);var r=o.offsetWidth;return e.parentNode&&e.parentNode.removeChild(e),t-r},e.hasOverflowScrolling=function(){var e=["webkit","moz","o","ms"],t=document.createElement("div"),o=!1;document.getElementsByTagName("body")[0].appendChild(t),t.setAttribute("style",e.map((function(e){return"-"+e+"-overflow-scrolling: touch"})).concat("overflow-scrolling: touch").join(";"));var r=window.getComputedStyle(t);if("touch"===r.overflowScrolling&&(o=!0),!o)for(var i=0,n=e;i<n.length;i++)if("touch"===r[n[i]+"OverflowScrolling"]){o=!0;break}return t.parentNode&&t.parentNode.removeChild(t),o},e.isKeyPressed=function(e,t){return(e.which||e.keyCode)===t},e.setVisible=function(e,t){this.addOrRemoveCssClass(e,"ag-hidden",!t)},e.setHidden=function(e,t){this.addOrRemoveCssClass(e,"ag-invisible",t)},e.setFixedWidth=function(e,t){t=this.formatSize(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t},e.setFixedHeight=function(e,t){t=this.formatSize(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t},e.isBrowserIE=function(){return void 0===this.isIE&&(this.isIE=!!document.documentMode),this.isIE},e.isBrowserEdge=function(){return void 0===this.isEdge&&(this.isEdge=!this.isBrowserIE()&&!!window.StyleMedia),this.isEdge},e.isBrowserSafari=function(){if(void 0===this.isSafari){var e=window;this.isSafari=Object.prototype.toString.call(e.HTMLElement).indexOf("Constructor")>0||!!(t=!e.safari||e.safari.pushNotification)&&"[object SafariRemoteNotification]"===t.toString()}var t;return this.isSafari},e.isBrowserChrome=function(){if(void 0===this.isChrome){var e=window;this.isChrome=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return this.isChrome},e.isBrowserFirefox=function(){if(void 0===this.isFirefox){var e=window;this.isFirefox=void 0!==e.InstallTrigger}return this.isFirefox},e.isUserAgentIPad=function(){return void 0===this.isIPad&&(this.isIPad=null!=navigator.userAgent.match(/iPad|iPhone/i)),this.isIPad},e.getTarget=function(e){var t=e;return t.target||t.srcElement},e.isElementChildOfClass=function(e,t,o){for(var r=0;e;){if(this.containsClass(e,t))return!0;if(e=e.parentElement,o&&++r>o)break}return!1},e.isElementInEventPath=function(e,o){return!(!o||!e)&&t._.getEventPath(o).indexOf(e)>=0},e.isFunction=function(e){return!!(e&&e.constructor&&e.call&&e.apply)},e.createEventPath=function(e){for(var o=[],r=t._.getTarget(e);r;)o.push(r),r=r.parentElement;return o},e.addAgGridEventPath=function(e){e.__agGridEventPath=this.getEventPath(e)},e.getEventPath=function(e){var t=e;return t.deepPath?t.deepPath():t.path?t.path:t.composedPath?t.composedPath():t.__agGridEventPath?t.__agGridEventPath:this.createEventPath(e)},e.forEachSnapshotFirst=function(e,t){e&&e.slice(0).forEach(t)},e.getBodyWidth=function(){return document.body?document.body.clientWidth:window.innerHeight?window.innerWidth:document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:-1},e.getBodyHeight=function(){return document.body?document.body.clientHeight:window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:-1},e.setCheckboxState=function(e,t){"boolean"==typeof t?(e.checked=t,e.indeterminate=!1):e.indeterminate=!0},e.traverseNodesWithKey=function(e,t){var o=[];!function e(r){r.forEach((function(r){if(r.group||r.hasChildren()){o.push(r.key);var i=o.join("|");t(r,i),e(r.childrenAfterGroup),o.pop()}}))}(e)},e.camelCaseToHyphen=function(e){return null==e?null:e.replace(/([A-Z])/g,(function(e){return"-"+e[0].toLowerCase()}))},e.hyphenToCamelCase=function(e){return null==e?null:e.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}))},e.cssStyleObjectToMarkup=function(e){var t=this;if(!e)return"";var o=[];return this.iterateObject(e,(function(e,r){var i=t.camelCaseToHyphen(e);o.push(i+": "+r+";")})),o.join(" ")},e.isNumeric=function(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)},e.escape=function(e){return null!=e&&e.replace?e.replace(p,(function(e){return l[e]})):e},e.normalizeWheel=function(e){var t=0,o=0,r=0,i=0;return"detail"in e&&(o=e.detail),"wheelDelta"in e&&(o=-e.wheelDelta/120),"wheelDeltaY"in e&&(o=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=o,o=0),r=10*t,i=10*o,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||i)&&e.deltaMode&&(1==e.deltaMode?(r*=40,i*=40):(r*=800,i*=800)),r&&!t&&(t=r<1?-1:1),i&&!o&&(o=i<1?-1:1),{spinX:t,spinY:o,pixelX:r,pixelY:i}},e.debounce=function(e,t,o){var r;return void 0===o&&(o=!1),function(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var s=this,a=o&&!r;window.clearTimeout(r),r=window.setTimeout((function(){r=null,o||e.apply(s,i)}),t),a&&e.apply(s,i)}},e.stopPropagationForAgGrid=function(e){e[s]=!0},e.isStopPropagationForAgGrid=function(e){return!0===e[s]},e.executeInAWhile=function(e){this.executeAfter(e,400)},e.executeNextVMTurn=function(e){this.executeAfter(e,0)},e.executeAfter=function(e,t){e.length>0&&window.setTimeout((function(){e.forEach((function(e){return e()}))}),t)},e.referenceCompare=function(e,t){return null==e&&null==t||(null!=e||!t)&&(!e||null!=t)&&e===t},e.get=function(t,o,r){if(null==t)return r;if(o.indexOf(".")>-1){var i=o.split(".");return null!=(n=t[i[0]])?e.get(n,i.slice(1,i.length).join("."),r):r}var n;return null!=(n=t[o])?n:r},e.addSafePassiveEventListener=function(t,o,r,i){-1!==e.passiveEvents.indexOf(o)&&(void 0===i?i={}:"boolean"==typeof i&&(i={capture:i}),i.passive=!0),t.addEventListener(o,r,i)},e.camelCaseToHumanText=function(e){return e&&null!=e?e.replace(/([A-Z])([A-Z])([a-z])|([a-z])([A-Z])/g,"$1$4 $2$3$5").replace("."," ").split(" ").map((function(e){return e.substring(0,1).toUpperCase()+(e.length>1?e.substring(1,e.length):"")})).join(" "):null},e.message=function(e){var t=document.createElement("div");t.innerHTML=e;var o=document.querySelector("#__ag__message");o||(o=this.loadTemplate('<div id="__ag__message" style="display: inline-block; position: absolute; top: 0px; left: 0px; color: white; background-color: black; z-index: 20; padding: 2px; border: 1px solid darkred; height: 200px; overflow-y: auto;"></div>'),document.body&&document.body.appendChild(o)),o.insertBefore(t,o.children[0])},e.sortRowNodesByOrder=function(e,t){if(e){for(var o=function(e,o){var r=t[e.id],i=t[o.id],n=void 0!==r,s=void 0!==i;return n&&s?r-i:n||s?n?1:-1:e.__objectId-o.__objectId},r=!1,i=0;i<e.length-1;i++)if(o(e[i],e[i+1])>0){r=!0;break}r&&e.sort(o)}},e.fuzzyCheckStrings=function(e,t,o){var r=this,i={},n=e.filter((function(e){return!t.some((function(t){return t===e}))}));return n.length>0&&n.forEach((function(e){return i[e]=r.fuzzySuggestions(e,t,o)})),i},e.fuzzySuggestions=function(e,o,r){var i=r.slice(0);return i.sort((function(o,r){var i=t._.string_similarity(o.toLowerCase(),e.toLowerCase()),n=t._.string_similarity(r.toLowerCase(),e.toLowerCase());return i>n?-1:i===n?0:1})),i},e.get_bigrams=function(e){var t,o,r,i=e.toLowerCase(),n=new Array(i.length-1);for(t=o=0,r=n.length;o<=r;t=o+=1)n[t]=i.slice(t,t+2);return n},e.isNumpadDelWithNumlockOnForEdgeOrIe=function(t){return!(!e.isBrowserEdge()&&!e.isBrowserIE())&&t.key===e.NUMPAD_DEL_NUMLOCK_ON_KEY&&t.charCode===e.NUMPAD_DEL_NUMLOCK_ON_CHARCODE},e.bindCellRendererToHtmlElement=function(e,t){e.then((function(e){var o=e.getGui();null!=o&&("object"==typeof o?t.appendChild(o):t.innerHTML=o)}))},e.PRINTABLE_CHARACTERS="qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890!\"£$%^&*()_+-=[];'#,./\\|<>?:@~{}",e.NUMPAD_DEL_NUMLOCK_ON_KEY="Del",e.NUMPAD_DEL_NUMLOCK_ON_CHARCODE=46,e.doOnceFlags={},e.compose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.reduce((function(e,t){return t(e)}),t)}},e.decToHex=function(e,t){for(var o="",r=0;r<t;r++)o+=String.fromCharCode(255&e),e>>>=8;return o},e.utf8_encode=function(e){for(var t="",o=0,r=(e=e.replace(/\r\n/g,"\n")).length;o<r;o++){var i=e.charCodeAt(o);i<128?t+=String.fromCharCode(i):i>127&&i<2048?(t+=String.fromCharCode(i>>6|192),t+=String.fromCharCode(63&i|128)):(t+=String.fromCharCode(i>>12|224),t+=String.fromCharCode(i>>6&63|128),t+=String.fromCharCode(63&i|128))}return t},e.iconNameClassMap={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnMovePin:"pin",columnMoveAdd:"plus",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"expanded",groupExpanded:"contracted",checkboxChecked:"checkbox-checked",checkboxUnchecked:"checkbox-unchecked",checkboxIndeterminate:"checkbox-indeterminate",checkboxCheckedReadOnly:"checkbox-checked-readonly",checkboxUncheckedReadOnly:"checkbox-unchecked-readonly",checkboxIndeterminateReadOnly:"checkbox-indeterminate-readonly",groupLoading:"loading",menu:"menu",filter:"filter",columns:"columns",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"column-drag",rowDrag:"row-drag",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"},e.passiveEvents=["touchstart","touchend","touchmove","touchcancel"],e.string_similarity=function(t,o){if(t.length>0&&o.length>0){var r,i=e.get_bigrams(t),n=e.get_bigrams(o),s=i.length+n.length,a=0,l=void 0;for(l=0,r=i.length;l<r;l++){var p,u=i[l],c=void 0;for(c=0,p=n.length;c<p;c++)u===n[c]&&a++}if(a>0)return 2*a/s}return 0},e}();t.Utils=u;var c,d=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=1),this.nextValue=e,this.step=t}return e.prototype.next=function(){var e=this.nextValue;return this.nextValue+=this.step,e},e.prototype.peek=function(){return this.nextValue},e.prototype.skip=function(e){this.nextValue+=e},e}();t.NumberSequence=d,t._=u,function(e){e[e.IN_PROGRESS=0]="IN_PROGRESS",e[e.RESOLVED=1]="RESOLVED"}(c=t.PromiseStatus||(t.PromiseStatus={}));var h=function(){function e(e){this.status=c.IN_PROGRESS,this.resolution=null,this.listOfWaiters=[],e(this.onDone.bind(this),this.onReject.bind(this))}return e.all=function(t){return new e((function(e){var o=[],r=t.length;t.forEach((function(t,i){t.then((function(t){r--,o[i]=t,0==r&&e(o)})),o.push(null)}))}))},e.resolve=function(t){return new e((function(e){return e(t)}))},e.external=function(){var t;return{promise:new e((function(e){t=e})),resolve:function(e){t(e)}}},e.prototype.then=function(e){this.status===c.IN_PROGRESS?this.listOfWaiters.push(e):e(this.resolution)},e.prototype.firstOneOnly=function(e){this.status===c.IN_PROGRESS?0===this.listOfWaiters.length&&this.listOfWaiters.push(e):e(this.resolution)},e.prototype.map=function(t){var o=this;return new e((function(e){o.then((function(o){e(t(o))}))}))},e.prototype.resolveNow=function(e,t){return this.status==c.IN_PROGRESS?e:t(this.resolution)},e.prototype.onDone=function(e){this.status=c.RESOLVED,this.resolution=e,this.listOfWaiters.forEach((function(t){return t(e)}))},e.prototype.onReject=function(e){console.warn("TBI")},e}();t.Promise=h},83684:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(96652),l=o(46410),p=o(4855),u=o(47008),c=o(47008),d=o(85397),h=o(75449),f=o(43389),g=o(2102),m=function(e){function t(t,o){var r=e.call(this,t,o)||this;return r.props=t,r.state=o,r.destroyed=!1,r.changeDetectionService=new f.ChangeDetectionService,r.api=null,r.portals=[],r.hasPendingPortalUpdate=!1,r}return i(t,e),t.prototype.render=function(){var e=this;return a.createElement("div",{style:this.createStyleForDiv(),ref:function(t){e.eGridDiv=t}},this.portals)},t.prototype.createStyleForDiv=function(){var e={height:"100%"},t=this.props.containerStyle;return t&&Object.keys(t).forEach((function(o){e[o]=t[o]})),e},t.prototype.componentDidMount=function(){var e={seedBeanInstances:{agGridReact:this}},t=this.props.gridOptions||{};d.AgGridColumn.hasChildColumns(this.props)&&(t.columnDefs=d.AgGridColumn.mapChildColumnDefs(this.props)),this.gridOptions=u.ComponentUtil.copyAttributesToGridOptions(t,this.props),new u.Grid(this.eGridDiv,this.gridOptions,e),this.api=this.gridOptions.api,this.columnApi=this.gridOptions.columnApi},t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.waitForInstance=function(e,o,r){var i=this;if(void 0===r&&(r=0),e.getFrameworkComponentInstance()||e.isStatelesComponent())o(null);else{if(r>=t.MAX_COMPONENT_CREATION_TIME)return void console.error("ag-Grid: React Component '"+e.getReactComponentName()+"' not created within "+t.MAX_COMPONENT_CREATION_TIME+"ms");window.setTimeout((function(){return i.waitForInstance(e,o,r+5)}),5)}},t.prototype.mountReactPortal=function(e,t,o){this.portals=this.portals.concat([e]),this.batchUpdate(this.waitForInstance(t,o))},t.prototype.batchUpdate=function(e){var t=this;if(this.hasPendingPortalUpdate)return e&&e();setTimeout((function(){t.api&&t.forceUpdate((function(){e&&e(),t.hasPendingPortalUpdate=!1}))})),this.hasPendingPortalUpdate=!0},t.prototype.destroyPortal=function(e){this.portals=this.portals.filter((function(t){return t!==e})),this.batchUpdate()},t.prototype.getStrategyTypeForProp=function(e){if("rowData"===e){if(this.props.rowDataChangeDetectionStrategy)return this.props.rowDataChangeDetectionStrategy;if(this.props.deltaRowDataMode)return f.ChangeDetectionStrategyType.IdentityCheck}return f.ChangeDetectionStrategyType.DeepValueCheck},t.prototype.componentWillReceiveProps=function(e){var t=this,o=!!e.debug,r={};Object.keys(e).forEach((function(i){-1!==u.ComponentUtil.ALL_PROPERTIES.indexOf(i)&&(t.changeDetectionService.getStrategy(t.getStrategyTypeForProp(i)).areEqual(t.props[i],e[i])||(o&&console.log("agGridReact: ["+i+"] property changed"),r[i]={previousValue:t.props[i],currentValue:e[i]}))})),u.ComponentUtil.getEventCallbacks().forEach((function(i){t.props[i]!==e[i]&&(o&&console.log("agGridReact: ["+i+"] event callback changed"),r[i]={previousValue:t.props[i],currentValue:e[i]})})),u.ComponentUtil.processOnChange(r,this.gridOptions,this.api,this.columnApi)},t.prototype.componentWillUnmount=function(){this.api&&(this.api.destroy(),this.api=null)},t.MAX_COMPONENT_CREATION_TIME=1e3,t}(a.Component);function y(e,t){e.forEach((function(e){m[e]=t}))}t.AgGridReact=m,m.propTypes={gridOptions:p.object},y(u.ComponentUtil.getEventCallbacks(),p.func),y(u.ComponentUtil.BOOLEAN_PROPERTIES,p.bool),y(u.ComponentUtil.STRING_PROPERTIES,p.string),y(u.ComponentUtil.OBJECT_PROPERTIES,p.object),y(u.ComponentUtil.ARRAY_PROPERTIES,p.array),y(u.ComponentUtil.NUMBER_PROPERTIES,p.number),y(u.ComponentUtil.FUNCTION_PROPERTIES,p.func);var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.createWrapper=function(e){return this.useLegacyReact()?new g.LegacyReactComponent(e,this.agGridReact):new h.ReactComponent(e,this.agGridReact)},t.prototype.useLegacyReact=function(){return"function"!=typeof l.unstable_renderSubtreeIntoContainer||this.agGridReact&&this.agGridReact.gridOptions&&!this.agGridReact.gridOptions.reactNext},n([c.Autowired("agGridReact"),s("design:type",m)],t.prototype,"agGridReact",void 0),n([c.Bean("frameworkComponentWrapper")],t)}(c.BaseComponentWrapper);u.Grid.setFrameworkBeans([v])},84210:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},n=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(44329),a=o(37132),l=o(72493),p=o(83423),u=function(){function e(e,t){this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0,this.maxConcurrentRequests=e,t&&t>0&&(this.checkBlockToLoadDebounce=p._.debounce(this.performCheckBlocksToLoad.bind(this),t))}return e.prototype.setBeans=function(e){this.logger=e.create("RowNodeBlockLoader")},e.prototype.addBlock=function(e){this.blocks.push(e)},e.prototype.removeBlock=function(e){p._.removeFromArray(this.blocks,e)},e.prototype.destroy=function(){this.active=!1},e.prototype.loadComplete=function(){this.activeBlockLoadsCount--},e.prototype.checkBlockToLoad=function(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()},e.prototype.performCheckBlocksToLoad=function(){if(this.active)if(this.printCacheStatus(),this.activeBlockLoadsCount>=this.maxConcurrentRequests)this.logger.log("checkBlockToLoad: max loads exceeded");else{var e=null;this.blocks.forEach((function(t){t.getState()===s.RowNodeBlock.STATE_DIRTY&&(e=t)})),e?(e.load(),this.activeBlockLoadsCount++,this.logger.log("checkBlockToLoad: loading page "+e.getBlockNumber()),this.printCacheStatus()):this.logger.log("checkBlockToLoad: no pages to load")}},e.prototype.getBlockState=function(){var e={};return this.blocks.forEach((function(t){var o=t.getNodeIdPrefix(),r={blockNumber:t.getBlockNumber(),startRow:t.getStartRow(),endRow:t.getEndRow(),pageStatus:t.getState()};p._.exists(o)?e[o+t.getBlockNumber()]=r:e[t.getBlockNumber()]=r})),e},e.prototype.printCacheStatus=function(){this.logger.isLogging()&&this.logger.log("printCacheStatus: activePageLoadsCount = "+this.activeBlockLoadsCount+", blocks = "+JSON.stringify(this.getBlockState()))},r([n(0,l.Qualifier("loggerFactory")),i("design:type",Function),i("design:paramtypes",[a.LoggerFactory]),i("design:returntype",void 0)],e.prototype,"setBeans",null),e}();t.RowNodeBlockLoader=u},84537:function(e,t){!function(e){var t=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],o=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],r="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",i={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},n="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",s={5:n,"5module":n+" export import",6:n+" const class extends export import super"},a=/^in(stanceof)?$/,l=new RegExp("["+r+"]"),p=new RegExp("["+r+"·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");function u(e,t){for(var o=65536,r=0;r<t.length;r+=2){if((o+=t[r])>e)return!1;if((o+=t[r+1])>=e)return!0}return!1}function c(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&l.test(String.fromCharCode(e)):!1!==t&&u(e,o)))}function d(e,r){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&p.test(String.fromCharCode(e)):!1!==r&&(u(e,o)||u(e,t)))))}var h=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function f(e,t){return new h(e,{beforeExpr:!0,binop:t})}var g={beforeExpr:!0},m={startsExpr:!0},y={};function v(e,t){return void 0===t&&(t={}),t.keyword=e,y[e]=new h(e,t)}var C={num:new h("num",m),regexp:new h("regexp",m),string:new h("string",m),name:new h("name",m),privateId:new h("privateId",m),eof:new h("eof"),bracketL:new h("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new h("]"),braceL:new h("{",{beforeExpr:!0,startsExpr:!0}),braceR:new h("}"),parenL:new h("(",{beforeExpr:!0,startsExpr:!0}),parenR:new h(")"),comma:new h(",",g),semi:new h(";",g),colon:new h(":",g),dot:new h("."),question:new h("?",g),questionDot:new h("?."),arrow:new h("=>",g),template:new h("template"),invalidTemplate:new h("invalidTemplate"),ellipsis:new h("...",g),backQuote:new h("`",m),dollarBraceL:new h("${",{beforeExpr:!0,startsExpr:!0}),eq:new h("=",{beforeExpr:!0,isAssign:!0}),assign:new h("_=",{beforeExpr:!0,isAssign:!0}),incDec:new h("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new h("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:f("||",1),logicalAND:f("&&",2),bitwiseOR:f("|",3),bitwiseXOR:f("^",4),bitwiseAND:f("&",5),equality:f("==/!=/===/!==",6),relational:f("</>/<=/>=",7),bitShift:f("<</>>/>>>",8),plusMin:new h("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:f("%",10),star:f("*",10),slash:f("/",10),starstar:new h("**",{beforeExpr:!0}),coalesce:f("??",1),_break:v("break"),_case:v("case",g),_catch:v("catch"),_continue:v("continue"),_debugger:v("debugger"),_default:v("default",g),_do:v("do",{isLoop:!0,beforeExpr:!0}),_else:v("else",g),_finally:v("finally"),_for:v("for",{isLoop:!0}),_function:v("function",m),_if:v("if"),_return:v("return",g),_switch:v("switch"),_throw:v("throw",g),_try:v("try"),_var:v("var"),_const:v("const"),_while:v("while",{isLoop:!0}),_with:v("with"),_new:v("new",{beforeExpr:!0,startsExpr:!0}),_this:v("this",m),_super:v("super",m),_class:v("class",m),_extends:v("extends",g),_export:v("export"),_import:v("import",m),_null:v("null",m),_true:v("true",m),_false:v("false",m),_in:v("in",{beforeExpr:!0,binop:7}),_instanceof:v("instanceof",{beforeExpr:!0,binop:7}),_typeof:v("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:v("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:v("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},w=/\r\n?|\n|\u2028|\u2029/,E=new RegExp(w.source,"g");function _(e){return 10===e||13===e||8232===e||8233===e}function b(e,t,o){void 0===o&&(o=e.length);for(var r=t;r<o;r++){var i=e.charCodeAt(r);if(_(i))return r<o-1&&13===i&&10===e.charCodeAt(r+1)?r+2:r+1}return-1}var R=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,S=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,O=Object.prototype,T=O.hasOwnProperty,A=O.toString,P=Object.hasOwn||function(e,t){return T.call(e,t)},I=Array.isArray||function(e){return"[object Array]"===A.call(e)},x=Object.create(null);function D(e){return x[e]||(x[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function N(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}var F=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,M=function(e,t){this.line=e,this.column=t};M.prototype.offset=function(e){return new M(this.line,this.column+e)};var k=function(e,t,o){this.start=t,this.end=o,null!==e.sourceFile&&(this.source=e.sourceFile)};function L(e,t){for(var o=1,r=0;;){var i=b(e,r,t);if(i<0)return new M(o,t-r);++o,r=i}}var G={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},V=!1;function j(e){var t={};for(var o in G)t[o]=e&&P(e,o)?e[o]:G[o];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!V&&"object"==typeof console&&console.warn&&(V=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),e&&null!=e.allowHashBang||(t.allowHashBang=t.ecmaVersion>=14),I(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return I(t.onComment)&&(t.onComment=function(e,t){return function(o,r,i,n,s,a){var l={type:o?"Block":"Line",value:r,start:i,end:n};e.locations&&(l.loc=new k(this,s,a)),e.ranges&&(l.range=[i,n]),t.push(l)}}(t,t.onComment)),t}var W=256,H=259;function B(e,t){return 2|(e?4:0)|(t?8:0)}var U=function(e,t,o){this.options=e=j(e),this.sourceFile=e.sourceFile,this.keywords=D(s[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var r="";!0!==e.allowReserved&&(r=i[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(r+=" await")),this.reservedWords=D(r);var n=(r?r+" ":"")+i.strict;this.reservedWordsStrict=D(n),this.reservedWordsStrictBind=D(n+" "+i.strictBind),this.input=String(t),this.containsEsc=!1,o?(this.pos=o,this.lineStart=this.input.lastIndexOf("\n",o-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(w).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=C.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},z={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};U.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},z.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},z.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},z.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},z.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(768&t)return!1;if(2&t)return(4&t)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},z.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},z.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},z.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},z.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(768&t||2&t&&!(16&t))return!0}return!1},z.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&W)>0},U.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var o=this,r=0;r<e.length;r++)o=e[r](o);return o},U.parse=function(e,t){return new this(t,e).parse()},U.parseExpressionAt=function(e,t,o){var r=new this(o,e,t);return r.nextToken(),r.parseExpression()},U.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(U.prototype,z);var Y=U.prototype,q=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;Y.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){S.lastIndex=e,e+=S.exec(this.input)[0].length;var t=q.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2])){S.lastIndex=e+t[0].length;var o=S.exec(this.input),r=o.index+o[0].length,i=this.input.charAt(r);return";"===i||"}"===i||w.test(o[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||"!"===i&&"="===this.input.charAt(r+1))}e+=t[0].length,S.lastIndex=e,e+=S.exec(this.input)[0].length,";"===this.input[e]&&e++}},Y.eat=function(e){return this.type===e&&(this.next(),!0)},Y.isContextual=function(e){return this.type===C.name&&this.value===e&&!this.containsEsc},Y.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},Y.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},Y.canInsertSemicolon=function(){return this.type===C.eof||this.type===C.braceR||w.test(this.input.slice(this.lastTokEnd,this.start))},Y.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Y.semicolon=function(){this.eat(C.semi)||this.insertSemicolon()||this.unexpected()},Y.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},Y.expect=function(e){this.eat(e)||this.unexpected()},Y.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var K=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Y.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var o=t?e.parenthesizedAssign:e.parenthesizedBind;o>-1&&this.raiseRecoverable(o,t?"Assigning to rvalue":"Parenthesized pattern")}},Y.checkExpressionErrors=function(e,t){if(!e)return!1;var o=e.shorthandAssign,r=e.doubleProto;if(!t)return o>=0||r>=0;o>=0&&this.raise(o,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},Y.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},Y.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var $=U.prototype;$.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==C.eof;){var o=this.parseStatement(null,!0,t);e.body.push(o)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var n=i[r];this.raiseRecoverable(this.undefinedExports[n].start,"Export '"+n+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var Z={kind:"loop"},J={kind:"switch"};$.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;S.lastIndex=this.pos;var t=S.exec(this.input),o=this.pos+t[0].length,r=this.input.charCodeAt(o);if(91===r||92===r)return!0;if(e)return!1;if(123===r||r>55295&&r<56320)return!0;if(c(r,!0)){for(var i=o+1;d(r=this.input.charCodeAt(i),!0);)++i;if(92===r||r>55295&&r<56320)return!0;var n=this.input.slice(o,i);if(!a.test(n))return!0}return!1},$.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;S.lastIndex=this.pos;var e,t=S.exec(this.input),o=this.pos+t[0].length;return!(w.test(this.input.slice(this.pos,o))||"function"!==this.input.slice(o,o+8)||o+8!==this.input.length&&(d(e=this.input.charCodeAt(o+8))||e>55295&&e<56320))},$.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;S.lastIndex=this.pos;var o=S.exec(this.input),r=this.pos+o[0].length;if(w.test(this.input.slice(this.pos,r)))return!1;if(e){var i,n=r+5;if("using"!==this.input.slice(r,n)||n===this.input.length||d(i=this.input.charCodeAt(n))||i>55295&&i<56320)return!1;S.lastIndex=n;var s=S.exec(this.input);if(s&&w.test(this.input.slice(n,n+s[0].length)))return!1}if(t){var a,l=r+2;if(!("of"!==this.input.slice(r,l)||l!==this.input.length&&(d(a=this.input.charCodeAt(l))||a>55295&&a<56320)))return!1}var p=this.input.charCodeAt(r);return c(p,!0)||92===p},$.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},$.isUsing=function(e){return this.isUsingKeyword(!1,e)},$.parseStatement=function(e,t,o){var r,i=this.type,n=this.startNode();switch(this.isLet(e)&&(i=C._var,r="let"),i){case C._break:case C._continue:return this.parseBreakContinueStatement(n,i.keyword);case C._debugger:return this.parseDebuggerStatement(n);case C._do:return this.parseDoStatement(n);case C._for:return this.parseForStatement(n);case C._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(n,!1,!e);case C._class:return e&&this.unexpected(),this.parseClass(n,!0);case C._if:return this.parseIfStatement(n);case C._return:return this.parseReturnStatement(n);case C._switch:return this.parseSwitchStatement(n);case C._throw:return this.parseThrowStatement(n);case C._try:return this.parseTryStatement(n);case C._const:case C._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(n,r);case C._while:return this.parseWhileStatement(n);case C._with:return this.parseWithStatement(n);case C.braceL:return this.parseBlock(!0,n);case C.semi:return this.parseEmptyStatement(n);case C._export:case C._import:if(this.options.ecmaVersion>10&&i===C._import){S.lastIndex=this.pos;var s=S.exec(this.input),a=this.pos+s[0].length,l=this.input.charCodeAt(a);if(40===l||46===l)return this.parseExpressionStatement(n,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===C._import?this.parseImport(n):this.parseExport(n,o);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(n,!0,!e);var p=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(p)return t&&"script"===this.options.sourceType&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),"await using"===p&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(n,!1,p),this.semicolon(),this.finishNode(n,"VariableDeclaration");var u=this.value,c=this.parseExpression();return i===C.name&&"Identifier"===c.type&&this.eat(C.colon)?this.parseLabeledStatement(n,u,c,e):this.parseExpressionStatement(n,c)}},$.parseBreakContinueStatement=function(e,t){var o="break"===t;this.next(),this.eat(C.semi)||this.insertSemicolon()?e.label=null:this.type!==C.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(o||"loop"===i.kind))break;if(e.label&&o)break}}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,o?"BreakStatement":"ContinueStatement")},$.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},$.parseDoStatement=function(e){return this.next(),this.labels.push(Z),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(C._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(C.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},$.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Z),this.enterScope(0),this.expect(C.parenL),this.type===C.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var o=this.isLet();if(this.type===C._var||this.type===C._const||o){var r=this.startNode(),i=o?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(e,r,t)}var n=this.isContextual("let"),s=!1,a=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(a){var l=this.startNode();return this.next(),"await using"===a&&this.next(),this.parseVar(l,!0,a),this.finishNode(l,"VariableDeclaration"),this.parseForAfterInit(e,l,t)}var p=this.containsEsc,u=new K,c=this.start,d=t>-1?this.parseExprSubscripts(u,"await"):this.parseExpression(!0,u);return this.type===C._in||(s=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===C._in&&this.unexpected(t),e.await=!0):s&&this.options.ecmaVersion>=8&&(d.start!==c||p||"Identifier"!==d.type||"async"!==d.name?this.options.ecmaVersion>=9&&(e.await=!1):this.unexpected()),n&&s&&this.raise(d.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(d,!1,u),this.checkLValPattern(d),this.parseForIn(e,d)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,d))},$.parseForAfterInit=function(e,t,o){return(this.type===C._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===t.declarations.length?(this.options.ecmaVersion>=9&&(this.type===C._in?o>-1&&this.unexpected(o):e.await=o>-1),this.parseForIn(e,t)):(o>-1&&this.unexpected(o),this.parseFor(e,t))},$.parseFunctionStatement=function(e,t,o){return this.next(),this.parseFunction(e,X|(o?0:ee),!1,t)},$.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(C._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},$.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(C.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},$.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(C.braceL),this.labels.push(J),this.enterScope(0);for(var o=!1;this.type!==C.braceR;)if(this.type===C._case||this.type===C._default){var r=this.type===C._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(o&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),o=!0,t.test=null),this.expect(C.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},$.parseThrowStatement=function(e){return this.next(),w.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Q=[];$.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.enterScope(t?32:0),this.checkLValPattern(e,t?4:2),this.expect(C.parenR),e},$.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===C._catch){var t=this.startNode();this.next(),this.eat(C.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(C._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},$.parseVarStatement=function(e,t,o){return this.next(),this.parseVar(e,!1,t,o),this.semicolon(),this.finishNode(e,"VariableDeclaration")},$.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Z),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},$.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},$.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},$.parseLabeledStatement=function(e,t,o,r){for(var i=0,n=this.labels;i<n.length;i+=1)n[i].name===t&&this.raise(o.start,"Label '"+t+"' is already declared");for(var s=this.type.isLoop?"loop":this.type===C._switch?"switch":null,a=this.labels.length-1;a>=0;a--){var l=this.labels[a];if(l.statementStart!==e.start)break;l.statementStart=this.start,l.kind=s}return this.labels.push({name:t,kind:s,statementStart:this.start}),e.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),e.label=o,this.finishNode(e,"LabeledStatement")},$.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},$.parseBlock=function(e,t,o){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(C.braceL),e&&this.enterScope(0);this.type!==C.braceR;){var r=this.parseStatement(null);t.body.push(r)}return o&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},$.parseFor=function(e,t){return e.init=t,this.expect(C.semi),e.test=this.type===C.semi?null:this.parseExpression(),this.expect(C.semi),e.update=this.type===C.parenR?null:this.parseExpression(),this.expect(C.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},$.parseForIn=function(e,t){var o=this.type===C._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!o||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(o?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=o?this.parseExpression():this.parseMaybeAssign(),this.expect(C.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,o?"ForInStatement":"ForOfStatement")},$.parseVar=function(e,t,o,r){for(e.declarations=[],e.kind=o;;){var i=this.startNode();if(this.parseVarId(i,o),this.eat(C.eq)?i.init=this.parseMaybeAssign(t):r||"const"!==o||this.type===C._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r||"using"!==o&&"await using"!==o||!(this.options.ecmaVersion>=17)||this.type===C._in||this.isContextual("of")?r||"Identifier"===i.id.type||t&&(this.type===C._in||this.isContextual("of"))?i.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+o+" declaration"):this.unexpected(),e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(C.comma))break}return e},$.parseVarId=function(e,t){e.id="using"===t||"await using"===t?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)};var X=1,ee=2;function te(e,t){var o=t.key.name,r=e[o],i="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(i=(t.static?"s":"i")+t.kind),"iget"===r&&"iset"===i||"iset"===r&&"iget"===i||"sget"===r&&"sset"===i||"sset"===r&&"sget"===i?(e[o]="true",!1):!!r||(e[o]=i,!1)}function oe(e,t){var o=e.computed,r=e.key;return!o&&("Identifier"===r.type&&r.name===t||"Literal"===r.type&&r.value===t)}$.parseFunction=function(e,t,o,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===C.star&&t&ee&&this.unexpected(),e.generator=this.eat(C.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&X&&(e.id=4&t&&this.type!==C.name?null:this.parseIdent(),!e.id||t&ee||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var n=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(B(e.async,e.generator)),t&X||(e.id=this.type===C.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,o,!1,i),this.yieldPos=n,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(e,t&X?"FunctionDeclaration":"FunctionExpression")},$.parseFunctionParams=function(e){this.expect(C.parenL),e.params=this.parseBindingList(C.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},$.parseClass=function(e,t){this.next();var o=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),n=!1;for(i.body=[],this.expect(C.braceL);this.type!==C.braceR;){var s=this.parseClassElement(null!==e.superClass);s&&(i.body.push(s),"MethodDefinition"===s.type&&"constructor"===s.kind?(n&&this.raiseRecoverable(s.start,"Duplicate constructor in the same class"),n=!0):s.key&&"PrivateIdentifier"===s.key.type&&te(r,s)&&this.raiseRecoverable(s.key.start,"Identifier '#"+s.key.name+"' has already been declared"))}return this.strict=o,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},$.parseClassElement=function(e){if(this.eat(C.semi))return null;var t=this.options.ecmaVersion,o=this.startNode(),r="",i=!1,n=!1,s="method",a=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(C.braceL))return this.parseClassStaticBlock(o),o;this.isClassElementNameStart()||this.type===C.star?a=!0:r="static"}if(o.static=a,!r&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==C.star||this.canInsertSemicolon()?r="async":n=!0),!r&&(t>=9||!n)&&this.eat(C.star)&&(i=!0),!r&&!n&&!i){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?s=l:r=l)}if(r?(o.computed=!1,o.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),o.key.name=r,this.finishNode(o.key,"Identifier")):this.parseClassElementName(o),t<13||this.type===C.parenL||"method"!==s||i||n){var p=!o.static&&oe(o,"constructor"),u=p&&e;p&&"method"!==s&&this.raise(o.key.start,"Constructor can't have get/set modifier"),o.kind=p?"constructor":s,this.parseClassMethod(o,i,n,u)}else this.parseClassField(o);return o},$.isClassElementNameStart=function(){return this.type===C.name||this.type===C.privateId||this.type===C.num||this.type===C.string||this.type===C.bracketL||this.type.keyword},$.parseClassElementName=function(e){this.type===C.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},$.parseClassMethod=function(e,t,o,r){var i=e.key;"constructor"===e.kind?(t&&this.raise(i.start,"Constructor can't be a generator"),o&&this.raise(i.start,"Constructor can't be an async method")):e.static&&oe(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var n=e.value=this.parseMethod(t,o,r);return"get"===e.kind&&0!==n.params.length&&this.raiseRecoverable(n.start,"getter should have no params"),"set"===e.kind&&1!==n.params.length&&this.raiseRecoverable(n.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===n.params[0].type&&this.raiseRecoverable(n.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},$.parseClassField=function(e){return oe(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&oe(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(C.eq)?(this.enterScope(576),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")},$.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==C.braceR;){var o=this.parseStatement(null);e.body.push(o)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},$.parseClassId=function(e,t){this.type===C.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},$.parseClassSuper=function(e){e.superClass=this.eat(C._extends)?this.parseExprSubscripts(null,!1):null},$.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},$.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,o=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=0===r?null:this.privateNameStack[r-1],n=0;n<o.length;++n){var s=o[n];P(t,s.name)||(i?i.used.push(s):this.raiseRecoverable(s.start,"Private field '#"+s.name+"' must be declared in an enclosing class"))}},$.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==C.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},$.parseExport=function(e,t){if(this.next(),this.eat(C.star))return this.parseExportAllDeclaration(e,t);if(this.eat(C._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==C.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var o=0,r=e.specifiers;o<r.length;o+=1){var i=r[o];this.checkUnreserved(i.local),this.checkLocalExport(i.local),"Literal"===i.local.type&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},$.parseExportDeclaration=function(e){return this.parseStatement(null)},$.parseExportDefaultDeclaration=function(){var e;if(this.type===C._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,4|X,!1,e)}if(this.type===C._class){var o=this.startNode();return this.parseClass(o,"nullableID")}var r=this.parseMaybeAssign();return this.semicolon(),r},$.checkExport=function(e,t,o){e&&("string"!=typeof t&&(t="Identifier"===t.type?t.name:t.value),P(e,t)&&this.raiseRecoverable(o,"Duplicate export '"+t+"'"),e[t]=!0)},$.checkPatternExport=function(e,t){var o=t.type;if("Identifier"===o)this.checkExport(e,t,t.start);else if("ObjectPattern"===o)for(var r=0,i=t.properties;r<i.length;r+=1){var n=i[r];this.checkPatternExport(e,n)}else if("ArrayPattern"===o)for(var s=0,a=t.elements;s<a.length;s+=1){var l=a[s];l&&this.checkPatternExport(e,l)}else"Property"===o?this.checkPatternExport(e,t.value):"AssignmentPattern"===o?this.checkPatternExport(e,t.left):"RestElement"===o&&this.checkPatternExport(e,t.argument)},$.checkVariableExport=function(e,t){if(e)for(var o=0,r=t;o<r.length;o+=1){var i=r[o];this.checkPatternExport(e,i.id)}},$.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},$.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")},$.parseExportSpecifiers=function(e){var t=[],o=!0;for(this.expect(C.braceL);!this.eat(C.braceR);){if(o)o=!1;else if(this.expect(C.comma),this.afterTrailingComma(C.braceR))break;t.push(this.parseExportSpecifier(e))}return t},$.parseImport=function(e){return this.next(),this.type===C.string?(e.specifiers=Q,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===C.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},$.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportSpecifier")},$.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportDefaultSpecifier")},$.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportNamespaceSpecifier")},$.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===C.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(C.comma)))return e;if(this.type===C.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(C.braceL);!this.eat(C.braceR);){if(t)t=!1;else if(this.expect(C.comma),this.afterTrailingComma(C.braceR))break;e.push(this.parseImportSpecifier())}return e},$.parseWithClause=function(){var e=[];if(!this.eat(C._with))return e;this.expect(C.braceL);for(var t={},o=!0;!this.eat(C.braceR);){if(o)o=!1;else if(this.expect(C.comma),this.afterTrailingComma(C.braceR))break;var r=this.parseImportAttribute(),i="Identifier"===r.key.type?r.key.name:r.key.value;P(t,i)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,e.push(r)}return e},$.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===C.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(C.colon),this.type!==C.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")},$.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===C.string){var e=this.parseLiteral(this.value);return F.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},$.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},$.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var re=U.prototype;re.toAssignable=function(e,t,o){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",o&&this.checkPatternErrors(o,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var n=i[r];this.toAssignable(n,t),"RestElement"!==n.type||"ArrayPattern"!==n.argument.type&&"ObjectPattern"!==n.argument.type||this.raise(n.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",o&&this.checkPatternErrors(o,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,o);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else o&&this.checkPatternErrors(o,!0);return e},re.toAssignableList=function(e,t){for(var o=e.length,r=0;r<o;r++){var i=e[r];i&&this.toAssignable(i,t)}if(o){var n=e[o-1];6===this.options.ecmaVersion&&t&&n&&"RestElement"===n.type&&"Identifier"!==n.argument.type&&this.unexpected(n.argument.start)}return e},re.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},re.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==C.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},re.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case C.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(C.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case C.braceL:return this.parseObj(!0)}return this.parseIdent()},re.parseBindingList=function(e,t,o,r){for(var i=[],n=!0;!this.eat(e);)if(n?n=!1:this.expect(C.comma),t&&this.type===C.comma)i.push(null);else{if(o&&this.afterTrailingComma(e))break;if(this.type===C.ellipsis){var s=this.parseRestBinding();this.parseBindingListItem(s),i.push(s),this.type===C.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}i.push(this.parseAssignableListItem(r))}return i},re.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},re.parseBindingListItem=function(e){return e},re.parseMaybeDefault=function(e,t,o){if(o=o||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(C.eq))return o;var r=this.startNodeAt(e,t);return r.left=o,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},re.checkLValSimple=function(e,t,o){void 0===t&&(t=0);var r=0!==t;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(2===t&&"let"===e.name&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),o&&(P(o,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),o[e.name]=!0),5!==t&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,o);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}},re.checkLValPattern=function(e,t,o){switch(void 0===t&&(t=0),e.type){case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var n=i[r];this.checkLValInnerPattern(n,t,o)}break;case"ArrayPattern":for(var s=0,a=e.elements;s<a.length;s+=1){var l=a[s];l&&this.checkLValInnerPattern(l,t,o)}break;default:this.checkLValSimple(e,t,o)}},re.checkLValInnerPattern=function(e,t,o){switch(void 0===t&&(t=0),e.type){case"Property":this.checkLValInnerPattern(e.value,t,o);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,o);break;case"RestElement":this.checkLValPattern(e.argument,t,o);break;default:this.checkLValPattern(e,t,o)}};var ie=function(e,t,o,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!o,this.override=r,this.generator=!!i},ne={b_stat:new ie("{",!1),b_expr:new ie("{",!0),b_tmpl:new ie("${",!1),p_stat:new ie("(",!1),p_expr:new ie("(",!0),q_tmpl:new ie("`",!0,!0,(function(e){return e.tryReadTemplateToken()})),f_stat:new ie("function",!1),f_expr:new ie("function",!0),f_expr_gen:new ie("function",!0,!1,null,!0),f_gen:new ie("function",!1,!1,null,!0)},se=U.prototype;se.initialContext=function(){return[ne.b_stat]},se.curContext=function(){return this.context[this.context.length-1]},se.braceIsBlock=function(e){var t=this.curContext();return t===ne.f_expr||t===ne.f_stat||(e!==C.colon||t!==ne.b_stat&&t!==ne.b_expr?e===C._return||e===C.name&&this.exprAllowed?w.test(this.input.slice(this.lastTokEnd,this.start)):e===C._else||e===C.semi||e===C.eof||e===C.parenR||e===C.arrow||(e===C.braceL?t===ne.b_stat:e!==C._var&&e!==C._const&&e!==C.name&&!this.exprAllowed):!t.isExpr)},se.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},se.updateContext=function(e){var t,o=this.type;o.keyword&&e===C.dot?this.exprAllowed=!1:(t=o.updateContext)?t.call(this,e):this.exprAllowed=o.beforeExpr},se.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},C.parenR.updateContext=C.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===ne.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},C.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?ne.b_stat:ne.b_expr),this.exprAllowed=!0},C.dollarBraceL.updateContext=function(){this.context.push(ne.b_tmpl),this.exprAllowed=!0},C.parenL.updateContext=function(e){var t=e===C._if||e===C._for||e===C._with||e===C._while;this.context.push(t?ne.p_stat:ne.p_expr),this.exprAllowed=!0},C.incDec.updateContext=function(){},C._function.updateContext=C._class.updateContext=function(e){!e.beforeExpr||e===C._else||e===C.semi&&this.curContext()!==ne.p_stat||e===C._return&&w.test(this.input.slice(this.lastTokEnd,this.start))||(e===C.colon||e===C.braceL)&&this.curContext()===ne.b_stat?this.context.push(ne.f_stat):this.context.push(ne.f_expr),this.exprAllowed=!1},C.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},C.backQuote.updateContext=function(){this.curContext()===ne.q_tmpl?this.context.pop():this.context.push(ne.q_tmpl),this.exprAllowed=!1},C.star.updateContext=function(e){if(e===C._function){var t=this.context.length-1;this.context[t]===ne.f_expr?this.context[t]=ne.f_expr_gen:this.context[t]=ne.f_gen}this.exprAllowed=!0},C.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==C.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var ae=U.prototype;function le(e){return"Identifier"===e.type||"ParenthesizedExpression"===e.type&&le(e.expression)}function pe(e){return"MemberExpression"===e.type&&"PrivateIdentifier"===e.property.type||"ChainExpression"===e.type&&pe(e.expression)||"ParenthesizedExpression"===e.type&&pe(e.expression)}ae.checkPropClash=function(e,t,o){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r,i=e.key;switch(i.type){case"Identifier":r=i.name;break;case"Literal":r=String(i.value);break;default:return}var n=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===r&&"init"===n&&(t.proto&&(o?o.doubleProto<0&&(o.doubleProto=i.start):this.raiseRecoverable(i.start,"Redefinition of __proto__ property")),t.proto=!0);else{var s=t[r="$"+r];s?("init"===n?this.strict&&s.init||s.get||s.set:s.init||s[n])&&this.raiseRecoverable(i.start,"Redefinition of property"):s=t[r]={init:!1,get:!1,set:!1},s[n]=!0}}},ae.parseExpression=function(e,t){var o=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===C.comma){var n=this.startNodeAt(o,r);for(n.expressions=[i];this.eat(C.comma);)n.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(n,"SequenceExpression")}return i},ae.parseMaybeAssign=function(e,t,o){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,n=-1,s=-1;t?(i=t.parenthesizedAssign,n=t.trailingComma,s=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new K,r=!0);var a=this.start,l=this.startLoc;this.type!==C.parenL&&this.type!==C.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===e);var p=this.parseMaybeConditional(e,t);if(o&&(p=o.call(this,p,a,l)),this.type.isAssign){var u=this.startNodeAt(a,l);return u.operator=this.value,this.type===C.eq&&(p=this.toAssignable(p,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=p.start&&(t.shorthandAssign=-1),this.type===C.eq?this.checkLValPattern(p):this.checkLValSimple(p),u.left=p,this.next(),u.right=this.parseMaybeAssign(e),s>-1&&(t.doubleProto=s),this.finishNode(u,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),n>-1&&(t.trailingComma=n),p},ae.parseMaybeConditional=function(e,t){var o=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(C.question)){var n=this.startNodeAt(o,r);return n.test=i,n.consequent=this.parseMaybeAssign(),this.expect(C.colon),n.alternate=this.parseMaybeAssign(e),this.finishNode(n,"ConditionalExpression")}return i},ae.parseExprOps=function(e,t){var o=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===o&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,o,r,-1,e)},ae.parseExprOp=function(e,t,o,r,i){var n=this.type.binop;if(null!=n&&(!i||this.type!==C._in)&&n>r){var s=this.type===C.logicalOR||this.type===C.logicalAND,a=this.type===C.coalesce;a&&(n=C.logicalAND.binop);var l=this.value;this.next();var p=this.start,u=this.startLoc,c=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),p,u,n,i),d=this.buildBinary(t,o,e,c,l,s||a);return(s&&this.type===C.coalesce||a&&(this.type===C.logicalOR||this.type===C.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(d,t,o,r,i)}return e},ae.buildBinary=function(e,t,o,r,i,n){"PrivateIdentifier"===r.type&&this.raise(r.start,"Private identifier can only be left side of binary expression");var s=this.startNodeAt(e,t);return s.left=o,s.operator=i,s.right=r,this.finishNode(s,n?"LogicalExpression":"BinaryExpression")},ae.parseMaybeUnary=function(e,t,o,r){var i,n=this.start,s=this.startLoc;if(this.isContextual("await")&&this.canAwait)i=this.parseAwait(r),t=!0;else if(this.type.prefix){var a=this.startNode(),l=this.type===C.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0,l,r),this.checkExpressionErrors(e,!0),l?this.checkLValSimple(a.argument):this.strict&&"delete"===a.operator&&le(a.argument)?this.raiseRecoverable(a.start,"Deleting local variable in strict mode"):"delete"===a.operator&&pe(a.argument)?this.raiseRecoverable(a.start,"Private fields can not be deleted"):t=!0,i=this.finishNode(a,l?"UpdateExpression":"UnaryExpression")}else if(t||this.type!==C.privateId){if(i=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return i;for(;this.type.postfix&&!this.canInsertSemicolon();){var p=this.startNodeAt(n,s);p.operator=this.value,p.prefix=!1,p.argument=i,this.checkLValSimple(i),this.next(),i=this.finishNode(p,"UpdateExpression")}}else(r||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),i=this.parsePrivateIdent(),this.type!==C._in&&this.unexpected();return o||!this.eat(C.starstar)?i:t?void this.unexpected(this.lastTokStart):this.buildBinary(n,s,i,this.parseMaybeUnary(null,!1,!1,r),"**",!1)},ae.parseExprSubscripts=function(e,t){var o=this.start,r=this.startLoc,i=this.parseExprAtom(e,t);if("ArrowFunctionExpression"===i.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return i;var n=this.parseSubscripts(i,o,r,!1,t);return e&&"MemberExpression"===n.type&&(e.parenthesizedAssign>=n.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=n.start&&(e.parenthesizedBind=-1),e.trailingComma>=n.start&&(e.trailingComma=-1)),n},ae.parseSubscripts=function(e,t,o,r,i){for(var n=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&this.potentialArrowAt===e.start,s=!1;;){var a=this.parseSubscript(e,t,o,r,n,s,i);if(a.optional&&(s=!0),a===e||"ArrowFunctionExpression"===a.type){if(s){var l=this.startNodeAt(t,o);l.expression=a,a=this.finishNode(l,"ChainExpression")}return a}e=a}},ae.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(C.arrow)},ae.parseSubscriptAsyncArrow=function(e,t,o,r){return this.parseArrowExpression(this.startNodeAt(e,t),o,!0,r)},ae.parseSubscript=function(e,t,o,r,i,n,s){var a=this.options.ecmaVersion>=11,l=a&&this.eat(C.questionDot);r&&l&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var p=this.eat(C.bracketL);if(p||l&&this.type!==C.parenL&&this.type!==C.backQuote||this.eat(C.dot)){var u=this.startNodeAt(t,o);u.object=e,p?(u.property=this.parseExpression(),this.expect(C.bracketR)):this.type===C.privateId&&"Super"!==e.type?u.property=this.parsePrivateIdent():u.property=this.parseIdent("never"!==this.options.allowReserved),u.computed=!!p,a&&(u.optional=l),e=this.finishNode(u,"MemberExpression")}else if(!r&&this.eat(C.parenL)){var c=new K,d=this.yieldPos,h=this.awaitPos,f=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var g=this.parseExprList(C.parenR,this.options.ecmaVersion>=8,!1,c);if(i&&!l&&this.shouldParseAsyncArrow())return this.checkPatternErrors(c,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=d,this.awaitPos=h,this.awaitIdentPos=f,this.parseSubscriptAsyncArrow(t,o,g,s);this.checkExpressionErrors(c,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=h||this.awaitPos,this.awaitIdentPos=f||this.awaitIdentPos;var m=this.startNodeAt(t,o);m.callee=e,m.arguments=g,a&&(m.optional=l),e=this.finishNode(m,"CallExpression")}else if(this.type===C.backQuote){(l||n)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var y=this.startNodeAt(t,o);y.tag=e,y.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(y,"TaggedTemplateExpression")}return e},ae.parseExprAtom=function(e,t,o){this.type===C.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case C._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type!==C.parenL||this.allowDirectSuper||this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==C.dot&&this.type!==C.bracketL&&this.type!==C.parenL&&this.unexpected(),this.finishNode(r,"Super");case C._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case C.name:var n=this.start,s=this.startLoc,a=this.containsEsc,l=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!a&&"async"===l.name&&!this.canInsertSemicolon()&&this.eat(C._function))return this.overrideContext(ne.f_expr),this.parseFunction(this.startNodeAt(n,s),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(C.arrow))return this.parseArrowExpression(this.startNodeAt(n,s),[l],!1,t);if(this.options.ecmaVersion>=8&&"async"===l.name&&this.type===C.name&&!a&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return l=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(C.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,s),[l],!0,t)}return l;case C.regexp:var p=this.value;return(r=this.parseLiteral(p.value)).regex={pattern:p.pattern,flags:p.flags},r;case C.num:case C.string:return this.parseLiteral(this.value);case C._null:case C._true:case C._false:return(r=this.startNode()).value=this.type===C._null?null:this.type===C._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case C.parenL:var u=this.start,c=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(c)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),c;case C.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(C.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case C.braceL:return this.overrideContext(ne.b_expr),this.parseObj(!1,e);case C._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case C._class:return this.parseClass(this.startNode(),!1);case C._new:return this.parseNew();case C.backQuote:return this.parseTemplate();case C._import:return this.options.ecmaVersion>=11?this.parseExprImport(o):this.unexpected();default:return this.parseExprAtomDefault()}},ae.parseExprAtomDefault=function(){this.unexpected()},ae.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===C.parenL&&!e)return this.parseDynamicImport(t);if(this.type===C.dot){var o=this.startNodeAt(t.start,t.loc&&t.loc.start);return o.name="import",t.meta=this.finishNode(o,"Identifier"),this.parseImportMeta(t)}this.unexpected()},ae.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(C.parenR)?e.options=null:(this.expect(C.comma),this.afterTrailingComma(C.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(C.parenR)||(this.expect(C.comma),this.afterTrailingComma(C.parenR)||this.unexpected())));else if(!this.eat(C.parenR)){var t=this.start;this.eat(C.comma)&&this.eat(C.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},ae.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},ae.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=null!=t.value?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},ae.parseParenExpression=function(){this.expect(C.parenL);var e=this.parseExpression();return this.expect(C.parenR),e},ae.shouldParseArrow=function(e){return!this.canInsertSemicolon()},ae.parseParenAndDistinguishExpression=function(e,t){var o,r=this.start,i=this.startLoc,n=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s,a=this.start,l=this.startLoc,p=[],u=!0,c=!1,d=new K,h=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==C.parenR;){if(u?u=!1:this.expect(C.comma),n&&this.afterTrailingComma(C.parenR,!0)){c=!0;break}if(this.type===C.ellipsis){s=this.start,p.push(this.parseParenItem(this.parseRestBinding())),this.type===C.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}p.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var g=this.lastTokEnd,m=this.lastTokEndLoc;if(this.expect(C.parenR),e&&this.shouldParseArrow(p)&&this.eat(C.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=h,this.awaitPos=f,this.parseParenArrowList(r,i,p,t);p.length&&!c||this.unexpected(this.lastTokStart),s&&this.unexpected(s),this.checkExpressionErrors(d,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=f||this.awaitPos,p.length>1?((o=this.startNodeAt(a,l)).expressions=p,this.finishNodeAt(o,"SequenceExpression",g,m)):o=p[0]}else o=this.parseParenExpression();if(this.options.preserveParens){var y=this.startNodeAt(r,i);return y.expression=o,this.finishNode(y,"ParenthesizedExpression")}return o},ae.parseParenItem=function(e){return e},ae.parseParenArrowList=function(e,t,o,r){return this.parseArrowExpression(this.startNodeAt(e,t),o,!1,r)};var ue=[];ae.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===C.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var o=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),o&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),this.eat(C.parenL)?e.arguments=this.parseExprList(C.parenR,this.options.ecmaVersion>=8,!1):e.arguments=ue,this.finishNode(e,"NewExpression")},ae.parseTemplateElement=function(e){var t=e.isTagged,o=this.startNode();return this.type===C.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),o.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):o.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),o.tail=this.type===C.backQuote,this.finishNode(o,"TemplateElement")},ae.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var o=this.startNode();this.next(),o.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(o.quasis=[r];!r.tail;)this.type===C.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(C.dollarBraceL),o.expressions.push(this.parseExpression()),this.expect(C.braceR),o.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(o,"TemplateLiteral")},ae.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===C.name||this.type===C.num||this.type===C.string||this.type===C.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===C.star)&&!w.test(this.input.slice(this.lastTokEnd,this.start))},ae.parseObj=function(e,t){var o=this.startNode(),r=!0,i={};for(o.properties=[],this.next();!this.eat(C.braceR);){if(r)r=!1;else if(this.expect(C.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(C.braceR))break;var n=this.parseProperty(e,t);e||this.checkPropClash(n,i,t),o.properties.push(n)}return this.finishNode(o,e?"ObjectPattern":"ObjectExpression")},ae.parseProperty=function(e,t){var o,r,i,n,s=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(C.ellipsis))return e?(s.argument=this.parseIdent(!1),this.type===C.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(s,"RestElement")):(s.argument=this.parseMaybeAssign(!1,t),this.type===C.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(s,"SpreadElement"));this.options.ecmaVersion>=6&&(s.method=!1,s.shorthand=!1,(e||t)&&(i=this.start,n=this.startLoc),e||(o=this.eat(C.star)));var a=this.containsEsc;return this.parsePropertyName(s),!e&&!a&&this.options.ecmaVersion>=8&&!o&&this.isAsyncProp(s)?(r=!0,o=this.options.ecmaVersion>=9&&this.eat(C.star),this.parsePropertyName(s)):r=!1,this.parsePropertyValue(s,e,o,r,i,n,t,a),this.finishNode(s,"Property")},ae.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var o="get"===e.kind?0:1;if(e.value.params.length!==o){var r=e.value.start;"get"===e.kind?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")},ae.parsePropertyValue=function(e,t,o,r,i,n,s,a){(o||r)&&this.type===C.colon&&this.unexpected(),this.eat(C.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,s),e.kind="init"):this.options.ecmaVersion>=6&&this.type===C.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(o,r),e.kind="init"):t||a||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===C.comma||this.type===C.braceR||this.type===C.eq?this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((o||r)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,n,this.copyNode(e.key)):this.type===C.eq&&s?(s.shorthandAssign<0&&(s.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected():((o||r)&&this.unexpected(),this.parseGetterSetter(e))},ae.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(C.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(C.bracketR),e.key;e.computed=!1}return e.key=this.type===C.num||this.type===C.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},ae.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},ae.parseMethod=function(e,t,o){var r=this.startNode(),i=this.yieldPos,n=this.awaitPos,s=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|B(t,r.generator)|(o?128:0)),this.expect(C.parenL),r.params=this.parseBindingList(C.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=n,this.awaitIdentPos=s,this.finishNode(r,"FunctionExpression")},ae.parseArrowExpression=function(e,t,o,r){var i=this.yieldPos,n=this.awaitPos,s=this.awaitIdentPos;return this.enterScope(16|B(o,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!o),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=n,this.awaitIdentPos=s,this.finishNode(e,"ArrowFunctionExpression")},ae.parseFunctionBody=function(e,t,o,r){var i=t&&this.type!==C.braceL,n=this.strict,s=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);n&&!a||(s=this.strictDirective(this.end))&&a&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var l=this.labels;this.labels=[],s&&(this.strict=!0),this.checkParams(e,!n&&!s&&!t&&!o&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,5),e.body=this.parseBlock(!1,void 0,s&&!n),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()},ae.isSimpleParamList=function(e){for(var t=0,o=e;t<o.length;t+=1)if("Identifier"!==o[t].type)return!1;return!0},ae.checkParams=function(e,t){for(var o=Object.create(null),r=0,i=e.params;r<i.length;r+=1){var n=i[r];this.checkLValInnerPattern(n,1,t?null:o)}},ae.parseExprList=function(e,t,o,r){for(var i=[],n=!0;!this.eat(e);){if(n)n=!1;else if(this.expect(C.comma),t&&this.afterTrailingComma(e))break;var s=void 0;o&&this.type===C.comma?s=null:this.type===C.ellipsis?(s=this.parseSpread(r),r&&this.type===C.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):s=this.parseMaybeAssign(!1,r),i.push(s)}return i},ae.checkUnreserved=function(e){var t=e.start,o=e.end,r=e.name;this.inGenerator&&"yield"===r&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().flags&H||"arguments"!==r||this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==r&&"await"!==r||this.raise(t,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(t,o).indexOf("\\")||(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||"await"!==r||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))},ae.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),"await"!==t.name||this.awaitIdentPos||(this.awaitIdentPos=t.start)),t},ae.parseIdentNode=function(){var e=this.startNode();return this.type===C.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,"class"!==e.name&&"function"!==e.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop(),this.type=C.name):this.unexpected(),e},ae.parsePrivateIdent=function(){var e=this.startNode();return this.type===C.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(0===this.privateNameStack.length?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e},ae.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===C.semi||this.canInsertSemicolon()||this.type!==C.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(C.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},ae.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var ce=U.prototype;ce.raise=function(e,t){var o=L(this.input,e);t+=" ("+o.line+":"+o.column+")",this.sourceFile&&(t+=" in "+this.sourceFile);var r=new SyntaxError(t);throw r.pos=e,r.loc=o,r.raisedAt=this.pos,r},ce.raiseRecoverable=ce.raise,ce.curPosition=function(){if(this.options.locations)return new M(this.curLine,this.pos-this.lineStart)};var de=U.prototype,he=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};de.enterScope=function(e){this.scopeStack.push(new he(e))},de.exitScope=function(){this.scopeStack.pop()},de.treatFunctionsAsVarInScope=function(e){return 2&e.flags||!this.inModule&&1&e.flags},de.declareName=function(e,t,o){var r=!1;if(2===t){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&1&i.flags&&delete this.undefinedExports[e]}else if(4===t)this.currentScope().lexical.push(e);else if(3===t){var n=this.currentScope();r=this.treatFunctionsAsVar?n.lexical.indexOf(e)>-1:n.lexical.indexOf(e)>-1||n.var.indexOf(e)>-1,n.functions.push(e)}else for(var s=this.scopeStack.length-1;s>=0;--s){var a=this.scopeStack[s];if(a.lexical.indexOf(e)>-1&&!(32&a.flags&&a.lexical[0]===e)||!this.treatFunctionsAsVarInScope(a)&&a.functions.indexOf(e)>-1){r=!0;break}if(a.var.push(e),this.inModule&&1&a.flags&&delete this.undefinedExports[e],a.flags&H)break}r&&this.raiseRecoverable(o,"Identifier '"+e+"' has already been declared")},de.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},de.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},de.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(771&t.flags)return t}},de.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(771&t.flags&&!(16&t.flags))return t}};var fe=function(e,t,o){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new k(e,o)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},ge=U.prototype;function me(e,t,o,r){return e.type=t,e.end=o,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=o),e}ge.startNode=function(){return new fe(this,this.start,this.startLoc)},ge.startNodeAt=function(e,t){return new fe(this,e,t)},ge.finishNode=function(e,t){return me.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},ge.finishNodeAt=function(e,t,o,r){return me.call(this,e,t,o,r)},ge.copyNode=function(e){var t=new fe(this,e.start,this.startLoc);for(var o in e)t[o]=e[o];return t};var ye,ve,Ce="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",we=Ce+" Extended_Pictographic",Ee=we+" EBase EComp EMod EPres ExtPict",_e={9:Ce,10:we,11:we,12:Ee,13:Ee,14:Ee},be={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},Re="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Se="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Oe=Se+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Te=Oe+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Ae=Te+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Pe=Ae+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Ie={9:Se,10:Oe,11:Te,12:Ae,13:Pe,14:Pe+" Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz"},xe={};for(var De=0,Ne=[9,10,11,12,13,14];De<Ne.length;De+=1)ve=void 0,(ve=xe[ye=Ne[De]]={binary:D(_e[ye]+" "+Re),binaryOfStrings:D(be[ye]),nonBinary:{General_Category:D(Re),Script:D(Ie[ye])}}).nonBinary.Script_Extensions=ve.nonBinary.Script,ve.nonBinary.gc=ve.nonBinary.General_Category,ve.nonBinary.sc=ve.nonBinary.Script,ve.nonBinary.scx=ve.nonBinary.Script_Extensions;var Fe=U.prototype,Me=function(e,t){this.parent=e,this.base=t||this};Me.prototype.separatedFrom=function(e){for(var t=this;t;t=t.parent)for(var o=e;o;o=o.parent)if(t.base===o.base&&t!==o)return!0;return!1},Me.prototype.sibling=function(){return new Me(this.parent,this.base)};var ke=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=xe[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function Le(e){return 105===e||109===e||115===e}function Ge(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function Ve(e){return e>=65&&e<=90||e>=97&&e<=122}ke.prototype.reset=function(e,t,o){var r=-1!==o.indexOf("v"),i=-1!==o.indexOf("u");this.start=0|e,this.source=t+"",this.flags=o,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=i&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=i&&this.parser.options.ecmaVersion>=9)},ke.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},ke.prototype.at=function(e,t){void 0===t&&(t=!1);var o=this.source,r=o.length;if(e>=r)return-1;var i=o.charCodeAt(e);if(!t&&!this.switchU||i<=55295||i>=57344||e+1>=r)return i;var n=o.charCodeAt(e+1);return n>=56320&&n<=57343?(i<<10)+n-56613888:i},ke.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var o=this.source,r=o.length;if(e>=r)return r;var i,n=o.charCodeAt(e);return!t&&!this.switchU||n<=55295||n>=57344||e+1>=r||(i=o.charCodeAt(e+1))<56320||i>57343?e+1:e+2},ke.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},ke.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},ke.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},ke.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},ke.prototype.eatChars=function(e,t){void 0===t&&(t=!1);for(var o=this.pos,r=0,i=e;r<i.length;r+=1){var n=i[r],s=this.at(o,t);if(-1===s||s!==n)return!1;o=this.nextIndex(o,t)}return this.pos=o,!0},Fe.validateRegExpFlags=function(e){for(var t=e.validFlags,o=e.flags,r=!1,i=!1,n=0;n<o.length;n++){var s=o.charAt(n);-1===t.indexOf(s)&&this.raise(e.start,"Invalid regular expression flag"),o.indexOf(s,n+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),"u"===s&&(r=!0),"v"===s&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,"Invalid regular expression flag")},Fe.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&function(e){for(var t in e)return!0;return!1}(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},Fe.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,o=e.backReferenceNames;t<o.length;t+=1){var r=o[t];e.groupNames[r]||e.raise("Invalid named capture referenced")}},Fe.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new Me(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},Fe.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},Fe.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):!!(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))&&(this.regexp_eatQuantifier(e),!0)},Fe.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var o=!1;if(this.options.ecmaVersion>=9&&(o=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!o,!0}return e.pos=t,!1},Fe.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},Fe.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},Fe.regexp_eatBracedQuantifier=function(e,t){var o=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return-1!==i&&i<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=o}return!1},Fe.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},Fe.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},Fe.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var o=this.regexp_eatModifiers(e),r=e.eat(45);if(o||r){for(var i=0;i<o.length;i++){var n=o.charAt(i);o.indexOf(n,i+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(r){var s=this.regexp_eatModifiers(e);o||s||58!==e.current()||e.raise("Invalid regular expression modifiers");for(var a=0;a<s.length;a++){var l=s.charAt(a);(s.indexOf(l,a+1)>-1||o.indexOf(l)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1},Fe.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},Fe.regexp_eatModifiers=function(e){for(var t="",o=0;-1!==(o=e.current())&&Le(o);)t+=N(o),e.advance();return t},Fe.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},Fe.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},Fe.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!Ge(t)&&(e.lastIntValue=t,e.advance(),!0)},Fe.regexp_eatPatternCharacters=function(e){for(var t=e.pos,o=0;-1!==(o=e.current())&&!Ge(o);)e.advance();return e.pos!==t},Fe.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t||(e.advance(),0))},Fe.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,o=e.groupNames[e.lastStringValue];if(o)if(t)for(var r=0,i=o;r<i.length;r+=1)i[r].separatedFrom(e.branchID)||e.raise("Duplicate capture group name");else e.raise("Duplicate capture group name");t?(o||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}},Fe.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},Fe.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=N(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=N(e.lastIntValue);return!0}return!1},Fe.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,o=this.options.ecmaVersion>=11,r=e.current(o);return e.advance(o),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(e,o)&&(r=e.lastIntValue),function(e){return c(e,!0)||36===e||95===e}(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},Fe.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,o=this.options.ecmaVersion>=11,r=e.current(o);return e.advance(o),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(e,o)&&(r=e.lastIntValue),function(e){return d(e,!0)||36===e||95===e||8204===e||8205===e}(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},Fe.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},Fe.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var o=e.lastIntValue;if(e.switchU)return o>e.maxBackReference&&(e.maxBackReference=o),!0;if(o<=e.numCapturingParens)return!0;e.pos=t}return!1},Fe.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},Fe.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},Fe.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},Fe.regexp_eatZero=function(e){return 48===e.current()&&!He(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},Fe.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},Fe.regexp_eatControlLetter=function(e){var t=e.current();return!!Ve(t)&&(e.lastIntValue=t%32,e.advance(),!0)},Fe.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var o,r=e.pos,i=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var n=e.lastIntValue;if(i&&n>=55296&&n<=56319){var s=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(a>=56320&&a<=57343)return e.lastIntValue=1024*(n-55296)+(a-56320)+65536,!0}e.pos=s,e.lastIntValue=n}return!0}if(i&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&((o=e.lastIntValue)>=0&&o<=1114111))return!0;i&&e.raise("Invalid unicode escape"),e.pos=r}return!1},Fe.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t||(e.lastIntValue=t,e.advance(),0))},Fe.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1};function je(e){return Ve(e)||95===e}function We(e){return je(e)||He(e)}function He(e){return e>=48&&e<=57}function Be(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Ue(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function ze(e){return e>=48&&e<=55}Fe.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),1;var o=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((o=80===t)||112===t)){var r;if(e.lastIntValue=-1,e.advance(),e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return o&&2===r&&e.raise("Invalid property name"),r;e.raise("Invalid property name")}return 0},Fe.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var o=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,o,r),1}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return 0},Fe.regexp_validateUnicodePropertyNameAndValue=function(e,t,o){P(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(o)||e.raise("Invalid property value")},Fe.regexp_validateUnicodePropertyNameOrValue=function(e,t){return e.unicodeProperties.binary.test(t)?1:e.switchV&&e.unicodeProperties.binaryOfStrings.test(t)?2:void e.raise("Invalid property name")},Fe.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";je(t=e.current());)e.lastStringValue+=N(t),e.advance();return""!==e.lastStringValue},Fe.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";We(t=e.current());)e.lastStringValue+=N(t),e.advance();return""!==e.lastStringValue},Fe.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},Fe.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),o=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&2===o&&e.raise("Negated character class may contain strings"),!0}return!1},Fe.regexp_classContents=function(e){return 93===e.current()?1:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),1)},Fe.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var o=e.lastIntValue;!e.switchU||-1!==t&&-1!==o||e.raise("Invalid character class"),-1!==t&&-1!==o&&t>o&&e.raise("Range out of order in character class")}}},Fe.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var o=e.current();(99===o||ze(o))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return 93!==r&&(e.lastIntValue=r,e.advance(),!0)},Fe.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},Fe.regexp_classSetExpression=function(e){var t,o=1;if(this.regexp_eatClassSetRange(e));else if(t=this.regexp_eatClassSetOperand(e)){2===t&&(o=2);for(var r=e.pos;e.eatChars([38,38]);)38!==e.current()&&(t=this.regexp_eatClassSetOperand(e))?2!==t&&(o=1):e.raise("Invalid character in character class");if(r!==e.pos)return o;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(r!==e.pos)return o}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(!(t=this.regexp_eatClassSetOperand(e)))return o;2===t&&(o=2)}},Fe.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var o=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return-1!==o&&-1!==r&&o>r&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1},Fe.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?1:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},Fe.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var o=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return o&&2===r&&e.raise("Negated character class may contain strings"),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null},Fe.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var o=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return o}else e.raise("Invalid escape");e.pos=t}return null},Fe.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)2===this.regexp_classString(e)&&(t=2);return t},Fe.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return 1===t?1:2},Fe.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return!(!this.regexp_eatCharacterEscape(e)&&!this.regexp_eatClassSetReservedPunctuator(e)&&(e.eat(98)?(e.lastIntValue=8,0):(e.pos=t,1)));var o=e.current();return!(o<0||o===e.lookahead()&&function(e){return 33===e||e>=35&&e<=38||e>=42&&e<=44||46===e||e>=58&&e<=64||94===e||96===e||126===e}(o)||function(e){return 40===e||41===e||45===e||47===e||e>=91&&e<=93||e>=123&&e<=125}(o)||(e.advance(),e.lastIntValue=o,0))},Fe.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return!!function(e){return 33===e||35===e||37===e||38===e||44===e||45===e||e>=58&&e<=62||64===e||96===e||126===e}(t)&&(e.lastIntValue=t,e.advance(),!0)},Fe.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!He(t)&&95!==t||(e.lastIntValue=t%32,e.advance(),0))},Fe.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},Fe.regexp_eatDecimalDigits=function(e){var t=e.pos,o=0;for(e.lastIntValue=0;He(o=e.current());)e.lastIntValue=10*e.lastIntValue+(o-48),e.advance();return e.pos!==t},Fe.regexp_eatHexDigits=function(e){var t=e.pos,o=0;for(e.lastIntValue=0;Be(o=e.current());)e.lastIntValue=16*e.lastIntValue+Ue(o),e.advance();return e.pos!==t},Fe.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var o=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*o+e.lastIntValue:e.lastIntValue=8*t+o}else e.lastIntValue=t;return!0}return!1},Fe.regexp_eatOctalDigit=function(e){var t=e.current();return ze(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},Fe.regexp_eatFixedHexDigits=function(e,t){var o=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!Be(i))return e.pos=o,!1;e.lastIntValue=16*e.lastIntValue+Ue(i),e.advance()}return!0};var Ye=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new k(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},qe=U.prototype;function Ke(e){return"function"!=typeof BigInt?null:BigInt(e.replace(/_/g,""))}qe.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Ye(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},qe.getToken=function(){return this.next(),new Ye(this)},"undefined"!=typeof Symbol&&(qe[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===C.eof,value:t}}}}),qe.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(C.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},qe.readToken=function(e){return c(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},qe.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888},qe.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,o=this.input.indexOf("*/",this.pos+=2);if(-1===o&&this.raise(this.pos-2,"Unterminated comment"),this.pos=o+2,this.options.locations)for(var r=void 0,i=t;(r=b(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,o),t,this.pos,e,this.curPosition())},qe.skipLineComment=function(e){for(var t=this.pos,o=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!_(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,o,this.curPosition())},qe.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&R.test(String.fromCharCode(e))))break e;++this.pos}}},qe.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var o=this.type;this.type=e,this.value=t,this.updateContext(o)},qe.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(C.ellipsis)):(++this.pos,this.finishToken(C.dot))},qe.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(C.assign,2):this.finishOp(C.slash,1)},qe.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),o=1,r=42===e?C.star:C.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++o,r=C.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(C.assign,o+1):this.finishOp(r,o)},qe.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(C.assign,3):this.finishOp(124===e?C.logicalOR:C.logicalAND,2):61===t?this.finishOp(C.assign,2):this.finishOp(124===e?C.bitwiseOR:C.bitwiseAND,1)},qe.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(C.assign,2):this.finishOp(C.bitwiseXOR,1)},qe.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!w.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(C.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(C.assign,2):this.finishOp(C.plusMin,1)},qe.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),o=1;return t===e?(o=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+o)?this.finishOp(C.assign,o+1):this.finishOp(C.bitShift,o)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(o=2),this.finishOp(C.relational,o)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},qe.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(C.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(C.arrow)):this.finishOp(61===e?C.eq:C.prefix,1)},qe.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var o=this.input.charCodeAt(this.pos+2);if(o<48||o>57)return this.finishOp(C.questionDot,2)}if(63===t)return e>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(C.assign,3):this.finishOp(C.coalesce,2)}return this.finishOp(C.question,1)},qe.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,c(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken(C.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+N(e)+"'")},qe.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(C.parenL);case 41:return++this.pos,this.finishToken(C.parenR);case 59:return++this.pos,this.finishToken(C.semi);case 44:return++this.pos,this.finishToken(C.comma);case 91:return++this.pos,this.finishToken(C.bracketL);case 93:return++this.pos,this.finishToken(C.bracketR);case 123:return++this.pos,this.finishToken(C.braceL);case 125:return++this.pos,this.finishToken(C.braceR);case 58:return++this.pos,this.finishToken(C.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(C.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(C.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+N(e)+"'")},qe.finishOp=function(e,t){var o=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,o)},qe.readRegexp=function(){for(var e,t,o=this.pos;;){this.pos>=this.input.length&&this.raise(o,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(w.test(r)&&this.raise(o,"Unterminated regular expression"),e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++this.pos}var i=this.input.slice(o,this.pos);++this.pos;var n=this.pos,s=this.readWord1();this.containsEsc&&this.unexpected(n);var a=this.regexpState||(this.regexpState=new ke(this));a.reset(o,i,s),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var l=null;try{l=new RegExp(i,s)}catch(e){}return this.finishToken(C.regexp,{pattern:i,flags:s,value:l})},qe.readInt=function(e,t,o){for(var r=this.options.ecmaVersion>=12&&void 0===t,i=o&&48===this.input.charCodeAt(this.pos),n=this.pos,s=0,a=0,l=0,p=null==t?1/0:t;l<p;++l,++this.pos){var u=this.input.charCodeAt(this.pos),c=void 0;if(r&&95===u)i&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===a&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===l&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),a=u;else{if((c=u>=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0)>=e)break;a=u,s=s*e+c}}return r&&95===a&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===n||null!=t&&this.pos-n!==t?null:s},qe.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var o=this.readInt(e);return null==o&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(o=Ke(this.input.slice(t,this.pos)),++this.pos):c(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(C.num,o)},qe.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(t,"Invalid number");var o=this.pos-t>=2&&48===this.input.charCodeAt(t);o&&this.strict&&this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!o&&!e&&this.options.ecmaVersion>=11&&110===r){var i=Ke(this.input.slice(t,this.pos));return++this.pos,c(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(C.num,i)}o&&/[89]/.test(this.input.slice(t,this.pos))&&(o=!1),46!==r||o||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),69!==r&&101!==r||o||(43!==(r=this.input.charCodeAt(++this.pos))&&45!==r||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),c(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var n,s=(n=this.input.slice(t,this.pos),o?parseInt(n,8):parseFloat(n.replace(/_/g,"")));return this.finishToken(C.num,s)},qe.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},qe.readString=function(e){for(var t="",o=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(o,this.pos),t+=this.readEscapedChar(!1),o=this.pos):8232===r||8233===r?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(_(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(o,this.pos++),this.finishToken(C.string,t)};var $e={};qe.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==$e)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},qe.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw $e;this.raise(e,t)},qe.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var o=this.input.charCodeAt(this.pos);if(96===o||36===o&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==C.template&&this.type!==C.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(C.template,e)):36===o?(this.pos+=2,this.finishToken(C.dollarBraceL)):(++this.pos,this.finishToken(C.backQuote));if(92===o)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(_(o)){switch(e+=this.input.slice(t,this.pos),++this.pos,o){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(o)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},qe.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(C.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":"\n"===this.input[this.pos+1]&&++this.pos;case"\n":case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},qe.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return N(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var o=this.pos-1;this.invalidStringToken(o,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),"0"===r&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return _(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}},qe.readHexChar=function(e){var t=this.pos,o=this.readInt(16,e);return null===o&&this.invalidStringToken(t,"Bad character escape sequence"),o},qe.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,o=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(d(i,r))this.pos+=i<=65535?1:2;else{if(92!==i)break;this.containsEsc=!0,e+=this.input.slice(o,this.pos);var n=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var s=this.readCodePoint();(t?c:d)(s,r)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=N(s),o=this.pos}t=!1}return e+this.input.slice(o,this.pos)},qe.readWord=function(){var e=this.readWord1(),t=C.name;return this.keywords.test(e)&&(t=y[e]),this.finishToken(t,e)};var Ze="8.15.0";U.acorn={Parser:U,version:Ze,defaultOptions:G,Position:M,SourceLocation:k,getLineInfo:L,Node:fe,TokenType:h,tokTypes:C,keywordTypes:y,TokContext:ie,tokContexts:ne,isIdentifierChar:d,isIdentifierStart:c,Token:Ye,isNewLine:_,lineBreak:w,lineBreakG:E,nonASCIIwhitespace:R},e.Node=fe,e.Parser=U,e.Position=M,e.SourceLocation=k,e.TokContext=ie,e.Token=Ye,e.TokenType=h,e.defaultOptions=G,e.getLineInfo=L,e.isIdentifierChar=d,e.isIdentifierStart=c,e.isNewLine=_,e.keywordTypes=y,e.lineBreak=w,e.lineBreakG=E,e.nonASCIIwhitespace=R,e.parse=function(e,t){return U.parse(e,t)},e.parseExpressionAt=function(e,t,o){return U.parseExpressionAt(e,t,o)},e.tokContexts=ne,e.tokTypes=C,e.tokenizer=function(e,t){return U.tokenizer(e,t)},e.version=Ze}(t)},84715:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(46379),l=o(45727),p=o(72493),u=o(44081),c=o(93121),d=o(83423),h=function(e){function t(){var t=e.call(this,'<div class="ag-cell-edit-input"><select class="ag-cell-edit-input"/></div>')||this;return t.eSelect=t.getGui().querySelector("select"),t}return i(t,e),t.prototype.init=function(e){var t=this;this.focusAfterAttached=e.cellStartedEdit,d._.missing(e.values)?console.warn("ag-Grid: no values found for select cellEditor"):(e.values.forEach((function(o){var r=document.createElement("option");r.value=o;var i=t.valueFormatterService.formatValue(e.column,null,null,o),n=null!=i;r.text=n?i:o,e.value===o&&(r.selected=!0),t.eSelect.appendChild(r)})),this.gridOptionsWrapper.isFullRowEdit()||this.addDestroyableEventListener(this.eSelect,"change",(function(){return e.stopEditing()})),this.addDestroyableEventListener(this.eSelect,"keydown",(function(e){(e.keyCode===l.Constants.KEY_UP||e.keyCode===l.Constants.KEY_DOWN)&&e.stopPropagation()})),this.addDestroyableEventListener(this.eSelect,"mousedown",(function(e){e.stopPropagation()})))},t.prototype.afterGuiAttached=function(){this.focusAfterAttached&&this.eSelect.focus()},t.prototype.focusIn=function(){this.eSelect.focus()},t.prototype.getValue=function(){return this.eSelect.value},t.prototype.isPopup=function(){return!1},n([p.Autowired("gridOptionsWrapper"),s("design:type",u.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([p.Autowired("valueFormatterService"),s("design:type",c.ValueFormatterService)],t.prototype,"valueFormatterService",void 0),t}(a.PopupComponent);t.SelectCellEditor=h},85222:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.EVENT_COLUMN_EVERYTHING_CHANGED="columnEverythingChanged",e.EVENT_NEW_COLUMNS_LOADED="newColumnsLoaded",e.EVENT_COLUMN_PIVOT_MODE_CHANGED="columnPivotModeChanged",e.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged",e.EVENT_EXPAND_COLLAPSE_ALL="expandOrCollapseAll",e.EVENT_COLUMN_PIVOT_CHANGED="columnPivotChanged",e.EVENT_GRID_COLUMNS_CHANGED="gridColumnsChanged",e.EVENT_COLUMN_VALUE_CHANGED="columnValueChanged",e.EVENT_COLUMN_MOVED="columnMoved",e.EVENT_COLUMN_VISIBLE="columnVisible",e.EVENT_COLUMN_PINNED="columnPinned",e.EVENT_COLUMN_GROUP_OPENED="columnGroupOpened",e.EVENT_COLUMN_RESIZED="columnResized",e.EVENT_DISPLAYED_COLUMNS_CHANGED="displayedColumnsChanged",e.EVENT_VIRTUAL_COLUMNS_CHANGED="virtualColumnsChanged",e.EVENT_ROW_GROUP_OPENED="rowGroupOpened",e.EVENT_ROW_DATA_CHANGED="rowDataChanged",e.EVENT_ROW_DATA_UPDATED="rowDataUpdated",e.EVENT_PINNED_ROW_DATA_CHANGED="pinnedRowDataChanged",e.EVENT_RANGE_SELECTION_CHANGED="rangeSelectionChanged",e.EVENT_TOOL_PANEL_VISIBLE_CHANGED="toolPanelVisibleChanged",e.EVENT_MODEL_UPDATED="modelUpdated",e.EVENT_PASTE_START="pasteStart",e.EVENT_PASTE_END="pasteEnd",e.EVENT_CELL_CLICKED="cellClicked",e.EVENT_CELL_DOUBLE_CLICKED="cellDoubleClicked",e.EVENT_CELL_MOUSE_DOWN="cellMouseDown",e.EVENT_CELL_CONTEXT_MENU="cellContextMenu",e.EVENT_CELL_VALUE_CHANGED="cellValueChanged",e.EVENT_ROW_VALUE_CHANGED="rowValueChanged",e.EVENT_CELL_FOCUSED="cellFocused",e.EVENT_ROW_SELECTED="rowSelected",e.EVENT_SELECTION_CHANGED="selectionChanged",e.EVENT_CELL_KEY_DOWN="cellKeyDown",e.EVENT_CELL_KEY_PRESS="cellKeyPress",e.EVENT_CELL_MOUSE_OVER="cellMouseOver",e.EVENT_CELL_MOUSE_OUT="cellMouseOut",e.EVENT_FILTER_CHANGED="filterChanged",e.EVENT_FILTER_MODIFIED="filterModified",e.EVENT_FILTER_OPENED="filterOpened",e.EVENT_SORT_CHANGED="sortChanged",e.EVENT_VIRTUAL_ROW_REMOVED="virtualRowRemoved",e.EVENT_ROW_CLICKED="rowClicked",e.EVENT_ROW_DOUBLE_CLICKED="rowDoubleClicked",e.EVENT_GRID_READY="gridReady",e.EVENT_GRID_SIZE_CHANGED="gridSizeChanged",e.EVENT_VIEWPORT_CHANGED="viewportChanged",e.EVENT_FIRST_DATA_RENDERED="firstDataRendered",e.EVENT_DRAG_STARTED="dragStarted",e.EVENT_DRAG_STOPPED="dragStopped",e.EVENT_ROW_EDITING_STARTED="rowEditingStarted",e.EVENT_ROW_EDITING_STOPPED="rowEditingStopped",e.EVENT_CELL_EDITING_STARTED="cellEditingStarted",e.EVENT_CELL_EDITING_STOPPED="cellEditingStopped",e.EVENT_BODY_SCROLL="bodyScroll",e.EVENT_ANIMATION_QUEUE_EMPTY="animationQueueEmpty",e.EVENT_HEIGHT_SCALE_CHANGED="heightScaleChanged",e.EVENT_PAGINATION_CHANGED="paginationChanged",e.EVENT_COMPONENT_STATE_CHANGED="componentStateChanged",e.EVENT_BODY_HEIGHT_CHANGED="bodyHeightChanged",e.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED="displayedColumnsWidthChanged",e.EVENT_SCROLL_VISIBILITY_CHANGED="scrollVisibilityChanged",e.EVENT_COLUMN_HOVER_CHANGED="columnHoverChanged",e.EVENT_FLASH_CELLS="flashCells",e.EVENT_ROW_DRAG_ENTER="rowDragEnter",e.EVENT_ROW_DRAG_MOVE="rowDragMove",e.EVENT_ROW_DRAG_LEAVE="rowDragLeave",e.EVENT_ROW_DRAG_END="rowDragEnd",e.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST="columnRowGroupChangeRequest",e.EVENT_COLUMN_PIVOT_CHANGE_REQUEST="columnPivotChangeRequest",e.EVENT_COLUMN_VALUE_CHANGE_REQUEST="columnValueChangeRequest",e.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST="columnAggFuncChangeRequest",e}();t.Events=o},85397:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var n=o(96652),s=o(96652),a=o(4855),l=o(47008),p=function(e){function t(t,o){var r=e.call(this,t,o)||this;return r.props=t,r.state=o,r}return i(t,e),t.prototype.render=function(){return null},t.mapChildColumnDefs=function(e){return n.Children.map(e.children,(function(e){return t.toColDef(e.props)}))},t.toColDef=function(e){var o=t.createColDefFromGridColumn(e);return t.hasChildColumns(e)&&(o.children=t.getChildColDefs(e.children)),o},t.hasChildColumns=function(e){return n.Children.count(e.children)>0},t.getChildColDefs=function(e){return n.Children.map(e,(function(e){return t.createColDefFromGridColumn(e.props)}))},t.createColDefFromGridColumn=function(e){var o={};return t.assign(o,e),delete o.children,o},t.assign=function(e,t){return[t].reduce((function(e,t){return Object.keys(t).forEach((function(o){e[o]=t[o]})),e}),e)},t}(s.Component);function u(e,t){e.forEach((function(e){p[e]=t}))}t.AgGridColumn=p,u(l.ColDefUtil.BOOLEAN_PROPERTIES,a.bool),u(l.ColDefUtil.STRING_PROPERTIES,a.string),u(l.ColDefUtil.OBJECT_PROPERTIES,a.object),u(l.ColDefUtil.ARRAY_PROPERTIES,a.array),u(l.ColDefUtil.NUMBER_PROPERTIES,a.number),u(l.ColDefUtil.FUNCTION_PROPERTIES,a.func)},85786:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(85222);t.Events=r.Events},85910:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n,s=o(72493),a=o(44081),l=o(36777),p=o(69638),u=o(22743),c=o(83423);!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.REGISTERED_BY_NAME=1]="REGISTERED_BY_NAME",e[e.HARDCODED=2]="HARDCODED"}(n=t.ComponentSource||(t.ComponentSource={}));var d=function(){function e(){}return e.prototype.newDateComponent=function(e){return this.createAndInitUserComponent(this.gridOptions,e,"dateComponent","agDateInput")},e.prototype.newHeaderComponent=function(e){return this.createAndInitUserComponent(e.column.getColDef(),e,"headerComponent","agColumnHeader")},e.prototype.newHeaderGroupComponent=function(e){return this.createAndInitUserComponent(e.columnGroup.getColGroupDef(),e,"headerGroupComponent","agColumnGroupHeader")},e.prototype.newFullWidthGroupRowInnerCellRenderer=function(e){return this.createAndInitUserComponent(this.gridOptions,e,"groupRowInnerRenderer",null,!0)},e.prototype.newFullWidthCellRenderer=function(e,t,o){return this.createAndInitUserComponent(null,e,t,o)},e.prototype.newCellRenderer=function(e,t){return this.createAndInitUserComponent(e,t,"cellRenderer",null,!0)},e.prototype.newPinnedRowCellRenderer=function(e,t){return this.createAndInitUserComponent(e,t,"pinnedRowCellRenderer",null,!0)},e.prototype.newCellEditor=function(e,t){return this.createAndInitUserComponent(e,t,"cellEditor","agCellEditor")},e.prototype.newInnerCellRenderer=function(e,t){return this.createAndInitUserComponent(e,t,"innerRenderer",null)},e.prototype.newLoadingOverlayComponent=function(e){return this.createAndInitUserComponent(this.gridOptions,e,"loadingOverlayComponent","agLoadingOverlay")},e.prototype.newNoRowsOverlayComponent=function(e){return this.createAndInitUserComponent(this.gridOptions,e,"noRowsOverlayComponent","agNoRowsOverlay")},e.prototype.newTooltipComponent=function(e){var t=e.column&&e.column.getColDef();return this.createAndInitUserComponent(t,e,"tooltipComponent","agTooltipComponent")},e.prototype.newFilterComponent=function(e,t,o,r){return this.createAndInitUserComponent(e,t,"filter",o,!1,r)},e.prototype.newFloatingFilterComponent=function(e,t,o){return this.createAndInitUserComponent(e,t,"floatingFilterComponent",o,!0)},e.prototype.newToolPanelComponent=function(e,t){return this.createAndInitUserComponent(e,t,"toolPanel")},e.prototype.newStatusPanelComponent=function(e,t){return this.createAndInitUserComponent(e,t,"statusPanel")},e.prototype.createAndInitUserComponent=function(e,t,o,r,i,n){void 0===i&&(i=!1),e||(e=this.gridOptions);var s=this.createComponentInstance(e,o,t,r,i);if(!s)return null;var a=s.componentInstance,l=this.createFinalParams(e,o,t,s.paramsFromSelector);this.addReactHacks(l);var p=n?n(l,a):l,u=this.initComponent(a,p);return null==u?c.Promise.resolve(a):u.map((function(e){return a}))},e.prototype.addReactHacks=function(e){var t=this.context.getBean("agGridReact");t&&(e.agGridReact=c._.cloneObject(t));var o=this.context.getBean("frameworkComponentWrapper");o&&(e.frameworkComponentWrapper=o)},e.prototype.createUserComponentFromConcreteClass=function(e,t){var o=new e;return this.initComponent(o,t),o},e.prototype.lookupComponentClassDef=function(e,t,o,r){void 0===o&&(o=null);var i,s=null,a=null,l=null,p=null;if(null!=e){var u=e[t];null==u||!0===u||("string"==typeof u?s=u:"boolean"==typeof u||(this.agComponentUtils.doesImplementIComponent(u)?a=u:l=u)),p=e[t+"Framework"],i=e[t+"Selector"]}if(a&&p||s&&p||l&&p)throw Error("ag-grid: you are trying to specify: "+t+" twice as a component.");if(p&&!this.frameworkComponentWrapper)throw Error("ag-grid: you are specifying a framework component but you are not using a framework version of ag-grid for : "+t);if(i&&(s||a||l||p))throw Error("ag-grid: you can't specify both, the selector and the component of ag-grid for : "+t);if(p)return{componentFromFramework:!0,component:p,source:n.HARDCODED,paramsFromSelector:null};if(a)return{componentFromFramework:!1,component:a,source:n.HARDCODED,paramsFromSelector:null};if(l)return this.agComponentUtils.adaptFunction(t,l,!1,n.HARDCODED);var c,d=i?i(o):null;if(!(c=d&&d.component?d.component:s||r))return null;var h=this.lookupFromRegisteredComponents(t,c);return{componentFromFramework:h.componentFromFramework,component:h.component,source:h.source,paramsFromSelector:d?d.params:null}},e.prototype.lookupFromRegisteredComponents=function(e,t){var o=null!=t?t:e,r=this.userComponentRegistry.retrieve(o);return null==r?null:r.componentFromFramework?{component:r.component,componentFromFramework:!0,source:n.REGISTERED_BY_NAME,paramsFromSelector:null}:this.agComponentUtils.doesImplementIComponent(r.component)?{component:r.component,componentFromFramework:!1,source:r.source==l.RegisteredComponentSource.REGISTERED?n.REGISTERED_BY_NAME:n.DEFAULT,paramsFromSelector:null}:this.agComponentUtils.adaptFunction(e,r.component,r.componentFromFramework,r.source==l.RegisteredComponentSource.REGISTERED?n.REGISTERED_BY_NAME:n.DEFAULT)},e.prototype.createFinalParams=function(e,t,o,r){void 0===r&&(r=null);var i={};c._.mergeDeep(i,o);var n=e?e[t+"Params"]:null;return null!=n&&("function"==typeof n?c._.mergeDeep(i,n(o)):"object"==typeof n&&c._.mergeDeep(i,n)),c._.mergeDeep(i,r),i},e.prototype.createComponentInstance=function(e,t,o,r,i){var n,s=this.lookupComponentClassDef(e,t,o,r);if(!s||!s.component)return i||console.error("Error creating component "+t+"=>"+r),null;if(s.componentFromFramework){var a=s.component,l=this.componentMetadataProvider.retrieve(t);n=this.frameworkComponentWrapper.wrap(a,l.mandatoryMethodList,l.optionalMethodList,r)}else n=new s.component;return{componentInstance:n,paramsFromSelector:s.paramsFromSelector}},e.prototype.initComponent=function(e,t){return this.context.wireBean(e),null==e.init?void 0:e.init(t)},r([s.Autowired("gridOptions"),i("design:type",Object)],e.prototype,"gridOptions",void 0),r([s.Autowired("gridOptionsWrapper"),i("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([s.Autowired("context"),i("design:type",s.Context)],e.prototype,"context",void 0),r([s.Autowired("agComponentUtils"),i("design:type",p.AgComponentUtils)],e.prototype,"agComponentUtils",void 0),r([s.Autowired("componentMetadataProvider"),i("design:type",u.ComponentMetadataProvider)],e.prototype,"componentMetadataProvider",void 0),r([s.Autowired("userComponentRegistry"),i("design:type",l.UserComponentRegistry)],e.prototype,"userComponentRegistry",void 0),r([s.Optional("frameworkComponentWrapper"),i("design:type",Object)],e.prototype,"frameworkComponentWrapper",void 0),r([s.Bean("userComponentFactory")],e)}();t.UserComponentFactory=d},86608:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(26016),s=o(72493),a=o(44081),l=o(44871),p=o(98239),u=o(60843),c=o(85786),d=o(40797),h=o(83423),f=function(){function e(){}var t;return t=e,e.prototype.progressSort=function(e,t,o){void 0===o&&(o="api");var r=this.getNextSortDirection(e);this.setSortForColumn(e,r,t,o)},e.prototype.setSortForColumn=function(e,t,o,r){if(void 0===r&&(r="api"),t!==n.Column.SORT_ASC&&t!==n.Column.SORT_DESC&&(t=null),e.setSort(t,r),e.getSort()){var i=Number((new Date).valueOf());e.setSortedAt(i)}else e.setSortedAt(null);o&&!this.gridOptionsWrapper.isSuppressMultiSort()||this.clearSortBarThisColumn(e,r),this.dispatchSortChangedEvents()},e.prototype.onSortChanged=function(){this.dispatchSortChangedEvents()},e.prototype.dispatchSortChangedEvents=function(){var e={type:c.Events.EVENT_SORT_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(e)},e.prototype.clearSortBarThisColumn=function(e,t){this.columnController.getPrimaryAndSecondaryAndAutoColumns().forEach((function(o){o!==e&&o.setSort(void 0,t)}))},e.prototype.getNextSortDirection=function(e){var o;if(o=e.getColDef().sortingOrder?e.getColDef().sortingOrder:this.gridOptionsWrapper.getSortingOrder()?this.gridOptionsWrapper.getSortingOrder():t.DEFAULT_SORTING_ORDER,!Array.isArray(o)||o.length<=0)return console.warn("ag-grid: sortingOrder must be an array with at least one element, currently it's "+o),null;var r,i=o.indexOf(e.getSort()),n=i<0,s=i==o.length-1;return r=n||s?o[0]:o[i+1],t.DEFAULT_SORTING_ORDER.indexOf(r)<0?(console.warn("ag-grid: invalid sort type "+r),null):r},e.prototype.getSortModel=function(){var e=this.getColumnsWithSortingOrdered();return h._.map(e,(function(e){return{colId:e.getColId(),sort:e.getSort()}}))},e.prototype.setSortModel=function(e,t){var o=this;void 0===t&&(t="api");var r=e&&e.length>0;this.columnController.getPrimaryAndSecondaryAndAutoColumns().forEach((function(i){var n=null,s=-1;if(r&&i.getColDef().sortable)for(var a=0;a<e.length;a++){var l=e[a];"string"==typeof l.colId&&"string"==typeof i.getColId()&&o.compareColIds(l,i)&&(n=l.sort,s=a)}n?(i.setSort(n,t),i.setSortedAt(s)):(i.setSort(null,t),i.setSortedAt(null))})),this.dispatchSortChangedEvents()},e.prototype.compareColIds=function(e,t){return e.colId===t.getColId()},e.prototype.getColumnsWithSortingOrdered=function(){var e=this.columnController.getPrimaryAndSecondaryAndAutoColumns(),t=h._.filter(e,(function(e){return!!e.getSort()}));return t.sort((function(e,t){return e.sortedAt-t.sortedAt})),t},e.prototype.getSortForRowController=function(){var e=this.getColumnsWithSortingOrdered();return h._.map(e,(function(e){return{inverter:e.getSort()===n.Column.SORT_ASC?1:-1,column:e}}))},e.DEFAULT_SORTING_ORDER=[n.Column.SORT_ASC,n.Column.SORT_DESC,null],r([s.Autowired("gridOptionsWrapper"),i("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([s.Autowired("columnController"),i("design:type",p.ColumnController)],e.prototype,"columnController",void 0),r([s.Autowired("eventService"),i("design:type",u.EventService)],e.prototype,"eventService",void 0),r([s.Autowired("columnApi"),i("design:type",l.ColumnApi)],e.prototype,"columnApi",void 0),r([s.Autowired("gridApi"),i("design:type",d.GridApi)],e.prototype,"gridApi",void 0),t=r([s.Bean("sortController")],e)}();t.SortController=f},86895:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.prototype.dateComponent=function(e){return e.dateComponent},e.prototype.colDefFloatingCellRenderer=function(e){return e.pinnedRowCellRenderer},e.prototype.colDefCellRenderer=function(e){return e.cellRenderer},e.prototype.colDefCellEditor=function(e){return e.cellEditor},e.prototype.colDefFilter=function(e){return e.filter},e.prototype.gridOptionsFullWidthCellRenderer=function(e){return e.fullWidthCellRenderer},e.prototype.gridOptionsGroupRowRenderer=function(e){return e.groupRowRenderer},e.prototype.gridOptionsGroupRowInnerRenderer=function(e){return e.groupRowInnerRenderer},e.prototype.setTimeout=function(e,t){window.setTimeout(e,t)},e}();t.BaseFrameworkFactory=o},87952:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(22131),l=o(72493),p=o(15068),u=o(58342),c=o(85222),d=o(8534),h=o(83423),f=function(e){function t(t,o,r,i){var n=e.call(this,'<div class="ag-row-drag"></div>')||this;return n.visibleMode=null,n.rowNode=t,n.column=o,n.cellValue=r,n.beans=i,n}return i(t,e),t.prototype.postConstruct=function(){this.getGui().appendChild(h._.createIconNoSpan("rowDrag",this.beans.gridOptionsWrapper,null)),this.addDragSource(),this.checkCompatibility(),this.beans.gridOptionsWrapper.isRowDragManaged()?this.addFeature(this.beans.context,new m(this,this.beans,this.rowNode,this.column)):this.addFeature(this.beans.context,new g(this,this.beans,this.rowNode,this.column))},t.prototype.checkCompatibility=function(){var e=this.beans.gridOptionsWrapper.isRowDragManaged();this.beans.gridOptionsWrapper.isTreeData()&&e&&h._.doOnce((function(){return console.warn("ag-Grid: If using row drag with tree data, you cannot have rowDragManaged=true")}),"RowDragComp.managedAndTreeData")},t.prototype.addDragSource=function(){var e=this,t={rowNode:this.rowNode},o={type:u.DragSourceType.RowDrag,eElement:this.getGui(),dragItemName:this.cellValue,dragItemCallback:function(){return t},dragStartPixels:0};this.beans.dragAndDropService.addDragSource(o,!0),this.addDestroyFunc((function(){return e.beans.dragAndDropService.removeDragSource(o)}))},t.prototype.getVisibleMode=function(){return this.visibleMode},t.prototype.setVisibleMode=function(e){this.visibleMode=e},n([l.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(a.Component);t.RowDragComp=f;var g=function(e){function t(t,o,r,i){var n=e.call(this)||this;return n.parent=t,n.beans=o,n.column=i,n.rowNode=r,n}return i(t,e),t.prototype.postConstruct=function(){this.addDestroyableEventListener(this.beans.gridOptionsWrapper,"suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.addDestroyableEventListener(this.rowNode,p.RowNode.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addDestroyableEventListener(this.rowNode,p.RowNode.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.workOutVisibility()},t.prototype.onSuppressRowDrag=function(){this.workOutVisibility()},t.prototype.workOutVisibility=function(){if(this.beans.gridOptionsWrapper.isSuppressRowDrag())this.parent.setVisibleMode("display"),this.parent.setVisible(!1,"display");else{var e=this.column.isRowDrag(this.rowNode);if(!this.parent.getVisibleMode()){var t=h._.isFunction(this.column.getColDef().rowDrag);this.parent.setVisibleMode(t?"visibility":"display")}this.parent.setVisible(e,this.parent.getVisibleMode())}},n([l.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(d.BeanStub),m=function(e){function t(t,o,r,i){var n=e.call(this)||this;return n.parent=t,n.beans=o,n.column=i,n.rowNode=r,n}return i(t,e),t.prototype.postConstruct=function(){this.addDestroyableEventListener(this.beans.eventService,c.Events.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addDestroyableEventListener(this.beans.eventService,c.Events.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addDestroyableEventListener(this.beans.eventService,c.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onRowGroupChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,p.RowNode.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addDestroyableEventListener(this.rowNode,p.RowNode.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addDestroyableEventListener(this.beans.gridOptionsWrapper,"suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.updateSortActive(),this.updateFilterActive(),this.updateRowGroupActive(),this.workOutVisibility()},t.prototype.updateRowGroupActive=function(){var e=this.beans.columnController.getRowGroupColumns();this.rowGroupActive=!h._.missingOrEmpty(e)},t.prototype.onRowGroupChanged=function(){this.updateRowGroupActive(),this.workOutVisibility()},t.prototype.updateSortActive=function(){var e=this.beans.sortController.getSortModel();this.sortActive=!h._.missingOrEmpty(e)},t.prototype.onSortChanged=function(){this.updateSortActive(),this.workOutVisibility()},t.prototype.updateFilterActive=function(){this.filterActive=this.beans.filterManager.isAnyFilterPresent()},t.prototype.onFilterChanged=function(){this.updateFilterActive(),this.workOutVisibility()},t.prototype.onSuppressRowDrag=function(){this.workOutVisibility()},t.prototype.workOutVisibility=function(){var e=this.sortActive||this.filterActive||this.rowGroupActive,t=this.beans.gridOptionsWrapper.isSuppressRowDrag();if(e||t)this.parent.setVisibleMode("display"),this.parent.setVisible(!1,"display");else{var o=this.column.isRowDrag(this.rowNode);if(!this.parent.getVisibleMode()){var r=h._.isFunction(this.column.getColDef().rowDrag);this.parent.setVisibleMode(r?"visibility":"display")}this.parent.setVisible(o,this.parent.getVisibleMode())}},n([l.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(d.BeanStub)},88333:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(83423),i=function(){function e(t){var o=this;this.items=[],this.params=t,this.eGui=document.createElement("div"),this.eGui.innerHTML=e.TEMPLATE,this.eHeader=this.eGui.querySelector('[ref="tabHeader"]'),this.eBody=this.eGui.querySelector('[ref="tabBody"]'),r._.addCssClass(this.eGui,t.cssClass),t.items&&t.items.forEach((function(e){return o.addItem(e)}))}return e.prototype.setAfterAttachedParams=function(e){this.afterAttachedParams=e},e.prototype.getMinDimensions=function(){var e=this.eGui.cloneNode(!0),t=e.querySelector('[ref="tabBody"]');e.style.position="fixed",this.eGui.appendChild(e);var o=0,i=0;return this.items.forEach((function(n){r._.clearElement(t);var s=n.tabbedItem.bodyPromise.resolveNow(null,(function(e){return e.cloneNode(!0)}));null!=s&&(t.appendChild(s),o<e.offsetWidth&&(o=e.offsetWidth),i<e.offsetHeight&&(i=e.offsetHeight))})),this.eGui.removeChild(e),{height:i,width:o}},e.prototype.showFirstItem=function(){this.items.length>0&&this.showItemWrapper(this.items[0])},e.prototype.addItem=function(e){var t=document.createElement("span");t.appendChild(e.title),r._.addCssClass(t,"ag-tab"),this.eHeader.appendChild(t);var o={tabbedItem:e,eHeaderButton:t};this.items.push(o),t.addEventListener("click",this.showItemWrapper.bind(this,o))},e.prototype.showItem=function(e){var t=r._.find(this.items,(function(t){return t.tabbedItem===e}));t&&this.showItemWrapper(t)},e.prototype.showItemWrapper=function(e){var t=this;this.params.onItemClicked&&this.params.onItemClicked({item:e.tabbedItem}),this.activeItem!==e?(r._.clearElement(this.eBody),e.tabbedItem.bodyPromise.then((function(e){t.eBody.appendChild(e)})),this.activeItem&&r._.removeCssClass(this.activeItem.eHeaderButton,"ag-tab-selected"),r._.addCssClass(e.eHeaderButton,"ag-tab-selected"),this.activeItem=e,e.tabbedItem.afterAttachedCallback&&e.tabbedItem.afterAttachedCallback(this.afterAttachedParams)):r._.callIfPresent(this.params.onActiveItemClicked)},e.prototype.getGui=function(){return this.eGui},e.TEMPLATE='<div><div ref="tabHeader" class="ag-tab-header"></div><div ref="tabBody" class="ag-tab-body"></div></div>',e}();t.TabbedLayout=i},88842:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(44081),a=function(){function e(){this.cacheVersion=0}return e.prototype.init=function(){this.active=this.gridOptionsWrapper.isValueCache(),this.neverExpires=this.gridOptionsWrapper.isValueCacheNeverExpires()},e.prototype.onDataChanged=function(){this.neverExpires||this.expire()},e.prototype.expire=function(){this.cacheVersion++},e.prototype.setValue=function(e,t,o){this.active&&(e.__cacheVersion!==this.cacheVersion&&(e.__cacheVersion=this.cacheVersion,e.__cacheData={}),e.__cacheData[t]=o)},e.prototype.getValue=function(e,t){return this.active&&e.__cacheVersion===this.cacheVersion&&void 0!==e.__cacheData[t]?e.__cacheData[t]:void 0},r([n.Autowired("gridOptionsWrapper"),i("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),r([n.Bean("valueCache")],e)}();t.ValueCache=a},89929:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(44081),l=o(98239),p=o(26016),u=o(72493),c=o(40706),d=o(60843),h=o(85786),f=o(22131),g=o(47721),m=o(40797),y=o(41832),v=o(45727),C=o(83423),w=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return i(t,e),t.prototype.registerGridComp=function(e){this.gridPanel=e,this.childContainers.forEach((function(t){return t.registerGridComp(e)}))},t.prototype.postConstruct=function(){var e=this;this.printLayout=this.gridOptionsWrapper.getDomLayout()===v.Constants.DOM_LAYOUT_PRINT,this.gridApi.registerHeaderRootComp(this),this.autoWidthCalculator.registerHeaderRootComp(this);var t=new c.HeaderContainer(this.eHeaderContainer,this.eHeaderViewport,null),o=new c.HeaderContainer(this.ePinnedLeftHeader,null,p.Column.PINNED_LEFT),r=new c.HeaderContainer(this.ePinnedRightHeader,null,p.Column.PINNED_RIGHT);this.childContainers=[t,o,r],this.childContainers.forEach((function(t){return e.getContext().wireBean(t)})),this.addDestroyableEventListener(this.eventService,h.Events.EVENT_COLUMN_VALUE_CHANGED,this.refreshHeader.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,a.GridOptionsWrapper.PROP_DOM_LAYOUT,this.onDomLayoutChanged.bind(this)),this.addDestroyableEventListener(this.eventService,h.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this)),this.onPivotModeChanged(),this.addPreventHeaderScroll(),this.columnController.isReady()&&this.refreshHeader()},t.prototype.onDomLayoutChanged=function(){var e=this.gridOptionsWrapper.getDomLayout()===v.Constants.DOM_LAYOUT_PRINT;this.printLayout!==e&&(this.printLayout=e,this.refreshHeader())},t.prototype.setHorizontalScroll=function(e){this.eHeaderContainer.style.transform="translateX("+e+"px)"},t.prototype.forEachHeaderElement=function(e){this.childContainers.forEach((function(t){return t.forEachHeaderElement(e)}))},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.childContainers.forEach((function(e){return e.destroy()}))},t.prototype.refreshHeader=function(){this.childContainers.forEach((function(e){return e.refresh()}))},t.prototype.onPivotModeChanged=function(){var e=this.columnController.isPivotMode();C._.addOrRemoveCssClass(this.getGui(),"ag-pivot-on",e),C._.addOrRemoveCssClass(this.getGui(),"ag-pivot-off",!e)},t.prototype.setHeight=function(e){var t=e+"px";this.getGui().style.height=t,this.getGui().style.minHeight=t},t.prototype.addPreventHeaderScroll=function(){var e=this;this.addDestroyableEventListener(this.eHeaderViewport,"scroll",(function(){var t=e.eHeaderViewport.scrollLeft;0!==t&&(e.gridPanel.scrollHorizontally(t),e.eHeaderViewport.scrollLeft=0)}))},t.prototype.setHeaderContainerWidth=function(e){this.eHeaderContainer.style.width=e+"px"},t.prototype.setLeftVisible=function(e){C._.setVisible(this.ePinnedLeftHeader,e)},t.prototype.setRightVisible=function(e){C._.setVisible(this.ePinnedRightHeader,e)},t.TEMPLATE='<div class="ag-header" role="row">\n <div class="ag-pinned-left-header" ref="ePinnedLeftHeader" role="presentation"></div>\n <div class="ag-header-viewport" ref="eHeaderViewport" role="presentation">\n <div class="ag-header-container" ref="eHeaderContainer" role="presentation"></div>\n </div>\n <div class="ag-pinned-right-header" ref="ePinnedRightHeader" role="presentation"></div>\n </div>',n([g.RefSelector("ePinnedLeftHeader"),s("design:type",HTMLElement)],t.prototype,"ePinnedLeftHeader",void 0),n([g.RefSelector("ePinnedRightHeader"),s("design:type",HTMLElement)],t.prototype,"ePinnedRightHeader",void 0),n([g.RefSelector("eHeaderContainer"),s("design:type",HTMLElement)],t.prototype,"eHeaderContainer",void 0),n([g.RefSelector("eHeaderViewport"),s("design:type",HTMLElement)],t.prototype,"eHeaderViewport",void 0),n([u.Autowired("gridOptionsWrapper"),s("design:type",a.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([u.Autowired("columnController"),s("design:type",l.ColumnController)],t.prototype,"columnController",void 0),n([u.Autowired("eventService"),s("design:type",d.EventService)],t.prototype,"eventService",void 0),n([u.Autowired("gridApi"),s("design:type",m.GridApi)],t.prototype,"gridApi",void 0),n([u.Autowired("autoWidthCalculator"),s("design:type",y.AutoWidthCalculator)],t.prototype,"autoWidthCalculator",void 0),n([u.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(f.Component);t.HeaderRootComp=w},92378:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(47721),l=o(13650),p=o(83423),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.modelFromFloatingFilter=function(e){return{type:this.selectedFilter,filter:Number(e),filterTo:this.filterNumberTo,filterType:"number"}},t.prototype.getApplicableFilterTypes=function(){return[l.BaseFilter.EQUALS,l.BaseFilter.NOT_EQUAL,l.BaseFilter.LESS_THAN,l.BaseFilter.LESS_THAN_OR_EQUAL,l.BaseFilter.GREATER_THAN,l.BaseFilter.GREATER_THAN_OR_EQUAL,l.BaseFilter.IN_RANGE]},t.prototype.bodyTemplate=function(e){var t=this.translate.bind(this),o=e==l.FilterConditionType.MAIN?"filterText":"filterConditionText",r=e==l.FilterConditionType.MAIN?"filterNumberToPanel":"filterNumberToPanelCondition",i=e==l.FilterConditionType.MAIN?"filterToText":"filterToConditionText";return'<div class="ag-filter-body">\n <div class="ag-input-text-wrapper">\n <input class="ag-filter-filter" id="'+o+'" type="text" placeholder="'+t("filterOoo")+'"/>\n </div>\n <div class="ag-input-text-wrapper ag-filter-number-to" id="'+r+'">\n <input class="ag-filter-filter" id="'+i+'" type="text" placeholder="'+t("filterOoo")+'"/>\n </div>\n </div>'},t.prototype.initialiseFilterBodyUi=function(t){e.prototype.initialiseFilterBodyUi.call(this,t),t===l.FilterConditionType.MAIN?(this.eFilterTextField=this.queryForHtmlInputElement("#filterText"),this.addFilterChangedEventListeners(t,this.eFilterTextField,this.eFilterToTextField)):(this.eFilterTextConditionField=this.queryForHtmlInputElement("#filterConditionText"),this.addFilterChangedEventListeners(t,this.eFilterTextConditionField,this.eFilterToConditionText),this.setFilter(this.filterNumberCondition,l.FilterConditionType.CONDITION),this.setFilterTo(this.filterNumberConditionTo,l.FilterConditionType.CONDITION),this.setFilterType(this.selectedFilterCondition,l.FilterConditionType.CONDITION))},t.prototype.addFilterChangedEventListeners=function(e,t,o){var r=this,i=this.getDebounceMs(this.filterParams),n=p._.debounce((function(){return r.onTextFieldsChanged(e,t,o)}),i);this.addDestroyableEventListener(t,"input",n),this.addDestroyableEventListener(o,"input",n)},t.prototype.afterGuiAttached=function(){this.eFilterTextField.focus()},t.prototype.comparator=function(){return function(e,t){return e===t?0:e<t?1:e>t?-1:void 0}},t.prototype.onTextFieldsChanged=function(e,t,o){var r=this.stringToFloat(t.value),i=this.stringToFloat(o.value);e===l.FilterConditionType.MAIN?this.filterNumber===r&&this.filterNumberTo===i||(this.filterNumber=r,this.filterNumberTo=i,this.onFilterChanged()):this.filterNumberCondition===r&&this.filterNumberConditionTo===i||(this.filterNumberCondition=r,this.filterNumberConditionTo=i,this.onFilterChanged())},t.prototype.filterValues=function(e){return e===l.FilterConditionType.MAIN?this.selectedFilter!==l.BaseFilter.IN_RANGE?this.asNumber(this.filterNumber):[this.asNumber(this.filterNumber),this.asNumber(this.filterNumberTo)]:this.selectedFilterCondition!==l.BaseFilter.IN_RANGE?this.asNumber(this.filterNumberCondition):[this.asNumber(this.filterNumberCondition),this.asNumber(this.filterNumberConditionTo)]},t.prototype.asNumber=function(e){return p._.isNumeric(e)?e:null},t.prototype.stringToFloat=function(e){var t=p._.makeNull(e);return t&&""===t.trim()&&(t=null),null!=t?parseFloat(t):null},t.prototype.setFilter=function(e,t){if(null!==(e=p._.makeNull(e))&&"number"!=typeof e&&(e=parseFloat(e)),t===l.FilterConditionType.MAIN){if(this.filterNumber=e,!this.eFilterTextField)return;this.eFilterTextField.value=e}else{if(this.filterNumberCondition=e,!this.eFilterTextConditionField)return;this.eFilterTextConditionField.value=e}},t.prototype.setFilterTo=function(e,t){if(null!==(e=p._.makeNull(e))&&"number"!=typeof e&&(e=parseFloat(e)),t===l.FilterConditionType.MAIN){if(this.filterNumberTo=e,!this.eFilterToTextField)return;this.eFilterToTextField.value=e}else{if(this.filterNumberConditionTo=e,!this.eFilterToConditionText)return;this.eFilterToConditionText.value=e}},t.prototype.getFilter=function(e){return e===l.FilterConditionType.MAIN?this.filterNumber:this.filterNumberCondition},t.prototype.serialize=function(e){var t=e===l.FilterConditionType.MAIN?this.selectedFilter:this.selectedFilterCondition,o=e===l.FilterConditionType.MAIN?this.filterNumber:this.filterNumberCondition,r=e===l.FilterConditionType.MAIN?this.filterNumberTo:this.filterNumberConditionTo;return{type:t||this.defaultFilter,filter:o,filterTo:r,filterType:"number"}},t.prototype.parse=function(e,t){this.setFilterType(e.type,t),this.setFilter(e.filter,t),this.setFilterTo(e.filterTo,t)},t.prototype.refreshFilterBodyUi=function(e){var o=e===l.FilterConditionType.MAIN?this.selectedFilter:this.selectedFilterCondition,r=e===l.FilterConditionType.MAIN?this.eNumberToPanel:this.eNumberToConditionPanel;if(r){var i=o===t.IN_RANGE;p._.setVisible(r,i)}var n=e===l.FilterConditionType.MAIN?this.eFilterTextField:this.eFilterTextConditionField;if(n){var s=!this.doesFilterHaveHiddenInput(o)&&o!==l.BaseFilter.EMPTY;p._.setVisible(n,s)}},t.prototype.resetState=function(e){void 0===e&&(e=!1),e||(this.setFilterType(this.defaultFilter,l.FilterConditionType.MAIN),this.setFilter(null,l.FilterConditionType.MAIN),this.setFilterTo(null,l.FilterConditionType.MAIN)),this.setFilterType(this.defaultFilter,l.FilterConditionType.CONDITION),this.setFilter(null,l.FilterConditionType.CONDITION),this.setFilterTo(null,l.FilterConditionType.CONDITION)},t.prototype.setType=function(e,t){this.setFilterType(e,t)},t.LESS_THAN="lessThan",n([a.QuerySelector("#filterText"),s("design:type",HTMLInputElement)],t.prototype,"eFilterTextField",void 0),n([a.QuerySelector("#filterTextCondition"),s("design:type",HTMLInputElement)],t.prototype,"eFilterTextConditionField",void 0),n([a.QuerySelector("#filterToText"),s("design:type",HTMLInputElement)],t.prototype,"eFilterToTextField",void 0),n([a.QuerySelector("#filterToConditionText"),s("design:type",HTMLInputElement)],t.prototype,"eFilterToConditionText",void 0),n([a.QuerySelector("#filterNumberToPanel"),s("design:type",HTMLElement)],t.prototype,"eNumberToPanel",void 0),n([a.QuerySelector("#filterNumberToPanelCondition"),s("design:type",HTMLElement)],t.prototype,"eNumberToConditionPanel",void 0),t}(l.ScalarBaseFilter);t.NumberFilter=u},92427:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(72493),a=function(){function e(){this.templateCache={},this.waitingCallbacks={}}return e.prototype.getTemplate=function(e,t){var o=this.templateCache[e];if(o)return o;var r=this.waitingCallbacks[e],i=this;if(!r){r=[],this.waitingCallbacks[e]=r;var n=new XMLHttpRequest;n.onload=function(){i.handleHttpResult(this,e)},n.open("GET",e),n.send()}return t&&r.push(t),null},e.prototype.handleHttpResult=function(e,t){if(200===e.status&&null!==e.response){this.templateCache[t]=e.response||e.responseText;for(var o=this.waitingCallbacks[t],r=0;r<o.length;r++)(0,o[r])();if(this.$scope){var i=this;window.setTimeout((function(){i.$scope.$apply()}),0)}}else console.warn("Unable to get template error "+e.status+" - "+t)},r([s.Autowired("$scope"),i("design:type",Object)],e.prototype,"$scope",void 0),r([n.Bean("templateService")],e)}();t.TemplateService=a},93121:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),s=o(44081),a=o(40634),l=function(){function e(){}return e.prototype.formatValue=function(e,t,o,r){var i,n=e.getColDef(),s=null;if(i=t&&t.rowPinned&&n.pinnedRowValueFormatter?n.pinnedRowValueFormatter:n.valueFormatter){var a={value:r,node:t,data:t?t.data:null,colDef:e.getColDef(),column:e,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()};a.$scope=o,s=this.expressionService.evaluate(i,a)}else if(n.refData)return n.refData[r]||"";return null==s&&Array.isArray(r)&&(s=r.join(", ")),s},r([n.Autowired("gridOptionsWrapper"),i("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([n.Autowired("expressionService"),i("design:type",a.ExpressionService)],e.prototype,"expressionService",void 0),r([n.Bean("valueFormatterService")],e)}();t.ValueFormatterService=l},93830:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(60843),l=o(72493),p=o(85786),u=o(8534),c=o(44871),d=o(40797),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.setMouseOver=function(e){this.selectedColumns=e;var t={type:p.Events.EVENT_COLUMN_HOVER_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)},t.prototype.clearMouseOver=function(){this.selectedColumns=null;var e={type:p.Events.EVENT_COLUMN_HOVER_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(e)},t.prototype.isHovered=function(e){return this.selectedColumns&&this.selectedColumns.indexOf(e)>=0},n([l.Autowired("eventService"),s("design:type",a.EventService)],t.prototype,"eventService",void 0),n([l.Autowired("columnApi"),s("design:type",c.ColumnApi)],t.prototype,"columnApi",void 0),n([l.Autowired("gridApi"),s("design:type",d.GridApi)],t.prototype,"gridApi",void 0),n([l.Bean("columnHoverService")],t)}(u.BeanStub);t.ColumnHoverService=h},94192:(e,t,o)=>{var r,i=o(65994).process,n=Object.create,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,p=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,c=(e,t,o,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of l(t))u.call(e,i)||i===o||s(e,i,{get:()=>t[i],enumerable:!(r=a(t,i))||r.enumerable});return e},d={};function h(...e){return e.reduce(((e,t)=>({...e,...null!=t?t:{}})),{})}function f(e){let t=!1;return new ReadableStream({async pull(o){if(!t)try{const{value:t,done:r}=await e.next();r?o.close():o.enqueue(t)}catch(e){o.error(e)}},async cancel(o){if(t=!0,e.return)try{await e.return(o)}catch(e){}}})}async function g(e,t){if(null==e)return Promise.resolve();const o=null==t?void 0:t.abortSignal;return new Promise(((t,r)=>{if(null==o?void 0:o.aborted)return void r(m());const i=setTimeout((()=>{n(),t()}),e),n=()=>{clearTimeout(i),null==o||o.removeEventListener("abort",s)},s=()=>{n(),r(m())};null==o||o.addEventListener("abort",s)}))}function m(){return new DOMException("Delay was aborted","AbortError")}((e,t)=>{for(var o in t)s(e,o,{get:t[o],enumerable:!0})})(d,{DelayedPromise:()=>y,EventSourceParserStream:()=>yt.EventSourceParserStream,VERSION:()=>x,asSchema:()=>pt,asValidator:()=>oe,combineHeaders:()=>h,convertAsyncIteratorToReadableStream:()=>f,convertBase64ToUint8Array:()=>dt,convertToBase64:()=>ft,convertUint8ArrayToBase64:()=>ht,createBinaryResponseHandler:()=>Pe,createEventSourceResponseHandler:()=>Oe,createIdGenerator:()=>w,createJsonErrorResponseHandler:()=>Se,createJsonResponseHandler:()=>Ae,createJsonStreamResponseHandler:()=>Te,createProviderDefinedToolFactory:()=>we,createProviderDefinedToolFactoryWithOutputSchema:()=>Ee,createStatusCodeErrorResponseHandler:()=>Ie,delay:()=>g,dynamicTool:()=>Ce,executeTool:()=>mt,extractResponseHeaders:()=>v,generateId:()=>E,getErrorMessage:()=>_,getFromApi:()=>N,getRuntimeEnvironmentUserAgent:()=>A,injectJsonInstructionIntoMessages:()=>L,isAbortError:()=>S,isParsableJson:()=>le,isUrlSupported:()=>G,isValidator:()=>ee,jsonSchema:()=>lt,lazySchema:()=>at,lazyValidator:()=>te,loadApiKey:()=>j,loadOptionalSetting:()=>W,loadSetting:()=>B,mediaTypeToExtension:()=>U,normalizeHeaders:()=>P,parseJSON:()=>se,parseJsonEventStream:()=>ue,parseProviderOptions:()=>de,postFormDataToApi:()=>me,postJsonToApi:()=>ge,postToApi:()=>ye,removeUndefinedEntries:()=>_e,resolve:()=>be,safeParseJSON:()=>ae,safeValidateTypes:()=>ne,standardSchemaValidator:()=>re,tool:()=>ve,validateTypes:()=>ie,validator:()=>X,withUserAgentSuffix:()=>I,withoutTrailingSlash:()=>gt,zodSchema:()=>nt}),e.exports=(r=d,c(s({},"__esModule",{value:!0}),r));var y=class{constructor(){this.status={type:"pending"},this._resolve=void 0,this._reject=void 0}get promise(){return this._promise||(this._promise=new Promise(((e,t)=>{"resolved"===this.status.type?e(this.status.value):"rejected"===this.status.type&&t(this.status.error),this._resolve=e,this._reject=t}))),this._promise}resolve(e){var t;this.status={type:"resolved",value:e},this._promise&&(null==(t=this._resolve)||t.call(this,e))}reject(e){var t;this.status={type:"rejected",error:e},this._promise&&(null==(t=this._reject)||t.call(this,e))}isResolved(){return"resolved"===this.status.type}isRejected(){return"rejected"===this.status.type}isPending(){return"pending"===this.status.type}};function v(e){return Object.fromEntries([...e.headers])}var C=o(10292),w=({prefix:e,size:t=16,alphabet:o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const i=()=>{const e=o.length,r=new Array(t);for(let i=0;i<t;i++)r[i]=o[Math.random()*e|0];return r.join("")};if(null==e)return i;if(o.includes(r))throw new C.InvalidArgumentError({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${o}".`});return()=>`${e}${r}${i()}`},E=w();function _(e){return null==e?"unknown error":"string"==typeof e?e:e instanceof Error?e.message:JSON.stringify(e)}var b=o(10292),R=o(10292);function S(e){return(e instanceof Error||e instanceof DOMException)&&("AbortError"===e.name||"ResponseAborted"===e.name||"TimeoutError"===e.name)}var O=["fetch failed","failed to fetch"];function T({error:e,url:t,requestBodyValues:o}){if(S(e))return e;if(e instanceof TypeError&&O.includes(e.message.toLowerCase())){const r=e.cause;if(null!=r)return new R.APICallError({message:`Cannot connect to API: ${r.message}`,cause:r,url:t,requestBodyValues:o,isRetryable:!0})}return e}function A(e=globalThis){var t,o,r;return e.window?"runtime/browser":(null==(t=e.navigator)?void 0:t.userAgent)?`runtime/${e.navigator.userAgent.toLowerCase()}`:(null==(r=null==(o=e.process)?void 0:o.versions)?void 0:r.node)?`runtime/node.js/${e.process.version.substring(0)}`:e.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function P(e){if(null==e)return{};const t={};if(e instanceof Headers)e.forEach(((e,o)=>{t[o.toLowerCase()]=e}));else{Array.isArray(e)||(e=Object.entries(e));for(const[o,r]of e)null!=r&&(t[o.toLowerCase()]=r)}return t}function I(e,...t){const o=new Headers(P(e)),r=o.get("user-agent")||"";return o.set("user-agent",[r,...t].filter(Boolean).join(" ")),Object.fromEntries(o.entries())}var x="3.0.20",D=()=>globalThis.fetch,N=async({url:e,headers:t={},successfulResponseHandler:o,failedResponseHandler:r,abortSignal:i,fetch:n=D()})=>{try{const s=await n(e,{method:"GET",headers:I(t,`ai-sdk/provider-utils/${x}`,A()),signal:i}),a=v(s);if(!s.ok){let t;try{t=await r({response:s,url:e,requestBodyValues:{}})}catch(t){if(S(t)||b.APICallError.isInstance(t))throw t;throw new b.APICallError({message:"Failed to process error response",cause:t,statusCode:s.status,url:e,responseHeaders:a,requestBodyValues:{}})}throw t.value}try{return await o({response:s,url:e,requestBodyValues:{}})}catch(t){if(t instanceof Error&&(S(t)||b.APICallError.isInstance(t)))throw t;throw new b.APICallError({message:"Failed to process successful response",cause:t,statusCode:s.status,url:e,responseHeaders:a,requestBodyValues:{}})}}catch(t){throw T({error:t,url:e,requestBodyValues:{}})}},F="JSON schema:",M="You MUST answer with a JSON object that matches the JSON schema above.",k="You MUST answer with JSON.";function L({messages:e,schema:t,schemaPrefix:o,schemaSuffix:r}){var i,n;const s="system"===(null==(i=e[0])?void 0:i.role)?{...e[0]}:{role:"system",content:""};return s.content=function({prompt:e,schema:t,schemaPrefix:o=(null!=t?F:void 0),schemaSuffix:r=(null!=t?M:k)}){return[null!=e&&e.length>0?e:void 0,null!=e&&e.length>0?"":void 0,o,null!=t?JSON.stringify(t):void 0,r].filter((e=>null!=e)).join("\n")}({prompt:s.content,schema:t,schemaPrefix:o,schemaSuffix:r}),[s,..."system"===(null==(n=e[0])?void 0:n.role)?e.slice(1):e]}function G({mediaType:e,url:t,supportedUrls:o}){return t=t.toLowerCase(),e=e.toLowerCase(),Object.entries(o).map((([e,t])=>{const o=e.toLowerCase();return"*"===o||"*/*"===o?{mediaTypePrefix:"",regexes:t}:{mediaTypePrefix:o.replace(/\*/,""),regexes:t}})).filter((({mediaTypePrefix:t})=>e.startsWith(t))).flatMap((({regexes:e})=>e)).some((e=>e.test(t)))}var V=o(10292);function j({apiKey:e,environmentVariableName:t,apiKeyParameterName:o="apiKey",description:r}){if("string"==typeof e)return e;if(null!=e)throw new V.LoadAPIKeyError({message:`${r} API key must be a string.`});if(void 0===i)throw new V.LoadAPIKeyError({message:`${r} API key is missing. Pass it using the '${o}' parameter. Environment variables is not supported in this environment.`});if(null==(e=i.env[t]))throw new V.LoadAPIKeyError({message:`${r} API key is missing. Pass it using the '${o}' parameter or the ${t} environment variable.`});if("string"!=typeof e)throw new V.LoadAPIKeyError({message:`${r} API key must be a string. The value of the ${t} environment variable is not a string.`});return e}function W({settingValue:e,environmentVariableName:t}){return"string"==typeof e||null==e&&void 0!==i&&null!=(e=i.env[t])&&"string"==typeof e?e:void 0}var H=o(10292);function B({settingValue:e,environmentVariableName:t,settingName:o,description:r}){if("string"==typeof e)return e;if(null!=e)throw new H.LoadSettingError({message:`${r} setting must be a string.`});if(void 0===i)throw new H.LoadSettingError({message:`${r} setting is missing. Pass it using the '${o}' parameter. Environment variables is not supported in this environment.`});if(null==(e=i.env[t]))throw new H.LoadSettingError({message:`${r} setting is missing. Pass it using the '${o}' parameter or the ${t} environment variable.`});if("string"!=typeof e)throw new H.LoadSettingError({message:`${r} setting must be a string. The value of the ${t} environment variable is not a string.`});return e}function U(e){var t;const[o,r=""]=e.toLowerCase().split("/");return null!=(t={mpeg:"mp3","x-wav":"wav",opus:"ogg",mp4:"m4a","x-m4a":"m4a"}[r])?t:r}var z=o(10292),Y=/"__proto__"\s*:/,q=/"constructor"\s*:/;function K(e){const t=JSON.parse(e);return null===t||"object"!=typeof t||!1===Y.test(e)&&!1===q.test(e)?t:function(e){let t=[e];for(;t.length;){const e=t;t=[];for(const o of e){if(Object.prototype.hasOwnProperty.call(o,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(o,"constructor")&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const e in o){const r=o[e];r&&"object"==typeof r&&t.push(r)}}}return e}(t)}function $(e){const{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch(t){return K(e)}try{return K(e)}finally{Error.stackTraceLimit=t}}var Z=o(10292),J=o(10292),Q=Symbol.for("vercel.ai.validator");function X(e){return{[Q]:!0,validate:e}}function ee(e){return"object"==typeof e&&null!==e&&Q in e&&!0===e[Q]&&"validate"in e}function te(e){let t;return()=>(null==t&&(t=e()),t)}function oe(e){return ee(e)?e:"function"==typeof e?e():re(e)}function re(e){return X((async t=>{const o=await e["~standard"].validate(t);return null==o.issues?{success:!0,value:o.value}:{success:!1,error:new J.TypeValidationError({value:t,cause:o.issues})}}))}async function ie({value:e,schema:t}){const o=await ne({value:e,schema:t});if(!o.success)throw Z.TypeValidationError.wrap({value:e,cause:o.error});return o.value}async function ne({value:e,schema:t}){const o=oe(t);try{if(null==o.validate)return{success:!0,value:e,rawValue:e};const t=await o.validate(e);return t.success?{success:!0,value:t.value,rawValue:e}:{success:!1,error:Z.TypeValidationError.wrap({value:e,cause:t.error}),rawValue:e}}catch(t){return{success:!1,error:Z.TypeValidationError.wrap({value:e,cause:t}),rawValue:e}}}async function se({text:e,schema:t}){try{const o=$(e);return null==t?o:ie({value:o,schema:t})}catch(t){if(z.JSONParseError.isInstance(t)||z.TypeValidationError.isInstance(t))throw t;throw new z.JSONParseError({text:e,cause:t})}}async function ae({text:e,schema:t}){try{const o=$(e);return null==t?{success:!0,value:o,rawValue:o}:await ne({value:o,schema:t})}catch(t){return{success:!1,error:z.JSONParseError.isInstance(t)?t:new z.JSONParseError({text:e,cause:t}),rawValue:void 0}}}function le(e){try{return $(e),!0}catch(e){return!1}}var pe=o(19538);function ue({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new pe.EventSourceParserStream).pipeThrough(new TransformStream({async transform({data:e},o){"[DONE]"!==e&&o.enqueue(await ae({text:e,schema:t}))}}))}var ce=o(10292);async function de({provider:e,providerOptions:t,schema:o}){if(null==(null==t?void 0:t[e]))return;const r=await ne({value:t[e],schema:o});if(!r.success)throw new ce.InvalidArgumentError({argument:"providerOptions",message:`invalid ${e} provider options`,cause:r.error});return r.value}var he=o(10292),fe=()=>globalThis.fetch,ge=async({url:e,headers:t,body:o,failedResponseHandler:r,successfulResponseHandler:i,abortSignal:n,fetch:s})=>ye({url:e,headers:{"Content-Type":"application/json",...t},body:{content:JSON.stringify(o),values:o},failedResponseHandler:r,successfulResponseHandler:i,abortSignal:n,fetch:s}),me=async({url:e,headers:t,formData:o,failedResponseHandler:r,successfulResponseHandler:i,abortSignal:n,fetch:s})=>ye({url:e,headers:t,body:{content:o,values:Object.fromEntries(o.entries())},failedResponseHandler:r,successfulResponseHandler:i,abortSignal:n,fetch:s}),ye=async({url:e,headers:t={},body:o,successfulResponseHandler:r,failedResponseHandler:i,abortSignal:n,fetch:s=fe()})=>{try{const a=await s(e,{method:"POST",headers:I(t,`ai-sdk/provider-utils/${x}`,A()),body:o.content,signal:n}),l=v(a);if(!a.ok){let t;try{t=await i({response:a,url:e,requestBodyValues:o.values})}catch(t){if(S(t)||he.APICallError.isInstance(t))throw t;throw new he.APICallError({message:"Failed to process error response",cause:t,statusCode:a.status,url:e,responseHeaders:l,requestBodyValues:o.values})}throw t.value}try{return await r({response:a,url:e,requestBodyValues:o.values})}catch(t){if(t instanceof Error&&(S(t)||he.APICallError.isInstance(t)))throw t;throw new he.APICallError({message:"Failed to process successful response",cause:t,statusCode:a.status,url:e,responseHeaders:l,requestBodyValues:o.values})}}catch(t){throw T({error:t,url:e,requestBodyValues:o.values})}};function ve(e){return e}function Ce(e){return{...e,type:"dynamic"}}function we({id:e,name:t,inputSchema:o}){return({execute:r,outputSchema:i,toModelOutput:n,onInputStart:s,onInputDelta:a,onInputAvailable:l,...p})=>({type:"provider-defined",id:e,name:t,args:p,inputSchema:o,outputSchema:i,execute:r,toModelOutput:n,onInputStart:s,onInputDelta:a,onInputAvailable:l})}function Ee({id:e,name:t,inputSchema:o,outputSchema:r}){return({execute:i,toModelOutput:n,onInputStart:s,onInputDelta:a,onInputAvailable:l,...p})=>({type:"provider-defined",id:e,name:t,args:p,inputSchema:o,outputSchema:r,execute:i,toModelOutput:n,onInputStart:s,onInputDelta:a,onInputAvailable:l})}function _e(e){return Object.fromEntries(Object.entries(e).filter((([e,t])=>null!=t)))}async function be(e){return"function"==typeof e&&(e=e()),Promise.resolve(e)}var Re=o(10292),Se=({errorSchema:e,errorToMessage:t,isRetryable:o})=>async({response:r,url:i,requestBodyValues:n})=>{const s=await r.text(),a=v(r);if(""===s.trim())return{responseHeaders:a,value:new Re.APICallError({message:r.statusText,url:i,requestBodyValues:n,statusCode:r.status,responseHeaders:a,responseBody:s,isRetryable:null==o?void 0:o(r)})};try{const l=await se({text:s,schema:e});return{responseHeaders:a,value:new Re.APICallError({message:t(l),url:i,requestBodyValues:n,statusCode:r.status,responseHeaders:a,responseBody:s,data:l,isRetryable:null==o?void 0:o(r,l)})}}catch(e){return{responseHeaders:a,value:new Re.APICallError({message:r.statusText,url:i,requestBodyValues:n,statusCode:r.status,responseHeaders:a,responseBody:s,isRetryable:null==o?void 0:o(r)})}}},Oe=e=>async({response:t})=>{const o=v(t);if(null==t.body)throw new Re.EmptyResponseBodyError({});return{responseHeaders:o,value:ue({stream:t.body,schema:e})}},Te=e=>async({response:t})=>{const o=v(t);if(null==t.body)throw new Re.EmptyResponseBodyError({});let r="";return{responseHeaders:o,value:t.body.pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({async transform(t,o){t.endsWith("\n")?(o.enqueue(await ae({text:r+t,schema:e})),r=""):r+=t}}))}},Ae=e=>async({response:t,url:o,requestBodyValues:r})=>{const i=await t.text(),n=await ae({text:i,schema:e}),s=v(t);if(!n.success)throw new Re.APICallError({message:"Invalid JSON response",cause:n.error,statusCode:t.status,responseHeaders:s,responseBody:i,url:o,requestBodyValues:r});return{responseHeaders:s,value:n.value,rawValue:n.rawValue}},Pe=()=>async({response:e,url:t,requestBodyValues:o})=>{const r=v(e);if(!e.body)throw new Re.APICallError({message:"Response body is empty",url:t,requestBodyValues:o,statusCode:e.status,responseHeaders:r,responseBody:void 0});try{const t=await e.arrayBuffer();return{responseHeaders:r,value:new Uint8Array(t)}}catch(i){throw new Re.APICallError({message:"Failed to read response as array buffer",url:t,requestBodyValues:o,statusCode:e.status,responseHeaders:r,responseBody:void 0,cause:i})}},Ie=()=>async({response:e,url:t,requestBodyValues:o})=>{const r=v(e),i=await e.text();return{responseHeaders:r,value:new Re.APICallError({message:e.statusText,url:t,requestBodyValues:o,statusCode:e.status,responseHeaders:r,responseBody:i})}},xe=((e,t,o)=>(o=null!=e?n(p(e)):{},c(e&&e.__esModule?o:s(o,"default",{value:e,enumerable:!0}),e)))(o(19844));function De(e){if("object"===e.type){e.additionalProperties=!1;const t=e.properties;if(null!=t)for(const e in t)t[e]=De(t[e])}return"array"===e.type&&null!=e.items&&(Array.isArray(e.items)?e.items=e.items.map((e=>De(e))):e.items=De(e.items)),e}var Ne=(e,t)=>{let o=0;for(;o<e.length&&o<t.length&&e[o]===t[o];o++);return[(e.length-o).toString(),...t.slice(o)].join("/")},Fe=Symbol("Let zodToJsonSchema decide on which parser to use"),Me={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},ke=o(79203),Le=o(79203);function Ge(e,t){return et(e.type._def,t)}function Ve(e,t,o){const r=null!=o?o:t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map(((o,r)=>Ve(e,t,o)))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return je(e)}}var je=e=>{const t={type:"integer",format:"unix-time"};for(const o of e.checks)switch(o.kind){case"min":t.minimum=o.value;break;case"max":t.maximum=o.value}return t},We=o(79203),He=void 0,Be={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(void 0===He&&(He=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),He),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function Ue(e,t){const o={type:"string"};if(e.checks)for(const r of e.checks)switch(r.kind){case"min":o.minLength="number"==typeof o.minLength?Math.max(o.minLength,r.value):r.value;break;case"max":o.maxLength="number"==typeof o.maxLength?Math.min(o.maxLength,r.value):r.value;break;case"email":switch(t.emailStrategy){case"format:email":qe(o,"email",r.message,t);break;case"format:idn-email":qe(o,"idn-email",r.message,t);break;case"pattern:zod":Ke(o,Be.email,r.message,t)}break;case"url":qe(o,"uri",r.message,t);break;case"uuid":qe(o,"uuid",r.message,t);break;case"regex":Ke(o,r.regex,r.message,t);break;case"cuid":Ke(o,Be.cuid,r.message,t);break;case"cuid2":Ke(o,Be.cuid2,r.message,t);break;case"startsWith":Ke(o,RegExp(`^${ze(r.value,t)}`),r.message,t);break;case"endsWith":Ke(o,RegExp(`${ze(r.value,t)}$`),r.message,t);break;case"datetime":qe(o,"date-time",r.message,t);break;case"date":qe(o,"date",r.message,t);break;case"time":qe(o,"time",r.message,t);break;case"duration":qe(o,"duration",r.message,t);break;case"length":o.minLength="number"==typeof o.minLength?Math.max(o.minLength,r.value):r.value,o.maxLength="number"==typeof o.maxLength?Math.min(o.maxLength,r.value):r.value;break;case"includes":Ke(o,RegExp(ze(r.value,t)),r.message,t);break;case"ip":"v6"!==r.version&&qe(o,"ipv4",r.message,t),"v4"!==r.version&&qe(o,"ipv6",r.message,t);break;case"base64url":Ke(o,Be.base64url,r.message,t);break;case"jwt":Ke(o,Be.jwt,r.message,t);break;case"cidr":"v6"!==r.version&&Ke(o,Be.ipv4Cidr,r.message,t),"v4"!==r.version&&Ke(o,Be.ipv6Cidr,r.message,t);break;case"emoji":Ke(o,Be.emoji(),r.message,t);break;case"ulid":Ke(o,Be.ulid,r.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":qe(o,"binary",r.message,t);break;case"contentEncoding:base64":o.contentEncoding="base64";break;case"pattern:zod":Ke(o,Be.base64,r.message,t)}break;case"nanoid":Ke(o,Be.nanoid,r.message,t)}return o}function ze(e,t){return"escape"===t.patternStrategy?function(e){let t="";for(let o=0;o<e.length;o++)Ye.has(e[o])||(t+="\\"),t+=e[o];return t}(e):e}var Ye=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function qe(e,t,o,r){var i;e.format||(null==(i=e.anyOf)?void 0:i.some((e=>e.format)))?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...o&&r.errorMessages&&{errorMessage:{format:o}}})):e.format=t}function Ke(e,t,o,r){var i;e.pattern||(null==(i=e.allOf)?void 0:i.some((e=>e.pattern)))?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:$e(t,r),...o&&r.errorMessages&&{errorMessage:{pattern:o}}})):e.pattern=$e(t,r)}function $e(e,t){var o;if(!t.applyRegexFlags||!e.flags)return e.source;const r=e.flags.includes("i"),i=e.flags.includes("m"),n=e.flags.includes("s"),s=r?e.source.toLowerCase():e.source;let a="",l=!1,p=!1,u=!1;for(let e=0;e<s.length;e++)if(l)a+=s[e],l=!1;else{if(r)if(p){if(s[e].match(/[a-z]/)){u?(a+=s[e],a+=`${s[e-2]}-${s[e]}`.toUpperCase(),u=!1):"-"===s[e+1]&&(null==(o=s[e+2])?void 0:o.match(/[a-z]/))?(a+=s[e],u=!0):a+=`${s[e]}${s[e].toUpperCase()}`;continue}}else if(s[e].match(/[a-z]/)){a+=`[${s[e]}${s[e].toUpperCase()}]`;continue}if(i){if("^"===s[e]){a+="(^|(?<=[\r\n]))";continue}if("$"===s[e]){a+="($|(?=[\r\n]))";continue}}n&&"."===s[e]?a+=p?`${s[e]}\r\n`:`[${s[e]}\r\n]`:(a+=s[e],"\\"===s[e]?l=!0:p&&"]"===s[e]?p=!1:p||"["!==s[e]||(p=!0))}try{new RegExp(a)}catch(o){return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return a}function Ze(e,t){var o,r,i,n,s,a;const l={type:"object",additionalProperties:null!=(o=et(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))?o:t.allowedAdditionalProperties};if((null==(r=e.keyType)?void 0:r._def.typeName)===We.ZodFirstPartyTypeKind.ZodString&&(null==(i=e.keyType._def.checks)?void 0:i.length)){const{type:o,...r}=Ue(e.keyType._def,t);return{...l,propertyNames:r}}if((null==(n=e.keyType)?void 0:n._def.typeName)===We.ZodFirstPartyTypeKind.ZodEnum)return{...l,propertyNames:{enum:e.keyType._def.values}};if((null==(s=e.keyType)?void 0:s._def.typeName)===We.ZodFirstPartyTypeKind.ZodBranded&&e.keyType._def.type._def.typeName===We.ZodFirstPartyTypeKind.ZodString&&(null==(a=e.keyType._def.type._def.checks)?void 0:a.length)){const{type:o,...r}=Ge(e.keyType._def,t);return{...l,propertyNames:r}}return l}var Je={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function Qe(e){try{return e.isOptional()}catch(e){return!0}}var Xe=(e,t,o)=>{switch(t){case ke.ZodFirstPartyTypeKind.ZodString:return Ue(e,o);case ke.ZodFirstPartyTypeKind.ZodNumber:return function(e){const t={type:"number"};if(!e.checks)return t;for(const o of e.checks)switch(o.kind){case"int":t.type="integer";break;case"min":o.inclusive?t.minimum=o.value:t.exclusiveMinimum=o.value;break;case"max":o.inclusive?t.maximum=o.value:t.exclusiveMaximum=o.value;break;case"multipleOf":t.multipleOf=o.value}return t}(e);case ke.ZodFirstPartyTypeKind.ZodObject:return function(e,t){const o={type:"object",properties:{}},r=[],i=e.shape();for(const e in i){let n=i[e];if(void 0===n||void 0===n._def)continue;const s=Qe(n),a=et(n._def,{...t,currentPath:[...t.currentPath,"properties",e],propertyPath:[...t.currentPath,"properties",e]});void 0!==a&&(o.properties[e]=a,s||r.push(e))}r.length&&(o.required=r);const n=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return et(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}(e,t);return void 0!==n&&(o.additionalProperties=n),o}(e,o);case ke.ZodFirstPartyTypeKind.ZodBigInt:return function(e){const t={type:"integer",format:"int64"};if(!e.checks)return t;for(const o of e.checks)switch(o.kind){case"min":o.inclusive?t.minimum=o.value:t.exclusiveMinimum=o.value;break;case"max":o.inclusive?t.maximum=o.value:t.exclusiveMaximum=o.value;break;case"multipleOf":t.multipleOf=o.value}return t}(e);case ke.ZodFirstPartyTypeKind.ZodBoolean:return{type:"boolean"};case ke.ZodFirstPartyTypeKind.ZodDate:return Ve(e,o);case ke.ZodFirstPartyTypeKind.ZodUndefined:return{not:{}};case ke.ZodFirstPartyTypeKind.ZodNull:return{type:"null"};case ke.ZodFirstPartyTypeKind.ZodArray:return function(e,t){var o,r,i;const n={type:"array"};return(null==(o=e.type)?void 0:o._def)&&(null==(i=null==(r=e.type)?void 0:r._def)?void 0:i.typeName)!==Le.ZodFirstPartyTypeKind.ZodAny&&(n.items=et(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(n.minItems=e.minLength.value),e.maxLength&&(n.maxItems=e.maxLength.value),e.exactLength&&(n.minItems=e.exactLength.value,n.maxItems=e.exactLength.value),n}(e,o);case ke.ZodFirstPartyTypeKind.ZodUnion:case ke.ZodFirstPartyTypeKind.ZodDiscriminatedUnion:return function(e,t){const o=e.options instanceof Map?Array.from(e.options.values()):e.options;if(o.every((e=>e._def.typeName in Je&&(!e._def.checks||!e._def.checks.length)))){const e=o.reduce(((e,t)=>{const o=Je[t._def.typeName];return o&&!e.includes(o)?[...e,o]:e}),[]);return{type:e.length>1?e:e[0]}}if(o.every((e=>"ZodLiteral"===e._def.typeName&&!e.description))){const e=o.reduce(((e,t)=>{const o=typeof t._def.value;switch(o){case"string":case"number":case"boolean":return[...e,o];case"bigint":return[...e,"integer"];case"object":if(null===t._def.value)return[...e,"null"];default:return e}}),[]);if(e.length===o.length){const t=e.filter(((e,t,o)=>o.indexOf(e)===t));return{type:t.length>1?t:t[0],enum:o.reduce(((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value]),[])}}}else if(o.every((e=>"ZodEnum"===e._def.typeName)))return{type:"string",enum:o.reduce(((e,t)=>[...e,...t._def.values.filter((t=>!e.includes(t)))]),[])};return((e,t)=>{const o=(e.options instanceof Map?Array.from(e.options.values()):e.options).map(((e,o)=>et(e._def,{...t,currentPath:[...t.currentPath,"anyOf",`${o}`]}))).filter((e=>!!e&&(!t.strictUnions||"object"==typeof e&&Object.keys(e).length>0)));return o.length?{anyOf:o}:void 0})(e,t)}(e,o);case ke.ZodFirstPartyTypeKind.ZodIntersection:return function(e,t){const o=[et(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),et(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter((e=>!!e)),r=[];return o.forEach((e=>{if("type"in(t=e)&&"string"===t.type||!("allOf"in t)){let t=e;if("additionalProperties"in e&&!1===e.additionalProperties){const{additionalProperties:o,...r}=e;t=r}r.push(t)}else r.push(...e.allOf);var t})),r.length?{allOf:r}:void 0}(e,o);case ke.ZodFirstPartyTypeKind.ZodTuple:return function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map(((e,o)=>et(e._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]}))).reduce(((e,t)=>void 0===t?e:[...e,t]),[]),additionalItems:et(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map(((e,o)=>et(e._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]}))).reduce(((e,t)=>void 0===t?e:[...e,t]),[])}}(e,o);case ke.ZodFirstPartyTypeKind.ZodRecord:return Ze(e,o);case ke.ZodFirstPartyTypeKind.ZodLiteral:return function(e){const t=typeof e.value;return"bigint"!==t&&"number"!==t&&"boolean"!==t&&"string"!==t?{type:Array.isArray(e.value)?"array":"object"}:{type:"bigint"===t?"integer":t,const:e.value}}(e);case ke.ZodFirstPartyTypeKind.ZodEnum:return function(e){return{type:"string",enum:Array.from(e.values)}}(e);case ke.ZodFirstPartyTypeKind.ZodNativeEnum:return function(e){const t=e.values,o=Object.keys(e.values).filter((e=>"number"!=typeof t[t[e]])).map((e=>t[e])),r=Array.from(new Set(o.map((e=>typeof e))));return{type:1===r.length?"string"===r[0]?"string":"number":["string","number"],enum:o}}(e);case ke.ZodFirstPartyTypeKind.ZodNullable:return function(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[Je[e.innerType._def.typeName],"null"]};const o=et(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return o&&{anyOf:[o,{type:"null"}]}}(e,o);case ke.ZodFirstPartyTypeKind.ZodOptional:return((e,t)=>{var o;if(t.currentPath.toString()===(null==(o=t.propertyPath)?void 0:o.toString()))return et(e.innerType._def,t);const r=et(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:{}},r]}:{}})(e,o);case ke.ZodFirstPartyTypeKind.ZodMap:return function(e,t){return"record"===t.mapStrategy?Ze(e,t):{type:"array",maxItems:125,items:{type:"array",items:[et(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||{},et(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||{}],minItems:2,maxItems:2}}}(e,o);case ke.ZodFirstPartyTypeKind.ZodSet:return function(e,t){const o={type:"array",uniqueItems:!0,items:et(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(o.minItems=e.minSize.value),e.maxSize&&(o.maxItems=e.maxSize.value),o}(e,o);case ke.ZodFirstPartyTypeKind.ZodLazy:return()=>e.getter()._def;case ke.ZodFirstPartyTypeKind.ZodPromise:return function(e,t){return et(e.type._def,t)}(e,o);case ke.ZodFirstPartyTypeKind.ZodNaN:case ke.ZodFirstPartyTypeKind.ZodNever:return{not:{}};case ke.ZodFirstPartyTypeKind.ZodEffects:return function(e,t){return"input"===t.effectStrategy?et(e.schema._def,t):{}}(e,o);case ke.ZodFirstPartyTypeKind.ZodAny:case ke.ZodFirstPartyTypeKind.ZodUnknown:return{};case ke.ZodFirstPartyTypeKind.ZodDefault:return function(e,t){return{...et(e.innerType._def,t),default:e.defaultValue()}}(e,o);case ke.ZodFirstPartyTypeKind.ZodBranded:return Ge(e,o);case ke.ZodFirstPartyTypeKind.ZodReadonly:case ke.ZodFirstPartyTypeKind.ZodCatch:return((e,t)=>et(e.innerType._def,t))(e,o);case ke.ZodFirstPartyTypeKind.ZodPipeline:return((e,t)=>{if("input"===t.pipeStrategy)return et(e.in._def,t);if("output"===t.pipeStrategy)return et(e.out._def,t);const o=et(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]});return{allOf:[o,et(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",o?"1":"0"]})].filter((e=>void 0!==e))}})(e,o);case ke.ZodFirstPartyTypeKind.ZodFunction:case ke.ZodFirstPartyTypeKind.ZodVoid:case ke.ZodFirstPartyTypeKind.ZodSymbol:default:return}};function et(e,t,o=!1){var r;const i=t.seen.get(e);if(t.override){const n=null==(r=t.override)?void 0:r.call(t,e,t,i,o);if(n!==Fe)return n}if(i&&!o){const e=tt(i,t);if(void 0!==e)return e}const n={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,n);const s=Xe(e,e.typeName,t),a="function"==typeof s?et(s(),t):s;if(a&&ot(e,t,a),t.postProcess){const o=t.postProcess(a,e,t);return n.jsonSchema=a,o}return n.jsonSchema=a,a}var tt=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Ne(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every(((e,o)=>t.currentPath[o]===e))?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),{}):"seen"===t.$refStrategy?{}:void 0}},ot=(e,t,o)=>(e.description&&(o.description=e.description),o),rt=(e,t)=>{var o;const r=(e=>{const t=(e=>"string"==typeof e?{...Me,name:e}:{...Me,...e})(e),o=void 0!==t.name?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:o,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map((([e,o])=>[o._def,{def:o._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}])))}})(t);let i="object"==typeof t&&t.definitions?Object.entries(t.definitions).reduce(((e,[t,o])=>{var i;return{...e,[t]:null!=(i=et(o._def,{...r,currentPath:[...r.basePath,r.definitionPath,t]},!0))?i:{}}}),{}):void 0;const n="string"==typeof t?t:"title"===(null==t?void 0:t.nameStrategy)||null==t?void 0:t.name,s=null!=(o=et(e._def,void 0===n?r:{...r,currentPath:[...r.basePath,r.definitionPath,n]},!1))?o:{},a="object"==typeof t&&void 0!==t.name&&"title"===t.nameStrategy?t.name:void 0;void 0!==a&&(s.title=a);const l=void 0===n?i?{...s,[r.definitionPath]:i}:s:{$ref:[..."relative"===r.$refStrategy?[]:r.basePath,r.definitionPath,n].join("/"),[r.definitionPath]:{...i,[n]:s}};return l.$schema="http://json-schema.org/draft-07/schema#",l};function it(e,t){var o;const r=null!=(o=null==t?void 0:t.useReferences)&&o;return lt((()=>De(xe.toJSONSchema(e,{target:"draft-7",io:"input",reused:r?"ref":"inline"}))),{validate:async t=>{const o=await xe.safeParseAsync(e,t);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}function nt(e,t){return function(e){return"_zod"in e}(e)?it(e,t):function(e,t){var o;const r=null!=(o=null==t?void 0:t.useReferences)&&o;return lt((()=>rt(e,{$refStrategy:r?"root":"none"})),{validate:async t=>{const o=await e.safeParseAsync(t);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}(e,t)}var st=Symbol.for("vercel.ai.schema");function at(e){let t;return()=>(null==t&&(t=e()),t)}function lt(e,{validate:t}={}){return{[st]:!0,_type:void 0,[Q]:!0,get jsonSchema(){return"function"==typeof e&&(e=e()),e},validate:t}}function pt(e){return null==e?lt({properties:{},additionalProperties:!1}):"object"==typeof(t=e)&&null!==t&&st in t&&!0===t[st]&&"jsonSchema"in t&&"validate"in t?e:"function"==typeof e?e():nt(e);var t}var{btoa:ut,atob:ct}=globalThis;function dt(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),o=ct(t);return Uint8Array.from(o,(e=>e.codePointAt(0)))}function ht(e){let t="";for(let o=0;o<e.length;o++)t+=String.fromCodePoint(e[o]);return ut(t)}function ft(e){return e instanceof Uint8Array?ht(e):e}function gt(e){return null==e?void 0:e.replace(/\/$/,"")}async function*mt({execute:e,input:t,options:o}){const r=e(t,o);if(null!=(i=r)&&"function"==typeof i[Symbol.asyncIterator]){let e;for await(const t of r)e=t,yield{type:"preliminary",output:t};yield{type:"final",output:e}}else yield{type:"final",output:await r};var i}((e,t,o)=>{c(e,t,"default"),o&&c(o,t,"default")})(d,o(52564),e.exports);var yt=o(19538)},95125:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(22131),l=o(15068),p=o(72493),u=o(44081),c=o(85786),d=o(60843),h=o(40797),f=o(44871),g=o(83423),m=function(e){function t(){return e.call(this,'<span class="ag-selection-checkbox" unselectable="on"/>')||this}return i(t,e),t.prototype.createAndAddIcons=function(){this.eCheckedIcon=g._.createIconNoSpan("checkboxChecked",this.gridOptionsWrapper,this.column),this.eUncheckedIcon=g._.createIconNoSpan("checkboxUnchecked",this.gridOptionsWrapper,this.column),this.eIndeterminateIcon=g._.createIconNoSpan("checkboxIndeterminate",this.gridOptionsWrapper,this.column);var e=this.getGui();e.appendChild(this.eCheckedIcon),e.appendChild(this.eUncheckedIcon),e.appendChild(this.eIndeterminateIcon)},t.prototype.onDataChanged=function(){this.onSelectionChanged()},t.prototype.onSelectableChanged=function(){this.showOrHideSelect()},t.prototype.onSelectionChanged=function(){var e=this.rowNode.isSelected();g._.setVisible(this.eCheckedIcon,!0===e),g._.setVisible(this.eUncheckedIcon,!1===e),g._.setVisible(this.eIndeterminateIcon,"boolean"!=typeof e)},t.prototype.onCheckedClicked=function(){var e=this.gridOptionsWrapper.isGroupSelectsFiltered();return this.rowNode.setSelectedParams({newValue:!1,groupSelectsFiltered:e})},t.prototype.onUncheckedClicked=function(e){var t=this.gridOptionsWrapper.isGroupSelectsFiltered();return this.rowNode.setSelectedParams({newValue:!0,rangeSelect:e.shiftKey,groupSelectsFiltered:t})},t.prototype.onIndeterminateClicked=function(e){0===this.onUncheckedClicked(e)&&this.onCheckedClicked()},t.prototype.init=function(e){this.rowNode=e.rowNode,this.column=e.column,this.createAndAddIcons(),this.onSelectionChanged(),this.addGuiEventListener("click",(function(e){return g._.stopPropagationForAgGrid(e)})),this.addGuiEventListener("dblclick",(function(e){return g._.stopPropagationForAgGrid(e)})),this.addDestroyableEventListener(this.eCheckedIcon,"click",this.onCheckedClicked.bind(this)),this.addDestroyableEventListener(this.eUncheckedIcon,"click",this.onUncheckedClicked.bind(this)),this.addDestroyableEventListener(this.eIndeterminateIcon,"click",this.onIndeterminateClicked.bind(this)),this.addDestroyableEventListener(this.rowNode,l.RowNode.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,l.RowNode.EVENT_DATA_CHANGED,this.onDataChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,l.RowNode.EVENT_SELECTABLE_CHANGED,this.onSelectableChanged.bind(this)),this.isRowSelectableFunc=this.gridOptionsWrapper.getIsRowSelectableFunc(),(this.isRowSelectableFunc||this.checkboxCallbackExists())&&(this.addDestroyableEventListener(this.eventService,c.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.showOrHideSelect.bind(this)),this.showOrHideSelect())},t.prototype.showOrHideSelect=function(){var e=this.rowNode.selectable;e&&this.checkboxCallbackExists()&&(e=this.column.isCellCheckboxSelection(this.rowNode)),this.setVisible(e)},t.prototype.checkboxCallbackExists=function(){var e=this.column?this.column.getColDef():null;return e&&"function"==typeof e.checkboxSelection},n([p.Autowired("gridOptionsWrapper"),s("design:type",u.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([p.Autowired("eventService"),s("design:type",d.EventService)],t.prototype,"eventService",void 0),n([p.Autowired("gridApi"),s("design:type",h.GridApi)],t.prototype,"gridApi",void 0),n([p.Autowired("columnApi"),s("design:type",f.ColumnApi)],t.prototype,"columnApi",void 0),t}(a.Component);t.CheckboxSelectionComponent=m},95574:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(22131),l=o(98239),p=o(44081),u=o(72493),c=o(66419),d=o(47721),h=o(72948),f=o(83423),g=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return i(t,e),t.prototype.init=function(e){this.params=e,this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()},t.prototype.setupExpandIcons=function(){var e=this;this.addInIcon("columnGroupOpened","agOpened"),this.addInIcon("columnGroupClosed","agClosed");var t=function(t){if(!f._.isStopPropagationForAgGrid(t)){var o=!e.params.columnGroup.isExpanded();e.columnController.setColumnGroupOpened(e.params.columnGroup.getOriginalColumnGroup(),o,"uiColumnExpanded")}};this.addTouchAndClickListeners(this.eCloseIcon,t),this.addTouchAndClickListeners(this.eOpenIcon,t);var o=function(e){f._.stopPropagationForAgGrid(e)};this.addDestroyableEventListener(this.eCloseIcon,"dblclick",o),this.addDestroyableEventListener(this.eOpenIcon,"dblclick",o),this.addDestroyableEventListener(this.getGui(),"dblclick",t),this.updateIconVisibility();var r=this.params.columnGroup.getOriginalColumnGroup();this.addDestroyableEventListener(r,h.OriginalColumnGroup.EVENT_EXPANDED_CHANGED,this.updateIconVisibility.bind(this)),this.addDestroyableEventListener(r,h.OriginalColumnGroup.EVENT_EXPANDABLE_CHANGED,this.updateIconVisibility.bind(this))},t.prototype.addTouchAndClickListeners=function(e,t){var o=new c.TouchListener(this.eCloseIcon);this.addDestroyableEventListener(o,c.TouchListener.EVENT_TAP,t),this.addDestroyFunc((function(){return o.destroy()})),this.addDestroyableEventListener(e,"click",t)},t.prototype.updateIconVisibility=function(){if(this.params.columnGroup.isExpandable()){var e=this.params.columnGroup.isExpanded();f._.setVisible(this.eOpenIcon,!e),f._.setVisible(this.eCloseIcon,e)}else f._.setVisible(this.eOpenIcon,!1),f._.setVisible(this.eCloseIcon,!1)},t.prototype.addInIcon=function(e,t){var o=f._.createIconNoSpan(e,this.gridOptionsWrapper,null);this.getRefElement(t).appendChild(o)},t.prototype.addGroupExpandIcon=function(){if(!this.params.columnGroup.isExpandable())return f._.setVisible(this.eOpenIcon,!1),void f._.setVisible(this.eCloseIcon,!1)},t.prototype.setupLabel=function(){this.params.displayName&&""!==this.params.displayName&&(this.getRefElement("agLabel").innerHTML=this.params.displayName)},t.TEMPLATE='<div class="ag-header-group-cell-label" ref="agContainer"><span ref="agLabel" class="ag-header-group-text"></span><span ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span><span ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span></div>',n([u.Autowired("columnController"),s("design:type",l.ColumnController)],t.prototype,"columnController",void 0),n([u.Autowired("gridOptionsWrapper"),s("design:type",p.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([d.RefSelector("agOpened"),s("design:type",HTMLElement)],t.prototype,"eOpenIcon",void 0),n([d.RefSelector("agClosed"),s("design:type",HTMLElement)],t.prototype,"eCloseIcon",void 0),t}(a.Component);t.HeaderGroupComp=g},96896:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.parse=function(t){if(!t)return null;if(!0===t)return{toolPanels:[e.DEFAULT_COLUMN_COMP,e.DEFAULT_FILTER_COMP],defaultToolPanel:"columns"};if("string"==typeof t)return e.parse([t]);if(Array.isArray(t)){var o=[];return t.forEach((function(t){var r=e.DEFAULT_BY_KEY[t];r?o.push(r):console.warn("ag-grid: the key "+t+" is not a valid key for specifying a tool panel, valid keys are: "+Object.keys(e.DEFAULT_BY_KEY).join(","))})),0===o.length?null:{toolPanels:o,defaultToolPanel:o[0].id}}return{toolPanels:e.parseComponents(t.toolPanels),defaultToolPanel:t.defaultToolPanel,hiddenByDefault:t.hiddenByDefault}},e.parseComponents=function(t){var o=[];return t.forEach((function(t){var r=null;if("string"==typeof t){var i=e.DEFAULT_BY_KEY[t];if(!i)return void console.warn("ag-grid: the key "+t+" is not a valid key for specifying a tool panel, valid keys are: "+Object.keys(e.DEFAULT_BY_KEY).join(","));r=i}else r=t;o.push(r)})),o},e.DEFAULT_COLUMN_COMP={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},e.DEFAULT_FILTER_COMP={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},e.DEFAULT_BY_KEY={columns:e.DEFAULT_COLUMN_COMP,filters:e.DEFAULT_FILTER_COMP},e}();t.SideBarDefParser=o},97156:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(85786),i=o(37789),n=o(44081),s=o(83423),a=function(){function e(){}return e.getEventCallbacks=function(){return e.EVENT_CALLBACKS||(e.EVENT_CALLBACKS=[],e.EVENT_CALLBACKS_NO_PREFIX=[],e.EVENTS.forEach((function(t){e.EVENT_CALLBACKS.push(e.getCallbackForEvent(t)),e.EVENT_CALLBACKS_NO_PREFIX.push(t)}))),e.EVENT_CALLBACKS},e.copyAttributesToGridOptions=function(t,o,r){void 0===r&&(r=!1),l(o),"object"!=typeof t&&(t={});var i=t;return e.ARRAY_PROPERTIES.concat(e.STRING_PROPERTIES).concat(e.OBJECT_PROPERTIES).concat(e.FUNCTION_PROPERTIES).forEach((function(e){void 0!==o[e]&&(i[e]=o[e])})),e.BOOLEAN_PROPERTIES.forEach((function(t){void 0!==o[t]&&(i[t]=e.toBoolean(o[t]))})),e.NUMBER_PROPERTIES.forEach((function(t){void 0!==o[t]&&(i[t]=e.toNumber(o[t]))})),e.getEventCallbacks().forEach((function(e){void 0!==o[e]&&(i[e]=o[e])})),r||e.EVENT_CALLBACKS_NO_PREFIX.forEach((function(t){var r=e.getCallbackForEvent(t);void 0===o[t]&&void 0===o[r]||n.GridOptionsWrapper.checkEventDeprecation(t)})),t},e.getCallbackForEvent=function(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substr(1)},e.processOnChange=function(t,o,i,n){if(t){l(t);var a=o;e.ARRAY_PROPERTIES.concat(e.OBJECT_PROPERTIES).concat(e.STRING_PROPERTIES).forEach((function(e){t[e]&&(a[e]=t[e].currentValue)})),e.BOOLEAN_PROPERTIES.forEach((function(o){t[o]&&(a[o]=e.toBoolean(t[o].currentValue))})),e.NUMBER_PROPERTIES.forEach((function(o){t[o]&&(a[o]=e.toNumber(t[o].currentValue))})),e.getEventCallbacks().forEach((function(e){t[e]&&(a[e]=t[e].currentValue)})),t.enableCellTextSelection&&i.setEnableCellTextSelection(e.toBoolean(t.enableCellTextSelection.currentValue)),t.showToolPanel&&i.showToolPanel(e.toBoolean(t.showToolPanel.currentValue)),t.quickFilterText&&i.setQuickFilter(t.quickFilterText.currentValue),t.rowData&&i.setRowData(t.rowData.currentValue),t.pinnedTopRowData&&i.setPinnedTopRowData(t.pinnedTopRowData.currentValue),t.pinnedBottomRowData&&i.setPinnedBottomRowData(t.pinnedBottomRowData.currentValue),t.columnDefs&&i.setColumnDefs(t.columnDefs.currentValue,"gridOptionsChanged"),t.datasource&&i.setDatasource(t.datasource.currentValue),t.headerHeight&&i.setHeaderHeight(e.toNumber(t.headerHeight.currentValue)),t.paginationPageSize&&i.paginationSetPageSize(e.toNumber(t.paginationPageSize.currentValue)),t.pivotMode&&n.setPivotMode(e.toBoolean(t.pivotMode.currentValue)),t.groupRemoveSingleChildren&&i.setGroupRemoveSingleChildren(e.toBoolean(t.groupRemoveSingleChildren.currentValue)),t.suppressRowDrag&&i.setSuppressRowDrag(e.toBoolean(t.suppressRowDrag.currentValue)),t.gridAutoHeight&&i.setGridAutoHeight(e.toBoolean(t.gridAutoHeight.currentValue)),t.suppressClipboardPaste&&i.setSuppressClipboardPaste(e.toBoolean(t.suppressClipboardPaste.currentValue)),t.sideBar&&i.setSideBar(t.sideBar.currentValue),t.datasource&&i.setDatasource(t.datasource.currentValue);var p={type:r.Events.EVENT_COMPONENT_STATE_CHANGED,api:o.api,columnApi:o.columnApi};s._.iterateObject(t,(function(e,t){p[e]=t})),i.dispatchEvent(p)}},e.toBoolean=function(e){return"boolean"==typeof e?e:"string"==typeof e&&("TRUE"===e.toUpperCase()||""==e)},e.toNumber=function(e){return"number"==typeof e?e:"string"==typeof e?Number(e):void 0},e.EVENTS=[],e.STRING_PROPERTIES=i.PropertyKeys.STRING_PROPERTIES,e.OBJECT_PROPERTIES=i.PropertyKeys.OBJECT_PROPERTIES,e.ARRAY_PROPERTIES=i.PropertyKeys.ARRAY_PROPERTIES,e.NUMBER_PROPERTIES=i.PropertyKeys.NUMBER_PROPERTIES,e.BOOLEAN_PROPERTIES=i.PropertyKeys.BOOLEAN_PROPERTIES,e.FUNCTION_PROPERTIES=i.PropertyKeys.FUNCTION_PROPERTIES,e.ALL_PROPERTIES=i.PropertyKeys.ALL_PROPERTIES,e}();function l(e){(e.rowDeselected||e.onRowDeselected)&&console.warn("ag-grid: as of v3.4 rowDeselected no longer exists. Please check the docs.")}t.ComponentUtil=a,s._.iterateObject(r.Events,(function(e,t){a.EVENTS.push(t)}))},97177:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var n=o(44081),s=o(72493),a=o(25230),l=function(){function e(){}return e.prototype.addResizeBar=function(e){var t=this,o={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e)};return this.dragService.addDragSource(o,!0),function(){return t.dragService.removeDragSource(o)}},e.prototype.onDragStart=function(e,t){this.draggingStarted=!0,this.dragStartX=t.clientX,this.setResizeIcons();var o=t instanceof MouseEvent&&!0===t.shiftKey;e.onResizeStart(o)},e.prototype.setResizeIcons=function(){this.oldBodyCursor=this.eGridDiv.style.cursor,this.oldMsUserSelect=this.eGridDiv.style.msUserSelect,this.oldWebkitUserSelect=this.eGridDiv.style.webkitUserSelect,this.eGridDiv.style.cursor="col-resize",this.eGridDiv.style.msUserSelect="none",this.eGridDiv.style.webkitUserSelect="none"},e.prototype.onDragStop=function(e,t){e.onResizeEnd(this.resizeAmount),this.resetIcons()},e.prototype.resetIcons=function(){this.eGridDiv.style.cursor=this.oldBodyCursor,this.eGridDiv.style.msUserSelect=this.oldMsUserSelect,this.eGridDiv.style.webkitUserSelect=this.oldWebkitUserSelect},e.prototype.onDragging=function(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)},r([s.Autowired("gridOptionsWrapper"),i("design:type",n.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([s.Autowired("dragService"),i("design:type",a.DragService)],e.prototype,"dragService",void 0),r([s.Autowired("eGridDiv"),i("design:type",HTMLElement)],e.prototype,"eGridDiv",void 0),r([s.Bean("horizontalResizeService")],e)}();t.HorizontalResizeService=l},98239:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},n=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(74517),a=o(26016),l=o(44081),p=o(40634),u=o(7897),c=o(31887),d=o(41832),h=o(60843),f=o(814),g=o(37132),m=o(85786),y=o(72948),v=o(12598),C=o(72493),w=o(64314),E=o(43878),_=o(88842),b=o(40797),R=o(44871),S=o(83423),O=function(){function e(){this.primaryHeaderRowCount=0,this.secondaryHeaderRowCount=0,this.secondaryColumnsPresent=!1,this.gridHeaderRowCount=0,this.displayedLeftColumns=[],this.displayedRightColumns=[],this.displayedCenterColumns=[],this.allDisplayedColumns=[],this.allDisplayedVirtualColumns=[],this.allDisplayedCenterVirtualColumns=[],this.rowGroupColumns=[],this.valueColumns=[],this.pivotColumns=[],this.ready=!1,this.autoGroupsNeedBuilding=!1,this.pivotMode=!1,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0}return e.prototype.init=function(){var e=this.gridOptionsWrapper.isPivotMode();this.suppressColumnVirtualisation=this.gridOptionsWrapper.isSuppressColumnVirtualisation(),this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.usingTreeData=this.gridOptionsWrapper.isTreeData()},e.prototype.setColumnDefs=function(e,t){void 0===t&&(t="api");var o=!!this.columnDefs;this.columnDefs=e,this.valueCache.expire(),this.autoGroupsNeedBuilding=!0;var r=this.primaryColumns,i=this.columnFactory.createColumnTree(e,!0,r);this.primaryColumnTree=i.columnTree,this.primaryHeaderRowCount=i.treeDept+1,this.primaryColumns=this.getColumnsFromTree(this.primaryColumnTree),this.extractRowGroupColumns(t,r),this.extractPivotColumns(t,r),this.createValueColumns(t,r),this.ready=!0,this.updateGridColumns(),this.updateDisplayedColumns(t),this.checkDisplayedVirtualColumns(),this.gridOptionsWrapper.isDeltaColumnMode()&&o&&this.resetColumnState(!0,t);var n={type:m.Events.EVENT_COLUMN_EVERYTHING_CHANGED,api:this.gridApi,columnApi:this.columnApi,source:t};this.eventService.dispatchEvent(n);var s={type:m.Events.EVENT_NEW_COLUMNS_LOADED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(s)},e.prototype.isAutoRowHeightActive=function(){return this.autoRowHeightColumns&&this.autoRowHeightColumns.length>0},e.prototype.getAllAutoRowHeightCols=function(){return this.autoRowHeightColumns},e.prototype.setVirtualViewportLeftAndRight=function(){this.gridOptionsWrapper.isEnableRtl()?(this.viewportLeft=this.bodyWidth-this.scrollPosition-this.scrollWidth,this.viewportRight=this.bodyWidth-this.scrollPosition):(this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition)},e.prototype.getDisplayedColumnsStartingAt=function(e){for(var t=e,o=[];t&&S._.exists(t);)o.push(t),t=this.getDisplayedColAfter(t);return o},e.prototype.checkDisplayedVirtualColumns=function(){if(S._.exists(this.displayedCenterColumns)){var e=this.allDisplayedVirtualColumns.map((function(e){return e.getId()})).join("#");if(this.updateVirtualSets(),e!==this.allDisplayedVirtualColumns.map((function(e){return e.getId()})).join("#")){var t={type:m.Events.EVENT_VIRTUAL_COLUMNS_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)}}},e.prototype.setVirtualViewportPosition=function(e,t){(e!==this.scrollWidth||t!==this.scrollPosition||this.bodyWidthDirty)&&(this.scrollWidth=e,this.scrollPosition=t,this.bodyWidthDirty=!0,this.setVirtualViewportLeftAndRight(),this.ready&&this.checkDisplayedVirtualColumns())},e.prototype.isPivotMode=function(){return this.pivotMode},e.prototype.isPivotSettingAllowed=function(e){return!e||!this.gridOptionsWrapper.isTreeData()||(console.warn("ag-Grid: Pivot mode not available in conjunction Tree Data i.e. 'gridOptions.treeData: true'"),!1)},e.prototype.setPivotMode=function(e,t){if(void 0===t&&(t="api"),e!==this.pivotMode&&this.isPivotSettingAllowed(this.pivotMode)){this.pivotMode=e,this.updateDisplayedColumns(t);var o={type:m.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(o)}},e.prototype.getSecondaryPivotColumn=function(e,t){if(!this.secondaryColumnsPresent)return null;var o=this.getPrimaryColumn(t),r=null;return this.secondaryColumns&&this.secondaryColumns.forEach((function(t){var i=t.getColDef().pivotKeys,n=t.getColDef().pivotValueColumn;S._.compareArrays(i,e)&&n===o&&(r=t)})),r},e.prototype.setBeans=function(e){this.logger=e.create("ColumnController")},e.prototype.setFirstRightAndLastLeftPinned=function(e){var t,o;this.gridOptionsWrapper.isEnableRtl()?(t=this.displayedLeftColumns?this.displayedLeftColumns[0]:null,o=this.displayedRightColumns?this.displayedRightColumns[this.displayedRightColumns.length-1]:null):(t=this.displayedLeftColumns?this.displayedLeftColumns[this.displayedLeftColumns.length-1]:null,o=this.displayedRightColumns?this.displayedRightColumns[0]:null),this.gridColumns.forEach((function(r){r.setLastLeftPinned(r===t,e),r.setFirstRightPinned(r===o,e)}))},e.prototype.autoSizeColumns=function(e,t){var o=this;void 0===t&&(t="api");for(var r=[],i=-1;0!==i;)i=0,this.actionOnGridColumns(e,(function(e){if(r.indexOf(e)>=0)return!1;var n=o.autoWidthCalculator.getPreferredWidthForColumn(e);if(n>0){var s=o.normaliseColumnWidth(e,n);e.setActualWidth(s,t),r.push(e),i++}return!0}),t);if(r.length>0){var n={type:m.Events.EVENT_COLUMN_RESIZED,columns:r,column:1===r.length?r[0]:null,finished:!0,api:this.gridApi,columnApi:this.columnApi,source:"autosizeColumns"};this.eventService.dispatchEvent(n)}},e.prototype.autoSizeColumn=function(e,t){void 0===t&&(t="api"),e&&this.autoSizeColumns([e],t)},e.prototype.autoSizeAllColumns=function(e){void 0===e&&(e="api");var t=this.getAllDisplayedColumns();this.autoSizeColumns(t,e)},e.prototype.getColumnsFromTree=function(e){var t=[];return function e(o){for(var r=0;r<o.length;r++){var i=o[r];i instanceof a.Column?t.push(i):i instanceof y.OriginalColumnGroup&&e(i.getChildren())}}(e),t},e.prototype.getAllDisplayedColumnGroups=function(){return this.displayedLeftColumnTree&&this.displayedRightColumnTree&&this.displayedCentreColumnTree?this.displayedLeftColumnTree.concat(this.displayedCentreColumnTree).concat(this.displayedRightColumnTree):null},e.prototype.getPrimaryColumnTree=function(){return this.primaryColumnTree},e.prototype.getHeaderRowCount=function(){return this.gridHeaderRowCount},e.prototype.getLeftDisplayedColumnGroups=function(){return this.displayedLeftColumnTree},e.prototype.getRightDisplayedColumnGroups=function(){return this.displayedRightColumnTree},e.prototype.getCenterDisplayedColumnGroups=function(){return this.displayedCentreColumnTree},e.prototype.getDisplayedColumnGroups=function(e){switch(e){case a.Column.PINNED_LEFT:return this.getLeftDisplayedColumnGroups();case a.Column.PINNED_RIGHT:return this.getRightDisplayedColumnGroups();default:return this.getCenterDisplayedColumnGroups()}},e.prototype.isColumnDisplayed=function(e){return this.getAllDisplayedColumns().indexOf(e)>=0},e.prototype.getAllDisplayedColumns=function(){return this.allDisplayedColumns},e.prototype.getAllDisplayedVirtualColumns=function(){return this.allDisplayedVirtualColumns},e.prototype.getDisplayedLeftColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedLeftColumns):this.displayedLeftColumns},e.prototype.getDisplayedRightColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedRightColumns):this.displayedRightColumns},e.prototype.getDisplayedColumnsForRow=function(e,t,o,r){for(var i,n=[],s=null,a=function(a){var l,p=t[a],u=t.length-a,c=Math.min(p.getColSpan(e),u),d=[p];if(c>1){for(var h=c-1,f=1;f<=h;f++)d.push(t[a+f]);a+=h}o?(l=!1,d.forEach((function(e){o(e)&&(l=!0)}))):l=!0,l&&(0===n.length&&s&&r&&r(p)&&n.push(s),n.push(p)),s=p,i=a},l=0;l<t.length;l++)a(l),l=i;return n},e.prototype.getAllDisplayedCenterVirtualColumnsForRow=function(e){var t=this;if(!this.colSpanActive)return this.allDisplayedCenterVirtualColumns;var o=this.suppressColumnVirtualisation?null:this.isColumnInViewport.bind(this);return this.getDisplayedColumnsForRow(e,this.displayedCenterColumns,o,(function(e){return e.getLeft()>t.viewportLeft}))},e.prototype.isColumnInViewport=function(e){var t=e.getLeft(),o=e.getLeft()+e.getActualWidth(),r=this.viewportLeft-200,i=this.viewportRight+200;return!(t<r&&o<r||t>i&&o>i)},e.prototype.getPinnedLeftContainerWidth=function(){return this.getWidthOfColsInList(this.displayedLeftColumns)},e.prototype.getPinnedRightContainerWidth=function(){return this.getWidthOfColsInList(this.displayedRightColumns)},e.prototype.updatePrimaryColumnList=function(e,t,o,r,i,n){var s=this;if(void 0===n&&(n="api"),e&&!S._.missingOrEmpty(e)){var a=!1;if(e.forEach((function(e){var i=s.getPrimaryColumn(e);if(i){if(o){if(t.indexOf(i)>=0)return;t.push(i)}else{if(t.indexOf(i)<0)return;S._.removeFromArray(t,i)}r(i),a=!0}})),a){this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(n);var l={type:i,columns:t,column:1===t.length?t[0]:null,api:this.gridApi,columnApi:this.columnApi,source:n};this.eventService.dispatchEvent(l)}}},e.prototype.setRowGroupColumns=function(e,t){void 0===t&&(t="api"),this.autoGroupsNeedBuilding=!0,this.setPrimaryColumnList(e,this.rowGroupColumns,m.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,this.setRowGroupActive.bind(this),t)},e.prototype.setRowGroupActive=function(e,t,o){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,o),e||this.gridOptionsWrapper.isSuppressMakeColumnVisibleAfterUnGroup()||t.setVisible(!0,o))},e.prototype.addRowGroupColumn=function(e,t){void 0===t&&(t="api"),e&&this.addRowGroupColumns([e],t)},e.prototype.addRowGroupColumns=function(e,t){void 0===t&&(t="api"),this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!0,this.setRowGroupActive.bind(this,!0),m.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,t)},e.prototype.removeRowGroupColumns=function(e,t){void 0===t&&(t="api"),this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!1,this.setRowGroupActive.bind(this,!1),m.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,t)},e.prototype.removeRowGroupColumn=function(e,t){void 0===t&&(t="api"),e&&this.removeRowGroupColumns([e],t)},e.prototype.addPivotColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.pivotColumns,!0,(function(e){return e.setPivotActive(!0,t)}),m.Events.EVENT_COLUMN_PIVOT_CHANGED,t)},e.prototype.setPivotColumns=function(e,t){void 0===t&&(t="api"),this.setPrimaryColumnList(e,this.pivotColumns,m.Events.EVENT_COLUMN_PIVOT_CHANGED,(function(e,o){o.setPivotActive(e,t)}),t)},e.prototype.addPivotColumn=function(e,t){void 0===t&&(t="api"),this.addPivotColumns([e],t)},e.prototype.removePivotColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.pivotColumns,!1,(function(e){return e.setPivotActive(!1,t)}),m.Events.EVENT_COLUMN_PIVOT_CHANGED,t)},e.prototype.removePivotColumn=function(e,t){void 0===t&&(t="api"),this.removePivotColumns([e],t)},e.prototype.setPrimaryColumnList=function(e,t,o,r,i){var n=this;t.length=0,S._.exists(e)&&e.forEach((function(e){var o=n.getPrimaryColumn(e);o&&t.push(o)})),this.primaryColumns.forEach((function(e){var o=t.indexOf(e)>=0;r(o,e)})),this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(i);var s={type:o,columns:t,column:1===t.length?t[0]:null,api:this.gridApi,columnApi:this.columnApi,source:i};this.eventService.dispatchEvent(s)},e.prototype.setValueColumns=function(e,t){void 0===t&&(t="api"),this.setPrimaryColumnList(e,this.valueColumns,m.Events.EVENT_COLUMN_VALUE_CHANGED,this.setValueActive.bind(this),t)},e.prototype.setValueActive=function(e,t,o){if(e!==t.isValueActive()&&(t.setValueActive(e,o),e&&!t.getAggFunc())){var r=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(r)}},e.prototype.addValueColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),m.Events.EVENT_COLUMN_VALUE_CHANGED,t)},e.prototype.addValueColumn=function(e,t){void 0===t&&(t="api"),e&&this.addValueColumns([e],t)},e.prototype.removeValueColumn=function(e,t){void 0===t&&(t="api"),this.removeValueColumns([e],t)},e.prototype.removeValueColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.valueColumns,!1,this.setValueActive.bind(this,!1),m.Events.EVENT_COLUMN_VALUE_CHANGED,t)},e.prototype.normaliseColumnWidth=function(e,t){return t<e.getMinWidth()&&(t=e.getMinWidth()),e.isGreaterThanMax(t)&&(t=e.getMaxWidth()),t},e.prototype.getPrimaryOrGridColumn=function(e){return this.getPrimaryColumn(e)||this.getGridColumn(e)},e.prototype.setColumnWidth=function(e,t,o,r,i){void 0===i&&(i="api");var n=this.getPrimaryOrGridColumn(e);if(n){var s=[];if(s.push({width:t,ratios:[1],columns:[n]}),"shift"===this.gridOptionsWrapper.getColResizeDefault()&&(o=!o),o){var a=this.getDisplayedColAfter(n);if(!a)return;var l=n.getActualWidth()-t,p=a.getActualWidth()+l;s.push({width:p,ratios:[1],columns:[a]})}this.resizeColumnSets(s,r,i)}},e.prototype.checkMinAndMaxWidthsForSet=function(e){var t=e.columns,o=e.width,r=0,i=0,n=!0;return t.forEach((function(e){r+=e.getMinWidth(),e.getMaxWidth()>0?i+=e.getMaxWidth():n=!1})),o>=r&&(!n||o<=i)},e.prototype.resizeColumnSets=function(e,t,o){if(S._.every(e,this.checkMinAndMaxWidthsForSet.bind(this))){var r=[],i=[];e.forEach((function(e){var t=e.width,o=e.columns,n=e.ratios,s={},a={};o.forEach((function(e){return i.push(e)}));for(var l=!0,p=0,u=function(){if(++p>1e3)return console.error("ag-Grid: infinite loop in resizeColumnSets"),"break";l=!1;var e=[],r=[],i=0,u=t;o.forEach((function(t,o){if(a[t.getId()])u-=s[t.getId()];else{e.push(t);var l=n[o];i+=l,r.push(l)}}));var c=1/i;e.forEach((function(o,r){var i;r===e.length-1?i=u:(i=Math.round(n[r]*t*c),u-=i),i<o.getMinWidth()?(i=o.getMinWidth(),a[o.getId()]=!0,l=!0):o.getMaxWidth()>0&&i>o.getMaxWidth()&&(i=o.getMaxWidth(),a[o.getId()]=!0,l=!0),s[o.getId()]=i}))};l&&"break"!==u(););o.forEach((function(e){var t=s[e.getId()];e.getActualWidth()!==t&&(e.setActualWidth(t),r.push(e))}))}));var n=r.length>0;if(n&&(this.setLeftValues(o),this.updateBodyWidths(),this.checkDisplayedVirtualColumns()),n||t){var s={type:m.Events.EVENT_COLUMN_RESIZED,columns:i,column:1===i.length?i[0]:null,finished:t,api:this.gridApi,columnApi:this.columnApi,source:o};this.eventService.dispatchEvent(s)}}else if(t){var a=e&&e.length>0?e[0].columns:null,l={type:m.Events.EVENT_COLUMN_RESIZED,columns:a,column:a&&1===a.length?a[0]:null,finished:t,api:this.gridApi,columnApi:this.columnApi,source:o};this.eventService.dispatchEvent(l)}},e.prototype.setColumnAggFunc=function(e,t,o){if(void 0===o&&(o="api"),e){e.setAggFunc(t);var r={type:m.Events.EVENT_COLUMN_VALUE_CHANGED,columns:[e],column:e,api:this.gridApi,columnApi:this.columnApi,source:o};this.eventService.dispatchEvent(r)}},e.prototype.moveRowGroupColumn=function(e,t,o){void 0===o&&(o="api");var r=this.rowGroupColumns[e];this.rowGroupColumns.splice(e,1),this.rowGroupColumns.splice(t,0,r);var i={type:m.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:this.rowGroupColumns,column:1===this.rowGroupColumns.length?this.rowGroupColumns[0]:null,api:this.gridApi,columnApi:this.columnApi,source:o};this.eventService.dispatchEvent(i)},e.prototype.moveColumns=function(e,t,o){if(void 0===o&&(o="api"),this.columnAnimationService.start(),t>this.gridColumns.length-e.length)return console.warn("ag-Grid: tried to insert columns in invalid location, toIndex = "+t),void console.warn("ag-Grid: remember that you should not count the moving columns when calculating the new index");var r=this.getGridColumns(e);if(this.doesMovePassRules(r,t)){S._.moveInArray(this.gridColumns,r,t),this.updateDisplayedColumns(o);var i={type:m.Events.EVENT_COLUMN_MOVED,columns:r,column:1===r.length?r[0]:null,toIndex:t,api:this.gridApi,columnApi:this.columnApi,source:o};this.eventService.dispatchEvent(i),this.columnAnimationService.finish()}},e.prototype.doesMovePassRules=function(e,t){var o=this.gridColumns.slice();return S._.moveInArray(o,e,t),!!this.doesMovePassMarryChildren(o)&&!!this.doesMovePassLockedPositions(o)},e.prototype.doesMovePassLockedPositions=function(e){var t=!1,o=!0;return e.forEach((function(e){e.isLockPosition()?t&&(o=!1):t=!0})),o},e.prototype.doesMovePassMarryChildren=function(e){var t=!0;return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(o){if(o instanceof y.OriginalColumnGroup){var r=o;if(r.getColGroupDef()&&r.getColGroupDef().marryChildren){var i=[];r.getLeafColumns().forEach((function(t){var o=e.indexOf(t);i.push(o)})),Math.max.apply(Math,i)-Math.min.apply(Math,i)>r.getLeafColumns().length-1&&(t=!1)}}})),t},e.prototype.moveColumn=function(e,t,o){void 0===o&&(o="api"),this.moveColumns([e],t,o)},e.prototype.moveColumnByIndex=function(e,t,o){void 0===o&&(o="api");var r=this.gridColumns[e];this.moveColumn(r,t,o)},e.prototype.getBodyContainerWidth=function(){return this.bodyWidth},e.prototype.getContainerWidth=function(e){switch(e){case a.Column.PINNED_LEFT:return this.leftWidth;case a.Column.PINNED_RIGHT:return this.rightWidth;default:return this.bodyWidth}},e.prototype.updateBodyWidths=function(){var e=this.getWidthOfColsInList(this.displayedCenterColumns),t=this.getWidthOfColsInList(this.displayedLeftColumns),o=this.getWidthOfColsInList(this.displayedRightColumns);if(this.bodyWidthDirty=this.bodyWidth!==e,this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==o){this.bodyWidth=e,this.leftWidth=t,this.rightWidth=o;var r={type:m.Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(r)}},e.prototype.getValueColumns=function(){return this.valueColumns?this.valueColumns:[]},e.prototype.getPivotColumns=function(){return this.pivotColumns?this.pivotColumns:[]},e.prototype.isPivotActive=function(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode},e.prototype.getRowGroupColumns=function(){return this.rowGroupColumns?this.rowGroupColumns:[]},e.prototype.getDisplayedCenterColumns=function(){return this.displayedCenterColumns},e.prototype.getDisplayedLeftColumns=function(){return this.displayedLeftColumns},e.prototype.getDisplayedRightColumns=function(){return this.displayedRightColumns},e.prototype.getDisplayedColumns=function(e){switch(e){case a.Column.PINNED_LEFT:return this.getDisplayedLeftColumns();case a.Column.PINNED_RIGHT:return this.getDisplayedRightColumns();default:return this.getDisplayedCenterColumns()}},e.prototype.getAllPrimaryColumns=function(){return this.primaryColumns?this.primaryColumns.slice():null},e.prototype.getSecondaryColumns=function(){return this.secondaryColumns?this.secondaryColumns.slice():null},e.prototype.getAllColumnsForQuickFilter=function(){return this.columnsForQuickFilter},e.prototype.getAllGridColumns=function(){return this.gridColumns},e.prototype.isEmpty=function(){return S._.missingOrEmpty(this.gridColumns)},e.prototype.isRowGroupEmpty=function(){return S._.missingOrEmpty(this.rowGroupColumns)},e.prototype.setColumnVisible=function(e,t,o){void 0===o&&(o="api"),this.setColumnsVisible([e],t,o)},e.prototype.setColumnsVisible=function(e,t,o){var r=this;void 0===o&&(o="api"),this.columnAnimationService.start(),this.actionOnGridColumns(e,(function(e){return e.isVisible()!==t&&(e.setVisible(t,o),!0)}),o,(function(){return{type:m.Events.EVENT_COLUMN_VISIBLE,visible:t,column:null,columns:null,api:r.gridApi,columnApi:r.columnApi,source:o}})),this.columnAnimationService.finish()},e.prototype.setColumnPinned=function(e,t,o){void 0===o&&(o="api"),e&&this.setColumnsPinned([e],t,o)},e.prototype.setColumnsPinned=function(e,t,o){var r,i=this;void 0===o&&(o="api"),"print"!==this.gridOptionsWrapper.getDomLayout()?(this.columnAnimationService.start(),r=!0===t||t===a.Column.PINNED_LEFT?a.Column.PINNED_LEFT:t===a.Column.PINNED_RIGHT?a.Column.PINNED_RIGHT:null,this.actionOnGridColumns(e,(function(e){return e.getPinned()!==r&&(e.setPinned(r),!0)}),o,(function(){return{type:m.Events.EVENT_COLUMN_PINNED,pinned:r,column:null,columns:null,api:i.gridApi,columnApi:i.columnApi,source:o}})),this.columnAnimationService.finish()):console.warn("Changing the column pinning status is not allowed with domLayout='print'")},e.prototype.actionOnGridColumns=function(e,t,o,r){var i=this;if(!S._.missingOrEmpty(e)){var n=[];if(e.forEach((function(e){var o=i.getGridColumn(e);o&&!1!==t(o)&&n.push(o)})),0!==n.length&&(this.updateDisplayedColumns(o),S._.exists(r)&&r)){var s=r();s.columns=n,s.column=1===n.length?n[0]:null,this.eventService.dispatchEvent(s)}}},e.prototype.getDisplayedColBefore=function(e){var t=this.getAllDisplayedColumns(),o=t.indexOf(e);return o>0?t[o-1]:null},e.prototype.getDisplayedColAfter=function(e){var t=this.getAllDisplayedColumns(),o=t.indexOf(e);return o<t.length-1?t[o+1]:null},e.prototype.getDisplayedGroupAfter=function(e){for(var t=e.getDisplayedLeafColumns()[0],o=e.getOriginalColumnGroup().getLevel();;){if(!(t=this.getDisplayedColAfter(t)))return null;for(var r=t.getParent();r.getOriginalColumnGroup().getLevel()!==o;)r=r.getParent();if(r!==e)return r}},e.prototype.isPinningLeft=function(){return this.displayedLeftColumns.length>0},e.prototype.isPinningRight=function(){return this.displayedRightColumns.length>0},e.prototype.getPrimaryAndSecondaryAndAutoColumns=function(){var e=this.primaryColumns?this.primaryColumns.slice(0):[];return this.groupAutoColumns&&S._.exists(this.groupAutoColumns)&&this.groupAutoColumns.forEach((function(t){return e.push(t)})),this.secondaryColumnsPresent&&this.secondaryColumns&&this.secondaryColumns.forEach((function(t){return e.push(t)})),e},e.prototype.createStateItemFromColumn=function(e){var t=e.isRowGroupActive()?this.rowGroupColumns.indexOf(e):null,o=e.isPivotActive()?this.pivotColumns.indexOf(e):null,r=e.isValueActive()?e.getAggFunc():null;return{colId:e.getColId(),hide:!e.isVisible(),aggFunc:r,width:e.getActualWidth(),pivotIndex:o,pinned:e.getPinned(),rowGroupIndex:t}},e.prototype.getColumnState=function(){if(S._.missing(this.primaryColumns))return[];var e=this.primaryColumns.map(this.createStateItemFromColumn.bind(this)),t=(this.groupAutoColumns?this.groupAutoColumns.map(this.createStateItemFromColumn.bind(this)):[]).concat(e);return this.pivotMode||this.orderColumnStateList(t),t},e.prototype.orderColumnStateList=function(e){var t=this.gridColumns.map((function(e){return e.getColId()}));e.sort((function(e,o){return t.indexOf(e.colId)-t.indexOf(o.colId)}))},e.prototype.resetColumnState=function(e,t){void 0===e&&(e=!1),void 0===t&&(t="api");var o=this.getColumnsFromTree(this.primaryColumnTree),r=[],i=1e3,n=1e3;o&&o.forEach((function(e){var t=e.getColDef().rowGroupIndex,o=e.getColDef().rowGroup,s=e.getColDef().pivotIndex,a=e.getColDef().pivot,l={colId:e.getColId(),aggFunc:e.getColDef().aggFunc,hide:e.getColDef().hide,pinned:e.getColDef().pinned,rowGroupIndex:t,pivotIndex:e.getColDef().pivotIndex,width:e.getColDef().width};S._.missing(t)&&o&&(l.rowGroupIndex=i++),S._.missing(s)&&a&&(l.pivotIndex=n++),r.push(l)})),this.setColumnState(r,e,t)},e.prototype.setColumnState=function(e,t,o){var r=this;if(void 0===t&&(t=!1),void 0===o&&(o="api"),S._.missingOrEmpty(this.primaryColumns))return!1;var i=this.getColumnState();this.autoGroupsNeedBuilding=!0;var n=this.primaryColumns.slice();this.rowGroupColumns=[],this.valueColumns=[],this.pivotColumns=[];var s=!0,a={},l={},p=[];if(e&&e.forEach((function(e){if(S._.exists(r.getAutoColumn(e.colId)))p.push(e);else{var t=r.getPrimaryColumn(e.colId);t?(r.syncColumnWithStateItem(t,e,a,l,o),S._.removeFromArray(n,t)):(console.warn("ag-grid: column "+e.colId+" not found"),s=!1)}})),n.forEach(this.syncColumnWithNoState.bind(this)),this.rowGroupColumns.sort(this.sortColumnListUsingIndexes.bind(this,a)),this.pivotColumns.sort(this.sortColumnListUsingIndexes.bind(this,l)),this.updateGridColumns(),p.forEach((function(e){var t=r.getAutoColumn(e.colId);r.syncColumnWithStateItem(t,e,a,l,o)})),e){var u=e.map((function(e){return e.colId}));this.gridColumns.sort((function(e,t){return u.indexOf(e.getId())-u.indexOf(t.getId())}))}if(this.updateDisplayedColumns(o),!t){var c={type:m.Events.EVENT_COLUMN_EVERYTHING_CHANGED,api:this.gridApi,columnApi:this.columnApi,source:o};this.eventService.dispatchEvent(c)}return this.raiseColumnEvents(i,o),s},e.prototype.raiseColumnEvents=function(e,t){var o=this;if(!this.gridOptionsWrapper.isSuppressSetColumnStateEvents()){var r=this.getColumnState(),i=function(i,n,s){if(!S._.compareArrays(e.map(n).sort(),r.map(n).sort())){var a={type:i,columns:s,column:1===s.length?s[0]:null,api:o.gridApi,columnApi:o.columnApi,source:t};o.eventService.dispatchEvent(a)}},n=function(t){var r=[],i={};return e.forEach((function(e){i[e.colId]=e})),o.gridColumns.forEach((function(e){var o=i[e.getColId()];o&&!t(o,e)||r.push(e)})),r};i(m.Events.EVENT_COLUMN_VALUE_CHANGED,(function(e){return e.colId+"-"+e.aggFunc}),this.valueColumns),i(m.Events.EVENT_COLUMN_PIVOT_CHANGED,(function(e){return e.colId+"-"+e.pivotIndex}),this.pivotColumns),i(m.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(e){return e.colId+"-"+e.rowGroupIndex}),this.rowGroupColumns),this.raiseColumnPinnedEvent(n((function(e,t){return e.pinned!==t.getPinned()})),t);var s=n((function(e,t){return e.hide===t.isVisible()}));this.raiseColumnVisibleEvent(s,t),this.raiseColumnResizeEvent(n((function(e,t){return e.width!==t.getActualWidth()})),t),this.raiseColumnMovedEvent(e,t)}},e.prototype.raiseColumnPinnedEvent=function(e,t){if(e.length>0){var o={type:m.Events.EVENT_COLUMN_PINNED,pinned:null,columns:e,column:null,api:this.gridApi,columnApi:this.columnApi,source:t};this.eventService.dispatchEvent(o)}},e.prototype.raiseColumnVisibleEvent=function(e,t){if(e.length>0){var o={type:m.Events.EVENT_COLUMN_VISIBLE,visible:void 0,columns:e,column:null,api:this.gridApi,columnApi:this.columnApi,source:t};this.eventService.dispatchEvent(o)}},e.prototype.raiseColumnResizeEvent=function(e,t){if(e.length>0){var o={type:m.Events.EVENT_COLUMN_RESIZED,columns:e,column:null,finished:!0,api:this.gridApi,columnApi:this.columnApi,source:t};this.eventService.dispatchEvent(o)}},e.prototype.raiseColumnMovedEvent=function(e,t){for(var o=[],r=this.getColumnState(),i=function(t){var i=e[t],s=r[t];if(!i||s.hide)return"continue";if(i.colId!==s.colId){var a=S._.find(n.allDisplayedColumns,(function(e){return e.getColId()===s.colId}));o.push(a)}},n=this,s=0;s<r.length;s++)i(s);if(o.length>0){var a={type:m.Events.EVENT_COLUMN_MOVED,columns:o,column:null,toIndex:void 0,api:this.gridApi,columnApi:this.columnApi,source:t};this.eventService.dispatchEvent(a)}},e.prototype.sortColumnListUsingIndexes=function(e,t,o){return e[t.getId()]-e[o.getId()]},e.prototype.syncColumnWithNoState=function(e,t){e.setVisible(!1,t),e.setAggFunc(null),e.setPinned(null),e.setRowGroupActive(!1,t),e.setPivotActive(!1,t),e.setValueActive(!1,t)},e.prototype.syncColumnWithStateItem=function(e,t,o,r,i){if(e){e.setVisible(!t.hide,i),e.setPinned(t.pinned);var n=this.gridOptionsWrapper.getMinColWidth();t.width&&n&&t.width>=n&&e.setActualWidth(t.width,i),"string"==typeof t.aggFunc?(e.setAggFunc(t.aggFunc),e.setValueActive(!0,i),this.valueColumns.push(e)):(S._.exists(t.aggFunc)&&console.warn("ag-Grid: stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it isintended for the column state to be stored and retrieved as simple JSON."),e.setAggFunc(null),e.setValueActive(!1,i)),"number"==typeof t.rowGroupIndex?(this.rowGroupColumns.push(e),e.setRowGroupActive(!0,i),o[e.getId()]=t.rowGroupIndex):e.setRowGroupActive(!1,i),"number"==typeof t.pivotIndex?(this.pivotColumns.push(e),e.setPivotActive(!0,i),r[e.getId()]=t.pivotIndex):e.setPivotActive(!1,i)}},e.prototype.getGridColumns=function(e){return this.getColumns(e,this.getGridColumn.bind(this))},e.prototype.getColumns=function(e,t){var o=[];return e&&e.forEach((function(e){var r=t(e);r&&o.push(r)})),o},e.prototype.getColumnWithValidation=function(e){var t=this.getPrimaryColumn(e);return t||console.warn("ag-Grid: could not find column "+t),t},e.prototype.getPrimaryColumn=function(e){return this.getColumn(e,this.primaryColumns)},e.prototype.getGridColumn=function(e){return this.getColumn(e,this.gridColumns)},e.prototype.getColumn=function(e,t){if(!e)return null;for(var o=0;o<t.length;o++)if(this.columnsMatch(t[o],e))return t[o];return this.getAutoColumn(e)},e.prototype.getAutoColumn=function(e){var t=this;return this.groupAutoColumns&&S._.exists(this.groupAutoColumns)&&!S._.missing(this.groupAutoColumns)?S._.find(this.groupAutoColumns,(function(o){return t.columnsMatch(o,e)})):null},e.prototype.columnsMatch=function(e,t){var o=e===t,r=e.getColDef()===t,i=e.getColId()==t;return o||r||i},e.prototype.getDisplayNameForColumn=function(e,t,o){if(void 0===o&&(o=!1),!e)return null;var r=this.getHeaderName(e.getColDef(),e,null,null,t);return o?this.wrapHeaderNameWithAggFunc(e,r):r},e.prototype.getDisplayNameForOriginalColumnGroup=function(e,t,o){var r=t?t.getColGroupDef():null;return r?this.getHeaderName(r,null,e,t,o):null},e.prototype.getDisplayNameForColumnGroup=function(e,t){return this.getDisplayNameForOriginalColumnGroup(e,e.getOriginalColumnGroup(),t)},e.prototype.getHeaderName=function(e,t,o,r,i){var n=e.headerValueGetter;if(n){var s={colDef:e,column:t,columnGroup:o,originalColumnGroup:r,location:i,api:this.gridOptionsWrapper.getApi(),context:this.gridOptionsWrapper.getContext()};return"function"==typeof n?n(s):"string"==typeof n?this.expressionService.evaluate(n,s):(console.warn("ag-grid: headerValueGetter must be a function or a string"),"")}return null!=e.headerName?e.headerName:e.field?S._.camelCaseToHumanText(e.field):""},e.prototype.wrapHeaderNameWithAggFunc=function(e,t){if(this.gridOptionsWrapper.isSuppressAggFuncInHeader())return t;var o,r=e.getColDef().pivotValueColumn,i=null;if(S._.exists(r))i=r?r.getAggFunc():null,o=!0;else{var n=e.isValueActive(),s=this.pivotMode||!this.isRowGroupEmpty();n&&s?(i=e.getAggFunc(),o=!0):o=!1}if(o){var a="string"==typeof i?i:"func";return this.gridOptionsWrapper.getLocaleTextFunc()(a,a)+"("+t+")"}return t},e.prototype.getColumnGroup=function(e,t){if(!e)return null;if(e instanceof s.ColumnGroup)return e;var o=this.getAllDisplayedColumnGroups(),r="number"==typeof t,i=null;return this.columnUtils.depthFirstAllColumnTreeSearch(o,(function(o){if(o instanceof s.ColumnGroup){var n=o;(r?e===n.getGroupId()&&t===n.getInstanceId():e===n.getGroupId())&&(i=n)}})),i},e.prototype.isReady=function(){return this.ready},e.prototype.createValueColumns=function(e,t){this.valueColumns=this.extractColumns(t,this.valueColumns,(function(t,o){return t.setValueActive(o,e)}),(function(){return null}),(function(e){return!!e.aggFunc})),this.valueColumns.forEach((function(e){e.getAggFunc()||e.setAggFunc(e.getColDef().aggFunc)}))},e.prototype.extractRowGroupColumns=function(e,t){this.rowGroupColumns=this.extractColumns(t,this.rowGroupColumns,(function(t,o){return t.setRowGroupActive(o,e)}),(function(e){return e.rowGroupIndex}),(function(e){return e.rowGroup}))},e.prototype.extractColumns=function(e,t,o,r,i){var n=this;t||(t=[]);var s=t.filter((function(e){return n.primaryColumns.indexOf(e)<0})),a=t.filter((function(e){return n.primaryColumns.indexOf(e)>=0})),l=this.primaryColumns.filter((function(t){return!e||e.indexOf(t)<0}));s.forEach((function(e){return o(e,!1)}));var p=[];return l.forEach((function(e){"number"==typeof r(e.getColDef())&&p.push(e)})),p.sort((function(e,t){var o=r(e.getColDef()),i=r(t.getColDef());return o===i?0:o<i?-1:1})),l.forEach((function(e){if(i(e.getColDef())){if(p.indexOf(e)>=0)return;p.push(e)}})),p.forEach((function(e){return o(e,!0)})),a.concat(p)},e.prototype.extractPivotColumns=function(e,t){this.pivotColumns=this.extractColumns(t,this.pivotColumns,(function(t,o){return t.setPivotActive(o,e)}),(function(e){return e.pivotIndex}),(function(e){return e.pivot}))},e.prototype.resetColumnGroupState=function(e){void 0===e&&(e="api");var t=[];this.columnUtils.depthFirstOriginalTreeSearch(null,this.primaryColumnTree,(function(e){if(e instanceof y.OriginalColumnGroup){var o={groupId:e.getGroupId(),open:e.getColGroupDef().openByDefault};t.push(o)}})),this.setColumnGroupState(t,e)},e.prototype.getColumnGroupState=function(){var e=[];return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(t){if(t instanceof y.OriginalColumnGroup){var o=t;e.push({groupId:o.getGroupId(),open:o.isExpanded()})}})),e},e.prototype.setColumnGroupState=function(e,t){var o=this;void 0===t&&(t="api"),this.columnAnimationService.start();var r=[];e.forEach((function(e){var t=e.groupId,i=e.open,n=o.getOriginalColumnGroup(t);n&&n.isExpanded()!==i&&(o.logger.log("columnGroupOpened("+n.getGroupId()+","+i+")"),n.setExpanded(i),r.push(n))})),this.updateGroupsAndDisplayedColumns(t),r.forEach((function(e){var t={type:m.Events.EVENT_COLUMN_GROUP_OPENED,columnGroup:e,api:o.gridApi,columnApi:o.columnApi};o.eventService.dispatchEvent(t)})),this.columnAnimationService.finish()},e.prototype.setColumnGroupOpened=function(e,t,o){var r;void 0===o&&(o="api"),r=e instanceof y.OriginalColumnGroup?e.getId():e,this.setColumnGroupState([{groupId:r,open:t}],o)},e.prototype.getOriginalColumnGroup=function(e){if(e instanceof y.OriginalColumnGroup)return e;"string"!=typeof e&&console.error("ag-Grid: group key must be a string");var t=null;return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(o){if(o instanceof y.OriginalColumnGroup){var r=o;r.getId()===e&&(t=r)}})),t},e.prototype.calculateColumnsForDisplay=function(){var e=this;return this.pivotMode&&!this.secondaryColumnsPresent?S._.filter(this.gridColumns,(function(t){var o=e.groupAutoColumns&&e.groupAutoColumns.indexOf(t)>=0,r=e.valueColumns&&e.valueColumns.indexOf(t)>=0;return o||r})):S._.filter(this.gridColumns,(function(t){return e.groupAutoColumns&&e.groupAutoColumns.indexOf(t)>=0||t.isVisible()}))},e.prototype.checkColSpanActiveInCols=function(e){var t=!1;return e.forEach((function(e){S._.exists(e.getColDef().colSpan)&&(t=!0)})),t},e.prototype.calculateColumnsForGroupDisplay=function(){var e=this;this.groupDisplayColumns=[];var t=function(t){var o=t.getColDef();o&&S._.exists(o.showRowGroup)&&e.groupDisplayColumns.push(t)};this.gridColumns.forEach(t),this.groupAutoColumns&&this.groupAutoColumns.forEach(t)},e.prototype.getGroupDisplayColumns=function(){return this.groupDisplayColumns},e.prototype.updateDisplayedColumns=function(e){var t=this.calculateColumnsForDisplay();this.buildDisplayedTrees(t),this.calculateColumnsForGroupDisplay(),this.updateGroupsAndDisplayedColumns(e),this.setFirstRightAndLastLeftPinned(e)},e.prototype.isSecondaryColumnsPresent=function(){return this.secondaryColumnsPresent},e.prototype.setSecondaryColumns=function(e,t){void 0===t&&(t="api");var o=e&&e.length>0;if(o||this.secondaryColumnsPresent){if(o){this.processSecondaryColumnDefinitions(e);var r=this.columnFactory.createColumnTree(e,!1);this.secondaryBalancedTree=r.columnTree,this.secondaryHeaderRowCount=r.treeDept+1,this.secondaryColumns=this.getColumnsFromTree(this.secondaryBalancedTree),this.secondaryColumnsPresent=!0}else this.secondaryBalancedTree=null,this.secondaryHeaderRowCount=-1,this.secondaryColumns=null,this.secondaryColumnsPresent=!1;this.updateGridColumns(),this.updateDisplayedColumns(t)}},e.prototype.processSecondaryColumnDefinitions=function(e){var t=this.gridOptionsWrapper.getProcessSecondaryColDefFunc(),o=this.gridOptionsWrapper.getProcessSecondaryColGroupDefFunc();(t||o)&&e&&function e(r){r.forEach((function(r){if(S._.exists(r.children)){var i=r;o&&o(i),e(i.children)}else t&&t(r)}))}(e)},e.prototype.updateGridColumns=function(){this.gridColsArePrimary&&(this.lastPrimaryOrder=this.gridColumns),this.secondaryColumns&&this.secondaryBalancedTree?(this.gridBalancedTree=this.secondaryBalancedTree.slice(),this.gridHeaderRowCount=this.secondaryHeaderRowCount,this.gridColumns=this.secondaryColumns.slice(),this.gridColsArePrimary=!1):(this.gridBalancedTree=this.primaryColumnTree.slice(),this.gridHeaderRowCount=this.primaryHeaderRowCount,this.gridColumns=this.primaryColumns.slice(),this.gridColsArePrimary=!0,this.orderGridColsLikeLastPrimary()),this.addAutoGroupToGridColumns(),this.autoRowHeightColumns=this.gridColumns.filter((function(e){return e.getColDef().autoHeight})),this.putFixedColumnsFirst(),this.setupQuickFilterColumns(),this.clearDisplayedColumns(),this.colSpanActive=this.checkColSpanActiveInCols(this.gridColumns);var e={type:m.Events.EVENT_GRID_COLUMNS_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(e)},e.prototype.orderGridColsLikeLastPrimary=function(){var e=this;if(!S._.missing(this.lastPrimaryOrder)){var t=!0;if(this.gridColumns.forEach((function(o){e.lastPrimaryOrder.indexOf(o)>=0&&(t=!1)})),!t){var o=this.lastPrimaryOrder.filter((function(t){return e.gridColumns.indexOf(t)>=0})),r=this.gridColumns.filter((function(e){return o.indexOf(e)<0})),i=o.slice();r.forEach((function(e){var t=e.getOriginalParent();if(t){for(var o=[];!o.length&&t;)t.getLeafColumns().forEach((function(e){var t=i.indexOf(e)>=0,r=o.indexOf(e)<0;t&&r&&o.push(e)})),t=t.getOriginalParent();if(o.length){var r=o.map((function(e){return i.indexOf(e)})),n=Math.max.apply(Math,r);S._.insertIntoArray(i,e,n+1)}else i.push(e)}else i.push(e)})),this.gridColumns=i}}},e.prototype.isPrimaryColumnGroupsPresent=function(){return this.primaryHeaderRowCount>1},e.prototype.setupQuickFilterColumns=function(){this.groupAutoColumns?this.columnsForQuickFilter=this.primaryColumns.concat(this.groupAutoColumns):this.columnsForQuickFilter=this.primaryColumns},e.prototype.putFixedColumnsFirst=function(){var e=this.gridColumns.filter((function(e){return e.isLockPosition()})),t=this.gridColumns.filter((function(e){return!e.isLockPosition()}));this.gridColumns=e.concat(t)},e.prototype.addAutoGroupToGridColumns=function(){if(this.createGroupAutoColumnsIfNeeded(),!S._.missing(this.groupAutoColumns)){this.gridColumns=this.groupAutoColumns?this.groupAutoColumns.concat(this.gridColumns):this.gridColumns;var e=this.columnFactory.createForAutoGroups(this.groupAutoColumns,this.gridBalancedTree);this.gridBalancedTree=e.concat(this.gridBalancedTree)}},e.prototype.clearDisplayedColumns=function(){this.displayedLeftColumnTree=[],this.displayedRightColumnTree=[],this.displayedCentreColumnTree=[],this.displayedLeftHeaderRows={},this.displayedRightHeaderRows={},this.displayedCentreHeaderRows={},this.displayedLeftColumns=[],this.displayedRightColumns=[],this.displayedCenterColumns=[],this.allDisplayedColumns=[],this.allDisplayedVirtualColumns=[]},e.prototype.updateGroupsAndDisplayedColumns=function(e){this.updateOpenClosedVisibilityInColumnGroups(),this.updateDisplayedColumnsFromTrees(e),this.updateVirtualSets(),this.updateBodyWidths();var t={type:m.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)},e.prototype.updateDisplayedColumnsFromTrees=function(e){this.addToDisplayedColumns(this.displayedLeftColumnTree,this.displayedLeftColumns),this.addToDisplayedColumns(this.displayedCentreColumnTree,this.displayedCenterColumns),this.addToDisplayedColumns(this.displayedRightColumnTree,this.displayedRightColumns),this.setupAllDisplayedColumns(),this.setLeftValues(e)},e.prototype.setupAllDisplayedColumns=function(){this.gridOptionsWrapper.isEnableRtl()?this.allDisplayedColumns=this.displayedRightColumns.concat(this.displayedCenterColumns).concat(this.displayedLeftColumns):this.allDisplayedColumns=this.displayedLeftColumns.concat(this.displayedCenterColumns).concat(this.displayedRightColumns)},e.prototype.setLeftValues=function(e){this.setLeftValuesOfColumns(e),this.setLeftValuesOfGroups()},e.prototype.setLeftValuesOfColumns=function(e){var t=this,o=this.primaryColumns.slice(0),r=this.gridOptionsWrapper.isEnableRtl();[this.displayedLeftColumns,this.displayedRightColumns,this.displayedCenterColumns].forEach((function(i){if(r){var n=t.getWidthOfColsInList(i);i.forEach((function(t){n-=t.getActualWidth(),t.setLeft(n,e)}))}else{var s=0;i.forEach((function(t){t.setLeft(s,e),s+=t.getActualWidth()}))}S._.removeAllFromArray(o,i)})),o.forEach((function(t){t.setLeft(null,e)}))},e.prototype.setLeftValuesOfGroups=function(){[this.displayedLeftColumnTree,this.displayedRightColumnTree,this.displayedCentreColumnTree].forEach((function(e){e.forEach((function(e){e instanceof s.ColumnGroup&&e.checkLeft()}))}))},e.prototype.addToDisplayedColumns=function(e,t){t.length=0,this.columnUtils.depthFirstDisplayedColumnTreeSearch(e,(function(e){e instanceof a.Column&&t.push(e)}))},e.prototype.updateDisplayedCenterVirtualColumns=function(){this.suppressColumnVirtualisation?this.allDisplayedCenterVirtualColumns=this.displayedCenterColumns:this.allDisplayedCenterVirtualColumns=this.filterOutColumnsWithinViewport(),this.allDisplayedVirtualColumns=this.allDisplayedCenterVirtualColumns.concat(this.displayedLeftColumns).concat(this.displayedRightColumns);var e={};return this.allDisplayedVirtualColumns.forEach((function(t){e[t.getId()]=!0})),e},e.prototype.getVirtualHeaderGroupRow=function(e,t){var o;switch(e){case a.Column.PINNED_LEFT:o=this.displayedLeftHeaderRows[t];break;case a.Column.PINNED_RIGHT:o=this.displayedRightHeaderRows[t];break;default:o=this.displayedCentreHeaderRows[t]}return S._.missing(o)&&(o=[]),o},e.prototype.updateDisplayedVirtualGroups=function(e){function t(o,r,i){for(var n=!1,s=0;s<o.length;s++){var l=o[s];(l instanceof a.Column?!0===e[l.getId()]:t(l.getDisplayedChildren(),r,i+1))&&(n=!0,r[i]||(r[i]=[]),r[i].push(l))}return n}this.displayedLeftHeaderRows={},this.displayedRightHeaderRows={},this.displayedCentreHeaderRows={},t(this.displayedLeftColumnTree,this.displayedLeftHeaderRows,0),t(this.displayedRightColumnTree,this.displayedRightHeaderRows,0),t(this.displayedCentreColumnTree,this.displayedCentreHeaderRows,0)},e.prototype.updateVirtualSets=function(){var e=this.updateDisplayedCenterVirtualColumns();this.updateDisplayedVirtualGroups(e)},e.prototype.filterOutColumnsWithinViewport=function(){return S._.filter(this.displayedCenterColumns,this.isColumnInViewport.bind(this))},e.prototype.sizeColumnsToFit=function(e,t){var o=this;void 0===t&&(t="api");var r=this.getAllDisplayedColumns();if(!(e<=0||0===r.length)){for(var i=S._.filter(r,(function(e){return!0===e.getColDef().suppressSizeToFit})),n=S._.filter(r,(function(e){return!0!==e.getColDef().suppressSizeToFit})),s=n.slice(0),a=!1;!a;){a=!0;var l=e-this.getWidthOfColsInList(i);if(l<=0)n.forEach((function(e){e.setMinimum(t)}));else for(var p=l/this.getWidthOfColsInList(n),u=l,c=n.length-1;c>=0;c--){var d=n[c],h=Math.round(d.getActualWidth()*p);h<d.getMinWidth()?(d.setMinimum(t),f(d),a=!1):d.isGreaterThanMax(h)?(d.setActualWidth(d.getMaxWidth(),t),f(d),a=!1):0===c?d.setActualWidth(u,t):d.setActualWidth(h,t),u-=h}}this.setLeftValues(t),this.updateBodyWidths(),s.forEach((function(e){var t={type:m.Events.EVENT_COLUMN_RESIZED,column:e,columns:[e],finished:!0,api:o.gridApi,columnApi:o.columnApi,source:"sizeColumnsToFit"};o.eventService.dispatchEvent(t)}))}function f(e){S._.removeFromArray(n,e),i.push(e)}},e.prototype.buildDisplayedTrees=function(e){var t=S._.filter(e,(function(e){return"left"===e.getPinned()})),o=S._.filter(e,(function(e){return"right"===e.getPinned()})),r=S._.filter(e,(function(e){return"left"!==e.getPinned()&&"right"!==e.getPinned()})),i=new v.GroupInstanceIdCreator;this.displayedLeftColumnTree=this.displayedGroupCreator.createDisplayedGroups(t,this.gridBalancedTree,i,a.Column.PINNED_LEFT,this.displayedLeftColumnTree),this.displayedRightColumnTree=this.displayedGroupCreator.createDisplayedGroups(o,this.gridBalancedTree,i,a.Column.PINNED_RIGHT,this.displayedRightColumnTree),this.displayedCentreColumnTree=this.displayedGroupCreator.createDisplayedGroups(r,this.gridBalancedTree,i,null,this.displayedCentreColumnTree)},e.prototype.updateOpenClosedVisibilityInColumnGroups=function(){var e=this.getAllDisplayedColumnGroups();this.columnUtils.depthFirstAllColumnTreeSearch(e,(function(e){e instanceof s.ColumnGroup&&e.calculateDisplayedColumns()}))},e.prototype.getGroupAutoColumns=function(){return this.groupAutoColumns},e.prototype.createGroupAutoColumnsIfNeeded=function(){if(this.autoGroupsNeedBuilding)if(this.autoGroupsNeedBuilding=!1,!(this.rowGroupColumns.length>0||this.usingTreeData)||this.gridOptionsWrapper.isGroupSuppressAutoColumn()||this.gridOptionsWrapper.isGroupUseEntireRow()||this.gridOptionsWrapper.isGroupSuppressRow())this.groupAutoColumns=null;else{var e=this.autoGroupColService.createAutoGroupColumns(this.rowGroupColumns);!this.autoColsEqual(e,this.groupAutoColumns)&&(this.groupAutoColumns=e)}},e.prototype.autoColsEqual=function(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(var o=0;o<e.length;o++){var r=e[o],i=t[o];if(r.getColId()!==i.getColId())return!1}return!0},e.prototype.getWidthOfColsInList=function(e){for(var t=0,o=0;o<e.length;o++)t+=e[o].getActualWidth();return t},e.prototype.getGridBalancedTree=function(){return this.gridBalancedTree},r([C.Autowired("gridOptionsWrapper"),i("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([C.Autowired("expressionService"),i("design:type",p.ExpressionService)],e.prototype,"expressionService",void 0),r([C.Autowired("columnFactory"),i("design:type",u.ColumnFactory)],e.prototype,"columnFactory",void 0),r([C.Autowired("displayedGroupCreator"),i("design:type",c.DisplayedGroupCreator)],e.prototype,"displayedGroupCreator",void 0),r([C.Autowired("autoWidthCalculator"),i("design:type",d.AutoWidthCalculator)],e.prototype,"autoWidthCalculator",void 0),r([C.Autowired("eventService"),i("design:type",h.EventService)],e.prototype,"eventService",void 0),r([C.Autowired("columnUtils"),i("design:type",f.ColumnUtils)],e.prototype,"columnUtils",void 0),r([C.Autowired("context"),i("design:type",C.Context)],e.prototype,"context",void 0),r([C.Autowired("columnAnimationService"),i("design:type",w.ColumnAnimationService)],e.prototype,"columnAnimationService",void 0),r([C.Autowired("autoGroupColService"),i("design:type",E.AutoGroupColService)],e.prototype,"autoGroupColService",void 0),r([C.Optional("aggFuncService"),i("design:type",Object)],e.prototype,"aggFuncService",void 0),r([C.Optional("valueCache"),i("design:type",_.ValueCache)],e.prototype,"valueCache",void 0),r([C.Autowired("columnApi"),i("design:type",R.ColumnApi)],e.prototype,"columnApi",void 0),r([C.Autowired("gridApi"),i("design:type",b.GridApi)],e.prototype,"gridApi",void 0),r([C.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"init",null),r([n(0,C.Qualifier("loggerFactory")),i("design:type",Function),i("design:paramtypes",[g.LoggerFactory]),i("design:returntype",void 0)],e.prototype,"setBeans",null),r([C.Bean("columnController")],e)}();t.ColumnController=O},99093:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(72493),l=o(22131),p=o(44081),u=o(47721),c=o(83423),d=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return i(t,e),t.prototype.init=function(e){var t=c._.createIconNoSpan("groupLoading",this.gridOptionsWrapper,null);this.eLoadingIcon.appendChild(t);var o=this.gridOptionsWrapper.getLocaleTextFunc();this.eLoadingText.innerText=o("loadingOoo","Loading")},t.prototype.refresh=function(e){return!1},t.TEMPLATE='<div class="ag-stub-cell">\n <span class="ag-loading-icon" ref="eLoadingIcon"></span>\n <span class="ag-loading-text" ref="eLoadingText"></span>\n </div>',n([a.Autowired("gridOptionsWrapper"),s("design:type",p.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),n([u.RefSelector("eLoadingIcon"),s("design:type",HTMLElement)],t.prototype,"eLoadingIcon",void 0),n([u.RefSelector("eLoadingText"),s("design:type",HTMLElement)],t.prototype,"eLoadingText",void 0),t}(l.Component);t.LoadingCellRenderer=d},99104:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(13650),l=o(47721),p=o(83423),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getDefaultType=function(){return a.BaseFilter.CONTAINS},t.prototype.customInit=function(){this.comparator=this.filterParams.textCustomComparator?this.filterParams.textCustomComparator:t.DEFAULT_COMPARATOR,this.formatter=this.filterParams.textFormatter?this.filterParams.textFormatter:1==this.filterParams.caseSensitive?t.DEFAULT_FORMATTER:t.DEFAULT_LOWERCASE_FORMATTER,e.prototype.customInit.call(this)},t.prototype.modelFromFloatingFilter=function(e){return{type:this.selectedFilter,filter:e,filterType:"text"}},t.prototype.getApplicableFilterTypes=function(){return[a.BaseFilter.EQUALS,a.BaseFilter.NOT_EQUAL,a.BaseFilter.STARTS_WITH,a.BaseFilter.ENDS_WITH,a.BaseFilter.CONTAINS,a.BaseFilter.NOT_CONTAINS]},t.prototype.bodyTemplate=function(e){var t=this.translate.bind(this);return'<div class="ag-filter-body">\n <div class="ag-input-text-wrapper">\n <input class="ag-filter-filter" id='+(e==a.FilterConditionType.MAIN?"filterText":"filterConditionText")+' type="text" placeholder="'+t("filterOoo","Filter...")+'"/>\n </div>\n </div>'},t.prototype.initialiseFilterBodyUi=function(t){e.prototype.initialiseFilterBodyUi.call(this,t),this.addFilterChangedListener(t),this.setFilter(this.filterConditionText,a.FilterConditionType.CONDITION),this.setFilterType(this.selectedFilterCondition,a.FilterConditionType.CONDITION)},t.prototype.addFilterChangedListener=function(e){var t=this,o=e===a.FilterConditionType.MAIN?this.eFilterTextField:this.eFilterConditionTextField,r=this.getDebounceMs(this.filterParams),i=p._.debounce((function(){return t.onFilterTextFieldChanged(e)}),r);this.addDestroyableEventListener(o,"input",i)},t.prototype.refreshFilterBodyUi=function(e){var t=e===a.FilterConditionType.MAIN?this.selectedFilter:this.selectedFilterCondition;this.eFilterConditionTextField&&this.addFilterChangedListener(a.FilterConditionType.CONDITION);var o=e===a.FilterConditionType.MAIN?this.eFilterTextField:this.eFilterConditionTextField;if(o){var r=!this.doesFilterHaveHiddenInput(t)&&t!==a.BaseFilter.EMPTY;p._.setVisible(o,r)}},t.prototype.afterGuiAttached=function(){this.eFilterTextField.focus()},t.prototype.filterValues=function(e){return e===a.FilterConditionType.MAIN?this.filterText:this.filterConditionText},t.prototype.individualFilterPasses=function(e,t){var o=t==a.FilterConditionType.MAIN?this.filterText:this.filterConditionText,r=t==a.FilterConditionType.MAIN?this.selectedFilter:this.selectedFilterCondition,i=this.customFilterOptions[r];if(i&&(null!=o||i.hideFilterInput)){var n=this.filterParams.valueGetter(e.node),s=this.formatter(n);return i.test(o,s)}return o?this.checkIndividualFilter(e,r,o):t===a.FilterConditionType.MAIN||"AND"===this.conditionValue},t.prototype.checkIndividualFilter=function(e,t,o){var r=this.filterParams.valueGetter(e.node),i=this.formatter(o);if(null==r||void 0===r)return t===a.BaseFilter.NOT_EQUAL||t===a.BaseFilter.NOT_CONTAINS;var n=this.formatter(r);return this.comparator(t,n,i)},t.prototype.onFilterTextFieldChanged=function(e){var t=e===a.FilterConditionType.MAIN?this.eFilterTextField.value:this.eFilterConditionTextField.value,o=e===a.FilterConditionType.MAIN?this.filterText:this.filterConditionText,r=p._.makeNull(t);if(r&&""===r.trim()&&(r=null),o!==r){var i=r&&1!=this.filterParams.caseSensitive?r.toLowerCase():r,n=o&&1!=this.filterParams.caseSensitive?o.toLowerCase():o;e===a.FilterConditionType.MAIN?this.filterText=this.formatter(r):this.filterConditionText=this.formatter(r),n!==i&&this.onFilterChanged()}},t.prototype.setFilter=function(e,t){if(e=p._.makeNull(e),t===a.FilterConditionType.MAIN)if(e){if(this.filterText=this.formatter(e),!this.eFilterTextField)return;this.eFilterTextField.value=e}else{if(this.filterText=null,!this.eFilterTextField)return;this.eFilterTextField.value=null}else if(e){if(this.filterConditionText=this.formatter(e),!this.eFilterConditionTextField)return;this.eFilterConditionTextField.value=e}else{if(this.filterConditionText=null,!this.eFilterConditionTextField)return;this.eFilterConditionTextField.value=null}},t.prototype.getFilter=function(){return this.filterText},t.prototype.resetState=function(e){void 0===e&&(e=!1),e||(this.setFilterType(this.defaultFilter,a.FilterConditionType.MAIN),this.setFilter(null,a.FilterConditionType.MAIN)),this.setFilterType(this.defaultFilter,a.FilterConditionType.CONDITION),this.setFilter(null,a.FilterConditionType.CONDITION)},t.prototype.serialize=function(e){var t=e===a.FilterConditionType.MAIN?this.selectedFilter:this.selectedFilterCondition,o=e===a.FilterConditionType.MAIN?this.filterText:this.filterConditionText;return{type:t||this.defaultFilter,filter:o,filterType:"text"}},t.prototype.parse=function(e,t){this.setFilterType(e.type,t),this.setFilter(e.filter,t)},t.prototype.setType=function(e,t){this.setFilterType(e,t)},t.DEFAULT_FORMATTER=function(e){return e},t.DEFAULT_LOWERCASE_FORMATTER=function(e){return null==e?null:e.toString().toLowerCase()},t.DEFAULT_COMPARATOR=function(e,o,r){switch(e){case t.CONTAINS:return o.indexOf(r)>=0;case t.NOT_CONTAINS:return-1===o.indexOf(r);case t.EQUALS:return o===r;case t.NOT_EQUAL:return o!=r;case t.STARTS_WITH:return 0===o.indexOf(r);case t.ENDS_WITH:var i=o.lastIndexOf(r);return i>=0&&i===o.length-r.length;default:return console.warn("invalid filter type "+e),!1}},n([l.QuerySelector("#filterText"),s("design:type",HTMLInputElement)],t.prototype,"eFilterTextField",void 0),n([l.QuerySelector("#filterConditionText"),s("design:type",HTMLInputElement)],t.prototype,"eFilterConditionTextField",void 0),t}(a.ComparableBaseFilter);t.TextFilter=u},99162:function(e,t,o){var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,r){var i,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,o,s):i(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var l=o(72493),p=o(60843),u=o(85786),c=o(37132),d=o(28921),h=o(65802),f=o(40797),g=o(44871),m=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t.prototype.setBeans=function(e){this.logger=e.create("InfiniteCache")},t.prototype.init=function(){e.prototype.init.call(this),this.getRow(0)},t.prototype.moveItemsDown=function(e,t,o){for(var r=e.getStartRow(),i=t+o,n=e.getEndRow()-1;n>=r;n--)if(!(n<i)){var s=n-o,a=this.getRow(s,!0);a?e.setRowNode(n,a):(e.setBlankRowNode(n),e.setDirty())}},t.prototype.insertItems=function(e,t,o){for(var r=e.getStartRow(),i=e.getEndRow(),n=[],s=0;s<o.length;s++){var a=t+s;if(a>=r&&a<i){var l=o[s],p=e.setNewData(a,l);n.push(p)}}return n},t.prototype.insertItemsAtIndex=function(e,t){var o=this,r=[];this.forEachBlockInReverseOrder((function(i){i.getEndRow()<=e||(o.moveItemsDown(i,e,t.length),o.insertItems(i,e,t).forEach((function(e){return r.push(e)})))})),this.isMaxRowFound()&&this.hack_setVirtualRowCount(this.getVirtualRowCount()+t.length),this.onCacheUpdated();var i={type:u.Events.EVENT_ROW_DATA_UPDATED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(i)},t.prototype.getRow=function(e,t){void 0===t&&(t=!1);var o=Math.floor(e/this.cacheParams.blockSize),r=this.getBlock(o);if(!r){if(t)return null;r=this.createBlock(o)}return r.getRow(e)},t.prototype.createBlock=function(e){var t=new d.InfiniteBlock(e,this.cacheParams);return this.getContext().wireBean(t),this.postCreateBlock(t),t},t.prototype.refreshCache=function(){this.forEachBlockInOrder((function(e){return e.setDirty()})),this.checkBlockToLoad()},n([l.Autowired("eventService"),s("design:type",p.EventService)],t.prototype,"eventService",void 0),n([l.Autowired("columnApi"),s("design:type",g.ColumnApi)],t.prototype,"columnApi",void 0),n([l.Autowired("gridApi"),s("design:type",f.GridApi)],t.prototype,"gridApi",void 0),n([a(0,l.Qualifier("loggerFactory")),s("design:type",Function),s("design:paramtypes",[c.LoggerFactory]),s("design:returntype",void 0)],t.prototype,"setBeans",null),n([l.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"init",null),t}(h.RowNodeCache);t.InfiniteCache=m},99770:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultColumnTypes={numericColumn:{headerClass:"ag-numeric-header",cellClass:"ag-numeric-cell"}}}};
|