@mongodb-js/compass-web 1.0.2 → 1.1.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.
Files changed (29) hide show
  1. package/dist/112.cc6e81f79429e73c45e2.mjs +1 -0
  2. package/dist/260.22d04797e908a8464d8f.mjs +2 -0
  3. package/dist/302.21e186c638bb98594c8f.mjs +1 -0
  4. package/dist/318.e28eef3a6f052df2dd22.mjs +2 -0
  5. package/dist/{127.3d74d7292010279682c5.mjs → 641.18c979ce0458e2237d9c.mjs} +16 -16
  6. package/dist/65.0f0eb2e998535a138203.mjs +2 -0
  7. package/dist/{560.e85e11aa098b341006f3.mjs → 748.a00d5f64d2d9c20c710e.mjs} +3 -3
  8. package/dist/{560.e85e11aa098b341006f3.mjs.LICENSE.txt → 748.a00d5f64d2d9c20c710e.mjs.LICENSE.txt} +29 -8
  9. package/dist/872.ef5d7ce50c99edff7074.mjs +2 -0
  10. package/dist/872.ef5d7ce50c99edff7074.mjs.LICENSE.txt +20 -0
  11. package/dist/assets-manifest.json +10 -10
  12. package/dist/compass-web.mjs +3 -3
  13. package/dist/index-0b9a48a6.ccf0681421db4308ee5e.mjs +29 -0
  14. package/dist/index-bde52cb3.b853042540744e5a5322.mjs +1 -0
  15. package/dist/tsdoc-metadata.json +1 -1
  16. package/package.json +49 -47
  17. package/dist/106.e50960c29b57a8b92ec5.mjs +0 -2
  18. package/dist/106.e50960c29b57a8b92ec5.mjs.LICENSE.txt +0 -12
  19. package/dist/14.4041757b6d1c01a732c6.mjs +0 -2
  20. package/dist/260.52fdf61d69ac2a2921dc.mjs +0 -2
  21. package/dist/302.34205d8fa79ef45d79b5.mjs +0 -1
  22. package/dist/318.da796d13247ed6c3c28b.mjs +0 -2
  23. package/dist/717.32457884d95d961bc576.mjs +0 -1
  24. package/dist/index-0b9a48a6.8808d00d1b8145c52728.mjs +0 -29
  25. package/dist/index-bde52cb3.6f51548cb3f25ef57945.mjs +0 -1
  26. /package/dist/{260.52fdf61d69ac2a2921dc.mjs.LICENSE.txt → 260.22d04797e908a8464d8f.mjs.LICENSE.txt} +0 -0
  27. /package/dist/{318.da796d13247ed6c3c28b.mjs.LICENSE.txt → 318.e28eef3a6f052df2dd22.mjs.LICENSE.txt} +0 -0
  28. /package/dist/{127.3d74d7292010279682c5.mjs.LICENSE.txt → 641.18c979ce0458e2237d9c.mjs.LICENSE.txt} +0 -0
  29. /package/dist/{14.4041757b6d1c01a732c6.mjs.LICENSE.txt → 65.0f0eb2e998535a138203.mjs.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 872.ef5d7ce50c99edff7074.mjs.LICENSE.txt */
2
+ export const __webpack_esm_id__=872;export const __webpack_esm_ids__=[872];export const __webpack_esm_modules__={706:function(e,t,o){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},r.apply(this,arguments)},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=n(o(96652)),s=o(17642),a=o(61146),l=o(36431),u=o(41320),p=o(30345);t.default=i.memo((function(e){var t=i.useContext(s.BeansContext).context,o=i.useState(),n=o[0],c=o[1],d=i.useState(),h=d[0],f=d[1],g=i.useState(),m=g[0],y=g[1],v=i.useState(),C=v[0],w=v[1],E=i.useState(),_=E[0],S=E[1],R=i.useState(),b=R[0],O=R[1],P=i.useRef(null),T=i.useRef(null),A=i.useRef(null),D=i.useRef(),I=e.ctrl,N=i.useMemo((function(){return new a.CssClassManager((function(){return P.current}))}),[]);p.useEffectOnce((function(){var e={setWidth:function(e){return c(e)},addOrRemoveCssClass:function(e,t){return N.addOrRemoveCssClass(e,t)},setColId:function(e){return y(e)},setTitle:function(e){return f(e)},setAriaDescription:function(e){return S(e)},setAriaSort:function(e){return w(e)},setUserCompDetails:function(e){return O(e)},getUserCompInstance:function(){return D.current||void 0}};I.setComp(e,P.current,T.current,A.current);var t=I.getSelectAllGui();T.current.insertAdjacentElement("afterend",t)})),i.useEffect((function(){return u.showJsComp(b,t,A.current,D)}),[b]),i.useEffect((function(){I.setDragSource(P.current)}),[b]);var x=i.useMemo((function(){return{width:n}}),[n]),M=i.useMemo((function(){var e;return!(!(null===(e=b)||void 0===e?void 0:e.componentFromFramework)||!l.isComponentStateless(b.componentClass))}),[b]),L=b&&b.componentFromFramework,F=b&&b.componentClass;return i.default.createElement("div",{ref:P,className:"ag-header-cell",style:x,title:h,"col-id":m,"aria-sort":C,role:"columnheader",tabIndex:-1,"aria-description":_},i.default.createElement("div",{ref:T,className:"ag-header-cell-resize",role:"presentation"}),i.default.createElement("div",{ref:A,className:"ag-header-cell-comp-wrapper",role:"presentation"},L&&M&&i.default.createElement(F,r({},b.params)),L&&!M&&i.default.createElement(F,r({},b.params,{ref:D}))))}))},885:function(e,t){var o=this&&this.__spreadArrays||function(){for(var e=0,t=0,o=arguments.length;t<o;t++)e+=arguments[t].length;var r=Array(e),n=0;for(t=0;t<o;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,n++)r[n]=i[s];return r};Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(t,o,r){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=o||"div",this.parent=t,this.maxComponentCreationTimeMs=r||e.MAX_COMPONENT_CREATION_TIME_IN_MS}return e.prototype.getPortals=function(){return this.portals},e.prototype.destroy=function(){this.destroyed=!0},e.prototype.destroyPortal=function(e){this.portals=this.portals.filter((function(t){return t!==e})),this.batchUpdate()},e.prototype.getComponentWrappingElement=function(){return this.wrappingElement},e.prototype.mountReactPortal=function(e,t,r){this.portals=o(this.portals,[e]),this.waitForInstance(t,r),this.batchUpdate()},e.prototype.updateReactPortal=function(e,t){this.portals[this.portals.indexOf(e)]=t,this.batchUpdate()},e.prototype.batchUpdate=function(){var e=this;this.hasPendingPortalUpdate||(setTimeout((function(){e.destroyed||e.parent.forceUpdate((function(){e.hasPendingPortalUpdate=!1}))})),this.hasPendingPortalUpdate=!0)},e.prototype.waitForInstance=function(e,t,o){var r=this;if(void 0===o&&(o=Date.now()),this.destroyed)t(null);else if(e.rendered())t(e);else{if(Date.now()-o>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate)return e.isNullValue()?void t(e):void console.error("AG Grid: React Component '"+e.getReactComponentName()+"' not created within "+this.maxComponentCreationTimeMs+"ms");window.setTimeout((function(){r.waitForInstance(e,t,o)}))}},e.MAX_COMPONENT_CREATION_TIME_IN_MS=1e3,e}();t.PortalManager=r},1743:function(e,t,o){var r,n=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)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=o(61146),u=s(o(96652)),p=o(60372),c=o(24004),d=o(41612),h=o(885),f=a(o(52455)),g=o(98206),m=function(e){function t(t){var o=e.call(this,t)||this;return o.props=t,o.destroyFuncs=[],o.changeDetectionService=new c.ChangeDetectionService,o.eGui=u.default.createRef(),o.whenReadyFuncs=[],o.ready=!1,o.renderedAfterMount=!1,o.mounted=!1,o.state={context:void 0},o.portalManager=new h.PortalManager(o,t.componentWrappingElement,t.maxComponentCreationTimeMs),o.destroyFuncs.push((function(){return o.portalManager.destroy()})),o}return n(t,e),t.prototype.render=function(){return this.state.context,this.state.context&&(this.renderedAfterMount=!0),u.default.createElement("div",{style:this.createStyleForDiv(),className:this.props.className,ref:this.eGui},this.state.context&&u.default.createElement(f.default,{context:this.state.context}),this.portalManager.getPortals())},t.prototype.createStyleForDiv=function(){return i({height:"100%"},this.props.containerStyle||{})},t.prototype.componentDidMount=function(){var e=this;if(!this.mounted){this.mounted=!0;var t=this.props.modules||[],o={providedBeanInstances:{frameworkComponentWrapper:new y(this.portalManager)},modules:t,frameworkOverrides:new g.ReactFrameworkOverrides(!0)};this.gridOptions=this.props.gridOptions||{};var r=this.props.children;p.AgGridColumn.hasChildColumns(r)&&(this.gridOptions.columnDefs=p.AgGridColumn.mapChildColumnDefs(r)),this.gridOptions=l.ComponentUtil.copyAttributesToGridOptions(this.gridOptions,this.props),(new l.GridCoreCreator).create(this.eGui.current,this.gridOptions,(function(t){e.setState({context:t}),t.getBean(l.CtrlsService.NAME).whenReady((function(){e.api=e.gridOptions.api,e.columnApi=e.gridOptions.columnApi,e.props.setGridApi(e.api,e.columnApi),e.destroyFuncs.push((function(){return e.api.destroy()}))}))}),(function(t){t.getBean(l.CtrlsService.NAME).whenReady((function(){e.whenReadyFuncs.forEach((function(e){return e()})),e.whenReadyFuncs.length=0,e.ready=!0}))}),o)}},t.prototype.componentWillUnmount=function(){this.renderedAfterMount&&(this.destroyFuncs.forEach((function(e){return e()})),this.destroyFuncs.length=0)},t.prototype.componentDidUpdate=function(e){this.processPropsChanges(e,this.props)},t.prototype.processPropsChanges=function(e,t){var o={};this.extractGridPropertyChanges(e,t,o),this.extractDeclarativeColDefChanges(t,o),this.processChanges(o)},t.prototype.extractDeclarativeColDefChanges=function(e,t){if(!(this.props.gridOptions&&this.props.gridOptions.columnDefs||this.props.columnDefs)){var o=!!e.debug,r="columnDefs",n=this.gridOptions.columnDefs;if(p.AgGridColumn.hasChildColumns(e.children)){var i=this.changeDetectionService.getStrategy(this.getStrategyTypeForProp(r)),s=p.AgGridColumn.mapChildColumnDefs(e.children);i.areEqual(n,s)||(o&&console.log("agGridReact: colDefs definitions changed"),t[r]={previousValue:n,currentValue:s})}else n&&n.length>0&&(t[r]={previousValue:n,currentValue:[]})}},t.prototype.extractGridPropertyChanges=function(e,t,o){var r=this,n=!!t.debug;Object.keys(t).forEach((function(i){l._.includes(l.ComponentUtil.ALL_PROPERTIES,i)&&(r.changeDetectionService.getStrategy(r.getStrategyTypeForProp(i)).areEqual(e[i],t[i])||(n&&console.log("agGridReact: ["+i+"] property changed"),o[i]={previousValue:e[i],currentValue:t[i]}))})),l.ComponentUtil.getEventCallbacks().forEach((function(r){e[r]!==t[r]&&(n&&console.log("agGridReact: ["+r+"] event callback changed"),o[r]={previousValue:e[r],currentValue:t[r]})}))},t.prototype.processChanges=function(e){var t=this;this.processWhenReady((function(){return l.ComponentUtil.processOnChange(e,t.gridOptions,t.api,t.columnApi)}))},t.prototype.processWhenReady=function(e){this.ready?e():this.whenReadyFuncs.push(e)},t.prototype.getStrategyTypeForProp=function(e){if("rowData"===e){if(this.props.rowDataChangeDetectionStrategy)return this.props.rowDataChangeDetectionStrategy;if(this.isImmutableDataActive())return c.ChangeDetectionStrategyType.IdentityCheck}return c.ChangeDetectionStrategyType.DeepValueCheck},t.prototype.isImmutableDataActive=function(){return this.props.deltaRowDataMode||this.props.immutableData||null!=this.props.getRowId||this.props.gridOptions&&(this.props.gridOptions.deltaRowDataMode||this.props.gridOptions.immutableData||null!=this.props.gridOptions.getRowId)},t}(u.Component);t.AgGridReactUi=m;var y=function(e){function t(t){var o=e.call(this)||this;return o.parent=t,o}return n(t,e),t.prototype.createWrapper=function(e,t){return new d.NewReactComponent(e,this.parent,t)},t}(l.BaseComponentWrapper)},2511:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CommaAndColonSeparatedRecord=t.ConnectionString=t.redactConnectionString=void 0;const r=o(21655),n=o(86834);Object.defineProperty(t,"redactConnectionString",{enumerable:!0,get:function(){return n.redactConnectionString}});const i="__this_is_a_placeholder__",s=/^(?<protocol>[^/]+):\/\/(?:(?<username>[^:@]*)(?::(?<password>[^@]*))?@)?(?<hosts>(?!:)[^/?@]*)(?<rest>.*)/;class a extends Map{delete(e){return super.delete(this._normalizeKey(e))}get(e){return super.get(this._normalizeKey(e))}has(e){return super.has(this._normalizeKey(e))}set(e,t){return super.set(this._normalizeKey(e),t)}_normalizeKey(e){e=`${e}`;for(const t of this.keys())if(t.toLowerCase()===e.toLowerCase()){e=t;break}return e}}class l extends r.URL{}class u extends Error{get name(){return"MongoParseError"}}class p extends l{_hosts;constructor(e,t={}){const{looseValidation:o}=t;if(!o&&!(r=e).startsWith("mongodb://")&&!r.startsWith("mongodb+srv://"))throw new u('Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"');var r;const n=e.match(s);if(!n)throw new u("Invalid connection string");const{protocol:l,username:c,password:d,hosts:h,rest:f}=n.groups??{};if(!o){if(!l||!h)throw new u("Protocol and host list are required in the uri");try{decodeURIComponent(c??""),decodeURIComponent(d??"")}catch(e){throw new u(e.message)}const t=/[:/?#[\]@]/gi;if(c?.match(t))throw new u(`Username contains unescaped characters ${c}`);if(!c||!d){const t=e.replace(`${l}://`,"");if(t.startsWith("@")||t.startsWith(":"))throw new u("URI contained empty userinfo section")}if(d?.match(t))throw new u("Password contains unescaped characters");if(f?.match(/^[^/?]*@/))throw new u("Invalid connection string")}let g="";"string"==typeof c&&(g+=c),"string"==typeof d&&(g+=`:${d}`),g&&(g+="@");try{super(`${l.toLowerCase()}://${g}${i}${f}`)}catch(r){throw o&&new p(e,{...t,looseValidation:!1}),"string"==typeof r.message&&(r.message=r.message.replace(i,h)),r}if(this._hosts=h.split(","),!o){if(this.isSRV&&1!==this.hosts.length)throw new u("mongodb+srv URI cannot have multiple service names");if(this.isSRV&&this.hosts.some((e=>e.includes(":"))))throw new u("mongodb+srv URI cannot have port number")}var m;this.pathname||(this.pathname="/"),Object.setPrototypeOf(this.searchParams,(m=this.searchParams.constructor,class extends m{append(e,t){return super.append(this._normalizeKey(e),t)}delete(e){return super.delete(this._normalizeKey(e))}get(e){return super.get(this._normalizeKey(e))}getAll(e){return super.getAll(this._normalizeKey(e))}has(e){return super.has(this._normalizeKey(e))}set(e,t){return super.set(this._normalizeKey(e),t)}keys(){return super.keys()}values(){return super.values()}entries(){return super.entries()}[Symbol.iterator](){return super[Symbol.iterator]()}_normalizeKey(e){return a.prototype._normalizeKey.call(this,e)}}).prototype)}get host(){return i}set host(e){throw new Error("No single host for connection string")}get hostname(){return i}set hostname(e){throw new Error("No single host for connection string")}get port(){return""}set port(e){throw new Error("No single host for connection string")}get href(){return this.toString()}set href(e){throw new Error("Cannot set href for connection strings")}get isSRV(){return this.protocol.includes("srv")}get hosts(){return this._hosts}set hosts(e){this._hosts=e}toString(){return super.toString().replace(i,this.hosts.join(","))}clone(){return new p(this.toString(),{looseValidation:!0})}redact(e){return(0,n.redactValidConnectionString)(this,e)}typedSearchParams(){return this.searchParams}[Symbol.for("nodejs.util.inspect.custom")](){const{href:e,origin:t,protocol:o,username:r,password:n,hosts:i,pathname:s,search:a,searchParams:l,hash:u}=this;return{href:e,origin:t,protocol:o,username:r,password:n,hosts:i,pathname:s,search:a,searchParams:l,hash:u}}}t.ConnectionString=p,t.CommaAndColonSeparatedRecord=class extends a{constructor(e){super();for(const t of(e??"").split(",")){if(!t)continue;const e=t.indexOf(":");-1===e?this.set(t,""):this.set(t.slice(0,e),t.slice(e+1))}}toString(){return[...this].map((e=>e.join(":"))).join(",")}},t.default=p},4918:function(e,t,o){var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,o=arguments.length;t<o;t++)e+=arguments[t].length;var r=Array(e),n=0;for(t=0;t<o;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,n++)r[n]=i[s];return r},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(61146),a=n(o(96652)),l=o(17642),u=i(o(706)),p=i(o(71893)),c=i(o(96300)),d=o(30345);t.default=a.memo((function(e){var t=a.useContext(l.BeansContext).gridOptionsWrapper,o=a.useState(),n=o[0],i=o[1],h=a.useState(),f=h[0],g=h[1],m=a.useState(),y=m[0],v=m[1],C=a.useState(),w=C[0],E=C[1],_=a.useState(),S=_[0],R=_[1],b=a.useState([]),O=b[0],P=b[1],T=a.useRef(null),A=e.ctrl,D=A.getType()===s.HeaderRowType.COLUMN,I=A.getType()===s.HeaderRowType.COLUMN_GROUP,N=A.getType()===s.HeaderRowType.FLOATING_FILTER,x=a.useCallback((function(e,o){if(t.isEnsureDomOrder())return o;var n=s._.mapById(e,(function(e){return e.getInstanceId()})),i=s._.mapById(o,(function(e){return e.getInstanceId()})),a=e.filter((function(e){return i.has(e.getInstanceId())})),l=o.filter((function(e){return!n.has(e.getInstanceId())}));return r(a,l)}),[]);d.useEffectOnce((function(){var e={setTransform:function(e){return i(e)},setHeight:function(e){return g(e)},setTop:function(e){return v(e)},setHeaderCtrls:function(e){return P((function(t){return x(t,e)}))},setWidth:function(e){return E(e)},setAriaRowIndex:function(e){return R(e)}};A.setComp(e)}));var M=a.useMemo((function(){return{transform:n,height:f,top:y,width:w}}),[n,f,y,w]),L=a.useMemo((function(){var e=["ag-header-row"];return D&&e.push("ag-header-row-column"),I&&e.push("ag-header-row-column-group"),N&&e.push("ag-header-row-column-filter"),e.join(" ")}),[]),F=a.useCallback((function(e){switch(A.getType()){case s.HeaderRowType.COLUMN_GROUP:return a.default.createElement(p.default,{ctrl:e,key:e.getInstanceId()});case s.HeaderRowType.FLOATING_FILTER:return a.default.createElement(c.default,{ctrl:e,key:e.getInstanceId()});default:return a.default.createElement(u.default,{ctrl:e,key:e.getInstanceId()})}}),[]);return a.default.createElement("div",{ref:T,className:L,role:"row",style:M,"aria-rowindex":S},O.map(F))}))},5652:function(e,t,o){var r,n=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(t,o);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,n)}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[t.length]=o);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o=r(e),s=0;s<o.length;s++)"default"!==o[s]&&n(t,e,o[s]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.redactValidConnectionString=function(e,t){const o=e.clone(),r=t?.replacementString??"_credentials_",n=t?.redactUsernames??!0;if((o.username||o.password)&&n?(o.username=r,o.password=""):o.password&&(o.password=r),o.searchParams.has("authMechanismProperties")){const e=new a.CommaAndColonSeparatedRecord(o.searchParams.get("authMechanismProperties"));e.get("AWS_SESSION_TOKEN")&&(e.set("AWS_SESSION_TOKEN",r),o.searchParams.set("authMechanismProperties",e.toString()))}return o.searchParams.has("tlsCertificateKeyFilePassword")&&o.searchParams.set("tlsCertificateKeyFilePassword",r),o.searchParams.has("proxyUsername")&&n&&o.searchParams.set("proxyUsername",r),o.searchParams.has("proxyPassword")&&o.searchParams.set("proxyPassword",r),o},t.redactConnectionString=function(e,t){const o=t?.replacementString??"<credentials>",r=t?.redactUsernames??!0;let n;try{n=new a.default(e)}catch{}if(n)return t={...t,replacementString:"___credentials___"},n.redact(t).toString().replace(/___credentials___/g,o);const i=o,s=[e=>e.replace(r?/(\/\/)(.*)(@)/g:/(\/\/[^@]*:)(.*)(@)/g,`$1${i}$3`),e=>e.replace(/(AWS_SESSION_TOKEN(:|%3A))([^,&]+)/gi,`$1${i}`),e=>e.replace(/(tlsCertificateKeyFilePassword=)([^&]+)/gi,`$1${i}`),e=>r?e.replace(/(proxyUsername=)([^&]+)/gi,`$1${i}`):e,e=>e.replace(/(proxyPassword=)([^&]+)/gi,`$1${i}`)];for(const t of s)e=t(e);return e};const a=s(o(34633))},7386:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CommaAndColonSeparatedRecord=t.ConnectionString=t.redactConnectionString=void 0;const r=o(21655),n=o(91705);Object.defineProperty(t,"redactConnectionString",{enumerable:!0,get:function(){return n.redactConnectionString}});const i="__this_is_a_placeholder__",s=/^(?<protocol>[^/]+):\/\/(?:(?<username>[^:@]*)(?::(?<password>[^@]*))?@)?(?<hosts>(?!:)[^/?@]*)(?<rest>.*)/;class a extends Map{delete(e){return super.delete(this._normalizeKey(e))}get(e){return super.get(this._normalizeKey(e))}has(e){return super.has(this._normalizeKey(e))}set(e,t){return super.set(this._normalizeKey(e),t)}_normalizeKey(e){e=`${e}`;for(const t of this.keys())if(t.toLowerCase()===e.toLowerCase()){e=t;break}return e}}class l extends r.URL{}class u extends Error{get name(){return"MongoParseError"}}class p extends l{_hosts;constructor(e,t={}){const{looseValidation:o}=t;if(!o&&!(r=e).startsWith("mongodb://")&&!r.startsWith("mongodb+srv://"))throw new u('Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"');var r;const n=e.match(s);if(!n)throw new u("Invalid connection string");const{protocol:l,username:c,password:d,hosts:h,rest:f}=n.groups??{};if(!o){if(!l||!h)throw new u("Protocol and host list are required in the uri");try{decodeURIComponent(c??""),decodeURIComponent(d??"")}catch(e){throw new u(e.message)}const t=/[:/?#[\]@]/gi;if(c?.match(t))throw new u(`Username contains unescaped characters ${c}`);if(!c||!d){const t=e.replace(`${l}://`,"");if(t.startsWith("@")||t.startsWith(":"))throw new u("URI contained empty userinfo section")}if(d?.match(t))throw new u("Password contains unescaped characters");if(f?.match(/^[^/?]*@/))throw new u("Invalid connection string")}let g="";"string"==typeof c&&(g+=c),"string"==typeof d&&(g+=`:${d}`),g&&(g+="@");try{super(`${l.toLowerCase()}://${g}${i}${f}`)}catch(r){throw o&&new p(e,{...t,looseValidation:!1}),"string"==typeof r.message&&(r.message=r.message.replace(i,h)),r}if(this._hosts=h.split(","),!o){if(this.isSRV&&1!==this.hosts.length)throw new u("mongodb+srv URI cannot have multiple service names");if(this.isSRV&&this.hosts.some((e=>e.includes(":"))))throw new u("mongodb+srv URI cannot have port number")}var m;this.pathname||(this.pathname="/"),Object.setPrototypeOf(this.searchParams,(m=this.searchParams.constructor,class extends m{append(e,t){return super.append(this._normalizeKey(e),t)}delete(e){return super.delete(this._normalizeKey(e))}get(e){return super.get(this._normalizeKey(e))}getAll(e){return super.getAll(this._normalizeKey(e))}has(e){return super.has(this._normalizeKey(e))}set(e,t){return super.set(this._normalizeKey(e),t)}keys(){return super.keys()}values(){return super.values()}entries(){return super.entries()}[Symbol.iterator](){return super[Symbol.iterator]()}_normalizeKey(e){return a.prototype._normalizeKey.call(this,e)}}).prototype)}get host(){return i}set host(e){throw new Error("No single host for connection string")}get hostname(){return i}set hostname(e){throw new Error("No single host for connection string")}get port(){return""}set port(e){throw new Error("No single host for connection string")}get href(){return this.toString()}set href(e){throw new Error("Cannot set href for connection strings")}get isSRV(){return this.protocol.includes("srv")}get hosts(){return this._hosts}set hosts(e){this._hosts=e}toString(){return super.toString().replace(i,this.hosts.join(","))}clone(){return new p(this.toString(),{looseValidation:!0})}redact(e){return(0,n.redactValidConnectionString)(this,e)}typedSearchParams(){return this.searchParams}[Symbol.for("nodejs.util.inspect.custom")](){const{href:e,origin:t,protocol:o,username:r,password:n,hosts:i,pathname:s,search:a,searchParams:l,hash:u}=this;return{href:e,origin:t,protocol:o,username:r,password:n,hosts:i,pathname:s,search:a,searchParams:l,hash:u}}}t.ConnectionString=p,t.CommaAndColonSeparatedRecord=class extends a{constructor(e){super();for(const t of(e??"").split(",")){if(!t)continue;const e=t.indexOf(":");-1===e?this.set(t,""):this.set(t.slice(0,e),t.slice(e+1))}}toString(){return[...this].map((e=>e.join(":"))).join(",")}},t.default=p},8069:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CommaAndColonSeparatedRecord=t.ConnectionString=t.redactConnectionString=void 0;const r=o(21655),n=o(45928);Object.defineProperty(t,"redactConnectionString",{enumerable:!0,get:function(){return n.redactConnectionString}});const i="__this_is_a_placeholder__",s=/^(?<protocol>[^/]+):\/\/(?:(?<username>[^:@]*)(?::(?<password>[^@]*))?@)?(?<hosts>(?!:)[^/?@]*)(?<rest>.*)/;class a extends Map{delete(e){return super.delete(this._normalizeKey(e))}get(e){return super.get(this._normalizeKey(e))}has(e){return super.has(this._normalizeKey(e))}set(e,t){return super.set(this._normalizeKey(e),t)}_normalizeKey(e){e=`${e}`;for(const t of this.keys())if(t.toLowerCase()===e.toLowerCase()){e=t;break}return e}}class l extends r.URL{}class u extends Error{get name(){return"MongoParseError"}}class p extends l{_hosts;constructor(e,t={}){const{looseValidation:o}=t;if(!o&&!(r=e).startsWith("mongodb://")&&!r.startsWith("mongodb+srv://"))throw new u('Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"');var r;const n=e.match(s);if(!n)throw new u("Invalid connection string");const{protocol:l,username:c,password:d,hosts:h,rest:f}=n.groups??{};if(!o){if(!l||!h)throw new u("Protocol and host list are required in the uri");try{decodeURIComponent(c??""),decodeURIComponent(d??"")}catch(e){throw new u(e.message)}const t=/[:/?#[\]@]/gi;if(c?.match(t))throw new u(`Username contains unescaped characters ${c}`);if(!c||!d){const t=e.replace(`${l}://`,"");if(t.startsWith("@")||t.startsWith(":"))throw new u("URI contained empty userinfo section")}if(d?.match(t))throw new u("Password contains unescaped characters");if(f?.match(/^[^/?]*@/))throw new u("Invalid connection string")}let g="";"string"==typeof c&&(g+=c),"string"==typeof d&&(g+=`:${d}`),g&&(g+="@");try{super(`${l.toLowerCase()}://${g}${i}${f}`)}catch(r){throw o&&new p(e,{...t,looseValidation:!1}),"string"==typeof r.message&&(r.message=r.message.replace(i,h)),r}if(this._hosts=h.split(","),!o){if(this.isSRV&&1!==this.hosts.length)throw new u("mongodb+srv URI cannot have multiple service names");if(this.isSRV&&this.hosts.some((e=>e.includes(":"))))throw new u("mongodb+srv URI cannot have port number")}var m;this.pathname||(this.pathname="/"),Object.setPrototypeOf(this.searchParams,(m=this.searchParams.constructor,class extends m{append(e,t){return super.append(this._normalizeKey(e),t)}delete(e){return super.delete(this._normalizeKey(e))}get(e){return super.get(this._normalizeKey(e))}getAll(e){return super.getAll(this._normalizeKey(e))}has(e){return super.has(this._normalizeKey(e))}set(e,t){return super.set(this._normalizeKey(e),t)}keys(){return super.keys()}values(){return super.values()}entries(){return super.entries()}[Symbol.iterator](){return super[Symbol.iterator]()}_normalizeKey(e){return a.prototype._normalizeKey.call(this,e)}}).prototype)}get host(){return i}set host(e){throw new Error("No single host for connection string")}get hostname(){return i}set hostname(e){throw new Error("No single host for connection string")}get port(){return""}set port(e){throw new Error("No single host for connection string")}get href(){return this.toString()}set href(e){throw new Error("Cannot set href for connection strings")}get isSRV(){return this.protocol.includes("srv")}get hosts(){return this._hosts}set hosts(e){this._hosts=e}toString(){return super.toString().replace(i,this.hosts.join(","))}clone(){return new p(this.toString(),{looseValidation:!0})}redact(e){return(0,n.redactValidConnectionString)(this,e)}typedSearchParams(){return this.searchParams}[Symbol.for("nodejs.util.inspect.custom")](){const{href:e,origin:t,protocol:o,username:r,password:n,hosts:i,pathname:s,search:a,searchParams:l,hash:u}=this;return{href:e,origin:t,protocol:o,username:r,password:n,hosts:i,pathname:s,search:a,searchParams:l,hash:u}}}t.ConnectionString=p,t.CommaAndColonSeparatedRecord=class extends a{constructor(e){super();for(const t of(e??"").split(",")){if(!t)continue;const e=t.indexOf(":");-1===e?this.set(t,""):this.set(t.slice(0,e),t.slice(e+1))}}toString(){return[...this].map((e=>e.join(":"))).join(",")}},t.default=p},8633:(e,t,o)=>{var r=o(15088).process;Object.defineProperty(t,"__esModule",{value:!0}),t.signals=void 0,t.signals=[],t.signals.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==r.platform&&t.signals.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===r.platform&&t.signals.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")},11088:(e,t,o)=>{o.d(t,{Ay:()=>n,J0:()=>i});var r=o(8069);const n=r.default,i=(r.CommaAndColonSeparatedRecord,r.ConnectionString,r.redactConnectionString)},13068:(e,t,o)=>{var r=o(15088).process;e.exports=async function(e,t,o,i){o instanceof Function&&(i=o,o={});const p=async function(e,t,o={}){let i,p;"string"==typeof o&&(o={encoding:o});const c=s(h((()=>p))),g=a.resolve(e);try{await function(e){return new Promise((t=>{u[e]||(u[e]=[]),u[e].push(t),1===u[e].length&&t()}))}(g);const s=await l(n.realpath)(e).catch((()=>e));if(p=d(s),!o.mode||!o.chown){const e=await l(n.stat)(s).catch((()=>{}));e&&(null==o.mode&&(o.mode=e.mode),null==o.chown&&r.getuid&&(o.chown={uid:e.uid,gid:e.gid}))}i=await l(n.open)(p,"w",o.mode),o.tmpfileCreated&&await o.tmpfileCreated(p),ArrayBuffer.isView(t)?await l(n.write)(i,t,0,t.length,0):null!=t&&await l(n.write)(i,String(t),0,String(o.encoding||"utf8")),!1!==o.fsync&&await l(n.fsync)(i),await l(n.close)(i),i=null,o.chown&&await l(n.chown)(p,o.chown.uid,o.chown.gid).catch((e=>{if(!f(e))throw e})),o.mode&&await l(n.chmod)(p,o.mode).catch((e=>{if(!f(e))throw e})),await l(n.rename)(p,s)}finally{i&&await l(n.close)(i).catch((()=>{})),c(),await l(n.unlink)(p).catch((()=>{})),u[g].shift(),u[g].length>0?u[g][0]():delete u[g]}}(e,t,o);if(i)try{return i(await p)}catch(e){return i(e)}return p},e.exports.sync=function(e,t,o){"string"==typeof o?o={encoding:o}:o||(o={});try{e=n.realpathSync(e)}catch(e){}const i=d(e);if(!o.mode||!o.chown)try{const t=n.statSync(e);(o=Object.assign({},o)).mode||(o.mode=t.mode),!o.chown&&r.getuid&&(o.chown={uid:t.uid,gid:t.gid})}catch(e){}let a;const l=h(i),u=s(l);let p=!0;try{if(a=n.openSync(i,"w",o.mode||438),o.tmpfileCreated&&o.tmpfileCreated(i),ArrayBuffer.isView(t)?n.writeSync(a,t,0,t.length,0):null!=t&&n.writeSync(a,String(t),0,String(o.encoding||"utf8")),!1!==o.fsync&&n.fsyncSync(a),n.closeSync(a),a=null,o.chown)try{n.chownSync(i,o.chown.uid,o.chown.gid)}catch(e){if(!f(e))throw e}if(o.mode)try{n.chmodSync(i,o.mode)}catch(e){if(!f(e))throw e}n.renameSync(i,e),p=!1}finally{if(a)try{n.closeSync(a)}catch(e){}u(),p&&l()}},e.exports._getTmpname=d,e.exports._cleanupOnExit=h;const n=o(4308),i=o(53021),{onExit:s}=o(22784),a=o(78773),{promisify:l}=o(13390),u={},p=function(){try{return o(86983).threadId}catch(e){return 0}}();let c=0;function d(e){return e+"."+i("/index.js").hash(String(r.pid)).hash(String(p)).hash(String(++c)).result()}function h(e){return()=>{try{n.unlinkSync("function"==typeof e?e():e)}catch{}}}function f(e){return"ENOSYS"===e.code||!(r.getuid&&0===r.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code)}},13310:(e,t,o)=>{o.d(t,{Ay:()=>n,J0:()=>a,QZ:()=>s,Y6:()=>i});var r=o(23409);const n=r.default,i=r.CommaAndColonSeparatedRecord,s=r.ConnectionString,a=r.redactConnectionString},15403:function(e,t,o){var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var n=r(o(96652)),i=o(61146),s=o(17642),a=o(30345),l=n.forwardRef((function(e,t){var o=e.children,r=e.eFocusableElement,l=e.onTabKeyDown,u=e.gridCtrl,p=n.useContext(s.BeansContext).context,c=n.useRef(null),d=n.useRef(null),h=n.useRef(),f=n.useState(),g=f[0],m=f[1];n.useImperativeHandle(t,(function(){return{forceFocusOutOfContainer:function(){h.current.forceFocusOutOfContainer()}}})),a.useEffectOnce((function(){var e=c.current,t=d.current,o={setTabIndex:function(e){return m(null==e?void 0:parseInt(e,10))}},n=h.current=p.createBean(new i.TabGuardCtrl({comp:o,eTopGuard:e,eBottomGuard:t,eFocusableElement:r,onTabKeyDown:l,focusInnerElement:function(e){return u.focusInnerElement(e)}}));return function(){p.destroyBean(n)}}));var y=function(e){return n.default.createElement("div",{className:"ag-tab-guard ag-tab-guard-"+e,role:"presentation",tabIndex:g,ref:"top"===e?c:d})};return n.default.createElement(n.default.Fragment,null,y("top"),o,y("bottom"))}));t.default=n.memo(l)},15644:function(e,t,o){var r,n=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(t,o);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,n)}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[t.length]=o);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o=r(e),s=0;s<o.length;s++)"default"!==o[s]&&n(t,e,o[s]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.redactValidConnectionString=function(e,t){const o=e.clone(),r=t?.replacementString??"_credentials_",n=t?.redactUsernames??!0;if((o.username||o.password)&&n?(o.username=r,o.password=""):o.password&&(o.password=r),o.searchParams.has("authMechanismProperties")){const e=new a.CommaAndColonSeparatedRecord(o.searchParams.get("authMechanismProperties"));e.get("AWS_SESSION_TOKEN")&&(e.set("AWS_SESSION_TOKEN",r),o.searchParams.set("authMechanismProperties",e.toString()))}return o.searchParams.has("tlsCertificateKeyFilePassword")&&o.searchParams.set("tlsCertificateKeyFilePassword",r),o.searchParams.has("proxyUsername")&&n&&o.searchParams.set("proxyUsername",r),o.searchParams.has("proxyPassword")&&o.searchParams.set("proxyPassword",r),o},t.redactConnectionString=function(e,t){const o=t?.replacementString??"<credentials>",r=t?.redactUsernames??!0;let n;try{n=new a.default(e)}catch{}if(n)return t={...t,replacementString:"___credentials___"},n.redact(t).toString().replace(/___credentials___/g,o);const i=o,s=[e=>e.replace(r?/(\/\/)(.*)(@)/g:/(\/\/[^@]*:)(.*)(@)/g,`$1${i}$3`),e=>e.replace(/(AWS_SESSION_TOKEN(:|%3A))([^,&]+)/gi,`$1${i}`),e=>e.replace(/(tlsCertificateKeyFilePassword=)([^&]+)/gi,`$1${i}`),e=>r?e.replace(/(proxyUsername=)([^&]+)/gi,`$1${i}`):e,e=>e.replace(/(proxyPassword=)([^&]+)/gi,`$1${i}`)];for(const t of s)e=t(e);return e};const a=s(o(23409))},16924:(e,t,o)=>{o.d(t,{ry:()=>ir});var r,n,i,s,a,l,u="vercel.ai.error",p=Symbol.for(u),c=class e extends(n=Error,r=p,n){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,u)}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,i=f,s){constructor({message:e,url:t,requestBodyValues:o,statusCode:r,responseHeaders:n,responseBody:s,cause:a,isRetryable:l=null!=r&&(408===r||409===r||429===r||r>=500),data:u}){super({name:d,message:e,cause:a}),this[i]=!0,this.url=t,this.requestBodyValues=o,this.statusCode=r,this.responseHeaders=n,this.responseBody=s,this.isRetryable=l,this.data=u}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,_,S,R,b,O,P,T,A,D,I,N,x,M,L,F,G="AI_InvalidArgumentError",k=`vercel.ai.error.${G}`,V=Symbol.for(k),H=class extends(_=c,E=V,_){constructor({message:e,cause:t,argument:o}){super({name:G,message:e,cause:t}),this[E]=!0,this.argument=o}static isInstance(e){return c.hasMarker(e,k)}},W="AI_InvalidPromptError",j=`vercel.ai.error.${W}`,B=Symbol.for(j),U=class extends(R=c,S=B,R){constructor({prompt:e,message:t,cause:o}){super({name:W,message:`Invalid prompt: ${t}`,cause:o}),this[S]=!0,this.prompt=e}static isInstance(e){return c.hasMarker(e,j)}},Y="AI_InvalidResponseDataError",z=`vercel.ai.error.${Y}`,K=Symbol.for(z),$=class extends(O=c,b=K,O){constructor({data:e,message:t=`Invalid response data: ${JSON.stringify(e)}.`}){super({name:Y,message:t}),this[b]=!0,this.data=e}static isInstance(e){return c.hasMarker(e,z)}},q="AI_JSONParseError",Z=`vercel.ai.error.${q}`,X=Symbol.for(Z),Q=class extends(T=c,P=X,T){constructor({text:e,cause:t}){super({name:q,message:`JSON parsing failed: Text: ${e}.\nError message: ${w(t)}`,cause:t}),this[P]=!0,this.text=e}static isInstance(e){return c.hasMarker(e,Z)}},J="AI_LoadAPIKeyError",ee=`vercel.ai.error.${J}`,te=Symbol.for(ee),oe=class extends(D=c,A=te,D){constructor({message:e}){super({name:J,message:e}),this[A]=!0}static isInstance(e){return c.hasMarker(e,ee)}},re=Symbol.for("vercel.ai.error.AI_LoadSettingError"),ne=`vercel.ai.error.${"AI_NoContentGeneratedError"}`,ie=Symbol.for(ne),se=`vercel.ai.error.${"AI_NoSuchModelError"}`,ae=Symbol.for(se),le="AI_TooManyEmbeddingValuesForCallError",ue=`vercel.ai.error.${le}`,pe=Symbol.for(ue),ce=class extends(N=c,I=pe,N){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[I]=!0,this.provider=e.provider,this.modelId=e.modelId,this.maxEmbeddingsPerCall=e.maxEmbeddingsPerCall,this.values=e.values}static isInstance(e){return c.hasMarker(e,ue)}},de="AI_TypeValidationError",he=`vercel.ai.error.${de}`,fe=Symbol.for(he),ge=class e extends(M=c,x=fe,M){constructor({value:e,cause:t}){super({name:de,message:`Type validation failed: Value: ${JSON.stringify(e)}.\nError message: ${w(t)}`,cause:t}),this[x]=!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(F=c,L=ve,F){constructor({functionality:e,message:t=`'${e}' functionality not supported.`}){super({name:me,message:t}),this[L]=!0,this.functionality=e}static isInstance(e){return c.hasMarker(e,ye)}},we=o(58750),Ee=o(9364),_e=o(33868),Se=o(24730),Re=o(15088).process;function be(...e){return e.reduce(((e,t)=>({...e,...null!=t?t:{}})),{})}function Oe(e){return Object.fromEntries([...e.headers])}var{btoa:Pe,atob:Te}=globalThis;function Ae(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),o=Te(t);return Uint8Array.from(o,(e=>e.codePointAt(0)))}function De(e){return e instanceof Uint8Array?function(e){let t="";for(let o=0;o<e.length;o++)t+=String.fromCodePoint(e[o]);return Pe(t)}(e):e}function Ie(e,t={}){const{useArrayBrackets:o=!0}=t,r=new FormData;for(const[t,n]of Object.entries(e))if(null!=n)if(Array.isArray(n)){if(1===n.length){r.append(t,n[0]);continue}const e=o?`${t}[]`:t;for(const t of n)r.append(e,t)}else r.append(t,n);return r}var Ne,xe,Me="AI_DownloadError",Le=`vercel.ai.error.${Me}`,Fe=Symbol.for(Le),Ge=class extends(xe=c,Ne=Fe,xe){constructor({url:e,statusCode:t,statusText:o,cause:r,message:n=(null==r?`Failed to download ${e}: ${t} ${o}`:`Failed to download ${e}: ${r}`)}){super({name:Me,message:n,cause:r}),this[Ne]=!0,this.url=e,this.statusCode=t,this.statusText=o}static isInstance(e){return c.hasMarker(e,Le)}};async function ke(e){try{const t=await fetch(e);if(!t.ok)throw new Ge({url:e,statusCode:t.status,statusText:t.statusText});return await t.blob()}catch(t){if(Ge.isInstance(t))throw t;throw new Ge({url:e,cause:t})}}var Ve=(({prefix:e,size:t=16,alphabet:o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const n=()=>{const e=o.length,r=new Array(t);for(let n=0;n<t;n++)r[n]=o[Math.random()*e|0];return r.join("")};if(null==e)return n;if(o.includes(r))throw new H({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${o}".`});return()=>`${e}${r}${n()}`})();function He(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 je(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 Ye({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 ze=/"__proto__"\s*:/,Ke=/"constructor"\s*:/;function $e(e){const t=JSON.parse(e);return null===t||"object"!=typeof t||!1===ze.test(e)&&!1===Ke.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 qe(e){const{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch(t){return $e(e)}try{return $e(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]=Xe(t[e])}null!=e.items&&(e.items=Array.isArray(e.items)?e.items.map(Xe):Xe(e.items)),null!=e.anyOf&&(e.anyOf=e.anyOf.map(Xe)),null!=e.allOf&&(e.allOf=e.allOf.map(Xe)),null!=e.oneOf&&(e.oneOf=e.oneOf.map(Xe));const{definitions:t}=e;if(null!=t)for(const e of Object.keys(t))t[e]=Xe(t[e]);return e}function Xe(e){return"boolean"==typeof e?e:Ze(e)}var Qe=Symbol("Let zodToJsonSchema decide on which parser to use"),Je={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,nt={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 it(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":ut(o,nt.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":ut(o,r.regex,r.message,t);break;case"cuid":ut(o,nt.cuid,r.message,t);break;case"cuid2":ut(o,nt.cuid2,r.message,t);break;case"startsWith":ut(o,RegExp(`^${st(r.value,t)}`),r.message,t);break;case"endsWith":ut(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":ut(o,RegExp(st(r.value,t)),r.message,t);break;case"ip":"v6"!==r.version&&lt(o,"ipv4",r.message,t),"v4"!==r.version&&lt(o,"ipv6",r.message,t);break;case"base64url":ut(o,nt.base64url,r.message,t);break;case"jwt":ut(o,nt.jwt,r.message,t);break;case"cidr":"v6"!==r.version&&ut(o,nt.ipv4Cidr,r.message,t),"v4"!==r.version&&ut(o,nt.ipv6Cidr,r.message,t);break;case"emoji":ut(o,nt.emoji(),r.message,t);break;case"ulid":ut(o,nt.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":ut(o,nt.base64,r.message,t)}break;case"nanoid":ut(o,nt.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 n;e.format||(null==(n=e.anyOf)?void 0:n.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 ut(e,t,o,r){var n;e.pattern||(null==(n=e.allOf)?void 0:n.some((e=>e.pattern)))?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:pt(t,r),...o&&r.errorMessages&&{errorMessage:{pattern:o}}})):e.pattern=pt(t,r)}function pt(e,t){var o;if(!t.applyRegexFlags||!e.flags)return e.source;const r=e.flags.includes("i"),n=e.flags.includes("m"),i=e.flags.includes("s"),s=r?e.source.toLowerCase():e.source;let a="",l=!1,u=!1,p=!1;for(let e=0;e<s.length;e++)if(l)a+=s[e],l=!1;else{if(r)if(u){if(s[e].match(/[a-z]/)){p?(a+=s[e],a+=`${s[e-2]}-${s[e]}`.toUpperCase(),p=!1):"-"===s[e+1]&&(null==(o=s[e+2])?void 0:o.match(/[a-z]/))?(a+=s[e],p=!0):a+=`${s[e]}${s[e].toUpperCase()}`;continue}}else if(s[e].match(/[a-z]/)){a+=`[${s[e]}${s[e].toUpperCase()}]`;continue}if(n){if("^"===s[e]){a+="(^|(?<=[\r\n]))";continue}if("$"===s[e]){a+="($|(?=[\r\n]))";continue}}i&&"."===s[e]?a+=u?`${s[e]}\r\n`:`[${s[e]}\r\n]`:(a+=s[e],"\\"===s[e]?l=!0:u&&"]"===s[e]?u=!1:u||"["!==s[e]||(u=!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,n,i,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==(n=e.keyType._def.checks)?void 0:n.length)){const{type:o,...r}=it(e.keyType._def,t);return{...l,propertyNames:r}}if((null==(i=e.keyType)?void 0:i._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 it(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=[],n=e.shape();for(const e in n){let i=n[e];if(void 0===i||void 0===i._def)continue;const s=ht(i),a=mt(i._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 i=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!==i&&(o.additionalProperties=i),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,n;const i={type:"array"};return(null==(o=e.type)?void 0:o._def)&&(null==(n=null==(r=e.type)?void 0:r._def)?void 0:n.typeName)!==_e.kY.ZodAny&&(i.items=mt(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(i.minItems=e.minLength.value),e.maxLength&&(i.maxItems=e.maxLength.value),e.exactLength&&(i.minItems=e.exactLength.value,i.maxItems=e.exactLength.value),i}(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 n=t.seen.get(e);if(t.override){const i=null==(r=t.override)?void 0:r.call(t,e,t,n,o);if(i!==Qe)return i}if(n&&!o){const e=yt(n,t);if(void 0!==e)return e}const i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);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 i.jsonSchema=a,o}return i.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?{...Je,name:e}:{...Je,...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 n="object"==typeof t&&t.definitions?Object.entries(t.definitions).reduce(((e,[t,o])=>{var n;return{...e,[t]:null!=(n=mt(o._def,{...r,currentPath:[...r.basePath,r.definitionPath,t]},!0))?n:{}}}),{}):void 0;const i="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===i?r:{...r,currentPath:[...r.basePath,r.definitionPath,i]},!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===i?n?{...s,[r.definitionPath]:n}:s:{$ref:[..."relative"===r.$refStrategy?[]:r.basePath,r.definitionPath,i].join("/"),[r.definitionPath]:{...n,[i]: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 St(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 bt({value:e,schema:t});if(!o.success)throw ge.wrap({value:e,cause:o.error});return o.value}async function bt({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?St(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=qe(e);return null==t?{success:!0,value:o,rawValue:o}:await bt({value:o,schema:t})}catch(t){return{success:!1,error:Q.isInstance(t)?t:new Q({text:e,cause:t}),rawValue:void 0}}}function Pt(e){try{return qe(e),!0}catch(e){return!1}}function Tt({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new Se.Z).pipeThrough(new TransformStream({async transform({data:e},o){"[DONE]"!==e&&o.enqueue(await Ot({text:e,schema:t}))}}))}async function At({provider:e,providerOptions:t,schema:o}){if(null==(null==t?void 0:t[e]))return;const r=await bt({value:t[e],schema:o});if(!r.success)throw new H({argument:"providerOptions",message:`invalid ${e} provider options`,cause:r.error});return r.value}var Dt=()=>globalThis.fetch,It=async({url:e,headers:t,body:o,failedResponseHandler:r,successfulResponseHandler:n,abortSignal:i,fetch:s})=>xt({url:e,headers:{"Content-Type":"application/json",...t},body:{content:JSON.stringify(o),values:o},failedResponseHandler:r,successfulResponseHandler:n,abortSignal:i,fetch:s}),Nt=async({url:e,headers:t,formData:o,failedResponseHandler:r,successfulResponseHandler:n,abortSignal:i,fetch:s})=>xt({url:e,headers:t,body:{content:o,values:Object.fromEntries(o.entries())},failedResponseHandler:r,successfulResponseHandler:n,abortSignal:i,fetch:s}),xt=async({url:e,headers:t={},body:o,successfulResponseHandler:r,failedResponseHandler:n,abortSignal:i,fetch:s=Dt()})=>{try{const a=await s(e,{method:"POST",headers:Be(t,"ai-sdk/provider-utils/4.0.5",je()),body:o.content,signal:i}),l=Oe(a);if(!a.ok){let t;try{t=await n({response:a,url:e,requestBodyValues:o.values})}catch(t){if(He(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&&(He(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(He(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 Mt({id:e,inputSchema:t,outputSchema:o,supportsDeferredResults:r}){return({execute:n,needsApproval:i,toModelOutput:s,onInputStart:a,onInputDelta:l,onInputAvailable:u,...p})=>({type:"provider",id:e,args:p,inputSchema:t,outputSchema:o,execute:n,needsApproval:i,toModelOutput:s,onInputStart:a,onInputDelta:l,onInputAvailable:u,supportsDeferredResults:r})}var Lt=e=>async({response:t})=>{const o=Oe(t);if(null==t.body)throw new C({});return{responseHeaders:o,value:Tt({stream:t.body,schema:e})}},Ft=e=>async({response:t,url:o,requestBodyValues:r})=>{const n=await t.text(),i=await Ot({text:n,schema:e}),s=Oe(t);if(!i.success)throw new g({message:"Invalid JSON response",cause:i.error,statusCode:t.status,responseHeaders:s,responseBody:n,url:o,requestBodyValues:r});return{responseHeaders:s,value:i.value,rawValue:i.rawValue}},Gt=o(42343),kt=o(26070),Vt=o(21655).URL,Ht=Gt.Ik({error:Gt.Ik({message:Gt.Yj(),type:Gt.Yj().nullish(),param:Gt.bz().nullish(),code:Gt.KC([Gt.Yj(),Gt.ai()]).nullish()})}),Wt=(({errorSchema:e,errorToMessage:t,isRetryable:o})=>async({response:r,url:n,requestBodyValues:i})=>{const s=await r.text(),a=Oe(r);if(""===s.trim())return{responseHeaders:a,value:new g({message:r.statusText,url:n,requestBodyValues:i,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=qe(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:n,requestBodyValues:i,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:n,requestBodyValues:i,statusCode:r.status,responseHeaders:a,responseBody:s,isRetryable:null==o?void 0:o(r)})}}})({errorSchema:Ht,errorToMessage:e=>e.error.message});function jt(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,n,i,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,u=null!=(n=null==(r=e.prompt_tokens_details)?void 0:r.cached_tokens)?n:0,p=null!=(s=null==(i=e.completion_tokens_details)?void 0:i.reasoning_tokens)?s:0;return{inputTokens:{total:a,noCache:a-u,cacheRead:u,cacheWrite:void 0},outputTokens:{total:l,text:l-p,reasoning:p},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 Yt(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 zt=Et((()=>St(Gt.Ik({id:Gt.Yj().nullish(),created:Gt.ai().nullish(),model:Gt.Yj().nullish(),choices:Gt.YO(Gt.Ik({message:Gt.Ik({role:Gt.eu("assistant").nullish(),content:Gt.Yj().nullish(),tool_calls:Gt.YO(Gt.Ik({id:Gt.Yj().nullish(),type:Gt.eu("function"),function:Gt.Ik({name:Gt.Yj(),arguments:Gt.Yj()})})).nullish(),annotations:Gt.YO(Gt.Ik({type:Gt.eu("url_citation"),url_citation:Gt.Ik({start_index:Gt.ai(),end_index:Gt.ai(),url:Gt.Yj(),title:Gt.Yj()})})).nullish()}),index:Gt.ai(),logprobs:Gt.Ik({content:Gt.YO(Gt.Ik({token:Gt.Yj(),logprob:Gt.ai(),top_logprobs:Gt.YO(Gt.Ik({token:Gt.Yj(),logprob:Gt.ai()}))})).nullish()}).nullish(),finish_reason:Gt.Yj().nullish()})),usage:Gt.Ik({prompt_tokens:Gt.ai().nullish(),completion_tokens:Gt.ai().nullish(),total_tokens:Gt.ai().nullish(),prompt_tokens_details:Gt.Ik({cached_tokens:Gt.ai().nullish()}).nullish(),completion_tokens_details:Gt.Ik({reasoning_tokens:Gt.ai().nullish(),accepted_prediction_tokens:Gt.ai().nullish(),rejected_prediction_tokens:Gt.ai().nullish()}).nullish()}).nullish()})))),Kt=Et((()=>St(Gt.KC([Gt.Ik({id:Gt.Yj().nullish(),created:Gt.ai().nullish(),model:Gt.Yj().nullish(),choices:Gt.YO(Gt.Ik({delta:Gt.Ik({role:Gt.k5(["assistant"]).nullish(),content:Gt.Yj().nullish(),tool_calls:Gt.YO(Gt.Ik({index:Gt.ai(),id:Gt.Yj().nullish(),type:Gt.eu("function").nullish(),function:Gt.Ik({name:Gt.Yj().nullish(),arguments:Gt.Yj().nullish()})})).nullish(),annotations:Gt.YO(Gt.Ik({type:Gt.eu("url_citation"),url_citation:Gt.Ik({start_index:Gt.ai(),end_index:Gt.ai(),url:Gt.Yj(),title:Gt.Yj()})})).nullish()}).nullish(),logprobs:Gt.Ik({content:Gt.YO(Gt.Ik({token:Gt.Yj(),logprob:Gt.ai(),top_logprobs:Gt.YO(Gt.Ik({token:Gt.Yj(),logprob:Gt.ai()}))})).nullish()}).nullish(),finish_reason:Gt.Yj().nullish(),index:Gt.ai()})),usage:Gt.Ik({prompt_tokens:Gt.ai().nullish(),completion_tokens:Gt.ai().nullish(),total_tokens:Gt.ai().nullish(),prompt_tokens_details:Gt.Ik({cached_tokens:Gt.ai().nullish()}).nullish(),completion_tokens_details:Gt.Ik({reasoning_tokens:Gt.ai().nullish(),accepted_prediction_tokens:Gt.ai().nullish(),rejected_prediction_tokens:Gt.ai().nullish()}).nullish()}).nullish()}),Ht])))),$t=Et((()=>St(Gt.Ik({logitBias:Gt.g1(kt.number(),Gt.ai()).optional(),logprobs:Gt.KC([Gt.zM(),Gt.ai()]).optional(),parallelToolCalls:Gt.zM().optional(),user:Gt.Yj().optional(),reasoningEffort:Gt.k5(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:Gt.ai().optional(),store:Gt.zM().optional(),metadata:Gt.g1(Gt.Yj().max(64),Gt.Yj().max(512)).optional(),prediction:Gt.g1(Gt.Yj(),Gt.bz()).optional(),serviceTier:Gt.k5(["auto","flex","priority","default"]).optional(),strictJsonSchema:Gt.zM().optional(),textVerbosity:Gt.k5(["low","medium","high"]).optional(),promptCacheKey:Gt.Yj().optional(),promptCacheRetention:Gt.k5(["in_memory","24h"]).optional(),safetyIdentifier:Gt.Yj().optional(),systemMessageMode:Gt.k5(["system","developer","remove"]).optional(),forceReasoning:Gt.zM().optional()})))),qt=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:n,frequencyPenalty:i,presencePenalty:s,stopSequences:a,responseFormat:l,seed:u,tools:p,toolChoice:c,providerOptions:d}){var h,f,g,m,y;const v=[],C=null!=(h=await At({provider:"openai",providerOptions:d,schema:$t}))?h:{},w=jt(this.modelId),E=null!=(f=C.forceReasoning)?f:w.isReasoningModel;null!=n&&v.push({type:"unsupported",feature:"topK"});const{messages:_,warnings:S}=function({prompt:e,systemMessageMode:t="system"}){var o;const r=[],n=[];for(const{role:i,content:s}of e)switch(i){case"system":switch(t){case"system":r.push({role:"system",content:s});break;case"developer":r.push({role:"developer",content:s});break;case"remove":n.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,n;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,${De(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!=(n=e.filename)?n:`part-${t}.pdf`,file_data:`data:application/pdf;base64,${De(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:De(e.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:De(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 n;switch(t.type){case"text":case"error-text":n=t.value;break;case"execution-denied":n=null!=(o=t.reason)?o:"Tool execution denied.";break;case"content":case"json":case"error-json":n=JSON.stringify(t.value)}r.push({role:"tool",tool_call_id:e.toolCallId,content:n})}break;default:throw new Error(`Unsupported role: ${i}`)}return{messages:r,warnings:n}}({prompt:e,systemMessageMode:null!=(g=C.systemMessageMode)?g:E?"developer":w.systemMessageMode});v.push(...S);const R=null==(m=C.strictJsonSchema)||m,b={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:i,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:u,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!=b.temperature&&(b.temperature=void 0,v.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"})),null!=b.top_p&&(b.top_p=void 0,v.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"})),null!=b.logprobs&&(b.logprobs=void 0,v.push({type:"other",message:"logprobs is not supported for reasoning models"}))),null!=b.frequency_penalty&&(b.frequency_penalty=void 0,v.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"})),null!=b.presence_penalty&&(b.presence_penalty=void 0,v.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"})),null!=b.logit_bias&&(b.logit_bias=void 0,v.push({type:"other",message:"logitBias is not supported for reasoning models"})),null!=b.top_logprobs&&(b.top_logprobs=void 0,v.push({type:"other",message:"topLogprobs is not supported for reasoning models"})),null!=b.max_tokens&&(null==b.max_completion_tokens&&(b.max_completion_tokens=b.max_tokens),b.max_tokens=void 0)):(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview"))&&null!=b.temperature&&(b.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"}),b.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"}),b.service_tier=void 0);const{tools:O,toolChoice:P,toolWarnings:T}=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 n=t.type;switch(n){case"auto":case"none":case"required":return{tools:r,toolChoice:n,toolWarnings:o};case"tool":return{tools:r,toolChoice:{type:"function",function:{name:t.toolName}},toolWarnings:o};default:throw new Ce({functionality:`tool choice type: ${n}`})}}({tools:p,toolChoice:c});return{args:{...b,tools:O,tool_choice:P},warnings:[...v,...T]}}async doGenerate(e){var t,o,r,n,i,s,a;const{args:l,warnings:u}=await this.getArgs(e),{responseHeaders:p,value:c,rawValue:d}=await It({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:be(this.config.headers(),e.headers),body:l,failedResponseHandler:Wt,successfulResponseHandler:Ft(zt),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==(n=c.usage)?void 0:n.completion_tokens_details,y=(null==(i=c.usage)||i.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:Yt(h.finish_reason),raw:null!=(a=h.finish_reason)?a:void 0},usage:Bt(c.usage),request:{body:l},response:{...Ut(c),headers:p,body:d},warnings:u,providerMetadata:y}}async doStream(e){const{args:t,warnings:o}=await this.getArgs(e),r={...t,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:n,value:i}=await It({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:be(this.config.headers(),e.headers),body:r,failedResponseHandler:Wt,successfulResponseHandler:Lt(Kt),abortSignal:e.abortSignal,fetch:this.config.fetch}),s=[];let a,l={unified:"other",raw:void 0},u=!1,p=!1;const c={openai:{}};return{stream:i.pipeThrough(new TransformStream({start(e){e.enqueue({type:"stream-start",warnings:o})},transform(t,o){var r,n,i,d,h,f,g,m,y,v,C,w,E,_,S,R,b;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(!u){const e=Ut(O);Object.values(e).some(Boolean)&&(u=!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==(n=O.usage.completion_tokens_details)?void 0:n.accepted_prediction_tokens),null!=(null==(i=O.usage.completion_tokens_details)?void 0:i.rejected_prediction_tokens)&&(c.openai.rejectedPredictionTokens=null==(d=O.usage.completion_tokens_details)?void 0:d.rejected_prediction_tokens));const P=O.choices[0];if(null!=(null==P?void 0:P.finish_reason)&&(l={unified:Yt(P.finish_reason),raw:P.finish_reason}),null!=(null==(h=null==P?void 0:P.logprobs)?void 0:h.content)&&(c.openai.logprobs=P.logprobs.content),null==(null==P?void 0:P.delta))return;const T=P.delta;if(null!=T.content&&(p||(o.enqueue({type:"text-start",id:"0"}),p=!0),o.enqueue({type:"text-delta",id:"0",delta:T.content})),null!=T.tool_calls)for(const e of T.tool_calls){const t=e.index;if(null==s[t]){if("function"!==e.type)throw new $({data:e,message:"Expected 'function' type."});if(null==e.id)throw new $({data:e,message:"Expected 'id' to be a string."});if(null==(null==(f=e.function)?void 0:f.name))throw new $({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}),Pt(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==(S=r.function)?void 0:S.name)&&null!=(null==(R=r.function)?void 0:R.arguments)&&Pt(r.function.arguments)&&(o.enqueue({type:"tool-input-end",id:r.id}),o.enqueue({type:"tool-call",toolCallId:null!=(b=r.id)?b:Ve(),toolName:r.function.name,input:r.function.arguments}),r.hasFinished=!0))}if(null!=T.annotations)for(const e of T.annotations)o.enqueue({type:"source",sourceType:"url",id:Ve(),url:e.url_citation.url,title:e.url_citation.title})},flush(e){p&&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:n}}}};function Zt(e){var t,o,r,n;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 i=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:i,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:null!=(n=e.completion_tokens)?n:void 0,text:s,reasoning:void 0},raw:e}}function Xt({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 Jt=Et((()=>St(Gt.Ik({id:Gt.Yj().nullish(),created:Gt.ai().nullish(),model:Gt.Yj().nullish(),choices:Gt.YO(Gt.Ik({text:Gt.Yj(),finish_reason:Gt.Yj(),logprobs:Gt.Ik({tokens:Gt.YO(Gt.Yj()),token_logprobs:Gt.YO(Gt.ai()),top_logprobs:Gt.YO(Gt.g1(Gt.Yj(),Gt.ai())).nullish()}).nullish()})),usage:Gt.Ik({prompt_tokens:Gt.ai(),completion_tokens:Gt.ai(),total_tokens:Gt.ai()}).nullish()})))),eo=Et((()=>St(Gt.KC([Gt.Ik({id:Gt.Yj().nullish(),created:Gt.ai().nullish(),model:Gt.Yj().nullish(),choices:Gt.YO(Gt.Ik({text:Gt.Yj(),finish_reason:Gt.Yj().nullish(),index:Gt.ai(),logprobs:Gt.Ik({tokens:Gt.YO(Gt.Yj()),token_logprobs:Gt.YO(Gt.ai()),top_logprobs:Gt.YO(Gt.g1(Gt.Yj(),Gt.ai())).nullish()}).nullish()})),usage:Gt.Ik({prompt_tokens:Gt.ai(),completion_tokens:Gt.ai(),total_tokens:Gt.ai()}).nullish()}),Ht])))),to=Et((()=>St(Gt.Ik({echo:Gt.zM().optional(),logitBias:Gt.g1(Gt.Yj(),Gt.ai()).optional(),suffix:Gt.Yj().optional(),user:Gt.Yj().optional(),logprobs:Gt.KC([Gt.zM(),Gt.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:n,frequencyPenalty:i,presencePenalty:s,stopSequences:a,responseFormat:l,tools:u,toolChoice:p,seed:c,providerOptions:d}){const h=[],f={...await At({provider:"openai",providerOptions:d,schema:to}),...await At({provider:this.providerOptionsName,providerOptions:d,schema:to})};null!=n&&h.push({type:"unsupported",feature:"topK"}),(null==u?void 0:u.length)&&h.push({type:"unsupported",feature:"tools"}),null!=p&&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:n,content:i}of e)switch(n){case"system":throw new U({message:"Unexpected system message in prompt: ${content}",prompt:e});case"user":r+=`${t}:\n${i.map((e=>{if("text"===e.type)return e.text})).filter(Boolean).join("")}\n\n`;break;case"assistant":r+=`${o}:\n${i.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: ${n}`)}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:i,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:n,value:i,rawValue:s}=await It({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:be(this.config.headers(),e.headers),body:o,failedResponseHandler:Wt,successfulResponseHandler:Ft(Jt),abortSignal:e.abortSignal,fetch:this.config.fetch}),a=i.choices[0],l={openai:{}};return null!=a.logprobs&&(l.openai.logprobs=a.logprobs),{content:[{type:"text",text:a.text}],usage:Zt(i.usage),finishReason:{unified:Qt(a.finish_reason),raw:null!=(t=a.finish_reason)?t:void 0},request:{body:o},response:{...Xt(i),headers:n,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:n,value:i}=await It({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:be(this.config.headers(),e.headers),body:r,failedResponseHandler:Wt,successfulResponseHandler:Lt(eo),abortSignal:e.abortSignal,fetch:this.config.fetch});let s={unified:"other",raw:void 0};const a={openai:{}};let l,u=!0;return{stream:i.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});u&&(u=!1,o.enqueue({type:"response-metadata",...Xt(r)}),o.enqueue({type:"text-start",id:"0"})),null!=r.usage&&(l=r.usage);const n=r.choices[0];null!=(null==n?void 0:n.finish_reason)&&(s={unified:Qt(n.finish_reason),raw:n.finish_reason}),null!=(null==n?void 0:n.logprobs)&&(a.openai.logprobs=n.logprobs),null!=(null==n?void 0:n.text)&&n.text.length>0&&o.enqueue({type:"text-delta",id:"0",delta:n.text})},flush(e){u||e.enqueue({type:"text-end",id:"0"}),e.enqueue({type:"finish",finishReason:s,providerMetadata:a,usage:Zt(l)})}})),request:{body:r},response:{headers:n}}}},ro=Et((()=>St(Gt.Ik({dimensions:Gt.ai().optional(),user:Gt.Yj().optional()})))),no=Et((()=>St(Gt.Ik({data:Gt.YO(Gt.Ik({embedding:Gt.YO(Gt.ai())})),usage:Gt.Ik({prompt_tokens:Gt.ai()}).nullish()})))),io=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 n;if(e.length>this.maxEmbeddingsPerCall)throw new ce({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:e});const i=null!=(n=await At({provider:"openai",providerOptions:r,schema:ro}))?n:{},{responseHeaders:s,value:a,rawValue:l}=await It({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:be(this.config.headers(),t),body:{model:this.modelId,input:e,encoding_format:"float",dimensions:i.dimensions,user:i.user},failedResponseHandler:Wt,successfulResponseHandler:Ft(no),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((()=>St(Gt.Ik({created:Gt.ai().nullish(),data:Gt.YO(Gt.Ik({b64_json:Gt.Yj(),revised_prompt:Gt.Yj().nullish()})),background:Gt.Yj().nullish(),output_format:Gt.Yj().nullish(),size:Gt.Yj().nullish(),quality:Gt.Yj().nullish(),usage:Gt.Ik({input_tokens:Gt.ai().nullish(),output_tokens:Gt.ai().nullish(),total_tokens:Gt.ai().nullish(),input_tokens_details:Gt.Ik({image_tokens:Gt.ai().nullish(),text_tokens:Gt.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"],uo=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:n,aspectRatio:i,seed:s,providerOptions:a,headers:l,abortSignal:u}){var p,c,d,h,f,g,m,y,v,C,w;const E=[];null!=i&&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==(p=this.config._internal)?void 0:p.currentDate)?void 0:c.call(p))?d:new Date;if(null!=t){const{value:i,responseHeaders:s}=await Nt({url:this.config.url({path:"/images/edits",modelId:this.modelId}),headers:be(this.config.headers(),l),formData:Ie({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([Ae(e.data)],{type:e.mediaType})],{type:e.mediaType}):ke(e.url)))),mask:null!=o?await po(o):void 0,n:r,size:n,...null!=(h=a.openai)?h:{}}),failedResponseHandler:Wt,successfulResponseHandler:Ft(so),abortSignal:u,fetch:this.config.fetch});return{images:i.data.map((e=>e.b64_json)),warnings:E,usage:null!=i.usage?{inputTokens:null!=(f=i.usage.input_tokens)?f:void 0,outputTokens:null!=(g=i.usage.output_tokens)?g:void 0,totalTokens:null!=(m=i.usage.total_tokens)?m:void 0}:void 0,response:{timestamp:_,modelId:this.modelId,headers:s},providerMetadata:{openai:{images:i.data.map((e=>{var t,o,r,n,s;return{...e.revised_prompt?{revisedPrompt:e.revised_prompt}:{},created:null!=(t=i.created)?t:void 0,size:null!=(o=i.size)?o:void 0,quality:null!=(r=i.quality)?r:void 0,background:null!=(n=i.background)?n:void 0,outputFormat:null!=(s=i.output_format)?s:void 0}}))}}}}const{value:S,responseHeaders:R}=await It({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:be(this.config.headers(),l),body:{model:this.modelId,prompt:e,n:r,size:n,...null!=(y=a.openai)?y:{},...(b=this.modelId,lo.some((e=>b.startsWith(e)))?{}:{response_format:"b64_json"})},failedResponseHandler:Wt,successfulResponseHandler:Ft(so),abortSignal:u,fetch:this.config.fetch});var b;return{images:S.data.map((e=>e.b64_json)),warnings:E,usage:null!=S.usage?{inputTokens:null!=(v=S.usage.input_tokens)?v:void 0,outputTokens:null!=(C=S.usage.output_tokens)?C:void 0,totalTokens:null!=(w=S.usage.total_tokens)?w:void 0}:void 0,response:{timestamp:_,modelId:this.modelId,headers:R},providerMetadata:{openai:{images:S.data.map((e=>{var t,o,r,n,i;return{...e.revised_prompt?{revisedPrompt:e.revised_prompt}:{},created:null!=(t=S.created)?t:void 0,size:null!=(o=S.size)?o:void 0,quality:null!=(r=S.quality)?r:void 0,background:null!=(n=S.background)?n:void 0,outputFormat:null!=(i=S.output_format)?i:void 0}}))}}}}};async function po(e){if(!e)return;if("url"===e.type)return ke(e.url);const t=e.data instanceof Uint8Array?e.data:Ae(e.data);return new Blob([t],{type:e.mediaType})}var co=Et((()=>St(Gt.Ik({callId:Gt.Yj(),operation:Gt.gM("type",[Gt.Ik({type:Gt.eu("create_file"),path:Gt.Yj(),diff:Gt.Yj()}),Gt.Ik({type:Gt.eu("delete_file"),path:Gt.Yj()}),Gt.Ik({type:Gt.eu("update_file"),path:Gt.Yj(),diff:Gt.Yj()})])})))),ho=Et((()=>St(Gt.Ik({status:Gt.k5(["completed","failed"]),output:Gt.Yj().optional()})))),fo=(Et((()=>St(Gt.Ik({})))),Mt({id:"openai.apply_patch",inputSchema:co,outputSchema:ho})),go=Et((()=>St(Gt.Ik({code:Gt.Yj().nullish(),containerId:Gt.Yj()})))),mo=Et((()=>St(Gt.Ik({outputs:Gt.YO(Gt.gM("type",[Gt.Ik({type:Gt.eu("logs"),logs:Gt.Yj()}),Gt.Ik({type:Gt.eu("image"),url:Gt.Yj()})])).nullish()})))),yo=Et((()=>St(Gt.Ik({container:Gt.KC([Gt.Yj(),Gt.Ik({fileIds:Gt.YO(Gt.Yj()).optional()})]).optional()})))),vo=Mt({id:"openai.code_interpreter",inputSchema:go,outputSchema:mo}),Co=Gt.Ik({key:Gt.Yj(),type:Gt.k5(["eq","ne","gt","gte","lt","lte","in","nin"]),value:Gt.KC([Gt.Yj(),Gt.ai(),Gt.zM(),Gt.YO(Gt.Yj())])}),wo=Gt.Ik({type:Gt.k5(["and","or"]),filters:Gt.YO(Gt.KC([Co,Gt.RZ((()=>wo))]))}),Eo=Et((()=>St(Gt.Ik({vectorStoreIds:Gt.YO(Gt.Yj()),maxNumResults:Gt.ai().optional(),ranking:Gt.Ik({ranker:Gt.Yj().optional(),scoreThreshold:Gt.ai().optional()}).optional(),filters:Gt.KC([Co,wo]).optional()})))),_o=Et((()=>St(Gt.Ik({queries:Gt.YO(Gt.Yj()),results:Gt.YO(Gt.Ik({attributes:Gt.g1(Gt.Yj(),Gt.L5()),fileId:Gt.Yj(),filename:Gt.Yj(),score:Gt.ai(),text:Gt.Yj()})).nullable()})))),So=Mt({id:"openai.file_search",inputSchema:Gt.Ik({}),outputSchema:_o}),Ro=Et((()=>St(Gt.Ik({background:Gt.k5(["auto","opaque","transparent"]).optional(),inputFidelity:Gt.k5(["low","high"]).optional(),inputImageMask:Gt.Ik({fileId:Gt.Yj().optional(),imageUrl:Gt.Yj().optional()}).optional(),model:Gt.Yj().optional(),moderation:Gt.k5(["auto"]).optional(),outputCompression:Gt.ai().int().min(0).max(100).optional(),outputFormat:Gt.k5(["png","jpeg","webp"]).optional(),partialImages:Gt.ai().int().min(0).max(3).optional(),quality:Gt.k5(["auto","low","medium","high"]).optional(),size:Gt.k5(["1024x1024","1024x1536","1536x1024","auto"]).optional()}).strict()))),bo=Mt({id:"openai.image_generation",inputSchema:Et((()=>St(Gt.Ik({})))),outputSchema:Et((()=>St(Gt.Ik({result:Gt.Yj()}))))}),Oo=Et((()=>St(Gt.Ik({action:Gt.Ik({type:Gt.eu("exec"),command:Gt.YO(Gt.Yj()),timeoutMs:Gt.ai().optional(),user:Gt.Yj().optional(),workingDirectory:Gt.Yj().optional(),env:Gt.g1(Gt.Yj(),Gt.Yj()).optional()})})))),Po=Et((()=>St(Gt.Ik({output:Gt.Yj()})))),To=Mt({id:"openai.local_shell",inputSchema:Oo,outputSchema:Po}),Ao=Et((()=>St(Gt.Ik({action:Gt.Ik({commands:Gt.YO(Gt.Yj()),timeoutMs:Gt.ai().optional(),maxOutputLength:Gt.ai().optional()})})))),Do=Et((()=>St(Gt.Ik({output:Gt.YO(Gt.Ik({stdout:Gt.Yj(),stderr:Gt.Yj(),outcome:Gt.gM("type",[Gt.Ik({type:Gt.eu("timeout")}),Gt.Ik({type:Gt.eu("exit"),exitCode:Gt.ai()})])}))})))),Io=Mt({id:"openai.shell",inputSchema:Ao,outputSchema:Do}),No=Et((()=>St(Gt.Ik({externalWebAccess:Gt.zM().optional(),filters:Gt.Ik({allowedDomains:Gt.YO(Gt.Yj()).optional()}).optional(),searchContextSize:Gt.k5(["low","medium","high"]).optional(),userLocation:Gt.Ik({type:Gt.eu("approximate"),country:Gt.Yj().optional(),city:Gt.Yj().optional(),region:Gt.Yj().optional(),timezone:Gt.Yj().optional()}).optional()})))),xo=Mt({id:"openai.web_search",inputSchema:Et((()=>St(Gt.Ik({})))),outputSchema:Et((()=>St(Gt.Ik({action:Gt.gM("type",[Gt.Ik({type:Gt.eu("search"),query:Gt.Yj().optional()}),Gt.Ik({type:Gt.eu("openPage"),url:Gt.Yj().nullish()}),Gt.Ik({type:Gt.eu("findInPage"),url:Gt.Yj().nullish(),pattern:Gt.Yj().nullish()})]),sources:Gt.YO(Gt.gM("type",[Gt.Ik({type:Gt.eu("url"),url:Gt.Yj()}),Gt.Ik({type:Gt.eu("api"),name:Gt.Yj()})])).optional()}))))}),Mo=Et((()=>St(Gt.Ik({searchContextSize:Gt.k5(["low","medium","high"]).optional(),userLocation:Gt.Ik({type:Gt.eu("approximate"),country:Gt.Yj().optional(),city:Gt.Yj().optional(),region:Gt.Yj().optional(),timezone:Gt.Yj().optional()}).optional()})))),Lo=Mt({id:"openai.web_search_preview",inputSchema:Et((()=>St(Gt.Ik({})))),outputSchema:Et((()=>St(Gt.Ik({action:Gt.gM("type",[Gt.Ik({type:Gt.eu("search"),query:Gt.Yj().optional()}),Gt.Ik({type:Gt.eu("openPage"),url:Gt.Yj().nullish()}),Gt.Ik({type:Gt.eu("findInPage"),url:Gt.Yj().nullish(),pattern:Gt.Yj().nullish()})])}))))}),Fo=Gt.RZ((()=>Gt.KC([Gt.Yj(),Gt.ai(),Gt.zM(),Gt.ch(),Gt.YO(Fo),Gt.g1(Gt.Yj(),Fo)]))),Go=Et((()=>St(Gt.Ik({serverLabel:Gt.Yj(),allowedTools:Gt.KC([Gt.YO(Gt.Yj()),Gt.Ik({readOnly:Gt.zM().optional(),toolNames:Gt.YO(Gt.Yj()).optional()})]).optional(),authorization:Gt.Yj().optional(),connectorId:Gt.Yj().optional(),headers:Gt.g1(Gt.Yj(),Gt.Yj()).optional(),requireApproval:Gt.KC([Gt.k5(["always","never"]),Gt.Ik({never:Gt.Ik({toolNames:Gt.YO(Gt.Yj()).optional()}).optional()})]).optional(),serverDescription:Gt.Yj().optional(),serverUrl:Gt.Yj().optional()}).refine((e=>null!=e.serverUrl||null!=e.connectorId),"One of serverUrl or connectorId must be provided.")))),ko=Mt({id:"openai.mcp",inputSchema:Et((()=>St(Gt.Ik({})))),outputSchema:Et((()=>St(Gt.Ik({type:Gt.eu("call"),serverLabel:Gt.Yj(),name:Gt.Yj(),arguments:Gt.Yj(),output:Gt.Yj().nullish(),error:Gt.KC([Gt.Yj(),Fo]).optional()}))))}),Vo={applyPatch:fo,codeInterpreter:(e={})=>vo(e),fileSearch:So,imageGeneration:(e={})=>bo(e),localShell:To,shell:Io,webSearchPreview:Lo,webSearch:(e={})=>xo(e),mcp:e=>ko(e)};function Ho(e){var t,o,r,n;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 i=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!=(n=null==(r=e.output_tokens_details)?void 0:r.reasoning_tokens)?n:0;return{inputTokens:{total:i,noCache:i-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 jo=Gt.Ik({itemId:Gt.Yj().nullish(),reasoningEncryptedContent:Gt.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((()=>St(Gt.KC([Gt.Ik({type:Gt.eu("response.output_text.delta"),item_id:Gt.Yj(),delta:Gt.Yj(),logprobs:Gt.YO(Gt.Ik({token:Gt.Yj(),logprob:Gt.ai(),top_logprobs:Gt.YO(Gt.Ik({token:Gt.Yj(),logprob:Gt.ai()}))})).nullish()}),Gt.Ik({type:Gt.k5(["response.completed","response.incomplete"]),response:Gt.Ik({incomplete_details:Gt.Ik({reason:Gt.Yj()}).nullish(),usage:Gt.Ik({input_tokens:Gt.ai(),input_tokens_details:Gt.Ik({cached_tokens:Gt.ai().nullish()}).nullish(),output_tokens:Gt.ai(),output_tokens_details:Gt.Ik({reasoning_tokens:Gt.ai().nullish()}).nullish()}),service_tier:Gt.Yj().nullish()})}),Gt.Ik({type:Gt.eu("response.created"),response:Gt.Ik({id:Gt.Yj(),created_at:Gt.ai(),model:Gt.Yj(),service_tier:Gt.Yj().nullish()})}),Gt.Ik({type:Gt.eu("response.output_item.added"),output_index:Gt.ai(),item:Gt.gM("type",[Gt.Ik({type:Gt.eu("message"),id:Gt.Yj()}),Gt.Ik({type:Gt.eu("reasoning"),id:Gt.Yj(),encrypted_content:Gt.Yj().nullish()}),Gt.Ik({type:Gt.eu("function_call"),id:Gt.Yj(),call_id:Gt.Yj(),name:Gt.Yj(),arguments:Gt.Yj()}),Gt.Ik({type:Gt.eu("web_search_call"),id:Gt.Yj(),status:Gt.Yj()}),Gt.Ik({type:Gt.eu("computer_call"),id:Gt.Yj(),status:Gt.Yj()}),Gt.Ik({type:Gt.eu("file_search_call"),id:Gt.Yj()}),Gt.Ik({type:Gt.eu("image_generation_call"),id:Gt.Yj()}),Gt.Ik({type:Gt.eu("code_interpreter_call"),id:Gt.Yj(),container_id:Gt.Yj(),code:Gt.Yj().nullable(),outputs:Gt.YO(Gt.gM("type",[Gt.Ik({type:Gt.eu("logs"),logs:Gt.Yj()}),Gt.Ik({type:Gt.eu("image"),url:Gt.Yj()})])).nullable(),status:Gt.Yj()}),Gt.Ik({type:Gt.eu("mcp_call"),id:Gt.Yj(),status:Gt.Yj(),approval_request_id:Gt.Yj().nullish()}),Gt.Ik({type:Gt.eu("mcp_list_tools"),id:Gt.Yj()}),Gt.Ik({type:Gt.eu("mcp_approval_request"),id:Gt.Yj()}),Gt.Ik({type:Gt.eu("apply_patch_call"),id:Gt.Yj(),call_id:Gt.Yj(),status:Gt.k5(["in_progress","completed"]),operation:Gt.gM("type",[Gt.Ik({type:Gt.eu("create_file"),path:Gt.Yj(),diff:Gt.Yj()}),Gt.Ik({type:Gt.eu("delete_file"),path:Gt.Yj()}),Gt.Ik({type:Gt.eu("update_file"),path:Gt.Yj(),diff:Gt.Yj()})])}),Gt.Ik({type:Gt.eu("shell_call"),id:Gt.Yj(),call_id:Gt.Yj(),status:Gt.k5(["in_progress","completed","incomplete"]),action:Gt.Ik({commands:Gt.YO(Gt.Yj())})})])}),Gt.Ik({type:Gt.eu("response.output_item.done"),output_index:Gt.ai(),item:Gt.gM("type",[Gt.Ik({type:Gt.eu("message"),id:Gt.Yj()}),Gt.Ik({type:Gt.eu("reasoning"),id:Gt.Yj(),encrypted_content:Gt.Yj().nullish()}),Gt.Ik({type:Gt.eu("function_call"),id:Gt.Yj(),call_id:Gt.Yj(),name:Gt.Yj(),arguments:Gt.Yj(),status:Gt.eu("completed")}),Gt.Ik({type:Gt.eu("code_interpreter_call"),id:Gt.Yj(),code:Gt.Yj().nullable(),container_id:Gt.Yj(),outputs:Gt.YO(Gt.gM("type",[Gt.Ik({type:Gt.eu("logs"),logs:Gt.Yj()}),Gt.Ik({type:Gt.eu("image"),url:Gt.Yj()})])).nullable()}),Gt.Ik({type:Gt.eu("image_generation_call"),id:Gt.Yj(),result:Gt.Yj()}),Gt.Ik({type:Gt.eu("web_search_call"),id:Gt.Yj(),status:Gt.Yj(),action:Gt.gM("type",[Gt.Ik({type:Gt.eu("search"),query:Gt.Yj().nullish(),sources:Gt.YO(Gt.gM("type",[Gt.Ik({type:Gt.eu("url"),url:Gt.Yj()}),Gt.Ik({type:Gt.eu("api"),name:Gt.Yj()})])).nullish()}),Gt.Ik({type:Gt.eu("open_page"),url:Gt.Yj().nullish()}),Gt.Ik({type:Gt.eu("find_in_page"),url:Gt.Yj().nullish(),pattern:Gt.Yj().nullish()})])}),Gt.Ik({type:Gt.eu("file_search_call"),id:Gt.Yj(),queries:Gt.YO(Gt.Yj()),results:Gt.YO(Gt.Ik({attributes:Gt.g1(Gt.Yj(),Gt.KC([Gt.Yj(),Gt.ai(),Gt.zM()])),file_id:Gt.Yj(),filename:Gt.Yj(),score:Gt.ai(),text:Gt.Yj()})).nullish()}),Gt.Ik({type:Gt.eu("local_shell_call"),id:Gt.Yj(),call_id:Gt.Yj(),action:Gt.Ik({type:Gt.eu("exec"),command:Gt.YO(Gt.Yj()),timeout_ms:Gt.ai().optional(),user:Gt.Yj().optional(),working_directory:Gt.Yj().optional(),env:Gt.g1(Gt.Yj(),Gt.Yj()).optional()})}),Gt.Ik({type:Gt.eu("computer_call"),id:Gt.Yj(),status:Gt.eu("completed")}),Gt.Ik({type:Gt.eu("mcp_call"),id:Gt.Yj(),status:Gt.Yj(),arguments:Gt.Yj(),name:Gt.Yj(),server_label:Gt.Yj(),output:Gt.Yj().nullish(),error:Gt.KC([Gt.Yj(),Gt.Ik({type:Gt.Yj().optional(),code:Gt.KC([Gt.ai(),Gt.Yj()]).optional(),message:Gt.Yj().optional()}).loose()]).nullish(),approval_request_id:Gt.Yj().nullish()}),Gt.Ik({type:Gt.eu("mcp_list_tools"),id:Gt.Yj(),server_label:Gt.Yj(),tools:Gt.YO(Gt.Ik({name:Gt.Yj(),description:Gt.Yj().optional(),input_schema:Gt.bz(),annotations:Gt.g1(Gt.Yj(),Gt.L5()).optional()})),error:Gt.KC([Gt.Yj(),Gt.Ik({type:Gt.Yj().optional(),code:Gt.KC([Gt.ai(),Gt.Yj()]).optional(),message:Gt.Yj().optional()}).loose()]).optional()}),Gt.Ik({type:Gt.eu("mcp_approval_request"),id:Gt.Yj(),server_label:Gt.Yj(),name:Gt.Yj(),arguments:Gt.Yj(),approval_request_id:Gt.Yj().optional()}),Gt.Ik({type:Gt.eu("apply_patch_call"),id:Gt.Yj(),call_id:Gt.Yj(),status:Gt.k5(["in_progress","completed"]),operation:Gt.gM("type",[Gt.Ik({type:Gt.eu("create_file"),path:Gt.Yj(),diff:Gt.Yj()}),Gt.Ik({type:Gt.eu("delete_file"),path:Gt.Yj()}),Gt.Ik({type:Gt.eu("update_file"),path:Gt.Yj(),diff:Gt.Yj()})])}),Gt.Ik({type:Gt.eu("shell_call"),id:Gt.Yj(),call_id:Gt.Yj(),status:Gt.k5(["in_progress","completed","incomplete"]),action:Gt.Ik({commands:Gt.YO(Gt.Yj())})})])}),Gt.Ik({type:Gt.eu("response.function_call_arguments.delta"),item_id:Gt.Yj(),output_index:Gt.ai(),delta:Gt.Yj()}),Gt.Ik({type:Gt.eu("response.image_generation_call.partial_image"),item_id:Gt.Yj(),output_index:Gt.ai(),partial_image_b64:Gt.Yj()}),Gt.Ik({type:Gt.eu("response.code_interpreter_call_code.delta"),item_id:Gt.Yj(),output_index:Gt.ai(),delta:Gt.Yj()}),Gt.Ik({type:Gt.eu("response.code_interpreter_call_code.done"),item_id:Gt.Yj(),output_index:Gt.ai(),code:Gt.Yj()}),Gt.Ik({type:Gt.eu("response.output_text.annotation.added"),annotation:Gt.gM("type",[Gt.Ik({type:Gt.eu("url_citation"),start_index:Gt.ai(),end_index:Gt.ai(),url:Gt.Yj(),title:Gt.Yj()}),Gt.Ik({type:Gt.eu("file_citation"),file_id:Gt.Yj(),filename:Gt.Yj(),index:Gt.ai()}),Gt.Ik({type:Gt.eu("container_file_citation"),container_id:Gt.Yj(),file_id:Gt.Yj(),filename:Gt.Yj(),start_index:Gt.ai(),end_index:Gt.ai()}),Gt.Ik({type:Gt.eu("file_path"),file_id:Gt.Yj(),index:Gt.ai()})])}),Gt.Ik({type:Gt.eu("response.reasoning_summary_part.added"),item_id:Gt.Yj(),summary_index:Gt.ai()}),Gt.Ik({type:Gt.eu("response.reasoning_summary_text.delta"),item_id:Gt.Yj(),summary_index:Gt.ai(),delta:Gt.Yj()}),Gt.Ik({type:Gt.eu("response.reasoning_summary_part.done"),item_id:Gt.Yj(),summary_index:Gt.ai()}),Gt.Ik({type:Gt.eu("response.apply_patch_call_operation_diff.delta"),item_id:Gt.Yj(),output_index:Gt.ai(),delta:Gt.Yj(),obfuscation:Gt.Yj().nullish()}),Gt.Ik({type:Gt.eu("response.apply_patch_call_operation_diff.done"),item_id:Gt.Yj(),output_index:Gt.ai(),diff:Gt.Yj()}),Gt.Ik({type:Gt.eu("error"),sequence_number:Gt.ai(),error:Gt.Ik({type:Gt.Yj(),code:Gt.Yj(),message:Gt.Yj(),param:Gt.Yj().nullish()})}),Gt.Ik({type:Gt.Yj()}).loose().transform((e=>({type:"unknown_chunk",message:e.type})))])))),Yo=Et((()=>St(Gt.Ik({id:Gt.Yj().optional(),created_at:Gt.ai().optional(),error:Gt.Ik({message:Gt.Yj(),type:Gt.Yj(),param:Gt.Yj().nullish(),code:Gt.Yj()}).nullish(),model:Gt.Yj().optional(),output:Gt.YO(Gt.gM("type",[Gt.Ik({type:Gt.eu("message"),role:Gt.eu("assistant"),id:Gt.Yj(),content:Gt.YO(Gt.Ik({type:Gt.eu("output_text"),text:Gt.Yj(),logprobs:Gt.YO(Gt.Ik({token:Gt.Yj(),logprob:Gt.ai(),top_logprobs:Gt.YO(Gt.Ik({token:Gt.Yj(),logprob:Gt.ai()}))})).nullish(),annotations:Gt.YO(Gt.gM("type",[Gt.Ik({type:Gt.eu("url_citation"),start_index:Gt.ai(),end_index:Gt.ai(),url:Gt.Yj(),title:Gt.Yj()}),Gt.Ik({type:Gt.eu("file_citation"),file_id:Gt.Yj(),filename:Gt.Yj(),index:Gt.ai()}),Gt.Ik({type:Gt.eu("container_file_citation"),container_id:Gt.Yj(),file_id:Gt.Yj(),filename:Gt.Yj(),start_index:Gt.ai(),end_index:Gt.ai()}),Gt.Ik({type:Gt.eu("file_path"),file_id:Gt.Yj(),index:Gt.ai()})]))}))}),Gt.Ik({type:Gt.eu("web_search_call"),id:Gt.Yj(),status:Gt.Yj(),action:Gt.gM("type",[Gt.Ik({type:Gt.eu("search"),query:Gt.Yj().nullish(),sources:Gt.YO(Gt.gM("type",[Gt.Ik({type:Gt.eu("url"),url:Gt.Yj()}),Gt.Ik({type:Gt.eu("api"),name:Gt.Yj()})])).nullish()}),Gt.Ik({type:Gt.eu("open_page"),url:Gt.Yj().nullish()}),Gt.Ik({type:Gt.eu("find_in_page"),url:Gt.Yj().nullish(),pattern:Gt.Yj().nullish()})])}),Gt.Ik({type:Gt.eu("file_search_call"),id:Gt.Yj(),queries:Gt.YO(Gt.Yj()),results:Gt.YO(Gt.Ik({attributes:Gt.g1(Gt.Yj(),Gt.KC([Gt.Yj(),Gt.ai(),Gt.zM()])),file_id:Gt.Yj(),filename:Gt.Yj(),score:Gt.ai(),text:Gt.Yj()})).nullish()}),Gt.Ik({type:Gt.eu("code_interpreter_call"),id:Gt.Yj(),code:Gt.Yj().nullable(),container_id:Gt.Yj(),outputs:Gt.YO(Gt.gM("type",[Gt.Ik({type:Gt.eu("logs"),logs:Gt.Yj()}),Gt.Ik({type:Gt.eu("image"),url:Gt.Yj()})])).nullable()}),Gt.Ik({type:Gt.eu("image_generation_call"),id:Gt.Yj(),result:Gt.Yj()}),Gt.Ik({type:Gt.eu("local_shell_call"),id:Gt.Yj(),call_id:Gt.Yj(),action:Gt.Ik({type:Gt.eu("exec"),command:Gt.YO(Gt.Yj()),timeout_ms:Gt.ai().optional(),user:Gt.Yj().optional(),working_directory:Gt.Yj().optional(),env:Gt.g1(Gt.Yj(),Gt.Yj()).optional()})}),Gt.Ik({type:Gt.eu("function_call"),call_id:Gt.Yj(),name:Gt.Yj(),arguments:Gt.Yj(),id:Gt.Yj()}),Gt.Ik({type:Gt.eu("computer_call"),id:Gt.Yj(),status:Gt.Yj().optional()}),Gt.Ik({type:Gt.eu("reasoning"),id:Gt.Yj(),encrypted_content:Gt.Yj().nullish(),summary:Gt.YO(Gt.Ik({type:Gt.eu("summary_text"),text:Gt.Yj()}))}),Gt.Ik({type:Gt.eu("mcp_call"),id:Gt.Yj(),status:Gt.Yj(),arguments:Gt.Yj(),name:Gt.Yj(),server_label:Gt.Yj(),output:Gt.Yj().nullish(),error:Gt.KC([Gt.Yj(),Gt.Ik({type:Gt.Yj().optional(),code:Gt.KC([Gt.ai(),Gt.Yj()]).optional(),message:Gt.Yj().optional()}).loose()]).nullish(),approval_request_id:Gt.Yj().nullish()}),Gt.Ik({type:Gt.eu("mcp_list_tools"),id:Gt.Yj(),server_label:Gt.Yj(),tools:Gt.YO(Gt.Ik({name:Gt.Yj(),description:Gt.Yj().optional(),input_schema:Gt.bz(),annotations:Gt.g1(Gt.Yj(),Gt.L5()).optional()})),error:Gt.KC([Gt.Yj(),Gt.Ik({type:Gt.Yj().optional(),code:Gt.KC([Gt.ai(),Gt.Yj()]).optional(),message:Gt.Yj().optional()}).loose()]).optional()}),Gt.Ik({type:Gt.eu("mcp_approval_request"),id:Gt.Yj(),server_label:Gt.Yj(),name:Gt.Yj(),arguments:Gt.Yj(),approval_request_id:Gt.Yj().optional()}),Gt.Ik({type:Gt.eu("apply_patch_call"),id:Gt.Yj(),call_id:Gt.Yj(),status:Gt.k5(["in_progress","completed"]),operation:Gt.gM("type",[Gt.Ik({type:Gt.eu("create_file"),path:Gt.Yj(),diff:Gt.Yj()}),Gt.Ik({type:Gt.eu("delete_file"),path:Gt.Yj()}),Gt.Ik({type:Gt.eu("update_file"),path:Gt.Yj(),diff:Gt.Yj()})])}),Gt.Ik({type:Gt.eu("shell_call"),id:Gt.Yj(),call_id:Gt.Yj(),status:Gt.k5(["in_progress","completed","incomplete"]),action:Gt.Ik({commands:Gt.YO(Gt.Yj())})})])).optional(),service_tier:Gt.Yj().nullish(),incomplete_details:Gt.Ik({reason:Gt.Yj()}).nullish(),usage:Gt.Ik({input_tokens:Gt.ai(),input_tokens_details:Gt.Ik({cached_tokens:Gt.ai().nullish()}).nullish(),output_tokens:Gt.ai(),output_tokens_details:Gt.Ik({reasoning_tokens:Gt.ai().nullish()}).nullish()}).optional()})))),zo=Et((()=>St(Gt.Ik({conversation:Gt.Yj().nullish(),include:Gt.YO(Gt.k5(["reasoning.encrypted_content","file_search_call.results","message.output_text.logprobs"])).nullish(),instructions:Gt.Yj().nullish(),logprobs:Gt.KC([Gt.zM(),Gt.ai().min(1).max(20)]).optional(),maxToolCalls:Gt.ai().nullish(),metadata:Gt.bz().nullish(),parallelToolCalls:Gt.zM().nullish(),previousResponseId:Gt.Yj().nullish(),promptCacheKey:Gt.Yj().nullish(),promptCacheRetention:Gt.k5(["in_memory","24h"]).nullish(),reasoningEffort:Gt.Yj().nullish(),reasoningSummary:Gt.Yj().nullish(),safetyIdentifier:Gt.Yj().nullish(),serviceTier:Gt.k5(["auto","flex","priority","default"]).nullish(),store:Gt.zM().nullish(),strictJsonSchema:Gt.zM().nullish(),textVerbosity:Gt.k5(["low","medium","high"]).nullish(),truncation:Gt.k5(["auto","disabled"]).nullish(),user:Gt.Yj().nullish(),systemMessageMode:Gt.k5(["system","developer","remove"]).optional(),forceReasoning:Gt.zM().optional()}))));function Ko(e){var t,o;const r={};for(const n of e)if("assistant"===n.role)for(const e of n.content){if("tool-call"!==e.type)continue;const n=null==(o=null==(t=e.providerOptions)?void 0:t.openai)?void 0:o.approvalRequestId;null!=n&&(r[n]=e.toolCallId)}return r}var $o=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:n,presencePenalty:i,frequencyPenalty:s,seed:a,prompt:l,providerOptions:u,tools:p,toolChoice:c,responseFormat:d}){var h,f,g,m,y,v;const C=[],w=jt(this.modelId);null!=n&&C.push({type:"unsupported",feature:"topK"}),null!=a&&C.push({type:"unsupported",feature:"seed"}),null!=i&&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 At({provider:E,providerOptions:u,schema:zo});null==_&&"openai"!==E&&(_=await At({provider:"openai",providerOptions:u,schema:zo}));const S=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 n of e)if("provider"===n.type&&n.id in t){const e=t[n.id];o[n.name]=e,r[e]=n.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:p,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:b,warnings:O}=await async function({prompt:e,toolNameMapping:t,systemMessageMode:o,providerOptionsName:r,fileIdPrefixes:n,store:i,hasLocalShellTool:s=!1,hasShellTool:a=!1,hasApplyPatchTool:l=!1}){var u,p,c,d,h,f,g,m,y,v,C,w,E;const _=[],S=[],R=new Set;for(const{role:b,content:O}of e)switch(b){case"system":switch(o){case"system":_.push({role:"system",content:O});break;case"developer":_.push({role:"developer",content:O});break;case"remove":S.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,i,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,n)?{file_id:e.data}:{image_url:`data:${t};base64,${De(e.data)}`},detail:null==(i=null==(o=e.providerOptions)?void 0:o[r])?void 0:i.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,n)?{file_id:e.data}:{filename:null!=(s=e.filename)?s:`part-${t}.pdf`,file_data:`data:application/pdf;base64,${De(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==(p=null==(u=o.providerOptions)?void 0:u[r])?void 0:p.itemId;if(i&&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){i&&null!=e&&_.push({type:"item_reference",id:e});break}if(i&&null!=e){_.push({type:"item_reference",id:e});break}const n=t.toProviderToolName(o.toolName);if(s&&"local_shell"===n){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"===n){const t=await Rt({value:o.input,schema:Ao});_.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:n,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(i){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 S.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 At({provider:r,providerOptions:o.providerOptions,schema:jo}),n=null==t?void 0:t.itemId;if(null!=n){const r=e[n];if(i)void 0===r&&(_.push({type:"item_reference",id:n}),e[n]={type:"reasoning",id:n,summary:[]});else{const i=[];o.text.length>0?i.push({type:"summary_text",text:o.text}):void 0!==r&&S.push({type:"other",message:`Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(o)}.`}),void 0===r?(e[n]={type:"reasoning",id:n,encrypted_content:null==t?void 0:t.reasoningEncryptedContent,summary:i},_.push(e[n])):(r.summary.push(...i),null!=(null==t?void 0:t.reasoningEncryptedContent)&&(r.encrypted_content=t.reasoningEncryptedContent))}}else S.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),i&&_.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:Po});_.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:Do});_.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 n;switch(o.type){case"text":case"error-text":n=o.value;break;case"execution-denied":n=null!=(E=o.reason)?E:"Tool execution denied.";break;case"json":case"error-json":n=JSON.stringify(o.value);break;case"content":n=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 S.push({type:"other",message:`unsupported tool content part type: ${e.type}`})}})).filter(Ue)}_.push({type:"function_call_output",call_id:e.toolCallId,output:n})}break;default:throw new Error(`Unsupported role: ${b}`)}return{input:_,warnings:S}}({prompt:l,toolNameMapping:R,systemMessageMode:null!=(f=null==_?void 0:_.systemMessageMode)?f:S?"developer":w.systemMessageMode,providerOptionsName:E,fileIdPrefixes:this.config.fileIdPrefixes,store:null==(g=null==_?void 0:_.store)||g,hasLocalShellTool:D("openai.local_shell"),hasShellTool:D("openai.shell"),hasApplyPatchTool:D("openai.apply_patch")});C.push(...O);const P=null==(m=null==_?void 0:_.strictJsonSchema)||m;let T=null==_?void 0:_.include;function A(e){null==T?T=[e]:T.includes(e)||(T=[...T,e])}function D(e){return null!=(null==p?void 0:p.find((t=>"provider"===t.type&&t.id===e)))}const I="number"==typeof(null==_?void 0:_.logprobs)?null==_?void 0:_.logprobs:!0===(null==_?void 0:_.logprobs)?20:void 0;I&&A("message.output_text.logprobs");const N=null==(y=null==p?void 0:p.find((e=>"provider"===e.type&&("openai.web_search"===e.id||"openai.web_search_preview"===e.id))))?void 0:y.name;N&&A("web_search_call.action.sources"),D("openai.code_interpreter")&&A("code_interpreter_call.outputs");const x=null==_?void 0:_.store;!1===x&&S&&A("reasoning.encrypted_content");const M={model:this.modelId,input:b,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:P,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:x,user:null==_?void 0:_.user,instructions:null==_?void 0:_.instructions,service_tier:null==_?void 0:_.serviceTier,include:T,prompt_cache_key:null==_?void 0:_.promptCacheKey,prompt_cache_retention:null==_?void 0:_.promptCacheRetention,safety_identifier:null==_?void 0:_.safetyIdentifier,top_logprobs:I,truncation:null==_?void 0:_.truncation,...S&&(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}}}};S?"none"===(null==_?void 0:_.reasoningEffort)&&w.supportsNonReasoningParameters||(null!=M.temperature&&(M.temperature=void 0,C.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"})),null!=M.top_p&&(M.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 M.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 M.service_tier);const{tools:L,toolChoice:F,toolWarnings:G}=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:Mo});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:No});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:Go}),o=e=>({tool_names:e.toolNames}),n=e.requireApproval,i=null==n?void 0:"string"==typeof n?n:null!=n.never?{never:o(n.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!=i?i:"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 n=t.type;switch(n){case"auto":case"none":case"required":return{tools:r,toolChoice:n,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: ${n}`})}}({tools:p,toolChoice:c});return{webSearchToolName:N,args:{...M,tools:L,tool_choice:F},warnings:[...C,...G],store:x,toolNameMapping:R,providerOptionsName:E}}async doGenerate(e){var t,o,r,n,i,s,a,l,u,p,c,d,h,f,m,y,v,C,w,E,_,S,R,b,O;const{args:P,warnings:T,webSearchToolName:A,toolNameMapping:D,providerOptionsName:I}=await this.getArgs(e),N=this.config.url({path:"/responses",modelId:this.modelId}),x=Ko(e.prompt),{responseHeaders:M,value:L,rawValue:F}=await It({url:N,headers:be(this.config.headers(),e.headers),body:P,failedResponseHandler:Wt,successfulResponseHandler:Ft(Yo),abortSignal:e.abortSignal,fetch:this.config.fetch});if(L.error)throw new g({message:L.error.message,url:N,requestBodyValues:P,statusCode:400,responseHeaders:M,responseBody:F,isRetryable:!1});const G=[],k=[];let V=!1;for(const g of L.output)switch(g.type){case"reasoning":0===g.summary.length&&g.summary.push({type:"summary_text",text:""});for(const e of g.summary)G.push({type:"reasoning",text:e.text,providerMetadata:{[I]:{itemId:g.id,reasoningEncryptedContent:null!=(t=g.encrypted_content)?t:null}}});break;case"image_generation_call":G.push({type:"tool-call",toolCallId:g.id,toolName:D.toCustomToolName("image_generation"),input:"{}",providerExecuted:!0}),G.push({type:"tool-result",toolCallId:g.id,toolName:D.toCustomToolName("image_generation"),result:{result:g.result}});break;case"local_shell_call":G.push({type:"tool-call",toolCallId:g.call_id,toolName:D.toCustomToolName("local_shell"),input:JSON.stringify({action:g.action}),providerMetadata:{[I]:{itemId:g.id}}});break;case"shell_call":G.push({type:"tool-call",toolCallId:g.call_id,toolName:D.toCustomToolName("shell"),input:JSON.stringify({action:{commands:g.action.commands}}),providerMetadata:{[I]:{itemId:g.id}}});break;case"message":for(const t of g.content){(null==(r=null==(o=e.providerOptions)?void 0:o[I])?void 0:r.logprobs)&&t.logprobs&&k.push(t.logprobs);const y={itemId:g.id,...t.annotations.length>0&&{annotations:t.annotations}};G.push({type:"text",text:t.text,providerMetadata:{[I]:y}});for(const e of t.annotations)"url_citation"===e.type?G.push({type:"source",sourceType:"url",id:null!=(s=null==(i=(n=this.config).generateId)?void 0:i.call(n))?s:Ve(),url:e.url,title:e.title}):"file_citation"===e.type?G.push({type:"source",sourceType:"document",id:null!=(u=null==(l=(a=this.config).generateId)?void 0:l.call(a))?u:Ve(),mediaType:"text/plain",title:e.filename,filename:e.filename,providerMetadata:{[I]:{type:e.type,fileId:e.file_id,index:e.index}}}):"container_file_citation"===e.type?G.push({type:"source",sourceType:"document",id:null!=(d=null==(c=(p=this.config).generateId)?void 0:c.call(p))?d:Ve(),mediaType:"text/plain",title:e.filename,filename:e.filename,providerMetadata:{[I]:{type:e.type,fileId:e.file_id,containerId:e.container_id}}}):"file_path"===e.type&&G.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:{[I]:{type:e.type,fileId:e.file_id,index:e.index}}})}break;case"function_call":V=!0,G.push({type:"tool-call",toolCallId:g.call_id,toolName:g.name,input:g.arguments,providerMetadata:{[I]:{itemId:g.id}}});break;case"web_search_call":G.push({type:"tool-call",toolCallId:g.id,toolName:D.toCustomToolName(null!=A?A:"web_search"),input:JSON.stringify({}),providerExecuted:!0}),G.push({type:"tool-result",toolCallId:g.id,toolName:D.toCustomToolName(null!=A?A:"web_search"),result:Zo(g.action)});break;case"mcp_call":{const e=null!=g.approval_request_id&&null!=(y=x[g.approval_request_id])?y:g.id,t=`mcp.${g.name}`;G.push({type:"tool-call",toolCallId:e,toolName:t,input:g.arguments,providerExecuted:!0,dynamic:!0}),G.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:{[I]:{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}`;G.push({type:"tool-call",toolCallId:t,toolName:o,input:g.arguments,providerExecuted:!0,dynamic:!0}),G.push({type:"tool-approval-request",approvalId:e,toolCallId:t});break}case"computer_call":G.push({type:"tool-call",toolCallId:g.id,toolName:D.toCustomToolName("computer_use"),input:"",providerExecuted:!0}),G.push({type:"tool-result",toolCallId:g.id,toolName:D.toCustomToolName("computer_use"),result:{type:"computer_use_tool_result",status:g.status||"completed"}});break;case"file_search_call":G.push({type:"tool-call",toolCallId:g.id,toolName:D.toCustomToolName("file_search"),input:"{}",providerExecuted:!0}),G.push({type:"tool-result",toolCallId:g.id,toolName:D.toCustomToolName("file_search"),result:{queries:g.queries,results:null!=(S=null==(_=g.results)?void 0:_.map((e=>({attributes:e.attributes,fileId:e.file_id,filename:e.filename,score:e.score,text:e.text}))))?S:null}});break;case"code_interpreter_call":G.push({type:"tool-call",toolCallId:g.id,toolName:D.toCustomToolName("code_interpreter"),input:JSON.stringify({code:g.code,containerId:g.container_id}),providerExecuted:!0}),G.push({type:"tool-result",toolCallId:g.id,toolName:D.toCustomToolName("code_interpreter"),result:{outputs:g.outputs}});break;case"apply_patch_call":G.push({type:"tool-call",toolCallId:g.call_id,toolName:D.toCustomToolName("apply_patch"),input:JSON.stringify({callId:g.call_id,operation:g.operation}),providerMetadata:{[I]:{itemId:g.id}}})}const H={[I]:{responseId:L.id}};k.length>0&&(H[I].logprobs=k),"string"==typeof L.service_tier&&(H[I].serviceTier=L.service_tier);const W=L.usage;return{content:G,finishReason:{unified:Bo({finishReason:null==(R=L.incomplete_details)?void 0:R.reason,hasFunctionCall:V}),raw:null!=(O=null==(b=L.incomplete_details)?void 0:b.reason)?O:void 0},usage:Ho(W),request:{body:P},response:{id:L.id,timestamp:new Date(1e3*L.created_at),modelId:L.model,headers:M,body:F},providerMetadata:H,warnings:T}}async doStream(e){const{args:t,warnings:o,webSearchToolName:r,toolNameMapping:n,store:i,providerOptionsName:s}=await this.getArgs(e),{responseHeaders:a,value:l}=await It({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:be(this.config.headers(),e.headers),body:{...t,stream:!0},failedResponseHandler:Wt,successfulResponseHandler:Lt(Uo),abortSignal:e.abortSignal,fetch:this.config.fetch}),u=this,p=Ko(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,_,S,R,b,O,P,T,A,D,I,N,x,M,L,F,G,k,V,H,W,j,B,U,Y,z,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 q=t.value;if(qo(q))if("function_call"===q.item.type)m[q.output_index]={toolName:q.item.name,toolCallId:q.item.call_id},o.enqueue({type:"tool-input-start",id:q.item.call_id,toolName:q.item.name});else if("web_search_call"===q.item.type)m[q.output_index]={toolName:n.toCustomToolName(null!=r?r:"web_search"),toolCallId:q.item.id},o.enqueue({type:"tool-input-start",id:q.item.id,toolName:n.toCustomToolName(null!=r?r:"web_search"),providerExecuted:!0}),o.enqueue({type:"tool-input-end",id:q.item.id}),o.enqueue({type:"tool-call",toolCallId:q.item.id,toolName:n.toCustomToolName(null!=r?r:"web_search"),input:JSON.stringify({}),providerExecuted:!0});else if("computer_call"===q.item.type)m[q.output_index]={toolName:n.toCustomToolName("computer_use"),toolCallId:q.item.id},o.enqueue({type:"tool-input-start",id:q.item.id,toolName:n.toCustomToolName("computer_use"),providerExecuted:!0});else if("code_interpreter_call"===q.item.type)m[q.output_index]={toolName:n.toCustomToolName("code_interpreter"),toolCallId:q.item.id,codeInterpreter:{containerId:q.item.container_id}},o.enqueue({type:"tool-input-start",id:q.item.id,toolName:n.toCustomToolName("code_interpreter"),providerExecuted:!0}),o.enqueue({type:"tool-input-delta",id:q.item.id,delta:`{"containerId":"${q.item.container_id}","code":"`});else if("file_search_call"===q.item.type)o.enqueue({type:"tool-call",toolCallId:q.item.id,toolName:n.toCustomToolName("file_search"),input:"{}",providerExecuted:!0});else if("image_generation_call"===q.item.type)o.enqueue({type:"tool-call",toolCallId:q.item.id,toolName:n.toCustomToolName("image_generation"),input:"{}",providerExecuted:!0});else if("mcp_call"===q.item.type||"mcp_list_tools"===q.item.type||"mcp_approval_request"===q.item.type);else if("apply_patch_call"===q.item.type){const{call_id:e,operation:t}=q.item;if(m[q.output_index]={toolName:n.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:n.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":"${Xo(e)}","operation":{"type":"${Xo(t.type)}","path":"${Xo(t.path)}","diff":"`})}else"shell_call"===q.item.type?m[q.output_index]={toolName:n.toCustomToolName("shell"),toolCallId:q.item.call_id}:"message"===q.item.type?(y.splice(0,y.length),o.enqueue({type:"text-start",id:q.item.id,providerMetadata:{[s]:{itemId:q.item.id}}})):qo(q)&&"reasoning"===q.item.type&&(C[q.item.id]={encryptedContent:q.item.encrypted_content,summaryParts:{0:"active"}},o.enqueue({type:"reasoning-start",id:`${q.item.id}:0`,providerMetadata:{[s]:{itemId:q.item.id,reasoningEncryptedContent:null!=(a=q.item.encrypted_content)?a:null}}}));else if(function(e){return"response.output_item.done"===e.type}(q)){if("message"===q.item.type)o.enqueue({type:"text-end",id:q.item.id,providerMetadata:{[s]:{itemId:q.item.id,...y.length>0&&{annotations:y}}}});else if("function_call"===q.item.type)m[q.output_index]=void 0,v=!0,o.enqueue({type:"tool-input-end",id:q.item.call_id}),o.enqueue({type:"tool-call",toolCallId:q.item.call_id,toolName:q.item.name,input:q.item.arguments,providerMetadata:{[s]:{itemId:q.item.id}}});else if("web_search_call"===q.item.type)m[q.output_index]=void 0,o.enqueue({type:"tool-result",toolCallId:q.item.id,toolName:n.toCustomToolName(null!=r?r:"web_search"),result:Zo(q.item.action)});else if("computer_call"===q.item.type)m[q.output_index]=void 0,o.enqueue({type:"tool-input-end",id:q.item.id}),o.enqueue({type:"tool-call",toolCallId:q.item.id,toolName:n.toCustomToolName("computer_use"),input:"",providerExecuted:!0}),o.enqueue({type:"tool-result",toolCallId:q.item.id,toolName:n.toCustomToolName("computer_use"),result:{type:"computer_use_tool_result",status:q.item.status||"completed"}});else if("file_search_call"===q.item.type)m[q.output_index]=void 0,o.enqueue({type:"tool-result",toolCallId:q.item.id,toolName:n.toCustomToolName("file_search"),result:{queries:q.item.queries,results:null!=(E=null==(l=q.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"===q.item.type)m[q.output_index]=void 0,o.enqueue({type:"tool-result",toolCallId:q.item.id,toolName:n.toCustomToolName("code_interpreter"),result:{outputs:q.item.outputs}});else if("image_generation_call"===q.item.type)o.enqueue({type:"tool-result",toolCallId:q.item.id,toolName:n.toCustomToolName("image_generation"),result:{result:q.item.result}});else if("mcp_call"===q.item.type){m[q.output_index]=void 0;const e=null!=(_=q.item.approval_request_id)?_:void 0,t=null!=e&&null!=(R=null!=(S=c.get(e))?S:p[e])?R:q.item.id,r=`mcp.${q.item.name}`;o.enqueue({type:"tool-call",toolCallId:t,toolName:r,input:q.item.arguments,providerExecuted:!0,dynamic:!0}),o.enqueue({type:"tool-result",toolCallId:t,toolName:r,result:{type:"call",serverLabel:q.item.server_label,name:q.item.name,arguments:q.item.arguments,...null!=q.item.output?{output:q.item.output}:{},...null!=q.item.error?{error:q.item.error}:{}},providerMetadata:{[s]:{itemId:q.item.id}}})}else if("mcp_list_tools"===q.item.type)m[q.output_index]=void 0;else if("apply_patch_call"===q.item.type){const e=m[q.output_index];(null==e?void 0:e.applyPatch)&&!e.applyPatch.endEmitted&&"delete_file"!==q.item.operation.type&&(e.applyPatch.hasDiff||o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:Xo(q.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"===q.item.status&&o.enqueue({type:"tool-call",toolCallId:e.toolCallId,toolName:n.toCustomToolName("apply_patch"),input:JSON.stringify({callId:q.item.call_id,operation:q.item.operation}),providerMetadata:{[s]:{itemId:q.item.id}}}),m[q.output_index]=void 0}else if("mcp_approval_request"===q.item.type){m[q.output_index]=void 0;const e=null!=(P=null==(O=(b=u.config).generateId)?void 0:O.call(b))?P:Ve(),t=null!=(T=q.item.approval_request_id)?T:q.item.id;c.set(t,e);const r=`mcp.${q.item.name}`;o.enqueue({type:"tool-call",toolCallId:e,toolName:r,input:q.item.arguments,providerExecuted:!0,dynamic:!0}),o.enqueue({type:"tool-approval-request",approvalId:t,toolCallId:e})}else if("local_shell_call"===q.item.type)m[q.output_index]=void 0,o.enqueue({type:"tool-call",toolCallId:q.item.call_id,toolName:n.toCustomToolName("local_shell"),input:JSON.stringify({action:{type:"exec",command:q.item.action.command,timeoutMs:q.item.action.timeout_ms,user:q.item.action.user,workingDirectory:q.item.action.working_directory,env:q.item.action.env}}),providerMetadata:{[s]:{itemId:q.item.id}}});else if("shell_call"===q.item.type)m[q.output_index]=void 0,o.enqueue({type:"tool-call",toolCallId:q.item.call_id,toolName:n.toCustomToolName("shell"),input:JSON.stringify({action:{commands:q.item.action.commands}}),providerMetadata:{[s]:{itemId:q.item.id}}});else if("reasoning"===q.item.type){const e=C[q.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:`${q.item.id}:${e}`,providerMetadata:{[s]:{itemId:q.item.id,reasoningEncryptedContent:null!=(A=q.item.encrypted_content)?A:null}}});delete C[q.item.id]}}else if(function(e){return"response.function_call_arguments.delta"===e.type}(q)){const e=m[q.output_index];null!=e&&o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:q.delta})}else if(function(e){return"response.apply_patch_call_operation_diff.delta"===e.type}(q)){const e=m[q.output_index];(null==e?void 0:e.applyPatch)&&(o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:Xo(q.delta)}),e.applyPatch.hasDiff=!0)}else if(function(e){return"response.apply_patch_call_operation_diff.done"===e.type}(q)){const e=m[q.output_index];(null==e?void 0:e.applyPatch)&&!e.applyPatch.endEmitted&&(e.applyPatch.hasDiff||(o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:Xo(q.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}(q))o.enqueue({type:"tool-result",toolCallId:q.item_id,toolName:n.toCustomToolName("image_generation"),result:{result:q.partial_image_b64},preliminary:!0});else if(function(e){return"response.code_interpreter_call_code.delta"===e.type}(q)){const e=m[q.output_index];null!=e&&o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:Xo(q.delta)})}else if(function(e){return"response.code_interpreter_call_code.done"===e.type}(q)){const e=m[q.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:n.toCustomToolName("code_interpreter"),input:JSON.stringify({code:q.code,containerId:e.codeInterpreter.containerId}),providerExecuted:!0}))}else if(function(e){return"response.created"===e.type}(q))g=q.response.id,o.enqueue({type:"response-metadata",id:q.response.id,timestamp:new Date(1e3*q.response.created_at),modelId:q.response.model});else if(function(e){return"response.output_text.delta"===e.type}(q))o.enqueue({type:"text-delta",id:q.item_id,delta:q.delta}),(null==(I=null==(D=e.providerOptions)?void 0:D[s])?void 0:I.logprobs)&&q.logprobs&&f.push(q.logprobs);else if("response.reasoning_summary_part.added"===q.type){if(q.summary_index>0){const e=C[q.item_id];e.summaryParts[q.summary_index]="active";for(const t of Object.keys(e.summaryParts))"can-conclude"===e.summaryParts[t]&&(o.enqueue({type:"reasoning-end",id:`${q.item_id}:${t}`,providerMetadata:{[s]:{itemId:q.item_id}}}),e.summaryParts[t]="concluded");o.enqueue({type:"reasoning-start",id:`${q.item_id}:${q.summary_index}`,providerMetadata:{[s]:{itemId:q.item_id,reasoningEncryptedContent:null!=(x=null==(N=C[q.item_id])?void 0:N.encryptedContent)?x:null}}})}}else"response.reasoning_summary_text.delta"===q.type?o.enqueue({type:"reasoning-delta",id:`${q.item_id}:${q.summary_index}`,delta:q.delta,providerMetadata:{[s]:{itemId:q.item_id}}}):"response.reasoning_summary_part.done"===q.type?i?(o.enqueue({type:"reasoning-end",id:`${q.item_id}:${q.summary_index}`,providerMetadata:{[s]:{itemId:q.item_id}}}),C[q.item_id].summaryParts[q.summary_index]="concluded"):C[q.item_id].summaryParts[q.summary_index]="can-conclude":function(e){return"response.completed"===e.type||"response.incomplete"===e.type}(q)?(h={unified:Bo({finishReason:null==(M=q.response.incomplete_details)?void 0:M.reason,hasFunctionCall:v}),raw:null!=(F=null==(L=q.response.incomplete_details)?void 0:L.reason)?F:void 0},d=q.response.usage,"string"==typeof q.response.service_tier&&(w=q.response.service_tier)):function(e){return"response.output_text.annotation.added"===e.type}(q)?(y.push(q.annotation),"url_citation"===q.annotation.type?o.enqueue({type:"source",sourceType:"url",id:null!=(V=null==(k=(G=u.config).generateId)?void 0:k.call(G))?V:Ve(),url:q.annotation.url,title:q.annotation.title}):"file_citation"===q.annotation.type?o.enqueue({type:"source",sourceType:"document",id:null!=(j=null==(W=(H=u.config).generateId)?void 0:W.call(H))?j:Ve(),mediaType:"text/plain",title:q.annotation.filename,filename:q.annotation.filename,providerMetadata:{[s]:{type:q.annotation.type,fileId:q.annotation.file_id,index:q.annotation.index}}}):"container_file_citation"===q.annotation.type?o.enqueue({type:"source",sourceType:"document",id:null!=(Y=null==(U=(B=u.config).generateId)?void 0:U.call(B))?Y:Ve(),mediaType:"text/plain",title:q.annotation.filename,filename:q.annotation.filename,providerMetadata:{[s]:{type:q.annotation.type,fileId:q.annotation.file_id,containerId:q.annotation.container_id}}}):"file_path"===q.annotation.type&&o.enqueue({type:"source",sourceType:"document",id:null!=($=null==(K=(z=u.config).generateId)?void 0:K.call(z))?$:Ve(),mediaType:"application/octet-stream",title:q.annotation.file_id,filename:q.annotation.file_id,providerMetadata:{[s]:{type:q.annotation.type,fileId:q.annotation.file_id,index:q.annotation.index}}})):function(e){return"error"===e.type}(q)&&o.enqueue({type:"error",error:q})},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:Ho(d),providerMetadata:t})}})),request:{body:t},response:{headers:a}}}};function qo(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 Xo(e){return JSON.stringify(e).slice(1,-1)}var Qo=Et((()=>St(Gt.Ik({instructions:Gt.Yj().nullish(),speed:Gt.ai().min(.25).max(4).default(1).nullish()})))),Jo=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:n,language:i,providerOptions:s}){const a=[],l=await At({provider:"openai",providerOptions:s,schema:Qo}),u={model:this.modelId,input:e,voice:t,response_format:"mp3",speed:r,instructions:n};if(o&&(["mp3","opus","aac","flac","wav","pcm"].includes(o)?u.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&&(u[t]=o)}}return i&&a.push({type:"unsupported",feature:"language",details:`OpenAI speech models do not support language selection. Language parameter "${i}" was ignored.`}),{requestBody:u,warnings:a}}async doGenerate(e){var t,o,r;const n=null!=(r=null==(o=null==(t=this.config._internal)?void 0:t.currentDate)?void 0:o.call(t))?r:new Date,{requestBody:i,warnings:s}=await this.getArgs(e),{value:a,responseHeaders:l,rawValue:u}=await It({url:this.config.url({path:"/audio/speech",modelId:this.modelId}),headers:be(this.config.headers(),e.headers),body:i,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(n){throw new g({message:"Failed to read response as array buffer",url:t,requestBodyValues:o,statusCode:e.status,responseHeaders:r,responseBody:void 0,cause:n})}},abortSignal:e.abortSignal,fetch:this.config.fetch});return{audio:a,warnings:s,request:{body:JSON.stringify(i)},response:{timestamp:n,modelId:this.modelId,headers:l,body:u}}}},er=Et((()=>St(Gt.Ik({text:Gt.Yj(),language:Gt.Yj().nullish(),duration:Gt.ai().nullish(),words:Gt.YO(Gt.Ik({word:Gt.Yj(),start:Gt.ai(),end:Gt.ai()})).nullish(),segments:Gt.YO(Gt.Ik({id:Gt.ai(),seek:Gt.ai(),start:Gt.ai(),end:Gt.ai(),text:Gt.Yj(),tokens:Gt.YO(Gt.ai()),temperature:Gt.ai(),avg_logprob:Gt.ai(),compression_ratio:Gt.ai(),no_speech_prob:Gt.ai()})).nullish()})))),tr=Et((()=>St(Gt.Ik({include:Gt.YO(Gt.Yj()).optional(),language:Gt.Yj().optional(),prompt:Gt.Yj().optional(),temperature:Gt.ai().min(0).max(1).default(0).optional(),timestampGranularities:Gt.YO(Gt.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 At({provider:"openai",providerOptions:o,schema:tr}),n=new FormData,i=e instanceof Uint8Array?new Blob([e]):new Blob([Ae(e)]);n.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(n.append("file",new File([i],"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)n.append(`${t}[]`,String(e));else n.append(t,String(o))}return{formData:n,warnings:[]}}async doGenerate(e){var t,o,r,n,i,s,a,l;const u=null!=(r=null==(o=null==(t=this.config._internal)?void 0:t.currentDate)?void 0:o.call(t))?r:new Date,{formData:p,warnings:c}=await this.getArgs(e),{value:d,responseHeaders:h,rawValue:f}=await Nt({url:this.config.url({path:"/audio/transcriptions",modelId:this.modelId}),headers:be(this.config.headers(),e.headers),formData:p,failedResponseHandler:Wt,successfulResponseHandler:Ft(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==(n=d.segments)?void 0:n.map((e=>({text:e.text,startSecond:e.start,endSecond:e.end}))))?s:null==(i=d.words)?void 0:i.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:u,modelId:this.modelId,headers:h,body:f}}}},nr="3.0.9";function ir(e={}){var t,o;const r=null!=(t=null==(n=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:n.replace(/\/$/,""))?t:"https://api.openai.com/v1";var n;const i=null!=(o=e.name)?o:"openai",s=()=>Be({Authorization:`Bearer ${Ye({apiKey:e.apiKey,environmentVariableName:"OPENAI_API_KEY",description:"OpenAI"})}`,"OpenAI-Organization":e.organization,"OpenAI-Project":e.project,...e.headers},`ai-sdk/openai/${nr}`),a=t=>new io(t,{provider:`${i}.embedding`,url:({path:e})=>`${r}${e}`,headers:s,fetch:e.fetch}),l=t=>new uo(t,{provider:`${i}.image`,url:({path:e})=>`${r}${e}`,headers:s,fetch:e.fetch}),u=t=>new rr(t,{provider:`${i}.transcription`,url:({path:e})=>`${r}${e}`,headers:s,fetch:e.fetch}),p=t=>new Jo(t,{provider:`${i}.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 $o(t,{provider:`${i}.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 qt(t,{provider:`${i}.chat`,url:({path:e})=>`${r}${e}`,headers:s,fetch:e.fetch}),h.completion=t=>new oo(t,{provider:`${i}.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=u,h.transcriptionModel=u,h.speech=p,h.speechModel=p,h.tools=Vo,h}ir()},17189:function(e,t,o){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},r.apply(this,arguments)},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s,a=o(61146),l=n(o(96652)),u=o(36431),p=i(o(80572)),c=i(o(99627)),d=o(17642),h=o(41320),f=o(30345);(s=t.CellCompState||(t.CellCompState={}))[s.ShowValue=0]="ShowValue",s[s.EditValue=1]="EditValue",t.default=l.memo((function(e){var t=l.useContext(d.BeansContext).context,o=e.cellCtrl,n=e.printLayout,i=e.editingRow,s=l.useState(),g=s[0],m=s[1],y=l.useState(),v=y[0],C=y[1],w=l.useState(1),E=w[0],_=w[1],S=l.useState(),R=S[0],b=S[1],O=l.useState(),P=O[0],T=O[1],A=l.useState(),D=A[0],I=A[1],N=l.useState(),x=N[0],M=N[1],L=l.useState(),F=L[0],G=L[1],k=l.useState(),V=k[0],H=k[1],W=l.useState(!1),j=W[0],B=W[1],U=l.useState(!1),Y=U[0],z=U[1],K=l.useState(!1),$=K[0],q=K[1],Z=l.useState(),X=Z[0],Q=Z[1],J=l.useMemo((function(){return o.isForceWrapper()}),[]),ee=l.useRef(null),te=l.useRef(null),oe=l.useRef(),re=l.useRef(),ne=l.useRef(),ie=l.useState(0),se=ie[0],ae=ie[1],le=l.useCallback((function(e){ne.current=e,ae((function(e){return e+1}))}),[]),ue=l.useRef(),pe=l.useState(0),ce=pe[0],de=pe[1],he=l.useCallback((function(e){ue.current=e,de((function(e){return e+1}))}),[]),fe=J||null!=g&&(j||$||Y),ge=l.useCallback((function(e,t){re.current=t,t&&(function(e,t,o){var r=o.getColumn();if(!e&&t.isPopup&&t.isPopup()){var n="AG Grid: Found an issue in column "+r.getColId()+". If using React, specify an editor is a popup using colDef.cellEditorPopup=true. AG Grid React cannot depend on the editor component specifying if it's in a popup (via the isPopup() method on the editor), as React needs to know this information BEFORE the component is created.";a._.doOnce((function(){return console.warn(n)}),"jsEditorComp-isPopup-"+o.getColumn().getColId())}if(e&&t.getPopupPosition&&null!=t.getPopupPosition()){var i="AG Grid: Found an issue in column "+r.getColId()+". If using React, specify an editor popup position using colDef.cellEditorPopupPosition=true. AG Grid React cannot depend on the editor component specifying it's position (via the getPopupPosition() method on the editor), as React needs to know this information BEFORE the component is created.";a._.doOnce((function(){return console.warn(i)}),"jsEditorComp-getPopupPosition-"+o.getColumn().getColId())}}(e,t,o),t.isCancelBeforeStart&&t.isCancelBeforeStart()&&setTimeout((function(){return o.stopEditing()}),0))}),[]),me=l.useCallback((function(e){return ge(!0,e)}),[]),ye=l.useCallback((function(e){return ge(!1,e)}),[]),ve=l.useMemo((function(){return new a.CssClassManager((function(){return ee.current}))}),[]);c.default(g,fe,ue.current,ce,oe,ee);var Ce=l.useRef();l.useEffect((function(){var e=Ce.current,t=g;if(Ce.current=g,null!=e&&null!=e.compDetails&&null!=t&&null!=t.compDetails){var o=e.compDetails,r=t.compDetails;o.componentClass==r.componentClass&&null!=te.current&&null!=te.current.refresh&&1!=te.current.refresh(r.params)&&_((function(e){return e+1}))}}),[g]),l.useEffect((function(){var e;if(v&&!v.compDetails.componentFromFramework){var o=v.compDetails,r=!0===v.popup,n=h.createSyncJsComp(o);if(n){var i=n.getGui();return ge(r,n),r||(null===(e=(J?ne:ee).current)||void 0===e||e.appendChild(i),n.afterGuiAttached&&n.afterGuiAttached()),Q(n),function(){t.destroyBean(n),ge(r,void 0),Q(void 0),i&&i.parentElement&&i.parentElement.removeChild(i)}}}}),[v]),l.useEffect((function(){if(o&&t&&(I(ne.current?"cell-"+o.getInstanceId():void 0),ne.current&&fe)){var e=[],r=function(o){if(o){var r=o.getGui();ne.current.insertAdjacentElement("afterbegin",r),e.push((function(){t.destroyBean(o),a._.removeFromParent(r)}))}return o};return j&&r(o.createSelectionCheckbox()),$&&r(o.createDndSource()),Y&&r(o.createRowDragComp()),function(){return e.forEach((function(e){return e()}))}}}),[fe,$,Y,j,se]),f.useLayoutEffectOnce((function(){if(o){var e={addOrRemoveCssClass:function(e,t){return ve.addOrRemoveCssClass(e,t)},setUserStyles:function(e){return b(e)},getFocusableElement:function(){return ee.current},setTabIndex:function(e){return T(e)},setRole:function(e){return M(e)},setColId:function(e){return G(e)},setTitle:function(e){return H(e)},setIncludeSelection:function(e){return B(e)},setIncludeRowDrag:function(e){return z(e)},setIncludeDndSource:function(e){return q(e)},getCellEditor:function(){return re.current||null},getCellRenderer:function(){return te.current?te.current:oe.current},getParentOfValue:function(){return ue.current?ue.current:ne.current?ne.current:ee.current},setRenderDetails:function(e,t,o){m({value:t,compDetails:e,force:o})},setEditDetails:function(e,t,o){e?(C({compDetails:e,popup:t,popupPosition:o}),t||m(void 0)):C(void 0)}},t=ne.current||void 0;o.setComp(e,ee.current,t,n,i)}}));var we=l.useMemo((function(){return!!(g&&g.compDetails&&g.compDetails.componentFromFramework&&u.isComponentStateless(g.compDetails.componentClass))}),[g]);ee.current&&!fe&&ve.addOrRemoveCssClass("ag-cell-value",!fe);var Ee=l.useMemo((function(){return o.getInstanceId()}),[]),_e=function(){return l.default.createElement(l.default.Fragment,null,null!=g&&function(e,t,o,n,i,s,a){var u,p=e.compDetails,c=e.value,d=!p,h=p&&p.componentFromFramework,f=p&&p.componentClass,g=(null===(u=c)||void 0===u?void 0:u.toString)?c.toString():c,m=function(){return l.default.createElement(l.default.Fragment,null,d&&l.default.createElement(l.default.Fragment,null,g),h&&!s&&l.default.createElement(f,r({},p.params,{key:t,ref:n})),h&&s&&l.default.createElement(f,r({},p.params,{key:t})))};return l.default.createElement(l.default.Fragment,null,i?l.default.createElement("span",{role:"presentation",id:"cell-"+o,className:"ag-cell-value",ref:a},m()):m())}(g,E,Ee,te,fe,we,he),null!=v&&function(e,t,o,n,i,s){var a=e.compDetails,u=a.componentClass,c=a.componentFromFramework&&!e.popup,d=a.componentFromFramework&&e.popup,h=!a.componentFromFramework&&e.popup;return l.default.createElement(l.default.Fragment,null,c&&l.default.createElement(u,r({},e.compDetails.params,{ref:t})),d&&l.default.createElement(p.default,{editDetails:e,cellCtrl:i,eParentCell:n,wrappedContent:l.default.createElement(u,r({},e.compDetails.params,{ref:o}))}),h&&s&&l.default.createElement(p.default,{editDetails:e,cellCtrl:i,eParentCell:n,jsChildComp:s}))}(v,ye,me,ee.current,o,X))};return l.default.createElement("div",{ref:ee,style:R,tabIndex:P,role:x,"col-id":F,title:V,"aria-describedby":D},fe?l.default.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:le},_e()):_e())}))},17642:function(e,t,o){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=r(o(96652));t.BeansContext=n.default.createContext({})},18776: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,78,5,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,199,7,137,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,55,9,266,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,233,0,3,0,8,1,6,0,475,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,7,25,39,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,5,57,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,24,43,261,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,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,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,208,30,2,2,2,1,2,6,3,4,10,1,225,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,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],r="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",n={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"},i="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:i,"5module":i+" export import",6:i+" const class extends export import super"},a=/^in(stanceof)?$/,l=new RegExp("["+r+"]"),u=new RegExp("["+r+"‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");function p(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&&p(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&&u.test(String.fromCharCode(e)):!1!==r&&(p(e,o)||p(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 S(e,t,o){void 0===o&&(o=e.length);for(var r=t;r<o;r++){var n=e.charCodeAt(r);if(_(n))return r<o-1&&13===n&&10===e.charCodeAt(r+1)?r+2:r+1}return-1}var R=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,b=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,O=Object.prototype,P=O.hasOwnProperty,T=O.toString,A=Object.hasOwn||function(e,t){return P.call(e,t)},D=Array.isArray||function(e){return"[object Array]"===T.call(e)},I=Object.create(null);function N(e){return I[e]||(I[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function x(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}var M=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,L=function(e,t){this.line=e,this.column=t};L.prototype.offset=function(e){return new L(this.line,this.column+e)};var F=function(e,t,o){this.start=t,this.end=o,null!==e.sourceFile&&(this.source=e.sourceFile)};function G(e,t){for(var o=1,r=0;;){var n=S(e,r,t);if(n<0)return new L(o,t-r);++o,r=n}}var k={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 H(e){var t={};for(var o in k)t[o]=e&&A(e,o)?e[o]:k[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),D(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}if(D(t.onComment)&&(t.onComment=function(e,t){return function(o,r,n,i,s,a){var l={type:o?"Block":"Line",value:r,start:n,end:i};e.locations&&(l.loc=new F(this,s,a)),e.ranges&&(l.range=[n,i]),t.push(l)}}(t,t.onComment)),"commonjs"===t.sourceType&&t.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}var W=256,j=259;function B(e,t){return 2|(e?4:0)|(t?8:0)}var U=function(e,t,o){this.options=e=H(e),this.sourceFile=e.sourceFile,this.keywords=N(s[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var r="";!0!==e.allowReserved&&(r=n[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(r+=" await")),this.reservedWords=N(r);var i=(r?r+" ":"")+n.strict;this.reservedWordsStrict=N(i),this.reservedWordsStrictBind=N(i+" "+n.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("commonjs"===this.options.sourceType?2:1),this.regexpState=null,this.privateNameStack=[]},Y={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};U.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},Y.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},Y.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},Y.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},Y.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},Y.allowReturn.get=function(){return!!this.inFunction||!!(this.options.allowReturnOutsideFunction&&1&this.currentVarScope().flags)},Y.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},Y.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},Y.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Y.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},Y.allowUsing.get=function(){var e=this.currentScope().flags;return!(1024&e||!this.inModule&&1&e)},Y.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,Y);var z=U.prototype,K=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;z.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){b.lastIndex=e,e+=b.exec(this.input)[0].length;var t=K.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2])){b.lastIndex=e+t[0].length;var o=b.exec(this.input),r=o.index+o[0].length,n=this.input.charAt(r);return";"===n||"}"===n||w.test(o[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(n)||"!"===n&&"="===this.input.charAt(r+1))}e+=t[0].length,b.lastIndex=e,e+=b.exec(this.input)[0].length,";"===this.input[e]&&e++}},z.eat=function(e){return this.type===e&&(this.next(),!0)},z.isContextual=function(e){return this.type===C.name&&this.value===e&&!this.containsEsc},z.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},z.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},z.canInsertSemicolon=function(){return this.type===C.eof||this.type===C.braceR||w.test(this.input.slice(this.lastTokEnd,this.start))},z.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},z.semicolon=function(){this.eat(C.semi)||this.insertSemicolon()||this.unexpected()},z.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},z.expect=function(e){this.eat(e)||this.unexpected()},z.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var $=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};z.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")}},z.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")},z.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")},z.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var q=U.prototype;q.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,n=Object.keys(this.undefinedExports);r<n.length;r+=1){var i=n[r];this.raiseRecoverable(this.undefinedExports[i].start,"Export '"+i+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType="commonjs"===this.options.sourceType?"script":this.options.sourceType,this.finishNode(e,"Program")};var Z={kind:"loop"},X={kind:"switch"};q.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;b.lastIndex=this.pos;var t=b.exec(this.input),o=this.pos+t[0].length,r=this.fullCharCodeAt(o);if(91===r||92===r)return!0;if(e)return!1;if(123===r)return!0;if(c(r)){var n=o;do{o+=r<=65535?1:2}while(d(r=this.fullCharCodeAt(o)));if(92===r)return!0;var i=this.input.slice(n,o);if(!a.test(i))return!0}return!1},q.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;b.lastIndex=this.pos;var e,t=b.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.fullCharCodeAt(o+8))||92===e))},q.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;b.lastIndex=this.pos;var o=b.exec(this.input),r=this.pos+o[0].length;if(w.test(this.input.slice(this.pos,r)))return!1;if(e){var n,i=r+5;if("using"!==this.input.slice(r,i)||i===this.input.length||d(n=this.fullCharCodeAt(i))||92===n)return!1;b.lastIndex=i;var s=b.exec(this.input);if(r=i+s[0].length,s&&w.test(this.input.slice(i,r)))return!1}var l=this.fullCharCodeAt(r);if(!c(l)&&92!==l)return!1;var u=r;do{r+=l<=65535?1:2}while(d(l=this.fullCharCodeAt(r)));if(92===l)return!0;var p=this.input.slice(u,r);return!(a.test(p)||t&&"of"===p)},q.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},q.isUsing=function(e){return this.isUsingKeyword(!1,e)},q.parseStatement=function(e,t,o){var r,n=this.type,i=this.startNode();switch(this.isLet(e)&&(n=C._var,r="let"),n){case C._break:case C._continue:return this.parseBreakContinueStatement(i,n.keyword);case C._debugger:return this.parseDebuggerStatement(i);case C._do:return this.parseDoStatement(i);case C._for:return this.parseForStatement(i);case C._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case C._class:return e&&this.unexpected(),this.parseClass(i,!0);case C._if:return this.parseIfStatement(i);case C._return:return this.parseReturnStatement(i);case C._switch:return this.parseSwitchStatement(i);case C._throw:return this.parseThrowStatement(i);case C._try:return this.parseTryStatement(i);case C._const:case C._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(i,r);case C._while:return this.parseWhileStatement(i);case C._with:return this.parseWithStatement(i);case C.braceL:return this.parseBlock(!0,i);case C.semi:return this.parseEmptyStatement(i);case C._export:case C._import:if(this.options.ecmaVersion>10&&n===C._import){b.lastIndex=this.pos;var s=b.exec(this.input),a=this.pos+s[0].length,l=this.input.charCodeAt(a);if(40===l||46===l)return this.parseExpressionStatement(i,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'")),n===C._import?this.parseImport(i):this.parseExport(i,o);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var u=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(u)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),"await using"===u&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(i,!1,u),this.semicolon(),this.finishNode(i,"VariableDeclaration");var p=this.value,c=this.parseExpression();return n===C.name&&"Identifier"===c.type&&this.eat(C.colon)?this.parseLabeledStatement(i,p,c,e):this.parseExpressionStatement(i,c)}},q.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 n=this.labels[r];if(null==e.label||n.name===e.label.name){if(null!=n.kind&&(o||"loop"===n.kind))break;if(e.label&&o)break}}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,o?"BreakStatement":"ContinueStatement")},q.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},q.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")},q.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(),n=o?"let":this.value;return this.next(),this.parseVar(r,!0,n),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(e,r,t)}var i=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.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(l,!0,a),this.finishNode(l,"VariableDeclaration"),this.parseForAfterInit(e,l,t)}var u=this.containsEsc,p=new $,c=this.start,d=t>-1?this.parseExprSubscripts(p,"await"):this.parseExpression(!0,p);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||u||"Identifier"!==d.type||"async"!==d.name?this.options.ecmaVersion>=9&&(e.await=!1):this.unexpected()),i&&s&&this.raise(d.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(d,!1,p),this.checkLValPattern(d),this.parseForIn(e,d)):(this.checkExpressionErrors(p,!0),t>-1&&this.unexpected(t),this.parseFor(e,d))},q.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))},q.parseFunctionStatement=function(e,t,o){return this.next(),this.parseFunction(e,J|(o?0:ee),!1,t)},q.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")},q.parseReturnStatement=function(e){return this.allowReturn||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")},q.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(C.braceL),this.labels.push(X),this.enterScope(1024);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")},q.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=[];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},q.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")},q.parseVarStatement=function(e,t,o){return this.next(),this.parseVar(e,!1,t,o),this.semicolon(),this.finishNode(e,"VariableDeclaration")},q.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")},q.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")},q.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},q.parseLabeledStatement=function(e,t,o,r){for(var n=0,i=this.labels;n<i.length;n+=1)i[n].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")},q.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},q.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")},q.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")},q.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")},q.parseVar=function(e,t,o,r){for(e.declarations=[],e.kind=o;;){var n=this.startNode();if(this.parseVarId(n,o),this.eat(C.eq)?n.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"===n.id.type||t&&(this.type===C._in||this.isContextual("of"))?n.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(n,"VariableDeclarator")),!this.eat(C.comma))break}return e},q.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 J=1,ee=2;function te(e,t){var o=t.key.name,r=e[o],n="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(n=(t.static?"s":"i")+t.kind),"iget"===r&&"iset"===n||"iset"===r&&"iget"===n||"sget"===r&&"sset"===n||"sset"===r&&"sget"===n?(e[o]="true",!1):!!r||(e[o]=n,!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)}q.parseFunction=function(e,t,o,r,n){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&J&&(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 i=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&J||(e.id=this.type===C.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,o,!1,n),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(e,t&J?"FunctionDeclaration":"FunctionExpression")},q.parseFunctionParams=function(e){this.expect(C.parenL),e.params=this.parseBindingList(C.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},q.parseClass=function(e,t){this.next();var o=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),n=this.startNode(),i=!1;for(n.body=[],this.expect(C.braceL);this.type!==C.braceR;){var s=this.parseClassElement(null!==e.superClass);s&&(n.body.push(s),"MethodDefinition"===s.type&&"constructor"===s.kind?(i&&this.raiseRecoverable(s.start,"Duplicate constructor in the same class"),i=!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(n,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},q.parseClassElement=function(e){if(this.eat(C.semi))return null;var t=this.options.ecmaVersion,o=this.startNode(),r="",n=!1,i=!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":i=!0),!r&&(t>=9||!i)&&this.eat(C.star)&&(n=!0),!r&&!i&&!n){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||n||i){var u=!o.static&&oe(o,"constructor"),p=u&&e;u&&"method"!==s&&this.raise(o.key.start,"Constructor can't have get/set modifier"),o.kind=u?"constructor":s,this.parseClassMethod(o,n,i,p)}else this.parseClassField(o);return o},q.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},q.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)},q.parseClassMethod=function(e,t,o,r){var n=e.key;"constructor"===e.kind?(t&&this.raise(n.start,"Constructor can't be a generator"),o&&this.raise(n.start,"Constructor can't be an async method")):e.static&&oe(e,"prototype")&&this.raise(n.start,"Classes may not have a static property named prototype");var i=e.value=this.parseMethod(t,o,r);return"get"===e.kind&&0!==i.params.length&&this.raiseRecoverable(i.start,"getter should have no params"),"set"===e.kind&&1!==i.params.length&&this.raiseRecoverable(i.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===i.params[0].type&&this.raiseRecoverable(i.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},q.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")},q.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")},q.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)},q.parseClassSuper=function(e){e.superClass=this.eat(C._extends)?this.parseExprSubscripts(null,!1):null},q.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},q.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,o=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,n=0===r?null:this.privateNameStack[r-1],i=0;i<o.length;++i){var s=o[i];A(t,s.name)||(n?n.used.push(s):this.raiseRecoverable(s.start,"Private field '#"+s.name+"' must be declared in an enclosing class"))}},q.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")},q.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 n=r[o];this.checkUnreserved(n.local),this.checkLocalExport(n.local),"Literal"===n.local.type&&this.raise(n.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")},q.parseExportDeclaration=function(e){return this.parseStatement(null)},q.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|J,!1,e)}if(this.type===C._class){var o=this.startNode();return this.parseClass(o,"nullableID")}var r=this.parseMaybeAssign();return this.semicolon(),r},q.checkExport=function(e,t,o){e&&("string"!=typeof t&&(t="Identifier"===t.type?t.name:t.value),A(e,t)&&this.raiseRecoverable(o,"Duplicate export '"+t+"'"),e[t]=!0)},q.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,n=t.properties;r<n.length;r+=1){var i=n[r];this.checkPatternExport(e,i)}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)},q.checkVariableExport=function(e,t){if(e)for(var o=0,r=t;o<r.length;o+=1){var n=r[o];this.checkPatternExport(e,n.id)}},q.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},q.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")},q.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},q.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")},q.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")},q.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportDefaultSpecifier")},q.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")},q.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},q.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(),n="Identifier"===r.key.type?r.key.name:r.key.value;A(t,n)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+n+"'"),t[n]=!0,e.push(r)}return e},q.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")},q.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===C.string){var e=this.parseLiteral(this.value);return M.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},q.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)},q.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,n=e.properties;r<n.length;r+=1){var i=n[r];this.toAssignable(i,t),"RestElement"!==i.type||"ArrayPattern"!==i.argument.type&&"ObjectPattern"!==i.argument.type||this.raise(i.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 n=e[r];n&&this.toAssignable(n,t)}if(o){var i=e[o-1];6===this.options.ecmaVersion&&t&&i&&"RestElement"===i.type&&"Identifier"!==i.argument.type&&this.unexpected(i.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 n=[],i=!0;!this.eat(e);)if(i?i=!1:this.expect(C.comma),t&&this.type===C.comma)n.push(null);else{if(o&&this.afterTrailingComma(e))break;if(this.type===C.ellipsis){var s=this.parseRestBinding();this.parseBindingListItem(s),n.push(s),this.type===C.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}n.push(this.parseAssignableListItem(r))}return n},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&&(A(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,n=e.properties;r<n.length;r+=1){var i=n[r];this.checkLValInnerPattern(i,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 ne=function(e,t,o,r,n){this.token=e,this.isExpr=!!t,this.preserveSpace=!!o,this.override=r,this.generator=!!n},ie={b_stat:new ne("{",!1),b_expr:new ne("{",!0),b_tmpl:new ne("${",!1),p_stat:new ne("(",!1),p_expr:new ne("(",!0),q_tmpl:new ne("`",!0,!0,(function(e){return e.tryReadTemplateToken()})),f_stat:new ne("function",!1),f_expr:new ne("function",!0),f_expr_gen:new ne("function",!0,!1,null,!0),f_gen:new ne("function",!1,!1,null,!0)},se=U.prototype;se.initialContext=function(){return[ie.b_stat]},se.curContext=function(){return this.context[this.context.length-1]},se.braceIsBlock=function(e){var t=this.curContext();return t===ie.f_expr||t===ie.f_stat||(e!==C.colon||t!==ie.b_stat&&t!==ie.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===ie.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===ie.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)?ie.b_stat:ie.b_expr),this.exprAllowed=!0},C.dollarBraceL.updateContext=function(){this.context.push(ie.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?ie.p_stat:ie.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()!==ie.p_stat||e===C._return&&w.test(this.input.slice(this.lastTokEnd,this.start))||(e===C.colon||e===C.braceL)&&this.curContext()===ie.b_stat?this.context.push(ie.f_stat):this.context.push(ie.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()===ie.q_tmpl?this.context.pop():this.context.push(ie.q_tmpl),this.exprAllowed=!1},C.star.updateContext=function(e){if(e===C._function){var t=this.context.length-1;this.context[t]===ie.f_expr?this.context[t]=ie.f_expr_gen:this.context[t]=ie.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 ue(e){return"MemberExpression"===e.type&&"PrivateIdentifier"===e.property.type||"ChainExpression"===e.type&&ue(e.expression)||"ParenthesizedExpression"===e.type&&ue(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,n=e.key;switch(n.type){case"Identifier":r=n.name;break;case"Literal":r=String(n.value);break;default:return}var i=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===r&&"init"===i&&(t.proto&&(o?o.doubleProto<0&&(o.doubleProto=n.start):this.raiseRecoverable(n.start,"Redefinition of __proto__ property")),t.proto=!0);else{var s=t[r="$"+r];s?("init"===i?this.strict&&s.init||s.get||s.set:s.init||s[i])&&this.raiseRecoverable(n.start,"Redefinition of property"):s=t[r]={init:!1,get:!1,set:!1},s[i]=!0}}},ae.parseExpression=function(e,t){var o=this.start,r=this.startLoc,n=this.parseMaybeAssign(e,t);if(this.type===C.comma){var i=this.startNodeAt(o,r);for(i.expressions=[n];this.eat(C.comma);)i.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(i,"SequenceExpression")}return n},ae.parseMaybeAssign=function(e,t,o){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,n=-1,i=-1,s=-1;t?(n=t.parenthesizedAssign,i=t.trailingComma,s=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new $,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 u=this.parseMaybeConditional(e,t);if(o&&(u=o.call(this,u,a,l)),this.type.isAssign){var p=this.startNodeAt(a,l);return p.operator=this.value,this.type===C.eq&&(u=this.toAssignable(u,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=u.start&&(t.shorthandAssign=-1),this.type===C.eq?this.checkLValPattern(u):this.checkLValSimple(u),p.left=u,this.next(),p.right=this.parseMaybeAssign(e),s>-1&&(t.doubleProto=s),this.finishNode(p,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),n>-1&&(t.parenthesizedAssign=n),i>-1&&(t.trailingComma=i),u},ae.parseMaybeConditional=function(e,t){var o=this.start,r=this.startLoc,n=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return n;if(this.eat(C.question)){var i=this.startNodeAt(o,r);return i.test=n,i.consequent=this.parseMaybeAssign(),this.expect(C.colon),i.alternate=this.parseMaybeAssign(e),this.finishNode(i,"ConditionalExpression")}return n},ae.parseExprOps=function(e,t){var o=this.start,r=this.startLoc,n=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||n.start===o&&"ArrowFunctionExpression"===n.type?n:this.parseExprOp(n,o,r,-1,e)},ae.parseExprOp=function(e,t,o,r,n){var i=this.type.binop;if(null!=i&&(!n||this.type!==C._in)&&i>r){var s=this.type===C.logicalOR||this.type===C.logicalAND,a=this.type===C.coalesce;a&&(i=C.logicalAND.binop);var l=this.value;this.next();var u=this.start,p=this.startLoc,c=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,n),u,p,i,n),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,n)}return e},ae.buildBinary=function(e,t,o,r,n,i){"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=n,s.right=r,this.finishNode(s,i?"LogicalExpression":"BinaryExpression")},ae.parseMaybeUnary=function(e,t,o,r){var n,i=this.start,s=this.startLoc;if(this.isContextual("await")&&this.canAwait)n=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&&ue(a.argument)?this.raiseRecoverable(a.start,"Private fields can not be deleted"):t=!0,n=this.finishNode(a,l?"UpdateExpression":"UnaryExpression")}else if(t||this.type!==C.privateId){if(n=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var u=this.startNodeAt(i,s);u.operator=this.value,u.prefix=!1,u.argument=n,this.checkLValSimple(n),this.next(),n=this.finishNode(u,"UpdateExpression")}}else(r||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),n=this.parsePrivateIdent(),this.type!==C._in&&this.unexpected();return o||!this.eat(C.starstar)?n:t?void this.unexpected(this.lastTokStart):this.buildBinary(i,s,n,this.parseMaybeUnary(null,!1,!1,r),"**",!1)},ae.parseExprSubscripts=function(e,t){var o=this.start,r=this.startLoc,n=this.parseExprAtom(e,t);if("ArrowFunctionExpression"===n.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return n;var i=this.parseSubscripts(n,o,r,!1,t);return e&&"MemberExpression"===i.type&&(e.parenthesizedAssign>=i.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=i.start&&(e.parenthesizedBind=-1),e.trailingComma>=i.start&&(e.trailingComma=-1)),i},ae.parseSubscripts=function(e,t,o,r,n){for(var i=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,i,s,n);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,n,i,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 u=this.eat(C.bracketL);if(u||l&&this.type!==C.parenL&&this.type!==C.backQuote||this.eat(C.dot)){var p=this.startNodeAt(t,o);p.object=e,u?(p.property=this.parseExpression(),this.expect(C.bracketR)):this.type===C.privateId&&"Super"!==e.type?p.property=this.parsePrivateIdent():p.property=this.parseIdent("never"!==this.options.allowReserved),p.computed=!!u,a&&(p.optional=l),e=this.finishNode(p,"MemberExpression")}else if(!r&&this.eat(C.parenL)){var c=new $,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(n&&!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||i)&&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,n=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 i=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(ie.f_expr),this.parseFunction(this.startNodeAt(i,s),0,!1,!0,t);if(n&&!this.canInsertSemicolon()){if(this.eat(C.arrow))return this.parseArrowExpression(this.startNodeAt(i,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(i,s),[l],!0,t)}return l;case C.regexp:var u=this.value;return(r=this.parseLiteral(u.value)).regex={pattern:u.pattern,flags:u.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 p=this.start,c=this.parseParenAndDistinguishExpression(n,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(c)&&(e.parenthesizedAssign=p),e.parenthesizedBind<0&&(e.parenthesizedBind=p)),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(ie.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,n=this.startLoc,i=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s,a=this.start,l=this.startLoc,u=[],p=!0,c=!1,d=new $,h=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==C.parenR;){if(p?p=!1:this.expect(C.comma),i&&this.afterTrailingComma(C.parenR,!0)){c=!0;break}if(this.type===C.ellipsis){s=this.start,u.push(this.parseParenItem(this.parseRestBinding())),this.type===C.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}u.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var g=this.lastTokEnd,m=this.lastTokEndLoc;if(this.expect(C.parenR),e&&this.shouldParseArrow(u)&&this.eat(C.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=h,this.awaitPos=f,this.parseParenArrowList(r,n,u,t);u.length&&!c||this.unexpected(this.lastTokStart),s&&this.unexpected(s),this.checkExpressionErrors(d,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=f||this.awaitPos,u.length>1?((o=this.startNodeAt(a,l)).expressions=u,this.finishNodeAt(o,"SequenceExpression",g,m)):o=u[0]}else o=this.parseParenExpression();if(this.options.preserveParens){var y=this.startNodeAt(r,n);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 pe=[];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,n=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,n,!0,!1),this.eat(C.parenL)?e.arguments=this.parseExprList(C.parenR,this.options.ecmaVersion>=8,!1):e.arguments=pe,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,n={};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 i=this.parseProperty(e,t);e||this.checkPropClash(i,n,t),o.properties.push(i)}return this.finishNode(o,e?"ObjectPattern":"ObjectExpression")},ae.parseProperty=function(e,t){var o,r,n,i,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)&&(n=this.start,i=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,n,i,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,n,i,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=n),t?e.value=this.parseMaybeDefault(n,i,this.copyNode(e.key)):this.type===C.eq&&s?(s.shorthandAssign<0&&(s.shorthandAssign=this.start),e.value=this.parseMaybeDefault(n,i,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(),n=this.yieldPos,i=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=n,this.awaitPos=i,this.awaitIdentPos=s,this.finishNode(r,"FunctionExpression")},ae.parseArrowExpression=function(e,t,o,r){var n=this.yieldPos,i=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=n,this.awaitPos=i,this.awaitIdentPos=s,this.finishNode(e,"ArrowFunctionExpression")},ae.parseFunctionBody=function(e,t,o,r){var n=t&&this.type!==C.braceL,i=this.strict,s=!1;if(n)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);i&&!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,!i&&!s&&!t&&!o&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,5),e.body=this.parseBlock(!1,void 0,s&&!i),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,n=e.params;r<n.length;r+=1){var i=n[r];this.checkLValInnerPattern(i,1,t?null:o)}},ae.parseExprList=function(e,t,o,r){for(var n=[],i=!0;!this.eat(e);){if(i)i=!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),n.push(s)}return n},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&j||"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=G(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 L(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 n=this.currentScope();r=n.lexical.indexOf(e)>-1||n.functions.indexOf(e)>-1||n.var.indexOf(e)>-1,n.lexical.push(e),this.inModule&&1&n.flags&&delete this.undefinedExports[e]}else if(4===t)this.currentScope().lexical.push(e);else if(3===t){var i=this.currentScope();r=this.treatFunctionsAsVar?i.lexical.indexOf(e)>-1:i.lexical.indexOf(e)>-1||i.var.indexOf(e)>-1,i.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&j)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 F(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},Se={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",be="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=be+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Pe=Oe+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Te=Pe+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Ae=Te+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",De={9:be,10:Oe,11:Pe,12:Te,13:Ae,14:Ae+" Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz"},Ie={};for(var Ne=0,xe=[9,10,11,12,13,14];Ne<xe.length;Ne+=1)ve=void 0,(ve=Ie[ye=xe[Ne]]={binary:N(_e[ye]+" "+Re),binaryOfStrings:N(Se[ye]),nonBinary:{General_Category:N(Re),Script:N(De[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 Me=U.prototype,Le=function(e,t){this.parent=e,this.base=t||this};Le.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},Le.prototype.sibling=function(){return new Le(this.parent,this.base)};var Fe=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=Ie[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 Ge(e){return 105===e||109===e||115===e}function ke(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}Fe.prototype.reset=function(e,t,o){var r=-1!==o.indexOf("v"),n=-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=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)},Fe.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},Fe.prototype.at=function(e,t){void 0===t&&(t=!1);var o=this.source,r=o.length;if(e>=r)return-1;var n=o.charCodeAt(e);if(!t&&!this.switchU||n<=55295||n>=57344||e+1>=r)return n;var i=o.charCodeAt(e+1);return i>=56320&&i<=57343?(n<<10)+i-56613888:n},Fe.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var o=this.source,r=o.length;if(e>=r)return r;var n,i=o.charCodeAt(e);return!t&&!this.switchU||i<=55295||i>=57344||e+1>=r||(n=o.charCodeAt(e+1))<56320||n>57343?e+1:e+2},Fe.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},Fe.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},Fe.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},Fe.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},Fe.prototype.eatChars=function(e,t){void 0===t&&(t=!1);for(var o=this.pos,r=0,n=e;r<n.length;r+=1){var i=n[r],s=this.at(o,t);if(-1===s||s!==i)return!1;o=this.nextIndex(o,t)}return this.pos=o,!0},Me.validateRegExpFlags=function(e){for(var t=e.validFlags,o=e.flags,r=!1,n=!1,i=0;i<o.length;i++){var s=o.charAt(i);-1===t.indexOf(s)&&this.raise(e.start,"Invalid regular expression flag"),o.indexOf(s,i+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),"u"===s&&(r=!0),"v"===s&&(n=!0)}this.options.ecmaVersion>=15&&r&&n&&this.raise(e.start,"Invalid regular expression flag")},Me.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))},Me.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")}},Me.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new Le(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")},Me.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},Me.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)},Me.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},Me.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},Me.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},Me.regexp_eatBracedQuantifier=function(e,t){var o=e.pos;if(e.eat(123)){var r=0,n=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(n=e.lastIntValue),e.eat(125)))return-1!==n&&n<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=o}return!1},Me.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)},Me.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},Me.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 n=0;n<o.length;n++){var i=o.charAt(n);o.indexOf(i,n+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},Me.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},Me.regexp_eatModifiers=function(e){for(var t="",o=0;-1!==(o=e.current())&&Ge(o);)t+=x(o),e.advance();return t},Me.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)},Me.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},Me.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!ke(t)&&(e.lastIntValue=t,e.advance(),!0)},Me.regexp_eatPatternCharacters=function(e){for(var t=e.pos,o=0;-1!==(o=e.current())&&!ke(o);)e.advance();return e.pos!==t},Me.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))},Me.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,n=o;r<n.length;r+=1)n[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}},Me.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},Me.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=x(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=x(e.lastIntValue);return!0}return!1},Me.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)},Me.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)},Me.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)},Me.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},Me.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},Me.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)},Me.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},Me.regexp_eatZero=function(e){return 48===e.current()&&!je(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},Me.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)},Me.regexp_eatControlLetter=function(e){var t=e.current();return!!Ve(t)&&(e.lastIntValue=t%32,e.advance(),!0)},Me.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var o,r=e.pos,n=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(n&&i>=55296&&i<=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*(i-55296)+(a-56320)+65536,!0}e.pos=s,e.lastIntValue=i}return!0}if(n&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&((o=e.lastIntValue)>=0&&o<=1114111))return!0;n&&e.raise("Invalid unicode escape"),e.pos=r}return!1},Me.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))},Me.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 He(e){return Ve(e)||95===e}function We(e){return He(e)||je(e)}function je(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 Ye(e){return e>=48&&e<=55}Me.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},Me.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 n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,n)}return 0},Me.regexp_validateUnicodePropertyNameAndValue=function(e,t,o){A(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(o)||e.raise("Invalid property value")},Me.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")},Me.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";He(t=e.current());)e.lastStringValue+=x(t),e.advance();return""!==e.lastStringValue},Me.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";We(t=e.current());)e.lastStringValue+=x(t),e.advance();return""!==e.lastStringValue},Me.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},Me.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},Me.regexp_classContents=function(e){return 93===e.current()?1:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),1)},Me.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")}}},Me.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||Ye(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)},Me.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)},Me.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)}},Me.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},Me.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?1:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},Me.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 n=this.regexp_eatCharacterClassEscape(e);if(n)return n;e.pos=t}return null},Me.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},Me.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)2===this.regexp_classString(e)&&(t=2);return t},Me.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return 1===t?1:2},Me.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))},Me.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)},Me.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!je(t)&&95!==t||(e.lastIntValue=t%32,e.advance(),0))},Me.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},Me.regexp_eatDecimalDigits=function(e){var t=e.pos,o=0;for(e.lastIntValue=0;je(o=e.current());)e.lastIntValue=10*e.lastIntValue+(o-48),e.advance();return e.pos!==t},Me.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},Me.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},Me.regexp_eatOctalDigit=function(e){var t=e.current();return Ye(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},Me.regexp_eatFixedHexDigits=function(e,t){var o=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var n=e.current();if(!Be(n))return e.pos=o,!1;e.lastIntValue=16*e.lastIntValue+Ue(n),e.advance()}return!0};var ze=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new F(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},Ke=U.prototype;function $e(e){return"function"!=typeof BigInt?null:BigInt(e.replace(/_/g,""))}Ke.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 ze(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Ke.getToken=function(){return this.next(),new ze(this)},"undefined"!=typeof Symbol&&(Ke[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===C.eof,value:t}}}}),Ke.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())},Ke.readToken=function(e){return c(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},Ke.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var o=this.input.charCodeAt(e+1);return o<=56319||o>=57344?t:(t<<10)+o-56613888},Ke.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},Ke.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,n=t;(r=S(this.input,n,this.pos))>-1;)++this.curLine,n=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,o),t,this.pos,e,this.curPosition())},Ke.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())},Ke.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}}},Ke.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)},Ke.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))},Ke.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)},Ke.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)},Ke.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)},Ke.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(C.assign,2):this.finishOp(C.bitwiseXOR,1)},Ke.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)},Ke.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())},Ke.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)},Ke.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)},Ke.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 '"+x(e)+"'")},Ke.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 '"+x(e)+"'")},Ke.finishOp=function(e,t){var o=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,o)},Ke.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 n=this.input.slice(o,this.pos);++this.pos;var i=this.pos,s=this.readWord1();this.containsEsc&&this.unexpected(i);var a=this.regexpState||(this.regexpState=new Fe(this));a.reset(o,n,s),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var l=null;try{l=new RegExp(n,s)}catch(e){}return this.finishToken(C.regexp,{pattern:n,flags:s,value:l})},Ke.readInt=function(e,t,o){for(var r=this.options.ecmaVersion>=12&&void 0===t,n=o&&48===this.input.charCodeAt(this.pos),i=this.pos,s=0,a=0,l=0,u=null==t?1/0:t;l<u;++l,++this.pos){var p=this.input.charCodeAt(this.pos),c=void 0;if(r&&95===p)n&&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=p;else{if((c=p>=97?p-97+10:p>=65?p-65+10:p>=48&&p<=57?p-48:1/0)>=e)break;a=p,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===i||null!=t&&this.pos-i!==t?null:s},Ke.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=$e(this.input.slice(t,this.pos)),++this.pos):c(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(C.num,o)},Ke.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 n=$e(this.input.slice(t,this.pos));return++this.pos,c(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(C.num,n)}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 i,s=(i=this.input.slice(t,this.pos),o?parseInt(i,8):parseFloat(i.replace(/_/g,"")));return this.finishToken(C.num,s)},Ke.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},Ke.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 qe={};Ke.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==qe)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Ke.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw qe;this.raise(e,t)},Ke.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}},Ke.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")},Ke.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 x(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],n=parseInt(r,8);return n>255&&(r=r.slice(0,-1),n=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(n)}return _(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}},Ke.readHexChar=function(e){var t=this.pos,o=this.readInt(16,e);return null===o&&this.invalidStringToken(t,"Bad character escape sequence"),o},Ke.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,o=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var n=this.fullCharCodeAtPos();if(d(n,r))this.pos+=n<=65535?1:2;else{if(92!==n)break;this.containsEsc=!0,e+=this.input.slice(o,this.pos);var i=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(i,"Invalid Unicode escape"),e+=x(s),o=this.pos}t=!1}return e+this.input.slice(o,this.pos)},Ke.readWord=function(){var e=this.readWord1(),t=C.name;return this.keywords.test(e)&&(t=y[e]),this.finishToken(t,e)};var Ze="8.16.0";U.acorn={Parser:U,version:Ze,defaultOptions:k,Position:L,SourceLocation:F,getLineInfo:G,Node:fe,TokenType:h,tokTypes:C,keywordTypes:y,TokContext:ne,tokContexts:ie,isIdentifierChar:d,isIdentifierStart:c,Token:ze,isNewLine:_,lineBreak:w,lineBreakG:E,nonASCIIwhitespace:R},e.Node=fe,e.Parser=U,e.Position=L,e.SourceLocation=F,e.TokContext=ne,e.Token=ze,e.TokenType=h,e.defaultOptions=k,e.getLineInfo=G,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=ie,e.tokTypes=C,e.tokenizer=function(e,t){return U.tokenizer(e,t)},e.version=Ze}(t)},19812:function(e,t,o){var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,o=arguments.length;t<o;t++)e+=arguments[t].length;var r=Array(e),n=0;for(t=0;t<o;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,n++)r[n]=i[s];return r},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(61146),a=n(o(96652)),l=o(36431),u=i(o(32756)),p=i(o(45013)),c=o(17642),d=o(30345);t.default=a.memo((function(e){var t=a.useContext(c.BeansContext).context,o=a.useState(""),n=o[0],i=o[1],h=a.useState([]),f=h[0],g=h[1],m=a.useState([]),y=m[0],v=m[1],C=a.useState(!1),w=C[0],E=C[1],_=a.useState(""),S=_[0],R=_[1],b=e.name,O=a.useMemo((function(){return s.getRowContainerTypeForName(b)}),[b]),P=a.useRef(null),T=a.useRef(null),A=a.useRef(null),D=a.useMemo((function(){return s.RowContainerCtrl.getRowContainerCssClasses(b)}),[b]),I=a.useMemo((function(){return l.classesList(D.wrapper)}),[]),N=a.useMemo((function(){return l.classesList(D.viewport)}),[]),x=a.useMemo((function(){return l.classesList(D.container)}),[]),M=b===s.RowContainerName.CENTER,L=b===s.RowContainerName.TOP_CENTER||b===s.RowContainerName.BOTTOM_CENTER||b===s.RowContainerName.STICKY_TOP_CENTER,F=!M&&!L,G=M?P:L?T:A;u.default(" AG Row Container "+b+" ",G),a.useEffect((function(){g((function(e){if(w)return y;var t=e.filter((function(e){return y.indexOf(e)>=0})),o=y.filter((function(e){return t.indexOf(e)<0}));return r(t,o)}))}),[w,y]),d.useEffectOnce((function(){var e=[],o={setViewportHeight:i,setRowCtrls:function(e){return v(e)},setDomOrder:function(e){return E(e)},setContainerWidth:function(e){return R(e)}},r=t.createBean(new s.RowContainerCtrl(b));return e.push(r),r.setComp(o,A.current,T.current,P.current),function(){t.destroyBeans(e)}}));var k=a.useMemo((function(){return{height:n}}),[n]),V=a.useMemo((function(){return{width:S}}),[S]),H=function(){return a.default.createElement("div",{className:x,ref:A,role:y.length?"rowgroup":"presentation",style:V},f.map((function(e){return a.default.createElement(p.default,{rowCtrl:e,containerType:O,key:e.getInstanceId()})})))};return a.default.createElement(a.default.Fragment,null,M&&a.default.createElement("div",{className:I,ref:P,role:"presentation"},a.default.createElement("div",{className:N,ref:T,role:"presentation",style:k},H())),L&&a.default.createElement("div",{className:N,ref:T,role:"presentation",style:k},H()),F&&H())}))},20142:function(e,t,o){var r,n=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)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var l=o(61146),u=s(o(75342)),p=a(o(96652)),c=o(69829),d=o(60372),h=o(24004),f=o(41612),g=o(885),m=o(98206),y=function(e){function t(t){var o=e.call(this,t)||this;return o.props=t,o.changeDetectionService=new h.ChangeDetectionService,o.api=null,o.destroyed=!1,o.SYNCHRONOUS_CHANGE_PROPERTIES=["context"],o.portalManager=new g.PortalManager(o,t.componentWrappingElement,t.maxComponentCreationTimeMs),o}return n(t,e),t.prototype.render=function(){var e=this;return p.default.createElement("div",{style:this.createStyleForDiv(),className:this.props.className,ref:function(t){e.eGridDiv=t}},this.portalManager.getPortals())},t.prototype.createStyleForDiv=function(){return i({height:"100%"},this.props.containerStyle||{})},t.prototype.componentDidMount=function(){var e=this.props.modules||[],t={providedBeanInstances:{agGridReact:this,frameworkComponentWrapper:new C(this,this.portalManager)},modules:e,frameworkOverrides:new m.ReactFrameworkOverrides(!1)},o=this.props.gridOptions||{},r=this.props.children;d.AgGridColumn.hasChildColumns(r)&&(o.columnDefs=d.AgGridColumn.mapChildColumnDefs(r)),this.gridOptions=l.ComponentUtil.copyAttributesToGridOptions(o,this.props),new l.Grid(this.eGridDiv,this.gridOptions,t),this.api=this.gridOptions.api,this.columnApi=this.gridOptions.columnApi,this.props.setGridApi(this.api,this.columnApi)},t.prototype.getStrategyTypeForProp=function(e){if("rowData"===e){if(this.props.rowDataChangeDetectionStrategy)return this.props.rowDataChangeDetectionStrategy;if(this.isImmutableDataActive())return h.ChangeDetectionStrategyType.IdentityCheck}return h.ChangeDetectionStrategyType.DeepValueCheck},t.prototype.isImmutableDataActive=function(){return this.props.deltaRowDataMode||this.props.immutableData||null!=this.props.getRowId||this.props.gridOptions&&(this.props.gridOptions.deltaRowDataMode||this.props.gridOptions.immutableData||null!=this.props.gridOptions.getRowId)},t.prototype.shouldComponentUpdate=function(e){return this.processPropsChanges(this.props,e),!1},t.prototype.componentDidUpdate=function(e){this.processPropsChanges(e,this.props)},t.prototype.processPropsChanges=function(e,t){var o={};this.extractGridPropertyChanges(e,t,o),this.extractDeclarativeColDefChanges(t,o),this.processSynchronousChanges(o),this.processAsynchronousChanges(o)},t.prototype.extractDeclarativeColDefChanges=function(e,t){if(!(this.props.gridOptions&&this.props.gridOptions.columnDefs||this.props.columnDefs)){var o=!!e.debug,r="columnDefs",n=this.gridOptions.columnDefs;if(d.AgGridColumn.hasChildColumns(e.children)){var i=this.changeDetectionService.getStrategy(this.getStrategyTypeForProp(r)),s=d.AgGridColumn.mapChildColumnDefs(e.children);i.areEqual(n,s)||(o&&console.log("agGridReact: colDefs definitions changed"),t[r]={previousValue:n,currentValue:s})}else n&&n.length>0&&(t[r]={previousValue:n,currentValue:[]})}},t.prototype.extractGridPropertyChanges=function(e,t,o){var r=this,n=!!t.debug;Object.keys(t).forEach((function(i){l._.includes(l.ComponentUtil.ALL_PROPERTIES,i)&&(r.changeDetectionService.getStrategy(r.getStrategyTypeForProp(i)).areEqual(e[i],t[i])||(n&&console.log("agGridReact: ["+i+"] property changed"),o[i]={previousValue:e[i],currentValue:t[i]}))})),l.ComponentUtil.getEventCallbacks().forEach((function(r){e[r]!==t[r]&&(n&&console.log("agGridReact: ["+r+"] event callback changed"),o[r]={previousValue:e[r],currentValue:t[r]})}))},t.prototype.componentWillUnmount=function(){this.api&&(this.api.destroy(),this.api=null),this.destroyed=!0,this.portalManager.destroy()},t.prototype.isDisableStaticMarkup=function(){return!0===this.props.disableStaticMarkup},t.prototype.isLegacyComponentRendering=function(){return!0===this.props.legacyComponentRendering},t.prototype.processSynchronousChanges=function(e){var t=i({},e);if(Object.keys(t).length>0){var o={};this.SYNCHRONOUS_CHANGE_PROPERTIES.forEach((function(e){t[e]&&(o[e]=t[e],delete t[e])})),Object.keys(o).length>0&&this.api&&l.ComponentUtil.processOnChange(o,this.gridOptions,this.api,this.columnApi)}return t},t.prototype.processAsynchronousChanges=function(e){var t=this;Object.keys(e).length>0&&window.setTimeout((function(){t.api&&l.ComponentUtil.processOnChange(e,t.gridOptions,t.api,t.columnApi)}))},t.MAX_COMPONENT_CREATION_TIME_IN_MS=1e3,t.defaultProps={legacyComponentRendering:!1,disableStaticMarkup:!1,maxComponentCreationTimeMs:t.MAX_COMPONENT_CREATION_TIME_IN_MS},t}(p.Component);function v(e,t){e.forEach((function(e){y[e]=t}))}t.AgGridReactLegacy=y,y.propTypes={gridOptions:u.default.object},v(l.ComponentUtil.getEventCallbacks(),u.default.func),v(l.ComponentUtil.BOOLEAN_PROPERTIES,u.default.bool),v(l.ComponentUtil.STRING_PROPERTIES,u.default.string),v(l.ComponentUtil.OBJECT_PROPERTIES,u.default.object),v(l.ComponentUtil.ARRAY_PROPERTIES,u.default.array),v(l.ComponentUtil.NUMBER_PROPERTIES,u.default.number),v(l.ComponentUtil.FUNCTION_PROPERTIES,u.default.func);var C=function(e){function t(t,o){var r=e.call(this)||this;return r.agGridReact=t,r.portalManager=o,r}return n(t,e),t.prototype.createWrapper=function(e,t){return this.agGridReact.isLegacyComponentRendering()?new c.LegacyReactComponent(e,this.agGridReact,this.portalManager,t):new f.NewReactComponent(e,this.portalManager,t)},t}(l.BaseComponentWrapper)},20930:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},21727:function(e,t,o){var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(61146),s=r(o(96652)),a=o(17642),l=n(o(56318)),u=n(o(32756)),p=n(o(19812)),c=o(30345),d=o(36431);t.default=s.memo((function(){var e=s.useContext(a.BeansContext),t=e.context,o=e.agStackComponentsRegistry,r=e.resizeObserverService,n=s.useState(""),h=n[0],f=n[1],g=s.useState(0),m=g[0],y=g[1],v=s.useState(0),C=v[0],w=v[1],E=s.useState(0),_=E[0],S=E[1],R=s.useState(0),b=R[0],O=R[1],P=s.useState("0px"),T=P[0],A=P[1],D=s.useState("0px"),I=D[0],N=D[1],x=s.useState("100%"),M=x[0],L=x[1],F=s.useState(""),G=F[0],k=F[1],V=s.useState(""),H=V[0],W=V[1],j=s.useState(null),B=j[0],U=j[1],Y=s.useState(null),z=Y[0],K=Y[1],$=s.useState(""),q=$[0],Z=$[1],X=s.useState(null),Q=X[0],J=X[1],ee=s.useState("ag-layout-normal"),te=ee[0],oe=ee[1],re=s.useRef(null),ne=s.useRef(null),ie=s.useRef(null),se=s.useRef(null),ae=s.useRef(null);u.default(" AG Grid Body ",re),u.default(" AG Pinned Top ",ne),u.default(" AG Sticky Top ",ie),u.default(" AG Middle ",se),u.default(" AG Pinned Bottom ",ae),c.useEffectOnce((function(){var e=[],n=[];if(t){var s=function(r){var n=o.getComponentClass(r),i=t.createBean(new n);return e.push(i),i};re.current.appendChild(document.createComment(" AG Fake Horizontal Scroll ")),re.current.appendChild(s("AG-FAKE-HORIZONTAL-SCROLL").getGui()),re.current.appendChild(document.createComment(" AG Overlay Wrapper ")),re.current.appendChild(s("AG-OVERLAY-WRAPPER").getGui());var a={setRowAnimationCssOnBodyViewport:f,setColumnCount:y,setRowCount:w,setTopHeight:S,setBottomHeight:O,setStickyTopHeight:A,setStickyTopTop:N,setStickyTopWidth:L,setTopDisplay:k,setBottomDisplay:W,setColumnMovingCss:U,updateLayoutClasses:oe,setAlwaysVerticalScrollClass:K,setPinnedTopBottomOverflowY:Z,setCellSelectableCss:J,registerBodyViewportResizeListener:function(e){var t=r.observeResize(se.current,e);n.push((function(){return t()}))}},l=t.createBean(new i.GridBodyCtrl);return e.push(l),l.setComp(a,re.current,se.current,ne.current,ae.current,ie.current),function(){t.destroyBeans(e),n.forEach((function(e){return e()}))}}}));var le=s.useMemo((function(){return d.classesList("ag-root","ag-unselectable",B,te)}),[B,te]),ue=s.useMemo((function(){return d.classesList("ag-body-viewport",h,te,z,Q)}),[h,te,z,Q]),pe=s.useMemo((function(){return d.classesList("ag-floating-top",Q)}),[Q]),ce=s.useMemo((function(){return d.classesList("ag-sticky-top",Q)}),[Q]),de=s.useMemo((function(){return d.classesList("ag-floating-bottom",Q)}),[Q]),he=s.useMemo((function(){return{height:_,minHeight:_,display:G,overflowY:q}}),[_,G,q]),fe=s.useMemo((function(){return{height:T,top:I,width:M}}),[T,I,M]),ge=s.useMemo((function(){return{height:b,minHeight:b,display:H,overflowY:q}}),[b,H,q]),me=function(e){return s.default.createElement(p.default,{name:e,key:e+"-container"})},ye=function(e){var t=e.section,o=e.children,r=e.className,n=e.style;return s.default.createElement("div",{ref:t,className:r,role:"presentation",style:n},o.map(me))};return s.default.createElement("div",{ref:re,className:le,role:"grid","aria-colcount":m,"aria-rowcount":C},s.default.createElement(l.default,null),ye({section:ne,className:pe,style:he,children:[i.RowContainerName.TOP_LEFT,i.RowContainerName.TOP_CENTER,i.RowContainerName.TOP_RIGHT,i.RowContainerName.TOP_FULL_WIDTH]}),ye({section:se,className:ue,children:[i.RowContainerName.LEFT,i.RowContainerName.CENTER,i.RowContainerName.RIGHT,i.RowContainerName.FULL_WIDTH]}),ye({section:ie,className:ce,style:fe,children:[i.RowContainerName.STICKY_TOP_LEFT,i.RowContainerName.STICKY_TOP_CENTER,i.RowContainerName.STICKY_TOP_RIGHT,i.RowContainerName.STICKY_TOP_FULL_WIDTH]}),ye({section:ae,className:de,style:ge,children:[i.RowContainerName.BOTTOM_LEFT,i.RowContainerName.BOTTOM_CENTER,i.RowContainerName.BOTTOM_RIGHT,i.RowContainerName.BOTTOM_FULL_WIDTH]}))}))},22784:(e,t,o)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.unload=t.load=t.onExit=t.signals=void 0;const n=o(8633);Object.defineProperty(t,"signals",{enumerable:!0,get:function(){return n.signals}});const i=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,s=Symbol.for("signal-exit emitter"),a=globalThis,l=Object.defineProperty.bind(Object);class u{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(a[s])return a[s];l(a,s,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const o=this.listeners[e],r=o.indexOf(t);-1!==r&&(0===r&&1===o.length?o.length=0:o.splice(r,1))}emit(e,t,o){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(const n of this.listeners[e])r=!0===n(t,o)||r;return"exit"===e&&(r=this.emit("afterExit",t,o)||r),r}}class p{}const c=globalThis.process;var d;d=i(c)?new class extends p{#e="win32"===c.platform?"SIGINT":"SIGHUP";#t=new u;#o;#r;#n;#i={};#s=!1;constructor(e){super(),this.#o=e,this.#i={};for(const t of n.signals)this.#i[t]=()=>{const o=this.#o.listeners(t);let{count:r}=this.#t;const n=e;if("object"==typeof n.__signal_exit_emitter__&&"number"==typeof n.__signal_exit_emitter__.count&&(r+=n.__signal_exit_emitter__.count),o.length===r){this.unload();const o=this.#t.emit("exit",null,t),r="SIGHUP"===t?this.#e:t;o||e.kill(e.pid,r)}};this.#n=e.reallyExit,this.#r=e.emit}onExit(e,t){if(!i(this.#o))return()=>{};!1===this.#s&&this.load();const o=t?.alwaysLast?"afterExit":"exit";return this.#t.on(o,e),()=>{this.#t.removeListener(o,e),0===this.#t.listeners.exit.length&&0===this.#t.listeners.afterExit.length&&this.unload()}}load(){if(!this.#s){this.#s=!0,this.#t.count+=1;for(const e of n.signals)try{const t=this.#i[e];t&&this.#o.on(e,t)}catch(e){}this.#o.emit=(e,...t)=>this.#a(e,...t),this.#o.reallyExit=e=>this.#l(e)}}unload(){this.#s&&(this.#s=!1,n.signals.forEach((e=>{const t=this.#i[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#o.removeListener(e,t)}catch(e){}})),this.#o.emit=this.#r,this.#o.reallyExit=this.#n,this.#t.count-=1)}#l(e){return i(this.#o)?(this.#o.exitCode=e||0,this.#t.emit("exit",this.#o.exitCode,null),this.#n.call(this.#o,this.#o.exitCode)):0}#a(e,...t){const o=this.#r;if("exit"===e&&i(this.#o)){"number"==typeof t[0]&&(this.#o.exitCode=t[0]);const r=o.call(this.#o,e,...t);return this.#t.emit("exit",this.#o.exitCode,null),r}return o.call(this.#o,e,...t)}}(c):new class extends p{onExit(){return()=>{}}load(){}unload(){}},r={onExit:(e,t)=>d.onExit(e,t),load:()=>d.load(),unload:()=>d.unload()},t.onExit=r.onExit,t.load=r.load,t.unload=r.unload},22813:function(e,t,o){var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(o(96652)),s=o(17642),a=o(61146),l=o(36431),u=n(o(4918)),p=o(30345);t.default=i.memo((function(e){var t=i.useState(new l.CssClasses),o=t[0],r=t[1],n=i.useState(),c=n[0],d=n[1],h=i.useState(),f=h[0],g=h[1],m=i.useState(),y=m[0],v=m[1],C=i.useState([]),w=C[0],E=C[1],_=i.useContext(s.BeansContext).context,S=i.useRef(null),R=e.pinned===a.Constants.PINNED_LEFT,b=e.pinned===a.Constants.PINNED_RIGHT,O=!R&&!b;p.useEffectOnce((function(){var t={addOrRemoveCssClass:function(e,t){return r((function(o){return o.setClass(e,t)}))},setCtrls:function(e){return E(e)},setCenterWidth:function(e){return d(e)},setContainerTransform:function(e){return g(e)},setPinnedContainerWidth:function(e){return v(e)}},o=_.createBean(new a.HeaderRowContainerCtrl(e.pinned));return o.setComp(t,S.current),function(){_.destroyBean(o)}}));var P=i.useMemo((function(){return o.toString()}),[o]),T=function(){return w.map((function(e){return i.default.createElement(u.default,{ctrl:e,key:e.getInstanceId()})}))},A=i.useMemo((function(){return{width:c,transform:f}}),[c,f]),D=i.useMemo((function(){return{width:y,minWidth:y,maxWidth:y}}),[y]);return i.default.createElement(i.default.Fragment,null,R&&i.default.createElement("div",{ref:S,className:"ag-pinned-left-header "+P,role:"presentation",style:D},T()),b&&i.default.createElement("div",{ref:S,className:"ag-pinned-right-header "+P,role:"presentation",style:D},T()),O&&i.default.createElement("div",{ref:S,className:"ag-header-viewport "+P,role:"presentation"},i.default.createElement("div",{className:"ag-header-container",role:"rowgroup",style:A},T())))}))},23409:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CommaAndColonSeparatedRecord=t.ConnectionString=t.redactConnectionString=void 0;const r=o(21655),n=o(15644);Object.defineProperty(t,"redactConnectionString",{enumerable:!0,get:function(){return n.redactConnectionString}});const i="__this_is_a_placeholder__",s=/^(?<protocol>[^/]+):\/\/(?:(?<username>[^:@]*)(?::(?<password>[^@]*))?@)?(?<hosts>(?!:)[^/?@]*)(?<rest>.*)/;class a extends Map{delete(e){return super.delete(this._normalizeKey(e))}get(e){return super.get(this._normalizeKey(e))}has(e){return super.has(this._normalizeKey(e))}set(e,t){return super.set(this._normalizeKey(e),t)}_normalizeKey(e){e=`${e}`;for(const t of this.keys())if(t.toLowerCase()===e.toLowerCase()){e=t;break}return e}}class l extends r.URL{}class u extends Error{get name(){return"MongoParseError"}}class p extends l{_hosts;constructor(e,t={}){const{looseValidation:o}=t;if(!o&&!(r=e).startsWith("mongodb://")&&!r.startsWith("mongodb+srv://"))throw new u('Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"');var r;const n=e.match(s);if(!n)throw new u("Invalid connection string");const{protocol:l,username:c,password:d,hosts:h,rest:f}=n.groups??{};if(!o){if(!l||!h)throw new u("Protocol and host list are required in the uri");try{decodeURIComponent(c??""),decodeURIComponent(d??"")}catch(e){throw new u(e.message)}const t=/[:/?#[\]@]/gi;if(c?.match(t))throw new u(`Username contains unescaped characters ${c}`);if(!c||!d){const t=e.replace(`${l}://`,"");if(t.startsWith("@")||t.startsWith(":"))throw new u("URI contained empty userinfo section")}if(d?.match(t))throw new u("Password contains unescaped characters");if(f?.match(/^[^/?]*@/))throw new u("Invalid connection string")}let g="";"string"==typeof c&&(g+=c),"string"==typeof d&&(g+=`:${d}`),g&&(g+="@");try{super(`${l.toLowerCase()}://${g}${i}${f}`)}catch(r){throw o&&new p(e,{...t,looseValidation:!1}),"string"==typeof r.message&&(r.message=r.message.replace(i,h)),r}if(this._hosts=h.split(","),!o){if(this.isSRV&&1!==this.hosts.length)throw new u("mongodb+srv URI cannot have multiple service names");if(this.isSRV&&this.hosts.some((e=>e.includes(":"))))throw new u("mongodb+srv URI cannot have port number")}var m;this.pathname||(this.pathname="/"),Object.setPrototypeOf(this.searchParams,(m=this.searchParams.constructor,class extends m{append(e,t){return super.append(this._normalizeKey(e),t)}delete(e){return super.delete(this._normalizeKey(e))}get(e){return super.get(this._normalizeKey(e))}getAll(e){return super.getAll(this._normalizeKey(e))}has(e){return super.has(this._normalizeKey(e))}set(e,t){return super.set(this._normalizeKey(e),t)}keys(){return super.keys()}values(){return super.values()}entries(){return super.entries()}[Symbol.iterator](){return super[Symbol.iterator]()}_normalizeKey(e){return a.prototype._normalizeKey.call(this,e)}}).prototype)}get host(){return i}set host(e){throw new Error("No single host for connection string")}get hostname(){return i}set hostname(e){throw new Error("No single host for connection string")}get port(){return""}set port(e){throw new Error("No single host for connection string")}get href(){return this.toString()}set href(e){throw new Error("Cannot set href for connection strings")}get isSRV(){return this.protocol.includes("srv")}get hosts(){return this._hosts}set hosts(e){this._hosts=e}toString(){return super.toString().replace(i,this.hosts.join(","))}clone(){return new p(this.toString(),{looseValidation:!0})}redact(e){return(0,n.redactValidConnectionString)(this,e)}typedSearchParams(){return this.searchParams}[Symbol.for("nodejs.util.inspect.custom")](){const{href:e,origin:t,protocol:o,username:r,password:n,hosts:i,pathname:s,search:a,searchParams:l,hash:u}=this;return{href:e,origin:t,protocol:o,username:r,password:n,hosts:i,pathname:s,search:a,searchParams:l,hash:u}}}t.ConnectionString=p,t.CommaAndColonSeparatedRecord=class extends a{constructor(e){super();for(const t of(e??"").split(",")){if(!t)continue;const e=t.indexOf(":");-1===e?this.set(t,""):this.set(t.slice(0,e),t.slice(e+1))}}toString(){return[...this].map((e=>e.join(":"))).join(",")}},t.default=p},24004:(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(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.isNaN=function(e){return Number.isNaN?Number.isNaN(e):"number"==typeof e&&isNaN(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(e.isNaN(t)&&e.isNaN(o))return!0;if(t instanceof Date)return o instanceof Date&&t.valueOf()===o.valueOf();if("function"==typeof t)return!1;if("object"!=typeof t||t.$$typeof&&"Symbol(react.element)"===t.$$typeof.toString())return t==o;if(Object.isFrozen(t)||Object.isFrozen(o))return t===o;var r=void 0===t.areEquivPropertyTracking,n=void 0===o.areEquivPropertyTracking;try{var i=void 0;if(r)t.areEquivPropertyTracking=[];else if(t.areEquivPropertyTracking.some((function(e){return e===o})))return!0;if(n)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(i in t)"areEquivPropertyTracking"!=i&&(s[i]=null);for(i in o)"areEquivPropertyTracking"!=i&&(s[i]=null);for(i in s)if(!this.areEquivalent(t[i],o[i]))return!1;return!0}finally{r&&delete t.areEquivPropertyTracking,n&&delete o.areEquivPropertyTracking}},e}(),i=function(){function e(){var e;this.strategyMap=((e={})[o.DeepValueCheck]=new n,e[o.IdentityCheck]=new r((function(e,t){return e===t})),e[o.NoCheck]=new r((function(e,t){return!1})),e)}return e.prototype.getStrategy=function(e){return this.strategyMap[e]},e}();t.ChangeDetectionService=i},28742:e=>{var t={};e.exports=function(e,o){var r=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(o)}},29072:function(e,t){var o,r=this&&this.__extends||(o=function(e,t){return o=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])},o(e,t)},function(e,t){function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t,o,r){var n=e.call(this)||this;return n.portal=null,n.reactComponent=t,n.portalManager=o,n.componentType=r,n.statelessComponent=n.isStateless(n.reactComponent),n}return r(t,e),t.prototype.getGui=function(){return this.eParentElement},t.prototype.destroy=function(){return this.componentInstance&&"function"==typeof this.componentInstance.destroy&&this.componentInstance.destroy(),this.portalManager.destroyPortal(this.portal)},t.prototype.createParentElement=function(e){var t=this.portalManager.getComponentWrappingElement(),o=document.createElement(t||"div");return o.classList.add("ag-react-container"),e.reactContainer=o,o},t.prototype.addParentContainerStyleAndClasses=function(){var e=this;this.componentInstance&&(this.componentInstance.getReactContainerStyle&&this.componentInstance.getReactContainerStyle()&&Object.assign(this.eParentElement.style,this.componentInstance.getReactContainerStyle()),this.componentInstance.getReactContainerClasses&&this.componentInstance.getReactContainerClasses()&&this.componentInstance.getReactContainerClasses().forEach((function(t){return e.eParentElement.classList.add(t)})))},t.prototype.statelessComponentRendered=function(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0},t.prototype.getFrameworkComponentInstance=function(){return this.componentInstance},t.prototype.isStatelessComponent=function(){return this.statelessComponent},t.prototype.getReactComponentName=function(){return this.reactComponent.name},t.prototype.getMemoType=function(){return this.hasSymbol()?Symbol.for("react.memo"):60115},t.prototype.hasSymbol=function(){return"function"==typeof Symbol&&Symbol.for},t.prototype.isStateless=function(e){return"function"==typeof e&&!(e.prototype&&e.prototype.isReactComponent)||"object"==typeof e&&e.$$typeof===this.getMemoType()},t.prototype.hasMethod=function(e){var t=this.getFrameworkComponentInstance();return!!t&&null!==t[e]||this.fallbackMethodAvailable(e)},t.prototype.callMethod=function(e,t){var o=this,r=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(r){var n=r[e];return n?n.apply(r,t):this.fallbackMethodAvailable(e)?this.fallbackMethod(e,t&&t[0]?t[0]:{}):void 0}setTimeout((function(){return o.callMethod(e,t)}))},t.prototype.addMethod=function(e,t){this[e]=t},t}((function(){}));t.ReactComponent=n},30149:function(e,t,o){var r,n=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(t,o);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,n)}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[t.length]=o);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o=r(e),s=0;s<o.length;s++)"default"!==o[s]&&n(t,e,o[s]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.redactValidConnectionString=function(e,t){const o=e.clone(),r=t?.replacementString??"_credentials_",n=t?.redactUsernames??!0;if((o.username||o.password)&&n?(o.username=r,o.password=""):o.password&&(o.password=r),o.searchParams.has("authMechanismProperties")){const e=new a.CommaAndColonSeparatedRecord(o.searchParams.get("authMechanismProperties"));e.get("AWS_SESSION_TOKEN")&&(e.set("AWS_SESSION_TOKEN",r),o.searchParams.set("authMechanismProperties",e.toString()))}return o.searchParams.has("tlsCertificateKeyFilePassword")&&o.searchParams.set("tlsCertificateKeyFilePassword",r),o.searchParams.has("proxyUsername")&&n&&o.searchParams.set("proxyUsername",r),o.searchParams.has("proxyPassword")&&o.searchParams.set("proxyPassword",r),o},t.redactConnectionString=function(e,t){const o=t?.replacementString??"<credentials>",r=t?.redactUsernames??!0;let n;try{n=new a.default(e)}catch{}if(n)return t={...t,replacementString:"___credentials___"},n.redact(t).toString().replace(/___credentials___/g,o);const i=o,s=[e=>e.replace(r?/(\/\/)(.*)(@)/g:/(\/\/[^@]*:)(.*)(@)/g,`$1${i}$3`),e=>e.replace(/(AWS_SESSION_TOKEN(:|%3A))([^,&]+)/gi,`$1${i}`),e=>e.replace(/(tlsCertificateKeyFilePassword=)([^&]+)/gi,`$1${i}`),e=>r?e.replace(/(proxyUsername=)([^&]+)/gi,`$1${i}`):e,e=>e.replace(/(proxyPassword=)([^&]+)/gi,`$1${i}`)];for(const t of s)e=t(e);return e};const a=s(o(68446))},30345:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(96652);t.useEffectOnce=function(e){var t=r.useRef(e),o=r.useRef(),n=r.useRef(!1),i=r.useRef(!1),s=r.useState(0)[1];n.current&&(i.current=!0),r.useEffect((function(){return n.current||(o.current=t.current(),n.current=!0),s((function(e){return e+1})),function(){i.current&&o.current&&o.current()}}),[])},t.useLayoutEffectOnce=function(e){var t=r.useRef(e),o=r.useRef(),n=r.useRef(!1),i=r.useRef(!1),s=r.useState(0)[1];n.current&&(i.current=!0),r.useLayoutEffect((function(){return n.current||(o.current=t.current(),n.current=!0),s((function(e){return e+1})),function(){i.current&&o.current&&o.current()}}),[])}},32756:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(30345);t.default=function(e,t){r.useEffectOnce((function(){var o=t.current,r=o.parentElement;if(r){var n=document.createComment(e);return r.insertBefore(n,o),function(){r.removeChild(n)}}}))}},33997:(e,t,o)=>{o.d(t,{$C:()=>P,$b:()=>k,Ds:()=>Ne,G1:()=>x,GU:()=>Oe,ID:()=>ye,N8:()=>Se,R:()=>V,W:()=>R,WZ:()=>L,Z9:()=>m,ZZ:()=>_e,_Z:()=>Re,ae:()=>Me,cS:()=>b,cV:()=>xe,cb:()=>p,e1:()=>d,hK:()=>O,hd:()=>De,jN:()=>we,k5:()=>Ee,m2:()=>u,mD:()=>Ce,nV:()=>S,n_:()=>y,o8:()=>Le,qs:()=>H,qx:()=>M,sl:()=>Ie,u1:()=>T,wA:()=>Ae,x3:()=>W,z6:()=>Te,zf:()=>A});var r=o(86637),n=o(9364),i=o(58750),s=o(33868),a=o(24730),l=o(15088).process;function u(...e){return e.reduce(((e,t)=>({...e,...null!=t?t:{}})),{})}async function p(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(c());const n=setTimeout((()=>{i(),t()}),e),i=()=>{clearTimeout(n),null==o||o.removeEventListener("abort",s)},s=()=>{i(),r(c())};null==o||o.addEventListener("abort",s)}))}function c(){return new DOMException("Delay was aborted","AbortError")}var d=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 h(e){return Object.fromEntries([...e.headers])}var{btoa:f,atob:g}=globalThis;function m(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),o=g(t);return Uint8Array.from(o,(e=>e.codePointAt(0)))}function y(e){let t="";for(let o=0;o<e.length;o++)t+=String.fromCodePoint(e[o]);return f(t)}var v,C,w="AI_DownloadError",E=`vercel.ai.error.${w}`,_=Symbol.for(E),S=class extends(C=r.bD,v=_,C){constructor({url:e,statusCode:t,statusText:o,cause:r,message:n=(null==r?`Failed to download ${e}: ${t} ${o}`:`Failed to download ${e}: ${r}`)}){super({name:w,message:n,cause:r}),this[v]=!0,this.url=e,this.statusCode=t,this.statusText=o}static isInstance(e){return r.bD.hasMarker(e,E)}},R=2147483648;async function b({response:e,url:t,maxBytes:o=R}){const r=e.headers.get("content-length");if(null!=r){const e=parseInt(r,10);if(!isNaN(e)&&e>o)throw new S({url:t,message:`Download of ${t} exceeded maximum size of ${o} bytes (Content-Length: ${e}).`})}const n=e.body;if(null==n)return new Uint8Array(0);const i=n.getReader(),s=[];let a=0;try{for(;;){const{done:e,value:r}=await i.read();if(e)break;if(a+=r.length,a>o)throw new S({url:t,message:`Download of ${t} exceeded maximum size of ${o} bytes.`});s.push(r)}}finally{try{await i.cancel()}finally{i.releaseLock()}}const l=new Uint8Array(a);let u=0;for(const e of s)l.set(e,u),u+=e.length;return l}var O=({prefix:e,size:t=16,alphabet:o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:n="-"}={})=>{const i=()=>{const e=o.length,r=new Array(t);for(let n=0;n<t;n++)r[n]=o[Math.random()*e|0];return r.join("")};if(null==e)return i;if(o.includes(n))throw new r.Di({argument:"separator",message:`The separator "${n}" must not be part of the alphabet "${o}".`});return()=>`${e}${n}${i()}`},P=O();function T(e){return null==e?"unknown error":"string"==typeof e?e:e instanceof Error?e.message:JSON.stringify(e)}function A(e){return(e instanceof Error||e instanceof DOMException)&&("AbortError"===e.name||"ResponseAborted"===e.name||"TimeoutError"===e.name)}var D=["fetch failed","failed to fetch"],I=["ConnectionRefused","ConnectionClosed","FailedToOpenSocket","ECONNRESET","ECONNREFUSED","ETIMEDOUT","EPIPE"];function N({error:e,url:t,requestBodyValues:o}){if(A(e))return e;if(e instanceof TypeError&&D.includes(e.message.toLowerCase())){const n=e.cause;if(null!=n)return new r.hL({message:`Cannot connect to API: ${n.message}`,cause:n,url:t,requestBodyValues:o,isRetryable:!0})}return function(e){if(!(e instanceof Error))return!1;const t=e.code;return!("string"!=typeof t||!I.includes(t))}(e)?new r.hL({message:`Cannot connect to API: ${e.message}`,cause:e,url:t,requestBodyValues:o,isRetryable:!0}):e}function x(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 M(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 L(e,...t){const o=new Headers(M(e)),r=o.get("user-agent")||"";return o.set("user-agent",[r,...t].filter(Boolean).join(" ")),Object.fromEntries(o.entries())}var F="4.0.15",G=()=>globalThis.fetch,k=async({url:e,headers:t={},successfulResponseHandler:o,failedResponseHandler:n,abortSignal:i,fetch:s=G()})=>{try{const a=await s(e,{method:"GET",headers:L(t,`ai-sdk/provider-utils/${F}`,x()),signal:i}),l=h(a);if(!a.ok){let t;try{t=await n({response:a,url:e,requestBodyValues:{}})}catch(t){if(A(t)||r.hL.isInstance(t))throw t;throw new r.hL({message:"Failed to process error response",cause:t,statusCode:a.status,url:e,responseHeaders:l,requestBodyValues:{}})}throw t.value}try{return await o({response:a,url:e,requestBodyValues:{}})}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:a.status,url:e,responseHeaders:l,requestBodyValues:{}})}}catch(t){throw N({error:t,url:e,requestBodyValues:{}})}};function V(e){return null!=e}function H({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)))}function W({settingValue:e,environmentVariableName:t}){return"string"==typeof e||null==e&&void 0!==l&&null!=(e=l.env[t])&&"string"==typeof e?e:void 0}var j=/"__proto__"\s*:/,B=/"constructor"\s*:/;function U(e){const t=JSON.parse(e);return null===t||"object"!=typeof t||!1===j.test(e)&&!1===B.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 Y(e){const{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch(t){return U(e)}try{return U(e)}finally{Error.stackTraceLimit=t}}function z(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]=K(t[e])}null!=e.items&&(e.items=Array.isArray(e.items)?e.items.map(K):K(e.items)),null!=e.anyOf&&(e.anyOf=e.anyOf.map(K)),null!=e.allOf&&(e.allOf=e.allOf.map(K)),null!=e.oneOf&&(e.oneOf=e.oneOf.map(K));const{definitions:t}=e;if(null!=t)for(const e of Object.keys(t))t[e]=K(t[e]);return e}function K(e){return"boolean"==typeof e?e:z(e)}var $=Symbol("Let zodToJsonSchema decide on which parser to use"),q={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 Z(e,t){return de(e.type._def,t)}function X(e,t,o){const r=null!=o?o:t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map(((o,r)=>X(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 Q(e)}}var Q=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},J=void 0,ee={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===J&&(J=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),J),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 te(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":ne(o,"email",r.message,t);break;case"format:idn-email":ne(o,"idn-email",r.message,t);break;case"pattern:zod":ie(o,ee.email,r.message,t)}break;case"url":ne(o,"uri",r.message,t);break;case"uuid":ne(o,"uuid",r.message,t);break;case"regex":ie(o,r.regex,r.message,t);break;case"cuid":ie(o,ee.cuid,r.message,t);break;case"cuid2":ie(o,ee.cuid2,r.message,t);break;case"startsWith":ie(o,RegExp(`^${oe(r.value,t)}`),r.message,t);break;case"endsWith":ie(o,RegExp(`${oe(r.value,t)}$`),r.message,t);break;case"datetime":ne(o,"date-time",r.message,t);break;case"date":ne(o,"date",r.message,t);break;case"time":ne(o,"time",r.message,t);break;case"duration":ne(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":ie(o,RegExp(oe(r.value,t)),r.message,t);break;case"ip":"v6"!==r.version&&ne(o,"ipv4",r.message,t),"v4"!==r.version&&ne(o,"ipv6",r.message,t);break;case"base64url":ie(o,ee.base64url,r.message,t);break;case"jwt":ie(o,ee.jwt,r.message,t);break;case"cidr":"v6"!==r.version&&ie(o,ee.ipv4Cidr,r.message,t),"v4"!==r.version&&ie(o,ee.ipv6Cidr,r.message,t);break;case"emoji":ie(o,ee.emoji(),r.message,t);break;case"ulid":ie(o,ee.ulid,r.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":ne(o,"binary",r.message,t);break;case"contentEncoding:base64":o.contentEncoding="base64";break;case"pattern:zod":ie(o,ee.base64,r.message,t)}break;case"nanoid":ie(o,ee.nanoid,r.message,t)}return o}function oe(e,t){return"escape"===t.patternStrategy?function(e){let t="";for(let o=0;o<e.length;o++)re.has(e[o])||(t+="\\"),t+=e[o];return t}(e):e}var re=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function ne(e,t,o,r){var n;e.format||(null==(n=e.anyOf)?void 0:n.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 ie(e,t,o,r){var n;e.pattern||(null==(n=e.allOf)?void 0:n.some((e=>e.pattern)))?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:se(t,r),...o&&r.errorMessages&&{errorMessage:{pattern:o}}})):e.pattern=se(t,r)}function se(e,t){var o;if(!t.applyRegexFlags||!e.flags)return e.source;const r=e.flags.includes("i"),n=e.flags.includes("m"),i=e.flags.includes("s"),s=r?e.source.toLowerCase():e.source;let a="",l=!1,u=!1,p=!1;for(let e=0;e<s.length;e++)if(l)a+=s[e],l=!1;else{if(r)if(u){if(s[e].match(/[a-z]/)){p?(a+=s[e],a+=`${s[e-2]}-${s[e]}`.toUpperCase(),p=!1):"-"===s[e+1]&&(null==(o=s[e+2])?void 0:o.match(/[a-z]/))?(a+=s[e],p=!0):a+=`${s[e]}${s[e].toUpperCase()}`;continue}}else if(s[e].match(/[a-z]/)){a+=`[${s[e]}${s[e].toUpperCase()}]`;continue}if(n){if("^"===s[e]){a+="(^|(?<=[\r\n]))";continue}if("$"===s[e]){a+="($|(?=[\r\n]))";continue}}i&&"."===s[e]?a+=u?`${s[e]}\r\n`:`[${s[e]}\r\n]`:(a+=s[e],"\\"===s[e]?l=!0:u&&"]"===s[e]?u=!1:u||"["!==s[e]||(u=!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 ae(e,t){var o,r,n,i,a,l;const u={type:"object",additionalProperties:null!=(o=de(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))?o:t.allowedAdditionalProperties};if((null==(r=e.keyType)?void 0:r._def.typeName)===s.kY.ZodString&&(null==(n=e.keyType._def.checks)?void 0:n.length)){const{type:o,...r}=te(e.keyType._def,t);return{...u,propertyNames:r}}if((null==(i=e.keyType)?void 0:i._def.typeName)===s.kY.ZodEnum)return{...u,propertyNames:{enum:e.keyType._def.values}};if((null==(a=e.keyType)?void 0:a._def.typeName)===s.kY.ZodBranded&&e.keyType._def.type._def.typeName===s.kY.ZodString&&(null==(l=e.keyType._def.type._def.checks)?void 0:l.length)){const{type:o,...r}=Z(e.keyType._def,t);return{...u,propertyNames:r}}return u}var le={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function ue(e){try{return e.isOptional()}catch(e){return!0}}var pe=(e,t,o)=>{switch(t){case s.kY.ZodString:return te(e,o);case s.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 s.kY.ZodObject:return function(e,t){const o={type:"object",properties:{}},r=[],n=e.shape();for(const e in n){let i=n[e];if(void 0===i||void 0===i._def)continue;const s=ue(i),a=de(i._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 i=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return de(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!==i&&(o.additionalProperties=i),o}(e,o);case s.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 s.kY.ZodBoolean:return{type:"boolean"};case s.kY.ZodDate:return X(e,o);case s.kY.ZodUndefined:return{not:{}};case s.kY.ZodNull:return{type:"null"};case s.kY.ZodArray:return function(e,t){var o,r,n;const i={type:"array"};return(null==(o=e.type)?void 0:o._def)&&(null==(n=null==(r=e.type)?void 0:r._def)?void 0:n.typeName)!==s.kY.ZodAny&&(i.items=de(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(i.minItems=e.minLength.value),e.maxLength&&(i.maxItems=e.maxLength.value),e.exactLength&&(i.minItems=e.exactLength.value,i.maxItems=e.exactLength.value),i}(e,o);case s.kY.ZodUnion:case s.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 le&&(!e._def.checks||!e._def.checks.length)))){const e=o.reduce(((e,t)=>{const o=le[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)=>de(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 s.kY.ZodIntersection:return function(e,t){const o=[de(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),de(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 s.kY.ZodTuple:return function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map(((e,o)=>de(e._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]}))).reduce(((e,t)=>void 0===t?e:[...e,t]),[]),additionalItems:de(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map(((e,o)=>de(e._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]}))).reduce(((e,t)=>void 0===t?e:[...e,t]),[])}}(e,o);case s.kY.ZodRecord:return ae(e,o);case s.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 s.kY.ZodEnum:return function(e){return{type:"string",enum:Array.from(e.values)}}(e);case s.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 s.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:[le[e.innerType._def.typeName],"null"]};const o=de(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return o&&{anyOf:[o,{type:"null"}]}}(e,o);case s.kY.ZodOptional:return((e,t)=>{var o;if(t.currentPath.toString()===(null==(o=t.propertyPath)?void 0:o.toString()))return de(e.innerType._def,t);const r=de(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:{}},r]}:{}})(e,o);case s.kY.ZodMap:return function(e,t){return"record"===t.mapStrategy?ae(e,t):{type:"array",maxItems:125,items:{type:"array",items:[de(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||{},de(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||{}],minItems:2,maxItems:2}}}(e,o);case s.kY.ZodSet:return function(e,t){const o={type:"array",uniqueItems:!0,items:de(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 s.kY.ZodLazy:return()=>e.getter()._def;case s.kY.ZodPromise:return function(e,t){return de(e.type._def,t)}(e,o);case s.kY.ZodNaN:case s.kY.ZodNever:return{not:{}};case s.kY.ZodEffects:return function(e,t){return"input"===t.effectStrategy?de(e.schema._def,t):{}}(e,o);case s.kY.ZodAny:case s.kY.ZodUnknown:return{};case s.kY.ZodDefault:return function(e,t){return{...de(e.innerType._def,t),default:e.defaultValue()}}(e,o);case s.kY.ZodBranded:return Z(e,o);case s.kY.ZodReadonly:case s.kY.ZodCatch:return((e,t)=>de(e.innerType._def,t))(e,o);case s.kY.ZodPipeline:return((e,t)=>{if("input"===t.pipeStrategy)return de(e.in._def,t);if("output"===t.pipeStrategy)return de(e.out._def,t);const o=de(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]});return{allOf:[o,de(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",o?"1":"0"]})].filter((e=>void 0!==e))}})(e,o);case s.kY.ZodFunction:case s.kY.ZodVoid:case s.kY.ZodSymbol:default:return}},ce=(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 de(e,t,o=!1){var r;const n=t.seen.get(e);if(t.override){const i=null==(r=t.override)?void 0:r.call(t,e,t,n,o);if(i!==$)return i}if(n&&!o){const e=he(n,t);if(void 0!==e)return e}const i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);const s=pe(e,e.typeName,t),a="function"==typeof s?de(s(),t):s;if(a&&fe(e,t,a),t.postProcess){const o=t.postProcess(a,e,t);return i.jsonSchema=a,o}return i.jsonSchema=a,a}var he=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:ce(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}},fe=(e,t,o)=>(e.description&&(o.description=e.description),o),ge=(e,t)=>{var o;const r=(e=>{const t=(e=>"string"==typeof e?{...q,name:e}:{...q,...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 n="object"==typeof t&&t.definitions?Object.entries(t.definitions).reduce(((e,[t,o])=>{var n;return{...e,[t]:null!=(n=de(o._def,{...r,currentPath:[...r.basePath,r.definitionPath,t]},!0))?n:{}}}),{}):void 0;const i="string"==typeof t?t:"title"===(null==t?void 0:t.nameStrategy)||null==t?void 0:t.name,s=null!=(o=de(e._def,void 0===i?r:{...r,currentPath:[...r.basePath,r.definitionPath,i]},!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===i?n?{...s,[r.definitionPath]:n}:s:{$ref:[..."relative"===r.$refStrategy?[]:r.basePath,r.definitionPath,i].join("/"),[r.definitionPath]:{...n,[i]:s}};return l.$schema="http://json-schema.org/draft-07/schema#",l},me=Symbol.for("vercel.ai.schema");function ye(e){let t;return()=>(null==t&&(t=e()),t)}function ve(e,{validate:t}={}){return{[me]:!0,_type:void 0,get jsonSchema(){return"function"==typeof e&&(e=e()),e},validate:t}}function Ce(e){return null==e?ve({properties:{},additionalProperties:!1}):"object"==typeof(o=e)&&null!==o&&me in o&&!0===o[me]&&"jsonSchema"in o&&"validate"in o?e:"~standard"in e?"zod"===e["~standard"].vendor?we(e):(t=e,ve((()=>z(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 r.iM({value:e,cause:o.issues})}}})):e();var t,o}function we(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 ve((()=>z(i.b(e,{target:"draft-7",io:"input",reused:r?"ref":"inline"}))),{validate:async t=>{const o=await n.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 ve((()=>ge(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 Ee({value:e,schema:t,context:o}){const n=await _e({value:e,schema:t,context:o});if(!n.success)throw r.iM.wrap({value:e,cause:n.error,context:o});return n.value}async function _e({value:e,schema:t,context:o}){const n=Ce(t);try{if(null==n.validate)return{success:!0,value:e,rawValue:e};const t=await n.validate(e);return t.success?{success:!0,value:t.value,rawValue:e}:{success:!1,error:r.iM.wrap({value:e,cause:t.error,context:o}),rawValue:e}}catch(t){return{success:!1,error:r.iM.wrap({value:e,cause:t,context:o}),rawValue:e}}}async function Se({text:e,schema:t}){try{const o=Y(e);return null==t?{success:!0,value:o,rawValue:o}:await _e({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}}}function Re({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new a.Z).pipeThrough(new TransformStream({async transform({data:e},o){"[DONE]"!==e&&o.enqueue(await Se({text:e,schema:t}))}}))}var be=()=>globalThis.fetch,Oe=async({url:e,headers:t,body:o,failedResponseHandler:r,successfulResponseHandler:n,abortSignal:i,fetch:s})=>Pe({url:e,headers:{"Content-Type":"application/json",...t},body:{content:JSON.stringify(o),values:o},failedResponseHandler:r,successfulResponseHandler:n,abortSignal:i,fetch:s}),Pe=async({url:e,headers:t={},body:o,successfulResponseHandler:n,failedResponseHandler:i,abortSignal:s,fetch:a=be()})=>{try{const l=await a(e,{method:"POST",headers:L(t,`ai-sdk/provider-utils/${F}`,x()),body:o.content,signal:s}),u=h(l);if(!l.ok){let t;try{t=await i({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:u,requestBodyValues:o.values})}throw t.value}try{return await n({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:u,requestBodyValues:o.values})}}catch(t){throw N({error:t,url:e,requestBodyValues:o.values})}};function Te(e){return e}function Ae({id:e,inputSchema:t,outputSchema:o,supportsDeferredResults:r}){return({execute:n,needsApproval:i,toModelOutput:s,onInputStart:a,onInputDelta:l,onInputAvailable:u,...p})=>({type:"provider",id:e,args:p,inputSchema:t,outputSchema:o,execute:n,needsApproval:i,toModelOutput:s,onInputStart:a,onInputDelta:l,onInputAvailable:u,supportsDeferredResults:r})}async function De(e){return"function"==typeof e&&(e=e()),Promise.resolve(e)}var Ie=({errorSchema:e,errorToMessage:t,isRetryable:o})=>async({response:n,url:i,requestBodyValues:s})=>{const a=await n.text(),l=h(n);if(""===a.trim())return{responseHeaders:l,value:new r.hL({message:n.statusText,url:i,requestBodyValues:s,statusCode:n.status,responseHeaders:l,responseBody:a,isRetryable:null==o?void 0:o(n)})};try{const u=await async function({text:e,schema:t}){try{const o=Y(e);return null==t?o:Ee({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:a,schema:e});return{responseHeaders:l,value:new r.hL({message:t(u),url:i,requestBodyValues:s,statusCode:n.status,responseHeaders:l,responseBody:a,data:u,isRetryable:null==o?void 0:o(n,u)})}}catch(e){return{responseHeaders:l,value:new r.hL({message:n.statusText,url:i,requestBodyValues:s,statusCode:n.status,responseHeaders:l,responseBody:a,isRetryable:null==o?void 0:o(n)})}}},Ne=e=>async({response:t})=>{const o=h(t);if(null==t.body)throw new r.Tt({});return{responseHeaders:o,value:Re({stream:t.body,schema:e})}},xe=e=>async({response:t,url:o,requestBodyValues:n})=>{const i=await t.text(),s=await Se({text:i,schema:e}),a=h(t);if(!s.success)throw new r.hL({message:"Invalid JSON response",cause:s.error,statusCode:t.status,responseHeaders:a,responseBody:i,url:o,requestBodyValues:n});return{responseHeaders:a,value:s.value,rawValue:s.rawValue}};function Me(e){return null==e?void 0:e.replace(/\/$/,"")}async function*Le({execute:e,input:t,options:o}){const r=e(t,o);if(null!=(n=r)&&"function"==typeof n[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 n}},34633:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CommaAndColonSeparatedRecord=t.ConnectionString=t.redactConnectionString=void 0;const r=o(21655),n=o(5652);Object.defineProperty(t,"redactConnectionString",{enumerable:!0,get:function(){return n.redactConnectionString}});const i="__this_is_a_placeholder__",s=/^(?<protocol>[^/]+):\/\/(?:(?<username>[^:@]*)(?::(?<password>[^@]*))?@)?(?<hosts>(?!:)[^/?@]*)(?<rest>.*)/;class a extends Map{delete(e){return super.delete(this._normalizeKey(e))}get(e){return super.get(this._normalizeKey(e))}has(e){return super.has(this._normalizeKey(e))}set(e,t){return super.set(this._normalizeKey(e),t)}_normalizeKey(e){e=`${e}`;for(const t of this.keys())if(t.toLowerCase()===e.toLowerCase()){e=t;break}return e}}class l extends r.URL{}class u extends Error{get name(){return"MongoParseError"}}class p extends l{_hosts;constructor(e,t={}){const{looseValidation:o}=t;if(!o&&!(r=e).startsWith("mongodb://")&&!r.startsWith("mongodb+srv://"))throw new u('Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"');var r;const n=e.match(s);if(!n)throw new u("Invalid connection string");const{protocol:l,username:c,password:d,hosts:h,rest:f}=n.groups??{};if(!o){if(!l||!h)throw new u("Protocol and host list are required in the uri");try{decodeURIComponent(c??""),decodeURIComponent(d??"")}catch(e){throw new u(e.message)}const t=/[:/?#[\]@]/gi;if(c?.match(t))throw new u(`Username contains unescaped characters ${c}`);if(!c||!d){const t=e.replace(`${l}://`,"");if(t.startsWith("@")||t.startsWith(":"))throw new u("URI contained empty userinfo section")}if(d?.match(t))throw new u("Password contains unescaped characters");if(f?.match(/^[^/?]*@/))throw new u("Invalid connection string")}let g="";"string"==typeof c&&(g+=c),"string"==typeof d&&(g+=`:${d}`),g&&(g+="@");try{super(`${l.toLowerCase()}://${g}${i}${f}`)}catch(r){throw o&&new p(e,{...t,looseValidation:!1}),"string"==typeof r.message&&(r.message=r.message.replace(i,h)),r}if(this._hosts=h.split(","),!o){if(this.isSRV&&1!==this.hosts.length)throw new u("mongodb+srv URI cannot have multiple service names");if(this.isSRV&&this.hosts.some((e=>e.includes(":"))))throw new u("mongodb+srv URI cannot have port number")}var m;this.pathname||(this.pathname="/"),Object.setPrototypeOf(this.searchParams,(m=this.searchParams.constructor,class extends m{append(e,t){return super.append(this._normalizeKey(e),t)}delete(e){return super.delete(this._normalizeKey(e))}get(e){return super.get(this._normalizeKey(e))}getAll(e){return super.getAll(this._normalizeKey(e))}has(e){return super.has(this._normalizeKey(e))}set(e,t){return super.set(this._normalizeKey(e),t)}keys(){return super.keys()}values(){return super.values()}entries(){return super.entries()}[Symbol.iterator](){return super[Symbol.iterator]()}_normalizeKey(e){return a.prototype._normalizeKey.call(this,e)}}).prototype)}get host(){return i}set host(e){throw new Error("No single host for connection string")}get hostname(){return i}set hostname(e){throw new Error("No single host for connection string")}get port(){return""}set port(e){throw new Error("No single host for connection string")}get href(){return this.toString()}set href(e){throw new Error("Cannot set href for connection strings")}get isSRV(){return this.protocol.includes("srv")}get hosts(){return this._hosts}set hosts(e){this._hosts=e}toString(){return super.toString().replace(i,this.hosts.join(","))}clone(){return new p(this.toString(),{looseValidation:!0})}redact(e){return(0,n.redactValidConnectionString)(this,e)}typedSearchParams(){return this.searchParams}[Symbol.for("nodejs.util.inspect.custom")](){const{href:e,origin:t,protocol:o,username:r,password:n,hosts:i,pathname:s,search:a,searchParams:l,hash:u}=this;return{href:e,origin:t,protocol:o,username:r,password:n,hosts:i,pathname:s,search:a,searchParams:l,hash:u}}}t.ConnectionString=p,t.CommaAndColonSeparatedRecord=class extends a{constructor(e){super();for(const t of(e??"").split(",")){if(!t)continue;const e=t.indexOf(":");-1===e?this.set(t,""):this.set(t.slice(0,e),t.slice(e+1))}}toString(){return[...this].map((e=>e.join(":"))).join(",")}},t.default=p},36431:function(e,t){var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.classesList=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return null!=e&&""!==e})).join(" ")};var r=function(){function e(){for(var e=this,t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];this.classesMap={},t.forEach((function(t){e.classesMap[t]=!0}))}return e.prototype.setClass=function(t,r){if(!!this.classesMap[t]==r)return this;var n=new e;return n.classesMap=o({},this.classesMap),n.classesMap[t]=r,n},e.prototype.toString=function(){var e=this;return Object.keys(this.classesMap).filter((function(t){return e.classesMap[t]})).join(" ")},e}();t.CssClasses=r,t.isComponentStateless=function(e){return"function"==typeof e&&!(e.prototype&&e.prototype.isReactComponent)||"object"==typeof e&&e.$$typeof===("function"==typeof Symbol&&Symbol.for?Symbol.for("react.memo"):60115)}},36743:(e,t,o)=>{o.d(t,{A:()=>g});const r={strip:["script"],clobberPrefix:"user-content-",clobber:["name","id"],ancestors:{tbody:["table"],tfoot:["table"],thead:["table"],td:["table"],th:["table"],tr:["table"]},protocols:{href:["http","https","mailto","xmpp","irc","ircs"],cite:["http","https"],src:["http","https"],longDesc:["http","https"]},tagNames:["h1","h2","h3","h4","h5","h6","br","b","i","strong","em","a","pre","code","img","tt","div","ins","del","sup","sub","p","ol","ul","table","thead","tbody","tfoot","blockquote","dl","dt","dd","kbd","q","samp","var","hr","ruby","rt","rp","li","tr","td","th","s","strike","summary","details","caption","figure","figcaption","abbr","bdo","cite","dfn","mark","small","span","time","wbr","input"],attributes:{a:["href"],img:["src","longDesc"],input:[["type","checkbox"],["disabled",!0]],li:[["className","task-list-item"]],div:["itemScope","itemType"],blockquote:["cite"],del:["cite"],ins:["cite"],q:["cite"],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","ariaDescribedBy","ariaHidden","ariaLabel","ariaLabelledBy","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","cols","colSpan","color","compact","coords","dateTime","dir","disabled","encType","htmlFor","frame","headers","height","hrefLang","hSpace","isMap","id","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rel","rev","rows","rowSpan","rules","scope","selected","shape","size","span","start","summary","tabIndex","target","title","type","useMap","vAlign","value","vSpace","width","itemProp"]},required:{input:{type:"checkbox",disabled:!0}}},n={}.hasOwnProperty,i={root:{children:a},doctype:function(e){return e.allowDoctypes?{name:l}:void 0},comment:function(e){return e.allowComments?{value:p}:void 0},element:{tagName:u,properties:function(e,t,o,r){const i=u(e,o.tagName,0,r),s=e.attributes||{},a=e.required||{},l=t||{},p=Object.assign({},f(s["*"]),f(i&&n.call(s,i)?s[i]:[])),c={};let g;for(g in l)if(n.call(l,g)){let t,o=l[g];if(n.call(p,g))t=p[g];else{if(!((m=g).length>4&&"data"===m.slice(0,4).toLowerCase()&&n.call(p,"data*")))continue;t=p["data*"]}o=Array.isArray(o)?d(e,o,g,t):h(e,o,g,t),null!=o&&(c[g]=o)}var m;if(i&&n.call(a,i))for(g in a[i])n.call(c,g)||(c[g]=a[i][g]);return c},children:a},text:{value:function(e,t){return"string"==typeof t?t:""}},"*":{data:c,position:c}};function s(e,t,o){const r=t&&t.type,s={type:t.type};let a;if(n.call(i,r)){let l=i[r];if("function"==typeof l&&(l=l(e,t)),l){const r=Object.assign({},l,i["*"]);let u;for(u in a=!0,r)if(n.call(r,u)){const n=r[u](e,t[u],t,o);!1===n?(a=void 0,s[u]=t[u]):null!=n&&(s[u]=n)}}}return a?s:"element"===s.type&&e.strip&&!e.strip.includes(s.tagName)?s.children:void 0}function a(e,t,o,r){const n=[];if(Array.isArray(t)){let i=-1;for("element"===o.type&&r.push(o.tagName);++i<t.length;){const o=s(e,t[i],r);o&&(Array.isArray(o)?n.push(...o):n.push(o))}"element"===o.type&&r.pop()}return n}function l(){return"html"}function u(e,t,o,r){const i="string"==typeof t?t:"";let s=-1;if(!i||"*"===i||e.tagNames&&!e.tagNames.includes(i))return!1;if(e.ancestors&&n.call(e.ancestors,i)){for(;++s<e.ancestors[i].length;)if(r.includes(e.ancestors[i][s]))return i;return!1}return i}function p(e,t){const o="string"==typeof t?t:"",r=o.indexOf("--\x3e");return r<0?o:o.slice(0,r)}function c(e,t){return t}function d(e,t,o,r){let n=-1;const i=[];for(;++n<t.length;){const s=h(e,t[n],o,r);null!=s&&i.push(s)}return i}function h(e,t,o,r){if(("boolean"==typeof t||"number"==typeof t||"string"==typeof t)&&function(e,t,o){const r=String(t),i=r.indexOf(":"),s=r.indexOf("?"),a=r.indexOf("#"),l=r.indexOf("/"),u=e.protocols&&n.call(e.protocols,o)?e.protocols[o].concat():[];let p=-1;if(0===u.length||i<0||l>-1&&i>l||s>-1&&i>s||a>-1&&i>a)return!0;for(;++p<u.length;)if(i===u[p].length&&r.slice(0,u[p].length)===u[p])return!0;return!1}(e,t,o)&&(0===r.length||r.some((e=>e&&"object"==typeof e&&"flags"in e?e.test(String(t)):e===t))))return e.clobberPrefix&&e.clobber&&e.clobber.includes(o)?e.clobberPrefix+t:t}function f(e){const t={};let o=-1;for(;++o<e.length;){const r=e[o];Array.isArray(r)?t[r[0]]=r.slice(1):t[r]=[]}return t}function g(e=r){return t=>function(e,t){let o={type:"root",children:[]};if(e&&"object"==typeof e&&e.type){const n=s(Object.assign({},r,t||{}),e,[]);n&&(Array.isArray(n)?1===n.length?o=n[0]:o.children=n:o=n)}return o}(t,e)}},37385:(e,t,o)=>{e.exports=function(e){var t=o.nc;t&&e.setAttribute("nonce",t)}},41320:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.showJsComp=function(e,t,r,n){if(e&&!e.componentFromFramework){var i=e.newAgStackInstance();if(i){var s,a,l=!1;return i.then((function(e){l?t.destroyBean(e):(a=(s=e).getGui(),r.appendChild(a),o(n,s))})),function(){l=!0,s&&(a&&a.parentElement&&a.parentElement.removeChild(a),t.destroyBean(s),n&&o(n,void 0))}}}};var o=function(e,t){e&&(e instanceof Function?e(t):e.current=t)};t.createSyncJsComp=function(e){var t=e.newAgStackInstance();if(t)return t.resolveNow(null,(function(e){return e}))}},41612:function(e,t,o){var r,n=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)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=o(96652),l=o(46410),u=o(61146),p=o(29072),c=o(67994),d=s(o(83178)),h=function(e){function t(t,o,r){var n=e.call(this,t,o,r)||this;return n.oldPortal=null,n.key=d.default(),n.portalKey=d.default(),n}return n(t,e),t.prototype.init=function(e){var t=this;return this.eParentElement=this.createParentElement(e),this.params=e,this.createOrUpdatePortal(e),new u.AgPromise((function(e){return t.createReactComponent(e)}))},t.prototype.createOrUpdatePortal=function(e){var t=this;this.isStatelessComponent()||(e.ref=function(e){t.componentInstance=e,t.addParentContainerStyleAndClasses()}),this.reactElement=a.createElement(this.reactComponent,i(i({},e),{key:this.key})),this.portal=l.createPortal(this.reactElement,this.eParentElement,this.portalKey)},t.prototype.createReactComponent=function(e){this.portalManager.mountReactPortal(this.portal,this,(function(t){e(t)}))},t.prototype.isNullValue=function(){return this.valueRenderedIsNull(this.params)},t.prototype.rendered=function(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())},t.prototype.valueRenderedIsNull=function(e){if(!this.componentType.cellRenderer)return!1;var t=console.error;try{return console.error=function(){},""===c.renderToStaticMarkup(a.createElement(this.reactComponent,e))}catch(e){}finally{console.error=t}return!1},t.prototype.refreshComponent=function(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)},t.prototype.fallbackMethod=function(e,t){var o=this[e+"Component"];if(o)return o.bind(this)(t)},t.prototype.fallbackMethodAvailable=function(e){return!!this[e+"Component"]},t}(p.ReactComponent);t.NewReactComponent=h},42447:(e,t,o)=>{t.AgGridReact=o(99807).AgGridReact,o(60372).AgGridColumn,o(24004).ChangeDetectionStrategyType,o(1743).AgGridReactUi},45013:function(e,t,o){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},r.apply(this,arguments)},n=this&&this.__spreadArrays||function(){for(var e=0,t=0,o=arguments.length;t<o;t++)e+=arguments[t].length;var r=Array(e),n=0;for(t=0;t<o;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,n++)r[n]=i[s];return r},i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(o(96652)),l=o(61146),u=o(41320),p=o(36431),c=o(17642),d=s(o(17189)),h=o(30345);t.default=a.memo((function(e){var t=a.useContext(c.BeansContext).context,o=e.rowCtrl,i=e.containerType,s=a.useState(),f=s[0],g=s[1],m=a.useState(),y=m[0],v=m[1],C=a.useState(),w=C[0],E=C[1],_=a.useState(),S=_[0],R=_[1],b=a.useState(),O=b[0],P=b[1],T=a.useState(),A=T[0],D=T[1],I=a.useState({list:[],instanceIdMap:new Map}),N=I[0],x=I[1],M=a.useState(),L=M[0],F=M[1],G=a.useState(!1),k=G[0],V=G[1],H=a.useState(o.getInitialRowTop()),W=H[0],j=H[1],B=a.useState(o.getInitialTransform()),U=B[0],Y=B[1],z=a.useRef(null),K=a.useRef(),$=a.useRef(!1),q=a.useState(0),Z=q[0],X=q[1];a.useEffect((function(){var e;if(!$.current&&L&&!(Z>10)){var t=null===(e=z.current)||void 0===e?void 0:e.firstChild;t?(o.setupDetailRowAutoHeight(t),$.current=!0):X((function(e){return e+1}))}}),[L,Z]);var Q=a.useMemo((function(){return new l.CssClassManager((function(){return z.current}))}),[]);h.useLayoutEffectOnce((function(){if(o.isAlive()){var e={setTop:function(e){return j(e)},setTransform:function(e){return Y(e)},addOrRemoveCssClass:function(e,t){return Q.addOrRemoveCssClass(e,t)},setDomOrder:function(e){return V(e)},setRowIndex:function(e){return g(e)},setRowId:function(e){return v(e)},setRowBusinessKey:function(e){return R(e)},setTabIndex:function(e){return P(e)},setUserStyles:function(e){return D(e)},setRole:function(e){return E(e)},setCellCtrls:function(e){return x((function(t){return function(e,t,o){if(o){var r={list:t,instanceIdMap:new Map};return t.forEach((function(e){return r.instanceIdMap.set(e.getInstanceId(),e)})),r}var i=[],s=[],a=new Map,l=new Map;return t.forEach((function(e){return l.set(e.getInstanceId(),e)})),e.list.forEach((function(e){var t=e.getInstanceId();l.has(t)&&(i.push(e),a.set(t,e))})),t.forEach((function(t){var o=t.getInstanceId();e.instanceIdMap.has(o)||(s.push(t),a.set(o,t))})),{list:n(i,s),instanceIdMap:a}}(t,e,k)}))},showFullWidth:function(e){return F(e)},getFullWidthCellRenderer:function(){return K.current}};o.setComp(e,z.current,i)}})),a.useEffect((function(){return u.showJsComp(L,t,z.current,K)}),[L]);var J,ee=a.useMemo((function(){var e={top:W,transform:U};return Object.assign(e,A),e}),[W,U,A]),te=L&&L.componentFromFramework,oe=null!=N,re=a.useMemo((function(){var e;return!(!(null===(e=L)||void 0===e?void 0:e.componentFromFramework)||!p.isComponentStateless(L.componentClass))}),[L]);return a.default.createElement("div",{ref:z,role:w,style:ee,"row-index":f,"row-id":y,"row-business-key":S,tabIndex:O},oe&&N.list.map((function(e){return a.default.createElement(d.default,{cellCtrl:e,editingRow:o.isEditing(),printLayout:o.isPrintLayout(),key:e.getInstanceId()})})),te&&(J=L.componentClass,a.default.createElement(a.default.Fragment,null,re&&a.default.createElement(J,r({},L.params)),!re&&a.default.createElement(J,r({},L.params,{ref:K})))))}))},45928:function(e,t,o){var r,n=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(t,o);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,n)}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[t.length]=o);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o=r(e),s=0;s<o.length;s++)"default"!==o[s]&&n(t,e,o[s]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.redactValidConnectionString=function(e,t){const o=e.clone(),r=t?.replacementString??"_credentials_",n=t?.redactUsernames??!0;if((o.username||o.password)&&n?(o.username=r,o.password=""):o.password&&(o.password=r),o.searchParams.has("authMechanismProperties")){const e=new a.CommaAndColonSeparatedRecord(o.searchParams.get("authMechanismProperties"));e.get("AWS_SESSION_TOKEN")&&(e.set("AWS_SESSION_TOKEN",r),o.searchParams.set("authMechanismProperties",e.toString()))}return o.searchParams.has("tlsCertificateKeyFilePassword")&&o.searchParams.set("tlsCertificateKeyFilePassword",r),o.searchParams.has("proxyUsername")&&n&&o.searchParams.set("proxyUsername",r),o.searchParams.has("proxyPassword")&&o.searchParams.set("proxyPassword",r),o},t.redactConnectionString=function(e,t){const o=t?.replacementString??"<credentials>",r=t?.redactUsernames??!0;let n;try{n=new a.default(e)}catch{}if(n)return t={...t,replacementString:"___credentials___"},n.redact(t).toString().replace(/___credentials___/g,o);const i=o,s=[e=>e.replace(r?/(\/\/)(.*)(@)/g:/(\/\/[^@]*:)(.*)(@)/g,`$1${i}$3`),e=>e.replace(/(AWS_SESSION_TOKEN(:|%3A))([^,&]+)/gi,`$1${i}`),e=>e.replace(/(tlsCertificateKeyFilePassword=)([^&]+)/gi,`$1${i}`),e=>r?e.replace(/(proxyUsername=)([^&]+)/gi,`$1${i}`):e,e=>e.replace(/(proxyPassword=)([^&]+)/gi,`$1${i}`)];for(const t of s)e=t(e);return e};const a=s(o(8069))},46984:function(e,t,o){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},r.apply(this,arguments)},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=o(61146),s=n(o(96652)),a=o(17642),l=o(41320),u=o(30345),p=o(36431),c=s.forwardRef((function(e,t){var o=s.useContext(a.BeansContext).context,n=s.useRef(null),d=s.useRef(null),h=s.useRef(null),f=s.useRef(null),g=s.useRef(null),m=s.useState(),y=m[0],v=m[1],C=s.useState(),w=C[0],E=C[1],_=s.useState(),S=_[0],R=_[1],b=s.useState(new p.CssClasses),O=b[0],P=b[1],T=s.useState(new p.CssClasses("ag-hidden")),A=T[0],D=T[1],I=s.useState(new p.CssClasses("ag-hidden")),N=I[0],x=I[1],M=s.useState(new p.CssClasses("ag-invisible")),L=M[0],F=M[1];s.useImperativeHandle(t,(function(){return{refresh:function(){return!1}}})),s.useEffect((function(){return l.showJsComp(y,o,d.current)}),[y]),u.useEffectOnce((function(){var t={setInnerRenderer:function(e,t){v(e),R(t)},setChildCount:function(e){return E(e)},addOrRemoveCssClass:function(e,t){return P((function(o){return o.setClass(e,t)}))},setContractedDisplayed:function(e){return x((function(t){return t.setClass("ag-hidden",!e)}))},setExpandedDisplayed:function(e){return D((function(t){return t.setClass("ag-hidden",!e)}))},setCheckboxVisible:function(e){return F((function(t){return t.setClass("ag-invisible",!e)}))}},r=o.createBean(new i.GroupCellRendererCtrl);return r.init(t,n.current,h.current,f.current,g.current,c,e),function(){o.destroyBean(r)}}));var G=s.useMemo((function(){return"ag-cell-wrapper "+O.toString()}),[O]),k=s.useMemo((function(){return"ag-group-expanded "+A.toString()}),[A]),V=s.useMemo((function(){return"ag-group-contracted "+N.toString()}),[N]),H=s.useMemo((function(){return"ag-group-checkbox "+L.toString()}),[L]),W=y&&y.componentFromFramework,j=W?y.componentClass:void 0,B=null==y&&null!=S,U=i._.escapeString(S,!0);return s.default.createElement("span",r({className:G,ref:n},e.colDef?{}:{role:"gridcell"}),s.default.createElement("span",{className:k,ref:f}),s.default.createElement("span",{className:V,ref:g}),s.default.createElement("span",{className:H,ref:h}),s.default.createElement("span",{className:"ag-group-value",ref:d},B&&s.default.createElement(s.default.Fragment,null,U),W&&s.default.createElement(j,r({},y.params))),s.default.createElement("span",{className:"ag-group-child-count"},w))}));t.default=c},47772:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CommaAndColonSeparatedRecord=t.ConnectionString=t.redactConnectionString=void 0;const r=o(21655),n=o(66099);Object.defineProperty(t,"redactConnectionString",{enumerable:!0,get:function(){return n.redactConnectionString}});const i="__this_is_a_placeholder__",s=/^(?<protocol>[^/]+):\/\/(?:(?<username>[^:@]*)(?::(?<password>[^@]*))?@)?(?<hosts>(?!:)[^/?@]*)(?<rest>.*)/;class a extends Map{delete(e){return super.delete(this._normalizeKey(e))}get(e){return super.get(this._normalizeKey(e))}has(e){return super.has(this._normalizeKey(e))}set(e,t){return super.set(this._normalizeKey(e),t)}_normalizeKey(e){e=`${e}`;for(const t of this.keys())if(t.toLowerCase()===e.toLowerCase()){e=t;break}return e}}class l extends r.URL{}class u extends Error{get name(){return"MongoParseError"}}class p extends l{_hosts;constructor(e,t={}){const{looseValidation:o}=t;if(!o&&!(r=e).startsWith("mongodb://")&&!r.startsWith("mongodb+srv://"))throw new u('Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"');var r;const n=e.match(s);if(!n)throw new u("Invalid connection string");const{protocol:l,username:c,password:d,hosts:h,rest:f}=n.groups??{};if(!o){if(!l||!h)throw new u("Protocol and host list are required in the uri");try{decodeURIComponent(c??""),decodeURIComponent(d??"")}catch(e){throw new u(e.message)}const t=/[:/?#[\]@]/gi;if(c?.match(t))throw new u(`Username contains unescaped characters ${c}`);if(!c||!d){const t=e.replace(`${l}://`,"");if(t.startsWith("@")||t.startsWith(":"))throw new u("URI contained empty userinfo section")}if(d?.match(t))throw new u("Password contains unescaped characters");if(f?.match(/^[^/?]*@/))throw new u("Invalid connection string")}let g="";"string"==typeof c&&(g+=c),"string"==typeof d&&(g+=`:${d}`),g&&(g+="@");try{super(`${l.toLowerCase()}://${g}${i}${f}`)}catch(r){throw o&&new p(e,{...t,looseValidation:!1}),"string"==typeof r.message&&(r.message=r.message.replace(i,h)),r}if(this._hosts=h.split(","),!o){if(this.isSRV&&1!==this.hosts.length)throw new u("mongodb+srv URI cannot have multiple service names");if(this.isSRV&&this.hosts.some((e=>e.includes(":"))))throw new u("mongodb+srv URI cannot have port number")}var m;this.pathname||(this.pathname="/"),Object.setPrototypeOf(this.searchParams,(m=this.searchParams.constructor,class extends m{append(e,t){return super.append(this._normalizeKey(e),t)}delete(e){return super.delete(this._normalizeKey(e))}get(e){return super.get(this._normalizeKey(e))}getAll(e){return super.getAll(this._normalizeKey(e))}has(e){return super.has(this._normalizeKey(e))}set(e,t){return super.set(this._normalizeKey(e),t)}keys(){return super.keys()}values(){return super.values()}entries(){return super.entries()}[Symbol.iterator](){return super[Symbol.iterator]()}_normalizeKey(e){return a.prototype._normalizeKey.call(this,e)}}).prototype)}get host(){return i}set host(e){throw new Error("No single host for connection string")}get hostname(){return i}set hostname(e){throw new Error("No single host for connection string")}get port(){return""}set port(e){throw new Error("No single host for connection string")}get href(){return this.toString()}set href(e){throw new Error("Cannot set href for connection strings")}get isSRV(){return this.protocol.includes("srv")}get hosts(){return this._hosts}set hosts(e){this._hosts=e}toString(){return super.toString().replace(i,this.hosts.join(","))}clone(){return new p(this.toString(),{looseValidation:!0})}redact(e){return(0,n.redactValidConnectionString)(this,e)}typedSearchParams(){return this.searchParams}[Symbol.for("nodejs.util.inspect.custom")](){const{href:e,origin:t,protocol:o,username:r,password:n,hosts:i,pathname:s,search:a,searchParams:l,hash:u}=this;return{href:e,origin:t,protocol:o,username:r,password:n,hosts:i,pathname:s,search:a,searchParams:l,hash:u}}}t.ConnectionString=p,t.CommaAndColonSeparatedRecord=class extends a{constructor(e){super();for(const t of(e??"").split(",")){if(!t)continue;const e=t.indexOf(":");-1===e?this.set(t,""):this.set(t.slice(0,e),t.slice(e+1))}}toString(){return[...this].map((e=>e.join(":"))).join(",")}},t.default=p},52455:function(e,t,o){var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(61146),s=r(o(96652)),a=o(17642),l=n(o(21727)),u=n(o(32756)),p=n(o(15403)),c=o(30345),d=o(36431);t.default=s.memo((function(e){var t=e.context,o=s.useState(""),r=o[0],n=o[1],h=s.useState(""),f=h[0],g=h[1],m=s.useState(""),y=m[0],v=m[1],C=s.useState(null),w=C[0],E=C[1],_=s.useState(null),S=_[0],R=_[1],b=s.useState(!1),O=b[0],P=b[1],T=s.useState(),A=T[0],D=T[1],I=s.useRef(null),N=s.useRef(null),x=s.useRef(),M=s.useRef(null),L=s.useRef((function(){})),F=s.useCallback((function(){}),[]),G=s.useMemo((function(){return t.getBean("beans")}),[]);u.default(" AG Grid ",N),c.useEffectOnce((function(){var e=I.current=t.createBean(new i.GridCtrl);return function(){t.destroyBean(e),I.current=null}})),c.useEffectOnce((function(){var e=I.current;L.current=e.focusInnerElement.bind(e);var t={destroyGridUi:function(){},setRtlClass:n,addOrRemoveKeyboardFocusClass:function(e){return g(e?i.FocusService.AG_KEYBOARD_FOCUS:"")},forceFocusOutOfContainer:function(){x.current.forceFocusOutOfContainer()},updateLayoutClasses:v,getFocusableContainers:function(){var e=[],t=N.current.querySelector(".ag-root"),o=N.current.querySelector(".ag-side-bar");return t&&e.push(t),o&&e.push(o),e},setCursor:E,setUserSelect:R};e.setComp(t,N.current,N.current),P(!0)})),s.useEffect((function(){if(A){var e=I.current,o=[],r=G.agStackComponentsRegistry,n=r.getComponentClass("AG-GRID-HEADER-DROP-ZONES"),i=r.getComponentClass("AG-SIDE-BAR"),s=r.getComponentClass("AG-STATUS-BAR"),a=r.getComponentClass("AG-WATERMARK"),l=r.getComponentClass("AG-PAGINATION"),u=[],p=N.current,c=M.current;if(e.showDropZones()&&n){var d=t.createBean(new n),h=d.getGui();p.insertAdjacentElement("afterbegin",h),u.push(h),o.push(d)}if(e.showSideBar()&&i){var f=t.createBean(new i),g=(h=f.getGui(),c.querySelector(".ag-tab-guard-bottom"));g&&(g.insertAdjacentElement("beforebegin",h),u.push(h)),o.push(f)}if(e.showStatusBar()&&s){var m=t.createBean(new s);h=m.getGui(),p.insertAdjacentElement("beforeend",h),u.push(h),o.push(m)}if(l){var y=t.createBean(new l);h=y.getGui(),p.insertAdjacentElement("beforeend",h),u.push(h),o.push(y)}if(e.showWatermark()&&a){var v=t.createBean(new a);h=v.getGui(),p.insertAdjacentElement("beforeend",h),u.push(h),o.push(v)}return function(){t.destroyBeans(o),u.forEach((function(e){e.parentElement&&e.parentElement.removeChild(e)}))}}}),[A]);var k=s.useMemo((function(){return d.classesList("ag-root-wrapper",r,f,y)}),[r,f,y]),V=s.useMemo((function(){return d.classesList("ag-root-wrapper-body","ag-focus-managed",y)}),[y]),H=s.useMemo((function(){return{userSelect:null!=S?S:"",WebkitUserSelect:null!=S?S:"",cursor:null!=w?w:""}}),[S,w]),W=M.current,j=s.useCallback((function(e){x.current=e,D(!0)}),[]);return s.default.createElement("div",{ref:N,className:k,style:H,role:"presentation"},s.default.createElement("div",{className:V,ref:M,role:"presentation"},O&&W&&s.default.createElement(a.BeansContext.Provider,{value:G},s.default.createElement(p.default,{ref:j,eFocusableElement:W,onTabKeyDown:F,gridCtrl:I.current},s.default.createElement(l.default,null)))))}))},56318:function(e,t,o){var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(o(96652)),s=o(17642),a=o(61146),l=o(36431),u=n(o(22813)),p=o(30345);t.default=i.memo((function(){var e=i.useState(new l.CssClasses),t=e[0],o=e[1],r=i.useState(),n=r[0],c=r[1],d=i.useContext(s.BeansContext).context,h=i.useRef(null);p.useEffectOnce((function(){var e={addOrRemoveCssClass:function(e,t){return o((function(o){return o.setClass(e,t)}))},setHeightAndMinHeight:function(e){return c(e)}},t=d.createBean(new a.GridHeaderCtrl);return t.setComp(e,h.current,h.current),function(){d.destroyBean(t)}}));var f=i.useMemo((function(){return"ag-header "+t.toString()}),[t]),g=i.useMemo((function(){return{height:n,minHeight:n}}),[n]);return i.default.createElement("div",{ref:h,className:f,style:g,role:"presentation"},i.default.createElement(u.default,{pinned:a.Constants.PINNED_LEFT}),i.default.createElement(u.default,{pinned:null}),i.default.createElement(u.default,{pinned:a.Constants.PINNED_RIGHT}))}))},56565:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t),t}},60372:function(e,t,o){var r,n=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)}),i=this&&this.__rest||function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]])}return o},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=s(o(96652)),u=a(o(75342)),p=s(o(61146)),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){return null},t.mapChildColumnDefs=function(e){return l.default.Children.map(e,(function(e){return e?t.toColDef(e.props):null}))},t.toColDef=function(e){var o=e.children,r=i(e,["children"]);return t.hasChildColumns(o)&&(r.children=t.mapChildColumnDefs(o)),r},t.hasChildColumns=function(e){return l.default.Children.count(e)>0},t}(l.Component);function d(e,t){e.forEach((function(e){c[e]=t}))}t.AgGridColumn=c,d(p.ColDefUtil.BOOLEAN_PROPERTIES,u.default.bool),d(p.ColDefUtil.STRING_PROPERTIES,u.default.string),d(p.ColDefUtil.OBJECT_PROPERTIES,u.default.object),d(p.ColDefUtil.ARRAY_PROPERTIES,u.default.array),d(p.ColDefUtil.NUMBER_PROPERTIES,u.default.number),d(p.ColDefUtil.FUNCTION_PROPERTIES,u.default.func)},61146:(e,t,o)=>{function r(e){return null==e||""===e?null:e}function n(e,t){return void 0===t&&(t=!1),null!=e&&(""!==e||t)}function i(e){return!n(e)}function s(e){return null==e||0===e.length}function a(e){return null!=e&&"function"==typeof e.toString?e.toString():null}function l(e){if(void 0!==e){if(null===e||""===e)return null;if("number"==typeof e)return isNaN(e)?void 0:e;var t=parseInt(e,10);return isNaN(t)?void 0:t}}function u(e){if(void 0!==e)return null!==e&&""!==e&&("boolean"==typeof e?e:/true/i.test(e))}function p(e,t,o){void 0===o&&(o=!1);var r=null==e,n=null==t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),r&&n)return 0;if(r)return-1;if(n)return 1;function i(e,t){return e>t?1:e<t?-1:0}if("string"!=typeof e)return i(e,t);if(!o)return i(e,t);try{return e.localeCompare(t)}catch(o){return i(e,t)}}function c(e){if(e instanceof Set||e instanceof Map){var t=[];return e.forEach((function(e){return t.push(e)})),t}return Object.values(e)}o.r(t),o.d(t,{AbstractHeaderCellCtrl:()=>Fu,AgAbstractField:()=>kn,AgAngleSelect:()=>qc,AgCheckbox:()=>Ju,AgColorPicker:()=>sd,AgDialog:()=>nd,AgGroupComponent:()=>ud,AgInputNumberField:()=>Wc,AgInputRange:()=>Bc,AgInputTextArea:()=>Vc,AgInputTextField:()=>Gc,AgMenuItemComponent:()=>Rd,AgMenuList:()=>Cd,AgMenuPanel:()=>Ed,AgPanel:()=>td,AgPromise:()=>sn,AgPromiseStatus:()=>Jr,AgRadioButton:()=>xc,AgSelect:()=>zn,AgSlider:()=>zc,AgStackComponentsRegistry:()=>ho,AgToggleButton:()=>Lc,AlignedGridsService:()=>Kd,AllCommunityModules:()=>nm,AnimateShowChangeCellRenderer:()=>Qi,AnimateSlideCellRenderer:()=>es,AnimationFrameService:()=>$p,AutoScrollService:()=>Oa,AutoWidthCalculator:()=>oc,Autowired:()=>z,BarColumnLabelPlacement:()=>Jf,BaseComponentWrapper:()=>eg,BaseCreator:()=>jg,BaseGridSerializingSession:()=>Bg,Bean:()=>Y,BeanStub:()=>Ge,Beans:()=>Za,BodyDropPivotTarget:()=>gu,BodyDropTarget:()=>wu,CHART_TOOLBAR_ALLOW_LIST:()=>rg,CHART_TOOL_PANEL_ALLOW_LIST:()=>og,CHART_TOOL_PANEL_MENU_OPTIONS:()=>ng,CellComp:()=>au,CellCtrl:()=>al,CellNavigationService:()=>Ud,CellPositionUtils:()=>ff,CellRangeType:()=>La,ChangedPath:()=>wc,CheckboxSelectionComponent:()=>ls,ClientSideRowModelModule:()=>Ig,ClientSideRowModelSteps:()=>Iu,ColDefUtil:()=>et,Color:()=>go,Column:()=>se,ColumnApi:()=>Qd,ColumnFactory:()=>He,ColumnGroup:()=>Ce,ColumnKeyCreator:()=>h,ColumnModel:()=>so,ColumnUtils:()=>lo,Component:()=>mn,ComponentUtil:()=>at,Constants:()=>oe,Context:()=>W,CssClassApplier:()=>_u,CssClassManager:()=>dn,CsvCreator:()=>qg,CsvExportModule:()=>Jg,CtrlsService:()=>xf,CustomTooltipFeature:()=>cn,DEFAULT_CHART_GROUPS:()=>tg,DateFilter:()=>si,DisplayedGroupCreator:()=>po,Downloader:()=>Ug,DragAndDropService:()=>hs,DragService:()=>ua,DragSourceType:()=>ts,Environment:()=>Zh,EventService:()=>te,Events:()=>We,ExcelFactoryMode:()=>ds,ExpressionService:()=>nh,FilterManager:()=>ha,FloatingFilterMapper:()=>oa,FocusService:()=>Td,Grid:()=>Zf,GridApi:()=>Hu,GridBodyComp:()=>Kl,GridBodyCtrl:()=>Va,GridComp:()=>mh,GridCoreCreator:()=>Xf,GridCtrl:()=>hh,GridHeaderComp:()=>Np,GridHeaderCtrl:()=>Dp,GridOptionsWrapper:()=>eo,GridSerializer:()=>Qg,GroupCellRenderer:()=>Os,GroupCellRendererCtrl:()=>Ss,GroupInstanceIdCreator:()=>je,HeaderCellCtrl:()=>ip,HeaderFilterCellComp:()=>va,HeaderFilterCellCtrl:()=>$u,HeaderGroupCellCtrl:()=>hp,HeaderNavigationDirection:()=>Vu,HeaderNavigationService:()=>Pp,HeaderPositionUtils:()=>Of,HeaderRowComp:()=>Nu,HeaderRowContainerComp:()=>Rp,HeaderRowContainerCtrl:()=>Ep,HeaderRowCtrl:()=>yp,HeaderRowType:()=>Vl,HorizontalDirection:()=>rs,HorizontalResizeService:()=>Lp,InfiniteRowModelModule:()=>Wg,KeyCode:()=>jr,LargeTextCellEditor:()=>Wi,LayoutCssClasses:()=>sa,Logger:()=>ph,LoggerFactory:()=>uh,ManagedFocusFeature:()=>In,ModuleNames:()=>X,ModuleRegistry:()=>re,MouseEventService:()=>Jl,MoveColumnFeature:()=>yu,NavigationService:()=>ru,NumberFilter:()=>mi,NumberSequence:()=>rn,Optional:()=>K,PaginationProxy:()=>Tc,PinnedRowModel:()=>vc,PopupComponent:()=>Vi,PopupEditorWrapper:()=>iu,PopupSelectCellEditor:()=>zi,PopupService:()=>Md,PopupTextCellEditor:()=>Zi,PositionableFeature:()=>Jp,PostConstruct:()=>B,PreConstruct:()=>j,PreDestroy:()=>U,PropertyKeys:()=>rt,ProvidedColumnGroup:()=>we,ProvidedFilter:()=>Mn,Qualifier:()=>q,QuerySelector:()=>yn,RefSelector:()=>vn,ResizeObserverService:()=>Yp,RowAnimationCssClasses:()=>Ea,RowContainerComp:()=>hu,RowContainerCtrl:()=>Bl,RowContainerName:()=>pl,RowContainerType:()=>cl,RowCtrl:()=>hl,RowHighlightPosition:()=>Qn,RowNode:()=>ns,RowNodeBlock:()=>_c,RowNodeBlockLoader:()=>bc,RowNodeSorter:()=>If,RowPositionUtils:()=>df,RowRenderer:()=>cc,RowType:()=>cg,ScalarFilter:()=>ti,ScrollVisibleService:()=>Zl,SelectCellEditor:()=>Ui,SelectableService:()=>of,SelectionHandleType:()=>Ma,SelectionService:()=>Zd,ServerSideTransactionResultStatus:()=>Bp,SetLeftFeature:()=>ju,SimpleFilter:()=>Jn,SortController:()=>Eh,SortIndicatorComp:()=>Ii,StandardMenuFactory:()=>kp,StylingService:()=>Ic,TabGuardComp:()=>gd,TabGuardCtrl:()=>dd,TabbedLayout:()=>Wp,TemplateService:()=>sh,TextCellEditor:()=>$i,TextFilter:()=>wi,TextFloatingFilter:()=>Pi,Timer:()=>an,TouchListener:()=>Ti,UserComponentFactory:()=>ia,UserComponentRegistry:()=>ks,ValueCache:()=>Lh,ValueFormatterService:()=>gc,ValueService:()=>th,VanillaFrameworkOverrides:()=>Hd,VerticalDirection:()=>os,VirtualList:()=>Gd,XmlFactory:()=>tm,ZipContainer:()=>rm,_:()=>on,defaultGroupComparator:()=>Qf,getRowContainerTypeForName:()=>kl,simpleHttpRequest:()=>jp,stringToArray:()=>mo});var d=Object.freeze({__proto__:null,makeNull:r,exists:n,missing:i,missingOrEmpty:s,toStringOrNull:a,attrToNumber:l,attrToBoolean:u,attrToString:function(e){if(null!=e&&""!==e)return e},referenceCompare:function(e,t){return null==e&&null==t||(null!=e||null==t)&&(null==e||null!=t)&&e===t},jsonEquals:function(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)},defaultComparator:p,values:c}),h=function(){function e(){this.existingKeys={}}return e.prototype.addExistingKeys=function(e){for(var t=0;t<e.length;t++)this.existingKeys[e[t]]=!0},e.prototype.getUniqueKey=function(e,t){e=a(e);for(var o=0;;){var r=void 0;if(e?(r=e,0!==o&&(r+="_"+o)):t?(r=t,0!==o&&(r+="_"+o)):r=""+o,!this.existingKeys[r])return this.existingKeys[r]=!0,r;o++}},e}();function f(e,t){null!=e&&(Array.isArray(e)?e.forEach((function(e,o){return t(""+o,e)})):Object.keys(e).forEach((function(o){return t(o,e[o])})))}function g(e){for(var t={},o=Object.keys(e),r=0;r<o.length;r++){var n=o[r],i=e[n];t[n]=i}return t}function m(e,t){if(e){var o=e,r={};return Object.keys(o).forEach((function(e){if(!(t&&t.indexOf(e)>=0)){var n=o[e],i=b(n)&&n.constructor===Object;r[e]=i?m(n):n}})),r}}function y(e,t){return e[t]}function v(e,t,o){e[t]=o}function C(e,t,o,r){var n=y(e,o);void 0!==n&&v(t,o,r?r(n):n)}function w(e){var t={};return e.filter((function(e){return null!=e})).forEach((function(e){Object.keys(e).forEach((function(e){return t[e]=null}))})),Object.keys(t)}function E(e){if(!e)return[];var t=Object;if("function"==typeof t.values)return t.values(e);var o=[];for(var r in e)e.hasOwnProperty(r)&&e.propertyIsEnumerable(r)&&o.push(e[r]);return o}function _(e,t,o,r){void 0===o&&(o=!0),void 0===r&&(r=!1),n(t)&&f(t,(function(t,n){var i=e[t];i!==n&&(r&&null==i&&null!=n&&"object"==typeof n&&n.constructor===Object&&(i={},e[t]=i),b(n)&&b(i)&&!Array.isArray(i)?_(i,n,o,r):(o||void 0!==n)&&(e[t]=n))}))}function S(e,t,o){if(t&&e){if(!o)return e[t];for(var r=t.split("."),n=e,i=0;i<r.length;i++){if(null==n)return;n=n[r[i]]}return n}}function R(e,t){Object.keys(e).forEach((function(t){"object"==typeof e[t]&&(e[t]=void 0)}));var o=Object.getPrototypeOf(e),r={};Object.keys(o).forEach((function(e){"function"==typeof o[e]&&(r[e]={value:function(){console.warn("AG Grid: "+t+" function "+e+"() cannot be called as the grid has been destroyed.\n Please don't call grid API functions on destroyed grids - as a matter of fact you shouldn't\n be keeping the API reference, your application has a memory leak! Remove the API reference\n when the grid is destroyed.")},writable:!0})})),Object.defineProperties(e,r)}function b(e){return"object"==typeof e&&null!==e}var O=Object.freeze({__proto__:null,iterateObject:f,cloneObject:g,deepCloneObject:function(e){return JSON.parse(JSON.stringify(e))},deepCloneDefinition:m,getProperty:y,setProperty:v,copyPropertiesIfPresent:function(e,t){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];o.forEach((function(o){return C(e,t,o)}))},copyPropertyIfPresent:C,getAllKeysInObjects:w,getAllValuesInObject:E,mergeDeep:_,missingOrEmptyObject:function(e){return i(e)||0===Object.keys(e).length},get:function(e,t,o){if(null==e)return o;for(var r=t.split("."),n=e;r.length>1;)if(null==(n=n[r.shift()]))return o;var i=n[r[0]];return null!=i?i:o},set:function(e,t,o){if(null!=e){for(var r=t.split("."),n=e;r.length>1;)if(null==(n=n[r.shift()]))return;n[r[0]]=o}},deepFreeze:function e(t){return Object.freeze(t),c(t).forEach((function(t){(b(t)||"function"==typeof t)&&e(t)})),t},getValueUsingField:S,removeAllReferences:R,isNonNullObject:b}),P={};function T(e,t){P[t]||(e(),P[t]=!0)}function A(e){if(e.name)return e.name;var t=/function\s+([^\(]+)/.exec(e.toString());return t&&2===t.length?t[1].trim():null}function D(e){return!!(e&&e.constructor&&e.call&&e.apply)}function I(e){L(e,400)}var N=[],x=!1;function M(e){N.push(e),x||(x=!0,window.setTimeout((function(){var e=N.slice();N.length=0,x=!1,e.forEach((function(e){return e()}))}),0))}function L(e,t){void 0===t&&(t=0),e.length>0&&window.setTimeout((function(){return e.forEach((function(e){return e()}))}),t)}function F(e,t,o){var r;return void 0===o&&(o=!1),function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var s=this,a=o&&!r;window.clearTimeout(r),r=window.setTimeout((function(){r=null,o||e.apply(s,n)}),t),a&&e.apply(s,n)}}function G(e,t){var o=0;return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=(new Date).getTime();i-o<t||(o=i,e.apply(this,r))}}function k(e,t,o,r){void 0===o&&(o=100);var n=(new Date).getTime(),i=null,s=!1,a=function(){var a=(new Date).getTime()-n>o;(e()||a)&&(t(),s=!0,null!=i&&(window.clearInterval(i),i=null),a&&r&&console.warn(r))};a(),s||(i=window.setInterval(a,10))}function V(e){e&&e()}var H=Object.freeze({__proto__:null,doOnce:T,getFunctionName:A,isFunction:D,executeInAWhile:I,executeNextVMTurn:M,executeAfter:L,debounce:F,throttle:G,waitUntil:k,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)}},callIfPresent:V,noop:function(){}}),W=function(){function e(e,t){if(this.beanWrappers={},this.destroyed=!1,e&&e.beanClasses){this.contextParams=e,this.logger=t,this.logger.log(">> creating ag-Application Context"),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 c(this.beanWrappers).map((function(e){return e.beanInstance}))},e.prototype.createBean=function(e,t){if(!e)throw Error("Can't wire to bean since it is null");return this.wireBeans([e],t),e},e.prototype.wireBeans=function(e,t){this.autoWireBeans(e),this.methodWireBeans(e),this.callLifeCycleMethods(e,"preConstructMethods"),n(t)&&e.forEach(t),this.callLifeCycleMethods(e,"postConstructMethods")},e.prototype.createBeans=function(){var e=this;this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),f(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 n,i,s=e.getBeansForParameters(r,o.bean.name),a=(n=o.bean,i=[null].concat(s),new(n.bind.apply(n,i)));o.beanInstance=a}));var t=Object.keys(this.beanWrappers).join(", ");this.logger.log("created beans: "+t)},e.prototype.createBeanWrapper=function(e){var t=e.__agBeanMetaData;if(!t){var o;return o=e.prototype.constructor?A(e.prototype.constructor):""+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 n=o.agClassAttributes;n&&n.forEach((function(o){var n=t.lookupBeanInstance(r,o.beanName,o.optional);e[o.attributeName]=n}))}))}))},e.prototype.methodWireBeans=function(e){var t=this;e.forEach((function(e){t.forEachMetaDataInHierarchy(e,(function(o,r){f(o.autowireMethods,(function(o,n){if("agConstructor"!==o){var i=t.getBeansForParameters(n,r);e[o].apply(e,i)}}))}))}))},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,r=[];return e&&f(e,(function(e,n){var i=o.lookupBeanInstance(t,n);r[Number(e)]=i})),r},e.prototype.lookupBeanInstance=function(e,t,o){if(void 0===o&&(o=!1),"context"===t)return this;if(this.contextParams.providedBeanInstances&&this.contextParams.providedBeanInstances.hasOwnProperty(t))return this.contextParams.providedBeanInstances[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){return o.callLifeCycleMethodsOnBean(e,t)}))},e.prototype.callLifeCycleMethodsOnBean=function(e,t,o){var r={};this.forEachMetaDataInHierarchy(e,(function(e){var n=e[t];n&&n.forEach((function(e){e!=o&&(r[e]=!0)}))})),Object.keys(r).forEach((function(t){return e[t]()}))},e.prototype.getBean=function(e){return this.lookupBeanInstance("getBean",e,!0)},e.prototype.destroy=function(){if(!this.destroyed){this.logger.log(">> Shutting down ag-Application Context");var e=this.getBeanInstances();this.destroyBeans(e),this.contextParams.providedBeanInstances=null,this.destroyed=!0,this.logger.log(">> ag-Application Context shut down - component is dead")}},e.prototype.destroyBean=function(e){e&&this.destroyBeans([e])},e.prototype.destroyBeans=function(e){var t=this;return e?(e.forEach((function(e){t.callLifeCycleMethodsOnBean(e,"preDestroyMethods","destroy");var o=e;"function"==typeof o.destroy&&o.destroy()})),[]):[]},e}();function j(e,t,o){var r=Z(e.constructor);r.preConstructMethods||(r.preConstructMethods=[]),r.preConstructMethods.push(t)}function B(e,t,o){var r=Z(e.constructor);r.postConstructMethods||(r.postConstructMethods=[]),r.postConstructMethods.push(t)}function U(e,t,o){var r=Z(e.constructor);r.preDestroyMethods||(r.preDestroyMethods=[]),r.preDestroyMethods.push(t)}function Y(e){return function(t){Z(t).beanName=e}}function z(e){return function(t,o,r){$(t,e,!1,0,o,null)}}function K(e){return function(t,o,r){$(t,e,!0,0,o,null)}}function $(e,t,o,r,n,i){if(null!==t)if("number"!=typeof i){var s=Z(e.constructor);s.agClassAttributes||(s.agClassAttributes=[]),s.agClassAttributes.push({attributeName:n,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 q(e){return function(t,o,r){var n,i="function"==typeof t?t:t.constructor;if("number"==typeof r){var s=void 0;o?(n=Z(i),s=o):(n=Z(i),s="agConstructor"),n.autowireMethods||(n.autowireMethods={}),n.autowireMethods[s]||(n.autowireMethods[s]={}),n.autowireMethods[s][r]=e}}}function Z(e){return e.hasOwnProperty("__agBeanMetaData")||(e.__agBeanMetaData={}),e.__agBeanMetaData}var X,Q=function(){return Q=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},Q.apply(this,arguments)},J=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ee=function(e,t){return function(o,r){t(o,r,e)}},te=function(){function e(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}return e.prototype.setBeans=function(e,t,o,r){if(void 0===r&&(r=null),this.frameworkOverrides=o,this.gridOptionsWrapper=t,r){var n=t.useAsyncEvents();this.addGlobalListener(r,n)}},e.prototype.getListeners=function(e,t,o){var r=t?this.allAsyncListeners:this.allSyncListeners,n=r.get(e);return!n&&o&&(n=new Set,r.set(e,n)),n},e.prototype.noRegisteredListenersExist=function(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size},e.prototype.addEventListener=function(e,t,o){void 0===o&&(o=!1),this.getListeners(e,o,!0).add(t)},e.prototype.removeEventListener=function(e,t,o){void 0===o&&(o=!1);var r=this.getListeners(e,o,!1);r&&(r.delete(t),0===r.size&&(o?this.allAsyncListeners:this.allSyncListeners).delete(e))},e.prototype.addGlobalListener=function(e,t){void 0===t&&(t=!1),(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)},e.prototype.removeGlobalListener=function(e,t){void 0===t&&(t=!1),(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)},e.prototype.dispatchEvent=function(e){var t=e;this.gridOptionsWrapper&&(t=Q(Q({},e),{api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()})),this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0},e.prototype.dispatchEventOnce=function(e){this.firedEvents[e.type]||this.dispatchEvent(e)},e.prototype.dispatchToListeners=function(e,t){var o=this,r=e.type,n=this.getListeners(r,t,!1);n&&function(r){r.forEach((function(r){t?o.dispatchAsync((function(){return r(e)})):r(e)}))}(n),(t?this.globalAsyncListeners:this.globalSyncListeners).forEach((function(n){t?o.dispatchAsync((function(){return o.frameworkOverrides.dispatchEvent(r,(function(){return n(r,e)}),!0)})):o.frameworkOverrides.dispatchEvent(r,(function(){return n(r,e)}),!0)}))},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()}))},J([ee(0,q("loggerFactory")),ee(1,q("gridOptionsWrapper")),ee(2,q("frameworkOverrides")),ee(3,q("globalEventListener"))],e.prototype,"setBeans",null),J([Y("eventService")],e)}(),oe=function(){function e(){}return 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.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.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.SOURCE_PASTE="paste",e.PINNED_RIGHT="right",e.PINNED_LEFT="left",e.SORT_ASC="asc",e.SORT_DESC="desc",e.INPUT_SELECTOR="input, select, button, textarea",e.FOCUSABLE_SELECTOR="[tabindex], input, select, button, textarea",e.FOCUSABLE_EXCLUDE=".ag-hidden, .ag-hidden *, [disabled], .ag-disabled, .ag-disabled *",e}();!function(e){e.CommunityCoreModule="@ag-grid-community/core",e.CommunityAllModules="@ag-grid-community/all",e.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",e.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",e.CsvExportModule="@ag-grid-community/csv-export",e.EnterpriseCoreModule="@ag-grid-enterprise/core",e.EnterpriseAllModules="@ag-grid-enterprise/all",e.RowGroupingModule="@ag-grid-enterprise/row-grouping",e.ColumnToolPanelModule="@ag-grid-enterprise/column-tool-panel",e.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",e.MenuModule="@ag-grid-enterprise/menu",e.SetFilterModule="@ag-grid-enterprise/set-filter",e.MultiFilterModule="@ag-grid-enterprise/multi-filter",e.StatusBarModule="@ag-grid-enterprise/status-bar",e.SideBarModule="@ag-grid-enterprise/side-bar",e.RangeSelectionModule="@ag-grid-enterprise/range-selection",e.MasterDetailModule="@ag-grid-enterprise/master-detail",e.RichSelectModule="@ag-grid-enterprise/rich-select",e.GridChartsModule="@ag-grid-enterprise/charts",e.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",e.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",e.ExcelExportModule="@ag-grid-enterprise/excel-export",e.ClipboardModule="@ag-grid-enterprise/clipboard",e.SparklinesModule="@ag-grid-enterprise/sparklines",e.AngularModule="@ag-grid-community/angular",e.ReactModule="@ag-grid-community/react",e.VueModule="@ag-grid-community/vue",e.PolymerModule="@ag-grid-community/polymer"}(X||(X={}));var re=function(){function e(){}return e.register=function(t,o){void 0===o&&(o=!0),e.modulesMap[t.moduleName]=t,void 0===e.moduleBased?e.moduleBased=o:e.moduleBased!==o&&T((function(){console.warn("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) - you can only use one or the other of these mechanisms."),console.warn("Please see https://www.ag-grid.com/javascript-grid/packages-modules/ for more information.")}),"ModulePackageCheck")},e.registerModules=function(t,o){void 0===o&&(o=!0),t&&t.forEach((function(t){return e.register(t,o)}))},e.assertRegistered=function(t,o){if(this.isRegistered(t))return!0;var r,n=o+t;return r=e.moduleBased?"AG Grid: unable to use "+o+" as module "+t+" is not present. Please see: https://www.ag-grid.com/javascript-grid/modules/":"AG Grid: unable to use "+o+" as package 'ag-grid-enterprise' is not present. Please see: https://www.ag-grid.com/javascript-grid/packages/",T((function(){console.warn(r)}),n),!1},e.isRegistered=function(t){return!!e.modulesMap[t]},e.getRegisteredModules=function(){return c(e.modulesMap)},e.isPackageBased=function(){return!e.moduleBased},e.modulesMap={},e}(),ne=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ie=0,se=function(){function e(e,t,o,r){this.instanceId=ie++,this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.filterActive=!1,this.eventService=new te,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=o,this.primary=r,this.setState(e)}return e.prototype.getInstanceId=function(){return this.instanceId},e.prototype.setState=function(e){void 0!==e.sort?e.sort!==oe.SORT_ASC&&e.sort!==oe.SORT_DESC||(this.sort=e.sort):e.initialSort!==oe.SORT_ASC&&e.initialSort!==oe.SORT_DESC||(this.sort=e.initialSort);var t=l(e.sortIndex),o=l(e.initialSortIndex);void 0!==t?null!==t&&(this.sortIndex=t):null!==o&&(this.sortIndex=o);var r=u(e.hide),n=u(e.initialHide);this.visible=void 0!==r?!r:!n,void 0!==e.pinned?this.setPinned(e.pinned):this.setPinned(e.initialPinned);var i=l(e.flex),s=l(e.initialFlex);void 0!==i?this.flex=i:void 0!==s&&(this.flex=s)},e.prototype.setColDef=function(t,o){this.colDef=t,this.userProvidedColDef=o,this.initMinAndMaxWidths(),this.initDotNotation(),this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_COL_DEF_CHANGED,"api"))},e.prototype.getUserProvidedColDef=function(){return this.userProvidedColDef},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.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.validate()},e.prototype.initDotNotation=function(){var e=this.gridOptionsWrapper.isSuppressFieldDotNotation();this.fieldContainsDots=n(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=n(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e},e.prototype.initMinAndMaxWidths=function(){var e=this.colDef;this.minWidth=this.columnUtils.calculateColMinWidth(e),this.maxWidth=this.columnUtils.calculateColMaxWidth(e)},e.prototype.resetActualWidth=function(e){void 0===e&&(e="api");var t=this.columnUtils.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)},e.prototype.isEmptyGroup=function(){return!1},e.prototype.isRowGroupDisplayed=function(e){if(i(this.colDef)||i(this.colDef.showRowGroup))return!1;var t=!0===this.colDef.showRowGroup,o=this.colDef.showRowGroup===e;return t||o},e.prototype.isPrimary=function(){return this.primary},e.prototype.isFilterAllowed=function(){return!!this.colDef.filter||!!this.colDef.filterFramework},e.prototype.isFieldContainsDots=function(){return this.fieldContainsDots},e.prototype.isTooltipFieldContainsDots=function(){return this.tooltipFieldContainsDots},e.prototype.validate=function(){var e=this.colDef;function t(e,t,o){T((function(){o?console.warn(e,o):T((function(){return console.warn(e)}),t)}),t)}this.gridOptionsWrapper.isRowModelDefault()&&!re.isRegistered(X.RowGroupingModule)&&["enableRowGroup","rowGroup","rowGroupIndex","enablePivot","enableValue","pivot","pivotIndex","aggFunc"].forEach((function(o){n(e[o])&&(re.isPackageBased()?t("AG Grid: "+o+" is only valid in ag-grid-enterprise, your column definition should not have "+o,"ColumnRowGroupingMissing"+o):t("AG Grid: "+o+" is only valid with AG Grid Enterprise Module "+X.RowGroupingModule+" - your column definition should not have "+o,"ColumnRowGroupingMissing"+o))})),re.isRegistered(X.RichSelectModule)||"agRichSelect"!==this.colDef.cellEditor&&"agRichSelectCellEditor"!==this.colDef.cellEditor||(re.isPackageBased()?t("AG Grid: "+this.colDef.cellEditor+" can only be used with ag-grid-enterprise","ColumnRichSelectMissing"):t("AG Grid: "+this.colDef.cellEditor+" can only be used with AG Grid Enterprise Module "+X.RichSelectModule,"ColumnRichSelectMissing")),this.gridOptionsWrapper.isTreeData()&&["rowGroup","rowGroupIndex","pivot","pivotIndex"].forEach((function(o){n(e[o])&&t("AG Grid: "+o+" is not possible when doing tree data, your column definition should not have "+o,"TreeDataCannotRowGroup")})),n(this.colDef.width)&&"number"!=typeof this.colDef.width&&t("AG Grid: colDef.width should be a number, not "+typeof this.colDef.width,"ColumnCheck_asdfawef"),e.pinnedRowCellRenderer&&t("AG Grid: pinnedRowCellRenderer no longer exists, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue. See https://www.ag-grid.com/javascript-grid/cell-rendering/#many-renderers-one-column","colDef.pinnedRowCellRenderer-deprecated"),e.pinnedRowCellRendererParams&&t("AG Grid: pinnedRowCellRenderer no longer exists, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue. See https://www.ag-grid.com/javascript-grid/cell-rendering/#many-renderers-one-column","colDef.pinnedRowCellRenderer-deprecated"),e.pinnedRowCellRendererFramework&&t("AG Grid: pinnedRowCellRenderer no longer exists, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue. See https://www.ag-grid.com/javascript-grid/cell-rendering/#many-renderers-one-column","colDef.pinnedRowCellRenderer-deprecated"),e.pinnedRowValueGetter&&t("AG Grid: pinnedRowCellRenderer is deprecated, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue.","colDef.pinnedRowCellRenderer-deprecated")},e.prototype.addEventListener=function(e,t){this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService.removeEventListener(e,t)},e.prototype.createColumnFunctionCallbackParams=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.createColumnFunctionCallbackParams(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.isSuppressFillHandle=function(){return!!u(this.colDef.suppressFillHandle)},e.prototype.isAutoHeight=function(){return!!u(this.colDef.autoHeight)},e.prototype.isAutoHeaderHeight=function(){return!!u(this.colDef.autoHeaderHeight)},e.prototype.isRowDrag=function(e){return this.isColumnFunc(e,this.colDef.rowDrag)},e.prototype.isDndSource=function(e){return this.isColumnFunc(e,this.colDef.dndSource)},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!!u(this.colDef.resizable)},e.prototype.isColumnFunc=function(e,t){return"boolean"==typeof t?t:"function"==typeof t&&t(this.createColumnFunctionCallbackParams(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{type:e,column:this,columns:[this],source:t,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()}},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===oe.SORT_ASC},e.prototype.isSortDescending=function(){return this.sort===oe.SORT_DESC},e.prototype.isSortNone=function(){return i(this.sort)},e.prototype.isSorting=function(){return n(this.sort)},e.prototype.getSortIndex=function(){return this.sortIndex},e.prototype.setSortIndex=function(e){this.sortIndex=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,r){void 0===o&&(o="api"),this.filterActive!==t&&(this.filterActive=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_FILTER_ACTIVE_CHANGED,o)));var n=this.createColumnEvent(e.EVENT_FILTER_CHANGED,o);r&&_(n,r),this.eventService.dispatchEvent(n)},e.prototype.setPinned=function(e){!0===e||e===oe.PINNED_LEFT?this.pinned=oe.PINNED_LEFT:e===oe.PINNED_RIGHT?this.pinned=oe.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===oe.PINNED_LEFT||this.pinned===oe.PINNED_RIGHT},e.prototype.isPinnedLeft=function(){return this.pinned===oe.PINNED_LEFT},e.prototype.isPinnedRight=function(){return this.pinned===oe.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.getUniqueId=function(){return this.getId()},e.prototype.getDefinition=function(){return this.colDef},e.prototype.getActualWidth=function(){return this.actualWidth},e.prototype.getAutoHeaderHeight=function(){return this.autoHeaderHeight},e.prototype.setAutoHeaderHeight=function(e){var t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t},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(i(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(i(this.colDef.rowSpan))return 1;var t=this.createBaseColDefParams(e),o=this.colDef.rowSpan(t);return Math.max(o,1)},e.prototype.setActualWidth=function(e,t,o){void 0===t&&(t="api"),void 0===o&&(o=!1),null!=this.minWidth&&(e=Math.max(e,this.minWidth)),null!=this.maxWidth&&(e=Math.min(e,this.maxWidth)),this.actualWidth!==e&&(this.actualWidth=e,this.flex&&"flex"!==t&&"gridInitializing"!==t&&(this.flex=null),o||this.fireColumnWidthChangedEvent(t))},e.prototype.fireColumnWidthChangedEvent=function(t){this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_WIDTH_CHANGED,t))},e.prototype.isGreaterThanMax=function(e){return null!=this.maxWidth&&e>this.maxWidth},e.prototype.getMinWidth=function(){return this.minWidth},e.prototype.getMaxWidth=function(){return this.maxWidth},e.prototype.getFlex=function(){return this.flex||0},e.prototype.setFlex=function(e){this.flex!==e&&(this.flex=e)},e.prototype.setMinimum=function(e){void 0===e&&(e="api"),n(this.minWidth)&&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.prototype.isLockPosition=function(){return console.warn("AG Grid: since v21, col.isLockPosition() should not be used, please use col.getColDef().lockPosition instead."),!!this.colDef&&!!this.colDef.lockPosition},e.prototype.isLockVisible=function(){return console.warn("AG Grid: since v21, col.isLockVisible() should not be used, please use col.getColDef().lockVisible instead."),!!this.colDef&&!!this.colDef.lockVisible},e.prototype.isLockPinned=function(){return console.warn("AG Grid: since v21, col.isLockPinned() should not be used, please use col.getColDef().lockPinned instead."),!!this.colDef&&!!this.colDef.lockPinned},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_COL_DEF_CHANGED="colDefChanged",e.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged",e.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged",e.EVENT_PIVOT_CHANGED="columnPivotChanged",e.EVENT_VALUE_CHANGED="columnValueChanged",ne([z("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),ne([z("columnUtils")],e.prototype,"columnUtils",void 0),ne([B],e.prototype,"initialise",null),e}();function ae(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var o=0;o<e.length;o++){var r=e[o];if(n(r))return r}return null}function le(e){if(e&&e.length)return e[e.length-1]}function ue(e,t,o){return null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every((function(e,r){return o?o(e,t[r]):t[r]===e}))}function pe(e){return e.sort((function(e,t){return e-t}))}function ce(e,t){var o=e.indexOf(t);o>=0&&e.splice(o,1)}function de(e,t){t.forEach((function(t){return ce(e,t)}))}function he(e,t,o){e.splice(o,0,t)}function fe(e,t,o){de(e,t),t.slice().reverse().forEach((function(t){return he(e,t,o)}))}function ge(e,t){return e.indexOf(t)>-1}function me(e){return[].concat.apply([],e)}function ye(e,t){null!=t&&null!=e&&t.forEach((function(t){return e.push(t)}))}var ve=Object.freeze({__proto__:null,firstExistingValue:ae,existsAndNotEmpty:function(e){return null!=e&&e.length>0},last:le,areEqual:ue,compareArrays:function(e,t){return ue(e,t)},shallowCompare:function(e,t){return ue(e,t)},sortNumerically:pe,removeRepeatsFromArray:function(e,t){if(e)for(var o=e.length-2;o>=0;o--){var r=e[o]===t,n=e[o+1]===t;r&&n&&e.splice(o+1,1)}},removeFromArray:ce,removeAllFromArray:de,insertIntoArray:he,insertArrayIntoArray:function(e,t,o){if(null!=e&&null!=t)for(var r=t.length-1;r>=0;r--)he(e,t[r],o)},moveInArray:fe,includes:ge,flatten:me,pushAll:ye,toStrings:function(e){return e.map(a)},forEachReverse:function(e,t){if(null!=e)for(var o=e.length-1;o>=0;o--)t(e[o],o)}}),Ce=function(){function e(e,t,o,r){this.displayedChildren=[],this.localEventService=new te,this.groupId=t,this.instanceId=o,this.providedColumnGroup=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.getProvidedColumnGroup().getLeafColumns();return!(!e||0===e.length)&&e.every((function(e){return e.isMoving()}))},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=le(this.displayedChildren).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()||0})),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.providedColumnGroup.getColGroupDef()},e.prototype.getColGroupDef=function(){return this.providedColumnGroup.getColGroupDef()},e.prototype.isPadding=function(){return this.providedColumnGroup.isPadding()},e.prototype.isExpandable=function(){return this.providedColumnGroup.isExpandable()},e.prototype.isExpanded=function(){return this.providedColumnGroup.isExpanded()},e.prototype.setExpanded=function(e){this.providedColumnGroup.setExpanded(e)},e.prototype.addDisplayedLeafColumns=function(t){this.displayedChildren.forEach((function(o){o instanceof se?t.push(o):o instanceof e&&o.addDisplayedLeafColumns(t)}))},e.prototype.addLeafColumns=function(t){this.children.forEach((function(o){o instanceof se?t.push(o):o instanceof e&&o.addLeafColumns(t)}))},e.prototype.getChildren=function(){return this.children},e.prototype.getColumnGroupShow=function(){return this.providedColumnGroup.getColumnGroupShow()},e.prototype.getProvidedColumnGroup=function(){return this.providedColumnGroup},e.prototype.getOriginalColumnGroup=function(){return console.warn("AG Grid: columnGroup.getOriginalColumnGroup() is deprecated due to a method rename, use columnGroup.getProvidedColumnGroup() instead"),this.getProvidedColumnGroup()},e.prototype.getPaddingLevel=function(){var e=this.getParent();return this.isPadding()&&e&&e.isPadding()?1+e.getPaddingLevel():0},e.prototype.calculateDisplayedColumns=function(){var t=this;this.displayedChildren=[];for(var o=this;null!=o&&o.isPadding();)o=o.getParent();if(!o||!o.providedColumnGroup.isExpandable())return this.displayedChildren=this.children,void this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_DISPLAYED_CHILDREN_CHANGED));this.children.forEach((function(r){if(!(r instanceof e)||r.displayedChildren&&r.displayedChildren.length)switch(r.getColumnGroupShow()){case e.HEADER_GROUP_SHOW_OPEN:o.providedColumnGroup.isExpanded()&&t.displayedChildren.push(r);break;case e.HEADER_GROUP_SHOW_CLOSED:o.providedColumnGroup.isExpanded()||t.displayedChildren.push(r);break;default:t.displayedChildren.push(r)}})),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",function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);i>3&&s&&Object.defineProperty(t,o,s)}([z("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),e}(),we=function(){function e(e,t,o,r){this.localEventService=new te,this.expandable=!1,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=o,this.level=r}return e.prototype.reset=function(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.children=void 0,this.expandable=void 0},e.prototype.setOriginalParent=function(e){this.originalParent=e},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 se?t.push(o):o instanceof e&&o.addLeafColumns(t)}))},e.prototype.getColumnGroupShow=function(){var e=this.colGroupDef;if(e)return e.columnGroupShow},e.prototype.setupExpandable=function(){var e=this;this.setExpandable(),this.getLeafColumns().forEach((function(t){return t.addEventListener(se.EVENT_VISIBLE_CHANGED,e.onColumnVisibilityChanged.bind(e))}))},e.prototype.setExpandable=function(){if(!this.isPadding()){for(var t=!1,o=!1,r=!1,n=this.findChildrenRemovingPadding(),i=0,s=n.length;i<s;i++){var a=n[i];if(a.isVisible()){var l=a.getColumnGroupShow();l===Ce.HEADER_GROUP_SHOW_OPEN?(t=!0,r=!0):l===Ce.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 p={type:e.EVENT_EXPANDABLE_CHANGED};this.localEventService.dispatchEvent(p)}}},e.prototype.findChildrenRemovingPadding=function(){var t=[],o=function(r){r.forEach((function(r){r instanceof e&&r.isPadding()?o(r.children):t.push(r)}))};return o(this.children),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",e}(),Ee={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},_e="__ag_Grid_Stop_Propagation",Se=["touchstart","touchend","touchmove","touchcancel"],Re={};function be(e){e[_e]=!0}function Oe(e){return!0===e[_e]}var Pe,Te=(Pe={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},function(e){if("boolean"==typeof Re[e])return Re[e];var t=document.createElement(Pe[e]||"div");return Re[e="on"+e]=e in t});function Ae(e,t,o){for(var r=t.target;r;){var n=e.getDomData(r,o);if(n)return n;r=r.parentElement}return null}function De(e,t){return!(!t||!e)&&Ne(t).indexOf(e)>=0}function Ie(e){for(var t=[],o=e.target;o;)t.push(o),o=o.parentElement;return t}function Ne(e){var t=e;return t.path?t.path:t.composedPath?t.composedPath():t.__agGridEventPath?t.__agGridEventPath:Ie(e)}function xe(e,t,o,r){var n=ge(Se,o)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,o,r,n)}var Me,Le=Object.freeze({__proto__:null,stopPropagationForAgGrid:be,isStopPropagationForAgGrid:Oe,isEventSupported:Te,getCtrlForEvent:Ae,addChangeListener:function(e,t){e.addEventListener("changed",t),e.addEventListener("paste",t),e.addEventListener("input",t)},isElementInEventPath:De,createEventPath:Ie,addAgGridEventPath:function(e){e.__agGridEventPath=Ne(e)},getEventPath:Ne,addSafePassiveEventListener:xe}),Fe=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Ge=function(){function e(){var e=this;this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.isAlive=function(){return!e.destroyed}}return e.prototype.getFrameworkOverrides=function(){return this.frameworkOverrides},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 te),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.addManagedListener=function(e,t,o){var r=this;if(!this.destroyed){e instanceof HTMLElement?xe(this.getFrameworkOverrides(),e,t,o):e.addEventListener(t,o);var n=function(){return e.removeEventListener(t,o),r.destroyFunctions=r.destroyFunctions.filter((function(e){return e!==n})),null};return this.destroyFunctions.push(n),n}},e.prototype.addDestroyFunc=function(e){this.isAlive()?this.destroyFunctions.push(e):e()},e.prototype.createManagedBean=function(e,t){var o=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),o},e.prototype.createBean=function(e,t,o){return(t||this.getContext()).createBean(e,o)},e.prototype.destroyBean=function(e,t){return(t||this.getContext()).destroyBean(e)},e.prototype.destroyBeans=function(e,t){var o=this;return e&&e.forEach((function(e){return o.destroyBean(e,t)})),[]},e.EVENT_DESTROYED="destroyed",Fe([z("frameworkOverrides")],e.prototype,"frameworkOverrides",void 0),Fe([z("context")],e.prototype,"context",void 0),Fe([z("eventService")],e.prototype,"eventService",void 0),Fe([z("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),Fe([U],e.prototype,"destroy",null),e}(),ke=(Me=function(e,t){return Me=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])},Me(e,t)},function(e,t){function o(){this.constructor=e}Me(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),Ve=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},He=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ke(t,e),t.prototype.setBeans=function(e){this.logger=e.create("ColumnFactory")},t.prototype.createColumnTree=function(e,t,o){var r=new h,n=this.extractExistingTreeData(o),i=n.existingCols,s=n.existingGroups,a=n.existingColKeys;r.addExistingKeys(a);var l=this.recursivelyCreateColumns(e,0,t,i,r,s),u=this.findMaxDept(l,0);this.logger.log("Number of levels for grouped columns is "+u);var p=this.balanceColumnTree(l,0,u,r);return this.columnUtils.depthFirstOriginalTreeSearch(null,p,(function(e,t){e instanceof we&&e.setupExpandable(),e.setOriginalParent(t)})),{columnTree:p,treeDept:u}},t.prototype.extractExistingTreeData=function(e){var t=[],o=[],r=[];return e&&this.columnUtils.depthFirstOriginalTreeSearch(null,e,(function(e){if(e instanceof we){var n=e;o.push(n)}else{var i=e;r.push(i.getId()),t.push(i)}})),{existingCols:t,existingGroups:o,existingColKeys:r}},t.prototype.createForAutoGroups=function(e,t){var o=this;return e.map((function(e){return o.createAutoGroupTreeItem(t,e)}))},t.prototype.createAutoGroupTreeItem=function(e,t){for(var o=t,r=this.findDepth(e)-1;r>=0;r--){var n=new we(null,"FAKE_PATH_"+t.getId()+"}_"+r,!0,r);this.context.createBean(n),n.setChildren([o]),o.setOriginalParent(n),o=n}return o},t.prototype.findDepth=function(e){for(var t=0,o=e;o&&o[0]&&o[0]instanceof we;)t++,o=o[0].getChildren();return t},t.prototype.balanceColumnTree=function(e,t,o,r){for(var n=[],i=0;i<e.length;i++){var s=e[i];if(s instanceof we){var a=s,l=this.balanceColumnTree(a.getChildren(),t+1,o,r);a.setChildren(l),n.push(a)}else{for(var u=void 0,p=void 0,c=o-1;c>=t;c--){var d=r.getUniqueKey(null,null),h=this.createMergedColGroupDef(null),f=new we(h,d,!0,t);this.context.createBean(f),p&&p.setChildren([f]),p=f,u||(u=p)}if(u&&p){if(n.push(u),e.some((function(e){return e instanceof we}))){p.setChildren([s]);continue}p.setChildren(e);break}n.push(s)}}return n},t.prototype.findMaxDept=function(e,t){for(var o=t,r=0;r<e.length;r++){var n=e[r];if(n instanceof we){var i=n,s=this.findMaxDept(i.getChildren(),t+1);o<s&&(o=s)}}return o},t.prototype.recursivelyCreateColumns=function(e,t,o,r,n,i){var s=this;return(e||[]).map((function(e){return s.isColumnGroup(e)?s.createColumnGroup(o,e,t,r,n,i):s.createColumn(o,e,r,n)}))},t.prototype.createColumnGroup=function(e,t,o,r,n,i){var s,a=this.createMergedColGroupDef(t),l=n.getUniqueKey(a.groupId||null,null),u=this.findExistingGroup(t,i);u?((s=u).reset(a,o),ce(i,u)):(s=new we(a,l,!1,o),this.context.createBean(s));var p=this.recursivelyCreateColumns(a.children,o+1,e,r,n,i);return s.setChildren(p),s},t.prototype.createMergedColGroupDef=function(e){var t={};return Object.assign(t,this.gridOptionsWrapper.getDefaultColGroupDef()),Object.assign(t,e),this.checkForDeprecatedItems(t),t},t.prototype.createColumn=function(e,t,o,r){var n=this.mergeColDefs(t);this.checkForDeprecatedItems(n);var i=this.findExistingColumn(t,o);if(o&&i&&ce(o,i),i)i.setColDef(n,t),this.applyColumnState(i,n);else{var s=r.getUniqueKey(n.colId,n.field);i=new se(n,t,s,e),this.context.createBean(i)}return i},t.prototype.applyColumnState=function(e,t){var o=l(t.flex);if(void 0!==o&&e.setFlex(o),e.getFlex()<=0){var r=l(t.width);if(null!=r)e.setActualWidth(r);else{var n=e.getActualWidth();e.setActualWidth(n)}}void 0!==t.sort&&(t.sort==oe.SORT_ASC||t.sort==oe.SORT_DESC?e.setSort(t.sort):e.setSort(void 0));var i=l(t.sortIndex);void 0!==i&&e.setSortIndex(i);var s=u(t.hide);void 0!==s&&e.setVisible(!s),void 0!==t.pinned&&e.setPinned(t.pinned)},t.prototype.findExistingColumn=function(e,t){return(t||[]).find((function(t){var o=t.getUserProvidedColDef();if(!o)return!1;var r=null!=e.colId,n=null!=e.field;return r?t.getId()===e.colId:n?o.field===e.field:o===e}))},t.prototype.findExistingGroup=function(e,t){return t.find((function(t){return!(!t.getColGroupDef()||null==e.groupId||t.getId()!==e.groupId)}))},t.prototype.mergeColDefs=function(e){var t={},o=this.gridOptionsWrapper.getDefaultColDef();_(t,o,!1,!0);var r=e.type;r||(r=o&&o.type),r&&this.assignColumnTypes(r,t),_(t,e,!1,!0);var n=this.gridOptionsWrapper.getAutoGroupColumnDef(),i=this.gridOptionsWrapper.isColumnsSortingCoupledToGroup();return e.rowGroup&&n&&i&&_(t,{sort:n.sort,initialSort:n.initialSort},!1,!0),t},t.prototype.assignColumnTypes=function(e,t){var o=[];if(e instanceof Array)e.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;else{if("string"!=typeof e)return void console.warn("AG Grid: colDef.type should be of type 'string' | 'string[]'");o=e.split(",")}var r=Object.assign({},Ee);f(this.gridOptionsWrapper.getColumnTypes()||{},(function(e,t){e in r?console.warn("AG Grid: the column type '"+e+"' is a default column type and cannot be overridden."):r[e]=t})),o.forEach((function(e){var o=r[e.trim()];o?_(t,o,!1,!0):console.warn("AG Grid: colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes")}))},t.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)}},t.prototype.isColumnGroup=function(e){return void 0!==e.children},Ve([z("columnUtils")],t.prototype,"columnUtils",void 0),Ve([(o=0,r=q("loggerFactory"),function(e,t){r(e,t,o)})],t.prototype,"setBeans",null),Ve([Y("columnFactory")],t);var o,r}(Ge),We=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_ASYNC_TRANSACTIONS_FLUSHED="asyncTransactionsFlushed",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_CHART_CREATED="chartCreated",e.EVENT_CHART_RANGE_SELECTION_CHANGED="chartRangeSelectionChanged",e.EVENT_CHART_OPTIONS_CHANGED="chartOptionsChanged",e.EVENT_CHART_DESTROYED="chartDestroyed",e.EVENT_TOOL_PANEL_VISIBLE_CHANGED="toolPanelVisibleChanged",e.EVENT_TOOL_PANEL_SIZE_CHANGED="toolPanelSizeChanged",e.EVENT_COLUMN_PANEL_ITEM_DRAG_START="columnPanelItemDragStart",e.EVENT_COLUMN_PANEL_ITEM_DRAG_END="columnPanelItemDragEnd",e.EVENT_MODEL_UPDATED="modelUpdated",e.EVENT_PASTE_START="pasteStart",e.EVENT_PASTE_END="pasteEnd",e.EVENT_FILL_START="fillStart",e.EVENT_FILL_END="fillEnd",e.EVENT_KEY_SHORTCUT_CHANGED_CELL_START="keyShortcutChangedCellStart",e.EVENT_KEY_SHORTCUT_CHANGED_CELL_END="keyShortcutChangedCellEnd",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_CELL_EDIT_REQUEST="cellEditRequest",e.EVENT_ROW_VALUE_CHANGED="rowValueChanged",e.EVENT_CELL_FOCUSED="cellFocused",e.EVENT_FULL_WIDTH_ROW_FOCUSED="fullWidthRowFocused",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_SCROLLBAR_WIDTH_CHANGED="scrollbarWidthChanged",e.EVENT_FIRST_DATA_RENDERED="firstDataRendered",e.EVENT_DRAG_STARTED="dragStarted",e.EVENT_DRAG_STOPPED="dragStopped",e.EVENT_CHECKBOX_CHANGED="checkboxChanged",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_BODY_SCROLL_END="bodyScrollEnd",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_PAGINATION_PIXEL_OFFSET_CHANGED="paginationPixelOffsetChanged",e.EVENT_DISPLAYED_ROWS_CHANGED="displayedRowsChanged",e.EVENT_LEFT_PINNED_WIDTH_CHANGED="leftPinnedWidthChanged",e.EVENT_RIGHT_PINNED_WIDTH_CHANGED="rightPinnedWidthChanged",e.EVENT_ROW_CONTAINER_HEIGHT_CHANGED="rowContainerHeightChanged",e.EVENT_HEADER_HEIGHT_CHANGED="headerHeightChanged",e.EVENT_COLUMN_HEADER_HEIGHT_CHANGED="columnHeaderHeightChanged",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_POPUP_TO_FRONT="popupToFront",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.EVENT_KEYBOARD_FOCUS="keyboardFocus",e.EVENT_MOUSE_FOCUS="mouseFocus",e.EVENT_STORE_UPDATED="storeUpdated",e}(),je=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}(),Be=/[&<>"']/g,Ue={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Ye(e){return null==e?null:e.replace(/([A-Z])/g,(function(e){return"-"+e[0].toLowerCase()}))}function ze(e){return null==e?null:e.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}))}function Ke(e){return e[0].toUpperCase()+e.substr(1).toLowerCase()}function $e(e,t){if(null==e)return null;var o=e.toString().toString();return t?o:o.replace(Be,(function(e){return Ue[e]}))}function qe(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}var Ze=Object.freeze({__proto__:null,utf8_encode:function(e){var t=String.fromCharCode;function o(e,o){return t(e>>o&63|128)}function r(e){if(e>=0&&e<=31&&10!==e)return"_x"+e.toString(16).toUpperCase().padStart(4,"0")+"_";if(!(4294967168&e))return t(e);var r="";return 4294965248&e?4294901760&e?4292870144&e||(r=t(e>>18&7|240),r+=o(e,12),r+=o(e,6)):(function(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}(e),r=t(e>>12&15|224),r+=o(e,6)):r=t(e>>6&31|192),r+t(63&e|128)}for(var n=function(e){var t=[];if(!e)return[];for(var o,r,n=e.length,i=0;i<n;)(o=e.charCodeAt(i++))>=55296&&o<=56319&&i<n?56320==(64512&(r=e.charCodeAt(i++)))?t.push(((1023&o)<<10)+(1023&r)+65536):(t.push(o),i--):t.push(o);return t}(e),i=n.length,s=-1,a="";++s<i;)a+=r(n[s]);return a},camelCaseToHyphen:Ye,hyphenToCamelCase:ze,capitalise:Ke,escapeString:$e,camelCaseToHumanText:qe});function Xe(e){var t=new Map;return e.forEach((function(e){return t.set(e[0],e[1])})),t}var Qe=Object.freeze({__proto__:null,convertToMap:Xe,mapById:function(e,t){var o=new Map;return e.forEach((function(e){return o.set(t(e),e)})),o},keys:function(e){var t=[];return e.forEach((function(e,o){return t.push(o)})),t}}),Je=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s},et=function(){function e(){}return e.STRING_PROPERTIES=["headerName","columnGroupShow","headerClass","toolPanelClass","headerValueGetter","pivotKeys","groupId","colId","sort","initialSort","field","type","tooltipComponent","tooltipField","headerTooltip","cellClass","showRowGroup","filter","initialAggFunc","defaultAggFunc","aggFunc","pinned","initialPinned","chartDataType","cellEditorPopupPosition"],e.OBJECT_PROPERTIES=["headerGroupComponent","headerGroupComponentFramework","headerGroupComponentParams","cellStyle","cellRenderer","cellRendererParams","cellRendererFramework","cellEditor","cellEditorFramework","cellEditorParams","pinnedRowCellRendererFramework","pinnedRowCellRendererParams","filterFramework","filterParams","pivotValueColumn","headerComponent","headerComponentFramework","headerComponentParams","floatingFilterComponent","floatingFilterComponentParams","floatingFilterComponentFramework","tooltipComponent","tooltipComponentParams","tooltipComponentFramework","refData","columnsMenuParams"],e.ARRAY_PROPERTIES=["children","sortingOrder","allowedAggFuncs","menuTabs","pivotTotalColumnIds","cellClassRules","icons"],e.NUMBER_PROPERTIES=["sortedAt","sortIndex","initialSortIndex","flex","initialFlex","width","initialWidth","minWidth","maxWidth","rowGroupIndex","initialRowGroupIndex","pivotIndex","initialPivotIndex"],e.BOOLEAN_PROPERTIES=["suppressCellFlash","suppressColumnsToolPanel","suppressFiltersToolPanel","openByDefault","marryChildren","hide","initialHide","rowGroup","initialRowGroup","pivot","initialPivot","checkboxSelection","showDisabledCheckboxes","headerCheckboxSelection","headerCheckboxSelectionFilteredOnly","suppressMenu","suppressMovable","lockPosition","lockVisible","lockPinned","unSortIcon","suppressSizeToFit","suppressAutoSize","enableRowGroup","enablePivot","enableValue","editable","suppressPaste","suppressNavigable","enableCellChangeFlash","rowDrag","dndSource","autoHeight","wrapText","sortable","resizable","singleClickEdit","floatingFilter","cellEditorPopup","suppressFillHandle","wrapHeaderText","autoHeaderHeight"],e.FUNCTION_PROPERTIES=["dndSourceOnRowDrag","valueGetter","valueSetter","filterValueGetter","keyCreator","pinnedRowCellRenderer","valueFormatter","pinnedRowValueFormatter","valueParser","comparator","equals","pivotComparator","suppressKeyboardEvent","suppressHeaderKeyboardEvent","colSpan","rowSpan","getQuickFilterText","newValueHandler","onCellValueChanged","onCellClicked","onCellDoubleClicked","onCellContextMenu","rowDragText","tooltipValueGetter","tooltipComponent","tooltipComponentFramework","cellRendererSelector","cellEditorSelector"],e.ALL_PROPERTIES=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Je(arguments[t]));return e}(e.ARRAY_PROPERTIES,e.OBJECT_PROPERTIES,e.STRING_PROPERTIES,e.NUMBER_PROPERTIES,e.FUNCTION_PROPERTIES,e.BOOLEAN_PROPERTIES),e.FRAMEWORK_PROPERTIES=["__ob__","__v_skip","__metadata__","mappedColumnProperties","hasChildColumns","toColDef","createColDefFromGridColumn"],e}(),tt=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s},ot=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(tt(arguments[t]));return e},rt=function(){function e(){}return e.STRING_PROPERTIES=["rowSelection","overlayLoadingTemplate","overlayNoRowsTemplate","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","serverSideStoreType","groupDisplayType","treeDataDisplayType","colResizeDefault"],e.OBJECT_PROPERTIES=["components","frameworkComponents","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultExportParams","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef"],e.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass"],e.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","colWidth","headerHeight","groupHeaderHeight","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","minColWidth","maxColWidth","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","batchUpdateWaitMillis","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","tabIndex"],e.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellSelection","suppressCellFocus","suppressHorizontalScroll","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","angularCompileRows","angularCompileFilters","groupSuppressAutoColumn","groupSelectsChildren","groupIncludeFooter","groupIncludeTotalFooter","groupUseEntireRow","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressParentsInRowNodes","suppressColumnMoveAnimation","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","rememberGroupStateWhenNewData","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","suppressAggAtRootLevel","suppressFocusAfterRefresh","functionsPassive","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","deprecatedEmbedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupMultiAutoColumn","pagination","stopEditingWhenGridLosesFocus","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","deltaRowDataMode","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","treeData","masterDetail","suppressMultiRangeSelection","enterMovesDownAfterEdit","enterMovesDown","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressEnterpriseResetOnNewColumns","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","suppressSetColumnStateEvents","suppressColumnStateEvents","enableCharts","enableChartToolPanelsButton","deltaColumnMode","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","immutableData","immutableColumns","pivotSuppressAutoColumn","suppressExpandablePivotGroups","applyColumnDefOrder","debounceVerticalScrollbar","detailRowAutoHeight","serverSideFilteringAlwaysResets","serverSideSortingAlwaysResets","serverSideSortAllLevels","serverSideFilterAllLevels","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","maintainColumnOrder","groupMaintainOrder","columnHoverHighlight","reactUi","suppressReactUi","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","groupRowsSticky","serverSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter"],e.FUNCTIONAL_PROPERTIES=["localeTextFunc","doesExternalFilterPass","groupRowAggNodes","isFullWidthCell","processSecondaryColDef","processSecondaryColGroupDef","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","postSort","defaultGroupSortComparator","defaultGroupOrderComparator","rowDragText","groupRowInnerRenderer","groupRowInnerRendererFramework","groupRowRenderer","groupRowRendererFramework","fullWidthCellRenderer","fullWidthCellRendererFramework","loadingCellRenderer","loadingCellRendererFramework","loadingOverlayComponent","loadingOverlayComponentFramework","noRowsOverlayComponent","noRowsOverlayComponentFramework","detailCellRenderer","detailCellRendererFramework"],e.CALLBACK_PROPERTIES=["getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","getRowNodeId","isFullWidthRow","sendToClipboard","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","suppressKeyboardEvent","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideStoreParams","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","groupAggFiltering"],e.FUNCTION_PROPERTIES=ot(e.FUNCTIONAL_PROPERTIES,e.CALLBACK_PROPERTIES),e.ALL_PROPERTIES=ot(e.ARRAY_PROPERTIES,e.OBJECT_PROPERTIES,e.STRING_PROPERTIES,e.NUMBER_PROPERTIES,e.FUNCTION_PROPERTIES,e.BOOLEAN_PROPERTIES),e.FRAMEWORK_PROPERTIES=["__ob__","__v_skip","__metadata__","mappedColumnProperties","hasChildColumns","toColDef","createColDefFromGridColumn"],e}(),nt=function(){return nt=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},nt.apply(this,arguments)},it=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s},st=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(it(arguments[t]));return e},at=function(){function e(){}return e.getEventCallbacks=function(){return e.EVENT_CALLBACKS||(e.EVENT_CALLBACKS=e.EVENTS.map((function(t){return e.getCallbackForEvent(t)}))),e.EVENT_CALLBACKS},e.copyAttributesToGridOptions=function(t,o,r){"object"!=typeof t&&(t={});var n=t,i=function(e){return void 0!==o[e]};return i("groupAggFiltering")&&"function"!=typeof o.groupAggFiltering&&(n.groupAggFiltering=e.toBoolean(o.groupAggFiltering),delete o.groupAggFiltering),st(e.ARRAY_PROPERTIES,e.STRING_PROPERTIES,e.OBJECT_PROPERTIES,e.FUNCTION_PROPERTIES,e.getEventCallbacks()).filter(i).forEach((function(e){return n[e]=o[e]})),e.BOOLEAN_PROPERTIES.filter(i).forEach((function(t){return n[t]=e.toBoolean(o[t])})),e.NUMBER_PROPERTIES.filter(i).forEach((function(t){return n[t]=e.toNumber(o[t])})),t},e.getCallbackForEvent=function(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substr(1)},e.processOnChange=function(t,o,r,n){if(t){var i=nt({},t),s=o,a=function(e){return i[e]};a("groupAggFiltering")&&("function"==typeof i.groupAggFiltering?s.groupAggFiltering=i.groupAggFiltering:s.groupAggFiltering=e.toBoolean(i.groupAggFiltering),delete i.groupAggFiltering),a("groupDisplayType")&&"string"==typeof i.groupDisplayType.currentValue&&(r.setGroupDisplayType(i.groupDisplayType.currentValue),delete i.groupDisplayType),i.domLayout&&(r.setDomLayout(i.domLayout.currentValue),delete i.domLayout),i.rowClass&&(r.setRowClass(i.rowClass.currentValue),delete i.rowClass),i.paginationPageSize&&(r.paginationSetPageSize(e.toNumber(i.paginationPageSize.currentValue)),delete i.paginationPageSize),i.rowGroupPanelShow&&(r.setRowGroupPanelShow(i.rowGroupPanelShow.currentValue),delete i.rowGroupPanelShow),i.groupRemoveSingleChildren&&(r.setGroupRemoveSingleChildren(e.toBoolean(i.groupRemoveSingleChildren.currentValue)),delete i.groupRemoveSingleChildren),i.groupRemoveLowestSingleChildren&&(r.setGroupRemoveLowestSingleChildren(e.toBoolean(i.groupRemoveLowestSingleChildren.currentValue)),delete i.groupRemoveLowestSingleChildren),i.suppressRowDrag&&(r.setSuppressRowDrag(e.toBoolean(i.suppressRowDrag.currentValue)),delete i.suppressRowDrag),i.suppressMoveWhenRowDragging&&(r.setSuppressMoveWhenRowDragging(e.toBoolean(i.suppressMoveWhenRowDragging.currentValue)),delete i.suppressMoveWhenRowDragging),i.suppressRowClickSelection&&(r.setSuppressRowClickSelection(e.toBoolean(i.suppressRowClickSelection.currentValue)),delete i.suppressRowClickSelection),i.suppressClipboardPaste&&(r.setSuppressClipboardPaste(e.toBoolean(i.suppressClipboardPaste.currentValue)),delete i.suppressClipboardPaste),i.headerHeight&&(r.setHeaderHeight(e.toNumber(i.headerHeight.currentValue)),delete i.headerHeight),i.pivotHeaderHeight&&(r.setPivotHeaderHeight(e.toNumber(i.pivotHeaderHeight.currentValue)),delete i.pivotHeaderHeight),i.groupHeaderHeight&&(r.setGroupHeaderHeight(e.toNumber(i.groupHeaderHeight.currentValue)),delete i.groupHeaderHeight),i.pivotGroupHeaderHeight&&(r.setPivotGroupHeaderHeight(e.toNumber(i.pivotGroupHeaderHeight.currentValue)),delete i.pivotGroupHeaderHeight),i.floatingFiltersHeight&&(r.setFloatingFiltersHeight(e.toNumber(i.floatingFiltersHeight.currentValue)),delete i.floatingFiltersHeight),i.functionsReadOnly&&(r.setFunctionsReadOnly(e.toBoolean(i.functionsReadOnly.currentValue)),delete i.functionsReadOnly),st(e.ARRAY_PROPERTIES,e.OBJECT_PROPERTIES,e.STRING_PROPERTIES,e.getEventCallbacks()).filter(a).forEach((function(e){return s[e]=i[e].currentValue})),e.BOOLEAN_PROPERTIES.filter(a).forEach((function(t){return s[t]=e.toBoolean(i[t].currentValue)})),e.NUMBER_PROPERTIES.filter(a).forEach((function(t){return s[t]=e.toNumber(i[t].currentValue)})),i.enableCellTextSelection&&(r.setEnableCellTextSelection(e.toBoolean(i.enableCellTextSelection.currentValue)),delete i.enableCellTextSelection),i.quickFilterText&&(r.setQuickFilter(i.quickFilterText.currentValue),delete i.quickFilterText),i.autoGroupColumnDef&&(r.setAutoGroupColumnDef(i.autoGroupColumnDef.currentValue,"gridOptionsChanged"),delete i.autoGroupColumnDef),i.columnDefs&&(r.setColumnDefs(i.columnDefs.currentValue,"gridOptionsChanged"),delete i.columnDefs),i.defaultColDef&&(r.setDefaultColDef(i.defaultColDef.currentValue,"gridOptionsChanged"),delete i.defaultColDef),i.pivotMode&&(n.setPivotMode(e.toBoolean(i.pivotMode.currentValue)),delete i.pivotMode);var l=r;Object.keys(i).forEach((function(e){var o="set"+e.charAt(0).toUpperCase()+e.substring(1);l[o]&&l[o](t[e].currentValue)}));var u={type:We.EVENT_COMPONENT_STATE_CHANGED};f(t,(function(e,t){u[e]=t})),r.dispatchEvent(u)}},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.PUBLIC_EVENTS=[],e.EXCLUDED_INTERNAL_EVENTS=[],e.STRING_PROPERTIES=rt.STRING_PROPERTIES,e.OBJECT_PROPERTIES=rt.OBJECT_PROPERTIES,e.ARRAY_PROPERTIES=rt.ARRAY_PROPERTIES,e.NUMBER_PROPERTIES=rt.NUMBER_PROPERTIES,e.BOOLEAN_PROPERTIES=rt.BOOLEAN_PROPERTIES,e.FUNCTION_PROPERTIES=rt.FUNCTION_PROPERTIES,e.ALL_PROPERTIES=rt.ALL_PROPERTIES,e}();at.EVENTS=c(We),at.EXCLUDED_INTERNAL_EVENTS=[We.EVENT_SCROLLBAR_WIDTH_CHANGED,We.EVENT_CHECKBOX_CHANGED,We.EVENT_HEIGHT_SCALE_CHANGED,We.EVENT_BODY_HEIGHT_CHANGED,We.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,We.EVENT_SCROLL_VISIBILITY_CHANGED,We.EVENT_COLUMN_HOVER_CHANGED,We.EVENT_FLASH_CELLS,We.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,We.EVENT_DISPLAYED_ROWS_CHANGED,We.EVENT_LEFT_PINNED_WIDTH_CHANGED,We.EVENT_RIGHT_PINNED_WIDTH_CHANGED,We.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,We.EVENT_POPUP_TO_FRONT,We.EVENT_KEYBOARD_FOCUS,We.EVENT_MOUSE_FOCUS,We.EVENT_STORE_UPDATED,We.EVENT_COLUMN_PANEL_ITEM_DRAG_START,We.EVENT_COLUMN_PANEL_ITEM_DRAG_END,We.EVENT_FILL_START,We.EVENT_FILL_END,We.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,We.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,We.EVENT_FULL_WIDTH_ROW_FOCUSED,We.EVENT_HEADER_HEIGHT_CHANGED,We.EVENT_COLUMN_HEADER_HEIGHT_CHANGED],at.PUBLIC_EVENTS=at.EVENTS.filter((function(e){return!ge(at.EXCLUDED_INTERNAL_EVENTS,e)}));var lt,ut,pt,ct,dt,ht,ft,gt,mt,yt,vt=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,position:t.position}},e.parseComponents=function(t){var o=[];return t?(t.forEach((function(t){var r=null;if("string"==typeof t){var n=e.DEFAULT_BY_KEY[t];if(!n)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=n}else r=t;o.push(r)})),o):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}();function Ct(){if(yt)return yt;var e,t,o=navigator.userAgent,r=o.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];if(/trident/i.test(r[1]))return{name:"IE",version:t=null!=(e=/\brv[ :]+(\d+)/g.exec(o)||[])[1]?parseFloat(e[1]):0};if("Chrome"===r[1]&&null!=(e=o.match(/\bOPR|Edge\/(\d+)/)))return{name:"Opera",version:t=null!=e[1]?parseFloat(e[1]):0};r=r[2]?[r[1],r[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=o.match(/version\/(\d+)/i))&&r.splice(1,1,e[1]);var n=r[0];return t=null!=r[1]?parseFloat(r[1]):0,yt={name:n,version:t}}function wt(){return void 0===pt&&(void 0===ut&&(ut=!!document.documentMode),pt=!(ut||!window.StyleMedia)),pt}function Et(){return void 0===lt&&(lt=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),lt}function _t(){if(void 0===ct){var e=window;ct=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return ct}function St(){if(void 0===dt){var e=window;dt=void 0!==e.InstallTrigger}return dt}function Rt(){return void 0===ht&&(ht=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),ht}function bt(){return void 0===ft&&(ft=(/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!window.MSStream),ft}function Ot(){return!Et()||Ct().version>=15}function Pt(e){if(!e)return null;var t=e.tabIndex,o=e.getAttribute("tabIndex");return-1!==t||null!==o&&(""!==o||St())?t.toString():null}function Tt(){if(!document.body)return-1;var e=1e6,t=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,o=document.createElement("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}function At(){return null==mt&&Dt(),mt}function Dt(){var e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);var o=t.offsetWidth-t.clientWidth;0===o&&0===t.clientWidth&&(o=null),t.parentNode&&t.parentNode.removeChild(t),null!=o&&(mt=o,gt=0===o)}function It(){return null==gt&&Dt(),gt}function Nt(){return document.body?document.body.clientWidth:window.innerHeight?window.innerWidth:document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:-1}function xt(){return document.body?document.body.clientHeight:window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:-1}var Mt=Object.freeze({__proto__:null,getBrowserInfo:Ct,isBrowserEdge:wt,isBrowserSafari:Et,isBrowserChrome:_t,isBrowserFirefox:St,isMacOsUserAgent:Rt,isIOSUserAgent:bt,browserSupportsPreventScroll:Ot,getTabIndex:Pt,getMaxDivHeight:Tt,getScrollbarWidth:At,isInvisibleScrollbar:It,hasOverflowScrolling:function(){var e,t,o=["webkit","moz","o","ms"],r=document.createElement("div"),n=!1;document.getElementsByTagName("body")[0].appendChild(r),r.setAttribute("style",o.map((function(e){return"-"+e+"-overflow-scrolling: touch"})).concat("overflow-scrolling: touch").join(";"));var i=window.getComputedStyle(r);if("touch"===i.overflowScrolling&&(n=!0),!n)try{for(var s=function(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],r=0;if(o)return o.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(o),a=s.next();!a.done;a=s.next())if("touch"===i[a.value+"OverflowScrolling"]){n=!0;break}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return r.parentNode&&r.parentNode.removeChild(r),n},getBodyWidth:Nt,getBodyHeight:xt});function Lt(e,t,o){var r={},n=e.filter((function(e){return!t.some((function(t){return t===e}))}));return n.length>0&&n.forEach((function(e){return r[e]=Ft(e,o)})),r}function Ft(e,t,o,r){var n=r?Vt:kt,i=t.map((function(t){return{value:t,relevance:n(e.toLowerCase(),t.toLocaleLowerCase())}}));return i.sort((function(e,t){return t.relevance-e.relevance})),o&&(i=i.filter((function(e){return 0!==e.relevance}))),i.map((function(e){return e.value}))}function Gt(e){var t,o,r,n=e.toLowerCase(),i=new Array(n.length-1);for(t=o=0,r=i.length;o<=r;t=o+=1)i[t]=n.slice(t,t+2);return i}function kt(e,t){if(0===e.length&&0===t.length)return 0;var o,r,n=Gt(e),i=Gt(t),s=n.length+i.length,a=0;for(o=0,r=n.length;o<r;o++){var l,u=n[o],p=void 0;for(p=0,l=i.length;p<l;p++)u===i[p]&&a++}return a>0?2*a/s:0}function Vt(e,t){for(var o=e.replace(/\s/g,""),r=t.replace(/\s/g,""),n=0,i=0,s=0;s<o.length;s++){var a=r.indexOf(o[s],i);-1!==a&&(n+=100-100*(i=a)/1e4*100)}return n}var Ht=Object.freeze({__proto__:null,fuzzyCheckStrings:Lt,fuzzySuggestions:Ft,get_bigrams:Gt,string_distances:kt,string_weighted_distances:Vt});function Wt(e,t){return e.toString().padStart(t,"0")}function jt(e,t){for(var o=[],r=e;r<=t;r++)o.push(r);return o}function Bt(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function Ut(e,t,o){return"number"!=typeof e?"":e.toString().replace(".",o).replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+t)}var Yt=Object.freeze({__proto__:null,padStartWidthZeros:Wt,createArrayOfNumbers:jt,isNumeric:Bt,cleanNumber:function(e){return"string"==typeof e&&(e=parseInt(e,10)),"number"==typeof e?Math.floor(e):null},decToHex:function(e,t){for(var o="",r=0;r<t;r++)o+=String.fromCharCode(255&e),e>>>=8;return o},formatNumberTwoDecimalPlacesAndCommas:function(e,t,o){return"number"!=typeof e?"":Ut(Math.round(100*e)/100,t,o)},formatNumberCommas:Ut,sum:function(e){return null==e?null:e.reduce((function(e,t){return e+t}),0)}}),zt=function(){return zt=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},zt.apply(this,arguments)},Kt=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},$t=function(e,t){return function(o,r){t(o,r,e)}},qt=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s},Zt=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(qt(arguments[t]));return e};function Xt(e){return!0===e||"true"===e}function Qt(e){return"number"==typeof e?e:"string"==typeof e?parseInt(e,10):void 0}function Jt(e,t){var o=parseInt(e,10);return Bt(o)&&o>0?o:t}var eo=function(){function e(){this.propertyEventService=new te,this.domDataKey="__AG_"+Math.random().toString(),this.destroyed=!1}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,this.destroyed=!0},e.prototype.init=function(){var e=this;!0!==this.gridOptions.suppressPropertyNamesCheck&&(this.checkGridOptionsProperties(),this.checkColumnDefProperties()),null!=this.gridOptions.sideBar&&(this.gridOptions.sideBar=vt.parse(this.gridOptions.sideBar));var t=this.useAsyncEvents();if(this.eventService.addGlobalListener(this.globalEventHandler.bind(this),t),this.isGroupSelectsChildren()&&this.isSuppressParentsInRowNodes()&&console.warn("AG Grid: 'groupSelectsChildren' does not work with '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 use these together on our support forum either, you will get the same answer!"),this.isRowModelServerSide()){var o=function(e){return"AG Grid: '"+e+"' is not supported on the Server-Side Row Model"};n(this.gridOptions.groupDefaultExpanded)&&console.warn(o("groupDefaultExpanded")),n(this.gridOptions.groupDefaultExpanded)&&console.warn(o("groupIncludeFooter")),n(this.gridOptions.groupDefaultExpanded)&&console.warn(o("groupIncludeTotalFooter"))}Xt(this.gridOptions.enableRangeSelection)?re.assertRegistered(X.RangeSelectionModule,"enableRangeSelection"):(this.isEnableRangeHandle()||this.isEnableFillHandle())&&console.warn("AG Grid: 'enableRangeHandle' or 'enableFillHandle' will not work unless 'enableRangeSelection' is set to true"),this.isGroupRowsSticky()&&(this.isGroupHideOpenParents()&&console.warn("AG Grid: groupRowsSticky and groupHideOpenParents do not work with each other, you need to pick one."),this.isMasterDetail()&&console.warn("AG Grid: groupRowsSticky and masterDetail do not work with each other, you need to pick one."),this.isPagination()&&console.warn("AG Grid: groupRowsSticky and pagination do not work with each other, you need to pick one."));var r=function(t){e.gridOptions.icons&&e.gridOptions.icons[t]&&console.warn("gridOptions.icons."+t+" is no longer supported. For information on how to style checkboxes and radio buttons, see https://www.ag-grid.com/javascript-grid-icons/")};r("radioButtonOff"),r("radioButtonOn"),r("checkboxChecked"),r("checkboxUnchecked"),r("checkboxIndeterminate"),this.getScrollbarWidth()},e.prototype.checkColumnDefProperties=function(){var e=this;null!=this.gridOptions.columnDefs&&this.gridOptions.columnDefs.forEach((function(t){var o=Object.getOwnPropertyNames(t),r=Zt(et.ALL_PROPERTIES,et.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=Zt(rt.ALL_PROPERTIES,rt.FRAMEWORK_PROPERTIES,c(We).map((function(e){return at.getCallbackForEvent(e)}))),o=Zt(t,["api","columnApi"]);this.checkProperties(e,o,t,"gridOptions","https://www.ag-grid.com/javascript-data-grid/grid-options/")},e.prototype.checkProperties=function(e,t,o,r,n){var i=Lt(e,t,o);f(i,(function(e,t){console.warn("ag-grid: invalid "+r+" property '"+e+"' did you mean any of these: "+t.slice(0,8).join(", "))})),Object.keys(i).length>0&&console.warn("ag-grid: to see all the valid "+r+" properties please check: "+n)},e.prototype.mergeGridCommonParams=function(e){var t=this;return e?function(o){var r=zt(zt({},o),{api:t.getApi(),columnApi:t.getColumnApi(),context:t.getContext()});return e(r)}:e},e.prototype.getDomDataKey=function(){return this.domDataKey},e.prototype.getDomData=function(e,t){var o=e[this.getDomDataKey()];return o?o[t]:void 0},e.prototype.setDomData=function(e,t,o){var r=this.getDomDataKey(),n=e[r];i(n)&&(n={},e[r]=n),n[t]=o},e.prototype.isRowSelection=function(){return"single"===this.gridOptions.rowSelection||"multiple"===this.gridOptions.rowSelection},e.prototype.isSuppressRowDeselection=function(){return Xt(this.gridOptions.suppressRowDeselection)},e.prototype.isRowSelectionMulti=function(){return"multiple"===this.gridOptions.rowSelection},e.prototype.isRowMultiSelectWithClick=function(){return Xt(this.gridOptions.rowMultiSelectWithClick)},e.prototype.getContext=function(){return this.gridOptions.context},e.prototype.isPivotMode=function(){return Xt(this.gridOptions.pivotMode)},e.prototype.isSuppressExpandablePivotGroups=function(){return Xt(this.gridOptions.suppressExpandablePivotGroups)},e.prototype.getPivotColumnGroupTotals=function(){return this.gridOptions.pivotColumnGroupTotals},e.prototype.getPivotRowTotals=function(){return this.gridOptions.pivotRowTotals},e.prototype.isRowModelInfinite=function(){return this.gridOptions.rowModelType===oe.ROW_MODEL_TYPE_INFINITE},e.prototype.isRowModelViewport=function(){return this.gridOptions.rowModelType===oe.ROW_MODEL_TYPE_VIEWPORT},e.prototype.isRowModelServerSide=function(){return this.gridOptions.rowModelType===oe.ROW_MODEL_TYPE_SERVER_SIDE},e.prototype.isRowModelDefault=function(){return i(this.gridOptions.rowModelType)||this.gridOptions.rowModelType===oe.ROW_MODEL_TYPE_CLIENT_SIDE},e.prototype.isFullRowEdit=function(){return"fullRow"===this.gridOptions.editType},e.prototype.isSuppressFocusAfterRefresh=function(){return Xt(this.gridOptions.suppressFocusAfterRefresh)},e.prototype.isSuppressBrowserResizeObserver=function(){return Xt(this.gridOptions.suppressBrowserResizeObserver)},e.prototype.isSuppressMaintainUnsortedOrder=function(){return Xt(this.gridOptions.suppressMaintainUnsortedOrder)},e.prototype.isSuppressClearOnFillReduction=function(){return Xt(this.gridOptions.suppressClearOnFillReduction)},e.prototype.isShowToolPanel=function(){return Xt(this.gridOptions.sideBar&&Array.isArray(this.getSideBar().toolPanels))},e.prototype.getSideBar=function(){return this.gridOptions.sideBar},e.prototype.isSuppressTouch=function(){return Xt(this.gridOptions.suppressTouch)},e.prototype.isMaintainColumnOrder=function(){return Xt(this.gridOptions.maintainColumnOrder)},e.prototype.isSuppressRowTransform=function(){return Xt(this.gridOptions.suppressRowTransform)},e.prototype.isSuppressColumnStateEvents=function(){return Xt(this.gridOptions.suppressColumnStateEvents)},e.prototype.isAllowDragFromColumnsToolPanel=function(){return Xt(this.gridOptions.allowDragFromColumnsToolPanel)},e.prototype.useAsyncEvents=function(){return!Xt(this.gridOptions.suppressAsyncEvents)},e.prototype.isEnableCellChangeFlash=function(){return Xt(this.gridOptions.enableCellChangeFlash)},e.prototype.getCellFlashDelay=function(){return this.gridOptions.cellFlashDelay||500},e.prototype.getCellFadeDelay=function(){return this.gridOptions.cellFadeDelay||1e3},e.prototype.isGroupSelectsChildren=function(){return Xt(this.gridOptions.groupSelectsChildren)},e.prototype.isSuppressRowHoverHighlight=function(){return Xt(this.gridOptions.suppressRowHoverHighlight)},e.prototype.isColumnHoverHighlight=function(){return Xt(this.gridOptions.columnHoverHighlight)},e.prototype.isGroupSelectsFiltered=function(){return Xt(this.gridOptions.groupSelectsFiltered)},e.prototype.isGroupHideOpenParents=function(){return Xt(this.gridOptions.groupHideOpenParents)},e.prototype.isGroupMaintainOrder=function(){return Xt(this.gridOptions.groupMaintainOrder)},e.prototype.getAutoGroupColumnDef=function(){return this.gridOptions.autoGroupColumnDef},e.prototype.isColumnsSortingCoupledToGroup=function(){var e,t=this.getAutoGroupColumnDef();return this.isRowModelDefault()&&!(null===(e=t)||void 0===e?void 0:e.comparator)},e.prototype.isGroupMultiAutoColumn=function(){return this.gridOptions.groupDisplayType?this.matchesGroupDisplayType("multipleColumns",this.gridOptions.groupDisplayType):Xt(this.gridOptions.groupHideOpenParents)},e.prototype.isGroupUseEntireRow=function(e){return!e&&!!this.gridOptions.groupDisplayType&&this.matchesGroupDisplayType("groupRows",this.gridOptions.groupDisplayType)},e.prototype.isRowGroupPanelSuppressSort=function(){return Xt(this.gridOptions.rowGroupPanelSuppressSort)},e.prototype.isGroupRowsSticky=function(){return Xt(this.gridOptions.groupRowsSticky)},e.prototype.isGroupSuppressAutoColumn=function(){return!(!this.gridOptions.groupDisplayType||!this.matchesGroupDisplayType("custom",this.gridOptions.groupDisplayType))||!!this.gridOptions.treeDataDisplayType&&this.matchesTreeDataDisplayType("custom",this.gridOptions.treeDataDisplayType)},e.prototype.isGroupRemoveSingleChildren=function(){return Xt(this.gridOptions.groupRemoveSingleChildren)},e.prototype.isGroupRemoveLowestSingleChildren=function(){return Xt(this.gridOptions.groupRemoveLowestSingleChildren)},e.prototype.isGroupIncludeFooter=function(){return Xt(this.gridOptions.groupIncludeFooter)},e.prototype.isGroupIncludeTotalFooter=function(){return Xt(this.gridOptions.groupIncludeTotalFooter)},e.prototype.isGroupSuppressBlankHeader=function(){return Xt(this.gridOptions.groupSuppressBlankHeader)},e.prototype.isSuppressRowClickSelection=function(){return Xt(this.gridOptions.suppressRowClickSelection)},e.prototype.isSuppressCellFocus=function(){return Xt(this.gridOptions.suppressCellFocus)},e.prototype.isSuppressMultiSort=function(){return Xt(this.gridOptions.suppressMultiSort)},e.prototype.isAlwaysMultiSort=function(){return Xt(this.gridOptions.alwaysMultiSort)},e.prototype.isMultiSortKeyCtrl=function(){return"ctrl"===this.gridOptions.multiSortKey},e.prototype.isPivotSuppressAutoColumn=function(){return Xt(this.gridOptions.pivotSuppressAutoColumn)},e.prototype.isSuppressDragLeaveHidesColumns=function(){return Xt(this.gridOptions.suppressDragLeaveHidesColumns)},e.prototype.isSuppressRowGroupHidesColumns=function(){return Xt(this.gridOptions.suppressRowGroupHidesColumns)},e.prototype.isSuppressScrollOnNewData=function(){return Xt(this.gridOptions.suppressScrollOnNewData)},e.prototype.isSuppressScrollWhenPopupsAreOpen=function(){return Xt(this.gridOptions.suppressScrollWhenPopupsAreOpen)},e.prototype.isRowDragEntireRow=function(){return Xt(this.gridOptions.rowDragEntireRow)},e.prototype.getRowDragText=function(e){if(e){var t=e.getColDef();if(t.rowDragText)return t.rowDragText}return this.gridOptions.rowDragText},e.prototype.isSuppressRowDrag=function(){return Xt(this.gridOptions.suppressRowDrag)},e.prototype.isRowDragManaged=function(){return Xt(this.gridOptions.rowDragManaged)},e.prototype.isSuppressMoveWhenRowDragging=function(){return Xt(this.gridOptions.suppressMoveWhenRowDragging)},e.prototype.isRowDragMultiRow=function(){return Xt(this.gridOptions.rowDragMultiRow)},e.prototype.getDomLayout=function(){var e=this.gridOptions.domLayout||oe.DOM_LAYOUT_NORMAL;return-1===[oe.DOM_LAYOUT_PRINT,oe.DOM_LAYOUT_AUTO_HEIGHT,oe.DOM_LAYOUT_NORMAL].indexOf(e)?(T((function(){return console.warn("AG Grid: "+e+" is not valid for DOM Layout, valid values are "+oe.DOM_LAYOUT_NORMAL+", "+oe.DOM_LAYOUT_AUTO_HEIGHT+" and "+oe.DOM_LAYOUT_PRINT)}),"warn about dom layout values"),oe.DOM_LAYOUT_NORMAL):e},e.prototype.isSuppressHorizontalScroll=function(){return Xt(this.gridOptions.suppressHorizontalScroll)},e.prototype.isSuppressMaxRenderedRowRestriction=function(){return Xt(this.gridOptions.suppressMaxRenderedRowRestriction)},e.prototype.isExcludeChildrenWhenTreeDataFiltering=function(){return Xt(this.gridOptions.excludeChildrenWhenTreeDataFiltering)},e.prototype.isAlwaysShowHorizontalScroll=function(){return Xt(this.gridOptions.alwaysShowHorizontalScroll)},e.prototype.isAlwaysShowVerticalScroll=function(){return Xt(this.gridOptions.alwaysShowVerticalScroll)},e.prototype.isDebounceVerticalScrollbar=function(){return Xt(this.gridOptions.debounceVerticalScrollbar)},e.prototype.isSuppressLoadingOverlay=function(){return Xt(this.gridOptions.suppressLoadingOverlay)},e.prototype.isSuppressNoRowsOverlay=function(){return Xt(this.gridOptions.suppressNoRowsOverlay)},e.prototype.isSuppressFieldDotNotation=function(){return Xt(this.gridOptions.suppressFieldDotNotation)},e.prototype.getPinnedTopRowData=function(){return this.gridOptions.pinnedTopRowData},e.prototype.getPinnedBottomRowData=function(){return this.gridOptions.pinnedBottomRowData},e.prototype.isFunctionsPassive=function(){return Xt(this.gridOptions.functionsPassive)},e.prototype.isSuppressChangeDetection=function(){return Xt(this.gridOptions.suppressChangeDetection)},e.prototype.isSuppressAnimationFrame=function(){return Xt(this.gridOptions.suppressAnimationFrame)},e.prototype.getQuickFilterText=function(){return this.gridOptions.quickFilterText},e.prototype.isCacheQuickFilter=function(){return Xt(this.gridOptions.cacheQuickFilter)},e.prototype.isUnSortIcon=function(){return Xt(this.gridOptions.unSortIcon)},e.prototype.isSuppressMenuHide=function(){return Xt(this.gridOptions.suppressMenuHide)},e.prototype.isEnterMovesDownAfterEdit=function(){return Xt(this.gridOptions.enterMovesDownAfterEdit)},e.prototype.isEnterMovesDown=function(){return Xt(this.gridOptions.enterMovesDown)},e.prototype.isUndoRedoCellEditing=function(){return Xt(this.gridOptions.undoRedoCellEditing)},e.prototype.getUndoRedoCellEditingLimit=function(){return Qt(this.gridOptions.undoRedoCellEditingLimit)},e.prototype.isEnableCellEditingOnBackspace=function(){return Xt(this.gridOptions.enableCellEditingOnBackspace)},e.prototype.getRowStyle=function(){return this.gridOptions.rowStyle},e.prototype.getRowClass=function(){return this.gridOptions.rowClass},e.prototype.getRowStyleFunc=function(){return this.mergeGridCommonParams(this.gridOptions.getRowStyle)},e.prototype.getRowClassFunc=function(){return this.mergeGridCommonParams(this.gridOptions.getRowClass)},e.prototype.rowClassRules=function(){return this.gridOptions.rowClassRules},e.prototype.isServerSideInfiniteScroll=function(){return Xt(this.gridOptions.serverSideInfiniteScroll)},e.prototype.getServerSideGroupLevelParamsFunc=function(){return this.mergeGridCommonParams(this.gridOptions.getServerSideGroupLevelParams)},e.prototype.getCreateChartContainerFunc=function(){return this.mergeGridCommonParams(this.gridOptions.createChartContainer)},e.prototype.getPopupParent=function(){return this.gridOptions.popupParent},e.prototype.getBlockLoadDebounceMillis=function(){return this.gridOptions.blockLoadDebounceMillis},e.prototype.getPostProcessPopupFunc=function(){return this.mergeGridCommonParams(this.gridOptions.postProcessPopup)},e.prototype.getPaginationNumberFormatterFunc=function(){return this.mergeGridCommonParams(this.gridOptions.paginationNumberFormatter)},e.prototype.getChildCountFunc=function(){return this.gridOptions.getChildCount},e.prototype.getIsApplyServerSideTransactionFunc=function(){return this.mergeGridCommonParams(this.gridOptions.isApplyServerSideTransaction)},e.prototype.getInitialGroupOrderComparator=function(){var e=this.gridOptions,t=e.initialGroupOrderComparator,o=e.defaultGroupOrderComparator;return t?this.mergeGridCommonParams(t):o?function(e){return o(e.nodeA,e.nodeB)}:void 0},e.prototype.getIsFullWidthCellFunc=function(){var e=this.gridOptions,t=e.isFullWidthRow,o=e.isFullWidthCell;return t?this.mergeGridCommonParams(t):o?function(e){return o(e.rowNode)}:void 0},e.prototype.getFullWidthCellRendererParams=function(){return this.gridOptions.fullWidthCellRendererParams},e.prototype.isEmbedFullWidthRows=function(){return Xt(this.gridOptions.embedFullWidthRows)||Xt(this.gridOptions.deprecatedEmbedFullWidthRows)},e.prototype.isDetailRowAutoHeight=function(){return Xt(this.gridOptions.detailRowAutoHeight)},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.isReadOnlyEdit=function(){return Xt(this.gridOptions.readOnlyEdit)},e.prototype.isImmutableData=function(){var e=null!=this.gridOptions.getRowId,t=Xt(this.gridOptions.immutableData);return!Xt(this.gridOptions.resetRowDataOnUpdate)&&(e||t)},e.prototype.isEnsureDomOrder=function(){return Xt(this.gridOptions.ensureDomOrder)},e.prototype.isEnableCharts=function(){return!!Xt(this.gridOptions.enableCharts)&&re.assertRegistered(X.GridChartsModule,"enableCharts")},e.prototype.isEnableChartToolPanelsButton=function(){return Xt(this.gridOptions.enableChartToolPanelsButton)},e.prototype.getColResizeDefault=function(){return this.gridOptions.colResizeDefault},e.prototype.isSingleClickEdit=function(){return Xt(this.gridOptions.singleClickEdit)},e.prototype.isSuppressClickEdit=function(){return Xt(this.gridOptions.suppressClickEdit)},e.prototype.isStopEditingWhenCellsLoseFocus=function(){return Xt(this.gridOptions.stopEditingWhenCellsLoseFocus)},e.prototype.getGroupDefaultExpanded=function(){return this.gridOptions.groupDefaultExpanded},e.prototype.getMaxConcurrentDatasourceRequests=function(){var e=Qt(this.gridOptions.maxConcurrentDatasourceRequests);return null==e?2:e<=0?void 0:e},e.prototype.getMaxBlocksInCache=function(){return this.gridOptions.maxBlocksInCache},e.prototype.getCacheOverflowSize=function(){return this.gridOptions.cacheOverflowSize},e.prototype.getPaginationPageSize=function(){return Qt(this.gridOptions.paginationPageSize)},e.prototype.isPaginateChildRows=function(){return!(!this.isGroupRemoveSingleChildren()&&!this.isGroupRemoveLowestSingleChildren())||Xt(this.gridOptions.paginateChildRows)},e.prototype.getCacheBlockSize=function(){return Jt(this.gridOptions.cacheBlockSize)},e.prototype.getInfiniteInitialRowCount=function(){return this.gridOptions.infiniteInitialRowCount},e.prototype.getServerSideInitialRowCount=function(){var e=this.gridOptions.serverSideInitialRowCount;return"number"==typeof e&&e>0?e:1},e.prototype.isPurgeClosedRowNodes=function(){return Xt(this.gridOptions.purgeClosedRowNodes)},e.prototype.isSuppressPaginationPanel=function(){return Xt(this.gridOptions.suppressPaginationPanel)},e.prototype.getRowData=function(){return this.gridOptions.rowData},e.prototype.isEnableRtl=function(){return Xt(this.gridOptions.enableRtl)},e.prototype.getRowGroupPanelShow=function(){return this.gridOptions.rowGroupPanelShow},e.prototype.getPivotPanelShow=function(){return this.gridOptions.pivotPanelShow},e.prototype.isAngularCompileRows=function(){return Xt(this.gridOptions.angularCompileRows)},e.prototype.isAngularCompileFilters=function(){return Xt(this.gridOptions.angularCompileFilters)},e.prototype.isDebug=function(){return Xt(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 Xt(this.gridOptions.accentedSort)},e.prototype.isEnableBrowserTooltips=function(){return Xt(this.gridOptions.enableBrowserTooltips)},e.prototype.isEnableCellExpressions=function(){return Xt(this.gridOptions.enableCellExpressions)},e.prototype.isEnableGroupEdit=function(){return Xt(this.gridOptions.enableGroupEdit)},e.prototype.isSuppressMiddleClickScrolls=function(){return Xt(this.gridOptions.suppressMiddleClickScrolls)},e.prototype.isPreventDefaultOnContextMenu=function(){return Xt(this.gridOptions.preventDefaultOnContextMenu)},e.prototype.isSuppressPreventDefaultOnMouseWheel=function(){return Xt(this.gridOptions.suppressPreventDefaultOnMouseWheel)},e.prototype.isSuppressColumnVirtualisation=function(){return Xt(this.gridOptions.suppressColumnVirtualisation)},e.prototype.isSuppressRowVirtualisation=function(){return Xt(this.gridOptions.suppressRowVirtualisation)},e.prototype.isSuppressContextMenu=function(){return Xt(this.gridOptions.suppressContextMenu)},e.prototype.isAllowContextMenuWithControlKey=function(){return Xt(this.gridOptions.allowContextMenuWithControlKey)},e.prototype.isSuppressCopyRowsToClipboard=function(){return Xt(this.gridOptions.suppressCopyRowsToClipboard)},e.prototype.isSuppressCopySingleCellRanges=function(){return Xt(this.gridOptions.suppressCopySingleCellRanges)},e.prototype.isCopyHeadersToClipboard=function(){return Xt(this.gridOptions.copyHeadersToClipboard)},e.prototype.isCopyGroupHeadersToClipboard=function(){return Xt(this.gridOptions.copyGroupHeadersToClipboard)},e.prototype.isSuppressClipboardPaste=function(){return Xt(this.gridOptions.suppressClipboardPaste)},e.prototype.isSuppressLastEmptyLineOnPaste=function(){return Xt(this.gridOptions.suppressLastEmptyLineOnPaste)},e.prototype.isPagination=function(){return Xt(this.gridOptions.pagination)},e.prototype.isSuppressEnterpriseResetOnNewColumns=function(){return Xt(this.gridOptions.suppressEnterpriseResetOnNewColumns)},e.prototype.getProcessDataFromClipboardFunc=function(){return this.mergeGridCommonParams(this.gridOptions.processDataFromClipboard)},e.prototype.getAsyncTransactionWaitMillis=function(){return n(this.gridOptions.asyncTransactionWaitMillis)?this.gridOptions.asyncTransactionWaitMillis:oe.BATCH_WAIT_MILLIS},e.prototype.isSuppressMovableColumns=function(){return Xt(this.gridOptions.suppressMovableColumns)},e.prototype.isAnimateRows=function(){return!this.isEnsureDomOrder()&&Xt(this.gridOptions.animateRows)},e.prototype.isSuppressColumnMoveAnimation=function(){return Xt(this.gridOptions.suppressColumnMoveAnimation)},e.prototype.isSuppressAggFuncInHeader=function(){return Xt(this.gridOptions.suppressAggFuncInHeader)},e.prototype.isSuppressAggAtRootLevel=function(){return Xt(this.gridOptions.suppressAggAtRootLevel)},e.prototype.isSuppressAggFilteredOnly=function(){return void 0!==this.getGroupAggFiltering()||Xt(this.gridOptions.suppressAggFilteredOnly)},e.prototype.isRemovePivotHeaderRowWhenSingleValueColumn=function(){return Xt(this.gridOptions.removePivotHeaderRowWhenSingleValueColumn)},e.prototype.isShowOpenedGroup=function(){return Xt(this.gridOptions.showOpenedGroup)},e.prototype.isReactUi=function(){return Xt(this.gridOptions.reactUi)},e.prototype.isSuppressReactUi=function(){return Xt(this.gridOptions.suppressReactUi)},e.prototype.isEnableRangeSelection=function(){return re.isRegistered(X.RangeSelectionModule)&&Xt(this.gridOptions.enableRangeSelection)},e.prototype.isEnableRangeHandle=function(){return Xt(this.gridOptions.enableRangeHandle)},e.prototype.isEnableFillHandle=function(){return Xt(this.gridOptions.enableFillHandle)},e.prototype.getFillHandleDirection=function(){var e=this.gridOptions.fillHandleDirection;return e?"x"!==e&&"y"!==e&&"xy"!==e?(T((function(){return console.warn("AG Grid: valid values for fillHandleDirection are 'x', 'y' and 'xy'. Default to 'xy'.")}),"warn invalid fill direction"),"xy"):e:"xy"},e.prototype.getFillOperation=function(){return this.mergeGridCommonParams(this.gridOptions.fillOperation)},e.prototype.isSuppressMultiRangeSelection=function(){return Xt(this.gridOptions.suppressMultiRangeSelection)},e.prototype.isPaginationAutoPageSize=function(){return Xt(this.gridOptions.paginationAutoPageSize)},e.prototype.isRememberGroupStateWhenNewData=function(){return Xt(this.gridOptions.rememberGroupStateWhenNewData)},e.prototype.getIcons=function(){return this.gridOptions.icons},e.prototype.getGroupAggFiltering=function(){var e=this.gridOptions.groupAggFiltering;return"function"==typeof e?this.mergeGridCommonParams(e):Xt(e)?function(){return!0}:void 0},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(){return!!Xt(this.gridOptions.masterDetail)&&re.assertRegistered(X.MasterDetailModule,"masterDetail")},e.prototype.isKeepDetailRows=function(){return Xt(this.gridOptions.keepDetailRows)},e.prototype.getKeepDetailRowsCount=function(){var e=this.gridOptions.keepDetailRowsCount;return n(e)&&e>0?this.gridOptions.keepDetailRowsCount:10},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 Xt(this.gridOptions.suppressAutoSize)},e.prototype.isEnableCellTextSelection=function(){return Xt(this.gridOptions.enableCellTextSelection)},e.prototype.isSuppressParentsInRowNodes=function(){return Xt(this.gridOptions.suppressParentsInRowNodes)},e.prototype.isSuppressClipboardApi=function(){return Xt(this.gridOptions.suppressClipboardApi)},e.prototype.isFunctionsReadOnly=function(){return Xt(this.gridOptions.functionsReadOnly)},e.prototype.isEnableCellTextSelect=function(){return Xt(this.gridOptions.enableCellTextSelection)},e.prototype.getDefaultColDef=function(){return this.gridOptions.defaultColDef},e.prototype.getDefaultColGroupDef=function(){return this.gridOptions.defaultColGroupDef},e.prototype.getDefaultExportParams=function(e){return this.gridOptions.defaultExportParams?(console.warn("AG Grid: Since v25.2 `defaultExportParams` has been replaced by `default"+Ke(e)+"ExportParams`'"),this.gridOptions.defaultExportParams):"csv"===e&&this.gridOptions.defaultCsvExportParams?this.gridOptions.defaultCsvExportParams:"excel"===e&&this.gridOptions.defaultExcelExportParams?this.gridOptions.defaultExcelExportParams:void 0},e.prototype.isSuppressCsvExport=function(){return Xt(this.gridOptions.suppressCsvExport)},e.prototype.isAllowShowChangeAfterFilter=function(){return Xt(this.gridOptions.allowShowChangeAfterFilter)},e.prototype.isSuppressExcelExport=function(){return Xt(this.gridOptions.suppressExcelExport)},e.prototype.isSuppressMakeColumnVisibleAfterUnGroup=function(){return Xt(this.gridOptions.suppressMakeColumnVisibleAfterUnGroup)},e.prototype.getDataPathFunc=function(){return this.gridOptions.getDataPath},e.prototype.getIsServerSideGroupFunc=function(){return this.gridOptions.isServerSideGroup},e.prototype.getIsServerSideGroupOpenByDefaultFunc=function(){return this.mergeGridCommonParams(this.gridOptions.isServerSideGroupOpenByDefault)},e.prototype.getIsGroupOpenByDefaultFunc=function(){return this.mergeGridCommonParams(this.gridOptions.isGroupOpenByDefault)},e.prototype.getServerSideGroupKeyFunc=function(){return this.gridOptions.getServerSideGroupKey},e.prototype.getGroupRowAggFunc=function(){var e=this.gridOptions,t=e.getGroupRowAgg,o=e.groupRowAggNodes;return t?this.mergeGridCommonParams(t):o?function(e){return o(e.nodes)}:void 0},e.prototype.getContextMenuItemsFunc=function(){return this.mergeGridCommonParams(this.gridOptions.getContextMenuItems)},e.prototype.getMainMenuItemsFunc=function(){return this.mergeGridCommonParams(this.gridOptions.getMainMenuItems)},e.prototype.getRowIdFunc=function(){var e=this.gridOptions,t=e.getRowId,o=e.getRowNodeId;return t?this.mergeGridCommonParams(t):o?function(e){return o(e.data)}:void 0},e.prototype.getNavigateToNextHeaderFunc=function(){return this.mergeGridCommonParams(this.gridOptions.navigateToNextHeader)},e.prototype.getTabToNextHeaderFunc=function(){return this.mergeGridCommonParams(this.gridOptions.tabToNextHeader)},e.prototype.getNavigateToNextCellFunc=function(){return this.mergeGridCommonParams(this.gridOptions.navigateToNextCell)},e.prototype.getTabToNextCellFunc=function(){return this.mergeGridCommonParams(this.gridOptions.tabToNextCell)},e.prototype.getGridTabIndex=function(){return(this.gridOptions.tabIndex||0).toString()},e.prototype.isTreeData=function(){return!!Xt(this.gridOptions.treeData)&&re.assertRegistered(X.RowGroupingModule,"Tree Data")},e.prototype.isValueCache=function(){return Xt(this.gridOptions.valueCache)},e.prototype.isValueCacheNeverExpires=function(){return Xt(this.gridOptions.valueCacheNeverExpires)},e.prototype.isDeltaSort=function(){return Xt(this.gridOptions.deltaSort)},e.prototype.isAggregateOnlyChangedColumns=function(){return Xt(this.gridOptions.aggregateOnlyChangedColumns)},e.prototype.getProcessPivotResultColDefFunc=function(){return this.gridOptions.processPivotResultColDef||this.gridOptions.processSecondaryColDef},e.prototype.getProcessPivotResultColGroupDefFunc=function(){return this.gridOptions.processPivotResultColGroupDef||this.gridOptions.processSecondaryColGroupDef},e.prototype.getSendToClipboardFunc=function(){return this.mergeGridCommonParams(this.gridOptions.sendToClipboard)},e.prototype.getProcessRowPostCreateFunc=function(){return this.mergeGridCommonParams(this.gridOptions.processRowPostCreate)},e.prototype.getProcessCellForClipboardFunc=function(){return this.mergeGridCommonParams(this.gridOptions.processCellForClipboard)},e.prototype.getProcessHeaderForClipboardFunc=function(){return this.mergeGridCommonParams(this.gridOptions.processHeaderForClipboard)},e.prototype.getProcessGroupHeaderForClipboardFunc=function(){return this.mergeGridCommonParams(this.gridOptions.processGroupHeaderForClipboard)},e.prototype.getProcessCellFromClipboardFunc=function(){return this.mergeGridCommonParams(this.gridOptions.processCellFromClipboard)},e.prototype.getViewportRowModelPageSize=function(){return Jt(this.gridOptions.viewportRowModelPageSize,5)},e.prototype.getViewportRowModelBufferSize=function(){return(e=this.gridOptions.viewportRowModelBufferSize)>=0?e:5;var e},e.prototype.isServerSideSortAllLevels=function(){var e=Xt(this.gridOptions.serverSideSortAllLevels);return!this.isRowModelServerSide()&&e?(T((function(){return console.warn("AG Grid: The `serverSideSortAllLevels` property can only be used with the server side row model.")}),"serverSideSortAllLevels"),!1):e},e.prototype.isServerSideFilterAllLevels=function(){var e=Xt(this.gridOptions.serverSideFilterAllLevels);return!this.isRowModelServerSide()&&e?(T((function(){return console.warn("AG Grid: The `serverSideFilterAllLevels` property can only be used with the server side row model.")}),"serverSideFilterAllLevels"),!1):e},e.prototype.isServerSideSortOnServer=function(){var e=Xt(this.gridOptions.serverSideSortOnServer);return!this.isRowModelServerSide()&&e?(T((function(){return console.warn("AG Grid: The `serverSideSortOnServer` property can only be used with the server side row model.")}),"serverSideSortOnServerRowModel"),!1):this.isTreeData()&&e?(T((function(){return console.warn("AG Grid: The `serverSideSortOnServer` property cannot be used while using tree data.")}),"serverSideSortOnServerTreeData"),!1):e},e.prototype.isServerSideFilterOnServer=function(){var e=Xt(this.gridOptions.serverSideFilterOnServer);return!this.isRowModelServerSide()&&e?(T((function(){return console.warn("AG Grid: The `serverSideFilterOnServer` property can only be used with the server side row model.")}),"serverSideFilterOnServerRowModel"),!1):this.isTreeData()&&e?(T((function(){return console.warn("AG Grid: The `serverSideFilterOnServer` property cannot be used while using tree data.")}),"serverSideFilterOnServerTreeData"),!1):e},e.prototype.getPostSortFunc=function(){var e=this.gridOptions,t=e.postSortRows,o=e.postSort;return t?this.mergeGridCommonParams(t):o?function(e){return o(e.nodes)}:void 0},e.prototype.getChartToolbarItemsFunc=function(){return this.mergeGridCommonParams(this.gridOptions.getChartToolbarItems)},e.prototype.getChartThemeOverrides=function(){return this.gridOptions.chartThemeOverrides},e.prototype.getCustomChartThemes=function(){return this.gridOptions.customChartThemes},e.prototype.getChartThemes=function(){return this.gridOptions.chartThemes||["ag-default","ag-material","ag-pastel","ag-vivid","ag-solar"]},e.prototype.getChartToolPanelsDef=function(){return this.gridOptions.chartToolPanelsDef},e.prototype.getClipboardDelimiter=function(){return n(this.gridOptions.clipboardDelimiter)?this.gridOptions.clipboardDelimiter:"\t"},e.prototype.setProperty=function(e,t,o){void 0===o&&(o=!1);var r=this.gridOptions[e];if(o||r!==t){this.gridOptions[e]=t;var n={type:e,currentValue:t,previousValue:r};this.propertyEventService.dispatchEvent(n)}},e.prototype.addEventListener=function(e,t){this.propertyEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.propertyEventService.removeEventListener(e,t)},e.prototype.isSkipHeaderOnAutoSize=function(){return!!this.gridOptions.skipHeaderOnAutoSize},e.prototype.getAutoSizePadding=function(){var e=this.gridOptions.autoSizePadding;return null!=e&&e>=0?e:20},e.prototype.getHeaderHeight=function(){return"number"==typeof this.gridOptions.headerHeight?this.gridOptions.headerHeight:this.getFromTheme(25,"headerHeight")},e.prototype.getFloatingFiltersHeight=function(){return"number"==typeof this.gridOptions.floatingFiltersHeight?this.gridOptions.floatingFiltersHeight:this.getFromTheme(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({api:this.getApi(),columnApi:this.getColumnApi(),context:this.getContext()})},e.prototype.doesExternalFilterPass=function(e){return"function"==typeof this.gridOptions.doesExternalFilterPass&&this.gridOptions.doesExternalFilterPass(e)},e.prototype.getTooltipDelay=function(e){var t=this.gridOptions,o=t.tooltipShowDelay,r=t.tooltipHideDelay,i="show"===e?o:r,s=Ke(e);return n(i)?(i<0&&T((function(){return console.warn("ag-grid: tooltip"+s+"Delay should not be lower than 0")}),"tooltip"+s+"DelayWarn"),Math.max(200,i)):null},e.prototype.isTooltipMouseTrack=function(){return Xt(this.gridOptions.tooltipMouseTrack)},e.prototype.isSuppressModelUpdateAfterUpdateTransaction=function(){return Xt(this.gridOptions.suppressModelUpdateAfterUpdateTransaction)},e.prototype.getDocument=function(){var e=null;return this.gridOptions.getDocument&&n(this.gridOptions.getDocument)?e=this.gridOptions.getDocument():this.eGridDiv&&(e=this.eGridDiv.ownerDocument),e&&n(e)?e:document},e.prototype.getMinColWidth=function(){var e=this.gridOptions.minColWidth;if(n(e)&&e>t.MIN_COL_WIDTH)return this.gridOptions.minColWidth;var o=this.getFromTheme(null,"headerCellMinWidth");return n(o)?Math.max(o,t.MIN_COL_WIDTH):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.getRowBuffer=function(){var e=this.gridOptions.rowBuffer;return"number"==typeof e?e<0&&(T((function(){return console.warn("AG Grid: rowBuffer should not be negative")}),"warn rowBuffer negative"),this.gridOptions.rowBuffer=e=0):e=oe.ROW_BUFFER_SIZE,e},e.prototype.getRowBufferInPixels=function(){return this.getRowBuffer()*this.getRowHeightAsNumber()},e.prototype.getScrollbarWidth=function(){if(null==this.scrollbarWidth){var e="number"==typeof this.gridOptions.scrollbarWidth&&this.gridOptions.scrollbarWidth>=0?this.gridOptions.scrollbarWidth:At();null!=e&&(this.scrollbarWidth=e,this.eventService.dispatchEvent({type:We.EVENT_SCROLLBAR_WIDTH_CHANGED}))}return this.scrollbarWidth},e.prototype.checkForDeprecated=function(){var e=this.gridOptions;e.deprecatedEmbedFullWidthRows&&console.warn("AG Grid: since v21.2, deprecatedEmbedFullWidthRows has been replaced with embedFullWidthRows."),e.rowDeselection&&console.warn("AG Grid: since v24.x, rowDeselection is deprecated and the behaviour is true by default. Please use `suppressRowDeselection` to prevent rows from being deselected."),e.enableMultiRowDragging&&(e.rowDragMultiRow=!0,delete e.enableMultiRowDragging,console.warn("AG Grid: since v26.1, `enableMultiRowDragging` is deprecated. Please use `rowDragMultiRow`."));var t=function(t,o,r){null!=e[t]&&(console.warn("AG Grid: since version "+r+", '"+t+"' is deprecated / renamed, please use the new property name '"+o+"' instead."),null==e[o]&&(e[o]=e[t]))};if(t("batchUpdateWaitMillis","asyncTransactionWaitMillis","23.1.x"),t("deltaRowDataMode","immutableData","23.1.x"),t("serverSideFilteringAlwaysResets","serverSideFilterAllLevels","28.0.0"),t("serverSideSortingAlwaysResets","serverSideSortAllLevels","28.0.0"),(e.immutableColumns||e.deltaColumnMode)&&console.warn("AG Grid: since v24.0, immutableColumns and deltaColumnMode properties are gone. The grid now works like this as default. To keep column order maintained, set grid property applyColumnDefOrder=true"),t("suppressSetColumnStateEvents","suppressColumnStateEvents","24.0.x"),e.groupRowInnerRenderer||e.groupRowInnerRendererParams||e.groupRowInnerRendererFramework){console.warn("AG Grid: since v24.0, grid properties groupRowInnerRenderer, groupRowInnerRendererFramework and groupRowInnerRendererParams are no longer used."),console.warn(" Instead use the grid properties groupRowRendererParams.innerRenderer, groupRowRendererParams.innerRendererFramework and groupRowRendererParams.innerRendererParams."),console.warn(" For example instead of this:"),console.warn(' groupRowInnerRenderer: "myRenderer"'),console.warn(" groupRowInnerRendererParams: {x: a}"),console.warn(" Replace with this:"),console.warn(" groupRowRendererParams: {"),console.warn(' innerRenderer: "myRenderer",'),console.warn(" innerRendererParams: {x: a}"),console.warn(" }"),console.warn(" We have copied the properties over for you. However to stop this error message, please change your application code."),e.groupRowRendererParams||(e.groupRowRendererParams={});var o=e.groupRowRendererParams;e.groupRowInnerRenderer&&(o.innerRenderer=e.groupRowInnerRenderer),e.groupRowInnerRendererParams&&(o.innerRendererParams=e.groupRowInnerRendererParams),e.groupRowInnerRendererFramework&&(o.innerRendererFramework=e.groupRowInnerRendererFramework)}if(e.rememberGroupStateWhenNewData&&console.warn("AG Grid: since v24.0, grid property rememberGroupStateWhenNewData is deprecated. This feature was provided before Transaction Updates worked (which keep group state). Now that transaction updates are possible and they keep group state, this feature is no longer needed."),e.detailCellRendererParams&&e.detailCellRendererParams.autoHeight&&(console.warn("AG Grid: since v24.1, grid property detailCellRendererParams.autoHeight is replaced with grid property detailRowAutoHeight. This allows this feature to work when you provide a custom DetailCellRenderer"),e.detailRowAutoHeight=!0),e.suppressKeyboardEvent&&console.warn("AG Grid: since v24.1 suppressKeyboardEvent in the gridOptions has been deprecated and will be removed in\n future versions of AG Grid. If you need this to be set for every column use the defaultColDef property."),e.suppressEnterpriseResetOnNewColumns&&console.warn("AG Grid: since v25, grid property suppressEnterpriseResetOnNewColumns is deprecated. This was a temporary property to allow changing columns in Server Side Row Model without triggering a reload. Now that it is possible to dynamically change columns in the grid, this is no longer needed."),e.suppressColumnStateEvents&&console.warn('AG Grid: since v25, grid property suppressColumnStateEvents no longer works due to a refactor that we did. It should be possible to achieve similar using event.source, which would be "api" if the event was due to setting column state via the API'),e.defaultExportParams&&console.warn("AG Grid: since v25.2, the grid property `defaultExportParams` has been replaced by `defaultCsvExportParams` and `defaultExcelExportParams`."),e.stopEditingWhenGridLosesFocus&&(console.warn("AG Grid: since v25.2.2, the grid property `stopEditingWhenGridLosesFocus` has been replaced by `stopEditingWhenCellsLoseFocus`."),e.stopEditingWhenCellsLoseFocus=!0),e.applyColumnDefOrder&&console.warn("AG Grid: since v26.0, the grid property `applyColumnDefOrder` is no longer needed, as this is the default behaviour. To turn this behaviour off, set maintainColumnOrder=true"),e.groupMultiAutoColumn&&(console.warn("AG Grid: since v26.0, the grid property `groupMultiAutoColumn` has been replaced by `groupDisplayType = 'multipleColumns'`"),e.groupDisplayType="multipleColumns"),e.groupUseEntireRow&&(console.warn("AG Grid: since v26.0, the grid property `groupUseEntireRow` has been replaced by `groupDisplayType = 'groupRows'`"),e.groupDisplayType="groupRows"),e.groupSuppressAutoColumn){var r=e.treeData?"treeDataDisplayType":"groupDisplayType";console.warn("AG Grid: since v26.0, the grid property `groupSuppressAutoColumn` has been replaced by `"+r+" = 'custom'`"),e.groupDisplayType="custom"}e.defaultGroupOrderComparator&&console.warn("AG Grid: since v27.2, the grid property `defaultGroupOrderComparator` is deprecated and has been replaced by `initialGroupOrderComparator` and now receives a single params object."),e.defaultGroupSortComparator&&(console.warn("AG Grid: since v26.0, the grid property `defaultGroupSortComparator` has been replaced by `initialGroupOrderComparator`"),e.defaultGroupOrderComparator=e.defaultGroupSortComparator),e.groupRowAggNodes&&console.warn("AG Grid: since v27.2, the grid property `groupRowAggNodes` is deprecated and has been replaced by `getGroupRowAgg` and now receives a single params object."),e.postSort&&console.warn("AG Grid: since v27.2, the grid property `postSort` is deprecated and has been replaced by `postSortRows` and now receives a single params object."),e.isFullWidthCell&&console.warn("AG Grid: since v27.2, the grid property `isFullWidthCell` is deprecated and has been replaced by `isFullWidthRow` and now receives a single params object."),e.localeTextFunc&&console.warn("AG Grid: since v27.2, the grid property `localeTextFunc` is deprecated and has been replaced by `getLocaleText` and now receives a single params object."),e.colWidth&&console.warn("AG Grid: since v26.1, the grid property `colWidth` is deprecated and should be set via `defaultColDef.width`."),e.minColWidth&&console.warn("AG Grid: since v26.1, the grid property `minColWidth` is deprecated and should be set via `defaultColDef.minWidth`."),e.maxColWidth&&console.warn("AG Grid: since v26.1, the grid property `maxColWidth` is deprecated and should be set via `defaultColDef.maxWidth`."),e.reactUi&&console.warn("AG Grid: since v27.0, React UI is on by default, so no need for reactUi=true. To turn it off, set suppressReactUi=true."),e.suppressReactUi&&console.warn("AG Grid: The legacy React rendering engine is deprecated and will be removed in the next major version of the grid."),e.suppressCellSelection&&(console.warn("AG Grid: since v27.0, `suppressCellSelection` has been replaced by `suppressCellFocus`."),e.suppressCellFocus=e.suppressCellSelection),e.getRowNodeId&&console.warn("AG Grid: since v27.1, `getRowNodeId` is deprecated and has been replaced by `getRowId`. The difference: if getRowId() is implemented then immutable data is enabled by default."),e.immutableData&&(e.getRowId?console.warn("AG Grid: since v27.1, `immutableData` is deprecated. With the `getRowId` callback implemented, immutable data is enabled by default so you can remove `immutableData=true`."):console.warn("AG Grid: since v27.1, `immutableData` is deprecated. To enable immutable data you must implement the `getRowId()` callback.")),e.clipboardDeliminator&&(console.warn("AG Grid: since v27.1, `clipboardDeliminator` has been replaced by `clipboardDelimiter`."),e.clipboardDelimiter=e.clipboardDeliminator),t("processSecondaryColDef","processPivotResultColDef","28.0.x"),t("processSecondaryColGroupDef","processPivotResultColGroupDef","28.0.x"),e.serverSideStoreType&&(console.warn("AG Grid: since v28.0, `serverSideStoreType` has been replaced by `serverSideInfiniteScroll`. Set to true to use Partial Store, and false to use Full Store."),e.serverSideInfiniteScroll="partial"===e.serverSideStoreType),t("getServerSideStoreParams","getServerSideGroupLevelParams","28.0.x")},e.prototype.checkForViolations=function(){this.isTreeData()&&this.treeDataViolations()},e.prototype.treeDataViolations=function(){this.isRowModelDefault()&&i(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()&&(i(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."),i(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(){var e=this,t=this.gridOptions,o=t.localeText,r=t.getLocaleText,n=t.localeTextFunc;return r?function(t,o,n){var i={key:t,defaultValue:o,variableValues:n,api:e.getApi(),columnApi:e.getColumnApi(),context:e.getContext()};return r(i)}:n||function(e,t,r){var n=o&&o[e];if(n&&r&&r.length)for(var i=0;!(i>=r.length)&&-1!==n.indexOf("${variable}");)n=n.replace("${variable}",r[i++]);return null!=n?n:t}},e.prototype.globalEventHandler=function(e,t){if(!this.destroyed){var o=at.getCallbackForEvent(e);"function"==typeof this.gridOptions[o]&&this.gridOptions[o](t)}},e.prototype.setRowHeightVariable=function(e){var t=e+"px";this.eGridDiv.style.getPropertyValue("--ag-line-height").trim()!=t&&this.eGridDiv.style.setProperty("--ag-line-height",t)},e.prototype.getRowHeightAsNumber=function(){if(!this.gridOptions.rowHeight||i(this.gridOptions.rowHeight))return this.getDefaultRowHeight();var e=this.gridOptions.rowHeight;return e&&this.isNumeric(e)?(this.setRowHeightVariable(e),e):(console.warn("AG Grid row height must be a number if not using standard row model"),this.getDefaultRowHeight())},e.prototype.isGetRowHeightFunction=function(){return"function"==typeof this.gridOptions.getRowHeight},e.prototype.getRowHeightForNode=function(e,t,o){if(void 0===t&&(t=!1),null==o&&(o=this.getDefaultRowHeight()),this.isGetRowHeightFunction()){if(t)return{height:o,estimated:!0};var r={node:e,data:e.data},n=this.mergeGridCommonParams(this.gridOptions.getRowHeight)(r);if(this.isNumeric(n))return 0===n&&T((function(){return console.warn("AG Grid: The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.")}),"invalidRowHeight"),{height:Math.max(1,n),estimated:!1}}return e.detail&&this.isMasterDetail()?this.isDetailRowAutoHeight()?{height:1,estimated:!1}:this.isNumeric(this.gridOptions.detailRowHeight)?{height:this.gridOptions.detailRowHeight,estimated:!1}:{height:300,estimated:!1}:{height:this.gridOptions.rowHeight&&this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:o,estimated:!1}},e.prototype.isDynamicRowHeight=function(){return"function"==typeof this.gridOptions.getRowHeight},e.prototype.getListItemHeight=function(){return this.getFromTheme(20,"listItemHeight")},e.prototype.chartMenuPanelWidth=function(){return this.environment.chartMenuPanelWidth()},e.prototype.isNumeric=function(e){return!isNaN(e)&&"number"==typeof e&&isFinite(e)},e.prototype.getFromTheme=function(e,t){var o=this.environment.getTheme().theme;return o&&0===o.indexOf("ag-theme")?this.environment.getSassVariable(o,t):e},e.prototype.getDefaultRowHeight=function(){return this.getFromTheme(25,"rowHeight")},e.prototype.matchesGroupDisplayType=function(e,t){var o=["groupRows","multipleColumns","custom","singleColumn"];return o.indexOf(t)<0?(console.warn("AG Grid: '"+t+"' is not a valid groupDisplayType value - possible values are: '"+o.join("', '")+"'"),!1):t===e},e.prototype.matchesTreeDataDisplayType=function(e,t){var o=["auto","custom"];return o.indexOf(t)<0?(console.warn("AG Grid: '"+t+"' is not a valid treeDataDisplayType value - possible values are: '"+o.join("', '")+"'"),!1):t===e},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_GROUP_DISPLAY_TYPE="groupDisplayType",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_NAVIGATE_TO_NEXT_CELL="navigateToNextCell",e.PROP_TAB_TO_NEXT_CELL="tabToNextCell",e.PROP_NAVIGATE_TO_NEXT_HEADER="navigateToNextHeader",e.PROP_TAB_TO_NEXT_HEADER="tabToNextHeader",e.PROP_IS_EXTERNAL_FILTER_PRESENT="isExternalFilterPresent",e.PROP_DOES_EXTERNAL_FILTER_PASS="doesExternalFilterPass",e.PROP_FLOATING_FILTERS_HEIGHT="floatingFiltersHeight",e.PROP_SUPPRESS_ROW_CLICK_SELECTION="suppressRowClickSelection",e.PROP_SUPPRESS_ROW_DRAG="suppressRowDrag",e.PROP_SUPPRESS_MOVE_WHEN_ROW_DRAG="suppressMoveWhenRowDragging",e.PROP_GET_ROW_CLASS="getRowClass",e.PROP_GET_ROW_STYLE="getRowStyle",e.PROP_GET_ROW_HEIGHT="getRowHeight",e.PROP_POPUP_PARENT="popupParent",e.PROP_DOM_LAYOUT="domLayout",e.PROP_ROW_CLASS="rowClass",e.PROP_FILL_HANDLE_DIRECTION="fillHandleDirection",e.PROP_GROUP_ROW_AGG_NODES="groupRowAggNodes",e.PROP_GET_GROUP_ROW_AGG="getGroupRowAgg",e.PROP_GET_BUSINESS_KEY_FOR_NODE="getBusinessKeyForNode",e.PROP_GET_CHILD_COUNT="getChildCount",e.PROP_PROCESS_ROW_POST_CREATE="processRowPostCreate",e.PROP_GET_ROW_NODE_ID="getRowNodeId",e.PROP_GET_ROW_ID="getRowId",e.PROP_IS_FULL_WIDTH_CELL="isFullWidthCell",e.PROP_IS_FULL_WIDTH_ROW="isFullWidthRow",e.PROP_IS_ROW_SELECTABLE="isRowSelectable",e.PROP_IS_ROW_MASTER="isRowMaster",e.PROP_POST_SORT="postSort",e.PROP_POST_SORT_ROWS="postSortRows",e.PROP_GET_DOCUMENT="getDocument",e.PROP_POST_PROCESS_POPUP="postProcessPopup",e.PROP_DEFAULT_GROUP_ORDER_COMPARATOR="defaultGroupOrderComparator",e.PROP_INITIAL_GROUP_ORDER_COMPARATOR="initialGroupOrderComparator",e.PROP_PAGINATION_NUMBER_FORMATTER="paginationNumberFormatter",e.PROP_GET_CONTEXT_MENU_ITEMS="getContextMenuItems",e.PROP_GET_MAIN_MENU_ITEMS="getMainMenuItems",e.PROP_PROCESS_CELL_FOR_CLIPBOARD="processCellForClipboard",e.PROP_PROCESS_CELL_FROM_CLIPBOARD="processCellFromClipboard",e.PROP_SEND_TO_CLIPBOARD="sendToClipboard",e.PROP_PROCESS_PIVOT_RESULT_COL_DEF="processPivotResultColDef",e.PROP_PROCESS_PIVOT_RESULT_COL_GROUP_DEF="processPivotResultColGroupDef",e.PROP_GET_CHART_TOOLBAR_ITEMS="getChartToolbarItems",e.PROP_GET_SERVER_SIDE_GROUP_PARAMS="getServerSideGroupLevelParams",e.PROP_IS_SERVER_SIDE_GROUPS_OPEN_BY_DEFAULT="isServerSideGroupOpenByDefault",e.PROP_IS_APPLY_SERVER_SIDE_TRANSACTION="isApplyServerSideTransaction",e.PROP_IS_SERVER_SIDE_GROUP="isServerSideGroup",e.PROP_GET_SERVER_SIDE_GROUP_KEY="getServerSideGroupKey",e.PROP_AUTO_GROUP_COLUMN_DEF="autoGroupColumnDef",e.PROP_DEFAULT_COL_DEF="defaultColDef",Kt([z("gridOptions")],e.prototype,"gridOptions",void 0),Kt([z("eventService")],e.prototype,"eventService",void 0),Kt([z("environment")],e.prototype,"environment",void 0),Kt([z("eGridDiv")],e.prototype,"eGridDiv",void 0),Kt([$t(0,q("gridApi")),$t(1,q("columnApi"))],e.prototype,"agWire",null),Kt([U],e.prototype,"destroy",null),Kt([B],e.prototype,"init",null),t=Kt([Y("gridOptionsWrapper")],e)}(),to=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),oo=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ro=function(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],r=0;if(o)return o.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},no=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s},io=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(no(arguments[t]));return e},so=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.primaryHeaderRowCount=0,t.secondaryHeaderRowCount=0,t.gridHeaderRowCount=0,t.displayedColumnsLeft=[],t.displayedColumnsRight=[],t.displayedColumnsCenter=[],t.displayedColumns=[],t.displayedColumnsAndGroupsMap={},t.viewportColumns=[],t.viewportColumnsHash="",t.headerViewportColumns=[],t.viewportColumnsCenter=[],t.headerViewportColumnsCenter=[],t.autoHeightActiveAtLeastOnce=!1,t.rowGroupColumns=[],t.valueColumns=[],t.pivotColumns=[],t.ready=!1,t.autoGroupsNeedBuilding=!1,t.forceRecreateAutoGroups=!1,t.pivotMode=!1,t.bodyWidth=0,t.leftWidth=0,t.rightWidth=0,t.bodyWidthDirty=!0,t.flexColsCalculatedAtLestOnce=!1,t}return to(t,e),t.prototype.init=function(){var e=this;this.suppressColumnVirtualisation=this.gridOptionsWrapper.isSuppressColumnVirtualisation();var t=this.gridOptionsWrapper.isPivotMode();this.isPivotSettingAllowed(t)&&(this.pivotMode=t),this.usingTreeData=this.gridOptionsWrapper.isTreeData(),this.addManagedListener(this.gridOptionsWrapper,eo.PROP_GROUP_DISPLAY_TYPE,(function(){return e.onAutoGroupColumnDefChanged()})),this.addManagedListener(this.gridOptionsWrapper,eo.PROP_AUTO_GROUP_COLUMN_DEF,(function(){return e.onAutoGroupColumnDefChanged()})),this.addManagedListener(this.gridOptionsWrapper,eo.PROP_DEFAULT_COL_DEF,(function(){return e.onDefaultColDefChanged()}))},t.prototype.onAutoGroupColumnDefChanged=function(){this.autoGroupsNeedBuilding=!0,this.forceRecreateAutoGroups=!0,this.updateGridColumns(),this.updateDisplayedColumns("gridOptionsChanged")},t.prototype.onDefaultColDefChanged=function(){this.forceRecreateAutoGroups=!0,this.createColumnsFromColumnDefs(!0)},t.prototype.setColumnDefs=function(e,t){void 0===t&&(t="api");var o=!!this.columnDefs;this.columnDefs=e,this.createColumnsFromColumnDefs(o,t)},t.prototype.createColumnsFromColumnDefs=function(e,t){var o=this;void 0===t&&(t="api");var r=e?this.compareColumnStatesAndRaiseEvents(t):void 0;this.valueCache.expire(),this.autoGroupsNeedBuilding=!0;var n=this.primaryColumns,i=this.primaryColumnTree,s=this.columnFactory.createColumnTree(this.columnDefs,!0,i);this.primaryColumnTree=s.columnTree,this.primaryHeaderRowCount=s.treeDept+1,this.primaryColumns=this.getColumnsFromTree(this.primaryColumnTree),this.primaryColumnsMap={},this.primaryColumns.forEach((function(e){return o.primaryColumnsMap[e.getId()]=e})),this.extractRowGroupColumns(t,n),this.extractPivotColumns(t,n),this.extractValueColumns(t,n),this.ready=!0;var a=void 0===this.gridColsArePrimary;(this.gridColsArePrimary||a)&&(this.updateGridColumns(),e&&!this.gridOptionsWrapper.isMaintainColumnOrder()&&this.orderGridColumnsLikePrimary(),this.updateDisplayedColumns(t),this.checkViewportColumns()),this.dispatchEverythingChanged(t),r&&r(),this.dispatchNewColumnsLoaded()},t.prototype.dispatchNewColumnsLoaded=function(){var e={type:We.EVENT_NEW_COLUMNS_LOADED};this.eventService.dispatchEvent(e)},t.prototype.dispatchEverythingChanged=function(e){void 0===e&&(e="api");var t={type:We.EVENT_COLUMN_EVERYTHING_CHANGED,source:e};this.eventService.dispatchEvent(t)},t.prototype.orderGridColumnsLikePrimary=function(){var e=this,t=this.primaryColumns;t&&(this.gridColumns.sort((function(o,r){var n=t.indexOf(o),i=t.indexOf(r),s=n>=0,a=i>=0;return s&&a?n-i:s?1:a?-1:e.gridColumns.indexOf(o)-e.gridColumns.indexOf(r)})),this.gridColumns=this.placeLockedColumns(this.gridColumns))},t.prototype.getAllDisplayedAutoHeightCols=function(){return this.displayedAutoHeightCols},t.prototype.setViewport=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)},t.prototype.getDisplayedColumnsStartingAt=function(e){for(var t=e,o=[];null!=t;)o.push(t),t=this.getDisplayedColAfter(t);return o},t.prototype.checkViewportColumns=function(){if(null!=this.displayedColumnsCenter&&this.extractViewport()){var e={type:We.EVENT_VIRTUAL_COLUMNS_CHANGED};this.eventService.dispatchEvent(e)}},t.prototype.setViewportPosition=function(e,t){(e!==this.scrollWidth||t!==this.scrollPosition||this.bodyWidthDirty)&&(this.scrollWidth=e,this.scrollPosition=t,this.bodyWidthDirty=!0,this.setViewport(),this.ready&&this.checkViewportColumns())},t.prototype.isPivotMode=function(){return this.pivotMode},t.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)},t.prototype.setPivotMode=function(e,t){if(void 0===t&&(t="api"),e!==this.pivotMode&&this.isPivotSettingAllowed(this.pivotMode)){this.pivotMode=e,this.autoGroupsNeedBuilding=!0,this.updateGridColumns(),this.updateDisplayedColumns(t);var o={type:We.EVENT_COLUMN_PIVOT_MODE_CHANGED};this.eventService.dispatchEvent(o)}},t.prototype.getSecondaryPivotColumn=function(e,t){if(i(this.secondaryColumns))return null;var o=this.getPrimaryColumn(t),r=null;return this.secondaryColumns.forEach((function(t){var n=t.getColDef().pivotKeys,i=t.getColDef().pivotValueColumn;ue(n,e)&&i===o&&(r=t)})),r},t.prototype.setBeans=function(e){this.logger=e.create("columnModel")},t.prototype.setFirstRightAndLastLeftPinned=function(e){var t,o;this.gridOptionsWrapper.isEnableRtl()?(t=this.displayedColumnsLeft?this.displayedColumnsLeft[0]:null,o=this.displayedColumnsRight?le(this.displayedColumnsRight):null):(t=this.displayedColumnsLeft?le(this.displayedColumnsLeft):null,o=this.displayedColumnsRight?this.displayedColumnsRight[0]:null),this.gridColumns.forEach((function(r){r.setLastLeftPinned(r===t,e),r.setFirstRightPinned(r===o,e)}))},t.prototype.autoSizeColumns=function(e){var t=this,o=e.columns,r=e.skipHeader,n=e.skipHeaderGroups,i=e.stopAtGroup,s=e.source,a=void 0===s?"api":s;this.animationFrameService.flushAllFrames();for(var l=[],u=-1,p=null!=r?r:this.gridOptionsWrapper.isSkipHeaderOnAutoSize(),c=null!=n?n:p;0!==u;)u=0,this.actionOnGridColumns(o,(function(e){if(l.indexOf(e)>=0)return!1;var o=t.autoWidthCalculator.getPreferredWidthForColumn(e,p);if(o>0){var r=t.normaliseColumnWidth(e,o);e.setActualWidth(r,a),l.push(e),u++}return!0}),a);c||this.autoSizeColumnGroupsByColumns(o,i),this.fireColumnResizedEvent(l,!0,"autosizeColumns")},t.prototype.fireColumnResizedEvent=function(e,t,o,r){if(void 0===r&&(r=null),e&&e.length){var n={type:We.EVENT_COLUMN_RESIZED,columns:e,column:1===e.length?e[0]:null,flexColumns:r,finished:t,source:o};this.eventService.dispatchEvent(n)}},t.prototype.autoSizeColumn=function(e,t,o){void 0===o&&(o="api"),e&&this.autoSizeColumns({columns:[e],skipHeader:t,skipHeaderGroups:!0,source:o})},t.prototype.autoSizeColumnGroupsByColumns=function(e,t){var o,r,n,i,s,a=new Set;this.getGridColumns(e).forEach((function(e){for(var o=e.getParent();o&&o!=t;)o.isPadding()||a.add(o),o=o.getParent()}));try{for(var l=ro(a),u=l.next();!u.done;u=l.next()){var p=u.value;try{for(var c=(n=void 0,ro(this.ctrlsService.getHeaderRowContainerCtrls())),d=c.next();!d.done&&!(s=d.value.getHeaderCtrlForColumn(p));d=c.next());}catch(e){n={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}s&&s.resizeLeafColumnsToFit()}}catch(e){o={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(o)throw o.error}}return[]},t.prototype.autoSizeAllColumns=function(e,t){void 0===t&&(t="api");var o=this.getAllDisplayedColumns();this.autoSizeColumns({columns:o,skipHeader:e,source:t})},t.prototype.getColumnsFromTree=function(e){var t=[],o=function(e){for(var r=0;r<e.length;r++){var n=e[r];n instanceof se?t.push(n):n instanceof we&&o(n.getChildren())}};return o(e),t},t.prototype.getAllDisplayedTrees=function(){return this.displayedTreeLeft&&this.displayedTreeRight&&this.displayedTreeCentre?this.displayedTreeLeft.concat(this.displayedTreeCentre).concat(this.displayedTreeRight):null},t.prototype.getPrimaryColumnTree=function(){return this.primaryColumnTree},t.prototype.getHeaderRowCount=function(){return this.gridHeaderRowCount},t.prototype.getDisplayedTreeLeft=function(){return this.displayedTreeLeft},t.prototype.getDisplayedTreeRight=function(){return this.displayedTreeRight},t.prototype.getDisplayedTreeCentre=function(){return this.displayedTreeCentre},t.prototype.isColumnDisplayed=function(e){return this.getAllDisplayedColumns().indexOf(e)>=0},t.prototype.getAllDisplayedColumns=function(){return this.displayedColumns},t.prototype.getViewportColumns=function(){return this.viewportColumns},t.prototype.getDisplayedLeftColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsLeft):this.displayedColumnsLeft},t.prototype.getDisplayedRightColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsRight):this.displayedColumnsRight},t.prototype.getDisplayedColumnsForRow=function(e,t,o,r){for(var n,i=[],s=null,a=function(a){var l,u=t[a],p=t.length-a,c=Math.min(u.getColSpan(e),p),d=[u];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===i.length&&s&&r&&r(u)&&i.push(s),i.push(u)),s=u,n=a},l=0;l<t.length;l++)a(l),l=n;return i},t.prototype.getViewportCenterColumnsForRow=function(e){var t=this;if(!this.colSpanActive)return this.viewportColumnsCenter;var o=this.suppressColumnVirtualisation?null:this.isColumnInRowViewport.bind(this);return this.getDisplayedColumnsForRow(e,this.displayedColumnsCenter,o,(function(e){var o=e.getLeft();return n(o)&&o>t.viewportLeft}))},t.prototype.getAriaColumnIndex=function(e){return this.getAllGridColumns().indexOf(e)+1},t.prototype.isColumnInHeaderViewport=function(e){return!!e.isAutoHeaderHeight()||this.isColumnInRowViewport(e)},t.prototype.isColumnInRowViewport=function(e){if(e.isAutoHeight())return!0;var t=e.getLeft()||0,o=t+e.getActualWidth(),r=this.viewportLeft-200,n=this.viewportRight+200;return!(t<r&&o<r||t>n&&o>n)},t.prototype.getDisplayedColumnsLeftWidth=function(){return this.getWidthOfColsInList(this.displayedColumnsLeft)},t.prototype.getDisplayedColumnsRightWidth=function(){return this.getWidthOfColsInList(this.displayedColumnsRight)},t.prototype.updatePrimaryColumnList=function(e,t,o,r,n,i){var a=this;if(void 0===i&&(i="api"),e&&!s(e)){var l=!1;if(e.forEach((function(e){var n=a.getPrimaryColumn(e);if(n){if(o){if(t.indexOf(n)>=0)return;t.push(n)}else{if(t.indexOf(n)<0)return;ce(t,n)}r(n),l=!0}})),l){this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(i);var u={type:n,columns:t,column:1===t.length?t[0]:null,source:i};this.eventService.dispatchEvent(u)}}},t.prototype.setRowGroupColumns=function(e,t){void 0===t&&(t="api"),this.autoGroupsNeedBuilding=!0,this.setPrimaryColumnList(e,this.rowGroupColumns,We.EVENT_COLUMN_ROW_GROUP_CHANGED,this.setRowGroupActive.bind(this),t)},t.prototype.setRowGroupActive=function(e,t,o){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,o),e&&!this.gridOptionsWrapper.isSuppressRowGroupHidesColumns()&&this.setColumnVisible(t,!1,o),e||this.gridOptionsWrapper.isSuppressMakeColumnVisibleAfterUnGroup()||this.setColumnVisible(t,!0,o))},t.prototype.addRowGroupColumn=function(e,t){void 0===t&&(t="api"),e&&this.addRowGroupColumns([e],t)},t.prototype.addRowGroupColumns=function(e,t){void 0===t&&(t="api"),this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!0,this.setRowGroupActive.bind(this,!0),We.EVENT_COLUMN_ROW_GROUP_CHANGED,t)},t.prototype.removeRowGroupColumns=function(e,t){void 0===t&&(t="api"),this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!1,this.setRowGroupActive.bind(this,!1),We.EVENT_COLUMN_ROW_GROUP_CHANGED,t)},t.prototype.removeRowGroupColumn=function(e,t){void 0===t&&(t="api"),e&&this.removeRowGroupColumns([e],t)},t.prototype.addPivotColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.pivotColumns,!0,(function(e){return e.setPivotActive(!0,t)}),We.EVENT_COLUMN_PIVOT_CHANGED,t)},t.prototype.setPivotColumns=function(e,t){void 0===t&&(t="api"),this.setPrimaryColumnList(e,this.pivotColumns,We.EVENT_COLUMN_PIVOT_CHANGED,(function(e,o){o.setPivotActive(e,t)}),t)},t.prototype.addPivotColumn=function(e,t){void 0===t&&(t="api"),this.addPivotColumns([e],t)},t.prototype.removePivotColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.pivotColumns,!1,(function(e){return e.setPivotActive(!1,t)}),We.EVENT_COLUMN_PIVOT_CHANGED,t)},t.prototype.removePivotColumn=function(e,t){void 0===t&&(t="api"),this.removePivotColumns([e],t)},t.prototype.setPrimaryColumnList=function(e,t,o,r,i){var s=this;t.length=0,n(e)&&e.forEach((function(e){var o=s.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),this.fireColumnEvent(o,t,i)},t.prototype.setValueColumns=function(e,t){void 0===t&&(t="api"),this.setPrimaryColumnList(e,this.valueColumns,We.EVENT_COLUMN_VALUE_CHANGED,this.setValueActive.bind(this),t)},t.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)}},t.prototype.addValueColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),We.EVENT_COLUMN_VALUE_CHANGED,t)},t.prototype.addValueColumn=function(e,t){void 0===t&&(t="api"),e&&this.addValueColumns([e],t)},t.prototype.removeValueColumn=function(e,t){void 0===t&&(t="api"),this.removeValueColumns([e],t)},t.prototype.removeValueColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.valueColumns,!1,this.setValueActive.bind(this,!1),We.EVENT_COLUMN_VALUE_CHANGED,t)},t.prototype.normaliseColumnWidth=function(e,t){var o=e.getMinWidth();n(o)&&t<o&&(t=o);var r=e.getMaxWidth();return n(r)&&e.isGreaterThanMax(t)&&(t=r),t},t.prototype.getPrimaryOrGridColumn=function(e){return this.getPrimaryColumn(e)||this.getGridColumn(e)},t.prototype.setColumnWidths=function(e,t,o,r){var n=this;void 0===r&&(r="api");var i=[];e.forEach((function(e){var o=n.getPrimaryOrGridColumn(e.key);if(o&&(i.push({width:e.newWidth,ratios:[1],columns:[o]}),"shift"===n.gridOptionsWrapper.getColResizeDefault()&&(t=!t),t)){var r=n.getDisplayedColAfter(o);if(!r)return;var s=o.getActualWidth()-e.newWidth,a=r.getActualWidth()+s;i.push({width:a,ratios:[1],columns:[r]})}})),0!==i.length&&this.resizeColumnSets({resizeSets:i,finished:o,source:r})},t.prototype.checkMinAndMaxWidthsForSet=function(e){var t=e.columns,o=e.width,r=0,i=0,s=!0;return t.forEach((function(e){var t=e.getMinWidth();r+=t||0;var o=e.getMaxWidth();n(o)&&o>0?i+=o:s=!1})),o>=r&&(!s||o<=i)},t.prototype.resizeColumnSets=function(e){var t=this,o=e.resizeSets,r=e.finished,i=e.source;if(!o||o.every((function(e){return t.checkMinAndMaxWidthsForSet(e)}))){var s=[],a=[];o.forEach((function(e){var t=e.width,o=e.columns,r=e.ratios,l={},u={};o.forEach((function(e){return a.push(e)}));for(var p=!0,c=0,d=function(){if(++c>1e3)return console.error("AG Grid: infinite loop in resizeColumnSets"),"break";p=!1;var e=[],i=0,s=t;o.forEach((function(t,o){if(u[t.getId()])s-=l[t.getId()];else{e.push(t);var n=r[o];i+=n}}));var a=1/i;e.forEach((function(o,i){var c;i===e.length-1?c=s:(c=Math.round(r[i]*t*a),s-=c);var d=o.getMinWidth(),h=o.getMaxWidth();n(d)&&c<d?(c=d,u[o.getId()]=!0,p=!0):n(h)&&h>0&&c>h&&(c=h,u[o.getId()]=!0,p=!0),l[o.getId()]=c}))};p&&"break"!==d(););o.forEach((function(e){var t=l[e.getId()];e.getActualWidth()!==t&&(e.setActualWidth(t,i),s.push(e))}))}));var l=s.length>0,u=[];l&&(u=this.refreshFlexedColumns({resizingCols:a,skipSetLeft:!0}),this.setLeftValues(i),this.updateBodyWidths(),this.checkViewportColumns());var p=a.concat(u);(l||r)&&this.fireColumnResizedEvent(p,r,i,u)}else if(r){var c=o&&o.length>0?o[0].columns:null;this.fireColumnResizedEvent(c,r,i)}},t.prototype.setColumnAggFunc=function(e,t,o){if(void 0===o&&(o="api"),e){var r=this.getPrimaryColumn(e);r&&(r.setAggFunc(t),this.fireColumnEvent(We.EVENT_COLUMN_VALUE_CHANGED,[r],o))}},t.prototype.fireColumnEvent=function(e,t,o){var r={type:e,columns:t,column:t&&1==t.length?t[0]:null,source:o};this.eventService.dispatchEvent(r)},t.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 n={type:We.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:this.rowGroupColumns,column:1===this.rowGroupColumns.length?this.rowGroupColumns[0]:null,source:o};this.eventService.dispatchEvent(n)},t.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)){fe(this.gridColumns,r,t),this.updateDisplayedColumns(o);var n={type:We.EVENT_COLUMN_MOVED,columns:r,column:1===r.length?r[0]:null,toIndex:t,source:o};this.eventService.dispatchEvent(n),this.columnAnimationService.finish()}},t.prototype.doesMovePassRules=function(e,t){var o=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(o)},t.prototype.doesOrderPassRules=function(e){return!!this.doesMovePassMarryChildren(e)&&!!this.doesMovePassLockedPositions(e)},t.prototype.getProposedColumnOrder=function(e,t){var o=this.gridColumns.slice();return fe(o,e,t),o},t.prototype.sortColumnsLikeGridColumns=function(e){var t=this;!e||e.length<=1||e.filter((function(e){return t.gridColumns.indexOf(e)<0})).length>0||e.sort((function(e,o){return t.gridColumns.indexOf(e)-t.gridColumns.indexOf(o)}))},t.prototype.doesMovePassLockedPositions=function(e){var t=0,o=!0;return e.forEach((function(e){var r,n=(r=e.getColDef().lockPosition)?!0===r||"left"===r?0:2:1;n<t&&(o=!1),t=n})),o},t.prototype.doesMovePassMarryChildren=function(e){var t=!0;return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(o){if(o instanceof we){var r=o,n=r.getColGroupDef();if(n&&n.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},t.prototype.moveColumn=function(e,t,o){void 0===o&&(o="api"),this.moveColumns([e],t,o)},t.prototype.moveColumnByIndex=function(e,t,o){void 0===o&&(o="api");var r=this.gridColumns[e];this.moveColumn(r,t,o)},t.prototype.getColumnDefs=function(){var e=this;if(this.primaryColumns){var t=this.primaryColumns.slice();return this.gridColsArePrimary?t.sort((function(t,o){return e.gridColumns.indexOf(t)-e.gridColumns.indexOf(o)})):this.lastPrimaryOrder&&t.sort((function(t,o){return e.lastPrimaryOrder.indexOf(t)-e.lastPrimaryOrder.indexOf(o)})),this.columnDefFactory.buildColumnDefs(t,this.rowGroupColumns,this.pivotColumns)}},t.prototype.getBodyContainerWidth=function(){return this.bodyWidth},t.prototype.getContainerWidth=function(e){switch(e){case oe.PINNED_LEFT:return this.leftWidth;case oe.PINNED_RIGHT:return this.rightWidth;default:return this.bodyWidth}},t.prototype.updateBodyWidths=function(){var e=this.getWidthOfColsInList(this.displayedColumnsCenter),t=this.getWidthOfColsInList(this.displayedColumnsLeft),o=this.getWidthOfColsInList(this.displayedColumnsRight);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:We.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED};this.eventService.dispatchEvent(r)}},t.prototype.getValueColumns=function(){return this.valueColumns?this.valueColumns:[]},t.prototype.getPivotColumns=function(){return this.pivotColumns?this.pivotColumns:[]},t.prototype.isPivotActive=function(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode},t.prototype.getRowGroupColumns=function(){return this.rowGroupColumns?this.rowGroupColumns:[]},t.prototype.getDisplayedCenterColumns=function(){return this.displayedColumnsCenter},t.prototype.getDisplayedLeftColumns=function(){return this.displayedColumnsLeft},t.prototype.getDisplayedRightColumns=function(){return this.displayedColumnsRight},t.prototype.getDisplayedColumns=function(e){switch(e){case oe.PINNED_LEFT:return this.getDisplayedLeftColumns();case oe.PINNED_RIGHT:return this.getDisplayedRightColumns();default:return this.getDisplayedCenterColumns()}},t.prototype.getAllPrimaryColumns=function(){return this.primaryColumns?this.primaryColumns.slice():null},t.prototype.getSecondaryColumns=function(){return this.secondaryColumns?this.secondaryColumns.slice():null},t.prototype.getAllColumnsForQuickFilter=function(){return this.columnsForQuickFilter},t.prototype.getAllGridColumns=function(){return this.gridColumns},t.prototype.isEmpty=function(){return s(this.gridColumns)},t.prototype.isRowGroupEmpty=function(){return s(this.rowGroupColumns)},t.prototype.setColumnVisible=function(e,t,o){void 0===o&&(o="api"),this.setColumnsVisible([e],t,o)},t.prototype.setColumnsVisible=function(e,t,o){void 0===t&&(t=!1),void 0===o&&(o="api"),this.applyColumnState({state:e.map((function(e){return{colId:"string"==typeof e?e:e.getColId(),hide:!t}}))},o)},t.prototype.setColumnPinned=function(e,t,o){void 0===o&&(o="api"),e&&this.setColumnsPinned([e],t,o)},t.prototype.setColumnsPinned=function(e,t,o){var r;void 0===o&&(o="api"),"print"!==this.gridOptionsWrapper.getDomLayout()?(this.columnAnimationService.start(),r=!0===t||t===oe.PINNED_LEFT?oe.PINNED_LEFT:t===oe.PINNED_RIGHT?oe.PINNED_RIGHT:null,this.actionOnGridColumns(e,(function(e){return e.getPinned()!==r&&(e.setPinned(r),!0)}),o,(function(){return{type:We.EVENT_COLUMN_PINNED,pinned:r,column:null,columns:null,source:o}})),this.columnAnimationService.finish()):console.warn("Changing the column pinning status is not allowed with domLayout='print'")},t.prototype.actionOnGridColumns=function(e,t,o,r){var i=this;if(!s(e)){var a=[];if(e.forEach((function(e){var o=i.getGridColumn(e);o&&!1!==t(o)&&a.push(o)})),a.length&&(this.updateDisplayedColumns(o),n(r)&&r)){var l=r();l.columns=a,l.column=1===a.length?a[0]:null,this.eventService.dispatchEvent(l)}}},t.prototype.getDisplayedColBefore=function(e){var t=this.getAllDisplayedColumns(),o=t.indexOf(e);return o>0?t[o-1]:null},t.prototype.getDisplayedColAfter=function(e){var t=this.getAllDisplayedColumns(),o=t.indexOf(e);return o<t.length-1?t[o+1]:null},t.prototype.getDisplayedGroupAfter=function(e){return this.getDisplayedGroupAtDirection(e,"After")},t.prototype.getDisplayedGroupBefore=function(e){return this.getDisplayedGroupAtDirection(e,"Before")},t.prototype.getDisplayedGroupAtDirection=function(e,t){for(var o=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),r=e.getDisplayedLeafColumns(),n="After"===t?le(r):r[0],i="getDisplayedCol"+t;;){var s=this[i](n);if(!s)return null;var a=this.getColumnGroupAtLevel(s,o);if(a!==e)return a}},t.prototype.getColumnGroupAtLevel=function(e,t){for(var o=e.getParent();!(o.getProvidedColumnGroup().getLevel()+o.getPaddingLevel()<=t);)o=o.getParent();return o},t.prototype.isPinningLeft=function(){return this.displayedColumnsLeft.length>0},t.prototype.isPinningRight=function(){return this.displayedColumnsRight.length>0},t.prototype.getPrimaryAndSecondaryAndAutoColumns=function(){var e;return(e=[]).concat.apply(e,io([this.primaryColumns||[],this.groupAutoColumns||[],this.secondaryColumns||[]]))},t.prototype.getPrimaryAndAutoGroupCols=function(){var e;return(e=[]).concat.apply(e,io([this.primaryColumns||[],this.groupAutoColumns||[]]))},t.prototype.getPrimaryAndSecondaryColumns=function(){var e;return(e=[]).concat.apply(e,io([this.primaryColumns||[],this.secondaryColumns||[]]))},t.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,n=null!=e.getSort()?e.getSort():null,i=null!=e.getSortIndex()?e.getSortIndex():null,s=null!=e.getFlex()&&e.getFlex()>0?e.getFlex():null;return{colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:n,sortIndex:i,aggFunc:r,rowGroup:e.isRowGroupActive(),rowGroupIndex:t,pivot:e.isPivotActive(),pivotIndex:o,flex:s}},t.prototype.getColumnState=function(){if(i(this.primaryColumns)||!this.isAlive())return[];var e=this.getPrimaryAndSecondaryAndAutoColumns().map(this.createStateItemFromColumn.bind(this));return this.orderColumnStateList(e),e},t.prototype.orderColumnStateList=function(e){var t=Xe(this.gridColumns.map((function(e,t){return[e.getColId(),t]})));e.sort((function(e,o){return(t.has(e.colId)?t.get(e.colId):-1)-(t.has(o.colId)?t.get(o.colId):-1)}))},t.prototype.resetColumnState=function(e){void 0===e&&(e="api");var t=this.getColumnsFromTree(this.primaryColumnTree),o=[],r=1e3,n=1e3,s=[];this.groupAutoColumns&&(s=s.concat(this.groupAutoColumns)),t&&(s=s.concat(t)),s.forEach((function(e){var t=function(e,t){return null!=e?e:null!=t?t:null},s=e.getColDef(),a=t(s.sort,s.initialSort),l=t(s.sortIndex,s.initialSortIndex),u=t(s.hide,s.initialHide),p=t(s.pinned,s.initialPinned),c=t(s.width,s.initialWidth),d=t(s.flex,s.initialFlex),h=t(s.rowGroupIndex,s.initialRowGroupIndex),f=t(s.rowGroup,s.initialRowGroup);null!=h||null!=f&&0!=f||(h=null,f=null);var g=t(s.pivotIndex,s.initialPivotIndex),m=t(s.pivot,s.initialPivot);null!=g||null!=m&&0!=m||(g=null,m=null);var y=t(s.aggFunc,s.initialAggFunc),v={colId:e.getColId(),sort:a,sortIndex:l,hide:u,pinned:p,width:c,flex:d,rowGroup:f,rowGroupIndex:h,pivot:m,pivotIndex:g,aggFunc:y};i(h)&&f&&(v.rowGroupIndex=r++),i(g)&&m&&(v.pivotIndex=n++),o.push(v)})),this.applyColumnState({state:o,applyOrder:!0},e)},t.prototype.applyColumnState=function(e,t){var o=this;if(s(this.primaryColumns))return!1;if(e&&e.state&&!e.state.forEach)return console.warn("AG Grid: applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state."),!1;var r=function(r,n,i){var s=o.compareColumnStatesAndRaiseEvents(t);o.autoGroupsNeedBuilding=!0;var a=n.slice(),l={},u={},p=[],c=[],d=0,h=o.rowGroupColumns.slice(),f=o.pivotColumns.slice();r.forEach((function(r){var n=r.colId||"";if(n.startsWith(oe.GROUP_AUTO_COLUMN_ID))return p.push(r),void c.push(r);var s=i(n);s?(o.syncColumnWithStateItem(s,r,e.defaultState,l,u,!1,t),ce(a,s)):(c.push(r),d+=1)}));var g=function(r){return o.syncColumnWithStateItem(r,null,e.defaultState,l,u,!1,t)};a.forEach(g);var m=function(e,t,o,r){var n=e[o.getId()],i=e[r.getId()],s=null!=n,a=null!=i;if(s&&a)return n-i;if(s)return-1;if(a)return 1;var l=t.indexOf(o),u=t.indexOf(r),p=l>=0;return p&&u>=0?l-u:p?-1:1};o.rowGroupColumns.sort(m.bind(o,l,h)),o.pivotColumns.sort(m.bind(o,u,f)),o.updateGridColumns();var y=o.groupAutoColumns?o.groupAutoColumns.slice():[];return p.forEach((function(r){var n=o.getAutoColumn(r.colId);ce(y,n),o.syncColumnWithStateItem(n,r,e.defaultState,null,null,!0,t)})),y.forEach(g),o.applyOrderAfterApplyState(e),o.updateDisplayedColumns(t),o.dispatchEverythingChanged(t),s(),{unmatchedAndAutoStates:c,unmatchedCount:d}};this.columnAnimationService.start();var i=r(e.state||[],this.primaryColumns||[],(function(e){return o.getPrimaryColumn(e)})),a=i.unmatchedAndAutoStates,l=i.unmatchedCount;return(a.length>0||n(e.defaultState))&&(l=r(a,this.secondaryColumns||[],(function(e){return o.getSecondaryColumn(e)})).unmatchedCount),this.columnAnimationService.finish(),0===l},t.prototype.applyOrderAfterApplyState=function(e){var t=this;if(e.applyOrder&&e.state){var o=[],r={};e.state.forEach((function(e){if(e.colId&&!r[e.colId]){var n=t.gridColumnsMap[e.colId];n&&(o.push(n),r[e.colId]=!0)}}));var n=0;this.gridColumns.forEach((function(e){var t=e.getColId();null!=r[t]||(t.startsWith(oe.GROUP_AUTO_COLUMN_ID)?he(o,e,n++):o.push(e))})),o=this.placeLockedColumns(o),this.doesMovePassMarryChildren(o)?this.gridColumns=o:console.warn("AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.")}},t.prototype.compareColumnStatesAndRaiseEvents=function(e){var t=this,o={rowGroupColumns:this.rowGroupColumns.slice(),pivotColumns:this.pivotColumns.slice(),valueColumns:this.valueColumns.slice()},r=this.getColumnState(),n={};return r.forEach((function(e){n[e.colId]=e})),function(){if(!t.gridOptionsWrapper.isSuppressColumnStateEvents()){var i=t.getPrimaryAndSecondaryAndAutoColumns(),s=function(o,r,n,i){if(!ue(r.map(i),n.map(i))){var s={type:o,columns:n,column:1===n.length?n[0]:null,source:e};t.eventService.dispatchEvent(s)}},a=function(e){var t=[];return i.forEach((function(o){var r=n[o.getColId()];r&&e(r,o)&&t.push(o)})),t},l=function(e){return e.getColId()};s(We.EVENT_COLUMN_ROW_GROUP_CHANGED,o.rowGroupColumns,t.rowGroupColumns,l),s(We.EVENT_COLUMN_PIVOT_CHANGED,o.pivotColumns,t.pivotColumns,l),a((function(e,t){var o=null!=e.aggFunc,r=o!=t.isValueActive(),n=o&&e.aggFunc!=t.getAggFunc();return r||n})).length>0&&t.fireColumnEvent(We.EVENT_COLUMN_VALUE_CHANGED,t.valueColumns,e),t.fireColumnResizedEvent(a((function(e,t){return e.width!=t.getActualWidth()})),!0,e),t.raiseColumnPinnedEvent(a((function(e,t){return e.pinned!=t.getPinned()})),e),t.raiseColumnVisibleEvent(a((function(e,t){return e.hide==t.isVisible()})),e),a((function(e,t){return e.sort!=t.getSort()||e.sortIndex!=t.getSortIndex()})).length>0&&t.sortController.dispatchSortChangedEvents(e),t.raiseColumnMovedEvent(r,e)}}},t.prototype.raiseColumnPinnedEvent=function(e,t){if(e.length){var o=1===e.length?e[0]:null,r=this.getCommonValue(e,(function(e){return e.getPinned()})),n={type:We.EVENT_COLUMN_PINNED,pinned:null!=r?r:null,columns:e,column:o,source:t};this.eventService.dispatchEvent(n)}},t.prototype.getCommonValue=function(e,t){if(e&&0!=e.length){for(var o=t(e[0]),r=1;r<e.length;r++)if(o!==t(e[r]))return;return o}},t.prototype.raiseColumnVisibleEvent=function(e,t){if(e.length){var o=1===e.length?e[0]:null,r=this.getCommonValue(e,(function(e){return e.isVisible()})),n={type:We.EVENT_COLUMN_VISIBLE,visible:r,columns:e,column:o,source:t};this.eventService.dispatchEvent(n)}},t.prototype.raiseColumnMovedEvent=function(e,t){var o=this,r=this.getColumnState(),n={};r.forEach((function(e){return n[e.colId]=e}));var i={};e.forEach((function(e){n[e.colId]&&(i[e.colId]=!0)}));var s=e.filter((function(e){return i[e.colId]})),a=r.filter((function(e){return i[e.colId]})),l=[];if(a.forEach((function(e,t){var r=s&&s[t];if(r&&r.colId!==e.colId){var n=o.getGridColumn(r.colId);n&&l.push(n)}})),l.length){var u={type:We.EVENT_COLUMN_MOVED,columns:l,column:null,source:t};this.eventService.dispatchEvent(u)}},t.prototype.syncColumnWithStateItem=function(e,t,o,r,i,s,a){if(e){var l=function(e,r){var i={value1:void 0,value2:void 0},s=!1;return t&&(void 0!==t[e]&&(i.value1=t[e],s=!0),n(r)&&void 0!==t[r]&&(i.value2=t[r],s=!0)),!s&&o&&(void 0!==o[e]&&(i.value1=o[e]),n(r)&&void 0!==o[r]&&(i.value2=o[r])),i},u=l("hide").value1;void 0!==u&&e.setVisible(!u,a);var p=l("pinned").value1;void 0!==p&&e.setPinned(p);var c=this.columnUtils.calculateColMinWidth(e.getColDef()),d=l("flex").value1;if(void 0!==d&&e.setFlex(d),e.getFlex()<=0){var h=l("width").value1;null!=h&&null!=c&&h>=c&&e.setActualWidth(h,a)}var f=l("sort").value1;void 0!==f&&(f===oe.SORT_DESC||f===oe.SORT_ASC?e.setSort(f,a):e.setSort(void 0,a));var g=l("sortIndex").value1;if(void 0!==g&&e.setSortIndex(g),!s&&e.isPrimary()){var m=l("aggFunc").value1;void 0!==m&&("string"==typeof m?(e.setAggFunc(m),e.isValueActive()||(e.setValueActive(!0,a),this.valueColumns.push(e))):(n(m)&&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 is intended for the column state to be stored and retrieved as simple JSON."),e.isValueActive()&&(e.setValueActive(!1,a),ce(this.valueColumns,e))));var y=l("rowGroup","rowGroupIndex"),v=y.value1,C=y.value2;void 0===v&&void 0===C||("number"==typeof C||v?(e.isRowGroupActive()||(e.setRowGroupActive(!0,a),this.rowGroupColumns.push(e)),r&&"number"==typeof C&&(r[e.getId()]=C)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,a),ce(this.rowGroupColumns,e)));var w=l("pivot","pivotIndex"),E=w.value1,_=w.value2;void 0===E&&void 0===_||("number"==typeof _||E?(e.isPivotActive()||(e.setPivotActive(!0,a),this.pivotColumns.push(e)),i&&"number"==typeof _&&(i[e.getId()]=_)):e.isPivotActive()&&(e.setPivotActive(!1,a),ce(this.pivotColumns,e)))}}},t.prototype.getGridColumns=function(e){return this.getColumns(e,this.getGridColumn.bind(this))},t.prototype.getColumns=function(e,t){var o=[];return e&&e.forEach((function(e){var r=t(e);r&&o.push(r)})),o},t.prototype.getColumnWithValidation=function(e){if(null==e)return null;var t=this.getGridColumn(e);return t||console.warn("AG Grid: could not find column "+e),t},t.prototype.getPrimaryColumn=function(e){return this.primaryColumns?this.getColumn(e,this.primaryColumns,this.primaryColumnsMap):null},t.prototype.getGridColumn=function(e){return this.getColumn(e,this.gridColumns,this.gridColumnsMap)},t.prototype.getSecondaryColumn=function(e){return this.secondaryColumns?this.getColumn(e,this.secondaryColumns,this.secondaryColumnsMap):null},t.prototype.getColumn=function(e,t,o){if(!e)return null;if("string"==typeof e&&o[e])return o[e];for(var r=0;r<t.length;r++)if(this.columnsMatch(t[r],e))return t[r];return this.getAutoColumn(e)},t.prototype.getSourceColumnsForGroupColumn=function(e){var t=e.getColDef().showRowGroup;if(!t)return null;if(!0===t)return this.rowGroupColumns.slice(0);var o=this.getPrimaryColumn(t);return o?[o]:null},t.prototype.getAutoColumn=function(e){var t=this;return this.groupAutoColumns&&n(this.groupAutoColumns)&&!i(this.groupAutoColumns)&&this.groupAutoColumns.find((function(o){return t.columnsMatch(o,e)}))||null},t.prototype.columnsMatch=function(e,t){var o=e===t,r=e.getColDef()===t,n=e.getColId()==t;return o||r||n},t.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},t.prototype.getDisplayNameForProvidedColumnGroup=function(e,t,o){var r=t?t.getColGroupDef():null;return r?this.getHeaderName(r,null,e,t,o):null},t.prototype.getDisplayNameForColumnGroup=function(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)},t.prototype.getHeaderName=function(e,t,o,r,n){var i=e.headerValueGetter;if(i){var s={colDef:e,column:t,columnGroup:o,providedColumnGroup:r,location:n,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()};return"function"==typeof i?i(s):"string"==typeof i?this.expressionService.evaluate(i,s):(console.warn("ag-grid: headerValueGetter must be a function or a string"),"")}return null!=e.headerName?e.headerName:e.field?qe(e.field):""},t.prototype.wrapHeaderNameWithAggFunc=function(e,t){if(this.gridOptionsWrapper.isSuppressAggFuncInHeader())return t;var o,r=e.getColDef().pivotValueColumn,i=null;if(n(r)){var s=this.gridOptionsWrapper.isRemovePivotHeaderRowWhenSingleValueColumn()&&1===this.valueColumns.length,a=void 0!==e.getColDef().pivotTotalColumnIds;if(s&&!a)return t;i=r?r.getAggFunc():null,o=!0}else{var l=e.isValueActive(),u=this.pivotMode||!this.isRowGroupEmpty();l&&u?(i=e.getAggFunc(),o=!0):o=!1}if(o){var p="string"==typeof i?i:"func";return this.gridOptionsWrapper.getLocaleTextFunc()(p,p)+"("+t+")"}return t},t.prototype.getColumnGroup=function(e,t){if(!e)return null;if(e instanceof Ce)return e;var o=this.getAllDisplayedTrees(),r="number"==typeof t,n=null;return this.columnUtils.depthFirstAllColumnTreeSearch(o,(function(o){if(o instanceof Ce){var i=o;(r?e===i.getGroupId()&&t===i.getInstanceId():e===i.getGroupId())&&(n=i)}})),n},t.prototype.isReady=function(){return this.ready},t.prototype.extractValueColumns=function(e,t){this.valueColumns=this.extractColumns(t,this.valueColumns,(function(t,o){return t.setValueActive(o,e)}),(function(){}),(function(){}),(function(e){var t=e.aggFunc;return null===t||""===t?null:void 0!==t?!!t:void 0}),(function(e){return null!=e.initialAggFunc&&""!=e.initialAggFunc})),this.valueColumns.forEach((function(e){var t=e.getColDef();null!=t.aggFunc&&""!=t.aggFunc?e.setAggFunc(t.aggFunc):e.getAggFunc()||e.setAggFunc(t.initialAggFunc)}))},t.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.initialRowGroupIndex}),(function(e){return e.rowGroup}),(function(e){return e.initialRowGroup}))},t.prototype.extractColumns=function(e,t,o,r,n,i,s){void 0===e&&(e=[]),void 0===t&&(t=[]);var a=[],p=[];(this.primaryColumns||[]).forEach((function(o){var c=e.indexOf(o)<0,d=o.getColDef(),h=u(i(d)),f=u(s(d)),g=l(r(d)),m=l(n(d));(void 0!==h?h:void 0!==g?null!==g&&g>=0:c?void 0!==f?f:void 0!==m&&null!=m&&m>=0:t.indexOf(o)>=0)&&((c?null!=g||null!=m:null!=g)?a.push(o):p.push(o))}));var c=function(e){var t=r(e.getColDef()),o=n(e.getColDef());return null!=t?t:o};a.sort((function(e,t){var o=c(e),r=c(t);return o===r?0:o<r?-1:1}));var d=[].concat(a);return t.forEach((function(e){p.indexOf(e)>=0&&d.push(e)})),p.forEach((function(e){d.indexOf(e)<0&&d.push(e)})),t.forEach((function(e){d.indexOf(e)<0&&o(e,!1)})),d.forEach((function(e){t.indexOf(e)<0&&o(e,!0)})),d},t.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.initialPivotIndex}),(function(e){return e.pivot}),(function(e){return e.initialPivot}))},t.prototype.resetColumnGroupState=function(e){void 0===e&&(e="api");var t=[];this.columnUtils.depthFirstOriginalTreeSearch(null,this.primaryColumnTree,(function(e){if(e instanceof we){var o=e.getColGroupDef(),r={groupId:e.getGroupId(),open:o?o.openByDefault:void 0};t.push(r)}})),this.setColumnGroupState(t,e)},t.prototype.getColumnGroupState=function(){var e=[];return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(t){t instanceof we&&e.push({groupId:t.getGroupId(),open:t.isExpanded()})})),e},t.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,n=e.open,i=o.getProvidedColumnGroup(t);i&&i.isExpanded()!==n&&(o.logger.log("columnGroupOpened("+i.getGroupId()+","+n+")"),i.setExpanded(n),r.push(i))})),this.updateGroupsAndDisplayedColumns(t),this.setFirstRightAndLastLeftPinned(t),r.forEach((function(e){var t={type:We.EVENT_COLUMN_GROUP_OPENED,columnGroup:e};o.eventService.dispatchEvent(t)})),this.columnAnimationService.finish()},t.prototype.setColumnGroupOpened=function(e,t,o){var r;void 0===o&&(o="api"),r=e instanceof we?e.getId():e||"",this.setColumnGroupState([{groupId:r,open:t}],o)},t.prototype.getProvidedColumnGroup=function(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){o instanceof we&&o.getId()===e&&(t=o)})),t},t.prototype.calculateColumnsForDisplay=function(){var e=this;return this.pivotMode&&i(this.secondaryColumns)?this.gridColumns.filter((function(t){var o=e.groupAutoColumns&&ge(e.groupAutoColumns,t),r=e.valueColumns&&ge(e.valueColumns,t);return o||r})):this.gridColumns.filter((function(t){return e.groupAutoColumns&&ge(e.groupAutoColumns,t)||t.isVisible()}))},t.prototype.checkColSpanActiveInCols=function(e){var t=!1;return e.forEach((function(e){n(e.getColDef().colSpan)&&(t=!0)})),t},t.prototype.calculateColumnsForGroupDisplay=function(){var e=this;this.groupDisplayColumns=[],this.groupDisplayColumnsMap={};var t=function(t){var o=t.getColDef(),r=o.showRowGroup;o&&n(r)&&(e.groupDisplayColumns.push(t),"string"==typeof r?e.groupDisplayColumnsMap[r]=t:!0===r&&e.getRowGroupColumns().forEach((function(o){e.groupDisplayColumnsMap[o.getId()]=t})))};this.gridColumns.forEach(t),this.groupAutoColumns&&this.groupAutoColumns.forEach(t)},t.prototype.getGroupDisplayColumns=function(){return this.groupDisplayColumns},t.prototype.getGroupDisplayColumnForGroup=function(e){return this.groupDisplayColumnsMap[e]},t.prototype.updateDisplayedColumns=function(e){var t=this.calculateColumnsForDisplay();this.buildDisplayedTrees(t),this.calculateColumnsForGroupDisplay(),this.updateGroupsAndDisplayedColumns(e),this.setFirstRightAndLastLeftPinned(e)},t.prototype.isSecondaryColumnsPresent=function(){return n(this.secondaryColumns)},t.prototype.setSecondaryColumns=function(e,t){var o=this;void 0===t&&(t="api");var r=e&&e.length>0;if(r||!i(this.secondaryColumns)){if(r){this.processSecondaryColumnDefinitions(e);var n=this.columnFactory.createColumnTree(e,!1,this.secondaryBalancedTree||this.previousSecondaryColumns||void 0);this.secondaryBalancedTree=n.columnTree,this.secondaryHeaderRowCount=n.treeDept+1,this.secondaryColumns=this.getColumnsFromTree(this.secondaryBalancedTree),this.secondaryColumnsMap={},this.secondaryColumns.forEach((function(e){return o.secondaryColumnsMap[e.getId()]=e})),this.previousSecondaryColumns=null}else this.previousSecondaryColumns=this.secondaryBalancedTree,this.secondaryBalancedTree=null,this.secondaryHeaderRowCount=-1,this.secondaryColumns=null,this.secondaryColumnsMap={};this.updateGridColumns(),this.updateDisplayedColumns(t)}},t.prototype.processSecondaryColumnDefinitions=function(e){var t=this.gridOptionsWrapper.getProcessPivotResultColDefFunc(),o=this.gridOptionsWrapper.getProcessPivotResultColGroupDefFunc();if(t||o){var r=function(e){e.forEach((function(e){if(n(e.children)){var i=e;o&&o(i),r(i.children)}else t&&t(e)}))};e&&r(e)}},t.prototype.updateGridColumns=function(){var e=this,t=this.gridBalancedTree;this.gridColsArePrimary?this.lastPrimaryOrder=this.gridColumns:this.lastSecondaryOrder=this.gridColumns;var o=void 0;if(this.secondaryColumns&&this.secondaryBalancedTree){var r=this.secondaryColumns.every((function(t){return void 0!==e.gridColumnsMap[t.getColId()]}));this.gridBalancedTree=this.secondaryBalancedTree.slice(),this.gridHeaderRowCount=this.secondaryHeaderRowCount,this.gridColumns=this.secondaryColumns.slice(),this.gridColsArePrimary=!1,r&&(o=this.lastSecondaryOrder)}else this.primaryColumns&&(this.gridBalancedTree=this.primaryColumnTree.slice(),this.gridHeaderRowCount=this.primaryHeaderRowCount,this.gridColumns=this.primaryColumns.slice(),this.gridColsArePrimary=!0,o=this.lastPrimaryOrder);if(this.createGroupAutoColumnsIfNeeded()&&o){var n=Xe(this.groupAutoColumns.map((function(e){return[e,!0]})));o=o.filter((function(e){return!n.has(e)})),o=io(this.groupAutoColumns,o)}if(this.addAutoGroupToGridColumns(),this.orderGridColsLike(o),this.gridColumns=this.placeLockedColumns(this.gridColumns),this.setupQuickFilterColumns(),this.clearDisplayedAndViewportColumns(),this.colSpanActive=this.checkColSpanActiveInCols(this.gridColumns),this.gridColumnsMap={},this.gridColumns.forEach((function(t){return e.gridColumnsMap[t.getId()]=t})),this.setAutoHeightActive(),!ue(t,this.gridBalancedTree)){var i={type:We.EVENT_GRID_COLUMNS_CHANGED};this.eventService.dispatchEvent(i)}},t.prototype.setAutoHeightActive=function(){if(this.autoHeightActive=this.gridColumns.filter((function(e){return e.isAutoHeight()})).length>0,this.autoHeightActive){this.autoHeightActiveAtLeastOnce=!0;var e=this.rowModel.getType();e!==oe.ROW_MODEL_TYPE_CLIENT_SIDE&&e!==oe.ROW_MODEL_TYPE_SERVER_SIDE&&T((function(){return console.warn("AG Grid - autoHeight columns only work with Client Side Row Model and Server Side Row Model.")}),"autoHeightActive.wrongRowModel")}},t.prototype.orderGridColsLike=function(e){if(!i(e)){var t=Xe(e.map((function(e,t){return[e,t]}))),o=!0;if(this.gridColumns.forEach((function(e){t.has(e)&&(o=!1)})),!o){var r=Xe(this.gridColumns.map((function(e){return[e,!0]}))),n=e.filter((function(e){return r.has(e)})),s=Xe(n.map((function(e){return[e,!0]}))),a=this.gridColumns.filter((function(e){return!s.has(e)})),l=n.slice();a.forEach((function(e){var t=e.getOriginalParent();if(t){for(var o=[];!o.length&&t;)t.getLeafColumns().forEach((function(e){var t=l.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 l.indexOf(e)})),n=Math.max.apply(Math,io(r));he(l,e,n+1)}else l.push(e)}else l.push(e)})),this.gridColumns=l}}},t.prototype.isPrimaryColumnGroupsPresent=function(){return this.primaryHeaderRowCount>1},t.prototype.setupQuickFilterColumns=function(){this.groupAutoColumns?this.columnsForQuickFilter=(this.primaryColumns||[]).concat(this.groupAutoColumns):this.primaryColumns&&(this.columnsForQuickFilter=this.primaryColumns)},t.prototype.placeLockedColumns=function(e){var t=[],o=[],r=[];return e.forEach((function(e){var n=e.getColDef().lockPosition;"right"===n?r.push(e):"left"===n||!0===n?t.push(e):o.push(e)})),io(t,o,r)},t.prototype.addAutoGroupToGridColumns=function(){if(!i(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)}},t.prototype.clearDisplayedAndViewportColumns=function(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.viewportColumns=[],this.headerViewportColumns=[],this.viewportColumnsHash=""},t.prototype.updateGroupsAndDisplayedColumns=function(e){this.updateOpenClosedVisibilityInColumnGroups(),this.deriveDisplayedColumns(e),this.refreshFlexedColumns(),this.extractViewport(),this.updateBodyWidths();var t={type:We.EVENT_DISPLAYED_COLUMNS_CHANGED};this.eventService.dispatchEvent(t)},t.prototype.deriveDisplayedColumns=function(e){this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft,this.displayedColumnsLeft),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre,this.displayedColumnsCenter),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight,this.displayedColumnsRight),this.joinDisplayedColumns(),this.setLeftValues(e),this.displayedAutoHeightCols=this.displayedColumns.filter((function(e){return e.isAutoHeight()}))},t.prototype.isAutoRowHeightActive=function(){return this.autoHeightActive},t.prototype.wasAutoRowHeightEverActive=function(){return this.autoHeightActiveAtLeastOnce},t.prototype.joinDisplayedColumns=function(){this.gridOptionsWrapper.isEnableRtl()?this.displayedColumns=this.displayedColumnsRight.concat(this.displayedColumnsCenter).concat(this.displayedColumnsLeft):this.displayedColumns=this.displayedColumnsLeft.concat(this.displayedColumnsCenter).concat(this.displayedColumnsRight)},t.prototype.setLeftValues=function(e){this.setLeftValuesOfColumns(e),this.setLeftValuesOfGroups()},t.prototype.setLeftValuesOfColumns=function(e){var t=this;if(this.primaryColumns){var o=this.primaryColumns.slice(0),r=this.gridOptionsWrapper.isEnableRtl();[this.displayedColumnsLeft,this.displayedColumnsRight,this.displayedColumnsCenter].forEach((function(n){if(r){var i=t.getWidthOfColsInList(n);n.forEach((function(t){i-=t.getActualWidth(),t.setLeft(i,e)}))}else{var s=0;n.forEach((function(t){t.setLeft(s,e),s+=t.getActualWidth()}))}de(o,n)})),o.forEach((function(t){t.setLeft(null,e)}))}},t.prototype.setLeftValuesOfGroups=function(){[this.displayedTreeLeft,this.displayedTreeRight,this.displayedTreeCentre].forEach((function(e){e.forEach((function(e){e instanceof Ce&&e.checkLeft()}))}))},t.prototype.derivedDisplayedColumnsFromDisplayedTree=function(e,t){t.length=0,this.columnUtils.depthFirstDisplayedColumnTreeSearch(e,(function(e){e instanceof se&&t.push(e)}))},t.prototype.extractViewportColumns=function(){this.suppressColumnVirtualisation?(this.viewportColumnsCenter=this.displayedColumnsCenter,this.headerViewportColumnsCenter=this.displayedColumnsCenter):(this.viewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInRowViewport.bind(this)),this.headerViewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInHeaderViewport.bind(this))),this.viewportColumns=this.viewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight),this.headerViewportColumns=this.headerViewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight)},t.prototype.getVirtualHeaderGroupRow=function(e,t){var o;switch(e){case oe.PINNED_LEFT:o=this.viewportRowLeft[t];break;case oe.PINNED_RIGHT:o=this.viewportRowRight[t];break;default:o=this.viewportRowCenter[t]}return i(o)&&(o=[]),o},t.prototype.calculateHeaderRows=function(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={};var e={};this.headerViewportColumns.forEach((function(t){return e[t.getId()]=!0}));var t=function(o,r,n){for(var i=!1,s=0;s<o.length;s++){var a=o[s],l=!1;if(a instanceof se)l=!0===e[a.getId()];else{var u=a.getDisplayedChildren();u&&(l=t(u,r,n+1))}l&&(i=!0,r[n]||(r[n]=[]),r[n].push(a))}return i};t(this.displayedTreeLeft,this.viewportRowLeft,0),t(this.displayedTreeRight,this.viewportRowRight,0),t(this.displayedTreeCentre,this.viewportRowCenter,0)},t.prototype.extractViewport=function(){this.extractViewportColumns();var e=this.viewportColumns.map((function(e){return e.getId()+"-"+(e.getPinned()||"normal")})).join("#"),t=this.viewportColumnsHash!==e;return t&&(this.viewportColumnsHash=e,this.calculateHeaderRows()),t},t.prototype.refreshFlexedColumns=function(e){var t=this;void 0===e&&(e={});var o=e.source?e.source:"flex";if(null!=e.viewportWidth&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];var r=-1;e.resizingCols&&e.resizingCols.forEach((function(e){var o=t.displayedColumnsCenter.indexOf(e);r<o&&(r=o)}));var i=function(e){var o=t.displayedColumnsCenter.indexOf(e)>r;return e.getFlex()&&o},s=this.displayedColumnsCenter.filter((function(e){return!i(e)})),a=this.displayedColumnsCenter.filter((function(e){return i(e)})),l=[];if(!a.length)return[];var u,p=[];e:for(;;){var c=a.reduce((function(e,t){return e+t.getFlex()}),0);u=this.flexViewportWidth-this.getWidthOfColsInList(s);for(var d=0;d<a.length;d++){var h=a[d],f=u*h.getFlex()/c,g=0,m=h.getMinWidth(),y=h.getMaxWidth();if(n(m)&&f<m?g=m:n(y)&&f>y&&(g=y),g){h.setActualWidth(g,o),ce(a,h),l.push(h),s.push(h);continue e}p[d]=Math.round(f)}break}var v=u;return a.forEach((function(e,t){e.setActualWidth(Math.min(p[t],v),o),l.push(e),v-=p[t]})),e.skipSetLeft||this.setLeftValues(o),e.updateBodyWidths&&this.updateBodyWidths(),e.fireResizedEvent&&this.fireColumnResizedEvent(l,!0,o,a),this.flexColsCalculatedAtLestOnce||(this.gridOptionsWrapper.isRowModelDefault()&&this.rowModel.resetRowHeights(),this.flexColsCalculatedAtLestOnce=!0),a},t.prototype.sizeColumnsToFit=function(e,t,o,r){var i,s,a,l,u,p,c,d,h,f,g;void 0===t&&(t="sizeColumnsToFit");var m={};r&&(null===(s=null===(i=r)||void 0===i?void 0:i.columnLimits)||void 0===s||s.forEach((function(e){var t=e.key,o=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]])}return o}(e,["key"]);m["string"==typeof t?t:t.getColId()]=o})));var y=this.getAllDisplayedColumns(),v=e===this.getWidthOfColsInList(y);if(!(e<=0||!y.length||v)){var C=[],w=[];y.forEach((function(e){!0===e.getColDef().suppressSizeToFit?w.push(e):C.push(e)}));var E=C.slice(0),_=!1,S=function(e){ce(C,e),w.push(e)};for(C.forEach((function(e){return e.resetActualWidth(t)}));!_;){_=!0;var R=e-this.getWidthOfColsInList(w);if(R<=0)C.forEach((function(e){var o,n,i,s,a=null!=(i=null===(n=null===(o=m)||void 0===o?void 0:o[e.getId()])||void 0===n?void 0:n.minWidth)?i:null===(s=r)||void 0===s?void 0:s.defaultMinWidth;"number"!=typeof a?e.setMinimum(t):e.setActualWidth(a)}));else for(var b=R/this.getWidthOfColsInList(C),O=R,P=C.length-1;P>=0;P--){var T=C[P],A=null===(a=m)||void 0===a?void 0:a[T.getId()],D=null!=(u=null===(l=A)||void 0===l?void 0:l.minWidth)?u:null===(p=r)||void 0===p?void 0:p.defaultMinWidth,I=null!=(d=null===(c=A)||void 0===c?void 0:c.maxWidth)?d:null===(h=r)||void 0===h?void 0:h.defaultMaxWidth,N=null!=(f=T.getMinWidth())?f:0,x=null!=(g=T.getMaxWidth())?g:Number.MAX_VALUE,M="number"==typeof D&&D>N?D:T.getMinWidth(),L="number"==typeof I&&I<x?I:T.getMaxWidth(),F=Math.round(T.getActualWidth()*b);n(M)&&F<M?(F=M,S(T),_=!1):n(L)&&F>L?(F=L,S(T),_=!1):0===P&&(F=O),T.setActualWidth(F,t,!0),O-=F}}E.forEach((function(e){e.fireColumnWidthChangedEvent(t)})),this.setLeftValues(t),this.updateBodyWidths(),o||this.fireColumnResizedEvent(E,!0,t)}},t.prototype.buildDisplayedTrees=function(e){var t=[],o=[],r=[];e.forEach((function(e){switch(e.getPinned()){case"left":t.push(e);break;case"right":o.push(e);break;default:r.push(e)}}));var n=new je;this.displayedTreeLeft=this.displayedGroupCreator.createDisplayedGroups(t,this.gridBalancedTree,n,oe.PINNED_LEFT,this.displayedTreeLeft),this.displayedTreeRight=this.displayedGroupCreator.createDisplayedGroups(o,this.gridBalancedTree,n,oe.PINNED_RIGHT,this.displayedTreeRight),this.displayedTreeCentre=this.displayedGroupCreator.createDisplayedGroups(r,this.gridBalancedTree,n,null,this.displayedTreeCentre),this.updateDisplayedMap()},t.prototype.updateDisplayedMap=function(){var e=this;this.displayedColumnsAndGroupsMap={};var t=function(t){e.displayedColumnsAndGroupsMap[t.getUniqueId()]=t};this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeCentre,t),this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeLeft,t),this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeRight,t)},t.prototype.isDisplayed=function(e){return this.displayedColumnsAndGroupsMap[e.getUniqueId()]===e},t.prototype.updateOpenClosedVisibilityInColumnGroups=function(){var e=this.getAllDisplayedTrees();this.columnUtils.depthFirstAllColumnTreeSearch(e,(function(e){e instanceof Ce&&e.calculateDisplayedColumns()}))},t.prototype.getGroupAutoColumns=function(){return this.groupAutoColumns},t.prototype.createGroupAutoColumnsIfNeeded=function(){if(!this.autoGroupsNeedBuilding)return!1;this.autoGroupsNeedBuilding=!1;var e=this.gridOptionsWrapper.isGroupUseEntireRow(this.pivotMode),t=this.pivotMode?this.gridOptionsWrapper.isPivotSuppressAutoColumn():this.gridOptionsWrapper.isGroupSuppressAutoColumn();if(!(this.rowGroupColumns.length>0||this.usingTreeData)||t||e)this.groupAutoColumns=null;else{var o=this.groupAutoColumns||[],r=this.autoGroupColService.createAutoGroupColumns(o,this.rowGroupColumns);if(!this.autoColsEqual(r,this.groupAutoColumns)||this.forceRecreateAutoGroups)return this.groupAutoColumns=r,!0}return!1},t.prototype.autoColsEqual=function(e,t){return ue(e,t,(function(e,t){return e.getColId()===t.getColId()}))},t.prototype.getWidthOfColsInList=function(e){return e.reduce((function(e,t){return e+t.getActualWidth()}),0)},t.prototype.getGridBalancedTree=function(){return this.gridBalancedTree},t.prototype.hasFloatingFilters=function(){return!!this.gridColumns&&this.gridColumns.some((function(e){return e.getColDef().floatingFilter}))},t.prototype.getFirstDisplayedColumn=function(){var e=this.gridOptionsWrapper.isEnableRtl(),t=["getDisplayedLeftColumns","getDisplayedCenterColumns","getDisplayedRightColumns"];e&&t.reverse();for(var o=0;o<t.length;o++){var r=this[t[o]]();if(r.length)return e?le(r):r[0]}return null},t.prototype.setColumnHeaderHeight=function(e,t){if(e.setAutoHeaderHeight(t)){var o={type:We.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,column:e,columns:[e],source:"autosizeColumnHeaderHeight"};this.eventService.dispatchEvent(o)}},t.prototype.getColumnGroupHeaderRowHeight=function(){return this.isPivotMode()?this.gridOptionsWrapper.getPivotGroupHeaderHeight():this.gridOptionsWrapper.getGroupHeaderHeight()},t.prototype.getColumnHeaderRowHeight=function(){var e=this.isPivotMode()?this.gridOptionsWrapper.getPivotHeaderHeight():this.gridOptionsWrapper.getHeaderHeight(),t=this.getAllDisplayedColumns().filter((function(e){return e.isAutoHeaderHeight()})).map((function(e){return e.getAutoHeaderHeight()||0}));return Math.max.apply(Math,io([e],t))},oo([z("expressionService")],t.prototype,"expressionService",void 0),oo([z("columnFactory")],t.prototype,"columnFactory",void 0),oo([z("displayedGroupCreator")],t.prototype,"displayedGroupCreator",void 0),oo([z("ctrlsService")],t.prototype,"ctrlsService",void 0),oo([z("autoWidthCalculator")],t.prototype,"autoWidthCalculator",void 0),oo([z("columnUtils")],t.prototype,"columnUtils",void 0),oo([z("columnAnimationService")],t.prototype,"columnAnimationService",void 0),oo([z("autoGroupColService")],t.prototype,"autoGroupColService",void 0),oo([K("aggFuncService")],t.prototype,"aggFuncService",void 0),oo([K("valueCache")],t.prototype,"valueCache",void 0),oo([K("animationFrameService")],t.prototype,"animationFrameService",void 0),oo([z("rowModel")],t.prototype,"rowModel",void 0),oo([z("sortController")],t.prototype,"sortController",void 0),oo([z("columnDefFactory")],t.prototype,"columnDefFactory",void 0),oo([B],t.prototype,"init",null),oo([(o=0,r=q("loggerFactory"),function(e,t){r(e,t,o)})],t.prototype,"setBeans",null),oo([Y("columnModel")],t);var o,r}(Ge),ao=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),lo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ao(t,e),t.prototype.calculateColMinWidth=function(e){return null!=e.minWidth?e.minWidth:this.gridOptionsWrapper.getMinColWidth()},t.prototype.calculateColMaxWidth=function(e){return null!=e.maxWidth?e.maxWidth:this.gridOptionsWrapper.getMaxColWidth()||Number.MAX_SAFE_INTEGER},t.prototype.calculateColInitialWidth=function(e){var t,o=this.calculateColMinWidth(e),r=this.calculateColMaxWidth(e),n=l(e.width),i=l(e.initialWidth);return t=null!=n?n:null!=i?i:this.gridOptionsWrapper.getColWidth(),Math.max(Math.min(t,r),o)},t.prototype.getOriginalPathForColumn=function(e,t){var o=[],r=!1,n=function(t,i){for(var s=0;s<t.length;s++){if(r)return;var a=t[s];a instanceof we?(n(a.getChildren(),i+1),o[i]=a):a===e&&(r=!0)}};return n(t,0),r?o:null},t.prototype.depthFirstOriginalTreeSearch=function(e,t,o){var r=this;t&&t.forEach((function(t){t instanceof we&&r.depthFirstOriginalTreeSearch(t,t.getChildren(),o),o(t,e)}))},t.prototype.depthFirstAllColumnTreeSearch=function(e,t){var o=this;e&&e.forEach((function(e){e instanceof Ce&&o.depthFirstAllColumnTreeSearch(e.getChildren(),t),t(e)}))},t.prototype.depthFirstDisplayedColumnTreeSearch=function(e,t){var o=this;e&&e.forEach((function(e){e instanceof Ce&&o.depthFirstDisplayedColumnTreeSearch(e.getDisplayedChildren(),t),t(e)}))},function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s}([Y("columnUtils")],t)}(Ge),uo=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),po=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uo(t,e),t.prototype.createDisplayedGroups=function(e,t,o,r,n){var i,s,a=this,l=[],u=this.mapOldGroupsById(n);return e.forEach((function(e){for(var n=a.getOriginalPathForColumn(t,e),p=[],c=!s,d=0;d<n.length;d++)if(c||n[d]!==s[d]){var h=a.createColumnGroup(n[d],o,u,r);p[d]=h,0==d?l.push(h):p[d-1].addChild(h)}else p[d]=i[d];0===p.length?l.push(e):le(p).addChild(e),i=p,s=n})),this.setupParentsIntoColumns(l,null),l},t.prototype.createColumnGroup=function(e,t,o,r){var i=e.getGroupId(),s=t.getInstanceIdForKey(i),a=o[Ce.createUniqueId(i,s)];return a&&a.getProvidedColumnGroup()!==e&&(a=null),n(a)?a.reset():(a=new Ce(e,i,s,r),this.context.createBean(a)),a},t.prototype.mapOldGroupsById=function(e){var t={},o=function(e){e.forEach((function(e){if(e instanceof Ce){var r=e;t[e.getUniqueId()]=r,o(r.getChildren())}}))};return e&&o(e),t},t.prototype.setupParentsIntoColumns=function(e,t){var o=this;e.forEach((function(e){if(e.setParent(t),e instanceof Ce){var r=e;o.setupParentsIntoColumns(r.getChildren(),r)}}))},t.prototype.getOriginalPathForColumn=function(e,t){var o=[],r=!1,n=function(e,i){for(var s=0;s<e.length;s++){if(r)return;var a=e[s];a instanceof we?(n(a.getChildren(),i+1),o[i]=a):a===t&&(r=!0)}};return n(e,0),r?o:(console.warn("AG Grid: could not get path"),null)},function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s}([Y("displayedGroupCreator")],t)}(Ge),co=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),ho=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.componentsMappedByName={},t}return co(t,e),t.prototype.setupComponents=function(e){var t=this;e&&e.forEach((function(e){return t.addComponent(e)}))},t.prototype.addComponent=function(e){var t=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().toUpperCase();this.componentsMappedByName[t]=e.componentClass},t.prototype.getComponentClass=function(e){return this.componentsMappedByName[e]},function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s}([Y("agStackComponentsRegistry")],t)}(Ge),fo=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s},go=function(){function e(e,t,o,r){void 0===r&&(r=1),this.r=Math.min(1,Math.max(0,e||0)),this.g=Math.min(1,Math.max(0,t||0)),this.b=Math.min(1,Math.max(0,o||0)),this.a=Math.min(1,Math.max(0,r||0))}return e.fromString=function(t){if(t.indexOf("#")>=0)return e.fromHexString(t);var o=e.nameToHex[t];if(o)return e.fromHexString(o);if(t.indexOf("rgb")>=0)return e.fromRgbaString(t);throw new Error("Invalid color string: '"+t+"'")},e.parseHex=function(e){var t;switch((e=e.replace(/ /g,"").slice(1)).length){case 6:case 8:t=[];for(var o=0;o<e.length;o+=2)t.push(parseInt(""+e[o]+e[o+1],16));break;case 3:case 4:t=e.split("").map((function(e){return parseInt(e,16)})).map((function(e){return e+16*e}))}if(t.length>=3&&t.every((function(e){return e>=0})))return 3===t.length&&t.push(255),t},e.fromHexString=function(t){var o=e.parseHex(t);if(o){var r=fo(o,4);return new e(r[0]/255,r[1]/255,r[2]/255,r[3]/255)}throw new Error("Malformed hexadecimal color string: '"+t+"'")},e.stringToRgba=function(e){for(var t=fo([NaN,NaN],2),o=t[0],r=t[1],n=0;n<e.length;n++){var i=e[n];if(o||"("!==i){if(")"===i){r=n;break}}else o=n}var s=o&&r&&e.substring(o+1,r);if(s){var a=s.split(","),l=[];for(n=0;n<a.length;n++){var u=a[n],p=parseFloat(u);if(isNaN(p))return;u.indexOf("%")>=0?(p=Math.max(0,Math.min(100,p)),p/=100):3===n?p=Math.max(0,Math.min(1,p)):(p=Math.max(0,Math.min(255,p)),p/=255),l.push(p)}return l}},e.fromRgbaString=function(t){var o=e.stringToRgba(t);if(o){if(3===o.length)return new e(o[0],o[1],o[2]);if(4===o.length)return new e(o[0],o[1],o[2],o[3])}throw new Error("Malformed rgb/rgba color string: '"+t+"'")},e.fromArray=function(t){if(4===t.length)return new e(t[0],t[1],t[2],t[3]);if(3===t.length)return new e(t[0],t[1],t[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")},e.fromHSB=function(t,o,r,n){void 0===n&&(n=1);var i=e.HSBtoRGB(t,o,r);return new e(i[0],i[1],i[2],n)},e.padHex=function(e){return 1===e.length?"0"+e:e},e.prototype.toHexString=function(){var t="#"+e.padHex(Math.round(255*this.r).toString(16))+e.padHex(Math.round(255*this.g).toString(16))+e.padHex(Math.round(255*this.b).toString(16));return this.a<1&&(t+=e.padHex(Math.round(255*this.a).toString(16))),t},e.prototype.toRgbaString=function(e){void 0===e&&(e=3);var t=[Math.round(255*this.r),Math.round(255*this.g),Math.round(255*this.b)],o=Math.pow(10,e);return 1!==this.a?(t.push(Math.round(this.a*o)/o),"rgba("+t.join(", ")+")"):"rgb("+t.join(", ")+")"},e.prototype.toString=function(){return 1===this.a?this.toHexString():this.toRgbaString()},e.prototype.toHSB=function(){return e.RGBtoHSB(this.r,this.g,this.b)},e.RGBtoHSB=function(e,t,o){var r=Math.min(e,t,o),n=Math.max(e,t,o),i=NaN;if(r!==n){var s=n-r,a=(n-e)/s,l=(n-t)/s,u=(n-o)/s;i=e===n?u-l:t===n?2+a-u:4+l-a,(i/=6)<0&&(i+=1)}return[360*i,0!==n?(n-r)/n:0,n]},e.HSBtoRGB=function(e,t,o){isNaN(e)&&(e=0),e=(e%360+360)%360/360;var r=0,n=0,i=0;if(0===t)r=n=i=o;else{var s=6*(e-Math.floor(e)),a=s-Math.floor(s),l=o*(1-t),u=o*(1-t*a),p=o*(1-t*(1-a));switch(0|s){case 0:r=o,n=p,i=l;break;case 1:r=u,n=o,i=l;break;case 2:r=l,n=o,i=p;break;case 3:r=l,n=u,i=o;break;case 4:r=p,n=l,i=o;break;case 5:r=o,n=l,i=u}}return[r,n,i]},e.prototype.derive=function(t,o,r,n){var i=e.RGBtoHSB(this.r,this.g,this.b),s=i[2];0==s&&r>1&&(s=.05);var a=((i[0]+t)%360+360)%360,l=Math.max(Math.min(i[1]*o,1),0);s=Math.max(Math.min(s*r,1),0);var u=Math.max(Math.min(this.a*n,1),0),p=e.HSBtoRGB(a,l,s);return p.push(u),e.fromArray(p)},e.prototype.brighter=function(){return this.derive(0,1,1/.7,1)},e.prototype.darker=function(){return this.derive(0,1,.7,1)},e.nameToHex=Object.freeze({aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"}),e}();function mo(e,t){void 0===t&&(t=",");var o=[],r=function(e){return"\r"===e||"\n"===e},n=!1;if(""===e)return[[""]];for(var i,s,a,l=function(l,u,p){var c=e[p-1],d=e[p],h=e[p+1],f=function(){o[l]||(o[l]=[]),o[l][u]||(o[l][u]="")};if(f(),'"'===d){if(n)return'"'===h?(o[l][u]+='"',p++):n=!1,i=l,s=u,a=p,"continue";if(void 0===c||c===t||r(c))return n=!0,i=l,s=u,a=p,"continue"}if(!n){if(d===t)return u++,f(),i=l,s=u,a=p,"continue";if(r(d))return u=0,l++,f(),"\r"===d&&"\n"===h&&p++,i=l,s=u,a=p,"continue"}o[l][u]+=d,i=l,s=u,a=p},u=0,p=0,c=0;c<e.length;c++)l(u,p,c),u=i,p=s,c=a;return o}var yo,vo=Object.freeze({__proto__:null,stringToArray:mo});function Co(e){var t=Element.prototype.matches||Element.prototype.msMatchesSelector,o=t.call(e,oe.INPUT_SELECTOR),r=t.call(e,oe.FOCUSABLE_EXCLUDE),n=Mo(e);return o&&!r&&n}function wo(e,t){e.classList.toggle("ag-hidden",!t)}function Eo(e,t){e.classList.toggle("ag-invisible",!t)}function _o(e,t){var o="disabled",r=t?function(e){return e.setAttribute(o,"")}:function(e){return e.removeAttribute(o)};r(e),er(e.querySelectorAll("input"),(function(e){return r(e)}))}function So(e,t,o){for(var r=0;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,"number"==typeof o){if(++r>o)break}else if(e===o)break}return!1}function Ro(e){var t=window.getComputedStyle(e),o=t.height,r=t.width,n=t.paddingTop,i=t.paddingRight,s=t.paddingBottom,a=t.paddingLeft,l=t.marginTop,u=t.marginRight,p=t.marginBottom,c=t.marginLeft,d=t.boxSizing;return{height:parseFloat(o),width:parseFloat(r),paddingTop:parseFloat(n),paddingRight:parseFloat(i),paddingBottom:parseFloat(s),paddingLeft:parseFloat(a),marginTop:parseFloat(l),marginRight:parseFloat(u),marginBottom:parseFloat(p),marginLeft:parseFloat(c),boxSizing:d}}function bo(e){var t=Ro(e);return"border-box"===t.boxSizing?t.height-t.paddingTop-t.paddingBottom:t.height}function Oo(e){var t=Ro(e);return"border-box"===t.boxSizing?t.width-t.paddingLeft-t.paddingRight:t.width}function Po(e){var t=Ro(e),o=t.marginBottom+t.marginTop;return Math.ceil(e.offsetHeight+o)}function To(e){var t=Ro(e),o=t.marginLeft+t.marginRight;return Math.ceil(e.offsetWidth+o)}function Ao(){if("boolean"==typeof yo)return yo;var e=document.createElement("div");return e.style.direction="rtl",e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML='<div style="width: 2px">\n <span style="display: inline-block; width: 1px"></span>\n <span style="display: inline-block; width: 1px"></span>\n </div>',document.body.appendChild(e),e.scrollLeft=1,yo=0===Math.floor(e.scrollLeft),document.body.removeChild(e),yo}function Do(e,t){var o=e.scrollLeft;return t&&(o=Math.abs(o),_t()&&!Ao()&&(o=e.scrollWidth-e.clientWidth-o)),o}function Io(e,t,o){o&&(Ao()?t*=-1:(Et()||_t())&&(t=e.scrollWidth-e.clientWidth-t)),e.scrollLeft=t}function No(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function xo(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Mo(e){return null!==e.offsetParent}function Lo(e){var t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Fo(e){return e&&e.clientHeight?e.clientHeight:0}function Go(e){return e&&e.clientWidth?e.clientWidth:0}function ko(e,t,o){if(!o||o.nextSibling!==t){var r=document.activeElement,n=t.contains(r);o?o.nextSibling?e.insertBefore(t,o.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t),n&&r&&Ot()&&r.focus({preventScroll:!0})}}function Vo(e,t){for(var o=0;o<t.length;o++){var r=t[o],n=e.children[o];n!==r&&e.insertBefore(r,n)}}function Ho(e,t,o){o?o.insertAdjacentElement("afterend",t):e.firstChild?e.insertAdjacentElement("afterbegin",t):e.appendChild(t)}function Wo(e,t){t&&Object.keys(t).forEach((function(o){var r=ze(o);r&&(e.style[r]=t[o])}))}function jo(e){return e.clientWidth<e.scrollWidth}function Bo(e){return e.clientHeight<e.scrollHeight}function Uo(e,t){"flex"===t?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Yo(e,t)}function Yo(e,t){t=Ko(t),e.style.width=t.toString(),e.style.maxWidth=t.toString(),e.style.minWidth=t.toString()}function zo(e,t){t=Ko(t),e.style.height=t.toString(),e.style.maxHeight=t.toString(),e.style.minHeight=t.toString()}function Ko(e){return"number"==typeof e?e+"px":e}function $o(e){return"function"==typeof Node?e instanceof Node:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName}function qo(e){return"function"==typeof HTMLElement?e instanceof HTMLElement:e&&b(e)&&1===e.nodeType&&"string"==typeof e.nodeName}function Zo(e){return $o(e)||qo(e)}function Xo(e){if(null==e)return[];var t=[];return er(e,(function(e){return t.push(e)})),t}function Qo(e,t){if(e)for(var o=0;o<e.length;o++){var r=e[o];t(r.name,r.value)}}function Jo(e,t,o){null==o?e.removeAttribute(t):e.setAttribute(t,o.toString())}function er(e,t){if(null!=e)for(var o=0;o<e.length;o++)t(e[o])}var tr=Object.freeze({__proto__:null,radioCssClass:function(e,t,o){for(var r=e.parentElement,n=r&&r.firstChild;n;)t&&n.classList.toggle(t,n===e),o&&n.classList.toggle(o,n!==e),n=n.nextSibling},isFocusableFormField:Co,setDisplayed:wo,setVisible:Eo,setDisabled:_o,isElementChildOfClass:So,getElementSize:Ro,getInnerHeight:bo,getInnerWidth:Oo,getAbsoluteHeight:Po,getAbsoluteWidth:To,isRtlNegativeScroll:Ao,getScrollLeft:Do,setScrollLeft:Io,clearElement:No,removeElement:function(e,t){xo(e.querySelector(t))},removeFromParent:xo,isVisible:Mo,loadTemplate:Lo,appendHtml:function(e,t){e.lastChild?e.insertAdjacentHTML("afterbegin",t):e.innerHTML=t},getElementAttribute:function(e,t){return e.attributes&&e.attributes[t]?e.attributes[t].value:null},offsetHeight:Fo,offsetWidth:Go,ensureDomOrder:ko,setDomChildOrder:Vo,insertWithDomOrder:Ho,prependDC:function(e,t){n(e.firstChild)?e.insertBefore(t,e.firstChild):e.appendChild(t)},addStylesToElement:Wo,isHorizontalScrollShowing:jo,isVerticalScrollShowing:Bo,setElementWidth:Uo,setFixedWidth:Yo,setElementHeight:function(e,t){"flex"===t?(e.style.removeProperty("height"),e.style.removeProperty("minHeight"),e.style.removeProperty("maxHeight"),e.style.flex="1 1 auto"):zo(e,t)},setFixedHeight:zo,formatSize:Ko,isNode:$o,isElement:qo,isNodeOrElement:Zo,copyNodeList:Xo,iterateNamedNodeMap:Qo,setCheckboxState:function(e,t){"boolean"==typeof t?(e.checked=t,e.indeterminate=!1):e.indeterminate=!0},addOrRemoveAttribute:Jo,nodeListForEach:er}),or=Object.freeze({__proto__:null,getNameOfClass:function(e){var t=e.toString(),o=/function (.{1,})\(/.exec(t);return o&&o.length>1?o[1]:""},findLineByLeastSquares:function(e){var t=e.length,o=0;if(t<=1)return e;for(var r=0;r<e.length;r++){var n=e[r],i=n.toString().split("e-");i.length>1?o=Math.max(o,parseInt(i[1],10)):Math.floor(n)!==n&&(o=Math.max(o,n.toString().split(".")[1].length))}for(var s=0,a=0,l=0,u=0,p=0,c=0;c<t;c++)s+=c,a+=p=e[c],u+=c*c,l+=c*p;var d=(t*l-s*a)/(t*u-s*s),h=a/t-d*s/t,f=[];for(c=0;c<=t;c++)f.push(parseFloat((c*d+h).toFixed(o)));return f},cssStyleObjectToMarkup:function(e){if(!e)return"";var t=[];return f(e,(function(e,o){var r=Ye(e);t.push(r+": "+o+";")})),t.join(" ")},message:function(e){var t=document.createElement("div"),o=document.querySelector("#__ag__message");t.innerHTML=e,o||(o=Lo('<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])},bindCellRendererToHtmlElement:function(e,t){e.then((function(e){var o=e.getGui();null!=o&&("object"==typeof o?t.appendChild(o):t.innerHTML=o)}))}});function rr(e,t,o){e.setAttribute(ir(t),o.toString())}function nr(e,t){e.removeAttribute(ir(t))}function ir(e){return"aria-"+e}function sr(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function ar(e){return e.isSortAscending()?"ascending":e.isSortDescending()?"descending":"none"}function lr(e){return parseInt(e.getAttribute("aria-level"),10)}function ur(e){return parseInt(e.getAttribute("aria-posinset"),10)}function pr(e,t){var o="label";null!=t&&""!==t?rr(e,o,t):nr(e,o)}function cr(e,t){var o="labelledby";t?rr(e,o,t):nr(e,o)}function dr(e,t){var o="description";t?rr(e,o,t):nr(e,o)}function hr(e,t){var o="describedby";t?rr(e,o,t):nr(e,o)}function fr(e,t){rr(e,"level",t)}function gr(e,t){rr(e,"disabled",t)}function mr(e,t){t?rr(e,"hidden",!0):nr(e,"hidden")}function yr(e,t){rr(e,"expanded",t)}function vr(e){nr(e,"expanded")}function Cr(e,t){rr(e,"setsize",t)}function wr(e,t){rr(e,"posinset",t)}function Er(e,t){rr(e,"multiselectable",t)}function _r(e,t){rr(e,"rowcount",t)}function Sr(e,t){rr(e,"rowindex",t)}function Rr(e,t){rr(e,"colcount",t)}function br(e,t){rr(e,"colindex",t)}function Or(e,t){rr(e,"colspan",t)}function Pr(e,t){rr(e,"sort",t)}function Tr(e){nr(e,"sort")}function Ar(e,t){var o="selected";t?rr(e,o,t):nr(e,o)}function Dr(e,t){rr(e,"checked",void 0===t?"mixed":t)}var Ir=Object.freeze({__proto__:null,setAriaRole:sr,getAriaSortState:ar,getAriaLevel:lr,getAriaPosInSet:ur,getAriaDescribedBy:function(e){return e.getAttribute("aria-describedby")||""},setAriaLabel:pr,setAriaLabelledBy:cr,setAriaDescription:dr,setAriaDescribedBy:hr,setAriaLevel:fr,setAriaDisabled:gr,setAriaHidden:mr,setAriaExpanded:yr,removeAriaExpanded:vr,setAriaSetSize:Cr,setAriaPosInSet:wr,setAriaMultiSelectable:Er,setAriaRowCount:_r,setAriaRowIndex:Sr,setAriaColCount:Rr,setAriaColIndex:br,setAriaColSpan:Or,setAriaSort:Pr,removeAriaSort:Tr,setAriaSelected:Ar,setAriaChecked:Dr}),Nr=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s};function xr(e,t,o){if(void 0===t&&(t=!0),void 0===o&&(o="-"),!e)return null;var r=[e.getFullYear(),e.getMonth()+1,e.getDate()].map((function(e){return Wt(e,2)})).join(o);return t&&(r+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map((function(e){return Wt(e,2)})).join(":")),r}var Mr=function(e){if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function Lr(e,t){void 0===t&&(t="YYYY-MM-DD");var o=Wt(e.getFullYear(),4),r=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],i={YYYY:function(){return o.slice(o.length-4,o.length)},YY:function(){return o.slice(o.length-2,o.length)},Y:function(){return""+e.getFullYear()},MMMM:function(){return r[e.getMonth()]},MMM:function(){return r[e.getMonth()].slice(0,3)},MM:function(){return Wt(e.getMonth()+1,2)},Mo:function(){return""+(e.getMonth()+1)+Mr(e.getMonth()+1)},M:function(){return""+(e.getMonth()+1)},Do:function(){return""+e.getDate()+Mr(e.getDate())},DD:function(){return Wt(e.getDate(),2)},D:function(){return""+e.getDate()},dddd:function(){return n[e.getDay()]},ddd:function(){return n[e.getDay()].slice(0,3)},dd:function(){return n[e.getDay()].slice(0,2)},do:function(){return""+e.getDay()+Mr(e.getDay())},d:function(){return""+e.getDay()}},s=new RegExp(Object.keys(i).join("|"),"g");return t.replace(s,(function(e){return e in i?i[e]():e}))}function Fr(e){if(!e)return null;var t=Nr(e.split(" "),2),o=t[0],r=t[1];if(!o)return null;var n=o.split("-").map((function(e){return parseInt(e,10)}));if(3!==n.filter((function(e){return!isNaN(e)})).length)return null;var i=Nr(n,3),s=i[0],a=i[1],l=i[2],u=new Date(s,a-1,l);if(u.getFullYear()!==s||u.getMonth()!==a-1||u.getDate()!==l)return null;if(!r||"00:00:00"===r)return u;var p=Nr(r.split(":").map((function(e){return parseInt(e,10)})),3),c=p[0],d=p[1],h=p[2];return c>=0&&c<24&&u.setHours(c),d>=0&&d<60&&u.setMinutes(d),h>=0&&h<60&&u.setSeconds(h),u}var Gr=Object.freeze({__proto__:null,serialiseDate:xr,dateToFormattedString:Lr,parseDateTimeFromString:Fr}),kr={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate",columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"tree-closed",groupExpanded:"tree-open",chart:"chart",close:"cross",cancel:"cancel",check:"tick",first:"first",previous:"previous",next:"next",last:"last",linked:"linked",unlinked:"unlinked",colorPicker:"color-picker",groupLoading:"loading",menu:"menu",filter:"filter",columns:"columns",maximize:"maximize",minimize:"minimize",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"grip",rowDrag:"grip",save:"save",csvExport:"csv",excelExport:"excel",smallDown:"small-down",smallLeft:"small-left",smallRight:"small-right",smallUp:"small-up",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"};function Vr(e,t,o){var r=Hr(e,t,o);if(r&&r.className.indexOf("ag-icon")>-1)return r;var n=document.createElement("span");return n.appendChild(r),n}function Hr(e,t,o,r){var n=null,i=o&&o.getColDef().icons;if(i&&(n=i[e]),t&&!n){var s=t.getIcons();s&&(n=s[e])}if(!n){var a=document.createElement("span"),l=kr[e];return l||(r?l=e:(console.warn("AG Grid: Did not find icon "+e),l="")),a.setAttribute("class","ag-icon ag-icon-"+l),a.setAttribute("unselectable","on"),sr(a,"presentation"),a}var u=void 0;if("function"==typeof n)u=n();else{if("string"!=typeof n)throw new Error("icon from grid options needs to be a string or a function");u=n}return"string"==typeof u?Lo(u):Zo(u)?u:void console.warn("AG Grid: iconRenderer should return back a string or a dom object")}var Wr=Object.freeze({__proto__:null,iconNameClassMap:kr,createIcon:Vr,createIconNoSpan:Hr}),jr=function(){function e(){}return e.BACKSPACE="Backspace",e.TAB="Tab",e.ENTER="Enter",e.ESCAPE="Escape",e.SPACE=" ",e.LEFT="ArrowLeft",e.UP="ArrowUp",e.RIGHT="ArrowRight",e.DOWN="ArrowDown",e.DELETE="Delete",e.F2="F2",e.PAGE_UP="PageUp",e.PAGE_DOWN="PageDown",e.PAGE_HOME="Home",e.PAGE_END="End",e.A="KeyA",e.C="KeyC",e.V="KeyV",e.D="KeyD",e.Z="KeyZ",e.Y="KeyY",e}();function Br(e){if(e.altKey||e.ctrlKey||e.metaKey)return!1;var t=1===e.key.length,o=function(e){return wt()&&"Del"===e.key&&46===e.charCode}(e);return t||o}function Ur(e,t,o,r,n){var i=e.getSuppressKeyboardEventFunc(),s=r?r.getColDef().suppressKeyboardEvent:void 0;if(!i&&!s)return!1;var a={event:t,editing:n,column:r,api:e.getApi(),node:o,data:o.data,colDef:r.getColDef(),context:e.getContext(),columnApi:e.getColumnApi()};return!(!s||!s(a))||!!i&&i(a)}function Yr(e,t,o,r){var i=r.getDefinition(),s=i&&i.suppressHeaderKeyboardEvent;return!!n(s)&&!!s({api:e.getApi(),columnApi:e.getColumnApi(),context:e.getContext(),colDef:i,column:r,headerRowIndex:o,event:t})}function zr(e){var t;switch(e.keyCode){case 65:t=jr.A;break;case 67:t=jr.C;break;case 86:t=jr.V;break;case 68:t=jr.D;break;case 90:t=jr.Z;break;case 89:t=jr.Y;break;default:t=e.code}return t}function Kr(e,t){return void 0===t&&(t=!1),e===jr.DELETE||!t&&e===jr.BACKSPACE&&Rt()}var $r=Object.freeze({__proto__:null,isEventFromPrintableCharacter:Br,isUserSuppressingKeyboardEvent:Ur,isUserSuppressingHeaderKeyboardEvent:Yr,normaliseQwertyAzerty:zr,isDeleteKey:Kr});function qr(e,t,o){if(0===o)return!1;var r=Math.abs(e.clientX-t.clientX),n=Math.abs(e.clientY-t.clientY);return Math.max(r,n)<=o}var Zr=Object.freeze({__proto__:null,areEventsNear:qr}),Xr=Object.freeze({__proto__:null,sortRowNodesByOrder:function(e,t){if(!e)return!1;for(var o=function(e,o){var r=t[e.id],n=t[o.id],i=void 0!==r,s=void 0!==n;return i&&s?r-n:i||s?i?1:-1:e.__objectId-o.__objectId},r=!1,n=0;n<e.length-1;n++)if(o(e[n],e[n+1])>0){r=!0;break}return!!r&&(e.sort(o),!0)},traverseNodesWithKey:function(e,t){var o=[];!function e(r){r&&r.forEach((function(r){if(r.group||r.hasChildren()){o.push(r.key);var n=o.join("|");t(r,n),e(r.childrenAfterGroup),o.pop()}}))}(e)}});function Qr(e){var t=new Set;return e.forEach((function(e){return t.add(e)})),t}var Jr,en=Object.freeze({__proto__:null,convertToSet:Qr}),tn=function(){return tn=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},tn.apply(this,arguments)},on=tn(tn(tn(tn(tn(tn(tn(tn(tn(tn(tn(tn(tn(tn(tn(tn(tn(tn(tn(tn({},or),Ir),ve),Mt),vo),Gr),tr),Le),H),Ht),d),Wr),$r),Qe),Zr),Yt),O),Xr),en),Ze),rn=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}();!function(e){e[e.IN_PROGRESS=0]="IN_PROGRESS",e[e.RESOLVED=1]="RESOLVED"}(Jr||(Jr={}));var nn,sn=function(){function e(e){var t=this;this.status=Jr.IN_PROGRESS,this.resolution=null,this.waiters=[],e((function(e){return t.onDone(e)}),(function(e){return t.onReject(e)}))}return e.all=function(t){return new e((function(e){var o=t.length,r=new Array(o);t.forEach((function(t,n){t.then((function(t){r[n]=t,0==--o&&e(r)}))}))}))},e.resolve=function(t){return void 0===t&&(t=null),new e((function(e){return e(t)}))},e.prototype.then=function(t){var o=this;return new e((function(e){o.status===Jr.RESOLVED?e(t(o.resolution)):o.waiters.push((function(o){return e(t(o))}))}))},e.prototype.resolveNow=function(e,t){return this.status===Jr.RESOLVED?t(this.resolution):e},e.prototype.onDone=function(e){this.status=Jr.RESOLVED,this.resolution=e,this.waiters.forEach((function(t){return t(e)}))},e.prototype.onReject=function(e){console.warn("TBI")},e}(),an=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}(),ln=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),un=function(){return un=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},un.apply(this,arguments)},pn=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};!function(e){e[e.NOTHING=0]="NOTHING",e[e.WAITING_TO_SHOW=1]="WAITING_TO_SHOW",e[e.SHOWING=2]="SHOWING"}(nn||(nn={}));var cn=function(e){function t(t){var o=e.call(this)||this;return o.DEFAULT_SHOW_TOOLTIP_DELAY=2e3,o.DEFAULT_HIDE_TOOLTIP_DELAY=1e4,o.SHOW_QUICK_TOOLTIP_DIFF=1e3,o.FADE_OUT_TOOLTIP_TIMEOUT=1e3,o.state=nn.NOTHING,o.tooltipInstanceCount=0,o.tooltipMouseTrack=!1,o.parentComp=t,o}return ln(t,e),t.prototype.postConstruct=function(){this.tooltipShowDelay=this.gridOptionsWrapper.getTooltipDelay("show")||this.DEFAULT_SHOW_TOOLTIP_DELAY,this.tooltipHideDelay=this.gridOptionsWrapper.getTooltipDelay("hide")||this.DEFAULT_HIDE_TOOLTIP_DELAY,this.tooltipMouseTrack=this.gridOptionsWrapper.isTooltipMouseTrack();var e=this.parentComp.getGui();this.addManagedListener(e,"mouseenter",this.onMouseEnter.bind(this)),this.addManagedListener(e,"mouseleave",this.onMouseLeave.bind(this)),this.addManagedListener(e,"mousemove",this.onMouseMove.bind(this)),this.addManagedListener(e,"mousedown",this.onMouseDown.bind(this)),this.addManagedListener(e,"keydown",this.onKeyDown.bind(this))},t.prototype.destroy=function(){this.setToDoNothing(),e.prototype.destroy.call(this)},t.prototype.onMouseEnter=function(e){if(!bt()&&this.state==nn.NOTHING){var t=this.isLastTooltipHiddenRecently()?200:this.tooltipShowDelay;this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.lastMouseEvent=e,this.state=nn.WAITING_TO_SHOW}},t.prototype.onMouseLeave=function(){this.setToDoNothing()},t.prototype.onKeyDown=function(){this.setToDoNothing()},t.prototype.setToDoNothing=function(){this.state===nn.SHOWING&&this.hideTooltip(),this.clearTimeouts(),this.state=nn.NOTHING},t.prototype.onMouseMove=function(e){this.lastMouseEvent=e,this.tooltipMouseTrack&&this.state===nn.SHOWING&&this.tooltipComp&&this.positionTooltipUnderLastMouseEvent()},t.prototype.onMouseDown=function(){this.setToDoNothing()},t.prototype.hideTooltip=function(){this.tooltipComp&&(this.destroyTooltipComp(),t.lastTooltipHideTime=(new Date).getTime()),this.state=nn.NOTHING},t.prototype.destroyTooltipComp=function(){var e=this;this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");var t=this.tooltipPopupDestroyFunc,o=this.tooltipComp;window.setTimeout((function(){t(),e.getContext().destroyBean(o)}),this.FADE_OUT_TOOLTIP_TIMEOUT),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0},t.prototype.isLastTooltipHiddenRecently=function(){return(new Date).getTime()-t.lastTooltipHideTime<this.SHOW_QUICK_TOOLTIP_DIFF},t.prototype.showTooltip=function(){var e=un({},this.parentComp.getTooltipParams());if(n(e.value)){this.state=nn.SHOWING,this.tooltipInstanceCount++;var t=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.userComponentFactory.getTooltipCompDetails(e).newAgStackInstance().then(t)}else this.setToDoNothing()},t.prototype.newTooltipComponentCallback=function(e,t){if(this.state!==nn.SHOWING||this.tooltipInstanceCount!==e)this.getContext().destroyBean(t);else{var o=t.getGui();this.tooltipComp=t,o.classList.contains("ag-tooltip")||o.classList.add("ag-tooltip-custom");var r=this.gridOptionsWrapper.getLocaleTextFunc(),n=this.popupService.addPopup({eChild:o,ariaLabel:r("ariaLabelTooltip","Tooltip")});n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltipUnderLastMouseEvent(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.tooltipHideDelay)}},t.prototype.positionTooltipUnderLastMouseEvent=function(){this.popupService.positionPopupUnderMouseEvent({type:"tooltip",mouseEvent:this.lastMouseEvent,ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack})},t.prototype.clearTimeouts=function(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0),this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)},pn([z("popupService")],t.prototype,"popupService",void 0),pn([z("userComponentFactory")],t.prototype,"userComponentFactory",void 0),pn([z("columnApi")],t.prototype,"columnApi",void 0),pn([z("gridApi")],t.prototype,"gridApi",void 0),pn([B],t.prototype,"postConstruct",null),t}(Ge),dn=function(){function e(e){this.cssClassStates={},this.getGui=e}return e.prototype.addCssClass=function(e){var t=this,o=(e||"").split(" ");if(o.length>1)o.forEach((function(e){return t.addCssClass(e)}));else if(!0!==this.cssClassStates[e]&&e.length){var r=this.getGui();r&&r.classList.add(e),this.cssClassStates[e]=!0}},e.prototype.removeCssClass=function(e){var t=this,o=(e||"").split(" ");if(o.length>1)o.forEach((function(e){return t.removeCssClass(e)}));else if(!1!==this.cssClassStates[e]&&e.length){var r=this.getGui();r&&r.classList.remove(e),this.cssClassStates[e]=!1}},e.prototype.containsCssClass=function(e){var t=this.getGui();return!!t&&t.classList.contains(e)},e.prototype.addOrRemoveCssClass=function(e,t){var o=this;if(e){if(e.indexOf(" ")>=0){var r=(e||"").split(" ");if(r.length>1)return void r.forEach((function(e){return o.addOrRemoveCssClass(e,t)}))}if(this.cssClassStates[e]!==t&&e.length){var n=this.getGui();n&&n.classList.toggle(e,t),this.cssClassStates[e]=t}}},e}(),hn=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),fn=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},gn=new rn,mn=function(e){function t(t){var o=e.call(this)||this;return o.displayed=!0,o.visible=!0,o.compId=gn.next(),o.cssClassManager=new dn((function(){return o.eGui})),t&&o.setTemplate(t),o}return hn(t,e),t.prototype.preConstructOnComponent=function(){this.usingBrowserTooltips=this.gridOptionsWrapper.isEnableBrowserTooltips()},t.prototype.getCompId=function(){return this.compId},t.prototype.getTooltipParams=function(){return{value:this.tooltipText,location:"UNKNOWN"}},t.prototype.setTooltip=function(e){var t=this;this.tooltipText!=e&&(this.tooltipText&&(t.usingBrowserTooltips?t.getGui().removeAttribute("title"):t.tooltipFeature=t.destroyBean(t.tooltipFeature)),null!=e&&(this.tooltipText=e,this.tooltipText&&(t.usingBrowserTooltips?t.getGui().setAttribute("title",t.tooltipText):t.tooltipFeature=t.createBean(new cn(t)))))},t.prototype.createChildComponentsFromTags=function(e,t){var o=this;Xo(e.childNodes).forEach((function(r){if(r instanceof HTMLElement){var n=o.createComponentFromElement(r,(function(e){e.getGui()&&o.copyAttributesFromNode(r,e.getGui())}),t);if(n){if(n.addItems&&r.children.length){o.createChildComponentsFromTags(r,t);var i=Array.prototype.slice.call(r.children);n.addItems(i)}o.swapComponentForNode(n,e,r)}else r.childNodes&&o.createChildComponentsFromTags(r,t)}}))},t.prototype.createComponentFromElement=function(e,o,r){var n=e.nodeName,i=r?r[e.getAttribute("ref")]:void 0,s=this.agStackComponentsRegistry.getComponentClass(n);if(s){t.elementGettingCreated=e;var a=new s(i);return a.setParentComponent(this),this.createBean(a,null,o),a}return null},t.prototype.copyAttributesFromNode=function(e,t){Qo(e.attributes,(function(e,o){return 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.addDestroyFunc(this.destroyBean.bind(this,e)),this.swapInComponentForQuerySelectors(e,o)},t.prototype.swapInComponentForQuerySelectors=function(e,t){var o=this;this.iterateOverQuerySelectors((function(r){o[r.attributeName]===t&&(o[r.attributeName]=e)}))},t.prototype.iterateOverQuerySelectors=function(e){for(var t=Object.getPrototypeOf(this);null!=t;){var o=t.__agComponentMetaData,r=A(t.constructor);o&&o[r]&&o[r].querySelectors&&o[r].querySelectors.forEach((function(t){return e(t)})),t=Object.getPrototypeOf(t)}},t.prototype.setTemplate=function(e,t){var o=Lo(e);this.setTemplateFromElement(o,t)},t.prototype.setTemplateFromElement=function(e,t){this.eGui=e,this.eGui.__agComponent=this,this.wireQuerySelectors(),this.getContext()&&this.createChildComponentsFromTags(this.getGui(),t)},t.prototype.createChildComponentsPreConstruct=function(){this.getGui()&&this.createChildComponentsFromTags(this.getGui())},t.prototype.wireQuerySelectors=function(){var e=this;if(this.eGui){var t=this;this.iterateOverQuerySelectors((function(o){var r=function(e){return t[o.attributeName]=e};if(o.refSelector&&e.eGui.getAttribute("ref")===o.refSelector)r(e.eGui);else{var n=e.eGui.querySelector(o.querySelector);n&&r(n.__agComponent||n)}}))}},t.prototype.getGui=function(){return this.eGui},t.prototype.getFocusableElement=function(){return this.eGui},t.prototype.setParentComponent=function(e){this.parentComponent=e},t.prototype.getParentComponent=function(){return this.parentComponent},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,t){if(null!=e)if(t||(t=this.eGui),Zo(e))t.appendChild(e);else{var o=e;t.appendChild(o.getGui())}},t.prototype.isDisplayed=function(){return this.displayed},t.prototype.setVisible=function(e){e!==this.visible&&(this.visible=e,Eo(this.eGui,e))},t.prototype.setDisplayed=function(e){if(e!==this.displayed){this.displayed=e,wo(this.eGui,e);var o={type:t.EVENT_DISPLAYED_CHANGED,visible:this.displayed};this.dispatchEvent(o)}},t.prototype.destroy=function(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),e.prototype.destroy.call(this)},t.prototype.addGuiEventListener=function(e,t){var o=this;this.eGui.addEventListener(e,t),this.addDestroyFunc((function(){return o.eGui.removeEventListener(e,t)}))},t.prototype.addCssClass=function(e){this.cssClassManager.addCssClass(e)},t.prototype.removeCssClass=function(e){this.cssClassManager.removeCssClass(e)},t.prototype.containsCssClass=function(e){return this.cssClassManager.containsCssClass(e)},t.prototype.addOrRemoveCssClass=function(e,t){this.cssClassManager.addOrRemoveCssClass(e,t)},t.prototype.getAttribute=function(e){var t=this.eGui;return t?t.getAttribute(e):null},t.prototype.getRefElement=function(e){return this.queryForHtmlElement('[ref="'+e+'"]')},t.EVENT_DISPLAYED_CHANGED="displayedChanged",fn([z("agStackComponentsRegistry")],t.prototype,"agStackComponentsRegistry",void 0),fn([j],t.prototype,"preConstructOnComponent",null),fn([j],t.prototype,"createChildComponentsPreConstruct",null),t}(Ge);function yn(e){return Cn.bind(this,e,void 0)}function vn(e){return Cn.bind(this,"[ref="+e+"]",e)}function Cn(e,t,o,r,n){var i,s,a,l;null!==e?"number"!=typeof n?(s="querySelectors",a={attributeName:r,querySelector:e,refSelector:t},(l=function(e,t){return e.__agComponentMetaData||(e.__agComponentMetaData={}),e.__agComponentMetaData[t]||(e.__agComponentMetaData[t]={}),e.__agComponentMetaData[t]}(i=o,A(i.constructor)))[s]||(l[s]=[]),l[s].push(a)):console.error("AG Grid: QuerySelector should be on an attribute"):console.error("AG Grid: QuerySelector selector should not be null")}var wn,En=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),_n=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Sn=function(e){function t(){return e.call(this,'\n <div class="ag-floating-filter-input" role="presentation">\n <ag-input-text-field ref="eFloatingFilterText"></ag-input-text-field>\n </div>')||this}return En(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){this.params=e;var t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),o=this.gridOptionsWrapper.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(t+" "+o("ariaFilterInput","Filter Input"))},t.prototype.onParentModelChanged=function(e){var t=this;e?this.params.parentFilterInstance((function(o){if(o.getModelAsString){var r=o.getModelAsString(e);t.eFloatingFilterText.setValue(r)}})):this.eFloatingFilterText.setValue("")},_n([vn("eFloatingFilterText")],t.prototype,"eFloatingFilterText",void 0),_n([z("columnModel")],t.prototype,"columnModel",void 0),t}(mn),Rn=function(){function e(e,t,o,r){var n=this;this.alive=!0,this.context=e,this.eParent=r,t.getDateCompDetails(o).newAgStackInstance().then((function(t){n.alive?(n.dateComp=t,t&&(r.appendChild(t.getGui()),t.afterGuiAttached&&t.afterGuiAttached(),n.tempValue&&t.setDate(n.tempValue),null!=n.disabled&&n.setDateCompDisabled(n.disabled))):e.destroyBean(t)}))}return e.prototype.destroy=function(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)},e.prototype.getDate=function(){return this.dateComp?this.dateComp.getDate():this.tempValue},e.prototype.setDate=function(e){this.dateComp?this.dateComp.setDate(e):this.tempValue=e},e.prototype.setDisabled=function(e){this.dateComp?this.setDateCompDisabled(e):this.disabled=e},e.prototype.setDisplayed=function(e){wo(this.eParent,e)},e.prototype.setInputPlaceholder=function(e){this.dateComp&&this.dateComp.setInputPlaceholder&&this.dateComp.setInputPlaceholder(e)},e.prototype.setInputAriaLabel=function(e){this.dateComp&&this.dateComp.setInputAriaLabel&&this.dateComp.setInputAriaLabel(e)},e.prototype.afterGuiAttached=function(e){this.dateComp&&"function"==typeof this.dateComp.afterGuiAttached&&this.dateComp.afterGuiAttached(e)},e.prototype.setDateCompDisabled=function(e){null!=this.dateComp&&null!=this.dateComp.setDisabled&&this.dateComp.setDisabled(e)},e}(),bn=function(){return bn=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},bn.apply(this,arguments)},On=function(){function e(){this.customFilterOptions={}}return e.prototype.init=function(e,t){this.filterOptions=e.filterOptions||t,this.mapCustomOptions(),this.selectDefaultItem(e),this.checkForDeprecatedParams()},e.prototype.checkForDeprecatedParams=function(){this.filterOptions.some((function(e){return"string"!=typeof e&&null!=e.test}))&&console.warn("AG Grid: [IFilterOptionDef] since v26.2.0, test() has been replaced with predicate()."),this.filterOptions.some((function(e){return"string"!=typeof e&&null!=e.hideFilterInput}))&&console.warn("AG Grid: [IFilterOptionDef] since v26.2.0, useOfHideFilterInput has been replaced with numberOfInputs.")},e.prototype.getFilterOptions=function(){return this.filterOptions},e.prototype.mapCustomOptions=function(){var e=this;this.filterOptions&&this.filterOptions.forEach((function(t){if("string"!=typeof t)if([["displayKey"],["displayName"],["predicate","test"]].every((function(e){return!!e.some((function(e){return null!=t[e]}))||(console.warn("AG Grid: ignoring FilterOptionDef as it doesn't contain one of '"+e+"'"),!1)}))){var o=t.test,r=bn({},t);null!=o&&null==t.predicate&&(r.predicate=function(e,t){return o(e[0],t)},delete r.test),r.hideFilterInput&&null==r.numberOfInputs&&(r.numberOfInputs=0,delete r.hideFilterInput),e.customFilterOptions[t.displayKey]=r}else e.filterOptions=e.filterOptions.filter((function(e){return e===t}))||[]}))},e.prototype.selectDefaultItem=function(e){if(e.defaultOption)this.defaultOption=e.defaultOption;else if(this.filterOptions.length>=1){var t=this.filterOptions[0];"string"==typeof t?this.defaultOption=t:t.displayKey?this.defaultOption=t.displayKey:console.warn("AG Grid: invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'")}else console.warn("AG Grid: no filter options for filter")},e.prototype.getDefaultOption=function(){return this.defaultOption},e.prototype.getCustomOption=function(e){return this.customFilterOptions[e]},e}(),Pn={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose One",equals:"Equals",notEqual:"Not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"In range",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equals",greaterThanOrEqual:"Greater than or equals",contains:"Contains",notContains:"Not contains",startsWith:"Starts with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"},Tn=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),An=function(){return An=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},An.apply(this,arguments)},Dn=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},In=function(e){function t(t,o){void 0===o&&(o={});var r=e.call(this)||this;return r.eFocusableElement=t,r.callbacks=o,r.callbacks=An({shouldStopEventPropagation:function(){return!1},onTabKeyDown:function(e){if(!e.defaultPrevented){var t=r.focusService.findNextFocusableElement(r.eFocusableElement,!1,e.shiftKey);t&&(t.focus(),e.preventDefault())}}},o),r}return Tn(t,e),t.prototype.postConstruct=function(){this.eFocusableElement.classList.add(t.FOCUS_MANAGED_CLASS),this.addKeyDownListeners(this.eFocusableElement),this.callbacks.onFocusIn&&this.addManagedListener(this.eFocusableElement,"focusin",this.callbacks.onFocusIn),this.callbacks.onFocusOut&&this.addManagedListener(this.eFocusableElement,"focusout",this.callbacks.onFocusOut)},t.prototype.addKeyDownListeners=function(e){var t=this;this.addManagedListener(e,"keydown",(function(e){e.defaultPrevented||Oe(e)||(t.callbacks.shouldStopEventPropagation(e)?be(e):e.key===jr.TAB?t.callbacks.onTabKeyDown(e):t.callbacks.handleKeyDown&&t.callbacks.handleKeyDown(e))}))},t.FOCUS_MANAGED_CLASS="ag-focus-managed",Dn([z("focusService")],t.prototype,"focusService",void 0),Dn([B],t.prototype,"postConstruct",null),t}(Ge),Nn=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),xn=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Mn=function(e){function t(t){var o=e.call(this)||this;return o.filterNameKey=t,o.applyActive=!1,o.hidePopup=null,o.appliedModel=null,o}return Nn(t,e),t.prototype.postConstruct=function(){this.resetTemplate(),this.createManagedBean(new In(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)}))},t.prototype.handleKeyDown=function(e){},t.prototype.getFilterTitle=function(){return this.translate(this.filterNameKey)},t.prototype.isFilterActive=function(){return!!this.appliedModel},t.prototype.resetTemplate=function(e){var t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit);var o='\n <form class="ag-filter-wrapper">\n <div class="ag-filter-body-wrapper ag-'+this.getCssIdentifier()+'-body-wrapper">\n '+this.createBodyTemplate()+"\n </div>\n </form>";this.setTemplate(o,e),(t=this.getGui())&&t.addEventListener("submit",this.onFormSubmit)},t.prototype.isReadOnly=function(){return!!this.providedFilterParams.readOnly},t.prototype.init=function(e){var t=this;this.setParams(e),this.resetUiToDefaults(!0).then((function(){t.updateUiVisibility(),t.setupOnBtApplyDebounce()}))},t.prototype.setParams=function(e){this.providedFilterParams=e,this.applyActive=t.isUseApplyButton(e),this.createButtonPanel()},t.prototype.createButtonPanel=function(){var e=this,t=this.providedFilterParams.buttons;if(!(!t||t.length<1||this.isReadOnly())){var o=document.createElement("div");o.classList.add("ag-filter-apply-panel"),Qr(t).forEach((function(t){return function(t){var r,n;switch(t){case"apply":r=e.translate("applyFilter"),n=function(t){return e.onBtApply(!1,!1,t)};break;case"clear":r=e.translate("clearFilter"),n=function(){return e.onBtClear()};break;case"reset":r=e.translate("resetFilter"),n=function(){return e.onBtReset()};break;case"cancel":r=e.translate("cancelFilter"),n=function(t){e.onBtCancel(t)};break;default:return void console.warn("AG Grid: Unknown button type specified")}var i=Lo('<button\n type="'+("apply"===t?"submit":"button")+'"\n ref="'+t+'FilterButton"\n class="ag-standard-button ag-filter-apply-panel-button"\n >'+r+"\n </button>");o.appendChild(i),e.addManagedListener(i,"click",n)}(t)})),this.getGui().appendChild(o)}},t.prototype.getDefaultDebounceMs=function(){return 0},t.prototype.setupOnBtApplyDebounce=function(){var e=t.getDebounceMs(this.providedFilterParams,this.getDefaultDebounceMs());this.onBtApplyDebounce=F(this.onBtApply.bind(this),e)},t.prototype.getModel=function(){return this.appliedModel?this.appliedModel:null},t.prototype.setModel=function(e){var t=this;return(null!=e?this.setModelIntoUi(e):this.resetUiToDefaults()).then((function(){t.updateUiVisibility(),t.applyModel()}))},t.prototype.onBtCancel=function(e){var t=this,o=this.getModel(),r=function(){t.onUiChanged(!1,"prevent"),t.providedFilterParams.closeOnApply&&t.close(e)};null!=o?this.setModelIntoUi(o).then(r):this.resetUiToDefaults().then(r)},t.prototype.onBtClear=function(){var e=this;this.resetUiToDefaults().then((function(){return e.onUiChanged()}))},t.prototype.onBtReset=function(){this.onBtClear(),this.onBtApply()},t.prototype.applyModel=function(){var e=this.getModelFromUi();if(!this.isModelValid(e))return!1;var t=this.appliedModel;return this.appliedModel=e,!this.areModelsEqual(t,e)},t.prototype.isModelValid=function(e){return!0},t.prototype.onFormSubmit=function(e){e.preventDefault()},t.prototype.onBtApply=function(e,t,o){void 0===e&&(e=!1),void 0===t&&(t=!1),o&&o.preventDefault(),this.applyModel()&&this.providedFilterParams.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t}),this.providedFilterParams.closeOnApply&&this.applyActive&&!e&&!t&&this.close(o)},t.prototype.onNewRowsLoaded=function(){},t.prototype.close=function(e){if(this.hidePopup){var t,o=e,r=o&&o.key;"Enter"!==r&&"Space"!==r||(t={keyboardEvent:o}),this.hidePopup(t),this.hidePopup=null}},t.prototype.onUiChanged=function(e,t){if(void 0===e&&(e=!1),this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly){var o=this.isModelValid(this.getModelFromUi());_o(this.getRefElement("applyFilterButton"),!o)}e&&!t||"immediately"===t?this.onBtApply(e):(this.applyActive||t)&&"debounce"!==t||this.onBtApplyDebounce()},t.prototype.afterGuiAttached=function(e){null!=e&&(this.hidePopup=e.hidePopup)},t.getDebounceMs=function(e,o){return t.isUseApplyButton(e)?(null!=e.debounceMs&&console.warn("AG Grid: debounceMs is ignored when apply button is present"),0):null!=e.debounceMs?e.debounceMs:o},t.isUseApplyButton=function(e){return!!e.buttons&&e.buttons.indexOf("apply")>=0},t.prototype.destroy=function(){var t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,e.prototype.destroy.call(this)},t.prototype.translate=function(e){return this.gridOptionsWrapper.getLocaleTextFunc()(e,Pn[e])},t.prototype.getCellValue=function(e){var t=this.providedFilterParams,o=t.api,r=t.colDef,n=t.column,i=t.columnApi,s=t.context;return this.providedFilterParams.valueGetter({api:o,colDef:r,column:n,columnApi:i,context:s,data:e.data,getValue:function(t){return e.data[t]},node:e})},xn([z("rowModel")],t.prototype,"rowModel",void 0),xn([B],t.prototype,"postConstruct",null),t}(mn),Ln=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Fn=function(e){function t(t,o){var r=e.call(this,o)||this;return r.labelSeparator="",r.labelAlignment="left",r.disabled=!1,r.label="",r.config=t||{},r}return Ln(t,e),t.prototype.postConstruct=function(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");var e=this.config,t=e.labelSeparator,o=e.label,r=e.labelWidth,n=e.labelAlignment;null!=t&&this.setLabelSeparator(t),null!=o&&this.setLabel(o),null!=r&&this.setLabelWidth(r),this.setLabelAlignment(n||this.labelAlignment),this.refreshLabel()},t.prototype.refreshLabel=function(){No(this.eLabel),"string"==typeof this.label?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),""===this.label?(this.eLabel.classList.add("ag-hidden"),sr(this.eLabel,"presentation")):(this.eLabel.classList.remove("ag-hidden"),sr(this.eLabel,null))},t.prototype.setLabelSeparator=function(e){return this.labelSeparator===e||(this.labelSeparator=e,null!=this.label&&this.refreshLabel()),this},t.prototype.getLabelId=function(){return this.eLabel.id=this.eLabel.id||"ag-"+this.getCompId()+"-label",this.eLabel.id},t.prototype.getLabel=function(){return this.label},t.prototype.setLabel=function(e){return this.label===e||(this.label=e,this.refreshLabel()),this},t.prototype.setLabelAlignment=function(e){var t=this.getGui().classList;return t.toggle("ag-label-align-left","left"===e),t.toggle("ag-label-align-right","right"===e),t.toggle("ag-label-align-top","top"===e),this},t.prototype.setLabelWidth=function(e){return null==this.label||Uo(this.eLabel,e),this},t.prototype.setDisabled=function(e){e=!!e;var t=this.getGui();return _o(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this},t.prototype.isDisabled=function(){return!!this.disabled},function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);i>3&&s&&Object.defineProperty(t,o,s)}([B],t.prototype,"postConstruct",null),t}(mn),Gn=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),kn=function(e){function t(t,o,r){var n=e.call(this,t,o)||this;return n.className=r,n}return Gn(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.className&&this.addCssClass(this.className)},t.prototype.onValueChange=function(e){var o=this;return this.addManagedListener(this,t.EVENT_CHANGED,(function(){return e(o.getValue())})),this},t.prototype.getWidth=function(){return this.getGui().clientWidth},t.prototype.setWidth=function(e){return Yo(this.getGui(),e),this},t.prototype.getPreviousValue=function(){return this.previousValue},t.prototype.getValue=function(){return this.value},t.prototype.setValue=function(e,o){return this.value===e||(this.previousValue=this.value,this.value=e,o||this.dispatchEvent({type:t.EVENT_CHANGED})),this},t.EVENT_CHANGED="valueChange",t}(Fn),Vn=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Hn=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Wn=function(e){function t(t,o,r,n){var i=e.call(this,t,'<div class="ag-picker-field" role="presentation">\n <div ref="eLabel"></div>\n <div ref="eWrapper"\n class="ag-wrapper ag-picker-field-wrapper"\n tabIndex="-1"\n aria-expanded="false"\n '+(n?'role="'+n+'"':"")+'\n >\n <div ref="eDisplayField" class="ag-picker-field-display"></div>\n <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n </div>\n </div>',o)||this;return i.pickerIcon=r,i.isPickerDisplayed=!1,i.isDestroyingPicker=!1,i.skipClick=!1,i}return Vn(t,e),t.prototype.postConstruct=function(){var t=this;e.prototype.postConstruct.call(this);var o=this.getCompId()+"-display";this.eDisplayField.setAttribute("id",o),hr(this.eWrapper,o);var r=function(){t.skipClick?t.skipClick=!1:t.isDisabled()||(t.pickerComponent=t.showPicker())},n=this.getGui();if(this.addManagedListener(n,"mousedown",(function(e){!t.skipClick&&t.pickerComponent&&t.pickerComponent.isAlive()&&Mo(t.pickerComponent.getGui())&&n.contains(e.target)&&(t.skipClick=!0)})),this.addManagedListener(n,"keydown",(function(e){switch(e.key){case jr.UP:case jr.DOWN:case jr.ENTER:case jr.SPACE:r();case jr.ESCAPE:t.isPickerDisplayed&&e.preventDefault()}})),this.addManagedListener(this.eWrapper,"click",r),this.addManagedListener(this.eLabel,"click",r),this.pickerIcon){var i=Hr(this.pickerIcon,this.gridOptionsWrapper);i&&this.eIcon.appendChild(i)}},t.prototype.refreshLabel=function(){n(this.getLabel())?cr(this.eWrapper,this.getLabelId()):this.eWrapper.removeAttribute("aria-labelledby"),e.prototype.refreshLabel.call(this)},t.prototype.setAriaLabel=function(e){return pr(this.eWrapper,e),this},t.prototype.setInputWidth=function(e){return Uo(this.eWrapper,e),this},t.prototype.getFocusableElement=function(){return this.eWrapper},Hn([vn("eLabel")],t.prototype,"eLabel",void 0),Hn([vn("eWrapper")],t.prototype,"eWrapper",void 0),Hn([vn("eDisplayField")],t.prototype,"eDisplayField",void 0),Hn([vn("eIcon")],t.prototype,"eIcon",void 0),t}(kn),jn=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Bn=function(e){function t(t){void 0===t&&(t="default");var o=e.call(this,'<div class="ag-list ag-'+t+'-list" role="listbox"></div>')||this;return o.cssIdentifier=t,o.options=[],o.itemEls=[],o}return jn(t,e),t.prototype.init=function(){this.addManagedListener(this.getGui(),"keydown",this.handleKeyDown.bind(this))},t.prototype.handleKeyDown=function(e){var t=e.key;switch(t){case jr.ENTER:if(this.highlightedEl){var o=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(o)}else this.setValue(this.getValue());break;case jr.DOWN:case jr.UP:var r=t===jr.DOWN,n=void 0;if(e.preventDefault(),this.highlightedEl){var i=this.itemEls.indexOf(this.highlightedEl)+(r?1:-1);i=Math.min(Math.max(i,0),this.itemEls.length-1),n=this.itemEls[i]}else n=this.itemEls[r?0:this.itemEls.length-1];this.highlightItem(n)}},t.prototype.addOptions=function(e){var t=this;return e.forEach((function(e){return t.addOption(e)})),this},t.prototype.addOption=function(e){var t=e.value,o=$e(e.text||t);return this.options.push({value:t,text:o}),this.renderOption(t,o),this.updateIndices(),this},t.prototype.updateIndices=function(){var e=this.getGui().querySelectorAll(".ag-list-item");e.forEach((function(t,o){wr(t,o+1),Cr(t,e.length)}))},t.prototype.renderOption=function(e,t){var o=this,r=document.createElement("div");sr(r,"option"),r.classList.add("ag-list-item","ag-"+this.cssIdentifier+"-list-item"),r.innerHTML="<span>"+t+"</span>",r.tabIndex=-1,this.itemEls.push(r),this.addManagedListener(r,"mouseover",(function(){return o.highlightItem(r)})),this.addManagedListener(r,"mouseleave",(function(){return o.clearHighlighted()})),this.addManagedListener(r,"click",(function(){return o.setValue(e)})),this.getGui().appendChild(r)},t.prototype.setValue=function(e,t){if(this.value===e)return this.fireItemSelected(),this;if(null==e)return this.reset(),this;var o=this.options.findIndex((function(t){return t.value===e}));if(-1!==o){var r=this.options[o];this.value=r.value,this.displayValue=null!=r.text?r.text:r.value,this.highlightItem(this.itemEls[o]),t||this.fireChangeEvent()}return this},t.prototype.setValueByIndex=function(e){return this.setValue(this.options[e].value)},t.prototype.getValue=function(){return this.value},t.prototype.getDisplayValue=function(){return this.displayValue},t.prototype.refreshHighlighted=function(){var e=this;this.clearHighlighted();var t=this.options.findIndex((function(t){return t.value===e.value}));-1!==t&&this.highlightItem(this.itemEls[t])},t.prototype.reset=function(){this.value=null,this.displayValue=null,this.clearHighlighted(),this.fireChangeEvent()},t.prototype.highlightItem=function(e){e.offsetParent&&(this.clearHighlighted(),this.highlightedEl=e,this.highlightedEl.classList.add(t.ACTIVE_CLASS),Ar(this.highlightedEl,!0),this.highlightedEl.focus())},t.prototype.clearHighlighted=function(){this.highlightedEl&&this.highlightedEl.offsetParent&&(this.highlightedEl.classList.remove(t.ACTIVE_CLASS),Ar(this.highlightedEl,!1),this.highlightedEl=null)},t.prototype.fireChangeEvent=function(){this.dispatchEvent({type:kn.EVENT_CHANGED}),this.fireItemSelected()},t.prototype.fireItemSelected=function(){this.dispatchEvent({type:t.EVENT_ITEM_SELECTED})},t.EVENT_ITEM_SELECTED="selectedItem",t.ACTIVE_CLASS="ag-active-item",function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);i>3&&s&&Object.defineProperty(t,o,s)}([B],t.prototype,"init",null),t}(mn),Un=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Yn=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},zn=function(e){function t(t){return e.call(this,t,"ag-select","smallDown","listbox")||this}return Un(t,e),t.prototype.init=function(){var e=this;this.listComponent=this.createBean(new Bn("select")),this.listComponent.setParentComponent(this),this.eWrapper.tabIndex=0,this.listComponent.addManagedListener(this.listComponent,Bn.EVENT_ITEM_SELECTED,(function(){e.hideList&&e.hideList()})),this.listComponent.addManagedListener(this.listComponent,kn.EVENT_CHANGED,(function(){e.setValue(e.listComponent.getValue(),!1,!0),e.hideList&&e.hideList()}))},t.prototype.showPicker=function(){var e=this,t=this.listComponent.getGui(),o=this.gridOptionsWrapper.getDocument(),r=this.addManagedListener(o.body,"wheel",(function(o){!t.contains(o.target)&&e.hideList&&e.hideList()})),n=this.addManagedListener(t,"focusout",(function(o){!t.contains(o.relatedTarget)&&e.hideList&&e.hideList()})),i=this.gridOptionsWrapper.getLocaleTextFunc(),s=this.popupService.addPopup({modal:!0,eChild:t,closeOnEsc:!0,closedCallback:function(){e.hideList=null,e.isPickerDisplayed=!1,n(),r(),e.isAlive()&&(yr(e.eWrapper,!1),e.getFocusableElement().focus())},ariaLabel:i("ariaLabelSelectField","Select Field")});return s&&(this.hideList=s.hideFunc),this.isPickerDisplayed=!0,Uo(t,To(this.eWrapper)),yr(this.eWrapper,!0),t.style.maxHeight=bo(this.popupService.getPopupParent())+"px",t.style.position="absolute",this.popupService.positionPopupUnderComponent({type:"ag-list",eventSource:this.eWrapper,ePopup:t,keepWithinBounds:!0}),this.listComponent.refreshHighlighted(),this.listComponent},t.prototype.addOptions=function(e){var t=this;return e.forEach((function(e){return t.addOption(e)})),this},t.prototype.addOption=function(e){return this.listComponent.addOption(e),this},t.prototype.setValue=function(t,o,r){return this.value===t?this:(r||this.listComponent.setValue(t,!0),this.listComponent.getValue()===this.getValue()?this:(this.eDisplayField.innerHTML=this.listComponent.getDisplayValue(),e.prototype.setValue.call(this,t,o)))},t.prototype.destroy=function(){this.hideList&&this.hideList(),this.destroyBean(this.listComponent),e.prototype.destroy.call(this)},Yn([z("popupService")],t.prototype,"popupService",void 0),Yn([B],t.prototype,"init",null),t}(Wn),Kn=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),$n=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},qn=function(e){function t(t,o,r,n){void 0===r&&(r="text"),void 0===n&&(n="input");var i=e.call(this,t,'\n <div role="presentation">\n <div ref="eLabel" class="ag-input-field-label"></div>\n <div ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">\n <'+n+' ref="eInput" class="ag-input-field-input"></'+n+">\n </div>\n </div>",o)||this;return i.inputType=r,i.displayFieldTag=n,i}return Kn(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.setInputType(),this.eLabel.classList.add(this.className+"-label"),this.eWrapper.classList.add(this.className+"-input-wrapper"),this.eInput.classList.add(this.className+"-input"),this.addCssClass("ag-input-field"),this.eInput.id=this.eInput.id||"ag-"+this.getCompId()+"-input";var t=this.config,o=t.width,r=t.value;null!=o&&this.setWidth(o),null!=r&&this.setValue(r),this.addInputListeners()},t.prototype.refreshLabel=function(){n(this.getLabel())?cr(this.eInput,this.getLabelId()):this.eInput.removeAttribute("aria-labelledby"),e.prototype.refreshLabel.call(this)},t.prototype.addInputListeners=function(){var e=this;this.addManagedListener(this.eInput,"input",(function(t){return e.setValue(t.target.value)}))},t.prototype.setInputType=function(){"input"===this.displayFieldTag&&this.eInput.setAttribute("type",this.inputType)},t.prototype.getInputElement=function(){return this.eInput},t.prototype.setInputWidth=function(e){return Uo(this.eWrapper,e),this},t.prototype.setInputName=function(e){return this.getInputElement().setAttribute("name",e),this},t.prototype.getFocusableElement=function(){return this.eInput},t.prototype.setMaxLength=function(e){return this.eInput.maxLength=e,this},t.prototype.setInputPlaceholder=function(e){return Jo(this.eInput,"placeholder",e),this},t.prototype.setInputAriaLabel=function(e){return pr(this.eInput,e),this},t.prototype.setDisabled=function(t){return _o(this.eInput,t),e.prototype.setDisabled.call(this,t)},$n([vn("eLabel")],t.prototype,"eLabel",void 0),$n([vn("eWrapper")],t.prototype,"eWrapper",void 0),$n([vn("eInput")],t.prototype,"eInput",void 0),t}(kn),Zn=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Xn=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};!function(e){e[e.One=0]="One",e[e.Two=1]="Two"}(wn||(wn={}));var Qn,Jn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Zn(t,e),t.prototype.getNumberOfInputs=function(e){var o=this.optionsFactory.getCustomOption(e);if(o){var r=o.numberOfInputs;return null!=r?r:1}var n=[t.EMPTY,t.NOT_BLANK,t.BLANK];return e&&n.indexOf(e)>=0?0:e===t.IN_RANGE?2:1},t.prototype.onFloatingFilterChanged=function(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged(!0)},t.prototype.setTypeFromFloatingFilter=function(e){this.eType1.setValue(e),this.eType2.setValue(this.optionsFactory.getDefaultOption()),(this.isDefaultOperator("AND")?this.eJoinOperatorAnd:this.eJoinOperatorOr).setValue(!0)},t.prototype.getModelFromUi=function(){return this.isConditionUiComplete(wn.One)?this.isAllowTwoConditions()&&this.isConditionUiComplete(wn.Two)?{filterType:this.getFilterType(),operator:this.getJoinOperator(),condition1:this.createCondition(wn.One),condition2:this.createCondition(wn.Two)}:this.createCondition(wn.One):null},t.prototype.getConditionTypes=function(){return[this.eType1.getValue(),this.eType2.getValue()]},t.prototype.getJoinOperator=function(){return!0===this.eJoinOperatorOr.getValue()?"OR":"AND"},t.prototype.areModelsEqual=function(e,t){if(!e&&!t)return!0;if(!e&&t||e&&!t)return!1;var o,r=!e.operator,n=!t.operator;if(!r&&n||r&&!n)return!1;if(r){var i=e,s=t;o=this.areSimpleModelsEqual(i,s)}else{var a=e,l=t;o=a.operator===l.operator&&this.areSimpleModelsEqual(a.condition1,l.condition1)&&this.areSimpleModelsEqual(a.condition2,l.condition2)}return o},t.prototype.setModelIntoUi=function(e){if(e.operator){var t=e,o="OR"===t.operator;this.eJoinOperatorAnd.setValue(!o),this.eJoinOperatorOr.setValue(o),this.eType1.setValue(t.condition1.type),this.eType2.setValue(t.condition2.type),this.setConditionIntoUi(t.condition1,wn.One),this.setConditionIntoUi(t.condition2,wn.Two)}else{var r=e;this.eJoinOperatorAnd.setValue(this.isDefaultOperator("AND")),this.eJoinOperatorOr.setValue(this.isDefaultOperator("OR")),this.eType1.setValue(r.type),this.eType2.setValue(this.optionsFactory.getDefaultOption()),this.setConditionIntoUi(r,wn.One),this.setConditionIntoUi(null,wn.Two)}return sn.resolve()},t.prototype.doesFilterPass=function(e){var t=this,o=this.getModel();if(null==o)return!0;var r=o.operator,n=[];if(r){var i=o;n.push(i.condition1,i.condition2)}else n.push(o);return n[r&&"OR"===r?"some":"every"]((function(o){return t.individualConditionPasses(e,o)}))},t.prototype.setParams=function(t){e.prototype.setParams.call(this,t),this.optionsFactory=new On,this.optionsFactory.init(t,this.getDefaultFilterOptions()),this.allowTwoConditions=!t.suppressAndOrCondition,this.alwaysShowBothConditions=!!t.alwaysShowBothConditions,this.defaultJoinOperator=this.getDefaultJoinOperator(t.defaultJoinOperator),this.filterPlaceholder=t.filterPlaceholder,this.putOptionsIntoDropdown(),this.addChangedListeners()},t.prototype.getDefaultJoinOperator=function(e){return ge(["AND","OR"],e)?e:"AND"},t.prototype.putOptionsIntoDropdown=function(){var e=this,t=this.optionsFactory.getFilterOptions(),o=[this.eType1,this.eType2];t.forEach((function(t){var r="string"==typeof t?e.createBoilerplateListOption(t):e.createCustomListOption(t);o.forEach((function(e){return e.addOption(r)}))})),o.forEach((function(e){return e.setDisabled(t.length<=1)}))},t.prototype.createBoilerplateListOption=function(e){return{value:e,text:this.translate(e)}},t.prototype.createCustomListOption=function(e){var t=e.displayKey,o=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:o?this.gridOptionsWrapper.getLocaleTextFunc()(o.displayKey,o.displayName):this.translate(t)}},t.prototype.isAllowTwoConditions=function(){return this.allowTwoConditions},t.prototype.createBodyTemplate=function(){return'\n <ag-select class="ag-filter-select" ref="eOptions1"></ag-select>\n '+this.createValueTemplate(wn.One)+'\n <div class="ag-filter-condition" ref="eJoinOperatorPanel">\n <ag-radio-button ref="eJoinOperatorAnd" class="ag-filter-condition-operator ag-filter-condition-operator-and"></ag-radio-button>\n <ag-radio-button ref="eJoinOperatorOr" class="ag-filter-condition-operator ag-filter-condition-operator-or"></ag-radio-button>\n </div>\n <ag-select class="ag-filter-select" ref="eOptions2"></ag-select>\n '+this.createValueTemplate(wn.Two)},t.prototype.getCssIdentifier=function(){return"simple-filter"},t.prototype.updateUiVisibility=function(){var e=this,t=[[this.eType1],[this.eType2,this.eJoinOperatorPanel,this.eJoinOperatorAnd,this.eJoinOperatorOr]],o=[this.eCondition1Body,this.eCondition2Body];t.forEach((function(t,o){var r=e.isConditionVisible(o),n=e.isConditionDisabled(o);t.forEach((function(e){e instanceof qn||e instanceof zn?(e.setDisabled(n),e.setDisplayed(r)):(_o(e,n),wo(e,r))}))})),o.forEach((function(t,o){wo(t,e.isConditionBodyVisible(o))})),this.forEachInput((function(t,o,r,n){e.setElementDisplayed(t,o<n),e.setElementDisabled(t,e.isConditionDisabled(r))})),this.resetPlaceholder()},t.prototype.afterGuiAttached=function(t){if(e.prototype.afterGuiAttached.call(this,t),this.resetPlaceholder(),!t||!t.suppressFocus&&!this.isReadOnly()){var o=this.getInputs()[0][0];if(!o)return;o instanceof qn&&o.getInputElement().focus()}},t.prototype.getPlaceholderText=function(e,t){var o=this.translate(e);if(D(this.filterPlaceholder)){var r=this.filterPlaceholder,n=0===t?this.eType1.getValue():this.eType2.getValue();o=r({filterOptionKey:n,filterOption:this.translate(n),placeholder:o})}else"string"==typeof this.filterPlaceholder&&(o=this.filterPlaceholder);return o},t.prototype.resetPlaceholder=function(){var e=this,t=this.gridOptionsWrapper.getLocaleTextFunc();this.forEachInput((function(o,r,n,i){if(o instanceof qn){var s=0===r&&i>1?"inRangeStart":0===r?"filterOoo":"inRangeEnd",a=0===r&&i>1?t("ariaFilterFromValue","Filter from value"):0===r?t("ariaFilterValue","Filter Value"):t("ariaFilterToValue","Filter to Value");o.setInputPlaceholder(e.getPlaceholderText(s,n)),o.setInputAriaLabel(a)}}))},t.prototype.setElementValue=function(e,t,o){e instanceof qn&&e.setValue(null!=t?String(t):null,o)},t.prototype.setElementDisplayed=function(e,t){e instanceof mn&&wo(e.getGui(),t)},t.prototype.setElementDisabled=function(e,t){e instanceof mn&&_o(e.getGui(),t)},t.prototype.attachElementOnChange=function(e,t){e instanceof qn&&e.onValueChange(t)},t.prototype.forEachInput=function(e){var t=this,o=this.getInputs();this.getConditionTypes().forEach((function(r,n){for(var i=t.getNumberOfInputs(r),s=0;s<o[n].length;s++){var a=o[n][s];null!=a&&e(a,s,n,i)}}))},t.prototype.isConditionVisible=function(e){return 0===e||!!this.allowTwoConditions&&(this.isReadOnly()?this.isConditionUiComplete(e):!!this.alwaysShowBothConditions||this.isConditionUiComplete(e-1))},t.prototype.isConditionDisabled=function(e){return!!this.isReadOnly()||!this.isConditionVisible(e)||0!==e&&!this.isConditionUiComplete(e-1)},t.prototype.isConditionBodyVisible=function(e){if(!this.isConditionVisible(e))return!1;var t=this.getConditionTypes()[e];return this.getNumberOfInputs(t)>0},t.prototype.isConditionUiComplete=function(e){return this.getConditionTypes()[e]!==t.EMPTY&&!this.getValues(e).some((function(e){return null==e}))},t.prototype.resetUiToDefaults=function(e){var t=this,o=this.gridOptionsWrapper.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator"),r="ag-simple-filter-and-or-"+this.getCompId(),n=this.optionsFactory.getDefaultOption();return this.eType1.setValue(n,e).setAriaLabel(o).setDisabled(this.isReadOnly()),this.eType2.setValue(this.optionsFactory.getDefaultOption(),e).setAriaLabel(o).setDisabled(this.isReadOnly()),this.eJoinOperatorAnd.setValue(this.isDefaultOperator("AND"),e).setName(r).setLabel(this.translate("andCondition")).setDisabled(this.isReadOnly()),this.eJoinOperatorOr.setValue(this.isDefaultOperator("OR"),e).setName(r).setLabel(this.translate("orCondition")).setDisabled(this.isReadOnly()),this.forEachInput((function(o){t.setElementValue(o,null,e),t.setElementDisabled(o,t.isReadOnly())})),this.resetPlaceholder(),sn.resolve()},t.prototype.setConditionIntoUi=function(e,t){var o=this,r=this.mapValuesFromModel(e);this.forEachInput((function(e,n,i,s){i===t&&o.setElementValue(e,null!=r[n]?r[n]:null)}))},t.prototype.setValueFromFloatingFilter=function(e){var t=this;this.forEachInput((function(o,r,n,i){t.setElementValue(o,0===r&&0===n?e:null)}))},t.prototype.isDefaultOperator=function(e){return e===this.defaultJoinOperator},t.prototype.addChangedListeners=function(){var e=this;if(!this.isReadOnly()){var t=function(){return e.onUiChanged()};this.eType1.onValueChange(t),this.eType2.onValueChange(t),this.eJoinOperatorOr.onValueChange(t),this.eJoinOperatorAnd.onValueChange(t),this.forEachInput((function(o){e.attachElementOnChange(o,t)}))}},t.prototype.individualConditionPasses=function(e,t){var o=this.getCellValue(e.node),r=this.mapValuesFromModel(t),n=this.optionsFactory.getCustomOption(t.type),i=this.evaluateCustomFilter(n,r,o);return null!=i?i:null==o?this.evaluateNullValue(t.type):this.evaluateNonNullValue(r,o,t,e)},t.prototype.evaluateCustomFilter=function(e,t,o){if(null!=e){var r=e.predicate;return null==r||t.some((function(e){return null==e}))?void 0:r(t,o)}},t.prototype.isBlank=function(e){return null==e||"string"==typeof e&&0===e.trim().length},t.EMPTY="empty",t.BLANK="blank",t.NOT_BLANK="notBlank",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",Xn([vn("eOptions1")],t.prototype,"eType1",void 0),Xn([vn("eOptions2")],t.prototype,"eType2",void 0),Xn([vn("eJoinOperatorPanel")],t.prototype,"eJoinOperatorPanel",void 0),Xn([vn("eJoinOperatorAnd")],t.prototype,"eJoinOperatorAnd",void 0),Xn([vn("eJoinOperatorOr")],t.prototype,"eJoinOperatorOr",void 0),Xn([vn("eCondition1Body")],t.prototype,"eCondition1Body",void 0),Xn([vn("eCondition2Body")],t.prototype,"eCondition2Body",void 0),t}(Mn),ei=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),ti=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ei(t,e),t.prototype.setParams=function(t){e.prototype.setParams.call(this,t),this.scalarFilterParams=t},t.prototype.evaluateNullValue=function(e){switch(e){case t.EQUALS:case t.NOT_EQUAL:if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case t.GREATER_THAN:case t.GREATER_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case t.LESS_THAN:case t.LESS_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case t.IN_RANGE:if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case t.BLANK:return!0;case t.NOT_BLANK:return!1}return!1},t.prototype.evaluateNonNullValue=function(e,o,r){var n=this.comparator(),i=null!=e[0]?n(e[0],o):0;switch(r.type){case t.EQUALS:return 0===i;case t.NOT_EQUAL:return 0!==i;case t.GREATER_THAN:return i>0;case t.GREATER_THAN_OR_EQUAL:return i>=0;case t.LESS_THAN:return i<0;case t.LESS_THAN_OR_EQUAL:return i<=0;case t.IN_RANGE:var s=n(e[1],o);return this.scalarFilterParams.inRangeInclusive?i>=0&&s<=0:i>0&&s<0;case t.BLANK:return this.isBlank(o);case t.NOT_BLANK:return!this.isBlank(o);default:return console.warn('AG Grid: Unexpected type of filter "'+r.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}},t}(Jn),oi=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),ri=function(){return ri=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},ri.apply(this,arguments)},ni=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ii=1/0,si=function(e){function t(){var t=e.call(this,"dateFilter")||this;return t.minValidYear=1e3,t.maxValidYear=ii,t}return oi(t,e),t.prototype.afterGuiAttached=function(t){e.prototype.afterGuiAttached.call(this,t),this.dateCondition1FromComp.afterGuiAttached(t)},t.prototype.mapValuesFromModel=function(e){var t=e||{},o=t.dateFrom,r=t.dateTo,n=t.type;return[o&&Fr(o)||null,r&&Fr(r)||null].slice(0,this.getNumberOfInputs(n))},t.prototype.comparator=function(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)},t.prototype.defaultComparator=function(e,t){return null==t||t<e?-1:t>e?1:0},t.prototype.setParams=function(t){e.prototype.setParams.call(this,t),this.dateFilterParams=t;var o=function(e,o){if(null!=t[e]){if(!isNaN(t[e]))return null==t[e]?o:Number(t[e]);console.warn("AG Grid: DateFilter "+e+" is not a number")}return o};this.minValidYear=o("minValidYear",1e3),this.maxValidYear=o("maxValidYear",ii),this.minValidYear>this.maxValidYear&&console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear"),this.createDateComponents()},t.prototype.createDateComponents=function(){var e=this,t=function(t){return new Rn(e.getContext(),e.userComponentFactory,{onDateChanged:function(){return e.onUiChanged()},filterParams:e.dateFilterParams},t)};this.dateCondition1FromComp=t(this.eCondition1PanelFrom),this.dateCondition1ToComp=t(this.eCondition1PanelTo),this.dateCondition2FromComp=t(this.eCondition2PanelFrom),this.dateCondition2ToComp=t(this.eCondition2PanelTo),this.addDestroyFunc((function(){e.forEachInput((function(e){return e.destroy()}))}))},t.prototype.setElementValue=function(e,t,o){e.setDate(t)},t.prototype.setElementDisplayed=function(e,t){e.setDisplayed(t)},t.prototype.setElementDisabled=function(e,t){e.setDisabled(t)},t.prototype.getDefaultFilterOptions=function(){return t.DEFAULT_FILTER_OPTIONS},t.prototype.createValueTemplate=function(e){var t=e===wn.One?"1":"2";return'\n <div class="ag-filter-body" ref="eCondition'+t+'Body">\n <div class="ag-filter-from ag-filter-date-from" ref="eCondition'+t+'PanelFrom"></div>\n <div class="ag-filter-to ag-filter-date-to" ref="eCondition'+t+'PanelTo"></div>\n </div>'},t.prototype.isConditionUiComplete=function(t){var o=this;if(!e.prototype.isConditionUiComplete.call(this,t))return!1;var r=!0;return this.forEachInput((function(e,n,i,s){var a;i!==t||!r||n>=s||(r=r&&null!=(a=e.getDate())&&a.getUTCFullYear()>=o.minValidYear&&a.getUTCFullYear()<=o.maxValidYear)})),r},t.prototype.areSimpleModelsEqual=function(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type},t.prototype.getFilterType=function(){return"date"},t.prototype.createCondition=function(e){var t=this.getConditionTypes()[e],o={},r=this.getValues(e);return r.length>0&&(o.dateFrom=xr(r[0])),r.length>1&&(o.dateTo=xr(r[1])),ri({dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:t},o)},t.prototype.resetPlaceholder=function(){var e=this.gridOptionsWrapper.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),o=e("ariaFilterValue","Filter Value");this.forEachInput((function(e){e.setInputPlaceholder(t),e.setInputAriaLabel(o)}))},t.prototype.getInputs=function(){return[[this.dateCondition1FromComp,this.dateCondition1ToComp],[this.dateCondition2FromComp,this.dateCondition2ToComp]]},t.prototype.getValues=function(e){var t=[];return this.forEachInput((function(o,r,n,i){e===n&&r<i&&t.push(o.getDate())})),t},t.DEFAULT_FILTER_OPTIONS=[ti.EQUALS,ti.GREATER_THAN,ti.LESS_THAN,ti.NOT_EQUAL,ti.IN_RANGE,ti.BLANK,ti.NOT_BLANK],ni([vn("eCondition1PanelFrom")],t.prototype,"eCondition1PanelFrom",void 0),ni([vn("eCondition1PanelTo")],t.prototype,"eCondition1PanelTo",void 0),ni([vn("eCondition2PanelFrom")],t.prototype,"eCondition2PanelFrom",void 0),ni([vn("eCondition2PanelTo")],t.prototype,"eCondition2PanelTo",void 0),ni([z("userComponentFactory")],t.prototype,"userComponentFactory",void 0),t}(ti),ai=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),li=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ai(t,e),t.prototype.getDefaultDebounceMs=function(){return 0},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.getTextFromModel=function(e){if(!e)return null;if(null!=e.operator){var t=e,o=t||{},r=o.condition1,n=o.condition2,i=this.getTextFromModel(r),s=this.getTextFromModel(n);return[i,t.operator,s].join(" ")}if(e.type===Jn.BLANK||e.type===Jn.NOT_BLANK)return this.gridOptionsWrapper.getLocaleTextFunc()(e.type,e.type);var a=e,l=this.optionsFactory.getCustomOption(a.type),u=l||{},p=u.displayKey,c=u.displayName,d=u.numberOfInputs;return p&&c&&0===d?(this.gridOptionsWrapper.getLocaleTextFunc()(p,c),c):this.conditionToString(a,l)},t.prototype.isEventFromFloatingFilter=function(e){return e&&e.afterFloatingFilter},t.prototype.getLastType=function(){return this.lastType},t.prototype.isReadOnly=function(){return this.readOnly},t.prototype.setLastTypeFromModel=function(e){var t;e?(t=e.operator?e.condition1:e,this.lastType=t.type):this.lastType=this.optionsFactory.getDefaultOption()},t.prototype.canWeEditAfterModelFromParentFilter=function(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;var t=e;return this.isTypeEditable(t.type)},t.prototype.init=function(e){this.optionsFactory=new On,this.optionsFactory.init(e.filterParams,this.getDefaultFilterOptions()),this.lastType=this.optionsFactory.getDefaultOption(),this.readOnly=!!e.filterParams.readOnly;var t=this.isTypeEditable(this.lastType);this.setEditable(t)},t.prototype.doesFilterHaveSingleInput=function(e){var t=(this.optionsFactory.getCustomOption(e)||{}).numberOfInputs;return null==t||1==t},t.prototype.isTypeEditable=function(e){var t=[Jn.IN_RANGE,Jn.EMPTY,Jn.BLANK,Jn.NOT_BLANK];return!!e&&!this.isReadOnly()&&this.doesFilterHaveSingleInput(e)&&t.indexOf(e)<0},t}(mn),ui=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),pi=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ci=function(e){function t(){return e.call(this,'\n <div class="ag-floating-filter-input" role="presentation">\n <ag-input-text-field ref="eReadOnlyText"></ag-input-text-field>\n <div ref="eDateWrapper" style="display: flex;"></div>\n </div>')||this}return ui(t,e),t.prototype.getDefaultFilterOptions=function(){return si.DEFAULT_FILTER_OPTIONS},t.prototype.conditionToString=function(e,t){var o=e.type,r=(t||{}).numberOfInputs,n=o==Jn.IN_RANGE||2===r,i=Fr(e.dateFrom),s=Fr(e.dateTo),a=this.filterParams.inRangeFloatingFilterDateFormat;return n?(null!==i?Lr(i,a):"null")+"-"+(null!==s?Lr(s,a):"null"):null!=i?Lr(i,a):""+o},t.prototype.init=function(t){e.prototype.init.call(this,t),this.params=t,this.filterParams=t.filterParams,this.createDateComponent();var o=this.gridOptionsWrapper.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(o("ariaDateFilterInput","Date Filter Input"))},t.prototype.setEditable=function(e){wo(this.eDateWrapper,e),wo(this.eReadOnlyText.getGui(),!e)},t.prototype.onParentModelChanged=function(t,o){if(!this.isEventFromFloatingFilter(o)){e.prototype.setLastTypeFromModel.call(this,t);var r=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(t);if(this.setEditable(r),r){if(t){var n=t;this.dateComp.setDate(Fr(n.dateFrom))}else this.dateComp.setDate(null);this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.getTextFromModel(t)),this.dateComp.setDate(null)}},t.prototype.onDateChanged=function(){var e=this,t=xr(this.dateComp.getDate());this.params.parentFilterInstance((function(o){if(o){var r=Fr(t);o.onFloatingFilterChanged(e.getLastType()||null,r)}}))},t.prototype.createDateComponent=function(){var e=this,t=Mn.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),o={onDateChanged:F(this.onDateChanged.bind(this),t),filterParams:this.params.column.getColDef().filterParams};this.dateComp=new Rn(this.getContext(),this.userComponentFactory,o,this.eDateWrapper),this.addDestroyFunc((function(){return e.dateComp.destroy()}))},pi([z("userComponentFactory")],t.prototype,"userComponentFactory",void 0),pi([vn("eReadOnlyText")],t.prototype,"eReadOnlyText",void 0),pi([vn("eDateWrapper")],t.prototype,"eDateWrapper",void 0),t}(li),di=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),hi=function(e){function t(){return e.call(this,'\n <div class="ag-filter-filter">\n <ag-input-text-field class="ag-date-filter" ref="eDateInput"></ag-input-text-field>\n </div>')||this}return di(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){var t=this,o=this.gridOptionsWrapper.getDocument(),r=this.eDateInput.getInputElement();this.shouldUseBrowserDatePicker(e)&&(r.type="date"),this.addManagedListener(r,"mousedown",(function(){t.eDateInput.isDisabled()||r.focus()})),this.addManagedListener(r,"input",(function(r){r.target===o.activeElement&&(t.eDateInput.isDisabled()||e.onDateChanged())}));var n=e.filterParams||{},i=n.minValidYear,s=n.maxValidYear;i&&(r.min=i+"-01-01"),s&&(r.max=s+"-12-31")},t.prototype.getDate=function(){return Fr(this.eDateInput.getValue())},t.prototype.setDate=function(e){this.eDateInput.setValue(xr(e,!1))},t.prototype.setInputPlaceholder=function(e){this.eDateInput.setInputPlaceholder(e)},t.prototype.setDisabled=function(e){this.eDateInput.setDisabled(e)},t.prototype.afterGuiAttached=function(e){e&&e.suppressFocus||this.eDateInput.getInputElement().focus()},t.prototype.shouldUseBrowserDatePicker=function(e){return e.filterParams&&null!=e.filterParams.browserDatePicker?e.filterParams.browserDatePicker:_t()||St()},function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);i>3&&s&&Object.defineProperty(t,o,s)}([vn("eDateInput")],t.prototype,"eDateInput",void 0),t}(mn),fi=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),gi=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},mi=function(e){function t(){return e.call(this,"numberFilter")||this}return fi(t,e),t.prototype.mapValuesFromModel=function(e){var t=e||{},o=t.filter,r=t.filterTo,n=t.type;return[null==o?null:o,null==r?null:r].slice(0,this.getNumberOfInputs(n))},t.prototype.getDefaultDebounceMs=function(){return 500},t.prototype.comparator=function(){return function(e,t){return e===t?0:e<t?1:-1}},t.prototype.setParams=function(t){this.numberFilterParams=t;var o=this.getAllowedCharPattern();if(o){var r={allowedCharPattern:o};this.resetTemplate({"eValue-index0-1":r,"eValue-index1-1":r,"eValue-index0-2":r,"eValue-index1-2":r})}e.prototype.setParams.call(this,t)},t.prototype.getDefaultFilterOptions=function(){return t.DEFAULT_FILTER_OPTIONS},t.prototype.createValueTemplate=function(e){var t=e===wn.One?"1":"2",o=this.getAllowedCharPattern()?"ag-input-text-field":"ag-input-number-field";return'\n <div class="ag-filter-body" ref="eCondition'+t+'Body" role="presentation">\n <'+o+' class="ag-filter-from ag-filter-filter" ref="eValue-index0-'+t+'"></'+o+">\n <"+o+' class="ag-filter-to ag-filter-filter" ref="eValue-index1-'+t+'"></'+o+">\n </div>"},t.prototype.getValues=function(e){var t=this,o=[];return this.forEachInput((function(r,n,i,s){e===i&&n<s&&o.push(t.stringToFloat(r.getValue()))})),o},t.prototype.areSimpleModelsEqual=function(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type},t.prototype.getFilterType=function(){return"number"},t.prototype.stringToFloat=function(e){if("number"==typeof e)return e;var t=r(e);return null!=t&&""===t.trim()&&(t=null),this.numberFilterParams.numberParser?this.numberFilterParams.numberParser(t):null==t||"-"===t.trim()?null:parseFloat(t)},t.prototype.createCondition=function(e){var t=this.getConditionTypes()[e],o={filterType:this.getFilterType(),type:t},r=this.getValues(e);return r.length>0&&(o.filter=r[0]),r.length>1&&(o.filterTo=r[1]),o},t.prototype.getInputs=function(){return[[this.eValueFrom1,this.eValueTo1],[this.eValueFrom2,this.eValueTo2]]},t.prototype.getAllowedCharPattern=function(){return(this.numberFilterParams||{}).allowedCharPattern||(_t()||wt()?null:"\\d\\-\\.")},t.DEFAULT_FILTER_OPTIONS=[ti.EQUALS,ti.NOT_EQUAL,ti.LESS_THAN,ti.LESS_THAN_OR_EQUAL,ti.GREATER_THAN,ti.GREATER_THAN_OR_EQUAL,ti.IN_RANGE,ti.BLANK,ti.NOT_BLANK],gi([vn("eValue-index0-1")],t.prototype,"eValueFrom1",void 0),gi([vn("eValue-index1-1")],t.prototype,"eValueTo1",void 0),gi([vn("eValue-index0-2")],t.prototype,"eValueFrom2",void 0),gi([vn("eValue-index1-2")],t.prototype,"eValueTo2",void 0),t}(ti),yi=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),vi=function(){return vi=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},vi.apply(this,arguments)},Ci=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},wi=function(e){function t(){return e.call(this,"textFilter")||this}return yi(t,e),t.trimInput=function(e){var t=e&&e.trim();return""===t?e:t},t.prototype.getDefaultDebounceMs=function(){return 500},t.prototype.setParams=function(o){e.prototype.setParams.call(this,o),this.textFilterParams=o,this.matcher=this.getTextMatcher(),this.formatter=this.textFilterParams.textFormatter||(this.textFilterParams.caseSensitive?t.DEFAULT_FORMATTER:t.DEFAULT_LOWERCASE_FORMATTER)},t.prototype.getTextMatcher=function(){var e=this.textFilterParams.textCustomComparator;return e?(on.doOnce((function(){return console.warn("AG Grid - textCustomComparator is deprecated, use textMatcher instead.")}),"textCustomComparator.deprecated"),function(t){var o=t.filterOption,r=t.value,n=t.filterText;return e(o,r,n)}):this.textFilterParams.textMatcher||t.DEFAULT_MATCHER},t.prototype.createCondition=function(e){var t=this.getConditionTypes()[e],o={filterType:this.getFilterType(),type:t},r=this.getValues(e);return r.length>0&&(o.filter=r[0]),r.length>1&&(o.filterTo=r[1]),o},t.prototype.getFilterType=function(){return"text"},t.prototype.areSimpleModelsEqual=function(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type},t.prototype.getInputs=function(){return[[this.eValueFrom1,this.eValueTo1],[this.eValueFrom2,this.eValueTo2]]},t.prototype.getValues=function(e){var o=this,n=[];return this.forEachInput((function(i,s,a,l){if(e===a&&s<l){var u=r(i.getValue()),p=(o.textFilterParams.trimInput?t.trimInput(u):u)||null;n.push(p),i.setValue(p,!0)}})),n},t.prototype.getDefaultFilterOptions=function(){return t.DEFAULT_FILTER_OPTIONS},t.prototype.createValueTemplate=function(e){var t=e===wn.One?"1":"2";return'\n <div class="ag-filter-body" ref="eCondition'+t+'Body" role="presentation">\n <ag-input-text-field class=".ag-filter-from ag-filter-filter" ref="eValue-index0-'+t+'"></ag-input-text-field>\n <ag-input-text-field class="ag-filter-to ag-filter-filter" ref="eValue-index1-'+t+'"></ag-input-text-field>\n </div>'},t.prototype.mapValuesFromModel=function(e){var t=e||{},o=t.filter,r=t.filterTo,n=t.type;return[o||null,r||null].slice(0,this.getNumberOfInputs(n))},t.prototype.evaluateNullValue=function(e){var t=[Jn.NOT_EQUAL,Jn.NOT_CONTAINS,Jn.BLANK];return!!e&&t.indexOf(e)>=0},t.prototype.evaluateNonNullValue=function(e,t,o,r){var n=this,i=e.map((function(e){return n.formatter(e)}))||[],s=this.formatter(t),a=this.textFilterParams,l=a.api,u=a.colDef,p=a.column,c=a.columnApi,d=a.context,h=a.textFormatter;if(o.type===Jn.BLANK)return this.isBlank(t);if(o.type===Jn.NOT_BLANK)return!this.isBlank(t);var f={api:l,colDef:u,column:p,columnApi:c,context:d,node:r.node,data:r.data,filterOption:o.type,value:s,textFormatter:h};return i.some((function(e){return n.matcher(vi(vi({},f),{filterText:e}))}))},t.DEFAULT_FILTER_OPTIONS=[Jn.CONTAINS,Jn.NOT_CONTAINS,Jn.EQUALS,Jn.NOT_EQUAL,Jn.STARTS_WITH,Jn.ENDS_WITH,Jn.BLANK,Jn.NOT_BLANK],t.DEFAULT_FORMATTER=function(e){return e},t.DEFAULT_LOWERCASE_FORMATTER=function(e){return null==e?null:e.toString().toLowerCase()},t.DEFAULT_MATCHER=function(e){var o=e.filterOption,r=e.value,n=e.filterText;if(null==n)return!1;switch(o){case t.CONTAINS:return r.indexOf(n)>=0;case t.NOT_CONTAINS:return r.indexOf(n)<0;case t.EQUALS:return r===n;case t.NOT_EQUAL:return r!=n;case t.STARTS_WITH:return 0===r.indexOf(n);case t.ENDS_WITH:var i=r.lastIndexOf(n);return i>=0&&i===r.length-n.length;default:return!1}},Ci([vn("eValue-index0-1")],t.prototype,"eValueFrom1",void 0),Ci([vn("eValue-index1-1")],t.prototype,"eValueTo1",void 0),Ci([vn("eValue-index0-2")],t.prototype,"eValueFrom2",void 0),Ci([vn("eValue-index1-2")],t.prototype,"eValueTo2",void 0),t}(Jn),Ei=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),_i=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Si=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ei(t,e),t.prototype.postConstruct=function(){this.resetTemplate()},t.prototype.resetTemplate=function(e){this.setTemplate('\n <div class="ag-floating-filter-input" role="presentation">\n <ag-input-text-field ref="eFloatingFilterInput"></ag-input-text-field>\n </div>\n ',e)},t.prototype.getDefaultDebounceMs=function(){return 500},t.prototype.onParentModelChanged=function(e,t){this.isEventFromFloatingFilter(t)||(this.setLastTypeFromModel(e),this.eFloatingFilterInput.setValue(this.getTextFromModel(e)),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)))},t.prototype.init=function(t){e.prototype.init.call(this,t),this.params=t,this.applyActive=Mn.isUseApplyButton(this.params.filterParams);var o=this.params.filterParams.allowedCharPattern;if(null!=o&&this.resetTemplate({eFloatingFilterInput:{allowedCharPattern:o}}),!this.isReadOnly()){var r=Mn.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),n=F(this.syncUpWithParentFilter.bind(this),r),i=this.eFloatingFilterInput.getGui();this.addManagedListener(i,"input",n),this.addManagedListener(i,"keypress",n),this.addManagedListener(i,"keydown",n)}var s=t.column.getDefinition();(this.isReadOnly()||s.filterParams&&s.filterParams.filterOptions&&1===s.filterParams.filterOptions.length&&"inRange"===s.filterParams.filterOptions[0])&&this.eFloatingFilterInput.setDisabled(!0);var a=this.columnModel.getDisplayNameForColumn(t.column,"header",!0),l=this.gridOptionsWrapper.getLocaleTextFunc();this.eFloatingFilterInput.setInputAriaLabel(a+" "+l("ariaFilterInput","Filter Input"))},t.prototype.syncUpWithParentFilter=function(e){var t=this,o=e.key===jr.ENTER;if(!this.applyActive||o){var r=this.eFloatingFilterInput.getValue();this.params.filterParams.trimInput&&(r=wi.trimInput(r),this.eFloatingFilterInput.setValue(r,!0)),this.params.parentFilterInstance((function(e){e&&e.onFloatingFilterChanged(t.getLastType()||null,r||null)}))}},t.prototype.conditionToString=function(e,t){var o=(t||{}).numberOfInputs;return e.type==Jn.IN_RANGE||2===o?e.filter+"-"+e.filterTo:null!=e.filter?""+e.filter:""+e.type},t.prototype.setEditable=function(e){this.eFloatingFilterInput.setDisabled(!e)},_i([z("columnModel")],t.prototype,"columnModel",void 0),_i([vn("eFloatingFilterInput")],t.prototype,"eFloatingFilterInput",void 0),_i([B],t.prototype,"postConstruct",null),t}(li),Ri=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),bi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ri(t,e),t.prototype.getDefaultFilterOptions=function(){return mi.DEFAULT_FILTER_OPTIONS},t}(Si),Oi=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Pi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Oi(t,e),t.prototype.getDefaultFilterOptions=function(){return wi.DEFAULT_FILTER_OPTIONS},t}(Si),Ti=function(){function e(e,t){var o=this;void 0===t&&(t=!1),this.destroyFuncs=[],this.touching=!1,this.eventService=new te,this.eElement=e,this.preventMouseClick=t;var r=this.onTouchStart.bind(this),n=this.onTouchMove.bind(this),i=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",r,{passive:!0}),this.eElement.addEventListener("touchmove",n,{passive:!0}),this.eElement.addEventListener("touchend",i,{passive:!1}),this.destroyFuncs.push((function(){o.eElement.removeEventListener("touchstart",r,{passive:!0}),o.eElement.removeEventListener("touchmove",n,{passive:!0}),o.eElement.removeEventListener("touchend",i,{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 n=o.touchStart===r;if(o.touching&&n&&!o.moved){o.moved=!0;var i={type:e.EVENT_LONG_TAP,touchStart:o.touchStart,touchEvent:t};o.eventService.dispatchEvent(i)}}),500)}},e.prototype.onTouchMove=function(e){if(this.touching){var t=this.getActiveTouch(e.touches);t&&!qr(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.cancelable&&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}(),Ai=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Di=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Ii=function(e){function t(o){var r=e.call(this)||this;return o||r.setTemplate(t.TEMPLATE),r}return Ai(t,e),t.prototype.attachCustomElements=function(e,t,o,r,n){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=o,this.eSortMixed=r,this.eSortNone=n},t.prototype.setupSort=function(e,t){var o=this;void 0===t&&(t=!1),this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),this.column.getColDef().sortable&&(this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addManagedListener(this.eventService,We.EVENT_SORT_CHANGED,(function(){return o.onSortChanged()})),this.addManagedListener(this.eventService,We.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return o.onSortChanged()})),this.onSortChanged())},t.prototype.addInIcon=function(e,t,o){if(null!=t){var r=Hr(e,this.gridOptionsWrapper,o);r&&t.appendChild(r)}},t.prototype.onSortChanged=function(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()},t.prototype.updateIcons=function(){var e=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc){var t="asc"===e;this.eSortAsc.classList.toggle("ag-hidden",!t)}if(this.eSortDesc){var o="desc"===e;this.eSortDesc.classList.toggle("ag-hidden",!o)}if(this.eSortNone){var r=!this.column.getColDef().unSortIcon&&!this.gridOptionsWrapper.isUnSortIcon(),n=null==e;this.eSortNone.classList.toggle("ag-hidden",r||!n)}},t.prototype.setupMultiSortIndicator=function(){var e=this;this.addInIcon("sortUnSort",this.eSortMixed,this.column);var t=this.column.getColDef().showRowGroup;this.gridOptionsWrapper.isColumnsSortingCoupledToGroup()&&t&&(this.addManagedListener(this.eventService,We.EVENT_SORT_CHANGED,(function(){return e.updateMultiSortIndicator()})),this.addManagedListener(this.eventService,We.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return e.updateMultiSortIndicator()})),this.updateMultiSortIndicator())},t.prototype.updateMultiSortIndicator=function(){if(this.eSortMixed){var e="mixed"===this.sortController.getDisplaySortForColumn(this.column);this.eSortMixed.classList.toggle("ag-hidden",!e)}},t.prototype.updateSortOrder=function(){var e,t=this;if(this.eSortOrder){var o=this.sortController.getColumnsWithSortingOrdered(),r=null!=(e=this.sortController.getDisplaySortIndexForColumn(this.column))?e:-1,n=o.some((function(e){var o;return null!=(o=t.sortController.getDisplaySortIndexForColumn(e))&&o})),i=r>=0&&n;wo(this.eSortOrder,i),r>=0?this.eSortOrder.innerHTML=(r+1).toString():No(this.eSortOrder)}},t.TEMPLATE='<span class="ag-sort-indicator-container">\n <span ref="eSortOrder" class="ag-sort-indicator-icon ag-sort-order ag-hidden" aria-hidden="true"></span>\n <span ref="eSortAsc" class="ag-sort-indicator-icon ag-sort-ascending-icon ag-hidden" aria-hidden="true"></span>\n <span ref="eSortDesc" class="ag-sort-indicator-icon ag-sort-descending-icon ag-hidden" aria-hidden="true"></span>\n <span ref="eSortMixed" class="ag-sort-indicator-icon ag-sort-mixed-icon ag-hidden" aria-hidden="true"></span>\n <span ref="eSortNone" class="ag-sort-indicator-icon ag-sort-none-icon ag-hidden" aria-hidden="true"></span>\n </span>',Di([vn("eSortOrder")],t.prototype,"eSortOrder",void 0),Di([vn("eSortAsc")],t.prototype,"eSortAsc",void 0),Di([vn("eSortDesc")],t.prototype,"eSortDesc",void 0),Di([vn("eSortMixed")],t.prototype,"eSortMixed",void 0),Di([vn("eSortNone")],t.prototype,"eSortNone",void 0),Di([z("columnModel")],t.prototype,"columnModel",void 0),Di([z("sortController")],t.prototype,"sortController",void 0),t}(mn),Ni=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),xi=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Mi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastMovingChanged=0,t}return Ni(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.refresh=function(e){return this.params=e,this.workOutTemplate()==this.currentTemplate&&this.workOutShowMenu()==this.currentShowMenu&&this.workOutSort()==this.currentSort&&(this.setDisplayName(e),!0)},t.prototype.workOutTemplate=function(){var e=ae(this.params.template,t.TEMPLATE);return e&&e.trim?e.trim():e},t.prototype.init=function(e){this.params=e,this.currentTemplate=this.workOutTemplate(),this.setTemplate(this.currentTemplate),this.setupTap(),this.setupIcons(e.column),this.setMenu(),this.setupSort(),this.setupFilterIcon(),this.setDisplayName(e)},t.prototype.setDisplayName=function(e){if(this.currentDisplayName!=e.displayName){this.currentDisplayName=e.displayName;var t=$e(this.currentDisplayName);this.eText&&(this.eText.innerHTML=t)}},t.prototype.setupIcons=function(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=Hr(e,this.gridOptionsWrapper,o);r&&t.appendChild(r)}},t.prototype.setupTap=function(){var e=this,t=this.gridOptionsWrapper;if(!t.isSuppressTouch()){var o=new Ti(this.getGui(),!0),r=t.isSuppressMenuHide(),i=r&&n(this.eMenu),s=i?new Ti(this.eMenu,!0):o;if(this.params.enableMenu){var a=i?"EVENT_TAP":"EVENT_LONG_TAP";this.addManagedListener(s,Ti[a],(function(o){t.getApi().showColumnMenuAfterMouseClick(e.params.column,o.touchStart)}))}this.params.enableSorting&&this.addManagedListener(o,Ti.EVENT_TAP,(function(t){var o=t.touchStart.target;r&&e.eMenu.contains(o)||e.sortController.progressSort(e.params.column,!1,"uiColumnSorted")})),this.addDestroyFunc((function(){return o.destroy()})),i&&this.addDestroyFunc((function(){return s.destroy()}))}},t.prototype.workOutShowMenu=function(){var e=!this.gridOptionsWrapper.isSuppressMenuHide(),t=bt()&&e;return this.params.enableMenu&&!t},t.prototype.setMenu=function(){var e=this;if(this.eMenu)if(this.currentShowMenu=this.workOutShowMenu(),this.currentShowMenu){var t=this.gridOptionsWrapper.isSuppressMenuHide();this.addManagedListener(this.eMenu,"click",(function(){return e.showMenu(e.eMenu)})),this.eMenu.classList.toggle("ag-header-menu-always-show",t)}else xo(this.eMenu)},t.prototype.showMenu=function(e){e||(e=this.eMenu),this.menuFactory.showMenuAfterButtonClick(this.params.column,e,"columnMenu")},t.prototype.workOutSort=function(){return this.params.enableSorting},t.prototype.setupSort=function(){var e=this;if(this.currentSort=this.params.enableSorting,this.eSortIndicator||(this.eSortIndicator=this.context.createBean(new Ii(!0)),this.eSortIndicator.attachCustomElements(this.eSortOrder,this.eSortAsc,this.eSortDesc,this.eSortMixed,this.eSortNone)),this.eSortIndicator.setupSort(this.params.column),this.currentSort){var t=this.gridOptionsWrapper.isMultiSortKeyCtrl();this.addManagedListener(this.params.column,se.EVENT_MOVING_CHANGED,(function(){e.lastMovingChanged=(new Date).getTime()})),this.eLabel&&this.addManagedListener(this.eLabel,"click",(function(o){var r=e.params.column.isMoving(),n=(new Date).getTime()-e.lastMovingChanged<50;if(!r&&!n){var i=t?o.ctrlKey||o.metaKey:o.shiftKey;e.params.progressSort(i)}}));var o=function(){var t;if(e.addOrRemoveCssClass("ag-header-cell-sorted-asc",e.params.column.isSortAscending()),e.addOrRemoveCssClass("ag-header-cell-sorted-desc",e.params.column.isSortDescending()),e.addOrRemoveCssClass("ag-header-cell-sorted-none",e.params.column.isSortNone()),e.params.column.getColDef().showRowGroup){var o=!(null===(t=e.columnModel.getSourceColumnsForGroupColumn(e.params.column))||void 0===t?void 0:t.every((function(t){return e.params.column.getSort()==t.getSort()})));e.addOrRemoveCssClass("ag-header-cell-sorted-mixed",o)}};this.addManagedListener(this.eventService,We.EVENT_SORT_CHANGED,o),this.addManagedListener(this.eventService,We.EVENT_COLUMN_ROW_GROUP_CHANGED,o)}},t.prototype.setupFilterIcon=function(){this.eFilter&&(this.addManagedListener(this.params.column,se.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.onFilterChanged())},t.prototype.onFilterChanged=function(){var e=this.params.column.isFilterActive();this.eFilter.classList.toggle("ag-hidden",!e)},t.TEMPLATE='<div class="ag-cell-label-container" role="presentation">\n <span ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>\n <div ref="eLabel" class="ag-header-cell-label" role="presentation">\n <span ref="eText" class="ag-header-cell-text"></span>\n <span ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>\n <ag-sort-indicator ref="eSortIndicator"></ag-sort-indicator>\n </div>\n </div>',xi([z("sortController")],t.prototype,"sortController",void 0),xi([z("menuFactory")],t.prototype,"menuFactory",void 0),xi([z("columnModel")],t.prototype,"columnModel",void 0),xi([vn("eFilter")],t.prototype,"eFilter",void 0),xi([vn("eSortIndicator")],t.prototype,"eSortIndicator",void 0),xi([vn("eMenu")],t.prototype,"eMenu",void 0),xi([vn("eLabel")],t.prototype,"eLabel",void 0),xi([vn("eText")],t.prototype,"eText",void 0),xi([vn("eSortOrder")],t.prototype,"eSortOrder",void 0),xi([vn("eSortAsc")],t.prototype,"eSortAsc",void 0),xi([vn("eSortDesc")],t.prototype,"eSortDesc",void 0),xi([vn("eSortMixed")],t.prototype,"eSortMixed",void 0),xi([vn("eSortNone")],t.prototype,"eSortNone",void 0),t}(mn),Li=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Fi=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Gi=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return Li(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){this.params=e,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()},t.prototype.checkWarnings=function(){this.params.template&&T((function(){return console.warn("AG Grid: A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)")}),"HeaderGroupComp.templateNotSupported")},t.prototype.setupExpandIcons=function(){var e=this;this.addInIcon("columnGroupOpened","agOpened"),this.addInIcon("columnGroupClosed","agClosed");var t=function(t){if(!Oe(t)){var o=!e.params.columnGroup.isExpanded();e.columnModel.setColumnGroupOpened(e.params.columnGroup.getProvidedColumnGroup(),o,"uiColumnExpanded")}};this.addTouchAndClickListeners(this.eCloseIcon,t),this.addTouchAndClickListeners(this.eOpenIcon,t);var o=function(e){be(e)};this.addManagedListener(this.eCloseIcon,"dblclick",o),this.addManagedListener(this.eOpenIcon,"dblclick",o),this.addManagedListener(this.getGui(),"dblclick",t),this.updateIconVisibility();var r=this.params.columnGroup.getProvidedColumnGroup();this.addManagedListener(r,we.EVENT_EXPANDED_CHANGED,this.updateIconVisibility.bind(this)),this.addManagedListener(r,we.EVENT_EXPANDABLE_CHANGED,this.updateIconVisibility.bind(this))},t.prototype.addTouchAndClickListeners=function(e,t){var o=new Ti(e,!0);this.addManagedListener(o,Ti.EVENT_TAP,t),this.addDestroyFunc((function(){return o.destroy()})),this.addManagedListener(e,"click",t)},t.prototype.updateIconVisibility=function(){if(this.params.columnGroup.isExpandable()){var e=this.params.columnGroup.isExpanded();wo(this.eOpenIcon,e),wo(this.eCloseIcon,!e)}else wo(this.eOpenIcon,!1),wo(this.eCloseIcon,!1)},t.prototype.addInIcon=function(e,t){var o=Hr(e,this.gridOptionsWrapper,null);o&&this.getRefElement(t).appendChild(o)},t.prototype.addGroupExpandIcon=function(){if(!this.params.columnGroup.isExpandable())return wo(this.eOpenIcon,!1),void wo(this.eCloseIcon,!1)},t.prototype.setupLabel=function(){var e=this.params.displayName;if(n(e)){var t=$e(e);this.getRefElement("agLabel").innerHTML=t}},t.TEMPLATE='<div class="ag-header-group-cell-label" ref="agContainer" role="presentation">\n <span ref="agLabel" class="ag-header-group-text" role="presentation"></span>\n <span ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>\n <span ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>\n </div>',Fi([z("columnModel")],t.prototype,"columnModel",void 0),Fi([vn("agOpened")],t.prototype,"eOpenIcon",void 0),Fi([vn("agClosed")],t.prototype,"eCloseIcon",void 0),t}(mn),ki=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Vi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ki(t,e),t.prototype.isPopup=function(){return!0},t.prototype.setParentComponent=function(t){t.addCssClass("ag-has-popup"),e.prototype.setParentComponent.call(this,t)},t.prototype.destroy=function(){var t=this.parentComponent;t&&t.isAlive()&&t.getGui().classList.remove("ag-has-popup"),e.prototype.destroy.call(this)},t}(mn),Hi=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Wi=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return Hi(t,e),t.prototype.init=function(e){this.params=e,this.focusAfterAttached=e.cellStartedEdit,this.eTextArea.setMaxLength(e.maxLength||200).setCols(e.cols||60).setRows(e.rows||10),n(e.value)&&this.eTextArea.setValue(e.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this))},t.prototype.onKeyDown=function(e){var t=e.key;(t===jr.LEFT||t===jr.UP||t===jr.RIGHT||t===jr.DOWN||e.shiftKey&&t===jr.ENTER)&&e.stopPropagation()},t.prototype.afterGuiAttached=function(){var e=this.gridOptionsWrapper.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(e("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()},t.prototype.getValue=function(){return this.params.parseValue(this.eTextArea.getValue())},t.TEMPLATE='<div class="ag-large-text" tabindex="0">\n <ag-input-text-area ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>\n </div>',function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);i>3&&s&&Object.defineProperty(t,o,s)}([vn("eTextArea")],t.prototype,"eTextArea",void 0),t}(Vi),ji=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Bi=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Ui=function(e){function t(){var t=e.call(this,'<div class="ag-cell-edit-wrapper"><ag-select class="ag-cell-editor" ref="eSelect"></ag-select></div>')||this;return t.startedByEnter=!1,t}return ji(t,e),t.prototype.init=function(e){var t=this;if(this.focusAfterAttached=e.cellStartedEdit,i(e.values))console.warn("AG Grid: no values found for select cellEditor");else{this.startedByEnter=null!=e.eventKey&&e.eventKey===jr.ENTER;var o=!1;e.values.forEach((function(r){var n={value:r},i=t.valueFormatterService.formatValue(e.column,null,r),s=null!=i;n.text=s?i:r,t.eSelect.addOption(n),o=o||e.value===r})),o?this.eSelect.setValue(e.value,!0):e.values.length&&this.eSelect.setValue(e.values[0],!0),this.gridOptionsWrapper.isFullRowEdit()||this.eSelect.onValueChange((function(){return e.stopEditing()}))}},t.prototype.afterGuiAttached=function(){this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&this.eSelect.showPicker()},t.prototype.focusIn=function(){this.eSelect.getFocusableElement().focus()},t.prototype.getValue=function(){return this.eSelect.getValue()},t.prototype.isPopup=function(){return!1},Bi([z("valueFormatterService")],t.prototype,"valueFormatterService",void 0),Bi([vn("eSelect")],t.prototype,"eSelect",void 0),t}(Vi),Yi=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),zi=function(e){function t(){var t=e.call(this)||this;return T((function(){return console.warn('AG Grid: The PopupSelectCellEditor (agPopupSelectCellEditor) is deprecated. Instead use {cellEditor: "agSelectCellEditor", cellEditorPopup: true} ')}),"PopupSelectCellEditor.deprecated"),t}return Yi(t,e),t.prototype.isPopup=function(){return!0},t}(Ui),Ki=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),$i=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return Ki(t,e),t.prototype.init=function(e){this.params=e;var t,o=this.eInput;e.cellStartedEdit?(this.focusAfterAttached=!0,e.eventKey===jr.BACKSPACE||e.eventKey===jr.DELETE?t="":e.charPress?t=e.charPress:(t=this.getStartValue(e),e.eventKey!==jr.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,t=this.getStartValue(e)),null!=t&&o.setValue(t,!0),null!=e.maxLength&&o.setMaxLength(e.maxLength),this.addManagedListener(o.getGui(),"keydown",(function(e){var t=e.key;t!==jr.PAGE_UP&&t!==jr.PAGE_DOWN||e.preventDefault()}))},t.prototype.afterGuiAttached=function(){var e=this.gridOptionsWrapper.getLocaleTextFunc(),t=this.eInput;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),this.focusAfterAttached){Et()||t.getFocusableElement().focus();var o=t.getInputElement();if(this.highlightAllOnFocus)o.select();else{var r=t.getValue(),i=n(r)&&r.length||0;i&&o.setSelectionRange(i,i)}}},t.prototype.focusIn=function(){var e=this.eInput,t=e.getFocusableElement(),o=e.getInputElement();t.focus(),o.select()},t.prototype.getValue=function(){var e=this.eInput;return this.params.parseValue(e.getValue())},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-cell-edit-wrapper">\n <ag-input-text-field class="ag-cell-editor" ref="eInput"></ag-input-text-field>\n </div>',function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);i>3&&s&&Object.defineProperty(t,o,s)}([vn("eInput")],t.prototype,"eInput",void 0),t}(Vi),qi=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Zi=function(e){function t(){var t=e.call(this)||this;return T((function(){return console.warn('AG Grid: The PopupTextCellEditor (agPopupTextCellEditor) is deprecated. Instead use {cellEditor: "agTextCellEditor", cellEditorPopup: true} ')}),"PopupTextCellEditor.deprecated"),t}return qi(t,e),t.prototype.isPopup=function(){return!0},t}($i),Xi=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Qi=function(e){function t(){var o=e.call(this,t.TEMPLATE)||this;return o.refreshCount=0,o}return Xi(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=n(r)?r:o,s=t>=0;this.eDelta.innerHTML=s?"↑"+i:"↓"+i,this.eDelta.classList.toggle("ag-value-change-delta-up",s),this.eDelta.classList.toggle("ag-value-change-delta-down",!s)},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(){this.eValue.classList.remove("ag-value-change-value-highlight"),No(this.eDelta)},t.prototype.refresh=function(e){var t=e.value;if(t===this.lastValue)return!1;if(n(e.valueFormatted)?this.eValue.innerHTML=e.valueFormatted:n(e.value)?this.eValue.innerHTML=t:No(this.eValue),this.filterManager.isSuppressFlashingCellsBecauseFiltering())return!1;if("number"==typeof t&&"number"==typeof this.lastValue){var o=t-this.lastValue;this.showDelta(e,o)}return this.lastValue&&this.eValue.classList.add("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>',function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);i>3&&s&&Object.defineProperty(t,o,s)}([z("filterManager")],t.prototype,"filterManager",void 0),t}(mn),Ji=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),es=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 Ji(t,e),t.prototype.init=function(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=Lo('<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&&e.ePrevious.classList.add("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;return i(t)&&(t=""),t!==this.lastValue&&!this.filterManager.isSuppressFlashingCellsBecauseFiltering()&&(this.addSlideAnimation(),this.lastValue=t,n(e.valueFormatted)?this.eCurrent.innerHTML=e.valueFormatted:n(e.value)?this.eCurrent.innerHTML=t:No(this.eCurrent),!0)},t.TEMPLATE='<span>\n <span class="ag-value-slide-current"></span>\n </span>',function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);i>3&&s&&Object.defineProperty(t,o,s)}([z("filterManager")],t.prototype,"filterManager",void 0),t}(mn);!function(e){e[e.Above=0]="Above",e[e.Below=1]="Below"}(Qn||(Qn={}));var ts,os,rs,ns=function(){function e(t){this.rowIndex=null,this.key=null,this.childrenMapped={},this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=e.OBJECT_ID_SEQUENCE++,this.__autoHeights={},this.alreadyRendered=!1,this.highlighted=null,this.selected=!1,this.beans=t}return e.prototype.setData=function(e){this.setDataCommon(e,!1)},e.prototype.updateData=function(e){this.setDataCommon(e,!0)},e.prototype.setDataCommon=function(e,t){var o=this.data;this.data=e,this.beans.valueCache.onDataChanged(),this.updateDataOnDetailNode(),this.checkRowSelectable();var r=this.createDataChangedEvent(e,o,t);this.dispatchLocalEvent(r)},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.getRowIndexString=function(){return this.rowPinned===oe.PINNED_TOP?"t-"+this.rowIndex:this.rowPinned===oe.PINNED_BOTTOM?"b-"+this.rowIndex:this.rowIndex.toString()},e.prototype.createDaemonNode=function(){var t=new e(this.beans);return 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=n(this.id)?this.createDaemonNode():null,r=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),this.beans.selectionService.syncInRowNode(this,o),this.checkRowSelectable();var i=this.createDataChangedEvent(e,r,!1);this.dispatchLocalEvent(i)},e.prototype.checkRowSelectable=function(){var e=this.beans.gridOptionsWrapper.getIsRowSelectableFunc();this.setRowSelectable(!e||e(this))},e.prototype.setRowSelectable=function(t){if(this.selectable!==t&&(this.selectable=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_SELECTABLE_CHANGED)),this.beans.gridOptionsWrapper.isGroupSelectsChildren())){var o=this.calculateSelectedFromChildren();this.setSelected(null!=o&&o)}},e.prototype.setId=function(t){var o=this.beans.gridOptionsWrapper.getRowIdFunc();if(o)if(this.data){var r=this.getGroupKeys(!0);this.id=o({data:this.data,parentKeys:r.length>0?r:void 0,level:this.level}),null!==this.id&&"string"==typeof this.id&&this.id.startsWith(e.ID_PREFIX_ROW_GROUP)&&console.error("AG Grid: Row IDs cannot start with "+e.ID_PREFIX_ROW_GROUP+", this is a reserved prefix for AG Grid's row grouping feature."),null!==this.id&&"string"!=typeof this.id&&(this.id=""+this.id)}else this.id=void 0;else this.id=t},e.prototype.getGroupKeys=function(e){void 0===e&&(e=!1);var t=[],o=this;for(e&&(o=o.parent);o&&o.level>=0;)t.push(o.key),o=o.parent;return t.reverse(),t},e.prototype.isPixelInRange=function(e){return!(!n(this.rowTop)||!n(this.rowHeight))&&e>=this.rowTop&&e<this.rowTop+this.rowHeight},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.oldRowTop=this.rowTop,this.rowTop!==t&&(this.rowTop=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_TOP_CHANGED)),this.setDisplayed(null!==t))},e.prototype.clearRowTopAndRowIndex=function(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)},e.prototype.setDisplayed=function(t){this.displayed!==t&&(this.displayed=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_DISPLAYED_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.setHighlighted=function(t){t!==this.highlighted&&(this.highlighted=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HIGHLIGHT_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.setMaster=function(t){this.master!==t&&(this.master&&!t&&(this.expanded=!1),this.master=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_MASTER_CHANGED)))},e.prototype.setGroup=function(t){this.group!==t&&(this.group&&!t&&(this.expanded=!1),this.group=t,this.updateHasChildren(),this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_GROUP_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.setRowAutoHeight=function(e,t){this.__autoHeights||(this.__autoHeights={}),this.__autoHeights[t.getId()]=e,null!=e&&(null==this.checkAutoHeightsDebounced&&(this.checkAutoHeightsDebounced=F(this.checkAutoHeights.bind(this),1)),this.checkAutoHeightsDebounced())},e.prototype.checkAutoHeights=function(){var e=!1,t=!0,o=0,r=this.__autoHeights;if(null!=r&&(this.beans.columnModel.getAllDisplayedAutoHeightCols().forEach((function(n){var i=r[n.getId()];null!=i?(t=!1,i>o&&(o=i)):e=!0})),!e&&((t||o<10)&&(o=this.beans.gridOptionsWrapper.getRowHeightForNode(this).height),o!=this.rowHeight))){this.setRowHeight(o);var n=this.beans.rowModel;n.onRowHeightChangedDebounced&&n.onRowHeightChangedDebounced()}},e.prototype.setRowIndex=function(t){this.rowIndex!==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,o){if(this.expanded!==t){this.expanded=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_EXPANDED_CHANGED));var r=Object.assign({},this.createGlobalRowEvent(We.EVENT_ROW_GROUP_OPENED),{expanded:t,event:o||null});this.beans.rowNodeEventThrottle.dispatchExpanded(r),this.beans.gridOptionsWrapper.isGroupIncludeFooter()&&this.beans.rowRenderer.refreshCells({rowNodes:[this]})}},e.prototype.createGlobalRowEvent=function(e){return{type:e,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned,context:this.beans.gridOptionsWrapper.getContext(),api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi()}},e.prototype.dispatchLocalEvent=function(e){this.eventService&&this.eventService.dispatchEvent(e)},e.prototype.setDataValue=function(e,t,o){var r=this.beans.columnModel.getPrimaryColumn(e),n=this.beans.valueService.getValue(r,this),i=this.beans.valueService.setValue(this,r,t,o);return this.dispatchCellChangedEvent(r,t,n),this.checkRowSelectable(),i},e.prototype.setGroupValue=function(e,t){var o=this.beans.columnModel.getGridColumn(e);i(this.groupData)&&(this.groupData={});var r=o.getColId(),n=this.groupData[r];n!==t&&(this.groupData[r]=t,this.dispatchCellChangedEvent(o,t,n))},e.prototype.setAggData=function(e){var t=this,o=w([this.aggData,e]),r=this.aggData;this.aggData=e,this.eventService&&o.forEach((function(e){var o=t.beans.columnModel.getGridColumn(e),n=t.aggData?t.aggData[e]:void 0,i=r?r[e]:void 0;t.dispatchCellChangedEvent(o,n,i)}))},e.prototype.updateHasChildren=function(){var t=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;t!==this.__hasChildren&&(this.__hasChildren=!!t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HAS_CHILDREN_CHANGED)))},e.prototype.hasChildren=function(){return null==this.__hasChildren&&this.updateHasChildren(),this.__hasChildren},e.prototype.isEmptyRowGroupNode=function(){return this.group&&s(this.childrenAfterGroup)},e.prototype.dispatchCellChangedEvent=function(t,o,r){var n={type:e.EVENT_CELL_CHANGED,node:this,column:t,newValue:o,oldValue:r};this.dispatchLocalEvent(n)},e.prototype.resetQuickFilterAggregateText=function(){this.quickFilterAggregateText=null},e.prototype.isExpandable=function(){return!!(this.hasChildren()&&!this.footer||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(!(null===(e=this.childrenAfterGroup)||void 0===e?void 0:e.length))return this.selectable?this.selected:null;for(var n=0;n<this.childrenAfterGroup.length;n++){var i=this.childrenAfterGroup[n],s=i.isSelected();if(!i.selectable){var a=i.calculateSelectedFromChildren();if(null===a)continue;s=a}switch(s){case!0:t=!0;break;case!1:o=!0;break;default:r=!0}}return r||t&&o?void 0:!!t||!o&&(this.selectable?this.selected:null)},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===oe.PINNED_TOP||this.rowPinned===oe.PINNED_BOTTOM},e.prototype.setSelectedParams=function(e){var t,o=this.beans.gridOptionsWrapper.isGroupSelectsChildren(),r=!0===e.newValue,n=!0===e.clearSelection,i=!0===e.suppressFinishActions,s=!0===e.rangeSelect,a=o&&!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(s&&this.beans.selectionService.getLastSelectedNode()){var l=this.beans.selectionService.getLastSelectedNode()!==this,u=this.beans.gridOptionsWrapper.isRowSelectionMulti();if(l&&u){var p=this.doRowRangeSelection(e.newValue);return this.beans.selectionService.setLastSelectedNode(this),p}}var c=0;if(a&&this.group||this.selectThisNode(r,e.event)&&c++,o&&(null===(t=this.childrenAfterGroup)||void 0===t?void 0:t.length)&&(c+=this.selectChildNodes(r,a)),!i){if(r&&(n||!this.beans.gridOptionsWrapper.isRowSelectionMulti())&&(c+=this.beans.selectionService.clearOtherNodes(this)),c>0){this.beans.selectionService.updateGroupsFromChildrenSelections();var d={type:We.EVENT_SELECTION_CHANGED};this.beans.eventService.dispatchEvent(d)}r&&this.beans.selectionService.setLastSelectedNode(this)}return c},e.prototype.doRowRangeSelection=function(e){var t=this;void 0===e&&(e=!0);var o=this.beans.gridOptionsWrapper.isGroupSelectsChildren(),r=this.beans.selectionService.getLastSelectedNode(),n=this.beans.rowModel.getNodesInRangeForSelection(this,r),i=0;n.forEach((function(r){r.group&&o||!1===e&&t===r||r.selectThisNode(e)&&i++})),this.beans.selectionService.updateGroupsFromChildrenSelections();var s={type:We.EVENT_SELECTION_CHANGED};return this.beans.eventService.dispatchEvent(s),i},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,o){var r=!this.selectable&&t,n=this.selected===t;if(r||n)return!1;this.selected=t,this.eventService&&this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_ROW_SELECTED));var i=Object.assign({},this.createGlobalRowEvent(We.EVENT_ROW_SELECTED),{event:o||null});return this.beans.eventService.dispatchEvent(i),!0},e.prototype.selectChildNodes=function(e,t){var o=t?this.childrenAfterAggFilter:this.childrenAfterGroup;if(i(o))return 0;for(var r=0,n=0;n<o.length;n++)r+=o[n].setSelectedParams({newValue:e,clearSelection:!1,suppressFinishActions:!0,groupSelectsFiltered:t});return r},e.prototype.addEventListener=function(e,t){this.eventService||(this.eventService=new te),this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService&&(this.eventService.removeEventListener(e,t),this.eventService.noRegisteredListenersExist()&&(this.eventService=null))},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=this,o=!0,r=!1,i=null;o&&!r;){var s=t.parent;n(s)&&t.firstChild?s.rowGroupColumn===e&&(r=!0,i=s):o=!1,t=s}return r?i:null},e.prototype.isFullWidthCell=function(){var e=this.beans.gridOptionsWrapper.getIsFullWidthCellFunc();return!!e&&e({rowNode:this})},e.prototype.getRoute=function(){if(null!=this.key){for(var e=[],t=this;null!=t.key;)e.push(t.key),t=t.parent;return e.reverse()}},e.ID_PREFIX_ROW_GROUP="row-group-",e.ID_PREFIX_TOP_PINNED="t-",e.ID_PREFIX_BOTTOM_PINNED="b-",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_MASTER_CHANGED="masterChanged",e.EVENT_GROUP_CHANGED="groupChanged",e.EVENT_MOUSE_ENTER="mouseEnter",e.EVENT_MOUSE_LEAVE="mouseLeave",e.EVENT_HEIGHT_CHANGED="heightChanged",e.EVENT_TOP_CHANGED="topChanged",e.EVENT_DISPLAYED_CHANGED="displayedChanged",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_HAS_CHILDREN_CHANGED="hasChildrenChanged",e.EVENT_SELECTABLE_CHANGED="selectableChanged",e.EVENT_UI_LEVEL_CHANGED="uiLevelChanged",e.EVENT_HIGHLIGHT_CHANGED="rowHighlightChanged",e.EVENT_DRAGGING_CHANGED="draggingChanged",e}(),is=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),ss=function(){return ss=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},ss.apply(this,arguments)},as=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ls=function(e){function t(){return e.call(this,'\n <div class="ag-selection-checkbox" role="presentation">\n <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n </div>')||this}return is(t,e),t.prototype.postConstruct=function(){this.eCheckbox.setPassive(!0)},t.prototype.getCheckboxId=function(){return this.eCheckbox.getInputElement().id},t.prototype.onDataChanged=function(){this.onSelectionChanged()},t.prototype.onSelectableChanged=function(){this.showOrHideSelect()},t.prototype.onSelectionChanged=function(){var e=this.gridOptionsWrapper.getLocaleTextFunc(),t=this.rowNode.isSelected(),o=void 0===t?e("ariaIndeterminate","indeterminate"):!0===t?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),r=e("ariaRowToggleSelection","Press Space to toggle row selection");this.eCheckbox.setValue(t,!0),this.eCheckbox.setInputAriaLabel(r+" ("+o+")")},t.prototype.onCheckedClicked=function(e){var t=this.gridOptionsWrapper.isGroupSelectsFiltered();return this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:t})},t.prototype.onUncheckedClicked=function(e){var t=this.gridOptionsWrapper.isGroupSelectsFiltered();return this.rowNode.setSelectedParams({newValue:!0,rangeSelect:e.shiftKey,groupSelectsFiltered:t})},t.prototype.init=function(e){var t=this;if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListener(this.eCheckbox.getInputElement(),"dblclick",(function(e){be(e)})),this.addManagedListener(this.eCheckbox.getInputElement(),"click",(function(e){be(e);var o=t.eCheckbox.getValue();void 0===t.eCheckbox.getPreviousValue()||void 0===o?0===t.onUncheckedClicked(e||{})&&t.onCheckedClicked(e):o?t.onCheckedClicked(e):t.onUncheckedClicked(e||{})})),this.addManagedListener(this.rowNode,ns.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.rowNode,ns.EVENT_DATA_CHANGED,this.onDataChanged.bind(this)),this.addManagedListener(this.rowNode,ns.EVENT_SELECTABLE_CHANGED,this.onSelectableChanged.bind(this)),this.gridOptionsWrapper.getIsRowSelectableFunc()||"function"==typeof this.getIsVisible()){var o=this.showOrHideSelect.bind(this);this.addManagedListener(this.eventService,We.EVENT_DISPLAYED_COLUMNS_CHANGED,o),this.addManagedListener(this.rowNode,ns.EVENT_DATA_CHANGED,o),this.addManagedListener(this.rowNode,ns.EVENT_CELL_CHANGED,o),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")},t.prototype.showOrHideSelect=function(){var e,t,o,r,n=this.rowNode.selectable,i=this.getIsVisible();if(n)if("function"==typeof i){var s=null===(e=this.overrides)||void 0===e?void 0:e.callbackParams,a=null===(t=this.column)||void 0===t?void 0:t.createColumnFunctionCallbackParams(this.rowNode);n=!!a&&i(ss(ss({},s),a))}else n=null!=i&&i;if(null===(o=this.column)||void 0===o?void 0:o.getColDef().showDisabledCheckboxes)return this.eCheckbox.setDisabled(!n),this.setVisible(!0),void this.setDisplayed(!0);(null===(r=this.overrides)||void 0===r?void 0:r.removeHidden)?this.setDisplayed(n):this.setVisible(n)},t.prototype.getIsVisible=function(){var e,t;return this.overrides?this.overrides.isVisible:null===(t=null===(e=this.column)||void 0===e?void 0:e.getColDef())||void 0===t?void 0:t.checkboxSelection},as([vn("eCheckbox")],t.prototype,"eCheckbox",void 0),as([B],t.prototype,"postConstruct",null),t}(mn),us=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),ps=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},cs=function(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],r=0;if(o)return o.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(e){e[e.ToolPanel=0]="ToolPanel",e[e.HeaderCell=1]="HeaderCell",e[e.RowDrag=2]="RowDrag",e[e.ChartPanel=3]="ChartPanel"}(ts||(ts={})),function(e){e[e.Up=0]="Up",e[e.Down=1]="Down"}(os||(os={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(rs||(rs={}));var ds,hs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dragSourceAndParamsList=[],t.dropTargets=[],t}var o;return us(t,e),o=t,t.prototype.init=function(){this.ePinnedIcon=Vr("columnMovePin",this.gridOptionsWrapper,null),this.eHideIcon=Vr("columnMoveHide",this.gridOptionsWrapper,null),this.eMoveIcon=Vr("columnMoveMove",this.gridOptionsWrapper,null),this.eLeftIcon=Vr("columnMoveLeft",this.gridOptionsWrapper,null),this.eRightIcon=Vr("columnMoveRight",this.gridOptionsWrapper,null),this.eGroupIcon=Vr("columnMoveGroup",this.gridOptionsWrapper,null),this.eAggregateIcon=Vr("columnMoveValue",this.gridOptionsWrapper,null),this.ePivotIcon=Vr("columnMovePivot",this.gridOptionsWrapper,null),this.eDropNotAllowedIcon=Vr("dropNotAllowed",this.gridOptionsWrapper,null)},t.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)},t.prototype.removeDragSource=function(e){var t=this.dragSourceAndParamsList.find((function(t){return t.dragSource===e}));t&&(this.dragService.removeDragSource(t.params),ce(this.dragSourceAndParamsList,t))},t.prototype.clearDragSourceParamsList=function(){var e=this;this.dragSourceAndParamsList.forEach((function(t){return e.dragService.removeDragSource(t.params)})),this.dragSourceAndParamsList.length=0},t.prototype.nudge=function(){this.dragging&&this.onDragging(this.eventLastTime,!0)},t.prototype.onDragStart=function(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=this.dragSource.getDragItem(),this.lastDropTarget=this.dragSource.dragSourceDropTarget,this.dragSource.onDragStarted&&this.dragSource.onDragStarted(),this.createGhost()},t.prototype.onDragStop=function(e){if(this.eventLastTime=null,this.dragging=!1,this.dragSource.onDragStopped&&this.dragSource.onDragStopped(),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()},t.prototype.onDragging=function(e,t){var o,r,n,i,s=this,a=this.getHorizontalDirection(e),l=this.getVerticalDirection(e);this.eventLastTime=e,this.positionGhost(e);var u=this.dropTargets.filter((function(t){return s.isMouseOnDropTarget(e,t)})),p=this.findCurrentDropTarget(e,u);if(p!==this.lastDropTarget)this.leaveLastTargetIfExists(e,a,l,t),null!==this.lastDropTarget&&null===p&&(null===(r=(o=this.dragSource).onGridExit)||void 0===r||r.call(o,this.dragItem)),null===this.lastDropTarget&&null!==p&&(null===(i=(n=this.dragSource).onGridEnter)||void 0===i||i.call(n,this.dragItem)),this.enterDragTargetIfExists(p,e,a,l,t),this.lastDropTarget=p;else if(p&&p.onDragging){var c=this.createDropTargetEvent(p,e,a,l,t);p.onDragging(c)}},t.prototype.getAllContainersFromDropTarget=function(e){var t=e.getSecondaryContainers?e.getSecondaryContainers():null,o=[[e.getContainer()]];return t?o.concat(t):o},t.prototype.allContainersIntersect=function(e,t){var o,r;try{for(var n=cs(t),i=n.next();!i.done;i=n.next()){var s=i.value.getBoundingClientRect();if(0===s.width||0===s.height)return!1;var a=e.clientX>=s.left&&e.clientX<s.right,l=e.clientY>=s.top&&e.clientY<s.bottom;if(!a||!l)return!1}}catch(e){o={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return!0},t.prototype.isMouseOnDropTarget=function(e,t){var o,r,n=this.getAllContainersFromDropTarget(t),i=!1;try{for(var s=cs(n),a=s.next();!a.done;a=s.next()){var l=a.value;if(this.allContainersIntersect(e,l)){i=!0;break}}}catch(e){o={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return!(t.targetContainsSource&&!t.getContainer().contains(this.dragSource.eElement))&&i&&t.isInterestedIn(this.dragSource.type,this.dragSource.eElement)},t.prototype.findCurrentDropTarget=function(e,t){var o,r,n,i,s=t.length;if(0===s)return null;if(1===s)return t[0];var a=this.gridOptionsWrapper.getDocument().elementsFromPoint(e.clientX,e.clientY);try{for(var l=cs(a),u=l.next();!u.done;u=l.next()){var p=u.value;try{for(var c=(n=void 0,cs(t)),d=c.next();!d.done;d=c.next()){var h=d.value;if(-1!==me(this.getAllContainersFromDropTarget(h)).indexOf(p))return h}}catch(e){n={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}}}catch(e){o={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(o)throw o.error}}return null},t.prototype.enterDragTargetIfExists=function(e,t,o,r,n){if(e){if(e.onDragEnter){var i=this.createDropTargetEvent(e,t,o,r,n);e.onDragEnter(i)}this.setGhostIcon(e.getIconName?e.getIconName():null)}},t.prototype.leaveLastTargetIfExists=function(e,t,o,r){if(this.lastDropTarget){if(this.lastDropTarget.onDragLeave){var n=this.createDropTargetEvent(this.lastDropTarget,e,t,o,r);this.lastDropTarget.onDragLeave(n)}this.setGhostIcon(null)}},t.prototype.addDropTarget=function(e){this.dropTargets.push(e)},t.prototype.removeDropTarget=function(e){this.dropTargets=this.dropTargets.filter((function(t){return t.getContainer()!==e.getContainer()}))},t.prototype.hasExternalDropZones=function(){return this.dropTargets.some((function(e){return e.external}))},t.prototype.findExternalZone=function(e){return this.dropTargets.filter((function(e){return e.external})).find((function(t){return t.getContainer()===e.getContainer()}))||null},t.prototype.getHorizontalDirection=function(e){var t=this.eventLastTime&&this.eventLastTime.clientX,o=e.clientX;return t===o?null:t>o?rs.Left:rs.Right},t.prototype.getVerticalDirection=function(e){var t=this.eventLastTime&&this.eventLastTime.clientY,o=e.clientY;return t===o?null:t>o?os.Up:os.Down},t.prototype.createDropTargetEvent=function(e,t,o,r,n){var i=e.getContainer(),s=i.getBoundingClientRect(),a=this,l=a.gridApi,u=a.columnApi,p=a.dragItem,c=a.dragSource;return{event:t,x:t.clientX-s.left,y:t.clientY-s.top,vDirection:r,hDirection:o,dragSource:c,fromNudge:n,dragItem:p,api:l,columnApi:u,dropZoneTarget:i}},t.prototype.positionGhost=function(e){var t=this.eGhost;if(t){var o=t.getBoundingClientRect().height,r=Nt()-2,n=xt()-2,i=e.pageY-o/2,s=e.pageX-10,a=this.gridOptionsWrapper.getDocument(),l=a.defaultView||window,u=l.pageYOffset||a.documentElement.scrollTop,p=l.pageXOffset||a.documentElement.scrollLeft;r>0&&s+t.clientWidth>r+p&&(s=r+p-t.clientWidth),s<0&&(s=0),n>0&&i+t.clientHeight>n+u&&(i=n+u-t.clientHeight),i<0&&(i=0),t.style.left=s+"px",t.style.top=i+"px"}},t.prototype.removeGhost=function(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null},t.prototype.createGhost=function(){this.eGhost=Lo(o.GHOST_TEMPLATE),this.mouseEventService.stampTopLevelGridCompWithGridInstance(this.eGhost);var e=this.environment.getTheme().theme;e&&this.eGhost.classList.add(e),this.eGhostIcon=this.eGhost.querySelector(".ag-dnd-ghost-icon"),this.setGhostIcon(null);var t=this.eGhost.querySelector(".ag-dnd-ghost-label"),r=this.dragSource.dragItemName;D(r)&&(r=r()),t.innerHTML=$e(r)||"",this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";var n=this.gridOptionsWrapper.getDocument(),i=null;try{i=n.fullscreenElement}catch(e){}finally{i||(i=n.querySelector("body"))}this.eGhostParent=i,this.eGhostParent?this.eGhostParent.appendChild(this.eGhost):console.warn("AG Grid: could not find document body, it is needed for dragging columns")},t.prototype.setGhostIcon=function(e,t){void 0===t&&(t=!1),No(this.eGhostIcon);var r=null;switch(e||(e=this.dragSource.defaultIconName||o.ICON_NOT_ALLOWED),e){case o.ICON_PINNED:r=this.ePinnedIcon;break;case o.ICON_MOVE:r=this.eMoveIcon;break;case o.ICON_LEFT:r=this.eLeftIcon;break;case o.ICON_RIGHT:r=this.eRightIcon;break;case o.ICON_GROUP:r=this.eGroupIcon;break;case o.ICON_AGGREGATE:r=this.eAggregateIcon;break;case o.ICON_PIVOT:r=this.ePivotIcon;break;case o.ICON_NOT_ALLOWED:r=this.eDropNotAllowedIcon;break;case o.ICON_HIDE:r=this.eHideIcon}this.eGhostIcon.classList.toggle("ag-shake-left-to-right",t),r===this.eHideIcon&&this.gridOptionsWrapper.isSuppressDragLeaveHidesColumns()||r&&this.eGhostIcon.appendChild(r)},t.ICON_PINNED="pinned",t.ICON_MOVE="move",t.ICON_LEFT="left",t.ICON_RIGHT="right",t.ICON_GROUP="group",t.ICON_AGGREGATE="aggregate",t.ICON_PIVOT="pivot",t.ICON_NOT_ALLOWED="notAllowed",t.ICON_HIDE="hide",t.GHOST_TEMPLATE='<div class="ag-dnd-ghost ag-unselectable">\n <span class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>\n <div class="ag-dnd-ghost-label"></div>\n </div>',ps([z("dragService")],t.prototype,"dragService",void 0),ps([z("mouseEventService")],t.prototype,"mouseEventService",void 0),ps([z("environment")],t.prototype,"environment",void 0),ps([z("columnApi")],t.prototype,"columnApi",void 0),ps([z("gridApi")],t.prototype,"gridApi",void 0),ps([B],t.prototype,"init",null),ps([U],t.prototype,"clearDragSourceParamsList",null),o=ps([Y("dragAndDropService")],t)}(Ge),fs=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),gs=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ms=function(e){function t(t,o,r,n,i,s){var a=e.call(this)||this;return a.cellValueFn=t,a.rowNode=o,a.column=r,a.customGui=n,a.dragStartPixels=i,a.suppressVisibilityChange=s,a.dragSource=null,a}return fs(t,e),t.prototype.isCustomGui=function(){return null!=this.customGui},t.prototype.postConstruct=function(){if(this.customGui?this.setDragElement(this.customGui,this.dragStartPixels):(this.setTemplate('<div class="ag-drag-handle ag-row-drag" aria-hidden="true"></div>'),this.getGui().appendChild(Hr("rowDrag",this.beans.gridOptionsWrapper,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){var e=this.beans.gridOptionsWrapper.isRowDragManaged()?new Cs(this,this.beans,this.rowNode,this.column):new vs(this,this.beans,this.rowNode,this.column);this.createManagedBean(e,this.beans.context)}},t.prototype.setDragElement=function(e,t){this.setTemplateFromElement(e),this.addDragSource(t)},t.prototype.getSelectedNodes=function(){if(!this.beans.gridOptionsWrapper.isRowDragMultiRow())return[this.rowNode];var e=this.beans.selectionService.getSelectedNodes();return-1!==e.indexOf(this.rowNode)?e:[this.rowNode]},t.prototype.checkCompatibility=function(){var e=this.beans.gridOptionsWrapper.isRowDragManaged();this.beans.gridOptionsWrapper.isTreeData()&&e&&T((function(){return console.warn("AG Grid: If using row drag with tree data, you cannot have rowDragManaged=true")}),"RowDragComp.managedAndTreeData")},t.prototype.getDragItem=function(){return{rowNode:this.rowNode,rowNodes:this.getSelectedNodes(),columns:this.column?[this.column]:void 0,defaultTextValue:this.cellValueFn()}},t.prototype.addDragSource=function(e){var t=this;void 0===e&&(e=4),this.dragSource&&this.removeDragSource();var o=this.gridOptionsWrapper.getRowDragText(this.column),r=this.gridOptionsWrapper.getLocaleTextFunc();this.dragSource={type:ts.RowDrag,eElement:this.getGui(),dragItemName:function(){var e,n=t.getDragItem(),i=(null===(e=n.rowNodes)||void 0===e?void 0:e.length)||1;return o?o(n,i):1===i?t.cellValueFn():i+" "+r("rowDragRows","rows")},getDragItem:function(){return t.getDragItem()},dragStartPixels:e,dragSourceDomDataKey:this.beans.gridOptionsWrapper.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0)},t.prototype.removeDragSource=function(){this.dragSource&&this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null},gs([z("beans")],t.prototype,"beans",void 0),gs([B],t.prototype,"postConstruct",null),gs([U],t.prototype,"removeDragSource",null),t}(mn),ys=function(e){function t(t,o,r){var n=e.call(this)||this;return n.parent=t,n.rowNode=o,n.column=r,n}return fs(t,e),t.prototype.setDisplayedOrVisible=function(e){if(e)this.parent.setDisplayed(!1);else{var t=!0,o=!1;this.column&&(t=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),o=D(this.column.getColDef().rowDrag)),o?(this.parent.setDisplayed(!0),this.parent.setVisible(t)):(this.parent.setDisplayed(t),this.parent.setVisible(!0))}},t}(Ge),vs=function(e){function t(t,o,r,n){var i=e.call(this,t,r,n)||this;return i.beans=o,i}return fs(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.beans.gridOptionsWrapper,"suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.addManagedListener(this.rowNode,ns.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,ns.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,ns.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,We.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.workOutVisibility()},t.prototype.onSuppressRowDrag=function(){this.workOutVisibility()},t.prototype.workOutVisibility=function(){var e=this.beans.gridOptionsWrapper.isSuppressRowDrag();this.setDisplayedOrVisible(e)},gs([B],t.prototype,"postConstruct",null),t}(ys),Cs=function(e){function t(t,o,r,n){var i=e.call(this,t,r,n)||this;return i.beans=o,i}return fs(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.beans.eventService,We.EVENT_SORT_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,We.EVENT_FILTER_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,We.EVENT_COLUMN_ROW_GROUP_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,We.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,ns.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,ns.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.gridOptionsWrapper,"suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()},t.prototype.onSuppressRowDrag=function(){this.workOutVisibility()},t.prototype.workOutVisibility=function(){var e=this.beans.ctrlsService.getGridBodyCtrl().getRowDragFeature(),t=e&&e.shouldPreventRowMove(),o=this.beans.gridOptionsWrapper.isSuppressRowDrag(),r=this.beans.dragAndDropService.hasExternalDropZones(),n=t&&!r||o;this.setDisplayedOrVisible(n)},gs([B],t.prototype,"postConstruct",null),t}(ys),ws=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Es=function(){return Es=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},Es.apply(this,arguments)},_s=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Ss=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ws(t,e),t.prototype.init=function(e,t,o,r,n,i,s){this.params=s,this.eGui=t,this.eCheckbox=o,this.eExpanded=r,this.eContracted=n,this.comp=e,this.compClass=i;var a=this.isTopLevelFooter(),l=this.isEmbeddedRowMismatch(),u=null==s.value,p=!1;if(this.gridOptionsWrapper.isGroupIncludeFooter()&&this.gridOptionsWrapper.isGroupHideOpenParents()){var c=s.node;c.footer&&(p=(s.colDef&&s.colDef.showRowGroup)!==(c.rowGroupColumn&&c.rowGroupColumn.getColId()))}this.cellIsBlank=!a&&(l||u||p),this.cellIsBlank||(this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),this.addFullWidthRowDraggerIfNeeded(),this.addExpandAndContract(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent(),this.refreshAriaExpanded())},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.expandListener=null},t.prototype.refreshAriaExpanded=function(){var e=this.params,t=e.node,o=e.eParentOfValue;if(this.expandListener&&(this.expandListener=this.expandListener()),this.isExpandable()){var r=function(){yr(o,!!t.expanded)};this.expandListener=this.addManagedListener(t,ns.EVENT_EXPANDED_CHANGED,r)||null,r()}else vr(o)},t.prototype.isTopLevelFooter=function(){if(!this.gridOptionsWrapper.isGroupIncludeTotalFooter())return!1;if(null!=this.params.value||-1!=this.params.node.level)return!1;var e=this.params.colDef;if(null==e)return!0;if(!0===e.showRowGroup)return!0;var t=this.columnModel.getRowGroupColumns();return!t||0===t.length||t[0].getId()===e.showRowGroup},t.prototype.isEmbeddedRowMismatch=function(){if(!this.params.fullWidth||!this.gridOptionsWrapper.isEmbedFullWidthRows())return!1;var e=this.params.pinned===oe.PINNED_LEFT,t=this.params.pinned===oe.PINNED_RIGHT,o=!e&&!t;return this.gridOptionsWrapper.isEnableRtl()?this.columnModel.isPinningLeft()?!t:!o:this.columnModel.isPinningLeft()?!e:!o},t.prototype.findDisplayedGroupNode=function(){var e=this.params.column,t=this.params.node;if(this.showingValueForOpenedParent)for(var o=t.parent;null!=o;){if(o.rowGroupColumn&&e.isRowGroupDisplayed(o.rowGroupColumn.getId())){this.displayedGroupNode=o;break}o=o.parent}i(this.displayedGroupNode)&&(this.displayedGroupNode=t)},t.prototype.setupShowingValueForOpenedParent=function(){var e=this.params.node,t=this.params.column;if(this.gridOptionsWrapper.isGroupHideOpenParents())if(e.groupData){if(null!=e.rowGroupColumn){var o=e.rowGroupColumn.getId();if(t.isRowGroupDisplayed(o))return void(this.showingValueForOpenedParent=!1)}var r=null!=e.groupData[t.getId()];this.showingValueForOpenedParent=r}else this.showingValueForOpenedParent=!1;else this.showingValueForOpenedParent=!1},t.prototype.addValueElement=function(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount())},t.prototype.addGroupValue=function(){var e=this.adjustParamsWithDetailsFromRelatedColumn(),t=this.getInnerCompDetails(e),o=e.valueFormatted,r=e.value,n=null!=o?o:r;this.comp.setInnerRenderer(t,n)},t.prototype.adjustParamsWithDetailsFromRelatedColumn=function(){var e=this.displayedGroupNode.rowGroupColumn,t=this.params.column;if(!e)return this.params;if(null!=t&&!t.isRowGroupDisplayed(e.getId()))return this.params;var o=this.params,r=this.params,n=r.value,i=r.node,s=this.valueFormatterService.formatValue(e,i,n);return Es(Es({},o),{valueFormatted:s})},t.prototype.addFooterValue=function(){var e=this.params.footerValueGetter,t="";if(e){var o=g(this.params);o.value=this.params.value,"function"==typeof e?t=e(o):"string"==typeof e?t=this.expressionService.evaluate(e,o):console.warn("AG Grid: footerValueGetter should be either a function or a string (expression)")}else t="Total "+(null!=this.params.value?this.params.value:"");var r=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(r,t)},t.prototype.getInnerCompDetails=function(e){var t=this;if(e.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gridOptions.groupRowRendererParams,e);var o=this.userComponentFactory.getInnerRendererDetails(e,e),r=function(e){return e&&e.componentClass==t.compClass};if(o&&!r(o))return o;var n=this.displayedGroupNode.rowGroupColumn,i=n?n.getColDef():void 0;if(i){var s=this.userComponentFactory.getCellRendererDetails(i,e);if(s&&!r(s))return s;if(r(s)&&i.cellRendererParams&&i.cellRendererParams.innerRenderer)return this.userComponentFactory.getInnerRendererDetails(i.cellRendererParams,e)}},t.prototype.addChildCount=function(){this.params.suppressCount||(this.addManagedListener(this.displayedGroupNode,ns.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.updateChildCount.bind(this)),this.updateChildCount())},t.prototype.updateChildCount=function(){var e=this.displayedGroupNode.allChildrenCount,t=this.isShowRowGroupForThisRow()&&null!=e&&e>=0?"("+e+")":"";this.comp.setChildCount(t)},t.prototype.isShowRowGroupForThisRow=function(){if(this.gridOptionsWrapper.isTreeData())return!0;var e=this.displayedGroupNode.rowGroupColumn;if(!e)return!1;var t=this.params.column;return null==t||t.isRowGroupDisplayed(e.getId())},t.prototype.addExpandAndContract=function(){var e=this.params,t=Hr("groupExpanded",this.gridOptionsWrapper,null),o=Hr("groupContracted",this.gridOptionsWrapper,null);t&&this.eExpanded.appendChild(t),o&&this.eContracted.appendChild(o);var r=e.eGridCell;this.gridOptionsWrapper.isEnableGroupEdit()||!this.isExpandable()||e.suppressDoubleClickExpand||this.addManagedListener(r,"dblclick",this.onCellDblClicked.bind(this)),this.addManagedListener(this.eExpanded,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eContracted,"click",this.onExpandClicked.bind(this)),this.addManagedListener(r,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(e.node,ns.EVENT_EXPANDED_CHANGED,this.showExpandAndContractIcons.bind(this)),this.showExpandAndContractIcons();var n=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListener(this.displayedGroupNode,ns.EVENT_ALL_CHILDREN_COUNT_CHANGED,n),this.addManagedListener(this.displayedGroupNode,ns.EVENT_MASTER_CHANGED,n),this.addManagedListener(this.displayedGroupNode,ns.EVENT_GROUP_CHANGED,n),this.addManagedListener(this.displayedGroupNode,ns.EVENT_HAS_CHILDREN_CHANGED,n)},t.prototype.onExpandClicked=function(e){Oe(e)||(be(e),this.onExpandOrContract(e))},t.prototype.onExpandOrContract=function(e){var t=this.displayedGroupNode,o=!t.expanded;!o&&t.sticky&&this.scrollToStickyNode(t),t.setExpanded(o,e)},t.prototype.scrollToStickyNode=function(e){this.ctrlsService.getGridBodyCtrl().getScrollFeature().setVerticalScrollPosition(e.rowTop-e.stickyRowTop)},t.prototype.isExpandable=function(){if(this.showingValueForOpenedParent)return!0;var e=this.displayedGroupNode,t=this.columnModel.isPivotMode()&&e.leafGroup;if(!e.isExpandable()||e.footer||t)return!1;var o=this.params.column;return null==o||"string"!=typeof o.getColDef().showRowGroup||this.isShowRowGroupForThisRow()},t.prototype.showExpandAndContractIcons=function(){var e=this,t=e.params,o=e.displayedGroupNode,r=e.columnModel,n=t.node,i=this.isExpandable();if(i){var s=!!this.showingValueForOpenedParent||n.expanded;this.comp.setExpandedDisplayed(s),this.comp.setContractedDisplayed(!s)}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);var a=r.isPivotMode(),l=a&&o.leafGroup,u=i&&!l,p=n.footer&&-1===n.level;this.comp.addOrRemoveCssClass("ag-cell-expandable",u),this.comp.addOrRemoveCssClass("ag-row-group",u),a?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",l):p||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!u)},t.prototype.onRowNodeIsExpandableChanged=function(){this.showExpandAndContractIcons(),this.setIndent(),this.refreshAriaExpanded()},t.prototype.setupIndent=function(){var e=this.params.node;this.params.suppressPadding||(this.addManagedListener(e,ns.EVENT_UI_LEVEL_CHANGED,this.setIndent.bind(this)),this.setIndent())},t.prototype.setIndent=function(){if(!this.gridOptionsWrapper.isGroupHideOpenParents()){var e=this.params,t=e.node,o=!!e.colDef,r=this.gridOptionsWrapper.isTreeData(),n=!o||r||!0===e.colDef.showRowGroup?t.uiLevel:0;e.padding>=0&&T((function(){return console.warn("AG Grid: cellRendererParams.padding no longer works, it was deprecated in since v14.2 and removed in v26, 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"),this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+n,this.comp.addOrRemoveCssClass(this.indentClass,!0)}},t.prototype.addFullWidthRowDraggerIfNeeded=function(){var e=this;if(this.params.fullWidth&&this.params.rowDrag){var t=new ms((function(){return e.params.value}),this.params.node);this.createManagedBean(t,this.context),this.eGui.insertAdjacentElement("afterbegin",t.getGui())}},t.prototype.isUserWantsSelected=function(){var e=this.params.checkbox;return"function"==typeof e||!0===e},t.prototype.addCheckboxIfNeeded=function(){var e=this,t=this.displayedGroupNode,o=this.isUserWantsSelected()&&!t.footer&&!t.rowPinned&&!t.detail;if(o){var r=new ls;this.getContext().createBean(r),r.init({rowNode:t,column:this.params.column,overrides:{isVisible:this.params.checkbox,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(r.getGui()),this.addDestroyFunc((function(){return e.getContext().destroyBean(r)}))}this.comp.setCheckboxVisible(o)},t.prototype.onKeyDown=function(e){e.key!==jr.ENTER||this.params.suppressEnterExpand||this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(e)},t.prototype.onCellDblClicked=function(e){Oe(e)||De(this.eExpanded,e)||De(this.eContracted,e)||this.onExpandOrContract(e)},_s([z("expressionService")],t.prototype,"expressionService",void 0),_s([z("valueFormatterService")],t.prototype,"valueFormatterService",void 0),_s([z("columnModel")],t.prototype,"columnModel",void 0),_s([z("userComponentFactory")],t.prototype,"userComponentFactory",void 0),_s([z("gridOptions")],t.prototype,"gridOptions",void 0),_s([z("ctrlsService")],t.prototype,"ctrlsService",void 0),t}(Ge),Rs=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),bs=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Os=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return Rs(t,e),t.prototype.init=function(e){var t=this,o={setInnerRenderer:function(e,o){return t.setRenderDetails(e,o)},setChildCount:function(e){return t.eChildCount.innerHTML=e},addOrRemoveCssClass:function(e,o){return t.addOrRemoveCssClass(e,o)},setContractedDisplayed:function(e){return wo(t.eContracted,e)},setExpandedDisplayed:function(e){return wo(t.eExpanded,e)},setCheckboxVisible:function(e){return t.eCheckbox.classList.toggle("ag-invisible",!e)}},r=this.createManagedBean(new Ss),n=!e.colDef,i=this.getGui();r.init(o,i,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,e),n&&sr(i,"gridcell")},t.prototype.setRenderDetails=function(e,t){var o=this;if(e){var r=e.newAgStackInstance();if(!r)return;r.then((function(e){if(e){var t=function(){return o.context.destroyBean(e)};o.isAlive()?(o.eValue.appendChild(e.getGui()),o.addDestroyFunc(t)):t()}}))}else this.eValue.innerText=t},t.prototype.destroy=function(){this.getContext().destroyBean(this.innerCellRenderer),e.prototype.destroy.call(this)},t.prototype.refresh=function(){return!1},t.TEMPLATE='<span class="ag-cell-wrapper">\n <span class="ag-group-expanded" ref="eExpanded"></span>\n <span class="ag-group-contracted" ref="eContracted"></span>\n <span class="ag-group-checkbox ag-invisible" ref="eCheckbox"></span>\n <span class="ag-group-value" ref="eValue"></span>\n <span class="ag-group-child-count" ref="eChildCount"></span>\n </span>',bs([vn("eExpanded")],t.prototype,"eExpanded",void 0),bs([vn("eContracted")],t.prototype,"eContracted",void 0),bs([vn("eCheckbox")],t.prototype,"eCheckbox",void 0),bs([vn("eValue")],t.prototype,"eValue",void 0),bs([vn("eChildCount")],t.prototype,"eChildCount",void 0),t}(mn),Ps=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Ts=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},As=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return Ps(t,e),t.prototype.init=function(e){e.node.failedLoad?this.setupFailed():this.setupLoading()},t.prototype.setupFailed=function(){var e=this.gridOptionsWrapper.getLocaleTextFunc();this.eLoadingText.innerText=e("loadingError","ERR")},t.prototype.setupLoading=function(){var e=Hr("groupLoading",this.gridOptionsWrapper,null);e&&this.eLoadingIcon.appendChild(e);var t=this.gridOptionsWrapper.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingOoo","Loading")},t.prototype.refresh=function(e){return!1},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-loading">\n <span class="ag-loading-icon" ref="eLoadingIcon"></span>\n <span class="ag-loading-text" ref="eLoadingText"></span>\n </div>',Ts([vn("eLoadingIcon")],t.prototype,"eLoadingIcon",void 0),Ts([vn("eLoadingText")],t.prototype,"eLoadingText",void 0),t}(mn),Ds=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Is=function(e){function t(){return e.call(this)||this}return Ds(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){var o=this.gridOptionsWrapper.getOverlayLoadingTemplate()?this.gridOptionsWrapper.getOverlayLoadingTemplate():t.DEFAULT_LOADING_OVERLAY_TEMPLATE,r=this.gridOptionsWrapper.getLocaleTextFunc(),n=o.replace("[LOADING...]",r("loadingOoo","Loading..."));this.setTemplate(n)},t.DEFAULT_LOADING_OVERLAY_TEMPLATE='<span class="ag-overlay-loading-center">[LOADING...]</span>',t}(mn),Ns=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),xs=function(e){function t(){return e.call(this)||this}return Ns(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){var o=this.gridOptionsWrapper.getOverlayNoRowsTemplate()?this.gridOptionsWrapper.getOverlayNoRowsTemplate():t.DEFAULT_NO_ROWS_TEMPLATE,r=this.gridOptionsWrapper.getLocaleTextFunc(),n=o.replace("[NO_ROWS_TO_SHOW]",r("noRowsToShow","No Rows To Show"));this.setTemplate(n)},t.DEFAULT_NO_ROWS_TEMPLATE='<span class="ag-overlay-no-rows-center">[NO_ROWS_TO_SHOW]</span>',t}(mn),Ms=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Ls=function(e){function t(){return e.call(this,'<div class="ag-tooltip"></div>')||this}return Ms(t,e),t.prototype.init=function(e){var t=e.value;this.getGui().innerHTML=$e(t)},t}(Vi),Fs=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Gs=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ks=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.agGridDefaults={agDateInput:hi,agColumnHeader:Mi,agColumnGroupHeader:Gi,agSortIndicator:Ii,agTextColumnFloatingFilter:Pi,agNumberColumnFloatingFilter:bi,agDateColumnFloatingFilter:ci,agReadOnlyFloatingFilter:Sn,agAnimateShowChangeCellRenderer:Qi,agAnimateSlideCellRenderer:es,agGroupCellRenderer:Os,agGroupRowRenderer:Os,agLoadingCellRenderer:As,agCellEditor:$i,agTextCellEditor:$i,agSelectCellEditor:Ui,agPopupTextCellEditor:Zi,agPopupSelectCellEditor:zi,agLargeTextCellEditor:Wi,agTextColumnFilter:wi,agNumberColumnFilter:mi,agDateColumnFilter:si,agLoadingOverlay:Is,agNoRowsOverlay:xs,agTooltipComponent:Ls},t.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"}},t.jsComps={},t.fwComps={},t}return Fs(t,e),t.prototype.init=function(){var e=this;null!=this.gridOptions.components&&f(this.gridOptions.components,(function(t,o){return e.registerJsComponent(t,o)})),null!=this.gridOptions.frameworkComponents&&f(this.gridOptions.frameworkComponents,(function(t,o){return e.registerFwComponent(t,o)}))},t.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},t.prototype.registerJsComponent=function(e,t){var o=this.translateIfDeprecated(e);this.fwComps[o]?console.error("Trying to register a component that you have already registered for frameworks: "+o):this.jsComps[o]=t},t.prototype.registerFwComponent=function(e,t){T((function(){return console.warn("AG Grid: As of v27, registering components via grid property frameworkComponents is deprecated. Instead register both JavaScript AND Framework Components via the components property.")}),"UserComponentRegistry.frameworkComponentsDeprecated");var o=this.translateIfDeprecated(e);this.fwComps[o]=t},t.prototype.retrieve=function(e){var t=this.translateIfDeprecated(e),o=function(e,t){return{componentFromFramework:t,component:e}},r=this.getFrameworkOverrides().frameworkComponent(t,this.gridOptions.components);if(null!=r)return o(r,!0);var n=this.fwComps[t];if(n)return o(n,!0);var i=this.jsComps[t];if(i)return o(i,this.getFrameworkOverrides().isFrameworkComponent(i));var s=this.agGridDefaults[t];return s?o(s,!1):(Object.keys(this.agGridDefaults).indexOf(t)<0&&console.warn("AG Grid: Looking for component ["+t+"] but it wasn't found."),null)},t.prototype.translateIfDeprecated=function(e){var t=this.agDeprecatedNames[e];return null!=t?(T((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},Gs([z("gridOptions")],t.prototype,"gridOptions",void 0),Gs([z("agComponentUtils")],t.prototype,"agComponentUtils",void 0),Gs([B],t.prototype,"init",null),Gs([Y("userComponentRegistry")],t)}(Ge),Vs={propertyName:"dateComponent",cellRenderer:!1},Hs={propertyName:"headerComponent",cellRenderer:!1},Ws={propertyName:"headerGroupComponent",cellRenderer:!1},js={propertyName:"cellRenderer",cellRenderer:!0},Bs={propertyName:"cellEditor",cellRenderer:!1},Us={propertyName:"innerRenderer",cellRenderer:!0},Ys={propertyName:"loadingOverlayComponent",cellRenderer:!1},zs={propertyName:"noRowsOverlayComponent",cellRenderer:!1},Ks={propertyName:"tooltipComponent",cellRenderer:!1},$s={propertyName:"filter",cellRenderer:!1},qs={propertyName:"floatingFilterComponent",cellRenderer:!1},Zs={propertyName:"toolPanel",cellRenderer:!1},Xs={propertyName:"statusPanel",cellRenderer:!1},Qs={propertyName:"fullWidthCellRenderer",cellRenderer:!0},Js={propertyName:"loadingCellRenderer",cellRenderer:!0},ea={propertyName:"groupRowRenderer",cellRenderer:!0},ta={propertyName:"detailCellRenderer",cellRenderer:!0},oa=function(){function e(){}return e.getFloatingFilterType=function(e){return this.filterToFloatingFilterMapping[e]},e.filterToFloatingFilterMapping={set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",multi:"agMultiColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"},e}(),ra=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),na=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ia=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ra(t,e),t.prototype.getHeaderCompDetails=function(e,t){return this.getCompDetails(e,Hs,"agColumnHeader",t)},t.prototype.getHeaderGroupCompDetails=function(e){var t=e.columnGroup.getColGroupDef();return this.getCompDetails(t,Ws,"agColumnGroupHeader",e)},t.prototype.getFullWidthCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Qs,null,e,!0)},t.prototype.getFullWidthLoadingCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Js,"agLoadingCellRenderer",e,!0)},t.prototype.getFullWidthGroupCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,ea,"agGroupRowRenderer",e,!0)},t.prototype.getFullWidthDetailCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,ta,"agDetailCellRenderer",e,!0)},t.prototype.getInnerRendererDetails=function(e,t){return this.getCompDetails(e,Us,null,t)},t.prototype.getFullWidthGroupRowInnerCellRenderer=function(e,t){return this.getCompDetails(e,Us,null,t)},t.prototype.getCellRendererDetails=function(e,t){return this.getCompDetails(e,js,null,t)},t.prototype.getCellEditorDetails=function(e,t){return this.getCompDetails(e,Bs,"agCellEditor",t,!0)},t.prototype.getFilterDetails=function(e,t,o){return this.getCompDetails(e,$s,o,t,!0)},t.prototype.getDateCompDetails=function(e){return this.getCompDetails(this.gridOptions,Vs,"agDateInput",e,!0)},t.prototype.getLoadingOverlayCompDetails=function(e){return this.getCompDetails(this.gridOptions,Ys,"agLoadingOverlay",e,!0)},t.prototype.getNoRowsOverlayCompDetails=function(e){return this.getCompDetails(this.gridOptions,zs,"agNoRowsOverlay",e,!0)},t.prototype.getTooltipCompDetails=function(e){return this.getCompDetails(e.colDef,Ks,"agTooltipComponent",e,!0)},t.prototype.getSetFilterCellRendererDetails=function(e,t){return this.getCompDetails(e,js,null,t)},t.prototype.getFloatingFilterCompDetails=function(e,t,o){return this.getCompDetails(e,qs,o,t)},t.prototype.getToolPanelCompDetails=function(e,t){return this.getCompDetails(e,Zs,null,t,!0)},t.prototype.getStatusPanelCompDetails=function(e,t){return this.getCompDetails(e,Xs,null,t,!0)},t.prototype.getCompDetails=function(e,t,o,r,n){var i=this;void 0===n&&(n=!1);var s=t.propertyName,a=t.cellRenderer,l=this.getCompKeys(e,t,r),u=l.compName,p=l.jsComp,c=l.fwComp,d=l.paramsFromSelector,h=l.popupFromSelector,f=l.popupPositionFromSelector,g=function(e){var t=i.userComponentRegistry.retrieve(e);t&&(p=t.componentFromFramework?void 0:t.component,c=t.componentFromFramework?t.component:void 0)};if(null!=u&&g(u),null==p&&null==c&&null!=o&&g(o),p&&a&&!this.agComponentUtils.doesImplementIComponent(p)&&(p=this.agComponentUtils.adaptFunction(s,p)),p||c){var m=this.mergeParamsWithApplicationProvidedParams(e,t,r,d),y=null==p,v=p||c;return{componentFromFramework:y,componentClass:v,params:m,type:t,popupFromSelector:h,popupPositionFromSelector:f,newAgStackInstance:function(){return i.newAgStackInstance(v,y,m,t)}}}n&&console.error("Could not find component "+u+", did you forget to configure this component?")},t.prototype.getCompKeys=function(e,t,o){var r,n,i,s,a,l,u=this,p=t.propertyName;if(e){var c=e,d=c[p+"Selector"],h=d?d(o):null,f=function(e,t){var o=function(){var e="AG Grid: As of v27, the property "+p+"Framework is deprecated. The property "+p+" can now be used for JavaScript AND Framework Components.";T((function(){return console.warn(e)}),"UserComponentFactory."+p+"FrameworkDeprecated")};"string"==typeof e?r=e:"string"==typeof t?(o(),r=t):null!=e&&!0!==e?u.getFrameworkOverrides().isFrameworkComponent(e)?i=e:n=e:null!=t&&(o(),i=t)};if(h){if(null!=h.frameworkComponent){var g="AG Grid: As of v27, the return for "+p+"Selector has attributes [component, params] only. The attribute frameworkComponent is deprecated. You should now return back Framework Components using the 'component' attribute and the grid works out if it's a framework component or not.";T((function(){return console.warn(g)}),"UserComponentFactory."+p+"FrameworkSelectorDeprecated"),f(h.frameworkComponent,void 0)}else f(h.component,void 0);s=h.params,a=h.popup,l=h.popupPosition}else f(c[p],c[p+"Framework"])}return{compName:r,jsComp:n,fwComp:i,paramsFromSelector:s,popupFromSelector:a,popupPositionFromSelector:l}},t.prototype.newAgStackInstance=function(e,t,o,r){var n,i=r.propertyName;if(t){var s=this.componentMetadataProvider.retrieve(i);n=this.frameworkComponentWrapper.wrap(e,s.mandatoryMethodList,s.optionalMethodList,r)}else n=new e;var a=this.initComponent(n,o);return null==a?sn.resolve(n):a.then((function(){return n}))},t.prototype.mergeParamsWithApplicationProvidedParams=function(e,t,o,r){void 0===r&&(r=null);var n={context:this.gridOptionsWrapper.getContext(),columnApi:this.gridOptionsWrapper.getColumnApi(),api:this.gridOptionsWrapper.getApi()};_(n,o);var i=e&&e[t.propertyName+"Params"];return"function"==typeof i?_(n,i(o)):"object"==typeof i&&_(n,i),_(n,r),n},t.prototype.initComponent=function(e,t){if(this.context.createBean(e),null!=e.init)return e.init(t)},t.prototype.getDefaultFloatingFilterType=function(e){if(null==e)return null;var t=null,o=this.getCompKeys(e,$s),r=o.compName,n=o.jsComp,i=o.fwComp;return r?t=oa.getFloatingFilterType(r):null==n&&null==i&&!0===e.filter&&(t=re.isRegistered(X.SetFilterModule)?"agSetColumnFloatingFilter":"agTextColumnFloatingFilter"),t},na([z("gridOptions")],t.prototype,"gridOptions",void 0),na([z("agComponentUtils")],t.prototype,"agComponentUtils",void 0),na([z("componentMetadataProvider")],t.prototype,"componentMetadataProvider",void 0),na([z("userComponentRegistry")],t.prototype,"userComponentRegistry",void 0),na([K("frameworkComponentWrapper")],t.prototype,"frameworkComponentWrapper",void 0),na([Y("userComponentFactory")],t)}(Ge);!function(e){e[e.SINGLE_SHEET=0]="SINGLE_SHEET",e[e.MULTI_SHEET=1]="MULTI_SHEET"}(ds||(ds={}));var sa,aa=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),la=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ua=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dragEndFunctions=[],t.dragSources=[],t}return aa(t,e),t.prototype.init=function(){this.logger=this.loggerFactory.create("DragService")},t.prototype.removeAllListeners=function(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0},t.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})}},t.prototype.removeDragSource=function(e){var t=this.dragSources.find((function(t){return t.dragSource===e}));t&&(this.removeListener(t),ce(this.dragSources,t))},t.prototype.isDragging=function(){return this.dragging},t.prototype.addDragSource=function(e,t){var o=this;void 0===t&&(t=!1);var r=this.onMouseDown.bind(this,e);e.eElement.addEventListener("mousedown",r);var n=null,i=this.gridOptionsWrapper.isSuppressTouch();t&&!i&&(n=function(t){Co(t.target)||(t.cancelable&&t.preventDefault(),o.onTouchStart(e,t))},e.eElement.addEventListener("touchstart",n,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:r,touchStartListener:n,touchEnabled:t})},t.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;var n=function(t){return o.onTouchUp(t,e.eElement)},i=t.target,s=[{target:document,type:"touchmove",listener:function(e){e.cancelable&&e.preventDefault()},options:{passive:!1}},{target:i,type:"touchmove",listener:function(t){return o.onTouchMove(t,e.eElement)},options:{passive:!0}},{target:i,type:"touchend",listener:n,options:{passive:!0}},{target:i,type:"touchcancel",listener:n,options:{passive:!0}}];this.addTemporaryEvents(s),0===e.dragStartPixels&&this.onCommonMove(r,this.touchStart,e.eElement)},t.prototype.onMouseDown=function(e,t){var o=this,r=t;if(!(e.skipMouseEvent&&e.skipMouseEvent(t)||r._alreadyProcessedByDragService||(r._alreadyProcessedByDragService=!0,0!==t.button))){this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t;var n=this.gridOptionsWrapper.getDocument(),i=[{target:n,type:"mousemove",listener:function(t){return o.onMouseMove(t,e.eElement)}},{target:n,type:"mouseup",listener:function(t){return o.onMouseUp(t,e.eElement)}},{target:n,type:"contextmenu",listener:function(e){return e.preventDefault()}}];this.addTemporaryEvents(i),0===e.dragStartPixels&&this.onMouseMove(t,e.eElement)}},t.prototype.addTemporaryEvents=function(e){e.forEach((function(e){var t=e.target,o=e.type,r=e.listener,n=e.options;t.addEventListener(o,r,n)})),this.dragEndFunctions.push((function(){e.forEach((function(e){var t=e.target,o=e.type,r=e.listener,n=e.options;t.removeEventListener(o,r,n)}))}))},t.prototype.isEventNearStartEvent=function(e,t){var o=this.currentDragParams.dragStartPixels;return qr(e,t,n(o)?o:4)},t.prototype.getFirstActiveTouch=function(e){for(var t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null},t.prototype.onCommonMove=function(e,t,o){if(!this.dragging){if(!this.dragging&&this.isEventNearStartEvent(e,t))return;this.dragging=!0;var r={type:We.EVENT_DRAG_STARTED,target:o};this.eventService.dispatchEvent(r),this.currentDragParams.onDragStart(t),this.currentDragParams.onDragging(t)}this.currentDragParams.onDragging(e)},t.prototype.onTouchMove=function(e,t){var o=this.getFirstActiveTouch(e.touches);o&&this.onCommonMove(o,this.touchStart,t)},t.prototype.onMouseMove=function(e,t){(this.gridOptionsWrapper.isEnableCellTextSelect()||Et())&&"mousemove"===e.type&&e.cancelable&&this.mouseEventService.isEventFromThisGrid(e)&&!this.isOverFormFieldElement(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)},t.prototype.isOverFormFieldElement=function(e){var t,o;return!!(null===(o=null===(t=e.target)||void 0===t?void 0:t.tagName.toLocaleLowerCase())||void 0===o?void 0:o.match("^a$|textarea|input|select|button"))},t.prototype.onTouchUp=function(e,t){var o=this.getFirstActiveTouch(e.changedTouches);o||(o=this.touchLastTime),this.onUpCommon(o,t)},t.prototype.onMouseUp=function(e,t){this.onUpCommon(e,t)},t.prototype.onUpCommon=function(e,t){if(this.dragging){this.dragging=!1,this.currentDragParams.onDragStop(e);var o={type:We.EVENT_DRAG_STOPPED,target:t};this.eventService.dispatchEvent(o)}this.mouseStartEvent=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null,this.dragEndFunctions.forEach((function(e){return e()})),this.dragEndFunctions.length=0},la([z("loggerFactory")],t.prototype,"loggerFactory",void 0),la([z("mouseEventService")],t.prototype,"mouseEventService",void 0),la([B],t.prototype,"init",null),la([U],t.prototype,"removeAllListeners",null),la([Y("dragService")],t)}(Ge),pa=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),ca=function(){return ca=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},ca.apply(this,arguments)},da=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ha=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allColumnFilters=new Map,t.activeAggregateFilters=[],t.activeColumnFilters=[],t.quickFilter=null,t.quickFilterParts=null,t.processingFilterChange=!1,t}var o;return pa(t,e),o=t,t.prototype.init=function(){var e=this;this.addManagedListener(this.eventService,We.EVENT_GRID_COLUMNS_CHANGED,(function(){return e.onColumnsChanged()})),this.addManagedListener(this.eventService,We.EVENT_COLUMN_VALUE_CHANGED,(function(){return e.refreshFiltersForAggregations()})),this.addManagedListener(this.eventService,We.EVENT_COLUMN_PIVOT_CHANGED,(function(){return e.refreshFiltersForAggregations()})),this.addManagedListener(this.eventService,We.EVENT_COLUMN_PIVOT_MODE_CHANGED,(function(){return e.refreshFiltersForAggregations()})),this.quickFilter=this.parseQuickFilter(this.gridOptionsWrapper.getQuickFilterText()),this.setQuickFilterParts(),this.allowShowChangeAfterFilter=this.gridOptionsWrapper.isAllowShowChangeAfterFilter(),this.externalFilterPresent=this.gridOptionsWrapper.isExternalFilterPresent()},t.prototype.setQuickFilterParts=function(){this.quickFilterParts=this.quickFilter?this.quickFilter.split(" "):null},t.prototype.setFilterModel=function(e){var t=this,o=[],r=this.getFilterModel();if(e){var n=Qr(Object.keys(e));this.allColumnFilters.forEach((function(r,i){var s=e[i];o.push(t.setModelOnFilterWrapper(r.filterPromise,s)),n.delete(i)})),n.forEach((function(r){var n=t.columnModel.getPrimaryColumn(r)||t.columnModel.getGridColumn(r);if(n)if(n.isFilterAllowed()){var i=t.getOrCreateFilterWrapper(n,"NO_UI");i?o.push(t.setModelOnFilterWrapper(i.filterPromise,e[r])):console.warn("AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: "+r)}else console.warn("AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: "+r);else console.warn("AG Grid: setFilterModel() - no column found for colId: "+r)}))}else this.allColumnFilters.forEach((function(e){o.push(t.setModelOnFilterWrapper(e.filterPromise,null))}));sn.all(o).then((function(){var e=t.getFilterModel(),o=[];t.allColumnFilters.forEach((function(t,n){var i=r?r[n]:null,s=e?e[n]:null;on.jsonEquals(i,s)||o.push(t.column)})),o.length>0&&t.onFilterChanged({columns:o})}))},t.prototype.setModelOnFilterWrapper=function(e,t){return new sn((function(o){e.then((function(e){"function"!=typeof e.setModel&&(console.warn("AG Grid: filter missing setModel method, which is needed for setFilterModel"),o()),(e.setModel(t)||sn.resolve()).then((function(){return o()}))}))}))},t.prototype.getFilterModel=function(){var e={};return this.allColumnFilters.forEach((function(t,o){var r=t.filterPromise.resolveNow(null,(function(e){return e}));if(null==r)return null;if("function"==typeof r.getModel){var i=r.getModel();n(i)&&(e[o]=i)}else console.warn("AG Grid: filter API missing getModel method, which is needed for getFilterModel")})),e},t.prototype.isColumnFilterPresent=function(){return this.activeColumnFilters.length>0},t.prototype.isAggregateFilterPresent=function(){return!!this.activeAggregateFilters.length},t.prototype.isExternalFilterPresent=function(){return this.externalFilterPresent},t.prototype.doAggregateFiltersPass=function(e,t){return this.doColumnFiltersPass(e,t,!0)},t.prototype.updateActiveFilters=function(){var e=this;this.activeColumnFilters.length=0,this.activeAggregateFilters.length=0;var t=function(e){return!!e&&(e.isFilterActive?e.isFilterActive():(console.warn("AG Grid: Filter is missing isFilterActive() method"),!1))},o=!!this.gridOptionsWrapper.getGroupAggFiltering();this.allColumnFilters.forEach((function(r){if(r.filterPromise.resolveNow(!1,t)){var n=r.filterPromise.resolveNow(null,(function(e){return e}));!function(t){if(!t.isPrimary())return!0;var r=!e.columnModel.isPivotActive();return!(!t.isValueActive()||!r)&&(!!e.columnModel.isPivotMode()||o)}(r.column)?e.activeColumnFilters.push(n):e.activeAggregateFilters.push(n)}}))},t.prototype.updateFilterFlagInColumns=function(e,t){this.allColumnFilters.forEach((function(o){var r=o.filterPromise.resolveNow(!1,(function(e){return e.isFilterActive()}));o.column.setFilterActive(r,e,t)}))},t.prototype.isAnyFilterPresent=function(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()},t.prototype.doColumnFiltersPass=function(e,t,o){for(var r=e.data,n=e.aggData,i=o?this.activeAggregateFilters:this.activeColumnFilters,s=o?n:r,a=0;a<i.length;a++){var l=i[a];if(null!=l&&l!==t){if("function"!=typeof l.doesFilterPass)throw new Error("Filter is missing method doesFilterPass");if(!l.doesFilterPass({node:e,data:s}))return!1}}return!0},t.prototype.parseQuickFilter=function(e){return n(e)?this.gridOptionsWrapper.isRowModelDefault()?e.toUpperCase():(console.warn("AG Grid - Quick filtering only works with the Client-Side Row Model"),null):null},t.prototype.setQuickFilter=function(e){if(null==e||"string"==typeof e){var t=this.parseQuickFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setQuickFilterParts(),this.onFilterChanged())}else console.warn("AG Grid - setQuickFilter() only supports string inputs, received: "+typeof e)},t.prototype.refreshFiltersForAggregations=function(){this.gridOptionsWrapper.getGroupAggFiltering()&&this.onFilterChanged()},t.prototype.callOnFilterChangedOutsideRenderCycle=function(e){var t=this;void 0===e&&(e={});var o=function(){return t.onFilterChanged(e)};this.rowRenderer.isRefreshInProgress()?setTimeout(o,0):o()},t.prototype.onFilterChanged=function(e){void 0===e&&(e={});var t=e.filterInstance,o=e.additionalEventAttributes,r=e.columns;this.updateActiveFilters(),this.updateFilterFlagInColumns("filterChanged",o),this.externalFilterPresent=this.gridOptionsWrapper.isExternalFilterPresent(),this.allColumnFilters.forEach((function(e){e.filterPromise&&e.filterPromise.then((function(e){e&&e!==t&&e.onAnyFilterChanged&&e.onAnyFilterChanged()}))}));var n={type:We.EVENT_FILTER_CHANGED,columns:r||[]};o&&_(n,o),this.processingFilterChange=!0,this.eventService.dispatchEvent(n),this.processingFilterChange=!1},t.prototype.isSuppressFlashingCellsBecauseFiltering=function(){return!this.allowShowChangeAfterFilter&&this.processingFilterChange},t.prototype.isQuickFilterPresent=function(){return null!==this.quickFilter},t.prototype.doesRowPassOtherFilters=function(e,t){return this.doesRowPassFilter({rowNode:t,filterInstanceToSkip:e})},t.prototype.doesRowPassQuickFilterNoCache=function(e,t){var o=this;return this.columnModel.getAllColumnsForQuickFilter().some((function(r){var i=o.getQuickFilterTextForColumn(r,e);return n(i)&&i.indexOf(t)>=0}))},t.prototype.doesRowPassQuickFilterCache=function(e,t){return e.quickFilterAggregateText||this.aggregateRowForQuickFilter(e),e.quickFilterAggregateText.indexOf(t)>=0},t.prototype.doesRowPassQuickFilter=function(e){var t=this,o=this.gridOptionsWrapper.isCacheQuickFilter();return this.quickFilterParts.every((function(r){return o?t.doesRowPassQuickFilterCache(e,r):t.doesRowPassQuickFilterNoCache(e,r)}))},t.prototype.doesRowPassAggregateFilters=function(e){return!(this.isAggregateFilterPresent()&&!this.doAggregateFiltersPass(e.rowNode,e.filterInstanceToSkip))},t.prototype.doesRowPassFilter=function(e){return!(this.isQuickFilterPresent()&&!this.doesRowPassQuickFilter(e.rowNode)||this.isExternalFilterPresent()&&!this.gridOptionsWrapper.doesExternalFilterPass(e.rowNode)||this.isColumnFilterPresent()&&!this.doColumnFiltersPass(e.rowNode,e.filterInstanceToSkip))},t.prototype.getQuickFilterTextForColumn=function(e,t){var o=this.valueService.getValue(e,t,!0),r=e.getColDef();if(r.getQuickFilterText){var i={value:o,node:t,data:t.data,column:e,colDef:r,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()};o=r.getQuickFilterText(i)}return n(o)?o.toString().toUpperCase():null},t.prototype.aggregateRowForQuickFilter=function(e){var t=this,r=[];this.columnModel.getAllColumnsForQuickFilter().forEach((function(o){var i=t.getQuickFilterTextForColumn(o,e);n(i)&&r.push(i)})),e.quickFilterAggregateText=r.join(o.QUICK_FILTER_SEPARATOR)},t.prototype.onNewRowsLoaded=function(e){this.allColumnFilters.forEach((function(e){e.filterPromise.then((function(e){e.onNewRowsLoaded&&e.onNewRowsLoaded()}))})),this.updateFilterFlagInColumns(e),this.updateActiveFilters()},t.prototype.createValueGetter=function(e){var t=this;return function(o){var r=o.node;return t.valueService.getValue(e,r,!0)}},t.prototype.getFilterComponent=function(e,t,o){var r;if(void 0===o&&(o=!0),o)return(null===(r=this.getOrCreateFilterWrapper(e,t))||void 0===r?void 0:r.filterPromise)||null;var n=this.cachedFilter(e);return n?n.filterPromise:null},t.prototype.isFilterActive=function(e){var t=this.cachedFilter(e);return!!t&&t.filterPromise.resolveNow(!1,(function(e){return e.isFilterActive()}))},t.prototype.getOrCreateFilterWrapper=function(e,t){if(!e.isFilterAllowed())return null;var o=this.cachedFilter(e);return o?"NO_UI"!==t&&this.putIntoGui(o,t):(o=this.createFilterWrapper(e,t),this.allColumnFilters.set(e.getColId(),o)),o},t.prototype.cachedFilter=function(e){return this.allColumnFilters.get(e.getColId())},t.prototype.createFilterInstance=function(e){var t,o=this,r=re.isRegistered(X.SetFilterModule)?"agSetColumnFilter":"agTextColumnFilter",n=e.getColDef(),i=ca(ca({},this.createFilterParams(e,n)),{filterModifiedCallback:function(){var r={type:We.EVENT_FILTER_MODIFIED,column:e,filterInstance:t};o.eventService.dispatchEvent(r)},filterChangedCallback:function(r){var n={filterInstance:t,additionalEventAttributes:r,columns:[e]};o.callOnFilterChangedOutsideRenderCycle(n)},doesRowPassOtherFilter:function(e){return o.doesRowPassOtherFilters(t,e)}}),s=this.userComponentFactory.getFilterDetails(n,i,r);if(!s)return null;var a=s.newAgStackInstance();return a&&a.then((function(e){return t=e})),a},t.prototype.createFilterParams=function(e,t){return{api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),column:e,colDef:g(t),rowModel:this.rowModel,filterChangedCallback:function(){},filterModifiedCallback:function(){},valueGetter:this.createValueGetter(e),context:this.gridOptionsWrapper.getContext(),doesRowPassOtherFilter:function(){return!0}}},t.prototype.createFilterWrapper=function(e,t){var o={column:e,filterPromise:null,compiledElement:null,guiPromise:sn.resolve(null)};return o.filterPromise=this.createFilterInstance(e),o.filterPromise&&this.putIntoGui(o,t),o},t.prototype.putIntoGui=function(e,t){var o=this,r=document.createElement("div");r.className="ag-filter",e.guiPromise=new sn((function(i){e.filterPromise.then((function(s){var a=s.getGui();n(a)||console.warn("AG Grid: getGui method from filter returned "+a+", it should be a DOM element or an HTML template string."),"string"==typeof a&&(a=Lo(a)),r.appendChild(a),i(r);var l={type:We.EVENT_FILTER_OPENED,column:e.column,source:t,eGui:r};o.eventService.dispatchEvent(l)}))}))},t.prototype.onColumnsChanged=function(){var e=this,t=[];this.allColumnFilters.forEach((function(o,r){(o.column.isPrimary()?e.columnModel.getPrimaryColumn(r):e.columnModel.getGridColumn(r))||(t.push(o.column),e.disposeFilterWrapper(o,"filterDestroyed"))})),t.length>0&&this.onFilterChanged({columns:t})},t.prototype.destroyFilter=function(e,t){void 0===t&&(t="api");var o=this.allColumnFilters.get(e.getColId());o&&(this.disposeFilterWrapper(o,t),this.onFilterChanged({columns:[e]}))},t.prototype.disposeFilterWrapper=function(e,t){var o=this;e.filterPromise.then((function(r){(r.setModel(null)||sn.resolve()).then((function(){o.getContext().destroyBean(r),e.column.setFilterActive(!1,t),o.allColumnFilters.delete(e.column.getColId())}))}))},t.prototype.destroy=function(){var t=this;e.prototype.destroy.call(this),this.allColumnFilters.forEach((function(e){return t.disposeFilterWrapper(e,"filterDestroyed")}))},t.QUICK_FILTER_SEPARATOR="\n",da([z("valueService")],t.prototype,"valueService",void 0),da([z("columnModel")],t.prototype,"columnModel",void 0),da([z("rowModel")],t.prototype,"rowModel",void 0),da([z("userComponentFactory")],t.prototype,"userComponentFactory",void 0),da([z("rowRenderer")],t.prototype,"rowRenderer",void 0),da([B],t.prototype,"init",null),da([U],t.prototype,"destroy",null),o=da([Y("filterManager")],t)}(Ge),fa=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),ga=function(e){function t(t,o){var r=e.call(this,t)||this;return r.ctrl=o,r}return fa(t,e),t.prototype.getCtrl=function(){return this.ctrl},t}(mn),ma=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),ya=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},va=function(e){function t(o){return e.call(this,t.TEMPLATE,o)||this}return ma(t,e),t.prototype.postConstruct=function(){var e=this,t=this.getGui(),o={addOrRemoveCssClass:function(t,o){return e.addOrRemoveCssClass(t,o)},addOrRemoveBodyCssClass:function(t,o){return e.eFloatingFilterBody.classList.toggle(t,o)},addOrRemoveButtonWrapperCssClass:function(t,o){return e.eButtonWrapper.classList.toggle(t,o)},setCompDetails:function(t){return e.setCompDetails(t)},getFloatingFilterComp:function(){return e.compPromise},setWidth:function(e){return t.style.width=e},setMenuIcon:function(t){return e.eButtonShowMainFilter.appendChild(t)}};this.ctrl.setComp(o,t,this.eButtonShowMainFilter,this.eFloatingFilterBody)},t.prototype.setCompDetails=function(e){var t=this;this.compPromise=e.newAgStackInstance(),this.compPromise.then((function(e){return t.afterCompCreated(e)}))},t.prototype.afterCompCreated=function(e){var t=this;e&&(this.addDestroyFunc((function(){return t.context.destroyBean(e)})),this.isAlive()&&(this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()))},t.TEMPLATE='<div class="ag-header-cell ag-floating-filter" role="gridcell" tabindex="-1">\n <div ref="eFloatingFilterBody" role="presentation"></div>\n <div class="ag-floating-filter-button ag-hidden" ref="eButtonWrapper" role="presentation">\n <button type="button" aria-label="Open Filter Menu" class="ag-floating-filter-button-button" ref="eButtonShowMainFilter" tabindex="-1"></button>\n </div>\n </div>',ya([vn("eFloatingFilterBody")],t.prototype,"eFloatingFilterBody",void 0),ya([vn("eButtonWrapper")],t.prototype,"eButtonWrapper",void 0),ya([vn("eButtonShowMainFilter")],t.prototype,"eButtonShowMainFilter",void 0),ya([B],t.prototype,"postConstruct",null),t}(ga),Ca=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),wa=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};!function(e){e.AUTO_HEIGHT="ag-layout-auto-height",e.NORMAL="ag-layout-normal",e.PRINT="ag-layout-print"}(sa||(sa={}));var Ea,_a=function(e){function t(t){var o=e.call(this)||this;return o.view=t,o}return Ca(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.gridOptionsWrapper,eo.PROP_DOM_LAYOUT,this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()},t.prototype.updateLayoutClasses=function(){var e=this.gridOptionsWrapper.getDomLayout(),t={autoHeight:e===oe.DOM_LAYOUT_AUTO_HEIGHT,normal:e===oe.DOM_LAYOUT_NORMAL,print:e===oe.DOM_LAYOUT_PRINT},o=t.autoHeight?sa.AUTO_HEIGHT:t.print?sa.PRINT:sa.NORMAL;this.view.updateLayoutClasses(o,t)},wa([z("gridOptionsWrapper")],t.prototype,"gridOptionsWrapper",void 0),wa([B],t.prototype,"postConstruct",null),t}(Ge),Sa=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Ra=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ba=function(e){function t(t){var o=e.call(this)||this;return o.scrollLeft=-1,o.nextScrollTop=-1,o.scrollTop=-1,o.eBodyViewport=t,o.resetLastHorizontalScrollElementDebounced=F(o.resetLastHorizontalScrollElement.bind(o),500),o}return Sa(t,e),t.prototype.postConstruct=function(){var e=this;this.enableRtl=this.gridOptionsWrapper.isEnableRtl(),this.addManagedListener(this.eventService,We.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.ctrlsService.whenReady((function(t){e.centerRowContainerCtrl=t.centerRowContainerCtrl,e.onDisplayedColumnsWidthChanged(),e.addScrollListener()}))},t.prototype.addScrollListener=function(){var e=this.ctrlsService.getFakeHScrollCtrl();this.addManagedListener(this.centerRowContainerCtrl.getViewportElement(),"scroll",this.onCenterViewportScroll.bind(this)),this.addManagedListener(e.getViewport(),"scroll",this.onFakeHorizontalScroll.bind(this));var t=this.gridOptionsWrapper.isDebounceVerticalScrollbar()?F(this.onVerticalScroll.bind(this),100):this.onVerticalScroll.bind(this);this.addManagedListener(this.eBodyViewport,"scroll",t)},t.prototype.onDisplayedColumnsWidthChanged=function(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()},t.prototype.horizontallyScrollHeaderCenterAndFloatingCenter=function(e){if(null!=this.centerRowContainerCtrl){void 0===e&&(e=this.centerRowContainerCtrl.getCenterViewportScrollLeft());var t=this.enableRtl?e:-e,o=this.ctrlsService.getTopCenterRowContainerCtrl(),r=this.ctrlsService.getStickyTopCenterRowContainerCtrl(),n=this.ctrlsService.getBottomCenterRowContainerCtrl(),i=this.ctrlsService.getFakeHScrollCtrl();this.ctrlsService.getHeaderRowContainerCtrl().setHorizontalScroll(t),n.setContainerTranslateX(t),o.setContainerTranslateX(t),r.setContainerTranslateX(t);var s=this.centerRowContainerCtrl.getViewportElement();Io(this.lastHorizontalScrollElement===s?i.getViewport():this.centerRowContainerCtrl.getViewportElement(),Math.abs(e),this.enableRtl)}},t.prototype.isControllingScroll=function(e){return this.lastHorizontalScrollElement?e===this.lastHorizontalScrollElement:(this.lastHorizontalScrollElement=e,!0)},t.prototype.onFakeHorizontalScroll=function(){var e=this.ctrlsService.getFakeHScrollCtrl().getViewport();this.isControllingScroll(e)&&this.onBodyHorizontalScroll(e)},t.prototype.onCenterViewportScroll=function(){var e=this.centerRowContainerCtrl.getViewportElement();this.isControllingScroll(e)&&this.onBodyHorizontalScroll(e)},t.prototype.onBodyHorizontalScroll=function(e){var t=this.centerRowContainerCtrl.getViewportElement().scrollLeft;this.shouldBlockScrollUpdate("horizontal",t,!0)||(this.doHorizontalScroll(Math.round(Do(e,this.enableRtl))),this.resetLastHorizontalScrollElementDebounced())},t.prototype.onVerticalScroll=function(){var e=this.eBodyViewport.scrollTop;this.shouldBlockScrollUpdate("vertical",e,!0)||(this.animationFrameService.setScrollTop(e),this.nextScrollTop=e,this.gridOptionsWrapper.isSuppressAnimationFrame()?(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()):this.animationFrameService.schedule())},t.prototype.resetLastHorizontalScrollElement=function(){this.lastHorizontalScrollElement=null},t.prototype.doHorizontalScroll=function(e){var t=Do(this.ctrlsService.getFakeHScrollCtrl().getViewport(),this.enableRtl);this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent("horizontal"),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.onHorizontalViewportChanged())},t.prototype.fireScrollEvent=function(e){var t=this,o={type:We.EVENT_BODY_SCROLL,direction:e,left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(o),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout((function(){var e=Object.assign({},o,{type:We.EVENT_BODY_SCROLL_END});t.eventService.dispatchEvent(e)}),100)},t.prototype.shouldBlockScrollUpdate=function(e,t,o){if(void 0===o&&(o=!1),o&&!bt())return!1;if("vertical"===e){var r=bo(this.eBodyViewport),n=this.eBodyViewport.scrollHeight;if(t<0||t+r>n)return!0}if("horizontal"===e){var i=this.centerRowContainerCtrl.getCenterWidth(),s=this.centerRowContainerCtrl.getViewportElement().scrollWidth;if(this.enableRtl&&Ao()){if(t>0)return!0}else if(t<0)return!0;if(Math.abs(t)+i>s)return!0}return!1},t.prototype.redrawRowsAfterScroll=function(){this.fireScrollEvent("vertical")},t.prototype.onHorizontalViewportChanged=function(){this.centerRowContainerCtrl.onHorizontalViewportChanged()},t.prototype.checkScrollLeft=function(){this.scrollLeft!==this.centerRowContainerCtrl.getCenterViewportScrollLeft()&&this.onBodyHorizontalScroll(this.centerRowContainerCtrl.getViewportElement())},t.prototype.executeAnimationFrameScroll=function(){var e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e},t.prototype.setHorizontalScrollPosition=function(e){var t=this.centerRowContainerCtrl.getViewportElement().scrollWidth-this.centerRowContainerCtrl.getCenterWidth();this.shouldBlockScrollUpdate("horizontal",e)&&(e=this.enableRtl&&Ao()?e>0?0:t:Math.min(Math.max(e,0),t)),Io(this.centerRowContainerCtrl.getViewportElement(),Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)},t.prototype.setVerticalScrollPosition=function(e){this.eBodyViewport.scrollTop=e},t.prototype.getVScrollPosition=function(){return{top:this.eBodyViewport.scrollTop,bottom:this.eBodyViewport.scrollTop+this.eBodyViewport.offsetHeight}},t.prototype.getHScrollPosition=function(){return this.centerRowContainerCtrl.getHScrollPosition()},t.prototype.isHorizontalScrollShowing=function(){return this.centerRowContainerCtrl.isHorizontalScrollShowing()},t.prototype.scrollHorizontally=function(e){var t=this.centerRowContainerCtrl.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowContainerCtrl.getViewportElement().scrollLeft-t},t.prototype.scrollToTop=function(){this.eBodyViewport.scrollTop=0},t.prototype.ensureNodeVisible=function(e,t){void 0===t&&(t=null);for(var o=this.rowModel.getRowCount(),r=-1,n=0;n<o;n++){var i=this.rowModel.getRow(n);if("function"==typeof e){if(i&&e(i)){r=n;break}}else if(e===i||e===i.data){r=n;break}}r>=0&&this.ensureIndexVisible(r,t)},t.prototype.ensureIndexVisible=function(e,t){if(this.gridOptionsWrapper.getDomLayout()!==oe.DOM_LAYOUT_PRINT){var o=this.paginationProxy.getRowCount();if("number"!=typeof e||e<0||e>=o)console.warn("invalid row index for ensureIndexVisible: "+e);else{this.gridOptionsWrapper.isPagination()&&!this.gridOptionsWrapper.isSuppressPaginationPanel()||this.paginationProxy.goToPageWithIndex(e);var r,n=this.ctrlsService.getGridBodyCtrl().getStickyTopHeight(),i=this.paginationProxy.getRow(e);do{var s=i.rowTop,a=i.rowHeight,l=this.paginationProxy.getPixelOffset(),u=i.rowTop-l,p=u+i.rowHeight,c=this.getVScrollPosition(),d=this.heightScaler.getDivStretchOffset(),h=c.top+d,f=c.bottom+d,g=f-h,m=this.heightScaler.getScrollPositionForPixel(u),y=this.heightScaler.getScrollPositionForPixel(p-g),v=Math.min((m+y)/2,u),C=null;"top"===t?C=m:"bottom"===t?C=y:"middle"===t?C=v:h+n>u?C=m-n:f<p&&(C=y),null!==C&&(this.eBodyViewport.scrollTop=C,this.rowRenderer.redrawAfterScroll()),r=s!==i.rowTop||a!==i.rowHeight}while(r);this.animationFrameService.flushAllFrames()}}},t.prototype.ensureColumnVisible=function(e,t){void 0===t&&(t="auto");var o=this.columnModel.getGridColumn(e);if(o&&!o.isPinned()&&this.columnModel.isColumnDisplayed(o)){var r=this.getPositionedHorizontalScroll(o,t);null!==r&&this.centerRowContainerCtrl.setCenterViewportScrollLeft(r),this.centerRowContainerCtrl.onHorizontalViewportChanged(),this.animationFrameService.flushAllFrames()}},t.prototype.getPositionedHorizontalScroll=function(e,t){var o=this.isColumnOutsideViewport(e),r=o.columnBeforeStart,n=o.columnAfterEnd,i=this.centerRowContainerCtrl.getCenterWidth()<e.getActualWidth(),s=this.centerRowContainerCtrl.getCenterWidth(),a=this.enableRtl,l=(a?r:n)||i,u=a?n:r;"auto"!==t&&(l="start"===t,u="end"===t);var p="middle"===t;if(l||u||p){var c=this.getColumnBounds(e),d=c.colLeft,h=c.colMiddle,f=c.colRight;return p?h-s/2:l?a?f:d:a?d-s:f-s}return null},t.prototype.isColumnOutsideViewport=function(e){var t=this.getViewportBounds(),o=t.start,r=t.end,n=this.getColumnBounds(e),i=n.colLeft,s=n.colRight,a=this.enableRtl;return{columnBeforeStart:a?o>s:r<s,columnAfterEnd:a?r<i:o>i}},t.prototype.getColumnBounds=function(e){var t=this.enableRtl,o=this.columnModel.getBodyContainerWidth(),r=e.getActualWidth(),n=e.getLeft(),i=t?-1:1,s=t?o-n:n;return{colLeft:s,colMiddle:s+r/2*i,colRight:s+r*i}},t.prototype.getViewportBounds=function(){var e=this.centerRowContainerCtrl.getCenterWidth(),t=this.centerRowContainerCtrl.getCenterViewportScrollLeft();return{start:t,end:e+t,width:e}},Ra([z("ctrlsService")],t.prototype,"ctrlsService",void 0),Ra([z("animationFrameService")],t.prototype,"animationFrameService",void 0),Ra([z("paginationProxy")],t.prototype,"paginationProxy",void 0),Ra([z("rowModel")],t.prototype,"rowModel",void 0),Ra([z("rowContainerHeightService")],t.prototype,"heightScaler",void 0),Ra([z("rowRenderer")],t.prototype,"rowRenderer",void 0),Ra([z("columnModel")],t.prototype,"columnModel",void 0),Ra([B],t.prototype,"postConstruct",null),t}(Ge),Oa=function(){function e(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=-1!==e.scrollAxis.indexOf("x"),this.scrollVertically=-1!==e.scrollAxis.indexOf("y"),this.scrollByTick=null!=e.scrollByTick?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||function(){return!1},this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||function(){return!1}}return e.prototype.check=function(e,t){void 0===t&&(t=!1);var o=t||this.shouldSkipVerticalScroll();if(!o||!this.shouldSkipHorizontalScroll()){var r=this.scrollContainer.getBoundingClientRect(),n=this.scrollByTick;this.tickLeft=e.clientX<r.left+n,this.tickRight=e.clientX>r.right-n,this.tickUp=e.clientY<r.top+n&&!o,this.tickDown=e.clientY>r.bottom-n&&!o,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}},e.prototype.ensureTickingStarted=function(){null===this.tickingInterval&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)},e.prototype.doTick=function(){var e;if(this.tickCount++,e=this.tickCount>20?200:this.tickCount>10?80:40,this.scrollVertically){var t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){var o=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(o-e),this.tickRight&&this.setHorizontalPosition(o+e)}this.onScrollCallback&&this.onScrollCallback()},e.prototype.ensureCleared=function(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)},e}(),Pa=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Ta=function(){return Ta=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},Ta.apply(this,arguments)},Aa=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Da=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s},Ia=function(e){function t(t){var o=e.call(this)||this;return o.isMultiRowDrag=!1,o.isGridSorted=!1,o.isGridFiltered=!1,o.isRowGroupActive=!1,o.eContainer=t,o}return Pa(t,e),t.prototype.postConstruct=function(){var e=this;this.gridOptionsWrapper.isRowModelDefault()&&(this.clientSideRowModel=this.rowModel);var t=function(){e.onSortChanged(),e.onFilterChanged(),e.onRowGroupChanged()};this.addManagedListener(this.eventService,We.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_MODEL_UPDATED,(function(){t()})),t(),this.ctrlsService.whenReady((function(){var t=e.ctrlsService.getGridBodyCtrl();e.autoScrollService=new Oa({scrollContainer:t.getBodyViewportElement(),scrollAxis:"y",getVerticalPosition:function(){return t.getScrollFeature().getVScrollPosition().top},setVerticalPosition:function(e){return t.getScrollFeature().setVerticalScrollPosition(e)},onScrollCallback:function(){e.onDragging(e.lastDraggingEvent)}})}))},t.prototype.onSortChanged=function(){this.isGridSorted=this.sortController.isSortActive()},t.prototype.onFilterChanged=function(){this.isGridFiltered=this.filterManager.isAnyFilterPresent()},t.prototype.onRowGroupChanged=function(){var e=this.columnModel.getRowGroupColumns();this.isRowGroupActive=!s(e)},t.prototype.getContainer=function(){return this.eContainer},t.prototype.isInterestedIn=function(e){return e===ts.RowDrag},t.prototype.getIconName=function(){return this.gridOptionsWrapper.isRowDragManaged()&&this.shouldPreventRowMove()?hs.ICON_NOT_ALLOWED:hs.ICON_MOVE},t.prototype.shouldPreventRowMove=function(){return this.isGridSorted||this.isGridFiltered||this.isRowGroupActive},t.prototype.getRowNodes=function(e){var t=this;if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];var o=this.gridOptionsWrapper.isRowDragMultiRow(),r=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Da(arguments[t]));return e}(this.selectionService.getSelectedNodes()).sort((function(e,o){return null==e.rowIndex||null==o.rowIndex?0:t.getRowIndexNumber(e)-t.getRowIndexNumber(o)})),n=e.dragItem.rowNode;return o&&-1!==r.indexOf(n)?(this.isMultiRowDrag=!0,r):(this.isMultiRowDrag=!1,[n])},t.prototype.onDragEnter=function(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent(We.EVENT_ROW_DRAG_ENTER,e),this.getRowNodes(e).forEach((function(e){e.setDragging(!0)})),this.onEnterOrDragging(e)},t.prototype.onDragging=function(e){this.onEnterOrDragging(e)},t.prototype.isFromThisGrid=function(e){return e.dragSource.dragSourceDomDataKey===this.gridOptionsWrapper.getDomDataKey()},t.prototype.isDropZoneWithinThisGrid=function(e){var t=this.ctrlsService.getGridBodyCtrl().getGui(),o=e.dropZoneTarget;return!t.contains(o)},t.prototype.onEnterOrDragging=function(e){this.dispatchGridEvent(We.EVENT_ROW_DRAG_MOVE,e),this.lastDraggingEvent=e;var t=this.mouseEventService.getNormalisedPosition(e).y;this.gridOptionsWrapper.isRowDragManaged()&&this.doManagedDrag(e,t),this.autoScrollService.check(e.event)},t.prototype.doManagedDrag=function(e,t){var o=this.isFromThisGrid(e),r=this.gridOptionsWrapper.isRowDragManaged(),n=e.dragItem.rowNodes;r&&this.shouldPreventRowMove()||(this.gridOptionsWrapper.isSuppressMoveWhenRowDragging()||!o?this.isDropZoneWithinThisGrid(e)||this.clientSideRowModel.highlightRowAtPixel(n[0],t):this.moveRows(n,t))},t.prototype.getRowIndexNumber=function(e){return parseInt(le(e.getRowIndexString().split("-")),10)},t.prototype.moveRowAndClearHighlight=function(e){var t=this,o=this.clientSideRowModel.getLastHighlightedRowNode(),r=o&&o.highlighted===Qn.Below,n=this.mouseEventService.getNormalisedPosition(e).y,i=e.dragItem.rowNodes,s=r?1:0;if(this.isFromThisGrid(e))i.forEach((function(e){e.rowTop<n&&(s-=1)})),this.moveRows(i,n,s);else{var a=this.gridOptionsWrapper.getRowIdFunc(),l=this.clientSideRowModel.getRowIndexAtPixel(n)+1;this.clientSideRowModel.getHighlightPosition(n)===Qn.Above&&l--,this.clientSideRowModel.updateRowData({add:i.map((function(e){return e.data})).filter((function(e){return!t.clientSideRowModel.getRowNode(a?a({data:e,level:0}):e.id)})),addIndex:l})}this.clearRowHighlight()},t.prototype.clearRowHighlight=function(){this.clientSideRowModel.highlightRowAtPixel(null)},t.prototype.moveRows=function(e,t,o){void 0===o&&(o=0),this.clientSideRowModel.ensureRowsAtPixel(e,t,o)&&(this.focusService.clearFocusedCell(),this.rangeService&&this.rangeService.removeAllCellRanges())},t.prototype.addRowDropZone=function(e){var t=this;if(e.getContainer())if(this.dragAndDropService.findExternalZone(e))console.warn("AG Grid: addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.");else{var o={getContainer:e.getContainer};e.fromGrid?(e.fromGrid=void 0,o=e):(e.onDragEnter&&(o.onDragEnter=function(o){e.onDragEnter(t.draggingToRowDragEvent(We.EVENT_ROW_DRAG_ENTER,o))}),e.onDragLeave&&(o.onDragLeave=function(o){e.onDragLeave(t.draggingToRowDragEvent(We.EVENT_ROW_DRAG_LEAVE,o))}),e.onDragging&&(o.onDragging=function(o){e.onDragging(t.draggingToRowDragEvent(We.EVENT_ROW_DRAG_MOVE,o))}),e.onDragStop&&(o.onDragStop=function(o){e.onDragStop(t.draggingToRowDragEvent(We.EVENT_ROW_DRAG_END,o))})),this.dragAndDropService.addDropTarget(Ta({isInterestedIn:function(e){return e===ts.RowDrag},getIconName:function(){return hs.ICON_MOVE},external:!0},o))}else T((function(){return console.warn("AG Grid: addRowDropZone - A container target needs to be provided")}),"add-drop-zone-empty-target")},t.prototype.getRowDropZone=function(e){var t=this,o=this.getContainer.bind(this),r=this.onDragEnter.bind(this),n=this.onDragLeave.bind(this),i=this.onDragging.bind(this),s=this.onDragStop.bind(this);return e?{getContainer:o,onDragEnter:e.onDragEnter?function(o){r(o),e.onDragEnter(t.draggingToRowDragEvent(We.EVENT_ROW_DRAG_ENTER,o))}:r,onDragLeave:e.onDragLeave?function(o){n(o),e.onDragLeave(t.draggingToRowDragEvent(We.EVENT_ROW_DRAG_LEAVE,o))}:n,onDragging:e.onDragging?function(o){i(o),e.onDragging(t.draggingToRowDragEvent(We.EVENT_ROW_DRAG_MOVE,o))}:i,onDragStop:e.onDragStop?function(o){s(o),e.onDragStop(t.draggingToRowDragEvent(We.EVENT_ROW_DRAG_END,o))}:s,fromGrid:!0}:{getContainer:o,onDragEnter:r,onDragLeave:n,onDragging:i,onDragStop:s,fromGrid:!0}},t.prototype.draggingToRowDragEvent=function(e,t){var o,r,n=this.mouseEventService.getNormalisedPosition(t).y,i=-1;switch(n>this.paginationProxy.getCurrentPageHeight()||(i=this.rowModel.getRowIndexAtPixel(n),o=this.rowModel.getRow(i)),t.vDirection){case os.Down:r="down";break;case os.Up:r="up";break;default:r=null}return{type:e,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext(),event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:i,overNode:o,y:n,vDirection:r}},t.prototype.dispatchGridEvent=function(e,t){var o=this.draggingToRowDragEvent(e,t);this.eventService.dispatchEvent(o)},t.prototype.onDragLeave=function(e){this.dispatchGridEvent(We.EVENT_ROW_DRAG_LEAVE,e),this.stopDragging(e),this.gridOptionsWrapper.isRowDragManaged()&&this.clearRowHighlight(),this.isFromThisGrid(e)&&(this.isMultiRowDrag=!1)},t.prototype.onDragStop=function(e){this.dispatchGridEvent(We.EVENT_ROW_DRAG_END,e),this.stopDragging(e),!this.gridOptionsWrapper.isRowDragManaged()||!this.gridOptionsWrapper.isSuppressMoveWhenRowDragging()&&this.isFromThisGrid(e)||this.isDropZoneWithinThisGrid(e)||this.moveRowAndClearHighlight(e)},t.prototype.stopDragging=function(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach((function(e){e.setDragging(!1)}))},Aa([z("dragAndDropService")],t.prototype,"dragAndDropService",void 0),Aa([z("rowModel")],t.prototype,"rowModel",void 0),Aa([z("paginationProxy")],t.prototype,"paginationProxy",void 0),Aa([z("columnModel")],t.prototype,"columnModel",void 0),Aa([z("focusService")],t.prototype,"focusService",void 0),Aa([z("sortController")],t.prototype,"sortController",void 0),Aa([z("filterManager")],t.prototype,"filterManager",void 0),Aa([z("selectionService")],t.prototype,"selectionService",void 0),Aa([z("mouseEventService")],t.prototype,"mouseEventService",void 0),Aa([z("ctrlsService")],t.prototype,"ctrlsService",void 0),Aa([K("rangeService")],t.prototype,"rangeService",void 0),Aa([B],t.prototype,"postConstruct",null),t}(Ge),Na=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),xa=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};!function(e){e.ANIMATION_ON="ag-row-animation",e.ANIMATION_OFF="ag-row-no-animation"}(Ea||(Ea={}));var Ma,La,Fa="ag-selectable",Ga="ag-force-vertical-scroll",ka="ag-column-moving",Va=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.stickyTopHeight=0,t}return Na(t,e),t.prototype.getScrollFeature=function(){return this.bodyScrollFeature},t.prototype.getBodyViewportElement=function(){return this.eBodyViewport},t.prototype.setComp=function(e,t,o,r,n,i){this.comp=e,this.eGridBody=t,this.eBodyViewport=o,this.eTop=r,this.eBottom=n,this.eStickyTop=i,this.setCellTextSelection(this.gridOptionsWrapper.isEnableCellTextSelect()),this.createManagedBean(new _a(this.comp)),this.bodyScrollFeature=this.createManagedBean(new ba(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([r,o,n,i]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.ctrlsService.registerGridBodyCtrl(this)},t.prototype.getComp=function(){return this.comp},t.prototype.addEventListeners=function(){this.addManagedListener(this.eventService,We.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))},t.prototype.addFocusListeners=function(e){var t=this;e.forEach((function(e){t.addManagedListener(e,"focusin",(function(t){var o=So(t.target,"ag-root",e);e.classList.toggle("ag-has-focus",!o)})),t.addManagedListener(e,"focusout",(function(t){var o=t.target,r=t.relatedTarget,n=e.contains(r),i=So(r,"ag-root",e);So(o,"ag-root",e)||n&&!i||e.classList.remove("ag-has-focus")}))}))},t.prototype.setColumnMovingCss=function(e){this.comp.setColumnMovingCss(e?ka:null,e)},t.prototype.setCellTextSelection=function(e){void 0===e&&(e=!1);var t=e?Fa:null;this.comp.setCellSelectableCss(t,e)},t.prototype.onScrollVisibilityChanged=function(){var e=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(e),this.setStickyTopWidth(e)},t.prototype.onGridColumnsChanged=function(){var e=this.columnModel.getAllGridColumns();this.comp.setColumnCount(e?e.length:0)},t.prototype.disableBrowserDragging=function(){this.addManagedListener(this.eGridBody,"dragstart",(function(e){if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}))},t.prototype.addStopEditingWhenGridLosesFocus=function(){var e=this;if(this.gridOptionsWrapper.isStopEditingWhenCellsLoseFocus()){var t=function(t){var r=t.relatedTarget;if(null!==Pt(r)){var n=o.some((function(e){return e.contains(r)}))&&e.mouseEventService.isElementInThisGrid(r);if(!n){var i=e.popupService;n=i.getActivePopups().some((function(e){return e.contains(r)}))||i.isElementWithinCustomPopup(r)}n||e.rowRenderer.stopEditing()}else e.rowRenderer.stopEditing()},o=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop];o.forEach((function(o){return e.addManagedListener(o,"focusout",t)}))}},t.prototype.updateRowCount=function(){var e=this.headerNavigationService.getHeaderRowCount(),t=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1,o=-1===t?-1:e+t;this.comp.setRowCount(o)},t.prototype.registerBodyViewportResizeListener=function(e){this.comp.registerBodyViewportResizeListener(e)},t.prototype.setVerticalScrollPaddingVisible=function(e){var t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)},t.prototype.isVerticalScrollShowing=function(){var e=this.gridOptionsWrapper.isAlwaysShowVerticalScroll(),t=e?Ga:null,o=this.gridOptionsWrapper.getDomLayout()===oe.DOM_LAYOUT_NORMAL;return this.comp.setAlwaysVerticalScrollClass(t,e),e||o&&Bo(this.eBodyViewport)},t.prototype.setupRowAnimationCssClass=function(){var e=this,t=function(){var t=e.gridOptionsWrapper.isAnimateRows()&&!e.rowContainerHeightService.isStretching(),o=t?Ea.ANIMATION_ON:Ea.ANIMATION_OFF;e.comp.setRowAnimationCssOnBodyViewport(o,t)};t(),this.addManagedListener(this.eventService,We.EVENT_HEIGHT_SCALE_CHANGED,t)},t.prototype.getGridBodyElement=function(){return this.eGridBody},t.prototype.addBodyViewportListener=function(){var e=this,t=function(t,o,r){if(t||r){e.gridOptionsWrapper.isPreventDefaultOnContextMenu()&&(t||r).preventDefault();var n=(t||o).target;n!==e.eBodyViewport&&n!==e.ctrlsService.getCenterRowContainerCtrl().getViewportElement()||e.contextMenuFactory&&(t?e.contextMenuFactory.onContextMenu(t,null,null,null,null,e.eGridBody):r&&e.contextMenuFactory.onContextMenu(null,r,null,null,null,e.eGridBody))}};this.addManagedListener(this.eBodyViewport,"contextmenu",t),this.mockContextMenuForIPad(t),this.addManagedListener(this.eBodyViewport,"wheel",this.onBodyViewportWheel.bind(this)),this.addManagedListener(this.eStickyTop,"wheel",this.onStickyTopWheel.bind(this))},t.prototype.mockContextMenuForIPad=function(e){if(bt()){var t=new Ti(this.eBodyViewport);this.addManagedListener(t,Ti.EVENT_LONG_TAP,(function(t){e(void 0,t.touchStart,t.touchEvent)})),this.addDestroyFunc((function(){return t.destroy()}))}},t.prototype.onBodyViewportWheel=function(e){this.gridOptionsWrapper.isSuppressScrollWhenPopupsAreOpen()&&this.popupService.hasAnchoredPopup()&&e.preventDefault()},t.prototype.onStickyTopWheel=function(e){e.preventDefault(),e.offsetY&&this.scrollVertically(e.deltaY)},t.prototype.getGui=function(){return this.eGridBody},t.prototype.scrollVertically=function(e){var t=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t},t.prototype.addRowDragListener=function(){this.rowDragFeature=this.createManagedBean(new Ia(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature)},t.prototype.getRowDragFeature=function(){return this.rowDragFeature},t.prototype.onPinnedRowDataChanged=function(){this.setFloatingHeights()},t.prototype.setFloatingHeights=function(){var e=this.pinnedRowModel,t=e.getPinnedTopTotalHeight();t&&(t+=1);var o=e.getPinnedBottomTotalHeight();o&&(o+=1),this.comp.setTopHeight(t),this.comp.setBottomHeight(o),this.comp.setTopDisplay(t?"inherit":"none"),this.comp.setBottomDisplay(o?"inherit":"none"),this.setStickyTopOffsetTop()},t.prototype.setStickyTopHeight=function(e){void 0===e&&(e=0),this.comp.setStickyTopHeight(e+"px"),this.stickyTopHeight=e},t.prototype.getStickyTopHeight=function(){return this.stickyTopHeight},t.prototype.setStickyTopWidth=function(e){if(e){var t=this.gridOptionsWrapper.getScrollbarWidth();this.comp.setStickyTopWidth("calc(100% - "+t+"px)")}else this.comp.setStickyTopWidth("100%")},t.prototype.onHeaderHeightChanged=function(){this.setStickyTopOffsetTop()},t.prototype.setStickyTopOffsetTop=function(){var e=this.ctrlsService.getGridHeaderCtrl().getHeaderHeight(),t=this.pinnedRowModel.getPinnedTopTotalHeight(),o=0;e>0&&(o+=e+1),t>0&&(o+=t+1),this.comp.setStickyTopTop(o+"px")},t.prototype.sizeColumnsToFit=function(e,t){var o=this,r=this.isVerticalScrollShowing()?this.gridOptionsWrapper.getScrollbarWidth():0,n=Oo(this.eBodyViewport)-r;n>0?this.columnModel.sizeColumnsToFit(n,"sizeColumnsToFit",!1,e):void 0===t?window.setTimeout((function(){o.sizeColumnsToFit(e,100)}),0):100===t?window.setTimeout((function(){o.sizeColumnsToFit(e,500)}),100):500===t?window.setTimeout((function(){o.sizeColumnsToFit(e,-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.addScrollEventListener=function(e){this.eBodyViewport.addEventListener("scroll",e)},t.prototype.removeScrollEventListener=function(e){this.eBodyViewport.removeEventListener("scroll",e)},xa([z("rowContainerHeightService")],t.prototype,"rowContainerHeightService",void 0),xa([z("ctrlsService")],t.prototype,"ctrlsService",void 0),xa([z("columnModel")],t.prototype,"columnModel",void 0),xa([z("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),xa([K("contextMenuFactory")],t.prototype,"contextMenuFactory",void 0),xa([z("headerNavigationService")],t.prototype,"headerNavigationService",void 0),xa([z("dragAndDropService")],t.prototype,"dragAndDropService",void 0),xa([z("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),xa([z("rowRenderer")],t.prototype,"rowRenderer",void 0),xa([z("popupService")],t.prototype,"popupService",void 0),xa([z("mouseEventService")],t.prototype,"mouseEventService",void 0),xa([z("rowModel")],t.prototype,"rowModel",void 0),t}(Ge);!function(e){e[e.FILL=0]="FILL",e[e.RANGE=1]="RANGE"}(Ma||(Ma={})),function(e){e[e.VALUE=0]="VALUE",e[e.DIMENSION=1]="DIMENSION"}(La||(La={}));var Ha,Wa="ag-cell-range-selected",ja=function(){function e(e,t){this.beans=e,this.cellCtrl=t}return e.prototype.setComp=function(e,t){this.cellComp=e,this.eGui=t,this.onRangeSelectionChanged()},e.prototype.onRangeSelectionChanged=function(){this.cellComp&&(this.rangeCount=this.beans.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(Wa,0!==this.rangeCount),this.cellComp.addOrRemoveCssClass(Wa+"-1",1===this.rangeCount),this.cellComp.addOrRemoveCssClass(Wa+"-2",2===this.rangeCount),this.cellComp.addOrRemoveCssClass(Wa+"-3",3===this.rangeCount),this.cellComp.addOrRemoveCssClass(Wa+"-4",this.rangeCount>=4),this.cellComp.addOrRemoveCssClass("ag-cell-range-chart",this.hasChartRange),Ar(this.eGui,this.rangeCount>0||void 0),this.cellComp.addOrRemoveCssClass("ag-cell-range-single-cell",this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle())},e.prototype.updateRangeBorders=function(){var e=this.getRangeBorders(),t=this.isSingleCell(),o=!t&&e.top,r=!t&&e.right,n=!t&&e.bottom,i=!t&&e.left;this.cellComp.addOrRemoveCssClass("ag-cell-range-top",o),this.cellComp.addOrRemoveCssClass("ag-cell-range-right",r),this.cellComp.addOrRemoveCssClass("ag-cell-range-bottom",n),this.cellComp.addOrRemoveCssClass("ag-cell-range-left",i)},e.prototype.isSingleCell=function(){var e=this.beans.rangeService;return 1===this.rangeCount&&e&&!e.isMoreThanOneCell()},e.prototype.getHasChartRange=function(){var e=this.beans.rangeService;if(!this.rangeCount||!e)return!1;var t=e.getCellRanges();return t.length>0&&t.every((function(e){return ge([La.DIMENSION,La.VALUE],e.type)}))},e.prototype.updateRangeBordersIfRangeCount=function(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle())},e.prototype.getRangeBorders=function(){var e,t,o=this,r=this.beans.gridOptionsWrapper.isEnableRtl(),n=!1,i=!1,s=!1,a=!1,l=this.cellCtrl.getCellPosition().column,u=this.beans,p=u.rangeService,c=u.columnModel;r?(e=c.getDisplayedColAfter(l),t=c.getDisplayedColBefore(l)):(e=c.getDisplayedColBefore(l),t=c.getDisplayedColAfter(l));var d=p.getCellRanges().filter((function(e){return p.isCellInSpecificRange(o.cellCtrl.getCellPosition(),e)}));e||(a=!0),t||(i=!0);for(var h=0;h<d.length&&!(n&&i&&s&&a);h++){var f=d[h],g=p.getRangeStartRow(f),m=p.getRangeEndRow(f);!n&&this.beans.rowPositionUtils.sameRow(g,this.cellCtrl.getCellPosition())&&(n=!0),!s&&this.beans.rowPositionUtils.sameRow(m,this.cellCtrl.getCellPosition())&&(s=!0),!a&&e&&f.columns.indexOf(e)<0&&(a=!0),!i&&t&&f.columns.indexOf(t)<0&&(i=!0)}return{top:n,right:i,bottom:s,left:a}},e.prototype.refreshHandle=function(){if(this.beans.rangeService){var e=this.shouldHaveSelectionHandle();this.selectionHandle&&!e&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),e&&this.addSelectionHandle(),this.cellComp.addOrRemoveCssClass("ag-cell-range-handle",!!this.selectionHandle)}},e.prototype.shouldHaveSelectionHandle=function(){var e=this.beans,t=e.gridOptionsWrapper,o=e.rangeService,r=o.getCellRanges(),n=r.length;if(this.rangeCount<1||n<1)return!1;var i=le(r),s=this.cellCtrl.getCellPosition(),a=t.isEnableFillHandle()&&!this.cellCtrl.isSuppressFillHandle(),l=t.isEnableRangeHandle(),u=1===n&&!this.cellCtrl.isEditing()&&(a||l);if(this.hasChartRange){var p=r[0].type===La.DIMENSION&&o.isCellInSpecificRange(s,r[0]);this.cellComp.addOrRemoveCssClass("ag-cell-range-chart-category",p),u=i.type===La.VALUE}return u&&null!=i.endRow&&o.isContiguousRange(i)&&o.isBottomRightCell(i,s)},e.prototype.addSelectionHandle=function(){var e=this.beans,t=e.gridOptionsWrapper,o=le(e.rangeService.getCellRanges()).type,r=t.isEnableFillHandle()&&i(o)?Ma.FILL:Ma.RANGE;this.selectionHandle&&this.selectionHandle.getType()!==r&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),this.selectionHandle||(this.selectionHandle=this.beans.selectionHandleFactory.createSelectionHandle(r)),this.selectionHandle.refresh(this.cellCtrl)},e.prototype.destroy=function(){this.beans.context.destroyBean(this.selectionHandle)},e}(),Ba=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Ua=function(e){function t(t,o){var r=e.call(this)||this;return r.cellCtrl=t,r.beans=o,r.column=t.getColumn(),r.rowNode=t.getRowNode(),r.setupColSpan(),r.setupRowSpan(),r}return Ba(t,e),t.prototype.setupRowSpan=function(){this.rowSpan=this.column.getRowSpan(this.rowNode)},t.prototype.setComp=function(e){this.eGui=e,this.onLeftChanged(),this.onWidthChanged(),this.applyRowSpan()},t.prototype.onDisplayColumnsChanged=function(){var e=this.getColSpanningList();ue(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())},t.prototype.setupColSpan=function(){null!=this.column.getColDef().colSpan&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListener(this.beans.eventService,We.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayColumnsChanged.bind(this)),this.addManagedListener(this.beans.eventService,We.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onWidthChanged.bind(this)))},t.prototype.onWidthChanged=function(){if(this.eGui){var e=this.getCellWidth();this.eGui.style.width=e+"px"}},t.prototype.getCellWidth=function(){return this.colsSpanning?this.colsSpanning.reduce((function(e,t){return e+t.getActualWidth()}),0):this.column.getActualWidth()},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(),n=0;o&&n<e&&(t.push(o),(o=this.beans.columnModel.getDisplayedColAfter(o))&&!i(o))&&r===o.getPinned();n++);return t},t.prototype.onLeftChanged=function(){if(this.eGui){var e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eGui.style.left=e+"px"}},t.prototype.getCellLeft=function(){return(this.beans.gridOptionsWrapper.isEnableRtl()&&this.colsSpanning?le(this.colsSpanning):this.column).getLeft()},t.prototype.modifyLeftForPrintLayout=function(e){if(!this.cellCtrl.isPrintLayout()||this.column.getPinned()===oe.PINNED_LEFT)return e;var t=this.beans.columnModel.getDisplayedColumnsLeftWidth();return this.column.getPinned()===oe.PINNED_RIGHT?t+this.beans.columnModel.getBodyContainerWidth()+(e||0):t+(e||0)},t.prototype.applyRowSpan=function(){if(1!==this.rowSpan){var e=this.beans.gridOptionsWrapper.getRowHeightAsNumber()*this.rowSpan;this.eGui.style.height=e+"px",this.eGui.style.zIndex="1"}},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(Ge),Ya=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),za=function(e){function t(t,o){var r=e.call(this)||this;return r.staticClasses=[],r.cellCtrl=t,r.beans=o,r.column=t.getColumn(),r.rowNode=t.getRowNode(),r}return Ya(t,e),t.prototype.setComp=function(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()},t.prototype.applyCellClassRules=function(){var e=this,t=this.column.getColDef(),o={value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,colDef:t,column:this.column,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext()};this.beans.stylingService.processClassRules(t.cellClassRules,o,(function(t){return e.cellComp.addOrRemoveCssClass(t,!0)}),(function(t){return e.cellComp.addOrRemoveCssClass(t,!1)}))},t.prototype.applyUserStyles=function(){var e=this.column.getColDef();if(e.cellStyle){var t;if("function"==typeof e.cellStyle){var o={column:this.column,value:this.cellCtrl.getValue(),colDef:e,data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext()};t=(0,e.cellStyle)(o)}else t=e.cellStyle;this.cellComp.setUserStyles(t)}},t.prototype.applyClassesFromColDef=function(){var e=this,t=this.column.getColDef(),o={value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,column:this.column,colDef:t,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext()};this.staticClasses.length&&this.staticClasses.forEach((function(t){return e.cellComp.addOrRemoveCssClass(t,!1)})),this.staticClasses=this.beans.stylingService.getStaticCellClasses(t,o),this.staticClasses.length&&this.staticClasses.forEach((function(t){return e.cellComp.addOrRemoveCssClass(t,!0)}))},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(Ge),Ka=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),$a=function(e){function t(t,o){var r=e.call(this)||this;return r.ctrl=t,r.beans=o,r}return Ka(t,e),t.prototype.setComp=function(e){this.comp=e,this.setupTooltip()},t.prototype.setupTooltip=function(){this.browserTooltips=this.beans.gridOptionsWrapper.isEnableBrowserTooltips(),this.updateTooltipText(),this.browserTooltips?this.comp.setTitle(null!=this.tooltip?this.tooltip:void 0):this.createTooltipFeatureIfNeeded()},t.prototype.updateTooltipText=function(){this.tooltip=this.ctrl.getTooltipValue()},t.prototype.createTooltipFeatureIfNeeded=function(){var e=this;if(null==this.genericTooltipFeature){var t={getTooltipParams:function(){return e.getTooltipParams()},getGui:function(){return e.ctrl.getGui()}};this.genericTooltipFeature=this.createManagedBean(new cn(t),this.beans.context)}},t.prototype.refreshToolTip=function(){this.updateTooltipText(),this.browserTooltips&&this.comp.setTitle(null!=this.tooltip?this.tooltip:void 0)},t.prototype.getTooltipParams=function(){var e=this.ctrl,t=e.getColumn?e.getColumn():void 0,o=e.getColDef?e.getColDef():void 0,r=e.getRowNode?e.getRowNode():void 0;return{location:e.getLocation(),colDef:o,column:t,rowIndex:e.getRowIndex?e.getRowIndex():void 0,node:r,data:r?r.data:void 0,value:this.getTooltipText(),valueFormatted:e.getValueFormatted?e.getValueFormatted():void 0}},t.prototype.getTooltipText=function(){return this.tooltip},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(Ge),qa=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Za=function(){function e(){}return e.prototype.postConstruct=function(){this.doingMasterDetail=this.gridOptionsWrapper.isMasterDetail(),this.gridOptionsWrapper.isRowModelDefault()&&(this.clientSideRowModel=this.rowModel),this.gridOptionsWrapper.isRowModelServerSide()&&(this.serverSideRowModel=this.rowModel)},qa([z("resizeObserverService")],e.prototype,"resizeObserverService",void 0),qa([z("paginationProxy")],e.prototype,"paginationProxy",void 0),qa([z("context")],e.prototype,"context",void 0),qa([z("columnApi")],e.prototype,"columnApi",void 0),qa([z("gridApi")],e.prototype,"gridApi",void 0),qa([z("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),qa([z("expressionService")],e.prototype,"expressionService",void 0),qa([z("rowRenderer")],e.prototype,"rowRenderer",void 0),qa([z("templateService")],e.prototype,"templateService",void 0),qa([z("valueService")],e.prototype,"valueService",void 0),qa([z("eventService")],e.prototype,"eventService",void 0),qa([z("columnModel")],e.prototype,"columnModel",void 0),qa([z("headerNavigationService")],e.prototype,"headerNavigationService",void 0),qa([z("navigationService")],e.prototype,"navigationService",void 0),qa([z("columnAnimationService")],e.prototype,"columnAnimationService",void 0),qa([K("rangeService")],e.prototype,"rangeService",void 0),qa([z("focusService")],e.prototype,"focusService",void 0),qa([K("contextMenuFactory")],e.prototype,"contextMenuFactory",void 0),qa([z("popupService")],e.prototype,"popupService",void 0),qa([z("valueFormatterService")],e.prototype,"valueFormatterService",void 0),qa([z("stylingService")],e.prototype,"stylingService",void 0),qa([z("columnHoverService")],e.prototype,"columnHoverService",void 0),qa([z("userComponentFactory")],e.prototype,"userComponentFactory",void 0),qa([z("userComponentRegistry")],e.prototype,"userComponentRegistry",void 0),qa([z("animationFrameService")],e.prototype,"animationFrameService",void 0),qa([z("dragAndDropService")],e.prototype,"dragAndDropService",void 0),qa([z("sortController")],e.prototype,"sortController",void 0),qa([z("filterManager")],e.prototype,"filterManager",void 0),qa([z("rowContainerHeightService")],e.prototype,"rowContainerHeightService",void 0),qa([z("frameworkOverrides")],e.prototype,"frameworkOverrides",void 0),qa([z("cellPositionUtils")],e.prototype,"cellPositionUtils",void 0),qa([z("rowPositionUtils")],e.prototype,"rowPositionUtils",void 0),qa([z("selectionService")],e.prototype,"selectionService",void 0),qa([K("selectionHandleFactory")],e.prototype,"selectionHandleFactory",void 0),qa([z("rowCssClassCalculator")],e.prototype,"rowCssClassCalculator",void 0),qa([z("rowModel")],e.prototype,"rowModel",void 0),qa([z("ctrlsService")],e.prototype,"ctrlsService",void 0),qa([z("ctrlsFactory")],e.prototype,"ctrlsFactory",void 0),qa([z("agStackComponentsRegistry")],e.prototype,"agStackComponentsRegistry",void 0),qa([z("valueCache")],e.prototype,"valueCache",void 0),qa([z("rowNodeEventThrottle")],e.prototype,"rowNodeEventThrottle",void 0),qa([B],e.prototype,"postConstruct",null),qa([Y("beans")],e)}(),Xa=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Qa=function(e){function t(t,o,r){var n=e.call(this)||this;return n.cellCtrl=t,n.beans=o,n.column=r,n}return Xa(t,e),t.prototype.onMouseEvent=function(e,t){if(!Oe(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t)}},t.prototype.onCellClicked=function(e){if(this.isDoubleClickOnIPad())return this.onCellDoubleClicked(e),void e.preventDefault();var t=this.beans,o=t.eventService,r=t.rangeService,n=t.gridOptionsWrapper,i=e.ctrlKey||e.metaKey;r&&i&&r.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&r.intersectLastRange(!0);var s=this.cellCtrl.createEvent(e,We.EVENT_CELL_CLICKED);o.dispatchEvent(s);var a=this.column.getColDef();a.onCellClicked&&window.setTimeout((function(){return a.onCellClicked(s)}),0),(n.isSingleClickEdit()||a.singleClickEdit)&&!n.isSuppressClickEdit()&&this.cellCtrl.startRowOrCellEdit()},t.prototype.isDoubleClickOnIPad=function(){if(!bt()||Te("dblclick"))return!1;var e=(new Date).getTime(),t=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,t},t.prototype.onCellDoubleClicked=function(e){var t=this.column.getColDef(),o=this.cellCtrl.createEvent(e,We.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.cellCtrl.startRowOrCellEdit(null,null,e)},t.prototype.onMouseDown=function(e){var t=e.ctrlKey,o=e.metaKey,r=e.shiftKey,n=e.target,i=this.beans,s=i.eventService,a=i.rangeService;if(!this.isRightClickInExistingRange(e)){var l=a&&0!=a.getCellRanges().length;if(!r||!l){var u=(wt()||Et())&&!this.cellCtrl.isEditing()&&!Co(n);this.cellCtrl.focusCell(u)}if(r&&l&&e.preventDefault(),!this.containsWidget(n)){if(a){var p=this.cellCtrl.getCellPosition();if(r)a.extendLatestRangeToCell(p);else{var c=t||o;a.setRangeToCell(p,c)}}s.dispatchEvent(this.cellCtrl.createEvent(e,We.EVENT_CELL_MOUSE_DOWN))}}},t.prototype.isRightClickInExistingRange=function(e){var t=this.beans.rangeService;return!(!t||!t.isCellInAnyRange(this.cellCtrl.getCellPosition())||2!==e.button)},t.prototype.containsWidget=function(e){return So(e,"ag-selection-checkbox",3)},t.prototype.onMouseOut=function(e){if(!this.mouseStayingInsideCell(e)){var t=this.cellCtrl.createEvent(e,We.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.clearMouseOver()}},t.prototype.onMouseOver=function(e){if(!this.mouseStayingInsideCell(e)){var t=this.cellCtrl.createEvent(e,We.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.setMouseOver([this.column])}},t.prototype.mouseStayingInsideCell=function(e){if(!e.target||!e.relatedTarget)return!1;var t=this.cellCtrl.getGui(),o=t.contains(e.target),r=t.contains(e.relatedTarget);return o&&r},t.prototype.destroy=function(){},t}(Za),Ja=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),el=function(e){function t(t,o,r,n,i){var s=e.call(this)||this;return s.cellCtrl=t,s.beans=o,s.rowNode=n,s.rowCtrl=i,s}return Ja(t,e),t.prototype.setComp=function(e){this.eGui=e},t.prototype.onKeyDown=function(e){var t=e.key;switch(t){case jr.ENTER:this.onEnterKeyDown(e);break;case jr.F2:this.onF2KeyDown(e);break;case jr.ESCAPE:this.onEscapeKeyDown(e);break;case jr.TAB:this.onTabKeyDown(e);break;case jr.BACKSPACE:case jr.DELETE:this.onBackspaceOrDeleteKeyPressed(t,e);break;case jr.DOWN:case jr.UP:case jr.RIGHT:case jr.LEFT:this.onNavigationKeyPressed(e,t)}},t.prototype.onNavigationKeyPressed=function(e,t){this.cellCtrl.isEditing()||(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(e):this.beans.navigationService.navigateToNextCell(e,t,this.cellCtrl.getCellPosition(),!0),e.preventDefault())},t.prototype.onShiftRangeSelect=function(e){if(this.beans.rangeService){var t=this.beans.rangeService.extendLatestRangeInDirection(e);t&&this.beans.navigationService.ensureCellVisible(t)}},t.prototype.onTabKeyDown=function(e){this.beans.navigationService.onTabKeyDown(this.cellCtrl,e)},t.prototype.onBackspaceOrDeleteKeyPressed=function(e,t){var o=this,r=o.cellCtrl,n=o.beans,i=o.rowNode,s=n.gridOptionsWrapper,a=n.rangeService,l=n.eventService;r.isEditing()||(l.dispatchEvent({type:We.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),Kr(e,s.isEnableCellEditingOnBackspace())?a&&s.isEnableRangeSelection()?a.clearCellRangeCellValues():r.isCellEditable()&&i.setDataValue(r.getColumn(),null,"cellKeyboardListenerFeature"):r.startRowOrCellEdit(e,void 0,t),l.dispatchEvent({type:We.EVENT_KEY_SHORTCUT_CHANGED_CELL_END}))},t.prototype.onEnterKeyDown=function(e){this.cellCtrl.isEditing()||this.rowCtrl.isEditing()?this.cellCtrl.stopEditingAndFocus():this.beans.gridOptionsWrapper.isEnterMovesDown()?this.beans.navigationService.navigateToNextCell(null,jr.DOWN,this.cellCtrl.getCellPosition(),!1):(this.cellCtrl.startRowOrCellEdit(jr.ENTER,void 0,e),this.cellCtrl.isEditing()&&e.preventDefault())},t.prototype.onF2KeyDown=function(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(jr.F2,void 0,e)},t.prototype.onEscapeKeyDown=function(e){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0))},t.prototype.onKeyPress=function(e){if(e.target===this.eGui&&!this.cellCtrl.isEditing()){var t=String.fromCharCode(e.charCode);" "===t?this.onSpaceKeyPressed(e):Br(e)&&(this.cellCtrl.startRowOrCellEdit(null,t,e),e.preventDefault())}},t.prototype.onSpaceKeyPressed=function(e){var t=this.beans.gridOptionsWrapper;if(!this.cellCtrl.isEditing()&&t.isRowSelection()){var o=this.rowNode.isSelected(),r=!o;if(r||!t.isSuppressRowDeselection()){var n=this.beans.gridOptionsWrapper.isGroupSelectsFiltered(),i=this.rowNode.setSelectedParams({newValue:r,rangeSelect:e.shiftKey,groupSelectsFiltered:n});void 0===o&&0===i&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:n})}}e.preventDefault()},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(Ge),tl=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),ol=function(e){function t(t,o,r,n){var i=e.call(this,'<div class="ag-drag-handle ag-row-drag" draggable="true"></div>')||this;return i.rowNode=t,i.column=o,i.beans=r,i.eCell=n,i}return tl(t,e),t.prototype.postConstruct=function(){this.getGui().appendChild(Hr("rowDrag",this.beans.gridOptionsWrapper,null)),this.addGuiEventListener("mousedown",(function(e){e.stopPropagation()})),this.addDragSource(),this.checkVisibility()},t.prototype.addDragSource=function(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))},t.prototype.onDragStart=function(e){var t=this,o=this.column.getColDef().dndSourceOnRowDrag;e.dataTransfer.setDragImage(this.eCell,0,0),o?o({rowNode:this.rowNode,dragEvent:e,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()}):function(){try{var o=JSON.stringify(t.rowNode.data);e.dataTransfer.setData("application/json",o),e.dataTransfer.setData("text/plain",o)}catch(e){}}()},t.prototype.checkVisibility=function(){var e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)},function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);i>3&&s&&Object.defineProperty(t,o,s)}([B],t.prototype,"postConstruct",null),t}(mn),rl=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),nl=function(){return nl=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},nl.apply(this,arguments)},il="ag-cell-not-inline-editing",sl=0,al=function(e){function t(t,o,r,n){var i=e.call(this)||this;return i.suppressRefreshCell=!1,i.onCellCompAttachedFuncs=[],i.column=t,i.rowNode=o,i.beans=r,i.rowCtrl=n,i.instanceId=t.getId()+"-"+sl++,i.createCellPosition(),i.addFeatures(),i}return rl(t,e),t.prototype.addFeatures=function(){var e=this;this.cellPositionFeature=new Ua(this,this.beans),this.addDestroyFunc((function(){return e.cellPositionFeature.destroy()})),this.cellCustomStyleFeature=new za(this,this.beans),this.addDestroyFunc((function(){return e.cellCustomStyleFeature.destroy()})),this.cellMouseListenerFeature=new Qa(this,this.beans,this.column),this.addDestroyFunc((function(){return e.cellMouseListenerFeature.destroy()})),this.cellKeyboardListenerFeature=new el(this,this.beans,this.column,this.rowNode,this.rowCtrl),this.addDestroyFunc((function(){return e.cellKeyboardListenerFeature.destroy()})),this.beans.rangeService&&this.beans.gridOptionsWrapper.isEnableRangeSelection()&&(this.cellRangeFeature=new ja(this.beans,this),this.addDestroyFunc((function(){return e.cellRangeFeature.destroy()}))),this.addTooltipFeature()},t.prototype.addTooltipFeature=function(){var e=this,t={getColumn:function(){return e.column},getColDef:function(){return e.column.getColDef()},getRowIndex:function(){return e.cellPosition.rowIndex},getRowNode:function(){return e.rowNode},getGui:function(){return e.getGui()},getLocation:function(){return"cell"},getTooltipValue:function(){var t=e.column.getColDef(),o=e.rowNode.data;if(t.tooltipField&&n(o))return S(o,t.tooltipField,e.column.isTooltipFieldContainsDots());var r=t.tooltipValueGetter;return r?r({location:"cell",api:e.beans.gridOptionsWrapper.getApi(),columnApi:e.beans.gridOptionsWrapper.getColumnApi(),context:e.beans.gridOptionsWrapper.getContext(),colDef:e.column.getColDef(),column:e.column,rowIndex:e.cellPosition.rowIndex,node:e.rowNode,data:e.rowNode.data,value:e.value,valueFormatted:e.valueFormatted}):null},getValueFormatted:function(){return e.valueFormatted}};this.tooltipFeature=new $a(t,this.beans),this.addDestroyFunc((function(){return e.tooltipFeature.destroy()}))},t.prototype.setComp=function(e,t,o,r,n){this.cellComp=e,this.gow=this.beans.gridOptionsWrapper,this.eGui=t,this.printLayout=r,this.updateAndFormatValue(!0),this.addDomData(),this.onCellFocused(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),o&&this.setupAutoHeight(o),this.setAriaColIndex(),this.gow.isSuppressCellFocus()||this.cellComp.setTabIndex(-1);var i=$e(this.column.getId());this.cellComp.setColId(i),this.cellComp.setRole("gridcell"),this.cellPositionFeature.setComp(t),this.cellCustomStyleFeature.setComp(e),this.tooltipFeature.setComp(e),this.cellKeyboardListenerFeature.setComp(this.eGui),this.cellRangeFeature&&this.cellRangeFeature.setComp(e,t),n&&this.isCellEditable()?this.startEditing():this.showValue(),this.onCellCompAttachedFuncs.length&&(this.onCellCompAttachedFuncs.forEach((function(e){return e()})),this.onCellCompAttachedFuncs=[])},t.prototype.setupAutoHeight=function(e){var t=this;if(this.column.isAutoHeight()){var o=e.parentElement,r=this.beans.gridOptionsWrapper.getRowHeightForNode(this.rowNode).height,n=function(i){if(!t.editing&&t.isAlive()){var s=Ro(o),a=s.paddingTop,l=s.paddingBottom,u=e.offsetHeight+a+l;if(i<5){var p=t.beans.gridOptionsWrapper.getDocument();if(!p||!p.contains(e)||0==u)return void t.beans.frameworkOverrides.setTimeout((function(){return n(i+1)}),0)}var c=Math.max(u,r);t.rowNode.setRowAutoHeight(c,t.column)}},i=function(){return n(0)};i();var s=this.beans.resizeObserverService.observeResize(e,i);this.addDestroyFunc((function(){s(),t.rowNode.setRowAutoHeight(void 0,t.column)}))}},t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.showValue=function(e){void 0===e&&(e=!1);var t=null!=this.valueFormatted?this.valueFormatted:this.value,o=this.createCellRendererParams(),r=this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(),o);this.cellComp.setRenderDetails(r,t,e),this.refreshHandle()},t.prototype.setupControlComps=function(){var e=this.column.getColDef();this.includeSelection=this.isIncludeControl(e.checkboxSelection),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.cellComp.setIncludeSelection(this.includeSelection),this.cellComp.setIncludeDndSource(this.includeDndSource),this.cellComp.setIncludeRowDrag(this.includeRowDrag)},t.prototype.isForceWrapper=function(){return this.beans.gridOptionsWrapper.isEnableCellTextSelection()||this.column.isAutoHeight()},t.prototype.isIncludeControl=function(e){return!(null!=this.rowNode.rowPinned||"function"!=typeof e&&!0!==e)},t.prototype.refreshShouldDestroy=function(){var e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(e.checkboxSelection),o=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),r=this.includeDndSource!=this.isIncludeControl(e.dndSource);return t||o||r},t.prototype.startEditing=function(e,t,o,r){var n,i,s=this;if(void 0===e&&(e=null),void 0===t&&(t=null),void 0===o&&(o=!1),void 0===r&&(r=null),this.isCellEditable()&&!this.editing)if(this.cellComp){var a=this.createCellEditorParams(e,t,o),l=this.column.getColDef(),u=this.beans.userComponentFactory.getCellEditorDetails(l,a),p=null!=(null===(n=u)||void 0===n?void 0:n.popupFromSelector)?u.popupFromSelector:!!l.cellEditorPopup,c=null!=(null===(i=u)||void 0===i?void 0:i.popupPositionFromSelector)?u.popupPositionFromSelector:l.cellEditorPopupPosition;this.setEditing(!0,p),this.cellComp.setEditDetails(u,p,c);var d=this.createEvent(r,We.EVENT_CELL_EDITING_STARTED);this.beans.eventService.dispatchEvent(d)}else this.onCellCompAttachedFuncs.push((function(){s.startEditing(e,t,o,r)}))},t.prototype.setEditing=function(e,t){void 0===t&&(t=!1),this.editing!==e&&(this.editing=e,this.editingInPopup=t,this.setInlineEditingClass(),this.refreshHandle())},t.prototype.stopRowOrCellEdit=function(e){void 0===e&&(e=!1),this.beans.gridOptionsWrapper.isFullRowEdit()?this.rowCtrl.stopRowEditing(e):this.stopEditing(e)},t.prototype.onPopupEditorClosed=function(){this.isEditing()&&this.stopEditingAndFocus()},t.prototype.takeValueFromCellEditor=function(e){var t={newValueExists:!1};if(e)return t;var o=this.cellComp.getCellEditor();return o?o.isCancelAfterEnd&&o.isCancelAfterEnd()?t:{newValue:o.getValue(),newValueExists:!0}:t},t.prototype.saveNewValue=function(e,t){if(t===e)return!1;if(this.beans.gridOptionsWrapper.isReadOnlyEdit())return this.dispatchEventForSaveValueReadOnly(e,t),!1;this.suppressRefreshCell=!0;var o=this.rowNode.setDataValue(this.column,t);return this.suppressRefreshCell=!1,o},t.prototype.dispatchEventForSaveValueReadOnly=function(e,t){var o=this.rowNode,r={type:We.EVENT_CELL_EDIT_REQUEST,event:null,rowIndex:o.rowIndex,rowPinned:o.rowPinned,column:this.column,api:this.beans.gridApi,columnApi:this.beans.columnApi,colDef:this.column.getColDef(),context:this.beans.gridOptionsWrapper.getContext(),data:o.data,node:o,oldValue:e,newValue:t,value:t,source:void 0};this.beans.eventService.dispatchEvent(r)},t.prototype.stopEditing=function(e){if(void 0===e&&(e=!1),!this.editing)return!1;var t=this.takeValueFromCellEditor(e),o=t.newValue,r=t.newValueExists,n=this.getValueFromValueService(),i=!1;return r&&(i=this.saveNewValue(n,o)),this.setEditing(!1),this.cellComp.setEditDetails(),this.updateAndFormatValue(),this.refreshCell({forceRefresh:!0,suppressFlash:!0}),this.dispatchEditingStoppedEvent(n,o,!e&&!!i),i},t.prototype.dispatchEditingStoppedEvent=function(e,t,o){var r=nl(nl({},this.createEvent(null,We.EVENT_CELL_EDITING_STOPPED)),{oldValue:e,newValue:t,valueChanged:o});this.beans.eventService.dispatchEvent(r)},t.prototype.setInlineEditingClass=function(){var e=this;if(this.isAlive())if(this.cellComp){var t=this.editing&&!this.editingInPopup,o=this.editing&&this.editingInPopup;this.cellComp.addOrRemoveCssClass("ag-cell-inline-editing",t),this.cellComp.addOrRemoveCssClass(il,!t),this.cellComp.addOrRemoveCssClass("ag-cell-popup-editing",o),this.rowCtrl.setInlineEditingCss(this.editing)}else this.onCellCompAttachedFuncs.push((function(){e.setInlineEditingClass()}))},t.prototype.hackSayEditingInPopup=function(){this.editingInPopup||(this.editingInPopup=!0,this.setInlineEditingClass())},t.prototype.createCellEditorParams=function(e,t,o){return{value:this.getValueFromValueService(),key:e,eventKey:e,charPress:t,column:this.column,colDef:this.column.getColDef(),rowIndex:this.getCellPosition().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(),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.createCellRendererParams=function(){var e=this;return{value:this.value,valueFormatted:this.valueFormatted,getValue:this.getValueFromValueService.bind(this),setValue:function(t){return e.beans.valueService.setValue(e.rowNode,e.column,t)},formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,pinned:this.column.getPinned(),colDef:this.column.getColDef(),column:this.column,rowIndex:this.getCellPosition().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.cellComp.getParentOfValue(),registerRowDragger:function(t,o,r,n){return e.registerRowDragger(t,o,n)},addRowCompListener:function(t,o){console.warn("AG Grid: since AG Grid v26, params.addRowCompListener() is deprecated. If you need this functionality, please contact AG Grid support and advise why so that we can revert with an appropriate workaround, as we dont have any valid use cases for it. This method was originally provided as a work around to know when cells were destroyed in AG Grid before custom Cell Renderers could be provided."),e.rowCtrl.addEventListener(t,o)}}},t.prototype.parseValue=function(e){var t=this.column.getColDef(),o={node:this.rowNode,data:this.rowNode.data,oldValue:this.getValue(),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 n(r)?this.beans.expressionService.evaluate(r,o):e},t.prototype.setFocusOutOnEditor=function(){if(this.editing){var e=this.cellComp.getCellEditor();e&&e.focusOut&&e.focusOut()}},t.prototype.setFocusInOnEditor=function(){if(this.editing){var e=this.cellComp.getCellEditor();e&&e.focusIn?e.focusIn():this.focusCell(!0)}},t.prototype.onCellChanged=function(e){this.cellComp&&e.column===this.column&&this.refreshCell({})},t.prototype.refreshCell=function(e){if(!this.suppressRefreshCell&&!this.editing&&this.cellComp){var t=this.column.getColDef(),o=null!=e&&!!e.newData,r=null!=e&&!!e.suppressFlash||!!t.suppressCellFlash,n=null==t.field&&null==t.valueGetter&&null==t.showRowGroup,i=e&&e.forceRefresh||n||o,s=this.updateAndFormatValue();if(i||s){this.showValue(o);var a=this.beans.filterManager.isSuppressFlashingCellsBecauseFiltering();!r&&!a&&(this.beans.gridOptionsWrapper.isEnableCellChangeFlash()||t.enableCellChangeFlash)&&this.flashCell(),this.cellCustomStyleFeature.applyUserStyles(),this.cellCustomStyleFeature.applyClassesFromColDef()}this.refreshToolTip(),this.cellCustomStyleFeature.applyCellClassRules()}},t.prototype.stopEditingAndFocus=function(e){void 0===e&&(e=!1),this.stopRowOrCellEdit(),this.focusCell(!0),e||this.navigateAfterEdit()},t.prototype.navigateAfterEdit=function(){this.beans.gridOptionsWrapper.isFullRowEdit()||this.beans.gridOptionsWrapper.isEnterMovesDownAfterEdit()&&this.beans.navigationService.navigateToNextCell(null,jr.DOWN,this.getCellPosition(),!1)},t.prototype.flashCell=function(e){var t=e&&e.flashDelay,o=e&&e.fadeDelay;this.animateCell("data-changed",t,o)},t.prototype.animateCell=function(e,t,o){var r=this,i="ag-cell-"+e,s="ag-cell-"+e+"-animation",a=this.beans.gridOptionsWrapper;t||(t=a.getCellFlashDelay()),n(o)||(o=a.getCellFadeDelay()),this.cellComp.addOrRemoveCssClass(i,!0),this.cellComp.addOrRemoveCssClass(s,!1),window.setTimeout((function(){r.isAlive()&&(r.cellComp.addOrRemoveCssClass(i,!1),r.cellComp.addOrRemoveCssClass(s,!0),r.eGui.style.transition="background-color "+o+"ms",window.setTimeout((function(){r.isAlive()&&(r.cellComp.addOrRemoveCssClass(s,!1),r.eGui.style.transition="")}),o))}),t)},t.prototype.onFlashCells=function(e){if(this.cellComp){var t=this.beans.cellPositionUtils.createId(this.getCellPosition());e.cells[t]&&this.animateCell("highlight")}},t.prototype.isCellEditable=function(){return this.column.isCellEditable(this.rowNode)},t.prototype.isSuppressFillHandle=function(){return this.column.isSuppressFillHandle()},t.prototype.formatValue=function(e){var t=this.callValueFormatter(e);return null!=t?t:e},t.prototype.callValueFormatter=function(e){return this.beans.valueFormatterService.formatValue(this.column,this.rowNode,e)},t.prototype.updateAndFormatValue=function(e){void 0===e&&(e=!1);var t=this.value,o=this.valueFormatted;return this.value=this.getValueFromValueService(),this.valueFormatted=this.callValueFormatter(this.value),!!e||!this.valuesAreEqual(t,this.value)||this.valueFormatted!=o},t.prototype.valuesAreEqual=function(e,t){var o=this.column.getColDef();return o.equals?o.equals(e,t):e===t},t.prototype.getComp=function(){return this.cellComp},t.prototype.getValueFromValueService=function(){var e=this.rowNode.leafGroup&&this.beans.columnModel.isPivotMode(),t=this.rowNode.group&&this.rowNode.expanded&&!this.rowNode.footer&&!e,o=this.beans.gridOptionsWrapper.isGroupIncludeFooter(),r=this.beans.gridOptionsWrapper.isGroupSuppressBlankHeader(),n=t&&o&&!r;return this.beans.valueService.getValue(this.column,this.rowNode,!1,n)},t.prototype.getValue=function(){return this.value},t.prototype.getValueFormatted=function(){return this.valueFormatted},t.prototype.addDomData=function(){var e=this,o=this.getGui();this.beans.gridOptionsWrapper.setDomData(o,t.DOM_DATA_KEY_CELL_CTRL,this),this.addDestroyFunc((function(){return e.beans.gridOptionsWrapper.setDomData(o,t.DOM_DATA_KEY_CELL_CTRL,null)}))},t.prototype.createEvent=function(e,t){return{type:t,node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.column.getColDef(),context:this.beans.gridOptionsWrapper.getContext(),api:this.beans.gridApi,columnApi:this.beans.columnApi,rowPinned:this.rowNode.rowPinned,event:e,rowIndex:this.rowNode.rowIndex}},t.prototype.onKeyPress=function(e){this.cellKeyboardListenerFeature.onKeyPress(e)},t.prototype.onKeyDown=function(e){this.cellKeyboardListenerFeature.onKeyDown(e)},t.prototype.onMouseEvent=function(e,t){this.cellMouseListenerFeature.onMouseEvent(e,t)},t.prototype.getGui=function(){return this.eGui},t.prototype.refreshToolTip=function(){this.tooltipFeature.refreshToolTip()},t.prototype.getColSpanningList=function(){return this.cellPositionFeature.getColSpanningList()},t.prototype.onLeftChanged=function(){this.cellComp&&this.cellPositionFeature.onLeftChanged()},t.prototype.onDisplayedColumnsChanged=function(){this.eGui&&this.setAriaColIndex()},t.prototype.setAriaColIndex=function(){var e=this.beans.columnModel.getAriaColumnIndex(this.column);br(this.getGui(),e)},t.prototype.isSuppressNavigable=function(){return this.column.isSuppressNavigable(this.rowNode)},t.prototype.onWidthChanged=function(){return this.cellPositionFeature.onWidthChanged()},t.prototype.getColumn=function(){return this.column},t.prototype.getRowNode=function(){return this.rowNode},t.prototype.getBeans=function(){return this.beans},t.prototype.isPrintLayout=function(){return this.printLayout},t.prototype.appendChild=function(e){this.eGui.appendChild(e)},t.prototype.refreshHandle=function(){this.cellRangeFeature&&this.cellRangeFeature.refreshHandle()},t.prototype.getCellPosition=function(){return this.cellPosition},t.prototype.isEditing=function(){return this.editing},t.prototype.startRowOrCellEdit=function(e,t,o){void 0===o&&(o=null),this.cellComp&&(this.beans.gridOptionsWrapper.isFullRowEdit()?this.rowCtrl.startRowEditing(e,t,this):this.startEditing(e,t,!0,o))},t.prototype.getRowCtrl=function(){return this.rowCtrl},t.prototype.getRowPosition=function(){return{rowIndex:this.cellPosition.rowIndex,rowPinned:this.cellPosition.rowPinned}},t.prototype.updateRangeBordersIfRangeCount=function(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.updateRangeBordersIfRangeCount()},t.prototype.onRangeSelectionChanged=function(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()},t.prototype.isRangeSelectionEnabled=function(){return null!=this.cellRangeFeature},t.prototype.focusCell=function(e){void 0===e&&(e=!1),this.beans.focusService.setFocusedCell({rowIndex:this.getCellPosition().rowIndex,column:this.column,rowPinned:this.rowNode.rowPinned,forceBrowserFocus:e})},t.prototype.onRowIndexChanged=function(){this.createCellPosition(),this.onCellFocused(),this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()},t.prototype.onFirstRightPinnedChanged=function(){if(this.cellComp){var e=this.column.isFirstRightPinned();this.cellComp.addOrRemoveCssClass("ag-cell-first-right-pinned",e)}},t.prototype.onLastLeftPinnedChanged=function(){if(this.cellComp){var e=this.column.isLastLeftPinned();this.cellComp.addOrRemoveCssClass("ag-cell-last-left-pinned",e)}},t.prototype.onCellFocused=function(e){if(this.cellComp&&!this.gow.isSuppressCellFocus()){var t=this.beans.focusService.isCellFocused(this.cellPosition);this.cellComp.addOrRemoveCssClass("ag-cell-focus",t),t&&e&&e.forceBrowserFocus&&this.cellComp.getFocusableElement().focus({preventScroll:!!e.preventScrollOnBrowserFocus});var o=this.beans.gridOptionsWrapper.isFullRowEdit();t||o||!this.editing||this.stopRowOrCellEdit()}},t.prototype.createCellPosition=function(){this.cellPosition={rowIndex:this.rowNode.rowIndex,rowPinned:r(this.rowNode.rowPinned),column:this.column}},t.prototype.applyStaticCssClasses=function(){this.cellComp.addOrRemoveCssClass("ag-cell",!0),this.cellComp.addOrRemoveCssClass(il,!0);var e=1==this.column.isAutoHeight();this.cellComp.addOrRemoveCssClass("ag-cell-auto-height",e),this.cellComp.addOrRemoveCssClass("ag-cell-normal-height",!e)},t.prototype.onColumnHover=function(){if(this.cellComp&&this.beans.gridOptionsWrapper.isColumnHoverHighlight()){var e=this.beans.columnHoverService.isHovered(this.column);this.cellComp.addOrRemoveCssClass("ag-column-hover",e)}},t.prototype.onColDefChanged=function(){this.cellComp&&(this.setWrapText(),this.editing||this.refreshCell({forceRefresh:!0,suppressFlash:!0}))},t.prototype.setWrapText=function(){var e=1==this.column.getColDef().wrapText;this.cellComp.addOrRemoveCssClass("ag-cell-wrap-text",e)},t.prototype.dispatchCellContextMenuEvent=function(e){var t=this.column.getColDef(),o=this.createEvent(e,We.EVENT_CELL_CONTEXT_MENU);this.beans.eventService.dispatchEvent(o),t.onCellContextMenu&&window.setTimeout((function(){return t.onCellContextMenu(o)}),0)},t.prototype.getCellRenderer=function(){return this.cellComp?this.cellComp.getCellRenderer():null},t.prototype.getCellEditor=function(){return this.cellComp?this.cellComp.getCellEditor():null},t.prototype.destroy=function(){this.onCellCompAttachedFuncs=[],e.prototype.destroy.call(this)},t.prototype.createSelectionCheckbox=function(){var e=new ls;return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e},t.prototype.createDndSource=function(){var e=new ol(this.rowNode,this.column,this.beans,this.eGui);return this.beans.context.createBean(e),e},t.prototype.registerRowDragger=function(e,t,o){var r=this;if(this.customRowDragComp)this.customRowDragComp.setDragElement(e,t);else{var n=this.createRowDragComp(e,t,o);n&&(this.customRowDragComp=n,this.addDestroyFunc((function(){return r.beans.context.destroyBean(n)})))}},t.prototype.createRowDragComp=function(e,t,o){var r=this,n=this.beans.gridOptionsWrapper.isPagination(),i=this.beans.gridOptionsWrapper.isRowDragManaged(),s=this.beans.gridOptionsWrapper.isRowModelDefault();if(i){if(!s)return void T((function(){return console.warn("AG Grid: managed row dragging is only allowed in the Client Side Row Model")}),"CellComp.addRowDragging");if(n)return void T((function(){return console.warn("AG Grid: managed row dragging is not possible when doing pagination")}),"CellComp.addRowDragging")}var a=new ms((function(){return r.value}),this.rowNode,this.column,e,t,o);return this.beans.context.createBean(a),a},t.DOM_DATA_KEY_CELL_CTRL="cellCtrl",t}(Ge),ll=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),ul=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s};!function(e){e.Normal="Normal",e.FullWidth="FullWidth",e.FullWidthLoading="FullWidthLoading",e.FullWidthGroup="FullWidthGroup",e.FullWidthDetail="FullWidthDetail"}(Ha||(Ha={}));var pl,cl,dl=0,hl=function(e){function t(t,o,r,n,i){var s=e.call(this)||this;return s.allRowGuis=[],s.active=!0,s.centerCellCtrls={list:[],map:{}},s.leftCellCtrls={list:[],map:{}},s.rightCellCtrls={list:[],map:{}},s.lastMouseDownOnDragger=!1,s.updateColumnListsPending=!1,s.beans=o,s.rowNode=t,s.paginationPage=s.beans.paginationProxy.getCurrentPage(),s.useAnimationFrameForCreate=n,s.printLayout=i,s.instanceId=t.id+"-"+dl++,s.setAnimateFlags(r),s.rowFocused=s.beans.focusService.isRowFocused(s.rowNode.rowIndex,s.rowNode.rowPinned),s.rowLevel=s.beans.rowCssClassCalculator.calculateRowLevel(s.rowNode),s.setRowType(),s.addListeners(),s}return ll(t,e),t.prototype.isSticky=function(){return this.rowNode.sticky},t.prototype.getBeans=function(){return this.beans},t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.setComp=function(e,t,o){var r={rowComp:e,element:t,containerType:o};this.allRowGuis.push(r),o===cl.LEFT?this.leftGui=r:o===cl.RIGHT?this.rightGui=r:o===cl.FULL_WIDTH?this.fullWidthGui=r:this.centerGui=r;var n=null!=this.leftGui&&null!=this.rightGui&&null!=this.centerGui,i=null!=this.fullWidthGui;(n||i)&&this.initialiseRowComps(),"FullWidthLoading"!==this.rowType&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent()},t.prototype.isCacheable=function(){return this.rowType===Ha.FullWidthDetail&&this.beans.gridOptionsWrapper.isKeepDetailRows()},t.prototype.setCached=function(e){var t=e?"none":"";this.allRowGuis.forEach((function(e){return e.element.style.display=t}))},t.prototype.initialiseRowComps=function(){var e=this,o=this.beans.gridOptionsWrapper;this.onRowHeightChanged(),this.updateRowIndexes(),this.setFocusedClasses(),this.setStylesFromGridOptions(),o.isRowSelection()&&this.rowNode.selectable&&this.onRowSelected(),this.updateColumnLists(!this.useAnimationFrameForCreate),this.slideRowIn&&M(this.onTopChanged.bind(this)),this.fadeRowIn&&M((function(){e.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}))}));var r=this.getRowBusinessKey(),n=$e(this.rowNode.id),i=$e(r);this.allRowGuis.forEach((function(r){var s=r.rowComp;s.setRole("row"),e.getInitialRowClasses(r.containerType).forEach((function(e){return s.addOrRemoveCssClass(e,!0)})),e.rowNode.group&&yr(r.element,1==e.rowNode.expanded),null!=n&&s.setRowId(n),null!=i&&s.setRowBusinessKey(i),e.isFullWidth()&&!e.beans.gridOptionsWrapper.isSuppressCellFocus()&&s.setTabIndex(-1),o.setDomData(r.element,t.DOM_DATA_KEY_ROW_CTRL,e),e.addDestroyFunc((function(){return o.setDomData(r.element,t.DOM_DATA_KEY_ROW_CTRL,null)})),e.useAnimationFrameForCreate?e.beans.animationFrameService.createTask(e.addHoverFunctionality.bind(e,r.element),e.rowNode.rowIndex,"createTasksP2"):e.addHoverFunctionality(r.element),e.isFullWidth()&&e.setupFullWidth(r),o.isRowDragEntireRow()&&e.addRowDraggerToRow(r),e.useAnimationFrameForCreate&&e.beans.animationFrameService.addDestroyTask((function(){e.isAlive()&&r.rowComp.addOrRemoveCssClass("ag-after-created",!0)}))})),this.executeProcessRowPostCreateFunc()},t.prototype.addRowDraggerToRow=function(e){var t=this.beans.gridOptionsWrapper;if(t.isEnableRangeSelection())T((function(){console.warn("AG Grid: Setting `rowDragEntireRow: true` in the gridOptions doesn't work with `enableRangeSelection: true`")}),"rowDragAndRangeSelectionEnabled");else{var o=t.getLocaleTextFunc(),r=new ms((function(){return"1 "+o("rowDragRow","row")}),this.rowNode,void 0,e.element,void 0,!0);this.createManagedBean(r,this.beans.context)}},t.prototype.setupFullWidth=function(e){var t=this.getPinnedForContainer(e.containerType),o=this.createFullWidthParams(e.element,t),r=re.isRegistered(X.MasterDetailModule);if(this.rowType!=Ha.FullWidthDetail||r){var n;switch(this.rowType){case Ha.FullWidthDetail:n=this.beans.userComponentFactory.getFullWidthDetailCellRendererDetails(o);break;case Ha.FullWidthGroup:n=this.beans.userComponentFactory.getFullWidthGroupCellRendererDetails(o);break;case Ha.FullWidthLoading:n=this.beans.userComponentFactory.getFullWidthLoadingCellRendererDetails(o);break;default:n=this.beans.userComponentFactory.getFullWidthCellRendererDetails(o)}e.rowComp.showFullWidth(n)}else re.isPackageBased()?console.warn("AG Grid: cell renderer 'agDetailCellRenderer' (for master detail) not found. Can only be used with ag-grid-enterprise package."):console.warn("AG Grid: cell renderer 'agDetailCellRenderer' (for master detail) not found. Can only be used with AG Grid Enterprise Module "+X.MasterDetailModule)},t.prototype.isPrintLayout=function(){return this.printLayout},t.prototype.getCellElement=function(e){var t=this.getCellCtrl(e);return t?t.getGui():null},t.prototype.executeProcessRowPostCreateFunc=function(){var e=this.beans.gridOptionsWrapper.getProcessRowPostCreateFunc();e&&e({eRow:this.centerGui?this.centerGui.element:void 0,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)})},t.prototype.setRowType=function(){var e=this.rowNode.stub,t=this.rowNode.isFullWidthCell(),o=this.beans.doingMasterDetail&&this.rowNode.detail,r=this.beans.columnModel.isPivotMode(),n=!!this.rowNode.group&&!this.rowNode.footer&&this.beans.gridOptionsWrapper.isGroupUseEntireRow(r);this.rowType=e?Ha.FullWidthLoading:o?Ha.FullWidthDetail:t?Ha.FullWidth:n?Ha.FullWidthGroup:Ha.Normal},t.prototype.updateColumnLists=function(e){var t=this;void 0===e&&(e=!1),this.isFullWidth()||(e||this.beans.gridOptionsWrapper.isSuppressAnimationFrame()||this.printLayout?this.updateColumnListsImpl():this.updateColumnListsPending||(this.beans.animationFrameService.createTask((function(){t.active&&t.updateColumnListsImpl()}),this.rowNode.rowIndex,"createTasksP1"),this.updateColumnListsPending=!0))},t.prototype.createCellCtrls=function(e,t,o){var r=this;void 0===o&&(o=null);var n={list:[],map:{}},i=function(e,t){n.list.push(t),n.map[e]=t};return t.forEach((function(t){var o=t.getInstanceId(),n=e.map[o];n||(n=new al(t,r.rowNode,r.beans,r)),i(o,n)})),e.list.forEach((function(e){null!=n.map[e.getColumn().getInstanceId()]||(r.isCellEligibleToBeRemoved(e,o)?e.destroy():i(e.getColumn().getInstanceId(),e))})),n},t.prototype.updateColumnListsImpl=function(){var e=this;this.updateColumnListsPending=!1;var t=this.beans.columnModel;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.getAllDisplayedColumns()),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{var o=t.getViewportCenterColumnsForRow(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,o);var r=t.getDisplayedLeftColumnsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,r,oe.PINNED_LEFT);var n=t.getDisplayedRightColumnsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,n,oe.PINNED_RIGHT)}this.allRowGuis.forEach((function(t){var o=t.containerType===cl.LEFT?e.leftCellCtrls:t.containerType===cl.RIGHT?e.rightCellCtrls:e.centerCellCtrls;t.rowComp.setCellCtrls(o.list)}))},t.prototype.isCellEligibleToBeRemoved=function(e,t){var o=!0;if(e.getColumn().getPinned()!=t)return o;var r=e.isEditing(),n=this.beans.focusService.isCellFocused(e.getCellPosition());if(r||n){var i=e.getColumn();return!(this.beans.columnModel.getAllDisplayedColumns().indexOf(i)>=0)&&o}return o},t.prototype.setAnimateFlags=function(e){if(!this.isSticky()&&e){var t=n(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.rowType!==Ha.Normal},t.prototype.getRowType=function(){return this.rowType},t.prototype.refreshFullWidth=function(){var e=this,t=function(t,o){if(!t)return!0;var r=t.rowComp.getFullWidthCellRenderer();if(!r)return!1;if(!r.refresh)return!1;var n=e.createFullWidthParams(t.element,o);return r.refresh(n)},o=t(this.fullWidthGui,null),r=t(this.centerGui,null),n=t(this.leftGui,oe.PINNED_LEFT),i=t(this.rightGui,oe.PINNED_RIGHT);return o&&r&&n&&i},t.prototype.addListeners=function(){this.addManagedListener(this.rowNode,ns.EVENT_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.rowNode,ns.EVENT_ROW_SELECTED,this.onRowSelected.bind(this)),this.addManagedListener(this.rowNode,ns.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addManagedListener(this.rowNode,ns.EVENT_TOP_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(this.rowNode,ns.EVENT_EXPANDED_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,ns.EVENT_HAS_CHILDREN_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,ns.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,ns.EVENT_CELL_CHANGED,this.onRowNodeCellChanged.bind(this)),this.addManagedListener(this.rowNode,ns.EVENT_HIGHLIGHT_CHANGED,this.onRowNodeHighlightChanged.bind(this)),this.addManagedListener(this.rowNode,ns.EVENT_DRAGGING_CHANGED,this.onRowNodeDraggingChanged.bind(this)),this.addManagedListener(this.rowNode,ns.EVENT_UI_LEVEL_CHANGED,this.onUiLevelChanged.bind(this));var e=this.beans.eventService;this.addManagedListener(e,We.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,this.onPaginationPixelOffsetChanged.bind(this)),this.addManagedListener(e,We.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(e,We.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(e,We.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(e,We.EVENT_CELL_FOCUSED,this.onCellFocusChanged.bind(this)),this.addManagedListener(e,We.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addManagedListener(e,We.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedListener(e,We.EVENT_COLUMN_MOVED,this.onColumnMoved.bind(this)),this.addListenersForCellComps()},t.prototype.onColumnMoved=function(){this.updateColumnLists()},t.prototype.addListenersForCellComps=function(){var e=this;this.addManagedListener(this.rowNode,ns.EVENT_ROW_INDEX_CHANGED,(function(){e.getAllCellCtrls().forEach((function(e){return e.onRowIndexChanged()}))})),this.addManagedListener(this.rowNode,ns.EVENT_CELL_CHANGED,(function(t){e.getAllCellCtrls().forEach((function(e){return e.onCellChanged(t)}))}))},t.prototype.onRowNodeDataChanged=function(e){this.getAllCellCtrls().forEach((function(t){return t.refreshCell({suppressFlash:!e.update,newData:!e.update})})),this.onRowSelected(),this.postProcessCss()},t.prototype.onRowNodeCellChanged=function(){this.postProcessCss()},t.prototype.postProcessCss=function(){this.setStylesFromGridOptions(),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()},t.prototype.onRowNodeHighlightChanged=function(){var e=this.rowNode.highlighted;this.allRowGuis.forEach((function(t){var o=e===Qn.Above,r=e===Qn.Below;t.rowComp.addOrRemoveCssClass("ag-row-highlight-above",o),t.rowComp.addOrRemoveCssClass("ag-row-highlight-below",r)}))},t.prototype.onRowNodeDraggingChanged=function(){this.postProcessRowDragging()},t.prototype.postProcessRowDragging=function(){var e=this.rowNode.dragging;this.allRowGuis.forEach((function(t){return t.rowComp.addOrRemoveCssClass("ag-row-dragging",e)}))},t.prototype.updateExpandedCss=function(){var e=this.rowNode.isExpandable(),t=1==this.rowNode.expanded;this.allRowGuis.forEach((function(o){o.rowComp.addOrRemoveCssClass("ag-row-group",e),o.rowComp.addOrRemoveCssClass("ag-row-group-expanded",e&&t),o.rowComp.addOrRemoveCssClass("ag-row-group-contracted",e&&!t),yr(o.element,e&&t)}))},t.prototype.onDisplayedColumnsChanged=function(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()},t.prototype.onVirtualColumnsChanged=function(){this.updateColumnLists()},t.prototype.getRowPosition=function(){return{rowPinned:r(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}},t.prototype.onKeyboardNavigate=function(e){var t=this.allRowGuis.find((function(t){return t.element.contains(e.target)}));if((t?t.element:null)===e.target){var o=this.rowNode,r=this.beans.focusService.getFocusedCell(),n={rowIndex:o.rowIndex,rowPinned:o.rowPinned,column:r&&r.column};this.beans.navigationService.navigateToNextCell(e,e.key,n,!0),e.preventDefault()}},t.prototype.onTabKeyDown=function(e){if(!e.defaultPrevented&&!Oe(e)){var t=this.allRowGuis.find((function(t){return t.element.contains(e.target)})),o=t?t.element:null,r=o===e.target,n=null;r||(n=this.beans.focusService.findNextFocusableElement(o,!1,e.shiftKey)),(this.isFullWidth()&&r||!n)&&this.beans.navigationService.onTabKeyDown(this,e)}},t.prototype.onFullWidthRowFocused=function(e){var t,o=this.rowNode,r=this.isFullWidth()&&e.rowIndex===o.rowIndex&&e.rowPinned==o.rowPinned,n=this.fullWidthGui?this.fullWidthGui.element:null===(t=this.centerGui)||void 0===t?void 0:t.element;n&&(n.classList.toggle("ag-full-width-focus",r),r&&n.focus({preventScroll:!0}))},t.prototype.refreshCell=function(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),this.updateColumnLists()},t.prototype.removeCellCtrl=function(e,t){var o={list:[],map:{}};return e.list.forEach((function(e){e!==t&&(o.list.push(e),o.map[e.getInstanceId()]=e)})),o},t.prototype.onMouseEvent=function(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(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(!Oe(e)){var t=this.createRowEventWithSource(We.EVENT_ROW_DOUBLE_CLICKED,e);this.beans.eventService.dispatchEvent(t)}},t.prototype.onRowMouseDown=function(e){if(this.lastMouseDownOnDragger=So(e.target,"ag-row-drag",3),this.isFullWidth()){var t=this.rowNode,o=this.beans.columnModel;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges(),this.beans.focusService.setFocusedCell({rowIndex:t.rowIndex,column:o.getAllDisplayedColumns()[0],rowPinned:t.rowPinned,forceBrowserFocus:!0})}},t.prototype.onRowClick=function(e){if(!Oe(e)&&!this.lastMouseDownOnDragger){var t=this.createRowEventWithSource(We.EVENT_ROW_CLICKED,e);this.beans.eventService.dispatchEvent(t);var o=e.ctrlKey||e.metaKey,r=e.shiftKey;if(!(this.beans.gridOptionsWrapper.isGroupSelectsChildren()&&this.rowNode.group||!this.rowNode.selectable||this.rowNode.rowPinned||!this.beans.gridOptionsWrapper.isRowSelection()||this.beans.gridOptionsWrapper.isSuppressRowClickSelection())){var n=this.beans.gridOptionsWrapper.isRowMultiSelectWithClick(),i=!this.beans.gridOptionsWrapper.isSuppressRowDeselection();if(this.rowNode.isSelected())n?this.rowNode.setSelectedParams({newValue:!1,event:e}):o?i&&this.rowNode.setSelectedParams({newValue:!1,event:e}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!r,rangeSelect:r,event:e});else{var s=!n&&!o;this.rowNode.setSelectedParams({newValue:!0,clearSelection:s,rangeSelect:r,event:e})}}}},t.prototype.setupDetailRowAutoHeight=function(e){var t=this;if(this.rowType===Ha.FullWidthDetail&&this.beans.gridOptionsWrapper.isDetailRowAutoHeight()){var o=function(){var o=e.clientHeight;null!=o&&o>0&&t.beans.frameworkOverrides.setTimeout((function(){t.rowNode.setRowHeight(o),t.beans.clientSideRowModel?t.beans.clientSideRowModel.onRowHeightChanged():t.beans.serverSideRowModel&&t.beans.serverSideRowModel.onRowHeightChanged()}),0)},r=this.beans.resizeObserverService.observeResize(e,o);this.addDestroyFunc(r),o()}},t.prototype.createFullWidthParams=function(e,t){var o=this;return{fullWidth:!0,data:this.rowNode.data,node:this.rowNode,value:this.rowNode.key,valueFormatted:this.rowNode.key,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),registerRowDragger:function(e,t,r,n){return o.addFullWidthRowDragging(e,t,r,n)}}},t.prototype.addFullWidthRowDragging=function(e,t,o,r){if(void 0===o&&(o=""),this.isFullWidth()){var n=new ms((function(){return o}),this.rowNode,void 0,e,t,r);this.createManagedBean(n,this.beans.context)}},t.prototype.onUiLevelChanged=function(){var e=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=e){var t="ag-row-level-"+e,o="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach((function(e){e.rowComp.addOrRemoveCssClass(t,!0),e.rowComp.addOrRemoveCssClass(o,!1)}))}this.rowLevel=e},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(){this.refreshFirstAndLastRowStyles()},t.prototype.refreshFirstAndLastRowStyles=function(){var e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach((function(t){return t.rowComp.addOrRemoveCssClass("ag-row-first",e)}))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass("ag-row-last",t)})))},t.prototype.stopEditing=function(e){var t,o;if(void 0===e&&(e=!1),!this.stoppingRowEdit){var r=this.getAllCellCtrls(),n=this.editingRow;this.stoppingRowEdit=!0;var i=!1;try{for(var s=function(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],r=0;if(o)return o.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),a=s.next();!a.done;a=s.next()){var l=a.value.stopEditing(e);n&&!e&&!i&&l&&(i=!0)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(t)throw t.error}}if(i){var u=this.createRowEvent(We.EVENT_ROW_VALUE_CHANGED);this.beans.eventService.dispatchEvent(u)}n&&this.setEditingRow(!1),this.stoppingRowEdit=!1}},t.prototype.setInlineEditingCss=function(e){this.allRowGuis.forEach((function(t){t.rowComp.addOrRemoveCssClass("ag-row-inline-editing",e),t.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!e)}))},t.prototype.setEditingRow=function(e){this.editingRow=e,this.allRowGuis.forEach((function(t){return t.rowComp.addOrRemoveCssClass("ag-row-editing",e)}));var t=e?this.createRowEvent(We.EVENT_ROW_EDITING_STARTED):this.createRowEvent(We.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(t)},t.prototype.startRowEditing=function(e,t,o,r){void 0===e&&(e=null),void 0===t&&(t=null),void 0===o&&(o=null),void 0===r&&(r=null),this.editingRow||this.getAllCellCtrls().reduce((function(n,i){var s=i===o;return s?i.startEditing(e,t,s,r):i.startEditing(null,null,s,r),!!n||i.isEditing()}),!1)&&this.setEditingRow(!0)},t.prototype.getAllCellCtrls=function(){return function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ul(arguments[t]));return e}(this.centerCellCtrls.list,this.leftCellCtrls.list,this.rightCellCtrls.list)},t.prototype.postProcessClassesFromGridOptions=function(){var e=this,t=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);t&&t.length&&t.forEach((function(t){e.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass(t,!0)}))}))},t.prototype.postProcessRowClassRules=function(){var e=this;this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,(function(t){e.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass(t,!0)}))}),(function(t){e.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass(t,!1)}))}))},t.prototype.setStylesFromGridOptions=function(){var e=this.processStylesFromGridOptions();this.allRowGuis.forEach((function(t){return t.rowComp.setUserStyles(e)}))},t.prototype.getRowBusinessKey=function(){var e=this.beans.gridOptionsWrapper.getBusinessKeyForNodeFunc();if("function"==typeof e)return e(this.rowNode)},t.prototype.getPinnedForContainer=function(e){return e===cl.LEFT?oe.PINNED_LEFT:e===cl.RIGHT?oe.PINNED_RIGHT:null},t.prototype.getInitialRowClasses=function(e){var t=this.getPinnedForContainer(e),o={rowNode:this.rowNode,rowFocused:this.rowFocused,fadeRowIn:this.fadeRowIn,rowIsEven:this.rowNode.rowIndex%2==0,rowLevel:this.rowLevel,fullWidthRow:this.isFullWidth(),firstRowOnPage:this.isFirstRowOnPage(),lastRowOnPage:this.isLastRowOnPage(),printLayout:this.printLayout,expandable:this.rowNode.isExpandable(),pinned:t};return this.beans.rowCssClassCalculator.getInitialRowClasses(o)},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,rowIndex:this.rowNode.rowIndex})),Object.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.onRowSelected=function(){var e=this,t=!!this.rowNode.isSelected();this.allRowGuis.forEach((function(o){o.rowComp.addOrRemoveCssClass("ag-row-selected",t),Ar(o.element,!!t||void 0);var r=e.createAriaLabel();pr(o.element,null==r?"":r)}))},t.prototype.createAriaLabel=function(){var e=this.rowNode.isSelected();if(!e||!this.beans.gridOptionsWrapper.isSuppressRowDeselection())return this.beans.gridOptionsWrapper.getLocaleTextFunc()(e?"ariaRowDeselect":"ariaRowSelect","Press SPACE to "+(e?"deselect":"select")+" this row.")},t.prototype.isUseAnimationFrameForCreate=function(){return this.useAnimationFrameForCreate},t.prototype.addHoverFunctionality=function(e){var t=this;this.active&&(this.addManagedListener(e,"mouseenter",(function(){return t.rowNode.onMouseEnter()})),this.addManagedListener(e,"mouseleave",(function(){return t.rowNode.onMouseLeave()})),this.addManagedListener(this.rowNode,ns.EVENT_MOUSE_ENTER,(function(){t.beans.gridOptionsWrapper.isSuppressRowHoverHighlight()||e.classList.add("ag-row-hover")})),this.addManagedListener(this.rowNode,ns.EVENT_MOUSE_LEAVE,(function(){e.classList.remove("ag-row-hover")})))},t.prototype.roundRowTopToBounds=function(e){var t=this.beans.ctrlsService.getGridBodyCtrl().getScrollFeature().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.getFrameworkOverrides=function(){return this.beans.frameworkOverrides},t.prototype.onRowHeightChanged=function(){if(null!=this.rowNode.rowHeight){var e=this.rowNode.rowHeight,t=this.beans.gridOptionsWrapper.getDefaultRowHeight(),o=this.beans.gridOptionsWrapper.isGetRowHeightFunction()?this.beans.gridOptionsWrapper.getRowHeightForNode(this.rowNode).height:void 0,r=o?Math.min(t,o)-2+"px":void 0;this.allRowGuis.forEach((function(t){t.element.style.height=e+"px",r&&t.element.style.setProperty("--ag-line-height",r)}))}},t.prototype.addEventListener=function(t,o){"renderedRowRemoved"!==t&&"rowRemoved"!==t||(t=We.EVENT_VIRTUAL_ROW_REMOVED,console.warn("AG Grid: Since version 11, event renderedRowRemoved is now called "+We.EVENT_VIRTUAL_ROW_REMOVED)),e.prototype.addEventListener.call(this,t,o)},t.prototype.removeEventListener=function(t,o){"renderedRowRemoved"!==t&&"rowRemoved"!==t||(t=We.EVENT_VIRTUAL_ROW_REMOVED,console.warn("AG Grid: Since version 11, event renderedRowRemoved and rowRemoved is now called "+We.EVENT_VIRTUAL_ROW_REMOVED)),e.prototype.removeEventListener.call(this,t,o)},t.prototype.destroyFirstPass=function(){this.active=!1,this.setupRemoveAnimation();var t=this.createRowEvent(We.EVENT_VIRTUAL_ROW_REMOVED);this.dispatchEvent(t),this.beans.eventService.dispatchEvent(t),e.prototype.destroy.call(this)},t.prototype.setupRemoveAnimation=function(){if(!this.isSticky())if(null!=this.rowNode.rowTop){var e=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(e)}else this.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0)}))},t.prototype.destroySecondPass=function(){this.allRowGuis.length=0;var e=function(e){return e.list.forEach((function(e){return e.destroy()})),{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)},t.prototype.setFocusedClasses=function(){var e=this;this.allRowGuis.forEach((function(t){t.rowComp.addOrRemoveCssClass("ag-row-focus",e.rowFocused),t.rowComp.addOrRemoveCssClass("ag-row-no-focus",!e.rowFocused)}))},t.prototype.onCellFocusChanged=function(){var e=this.beans.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);e!==this.rowFocused&&(this.rowFocused=e,this.setFocusedClasses()),!e&&this.editingRow&&this.stopEditing(!1)},t.prototype.onPaginationChanged=function(){var e=this.beans.paginationProxy.getCurrentPage();this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()},t.prototype.onTopChanged=function(){this.setRowTop(this.rowNode.rowTop)},t.prototype.onPaginationPixelOffsetChanged=function(){this.onTopChanged()},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&&n(e)){var t=this.applyPaginationOffset(e),o=(this.rowNode.isRowPinned()?t:this.beans.rowContainerHeightService.getRealPixelPosition(t))+"px";this.setRowTopStyle(o)}},t.prototype.getInitialRowTop=function(){return this.beans.gridOptionsWrapper.isSuppressRowTransform()?this.getInitialRowTopShared():void 0},t.prototype.getInitialTransform=function(){return this.beans.gridOptionsWrapper.isSuppressRowTransform()?void 0:"translateY("+this.getInitialRowTopShared()+")"},t.prototype.getInitialRowTopShared=function(){if(this.printLayout)return"";var e;if(this.isSticky())e=this.rowNode.stickyRowTop;else{var t=this.slideRowIn?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop,o=this.applyPaginationOffset(t);e=this.rowNode.isRowPinned()?o:this.beans.rowContainerHeightService.getRealPixelPosition(o)}return e+"px"},t.prototype.setRowTopStyle=function(e){var t=this.beans.gridOptionsWrapper.isSuppressRowTransform();this.allRowGuis.forEach((function(o){return t?o.rowComp.setTop(e):o.rowComp.setTransform("translateY("+e+")")}))},t.prototype.getRowNode=function(){return this.rowNode},t.prototype.getCellCtrl=function(e){var t=null;return this.getAllCellCtrls().forEach((function(o){o.getColumn()==e&&(t=o)})),null!=t||this.getAllCellCtrls().forEach((function(o){o.getColSpanningList().indexOf(e)>=0&&(t=o)})),t},t.prototype.onRowIndexChanged=function(){null!=this.rowNode.rowIndex&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())},t.prototype.updateRowIndexes=function(){var e=this.rowNode.getRowIndexString(),t=this.beans.headerNavigationService.getHeaderRowCount(),o=this.rowNode.rowIndex%2==0,r=t+this.rowNode.rowIndex+1;this.allRowGuis.forEach((function(t){t.rowComp.setRowIndex(e),t.rowComp.addOrRemoveCssClass("ag-row-even",o),t.rowComp.addOrRemoveCssClass("ag-row-odd",!o),Sr(t.element,r)}))},t.prototype.getPinnedLeftRowElement=function(){return this.leftGui?this.leftGui.element:void 0},t.prototype.getPinnedRightRowElement=function(){return this.rightGui?this.rightGui.element:void 0},t.prototype.getBodyRowElement=function(){return this.centerGui?this.centerGui.element:void 0},t.prototype.getFullWidthRowElement=function(){return this.fullWidthGui?this.fullWidthGui.element:void 0},t.DOM_DATA_KEY_ROW_CTRL="renderedRow",t}(Ge),fl=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),gl=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ml=function(e){function t(t){var o=e.call(this)||this;return o.element=t,o}return fl(t,e),t.prototype.postConstruct=function(){this.addMouseListeners(),this.mockContextMenuForIPad(),this.addKeyboardEvents()},t.prototype.addKeyboardEvents=function(){var e=this;["keydown","keypress"].forEach((function(t){var o=e.processKeyboardEvent.bind(e,t);e.addManagedListener(e.element,t,o)}))},t.prototype.addMouseListeners=function(){var e=this;["dblclick","contextmenu","mouseover","mouseout","click",Te("touchstart")?"touchstart":"mousedown"].forEach((function(t){var o=e.processMouseEvent.bind(e,t);e.addManagedListener(e.element,t,o)}))},t.prototype.processMouseEvent=function(e,t){if(this.mouseEventService.isEventFromThisGrid(t)&&!Oe(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))}},t.prototype.mockContextMenuForIPad=function(){var e=this;if(bt()){var t=new Ti(this.element);this.addManagedListener(t,Ti.EVENT_LONG_TAP,(function(t){var o=e.getRowForEvent(t.touchEvent),r=e.mouseEventService.getRenderedCellForEvent(t.touchEvent);e.handleContextMenuMouseEvent(null,t.touchEvent,o,r)})),this.addDestroyFunc((function(){return t.destroy()}))}},t.prototype.getRowForEvent=function(e){for(var t=e.target;t;){var o=this.gridOptionsWrapper.getDomData(t,hl.DOM_DATA_KEY_ROW_CTRL);if(o)return o;t=t.parentElement}return null},t.prototype.handleContextMenuMouseEvent=function(e,t,o,r){var n=o?o.getRowNode():null,i=r?r.getColumn():null,s=null;if(i){var a=e||t;r.dispatchCellContextMenuEvent(a),s=this.valueService.getValue(i,n)}var l=this.ctrlsService.getGridBodyCtrl(),u=r?r.getGui():l.getGridBodyElement();this.contextMenuFactory&&this.contextMenuFactory.onContextMenu(e,t,n,i,s,u)},t.prototype.processKeyboardEvent=function(e,t){var o=Ae(this.gridOptionsWrapper,t,al.DOM_DATA_KEY_CELL_CTRL),r=Ae(this.gridOptionsWrapper,t,hl.DOM_DATA_KEY_ROW_CTRL);t.defaultPrevented||(o?this.processCellKeyboardEvent(o,e,t):r&&r.isFullWidth()&&this.processFullWidthRowKeyboardEvent(r,e,t))},t.prototype.processCellKeyboardEvent=function(e,t,o){var r=e.getRowNode(),n=e.getColumn(),i=e.isEditing();if(!Ur(this.gridOptionsWrapper,o,r,n,i))switch(t){case"keydown":!i&&this.navigationService.handlePageScrollingKey(o)||e.onKeyDown(o),this.doGridOperations(o,e.isEditing());break;case"keypress":e.onKeyPress(o)}if("keydown"===t){var s=e.createEvent(o,We.EVENT_CELL_KEY_DOWN);this.eventService.dispatchEvent(s)}if("keypress"===t){var a=e.createEvent(o,We.EVENT_CELL_KEY_PRESS);this.eventService.dispatchEvent(a)}},t.prototype.processFullWidthRowKeyboardEvent=function(e,t,o){var r=e.getRowNode(),n=this.focusService.getFocusedCell(),i=n&&n.column;if(!Ur(this.gridOptionsWrapper,o,r,i,!1)){var s=o.key;if("keydown"===t)switch(s){case jr.UP:case jr.DOWN:e.onKeyboardNavigate(o);break;case jr.TAB:e.onTabKeyDown(o)}}if("keydown"===t){var a=e.createRowEvent(We.EVENT_CELL_KEY_DOWN,o);this.eventService.dispatchEvent(a)}if("keypress"===t){var l=e.createRowEvent(We.EVENT_CELL_KEY_PRESS,o);this.eventService.dispatchEvent(l)}},t.prototype.doGridOperations=function(e,t){if((e.ctrlKey||e.metaKey)&&!t&&this.mouseEventService.isEventFromThisGrid(e)){var o=zr(e);return o===jr.A?this.onCtrlAndA(e):o===jr.C?this.onCtrlAndC(e):o===jr.V?this.onCtrlAndV():o===jr.D?this.onCtrlAndD(e):o===jr.Z?this.onCtrlAndZ(e):o===jr.Y?this.onCtrlAndY():void 0}},t.prototype.onCtrlAndA=function(e){var t=this,o=t.pinnedRowModel,r=t.paginationProxy,n=t.rangeService,i=oe.PINNED_BOTTOM,a=oe.PINNED_TOP;if(n&&r.isRowsToRender()){var l=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s}([o.isEmpty(a),o.isEmpty(i)],2),u=l[0]?null:a,p=void 0,c=void 0;l[1]?(p=null,c=this.paginationProxy.getRowCount()-1):(p=i,c=o.getPinnedBottomRowData().length-1);var d=this.columnModel.getAllDisplayedColumns();if(s(d))return;n.setCellRange({rowStartIndex:0,rowStartPinned:u,rowEndIndex:c,rowEndPinned:p,columnStart:d[0],columnEnd:le(d)})}e.preventDefault()},t.prototype.onCtrlAndC=function(e){this.clipboardService&&!this.gridOptionsWrapper.isEnableCellTextSelection()&&(this.clipboardService.copyToClipboard(),e.preventDefault())},t.prototype.onCtrlAndV=function(){re.isRegistered(X.ClipboardModule)&&!this.gridOptionsWrapper.isSuppressClipboardPaste()&&this.clipboardService.pasteFromClipboard()},t.prototype.onCtrlAndD=function(e){re.isRegistered(X.ClipboardModule)&&!this.gridOptionsWrapper.isSuppressClipboardPaste()&&this.clipboardService.copyRangeDown(),e.preventDefault()},t.prototype.onCtrlAndZ=function(e){this.gridOptionsWrapper.isUndoRedoCellEditing()&&(e.preventDefault(),e.shiftKey?this.undoRedoService.redo():this.undoRedoService.undo())},t.prototype.onCtrlAndY=function(){this.undoRedoService.redo()},gl([z("mouseEventService")],t.prototype,"mouseEventService",void 0),gl([z("valueService")],t.prototype,"valueService",void 0),gl([K("contextMenuFactory")],t.prototype,"contextMenuFactory",void 0),gl([z("ctrlsService")],t.prototype,"ctrlsService",void 0),gl([z("navigationService")],t.prototype,"navigationService",void 0),gl([z("focusService")],t.prototype,"focusService",void 0),gl([z("undoRedoService")],t.prototype,"undoRedoService",void 0),gl([z("columnModel")],t.prototype,"columnModel",void 0),gl([z("paginationProxy")],t.prototype,"paginationProxy",void 0),gl([z("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),gl([K("rangeService")],t.prototype,"rangeService",void 0),gl([K("clipboardService")],t.prototype,"clipboardService",void 0),gl([B],t.prototype,"postConstruct",null),t}(Ge),yl=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),vl=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Cl=function(e){function t(t){var o=e.call(this)||this;return o.centerContainerCtrl=t,o}return yl(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(){e.gridBodyCtrl=e.ctrlsService.getGridBodyCtrl(),e.listenForResize()})),this.addManagedListener(this.eventService,We.EVENT_SCROLLBAR_WIDTH_CHANGED,this.onScrollbarWidthChanged.bind(this))},t.prototype.listenForResize=function(){var e=this,t=function(){return e.onCenterViewportResized()};this.centerContainerCtrl.registerViewportResizeListener(t),this.gridBodyCtrl.registerBodyViewportResizeListener(t)},t.prototype.onScrollbarWidthChanged=function(){this.checkViewportAndScrolls()},t.prototype.onCenterViewportResized=function(){if(this.centerContainerCtrl.isViewportVisible()){this.checkViewportAndScrolls();var e=this.centerContainerCtrl.getCenterWidth();e!==this.centerWidth&&(this.centerWidth=e,this.columnModel.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0},t.prototype.checkViewportAndScrolls=function(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature().checkScrollLeft()},t.prototype.getBodyHeight=function(){return this.bodyHeight},t.prototype.checkBodyHeight=function(){var e=bo(this.gridBodyCtrl.getBodyViewportElement());if(this.bodyHeight!==e){this.bodyHeight=e;var t={type:We.EVENT_BODY_HEIGHT_CHANGED};this.eventService.dispatchEvent(t)}},t.prototype.updateScrollVisibleService=function(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)},t.prototype.updateScrollVisibleServiceImpl=function(){var e={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(e),this.gridBodyCtrl.setVerticalScrollPaddingVisible(e.verticalScrollShowing)},t.prototype.isHorizontalScrollShowing=function(){return this.gridOptionsWrapper.isAlwaysShowHorizontalScroll()||this.centerContainerCtrl.isViewportHScrollShowing()},t.prototype.onHorizontalViewportChanged=function(){var e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.columnModel.setViewportPosition(e,t)},vl([z("ctrlsService")],t.prototype,"ctrlsService",void 0),vl([z("columnModel")],t.prototype,"columnModel",void 0),vl([z("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),vl([B],t.prototype,"postConstruct",null),t}(Ge),wl=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),El=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},_l=function(e){function t(t){var o=e.call(this)||this;return o.element=t,o}return wl(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,We.EVENT_LEFT_PINNED_WIDTH_CHANGED,this.onPinnedLeftWidthChanged.bind(this))},t.prototype.onPinnedLeftWidthChanged=function(){var e=this.pinnedWidthService.getPinnedLeftWidth(),t=e>0;wo(this.element,t),t&&Yo(this.element,e)},El([z("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),El([B],t.prototype,"postConstruct",null),t}(Ge),Sl=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Rl=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},bl=function(e){function t(t){var o=e.call(this)||this;return o.element=t,o}return Sl(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,We.EVENT_RIGHT_PINNED_WIDTH_CHANGED,this.onPinnedRightWidthChanged.bind(this))},t.prototype.onPinnedRightWidthChanged=function(){var e=this.pinnedWidthService.getPinnedRightWidth(),t=e>0;wo(this.element,t),t&&Yo(this.element,e)},Rl([z("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),Rl([B],t.prototype,"postConstruct",null),t}(Ge),Ol=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Pl=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Tl=function(e){function t(t,o){var r=e.call(this)||this;return r.eContainer=t,r.eWrapper=o,r}return Ol(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,We.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onHeightChanged.bind(this))},t.prototype.onHeightChanged=function(){var e=this.maxDivHeightScaler.getUiContainerHeight(),t=null!=e?e+"px":"";this.eContainer.style.height=t,this.eWrapper&&(this.eWrapper.style.height=t)},Pl([z("rowContainerHeightService")],t.prototype,"maxDivHeightScaler",void 0),Pl([B],t.prototype,"postConstruct",null),t}(Ge),Al=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Dl=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Il=function(e){function t(t){var o=e.call(this)||this;return o.eContainer=t,o}return Al(t,e),t.prototype.postConstruct=function(){var e=this;if(this.gridOptionsWrapper.isEnableRangeSelection()&&!i(this.rangeService)){var t={eElement:this.eContainer,onDragStart:this.rangeService.onDragStart.bind(this.rangeService),onDragStop:this.rangeService.onDragStop.bind(this.rangeService),onDragging:this.rangeService.onDragging.bind(this.rangeService)};this.dragService.addDragSource(t),this.addDestroyFunc((function(){return e.dragService.removeDragSource(t)}))}},Dl([K("rangeService")],t.prototype,"rangeService",void 0),Dl([z("dragService")],t.prototype,"dragService",void 0),Dl([B],t.prototype,"postConstruct",null),t}(Ge),Nl=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),xl=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Ml=function(e){function t(t){var o=e.call(this)||this;return o.callback=t,o}return Nl(t,e),t.prototype.postConstruct=function(){var e=this.setWidth.bind(this);this.addManagedListener(this.gridOptionsWrapper,eo.PROP_DOM_LAYOUT,e),this.addManagedListener(this.eventService,We.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,We.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.setWidth()},t.prototype.setWidth=function(){var e=this.columnModel,t=this.gridOptionsWrapper.getDomLayout()===oe.DOM_LAYOUT_PRINT,o=e.getBodyContainerWidth(),r=e.getDisplayedColumnsLeftWidth(),n=e.getDisplayedColumnsRightWidth(),i=t?o+r+n:o;this.callback(i)},xl([z("columnModel")],t.prototype,"columnModel",void 0),xl([B],t.prototype,"postConstruct",null),t}(Ge),Ll=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Fl=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Gl=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s};function kl(e){switch(e){case pl.CENTER:case pl.TOP_CENTER:case pl.STICKY_TOP_CENTER:case pl.BOTTOM_CENTER:return cl.CENTER;case pl.LEFT:case pl.TOP_LEFT:case pl.STICKY_TOP_LEFT:case pl.BOTTOM_LEFT:return cl.LEFT;case pl.RIGHT:case pl.TOP_RIGHT:case pl.STICKY_TOP_RIGHT:case pl.BOTTOM_RIGHT:return cl.RIGHT;case pl.FULL_WIDTH:case pl.TOP_FULL_WIDTH:case pl.STICKY_TOP_FULL_WIDTH:case pl.BOTTOM_FULL_WIDTH:return cl.FULL_WIDTH;default:throw Error("Invalid Row Container Type")}}!function(e){e.LEFT="left",e.RIGHT="right",e.CENTER="center",e.FULL_WIDTH="fullWidth",e.TOP_LEFT="topLeft",e.TOP_RIGHT="topRight",e.TOP_CENTER="topCenter",e.TOP_FULL_WIDTH="topFullWidth",e.STICKY_TOP_LEFT="stickyTopLeft",e.STICKY_TOP_RIGHT="stickyTopRight",e.STICKY_TOP_CENTER="stickyTopCenter",e.STICKY_TOP_FULL_WIDTH="stickyTopFullWidth",e.BOTTOM_LEFT="bottomLeft",e.BOTTOM_RIGHT="bottomRight",e.BOTTOM_CENTER="bottomCenter",e.BOTTOM_FULL_WIDTH="bottomFullWidth"}(pl||(pl={})),function(e){e.LEFT="left",e.RIGHT="right",e.CENTER="center",e.FULL_WIDTH="fullWidth"}(cl||(cl={}));var Vl,Hl=Xe([[pl.CENTER,"ag-center-cols-container"],[pl.LEFT,"ag-pinned-left-cols-container"],[pl.RIGHT,"ag-pinned-right-cols-container"],[pl.FULL_WIDTH,"ag-full-width-container"],[pl.TOP_CENTER,"ag-floating-top-container"],[pl.TOP_LEFT,"ag-pinned-left-floating-top"],[pl.TOP_RIGHT,"ag-pinned-right-floating-top"],[pl.TOP_FULL_WIDTH,"ag-floating-top-full-width-container"],[pl.STICKY_TOP_CENTER,"ag-sticky-top-container"],[pl.STICKY_TOP_LEFT,"ag-pinned-left-sticky-top"],[pl.STICKY_TOP_RIGHT,"ag-pinned-right-sticky-top"],[pl.STICKY_TOP_FULL_WIDTH,"ag-sticky-top-full-width-container"],[pl.BOTTOM_CENTER,"ag-floating-bottom-container"],[pl.BOTTOM_LEFT,"ag-pinned-left-floating-bottom"],[pl.BOTTOM_RIGHT,"ag-pinned-right-floating-bottom"],[pl.BOTTOM_FULL_WIDTH,"ag-floating-bottom-full-width-container"]]),Wl=Xe([[pl.CENTER,"ag-center-cols-viewport"],[pl.TOP_CENTER,"ag-floating-top-viewport"],[pl.STICKY_TOP_CENTER,"ag-sticky-top-viewport"],[pl.BOTTOM_CENTER,"ag-floating-bottom-viewport"]]),jl=Xe([[pl.CENTER,"ag-center-cols-clipper"]]),Bl=function(e){function t(t){var o=e.call(this)||this;return o.name=t,o}return Ll(t,e),t.getRowContainerCssClasses=function(e){return{container:Hl.get(e),viewport:Wl.get(e),wrapper:jl.get(e)}},t.getPinned=function(e){switch(e){case pl.BOTTOM_LEFT:case pl.TOP_LEFT:case pl.STICKY_TOP_LEFT:case pl.LEFT:return oe.PINNED_LEFT;case pl.BOTTOM_RIGHT:case pl.TOP_RIGHT:case pl.STICKY_TOP_RIGHT:case pl.RIGHT:return oe.PINNED_RIGHT;default:return null}},t.prototype.postConstruct=function(){var e=this;this.enableRtl=this.gridOptionsWrapper.isEnableRtl(),this.embedFullWidthRows=this.gridOptionsWrapper.isEmbedFullWidthRows(),this.forContainers([pl.CENTER],(function(){return e.viewportSizeFeature=e.createManagedBean(new Cl(e))}))},t.prototype.registerWithCtrlsService=function(){switch(this.name){case pl.CENTER:this.ctrlsService.registerCenterRowContainerCtrl(this);break;case pl.LEFT:this.ctrlsService.registerLeftRowContainerCtrl(this);break;case pl.RIGHT:this.ctrlsService.registerRightRowContainerCtrl(this);break;case pl.TOP_CENTER:this.ctrlsService.registerTopCenterRowContainerCtrl(this);break;case pl.TOP_LEFT:this.ctrlsService.registerTopLeftRowContainerCon(this);break;case pl.TOP_RIGHT:this.ctrlsService.registerTopRightRowContainerCtrl(this);break;case pl.STICKY_TOP_CENTER:this.ctrlsService.registerStickyTopCenterRowContainerCtrl(this);break;case pl.STICKY_TOP_LEFT:this.ctrlsService.registerStickyTopLeftRowContainerCon(this);break;case pl.STICKY_TOP_RIGHT:this.ctrlsService.registerStickyTopRightRowContainerCtrl(this);break;case pl.BOTTOM_CENTER:this.ctrlsService.registerBottomCenterRowContainerCtrl(this);break;case pl.BOTTOM_LEFT:this.ctrlsService.registerBottomLeftRowContainerCtrl(this);break;case pl.BOTTOM_RIGHT:this.ctrlsService.registerBottomRightRowContainerCtrl(this)}},t.prototype.forContainers=function(e,t){e.indexOf(this.name)>=0&&t()},t.prototype.getContainerElement=function(){return this.eContainer},t.prototype.getViewportSizeFeature=function(){return this.viewportSizeFeature},t.prototype.setComp=function(e,t,o,r){var n=this;this.comp=e,this.eContainer=t,this.eViewport=o,this.eWrapper=r,this.createManagedBean(new ml(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder(),this.stopHScrollOnPinnedRows();var i=[pl.TOP_CENTER,pl.TOP_LEFT,pl.TOP_RIGHT],s=[pl.STICKY_TOP_CENTER,pl.STICKY_TOP_LEFT,pl.STICKY_TOP_RIGHT],a=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Gl(arguments[t]));return e}(i,[pl.BOTTOM_CENTER,pl.BOTTOM_LEFT,pl.BOTTOM_RIGHT],[pl.CENTER,pl.LEFT,pl.RIGHT],s),l=[pl.CENTER,pl.LEFT,pl.RIGHT,pl.FULL_WIDTH],u=[pl.CENTER,pl.TOP_CENTER,pl.STICKY_TOP_CENTER,pl.BOTTOM_CENTER],p=[pl.LEFT,pl.BOTTOM_LEFT,pl.TOP_LEFT,pl.STICKY_TOP_LEFT],c=[pl.RIGHT,pl.BOTTOM_RIGHT,pl.TOP_RIGHT,pl.STICKY_TOP_RIGHT];this.forContainers(p,(function(){return n.createManagedBean(new _l(n.eContainer))})),this.forContainers(c,(function(){return n.createManagedBean(new bl(n.eContainer))})),this.forContainers(l,(function(){return n.createManagedBean(new Tl(n.eContainer,n.eWrapper))})),this.forContainers(a,(function(){return n.createManagedBean(new Il(n.eContainer))})),this.forContainers(u,(function(){return n.createManagedBean(new Ml((function(e){return n.comp.setContainerWidth(e+"px")})))})),this.addListeners(),this.registerWithCtrlsService()},t.prototype.addListeners=function(){var e=this;this.addManagedListener(this.eventService,We.EVENT_SCROLL_VISIBILITY_CHANGED,(function(){return e.onScrollVisibilityChanged()})),this.addManagedListener(this.eventService,We.EVENT_DISPLAYED_COLUMNS_CHANGED,(function(){return e.onDisplayedColumnsChanged()})),this.addManagedListener(this.eventService,We.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,(function(){return e.onDisplayedColumnsWidthChanged()})),this.addManagedListener(this.eventService,We.EVENT_DISPLAYED_ROWS_CHANGED,(function(){return e.onDisplayedRowsChanged()})),this.onScrollVisibilityChanged(),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()},t.prototype.listenOnDomOrder=function(){var e=this;if([pl.STICKY_TOP_CENTER,pl.STICKY_TOP_LEFT,pl.STICKY_TOP_RIGHT,pl.STICKY_TOP_FULL_WIDTH].indexOf(this.name)>=0)this.comp.setDomOrder(!0);else{var t=function(){return e.comp.setDomOrder(e.gridOptionsWrapper.isEnsureDomOrder())};this.addManagedListener(this.gridOptionsWrapper,eo.PROP_DOM_LAYOUT,t),t()}},t.prototype.stopHScrollOnPinnedRows=function(){var e=this;this.forContainers([pl.TOP_CENTER,pl.STICKY_TOP_CENTER,pl.BOTTOM_CENTER],(function(){e.addManagedListener(e.eViewport,"scroll",(function(){return e.eViewport.scrollLeft=0}))}))},t.prototype.onDisplayedColumnsChanged=function(){var e=this;this.forContainers([pl.CENTER],(function(){return e.onHorizontalViewportChanged()}))},t.prototype.onDisplayedColumnsWidthChanged=function(){var e=this;this.forContainers([pl.CENTER],(function(){return e.onHorizontalViewportChanged()}))},t.prototype.onScrollVisibilityChanged=function(){if(this.name===pl.CENTER){var e=this.scrollVisibleService.isHorizontalScrollShowing()&&this.gridOptionsWrapper.getScrollbarWidth()||0,t=0==e?"100%":"calc(100% + "+e+"px)";this.comp.setViewportHeight(t)}},t.prototype.addPreventScrollWhileDragging=function(){var e=this,t=function(t){e.dragService.isDragging()&&t.cancelable&&t.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc((function(){return e.eContainer.removeEventListener("touchmove",t)}))},t.prototype.onHorizontalViewportChanged=function(){var e=this.getCenterWidth(),t=this.getCenterViewportScrollLeft();this.columnModel.setViewportPosition(e,t)},t.prototype.getCenterWidth=function(){return Oo(this.eViewport)},t.prototype.getCenterViewportScrollLeft=function(){return Do(this.eViewport,this.enableRtl)},t.prototype.registerViewportResizeListener=function(e){var t=this.resizeObserverService.observeResize(this.eViewport,e);this.addDestroyFunc((function(){return t()}))},t.prototype.isViewportVisible=function(){return Mo(this.eViewport)},t.prototype.isViewportHScrollShowing=function(){return jo(this.eViewport)},t.prototype.getViewportScrollLeft=function(){return Do(this.eViewport,this.enableRtl)},t.prototype.isHorizontalScrollShowing=function(){return this.gridOptionsWrapper.isAlwaysShowHorizontalScroll()||jo(this.eViewport)},t.prototype.getViewportElement=function(){return this.eViewport},t.prototype.setContainerTranslateX=function(e){this.eContainer.style.transform="translateX("+e+"px)"},t.prototype.getHScrollPosition=function(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}},t.prototype.setCenterViewportScrollLeft=function(e){Io(this.eViewport,e,this.enableRtl)},t.prototype.onDisplayedRowsChanged=function(){var e=this,t=this.name===pl.TOP_FULL_WIDTH||this.name===pl.STICKY_TOP_FULL_WIDTH||this.name===pl.BOTTOM_FULL_WIDTH||this.name===pl.FULL_WIDTH,o=this.getRowCtrls().filter((function(o){var r=o.isFullWidth(),n=e.gridOptionsWrapper.getDomLayout()===oe.DOM_LAYOUT_PRINT,i=e.embedFullWidthRows||n;return t?!i&&r:i||!r}));this.comp.setRowCtrls(o)},t.prototype.getRowCtrls=function(){switch(this.name){case pl.TOP_CENTER:case pl.TOP_LEFT:case pl.TOP_RIGHT:case pl.TOP_FULL_WIDTH:return this.rowRenderer.getTopRowCtrls();case pl.STICKY_TOP_CENTER:case pl.STICKY_TOP_LEFT:case pl.STICKY_TOP_RIGHT:case pl.STICKY_TOP_FULL_WIDTH:return this.rowRenderer.getStickyTopRowCtrls();case pl.BOTTOM_CENTER:case pl.BOTTOM_LEFT:case pl.BOTTOM_RIGHT:case pl.BOTTOM_FULL_WIDTH:return this.rowRenderer.getBottomRowCtrls();default:return this.rowRenderer.getRowCtrls()}},Fl([z("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),Fl([z("dragService")],t.prototype,"dragService",void 0),Fl([z("ctrlsService")],t.prototype,"ctrlsService",void 0),Fl([z("columnModel")],t.prototype,"columnModel",void 0),Fl([z("resizeObserverService")],t.prototype,"resizeObserverService",void 0),Fl([z("rowRenderer")],t.prototype,"rowRenderer",void 0),Fl([B],t.prototype,"postConstruct",null),t}(Ge),Ul=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Yl=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},zl='<div class="ag-root ag-unselectable" role="grid">\n <ag-header-root ref="gridHeader"></ag-header-root>\n <div class="ag-floating-top" ref="eTop" role="presentation">\n <ag-row-container ref="topLeftContainer" name="'+pl.TOP_LEFT+'"></ag-row-container>\n <ag-row-container ref="topCenterContainer" name="'+pl.TOP_CENTER+'"></ag-row-container>\n <ag-row-container ref="topRightContainer" name="'+pl.TOP_RIGHT+'"></ag-row-container>\n <ag-row-container ref="topFullWidthContainer" name="'+pl.TOP_FULL_WIDTH+'"></ag-row-container>\n </div>\n <div class="ag-body-viewport" ref="eBodyViewport" role="presentation">\n <ag-row-container ref="leftContainer" name="'+pl.LEFT+'"></ag-row-container>\n <ag-row-container ref="centerContainer" name="'+pl.CENTER+'"></ag-row-container>\n <ag-row-container ref="rightContainer" name="'+pl.RIGHT+'"></ag-row-container>\n <ag-row-container ref="fullWidthContainer" name="'+pl.FULL_WIDTH+'"></ag-row-container>\n </div>\n <div class="ag-sticky-top" ref="eStickyTop" role="presentation">\n <ag-row-container ref="stickyTopLeftContainer" name="'+pl.STICKY_TOP_LEFT+'"></ag-row-container>\n <ag-row-container ref="stickyTopCenterContainer" name="'+pl.STICKY_TOP_CENTER+'"></ag-row-container>\n <ag-row-container ref="stickyTopRightContainer" name="'+pl.STICKY_TOP_RIGHT+'"></ag-row-container>\n <ag-row-container ref="stickyTopFullWidthContainer" name="'+pl.STICKY_TOP_FULL_WIDTH+'"></ag-row-container>\n </div>\n <div class="ag-floating-bottom" ref="eBottom" role="presentation">\n <ag-row-container ref="bottomLeftContainer" name="'+pl.BOTTOM_LEFT+'"></ag-row-container>\n <ag-row-container ref="bottomCenterContainer" name="'+pl.BOTTOM_CENTER+'"></ag-row-container>\n <ag-row-container ref="bottomRightContainer" name="'+pl.BOTTOM_RIGHT+'"></ag-row-container>\n <ag-row-container ref="bottomFullWidthContainer" name="'+pl.BOTTOM_FULL_WIDTH+'"></ag-row-container>\n </div>\n <ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>\n <ag-overlay-wrapper></ag-overlay-wrapper>\n </div>',Kl=function(e){function t(){return e.call(this,zl)||this}return Ul(t,e),t.prototype.init=function(){var e=this,t=function(e,t){var o=e+"px";t.style.minHeight=o,t.style.height=o},o={setRowAnimationCssOnBodyViewport:function(t,o){return e.setRowAnimationCssOnBodyViewport(t,o)},setColumnCount:function(t){return Rr(e.getGui(),t)},setRowCount:function(t){return _r(e.getGui(),t)},setTopHeight:function(o){return t(o,e.eTop)},setBottomHeight:function(o){return t(o,e.eBottom)},setTopDisplay:function(t){return e.eTop.style.display=t},setBottomDisplay:function(t){return e.eBottom.style.display=t},setStickyTopHeight:function(t){return e.eStickyTop.style.height=t},setStickyTopTop:function(t){return e.eStickyTop.style.top=t},setStickyTopWidth:function(t){return e.eStickyTop.style.width=t},setColumnMovingCss:function(t,o){return e.addOrRemoveCssClass(ka,o)},updateLayoutClasses:function(t,o){var r=e.eBodyViewport.classList;r.toggle(sa.AUTO_HEIGHT,o.autoHeight),r.toggle(sa.NORMAL,o.normal),r.toggle(sa.PRINT,o.print),e.addOrRemoveCssClass(sa.AUTO_HEIGHT,o.autoHeight),e.addOrRemoveCssClass(sa.NORMAL,o.normal),e.addOrRemoveCssClass(sa.PRINT,o.print)},setAlwaysVerticalScrollClass:function(t,o){return e.eBodyViewport.classList.toggle(Ga,o)},registerBodyViewportResizeListener:function(t){var o=e.resizeObserverService.observeResize(e.eBodyViewport,t);e.addDestroyFunc((function(){return o()}))},setPinnedTopBottomOverflowY:function(t){return e.eTop.style.overflowY=e.eBottom.style.overflowY=t},setCellSelectableCss:function(t,o){[e.eTop,e.eBodyViewport,e.eBottom].forEach((function(e){return e.classList.toggle(Fa,o)}))}};this.ctrl=this.createManagedBean(new Va),this.ctrl.setComp(o,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop),(this.rangeService||this.gridOptionsWrapper.isRowSelectionMulti())&&Er(this.getGui(),!0)},t.prototype.setRowAnimationCssOnBodyViewport=function(e,t){var o=this.eBodyViewport.classList;o.toggle(Ea.ANIMATION_ON,t),o.toggle(Ea.ANIMATION_OFF,!t)},t.prototype.getFloatingTopBottom=function(){return[this.eTop,this.eBottom]},Yl([z("resizeObserverService")],t.prototype,"resizeObserverService",void 0),Yl([K("rangeService")],t.prototype,"rangeService",void 0),Yl([vn("eBodyViewport")],t.prototype,"eBodyViewport",void 0),Yl([vn("eStickyTop")],t.prototype,"eStickyTop",void 0),Yl([vn("eTop")],t.prototype,"eTop",void 0),Yl([vn("eBottom")],t.prototype,"eBottom",void 0),Yl([vn("gridHeader")],t.prototype,"headerRootComp",void 0),Yl([B],t.prototype,"init",null),t}(mn),$l=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),ql=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Zl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $l(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,We.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this))},t.prototype.onDisplayedColumnsChanged=function(){this.update()},t.prototype.onDisplayedColumnsWidthChanged=function(){this.update()},t.prototype.update=function(){this.updateImpl(),setTimeout(this.updateImpl.bind(this),500)},t.prototype.updateImpl=function(){var e=this.ctrlsService.getCenterRowContainerCtrl();if(e){var t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(t)}},t.prototype.setScrollsVisible=function(e){if(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing){this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing;var t={type:We.EVENT_SCROLL_VISIBILITY_CHANGED};this.eventService.dispatchEvent(t)}},t.prototype.isHorizontalScrollShowing=function(){return this.horizontalScrollShowing},t.prototype.isVerticalScrollShowing=function(){return this.verticalScrollShowing},ql([z("ctrlsService")],t.prototype,"ctrlsService",void 0),ql([B],t.prototype,"postConstruct",null),ql([Y("scrollVisibleService")],t)}(Ge),Xl=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Ql=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Jl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.gridInstanceId=o.gridInstanceSequence.next(),t}var o;return Xl(t,e),o=t,t.prototype.stampTopLevelGridCompWithGridInstance=function(e){e[o.GRID_DOM_KEY]=this.gridInstanceId},t.prototype.getRenderedCellForEvent=function(e){return Ae(this.gridOptionsWrapper,e,al.DOM_DATA_KEY_CELL_CTRL)},t.prototype.isEventFromThisGrid=function(e){return this.isElementInThisGrid(e.target)},t.prototype.isElementInThisGrid=function(e){for(var t=e;t;){var r=t[o.GRID_DOM_KEY];if(n(r))return r===this.gridInstanceId;t=t.parentElement}return!1},t.prototype.getCellPositionForEvent=function(e){var t=this.getRenderedCellForEvent(e);return t?t.getCellPosition():null},t.prototype.getNormalisedPosition=function(e){var t,o,r=this.gridOptionsWrapper.getDomLayout()===oe.DOM_LAYOUT_NORMAL,n=e;if(null!=n.clientX||null!=n.clientY?(t=n.clientX,o=n.clientY):(t=n.x,o=n.y),r){var i=this.ctrlsService.getGridBodyCtrl(),s=i.getScrollFeature().getVScrollPosition();t+=i.getScrollFeature().getHScrollPosition().left,o+=s.top}return{x:t,y:o}},t.gridInstanceSequence=new rn,t.GRID_DOM_KEY="__ag_grid_instance",Ql([z("ctrlsService")],t.prototype,"ctrlsService",void 0),o=Ql([Y("mouseEventService")],t)}(Ge),eu=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),tu=function(){return tu=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},tu.apply(this,arguments)},ou=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ru=function(e){function t(){var t=e.call(this)||this;return t.onPageDown=G(t.onPageDown,100),t.onPageUp=G(t.onPageUp,100),t}return eu(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){e.gridBodyCon=t.gridBodyCtrl}))},t.prototype.handlePageScrollingKey=function(e){var t=e.key,o=e.altKey,r=e.ctrlKey||e.metaKey,n=!!this.rangeService&&e.shiftKey,i=this.mouseEventService.getCellPositionForEvent(e);if(!i)return!1;var s=!1;switch(t){case jr.PAGE_HOME:case jr.PAGE_END:r||o||(this.onHomeOrEndKey(t),s=!0);break;case jr.LEFT:case jr.RIGHT:case jr.UP:case jr.DOWN:!r||o||n||(this.onCtrlUpDownLeftRight(t,i),s=!0);break;case jr.PAGE_DOWN:r||o||(this.onPageDown(i),s=!0);break;case jr.PAGE_UP:r||o||(this.onPageUp(i),s=!0)}return s&&e.preventDefault(),s},t.prototype.navigateTo=function(e){var t=e.scrollIndex,o=e.scrollType,r=e.scrollColumn,i=e.focusIndex,s=e.focusColumn;if(n(r)&&!r.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(r),n(t)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(t,o),e.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(i),this.focusService.setFocusedCell({rowIndex:i,column:s,rowPinned:null,forceBrowserFocus:!0}),this.rangeService){var a={rowIndex:i,rowPinned:null,column:s};this.rangeService.setRangeToCell(a)}},t.prototype.onPageDown=function(e){var t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),o=this.getViewportHeight(),r=this.paginationProxy.getPixelOffset(),n=t.top+o,i=this.paginationProxy.getRowIndexAtPixel(n+r);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,i):this.navigateToNextPage(e,i)},t.prototype.onPageUp=function(e){var t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),o=this.paginationProxy.getPixelOffset(),r=t.top,n=this.paginationProxy.getRowIndexAtPixel(r+o);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,n,!0):this.navigateToNextPage(e,n,!0)},t.prototype.navigateToNextPage=function(e,t,o){var r,n;void 0===o&&(o=!1);var i,s=this.getViewportHeight(),a=this.paginationProxy.getPageFirstRow(),l=this.paginationProxy.getPageLastRow(),u=this.paginationProxy.getPixelOffset(),p=this.paginationProxy.getRow(e.rowIndex),c=o?(null===(r=p)||void 0===r?void 0:r.rowHeight)-s-u:s-u,d=(null===(n=p)||void 0===n?void 0:n.rowTop)+c,h=this.paginationProxy.getRowIndexAtPixel(d+u);if(h===e.rowIndex){var f=o?-1:1;t=h=e.rowIndex+f}o?(i="bottom",h<a&&(h=a),t<a&&(t=a)):(i="top",h>l&&(h=l),t>l&&(t=l)),this.isRowTallerThanView(h)&&(t=h,i="top"),this.navigateTo({scrollIndex:t,scrollType:i,scrollColumn:null,focusIndex:h,focusColumn:e.column})},t.prototype.navigateToNextPageWithAutoHeight=function(e,t,o){var r=this;void 0===o&&(o=!1),this.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout((function(){var n=r.getNextFocusIndexForAutoHeight(e,o);r.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:n,focusColumn:e.column,isAsync:!0})}),50)},t.prototype.getNextFocusIndexForAutoHeight=function(e,t){var o;void 0===t&&(t=!1);for(var r=t?-1:1,n=this.getViewportHeight(),i=this.paginationProxy.getPageLastRow(),s=0,a=e.rowIndex;a>=0&&a<=i;){var l=this.paginationProxy.getRow(a);if(l){var u=null!=(o=l.rowHeight)?o:0;if(s+u>n)break;s+=u}a+=r}return Math.max(0,Math.min(a,i))},t.prototype.getViewportHeight=function(){var e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),t=this.gridOptionsWrapper.getScrollbarWidth(),o=e.bottom-e.top;return this.ctrlsService.getCenterRowContainerCtrl().isHorizontalScrollShowing()&&(o-=t),o},t.prototype.isRowTallerThanView=function(e){var t=this.paginationProxy.getRow(e);if(!t)return!1;var o=t.rowHeight;return"number"==typeof o&&o>this.getViewportHeight()},t.prototype.onCtrlUpDownLeftRight=function(e,t){var o=this.cellNavigationService.getNextCellToFocus(e,t,!0),r=o.rowIndex,n=o.column;this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:n,focusIndex:r,focusColumn:n})},t.prototype.onHomeOrEndKey=function(e){var t=e===jr.PAGE_HOME,o=this.columnModel.getAllDisplayedColumns(),r=t?o[0]:le(o),n=t?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();this.navigateTo({scrollIndex:n,scrollType:null,scrollColumn:r,focusIndex:n,focusColumn:r})},t.prototype.onTabKeyDown=function(e,t){var o=t.shiftKey;if(this.tabToNextCellCommon(e,o,t))t.preventDefault();else if(o){var r=e.getRowPosition(),n=r.rowIndex;(r.rowPinned?0===n:n===this.paginationProxy.getPageFirstRow())&&(t.preventDefault(),this.focusService.focusLastHeader(t))}else e instanceof al&&e.focusCell(!0),this.focusService.focusNextGridCoreContainer(o)&&t.preventDefault()},t.prototype.tabToNextCell=function(e,t){var o=this.focusService.getFocusedCell();if(!o)return!1;var r=this.getCellByPosition(o);return!!(r||(r=this.rowRenderer.getRowByPosition(o))&&r.isFullWidth())&&this.tabToNextCellCommon(r,e,t)},t.prototype.tabToNextCellCommon=function(e,t,o){var r=e.isEditing();if(!r&&e instanceof al){var n=e.getRowCtrl();n&&(r=n.isEditing())}return(r?this.gridOptionsWrapper.isFullRowEdit()?this.moveToNextEditingRow(e,t,o):this.moveToNextEditingCell(e,t,o):this.moveToNextCellNotEditing(e,t))||!!this.focusService.getFocusedHeader()},t.prototype.moveToNextEditingCell=function(e,t,o){void 0===o&&(o=null);var r=e.getCellPosition();e.getGui().focus(),e.stopEditing();var n=this.findNextCellToFocusOn(r,t,!0);return null!=n&&(n.startEditing(null,null,!0,o),n.focusCell(!1),!0)},t.prototype.moveToNextEditingRow=function(e,t,o){void 0===o&&(o=null);var r=e.getCellPosition(),n=this.findNextCellToFocusOn(r,t,!0);if(null==n)return!1;var i=n.getCellPosition(),s=this.isCellEditable(r),a=this.isCellEditable(i),l=i&&r.rowIndex===i.rowIndex&&r.rowPinned===i.rowPinned;return s&&e.setFocusOutOnEditor(),l||(e.getRowCtrl().stopEditing(),n.getRowCtrl().startRowEditing(void 0,void 0,void 0,o)),a?(n.setFocusInOnEditor(),n.focusCell()):n.focusCell(!0),!0},t.prototype.moveToNextCellNotEditing=function(e,t){var o,r=this.columnModel.getAllDisplayedColumns();o=e instanceof hl?tu(tu({},e.getRowPosition()),{column:t?r[0]:le(r)}):e.getCellPosition();var i=this.findNextCellToFocusOn(o,t,!1);if(i instanceof al)i.focusCell(!0);else if(i)return this.tryToFocusFullWidthRow(i.getRowPosition(),t);return n(i)},t.prototype.findNextCellToFocusOn=function(e,t,o){for(var r=e;;){e!==r&&(e=r),t||(r=this.getLastCellOfColSpan(r)),r=this.cellNavigationService.getNextTabbedCell(r,t);var i=this.gridOptionsWrapper.getTabToNextCellFunc();if(n(i)){var s=i({backwards:t,editing:o,previousCellPosition:e,nextCellPosition:r||null});n(s)?(s.floating&&(T((function(){console.warn("AG Grid: tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?")}),"no floating in userCell"),s.rowPinned=s.floating),r={rowIndex:s.rowIndex,column:s.column,rowPinned:s.rowPinned}):r=null}if(!r)return null;if(r.rowIndex<0){var a=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:a+r.rowIndex,column:r.column}}),null}var l=this.gridOptionsWrapper.isFullRowEdit();if(!o||l||this.isCellEditable(r)){this.ensureCellVisible(r);var u=this.getCellByPosition(r);if(u){if(!u.isSuppressNavigable())return this.rangeService&&this.rangeService.setRangeToCell(r),u}else{var p=this.rowRenderer.getRowByPosition(r);if(p&&p.isFullWidth())return p}}}},t.prototype.isCellEditable=function(e){var t=this.lookupRowNodeForCell(e);return!!t&&e.column.isCellEditable(t)},t.prototype.getCellByPosition=function(e){var t=this.rowRenderer.getRowByPosition(e);return t?t.getCellCtrl(e.column):null},t.prototype.lookupRowNodeForCell=function(e){return e.rowPinned===oe.PINNED_TOP?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):e.rowPinned===oe.PINNED_BOTTOM?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.paginationProxy.getRow(e.rowIndex)},t.prototype.navigateToNextCell=function(e,t,o,r){for(var s=o,a=!1;s&&(s===o||!this.isValidNavigateCell(s));)this.gridOptionsWrapper.isEnableRtl()?t===jr.LEFT&&(s=this.getLastCellOfColSpan(s)):t===jr.RIGHT&&(s=this.getLastCellOfColSpan(s)),a=i(s=this.cellNavigationService.getNextCellToFocus(t,s));if(a&&e&&e.key===jr.UP&&(s={rowIndex:-1,rowPinned:null,column:o.column}),r){var l=this.gridOptionsWrapper.getNavigateToNextCellFunc();if(n(l)){var u=l({key:t,previousCellPosition:o,nextCellPosition:s||null,event:e});n(u)?(u.floating&&(T((function(){console.warn("AG Grid: tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?")}),"no floating in userCell"),u.rowPinned=u.floating),s={rowPinned:u.rowPinned,rowIndex:u.rowIndex,column:u.column}):s=null}}if(s)if(s.rowIndex<0){var p=this.headerNavigationService.getHeaderRowCount();this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:p+s.rowIndex,column:o.column},event:e||void 0})}else{var c=this.getNormalisedPosition(s);c?this.focusPosition(c):this.tryToFocusFullWidthRow(s)}},t.prototype.getNormalisedPosition=function(e){this.ensureCellVisible(e);var t=this.getCellByPosition(e);return t?(e=t.getCellPosition(),this.ensureCellVisible(e),e):null},t.prototype.tryToFocusFullWidthRow=function(e,t){void 0===t&&(t=!1);var o=this.columnModel.getAllDisplayedColumns(),r=this.rowRenderer.getRowByPosition(e);if(!r||!r.isFullWidth())return!1;var n=this.focusService.getFocusedCell(),i={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?le(o):o[0])};this.focusPosition(i);var s=null!=n&&this.rowPositionUtils.before(i,n),a={type:We.EVENT_FULL_WIDTH_ROW_FOCUSED,rowIndex:i.rowIndex,rowPinned:i.rowPinned,column:i.column,isFullWidthCell:!0,floating:i.rowPinned,fromBelow:s};return this.eventService.dispatchEvent(a),!0},t.prototype.focusPosition=function(e){this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.rangeService&&this.rangeService.setRangeToCell(e)},t.prototype.isValidNavigateCell=function(e){return!!this.rowPositionUtils.getRowNode(e)},t.prototype.getLastCellOfColSpan=function(e){var t=this.getCellByPosition(e);if(!t)return e;var o=t.getColSpanningList();return 1===o.length?e:{rowIndex:e.rowIndex,column:le(o),rowPinned:e.rowPinned}},t.prototype.ensureCellVisible=function(e){var t,o=this.gridOptionsWrapper.isGroupRowsSticky(),r=this.rowModel.getRow(e.rowIndex);!(o&&(null===(t=r)||void 0===t?void 0:t.sticky))&&i(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column)},ou([z("mouseEventService")],t.prototype,"mouseEventService",void 0),ou([z("paginationProxy")],t.prototype,"paginationProxy",void 0),ou([z("focusService")],t.prototype,"focusService",void 0),ou([K("rangeService")],t.prototype,"rangeService",void 0),ou([z("columnModel")],t.prototype,"columnModel",void 0),ou([z("rowModel")],t.prototype,"rowModel",void 0),ou([z("ctrlsService")],t.prototype,"ctrlsService",void 0),ou([z("rowRenderer")],t.prototype,"rowRenderer",void 0),ou([z("headerNavigationService")],t.prototype,"headerNavigationService",void 0),ou([z("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),ou([z("cellNavigationService")],t.prototype,"cellNavigationService",void 0),ou([z("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),ou([B],t.prototype,"postConstruct",null),ou([Y("navigationService")],t)}(Ge),nu=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),iu=function(e){function t(t){var o=e.call(this,'<div class="ag-popup-editor" tabindex="-1"/>')||this;return o.params=t,o}return nu(t,e),t.prototype.postConstruct=function(){this.gridOptionsWrapper.setDomData(this.getGui(),t.DOM_KEY_POPUP_EDITOR_WRAPPER,!0),this.addKeyDownListener()},t.prototype.addKeyDownListener=function(){var e=this,t=this.getGui(),o=this.params;this.addManagedListener(t,"keydown",(function(t){Ur(e.gridOptionsWrapper,t,o.node,o.column,!0)||o.onKeyDown(t)}))},t.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper",function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);i>3&&s&&Object.defineProperty(t,o,s)}([B],t.prototype,"postConstruct",null),t}(Vi),su=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),au=function(e){function t(t,o,r,n,i){var s=e.call(this)||this;s.rendererVersion=0,s.editorVersion=0,s.beans=t,s.column=o.getColumn(),s.rowNode=o.getRowNode(),s.rowCtrl=o.getRowCtrl(),s.eRow=n,s.setTemplate('<div comp-id="'+s.getCompId()+'"/>');var a=s.getGui();s.forceWrapper=o.isForceWrapper(),s.refreshWrapper(!1);var l=function(e,t,o){var r=o||a;null!=t&&""!=t?r.setAttribute(e,t):r.removeAttribute(e)},u={addOrRemoveCssClass:function(e,t){return s.addOrRemoveCssClass(e,t)},setUserStyles:function(e){return Wo(a,e)},getFocusableElement:function(){return s.getFocusableElement()},setTabIndex:function(e){return l("tabindex",e.toString())},setRole:function(e){return sr(a,e)},setColId:function(e){return l("col-id",e)},setTitle:function(e){return l("title",e)},setIncludeSelection:function(e){return s.includeSelection=e},setIncludeRowDrag:function(e){return s.includeRowDrag=e},setIncludeDndSource:function(e){return s.includeDndSource=e},setRenderDetails:function(e,t,o){return s.setRenderDetails(e,t,o)},setEditDetails:function(e,t,o){return s.setEditDetails(e,t,o)},getCellEditor:function(){return s.cellEditor||null},getCellRenderer:function(){return s.cellRenderer||null},getParentOfValue:function(){return s.getParentOfValue()}};return s.cellCtrl=o,o.setComp(u,s.getGui(),s.eCellWrapper,r,i),s}return su(t,e),t.prototype.getParentOfValue=function(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui()},t.prototype.setRenderDetails=function(e,t,o){if(!this.cellEditor||this.cellEditorPopupWrapper){this.firstRender=null==this.firstRender;var r=this.refreshWrapper(!1);e?!o&&!r&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t))}},t.prototype.setEditDetails=function(e,t,o){e?this.createCellEditorInstance(e,t,o):this.destroyEditor()},t.prototype.removeControls=function(){this.checkboxSelectionComp=this.beans.context.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=this.beans.context.destroyBean(this.dndSourceComp),this.rowDraggingComp=this.beans.context.destroyBean(this.rowDraggingComp)},t.prototype.refreshWrapper=function(e){var t=this.includeRowDrag||this.includeDndSource||this.includeSelection,o=t||this.forceWrapper,r=o&&null==this.eCellWrapper;r&&(this.eCellWrapper=Lo('<div class="ag-cell-wrapper" role="presentation"></div>'),this.getGui().appendChild(this.eCellWrapper));var n=!o&&null!=this.eCellWrapper;n&&(xo(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!o);var i=!e&&o,s=i&&null==this.eCellValue;s&&(this.eCellValue=Lo('<span class="ag-cell-value" role="presentation"></span>'),this.eCellWrapper.appendChild(this.eCellValue));var a=!i&&null!=this.eCellValue;a&&(xo(this.eCellValue),this.eCellValue=void 0);var l=r||n||s||a;return l&&this.removeControls(),!e&&t&&this.addControls(),l},t.prototype.addControls=function(){var e=this.eCellValue.id="cell-"+this.getCompId(),t=[];mr(this.eCellWrapper,!0),this.includeRowDrag&&null==this.rowDraggingComp&&(this.rowDraggingComp=this.cellCtrl.createRowDragComp(),this.rowDraggingComp&&this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(),this.eCellValue)),this.includeDndSource&&null==this.dndSourceComp&&(this.dndSourceComp=this.cellCtrl.createDndSource(),this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(),this.eCellValue)),this.includeSelection&&(null==this.checkboxSelectionComp&&(this.checkboxSelectionComp=this.cellCtrl.createSelectionCheckbox(),this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(),this.eCellValue)),t.push(this.checkboxSelectionComp.getCheckboxId())),t.push(e),hr(this.getGui(),t.join(" "))},t.prototype.createCellEditorInstance=function(e,t,o){var r=this,n=this.editorVersion,s=e.newAgStackInstance();if(s){var a=e.params;s.then((function(e){return r.afterCellEditorCreated(n,e,a,t,o)})),i(this.cellEditor)&&a.cellStartedEdit&&this.cellCtrl.focusCell(!0)}},t.prototype.insertValueWithoutCellRenderer=function(e){var t=this.getParentOfValue();No(t);var o=null!=e?$e(e):null;null!=o&&(t.innerHTML=o)},t.prototype.destroyEditorAndRenderer=function(){this.destroyRenderer(),this.destroyEditor()},t.prototype.destroyRenderer=function(){var e=this.beans.context;this.cellRenderer=e.destroyBean(this.cellRenderer),xo(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++},t.prototype.destroyEditor=function(){var e=this.beans.context;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),xo(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++},t.prototype.refreshCellRenderer=function(e){if(null==this.cellRenderer||null==this.cellRenderer.refresh)return!1;if(this.cellRendererClass!==e.componentClass)return!1;var t=this.cellRenderer.refresh(e.params);return!0===t||void 0===t},t.prototype.createCellRendererInstance=function(e){var t=this,o=this.beans.gridOptionsWrapper.isAngularCompileRows(),r=this.beans.gridOptionsWrapper.isSuppressAnimationFrame(),n=!o&&!r,i=this.rendererVersion,s=e.componentClass,a=function(){if(t.rendererVersion===i&&t.isAlive()){var o=e.newAgStackInstance(),r=t.afterCellRendererCreated.bind(t,i,s);o&&o.then(r)}};n&&this.firstRender?this.beans.animationFrameService.createTask(a,this.rowNode.rowIndex,"createTasksP2"):a()},t.prototype.getCtrl=function(){return this.cellCtrl},t.prototype.getRowCtrl=function(){return this.rowCtrl},t.prototype.getCellRenderer=function(){return this.cellRenderer},t.prototype.getCellEditor=function(){return this.cellEditor},t.prototype.afterCellRendererCreated=function(e,t,o){if(this.isAlive()&&e===this.rendererVersion){if(this.cellRenderer=o,this.cellRendererClass=t,this.cellRendererGui=this.cellRenderer.getGui(),null!=this.cellRendererGui){var r=this.getParentOfValue();No(r),r.appendChild(this.cellRendererGui)}}else this.beans.context.destroyBean(o)},t.prototype.afterCellEditorCreated=function(e,t,o,r,n){if(e!==this.editorVersion)this.beans.context.destroyBean(t);else{if(t.isCancelBeforeStart&&t.isCancelBeforeStart())return this.beans.context.destroyBean(t),void this.cellCtrl.stopEditing();if(!t.getGui)return console.warn("AG Grid: cellEditor for column "+this.column.getId()+" is missing getGui() method"),void this.beans.context.destroyBean(t);this.cellEditor=t,this.cellEditorGui=t.getGui(),r||void 0!==t.isPopup&&t.isPopup()?(r||this.cellCtrl.hackSayEditingInPopup(),this.addPopupCellEditor(o,n)):this.addInCellEditor(),t.afterGuiAttached&&t.afterGuiAttached()}},t.prototype.addInCellEditor=function(){var e=this.getGui(),t=this.beans.gridOptionsWrapper.getDocument();e.contains(t.activeElement)&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)},t.prototype.addPopupCellEditor=function(e,t){var o=this;this.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=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(new iu(e));var n=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&n.appendChild(this.cellEditorGui);var i=this.beans.popupService,s=this.beans.gridOptionsWrapper.isStopEditingWhenCellsLoseFocus(),a=null!=t?t:r.getPopupPosition?r.getPopupPosition():"over",l={column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),ePopup:n,keepWithinBounds:!0},u="under"===a?i.positionPopupUnderComponent.bind(i,l):i.positionPopupOverComponent.bind(i,l),p=this.beans.gridOptionsWrapper.getLocaleTextFunc(),c=i.addPopup({modal:s,eChild:n,closeOnEsc:!0,closedCallback:function(){o.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:u,ariaLabel:p("ariaLabelCellEditor","Cell Editor")});c&&(this.hideEditorPopup=c.hideFunc)},t.prototype.detach=function(){this.eRow.removeChild(this.getGui())},t.prototype.destroy=function(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),e.prototype.destroy.call(this)},t.prototype.clearParentOfValue=function(){var e=this.getGui(),t=this.beans.gridOptionsWrapper.getDocument();e.contains(t.activeElement)&&Ot()&&e.focus({preventScroll:!0}),No(this.getParentOfValue())},t}(mn),lu=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),uu=function(e){function t(t,o,r){var n=e.call(this)||this;n.cellComps={},n.beans=o,n.rowCtrl=t,n.setTemplate('<div comp-id="'+n.getCompId()+'" style="'+n.getInitialStyle()+'"/>');var i=n.getGui(),s=i.style,a={setDomOrder:function(e){return n.domOrder=e},setCellCtrls:function(e){return n.setCellCtrls(e)},showFullWidth:function(e){return n.showFullWidth(e)},getFullWidthCellRenderer:function(){return n.getFullWidthCellRenderer()},addOrRemoveCssClass:function(e,t){return n.addOrRemoveCssClass(e,t)},setUserStyles:function(e){return Wo(i,e)},setTop:function(e){return s.top=e},setTransform:function(e){return s.transform=e},setRowIndex:function(e){return i.setAttribute("row-index",e)},setRole:function(e){return sr(i,e)},setRowId:function(e){return i.setAttribute("row-id",e)},setRowBusinessKey:function(e){return i.setAttribute("row-business-key",e)},setTabIndex:function(e){return i.setAttribute("tabindex",e.toString())}};return t.setComp(a,n.getGui(),r),n}return lu(t,e),t.prototype.getInitialStyle=function(){var e=this.rowCtrl.getInitialTransform(),t=this.rowCtrl.getInitialRowTop();return e?"transform: "+e:"top: "+t},t.prototype.showFullWidth=function(e){var t=this,o=e.newAgStackInstance();o&&o.then((function(e){if(t.isAlive()){var o=e.getGui();t.getGui().appendChild(o),t.rowCtrl.setupDetailRowAutoHeight(o),t.setFullWidthRowComp(e)}else t.beans.context.destroyBean(e)}))},t.prototype.setCellCtrls=function(e){var t=this,o=Object.assign({},this.cellComps);e.forEach((function(e){var r=e.getInstanceId();null==t.cellComps[r]?t.newCellComp(e):o[r]=null}));var r=E(o).filter((function(e){return null!=e}));this.destroyCells(r),this.ensureDomOrder(e)},t.prototype.ensureDomOrder=function(e){var t=this;if(this.domOrder){var o=[];e.forEach((function(e){var r=t.cellComps[e.getInstanceId()];r&&o.push(r.getGui())})),Vo(this.getGui(),o)}},t.prototype.newCellComp=function(e){var t=new au(this.beans,e,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[e.getInstanceId()]=t,this.getGui().appendChild(t.getGui())},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.destroyAllCells()},t.prototype.destroyAllCells=function(){var e=E(this.cellComps).filter((function(e){return null!=e}));this.destroyCells(e)},t.prototype.setFullWidthRowComp=function(e){var t=this;this.fullWidthCellRenderer&&console.error("AG Grid - should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=e,this.addDestroyFunc((function(){t.fullWidthCellRenderer=t.beans.context.destroyBean(t.fullWidthCellRenderer)}))},t.prototype.getFullWidthCellRenderer=function(){return this.fullWidthCellRenderer},t.prototype.destroyCells=function(e){var t=this;e.forEach((function(e){if(e){var o=e.getCtrl().getInstanceId();t.cellComps[o]===e&&(e.detach(),e.destroy(),t.cellComps[o]=null)}}))},t}(mn),pu=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),cu=function(){return cu=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},cu.apply(this,arguments)},du=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},hu=function(e){function t(){var t,o,r,n,i=e.call(this,(t=mn.elementGettingCreated.getAttribute("name"),o=Bl.getRowContainerCssClasses(t),r=t===pl.CENTER,n=t===pl.TOP_CENTER||t===pl.STICKY_TOP_CENTER||t===pl.BOTTOM_CENTER,r?'<div class="'+o.wrapper+'" ref="eWrapper" role="presentation">\n <div class="'+o.viewport+'" ref="eViewport" role="presentation">\n <div class="'+o.container+'" ref="eContainer"></div>\n </div>\n </div>':n?'<div class="'+o.viewport+'" ref="eViewport" role="presentation">\n <div class="'+o.container+'" ref="eContainer"></div>\n </div>':'<div class="'+o.container+'" ref="eContainer"></div>'))||this;return i.rowComps={},i.name=mn.elementGettingCreated.getAttribute("name"),i.type=kl(i.name),i}return pu(t,e),t.prototype.postConstruct=function(){var e=this,t={setViewportHeight:function(t){return e.eViewport.style.height=t},setRowCtrls:function(t){return e.setRowCtrls(t)},setDomOrder:function(t){e.domOrder=t},setContainerWidth:function(t){return e.eContainer.style.width=t}};this.createManagedBean(new Bl(this.name)).setComp(t,this.eContainer,this.eViewport,this.eWrapper)},t.prototype.preDestroy=function(){this.setRowCtrls([])},t.prototype.setRowCtrls=function(e){var t=this,o=cu({},this.rowComps);this.rowComps={},this.lastPlacedElement=null,e.forEach((function(e){var r=e.getInstanceId(),n=o[r];if(n)t.rowComps[r]=n,delete o[r],t.ensureDomOrder(n.getGui());else{var i=t.newRowComp(e);t.rowComps[r]=i,t.appendRow(i.getGui())}})),E(o).forEach((function(e){t.eContainer.removeChild(e.getGui()),e.destroy()})),sr(this.eContainer,e.length?"rowgroup":"presentation")},t.prototype.appendRow=function(e){this.domOrder?Ho(this.eContainer,e,this.lastPlacedElement):this.eContainer.appendChild(e),this.lastPlacedElement=e},t.prototype.ensureDomOrder=function(e){this.domOrder&&(ko(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)},t.prototype.newRowComp=function(e){return Bl.getPinned(this.name),new uu(e,this.beans,this.type)},du([z("beans")],t.prototype,"beans",void 0),du([vn("eViewport")],t.prototype,"eViewport",void 0),du([vn("eContainer")],t.prototype,"eContainer",void 0),du([vn("eWrapper")],t.prototype,"eWrapper",void 0),du([B],t.prototype,"postConstruct",null),du([U],t.prototype,"preDestroy",null),t}(mn),fu=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},gu=function(){function e(e){this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=e}return e.prototype.onDragEnter=function(e){var t=this;if(this.clearColumnsList(),!this.gridOptionsWrapper.isFunctionsReadOnly()){var o=e.dragItem.columns;o&&o.forEach((function(e){e.isPrimary()&&(e.isAnyFunctionActive()||(e.isAllowValue()?t.columnsToAggregate.push(e):e.isAllowRowGroup()?t.columnsToGroup.push(e):e.isAllowPivot()&&t.columnsToPivot.push(e)))}))}},e.prototype.getIconName=function(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?hs.ICON_PINNED:hs.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.columnModel.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&this.columnModel.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&this.columnModel.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop")},fu([z("columnModel")],e.prototype,"columnModel",void 0),fu([z("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),e}(),mu=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},yu=function(){function e(e,t){this.needToMoveLeft=!1,this.needToMoveRight=!1,this.pinned=e,this.eContainer=t,this.centerContainer=!n(e)}return e.prototype.init=function(){var e=this;this.ctrlsService.whenReady((function(){e.gridBodyCon=e.ctrlsService.getGridBodyCtrl()}))},e.prototype.getIconName=function(){return this.pinned?hs.ICON_PINNED:hs.ICON_MOVE},e.prototype.onDragEnter=function(e){var t=e.dragItem.columns;if(e.dragSource.type===ts.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,!0)},e.prototype.onDragLeave=function(e){this.ensureIntervalCleared()},e.prototype.setColumnsVisible=function(e,t,o){if(void 0===o&&(o="api"),e){var r=e.filter((function(e){return!e.getColDef().lockVisible}));this.columnModel.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.getColDef().lockPinned}));this.columnModel.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.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft()),e},e.prototype.checkCenterForScrolling=function(e){if(this.centerContainer){var t=this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft(),o=t+this.ctrlsService.getCenterRowContainerCtrl().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,o){var r=this;if(void 0===t&&(t=!1),void 0===o&&(o=!1),this.lastDraggingEvent=e,!i(e.hDirection)){var n=this.normaliseX(e.x);t||this.checkCenterForScrolling(n);var s=this.normaliseDirection(e.hDirection),a=e.dragSource.type,l=e.dragSource.getDragItem().columns;l=l.filter((function(e){return!e.getColDef().lockPinned||e.getPinned()==r.pinned})),this.attemptMoveColumns(a,l,s,n,t,o)}},e.prototype.normaliseDirection=function(e){if(!this.gridOptionsWrapper.isEnableRtl())return e;switch(e){case rs.Left:return rs.Right;case rs.Right:return rs.Left;default:console.error("AG Grid: Unknown direction "+e)}},e.prototype.calculateOldIndex=function(e){var t=this.columnModel.getAllGridColumns(),o=pe(e.map((function(e){return t.indexOf(e)}))),r=o[0];return le(o)-r!=o.length-1?null:r},e.prototype.attemptMoveColumns=function(e,t,o,r,n,i){var s=o===rs.Left,a=o===rs.Right;if(e===ts.HeaderCell){var l=[];t.forEach((function(e){for(var t=null,o=e.getParent();null!=o&&1===o.getDisplayedLeafColumns().length;)t=o,o=o.getParent();null!=t?t.getLeafColumns().forEach((function(e){l.includes(e)||l.push(e)})):l.includes(e)||l.push(e)})),t=l}var u=t.slice();this.columnModel.sortColumnsLikeGridColumns(u);var p=this.calculateValidMoves(u,a,r),c=this.calculateOldIndex(u);if(0!==p.length){var d=p[0],h=null!==c&&!n;if(e==ts.HeaderCell&&(h=null!==c),h&&!i){if(s&&d>=c)return;if(a&&d<=c)return}for(var f=this.columnModel.getAllDisplayedColumns(),g=[],m=null,y=0;y<p.length;y++){var v=p[y],C=this.columnModel.getProposedColumnOrder(u,v);if(this.columnModel.doesOrderPassRules(C)){var w=C.filter((function(e){return f.includes(e)}));if(null===m)m=w;else if(!on.areEqual(w,m))break;var E=this.groupFragCount(C);g.push({move:v,fragCount:E})}}if(0!==g.length){g.sort((function(e,t){return e.fragCount-t.fragCount}));var _=g[0].move;this.columnModel.moveColumns(u,_,"uiColumnDragged")}}},e.prototype.groupFragCount=function(e){function t(e){for(var t=[],o=e.getOriginalParent();null!=o;)t.push(o),o=o.getOriginalParent();return t}for(var o=0,r=function(r){var n,i=t(e[r]),s=t(e[r+1]);i=(n=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s}(i.length>s.length?[i,s]:[s,i],2))[0],s=n[1],i.forEach((function(e){-1===s.indexOf(e)&&o++}))},n=0;n<e.length-1;n++)r(n);return o},e.prototype.calculateValidMoves=function(e,t,o){if(this.gridOptionsWrapper.isSuppressMovableColumns()||e.some((function(e){return e.getColDef().suppressMovable})))return[];var r,n=this.columnModel.getDisplayedColumns(this.pinned),i=this.columnModel.getAllGridColumns(),s=n.filter((function(t){return ge(e,t)})),a=n.filter((function(t){return!ge(e,t)})),l=i.filter((function(t){return!ge(e,t)})),u=0,p=o;if(t){var c=0;s.forEach((function(e){return c+=e.getActualWidth()})),p-=c}if(p>0){for(var d=0;d<a.length&&!((p-=a[d].getActualWidth())<0);d++)u++;t&&u++}if(u>0){var h=a[u-1];r=l.indexOf(h)+1}else-1===(r=l.indexOf(a[0]))&&(r=0);var f=[r],g=function(e,t){return e-t};if(t){for(var m=r+1,y=i.length-1;m<=y;)f.push(m),m++;f.sort(g)}else{m=r,y=i.length-1;for(var v=i[m];m<=y&&this.isColumnHidden(n,v);)m++,f.push(m),v=i[m];for(m=r-1;m>=0;)f.push(m),m--;f.sort(g).reverse()}return f},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(hs.ICON_LEFT,!0):this.dragAndDropService.setGhostIcon(hs.ICON_RIGHT,!0))},e.prototype.ensureIntervalCleared=function(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(hs.ICON_MOVE))},e.prototype.moveInterval=function(){var e;this.intervalCount++,(e=10+5*this.intervalCount)>100&&(e=100);var t=null,o=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft?t=o.scrollHorizontally(-e):this.needToMoveRight&&(t=o.scrollHorizontally(e)),0!==t)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;var r=this.lastDraggingEvent.dragItem.columns.filter((function(e){return!e.getColDef().lockPinned}));if(r.length>0&&(this.dragAndDropService.setGhostIcon(hs.ICON_PINNED),this.failedMoveAttempts>7)){var n=this.needToMoveLeft?oe.PINNED_LEFT:oe.PINNED_RIGHT;this.setColumnsPinned(r,n,"uiColumnDragged"),this.dragAndDropService.nudge()}}},mu([z("columnModel")],e.prototype,"columnModel",void 0),mu([z("dragAndDropService")],e.prototype,"dragAndDropService",void 0),mu([z("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),mu([z("ctrlsService")],e.prototype,"ctrlsService",void 0),mu([B],e.prototype,"init",null),e}(),vu=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Cu=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},wu=function(e){function t(t,o){var r=e.call(this)||this;return r.pinned=t,r.eContainer=o,r}return vu(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){switch(e.pinned){case oe.PINNED_LEFT:e.eSecondaryContainers=[[t.gridBodyCtrl.getBodyViewportElement(),t.leftRowContainerCtrl.getContainerElement()],[t.bottomLeftRowContainerCtrl.getContainerElement()],[t.topLeftRowContainerCtrl.getContainerElement()]];break;case oe.PINNED_RIGHT:e.eSecondaryContainers=[[t.gridBodyCtrl.getBodyViewportElement(),t.rightRowContainerCtrl.getContainerElement()],[t.bottomRightRowContainerCtrl.getContainerElement()],[t.topRightRowContainerCtrl.getContainerElement()]];break;default:e.eSecondaryContainers=[[t.gridBodyCtrl.getBodyViewportElement(),t.centerRowContainerCtrl.getViewportElement()],[t.bottomCenterRowContainerCtrl.getViewportElement()],[t.topCenterRowContainerCtrl.getViewportElement()]]}}))},t.prototype.isInterestedIn=function(e){return e===ts.HeaderCell||e===ts.ToolPanel&&this.gridOptionsWrapper.isAllowDragFromColumnsToolPanel()},t.prototype.getSecondaryContainers=function(){return this.eSecondaryContainers},t.prototype.getContainer=function(){return this.eContainer},t.prototype.init=function(){this.moveColumnFeature=this.createManagedBean(new yu(this.pinned,this.eContainer)),this.bodyDropPivotTarget=this.createManagedBean(new gu(this.pinned)),this.dragAndDropService.addDropTarget(this)},t.prototype.getIconName=function(){return this.currentDropListener.getIconName()},t.prototype.isDropColumnInPivotMode=function(e){return this.columnModel.isPivotMode()&&e.dragSource.type===ts.ToolPanel},t.prototype.onDragEnter=function(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)},t.prototype.onDragLeave=function(e){this.currentDropListener.onDragLeave(e)},t.prototype.onDragging=function(e){this.currentDropListener.onDragging(e)},t.prototype.onDragStop=function(e){this.currentDropListener.onDragStop(e)},Cu([z("dragAndDropService")],t.prototype,"dragAndDropService",void 0),Cu([z("columnModel")],t.prototype,"columnModel",void 0),Cu([z("ctrlsService")],t.prototype,"ctrlsService",void 0),Cu([B],t.prototype,"postConstruct",null),Cu([B],t.prototype,"init",null),t}(Ge),Eu=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s},_u=function(){function e(){}return e.getHeaderClassesFromColDef=function(e,t,o,r){return i(e)?[]:this.getColumnClassesFromCollDef(e.headerClass,e,t,o,r)},e.getToolPanelClassesFromColDef=function(e,t,o,r){return i(e)?[]:this.getColumnClassesFromCollDef(e.toolPanelClass,e,t,o,r)},e.getClassParams=function(e,t,o,r){return{colDef:e,column:o,columnGroup:r,api:t.getApi(),columnApi:t.getColumnApi(),context:t.getContext()}},e.getColumnClassesFromCollDef=function(e,t,o,r,n){return i(e)?[]:"string"==typeof(s="function"==typeof e?e(this.getClassParams(t,o,r,n)):e)?[s]:Array.isArray(s)?function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Eu(arguments[t]));return e}(s):[];var s},e}(),Su=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Ru=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},bu=function(e){function t(o){var r=e.call(this,t.TEMPLATE,o)||this;return r.headerCompVersion=0,r.column=o.getColumnGroupChild(),r.pinned=o.getPinned(),r}return Su(t,e),t.prototype.postConstruct=function(){var e=this,t=this.getGui(),o=function(e,o,r){var n=r||t;null!=o&&""!=o?n.setAttribute(e,o):n.removeAttribute(e)},r={setWidth:function(e){return t.style.width=e},addOrRemoveCssClass:function(t,o){return e.addOrRemoveCssClass(t,o)},setColId:function(e){return o("col-id",e)},setTitle:function(e){return o("title",e)},setAriaDescription:function(e){return dr(t,e)},setAriaSort:function(e){return e?Pr(t,e):Tr(t)},setUserCompDetails:function(t){return e.setUserCompDetails(t)},getUserCompInstance:function(){return e.headerComp}};this.ctrl.setComp(r,this.getGui(),this.eResize,this.eHeaderCompWrapper);var n=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",n)},t.prototype.destroyHeaderComp=function(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)},t.prototype.setUserCompDetails=function(e){var t=this;this.headerCompVersion++;var o=this.headerCompVersion;e.newAgStackInstance().then((function(e){return t.afterCompCreated(o,e)}))},t.prototype.afterCompCreated=function(e,t){e==this.headerCompVersion&&this.isAlive()?(this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())):this.destroyBean(t)},t.TEMPLATE='<div class="ag-header-cell" role="columnheader" tabindex="-1">\n <div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>\n <div ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>\n </div>',Ru([vn("eResize")],t.prototype,"eResize",void 0),Ru([vn("eHeaderCompWrapper")],t.prototype,"eHeaderCompWrapper",void 0),Ru([B],t.prototype,"postConstruct",null),Ru([U],t.prototype,"destroyHeaderComp",null),t}(ga),Ou=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Pu=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Tu=function(e){function t(o){return e.call(this,t.TEMPLATE,o)||this}return Ou(t,e),t.prototype.postConstruct=function(){var e=this,t=this.getGui(),o=function(e,o){return null!=o?t.setAttribute(e,o):t.removeAttribute(e)},r={addOrRemoveCssClass:function(t,o){return e.addOrRemoveCssClass(t,o)},addOrRemoveResizableCssClass:function(t,o){return e.eResize.classList.toggle(t,o)},setWidth:function(e){return t.style.width=e},setColId:function(e){return t.setAttribute("col-id",e)},setAriaExpanded:function(e){return o("aria-expanded",e)},setTitle:function(e){return o("title",e)},setUserCompDetails:function(t){return e.setUserCompDetails(t)}};this.ctrl.setComp(r,t,this.eResize)},t.prototype.setUserCompDetails=function(e){var t=this;e.newAgStackInstance().then((function(e){return t.afterHeaderCompCreated(e)}))},t.prototype.afterHeaderCompCreated=function(e){var t=this,o=function(){return t.destroyBean(e)};this.isAlive()?(this.getGui().appendChild(e.getGui()),this.addDestroyFunc(o),this.ctrl.setDragSource(e.getGui())):o()},t.TEMPLATE='<div class="ag-header-group-cell" role="columnheader" tabindex="-1">\n <div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>\n </div>',Pu([z("userComponentFactory")],t.prototype,"userComponentFactory",void 0),Pu([vn("eResize")],t.prototype,"eResize",void 0),Pu([B],t.prototype,"postConstruct",null),t}(ga),Au=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Du=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};!function(e){e.COLUMN_GROUP="group",e.COLUMN="column",e.FLOATING_FILTER="filter"}(Vl||(Vl={}));var Iu,Nu=function(e){function t(t){var o=e.call(this)||this;o.headerComps={};var r=t.getType()==Vl.COLUMN_GROUP?"ag-header-row-column-group":t.getType()==Vl.FLOATING_FILTER?"ag-header-row-column-filter":"ag-header-row-column";return o.setTemplate('<div class="ag-header-row '+r+'" role="row"></div>'),o.ctrl=t,o}return Au(t,e),t.prototype.init=function(){var e=this,t={setTransform:function(t){return e.getGui().style.transform=t},setHeight:function(t){return e.getGui().style.height=t},setTop:function(t){return e.getGui().style.top=t},setHeaderCtrls:function(t){return e.setHeaderCtrls(t)},setWidth:function(t){return e.getGui().style.width=t},setAriaRowIndex:function(t){return Sr(e.getGui(),t)}};this.ctrl.setComp(t)},t.prototype.destroyHeaderCtrls=function(){this.setHeaderCtrls([])},t.prototype.setHeaderCtrls=function(e){var t=this;if(this.isAlive()){var o=this.headerComps;if(this.headerComps={},e.forEach((function(e){var r=e.getInstanceId(),n=o[r];delete o[r],null==n&&(n=t.createHeaderComp(e),t.getGui().appendChild(n.getGui())),t.headerComps[r]=n})),f(o,(function(e,o){t.getGui().removeChild(o.getGui()),t.destroyBean(o)})),this.gridOptionsWrapper.isEnsureDomOrder()){var r=E(this.headerComps);r.sort((function(e,t){return e.getCtrl().getColumnGroupChild().getLeft()-t.getCtrl().getColumnGroupChild().getLeft()}));var n=r.map((function(e){return e.getGui()}));Vo(this.getGui(),n)}}},t.prototype.createHeaderComp=function(e){var t;switch(this.ctrl.getType()){case Vl.COLUMN_GROUP:t=new Tu(e);break;case Vl.FLOATING_FILTER:t=new va(e);break;default:t=new bu(e)}return this.createBean(t),t.setParentComponent(this),t},Du([B],t.prototype,"init",null),Du([U],t.prototype,"destroyHeaderCtrls",null),t}(mn),xu=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Mu=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Lu=0,Fu=function(e){function t(t,o){var r=e.call(this)||this;return r.lastFocusEvent=null,r.columnGroupChild=t,r.parentRowCtrl=o,r.instanceId=t.getUniqueId()+"-"+Lu++,r}return xu(t,e),t.prototype.shouldStopEventPropagation=function(e){var t=this.focusService.getFocusedHeader(),o=t.headerRowIndex,r=t.column;return Yr(this.gridOptionsWrapper,e,o,r)},t.prototype.getWrapperHasFocus=function(){return this.gridOptionsWrapper.getDocument().activeElement===this.eGui},t.prototype.setGui=function(e){this.eGui=e,this.addDomData()},t.prototype.handleKeyDown=function(e){var t=this.getWrapperHasFocus();switch(e.key){case jr.PAGE_DOWN:case jr.PAGE_UP:case jr.PAGE_HOME:case jr.PAGE_END:t&&e.preventDefault()}},t.prototype.addDomData=function(){var e=this,o=t.DOM_DATA_KEY_HEADER_CTRL;this.gridOptionsWrapper.setDomData(this.eGui,o,this),this.addDestroyFunc((function(){return e.gridOptionsWrapper.setDomData(e.eGui,o,null)}))},t.prototype.getGui=function(){return this.eGui},t.prototype.focus=function(e){return!!this.eGui&&(this.lastFocusEvent=e||null,this.eGui.focus(),!0)},t.prototype.getRowIndex=function(){return this.parentRowCtrl.getRowIndex()},t.prototype.getParentRowCtrl=function(){return this.parentRowCtrl},t.prototype.getPinned=function(){return this.parentRowCtrl.getPinned()},t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.getColumnGroupChild=function(){return this.columnGroupChild},t.DOM_DATA_KEY_HEADER_CTRL="headerCtrl",Mu([z("focusService")],t.prototype,"focusService",void 0),Mu([z("beans")],t.prototype,"beans",void 0),Mu([z("userComponentFactory")],t.prototype,"userComponentFactory",void 0),t}(Ge);!function(e){e.EVERYTHING="group",e.FILTER="filter",e.SORT="sort",e.MAP="map",e.AGGREGATE="aggregate",e.FILTER_AGGREGATES="filter_aggregates",e.PIVOT="pivot",e.NOTHING="nothing"}(Iu||(Iu={}));var Gu=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};function ku(e){var t=e;return null!=t&&null!=t.getFrameworkComponentInstance?t.getFrameworkComponentInstance():e}var Vu,Hu=function(){function e(){this.detailGridInfoMap={},this.destroyCalled=!1}return e.prototype.registerOverlayWrapperComp=function(e){this.overlayWrapperComp=e},e.prototype.registerSideBarComp=function(e){this.sideBarComp=e},e.prototype.init=function(){var e=this;switch(this.rowModel.getType()){case oe.ROW_MODEL_TYPE_CLIENT_SIDE:this.clientSideRowModel=this.rowModel;break;case oe.ROW_MODEL_TYPE_INFINITE:this.infiniteRowModel=this.rowModel;break;case oe.ROW_MODEL_TYPE_SERVER_SIDE:this.serverSideRowModel=this.rowModel}this.ctrlsService.whenReady((function(){e.gridBodyCtrl=e.ctrlsService.getGridBodyCtrl()}))},e.prototype.__getAlignedGridService=function(){return this.alignedGridsService},e.prototype.__getContext=function(){return this.context},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;f(this.detailGridInfoMap,(function(o,r){n(r)&&(e(r,t),t++)}))},e.prototype.getDataAsCsv=function(e){if(re.assertRegistered(X.CsvExportModule,"api.getDataAsCsv"))return this.csvCreator.getDataAsCsv(e)},e.prototype.exportDataAsCsv=function(e){re.assertRegistered(X.CsvExportModule,"api.exportDataAsCSv")&&this.csvCreator.exportDataAsCsv(e)},e.prototype.getExcelExportMode=function(e){var t=this.gridOptionsWrapper.getDefaultExportParams("excel");return Object.assign({exportMode:"xlsx"},t,e).exportMode},e.prototype.getDataAsExcel=function(e){if(re.assertRegistered(X.ExcelExportModule,"api.getDataAsExcel")){var t=this.getExcelExportMode(e);if(this.excelCreator.getFactoryMode(t)!==ds.MULTI_SHEET)return this.excelCreator.getDataAsExcel(e);console.warn("AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling `api.getMultipleSheetAsExcel()` or `api.exportMultipleSheetsAsExcel()`")}},e.prototype.exportDataAsExcel=function(e){if(re.assertRegistered(X.ExcelExportModule,"api.exportDataAsExcel")){var t=this.getExcelExportMode(e);this.excelCreator.getFactoryMode(t)!==ds.MULTI_SHEET?this.excelCreator.exportDataAsExcel(e):console.warn("AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling `api.getMultipleSheetAsExcel()` or `api.exportMultipleSheetsAsExcel()`")}},e.prototype.getSheetDataForExcel=function(e){if(re.assertRegistered(X.ExcelExportModule,"api.getSheetDataForExcel")){var t=this.getExcelExportMode(e);return this.excelCreator.setFactoryMode(ds.MULTI_SHEET,t),this.excelCreator.getSheetDataForExcel(e)}},e.prototype.getMultipleSheetsAsExcel=function(e){if(re.assertRegistered(X.ExcelExportModule,"api.getMultipleSheetsAsExcel"))return this.excelCreator.getMultipleSheetsAsExcel(e)},e.prototype.exportMultipleSheetsAsExcel=function(e){if(re.assertRegistered(X.ExcelExportModule,"api.exportMultipleSheetsAsExcel"))return this.excelCreator.exportMultipleSheetsAsExcel(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.setGridAriaProperty=function(e,t){if(e){var o=this.ctrlsService.getGridBodyCtrl().getGui(),r="aria-"+e;null===t?o.removeAttribute(r):o.setAttribute(r,t)}},e.prototype.setServerSideDatasource=function(e){this.serverSideRowModel?this.serverSideRowModel.setDatasource(e):console.warn("AG Grid: you can only use an enterprise datasource when gridOptions.rowModelType is '"+oe.ROW_MODEL_TYPE_SERVER_SIDE+"'")},e.prototype.setCacheBlockSize=function(e){this.serverSideRowModel?(this.gridOptionsWrapper.setProperty("cacheBlockSize",e),this.serverSideRowModel.resetRootStore()):console.warn("AG Grid: you can only set cacheBlockSize with gridOptions.rowModelType '"+oe.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 '"+oe.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 '"+oe.ROW_MODEL_TYPE_VIEWPORT+"'")},e.prototype.setRowData=function(e){null==this.immutableService?console.warn("AG Grid: you can only set rowData when using the Client Side Row Model"):this.immutableService.isActive()?this.immutableService.setRowData(e):(this.selectionService.reset(),this.clientSideRowModel.setRowData(e))},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.columnModel.setColumnDefs(e,t)},e.prototype.setAutoGroupColumnDef=function(e,t){this.gridOptionsWrapper.setProperty(eo.PROP_AUTO_GROUP_COLUMN_DEF,e,!0)},e.prototype.setDefaultColDef=function(e,t){this.gridOptionsWrapper.setProperty(eo.PROP_DEFAULT_COL_DEF,e,!0)},e.prototype.expireValueCache=function(){this.valueCache.expire()},e.prototype.getVerticalPixelRange=function(){return this.gridBodyCtrl.getScrollFeature().getVScrollPosition()},e.prototype.getHorizontalPixelRange=function(){return this.gridBodyCtrl.getScrollFeature().getHScrollPosition()},e.prototype.setAlwaysShowHorizontalScroll=function(e){this.gridOptionsWrapper.setProperty("alwaysShowHorizontalScroll",e)},e.prototype.setAlwaysShowVerticalScroll=function(e){this.gridOptionsWrapper.setProperty("alwaysShowVerticalScroll",e)},e.prototype.refreshToolPanel=function(){this.sideBarComp&&this.sideBarComp.refresh()},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={});var t=e?e.rowNodes:void 0;this.rowRenderer.redrawRows(t)},e.prototype.setFunctionsReadOnly=function(e){this.gridOptionsWrapper.setProperty("functionsReadOnly",e)},e.prototype.refreshHeader=function(){this.ctrlsService.getHeaderRowContainerCtrls().forEach((function(e){return e.refresh()}))},e.prototype.isAnyFilterPresent=function(){return this.filterManager.isAnyFilterPresent()},e.prototype.isColumnFilterPresent=function(){return this.filterManager.isColumnFilterPresent()||this.filterManager.isAggregateFilterPresent()},e.prototype.isQuickFilterPresent=function(){return this.filterManager.isQuickFilterPresent()},e.prototype.getModel=function(){return this.rowModel},e.prototype.setRowNodeExpanded=function(e,t){e&&e.setExpanded(t)},e.prototype.onGroupExpandedOrCollapsed=function(e){i(this.clientSideRowModel)&&console.warn("AG Grid: cannot call onGroupExpandedOrCollapsed unless using normal row model"),n(e)&&console.warn("AG Grid: api.onGroupExpandedOrCollapsed - refreshFromIndex parameter is no longer used, the grid will refresh all rows"),this.clientSideRowModel.refreshModel({step:Iu.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){i(this.clientSideRowModel)&&console.warn("cannot call refreshClientSideRowModel unless using normal row model");var t=Iu.EVERYTHING,o={everything:Iu.EVERYTHING,group:Iu.EVERYTHING,filter:Iu.FILTER,map:Iu.MAP,aggregate:Iu.AGGREGATE,sort:Iu.SORT,pivot:Iu.PIVOT};if(n(e)&&(t=o[e]),i(t))console.error("AG Grid: invalid step "+e+", available steps are "+Object.keys(o).join(", "));else{var r={step:t,keepRenderedRows:!0,keepEditingRows:!0,animate:!this.gridOptionsWrapper.isSuppressAnimationFrame()};this.clientSideRowModel.refreshModel(r)}},e.prototype.isAnimationFrameQueueEmpty=function(){return this.animationFrameService.isQueueEmpty()},e.prototype.flushAllAnimationFrames=function(){this.animationFrameService.flushAllFrames()},e.prototype.getRowNode=function(e){return this.rowModel.getRowNode(e)},e.prototype.getSizesForCurrentTheme=function(){return{rowHeight:this.gridOptionsWrapper.getRowHeightAsNumber(),headerHeight:this.gridOptionsWrapper.getHeaderHeight()}},e.prototype.expandAll=function(){this.clientSideRowModel?this.clientSideRowModel.expandOrCollapseAll(!0):this.serverSideRowModel?this.serverSideRowModel.expandAll(!0):console.warn("AG Grid: expandAll only works with Client Side Row Model and Server Side Row Model")},e.prototype.collapseAll=function(){this.clientSideRowModel?this.clientSideRowModel.expandOrCollapseAll(!1):this.serverSideRowModel?this.serverSideRowModel.expandAll(!1):console.warn("AG Grid: collapseAll only works with Client Side Row Model and Server Side Row Model")},e.prototype.getToolPanelInstance=function(e){if(this.sideBarComp)return ku(this.sideBarComp.getToolPanelInstance(e));console.warn("AG Grid: toolPanel is only available in AG Grid Enterprise")},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 rowNode.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.selectionService.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 rowNode.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.selectionService.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 rowNode.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 rowNode.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.selectionService.selectAllRowNodes()},e.prototype.deselectAll=function(){this.selectionService.deselectAllRowNodes()},e.prototype.selectAllFiltered=function(){this.selectionService.selectAllRowNodes(!0)},e.prototype.deselectAllFiltered=function(){this.selectionService.deselectAllRowNodes(!0)},e.prototype.recomputeAggregates=function(){i(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:Iu.AGGREGATE})},e.prototype.sizeColumnsToFit=function(e){this.gridBodyCtrl.sizeColumnsToFit(e)},e.prototype.showLoadingOverlay=function(){this.overlayWrapperComp.showLoadingOverlay()},e.prototype.showNoRowsOverlay=function(){this.overlayWrapperComp.showNoRowsOverlay()},e.prototype.hideOverlay=function(){this.overlayWrapperComp.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.selectionService.getSelectedNodes()},e.prototype.getSelectedRows=function(){return this.selectionService.getSelectedRows()},e.prototype.getBestCostNodeSelection=function(){return this.selectionService.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,t){void 0===t&&(t="auto"),this.gridBodyCtrl.getScrollFeature().ensureColumnVisible(e,t)},e.prototype.ensureIndexVisible=function(e,t){this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(e,t)},e.prototype.ensureNodeVisible=function(e,t){void 0===t&&(t=null),this.gridBodyCtrl.getScrollFeature().ensureNodeVisible(e,t)},e.prototype.forEachLeafNode=function(e){i(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){i(this.clientSideRowModel)&&console.warn("cannot call forEachNodeAfterFilter unless using normal row model"),this.clientSideRowModel.forEachNodeAfterFilter(e)},e.prototype.forEachNodeAfterFilterAndSort=function(e){i(this.clientSideRowModel)&&console.warn("cannot call forEachNodeAfterFilterAndSort unless using normal row model"),this.clientSideRowModel.forEachNodeAfterFilterAndSort(e)},e.prototype.getFilterInstance=function(e,t){var o=this.getFilterInstanceImpl(e,(function(e){if(t){var o=ku(e);t(o)}}));return ku(o)},e.prototype.getFilterInstanceImpl=function(e,t){var o=this.columnModel.getPrimaryColumn(e);if(o){var r=this.filterManager.getFilterComponent(o,"NO_UI"),n=r&&r.resolveNow(null,(function(e){return e}));return n?setTimeout(t,0,n):r&&r.then((function(e){t(e)})),n}},e.prototype.destroyFilter=function(e){var t=this.columnModel.getPrimaryColumn(e);if(t)return this.filterManager.destroyFilter(t,"filterDestroyed")},e.prototype.getStatusPanel=function(e){if(this.statusBarService)return ku(this.statusBarService.getStatusPanel(e))},e.prototype.getColumnDef=function(e){var t=this.columnModel.getPrimaryColumn(e);return t?t.getColDef():null},e.prototype.getColumnDefs=function(){return this.columnModel.getColumnDefs()},e.prototype.onFilterChanged=function(){this.filterManager.onFilterChanged()},e.prototype.onSortChanged=function(){this.sortController.onSortChanged("api")},e.prototype.setFilterModel=function(e){this.filterManager.setFilterModel(e)},e.prototype.getFilterModel=function(){return this.filterManager.getFilterModel()},e.prototype.getFocusedCell=function(){return this.focusService.getFocusedCell()},e.prototype.clearFocusedCell=function(){return this.focusService.clearFocusedCell()},e.prototype.setFocusedCell=function(e,t,o){this.focusService.setFocusedCell({rowIndex:e,column:t,rowPinned:o,forceBrowserFocus:!0})},e.prototype.setSuppressRowDrag=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_SUPPRESS_ROW_DRAG,e)},e.prototype.setSuppressMoveWhenRowDragging=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_SUPPRESS_MOVE_WHEN_ROW_DRAG,e)},e.prototype.setSuppressRowClickSelection=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_SUPPRESS_ROW_CLICK_SELECTION,e)},e.prototype.addRowDropZone=function(e){this.gridBodyCtrl.getRowDragFeature().addRowDropZone(e)},e.prototype.removeRowDropZone=function(e){var t=this.dragAndDropService.findExternalZone(e);t&&this.dragAndDropService.removeDropTarget(t)},e.prototype.getRowDropZoneParams=function(e){return this.gridBodyCtrl.getRowDragFeature().getRowDropZone(e)},e.prototype.setHeaderHeight=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_HEADER_HEIGHT,e)},e.prototype.setDomLayout=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_DOM_LAYOUT,e)},e.prototype.setEnableCellTextSelection=function(e){this.gridBodyCtrl.setCellTextSelection(e)},e.prototype.setFillHandleDirection=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_FILL_HANDLE_DIRECTION,e)},e.prototype.setGroupHeaderHeight=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_GROUP_HEADER_HEIGHT,e)},e.prototype.setFloatingFiltersHeight=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_FLOATING_FILTERS_HEIGHT,e)},e.prototype.setPivotHeaderHeight=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_PIVOT_HEADER_HEIGHT,e)},e.prototype.setPivotGroupHeaderHeight=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_PIVOT_GROUP_HEADER_HEIGHT,e)},e.prototype.setIsExternalFilterPresent=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_IS_EXTERNAL_FILTER_PRESENT,e)},e.prototype.setDoesExternalFilterPass=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_DOES_EXTERNAL_FILTER_PASS,e)},e.prototype.setNavigateToNextCell=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_NAVIGATE_TO_NEXT_CELL,e)},e.prototype.setTabToNextCell=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_TAB_TO_NEXT_CELL,e)},e.prototype.setTabToNextHeader=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_TAB_TO_NEXT_HEADER,e)},e.prototype.setNavigateToNextHeader=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_NAVIGATE_TO_NEXT_HEADER,e)},e.prototype.setRowGroupPanelShow=function(e){this.gridOptionsWrapper.setProperty("rowGroupPanelShow",e)},e.prototype.setGroupRowAggNodes=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_GROUP_ROW_AGG_NODES,e)},e.prototype.setGetGroupRowAgg=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_GET_GROUP_ROW_AGG,e)},e.prototype.setGetBusinessKeyForNode=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_GET_BUSINESS_KEY_FOR_NODE,e)},e.prototype.setGetChildCount=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_GET_CHILD_COUNT,e)},e.prototype.setProcessRowPostCreate=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_PROCESS_ROW_POST_CREATE,e)},e.prototype.setGetRowNodeId=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_GET_ROW_NODE_ID,e)},e.prototype.setGetRowId=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_GET_ROW_ID,e)},e.prototype.setGetRowClass=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_GET_ROW_CLASS,e)},e.prototype.setIsFullWidthCell=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_IS_FULL_WIDTH_CELL,e)},e.prototype.setIsFullWidthRow=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_IS_FULL_WIDTH_ROW,e)},e.prototype.setIsRowSelectable=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_IS_ROW_SELECTABLE,e)},e.prototype.setIsRowMaster=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_IS_ROW_MASTER,e)},e.prototype.setPostSort=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_POST_SORT,e)},e.prototype.setPostSortRows=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_POST_SORT_ROWS,e)},e.prototype.setGetDocument=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_GET_DOCUMENT,e)},e.prototype.setGetContextMenuItems=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_GET_CONTEXT_MENU_ITEMS,e)},e.prototype.setGetMainMenuItems=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_GET_MAIN_MENU_ITEMS,e)},e.prototype.setProcessCellForClipboard=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_PROCESS_CELL_FOR_CLIPBOARD,e)},e.prototype.setSendToClipboard=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_SEND_TO_CLIPBOARD,e)},e.prototype.setProcessCellFromClipboard=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_PROCESS_CELL_FROM_CLIPBOARD,e)},e.prototype.setProcessSecondaryColDef=function(e){console.warn("AG Grid: since version 28.0.x setProcessSecondaryColDef has been renamed, please use setProcessPivotResultColDef instead"),this.setProcessPivotResultColDef(e)},e.prototype.setProcessSecondaryColGroupDef=function(e){console.warn("AG Grid: since version 28.0.x setProcessSecondaryColGroupDef has been renamed, please use setProcessPivotResultColGroupDef instead"),this.setProcessPivotResultColGroupDef(e)},e.prototype.setProcessPivotResultColDef=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_PROCESS_PIVOT_RESULT_COL_DEF,e)},e.prototype.setProcessPivotResultColGroupDef=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_PROCESS_PIVOT_RESULT_COL_GROUP_DEF,e)},e.prototype.setPostProcessPopup=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_POST_PROCESS_POPUP,e)},e.prototype.setDefaultGroupOrderComparator=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_DEFAULT_GROUP_ORDER_COMPARATOR,e)},e.prototype.setInitialGroupOrderComparator=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_INITIAL_GROUP_ORDER_COMPARATOR,e)},e.prototype.setGetChartToolbarItems=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_GET_CHART_TOOLBAR_ITEMS,e)},e.prototype.setPaginationNumberFormatter=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_PAGINATION_NUMBER_FORMATTER,e)},e.prototype.setGetServerSideStoreParams=function(e){this.setGetServerSideGroupLevelParams(e)},e.prototype.setGetServerSideGroupLevelParams=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_GET_SERVER_SIDE_GROUP_PARAMS,e)},e.prototype.setIsServerSideGroupOpenByDefault=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_IS_SERVER_SIDE_GROUPS_OPEN_BY_DEFAULT,e)},e.prototype.setIsApplyServerSideTransaction=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_IS_APPLY_SERVER_SIDE_TRANSACTION,e)},e.prototype.setIsServerSideGroup=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_IS_SERVER_SIDE_GROUP,e)},e.prototype.setGetServerSideGroupKey=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_GET_SERVER_SIDE_GROUP_KEY,e)},e.prototype.setGetRowStyle=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_GET_ROW_STYLE,e)},e.prototype.setGetRowHeight=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_GET_ROW_HEIGHT,e)},e.prototype.isSideBarVisible=function(){return!!this.sideBarComp&&this.sideBarComp.isDisplayed()},e.prototype.setSideBarVisible=function(e){this.sideBarComp?this.sideBarComp.setDisplayed(e):e&&console.warn("AG Grid: sideBar is not loaded")},e.prototype.setSideBarPosition=function(e){this.sideBarComp?this.sideBarComp.setSideBarPosition(e):console.warn("AG Grid: sideBar is not loaded")},e.prototype.openToolPanel=function(e){this.sideBarComp?this.sideBarComp.openToolPanel(e):console.warn("AG Grid: toolPanel is only available in AG Grid Enterprise")},e.prototype.closeToolPanel=function(){this.sideBarComp?this.sideBarComp.close():console.warn("AG Grid: toolPanel is only available in AG Grid Enterprise")},e.prototype.getOpenedToolPanel=function(){return this.sideBarComp?this.sideBarComp.openedItem():null},e.prototype.getSideBar=function(){return this.gridOptionsWrapper.getSideBar()},e.prototype.setSideBar=function(e){this.gridOptionsWrapper.setProperty("sideBar",vt.parse(e))},e.prototype.setSuppressClipboardPaste=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_SUPPRESS_CLIPBOARD_PASTE,e)},e.prototype.isToolPanelShowing=function(){return this.sideBarComp.isToolPanelShowing()},e.prototype.doLayout=function(){T((function(){return console.warn("AG Grid - since version 25.1, doLayout was taken out, as it's not needed. The grid responds to grid size changes automatically")}),"doLayoutDeprecated")},e.prototype.resetRowHeights=function(){if(n(this.clientSideRowModel)){if(this.columnModel.isAutoRowHeightActive())return void console.warn("AG Grid: calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.");this.clientSideRowModel.resetRowHeights()}},e.prototype.setGroupRemoveSingleChildren=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_GROUP_REMOVE_SINGLE_CHILDREN,e)},e.prototype.setGroupRemoveLowestSingleChildren=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN,e)},e.prototype.setGroupDisplayType=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_GROUP_DISPLAY_TYPE,e)},e.prototype.onRowHeightChanged=function(){this.clientSideRowModel?this.clientSideRowModel.onRowHeightChanged():this.serverSideRowModel&&this.serverSideRowModel.onRowHeightChanged()},e.prototype.getValue=function(e,t){var o=this.columnModel.getPrimaryColumn(e);return i(o)&&(o=this.columnModel.getGridColumn(e)),i(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(){if(!this.destroyCalled){this.destroyCalled=!0;var e=this.ctrlsService.getGridCtrl();e&&e.destroyGridUi(),this.context.destroy()}},e.prototype.cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid=function(){setTimeout(R.bind(window,this,"Grid API"),100)},e.prototype.warnIfDestroyed=function(e){return this.destroyCalled&&console.warn("AG Grid: Grid API method "+e+" was called on a grid that was destroyed."),this.destroyCalled},e.prototype.resetQuickFilter=function(){this.warnIfDestroyed("resetQuickFilter")||this.rowModel.forEachNode((function(e){return e.quickFilterAggregateText=null}))},e.prototype.getRangeSelections=function(){return console.warn("AG Grid: in v20.1.x, api.getRangeSelections() is gone, please use getCellRanges() instead.\n We had to change how cell selections works a small bit to allow charting to integrate. The return type of\n getCellRanges() is a bit different, please check the AG Grid documentation."),null},e.prototype.getCellRanges=function(){return this.rangeService?this.rangeService.getCellRanges():(console.warn("AG Grid: cell range selection is only available in AG Grid Enterprise"),null)},e.prototype.camelCaseToHumanReadable=function(e){return qe(e)},e.prototype.addRangeSelection=function(e){console.warn("AG Grid: As of version 21.x, range selection changed slightly to allow charting integration. Please call api.addCellRange() instead of api.addRangeSelection()")},e.prototype.addCellRange=function(e){this.rangeService||console.warn("AG Grid: cell range selection is only available in AG Grid Enterprise"),this.rangeService.addCellRange(e)},e.prototype.clearRangeSelection=function(){this.rangeService||console.warn("AG Grid: cell range selection is only available in AG Grid Enterprise"),this.rangeService.removeAllCellRanges()},e.prototype.undoCellEditing=function(){this.undoRedoService.undo()},e.prototype.redoCellEditing=function(){this.undoRedoService.redo()},e.prototype.getCurrentUndoSize=function(){return this.undoRedoService.getCurrentUndoStackSize()},e.prototype.getCurrentRedoSize=function(){return this.undoRedoService.getCurrentRedoStackSize()},e.prototype.getChartModels=function(){if(re.assertRegistered(X.RangeSelectionModule,"api.getChartModels")&&re.assertRegistered(X.GridChartsModule,"api.getChartModels"))return this.chartService.getChartModels()},e.prototype.getChartRef=function(e){if(re.assertRegistered(X.RangeSelectionModule,"api.getChartRef")&&re.assertRegistered(X.GridChartsModule,"api.getChartRef"))return this.chartService.getChartRef(e)},e.prototype.getChartImageDataURL=function(e){if(re.assertRegistered(X.GridChartsModule,"api.getChartImageDataURL"))return this.chartService.getChartImageDataURL(e)},e.prototype.downloadChart=function(e){if(re.assertRegistered(X.GridChartsModule,"api.downloadChart"))return this.chartService.downloadChart(e)},e.prototype.openChartToolPanel=function(e){if(re.assertRegistered(X.GridChartsModule,"api.openChartToolPanel"))return this.chartService.openChartToolPanel(e)},e.prototype.closeChartToolPanel=function(e){if(re.assertRegistered(X.GridChartsModule,"api.closeChartToolPanel"))return this.chartService.closeChartToolPanel(e.chartId)},e.prototype.createRangeChart=function(e){if(re.assertRegistered(X.RangeSelectionModule,"api.createRangeChart")&&re.assertRegistered(X.GridChartsModule,"api.createRangeChart"))return this.chartService.createRangeChart(e)},e.prototype.createCrossFilterChart=function(e){if(re.assertRegistered(X.RangeSelectionModule,"api.createCrossFilterChart")&&re.assertRegistered(X.GridChartsModule,"api.createCrossFilterChart"))return this.chartService.createCrossFilterChart(e)},e.prototype.restoreChart=function(e,t){if(re.assertRegistered(X.RangeSelectionModule,"api.restoreChart")&&re.assertRegistered(X.GridChartsModule,"api.restoreChart"))return this.chartService.restoreChart(e,t)},e.prototype.createPivotChart=function(e){if(re.assertRegistered(X.RangeSelectionModule,"api.createPivotChart")&&re.assertRegistered(X.GridChartsModule,"api.createPivotChart"))return this.chartService.createPivotChart(e)},e.prototype.copyToClipboard=function(e){this.clipboardService||console.warn("AG Grid: clipboard is only available in AG Grid Enterprise"),this.clipboardService.copyToClipboard(e)},e.prototype.copySelectedRowsToClipboard=function(e){this.clipboardService||console.warn("AG Grid: clipboard is only available in AG Grid Enterprise"),this.clipboardService.copySelectedRowsToClipboard(e)},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.columnModel.getGridColumn(e);this.menuFactory.showMenuAfterButtonClick(o,t,"columnMenu")},e.prototype.showColumnMenuAfterMouseClick=function(e,t){var o=this.columnModel.getGridColumn(e);o||(o=this.columnModel.getPrimaryColumn(e)),o?this.menuFactory.showMenuAfterMouseEvent(o,t):console.error("AG Grid: column '"+e+"' not found")},e.prototype.hidePopupMenu=function(){this.contextMenuFactory&&this.contextMenuFactory.hideActiveMenu(),this.menuFactory.hideActiveMenu()},e.prototype.setPopupParent=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_POPUP_PARENT,e)},e.prototype.tabToNextCell=function(e){return this.navigationService.tabToNextCell(!1,e)},e.prototype.tabToPreviousCell=function(e){return this.navigationService.tabToNextCell(!0,e)},e.prototype.getCellRendererInstances=function(e){return void 0===e&&(e={}),this.rowRenderer.getCellRendererInstances(e).map(ku)},e.prototype.getCellEditorInstances=function(e){return void 0===e&&(e={}),this.rowRenderer.getCellEditorInstances(e).map(ku)},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.columnModel.getGridColumn(e.colKey);if(t){var o={rowIndex:e.rowIndex,rowPinned:e.rowPinned||null,column:t};null==e.rowPinned&&this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(e.rowIndex);var r=this.navigationService.getCellByPosition(o);r&&r.startRowOrCellEdit(e.key,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.applyServerSideTransaction=function(e){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.applyTransaction(e);console.warn("AG Grid: Cannot apply Server Side Transaction if not using the Server Side Row Model.")},e.prototype.applyServerSideTransactionAsync=function(e,t){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.applyTransactionAsync(e,t);console.warn("AG Grid: Cannot apply Server Side Transaction if not using the Server Side Row Model.")},e.prototype.retryServerSideLoads=function(){this.serverSideRowModel?this.serverSideRowModel.retryLoads():console.warn("AG Grid: API retryServerSideLoads() can only be used when using Server-Side Row Model.")},e.prototype.flushServerSideAsyncTransactions=function(){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.flushAsyncTransactions();console.warn("AG Grid: Cannot flush Server Side Transaction if not using the Server Side Row Model.")},e.prototype.applyTransaction=function(e){if(this.clientSideRowModel){var t=this.clientSideRowModel.updateRowData(e);return this.rowRenderer.refreshFullWidthRows(t.update),this.gridOptionsWrapper.isSuppressChangeDetection()||this.rowRenderer.refreshCells(),t}console.error("AG Grid: updateRowData() only works with ClientSideRowModel. Working with InfiniteRowModel was deprecated in v23.1 and removed in v24.1")},e.prototype.setDeltaSort=function(e){this.gridOptionsWrapper.setProperty("deltaSort",e)},e.prototype.updateRowData=function(e){return T((function(){return console.warn("AG Grid: as of v23.1, grid API updateRowData(transaction) is now called applyTransaction(transaction). updateRowData is deprecated and will be removed in a future major release.")}),"updateRowData deprecated"),this.applyTransaction(e)},e.prototype.applyTransactionAsync=function(e,t){this.clientSideRowModel?this.clientSideRowModel.batchUpdateRowData(e,t):console.error("AG Grid: api.applyTransactionAsync() only works with ClientSideRowModel.")},e.prototype.flushAsyncTransactions=function(){this.clientSideRowModel?this.clientSideRowModel.flushAsyncTransactions():console.error("AG Grid: api.applyTransactionAsync() only works with ClientSideRowModel.")},e.prototype.batchUpdateRowData=function(e,t){T((function(){return console.warn("AG Grid: as of v23.1, grid API batchUpdateRowData(transaction, callback) is now called applyTransactionAsync(transaction, callback). batchUpdateRowData is deprecated and will be removed in a future major release.")}),"batchUpdateRowData deprecated"),this.applyTransactionAsync(e,t)},e.prototype.insertItemsAtIndex=function(e,t,o){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){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){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.infiniteRowModel?this.infiniteRowModel.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.infiniteRowModel?this.infiniteRowModel.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.refreshServerSide({purge: true})"),this.purgeServerSideCache(e)},e.prototype.purgeServerSideCache=function(e){void 0===e&&(e=[]),this.serverSideRowModel?(console.warn("AG Grid: since v25.0, api.purgeServerSideCache is deprecated. Please use api.refreshServerSide({purge: true}) instead."),this.refreshServerSide({route:e,purge:!0})):console.warn("AG Grid: api.purgeServerSideCache is only available when rowModelType='serverSide'.")},e.prototype.refreshServerSide=function(e){this.serverSideRowModel?this.serverSideRowModel.refreshStore(e):console.warn("AG Grid: api.refreshServerSide is only available when rowModelType='serverSide'.")},e.prototype.refreshServerSideStore=function(e){return T((function(){return console.warn("AG Grid: Grid API refreshServerSideStore() was renamed to refreshServerSide() in v28.0")}),"refreshServerSideStore-renamed"),this.refreshServerSide(e)},e.prototype.getServerSideStoreState=function(){return T((function(){return console.warn("AG Grid: Grid API getServerSideStoreState() was renamed to getServerSideGroupLevelState() in v28.0")}),"getServerSideStoreState-renamed"),this.getServerSideGroupLevelState()},e.prototype.getServerSideGroupLevelState=function(){return this.serverSideRowModel?this.serverSideRowModel.getStoreState():(console.warn("AG Grid: api.getServerSideGroupLevelState is only available when rowModelType='serverSide'."),[])},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.infiniteRowModel)return this.infiniteRowModel.getRowCount();console.warn("AG Grid: api.getVirtualRowCount is only available when rowModelType='virtual'.")},e.prototype.isMaxRowFound=function(){return console.warn("AG Grid: api.isMaxRowFound is deprecated, please use api.isLastRowIndexKnown()"),this.isLastRowIndexKnown()},e.prototype.isLastRowIndexKnown=function(){if(this.infiniteRowModel)return this.infiniteRowModel.isLastRowIndexKnown();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.setRowCount(e,t)},e.prototype.setInfiniteRowCount=function(e,t){console.warn("AG Grid: setInfiniteRowCount() is now called setRowCount(), please call setRowCount() instead"),this.setRowCount(e,t)},e.prototype.setRowCount=function(e,t){this.infiniteRowModel?this.infiniteRowModel.setRowCount(e,t):console.warn("AG Grid: api.setRowCount is only available for Infinite Row Model.")},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.rowNodeBlockLoader.getBlockState()},e.prototype.checkGridSize=function(){console.warn("In AG Grid v25.2.0, checkGridSize() was removed, as it was legacy and didn't do anything useful.")},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.getMasterRowCount()},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)},e.prototype.setRowClass=function(e){this.gridOptionsWrapper.setProperty(eo.PROP_ROW_CLASS,e)},Gu([K("immutableService")],e.prototype,"immutableService",void 0),Gu([K("csvCreator")],e.prototype,"csvCreator",void 0),Gu([K("excelCreator")],e.prototype,"excelCreator",void 0),Gu([z("rowRenderer")],e.prototype,"rowRenderer",void 0),Gu([z("navigationService")],e.prototype,"navigationService",void 0),Gu([z("filterManager")],e.prototype,"filterManager",void 0),Gu([z("columnModel")],e.prototype,"columnModel",void 0),Gu([z("selectionService")],e.prototype,"selectionService",void 0),Gu([z("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),Gu([z("valueService")],e.prototype,"valueService",void 0),Gu([z("alignedGridsService")],e.prototype,"alignedGridsService",void 0),Gu([z("eventService")],e.prototype,"eventService",void 0),Gu([z("pinnedRowModel")],e.prototype,"pinnedRowModel",void 0),Gu([z("context")],e.prototype,"context",void 0),Gu([z("rowModel")],e.prototype,"rowModel",void 0),Gu([z("sortController")],e.prototype,"sortController",void 0),Gu([z("paginationProxy")],e.prototype,"paginationProxy",void 0),Gu([z("focusService")],e.prototype,"focusService",void 0),Gu([z("dragAndDropService")],e.prototype,"dragAndDropService",void 0),Gu([K("rangeService")],e.prototype,"rangeService",void 0),Gu([K("clipboardService")],e.prototype,"clipboardService",void 0),Gu([K("aggFuncService")],e.prototype,"aggFuncService",void 0),Gu([z("menuFactory")],e.prototype,"menuFactory",void 0),Gu([K("contextMenuFactory")],e.prototype,"contextMenuFactory",void 0),Gu([z("valueCache")],e.prototype,"valueCache",void 0),Gu([z("animationFrameService")],e.prototype,"animationFrameService",void 0),Gu([K("statusBarService")],e.prototype,"statusBarService",void 0),Gu([K("chartService")],e.prototype,"chartService",void 0),Gu([K("undoRedoService")],e.prototype,"undoRedoService",void 0),Gu([K("rowNodeBlockLoader")],e.prototype,"rowNodeBlockLoader",void 0),Gu([K("ssrmTransactionManager")],e.prototype,"serverSideTransactionManager",void 0),Gu([z("ctrlsService")],e.prototype,"ctrlsService",void 0),Gu([K("frameworkComponentWrapper")],e.prototype,"frameworkComponentWrapper",void 0),Gu([B],e.prototype,"init",null),Gu([U],e.prototype,"cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid",null),Gu([Y("gridApi")],e)}(),Wu=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),ju=function(e){function t(t,o,r,n){var i=e.call(this)||this;return i.columnOrGroup=t,i.eCell=o,i.ariaEl=i.eCell.querySelector("[role=columnheader]")||i.eCell,i.colsSpanning=n,i.beans=r,i}return Wu(t,e),t.prototype.setColsSpanning=function(e){this.colsSpanning=e,this.onLeftChanged()},t.prototype.getColumnOrGroup=function(){return this.beans.gridOptionsWrapper.isEnableRtl()&&this.colsSpanning?le(this.colsSpanning):this.columnOrGroup},t.prototype.postConstruct=function(){this.addManagedListener(this.columnOrGroup,se.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.setLeftFirstTime(),this.addManagedListener(this.eventService,We.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onLeftChanged.bind(this)),this.addManagedListener(this.beans.gridOptionsWrapper,eo.PROP_DOM_LAYOUT,this.onLeftChanged.bind(this))},t.prototype.setLeftFirstTime=function(){var e=this.beans.gridOptionsWrapper.isSuppressColumnMoveAnimation(),t=n(this.columnOrGroup.getOldLeft());this.beans.columnAnimationService.isActive()&&t&&!e?this.animateInLeft():this.onLeftChanged()},t.prototype.animateInLeft=function(){var e=this,t=this.getColumnOrGroup(),o=t.getLeft(),r=t.getOldLeft(),n=this.modifyLeftForPrintLayout(t,r),i=this.modifyLeftForPrintLayout(t,o);this.setLeft(n),this.actualLeft=i,this.beans.columnAnimationService.executeNextVMTurn((function(){e.actualLeft===i&&e.setLeft(i)}))},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){if(this.beans.gridOptionsWrapper.getDomLayout()!==oe.DOM_LAYOUT_PRINT)return t;if(e.getPinned()===oe.PINNED_LEFT)return t;var o=this.beans.columnModel.getDisplayedColumnsLeftWidth();return e.getPinned()===oe.PINNED_RIGHT?o+this.beans.columnModel.getBodyContainerWidth()+t:o+t},t.prototype.setLeft=function(e){var t;if(n(e)&&(this.eCell.style.left=e+"px"),this.columnOrGroup instanceof se)t=this.columnOrGroup;else{var o=this.columnOrGroup.getLeafColumns();if(!o.length)return;o.length>1&&Or(this.ariaEl,o.length),t=o[0]}var r=this.beans.columnModel.getAriaColumnIndex(t);br(this.ariaEl,r)},function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);i>3&&s&&Object.defineProperty(t,o,s)}([B],t.prototype,"postConstruct",null),t}(Ge),Bu=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Uu=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Yu=function(e){function t(t,o){var r=e.call(this)||this;return r.columns=t,r.element=o,r}return Bu(t,e),t.prototype.postConstruct=function(){this.gridOptionsWrapper.isColumnHoverHighlight()&&this.addMouseHoverListeners()},t.prototype.addMouseHoverListeners=function(){this.addManagedListener(this.element,"mouseout",this.onMouseOut.bind(this)),this.addManagedListener(this.element,"mouseover",this.onMouseOver.bind(this))},t.prototype.onMouseOut=function(){this.columnHoverService.clearMouseOver()},t.prototype.onMouseOver=function(){this.columnHoverService.setMouseOver(this.columns)},Uu([z("columnHoverService")],t.prototype,"columnHoverService",void 0),Uu([B],t.prototype,"postConstruct",null),t}(Ge),zu=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Ku=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},$u=function(e){function t(t,o){var r=e.call(this,t,o)||this;return r.column=t,r}return zu(t,e),t.prototype.setComp=function(t,o,r,n){e.prototype.setGui.call(this,o),this.comp=t,this.eButtonShowMainFilter=r,this.eFloatingFilterBody=n;var i=this.column.getColDef(),s=!!i.filter||!!i.filterFramework,a=!!i.floatingFilter;this.active=s&&a,this.setupWidth(),this.setupLeft(),this.setupHover(),this.setupFocus(),this.setupUserComp(),this.setupSyncWithFilter(),this.setupUi(),this.addManagedListener(this.eButtonShowMainFilter,"click",this.showParentFilter.bind(this))},t.prototype.setupUi=function(){if(this.comp.addOrRemoveButtonWrapperCssClass("ag-hidden",!this.active||this.suppressFilterButton),this.active){this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton);var e=Hr("filter",this.gridOptionsWrapper,this.column);e&&this.eButtonShowMainFilter.appendChild(e)}},t.prototype.setupFocus=function(){this.createManagedBean(new In(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))},t.prototype.onTabKeyDown=function(e){if(this.gridOptionsWrapper.getDocument().activeElement!==this.eGui){var t=this.focusService.findNextFocusableElement(this.eGui,null,e.shiftKey);if(t)return this.beans.headerNavigationService.scrollToColumn(this.column),e.preventDefault(),void t.focus();var o=this.findNextColumnWithFloatingFilter(e.shiftKey);o&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:o},event:e})&&e.preventDefault()}},t.prototype.findNextColumnWithFloatingFilter=function(e){var t=this.beans.columnModel,o=this.column;do{if(!(o=e?t.getDisplayedColBefore(o):t.getDisplayedColAfter(o)))break}while(!o.getColDef().filter||!o.getColDef().floatingFilter);return o},t.prototype.handleKeyDown=function(t){e.prototype.handleKeyDown.call(this,t);var o=this.getWrapperHasFocus();switch(t.key){case jr.UP:case jr.DOWN:o||t.preventDefault();case jr.LEFT:case jr.RIGHT:if(o)return;t.stopPropagation();case jr.ENTER:o&&this.focusService.focusInto(this.eGui)&&t.preventDefault();break;case jr.ESCAPE:o||this.eGui.focus()}},t.prototype.onFocusIn=function(e){if(!this.eGui.contains(e.relatedTarget)){var t=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),o=!!e.relatedTarget&&So(e.relatedTarget,"ag-floating-filter");if(t&&o&&e.target===this.eGui){var r=this.lastFocusEvent,n=!(!r||r.key!==jr.TAB);if(r&&n){var i=r.shiftKey;this.focusService.focusInto(this.eGui,i)}}var s=this.getRowIndex();this.beans.focusService.setFocusedHeader(s,this.column)}},t.prototype.setupHover=function(){var e=this;this.createManagedBean(new Yu([this.column],this.eGui));var t=function(){if(e.gridOptionsWrapper.isColumnHoverHighlight()){var t=e.columnHoverService.isHovered(e.column);e.comp.addOrRemoveCssClass("ag-column-hover",t)}};this.addManagedListener(this.eventService,We.EVENT_COLUMN_HOVER_CHANGED,t),t()},t.prototype.setupLeft=function(){var e=new ju(this.column,this.eGui,this.beans);this.createManagedBean(e)},t.prototype.setupUserComp=function(){var e=this;if(this.active){var t=this.column.getColDef(),o=this.filterManager.createFilterParams(this.column,t),r=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(t,$s,o),n=this.userComponentFactory.getDefaultFloatingFilterType(t);null==n&&(n="agReadOnlyFloatingFilter");var i={column:this.column,filterParams:r,currentParentModel:function(){return e.currentParentModel()},parentFilterInstance:function(t){return e.parentFilterInstance(t)},showParentFilter:function(){return e.showParentFilter()},suppressFilterButton:!1};this.suppressFilterButton=!!t.floatingFilterComponentParams&&!!t.floatingFilterComponentParams.suppressFilterButton;var s=this.userComponentFactory.getFloatingFilterCompDetails(t,i,n);s&&this.comp.setCompDetails(s)}},t.prototype.currentParentModel=function(){var e=this.getFilterComponent(!1);return e?e.resolveNow(null,(function(e){return e&&e.getModel()})):null},t.prototype.getFilterComponent=function(e){return void 0===e&&(e=!0),this.filterManager.getFilterComponent(this.column,"NO_UI",e)},t.prototype.parentFilterInstance=function(e){var t=this.getFilterComponent();null!=t&&t.then((function(t){e(ku(t))}))},t.prototype.showParentFilter=function(){var e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.menuFactory.showMenuAfterButtonClick(this.column,e,"floatingFilter","filterMenuTab",["filterMenuTab"])},t.prototype.setupSyncWithFilter=function(){var e=this;if(this.active){var t=function(t){var o=e.comp.getFloatingFilterComp();if(o){var r=e.currentParentModel();o.then((function(e){e&&e.onParentModelChanged(r,t)}))}};this.addManagedListener(this.column,se.EVENT_FILTER_CHANGED,t),this.filterManager.isFilterActive(this.column)&&t(null)}},t.prototype.setupWidth=function(){var e=this,t=function(){var t=e.column.getActualWidth()+"px";e.comp.setWidth(t)};this.addManagedListener(this.column,se.EVENT_WIDTH_CHANGED,t),t()},Ku([z("filterManager")],t.prototype,"filterManager",void 0),Ku([z("columnHoverService")],t.prototype,"columnHoverService",void 0),Ku([z("menuFactory")],t.prototype,"menuFactory",void 0),t}(Fu),qu=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Zu=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Xu=function(e){function t(t,o,r,n,i){var s=e.call(this)||this;return s.pinned=t,s.column=o,s.eResize=r,s.comp=n,s.ctrl=i,s}return qu(t,e),t.prototype.postConstruct=function(){var e,t,o=this,r=this.column.getColDef(),n=[],i=function(){n.forEach((function(e){return e()})),n.length=0},s=function(){var s=o.column.isResizable(),a=!o.gridOptionsWrapper.isSuppressAutoSize()&&!r.suppressAutoSize;(s!==e||a!==t)&&(e=s,t=a,i(),function(){if(wo(o.eResize,e),e){var r=o.horizontalResizeService.addResizeBar({eResizeBar:o.eResize,onResizeStart:o.onResizeStart.bind(o),onResizing:o.onResizing.bind(o,!1),onResizeEnd:o.onResizing.bind(o,!0)});if(n.push(r),t){var i=o.gridOptionsWrapper.isSkipHeaderOnAutoSize(),s=function(){o.columnModel.autoSizeColumn(o.column,i,"uiColumnResized")};o.eResize.addEventListener("dblclick",s);var a=new Ti(o.eResize);a.addEventListener(Ti.EVENT_DOUBLE_TAP,s),o.addDestroyFunc((function(){o.eResize.removeEventListener("dblclick",s),a.removeEventListener(Ti.EVENT_DOUBLE_TAP,s),a.destroy()}))}}}())};s(),this.addDestroyFunc(i),this.ctrl.addRefreshFunction(s)},t.prototype.onResizing=function(e,t){var o=this.normaliseResizeAmount(t),r=[{key:this.column,newWidth:this.resizeStartWidth+o}];this.columnModel.setColumnWidths(r,this.resizeWithShiftKey,e,"uiColumnDragged"),e&&this.comp.addOrRemoveCssClass("ag-column-resizing",!1)},t.prototype.onResizeStart=function(e){this.resizeStartWidth=this.column.getActualWidth(),this.resizeWithShiftKey=e,this.comp.addOrRemoveCssClass("ag-column-resizing",!0)},t.prototype.normaliseResizeAmount=function(e){var t=e,o=this.pinned!==oe.PINNED_LEFT,r=this.pinned===oe.PINNED_RIGHT;return this.gridOptionsWrapper.isEnableRtl()?o&&(t*=-1):r&&(t*=-1),t},Zu([z("horizontalResizeService")],t.prototype,"horizontalResizeService",void 0),Zu([z("columnModel")],t.prototype,"columnModel",void 0),Zu([B],t.prototype,"postConstruct",null),t}(Ge),Qu=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Ju=function(e){function t(t,o,r){void 0===o&&(o="ag-checkbox"),void 0===r&&(r="checkbox");var n=e.call(this,t,o,r)||this;return n.labelAlignment="right",n.selected=!1,n.readOnly=!1,n.passive=!1,n}return Qu(t,e),t.prototype.addInputListeners=function(){this.addManagedListener(this.eInput,"click",this.onCheckboxClick.bind(this)),this.addManagedListener(this.eLabel,"click",this.toggle.bind(this))},t.prototype.getNextValue=function(){return void 0===this.selected||!this.selected},t.prototype.setPassive=function(e){this.passive=e},t.prototype.isReadOnly=function(){return this.readOnly},t.prototype.setReadOnly=function(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e},t.prototype.setDisabled=function(t){return this.eWrapper.classList.toggle("ag-disabled",t),e.prototype.setDisabled.call(this,t)},t.prototype.toggle=function(){if(!this.eInput.disabled){var e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}},t.prototype.getValue=function(){return this.isSelected()},t.prototype.setValue=function(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this},t.prototype.setName=function(e){return this.getInputElement().name=e,this},t.prototype.isSelected=function(){return this.selected},t.prototype.setSelected=function(e,t){this.isSelected()!==e&&(this.previousValue=this.isSelected(),e=this.selected="boolean"==typeof e?e:void 0,this.eInput.checked=e,this.eInput.indeterminate=void 0===e,t||this.dispatchChange(this.selected,this.previousValue))},t.prototype.dispatchChange=function(e,o,r){this.dispatchEvent({type:t.EVENT_CHANGED,selected:e,previousValue:o,event:r});var n=this.getInputElement(),i={type:We.EVENT_CHECKBOX_CHANGED,id:n.id,name:n.name,selected:e,previousValue:o};this.eventService.dispatchEvent(i)},t.prototype.onCheckboxClick=function(e){if(!this.passive&&!this.eInput.disabled){var t=this.isSelected(),o=this.selected=e.target.checked;this.refreshSelectedClass(o),this.dispatchChange(o,t,e)}},t.prototype.refreshSelectedClass=function(e){this.eWrapper.classList.toggle("ag-checked",!0===e),this.eWrapper.classList.toggle("ag-indeterminate",null==e)},t}(qn),ep=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),tp=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},op=function(e){function t(t){var o=e.call(this)||this;o.cbSelectAllVisible=!1,o.processingEventFromCheckbox=!1,o.column=t;var r=t.getColDef();return o.filteredOnly=!!r&&!!r.headerCheckboxSelectionFilteredOnly,o}return ep(t,e),t.prototype.onSpaceKeyPressed=function(e){var t=this.cbSelectAll,o=this.gridOptionsWrapper.getDocument();t.isDisplayed()&&!t.getGui().contains(o.activeElement)&&(e.preventDefault(),t.setValue(!t.getValue()))},t.prototype.getCheckboxGui=function(){return this.cbSelectAll.getGui()},t.prototype.setComp=function(e){this.headerCellCtrl=e,this.cbSelectAll=this.createManagedBean(new Ju),this.cbSelectAll.addCssClass("ag-header-select-all"),sr(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedListener(this.eventService,We.EVENT_NEW_COLUMNS_LOADED,this.showOrHideSelectAll.bind(this)),this.addManagedListener(this.eventService,We.EVENT_DISPLAYED_COLUMNS_CHANGED,this.showOrHideSelectAll.bind(this)),this.addManagedListener(this.eventService,We.EVENT_SELECTION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_MODEL_UPDATED,this.onModelChanged.bind(this)),this.addManagedListener(this.cbSelectAll,Ju.EVENT_CHANGED,this.onCbSelectAll.bind(this)),mr(this.cbSelectAll.getGui(),!0),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()},t.prototype.showOrHideSelectAll=function(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible),this.cbSelectAllVisible&&(this.checkRightRowModelType(),this.updateStateOfCheckbox()),this.refreshSelectAllLabel()},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.setValue(t),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}},t.prototype.refreshSelectAllLabel=function(){if(this.cbSelectAllVisible){var e=this.gridOptionsWrapper.getLocaleTextFunc(),t=this.cbSelectAll.getValue()?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),o=e("ariaRowSelectAll","Press Space to toggle all rows selection");this.headerCellCtrl.setAriaDescriptionProperty("selectAll",o+" ("+t+")"),this.cbSelectAll.setInputAriaLabel(o+" ("+t+")")}else this.headerCellCtrl.setAriaDescriptionProperty("selectAll",null),this.cbSelectAll.setInputAriaLabel(null);this.headerCellCtrl.refreshAriaDescription()},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===oe.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.getValue()?this.selectionService.selectAllRowNodes(this.filteredOnly):this.selectionService.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,context:this.gridOptionsWrapper.getContext()})),!(!e||(this.gridOptionsWrapper.isRowModelServerSide()?(console.warn("AG Grid: headerCheckboxSelection is not supported for Server Side Row Model"),1):this.gridOptionsWrapper.isRowModelInfinite()?(console.warn("AG Grid: headerCheckboxSelection is not supported for Infinite Row Model"),1):this.gridOptionsWrapper.isRowModelViewport()&&(console.warn("AG Grid: headerCheckboxSelection is not supported for Viewport Row Model"),1)))},tp([z("gridApi")],t.prototype,"gridApi",void 0),tp([z("columnApi")],t.prototype,"columnApi",void 0),tp([z("rowModel")],t.prototype,"rowModel",void 0),tp([z("selectionService")],t.prototype,"selectionService",void 0),t}(Ge),rp=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),np=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ip=function(e){function t(t,o){var r=e.call(this,t,o)||this;return r.refreshFunctions=[],r.userHeaderClasses=new Set,r.ariaDescriptionProperties=new Map,r.column=t,r}return rp(t,e),t.prototype.setComp=function(t,o,r,n){var i=this;e.prototype.setGui.call(this,o),this.comp=t,this.updateState(),this.setupWidth(),this.setupMovingCss(),this.setupMenuClass(),this.setupSortableClass(),this.setupWrapTextClass(),this.setupAutoHeight(n),this.addColumnHoverListener(),this.setupFilterCss(),this.setupColId(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(),this.setupSelectAll(),this.setupUserComp(),this.refreshAria(),this.createManagedBean(new Xu(this.getPinned(),this.column,r,t,this)),this.createManagedBean(new Yu([this.column],o)),this.createManagedBean(new ju(this.column,o,this.beans)),this.createManagedBean(new In(o,{shouldStopEventPropagation:function(e){return i.shouldStopEventPropagation(e)},onTabKeyDown:function(){return null},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedListener(this.column,se.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_COLUMN_VALUE_CHANGED,this.onColumnValueChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onColumnRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_COLUMN_PIVOT_CHANGED,this.onColumnPivotChanged.bind(this))},t.prototype.setupUserComp=function(){var e=this.lookupUserCompDetails();this.setCompDetails(e)},t.prototype.setCompDetails=function(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)},t.prototype.lookupUserCompDetails=function(){var e=this.createParams(),t=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(t,e)},t.prototype.createParams=function(){var e=this,t=this.column.getColDef();return{column:this.column,displayName:this.displayName,enableSorting:t.sortable,enableMenu:this.menuEnabled,showColumnMenu:function(t){e.gridApi.showColumnMenuAfterButtonClick(e.column,t)},progressSort:function(t){e.sortController.progressSort(e.column,!!t,"uiColumnSorted")},setSort:function(t,o){e.sortController.setSortForColumn(e.column,t,!!o,"uiColumnSorted")},api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsWrapper.getContext(),eGridHeader:this.getGui()}},t.prototype.setupSelectAll=function(){this.selectAllFeature=this.createManagedBean(new op(this.column)),this.selectAllFeature.setComp(this)},t.prototype.getSelectAllGui=function(){return this.selectAllFeature.getCheckboxGui()},t.prototype.handleKeyDown=function(t){e.prototype.handleKeyDown.call(this,t),t.key===jr.SPACE&&this.selectAllFeature.onSpaceKeyPressed(t),t.key===jr.ENTER&&this.onEnterKeyPressed(t)},t.prototype.onEnterKeyPressed=function(e){var t=this.comp.getUserCompInstance();if(t)if(e.ctrlKey||e.metaKey)this.menuEnabled&&t.showMenu&&(e.preventDefault(),t.showMenu());else if(this.sortable){var o=e.shiftKey;this.sortController.progressSort(this.column,o,"uiColumnSorted")}},t.prototype.isMenuEnabled=function(){return this.menuEnabled},t.prototype.onFocusIn=function(e){if(!this.getGui().contains(e.relatedTarget)){var t=this.getRowIndex();this.focusService.setFocusedHeader(t,this.column)}this.setActiveHeader(!0)},t.prototype.onFocusOut=function(e){this.getGui().contains(e.relatedTarget)||this.setActiveHeader(!1)},t.prototype.setupTooltip=function(){var e=this,t={getColumn:function(){return e.column},getColDef:function(){return e.column.getColDef()},getGui:function(){return e.eGui},getLocation:function(){return"header"},getTooltipValue:function(){return e.column.getColDef().headerTooltip}},o=this.createManagedBean(new $a(t,this.beans));o.setComp(this.comp),this.refreshFunctions.push((function(){return o.refreshToolTip()}))},t.prototype.setupClassesFromColDef=function(){var e=this,t=function(){var t=e.column.getColDef(),o=e.gridOptionsWrapper,r=_u.getHeaderClassesFromColDef(t,o,e.column,null),n=e.userHeaderClasses;e.userHeaderClasses=new Set(r),r.forEach((function(t){n.has(t)?n.delete(t):e.comp.addOrRemoveCssClass(t,!0)})),n.forEach((function(t){return e.comp.addOrRemoveCssClass(t,!1)}))};this.refreshFunctions.push(t),t()},t.prototype.setDragSource=function(e){var t=this;if(this.dragSourceElement=e,this.removeDragSource(),e&&this.draggable){var o=!this.gridOptionsWrapper.isSuppressDragLeaveHidesColumns();this.moveDragSource={type:ts.HeaderCell,eElement:e,defaultIconName:o?hs.ICON_HIDE:hs.ICON_NOT_ALLOWED,getDragItem:function(){return t.createDragItem()},dragItemName:this.displayName,onDragStarted:function(){return t.column.setMoving(!0,"uiColumnMoved")},onDragStopped:function(){return t.column.setMoving(!1,"uiColumnMoved")},onGridEnter:function(e){var r,n;if(o){var i=(null===(n=null===(r=e)||void 0===r?void 0:r.columns)||void 0===n?void 0:n.filter((function(e){return!e.getColDef().lockVisible})))||[];t.columnModel.setColumnsVisible(i,!0,"uiColumnMoved")}},onGridExit:function(e){var r,n;if(o){var i=(null===(n=null===(r=e)||void 0===r?void 0:r.columns)||void 0===n?void 0:n.filter((function(e){return!e.getColDef().lockVisible})))||[];t.columnModel.setColumnsVisible(i,!1,"uiColumnMoved")}}},this.dragAndDropService.addDragSource(this.moveDragSource,!0)}},t.prototype.createDragItem=function(){var e={};return e[this.column.getId()]=this.column.isVisible(),{columns:[this.column],visibleState:e}},t.prototype.removeDragSource=function(){this.moveDragSource&&(this.dragAndDropService.removeDragSource(this.moveDragSource),this.moveDragSource=void 0)},t.prototype.onColDefChanged=function(){this.refresh()},t.prototype.updateState=function(){var e=this.column.getColDef();this.menuEnabled=this.menuFactory.isMenuEnabled(this.column)&&!e.suppressMenu,this.sortable=e.sortable,this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()},t.prototype.addRefreshFunction=function(e){this.refreshFunctions.push(e)},t.prototype.refresh=function(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),this.refreshFunctions.forEach((function(e){return e()}))},t.prototype.refreshHeaderComp=function(){var e=this.lookupUserCompDetails();null!=this.comp.getUserCompInstance()&&this.userCompDetails.componentClass==e.componentClass&&this.attemptHeaderCompRefresh(e.params)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)},t.prototype.attemptHeaderCompRefresh=function(e){var t=this.comp.getUserCompInstance();return!!t&&!!t.refresh&&t.refresh(e)},t.prototype.calculateDisplayName=function(){return this.columnModel.getDisplayNameForColumn(this.column,"header",!0)},t.prototype.checkDisplayName=function(){this.displayName!==this.calculateDisplayName()&&this.refresh()},t.prototype.workOutDraggable=function(){var e=this.column.getColDef();return!(this.gridOptionsWrapper.isSuppressMovableColumns()||e.suppressMovable||e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot},t.prototype.onColumnRowGroupChanged=function(){this.checkDisplayName()},t.prototype.onColumnPivotChanged=function(){this.checkDisplayName()},t.prototype.onColumnValueChanged=function(){this.checkDisplayName()},t.prototype.setupWidth=function(){var e=this,t=function(){e.comp.setWidth(e.column.getActualWidth()+"px")};this.addManagedListener(this.column,se.EVENT_WIDTH_CHANGED,t),t()},t.prototype.setupMovingCss=function(){var e=this,t=function(){e.comp.addOrRemoveCssClass("ag-header-cell-moving",e.column.isMoving())};this.addManagedListener(this.column,se.EVENT_MOVING_CHANGED,t),t()},t.prototype.setupMenuClass=function(){var e=this,t=function(){e.comp.addOrRemoveCssClass("ag-column-menu-visible",e.column.isMenuVisible())};this.addManagedListener(this.column,se.EVENT_MENU_VISIBLE_CHANGED,t),t()},t.prototype.setupSortableClass=function(){var e=this,t=function(){e.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!e.sortable)};t(),this.addRefreshFunction(t),this.addManagedListener(this.column,se.EVENT_SORT_CHANGED,this.refreshAriaSort.bind(this))},t.prototype.setupWrapTextClass=function(){var e=this,t=function(){var t=!!e.column.getColDef().wrapHeaderText;e.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",t)};t(),this.addRefreshFunction(t)},t.prototype.setupAutoHeight=function(e){var t,o=this,r=function(t){if(o.isAlive()){var n=Ro(o.getGui()),i=n.paddingTop,s=n.paddingBottom,a=e.offsetHeight+i+s;if(t<5){var l=o.beans.gridOptionsWrapper.getDocument();if(!l||!l.contains(e)||0==a)return void o.beans.frameworkOverrides.setTimeout((function(){return r(t+1)}),0)}o.columnModel.setColumnHeaderHeight(o.column,a)}},n=!1,i=function(){var e=o.column.isAutoHeaderHeight();e&&!n&&s(),!e&&n&&a()},s=function(){n=!0,r(0),o.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),t=o.resizeObserverService.observeResize(e,(function(){return r(0)}))},a=function(){n=!1,t&&t(),o.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),t=void 0};i(),this.addDestroyFunc((function(){return a()})),this.addManagedListener(this.column,se.EVENT_WIDTH_CHANGED,(function(){return n&&r(0)})),this.addManagedListener(this.column,se.EVENT_SORT_CHANGED,(function(){n&&o.beans.frameworkOverrides.setTimeout((function(){return r(0)}))})),this.addRefreshFunction(i)},t.prototype.refreshAriaSort=function(){if(this.sortable){var e=this.gridOptionsWrapper.getLocaleTextFunc();this.comp.setAriaSort(ar(this.column)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort."))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)},t.prototype.refreshAriaMenu=function(){if(this.menuEnabled){var e=this.gridOptionsWrapper.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press CTRL ENTER to open column menu."))}else this.setAriaDescriptionProperty("menu",null)},t.prototype.setAriaDescriptionProperty=function(e,t){null!=t?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)},t.prototype.refreshAriaDescription=function(){var e=Array.from(this.ariaDescriptionProperties.values());this.comp.setAriaDescription(e.length?e.join(" "):void 0)},t.prototype.refreshAria=function(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaDescription()},t.prototype.addColumnHoverListener=function(){var e=this,t=function(){if(e.gridOptionsWrapper.isColumnHoverHighlight()){var t=e.columnHoverService.isHovered(e.column);e.comp.addOrRemoveCssClass("ag-column-hover",t)}};this.addManagedListener(this.eventService,We.EVENT_COLUMN_HOVER_CHANGED,t),t()},t.prototype.setupFilterCss=function(){var e=this,t=function(){e.comp.addOrRemoveCssClass("ag-header-cell-filtered",e.column.isFilterActive())};this.addManagedListener(this.column,se.EVENT_FILTER_ACTIVE_CHANGED,t),t()},t.prototype.setupColId=function(){this.comp.setColId(this.column.getColId())},t.prototype.addActiveHeaderMouseListeners=function(){var e=this,t=function(t){return e.setActiveHeader("mouseenter"===t.type)};this.addManagedListener(this.getGui(),"mouseenter",t),this.addManagedListener(this.getGui(),"mouseleave",t)},t.prototype.setActiveHeader=function(e){this.comp.addOrRemoveCssClass("ag-header-active",e)},np([z("columnModel")],t.prototype,"columnModel",void 0),np([z("columnHoverService")],t.prototype,"columnHoverService",void 0),np([z("sortController")],t.prototype,"sortController",void 0),np([z("menuFactory")],t.prototype,"menuFactory",void 0),np([z("dragAndDropService")],t.prototype,"dragAndDropService",void 0),np([z("resizeObserverService")],t.prototype,"resizeObserverService",void 0),np([z("gridApi")],t.prototype,"gridApi",void 0),np([z("columnApi")],t.prototype,"columnApi",void 0),np([U],t.prototype,"removeDragSource",null),t}(Fu),sp=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),ap=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},lp=function(e){function t(t,o,r,n){var i=e.call(this)||this;return i.eResize=o,i.comp=t,i.pinned=r,i.columnGroup=n,i}return sp(t,e),t.prototype.postConstruct=function(){var e=this;if(this.columnGroup.isResizable()){var t=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(t),!this.gridOptionsWrapper.isSuppressAutoSize()){var o=this.gridOptionsWrapper.isSkipHeaderOnAutoSize();this.eResize.addEventListener("dblclick",(function(){var t=[];e.columnGroup.getDisplayedLeafColumns().forEach((function(e){e.getColDef().suppressAutoSize||t.push(e.getColId())})),t.length>0&&e.columnModel.autoSizeColumns({columns:t,skipHeader:o,stopAtGroup:e.columnGroup,source:"uiColumnResized"}),e.resizeLeafColumnsToFit()}))}}else this.comp.addOrRemoveResizableCssClass("ag-hidden",!0)},t.prototype.onResizeStart=function(e){var t=this;this.calculateInitialValues();var o=null;if(e&&(o=this.columnModel.getDisplayedGroupAfter(this.columnGroup)),o){var r=o.getDisplayedLeafColumns();this.resizeTakeFromCols=r.filter((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;this.comp.addOrRemoveCssClass("ag-column-resizing",!0)},t.prototype.onResizing=function(e,t){var o=this.normaliseDragChange(t),r=this.resizeStartWidth+o;this.resizeColumns(r,e)},t.prototype.resizeLeafColumnsToFit=function(){var e=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup);this.calculateInitialValues(),e>this.resizeStartWidth&&this.resizeColumns(e,!0)},t.prototype.resizeColumns=function(e,t){void 0===t&&(t=!0);var o=[];if(o.push({columns:this.resizeCols,ratios:this.resizeRatios,width:e}),this.resizeTakeFromCols){var r=e-this.resizeStartWidth;o.push({columns:this.resizeTakeFromCols,ratios:this.resizeTakeFromRatios,width:this.resizeTakeFromStartWidth-r})}this.columnModel.resizeColumnSets({resizeSets:o,finished:t,source:"uiColumnDragged"}),t&&this.comp.addOrRemoveCssClass("ag-column-resizing",!1)},t.prototype.calculateInitialValues=function(){var e=this,t=this.columnGroup.getDisplayedLeafColumns();this.resizeCols=t.filter((function(e){return e.isResizable()})),this.resizeStartWidth=0,this.resizeCols.forEach((function(t){return e.resizeStartWidth+=t.getActualWidth()})),this.resizeRatios=[],this.resizeCols.forEach((function(t){return e.resizeRatios.push(t.getActualWidth()/e.resizeStartWidth)}))},t.prototype.normaliseDragChange=function(e){var t=e;return this.gridOptionsWrapper.isEnableRtl()?this.pinned!==oe.PINNED_LEFT&&(t*=-1):this.pinned===oe.PINNED_RIGHT&&(t*=-1),t},ap([z("horizontalResizeService")],t.prototype,"horizontalResizeService",void 0),ap([z("autoWidthCalculator")],t.prototype,"autoWidthCalculator",void 0),ap([z("columnModel")],t.prototype,"columnModel",void 0),ap([B],t.prototype,"postConstruct",null),t}(Ge),up=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),pp=function(e){function t(t,o){var r=e.call(this)||this;return r.removeChildListenersFuncs=[],r.columnGroup=o,r.comp=t,r}return up(t,e),t.prototype.postConstruct=function(){this.addListenersToChildrenColumns(),this.addManagedListener(this.columnGroup,Ce.EVENT_DISPLAYED_CHILDREN_CHANGED,this.onDisplayedChildrenChanged.bind(this)),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))},t.prototype.addListenersToChildrenColumns=function(){var e=this;this.removeListenersOnChildrenColumns();var t=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach((function(o){o.addEventListener(se.EVENT_WIDTH_CHANGED,t),o.addEventListener(se.EVENT_VISIBLE_CHANGED,t),e.removeChildListenersFuncs.push((function(){o.removeEventListener(se.EVENT_WIDTH_CHANGED,t),o.removeEventListener(se.EVENT_VISIBLE_CHANGED,t)}))}))},t.prototype.removeListenersOnChildrenColumns=function(){this.removeChildListenersFuncs.forEach((function(e){return e()})),this.removeChildListenersFuncs=[]},t.prototype.onDisplayedChildrenChanged=function(){this.addListenersToChildrenColumns(),this.onWidthChanged()},t.prototype.onWidthChanged=function(){this.comp.setWidth(this.columnGroup.getActualWidth()+"px")},function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);i>3&&s&&Object.defineProperty(t,o,s)}([B],t.prototype,"postConstruct",null),t}(Ge),cp=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),dp=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},hp=function(e){function t(t,o){var r=e.call(this,t,o)||this;return r.columnGroup=t,r}return cp(t,e),t.prototype.setComp=function(t,o,r){e.prototype.setGui.call(this,o),this.comp=t,this.displayName=this.columnModel.getDisplayNameForColumnGroup(this.columnGroup,"header"),this.addClasses(),this.addAttributes(),this.setupMovingCss(),this.setupExpandable(),this.setupTooltip(),this.setupUserComp();var n=this.getParentRowCtrl().getPinned(),i=this.columnGroup.getProvidedColumnGroup().getLeafColumns();this.createManagedBean(new Yu(i,o)),this.createManagedBean(new ju(this.columnGroup,o,this.beans)),this.createManagedBean(new pp(t,this.columnGroup)),this.groupResizeFeature=this.createManagedBean(new lp(t,r,n,this.columnGroup)),this.createManagedBean(new In(o,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:function(){},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))},t.prototype.resizeLeafColumnsToFit=function(){this.groupResizeFeature.onResizeStart(!1),this.groupResizeFeature.resizeLeafColumnsToFit()},t.prototype.setupUserComp=function(){var e=this,t=this.displayName,o={displayName:this.displayName,columnGroup:this.columnGroup,setExpanded:function(t){e.columnModel.setColumnGroupOpened(e.columnGroup.getProvidedColumnGroup(),t,"gridInitializing")},api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsWrapper.getContext()};if(!t){for(var r=this.columnGroup,n=r.getLeafColumns();r.getParent()&&r.getParent().getLeafColumns().length===n.length;)r=r.getParent();var i=r.getColGroupDef();i&&(t=i.headerName),t||(t=n?this.columnModel.getDisplayNameForColumn(n[0],"header",!0):"")}var s=this.userComponentFactory.getHeaderGroupCompDetails(o);this.comp.setUserCompDetails(s)},t.prototype.setupTooltip=function(){var e=this,t=this.columnGroup.getColGroupDef(),o={getColumn:function(){return e.columnGroup},getGui:function(){return e.eGui},getLocation:function(){return"headerGroup"},getTooltipValue:function(){return t&&t.headerTooltip}};t&&(o.getColDef=function(){return t}),this.createManagedBean(new $a(o,this.beans)).setComp(this.comp)},t.prototype.setupExpandable=function(){var e=this.columnGroup.getProvidedColumnGroup();this.refreshExpanded(),this.addManagedListener(e,we.EVENT_EXPANDABLE_CHANGED,this.refreshExpanded.bind(this)),this.addManagedListener(e,we.EVENT_EXPANDED_CHANGED,this.refreshExpanded.bind(this))},t.prototype.refreshExpanded=function(){var e=this.columnGroup;this.expandable=e.isExpandable();var t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0)},t.prototype.addAttributes=function(){this.comp.setColId(this.columnGroup.getUniqueId())},t.prototype.addClasses=function(){var e=this,t=this.columnGroup.getColGroupDef(),o=_u.getHeaderClassesFromColDef(t,this.gridOptionsWrapper,null,this.columnGroup);o.push(this.columnGroup.isPadding()?"ag-header-group-cell-no-group":"ag-header-group-cell-with-group"),o.forEach((function(t){return e.comp.addOrRemoveCssClass(t,!0)}))},t.prototype.setupMovingCss=function(){var e=this,t=this.columnGroup.getProvidedColumnGroup().getLeafColumns(),o=function(){return e.comp.addOrRemoveCssClass("ag-header-cell-moving",e.columnGroup.isMoving())};t.forEach((function(t){e.addManagedListener(t,se.EVENT_MOVING_CHANGED,o)})),o()},t.prototype.onFocusIn=function(e){if(!this.eGui.contains(e.relatedTarget)){var t=this.getRowIndex();this.beans.focusService.setFocusedHeader(t,this.columnGroup)}},t.prototype.handleKeyDown=function(t){e.prototype.handleKeyDown.call(this,t);var o=this.getWrapperHasFocus();if(this.expandable&&o&&t.key===jr.ENTER){var r=this.columnGroup,n=!r.isExpanded();this.columnModel.setColumnGroupOpened(r.getProvidedColumnGroup(),n,"uiColumnExpanded")}},t.prototype.setDragSource=function(e){var t=this;if(!this.isSuppressMoving()){var o=this.columnGroup.getProvidedColumnGroup().getLeafColumns(),r=!this.gridOptionsWrapper.isSuppressDragLeaveHidesColumns(),n={type:ts.HeaderCell,eElement:e,defaultIconName:r?hs.ICON_HIDE:hs.ICON_NOT_ALLOWED,dragItemName:this.displayName,getDragItem:this.getDragItemForGroup.bind(this),onDragStarted:function(){return o.forEach((function(e){return e.setMoving(!0,"uiColumnDragged")}))},onDragStopped:function(){return o.forEach((function(e){return e.setMoving(!1,"uiColumnDragged")}))},onGridEnter:function(e){var o,n;if(r){var i=(null===(n=null===(o=e)||void 0===o?void 0:o.columns)||void 0===n?void 0:n.filter((function(e){return!e.getColDef().lockVisible})))||[];t.columnModel.setColumnsVisible(i,!0,"uiColumnMoved")}},onGridExit:function(e){var o,n;if(r){var i=(null===(n=null===(o=e)||void 0===o?void 0:o.columns)||void 0===n?void 0:n.filter((function(e){return!e.getColDef().lockVisible})))||[];t.columnModel.setColumnsVisible(i,!1,"uiColumnMoved")}}};this.dragAndDropService.addDragSource(n,!0),this.addDestroyFunc((function(){return t.dragAndDropService.removeDragSource(n)}))}},t.prototype.getDragItemForGroup=function(){var e=this.columnGroup.getProvidedColumnGroup().getLeafColumns(),t={};e.forEach((function(e){return t[e.getId()]=e.isVisible()}));var o=[];return this.columnModel.getAllDisplayedColumns().forEach((function(t){e.indexOf(t)>=0&&(o.push(t),ce(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.getColDef().lockPosition)&&(e=!0)})),e||this.gridOptionsWrapper.isSuppressMovableColumns()},dp([z("columnModel")],t.prototype,"columnModel",void 0),dp([z("dragAndDropService")],t.prototype,"dragAndDropService",void 0),dp([z("gridApi")],t.prototype,"gridApi",void 0),dp([z("columnApi")],t.prototype,"columnApi",void 0),t}(Fu),fp=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),gp=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},mp=0,yp=function(e){function t(t,o,r){var n=e.call(this)||this;return n.instanceId=mp++,n.headerCellCtrls={},n.rowIndex=t,n.pinned=o,n.type=r,n}return fp(t,e),t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.setComp=function(e){this.comp=e,this.onRowHeightChanged(),this.onVirtualColumnsChanged(),this.setWidth(),this.addEventListeners(),Et()&&this.comp.setTransform("translateZ(0)"),e.setAriaRowIndex(this.rowIndex+1)},t.prototype.addEventListeners=function(){this.addManagedListener(this.eventService,We.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addManagedListener(this.gridOptionsWrapper,eo.PROP_DOM_LAYOUT,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.gridOptionsWrapper,eo.PROP_HEADER_HEIGHT,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.gridOptionsWrapper,eo.PROP_PIVOT_HEADER_HEIGHT,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.gridOptionsWrapper,eo.PROP_GROUP_HEADER_HEIGHT,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.gridOptionsWrapper,eo.PROP_PIVOT_GROUP_HEADER_HEIGHT,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.gridOptionsWrapper,eo.PROP_FLOATING_FILTERS_HEIGHT,this.onRowHeightChanged.bind(this))},t.prototype.getHeaderCellCtrl=function(e){return c(this.headerCellCtrls).find((function(t){return t.getColumnGroupChild()===e}))},t.prototype.onDisplayedColumnsChanged=function(){this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()},t.prototype.getType=function(){return this.type},t.prototype.onColumnResized=function(){this.setWidth()},t.prototype.setWidth=function(){var e=this.getWidthForRow();this.comp.setWidth(e+"px")},t.prototype.getWidthForRow=function(){return this.gridOptionsWrapper.getDomLayout()===oe.DOM_LAYOUT_PRINT?null!=this.pinned?0:this.columnModel.getContainerWidth(oe.PINNED_RIGHT)+this.columnModel.getContainerWidth(oe.PINNED_LEFT)+this.columnModel.getContainerWidth(null):this.columnModel.getContainerWidth(this.pinned)},t.prototype.onRowHeightChanged=function(){var e=this.columnModel.getHeaderRowCount(),t=[],o=0;this.columnModel.hasFloatingFilters()&&(e++,o=1);for(var r=this.columnModel.getColumnGroupHeaderRowHeight(),n=this.columnModel.getColumnHeaderRowHeight(),i=e-(1+o),s=0;s<i;s++)t.push(r);for(t.push(n),s=0;s<o;s++)t.push(this.gridOptionsWrapper.getFloatingFiltersHeight());var a=0;for(s=0;s<this.rowIndex;s++)a+=t[s];var l=t[this.rowIndex]+"px";this.comp.setTop(a+"px"),this.comp.setHeight(l)},t.prototype.getPinned=function(){return this.pinned},t.prototype.getRowIndex=function(){return this.rowIndex},t.prototype.onVirtualColumnsChanged=function(){var e=this,t=this.headerCellCtrls;this.headerCellCtrls={},this.getColumnsInViewport().forEach((function(o){if(!o.isEmptyGroup()){var r=o.getUniqueId(),n=t[r];if(delete t[r],n&&n.getColumnGroupChild()!=o&&(e.destroyBean(n),n=void 0),null==n)switch(e.type){case Vl.FLOATING_FILTER:n=e.createBean(new $u(o,e));break;case Vl.COLUMN_GROUP:n=e.createBean(new hp(o,e));break;default:n=e.createBean(new ip(o,e))}e.headerCellCtrls[r]=n}})),f(t,(function(t,o){var r;r=o,e.focusService.isHeaderWrapperFocused(r)&&e.columnModel.isDisplayed(r.getColumnGroupChild())?e.headerCellCtrls[t]=o:e.destroyBean(o)}));var o=E(this.headerCellCtrls);this.comp.setHeaderCtrls(o)},t.prototype.destroyCtrls=function(){var e=this;f(this.headerCellCtrls,(function(t,o){e.destroyBean(o)})),this.headerCellCtrls={}},t.prototype.getColumnsInViewport=function(){return this.gridOptionsWrapper.getDomLayout()===oe.DOM_LAYOUT_PRINT?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()},t.prototype.getColumnsInViewportPrintLayout=function(){var e=this;if(null!=this.pinned)return[];var t=[],o=this.getActualDepth();return[oe.PINNED_LEFT,null,oe.PINNED_RIGHT].forEach((function(r){var n=e.columnModel.getVirtualHeaderGroupRow(r,o);t=t.concat(n)})),t},t.prototype.getActualDepth=function(){return this.type==Vl.FLOATING_FILTER?this.rowIndex-1:this.rowIndex},t.prototype.getColumnsInViewportNormalLayout=function(){return this.columnModel.getVirtualHeaderGroupRow(this.pinned,this.getActualDepth())},t.prototype.focusHeader=function(e,t){var o=E(this.headerCellCtrls).find((function(t){return t.getColumnGroupChild()==e}));return!!o&&(o.focus(t),!0)},gp([z("columnModel")],t.prototype,"columnModel",void 0),gp([z("focusService")],t.prototype,"focusService",void 0),gp([U],t.prototype,"destroyCtrls",null),t}(Ge),vp=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Cp=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},wp=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s},Ep=function(e){function t(t){var o=e.call(this)||this;return o.groupsRowCtrls=[],o.pinned=t,o}return vp(t,e),t.prototype.setComp=function(e,t){this.comp=e,this.eViewport=t,this.setupCenterWidth(),this.setupPinnedWidth(),this.setupDragAndDrop(this.eViewport),this.addManagedListener(this.eventService,We.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eViewport,"scroll",this.resetScrollLeft.bind(this)),this.ctrlsService.registerHeaderContainer(this,this.pinned),this.columnModel.isReady()&&this.refresh()},t.prototype.setupDragAndDrop=function(e){var t=new wu(this.pinned,e);this.createManagedBean(t)},t.prototype.refresh=function(e){var t=this;void 0===e&&(e=!1);var o,r=new rn,n=this.focusService.getFocusHeaderToUseAfterRefresh();!function(){var e=t.columnModel.getHeaderRowCount()-1;t.groupsRowCtrls=t.destroyBeans(t.groupsRowCtrls);for(var o=0;o<e;o++){var n=t.createBean(new yp(r.next(),t.pinned,Vl.COLUMN_GROUP));t.groupsRowCtrls.push(n)}}(),o=r.next(),(null==t.columnsRowCtrl||!e||t.columnsRowCtrl.getRowIndex()!==o)&&(t.destroyBean(t.columnsRowCtrl),t.columnsRowCtrl=t.createBean(new yp(o,t.pinned,Vl.COLUMN))),function(){var o=function(){t.filtersRowCtrl=t.destroyBean(t.filtersRowCtrl)};if(t.columnModel.hasFloatingFilters()){var n=r.next();if(t.filtersRowCtrl){var i=t.filtersRowCtrl.getRowIndex()!==n;e&&!i||o()}t.filtersRowCtrl||(t.filtersRowCtrl=t.createBean(new yp(n,t.pinned,Vl.FLOATING_FILTER)))}else o()}();var i=this.getAllCtrls();this.comp.setCtrls(i),this.restoreFocusOnHeader(n)},t.prototype.restoreFocusOnHeader=function(e){null!=e&&e.column.getPinned()==this.pinned&&this.focusService.focusHeaderPosition({headerPosition:e})},t.prototype.getAllCtrls=function(){var e=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(wp(arguments[t]));return e}(this.groupsRowCtrls,[this.columnsRowCtrl]);return this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e},t.prototype.onGridColumnsChanged=function(){this.refresh(!0)},t.prototype.setupCenterWidth=function(){var e=this;null==this.pinned&&this.createManagedBean(new Ml((function(t){return e.comp.setCenterWidth(t+"px")})))},t.prototype.setHorizontalScroll=function(e){this.comp.setContainerTransform("translateX("+e+"px)")},t.prototype.resetScrollLeft=function(){this.eViewport.scrollLeft=0},t.prototype.setupPinnedWidth=function(){var e=this;if(null!=this.pinned){var t=this.pinned===oe.PINNED_LEFT,o=this.pinned===oe.PINNED_RIGHT,r=function(){var r=t?e.pinnedWidthService.getPinnedLeftWidth():e.pinnedWidthService.getPinnedRightWidth();if(null!=r){var n=0==r,i=e.gridOptionsWrapper.isEnableRtl(),s=e.gridOptionsWrapper.getScrollbarWidth(),a=e.scrollVisibleService.isVerticalScrollShowing()&&(i&&t||!i&&o)?r+s:r;e.comp.setPinnedContainerWidth(a+"px"),e.comp.addOrRemoveCssClass("ag-hidden",n)}};this.addManagedListener(this.eventService,We.EVENT_LEFT_PINNED_WIDTH_CHANGED,r),this.addManagedListener(this.eventService,We.EVENT_RIGHT_PINNED_WIDTH_CHANGED,r),this.addManagedListener(this.eventService,We.EVENT_SCROLL_VISIBILITY_CHANGED,r),this.addManagedListener(this.eventService,We.EVENT_SCROLLBAR_WIDTH_CHANGED,r)}},t.prototype.getHeaderCtrlForColumn=function(e){if(e instanceof se){if(!this.columnsRowCtrl)return;return this.columnsRowCtrl.getHeaderCellCtrl(e)}if(0!==this.groupsRowCtrls.length)for(var t=0;t<this.groupsRowCtrls.length;t++){var o=this.groupsRowCtrls[t].getHeaderCellCtrl(e);if(o)return o}},t.prototype.getHtmlElementForColumnHeader=function(e){var t=this.getHeaderCtrlForColumn(e);return t?t.getGui():null},t.prototype.getRowType=function(e){var t=this.getAllCtrls()[e];return t?t.getType():void 0},t.prototype.focusHeader=function(e,t,o){var r=this.getAllCtrls()[e];return!!r&&r.focusHeader(t,o)},t.prototype.getRowCount=function(){return this.getAllCtrls().length},Cp([z("ctrlsService")],t.prototype,"ctrlsService",void 0),Cp([z("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),Cp([z("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),Cp([z("columnModel")],t.prototype,"columnModel",void 0),Cp([z("focusService")],t.prototype,"focusService",void 0),t}(Ge),_p=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Sp=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Rp=function(e){function t(t){var o=e.call(this)||this;return o.headerRowComps={},o.rowCompsList=[],o.pinned=t,o}return _p(t,e),t.prototype.init=function(){var e=this;this.selectAndSetTemplate();var t={addOrRemoveCssClass:function(t,o){return e.addOrRemoveCssClass(t,o)},setCtrls:function(t){return e.setCtrls(t)},setCenterWidth:function(t){return e.eCenterContainer.style.width=t},setContainerTransform:function(t){return e.eCenterContainer.style.transform=t},setPinnedContainerWidth:function(t){var o=e.getGui();o.style.width=t,o.style.maxWidth=t,o.style.minWidth=t}};this.createManagedBean(new Ep(this.pinned)).setComp(t,this.getGui())},t.prototype.selectAndSetTemplate=function(){var e=this.pinned==oe.PINNED_LEFT,o=this.pinned==oe.PINNED_RIGHT,r=e?t.PINNED_LEFT_TEMPLATE:o?t.PINNED_RIGHT_TEMPLATE:t.CENTER_TEMPLATE;this.setTemplate(r),this.eRowContainer=this.eCenterContainer?this.eCenterContainer:this.getGui()},t.prototype.destroyRowComps=function(){this.setCtrls([])},t.prototype.destroyRowComp=function(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())},t.prototype.setCtrls=function(e){var t,o=this,r=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[],e.forEach((function(e){var n=e.getInstanceId(),i=r[n];delete r[n];var s=i||o.createBean(new Nu(e));o.headerRowComps[n]=s,o.rowCompsList.push(s),function(e){var r=e.getGui();r.parentElement!=o.eRowContainer&&o.eRowContainer.appendChild(r),t&&ko(o.eRowContainer,r,t),t=r}(s)})),E(r).forEach((function(e){return o.destroyRowComp(e)}))},t.PINNED_LEFT_TEMPLATE='<div class="ag-pinned-left-header" role="presentation"/>',t.PINNED_RIGHT_TEMPLATE='<div class="ag-pinned-right-header" role="presentation"/>',t.CENTER_TEMPLATE='<div class="ag-header-viewport" role="presentation">\n <div class="ag-header-container" ref="eCenterContainer" role="rowgroup"></div>\n </div>',Sp([vn("eCenterContainer")],t.prototype,"eCenterContainer",void 0),Sp([B],t.prototype,"init",null),Sp([U],t.prototype,"destroyRowComps",null),t}(mn),bp=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Op=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};!function(e){e[e.UP=0]="UP",e[e.DOWN=1]="DOWN",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT"}(Vu||(Vu={}));var Pp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return bp(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){e.gridBodyCon=t.gridBodyCtrl}))},t.prototype.getHeaderRowCount=function(){var e=this.ctrlsService.getHeaderRowContainerCtrl();return e?e.getRowCount():0},t.prototype.getHeaderRowType=function(e){var t=this.ctrlsService.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)},t.prototype.navigateVertically=function(e,t,o){if(t||(t=this.focusService.getFocusedHeader()),!t)return!1;var r=t.headerRowIndex,n=t.column,i=this.getHeaderRowCount(),s=e===Vu.UP,a=s?r-1:r+1,l=null,u=!1;a<0&&(a=0,l=n,u=!0),a>=i&&(a=-1);var p=this.getHeaderRowType(r);if(!u){if(p===Vl.COLUMN_GROUP){var c=n;l=s?n.getParent():c.getDisplayedChildren()[0]}else p===Vl.FLOATING_FILTER?l=n:(c=n,l=s?c.getParent():c);if(!l)return!1}return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:a,column:l},allowUserOverride:!0,event:o})},t.prototype.navigateHorizontally=function(e,t,o){void 0===t&&(t=!1);var r,n,i=this.focusService.getFocusedHeader();return e===Vu.LEFT!==this.gridOptionsWrapper.isEnableRtl()?(n="Before",r=this.headerPositionUtils.findHeader(i,n)):(n="After",r=this.headerPositionUtils.findHeader(i,n)),r||!t?this.focusService.focusHeaderPosition({headerPosition:r,direction:n,fromTab:t,allowUserOverride:!0,event:o}):this.focusNextHeaderRow(i,n,o)},t.prototype.focusNextHeaderRow=function(e,t,o){var r,n=e.headerRowIndex,i=null;return"Before"===t?n>0&&(r=n-1,i=this.headerPositionUtils.findColAtEdgeForHeaderRow(r,"end")):(r=n+1,i=this.headerPositionUtils.findColAtEdgeForHeaderRow(r,"start")),this.focusService.focusHeaderPosition({headerPosition:i,direction:t,fromTab:!0,allowUserOverride:!0,event:o})},t.prototype.scrollToColumn=function(e,t){if(void 0===t&&(t="After"),!e.getPinned()){var o;if(e instanceof Ce){var r=e.getDisplayedLeafColumns();o="Before"===t?le(r):r[0]}else o=e;this.gridBodyCon.getScrollFeature().ensureColumnVisible(o)}},Op([z("focusService")],t.prototype,"focusService",void 0),Op([z("headerPositionUtils")],t.prototype,"headerPositionUtils",void 0),Op([z("animationFrameService")],t.prototype,"animationFrameService",void 0),Op([z("ctrlsService")],t.prototype,"ctrlsService",void 0),Op([B],t.prototype,"postConstruct",null),Op([Y("headerNavigationService")],t)}(Ge),Tp=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Ap=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Dp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tp(t,e),t.prototype.setComp=function(e,t,o){this.comp=e,this.eGui=t,this.createManagedBean(new In(o,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedListener(this.eventService,We.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this)),this.onPivotModeChanged(),this.setupHeaderHeight(),this.ctrlsService.registerGridHeaderCtrl(this)},t.prototype.setupHeaderHeight=function(){var e=this.setHeaderHeight.bind(this);e(),this.addManagedListener(this.gridOptionsWrapper,eo.PROP_HEADER_HEIGHT,e),this.addManagedListener(this.gridOptionsWrapper,eo.PROP_PIVOT_HEADER_HEIGHT,e),this.addManagedListener(this.gridOptionsWrapper,eo.PROP_GROUP_HEADER_HEIGHT,e),this.addManagedListener(this.gridOptionsWrapper,eo.PROP_PIVOT_GROUP_HEADER_HEIGHT,e),this.addManagedListener(this.gridOptionsWrapper,eo.PROP_FLOATING_FILTERS_HEIGHT,e),this.addManagedListener(this.eventService,We.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,We.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,e)},t.prototype.getHeaderHeight=function(){return this.headerHeight},t.prototype.setHeaderHeight=function(){var e,t=this.columnModel,o=this.gridOptionsWrapper,r=0,n=t.getHeaderRowCount();t.hasFloatingFilters()&&(n++,r=1);var i=this.columnModel.getColumnGroupHeaderRowHeight(),s=this.columnModel.getColumnHeaderRowHeight(),a=n-(1+r);if(e=r*o.getFloatingFiltersHeight(),e+=a*i,e+=s,this.headerHeight!==e){this.headerHeight=e;var l=e+1+"px";this.comp.setHeightAndMinHeight(l),this.eventService.dispatchEvent({type:We.EVENT_HEADER_HEIGHT_CHANGED})}},t.prototype.onPivotModeChanged=function(){var e=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",e),this.comp.addOrRemoveCssClass("ag-pivot-off",!e)},t.prototype.onTabKeyDown=function(e){var t=this.gridOptionsWrapper.isEnableRtl(),o=e.shiftKey!==t?Vu.LEFT:Vu.RIGHT;(this.headerNavigationService.navigateHorizontally(o,!0,e)||this.focusService.focusNextGridCoreContainer(e.shiftKey))&&e.preventDefault()},t.prototype.handleKeyDown=function(e){var t=null;switch(e.key){case jr.LEFT:t=Vu.LEFT;case jr.RIGHT:n(t)||(t=Vu.RIGHT),this.headerNavigationService.navigateHorizontally(t,!1,e);break;case jr.UP:t=Vu.UP;case jr.DOWN:n(t)||(t=Vu.DOWN),this.headerNavigationService.navigateVertically(t,null,e)&&e.preventDefault();break;default:return}},t.prototype.onFocusOut=function(e){var t=this.gridOptionsWrapper.getDocument(),o=e.relatedTarget;!o&&this.eGui.contains(t.activeElement)||this.eGui.contains(o)||this.focusService.clearFocusedHeader()},Ap([z("headerNavigationService")],t.prototype,"headerNavigationService",void 0),Ap([z("focusService")],t.prototype,"focusService",void 0),Ap([z("columnModel")],t.prototype,"columnModel",void 0),Ap([z("ctrlsService")],t.prototype,"ctrlsService",void 0),t}(Ge),Ip=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Np=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return Ip(t,e),t.prototype.postConstruct=function(){var e=this,t={addOrRemoveCssClass:function(t,o){return e.addOrRemoveCssClass(t,o)},setHeightAndMinHeight:function(t){e.getGui().style.height=t,e.getGui().style.minHeight=t}};this.createManagedBean(new Dp).setComp(t,this.getGui(),this.getFocusableElement());var o=function(t){e.createManagedBean(t),e.appendChild(t)};o(new Rp(oe.PINNED_LEFT)),o(new Rp(null)),o(new Rp(oe.PINNED_RIGHT))},t.TEMPLATE='<div class="ag-header" role="presentation"/>',function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);i>3&&s&&Object.defineProperty(t,o,s)}([B],t.prototype,"postConstruct",null),t}(mn),xp=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Mp=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Lp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xp(t,e),t.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)}},t.prototype.onDragStart=function(e,t){this.dragStartX=t.clientX,this.setResizeIcons();var o=t instanceof MouseEvent&&!0===t.shiftKey;e.onResizeStart(o)},t.prototype.setResizeIcons=function(){var e=this.ctrlsService.getGridCtrl();e.setResizeCursor(!0),e.disableUserSelect(!0)},t.prototype.onDragStop=function(e,t){e.onResizeEnd(this.resizeAmount),this.resetIcons()},t.prototype.resetIcons=function(){var e=this.ctrlsService.getGridCtrl();e.setResizeCursor(!1),e.disableUserSelect(!1)},t.prototype.onDragging=function(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)},Mp([z("dragService")],t.prototype,"dragService",void 0),Mp([z("ctrlsService")],t.prototype,"ctrlsService",void 0),Mp([Y("horizontalResizeService")],t)}(Ge),Fp=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Gp=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},kp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fp(t,e),t.prototype.hideActiveMenu=function(){this.hidePopup&&this.hidePopup()},t.prototype.showMenuAfterMouseEvent=function(e,t){var o=this;this.showPopup(e,(function(r){o.popupService.positionPopupUnderMouseEvent({column:e,type:"columnMenu",mouseEvent:t,ePopup:r})}),t.target)},t.prototype.showMenuAfterButtonClick=function(e,t,o){var r=this;this.showPopup(e,(function(n){r.popupService.positionPopupUnderComponent({type:o,eventSource:t,ePopup:n,keepWithinBounds:!0,column:e})}),t)},t.prototype.showPopup=function(e,t,o){var r=this,n=this.filterManager.getOrCreateFilterWrapper(e,"COLUMN_MENU");if(!n)throw new Error("AG Grid - unable to show popup filter, filter instantiation failed");var i,s=document.createElement("div");sr(s,"presentation"),s.classList.add("ag-menu"),this.tabListener=this.addManagedListener(s,"keydown",(function(e){return r.trapFocusWithin(e,s)})),n.guiPromise.then((function(e){return s.appendChild(e)}));var a=o||this.ctrlsService.getGridBodyCtrl().getGui(),l=this.gridOptionsWrapper.getLocaleTextFunc(),u=this.popupService.addPopup({modal:!0,eChild:s,closeOnEsc:!0,closedCallback:function(t){e.setMenuVisible(!1,"contextMenu");var n=t instanceof KeyboardEvent;if(r.tabListener&&(r.tabListener=r.tabListener()),n&&o&&Mo(o)){var i=r.focusService.findTabbableParent(o);i&&i.focus()}},positionCallback:function(){return t(s)},anchorToElement:a,ariaLabel:l("ariaLabelColumnMenu","Column Menu")});u&&(this.hidePopup=i=u.hideFunc),n.filterPromise.then((function(e){t(s),e.afterGuiAttached&&e.afterGuiAttached({container:"columnMenu",hidePopup:i})})),e.setMenuVisible(!0,"contextMenu")},t.prototype.trapFocusWithin=function(e,t){e.key!==jr.TAB||e.defaultPrevented||this.focusService.findNextFocusableElement(t,!1,e.shiftKey)||(e.preventDefault(),this.focusService.focusInto(t,e.shiftKey))},t.prototype.isMenuEnabled=function(e){return e.isFilterAllowed()},Gp([z("filterManager")],t.prototype,"filterManager",void 0),Gp([z("popupService")],t.prototype,"popupService",void 0),Gp([z("focusService")],t.prototype,"focusService",void 0),Gp([z("ctrlsService")],t.prototype,"ctrlsService",void 0),Gp([Y("menuFactory")],t)}(Ge),Vp=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Hp=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Wp=function(e){function t(o){var r=e.call(this,t.getTemplate(o.cssClass))||this;return r.items=[],r.tabbedItemScrollMap=new Map,r.params=o,o.items&&o.items.forEach((function(e){return r.addItem(e)})),r}return Vp(t,e),t.prototype.postConstruct=function(){this.createManagedBean(new In(this.getFocusableElement(),{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)}))},t.getTemplate=function(e){return'<div class="ag-tabs '+e+'">\n <div ref="eHeader" role="tablist" class="ag-tabs-header '+(e?e+"-header":"")+'"></div>\n <div ref="eBody" role="presentation" class="ag-tabs-body '+(e?e+"-body":"")+'"></div>\n </div>'},t.prototype.handleKeyDown=function(e){var t=this.gridOptionsWrapper.getDocument();switch(e.key){case jr.RIGHT:case jr.LEFT:if(!this.eHeader.contains(t.activeElement))return;var o=e.key===jr.RIGHT,r=this.gridOptionsWrapper.isEnableRtl(),n=this.items.indexOf(this.activeItem),i=o!==r?Math.min(n+1,this.items.length-1):Math.max(n-1,0);if(n===i)return;e.preventDefault();var s=this.items[i];this.showItemWrapper(s),s.eHeaderButton.focus();break;case jr.UP:case jr.DOWN:e.stopPropagation()}},t.prototype.onTabKeyDown=function(e){if(!e.defaultPrevented){var t=this,o=t.focusService,r=t.eHeader,n=t.eBody,i=t.activeItem,s=this.gridOptionsWrapper.getDocument().activeElement;if(e.preventDefault(),r.contains(s))o.focusInto(n,e.shiftKey);else if(o.isFocusUnderManagedComponent(n))i.eHeaderButton.focus();else{var a=o.findNextFocusableElement(n,!1,e.shiftKey);a?a.focus():i.eHeaderButton.focus()}}},t.prototype.setAfterAttachedParams=function(e){this.afterAttachedParams=e},t.prototype.showFirstItem=function(){this.items.length>0&&this.showItemWrapper(this.items[0])},t.prototype.addItem=function(e){var t=document.createElement("span");sr(t,"tab"),t.setAttribute("tabIndex","-1"),t.appendChild(e.title),t.classList.add("ag-tab"),this.eHeader.appendChild(t),pr(t,e.titleLabel);var o={tabbedItem:e,eHeaderButton:t};this.items.push(o),t.addEventListener("click",this.showItemWrapper.bind(this,o))},t.prototype.showItem=function(e){var t=this.items.find((function(t){return t.tabbedItem===e}));t&&this.showItemWrapper(t)},t.prototype.showItemWrapper=function(e){var t=this,o=e.tabbedItem,r=e.eHeaderButton;this.params.onItemClicked&&this.params.onItemClicked({item:o}),this.activeItem!==e?(this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),No(this.eBody),o.bodyPromise.then((function(e){t.eBody.appendChild(e);var r=!t.focusService.isKeyboardMode();if(t.focusService.focusInto(t.eBody,!1,r),o.afterAttachedCallback&&o.afterAttachedCallback(t.afterAttachedParams),t.params.keepScrollPosition){var n=o.getScrollableContainer&&o.getScrollableContainer()||e;t.lastScrollListener=t.addManagedListener(n,"scroll",(function(){t.tabbedItemScrollMap.set(o.name,n.scrollTop)}));var i=t.tabbedItemScrollMap.get(o.name);void 0!==i&&setTimeout((function(){n.scrollTop=i}),0)}})),this.activeItem&&this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),r.classList.add("ag-tab-selected"),this.activeItem=e):V(this.params.onActiveItemClicked)},Hp([z("focusService")],t.prototype,"focusService",void 0),Hp([vn("eHeader")],t.prototype,"eHeader",void 0),Hp([vn("eBody")],t.prototype,"eBody",void 0),Hp([B],t.prototype,"postConstruct",null),t}(mn);function jp(e){return new sn((function(t){var o=new XMLHttpRequest;o.open("GET",e.url),o.send(),o.onreadystatechange=function(){4===o.readyState&&200===o.status&&t(JSON.parse(o.responseText))}}))}var Bp,Up=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Yp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.polyfillFunctions=[],t}return Up(t,e),t.prototype.observeResize=function(e,t){var o,r,n,i,s,a=this,l=this.gridOptionsWrapper.getDocument().defaultView||window,u=F(t,50),p=this.gridOptionsWrapper.isSuppressBrowserResizeObserver();return l.ResizeObserver&&!p?((o=new l.ResizeObserver(u)).observe(e),function(){return o.disconnect()}):(r=Go(e),n=Fo(e),i=!0,(s=function(){if(i){var o=Go(e),l=Fo(e);(o!==r||l!==n)&&(r=o,n=l,t()),a.doNextPolyfillTurn(s)}})(),function(){return i=!1})},t.prototype.doNextPolyfillTurn=function(e){this.polyfillFunctions.push(e),this.schedulePolyfill()},t.prototype.schedulePolyfill=function(){var e=this;this.polyfillScheduled||(this.polyfillScheduled=!0,this.getFrameworkOverrides().setTimeout((function(){var t=e.polyfillFunctions;e.polyfillScheduled=!1,e.polyfillFunctions=[],t.forEach((function(e){return e()}))}),50))},function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s}([Y("resizeObserverService")],t)}(Ge),zp=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Kp=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},$p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createTasksP1={list:[],sorted:!1},t.createTasksP2={list:[],sorted:!1},t.destroyTasks=[],t.ticking=!1,t.scrollGoingDown=!0,t.lastScrollTop=0,t.taskCount=0,t.cancelledTasks=new Set,t}return zp(t,e),t.prototype.setScrollTop=function(e){this.scrollGoingDown=e>this.lastScrollTop,this.lastScrollTop=e},t.prototype.init=function(){this.useAnimationFrame=!this.gridOptionsWrapper.isSuppressAnimationFrame()},t.prototype.isOn=function(){return this.useAnimationFrame},t.prototype.verifyAnimationFrameOn=function(e){!1===this.useAnimationFrame&&console.warn("AG Grid: AnimationFrameService."+e+" called but animation frames are off")},t.prototype.createTask=function(e,t,o){this.verifyAnimationFrameOn(o);var r={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[o],r),this.schedule()},t.prototype.cancelTask=function(e){this.cancelledTasks.add(e)},t.prototype.addTaskToList=function(e,t){e.list.push(t),e.sorted=!1},t.prototype.sortTaskList=function(e){if(!e.sorted){var t=this.scrollGoingDown?1:-1;e.list.sort((function(e,o){return e.index!==o.index?t*(o.index-e.index):o.createOrder-e.createOrder})),e.sorted=!0}},t.prototype.addDestroyTask=function(e){this.verifyAnimationFrameOn("createTasksP3"),this.destroyTasks.push(e),this.schedule()},t.prototype.executeFrame=function(e){this.verifyAnimationFrameOn("executeFrame");for(var t=this.createTasksP1,o=t.list,r=this.createTasksP2,n=r.list,i=this.destroyTasks,s=(new Date).getTime(),a=(new Date).getTime()-s,l=e<=0,u=this.ctrlsService.getGridBodyCtrl();l||a<e;){if(!u.getScrollFeature().executeAnimationFrameScroll()){var p=void 0;if(o.length)this.sortTaskList(t),p=o.pop().task;else if(n.length)this.sortTaskList(r),p=n.pop().task;else{if(!i.length){this.cancelledTasks.clear();break}p=i.pop()}this.cancelledTasks.has(p)||p()}a=(new Date).getTime()-s}o.length||n.length||i.length?this.requestFrame():this.stopTicking()},t.prototype.stopTicking=function(){this.ticking=!1},t.prototype.flushAllFrames=function(){this.useAnimationFrame&&this.executeFrame(-1)},t.prototype.schedule=function(){this.useAnimationFrame&&(this.ticking||(this.ticking=!0,this.requestFrame()))},t.prototype.requestFrame=function(){var e=this.executeFrame.bind(this,60),t=this.gridOptionsWrapper.getDocument().defaultView||window;t.requestAnimationFrame?t.requestAnimationFrame(e):t.webkitRequestAnimationFrame?t.webkitRequestAnimationFrame(e):t.setTimeout(e,0)},t.prototype.isQueueEmpty=function(){return!this.ticking},t.prototype.debounce=function(e){var t=this,o=!1;return function(){t.isOn()?o||(o=!0,t.addDestroyTask((function(){o=!1,e()}))):t.getFrameworkOverrides().setTimeout(e,0)}},Kp([z("ctrlsService")],t.prototype,"ctrlsService",void 0),Kp([B],t.prototype,"init",null),Kp([Y("animationFrameService")],t)}(Ge),qp=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Zp=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Xp="ag-resizer-wrapper",Qp='<div class="'+Xp+'">\n <div ref="eTopLeftResizer" class="ag-resizer ag-resizer-topLeft"></div>\n <div ref="eTopResizer" class="ag-resizer ag-resizer-top"></div>\n <div ref="eTopRightResizer" class="ag-resizer ag-resizer-topRight"></div>\n <div ref="eRightResizer" class="ag-resizer ag-resizer-right"></div>\n <div ref="eBottomRightResizer" class="ag-resizer ag-resizer-bottomRight"></div>\n <div ref="eBottomResizer" class="ag-resizer ag-resizer-bottom"></div>\n <div ref="eBottomLeftResizer" class="ag-resizer ag-resizer-bottomLeft"></div>\n <div ref="eLeftResizer" class="ag-resizer ag-resizer-left"></div>\n </div>',Jp=function(e){function t(t,o){var r=e.call(this)||this;return r.element=t,r.dragStartPosition={x:0,y:0},r.position={x:0,y:0},r.lastSize={width:-1,height:-1},r.positioned=!1,r.resizersAdded=!1,r.resizeListeners=[],r.boundaryEl=null,r.isResizing=!1,r.isMoving=!1,r.resizable={},r.movable=!1,r.currentResizer=null,r.config=Object.assign({},{popup:!1},o),r}return qp(t,e),t.prototype.center=function(){var e=this.offsetParent,t=e.clientHeight,o=e.clientWidth/2-this.getWidth()/2,r=t/2-this.getHeight()/2;this.offsetElement(o,r)},t.prototype.initialisePosition=function(){var e=this.config,t=e.centered,o=e.forcePopupParentAsOffsetParent,r=e.minWidth,n=e.width,i=e.minHeight,s=e.height,a=e.x,l=e.y;this.offsetParent||this.setOffsetParent();var u=0,p=0,c=!!this.element.offsetParent;if(c){var d=this.findBoundaryElement(),h=window.getComputedStyle(d);if(null!=h.minWidth){var f=d.offsetWidth-this.element.offsetWidth;p=parseInt(h.minWidth,10)-f}if(null!=h.minHeight){var g=d.offsetHeight-this.element.offsetHeight;u=parseInt(h.minHeight,10)-g}}if(this.minHeight=i||u,this.minWidth=r||p,n&&this.setWidth(n),s&&this.setHeight(s),n&&s||this.refreshSize(),t)this.center();else if(a||l)this.offsetElement(a,l);else if(c&&o&&this.boundaryEl){var m=parseFloat(this.boundaryEl.style.top),y=parseFloat(this.boundaryEl.style.left);this.offsetElement(isNaN(y)?0:y,isNaN(m)?0:m)}this.positioned=!!this.offsetParent},t.prototype.isPositioned=function(){return this.positioned},t.prototype.getPosition=function(){return this.position},t.prototype.setMovable=function(e,t){if(this.config.popup&&e!==this.movable){this.movable=e;var o=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragService.addDragSource(o),this.moveElementDragListener=o):(this.dragService.removeDragSource(o),this.moveElementDragListener=void 0)}},t.prototype.setResizable=function(e){var t=this;if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),"boolean"==typeof e){if(!1===e)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach((function(o){var r=!!e[o],n=t.getResizerElement(o),i={dragStartPixels:0,eElement:n,onDragStart:function(e){return t.onResizeStart(e,o)},onDragging:t.onResize.bind(t),onDragStop:function(e){return t.onResizeEnd(e,o)}};!!t.resizable[o]===r&&(t.isAlive()||r)||(r?(t.dragService.addDragSource(i),t.resizeListeners.push(i),n.style.pointerEvents="all"):n.style.pointerEvents="none",t.resizable[o]=r)}))},t.prototype.removeSizeFromEl=function(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")},t.prototype.restoreLastSize=function(){this.element.style.flex="0 0 auto";var e=this.lastSize,t=e.height,o=e.width;-1!==o&&(this.element.style.width=o+"px"),-1!==t&&(this.element.style.height=t+"px")},t.prototype.getHeight=function(){return this.element.offsetHeight},t.prototype.setHeight=function(e){var t=this.config.popup,o=this.element,r=!1;if("string"==typeof e&&-1!==e.indexOf("%"))zo(o,e),e=Po(o),r=!0;else if(this.positioned){var n=this.element.getBoundingClientRect(),i=this.offsetParent.getBoundingClientRect();e=Math.max(this.minHeight,e);var s=this.offsetParent.clientHeight,a=t?this.position.y:n.top,l=t?0:i.top;s&&e+a>s+l&&(e=s-a)}this.getHeight()!==e&&(r?(o.style.maxHeight="unset",o.style.minHeight="unset"):t?zo(o,e):(o.style.height=e+"px",o.style.flex="0 0 auto",this.lastSize.height="number"==typeof e?e:parseFloat(e)))},t.prototype.getWidth=function(){return this.element.offsetWidth},t.prototype.setWidth=function(e){var t=this.element,o=this.config.popup,r=!1;if("string"==typeof e&&-1!==e.indexOf("%"))Yo(t,e),e=To(t),r=!0;else if(this.positioned){e=Math.max(this.minWidth,e);var n=this.offsetParent.clientWidth,i=o?this.position.x:this.element.getBoundingClientRect().left;n&&e+i>n&&(e=n-i)}this.getWidth()!==e&&(r?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Yo(t,e):(t.style.width=e+"px",t.style.flex=" unset",this.lastSize.width="number"==typeof e?e:parseFloat(e)))},t.prototype.offsetElement=function(e,t){void 0===e&&(e=0),void 0===t&&(t=0);var o=this.config.forcePopupParentAsOffsetParent?this.boundaryEl:this.element;this.popupService.positionPopup({ePopup:o,x:e,y:t,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable()}),this.setPosition(parseFloat(o.style.left),parseFloat(o.style.top))},t.prototype.setPosition=function(e,t){this.position.x=e,this.position.y=t},t.prototype.updateDragStartPosition=function(e,t){this.dragStartPosition={x:e,y:t}},t.prototype.calculateMouseMovement=function(e){var t=e.e,o=e.isLeft,r=e.isTop,n=e.anywhereWithin,i=e.topBuffer,s=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(t,!!o,!!n,s)?0:s,movementY:this.shouldSkipY(t,!!r,i,a)?0:a}},t.prototype.shouldSkipX=function(e,t,o,r){var n=this.element.getBoundingClientRect(),i=this.offsetParent.getBoundingClientRect(),s=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:n.left,l=a<=0&&i.left>=e.clientX||i.right<=e.clientX&&i.right<=s.right;return!!l||(t?r<0&&e.clientX>a+i.left||r>0&&e.clientX<a+i.left:o?r<0&&e.clientX>s.right||r>0&&e.clientX<a+i.left:r<0&&e.clientX>s.right||r>0&&e.clientX<s.right)},t.prototype.shouldSkipY=function(e,t,o,r){void 0===o&&(o=0);var n=this.element.getBoundingClientRect(),i=this.offsetParent.getBoundingClientRect(),s=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:n.top,l=a<=0&&i.top>=e.clientY||i.bottom<=e.clientY&&i.bottom<=s.bottom;return!!l||(t?r<0&&e.clientY>a+i.top+o||r>0&&e.clientY<a+i.top:r<0&&e.clientY>s.bottom||r>0&&e.clientY<s.bottom)},t.prototype.createResizeMap=function(){var e=this.element;this.resizerMap={topLeft:{element:e.querySelector("[ref=eTopLeftResizer]")},top:{element:e.querySelector("[ref=eTopResizer]")},topRight:{element:e.querySelector("[ref=eTopRightResizer]")},right:{element:e.querySelector("[ref=eRightResizer]")},bottomRight:{element:e.querySelector("[ref=eBottomRightResizer]")},bottom:{element:e.querySelector("[ref=eBottomResizer]")},bottomLeft:{element:e.querySelector("[ref=eBottomLeftResizer]")},left:{element:e.querySelector("[ref=eLeftResizer]")}}},t.prototype.addResizers=function(){if(!this.resizersAdded){var e=this.element;if(e){var t=(new DOMParser).parseFromString(Qp,"text/html").body;e.appendChild(t.firstChild),this.createResizeMap(),this.resizersAdded=!0}}},t.prototype.removeResizers=function(){this.resizerMap=void 0;var e=this.element.querySelector("."+Xp);e&&this.element.removeChild(e),this.resizersAdded=!1},t.prototype.getResizerElement=function(e){return this.resizerMap[e].element},t.prototype.onResizeStart=function(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");var o=this.config,r=o.popup,n=o.forcePopupParentAsOffsetParent;r||n||this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)},t.prototype.getSiblings=function(){var e=this.element.parentElement;return e?Array.prototype.slice.call(e.children).filter((function(e){return!e.classList.contains("ag-hidden")})):null},t.prototype.getMinSizeOfSiblings=function(){for(var e=this.getSiblings()||[],t=0,o=0,r=0;r<e.length;r++){var n=e[r],i=!!n.style.flex&&"0 0 auto"!==n.style.flex;if(n!==this.element){var s=this.minHeight||0,a=this.minWidth||0;if(i){var l=window.getComputedStyle(n);l.minHeight&&(s=parseInt(l.minHeight,10)),l.minWidth&&(a=parseInt(l.minWidth,10))}else s=n.offsetHeight,a=n.offsetWidth;t+=s,o+=a}}return{height:t,width:o}},t.prototype.applySizeToSiblings=function(e){var t=null,o=this.getSiblings();if(o){for(var r=0;r<o.length;r++){var n=o[r];n!==t&&(e?n.style.height=n.offsetHeight+"px":n.style.width=n.offsetWidth+"px",n.style.flex="0 0 auto",n===this.element&&(t=o[r+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}},t.prototype.isResizable=function(){return Object.values(this.resizable).some((function(e){return e}))},t.prototype.onResize=function(e){if(this.isResizing&&this.currentResizer){var t=this.config,o=t.popup,r=t.forcePopupParentAsOffsetParent,n=this.currentResizer,i=n.isTop,s=n.isRight,a=n.isBottom,l=n.isLeft,u=s||l,p=a||i,c=this.calculateMouseMovement({e,isLeft:l,isTop:i}),d=c.movementX,h=c.movementY,f=this.position.x,g=this.position.y,m=0,y=0;if(u&&d){var v=l?-1:1,C=this.getWidth(),w=C+d*v,E=!1;l&&(f+(m=C-w)<=0||w<=this.minWidth)&&(E=!0,m=0),E||this.setWidth(w)}if(p&&h){v=i?-1:1;var _=this.getHeight(),S=_+h*v,R=!1;i?(g+(y=_-S)<=0||S<=this.minHeight)&&(R=!0,y=0):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&_<S&&this.getMinSizeOfSiblings().height+S>this.element.parentElement.offsetHeight&&(R=!0),R||this.setHeight(S)}this.updateDragStartPosition(e.clientX,e.clientY),((o||r)&&m||y)&&this.offsetElement(f+m,g+y)}},t.prototype.onResizeEnd=function(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null;var o={type:"resize",api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi()};this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchEvent(o)},t.prototype.refreshSize=function(){var e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))},t.prototype.onMoveStart=function(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)},t.prototype.onMove=function(e){if(this.isMoving){var t,o=this.position,r=o.x,n=o.y;this.config.calculateTopBuffer&&(t=this.config.calculateTopBuffer());var i=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:t}),s=i.movementX,a=i.movementY;this.offsetElement(r+s,n+a),this.updateDragStartPosition(e.clientX,e.clientY)}},t.prototype.onMoveEnd=function(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")},t.prototype.setOffsetParent=function(){this.config.forcePopupParentAsOffsetParent?this.offsetParent=this.popupService.getPopupParent():this.offsetParent=this.element.offsetParent},t.prototype.findBoundaryElement=function(){for(var e=this.element;e;){if("static"!==window.getComputedStyle(e).position)return e;e=e.parentElement}return this.element},t.prototype.clearResizeListeners=function(){for(;this.resizeListeners.length;){var e=this.resizeListeners.pop();this.dragService.removeDragSource(e)}},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.clearResizeListeners(),this.removeResizers()},Zp([z("popupService")],t.prototype,"popupService",void 0),Zp([z("dragService")],t.prototype,"dragService",void 0),t}(Ge),ec=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),tc=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},oc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ec(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){e.centerRowContainerCtrl=t.centerRowContainerCtrl}))},t.prototype.getPreferredWidthForColumn=function(e,t){var o=this.getHeaderCellForColumn(e);if(!o)return-1;var r=this.rowRenderer.getAllCellsForColumn(e);return t||r.push(o),this.addElementsToContainerAndGetWidth(r)},t.prototype.getPreferredWidthForColumnGroup=function(e){var t=this.getHeaderCellForColumn(e);return t?this.addElementsToContainerAndGetWidth([t]):-1},t.prototype.addElementsToContainerAndGetWidth=function(e){var t=this,o=document.createElement("form");o.style.position="fixed";var r=this.centerRowContainerCtrl.getContainerElement();r.appendChild(o),e.forEach((function(e){return t.cloneItemIntoDummy(e,o)}));var n=o.offsetWidth;return r.removeChild(o),n+this.gridOptionsWrapper.getAutoSizePadding()},t.prototype.getHeaderCellForColumn=function(e){var t=null;return this.ctrlsService.getHeaderRowContainerCtrls().forEach((function(o){var r=o.getHtmlElementForColumnHeader(e);null!=r&&(t=r)})),t},t.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"),n=r.classList;["ag-header-cell","ag-header-group-cell"].some((function(e){return o.classList.contains(e)}))?(n.add("ag-header","ag-header-row"),r.style.position="static"):n.add("ag-row");for(var i=e.parentElement;i;){if(["ag-header-row","ag-row"].some((function(e){return i.classList.contains(e)}))){for(var s=0;s<i.classList.length;s++){var a=i.classList[s];"ag-row-position-absolute"!=a&&n.add(a)}break}i=i.parentElement}r.appendChild(o),t.appendChild(r)},tc([z("rowRenderer")],t.prototype,"rowRenderer",void 0),tc([z("ctrlsService")],t.prototype,"ctrlsService",void 0),tc([z("rowCssClassCalculator")],t.prototype,"rowCssClassCalculator",void 0),tc([B],t.prototype,"postConstruct",null),tc([Y("autoWidthCalculator")],t)}(Ge),rc=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),nc=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ic=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s},sc=function(e){function t(t,o){var r=e.call(this)||this;return r.createRowCon=t,r.destroyRowCtrls=o,r.stickyRowCtrls=[],r.containerHeight=0,r}return rc(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){e.gridBodyCtrl=t.gridBodyCtrl}))},t.prototype.getStickyRowCtrls=function(){return this.stickyRowCtrls},t.prototype.checkStickyRows=function(){var e=0;if(this.gridOptionsWrapper.isGroupRowsSticky()){for(var t=[],o=this.rowRenderer.getFirstVisibleVerticalPixel(),r=function(r){t.push(r);for(var n=r;n.expanded;)n=le(n.childrenAfterSort);var i=n.rowTop+n.rowHeight,s=o+e+r.rowHeight;r.stickyRowTop=i<s?e+(i-s):e,e=0,t.forEach((function(t){var o=t.stickyRowTop+t.rowHeight;e<o&&(e=o)}))};;){var n=o+e,i=this.rowModel.getRowIndexAtPixel(n),s=this.rowModel.getRow(i);if(null==s)break;if(s.level<0)break;for(var a=[],l=s.parent;l.level>=0;)a.push(l),l=l.parent;var u=a.reverse().find((function(e){return t.indexOf(e)<0&&e.displayed}));if(u)r(u);else{if(!(s.group&&s.expanded&&!s.footer&&s.rowTop<n))break;r(s)}}this.refreshNodesAndContainerHeight(t,e)}else this.refreshNodesAndContainerHeight([],e)},t.prototype.refreshNodesAndContainerHeight=function(e,t){var o,r,n,i=this,s=this.stickyRowCtrls.filter((function(t){return-1===e.indexOf(t.getRowNode())})),a=e.filter((function(e){return-1===i.stickyRowCtrls.findIndex((function(t){return t.getRowNode()===e}))})),l={};s.forEach((function(e){l[e.getRowNode().id]=e,i.stickyRowCtrls=i.stickyRowCtrls.filter((function(t){return t!==e}))}));try{for(var u=function(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],r=0;if(o)return o.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.values(l)),p=u.next();!p.done;p=u.next())p.value.getRowNode().sticky=!1}catch(e){o={error:e}}finally{try{p&&!p.done&&(r=u.return)&&r.call(u)}finally{if(o)throw o.error}}this.destroyRowCtrls(l,!1);var c=a.map((function(e){return e.sticky=!0,i.createRowCon(e,!1,!1)}));(n=this.stickyRowCtrls).push.apply(n,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ic(arguments[t]));return e}(c)),this.stickyRowCtrls.forEach((function(e){return e.setRowTop(e.getRowNode().stickyRowTop)})),this.stickyRowCtrls.sort((function(e,t){return t.getRowNode().rowIndex-e.getRowNode().rowIndex})),this.containerHeight!==t&&(this.containerHeight=t,this.gridBodyCtrl.setStickyTopHeight(t))},nc([z("rowModel")],t.prototype,"rowModel",void 0),nc([z("rowRenderer")],t.prototype,"rowRenderer",void 0),nc([z("ctrlsService")],t.prototype,"ctrlsService",void 0),nc([B],t.prototype,"postConstruct",null),t}(Ge),ac=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),lc=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},uc=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s},pc=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(uc(arguments[t]));return e},cc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.destroyFuncsForColumnListeners=[],t.rowCtrlsByRowIndex={},t.zombieRowCtrls={},t.allRowCtrls=[],t.topRowCtrls=[],t.bottomRowCtrls=[],t.refreshInProgress=!1,t.dataFirstRenderedFired=!1,t}return ac(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(){e.gridBodyCtrl=e.ctrlsService.getGridBodyCtrl(),e.initialise()}))},t.prototype.initialise=function(){this.addManagedListener(this.eventService,We.EVENT_PAGINATION_CHANGED,this.onPageLoaded.bind(this)),this.addManagedListener(this.eventService,We.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_BODY_SCROLL,this.redrawAfterScroll.bind(this)),this.addManagedListener(this.eventService,We.EVENT_BODY_HEIGHT_CHANGED,this.redrawAfterScroll.bind(this)),this.addManagedListener(this.gridOptionsWrapper,eo.PROP_DOM_LAYOUT,this.onDomLayoutChanged.bind(this)),this.addManagedListener(this.gridOptionsWrapper,eo.PROP_ROW_CLASS,this.redrawRows.bind(this)),this.gridOptionsWrapper.isGroupRowsSticky()&&(this.rowModel.getType()!=oe.ROW_MODEL_TYPE_CLIENT_SIDE?T((function(){return console.warn("AG Grid: The feature Sticky Row Groups only works with the Client Side Row Model")}),"rowRenderer.stickyWorksWithCsrmOnly"):this.gridOptionsWrapper.isTreeData()?T((function(){return console.warn("AG Grid: The feature Sticky Row Groups does not work with Tree Data.")}),"rowRenderer.stickyDoesNotWorkWithTreeData"):this.stickyRowFeature=this.createManagedBean(new sc(this.createRowCon.bind(this),this.destroyRowCtrls.bind(this)))),this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=this.gridOptionsWrapper.getDomLayout()===oe.DOM_LAYOUT_PRINT,this.embedFullWidthRows=this.printLayout||this.gridOptionsWrapper.isEmbedFullWidthRows(),this.redrawAfterModelUpdate()},t.prototype.initialiseCache=function(){if(this.gridOptionsWrapper.isKeepDetailRows()){var e=this.gridOptionsWrapper.getKeepDetailRowsCount(),t=null!=e?e:3;this.cachedRowCtrls=new dc(t)}},t.prototype.getRowCtrls=function(){return this.allRowCtrls},t.prototype.getStickyTopRowCtrls=function(){return this.stickyRowFeature?this.stickyRowFeature.getStickyRowCtrls():[]},t.prototype.updateAllRowCtrls=function(){var e=E(this.rowCtrlsByRowIndex);this.gridOptionsWrapper.isEnsureDomOrder()&&e.sort((function(e,t){return e.getRowNode().rowIndex-t.getRowNode.rowIndex}));var t=E(this.zombieRowCtrls),o=this.cachedRowCtrls?this.cachedRowCtrls.getEntries():[];this.allRowCtrls=pc(e,t,o)},t.prototype.registerCellEventListeners=function(){var e=this;this.addManagedListener(this.eventService,We.EVENT_CELL_FOCUSED,(function(t){e.getAllCellCtrls().forEach((function(e){return e.onCellFocused(t)})),e.getFullWidthRowCtrls().forEach((function(e){e.onFullWidthRowFocused(t)}))})),this.addManagedListener(this.eventService,We.EVENT_FLASH_CELLS,(function(t){e.getAllCellCtrls().forEach((function(e){return e.onFlashCells(t)}))})),this.addManagedListener(this.eventService,We.EVENT_COLUMN_HOVER_CHANGED,(function(){e.getAllCellCtrls().forEach((function(e){return e.onColumnHover()}))})),this.addManagedListener(this.eventService,We.EVENT_DISPLAYED_COLUMNS_CHANGED,(function(){e.getAllCellCtrls().forEach((function(e){return e.onDisplayedColumnsChanged()}))})),this.addManagedListener(this.eventService,We.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,(function(){e.printLayout&&e.getAllCellCtrls().forEach((function(e){return e.onLeftChanged()}))})),this.gridOptionsWrapper.isEnableRangeSelection()&&(this.addManagedListener(this.eventService,We.EVENT_RANGE_SELECTION_CHANGED,(function(){e.getAllCellCtrls().forEach((function(e){return e.onRangeSelectionChanged()}))})),this.addManagedListener(this.eventService,We.EVENT_COLUMN_MOVED,(function(){e.getAllCellCtrls().forEach((function(e){return e.updateRangeBordersIfRangeCount()}))})),this.addManagedListener(this.eventService,We.EVENT_COLUMN_PINNED,(function(){e.getAllCellCtrls().forEach((function(e){return e.updateRangeBordersIfRangeCount()}))})),this.addManagedListener(this.eventService,We.EVENT_COLUMN_VISIBLE,(function(){e.getAllCellCtrls().forEach((function(e){return e.updateRangeBordersIfRangeCount()}))}))),this.refreshListenersToColumnsForCellComps(),this.addManagedListener(this.eventService,We.EVENT_GRID_COLUMNS_CHANGED,this.refreshListenersToColumnsForCellComps.bind(this)),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))},t.prototype.removeGridColumnListeners=function(){this.destroyFuncsForColumnListeners.forEach((function(e){return e()})),this.destroyFuncsForColumnListeners.length=0},t.prototype.refreshListenersToColumnsForCellComps=function(){var e=this;this.removeGridColumnListeners();var t=this.columnModel.getAllGridColumns();t&&t.forEach((function(t){var o=function(o){e.getAllCellCtrls().forEach((function(e){e.getColumn()===t&&o(e)}))},r=function(){o((function(e){return e.onLeftChanged()}))},n=function(){o((function(e){return e.onWidthChanged()}))},i=function(){o((function(e){return e.onFirstRightPinnedChanged()}))},s=function(){o((function(e){return e.onLastLeftPinnedChanged()}))},a=function(){o((function(e){return e.onColDefChanged()}))};t.addEventListener(se.EVENT_LEFT_CHANGED,r),t.addEventListener(se.EVENT_WIDTH_CHANGED,n),t.addEventListener(se.EVENT_FIRST_RIGHT_PINNED_CHANGED,i),t.addEventListener(se.EVENT_LAST_LEFT_PINNED_CHANGED,s),t.addEventListener(se.EVENT_COL_DEF_CHANGED,a),e.destroyFuncsForColumnListeners.push((function(){t.removeEventListener(se.EVENT_LEFT_CHANGED,r),t.removeEventListener(se.EVENT_WIDTH_CHANGED,n),t.removeEventListener(se.EVENT_FIRST_RIGHT_PINNED_CHANGED,i),t.removeEventListener(se.EVENT_LAST_LEFT_PINNED_CHANGED,s),t.removeEventListener(se.EVENT_COL_DEF_CHANGED,a)}))}))},t.prototype.onDomLayoutChanged=function(){var e=this.gridOptionsWrapper.getDomLayout()===oe.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.rowCtrlsByRowIndex);this.removeRowCtrls(e)},t.prototype.onPageLoaded=function(e){var t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)},t.prototype.getAllCellsForColumn=function(e){var t=[];return this.getAllRowCtrls().forEach((function(o){var r=o.getCellElement(e);r&&t.push(r)})),t},t.prototype.refreshFloatingRowComps=function(){this.refreshFloatingRows(this.topRowCtrls,this.pinnedRowModel.getPinnedTopRowData()),this.refreshFloatingRows(this.bottomRowCtrls,this.pinnedRowModel.getPinnedBottomRowData())},t.prototype.getTopRowCtrls=function(){return this.topRowCtrls},t.prototype.getBottomRowCtrls=function(){return this.bottomRowCtrls},t.prototype.refreshFloatingRows=function(e,t){var o=this;e.forEach((function(e){e.destroyFirstPass(),e.destroySecondPass()})),e.length=0,t&&t.forEach((function(t){var r=new hl(t,o.beans,!1,!1,o.printLayout);e.push(r)}))},t.prototype.onPinnedRowDataChanged=function(){this.redrawAfterModelUpdate({recycleRows:!0})},t.prototype.getRenderedIndexesForRowNodes=function(e){var t=[];return i(e)||f(this.rowCtrlsByRowIndex,(function(o,r){var n=r.getRowNode();e.indexOf(n)>=0&&t.push(o)})),t},t.prototype.redrawRows=function(e){var t=null!=e&&e.length>0;if(t){var o=this.getRenderedIndexesForRowNodes(e);this.removeRowCtrls(o)}this.redrawAfterModelUpdate({recycleRows:t})},t.prototype.getCellToRestoreFocusToAfterRefresh=function(e){var t,o=(null===(t=e)||void 0===t?void 0:t.suppressKeepFocus)?null:this.focusService.getFocusCellToUseAfterRefresh();if(null==o)return null;var r=this.gridOptionsWrapper.getDocument().activeElement,n=this.gridOptionsWrapper.getDomData(r,al.DOM_DATA_KEY_CELL_CTRL),i=this.gridOptionsWrapper.getDomData(r,hl.DOM_DATA_KEY_ROW_CTRL);return n||i?o:null},t.prototype.redrawAfterModelUpdate=function(e){void 0===e&&(e={}),this.getLockOnRefresh();var t=this.getCellToRestoreFocusToAfterRefresh(e);this.updateContainerHeights(),this.scrollToTopIfNewData(e);var o=!this.printLayout&&!!e.recycleRows,r=e.animate&&this.gridOptionsWrapper.isAnimateRows(),n=o?this.recycleRows():null;o||this.removeAllRowComps();var i=function(){if(null==t||null==n)return!1;var e=!1;return f(n,(function(o,r){var n=r.getRowNode(),i=n.rowIndex==t.rowIndex,s=n.rowPinned==t.rowPinned;i&&s&&(e=!0)})),e}();this.redraw(n,r),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),i||this.restoreFocusedCell(t),this.releaseLockOnRefresh()},t.prototype.scrollToTopIfNewData=function(e){var t=e.newData||e.newPage,o=this.gridOptionsWrapper.isSuppressScrollOnNewData();t&&!o&&this.gridBodyCtrl.getScrollFeature().scrollToTop()},t.prototype.updateContainerHeights=function(){if(this.printLayout)this.rowContainerHeightService.setModelHeight(null);else{var e=this.paginationProxy.getCurrentPageHeight();0===e&&(e=1),this.rowContainerHeightService.setModelHeight(e)}},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, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 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.isRefreshInProgress=function(){return this.refreshInProgress},t.prototype.restoreFocusedCell=function(e){e&&this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})},t.prototype.stopEditing=function(e){void 0===e&&(e=!1),this.getAllRowCtrls().forEach((function(t){t.stopEditing(e)}))},t.prototype.getAllCellCtrls=function(){var e=[];return this.getAllRowCtrls().forEach((function(t){return e=e.concat(t.getAllCellCtrls())})),e},t.prototype.getAllRowCtrls=function(){var e=this,t=this.stickyRowFeature&&this.stickyRowFeature.getStickyRowCtrls()||[],o=pc(this.topRowCtrls,this.bottomRowCtrls,t);return Object.keys(this.rowCtrlsByRowIndex).forEach((function(t){return o.push(e.rowCtrlsByRowIndex[t])})),o},t.prototype.addRenderedRowListener=function(e,t,o){var r=this.rowCtrlsByRowIndex[t];r&&r.addEventListener(e,o)},t.prototype.flashCells=function(e){void 0===e&&(e={});var t=e.flashDelay,o=e.fadeDelay;this.getCellCtrls(e.rowNodes,e.columns).forEach((function(e){return e.flashCell({flashDelay:t,fadeDelay:o})}))},t.prototype.refreshCells=function(e){void 0===e&&(e={});var t={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};this.getCellCtrls(e.rowNodes,e.columns).forEach((function(e){if(e.refreshShouldDestroy()){var o=e.getRowCtrl();o&&o.refreshCell(e)}else e.refreshCell(t)})),this.getFullWidthRowCtrls(e.rowNodes).forEach((function(e){e.refreshFullWidth()}))},t.prototype.getCellRendererInstances=function(e){return this.getCellCtrls(e.rowNodes,e.columns).map((function(e){return e.getCellRenderer()})).filter((function(e){return null!=e}))},t.prototype.getCellEditorInstances=function(e){var t=[];return this.getCellCtrls(e.rowNodes,e.columns).forEach((function(e){var o=e.getCellEditor();o&&t.push(o)})),t},t.prototype.getEditingCells=function(){var e=[];return this.getAllCellCtrls().forEach((function(t){if(t.isEditing()){var o=t.getCellPosition();e.push(o)}})),e},t.prototype.mapRowNodes=function(e){if(e){var t={top:{},bottom:{},normal:{}};return e.forEach((function(e){var o=e.id;e.rowPinned===oe.PINNED_TOP?t.top[o]=e:e.rowPinned===oe.PINNED_BOTTOM?t.bottom[o]=e:t.normal[o]=e})),t}},t.prototype.isRowInMap=function(e,t){var o=e.id,r=e.rowPinned;return r===oe.PINNED_BOTTOM?null!=t.bottom[o]:r===oe.PINNED_TOP?null!=t.top[o]:null!=t.normal[o]},t.prototype.getCellCtrls=function(e,t){var o,r=this,i=this.mapRowNodes(e),s=[];n(t)&&(o={},t.forEach((function(e){var t=r.columnModel.getGridColumn(e);n(t)&&(o[t.getId()]=!0)})));var a=function(e){var t=e.getRowNode();(null==i||r.isRowInMap(t,i))&&e.getAllCellCtrls().forEach((function(e){var t=e.getColumn().getId();o&&!o[t]||s.push(e)}))};return f(this.rowCtrlsByRowIndex,(function(e,t){a(t)})),this.topRowCtrls&&this.topRowCtrls.forEach(a),this.bottomRowCtrls&&this.bottomRowCtrls.forEach(a),s},t.prototype.destroy=function(){this.removeAllRowComps(),e.prototype.destroy.call(this)},t.prototype.removeAllRowComps=function(){var e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)},t.prototype.recycleRows=function(){var e=[];f(this.rowCtrlsByRowIndex,(function(t,o){null==o.getRowNode().id&&e.push(t)})),this.removeRowCtrls(e);var t={};return f(this.rowCtrlsByRowIndex,(function(e,o){var r=o.getRowNode();t[r.id]=o})),this.rowCtrlsByRowIndex={},t},t.prototype.removeRowCtrls=function(e){var t=this;e.forEach((function(e){var o=t.rowCtrlsByRowIndex[e];o&&(o.destroyFirstPass(),o.destroySecondPass()),delete t.rowCtrlsByRowIndex[e]}))},t.prototype.redrawAfterScroll=function(){var e;if(this.stickyRowFeature&&Ot()&&(e=this.getCellToRestoreFocusToAfterRefresh()||void 0),this.getLockOnRefresh(),this.redraw(null,!1,!0),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(),null!=e){var t=this.getCellToRestoreFocusToAfterRefresh();null!=e&&null==t&&(this.animationFrameService.flushAllFrames(),this.restoreFocusedCell(e))}},t.prototype.removeRowCompsNotToDraw=function(e){var t={};e.forEach((function(e){return t[e]=!0}));var o=Object.keys(this.rowCtrlsByRowIndex).filter((function(e){return!t[e]}));this.removeRowCtrls(o)},t.prototype.calculateIndexesToDraw=function(e){var t=this,o=jt(this.firstRenderedRow,this.lastRenderedRow),r=function(e,r){var n=r.getRowNode().rowIndex;null!=n&&(n<t.firstRenderedRow||n>t.lastRenderedRow)&&t.doNotUnVirtualiseRow(r)&&o.push(n)};return f(this.rowCtrlsByRowIndex,r),f(e,r),o.sort((function(e,t){return e-t})),o=o.filter((function(e){var o=t.paginationProxy.getRow(e);return o&&!o.sticky}))},t.prototype.redraw=function(e,t,o){var r=this;void 0===t&&(t=!1),void 0===o&&(o=!1),this.rowContainerHeightService.updateOffset(),this.workOutFirstAndLastRowsToRender(),this.stickyRowFeature&&this.stickyRowFeature.checkStickyRows();var i=this.calculateIndexesToDraw(e);this.removeRowCompsNotToDraw(i),this.printLayout&&(t=!1),i.forEach((function(i){n(r.createOrUpdateRowCtrl(i,e,t,o))})),e&&(!o||this.gridOptionsWrapper.isSuppressAnimationFrame()||this.printLayout?this.destroyRowCtrls(e,t):this.beans.animationFrameService.addDestroyTask((function(){r.destroyRowCtrls(e,t),r.updateAllRowCtrls(),r.dispatchDisplayedRowsChanged()}))),this.updateAllRowCtrls()},t.prototype.dispatchDisplayedRowsChanged=function(){var e={type:We.EVENT_DISPLAYED_ROWS_CHANGED};this.eventService.dispatchEvent(e)},t.prototype.onDisplayedColumnsChanged=function(){var e=this.columnModel.isPinningLeft(),t=this.columnModel.isPinningRight();(this.pinningLeft!==e||t!==this.pinningRight)&&(this.pinningLeft=e,this.pinningRight=t,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())},t.prototype.redrawFullWidthEmbeddedRows=function(){var e=[];this.getFullWidthRowCtrls().forEach((function(t){var o=t.getRowNode().rowIndex;e.push(o.toString())})),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redrawAfterScroll()},t.prototype.getFullWidthRowCtrls=function(e){var t=this,o=this.mapRowNodes(e);return E(this.rowCtrlsByRowIndex).filter((function(e){if(!e.isFullWidth())return!1;var r=e.getRowNode();return!(null!=o&&!t.isRowInMap(r,o))}))},t.prototype.refreshFullWidthRows=function(e){var t=[],o=!!e,r=o?{}:void 0;o&&r&&e.forEach((function(e){return r[e.id]=!0})),this.getFullWidthRowCtrls().forEach((function(e){var n=e.getRowNode();if(o&&r){var i=n.level>0&&n.parent?n.parent.id:void 0;if(!r[n.id]&&!r[i])return}if(!e.refreshFullWidth()){var s=e.getRowNode().rowIndex;t.push(s.toString())}})),this.removeRowCtrls(t),this.redrawAfterScroll()},t.prototype.createOrUpdateRowCtrl=function(e,t,o,r){var i,s=this.rowCtrlsByRowIndex[e];if(s||n(i=this.paginationProxy.getRow(e))&&n(t)&&t[i.id]&&i.alreadyRendered&&(s=t[i.id],t[i.id]=null),!s){if(i||(i=this.paginationProxy.getRow(e)),!n(i))return;s=this.createRowCon(i,o,r)}return i&&(i.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=s,s},t.prototype.destroyRowCtrls=function(e,t){var o=this,r=[];f(e,(function(e,n){n&&(o.cachedRowCtrls&&n.isCacheable()?o.cachedRowCtrls.addRow(n):(n.destroyFirstPass(),t?(o.zombieRowCtrls[n.getInstanceId()]=n,r.push((function(){n.destroySecondPass(),delete o.zombieRowCtrls[n.getInstanceId()]}))):n.destroySecondPass()))})),t&&(r.push((function(){o.updateAllRowCtrls(),o.dispatchDisplayedRowsChanged()})),I(r))},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.gridOptionsWrapper.getRowBufferInPixels(),r=this.ctrlsService.getGridBodyCtrl(),n=this.gridOptionsWrapper.isSuppressRowVirtualisation(),i=!1,s=void 0,a=void 0;do{var l=this.paginationProxy.getPixelOffset(),u=this.paginationProxy.getCurrentPagePixelRange(),p=u.pageFirstPixel,c=u.pageLastPixel,d=this.rowContainerHeightService.getDivStretchOffset(),h=r.getScrollFeature().getVScrollPosition(),f=h.top,g=h.bottom;n?(s=p+d,a=c+d):(s=Math.max(f+l-o,p)+d,a=Math.min(g+l+o,c)+d),this.firstVisibleVPixel=Math.max(f+l,p)+d,i=this.ensureAllRowsInRangeHaveHeightsCalculated(s,a)}while(i);var m=this.paginationProxy.getRowIndexAtPixel(s),y=this.paginationProxy.getRowIndexAtPixel(a),v=this.paginationProxy.getPageFirstRow(),C=this.paginationProxy.getPageLastRow();m<v&&(m=v),y>C&&(y=C),e=m,t=y}else e=0,t=-1;var w=this.gridOptionsWrapper.getDomLayout()===oe.DOM_LAYOUT_NORMAL,E=this.gridOptionsWrapper.isSuppressMaxRenderedRowRestriction(),_=Math.max(this.gridOptionsWrapper.getRowBuffer(),500);w&&!E&&t-e>_&&(t=e+_);var S=e!==this.firstRenderedRow,R=t!==this.lastRenderedRow;if(S||R){this.firstRenderedRow=e,this.lastRenderedRow=t;var b={type:We.EVENT_VIEWPORT_CHANGED,firstRow:e,lastRow:t};this.eventService.dispatchEvent(b)}},t.prototype.dispatchFirstDataRenderedEvent=function(){var e=this;if(!this.dataFirstRenderedFired){this.dataFirstRenderedFired=!0;var t={type:We.EVENT_FIRST_DATA_RENDERED,firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow};window.requestAnimationFrame((function(){e.beans.eventService.dispatchEvent(t)}))}},t.prototype.ensureAllRowsInRangeHaveHeightsCalculated=function(e,t){var o=this.paginationProxy.ensureRowHeightsValid(e,t,-1,-1);return o&&this.updateContainerHeights(),o},t.prototype.getFirstVisibleVerticalPixel=function(){return this.firstVisibleVPixel},t.prototype.getFirstVirtualRenderedRow=function(){return this.firstRenderedRow},t.prototype.getLastVirtualRenderedRow=function(){return this.lastRenderedRow},t.prototype.doNotUnVirtualiseRow=function(e){var t=e.getRowNode(),o=this.focusService.isRowNodeFocused(t),r=e.isEditing(),n=t.detail;return(o||r||n)&&!!this.paginationProxy.isRowPresent(t)||!1},t.prototype.createRowCon=function(e,t,o){var r=this.cachedRowCtrls?this.cachedRowCtrls.getRow(e):null;if(r)return r;var n=this.gridOptionsWrapper.isSuppressAnimationFrame(),i=o&&!n&&!this.printLayout;return new hl(e,this.beans,t,i,this.printLayout)},t.prototype.getRenderedNodes=function(){var e=this.rowCtrlsByRowIndex;return Object.keys(e).map((function(t){return e[t].getRowNode()}))},t.prototype.getRowByPosition=function(e){var t,o=e.rowIndex;switch(e.rowPinned){case oe.PINNED_TOP:t=this.topRowCtrls[o];break;case oe.PINNED_BOTTOM:t=this.bottomRowCtrls[o];break;default:(t=this.rowCtrlsByRowIndex[o])||(t=this.getStickyTopRowCtrls().find((function(e){return e.getRowNode().rowIndex===o}))||null)}return t},t.prototype.getRowNode=function(e){switch(e.rowPinned){case oe.PINNED_TOP:return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case oe.PINNED_BOTTOM:return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}},t.prototype.isRangeInRenderedViewport=function(e,t){if(null==e||null==t)return!1;var o=e>this.lastRenderedRow;return!(t<this.firstRenderedRow||o)},lc([z("animationFrameService")],t.prototype,"animationFrameService",void 0),lc([z("paginationProxy")],t.prototype,"paginationProxy",void 0),lc([z("columnModel")],t.prototype,"columnModel",void 0),lc([z("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),lc([z("rowModel")],t.prototype,"rowModel",void 0),lc([z("focusService")],t.prototype,"focusService",void 0),lc([z("beans")],t.prototype,"beans",void 0),lc([z("rowContainerHeightService")],t.prototype,"rowContainerHeightService",void 0),lc([z("ctrlsService")],t.prototype,"ctrlsService",void 0),lc([B],t.prototype,"postConstruct",null),lc([Y("rowRenderer")],t)}(Ge),dc=function(){function e(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}return e.prototype.addRow=function(e){if(this.entriesMap[e.getRowNode().id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){var t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}},e.prototype.getRow=function(e){if(null==e||null==e.id)return null;var t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.getRowNode()!=e?null:t):null},e.prototype.removeFromCache=function(e){var t=e.getRowNode().id;delete this.entriesMap[t],ce(this.entriesList,e)},e.prototype.getEntries=function(){return this.entriesList},e}(),hc=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),fc=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},gc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hc(t,e),t.prototype.formatValue=function(e,t,o,r,n){void 0===n&&(n=!0);var i,s=null,a=e.getColDef();if(r?i=r:n&&(i=t&&t.rowPinned&&a.pinnedRowValueFormatter?a.pinnedRowValueFormatter:a.valueFormatter),i){var l={value:o,node:t,data:t?t.data:null,colDef:a,column:e,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()};s=this.expressionService.evaluate(i,l)}else if(a.refData)return a.refData[o]||"";return null==s&&Array.isArray(o)&&(s=o.join(", ")),s},fc([z("expressionService")],t.prototype,"expressionService",void 0),fc([Y("valueFormatterService")],t)}(Ge),mc=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),yc=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},vc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return mc(t,e),t.prototype.init=function(){this.setPinnedTopRowData(this.gridOptionsWrapper.getPinnedTopRowData()),this.setPinnedBottomRowData(this.gridOptionsWrapper.getPinnedBottomRowData())},t.prototype.isEmpty=function(e){return s(e===oe.PINNED_TOP?this.pinnedTopRows:this.pinnedBottomRows)},t.prototype.isRowsToRender=function(e){return!this.isEmpty(e)},t.prototype.getRowAtPixel=function(e,t){var o=t===oe.PINNED_TOP?this.pinnedTopRows:this.pinnedBottomRows;if(s(o))return 0;for(var r=0;r<o.length;r++){var n=o[r];if(n.rowTop+n.rowHeight-1>=e)return r}return o.length-1},t.prototype.setPinnedTopRowData=function(e){this.pinnedTopRows=this.createNodesFromData(e,!0);var t={type:We.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(t)},t.prototype.setPinnedBottomRowData=function(e){this.pinnedBottomRows=this.createNodesFromData(e,!1);var t={type:We.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(t)},t.prototype.createNodesFromData=function(e,t){var o=this,r=[];if(e){var n=0;e.forEach((function(e,i){var s=new ns(o.beans);s.data=e;var a=t?ns.ID_PREFIX_TOP_PINNED:ns.ID_PREFIX_BOTTOM_PINNED;s.id=a+i,s.rowPinned=t?oe.PINNED_TOP:oe.PINNED_BOTTOM,s.setRowTop(n),s.setRowHeight(o.gridOptionsWrapper.getRowHeightForNode(s).height),s.setRowIndex(i),n+=s.rowHeight,r.push(s)}))}return r},t.prototype.getPinnedTopRowData=function(){return this.pinnedTopRows},t.prototype.getPinnedBottomRowData=function(){return this.pinnedBottomRows},t.prototype.getPinnedTopTotalHeight=function(){return this.getTotalHeight(this.pinnedTopRows)},t.prototype.getPinnedTopRowCount=function(){return this.pinnedTopRows?this.pinnedTopRows.length:0},t.prototype.getPinnedBottomRowCount=function(){return this.pinnedBottomRows?this.pinnedBottomRows.length:0},t.prototype.getPinnedTopRow=function(e){return this.pinnedTopRows[e]},t.prototype.getPinnedBottomRow=function(e){return this.pinnedBottomRows[e]},t.prototype.forEachPinnedTopRow=function(e){s(this.pinnedTopRows)||this.pinnedTopRows.forEach(e)},t.prototype.forEachPinnedBottomRow=function(e){s(this.pinnedBottomRows)||this.pinnedBottomRows.forEach(e)},t.prototype.getPinnedBottomTotalHeight=function(){return this.getTotalHeight(this.pinnedBottomRows)},t.prototype.getTotalHeight=function(e){if(!e||0===e.length)return 0;var t=le(e);return t.rowTop+t.rowHeight},yc([z("beans")],t.prototype,"beans",void 0),yc([B],t.prototype,"init",null),yc([Y("pinnedRowModel")],t)}(Ge);!function(e){e.Applied="Applied",e.StoreNotFound="StoreNotFound",e.StoreLoading="StoreLoading",e.StoreWaitingToLoad="StoreWaitingToLoad",e.StoreLoadingFailed="StoreLoadingFailed",e.StoreWrongType="StoreWrongType",e.Cancelled="Cancelled"}(Bp||(Bp={}));var Cc,wc=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 n=e.childrenAfterGroup[r];n.childrenAfterGroup?this.depthFirstSearchEverything(e.childrenAfterGroup[r],t,o):o&&t(n)}t(e)},e.prototype.forEachChangedNodeDepthFirst=function(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=!1),this.active&&!o?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 n=this.mapToItems[o.id],i=this.mapToItems[o.parent.id];i.children||(i.children=[]),i.children.push(n),o=o.parent}},e.prototype.addParentNode=function(e,t){if(e&&!e.isRowPinned()){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}(),Ec=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),_c=function(e){function t(o){var r=e.call(this)||this;return r.state=t.STATE_WAITING_TO_LOAD,r.version=0,r.id=o,r}return Ec(t,e),t.prototype.getId=function(){return this.id},t.prototype.load=function(){this.state=t.STATE_LOADING,this.loadFromDatasource()},t.prototype.getVersion=function(){return this.version},t.prototype.setStateWaitingToLoad=function(){this.version++,this.state=t.STATE_WAITING_TO_LOAD},t.prototype.getState=function(){return this.state},t.prototype.pageLoadFailed=function(e){this.isRequestMostRecentAndLive(e)&&(this.state=t.STATE_FAILED,this.processServerFail()),this.dispatchLoadCompleted(!1)},t.prototype.success=function(e,t){this.successCommon(e,t)},t.prototype.pageLoaded=function(e,t,o){this.successCommon(e,{rowData:t,rowCount:o})},t.prototype.isRequestMostRecentAndLive=function(e){var t=e===this.version,o=this.isAlive();return t&&o},t.prototype.successCommon=function(e,o){this.dispatchLoadCompleted(),this.isRequestMostRecentAndLive(e)&&(this.state=t.STATE_LOADED,this.processServerResult(o))},t.prototype.dispatchLoadCompleted=function(e){void 0===e&&(e=!0);var o={type:t.EVENT_LOAD_COMPLETE,success:e,block:this};this.dispatchEvent(o)},t.EVENT_LOAD_COMPLETE="loadComplete",t.STATE_WAITING_TO_LOAD="needsLoading",t.STATE_LOADING="loading",t.STATE_LOADED="loaded",t.STATE_FAILED="failed",t}(Ge),Sc=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Rc=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},bc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.activeBlockLoadsCount=0,t.blocks=[],t.active=!0,t}var o,r,n;return Sc(t,e),o=t,t.prototype.postConstruct=function(){this.maxConcurrentRequests=this.gridOptionsWrapper.getMaxConcurrentDatasourceRequests();var e=this.gridOptionsWrapper.getBlockLoadDebounceMillis();e&&e>0&&(this.checkBlockToLoadDebounce=on.debounce(this.performCheckBlocksToLoad.bind(this),e))},t.prototype.setBeans=function(e){this.logger=e.create("RowNodeBlockLoader")},t.prototype.addBlock=function(e){this.blocks.push(e),e.addEventListener(_c.EVENT_LOAD_COMPLETE,this.loadComplete.bind(this)),this.checkBlockToLoad()},t.prototype.removeBlock=function(e){on.removeFromArray(this.blocks,e)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.active=!1},t.prototype.loadComplete=function(){this.activeBlockLoadsCount--,this.checkBlockToLoad(),0==this.activeBlockLoadsCount&&this.dispatchEvent({type:o.BLOCK_LOADER_FINISHED_EVENT})},t.prototype.checkBlockToLoad=function(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()},t.prototype.performCheckBlocksToLoad=function(){if(this.active)if(this.printCacheStatus(),null!=this.maxConcurrentRequests&&this.activeBlockLoadsCount>=this.maxConcurrentRequests)this.logger.log("checkBlockToLoad: max loads exceeded");else{var e=void 0!==this.maxConcurrentRequests?this.maxConcurrentRequests-this.activeBlockLoadsCount:void 0,t=this.blocks.filter((function(e){return e.getState()===_c.STATE_WAITING_TO_LOAD})).slice(0,e);this.activeBlockLoadsCount+=t.length,t.forEach((function(e){return e.load()})),this.printCacheStatus()}},t.prototype.getBlockState=function(){var e={};return this.blocks.forEach((function(t){var o=t.getBlockStateJson(),r=o.id,n=o.state;e[r]=n})),e},t.prototype.printCacheStatus=function(){this.logger.isLogging()&&this.logger.log("printCacheStatus: activePageLoadsCount = "+this.activeBlockLoadsCount+", blocks = "+JSON.stringify(this.getBlockState()))},t.prototype.isLoading=function(){return this.activeBlockLoadsCount>0},t.BLOCK_LOADER_FINISHED_EVENT="blockLoaderFinished",Rc([B],t.prototype,"postConstruct",null),Rc([(r=0,n=q("loggerFactory"),function(e,t){n(e,t,r)})],t.prototype,"setBeans",null),o=Rc([Y("rowNodeBlockLoader")],t)}(Ge),Oc=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Pc=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Tc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.currentPage=0,t.topDisplayedRowIndex=0,t.bottomDisplayedRowIndex=0,t.pixelOffset=0,t.masterRowCount=0,t}return Oc(t,e),t.prototype.postConstruct=function(){this.active=this.gridOptionsWrapper.isPagination(),this.paginateChildRows=this.gridOptionsWrapper.isPaginateChildRows(),this.addManagedListener(this.eventService,We.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedListener(this.gridOptionsWrapper,"paginationPageSize",this.onPaginationPageSizeChanged.bind(this)),this.onModelUpdated()},t.prototype.ensureRowHeightsValid=function(e,t,o,r){var n=this.rowModel.ensureRowHeightsValid(e,t,this.getPageFirstRow(),this.getPageLastRow());return n&&this.calculatePages(),n},t.prototype.onModelUpdated=function(e){this.calculatePages();var t={type:We.EVENT_PAGINATION_CHANGED,animate:!!e&&e.animate,newData:!!e&&e.newData,newPage:!!e&&e.newPage,keepRenderedRows:!!e&&e.keepRenderedRows};this.eventService.dispatchEvent(t)},t.prototype.onPaginationPageSizeChanged=function(){this.calculatePages();var e={type:We.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,keepRenderedRows:!0};this.eventService.dispatchEvent(e)},t.prototype.goToPage=function(e){if(this.active&&this.currentPage!==e){this.currentPage=e;var t={type:We.EVENT_MODEL_UPDATED,animate:!1,keepRenderedRows:!1,newData:!1,newPage:!0};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 i(this.topRowBounds)||i(this.bottomRowBounds)?0:Math.max(this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop,0)},t.prototype.getCurrentPagePixelRange=function(){return{pageFirstPixel:this.topRowBounds?this.topRowBounds.rowTop:0,pageLastPixel:this.bottomRowBounds?this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight:0}},t.prototype.isRowPresent=function(e){return!!this.rowModel.isRowPresent(e)&&e.rowIndex>=this.topDisplayedRowIndex&&e.rowIndex<=this.bottomDisplayedRowIndex},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){var t=this.rowModel.getRowBounds(e);return t.rowIndex=e,t},t.prototype.getPageFirstRow=function(){return this.topRowBounds?this.topRowBounds.rowIndex:-1},t.prototype.getPageLastRow=function(){return this.bottomRowBounds?this.bottomRowBounds.rowIndex:-1},t.prototype.getRowCount=function(){return this.rowModel.getRowCount()},t.prototype.getPageForIndex=function(e){return Math.floor(e/this.pageSize)},t.prototype.goToPageWithIndex=function(e){if(this.active){var t=this.getPageForIndex(e);this.goToPage(t)}},t.prototype.isRowInPage=function(e){return!this.active||this.getPageForIndex(e.rowIndex)===this.currentPage},t.prototype.isLastPageFound=function(){return this.rowModel.isLastRowIndexKnown()},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.getRowCount(),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(),(null==this.pageSize||this.pageSize<1)&&(this.pageSize=100)},t.prototype.calculatePages=function(){this.active?(this.setPageSize(),this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly()):this.calculatedPagesNotActive(),this.topRowBounds=this.rowModel.getRowBounds(this.topDisplayedRowIndex),this.topRowBounds&&(this.topRowBounds.rowIndex=this.topDisplayedRowIndex),this.bottomRowBounds=this.rowModel.getRowBounds(this.bottomDisplayedRowIndex),this.bottomRowBounds&&(this.bottomRowBounds.rowIndex=this.bottomDisplayedRowIndex),this.setPixelOffset(n(this.topRowBounds)?this.topRowBounds.rowTop:0)},t.prototype.setPixelOffset=function(e){this.pixelOffset!==e&&(this.pixelOffset=e,this.eventService.dispatchEvent({type:We.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED}))},t.prototype.setZeroRows=function(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0},t.prototype.calculatePagesMasterRowsOnly=function(){if(this.masterRowCount=this.rowModel.getTopLevelRowCount(),this.masterRowCount<=0)this.setZeroRows();else{var e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!Bt(this.currentPage)||this.currentPage<0)&&(this.currentPage=0);var t=this.pageSize*this.currentPage,o=this.pageSize*(this.currentPage+1)-1;if(o>e&&(o=e),this.topDisplayedRowIndex=this.rowModel.getTopLevelRowDisplayedIndex(t),o===e)this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1;else{var r=this.rowModel.getTopLevelRowDisplayedIndex(o+1);this.bottomDisplayedRowIndex=r-1}}},t.prototype.getMasterRowCount=function(){return this.masterRowCount},t.prototype.calculatePagesAllRows=function(){if(this.masterRowCount=this.rowModel.getRowCount(),0!==this.masterRowCount){var e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!Bt(this.currentPage)||this.currentPage<0)&&(this.currentPage=0),this.topDisplayedRowIndex=this.pageSize*this.currentPage,this.bottomDisplayedRowIndex=this.pageSize*(this.currentPage+1)-1,this.bottomDisplayedRowIndex>e&&(this.bottomDisplayedRowIndex=e)}else this.setZeroRows()},t.prototype.calculatedPagesNotActive=function(){this.pageSize=this.rowModel.getRowCount(),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1},Pc([z("rowModel")],t.prototype,"rowModel",void 0),Pc([B],t.prototype,"postConstruct",null),Pc([Y("paginationProxy")],t)}(Ge),Ac=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Dc=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Ic=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ac(t,e),t.prototype.processAllCellClasses=function(e,t,o,r){this.processClassRules(e.cellClassRules,t,o,r),this.processStaticCellClasses(e,t,o)},t.prototype.processClassRules=function(e,t,o,r){if(null!=e){for(var n=Object.keys(e),i={},s={},a=function(o){var r,a=n[o],u=e[a];"string"==typeof u?r=l.expressionService.evaluate(u,t):"function"==typeof u&&(r=u(t)),a.split(" ").forEach((function(e){null!=e&&""!=e.trim()&&(r?i[e]=!0:s[e]=!0)}))},l=this,u=0;u<n.length;u++)a(u);r&&Object.keys(s).forEach(r),Object.keys(i).forEach(o)}},t.prototype.getStaticCellClasses=function(e,t){var o,r=e.cellClass;return r?("string"==typeof(o="function"==typeof r?r(t):r)&&(o=[o]),o||[]):[]},t.prototype.processStaticCellClasses=function(e,t,o){this.getStaticCellClasses(e,t).forEach((function(e){o(e)}))},Dc([z("expressionService")],t.prototype,"expressionService",void 0),Dc([Y("stylingService")],t)}(Ge),Nc=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),xc=function(e){function t(t){return e.call(this,t,"ag-radio-button","radio")||this}return Nc(t,e),t.prototype.isSelected=function(){return this.eInput.checked},t.prototype.toggle=function(){this.eInput.disabled||this.isSelected()||this.setValue(!0)},t.prototype.addInputListeners=function(){e.prototype.addInputListeners.call(this),this.addManagedListener(this.eventService,We.EVENT_CHECKBOX_CHANGED,this.onChange.bind(this))},t.prototype.onChange=function(e){e.selected&&e.name&&this.eInput.name&&this.eInput.name===e.name&&e.id&&this.eInput.id!==e.id&&this.setValue(!1,!0)},t}(Ju),Mc=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Lc=function(e){function t(t){return e.call(this,t,"ag-toggle-button")||this}return Mc(t,e),t.prototype.setValue=function(t,o){return e.prototype.setValue.call(this,t,o),this.addOrRemoveCssClass("ag-selected",this.getValue()),this},t}(Ju),Fc=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Gc=function(e){function t(t,o,r){return void 0===o&&(o="ag-text-field"),void 0===r&&(r="text"),e.call(this,t,o,r)||this}return Fc(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.config.allowedCharPattern&&this.preventDisallowedCharacters()},t.prototype.setValue=function(t,o){var r=e.prototype.setValue.call(this,t,o);return this.eInput.value!==t&&(this.eInput.value=n(t)?t:""),r},t.prototype.preventDisallowedCharacters=function(){var e=new RegExp("["+this.config.allowedCharPattern+"]");this.addManagedListener(this.eInput,"keypress",(function(t){t.key&&!e.test(t.key)&&t.preventDefault()})),this.addManagedListener(this.eInput,"paste",(function(t){var o,r=null===(o=t.clipboardData)||void 0===o?void 0:o.getData("text");r&&r.split("").some((function(t){return!e.test(t)}))&&t.preventDefault()}))},t}(qn),kc=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Vc=function(e){function t(t){return e.call(this,t,"ag-text-area",null,"textarea")||this}return kc(t,e),t.prototype.setValue=function(t,o){var r=e.prototype.setValue.call(this,t,o);return this.eInput.value=t,r},t.prototype.setCols=function(e){return this.eInput.cols=e,this},t.prototype.setRows=function(e){return this.eInput.rows=e,this},t}(qn),Hc=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Wc=function(e){function t(t){return e.call(this,t,"ag-number-field","number")||this}return Hc(t,e),t.prototype.postConstruct=function(){var t=this;e.prototype.postConstruct.call(this),this.addManagedListener(this.eInput,"blur",(function(){var e=parseFloat(t.eInput.value),o=isNaN(e)?"":t.normalizeValue(e.toString());t.value!==o&&t.setValue(o)})),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this)),this.eInput.step="any"},t.prototype.onWheel=function(e){document.activeElement===this.eInput&&e.preventDefault()},t.prototype.normalizeValue=function(e){if(""===e)return"";this.precision&&(e=this.adjustPrecision(e));var t=parseFloat(e);return null!=this.min&&t<this.min?e=this.min.toString():null!=this.max&&t>this.max&&(e=this.max.toString()),e},t.prototype.adjustPrecision=function(e){if(this.precision){var t=parseFloat(e).toFixed(this.precision);e=parseFloat(t).toString()}return e},t.prototype.setMin=function(e){return this.min===e||(this.min=e,Jo(this.eInput,"min",e)),this},t.prototype.setMax=function(e){return this.max===e||(this.max=e,Jo(this.eInput,"max",e)),this},t.prototype.setPrecision=function(e){return this.precision=e,this},t.prototype.setStep=function(e){return this.step===e||(this.step=e,Jo(this.eInput,"step",e)),this},t.prototype.setValue=function(t,o){return(t=this.adjustPrecision(t))!=this.normalizeValue(t)?this:e.prototype.setValue.call(this,t,o)},t}(Gc),jc=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Bc=function(e){function t(t){return e.call(this,t,"ag-range-field","range")||this}return jc(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this);var t=this.config,o=t.min,r=t.max,n=t.step;null!=o&&this.setMinValue(o),null!=r&&this.setMaxValue(r),this.setStep(n||1)},t.prototype.addInputListeners=function(){var e=this;this.addManagedListener(this.eInput,"input",(function(t){var o=t.target.value;e.setValue(o)}))},t.prototype.setMinValue=function(e){return this.min=e,this.eInput.setAttribute("min",e.toString()),this},t.prototype.setMaxValue=function(e){return this.max=e,this.eInput.setAttribute("max",e.toString()),this},t.prototype.setStep=function(e){return this.eInput.setAttribute("step",e.toString()),this},t.prototype.setValue=function(t,o){null!=this.min&&(t=Math.max(parseFloat(t),this.min).toString()),null!=this.max&&(t=Math.min(parseFloat(t),this.max).toString());var r=e.prototype.setValue.call(this,t,o);return this.eInput.value=t,r},t}(qn),Uc=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Yc=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},zc=function(e){function t(o){var r=e.call(this,o,t.TEMPLATE)||this;return r.labelAlignment="top",r}return Uc(t,e),t.prototype.init=function(){this.eSlider.addCssClass("ag-slider-field")},t.prototype.onValueChange=function(e){var t=this,o=kn.EVENT_CHANGED;return this.addManagedListener(this.eText,o,(function(){var o=parseFloat(t.eText.getValue());t.eSlider.setValue(o.toString(),!0),e(o||0)})),this.addManagedListener(this.eSlider,o,(function(){var o=t.eSlider.getValue();t.eText.setValue(o,!0),e(parseFloat(o))})),this},t.prototype.setSliderWidth=function(e){return this.eSlider.setWidth(e),this},t.prototype.setTextFieldWidth=function(e){return this.eText.setWidth(e),this},t.prototype.setMinValue=function(e){return this.eSlider.setMinValue(e),this.eText.setMin(e),this},t.prototype.setMaxValue=function(e){return this.eSlider.setMaxValue(e),this.eText.setMax(e),this},t.prototype.getValue=function(){return this.eText.getValue()},t.prototype.setValue=function(e){return this.getValue()===e||(this.eText.setValue(e,!0),this.eSlider.setValue(e,!0),this.dispatchEvent({type:kn.EVENT_CHANGED})),this},t.prototype.setStep=function(e){return this.eSlider.setStep(e),this.eText.setStep(e),this},t.TEMPLATE='<div class="ag-slider">\n <label ref="eLabel"></label>\n <div class="ag-wrapper ag-slider-wrapper">\n <ag-input-range ref="eSlider"></ag-input-range>\n <ag-input-number-field ref="eText"></ag-input-number-field>\n </div>\n </div>',Yc([vn("eLabel")],t.prototype,"eLabel",void 0),Yc([vn("eSlider")],t.prototype,"eSlider",void 0),Yc([vn("eText")],t.prototype,"eText",void 0),Yc([B],t.prototype,"init",null),t}(Fn),Kc=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),$c=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},qc=function(e){function t(o){var r=e.call(this,o,t.TEMPLATE)||this;return r.radius=0,r.offsetX=0,r.offsetY=0,r}return Kc(t,e),t.prototype.postConstruct=function(){var t=this;e.prototype.postConstruct.call(this),this.dragListener={eElement:this.eParentCircle,dragStartPixels:0,onDragStart:function(e){t.parentCircleRect=t.eParentCircle.getBoundingClientRect()},onDragging:function(e){return t.calculateAngleDrag(e)},onDragStop:function(){}},this.dragService.addDragSource(this.dragListener),this.eAngleValue.setLabel("").setLabelWidth(5).setInputWidth(45).setMin(0).setMax(360).setValue(""+this.degrees).onValueChange((function(e){null!=e&&""!==e||(e="0"),e=t.eAngleValue.normalizeValue(e);var o=parseFloat(e);o>180&&(o-=360),t.setValue(o)})),this.updateNumberInput(),n(this.getValue())&&this.eAngleValue.setValue(this.normalizeNegativeValue(this.getValue()).toString()),this.addManagedListener(this,kn.EVENT_CHANGED,(function(){var e=t.gridOptionsWrapper.getDocument();t.eAngleValue.getInputElement().contains(e.activeElement)||t.updateNumberInput()}))},t.prototype.updateNumberInput=function(){var e=this.normalizeNegativeValue(this.getValue());this.eAngleValue.setValue(e.toString())},t.prototype.positionChildCircle=function(e){var t=this.parentCircleRect||{width:24,height:24},o=this.eChildCircle,r=t.width/2,n=t.height/2;o.style.left=r+8*Math.cos(e)+"px",o.style.top=n+8*Math.sin(e)+"px"},t.prototype.calculatePolar=function(){var e=this.offsetX,t=this.offsetY,o=Math.atan2(t,e);this.degrees=this.toDegrees(o),this.radius=Math.sqrt(e*e+t*t),this.positionChildCircle(o)},t.prototype.calculateCartesian=function(){var e=this.toRadians(this.getValue()),t=this.getRadius();this.setOffsetX(Math.cos(e)*t).setOffsetY(Math.sin(e)*t)},t.prototype.setOffsetX=function(e){return this.offsetX!==e&&(this.offsetX=e,this.calculatePolar()),this},t.prototype.setOffsetY=function(e){return this.offsetY!==e&&(this.offsetY=e,this.calculatePolar()),this},t.prototype.calculateAngleDrag=function(e){var t=this.parentCircleRect,o=t.width/2,r=t.height/2,n=e.clientX-t.left-o,i=e.clientY-t.top-r,s=Math.atan2(i,n);this.setValue(s,!0)},t.prototype.toDegrees=function(e){return e/Math.PI*180},t.prototype.toRadians=function(e){return e/180*Math.PI},t.prototype.normalizeNegativeValue=function(e){return e<0?360+e:e},t.prototype.normalizeAngle180=function(e){return(e%=2*Math.PI)<-Math.PI?e+=2*Math.PI:e>=Math.PI&&(e-=2*Math.PI),e},t.prototype.getRadius=function(){return this.radius},t.prototype.setRadius=function(e){return this.radius===e||(this.radius=e,this.calculateCartesian()),this},t.prototype.onValueChange=function(e){var t=this;return this.addManagedListener(this,kn.EVENT_CHANGED,(function(){e(t.degrees)})),this},t.prototype.getValue=function(e){return e?this.toRadians(this.degrees):this.degrees},t.prototype.setValue=function(e,t){var o;return o=t?e:this.normalizeAngle180(this.toRadians(e)),e=this.toDegrees(o),this.degrees!==e&&(this.degrees=Math.floor(e),this.calculateCartesian(),this.positionChildCircle(o),this.dispatchEvent({type:kn.EVENT_CHANGED})),this},t.prototype.setWidth=function(e){return Yo(this.getGui(),e),this},t.prototype.setDisabled=function(t){return e.prototype.setDisabled.call(this,t),this.eAngleValue.setDisabled(t),this},t.prototype.destroy=function(){this.dragService.removeDragSource(this.dragListener),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-angle-select">\n <div ref="eLabel"></div>\n <div class="ag-wrapper ag-angle-select-wrapper">\n <div ref="eAngleSelectField" class="ag-angle-select-field">\n <div ref="eParentCircle" class="ag-angle-select-parent-circle">\n <div ref="eChildCircle" class="ag-angle-select-child-circle"></div>\n </div>\n </div>\n <ag-input-number-field ref="eAngleValue"></ag-input-number-field>\n </div>\n </div>',$c([vn("eLabel")],t.prototype,"eLabel",void 0),$c([vn("eParentCircle")],t.prototype,"eParentCircle",void 0),$c([vn("eChildCircle")],t.prototype,"eChildCircle",void 0),$c([vn("eAngleValue")],t.prototype,"eAngleValue",void 0),$c([z("dragService")],t.prototype,"dragService",void 0),t}(Fn),Zc=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Xc=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Qc=function(e){function t(o){var r=e.call(this,t.TEMPLATE)||this;return r.H=1,r.S=1,r.B=1,r.A=1,r.isSpectrumDragging=!1,r.isSpectrumHueDragging=!1,r.isSpectrumAlphaDragging=!1,r.colorChanged=!1,r.picker=o.picker,r}return Zc(t,e),t.prototype.postConstruct=function(){var e=this.getGui();this.initRecentColors(),this.addManagedListener(this.spectrumVal,"mousedown",this.onSpectrumDraggerDown.bind(this)),this.addManagedListener(e,"mousemove",this.onSpectrumDraggerMove.bind(this)),this.addManagedListener(this.spectrumHue,"mousedown",this.onSpectrumHueDown.bind(this)),this.addManagedListener(e,"mousemove",this.onSpectrumHueMove.bind(this)),this.addManagedListener(this.spectrumAlpha,"mousedown",this.onSpectrumAlphaDown.bind(this)),this.addManagedListener(e,"mousemove",this.onSpectrumAlphaMove.bind(this)),this.addManagedListener(document,"mouseup",this.onMouseUp.bind(this)),this.addManagedListener(this.recentColors,"click",this.onRecentColorClick.bind(this))},t.prototype.refreshSpectrumRect=function(){return this.spectrumValRect=this.spectrumVal.getBoundingClientRect()},t.prototype.refreshHueRect=function(){return this.spectrumHueRect=this.spectrumHue.getBoundingClientRect()},t.prototype.refreshAlphaRect=function(){return this.spectrumAlphaRect=this.spectrumAlpha.getBoundingClientRect()},t.prototype.onSpectrumDraggerDown=function(e){this.refreshSpectrumRect(),this.isSpectrumDragging=!0,this.moveDragger(e)},t.prototype.onSpectrumDraggerMove=function(e){this.isSpectrumDragging&&this.moveDragger(e)},t.prototype.onSpectrumHueDown=function(e){this.refreshHueRect(),this.isSpectrumHueDragging=!0,this.moveHueSlider(e)},t.prototype.onSpectrumHueMove=function(e){this.isSpectrumHueDragging&&this.moveHueSlider(e)},t.prototype.onSpectrumAlphaDown=function(e){this.refreshAlphaRect(),this.isSpectrumAlphaDragging=!0,this.moveAlphaSlider(e)},t.prototype.onSpectrumAlphaMove=function(e){this.isSpectrumAlphaDragging&&this.moveAlphaSlider(e)},t.prototype.onMouseUp=function(){this.isSpectrumDragging=!1,this.isSpectrumHueDragging=!1,this.isSpectrumAlphaDragging=!1},t.prototype.moveDragger=function(e){var t=this.spectrumValRect;if(t){var o=e.clientX-t.left,r=e.clientY-t.top;o=Math.max(o,0),o=Math.min(o,t.width),r=Math.max(r,0),r=Math.min(r,t.height),this.setSpectrumValue(o/t.width,1-r/t.height)}},t.prototype.moveHueSlider=function(e){var t=this.spectrumHueRect;if(t){var o=this.spectrumHueSlider,r=o.getBoundingClientRect(),n=e.clientX-t.left;n=Math.max(n,0),n=Math.min(n,t.width),this.H=1-n/t.width,o.style.left=n+r.width/2+"px",this.update()}},t.prototype.moveAlphaSlider=function(e){var t=this.spectrumAlphaRect;if(t){var o=this.spectrumAlphaSlider,r=o.getBoundingClientRect(),n=e.clientX-t.left;n=Math.max(n,0),n=Math.min(n,t.width),this.A=n/t.width,o.style.left=n+r.width/2+"px",this.update()}},t.prototype.update=function(){var e=go.fromHSB(360*this.H,this.S,this.B,this.A),t=go.fromHSB(360*this.H,1,1),o=e.toRgbaString(),r=this.picker;go.fromString(r.getValue()).toRgbaString()!==o&&(this.colorChanged=!0),r.setValue(o),this.spectrumColor.style.backgroundColor=t.toRgbaString(),this.spectrumDragger.style.backgroundColor=o},t.prototype.setSpectrumValue=function(e,t){var o=this.spectrumValRect||this.refreshSpectrumRect();if(o){var r=this.spectrumDragger,n=r.getBoundingClientRect();e=Math.max(0,e),e=Math.min(1,e),t=Math.max(0,t),t=Math.min(1,t),this.S=e,this.B=t,r.style.left=e*o.width-n.width/2+"px",r.style.top=(1-t)*o.height-n.height/2+"px",this.update()}},t.prototype.initRecentColors=function(){var e=t.recentColors.map((function(e,t){return'<div class="ag-recent-color" id='+t+' style="background-color: '+e+'; width: 15px; height: 15px;" recent-color="'+e+'"></div>'}));this.recentColors.innerHTML=e.join("")},t.prototype.setValue=function(e){var t=go.fromString(e),o=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s}(t.toHSB(),3),r=o[0],n=o[1],i=o[2];this.H=(isNaN(r)?0:r)/360,this.A=t.a;var s=this.spectrumHueRect||this.refreshHueRect(),a=this.spectrumAlphaRect||this.refreshAlphaRect();this.spectrumHueSlider.style.left=(this.H-1)*-s.width+"px",this.spectrumAlphaSlider.style.left=this.A*a.width+"px",this.setSpectrumValue(n,i)},t.prototype.onRecentColorClick=function(e){var o=e.target;if(n(o.id)){var r=parseInt(o.id,10);this.setValue(t.recentColors[r]),this.destroy()}},t.prototype.addRecentColor=function(){var e=go.fromHSB(360*this.H,this.S,this.B,this.A).toRgbaString(),o=t.recentColors;this.colorChanged&&o[0]!==e&&(o=o.filter((function(t){return t!=e})),(o=[e].concat(o)).length>t.maxRecentColors&&(o=o.slice(0,t.maxRecentColors)),t.recentColors=o)},t.prototype.destroy=function(){this.addRecentColor(),e.prototype.destroy.call(this)},t.maxRecentColors=8,t.recentColors=[],t.TEMPLATE='<div class="ag-color-panel">\n <div ref="spectrumColor" class="ag-spectrum-color">\n <div class="ag-spectrum-sat ag-spectrum-fill">\n <div ref="spectrumVal" class="ag-spectrum-val ag-spectrum-fill">\n <div ref="spectrumDragger" class="ag-spectrum-dragger"></div>\n </div>\n </div>\n </div>\n <div class="ag-spectrum-tools">\n <div ref="spectrumHue" class="ag-spectrum-hue ag-spectrum-tool">\n <div class="ag-spectrum-hue-background"></div>\n <div ref="spectrumHueSlider" class="ag-spectrum-slider"></div>\n </div>\n <div ref="spectrumAlpha" class="ag-spectrum-alpha ag-spectrum-tool">\n <div class="ag-spectrum-alpha-background"></div>\n <div ref="spectrumAlphaSlider" class="ag-spectrum-slider"></div>\n </div>\n <div ref="recentColors" class="ag-recent-colors"></div>\n </div>\n </div>',Xc([vn("spectrumColor")],t.prototype,"spectrumColor",void 0),Xc([vn("spectrumVal")],t.prototype,"spectrumVal",void 0),Xc([vn("spectrumDragger")],t.prototype,"spectrumDragger",void 0),Xc([vn("spectrumHue")],t.prototype,"spectrumHue",void 0),Xc([vn("spectrumHueSlider")],t.prototype,"spectrumHueSlider",void 0),Xc([vn("spectrumAlpha")],t.prototype,"spectrumAlpha",void 0),Xc([vn("spectrumAlphaSlider")],t.prototype,"spectrumAlphaSlider",void 0),Xc([vn("recentColors")],t.prototype,"recentColors",void 0),Xc([B],t.prototype,"postConstruct",null),t}(mn),Jc=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),ed=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},td=function(e){function t(o){var r=e.call(this,t.getTemplate(o))||this;return r.closable=!0,r.config=o,r}return Jc(t,e),t.getTemplate=function(e){var t=e&&e.cssIdentifier||"default";return'<div class="ag-panel ag-'+t+'-panel" tabindex="-1">\n <div ref="eTitleBar" class="ag-panel-title-bar ag-'+t+'-panel-title-bar ag-unselectable">\n <span ref="eTitle" class="ag-panel-title-bar-title ag-'+t+'-panel-title-bar-title"></span>\n <div ref="eTitleBarButtons" class="ag-panel-title-bar-buttons ag-'+t+'-panel-title-bar-buttons"></div>\n </div>\n <div ref="eContentWrapper" class="ag-panel-content-wrapper ag-'+t+'-panel-content-wrapper"></div>\n </div>'},t.prototype.postConstruct=function(){var e=this,t=this.config,o=t.component,r=t.closable,n=t.hideTitleBar,i=t.title,s=t.minWidth,a=void 0===s?250:s,l=t.width,u=t.minHeight,p=void 0===u?250:u,c=t.height,d=t.centered,h=t.popup,f=t.x,g=t.y;this.positionableFeature=new Jp(this.getGui(),{minWidth:a,width:l,minHeight:p,height:c,centered:d,x:f,y:g,popup:h,calculateTopBuffer:function(){return e.positionableFeature.getHeight()-e.getBodyHeight()}}),this.createManagedBean(this.positionableFeature);var m=this.getGui();o&&this.setBodyComponent(o),n?this.eTitleBar.classList.add("ag-hidden"):(i&&this.setTitle(i),this.setClosable(null!=r?r:this.closable)),this.addManagedListener(this.eTitleBar,"mousedown",(function(t){var o=e.gridOptionsWrapper.getDocument();if(m.contains(t.relatedTarget)||m.contains(o.activeElement)||e.eTitleBarButtons.contains(t.target))t.preventDefault();else{var r=e.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");r&&r.focus()}})),h&&this.positionableFeature.isPositioned()||(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0")},t.prototype.renderComponent=function(){var e=this,t=this.getGui();t.focus(),this.close=function(){t.parentElement.removeChild(t),e.destroy()}},t.prototype.getHeight=function(){return this.positionableFeature.getHeight()},t.prototype.setHeight=function(e){this.positionableFeature.setHeight(e)},t.prototype.getWidth=function(){return this.positionableFeature.getWidth()},t.prototype.setWidth=function(e){this.positionableFeature.setWidth(e)},t.prototype.setClosable=function(e){if(e!==this.closable&&(this.closable=e),e){var o=this.closeButtonComp=new mn(t.CLOSE_BTN_TEMPLATE);this.getContext().createBean(o);var r=o.getGui(),n=Hr("close",this.gridOptionsWrapper);n.classList.add("ag-panel-title-bar-button-icon"),r.appendChild(n),this.addTitleBarButton(o),o.addManagedListener(r,"click",this.onBtClose.bind(this))}else this.closeButtonComp&&((r=this.closeButtonComp.getGui()).parentElement.removeChild(r),this.closeButtonComp=this.destroyBean(this.closeButtonComp))},t.prototype.setBodyComponent=function(e){e.setParentComponent(this),this.eContentWrapper.appendChild(e.getGui())},t.prototype.addTitleBarButton=function(e,t){var o=this.eTitleBarButtons,r=o.children,n=r.length;null==t&&(t=n),t=Math.max(0,Math.min(t,n)),e.addCssClass("ag-panel-title-bar-button");var i=e.getGui();0===t?o.insertAdjacentElement("afterbegin",i):t===n?o.insertAdjacentElement("beforeend",i):r[t-1].insertAdjacentElement("afterend",i),e.setParentComponent(this)},t.prototype.getBodyHeight=function(){return bo(this.eContentWrapper)},t.prototype.getBodyWidth=function(){return Oo(this.eContentWrapper)},t.prototype.setTitle=function(e){this.eTitle.innerText=e},t.prototype.onBtClose=function(){this.close()},t.prototype.destroy=function(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));var t=this.getGui();t&&t.offsetParent&&this.close(),e.prototype.destroy.call(this)},t.CLOSE_BTN_TEMPLATE='<div class="ag-button"></div>',ed([vn("eContentWrapper")],t.prototype,"eContentWrapper",void 0),ed([vn("eTitleBar")],t.prototype,"eTitleBar",void 0),ed([vn("eTitleBarButtons")],t.prototype,"eTitleBarButtons",void 0),ed([vn("eTitle")],t.prototype,"eTitle",void 0),ed([B],t.prototype,"postConstruct",null),t}(mn),od=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),rd=function(){return rd=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},rd.apply(this,arguments)},nd=function(e){function t(t){var o=e.call(this,rd(rd({},t),{popup:!0}))||this;return o.isMaximizable=!1,o.isMaximized=!1,o.maximizeListeners=[],o.resizeListenerDestroy=null,o.lastPosition={x:0,y:0,width:0,height:0},o}return od(t,e),t.prototype.postConstruct=function(){var t=this,o=this.getGui(),r=this.config,n=r.movable,i=r.resizable,s=r.maximizable;this.addCssClass("ag-dialog"),e.prototype.postConstruct.call(this),this.addManagedListener(o,"focusin",(function(e){o.contains(e.relatedTarget)||t.popupService.bringPopupToFront(o)})),n&&this.setMovable(n),s&&this.setMaximizable(s),i&&this.setResizable(i)},t.prototype.renderComponent=function(){var e=this.getGui(),t=this.config,o=t.alwaysOnTop,r=t.modal,n=t.title,i=this.gridOptionsWrapper.getLocaleTextFunc(),s=this.popupService.addPopup({modal:r,eChild:e,closeOnEsc:!0,closedCallback:this.destroy.bind(this),alwaysOnTop:o,ariaLabel:n||i("ariaLabelDialog","Dialog")});s&&(this.close=s.hideFunc)},t.prototype.toggleMaximize=function(){var e=this.positionableFeature.getPosition();if(this.isMaximized){var t=this.lastPosition,o=t.x,r=t.y,n=t.width,i=t.height;this.setWidth(n),this.setHeight(i),this.positionableFeature.offsetElement(o,r)}else this.lastPosition.width=this.getWidth(),this.lastPosition.height=this.getHeight(),this.lastPosition.x=e.x,this.lastPosition.y=e.y,this.positionableFeature.offsetElement(0,0),this.setHeight("100%"),this.setWidth("100%");this.isMaximized=!this.isMaximized,this.refreshMaximizeIcon()},t.prototype.refreshMaximizeIcon=function(){wo(this.maximizeIcon,!this.isMaximized),wo(this.minimizeIcon,this.isMaximized)},t.prototype.clearMaximizebleListeners=function(){this.maximizeListeners.length&&(this.maximizeListeners.forEach((function(e){return e()})),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)},t.prototype.destroy=function(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),e.prototype.destroy.call(this)},t.prototype.setResizable=function(e){this.positionableFeature.setResizable(e)},t.prototype.setMovable=function(e){this.positionableFeature.setMovable(e,this.eTitleBar)},t.prototype.setMaximizable=function(e){var t=this;if(!e)return this.clearMaximizebleListeners(),void(this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0));var o=this.eTitleBar;if(o&&e!==this.isMaximizable){var r=this.maximizeButtonComp=this.createBean(new mn('<div class="ag-dialog-button"></span>')),n=r.getGui();n.appendChild(this.maximizeIcon=Hr("maximize",this.gridOptionsWrapper)),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),n.appendChild(this.minimizeIcon=Hr("minimize",this.gridOptionsWrapper)),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon","ag-hidden"),r.addManagedListener(n,"click",this.toggleMaximize.bind(this)),this.addTitleBarButton(r,0),this.maximizeListeners.push(this.addManagedListener(o,"dblclick",this.toggleMaximize.bind(this))),this.resizeListenerDestroy=this.addManagedListener(this,"resize",(function(){t.isMaximized=!1,t.refreshMaximizeIcon()}))}},function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);i>3&&s&&Object.defineProperty(t,o,s)}([z("popupService")],t.prototype,"popupService",void 0),t}(td),id=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),sd=function(e){function t(t){var o=e.call(this,t,"ag-color-picker","colorPicker")||this;return t&&t.color&&(o.value=t.color),o}return id(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.value&&this.setValue(this.value)},t.prototype.showPicker=function(){var e=this,t=this.getGui().getBoundingClientRect(),o=this.createBean(new nd({closable:!1,modal:!0,hideTitleBar:!0,minWidth:190,width:190,height:250,x:t.right-190,y:t.top-250}));this.isPickerDisplayed=!0,o.addCssClass("ag-color-dialog"),yr(this.eWrapper,!0);var r=this.createBean(new Qc({picker:this}));return r.addDestroyFunc((function(){o.isAlive()&&e.destroyBean(o)})),o.setParentComponent(this),o.setBodyComponent(r),r.setValue(this.getValue()),o.addDestroyFunc((function(){e.isDestroyingPicker?e.isDestroyingPicker=!1:(e.isDestroyingPicker=!0,r.isAlive()&&e.destroyBean(r)),e.isAlive()&&(yr(e.eWrapper,!1),e.getFocusableElement().focus()),e.isPickerDisplayed=!1})),o},t.prototype.setValue=function(t){return this.value===t?this:(this.eDisplayField.style.backgroundColor=t,e.prototype.setValue.call(this,t))},t.prototype.getValue=function(){return this.value},t}(Wn),ad=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),ld=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ud=function(e){function t(o){void 0===o&&(o={});var r=e.call(this,t.getTemplate(o))||this;r.suppressEnabledCheckbox=!0,r.suppressOpenCloseIcons=!1;var n=o.title,i=o.enabled,s=o.items,a=o.suppressEnabledCheckbox,l=o.suppressOpenCloseIcons;return r.title=n,r.cssIdentifier=o.cssIdentifier||"default",r.enabled=null==i||i,r.items=s||[],r.alignItems=o.alignItems||"center",null!=a&&(r.suppressEnabledCheckbox=a),null!=l&&(r.suppressOpenCloseIcons=l),r}return ad(t,e),t.getTemplate=function(e){var t=e.cssIdentifier||"default";return'<div class="ag-group ag-'+t+'-group" role="presentation">\n <div class="ag-group-title-bar ag-'+t+'-group-title-bar ag-unselectable" ref="eTitleBar" role="button">\n <span class="ag-group-title-bar-icon ag-'+t+'-group-title-bar-icon" ref="eGroupOpenedIcon" role="presentation"></span>\n <span class="ag-group-title-bar-icon ag-'+t+'-group-title-bar-icon" ref="eGroupClosedIcon" role="presentation"></span>\n <span ref="eTitle" class="ag-group-title ag-'+t+'-group-title"></span>\n </div>\n <div ref="eToolbar" class="ag-group-toolbar ag-'+t+'-group-toolbar">\n <ag-checkbox ref="cbGroupEnabled"></ag-checkbox>\n </div>\n <div ref="eContainer" class="ag-group-container ag-group-container-'+(e.direction||"vertical")+" ag-"+t+'-group-container"></div>\n </div>'},t.prototype.postConstruct=function(){if(this.items.length){var e=this.items;this.items=[],this.addItems(e)}var t=this.gridOptionsWrapper.getLocaleTextFunc();this.cbGroupEnabled.setLabel(t("enabled","Enabled")),this.title&&this.setTitle(this.title),this.enabled&&this.setEnabled(this.enabled),this.setAlignItems(this.alignItems),this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract(),this.refreshAriaStatus(),this.refreshChildDisplay()},t.prototype.setupExpandContract=function(){var e=this;this.eGroupClosedIcon.appendChild(Vr("columnSelectClosed",this.gridOptionsWrapper,null)),this.eGroupOpenedIcon.appendChild(Vr("columnSelectOpen",this.gridOptionsWrapper,null)),this.addManagedListener(this.eTitleBar,"click",(function(){return e.toggleGroupExpand()})),this.addManagedListener(this.eTitleBar,"keydown",(function(t){switch(t.key){case jr.ENTER:case jr.SPACE:t.preventDefault(),e.toggleGroupExpand();break;case jr.RIGHT:case jr.LEFT:t.preventDefault(),e.toggleGroupExpand(t.key===jr.RIGHT)}}))},t.prototype.refreshAriaStatus=function(){this.suppressOpenCloseIcons||yr(this.eTitleBar,this.expanded)},t.prototype.refreshChildDisplay=function(){var e=!this.suppressOpenCloseIcons;wo(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),wo(this.eGroupOpenedIcon,e&&this.expanded),wo(this.eGroupClosedIcon,e&&!this.expanded)},t.prototype.isExpanded=function(){return this.expanded},t.prototype.setAlignItems=function(e){this.alignItems!==e&&this.removeCssClass("ag-group-item-alignment-"+this.alignItems),this.alignItems=e;var t="ag-group-item-alignment-"+this.alignItems;return this.addCssClass(t),this},t.prototype.toggleGroupExpand=function(e){return this.suppressOpenCloseIcons?(this.expanded=!0,this.refreshChildDisplay(),wo(this.eContainer,!0),this):(e=null!=e?e:!this.expanded,this.expanded===e||(this.expanded=e,this.refreshAriaStatus(),this.refreshChildDisplay(),wo(this.eContainer,e),this.dispatchEvent({type:this.expanded?t.EVENT_EXPANDED:t.EVENT_COLLAPSED})),this)},t.prototype.addItems=function(e){var t=this;e.forEach((function(e){return t.addItem(e)}))},t.prototype.addItem=function(e){var t=this.eContainer,o=e instanceof mn?e.getGui():e;o.classList.add("ag-group-item","ag-"+this.cssIdentifier+"-group-item"),t.appendChild(o),this.items.push(o)},t.prototype.hideItem=function(e,t){this.items[t].classList.toggle("ag-hidden",e)},t.prototype.setTitle=function(e){return this.eTitle.innerText=e,this},t.prototype.addCssClassToTitleBar=function(e){this.eTitleBar.classList.add(e)},t.prototype.setEnabled=function(e,t){return this.enabled=e,this.refreshDisabledStyles(),this.toggleGroupExpand(e),t||this.cbGroupEnabled.setValue(e),this},t.prototype.isEnabled=function(){return this.enabled},t.prototype.onEnableChange=function(e){var t=this;return this.cbGroupEnabled.onValueChange((function(o){t.setEnabled(o,!0),e(o)})),this},t.prototype.hideEnabledCheckbox=function(e){return this.suppressEnabledCheckbox=e,this.refreshChildDisplay(),this.refreshDisabledStyles(),this},t.prototype.hideOpenCloseIcons=function(e){return this.suppressOpenCloseIcons=e,e&&this.toggleGroupExpand(!0),this},t.prototype.refreshDisabledStyles=function(){this.addOrRemoveCssClass("ag-disabled",!this.enabled),this.suppressEnabledCheckbox&&!this.enabled?(this.eTitleBar.classList.add("ag-disabled-group-title-bar"),this.eTitleBar.removeAttribute("tabindex")):(this.eTitleBar.classList.remove("ag-disabled-group-title-bar"),this.eTitleBar.setAttribute("tabindex","0")),this.eContainer.classList.toggle("ag-disabled-group-container",!this.enabled)},t.EVENT_EXPANDED="expanded",t.EVENT_COLLAPSED="collapsed",ld([vn("eTitleBar")],t.prototype,"eTitleBar",void 0),ld([vn("eGroupOpenedIcon")],t.prototype,"eGroupOpenedIcon",void 0),ld([vn("eGroupClosedIcon")],t.prototype,"eGroupClosedIcon",void 0),ld([vn("eToolbar")],t.prototype,"eToolbar",void 0),ld([vn("cbGroupEnabled")],t.prototype,"cbGroupEnabled",void 0),ld([vn("eTitle")],t.prototype,"eTitle",void 0),ld([vn("eContainer")],t.prototype,"eContainer",void 0),ld([B],t.prototype,"postConstruct",null),t}(mn),pd=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),cd=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},dd=function(e){function t(t){var o=e.call(this)||this;o.skipTabGuardFocus=!1;var r=t.comp,n=t.eTopGuard,i=t.eBottomGuard,s=t.focusInnerElement,a=t.onFocusIn,l=t.onFocusOut,u=t.shouldStopEventPropagation,p=t.onTabKeyDown,c=t.handleKeyDown,d=t.eFocusableElement;return o.comp=r,o.eTopGuard=n,o.eBottomGuard=i,o.providedFocusInnerElement=s,o.eFocusableElement=d,o.providedFocusIn=a,o.providedFocusOut=l,o.providedShouldStopEventPropagation=u,o.providedOnTabKeyDown=p,o.providedHandleKeyDown=c,o}return pd(t,e),t.prototype.postConstruct=function(){var e=this;this.createManagedBean(new In(this.eFocusableElement,{shouldStopEventPropagation:function(){return e.shouldStopEventPropagation()},onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)},onFocusIn:function(t){return e.onFocusIn(t)},onFocusOut:function(t){return e.onFocusOut(t)}})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach((function(t){return e.addManagedListener(t,"focus",e.onFocus.bind(e))}))},t.prototype.handleKeyDown=function(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)},t.prototype.tabGuardsAreActive=function(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")},t.prototype.shouldStopEventPropagation=function(){return!!this.providedShouldStopEventPropagation&&this.providedShouldStopEventPropagation()},t.prototype.activateTabGuards=function(){this.comp.setTabIndex(this.getGridTabIndex())},t.prototype.deactivateTabGuards=function(){this.comp.setTabIndex()},t.prototype.onFocus=function(e){if(this.skipTabGuardFocus)this.skipTabGuardFocus=!1;else{var t=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t)}},t.prototype.onFocusIn=function(e){this.providedFocusIn&&this.providedFocusIn(e)||this.deactivateTabGuards()},t.prototype.onFocusOut=function(e){this.providedFocusOut&&this.providedFocusOut(e)||this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards()},t.prototype.onTabKeyDown=function(e){var t=this;if(this.providedOnTabKeyDown)this.providedOnTabKeyDown(e);else if(!e.defaultPrevented){var o=this.tabGuardsAreActive();o&&this.deactivateTabGuards();var r=this.getNextFocusableElement(e.shiftKey);o&&setTimeout((function(){return t.activateTabGuards()}),0),r&&(r.focus(),e.preventDefault())}},t.prototype.getGridTabIndex=function(){return this.gridOptionsWrapper.getGridTabIndex()},t.prototype.focusInnerElement=function(e){void 0===e&&(e=!1);var t=this.focusService.findFocusableElements(this.eFocusableElement);this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length&&t[e?t.length-1:0].focus()},t.prototype.getNextFocusableElement=function(e){return this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e)},t.prototype.forceFocusOutOfContainer=function(e){void 0===e&&(e=!1);var t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,t.focus()},cd([z("focusService")],t.prototype,"focusService",void 0),cd([B],t.prototype,"postConstruct",null),t}(Ge),hd=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),fd=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s},gd=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hd(t,e),t.prototype.initialiseTabGuard=function(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.getFocusableElement();var t=[this.eTopGuard,this.eBottomGuard],o={setTabIndex:function(e){t.forEach((function(t){return null!=e?t.setAttribute("tabIndex",e):t.removeAttribute("tabIndex")}))}};this.addTabGuards(this.eTopGuard,this.eBottomGuard),this.tabGuardCtrl=this.createManagedBean(new dd({comp:o,eTopGuard:this.eTopGuard,eBottomGuard:this.eBottomGuard,eFocusableElement:this.eFocusableElement,onFocusIn:e.onFocusIn,onFocusOut:e.onFocusOut,focusInnerElement:e.focusInnerElement,handleKeyDown:e.handleKeyDown,onTabKeyDown:e.onTabKeyDown,shouldStopEventPropagation:e.shouldStopEventPropagation}))},t.prototype.createTabGuard=function(e){var t=document.createElement("div");return t.classList.add("ag-tab-guard","ag-tab-guard-"+e),sr(t,"presentation"),t},t.prototype.addTabGuards=function(e,t){this.eFocusableElement.insertAdjacentElement("afterbegin",e),this.eFocusableElement.insertAdjacentElement("beforeend",t)},t.prototype.removeAllChildrenExceptTabGuards=function(){var e=[this.eTopGuard,this.eBottomGuard];No(this.getFocusableElement()),this.addTabGuards.apply(this,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(fd(arguments[t]));return e}(e))},t.prototype.forceFocusOutOfContainer=function(e){void 0===e&&(e=!1),this.tabGuardCtrl.forceFocusOutOfContainer(e)},t.prototype.appendChild=function(t,o){Zo(t)||(t=t.getGui());var r=this.eBottomGuard;r?r.insertAdjacentElement("beforebegin",t):e.prototype.appendChild.call(this,t,o)},t}(mn),md=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),yd=function(){return yd=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},yd.apply(this,arguments)},vd=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Cd=function(e){function t(t){void 0===t&&(t=1);var o=e.call(this,'<div class="ag-menu-list" role="tree"></div>')||this;return o.level=t,o.menuItems=[],o}return md(t,e),t.prototype.postConstruct=function(){var e=this;this.initialiseTabGuard({onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)}})},t.prototype.onTabKeyDown=function(e){var t=this.getParentComponent(),o=t&&t.getGui();o&&o.classList.contains("ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)},t.prototype.handleKeyDown=function(e){switch(e.key){case jr.UP:case jr.RIGHT:case jr.DOWN:case jr.LEFT:e.preventDefault(),this.handleNavKey(e.key);break;case jr.ESCAPE:var t=this.findTopMenu();t&&this.focusService.focusInto(t.getGui())}},t.prototype.clearActiveItem=function(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)},t.prototype.addMenuItems=function(e){var t=this;null!=e&&e.forEach((function(e){"separator"===e?t.addSeparator():"string"==typeof e?console.warn("AG Grid: unrecognised menu item "+e):t.addItem(e)}))},t.prototype.addItem=function(e){var t=this,o=this.createManagedBean(new Rd(yd(yd({},e),{isAnotherSubMenuOpen:function(){return t.menuItems.some((function(e){return e.isSubMenuOpen()}))}})));o.setParentComponent(this),fr(o.getGui(),this.level),this.menuItems.push(o),this.appendChild(o.getGui()),this.addManagedListener(o,Rd.EVENT_MENU_ITEM_SELECTED,(function(e){t.dispatchEvent(e)})),this.addManagedListener(o,Rd.EVENT_MENU_ITEM_ACTIVATED,(function(e){t.activeMenuItem&&t.activeMenuItem!==e.menuItem&&t.activeMenuItem.deactivate(),t.activeMenuItem=e.menuItem}))},t.prototype.activateFirstItem=function(){var e=this.menuItems.filter((function(e){return!e.isDisabled()}))[0];e&&e.activate()},t.prototype.addSeparator=function(){this.appendChild(Lo('\n <div class="ag-menu-separator" aria-hidden="true">\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n </div>'))},t.prototype.findTopMenu=function(){var e=this.getParentComponent();if(!e&&this instanceof t)return this;for(;;){var o=e&&e.getParentComponent&&e.getParentComponent();if(!o||!(o instanceof t||o instanceof Rd))break;e=o}return e instanceof t?e:void 0},t.prototype.handleNavKey=function(e){switch(e){case jr.UP:case jr.DOWN:var t=this.findNextItem(e===jr.UP);return void(t&&t!==this.activeMenuItem&&t.activate())}e===(this.gridOptionsWrapper.isEnableRtl()?jr.RIGHT:jr.LEFT)?this.closeIfIsChild():this.openChild()},t.prototype.closeIfIsChild=function(e){var t=this.getParentComponent();t&&t instanceof Rd&&(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus())},t.prototype.openChild=function(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)},t.prototype.findNextItem=function(e){var t=this.menuItems.filter((function(e){return!e.isDisabled()}));if(t.length){if(!this.activeMenuItem)return e?le(t):t[0];var o;e&&t.reverse();for(var r=!1,n=0;n<t.length;n++){var i=t[n];if(r){o=i;break}i===this.activeMenuItem&&(r=!0)}return o||this.activeMenuItem}},t.prototype.destroy=function(){this.clearActiveItem(),e.prototype.destroy.call(this)},vd([z("focusService")],t.prototype,"focusService",void 0),vd([B],t.prototype,"postConstruct",null),t}(gd),wd=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Ed=function(e){function t(t){var o=e.call(this)||this;return o.wrappedComponent=t,o.setTemplateFromElement(t.getGui()),o}return wd(t,e),t.prototype.postConstruct=function(){var e=this;this.initialiseTabGuard({onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)}})},t.prototype.handleKeyDown=function(e){e.key===jr.ESCAPE&&this.closePanel()},t.prototype.onTabKeyDown=function(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())},t.prototype.closePanel=function(){var e=this.parentComponent;e.closeSubMenu(),setTimeout((function(){return e.getGui().focus()}),0)},function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);i>3&&s&&Object.defineProperty(t,o,s)}([B],t.prototype,"postConstruct",null),t}(gd),_d=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Sd=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Rd=function(e){function t(t){var o=e.call(this)||this;return o.params=t,o.isActive=!1,o.subMenuIsOpen=!1,o.setTemplate('<div class="'+o.getClassName()+'" tabindex="-1" role="treeitem"></div>'),o}return _d(t,e),t.prototype.init=function(){var e=this;this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu(),this.addTooltip();var t=this.getGui();this.params.disabled?(this.addCssClass(this.getClassName("disabled")),gr(t,!0)):(this.addGuiEventListener("click",(function(t){return e.onItemSelected(t)})),this.addGuiEventListener("keydown",(function(t){t.key!==jr.ENTER&&t.key!==jr.SPACE||(t.preventDefault(),e.onItemSelected(t))})),this.addGuiEventListener("mousedown",(function(e){e.stopPropagation(),e.preventDefault()})),this.addGuiEventListener("mouseenter",(function(){return e.onMouseEnter()})),this.addGuiEventListener("mouseleave",(function(){return e.onMouseLeave()}))),this.params.cssClasses&&this.params.cssClasses.forEach((function(t){return e.addCssClass(t)}))},t.prototype.isDisabled=function(){return!!this.params.disabled},t.prototype.openSubMenu=function(e){var o=this;if(void 0===e&&(e=!1),this.closeSubMenu(),this.params.subMenu){var r,n=Lo('<div class="ag-menu" role="presentation"></div>');if(this.params.subMenu instanceof Array){var i=lr(this.getGui()),s=isNaN(i)?1:i+1,a=this.createBean(new Cd(s));a.setParentComponent(this),a.addMenuItems(this.params.subMenu),n.appendChild(a.getGui()),this.addManagedListener(a,t.EVENT_MENU_ITEM_SELECTED,(function(e){return o.dispatchEvent(e)})),a.addGuiEventListener("mouseenter",(function(){return o.cancelDeactivate()})),r=function(){return o.destroyBean(a)},e&&setTimeout((function(){return a.activateFirstItem()}),0)}else{var l=this.params.subMenu,u=this.createBean(new Ed(l));u.setParentComponent(this);var p=u.getGui(),c="mouseenter",d=function(){return o.cancelDeactivate()};p.addEventListener(c,d),r=function(){return p.removeEventListener(c,d)},n.appendChild(p),l.afterGuiAttached&&setTimeout((function(){return l.afterGuiAttached()}),0)}var h=this.getGui(),f=this.popupService.positionPopupForMenu.bind(this.popupService,{eventSource:h,ePopup:n}),g=this.gridOptionsWrapper.getLocaleTextFunc(),m=this.popupService.addPopup({modal:!0,eChild:n,positionCallback:f,anchorToElement:h,ariaLabel:g("ariaLabelSubMenu","SubMenu")});this.subMenuIsOpen=!0,yr(h,!0),this.hideSubMenu=function(){m&&m.hideFunc(),o.subMenuIsOpen=!1,yr(h,!1),r()}}},t.prototype.closeSubMenu=function(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,yr(this.getGui(),!1))},t.prototype.isSubMenuOpen=function(){return this.subMenuIsOpen},t.prototype.activate=function(e){var t=this;this.cancelActivate(),this.params.disabled||(this.isActive=!0,this.addCssClass(this.getClassName("active")),this.getGui().focus(),e&&this.params.subMenu&&window.setTimeout((function(){t.isAlive()&&t.isActive&&t.openSubMenu()}),300),this.onItemActivated())},t.prototype.deactivate=function(){this.cancelDeactivate(),this.removeCssClass(this.getClassName("active")),this.isActive=!1,this.subMenuIsOpen&&this.hideSubMenu()},t.prototype.addIcon=function(){if(this.params.checked||this.params.icon||!this.params.isCompact){var e=Lo('<span ref="eIcon" class="'+this.getClassName("part")+" "+this.getClassName("icon")+'" role="presentation"></span>');this.params.checked?e.appendChild(Hr("check",this.gridOptionsWrapper)):this.params.icon&&(Zo(this.params.icon)?e.appendChild(this.params.icon):"string"==typeof this.params.icon?e.innerHTML=this.params.icon:console.warn("AG Grid: menu item icon must be DOM node or string")),this.getGui().appendChild(e)}},t.prototype.addName=function(){if(this.params.name||!this.params.isCompact){var e=Lo('<span ref="eName" class="'+this.getClassName("part")+" "+this.getClassName("text")+'">'+(this.params.name||"")+"</span>");this.getGui().appendChild(e)}},t.prototype.addTooltip=function(){this.params.tooltip&&(this.tooltip=this.params.tooltip,this.gridOptionsWrapper.isEnableBrowserTooltips()?this.getGui().setAttribute("title",this.tooltip):this.createManagedBean(new cn(this)))},t.prototype.getTooltipParams=function(){return{location:"menu",value:this.tooltip}},t.prototype.addShortcut=function(){if(this.params.shortcut||!this.params.isCompact){var e=Lo('<span ref="eShortcut" class="'+this.getClassName("part")+" "+this.getClassName("shortcut")+'">'+(this.params.shortcut||"")+"</span>");this.getGui().appendChild(e)}},t.prototype.addSubMenu=function(){if(this.params.subMenu||!this.params.isCompact){var e=Lo('<span ref="ePopupPointer" class="'+this.getClassName("part")+" "+this.getClassName("popup-pointer")+'"></span>'),t=this.getGui();if(this.params.subMenu){var o=this.gridOptionsWrapper.isEnableRtl()?"smallLeft":"smallRight";yr(t,!1),e.appendChild(Hr(o,this.gridOptionsWrapper))}t.appendChild(e)}},t.prototype.onItemSelected=function(e){if(this.params.action?this.params.action():this.openSubMenu(e&&"keydown"===e.type),!this.params.subMenu||this.params.action){var o={type:t.EVENT_MENU_ITEM_SELECTED,action:this.params.action,checked:this.params.checked,cssClasses:this.params.cssClasses,disabled:this.params.disabled,icon:this.params.icon,name:this.params.name,shortcut:this.params.shortcut,subMenu:this.params.subMenu,tooltip:this.params.tooltip,event:e};this.dispatchEvent(o)}},t.prototype.onItemActivated=function(){var e={type:t.EVENT_MENU_ITEM_ACTIVATED,menuItem:this};this.dispatchEvent(e)},t.prototype.cancelActivate=function(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)},t.prototype.cancelDeactivate=function(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)},t.prototype.onMouseEnter=function(){var e=this;this.cancelDeactivate(),this.params.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout((function(){return e.activate(!0)}),t.ACTIVATION_DELAY):this.activate(!0)},t.prototype.onMouseLeave=function(){var e=this;this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout((function(){return e.deactivate()}),t.ACTIVATION_DELAY):this.deactivate()},t.prototype.getClassName=function(e){var t=this.params.isCompact?"ag-compact-menu-option":"ag-menu-option";return e?t+"-"+e:t},t.EVENT_MENU_ITEM_SELECTED="menuItemSelected",t.EVENT_MENU_ITEM_ACTIVATED="menuItemActivated",t.ACTIVATION_DELAY=80,Sd([z("popupService")],t.prototype,"popupService",void 0),Sd([B],t.prototype,"init",null),t}(mn),bd=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Od=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Pd=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s},Td=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var o;return bd(t,e),o=t,t.addKeyboardModeEvents=function(e,t){var r=o.instancesMonitored.get(e);r&&r.length>0?-1===r.indexOf(t)&&r.push(t):(o.instancesMonitored.set(e,[t]),e.addEventListener("keydown",o.toggleKeyboardMode),e.addEventListener("mousedown",o.toggleKeyboardMode))},t.removeKeyboardModeEvents=function(e,t){var r=o.instancesMonitored.get(e),n=[];r&&r.length&&(n=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Pd(arguments[t]));return e}(r).filter((function(e){return e!==t})),o.instancesMonitored.set(e,n)),0===n.length&&(e.removeEventListener("keydown",o.toggleKeyboardMode),e.removeEventListener("mousedown",o.toggleKeyboardMode))},t.toggleKeyboardMode=function(e){var t=o.keyboardModeActive,r="keydown"===e.type;if(!(r&&(e.ctrlKey||e.metaKey||e.altKey)||t&&r||!t&&!r)){o.keyboardModeActive=r;var n=e.target.ownerDocument;if(n){var i=o.instancesMonitored.get(n);i&&i.forEach((function(e){e.dispatchEvent({type:r?We.EVENT_KEYBOARD_FOCUS:We.EVENT_MOUSE_FOCUS})}))}}},t.prototype.init=function(){var e=this,t=this.clearFocusedCell.bind(this);this.addManagedListener(this.eventService,We.EVENT_COLUMN_PIVOT_MODE_CHANGED,t),this.addManagedListener(this.eventService,We.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverythingChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_COLUMN_GROUP_OPENED,t),this.addManagedListener(this.eventService,We.EVENT_COLUMN_ROW_GROUP_CHANGED,t),this.ctrlsService.whenReady((function(t){e.gridCtrl=t.gridCtrl;var r=e.gridOptionsWrapper.getDocument();o.addKeyboardModeEvents(r,e.gridCtrl),e.addDestroyFunc((function(){return e.unregisterGridCompController(e.gridCtrl)}))}))},t.prototype.unregisterGridCompController=function(e){var t=this.gridOptionsWrapper.getDocument();o.removeKeyboardModeEvents(t,e)},t.prototype.onColumnEverythingChanged=function(){if(this.focusedCellPosition){var e=this.focusedCellPosition.column,t=this.columnModel.getGridColumn(e.getId());e!==t&&this.clearFocusedCell()}},t.prototype.isKeyboardMode=function(){return o.keyboardModeActive},t.prototype.getFocusCellToUseAfterRefresh=function(){var e=this.gridOptionsWrapper.getDocument();return this.gridOptionsWrapper.isSuppressFocusAfterRefresh()||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(e.activeElement,hl.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition},t.prototype.getFocusHeaderToUseAfterRefresh=function(){var e=this.gridOptionsWrapper.getDocument();return this.gridOptionsWrapper.isSuppressFocusAfterRefresh()||!this.focusedHeaderPosition||this.isDomDataMissingInHierarchy(e.activeElement,Fu.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition},t.prototype.isDomDataMissingInHierarchy=function(e,t){for(var o=e;o;){if(this.gridOptionsWrapper.getDomData(o,t))return!1;o=o.parentNode}return!0},t.prototype.clearFocusedCell=function(){this.focusedCellPosition=null,this.onCellFocused(!1,!1)},t.prototype.getFocusedCell=function(){return this.focusedCellPosition},t.prototype.setFocusedCell=function(e){var t=e.column,o=e.rowIndex,n=e.rowPinned,i=e.forceBrowserFocus,s=void 0!==i&&i,a=e.preventScrollOnBrowserFocus,l=void 0!==a&&a,u=this.columnModel.getGridColumn(t);u?(this.focusedCellPosition=u?{rowIndex:o,rowPinned:r(n),column:u}:null,this.onCellFocused(s,l)):this.focusedCellPosition=null},t.prototype.isCellFocused=function(e){return null!=this.focusedCellPosition&&this.focusedCellPosition.column===e.column&&this.isRowFocused(e.rowIndex,e.rowPinned)},t.prototype.isRowNodeFocused=function(e){return this.isRowFocused(e.rowIndex,e.rowPinned)},t.prototype.isHeaderWrapperFocused=function(e){if(null==this.focusedHeaderPosition)return!1;var t=e.getColumnGroupChild(),o=e.getRowIndex(),r=e.getPinned(),n=this.focusedHeaderPosition,i=n.column,s=n.headerRowIndex;return t===i&&o===s&&r==i.getPinned()},t.prototype.clearFocusedHeader=function(){this.focusedHeaderPosition=null},t.prototype.getFocusedHeader=function(){return this.focusedHeaderPosition},t.prototype.setFocusedHeader=function(e,t){this.focusedHeaderPosition={headerRowIndex:e,column:t}},t.prototype.focusHeaderPosition=function(e){var t=e.direction,o=e.fromTab,r=e.allowUserOverride,n=e.event,i=e.headerPosition;if(r){var s,a=this.gridOptionsWrapper,l=this.getFocusedHeader(),u=this.headerNavigationService.getHeaderRowCount();o?(s=a.getTabToNextHeaderFunc())&&(i=s({backwards:"Before"===t,previousHeaderPosition:l,nextHeaderPosition:i,headerRowCount:u})):(s=a.getNavigateToNextHeaderFunc())&&n&&(i=s({key:n.key,previousHeaderPosition:l,nextHeaderPosition:i,headerRowCount:u,event:n}))}return!!i&&(-1===i.headerRowIndex?this.focusGridView(i.column):(this.headerNavigationService.scrollToColumn(i.column,t),this.ctrlsService.getHeaderRowContainerCtrl(i.column.getPinned()).focusHeader(i.headerRowIndex,i.column,n)))},t.prototype.focusFirstHeader=function(){var e=this.columnModel.getAllDisplayedColumns()[0];return!!e&&(e.getParent()&&(e=this.columnModel.getColumnGroupAtLevel(e,0)),this.focusHeaderPosition({headerPosition:{headerRowIndex:0,column:e}}))},t.prototype.focusLastHeader=function(e){var t=this.headerNavigationService.getHeaderRowCount()-1,o=le(this.columnModel.getAllDisplayedColumns());return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:o},event:e})},t.prototype.isAnyCellFocused=function(){return!!this.focusedCellPosition},t.prototype.isRowFocused=function(e,t){return null!=this.focusedCellPosition&&this.focusedCellPosition.rowIndex===e&&this.focusedCellPosition.rowPinned===r(t)},t.prototype.findFocusableElements=function(e,t,o){void 0===o&&(o=!1);var r=oe.FOCUSABLE_SELECTOR,n=oe.FOCUSABLE_EXCLUDE;t&&(n+=", "+t),o&&(n+=', [tabindex="-1"]');var i,s=Array.prototype.slice.apply(e.querySelectorAll(r)),a=Array.prototype.slice.apply(e.querySelectorAll(n));return a.length?(i=a,s.filter((function(e){return-1===i.indexOf(e)}))):s},t.prototype.focusInto=function(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=!1);var r=this.findFocusableElements(e,null,o),n=t?le(r):r[0];return!!n&&(n.focus(),!0)},t.prototype.findNextFocusableElement=function(e,t,o){void 0===e&&(e=this.eGridDiv);var r=this.findFocusableElements(e,t?':not([tabindex="-1"])':null),n=this.gridOptionsWrapper.getDocument().activeElement,i=(t?r.findIndex((function(e){return e.contains(n)})):r.indexOf(n))+(o?-1:1);return i<0||i>=r.length?null:r[i]},t.prototype.isFocusUnderManagedComponent=function(e){var t=this.gridOptionsWrapper.getDocument(),o=e.querySelectorAll("."+In.FOCUS_MANAGED_CLASS);if(!o.length)return!1;for(var r=0;r<o.length;r++)if(o[r].contains(t.activeElement))return!0;return!1},t.prototype.findTabbableParent=function(e,t){void 0===t&&(t=5);for(var o=0;e&&null===Pt(e)&&++o<=t;)e=e.parentElement;return null===Pt(e)?null:e},t.prototype.onCellFocused=function(e,t){var o={type:We.EVENT_CELL_FOCUSED,forceBrowserFocus:e,preventScrollOnBrowserFocus:t,rowIndex:null,column:null,floating:null,rowPinned:null,isFullWidthCell:!1};if(this.focusedCellPosition){var r=o.rowIndex=this.focusedCellPosition.rowIndex,n=o.rowPinned=this.focusedCellPosition.rowPinned;o.column=this.focusedCellPosition.column;var i=this.rowRenderer.getRowByPosition({rowIndex:r,rowPinned:n});i&&(o.isFullWidthCell=i.isFullWidth())}this.eventService.dispatchEvent(o)},t.prototype.focusGridView=function(e,t){if(this.gridOptionsWrapper.isSuppressCellFocus())return t?this.focusLastHeader():this.focusNextGridCoreContainer(!1);var o=t?this.rowPositionUtils.getLastRow():this.rowPositionUtils.getFirstRow();if(!o)return!1;var n=o.rowIndex,i=o.rowPinned,s=this.getFocusedHeader();if(!e&&s&&(e=s.column),null==n||!e)return!1;if(this.navigationService.ensureCellVisible({rowIndex:n,column:e,rowPinned:i}),this.setFocusedCell({rowIndex:n,column:e,rowPinned:r(i),forceBrowserFocus:!0}),this.rangeService){var a={rowIndex:n,rowPinned:i,column:e};this.rangeService.setRangeToCell(a)}return!0},t.prototype.focusNextGridCoreContainer=function(e){return!!this.gridCtrl.focusNextInnerContainer(e)||(e||this.gridCtrl.isDetailGrid()||this.gridCtrl.forceFocusOutOfContainer(),!1)},t.AG_KEYBOARD_FOCUS="ag-keyboard-focus",t.keyboardModeActive=!1,t.instancesMonitored=new Map,Od([z("eGridDiv")],t.prototype,"eGridDiv",void 0),Od([z("columnModel")],t.prototype,"columnModel",void 0),Od([z("headerNavigationService")],t.prototype,"headerNavigationService",void 0),Od([z("rowRenderer")],t.prototype,"rowRenderer",void 0),Od([z("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),Od([K("rangeService")],t.prototype,"rangeService",void 0),Od([z("navigationService")],t.prototype,"navigationService",void 0),Od([z("ctrlsService")],t.prototype,"ctrlsService",void 0),Od([B],t.prototype,"init",null),o=Od([Y("focusService")],t)}(Ge),Ad=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Dd=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Id=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s};!function(e){e[e.vertical=0]="vertical",e[e.horizontal=1]="horizontal"}(Cc||(Cc={}));var Nd,xd=0,Md=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.popupList=[],t}var o;return Ad(t,e),o=t,t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){e.gridCtrl=t.gridCtrl,e.addManagedListener(e.gridCtrl,We.EVENT_KEYBOARD_FOCUS,(function(){e.popupList.forEach((function(e){return e.element.classList.add(Td.AG_KEYBOARD_FOCUS)}))})),e.addManagedListener(e.gridCtrl,We.EVENT_MOUSE_FOCUS,(function(){e.popupList.forEach((function(e){return e.element.classList.remove(Td.AG_KEYBOARD_FOCUS)}))}))}))},t.prototype.getPopupParent=function(){return this.gridOptionsWrapper.getPopupParent()||this.gridCtrl.getGui()},t.prototype.positionPopupForMenu=function(e){var t=e.eventSource.getBoundingClientRect(),o=this.getParentRect(),r=this.keepXYWithinBounds(e.ePopup,t.top-o.top,Cc.vertical),n=e.ePopup.clientWidth>0?e.ePopup.clientWidth:200;e.ePopup.style.minWidth=n+"px";var i,s=o.right-o.left-n;function a(){return t.right-o.left-2}function l(){return t.left-o.left-n}this.gridOptionsWrapper.isEnableRtl()?((i=l())<0&&(i=a()),i>s&&(i=0)):((i=a())>s&&(i=l()),i<0&&(i=0)),e.ePopup.style.left=i+"px",e.ePopup.style.top=r+"px"},t.prototype.positionPopupUnderMouseEvent=function(e){var t=e.ePopup,o=e.nudgeX,r=e.nudgeY,n=e.skipObserver,i=this.calculatePointerAlign(e.mouseEvent),s=i.x,a=i.y;this.positionPopup({ePopup:t,x:s,y:a,nudgeX:o,nudgeY:r,keepWithinBounds:!0,skipObserver:n}),this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)},t.prototype.calculatePointerAlign=function(e){var t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}},t.prototype.positionPopupUnderComponent=function(e){var t=e.eventSource.getBoundingClientRect(),o=e.alignSide||"left",r=this.getParentRect(),n=t.left-r.left;"right"===o&&(n-=e.ePopup.offsetWidth-t.width),this.positionPopup({ePopup:e.ePopup,nudgeX:e.nudgeX,nudgeY:e.nudgeY,x:n,y:t.top-r.top+t.height,keepWithinBounds:e.keepWithinBounds}),this.callPostProcessPopup(e.type,e.ePopup,e.eventSource,null,e.column,e.rowNode)},t.prototype.positionPopupOverComponent=function(e){var t=e.eventSource.getBoundingClientRect(),o=this.getParentRect();this.positionPopup({ePopup:e.ePopup,nudgeX:e.nudgeX,nudgeY:e.nudgeY,x:t.left-o.left,y:t.top-o.top,keepWithinBounds:e.keepWithinBounds}),this.callPostProcessPopup(e.type,e.ePopup,e.eventSource,null,e.column,e.rowNode)},t.prototype.callPostProcessPopup=function(e,t,o,r,n,i){var s=this.gridOptionsWrapper.getPostProcessPopupFunc();s&&s({column:n,rowNode:i,ePopup:t,type:e,eventSource:o,mouseEvent:r})},t.prototype.positionPopup=function(e){var t=this,r=e.x,n=e.y,i=e.ePopup,s=e.keepWithinBounds,a=e.nudgeX,l=e.nudgeY,u=e.skipObserver,p=r,c=n;a&&(p+=a),l&&(c+=l);var d=function(){s&&(p=t.keepXYWithinBounds(i,p,Cc.horizontal),c=t.keepXYWithinBounds(i,c,Cc.vertical)),i.style.left=p+"px",i.style.top=c+"px"};if(d(),!u){var h=this.resizeObserverService.observeResize(i,d);setTimeout((function(){return h()}),o.WAIT_FOR_POPUP_CONTENT_RESIZE)}},t.prototype.getActivePopups=function(){return this.popupList.map((function(e){return e.element}))},t.prototype.getPopupList=function(){return this.popupList},t.prototype.getParentRect=function(){var e=this.gridOptionsWrapper.getDocument(),t=this.getPopupParent();t===e.body?t=e.documentElement:"static"===getComputedStyle(t).position&&(t=t.offsetParent);var o=getComputedStyle(t),r=t.getBoundingClientRect();return{top:r.top+parseFloat(o.borderTopWidth)||0,left:r.left+parseFloat(o.borderLeftWidth)||0,right:r.right+parseFloat(o.borderRightWidth)||0,bottom:r.bottom+parseFloat(o.borderBottomWidth)||0}},t.prototype.keepXYWithinBounds=function(e,t,o){var r=o===Cc.vertical,n=r?"clientHeight":"clientWidth",i=r?"top":"left",s=r?"offsetHeight":"offsetWidth",a=r?"scrollTop":"scrollLeft",l=this.gridOptionsWrapper.getDocument(),u=l.documentElement,p=this.getPopupParent(),c=p.getBoundingClientRect(),d=l.documentElement.getBoundingClientRect(),h=p===l.body,f=e[s],g=h?(r?Po:To)(u)+u[a]:p[n];h&&(g-=Math.abs(d[i]-c[i]));var m=g-f;return Math.min(Math.max(t,0),Math.abs(m))},t.prototype.keepPopupPositionedRelativeTo=function(e){var t=this,o=this.getPopupParent(),r=o.getBoundingClientRect(),n=e.element.getBoundingClientRect(),i=r.top-n.top,s=r.left-n.left,a=i,l=s,u=e.ePopup.style.top,p=parseInt(u.substring(0,u.length-1),10),c=e.ePopup.style.left,d=parseInt(c.substring(0,c.length-1),10);return new sn((function(r){t.getFrameworkOverrides().setInterval((function(){var r=o.getBoundingClientRect(),n=e.element.getBoundingClientRect();if(0==n.top&&0==n.left&&0==n.height&&0==n.width)e.hidePopup();else{var u=r.top-n.top;if(u!=a){var c=t.keepXYWithinBounds(e.ePopup,p+i-u,Cc.vertical);e.ePopup.style.top=c+"px"}a=u;var h=r.left-n.left;if(h!=l){var f=t.keepXYWithinBounds(e.ePopup,d+s-h,Cc.horizontal);e.ePopup.style.left=f+"px"}l=h}}),200).then((function(e){r((function(){null!=e&&window.clearInterval(e)}))}))}))},t.prototype.addPopup=function(e){var t,o=this,r=e.modal,n=e.eChild,i=e.closeOnEsc,s=e.closedCallback,a=e.click,l=e.alwaysOnTop,u=e.afterGuiAttached,p=e.positionCallback,c=e.anchorToElement,d=e.ariaLabel,h=this.gridOptionsWrapper.getDocument(),f=new sn((function(e){return e((function(){}))}));if(!h)return console.warn("ag-grid: could not find the document, document is empty"),{hideFunc:function(){},stopAnchoringPromise:f};var g=this.popupList.findIndex((function(e){return e.element===n}));if(-1!==g){var m=this.popupList[g];return{hideFunc:m.hideFunc,stopAnchoringPromise:m.stopAnchoringPromise}}var y=this.getPopupParent();null==n.style.top&&(n.style.top="0px"),null==n.style.left&&(n.style.left="0px");var v=document.createElement("div"),C=this.environment.getTheme().allThemes;C.length&&(t=v.classList).add.apply(t,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Id(arguments[t]));return e}(C)),v.classList.add("ag-popup"),n.classList.add(this.gridOptionsWrapper.isEnableRtl()?"ag-rtl":"ag-ltr","ag-popup-child"),n.hasAttribute("role")||sr(n,"dialog"),pr(n,d),this.focusService.isKeyboardMode()&&n.classList.add(Td.AG_KEYBOARD_FOCUS),v.appendChild(n),y.appendChild(v),l?this.setAlwaysOnTop(v,!0):this.bringPopupToFront(v);var w=!1,E=function(e){v.contains(h.activeElement)&&e.key===jr.ESCAPE&&R({keyboardEvent:e})},_=function(e){return R({mouseEvent:e})},S=function(e){return R({touchEvent:e})},R=function(e){void 0===e&&(e={});var t=e.mouseEvent,r=e.touchEvent,i=e.keyboardEvent;o.isEventFromCurrentPopup({mouseEvent:t,touchEvent:r},n)||o.isEventSameChainAsOriginalEvent({originalMouseEvent:a,mouseEvent:t,touchEvent:r})||w||(w=!0,y.removeChild(v),h.removeEventListener("keydown",E),h.removeEventListener("mousedown",_),h.removeEventListener("touchstart",S),h.removeEventListener("contextmenu",_),o.eventService.removeEventListener(We.EVENT_DRAG_STARTED,_),s&&s(t||r||i),o.popupList=o.popupList.filter((function(e){return e.element!==n})),f&&f.then((function(e){return e&&e()})))};return u&&u({hidePopup:R}),window.setTimeout((function(){i&&h.addEventListener("keydown",E),r&&(h.addEventListener("mousedown",_),o.eventService.addEventListener(We.EVENT_DRAG_STARTED,_),h.addEventListener("touchstart",S),h.addEventListener("contextmenu",_))}),0),p&&p(),c&&(f=this.keepPopupPositionedRelativeTo({element:c,ePopup:n,hidePopup:R})),this.popupList.push({element:n,wrapper:v,hideFunc:R,stopAnchoringPromise:f,instanceId:xd++,isAnchored:!!c}),{hideFunc:R,stopAnchoringPromise:f}},t.prototype.hasAnchoredPopup=function(){return this.popupList.some((function(e){return e.isAnchored}))},t.prototype.isEventFromCurrentPopup=function(e,t){var o=e.mouseEvent,r=e.touchEvent,n=o||r;if(!n)return!1;var i=this.popupList.findIndex((function(e){return e.element===t}));if(-1===i)return!1;for(var s=i;s<this.popupList.length;s++)if(De(this.popupList[s].element,n))return!0;return this.isElementWithinCustomPopup(n.target)},t.prototype.isElementWithinCustomPopup=function(e){for(var t=this.gridOptionsWrapper.getDocument();e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||null===e.parentElement)return!0;e=e.parentElement}return!1},t.prototype.isEventSameChainAsOriginalEvent=function(e){var t=e.originalMouseEvent,o=e.mouseEvent,r=e.touchEvent,n=null;if(o?n=o:r&&(n=r.touches[0]),n&&t){var i=o?o.screenX:0,s=o?o.screenY:0,a=Math.abs(t.screenX-i)<5,l=Math.abs(t.screenY-s)<5;if(a&&l)return!0}return!1},t.prototype.getWrapper=function(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null},t.prototype.setAlwaysOnTop=function(e,t){var o=this.getWrapper(e);o&&(o.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(o))},t.prototype.bringPopupToFront=function(e){var t=this.getPopupParent(),o=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),r=o.length,n=Array.prototype.slice.call(t.querySelectorAll(".ag-popup.ag-always-on-top")),i=n.length,s=this.getWrapper(e);if(s&&!(r<=1)&&t.contains(e)){var a=o.indexOf(s),l=s.querySelectorAll("div"),u=[];for(l.forEach((function(e){0!==e.scrollTop&&u.push([e,e.scrollTop])})),i?s.classList.contains("ag-always-on-top")?a!==r-1&&le(n).insertAdjacentElement("afterend",s):a!==r-i-1&&n[0].insertAdjacentElement("beforebegin",s):a!==r-1&&le(o).insertAdjacentElement("afterend",s);u.length;){var p=u.pop();p[0].scrollTop=p[1]}var c={type:"popupToFront",api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),eWrapper:s};this.eventService.dispatchEvent(c)}},t.WAIT_FOR_POPUP_CONTENT_RESIZE=200,Dd([z("environment")],t.prototype,"environment",void 0),Dd([z("focusService")],t.prototype,"focusService",void 0),Dd([z("ctrlsService")],t.prototype,"ctrlsService",void 0),Dd([z("resizeObserverService")],t.prototype,"resizeObserverService",void 0),Dd([z("gridOptionsWrapper")],t.prototype,"gridOptionsWrapper",void 0),Dd([B],t.prototype,"postConstruct",null),o=Dd([Y("popupService")],t)}(Ge),Ld=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Fd=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Gd=function(e){function t(o,r,n){void 0===o&&(o="default"),void 0===r&&(r="listbox");var i=e.call(this,t.getTemplate(o))||this;return i.cssIdentifier=o,i.ariaRole=r,i.listName=n,i.renderedRows=new Map,i.rowHeight=20,i}return Ld(t,e),t.prototype.postConstruct=function(){var e=this;this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:function(t){return e.onFocusIn(t)},onFocusOut:function(t){return e.onFocusOut(t)},focusInnerElement:function(t){return e.focusInnerElement(t)},onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)}}),this.setAriaProperties()},t.prototype.setAriaProperties=function(){var e=this.gridOptionsWrapper.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),t=this.eContainer;sr(t,this.ariaRole),pr(t,e)},t.prototype.addResizeObserver=function(){var e=this.drawVirtualRows.bind(this),t=this.resizeObserverService.observeResize(this.getGui(),e);this.addDestroyFunc(t)},t.prototype.focusInnerElement=function(e){this.focusRow(e?this.model.getRowCount()-1:0)},t.prototype.onFocusIn=function(e){var t=e.target;return t.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=ur(t)-1),!1},t.prototype.onFocusOut=function(e){return this.getFocusableElement().contains(e.relatedTarget)||(this.lastFocusedRowIndex=null),!1},t.prototype.handleKeyDown=function(e){switch(e.key){case jr.UP:case jr.DOWN:this.navigate(e.key===jr.UP)&&e.preventDefault()}},t.prototype.onTabKeyDown=function(e){this.navigate(e.shiftKey)?e.preventDefault():this.focusService.focusInto(this.getGui(),!e.shiftKey)},t.prototype.navigate=function(e){if(null==this.lastFocusedRowIndex)return!1;var t=this.lastFocusedRowIndex+(e?-1:1);return!(t<0||t>=this.model.getRowCount()||(this.focusRow(t),0))},t.prototype.getLastFocusedRow=function(){return this.lastFocusedRowIndex},t.prototype.focusRow=function(e){var t=this;this.ensureIndexVisible(e),window.setTimeout((function(){if(t.isAlive()){var o=t.renderedRows.get(e);o&&o.eDiv.focus()}}),10)},t.prototype.getComponentAt=function(e){var t=this.renderedRows.get(e);return t&&t.rowComponent},t.prototype.forEachRenderedRow=function(e){this.renderedRows.forEach((function(t,o){return e(t.rowComponent,o)}))},t.getTemplate=function(e){return'\n <div class="ag-virtual-list-viewport ag-'+e+'-virtual-list-viewport" role="presentation">\n <div class="ag-virtual-list-container ag-'+e+'-virtual-list-container" ref="eContainer"></div>\n </div>'},t.prototype.getItemHeight=function(){return this.gridOptionsWrapper.getListItemHeight()},t.prototype.ensureIndexVisible=function(e){var t=this.model.getRowCount();if("number"!=typeof e||e<0||e>=t)console.warn("AG Grid: invalid row index for ensureIndexVisible: "+e);else{var o=e*this.rowHeight,r=o+this.rowHeight,n=this.getGui(),i=n.scrollTop,s=n.offsetHeight,a=i+s<r;if(i>o)n.scrollTop=o;else if(a){var l=r-s;n.scrollTop=l}}},t.prototype.setComponentCreator=function(e){this.componentCreator=e},t.prototype.getRowHeight=function(){return this.rowHeight},t.prototype.getScrollTop=function(){return this.getGui().scrollTop},t.prototype.setRowHeight=function(e){this.rowHeight=e,this.refresh()},t.prototype.refresh=function(){var e=this;if(null!=this.model&&this.isAlive()){var t=this.model.getRowCount();this.eContainer.style.height=t*this.rowHeight+"px",k((function(){return e.eContainer.clientHeight>=t*e.rowHeight}),(function(){e.isAlive()&&(e.clearVirtualRows(),e.drawVirtualRows())}))}},t.prototype.clearVirtualRows=function(){var e=this;this.renderedRows.forEach((function(t,o){return e.removeRow(o)}))},t.prototype.drawVirtualRows=function(){if(this.isAlive()){var e=this.getGui(),t=e.scrollTop,o=t+e.offsetHeight,r=Math.floor(t/this.rowHeight),n=Math.floor(o/this.rowHeight);this.ensureRowsRendered(r,n)}},t.prototype.ensureRowsRendered=function(e,t){var o=this;this.renderedRows.forEach((function(r,n){(n<e||n>t)&&n!==o.lastFocusedRowIndex&&o.removeRow(n)}));for(var r=e;r<=t;r++)this.renderedRows.has(r)||r<this.model.getRowCount()&&this.insertRow(r)},t.prototype.insertRow=function(e){var t=this,o=this.model.getRow(e),r=document.createElement("div");if(r.classList.add("ag-virtual-list-item","ag-"+this.cssIdentifier+"-virtual-list-item"),sr(r,"tree"===this.ariaRole?"treeitem":"option"),Cr(r,this.model.getRowCount()),wr(r,e+1),r.setAttribute("tabindex","-1"),"function"==typeof this.model.isRowSelected){var n=this.model.isRowSelected(e);Ar(r,!!n),Dr(r,n)}r.style.height=this.rowHeight+"px",r.style.top=this.rowHeight*e+"px";var i=this.componentCreator(o,r);i.addGuiEventListener("focusin",(function(){return t.lastFocusedRowIndex=e})),r.appendChild(i.getGui()),this.renderedRows.has(e-1)?this.renderedRows.get(e-1).eDiv.insertAdjacentElement("afterend",r):this.renderedRows.has(e+1)?this.renderedRows.get(e+1).eDiv.insertAdjacentElement("beforebegin",r):this.eContainer.appendChild(r),this.renderedRows.set(e,{rowComponent:i,eDiv:r})},t.prototype.removeRow=function(e){var t=this.renderedRows.get(e);this.eContainer.removeChild(t.eDiv),this.destroyBean(t.rowComponent),this.renderedRows.delete(e)},t.prototype.addScrollListener=function(){var e=this;this.addGuiEventListener("scroll",(function(){return e.drawVirtualRows()}))},t.prototype.setModel=function(e){this.model=e},t.prototype.destroy=function(){this.isAlive()&&(this.clearVirtualRows(),e.prototype.destroy.call(this))},Fd([z("resizeObserverService")],t.prototype,"resizeObserverService",void 0),Fd([z("focusService")],t.prototype,"focusService",void 0),Fd([vn("eContainer")],t.prototype,"eContainer",void 0),Fd([B],t.prototype,"postConstruct",null),t}(gd),kd=["mouseover","mouseout","mouseenter","mouseleave"],Vd=["touchstart","touchend","touchmove","touchcancel"],Hd=function(){function e(){this.isOutsideAngular=function(e){return ge(kd,e)}}return e.prototype.setTimeout=function(e,t){window.setTimeout(e,t)},e.prototype.setInterval=function(e,t){return new sn((function(o){o(window.setInterval(e,t))}))},e.prototype.addEventListener=function(e,t,o,r){var n=ge(Vd,t);e.addEventListener(t,o,{capture:!!r,passive:n})},e.prototype.dispatchEvent=function(e,t,o){t()},e.prototype.frameworkComponent=function(e){return null},e.prototype.isFrameworkComponent=function(e){return!1},e}(),Wd=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),jd=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Bd=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s},Ud=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wd(t,e),t.prototype.getNextCellToFocus=function(e,t,o){return void 0===o&&(o=!1),o?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)},t.prototype.getNextCellToFocusWithCtrlPressed=function(e,t){var o,r,n=e===jr.UP,i=e===jr.DOWN,s=e===jr.LEFT;if(n||i)r=n?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow(),o=t.column;else{var a=this.columnModel.getAllDisplayedColumns(),l=this.gridOptionsWrapper.isEnableRtl();r=t.rowIndex,o=s!==l?a[0]:le(a)}return{rowIndex:r,rowPinned:null,column:o}},t.prototype.getNextCellToFocusWithoutCtrlPressed=function(e,t){for(var o=t,r=!1;!r;){switch(e){case jr.UP:o=this.getCellAbove(o);break;case jr.DOWN:o=this.getCellBelow(o);break;case jr.RIGHT:o=this.gridOptionsWrapper.isEnableRtl()?this.getCellToLeft(o):this.getCellToRight(o);break;case jr.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},t.prototype.isCellGoodToFocusOn=function(e){var t,o=e.column;switch(e.rowPinned){case oe.PINNED_TOP:t=this.pinnedRowModel.getPinnedTopRow(e.rowIndex);break;case oe.PINNED_BOTTOM:t=this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);break;default:t=this.rowModel.getRow(e.rowIndex)}return!!t&&!o.isSuppressNavigable(t)},t.prototype.getCellToLeft=function(e){if(!e)return null;var t=this.columnModel.getDisplayedColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null},t.prototype.getCellToRight=function(e){if(!e)return null;var t=this.columnModel.getDisplayedColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null},t.prototype.getRowBelow=function(e){var t=e.rowIndex,o=e.rowPinned;if(this.isLastRowInContainer(e))switch(o){case oe.PINNED_BOTTOM:return null;case oe.PINNED_TOP:return this.rowModel.isRowsToRender()?{rowIndex:this.paginationProxy.getPageFirstRow(),rowPinned:null}:this.pinnedRowModel.isRowsToRender(oe.PINNED_BOTTOM)?{rowIndex:0,rowPinned:oe.PINNED_BOTTOM}:null;default:return this.pinnedRowModel.isRowsToRender(oe.PINNED_BOTTOM)?{rowIndex:0,rowPinned:oe.PINNED_BOTTOM}:null}var r=this.rowModel.getRow(e.rowIndex);return this.getNextStickyPosition(r)||{rowIndex:t+1,rowPinned:o}},t.prototype.getNextStickyPosition=function(e,t){if(this.gridOptionsWrapper.isGroupRowsSticky()&&e&&e.sticky){var o=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Bd(arguments[t]));return e}(this.rowRenderer.getStickyTopRowCtrls()).sort((function(e,t){return e.getRowNode().rowIndex-t.getRowNode().rowIndex})),r=t?-1:1,n=o.findIndex((function(t){return t.getRowNode().rowIndex===e.rowIndex})),i=o[n+r];return i?{rowIndex:i.getRowNode().rowIndex,rowPinned:null}:void 0}},t.prototype.getCellBelow=function(e){if(!e)return null;var t=this.getRowBelow(e);return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null},t.prototype.isLastRowInContainer=function(e){var t=e.rowPinned,o=e.rowIndex;return t===oe.PINNED_TOP?this.pinnedRowModel.getPinnedTopRowData().length-1<=o:t===oe.PINNED_BOTTOM?this.pinnedRowModel.getPinnedBottomRowData().length-1<=o:this.paginationProxy.getPageLastRow()<=o},t.prototype.getRowAbove=function(e){var t=e.rowIndex,o=e.rowPinned;if(o?0===t:t===this.paginationProxy.getPageFirstRow())return o===oe.PINNED_TOP?null:o&&this.rowModel.isRowsToRender()?this.getLastBodyCell():this.pinnedRowModel.isRowsToRender(oe.PINNED_TOP)?this.getLastFloatingTopRow():null;var r=this.rowModel.getRow(e.rowIndex);return this.getNextStickyPosition(r,!0)||{rowIndex:t-1,rowPinned:o}},t.prototype.getCellAbove=function(e){if(!e)return null;var t=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null},t.prototype.getLastBodyCell=function(){return{rowIndex:this.paginationProxy.getPageLastRow(),rowPinned:null}},t.prototype.getLastFloatingTopRow=function(){return{rowIndex:this.pinnedRowModel.getPinnedTopRowData().length-1,rowPinned:oe.PINNED_TOP}},t.prototype.getNextTabbedCell=function(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)},t.prototype.getNextTabbedCellForwards=function(e){var t=this.columnModel.getAllDisplayedColumns(),o=e.rowIndex,r=e.rowPinned,n=this.columnModel.getDisplayedColAfter(e.column);if(!n){n=t[0];var s=this.getRowBelow(e);if(i(s))return null;if(!s.rowPinned&&!this.paginationProxy.isRowInPage(s))return null;o=s?s.rowIndex:null,r=s?s.rowPinned:null}return{rowIndex:o,column:n,rowPinned:r}},t.prototype.getNextTabbedCellBackwards=function(e){var t=this.columnModel.getAllDisplayedColumns(),o=e.rowIndex,r=e.rowPinned,n=this.columnModel.getDisplayedColBefore(e.column);if(!n){n=le(t);var s=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(i(s))return null;if(!s.rowPinned&&!this.paginationProxy.isRowInPage(s))return null;o=s?s.rowIndex:null,r=s?s.rowPinned:null}return{rowIndex:o,column:n,rowPinned:r}},jd([z("columnModel")],t.prototype,"columnModel",void 0),jd([z("rowModel")],t.prototype,"rowModel",void 0),jd([z("rowRenderer")],t.prototype,"rowRenderer",void 0),jd([z("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),jd([z("paginationProxy")],t.prototype,"paginationProxy",void 0),jd([Y("cellNavigationService")],t)}(Ge),Yd=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),zd=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Kd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.consuming=!1,t}return Yd(t,e),t.prototype.setBeans=function(e){this.logger=e.create("AlignedGridsService")},t.prototype.init=function(){this.addManagedListener(this.eventService,We.EVENT_COLUMN_MOVED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,We.EVENT_COLUMN_VISIBLE,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,We.EVENT_COLUMN_PINNED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,We.EVENT_COLUMN_GROUP_OPENED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,We.EVENT_COLUMN_RESIZED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,We.EVENT_BODY_SCROLL,this.fireScrollEvent.bind(this))},t.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)}}))}},t.prototype.onEvent=function(e){this.consuming=!0,e(),this.consuming=!1},t.prototype.fireColumnEvent=function(e){this.fireEvent((function(t){t.onColumnEvent(e)}))},t.prototype.fireScrollEvent=function(e){"horizontal"===e.direction&&this.fireEvent((function(t){t.onScrollEvent(e)}))},t.prototype.onScrollEvent=function(e){var t=this;this.onEvent((function(){t.ctrlsService.getGridBodyCtrl().getScrollFeature().setHorizontalScrollPosition(e.left)}))},t.prototype.getMasterColumns=function(e){var t=[];return e.columns?e.columns.forEach((function(e){t.push(e)})):e.column&&t.push(e.column),t},t.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},t.prototype.onColumnEvent=function(e){var t=this;this.onEvent((function(){switch(e.type){case We.EVENT_COLUMN_MOVED:case We.EVENT_COLUMN_VISIBLE:case We.EVENT_COLUMN_PINNED:case We.EVENT_COLUMN_RESIZED:var o=e;t.processColumnEvent(o);break;case We.EVENT_COLUMN_GROUP_OPENED:var r=e;t.processGroupOpenedEvent(r);break;case We.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.")}}))},t.prototype.processGroupOpenedEvent=function(e){var t=e.columnGroup,o=null;if(t){var r=t.getGroupId();o=this.columnModel.getProvidedColumnGroup(r)}t&&!o||(this.logger.log("onColumnEvent-> processing "+e+" expanded = "+t.isExpanded()),this.columnModel.setColumnGroupOpened(o,t.isExpanded(),"alignedGridChanged"))},t.prototype.processColumnEvent=function(e){var t,o=this,r=e.column,n=null;if(r&&(n=this.columnModel.getPrimaryColumn(r.getColId())),!r||n){var i=this.getMasterColumns(e);switch(e.type){case We.EVENT_COLUMN_MOVED:var s=e,a=e.columnApi.getColumnState().map((function(e){return{colId:e.colId}}));this.columnModel.applyColumnState({state:a,applyOrder:!0},"alignedGridChanged"),this.logger.log("onColumnEvent-> processing "+e.type+" toIndex = "+s.toIndex);break;case We.EVENT_COLUMN_VISIBLE:var l=e;a=e.columnApi.getColumnState().map((function(e){return{colId:e.colId,hide:e.hide}})),this.columnModel.applyColumnState({state:a},"alignedGridChanged"),this.logger.log("onColumnEvent-> processing "+e.type+" visible = "+l.visible);break;case We.EVENT_COLUMN_PINNED:var u=e;a=e.columnApi.getColumnState().map((function(e){return{colId:e.colId,pinned:e.pinned}})),this.columnModel.applyColumnState({state:a},"alignedGridChanged"),this.logger.log("onColumnEvent-> processing "+e.type+" pinned = "+u.pinned);break;case We.EVENT_COLUMN_RESIZED:var p=e,c={};i.forEach((function(t){o.logger.log("onColumnEvent-> processing "+e.type+" actualWidth = "+t.getActualWidth()),c[t.getId()]={key:t.getColId(),newWidth:t.getActualWidth()}})),null===(t=p.flexColumns)||void 0===t||t.forEach((function(e){c[e.getId()]&&delete c[e.getId()]})),this.columnModel.setColumnWidths(Object.values(c),!1,p.finished,"alignedGridChanged")}var d=this.ctrlsService.getGridBodyCtrl().isVerticalScrollShowing(),h=this.gridOptionsWrapper.getAlignedGrids();h&&h.forEach((function(e){e.api&&e.api.setAlwaysShowVerticalScroll(d)}))}},zd([z("columnModel")],t.prototype,"columnModel",void 0),zd([z("ctrlsService")],t.prototype,"ctrlsService",void 0),zd([(o=0,r=q("loggerFactory"),function(e,t){r(e,t,o)})],t.prototype,"setBeans",null),zd([B],t.prototype,"init",null),zd([Y("alignedGridsService")],t);var o,r}(Ge),$d=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),qd=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Zd=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(t,e),t.prototype.setBeans=function(e){this.logger=e.create("selectionService"),this.reset()},t.prototype.init=function(){this.groupSelectsChildren=this.gridOptionsWrapper.isGroupSelectsChildren(),this.addManagedListener(this.eventService,We.EVENT_ROW_SELECTED,this.onRowSelected.bind(this))},t.prototype.setLastSelectedNode=function(e){this.lastSelectedNode=e},t.prototype.getLastSelectedNode=function(){return this.lastSelectedNode},t.prototype.getSelectedNodes=function(){var e=[];return f(this.selectedNodes,(function(t,o){o&&e.push(o)})),e},t.prototype.getSelectedRows=function(){var e=[];return f(this.selectedNodes,(function(t,o){o&&o.data&&e.push(o.data)})),e},t.prototype.removeGroupsFromSelection=function(){var e=this;f(this.selectedNodes,(function(t,o){o&&o.group&&(e.selectedNodes[o.id]=void 0)}))},t.prototype.updateGroupsFromChildrenSelections=function(e){if(this.gridOptionsWrapper.isGroupSelectsChildren()&&this.rowModel.getType()===oe.ROW_MODEL_TYPE_CLIENT_SIDE){var t=this.rowModel.getRootNode();e||(e=new wc(!0,t)).setInactive(),e.forEachChangedNodeDepthFirst((function(e){if(e!==t){var o=e.calculateSelectedFromChildren();e.selectThisNode(null!==o&&o)}}))}},t.prototype.getNodeForIdIfSelected=function(e){return this.selectedNodes[e]},t.prototype.clearOtherNodes=function(e){var t=this,o={},r=0;return f(this.selectedNodes,(function(n,i){if(i&&i.id!==e.id){var s=t.selectedNodes[i.id];r+=s.setSelectedParams({newValue:!1,clearSelection:!1,suppressFinishActions:!0}),t.groupSelectsChildren&&i.parent&&(o[i.parent.id]=i.parent)}})),f(o,(function(e,t){var o=t.calculateSelectedFromChildren();t.selectThisNode(null!==o&&o)})),r},t.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)},t.prototype.syncInRowNode=function(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)},t.prototype.syncInOldRowNode=function(e,t){if(n(t)&&e.id!==t.id&&t){var o=t.id;this.selectedNodes[o]==e&&(this.selectedNodes[t.id]=t)}},t.prototype.syncInNewRowNode=function(e){n(this.selectedNodes[e.id])?(e.setSelectedInitialValue(!0),this.selectedNodes[e.id]=e):e.setSelectedInitialValue(!1)},t.prototype.reset=function(){this.logger.log("reset"),this.selectedNodes={},this.lastSelectedNode=null},t.prototype.getBestCostNodeSelection=function(){if(this.rowModel.getType()===oe.ROW_MODEL_TYPE_CLIENT_SIDE){var e=this.rowModel.getTopLevelNodes();if(null!==e){var t=[];return function e(o){for(var r=0,n=o.length;r<n;r++){var i=o[r];if(i.isSelected())t.push(i);else{var s=i;s.group&&s.children&&e(s.children)}}}(e),t}console.warn("AG Grid: `selectAll` not available doing `rowModel=virtual`")}else console.warn("AG Grid: `getBestCostNodeSelection` is only available when using normal row model")},t.prototype.setRowModel=function(e){this.rowModel=e},t.prototype.isEmpty=function(){var e=0;return f(this.selectedNodes,(function(t,o){o&&e++})),0===e},t.prototype.deselectAllRowNodes=function(e){void 0===e&&(e=!1);var t=function(e){return e.selectThisNode(!1)},o=this.rowModel.getType()===oe.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 f(this.selectedNodes,(function(e,o){o&&t(o)})),this.reset();o&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections();var r={type:We.EVENT_SELECTION_CHANGED};this.eventService.dispatchEvent(r)},t.prototype.selectAllRowNodes=function(e){if(void 0===e&&(e=!1),this.rowModel.getType()!==oe.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()===oe.ROW_MODEL_TYPE_CLIENT_SIDE&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections();var r={type:We.EVENT_SELECTION_CHANGED};this.eventService.dispatchEvent(r)},t.prototype.selectNode=function(e,t){e&&e.setSelectedParams({newValue:!0,clearSelection:!t})},t.prototype.deselectIndex=function(e){var t=this.rowModel.getRow(e);this.deselectNode(t)},t.prototype.deselectNode=function(e){e&&e.setSelectedParams({newValue:!1,clearSelection:!1})},t.prototype.selectIndex=function(e,t){var o=this.rowModel.getRow(e);this.selectNode(o,t)},qd([z("rowModel")],t.prototype,"rowModel",void 0),qd([(o=0,r=q("loggerFactory"),function(e,t){r(e,t,o)})],t.prototype,"setBeans",null),qd([B],t.prototype,"init",null),qd([Y("selectionService")],t);var o,r}(Ge),Xd=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Qd=function(){function e(){}return e.prototype.sizeColumnsToFit=function(e){void 0===e&&console.error("AG Grid: missing parameter to columnApi.sizeColumnsToFit(gridWidth)"),this.columnModel.sizeColumnsToFit(e,"api")},e.prototype.setColumnGroupOpened=function(e,t){this.columnModel.setColumnGroupOpened(e,t,"api")},e.prototype.getColumnGroup=function(e,t){return this.columnModel.getColumnGroup(e,t)},e.prototype.getProvidedColumnGroup=function(e){return this.columnModel.getProvidedColumnGroup(e)},e.prototype.getDisplayNameForColumn=function(e,t){return this.columnModel.getDisplayNameForColumn(e,t)||""},e.prototype.getDisplayNameForColumnGroup=function(e,t){return this.columnModel.getDisplayNameForColumnGroup(e,t)||""},e.prototype.getColumn=function(e){return this.columnModel.getPrimaryColumn(e)},e.prototype.getColumns=function(){return this.columnModel.getAllPrimaryColumns()},e.prototype.applyColumnState=function(e){return this.columnModel.applyColumnState(e,"api")},e.prototype.getColumnState=function(){return this.columnModel.getColumnState()},e.prototype.resetColumnState=function(){this.columnModel.resetColumnState("api")},e.prototype.getColumnGroupState=function(){return this.columnModel.getColumnGroupState()},e.prototype.setColumnGroupState=function(e){this.columnModel.setColumnGroupState(e,"api")},e.prototype.resetColumnGroupState=function(){this.columnModel.resetColumnGroupState("api")},e.prototype.isPinning=function(){return this.columnModel.isPinningLeft()||this.columnModel.isPinningRight()},e.prototype.isPinningLeft=function(){return this.columnModel.isPinningLeft()},e.prototype.isPinningRight=function(){return this.columnModel.isPinningRight()},e.prototype.getDisplayedColAfter=function(e){return this.columnModel.getDisplayedColAfter(e)},e.prototype.getDisplayedColBefore=function(e){return this.columnModel.getDisplayedColBefore(e)},e.prototype.setColumnVisible=function(e,t){this.columnModel.setColumnVisible(e,t,"api")},e.prototype.setColumnsVisible=function(e,t){this.columnModel.setColumnsVisible(e,t,"api")},e.prototype.setColumnPinned=function(e,t){this.columnModel.setColumnPinned(e,t,"api")},e.prototype.setColumnsPinned=function(e,t){this.columnModel.setColumnsPinned(e,t,"api")},e.prototype.getAllGridColumns=function(){return this.columnModel.getAllGridColumns()},e.prototype.getDisplayedLeftColumns=function(){return this.columnModel.getDisplayedLeftColumns()},e.prototype.getDisplayedCenterColumns=function(){return this.columnModel.getDisplayedCenterColumns()},e.prototype.getDisplayedRightColumns=function(){return this.columnModel.getDisplayedRightColumns()},e.prototype.getAllDisplayedColumns=function(){return this.columnModel.getAllDisplayedColumns()},e.prototype.getAllDisplayedVirtualColumns=function(){return this.columnModel.getViewportColumns()},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.columnModel.moveColumnByIndex(e,t,"api")):this.columnModel.moveColumn(e,t,"api")},e.prototype.moveColumnByIndex=function(e,t){this.columnModel.moveColumnByIndex(e,t,"api")},e.prototype.moveColumns=function(e,t){this.columnModel.moveColumns(e,t,"api")},e.prototype.moveRowGroupColumn=function(e,t){this.columnModel.moveRowGroupColumn(e,t)},e.prototype.setColumnAggFunc=function(e,t){this.columnModel.setColumnAggFunc(e,t)},e.prototype.setColumnWidth=function(e,t,o,r){void 0===o&&(o=!0),this.columnModel.setColumnWidths([{key:e,newWidth:t}],!1,o,r)},e.prototype.setColumnWidths=function(e,t,o){void 0===t&&(t=!0),this.columnModel.setColumnWidths(e,!1,t,o)},e.prototype.setPivotMode=function(e){this.columnModel.setPivotMode(e)},e.prototype.isPivotMode=function(){return this.columnModel.isPivotMode()},e.prototype.getSecondaryPivotColumn=function(e,t){return console.warn("AG Grid: since version 28.0.x getSecondaryPivotColumn has been renamed, please use getPivotResultColumn instead"),this.getPivotResultColumn(e,t)},e.prototype.getPivotResultColumn=function(e,t){return this.columnModel.getSecondaryPivotColumn(e,t)},e.prototype.setValueColumns=function(e){this.columnModel.setValueColumns(e,"api")},e.prototype.getValueColumns=function(){return this.columnModel.getValueColumns()},e.prototype.removeValueColumn=function(e){this.columnModel.removeValueColumn(e,"api")},e.prototype.removeValueColumns=function(e){this.columnModel.removeValueColumns(e,"api")},e.prototype.addValueColumn=function(e){this.columnModel.addValueColumn(e,"api")},e.prototype.addValueColumns=function(e){this.columnModel.addValueColumns(e,"api")},e.prototype.setRowGroupColumns=function(e){this.columnModel.setRowGroupColumns(e,"api")},e.prototype.removeRowGroupColumn=function(e){this.columnModel.removeRowGroupColumn(e,"api")},e.prototype.removeRowGroupColumns=function(e){this.columnModel.removeRowGroupColumns(e,"api")},e.prototype.addRowGroupColumn=function(e){this.columnModel.addRowGroupColumn(e,"api")},e.prototype.addRowGroupColumns=function(e){this.columnModel.addRowGroupColumns(e,"api")},e.prototype.getRowGroupColumns=function(){return this.columnModel.getRowGroupColumns()},e.prototype.setPivotColumns=function(e){this.columnModel.setPivotColumns(e,"api")},e.prototype.removePivotColumn=function(e){this.columnModel.removePivotColumn(e,"api")},e.prototype.removePivotColumns=function(e){this.columnModel.removePivotColumns(e,"api")},e.prototype.addPivotColumn=function(e){this.columnModel.addPivotColumn(e,"api")},e.prototype.addPivotColumns=function(e){this.columnModel.addPivotColumns(e,"api")},e.prototype.getPivotColumns=function(){return this.columnModel.getPivotColumns()},e.prototype.getLeftDisplayedColumnGroups=function(){return this.columnModel.getDisplayedTreeLeft()},e.prototype.getCenterDisplayedColumnGroups=function(){return this.columnModel.getDisplayedTreeCentre()},e.prototype.getRightDisplayedColumnGroups=function(){return this.columnModel.getDisplayedTreeRight()},e.prototype.getAllDisplayedColumnGroups=function(){return this.columnModel.getAllDisplayedTrees()},e.prototype.autoSizeColumn=function(e,t){return this.columnModel.autoSizeColumn(e,t,"api")},e.prototype.autoSizeColumns=function(e,t){this.columnModel.autoSizeColumns({columns:e,skipHeader:t})},e.prototype.autoSizeAllColumns=function(e){this.columnModel.autoSizeAllColumns(e,"api")},e.prototype.setSecondaryColumns=function(e){console.warn("AG Grid: since version 28.0.x setSecondaryColumns has been renamed, please use setPivotResultColumns instead"),this.setPivotResultColumns(e)},e.prototype.setPivotResultColumns=function(e){this.columnModel.setSecondaryColumns(e,"api")},e.prototype.getSecondaryColumns=function(){return console.warn("AG Grid: since version 28.0.x getSecondaryColumns has been renamed, please use getPivotResultColumns instead"),this.getPivotResultColumns()},e.prototype.getPivotResultColumns=function(){return this.columnModel.getSecondaryColumns()},e.prototype.getPrimaryColumns=function(){return console.warn("AG Grid: since version 28.0.x getPrimaryColumns has been renamed, please use getColumns instead"),this.getColumns()},e.prototype.cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid=function(){setTimeout(on.removeAllReferences.bind(window,this,"Column API"),100)},e.prototype.getAllColumns=function(){return console.warn("AG Grid: since version 28.0.x getAllColumns has been renamed, please use getColumns instead"),this.getColumns()},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.columnModel.setColumnsVisible(e,!t,"api")},e.prototype.hideColumn=function(e,t){console.error("AG Grid: hideColumn is deprecated, use setColumnVisible"),this.columnModel.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.columnModel.getValueColumns()},e.prototype.removeAggregationColumn=function(e){console.error("AG Grid: removeAggregationColumn is deprecated, use removeValueColumn"),this.columnModel.removeValueColumn(e,"api")},e.prototype.removeAggregationColumns=function(e){console.error("AG Grid: removeAggregationColumns is deprecated, use removeValueColumns"),this.columnModel.removeValueColumns(e,"api")},e.prototype.addAggregationColumn=function(e){console.error("AG Grid: addAggregationColumn is deprecated, use addValueColumn"),this.columnModel.addValueColumn(e,"api")},e.prototype.addAggregationColumns=function(e){console.error("AG Grid: addAggregationColumns is deprecated, use addValueColumns"),this.columnModel.addValueColumns(e,"api")},e.prototype.setColumnAggFunction=function(e,t){console.error("AG Grid: setColumnAggFunction is deprecated, use setColumnAggFunc"),this.columnModel.setColumnAggFunc(e,t,"api")},e.prototype.getDisplayNameForCol=function(e){return console.error("AG Grid: getDisplayNameForCol is deprecated, use getDisplayNameForColumn"),this.getDisplayNameForColumn(e,null)},e.prototype.setColumnState=function(e){return console.error("AG Grid: setColumnState is deprecated, use applyColumnState"),this.columnModel.applyColumnState({state:e,applyOrder:!0},"api")},e.prototype.getOriginalColumnGroup=function(e){return console.error("AG Grid: getOriginalColumnGroup is deprecated, use getProvidedColumnGroup"),this.columnModel.getProvidedColumnGroup(e)},Xd([z("columnModel")],e.prototype,"columnModel",void 0),Xd([U],e.prototype,"cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid",null),Xd([Y("columnApi")],e)}(),Jd=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),eh=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},th=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.initialised=!1,t}return Jd(t,e),t.prototype.init=function(){var e=this;this.cellExpressions=this.gridOptionsWrapper.isEnableCellExpressions(),this.initialised=!0,this.eventService.addEventListener(We.EVENT_CELL_VALUE_CHANGED,(function(t){return e.callColumnCellValueChangedHandler(t)}),this.gridOptionsWrapper.useAsyncEvents())},t.prototype.getValue=function(e,t,o,r){if(void 0===o&&(o=!1),void 0===r&&(r=!1),this.initialised||this.init(),t){var n,i=e.getColDef(),s=i.field,a=e.getId(),l=t.data,u=t.groupData&&void 0!==t.groupData[a],p=!r&&t.aggData&&void 0!==t.aggData[a];if(o&&i.filterValueGetter?n=this.executeFilterValueGetter(i.filterValueGetter,l,e,t):this.gridOptionsWrapper.isTreeData()&&p?n=t.aggData[a]:this.gridOptionsWrapper.isTreeData()&&i.valueGetter?n=this.executeValueGetter(i.valueGetter,l,e,t):this.gridOptionsWrapper.isTreeData()&&s&&l?n=S(l,s,e.isFieldContainsDots()):u?n=t.groupData[a]:p?n=t.aggData[a]:i.valueGetter?n=this.executeValueGetter(i.valueGetter,l,e,t):s&&l&&(n=S(l,s,e.isFieldContainsDots())),this.cellExpressions&&"string"==typeof n&&0===n.indexOf("=")){var c=n.substring(1);n=this.executeValueGetter(c,l,e,t)}if(null==n){var d=this.getOpenedGroup(t,e);if(null!=d)return d}return n}},t.prototype.getOpenedGroup=function(e,t){if(this.gridOptionsWrapper.isShowOpenedGroup()&&t.getColDef().showRowGroup)for(var o=t.getColDef().showRowGroup,r=e.parent;null!=r;){if(r.rowGroupColumn&&(!0===o||o===r.rowGroupColumn.getId()))return r.key;r=r.parent}},t.prototype.setValue=function(e,t,o,r){var s=this.columnModel.getPrimaryColumn(t);if(!e||!s)return!1;i(e.data)&&(e.data={});var a=s.getColDef(),l=a.field,u=a.newValueHandler,p=a.valueSetter;if(i(l)&&i(u)&&i(p))return console.warn("AG Grid: you need either field or valueSetter set on colDef for editing to work"),!1;var c,d={node:e,data:e.data,oldValue:this.getValue(s,e),newValue:o,colDef:s.getColDef(),column:s,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()};if(d.newValue=o,void 0===(c=u&&n(u)?u(d):n(p)?this.expressionService.evaluate(p,d):this.setValueUsingField(e.data,l,o,s.isFieldContainsDots()))&&(c=!0),!c)return!1;e.resetQuickFilterAggregateText(),this.valueCache.onDataChanged(),d.newValue=this.getValue(s,e);var h={type:We.EVENT_CELL_VALUE_CHANGED,event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:d.column,api:d.api,columnApi:d.columnApi,colDef:d.colDef,context:d.context,data:e.data,node:e,oldValue:d.oldValue,newValue:d.newValue,value:d.newValue,source:r};return this.eventService.dispatchEvent(h),!0},t.prototype.callColumnCellValueChangedHandler=function(e){var t=e.colDef.onCellValueChanged;"function"==typeof t&&t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,columnApi:e.columnApi,context:e.context})},t.prototype.setValueUsingField=function(e,t,o,r){if(!t)return!1;var n=!1;if(r)for(var i=t.split("."),s=e;i.length>0&&s;){var a=i.shift();0===i.length?(n=s[a]==o)||(s[a]=o):s=s[a]}else(n=e[t]==o)||(e[t]=o);return!n},t.prototype.executeFilterValueGetter=function(e,t,o,r){var n={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,n)},t.prototype.executeValueGetter=function(e,t,o,r){var n=o.getId(),i=this.valueCache.getValue(r,n);if(void 0!==i)return i;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,n,a),a},t.prototype.getValueCallback=function(e,t){var o=this.columnModel.getPrimaryColumn(t);return o?this.getValue(o,e):null},t.prototype.getKeyForNode=function(e,t){var o=this.getValue(e,t),r=e.getColDef().keyCreator,n=o;return r&&(n=r({value:o,colDef:e.getColDef(),column:e,node:t,data:t.data,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()})),"string"==typeof n||null==n||"[object Object]"===(n=String(n))&&T((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]"),n},eh([z("expressionService")],t.prototype,"expressionService",void 0),eh([z("columnModel")],t.prototype,"columnModel",void 0),eh([z("valueCache")],t.prototype,"valueCache",void 0),eh([B],t.prototype,"init",null),eh([Y("valueService")],t)}(Ge),oh=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),rh=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},nh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.expressionToFunctionCache={},t}return oh(t,e),t.prototype.setBeans=function(e){this.logger=e.create("ExpressionService")},t.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)},t.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(o){return console.log("Processing of the expression failed"),console.log("Expression = "+e),console.log("Params =",t),console.log("Exception = "+o),null}},t.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},t.prototype.createFunctionBody=function(e){return e.indexOf("return")>=0?e:"return "+e+";"},rh([(o=0,r=q("loggerFactory"),function(e,t){r(e,t,o)})],t.prototype,"setBeans",null),rh([Y("expressionService")],t);var o,r}(Ge),ih=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),sh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.templateCache={},t.waitingCallbacks={},t}return ih(t,e),t.prototype.getTemplate=function(e,t){var o=this.templateCache[e];if(o)return o;var r=this.waitingCallbacks[e],n=this;if(!r){r=[],this.waitingCallbacks[e]=r;var i=new XMLHttpRequest;i.onload=function(){n.handleHttpResult(this,e)},i.open("GET",e),i.send()}return t&&r.push(t),null},t.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])()}else console.warn("AG Grid: Unable to get template error "+e.status+" - "+t)},function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s}([Y("templateService")],t)}(Ge),ah=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),lh=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},uh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ah(t,e),t.prototype.setBeans=function(e){this.logging=e.isDebug()},t.prototype.create=function(e){return new ph(e,this.isLogging.bind(this))},t.prototype.isLogging=function(){return this.logging},lh([(o=0,r=q("gridOptionsWrapper"),function(e,t){r(e,t,o)})],t.prototype,"setBeans",null),lh([Y("loggerFactory")],t);var o,r}(Ge),ph=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}(),ch=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),dh=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},hh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ch(t,e),t.prototype.setComp=function(e,t,o){var r=this;this.view=e,this.eGridHostDiv=t,this.eGui=o,this.dragAndDropService.addDropTarget({getContainer:function(){return r.eGui},isInterestedIn:function(e){return e===ts.HeaderCell||e===ts.ToolPanel},getIconName:function(){return hs.ICON_NOT_ALLOWED}}),this.mouseEventService.stampTopLevelGridCompWithGridInstance(t),this.createManagedBean(new _a(this.view)),this.addRtlSupport(),this.addManagedListener(this,We.EVENT_KEYBOARD_FOCUS,(function(){r.view.addOrRemoveKeyboardFocusClass(!0)})),this.addManagedListener(this,We.EVENT_MOUSE_FOCUS,(function(){r.view.addOrRemoveKeyboardFocusClass(!1)}));var n=this.resizeObserverService.observeResize(this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc((function(){return n()})),this.ctrlsService.registerGridCtrl(this)},t.prototype.isDetailGrid=function(){var e,t;return(null===(t=null===(e=this.focusService.findTabbableParent(this.getGui()))||void 0===e?void 0:e.getAttribute("row-id"))||void 0===t?void 0:t.startsWith("detail"))||!1},t.prototype.showDropZones=function(){return re.isRegistered(X.RowGroupingModule)},t.prototype.showSideBar=function(){return re.isRegistered(X.SideBarModule)},t.prototype.showStatusBar=function(){return re.isRegistered(X.StatusBarModule)},t.prototype.showWatermark=function(){return re.isRegistered(X.EnterpriseCoreModule)},t.prototype.onGridSizeChanged=function(){var e={type:We.EVENT_GRID_SIZE_CHANGED,clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight};this.eventService.dispatchEvent(e)},t.prototype.addRtlSupport=function(){var e=this.gridOptionsWrapper.isEnableRtl()?"ag-rtl":"ag-ltr";this.view.setRtlClass(e)},t.prototype.destroyGridUi=function(){this.view.destroyGridUi()},t.prototype.getGui=function(){return this.eGui},t.prototype.setResizeCursor=function(e){this.view.setCursor(e?"ew-resize":null)},t.prototype.disableUserSelect=function(e){this.view.setUserSelect(e?"none":null)},t.prototype.focusNextInnerContainer=function(e){var t=this.gridOptionsWrapper.getDocument(),o=this.view.getFocusableContainers(),r=o.findIndex((function(e){return e.contains(t.activeElement)}))+(e?-1:1);return!(r<=0||r>=o.length)&&this.focusService.focusInto(o[r])},t.prototype.focusInnerElement=function(e){var t=this.view.getFocusableContainers();if(e){if(t.length>1)return this.focusService.focusInto(le(t),!0);var o=le(this.columnModel.getAllDisplayedColumns());if(this.focusService.focusGridView(o,!0))return!0}return this.focusService.focusFirstHeader()},t.prototype.forceFocusOutOfContainer=function(e){void 0===e&&(e=!1),this.view.forceFocusOutOfContainer(e)},dh([z("focusService")],t.prototype,"focusService",void 0),dh([z("resizeObserverService")],t.prototype,"resizeObserverService",void 0),dh([z("columnModel")],t.prototype,"columnModel",void 0),dh([z("ctrlsService")],t.prototype,"ctrlsService",void 0),dh([z("mouseEventService")],t.prototype,"mouseEventService",void 0),dh([z("dragAndDropService")],t.prototype,"dragAndDropService",void 0),t}(Ge),fh=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),gh=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},mh=function(e){function t(t){var o=e.call(this,void 0)||this;return o.eGridDiv=t,o}return fh(t,e),t.prototype.postConstruct=function(){var e=this;this.logger=this.loggerFactory.create("GridComp");var t={destroyGridUi:function(){return e.destroyBean(e)},setRtlClass:function(t){return e.addCssClass(t)},addOrRemoveKeyboardFocusClass:function(t){return e.addOrRemoveCssClass(Td.AG_KEYBOARD_FOCUS,t)},forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:function(t){e.getGui().style.userSelect=null!=t?t:"",e.getGui().style.webkitUserSelect=null!=t?t:""},setCursor:function(t){e.getGui().style.cursor=null!=t?t:""}};this.ctrl=this.createManagedBean(new hh);var o=this.createTemplate();this.setTemplate(o),this.ctrl.setComp(t,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:function(){},focusInnerElement:function(t){return e.ctrl.focusInnerElement(t)}})},t.prototype.insertGridIntoDom=function(){var e=this,t=this.getGui();this.eGridDiv.appendChild(t),this.addDestroyFunc((function(){e.eGridDiv.removeChild(t),e.logger.log("Grid removed from DOM")}))},t.prototype.updateLayoutClasses=function(e,t){var o=this.eRootWrapperBody.classList;o.toggle(sa.AUTO_HEIGHT,t.autoHeight),o.toggle(sa.NORMAL,t.normal),o.toggle(sa.PRINT,t.print),this.addOrRemoveCssClass(sa.AUTO_HEIGHT,t.autoHeight),this.addOrRemoveCssClass(sa.NORMAL,t.normal),this.addOrRemoveCssClass(sa.PRINT,t.print)},t.prototype.createTemplate=function(){return'<div class="ag-root-wrapper" role="presentation">\n '+(this.ctrl.showDropZones()?"<ag-grid-header-drop-zones></ag-grid-header-drop-zones>":"")+'\n <div class="ag-root-wrapper-body" ref="rootWrapperBody" role="presentation">\n <ag-grid-body ref="gridBody"></ag-grid-body>\n '+(this.ctrl.showSideBar()?'<ag-side-bar ref="sideBar"></ag-side-bar>':"")+"\n </div>\n "+(this.ctrl.showStatusBar()?'<ag-status-bar ref="statusBar"></ag-status-bar>':"")+"\n <ag-pagination></ag-pagination>\n "+(this.ctrl.showWatermark()?"<ag-watermark></ag-watermark>":"")+"\n </div>"},t.prototype.getFocusableElement=function(){return this.eRootWrapperBody},t.prototype.getFocusableContainers=function(){var e=[this.gridBodyComp.getGui()];return this.sideBarComp&&e.push(this.sideBarComp.getGui()),e.filter((function(e){return Mo(e)}))},gh([z("loggerFactory")],t.prototype,"loggerFactory",void 0),gh([vn("gridBody")],t.prototype,"gridBodyComp",void 0),gh([vn("sideBar")],t.prototype,"sideBarComp",void 0),gh([vn("rootWrapperBody")],t.prototype,"eRootWrapperBody",void 0),gh([B],t.prototype,"postConstruct",null),t}(gd),yh=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),vh=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Ch=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s},wh=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ch(arguments[t]));return e},Eh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var o;return yh(t,e),o=t,t.prototype.progressSort=function(e,t,o){var r=this.getNextSortDirection(e);this.setSortForColumn(e,r,t,o)},t.prototype.setSortForColumn=function(e,t,o,r){var n;t!==oe.SORT_ASC&&t!==oe.SORT_DESC&&(t=null);var i=[e];if(this.gridOptionsWrapper.isColumnsSortingCoupledToGroup()&&e.getColDef().showRowGroup){var s=null===(n=this.columnModel.getSourceColumnsForGroupColumn(e))||void 0===n?void 0:n.filter((function(e){return e.getColDef().sortable}));s&&(i=wh([e],s))}i.forEach((function(e){return e.setSort(t,r)})),(o||this.gridOptionsWrapper.isAlwaysMultiSort())&&!this.gridOptionsWrapper.isSuppressMultiSort()||this.clearSortBarTheseColumns(i,r),this.updateSortIndex(e),this.dispatchSortChangedEvents(r)},t.prototype.updateSortIndex=function(e){var t=this.gridOptionsWrapper.isColumnsSortingCoupledToGroup(),o=this.columnModel.getGroupDisplayColumnForGroup(e.getId()),r=t&&o||e,n=this.getIndexableColumnsOrdered();this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach((function(e){return e.setSortIndex(null)}));var i=n.filter((function(e){return e!==r}));(r.getSort()?wh(i,[r]):i).forEach((function(e,t){return e.setSortIndex(t)}))},t.prototype.onSortChanged=function(e){this.dispatchSortChangedEvents(e)},t.prototype.isSortActive=function(){var e=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter((function(e){return!!e.getSort()}));return e&&e.length>0},t.prototype.dispatchSortChangedEvents=function(e){var t={type:We.EVENT_SORT_CHANGED,source:e};this.eventService.dispatchEvent(t)},t.prototype.clearSortBarTheseColumns=function(e,t){this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach((function(o){e.includes(o)||o.setSort(void 0,t)}))},t.prototype.getNextSortDirection=function(e){var t;if(t=e.getColDef().sortingOrder?e.getColDef().sortingOrder:this.gridOptionsWrapper.getSortingOrder()?this.gridOptionsWrapper.getSortingOrder():o.DEFAULT_SORTING_ORDER,!Array.isArray(t)||t.length<=0)return console.warn("AG Grid: sortingOrder must be an array with at least one element, currently it's "+t),null;var r,n=t.indexOf(e.getSort()),i=n<0,s=n==t.length-1;return r=i||s?t[0]:t[n+1],o.DEFAULT_SORTING_ORDER.indexOf(r)<0?(console.warn("AG Grid: invalid sort type "+r),null):r},t.prototype.getColumnsOrderedForSort=function(){var e=this.columnModel.getPrimaryAndSecondaryAndAutoColumns(),t={};return e.forEach((function(e,o){return t[e.getId()]=o})),e.sort((function(e,o){var r=e.getSortIndex(),n=o.getSortIndex();return null!=r&&null!=n?r-n:null==r&&null==n?t[e.getId()]>t[o.getId()]?1:-1:null==n?-1:1})),e},t.prototype.getIndexableColumnsOrdered=function(){var e=this;return this.gridOptionsWrapper.isColumnsSortingCoupledToGroup()?this.getColumnsOrderedForSort().filter((function(t){var o;return t.getColDef().showRowGroup?!(!t.getColDef().field||!t.getSort())||(null===(o=e.columnModel.getSourceColumnsForGroupColumn(t))||void 0===o?void 0:o.some((function(e){return!!e.getSort()}))):!!t.getSort()})):this.getColumnsWithSortingOrdered()},t.prototype.getColumnsWithSortingOrdered=function(){return this.getColumnsOrderedForSort().filter((function(e){return!!e.getSort()}))},t.prototype.getSortModel=function(){return this.getColumnsWithSortingOrdered().map((function(e){return{sort:e.getSort(),colId:e.getId()}}))},t.prototype.getSortOptions=function(){return this.getColumnsWithSortingOrdered().map((function(e){return{sort:e.getSort(),column:e}}))},t.prototype.canColumnDisplayMixedSort=function(e){var t=this.gridOptionsWrapper.isColumnsSortingCoupledToGroup(),o=!!e.getColDef().showRowGroup;return t&&o},t.prototype.getDisplaySortForColumn=function(e){var t,o=this.columnModel.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!(null===(t=o)||void 0===t?void 0:t.length))return e.getSort();var r=e.getColDef().field?wh([e],o):o,n=r[0].getSort();return r.every((function(e){return e.getSort()==n}))?n:"mixed"},t.prototype.getDisplaySortIndexForColumn=function(e){var t=this;if(!this.gridOptionsWrapper.isColumnsSortingCoupledToGroup())return this.getColumnsWithSortingOrdered().indexOf(e);var o=this.columnModel.getGroupDisplayColumnForGroup(e.getId());return o?e.getSort()?this.getDisplaySortIndexForColumn(o):null:this.getIndexableColumnsOrdered().filter((function(e){return!t.columnModel.getGroupDisplayColumnForGroup(e.getId())})).indexOf(e)},t.DEFAULT_SORTING_ORDER=[oe.SORT_ASC,oe.SORT_DESC,null],vh([z("columnModel")],t.prototype,"columnModel",void 0),o=vh([Y("sortController")],t)}(Ge),_h=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Sh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _h(t,e),t.prototype.setMouseOver=function(e){this.selectedColumns=e;var t={type:We.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(t)},t.prototype.clearMouseOver=function(){this.selectedColumns=null;var e={type:We.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(e)},t.prototype.isHovered=function(e){return!!this.selectedColumns&&this.selectedColumns.indexOf(e)>=0},function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s}([Y("columnHoverService")],t)}(Ge),Rh=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),bh=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Oh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.executeNextFuncs=[],t.executeLaterFuncs=[],t.active=!1,t.animationThreadCount=0,t}return Rh(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){return e.gridBodyCtrl=t.gridBodyCtrl}))},t.prototype.isActive=function(){return this.active},t.prototype.start=function(){this.active||this.gridOptionsWrapper.isSuppressColumnMoveAnimation()||this.gridOptionsWrapper.isEnableRtl()||(this.ensureAnimationCssClassPresent(),this.active=!0)},t.prototype.finish=function(){this.active&&(this.flush(),this.active=!1)},t.prototype.executeNextVMTurn=function(e){this.active?this.executeNextFuncs.push(e):e()},t.prototype.executeLaterVMTurn=function(e){this.active?this.executeLaterFuncs.push(e):e()},t.prototype.ensureAnimationCssClassPresent=function(){var e=this;this.animationThreadCount++;var t=this.animationThreadCount;this.gridBodyCtrl.setColumnMovingCss(!0),this.executeLaterFuncs.push((function(){e.animationThreadCount===t&&e.gridBodyCtrl.setColumnMovingCss(!1)}))},t.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))},bh([z("ctrlsService")],t.prototype,"ctrlsService",void 0),bh([B],t.prototype,"postConstruct",null),bh([Y("columnAnimationService")],t)}(Ge),Ph=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Th=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Ah=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var o;return Ph(t,e),o=t,t.prototype.createAutoGroupColumns=function(e,t){var o=this,r=[],n=this.gridOptionsWrapper.isTreeData(),i=this.gridOptionsWrapper.isGroupMultiAutoColumn();return n&&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?t.forEach((function(t,n){r.push(o.createOneAutoGroupColumn(e,t,n))})):r.push(this.createOneAutoGroupColumn(e)),r},t.prototype.createOneAutoGroupColumn=function(e,t,r){var n,s=this.generateDefaultColDef(t);n=t?oe.GROUP_AUTO_COLUMN_ID+"-"+t.getId():o.GROUP_AUTO_COLUMN_BUNDLE_ID,_(s,this.gridOptionsWrapper.getAutoGroupColumnDef()),(s=this.columnFactory.mergeColDefs(s)).colId=n,this.gridOptionsWrapper.isTreeData()||i(s.field)&&i(s.valueGetter)&&i(s.filterValueGetter)&&(s.filter=!1),r&&r>0&&(s.headerCheckboxSelection=!1);var a=e.find((function(e){return e.getId()==n}));if(a)return a.setColDef(s,null),this.columnFactory.applyColumnState(a,s),a;var l=new se(s,null,n,!0);return this.context.createBean(l),l},t.prototype.generateDefaultColDef=function(e){var t=this.gridOptionsWrapper.getAutoGroupColumnDef(),o={headerName:this.gridOptionsWrapper.getLocaleTextFunc()("group","Group")};if(t&&(t.cellRenderer||t.cellRendererFramework||t.cellRendererSelector)||(o.cellRenderer="agGroupCellRenderer"),e){var r=e.getColDef();Object.assign(o,{headerName:this.columnModel.getDisplayNameForColumn(e,"header"),headerValueGetter:r.headerValueGetter}),(r.cellRenderer||r.cellRendererFramework)&&Object.assign(o,{cellRendererParams:{innerRenderer:r.cellRenderer,innerRendererFramework:r.cellRendererFramework,innerRendererParams:r.cellRendererParams}}),o.showRowGroup=e.getColId()}else o.showRowGroup=!0;return o},t.GROUP_AUTO_COLUMN_BUNDLE_ID=oe.GROUP_AUTO_COLUMN_ID,Th([z("columnModel")],t.prototype,"columnModel",void 0),Th([z("columnFactory")],t.prototype,"columnFactory",void 0),o=Th([Y("autoGroupColService")],t)}(Ge),Dh=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Ih=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Nh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Dh(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){e.centerRowContainerCon=t.centerRowContainerCtrl,e.addManagedListener(e.eventService,We.EVENT_BODY_HEIGHT_CHANGED,e.onBodyHeightChanged.bind(e)),e.addManagedListener(e.eventService,We.EVENT_SCROLL_VISIBILITY_CHANGED,e.onScrollVisibilityChanged.bind(e)),e.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.centerRowContainerCon.getViewportSizeFeature().getBodyHeight();if(t>0){var o=Math.floor(t/e);this.gridOptionsWrapper.setProperty("paginationPageSize",o)}}},Ih([z("ctrlsService")],t.prototype,"ctrlsService",void 0),Ih([B],t.prototype,"postConstruct",null),Ih([Y("paginationAutoPageSizeService")],t)}(Ge),xh=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Mh=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Lh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cacheVersion=0,t}return xh(t,e),t.prototype.init=function(){this.active=this.gridOptionsWrapper.isValueCache(),this.neverExpires=this.gridOptionsWrapper.isValueCacheNeverExpires()},t.prototype.onDataChanged=function(){this.neverExpires||this.expire()},t.prototype.expire=function(){this.cacheVersion++},t.prototype.setValue=function(e,t,o){this.active&&(e.__cacheVersion!==this.cacheVersion&&(e.__cacheVersion=this.cacheVersion,e.__cacheData={}),e.__cacheData[t]=o)},t.prototype.getValue=function(e,t){if(this.active&&e.__cacheVersion===this.cacheVersion)return e.__cacheData[t]},Mh([B],t.prototype,"init",null),Mh([Y("valueCache")],t)}(Ge),Fh=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Gh=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},kh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fh(t,e),t.prototype.init=function(){this.rowModel.getType()===oe.ROW_MODEL_TYPE_CLIENT_SIDE&&(this.clientSideRowModel=this.rowModel),this.addManagedListener(this.eventService,We.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged.bind(this))},t.prototype.onCellValueChanged=function(e){e.source!==oe.SOURCE_PASTE&&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 wc(o,this.clientSideRowModel.getRootNode());r.addParentNode(e.parent,[t]),this.clientSideRowModel.doAggregate(r)}this.rowRenderer.refreshCells()}},Gh([z("rowModel")],t.prototype,"rowModel",void 0),Gh([z("rowRenderer")],t.prototype,"rowRenderer",void 0),Gh([B],t.prototype,"init",null),Gh([Y("changeDetectionService")],t)}(Ge),Vh=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Hh=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Wh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vh(t,e),t.prototype.adaptFunction=function(e,t){var o=this.componentMetadataProvider.retrieve(e);return o&&o.functionAdapter?o.functionAdapter(t):null},t.prototype.adaptCellRendererFunction=function(e){return function(){function t(){}return t.prototype.refresh=function(e){return!1},t.prototype.getGui=function(){return this.eGui},t.prototype.init=function(t){var o=e(t),r=typeof o;this.eGui="string"!==r&&"number"!==r&&"boolean"!==r?null!=o?o:Lo("<span></span>"):Lo("<span>"+o+"</span>")},t}()},t.prototype.doesImplementIComponent=function(e){return!!e&&e.prototype&&"getGui"in e.prototype},Hh([z("componentMetadataProvider")],t.prototype,"componentMetadataProvider",void 0),Hh([Y("agComponentUtils")],t)}(Ge),jh=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Bh=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Uh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jh(t,e),t.prototype.postConstruct=function(){this.componentMetaData={dateComponent:{mandatoryMethodList:["getDate","setDate"],optionalMethodList:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel"]},detailCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},headerComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},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","getPopupPosition","focusIn","focusOut","afterGuiAttached"]},innerRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},fullWidthCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},pinnedRowCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","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","onAnyFilterChanged"]},filterComponent:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged"]},statusPanel:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"]},toolPanel:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"]},tooltipComponent:{mandatoryMethodList:[],optionalMethodList:[]}}},t.prototype.retrieve=function(e){return this.componentMetaData[e]},Bh([z("agComponentUtils")],t.prototype,"agComponentUtils",void 0),Bh([B],t.prototype,"postConstruct",null),Bh([Y("componentMetadataProvider")],t)}(Ge),Yh=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),zh=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Kh={"ag-theme-custom":{headerHeight:25,headerCellMinWidth:24,listItemHeight:20,rowHeight:25,chartMenuPanelWidth:220},"ag-theme-material":{headerHeight:56,headerCellMinWidth:48,listItemHeight:32,rowHeight:48,chartMenuPanelWidth:240},"ag-theme-balham":{headerHeight:32,headerCellMinWidth:24,listItemHeight:24,rowHeight:28,chartMenuPanelWidth:220},"ag-theme-alpine":{headerHeight:48,headerCellMinWidth:36,listItemHeight:24,rowHeight:42,chartMenuPanelWidth:240}},$h={headerHeight:["ag-header-row"],headerCellMinWidth:["ag-header-cell"],listItemHeight:["ag-virtual-list-item"],rowHeight:["ag-row"],chartMenuPanelWidth:["ag-chart-docked-container"]},qh={},Zh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Yh(t,e),t.prototype.getSassVariable=function(e,t){var o="ag-theme-"+(e.match("material")?"material":e.match("balham")?"balham":e.match("alpine")?"alpine":"custom"),r=Kh[o][t],n=0;qh[e]||(qh[e]={});var i=qh[e][t];if(null!=i)return i;if($h[t]){var s=$h[t],a=document.createElement("div");a.classList.add(e),a.style.position="absolute";var l=s.reduce((function(e,t){var o=document.createElement("div");return o.style.position="static",o.classList.add(t),e.appendChild(o),o}),a);if(document.body){document.body.appendChild(a);var u=-1!==t.toLowerCase().indexOf("height")?"height":"width";n=parseInt(window.getComputedStyle(l)[u],10),document.body.removeChild(a)}}return qh[e][t]=n||r,qh[e][t]},t.prototype.isThemeDark=function(){var e=this.getTheme().theme;return!!e&&e.indexOf("dark")>=0},t.prototype.chartMenuPanelWidth=function(){var e=this.getTheme().themeFamily;return this.getSassVariable(e,"chartMenuPanelWidth")},t.prototype.getTheme=function(){for(var e=/\bag-(material|(?:theme-([\w\-]*)))\b/g,t=this.eGridDiv,o=null,r=[];t;){if(o=e.exec(t.className)){var n=t.className.match(e);n&&(r=n);break}t=t.parentElement||void 0}if(!o)return{allThemes:r};var i=o[0];if(void 0===o[2]){var s=i.replace("ag-","ag-theme-");T((function(){return console.warn("AG Grid: As of v19 old theme are no longer provided. Please replace "+i+" with "+s+".")}),"using-old-theme")}return{theme:i,el:t,themeFamily:i.replace(/-dark$/,""),allThemes:r}},zh([z("eGridDiv")],t.prototype,"eGridDiv",void 0),zh([Y("environment")],t)}(Ge),Xh=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Qh=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Jh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.scrollY=0,t.uiBodyHeight=0,t}return Xh(t,e),t.prototype.agWire=function(e){this.logger=e.create("RowContainerHeightService")},t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,We.EVENT_BODY_HEIGHT_CHANGED,this.updateOffset.bind(this)),this.maxDivHeight=Tt(),this.logger.log("maxDivHeight = "+this.maxDivHeight)},t.prototype.isStretching=function(){return this.stretching},t.prototype.getDivStretchOffset=function(){return this.divStretchOffset},t.prototype.updateOffset=function(){if(this.stretching){var e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}},t.prototype.calculateOffset=function(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;var e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;this.logger.log("Div Stretch Offset = "+t+" ("+this.pixelsToShave+" * "+e+")"),this.setDivStretchOffset(t)},t.prototype.setUiContainerHeight=function(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventService.dispatchEvent({type:We.EVENT_ROW_CONTAINER_HEIGHT_CHANGED}))},t.prototype.clearOffset=function(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)},t.prototype.setDivStretchOffset=function(e){var t="number"==typeof e?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventService.dispatchEvent({type:We.EVENT_HEIGHT_SCALE_CHANGED}))},t.prototype.setModelHeight=function(e){this.modelHeight=e,this.stretching=null!=e&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()},t.prototype.getUiContainerHeight=function(){return this.uiContainerHeight},t.prototype.getRealPixelPosition=function(e){return e-this.divStretchOffset},t.prototype.getUiBodyHeight=function(){var e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().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},Qh([z("ctrlsService")],t.prototype,"ctrlsService",void 0),Qh([(o=0,r=q("loggerFactory"),function(e,t){r(e,t,o)})],t.prototype,"agWire",null),Qh([B],t.prototype,"postConstruct",null),Qh([Y("rowContainerHeightService")],t);var o,r}(Ge),ef=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),tf=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},of=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ef(t,e),t.prototype.init=function(){this.groupSelectsChildren=this.gridOptionsWrapper.isGroupSelectsChildren(),this.isRowSelectableFunc=this.gridOptionsWrapper.getIsRowSelectableFunc()},t.prototype.updateSelectableAfterGrouping=function(e){this.isRowSelectableFunc&&this.recurseDown(e.childrenAfterGroup,(function(e){return e.childrenAfterGroup}))},t.prototype.recurseDown=function(e,t){var o=this;e&&e.forEach((function(e){var r;e.group&&(e.hasChildren()&&o.recurseDown(t(e),t),r=o.groupSelectsChildren?n((t(e)||[]).find((function(e){return!0===e.selectable}))):!!o.isRowSelectableFunc&&o.isRowSelectableFunc(e),e.setRowSelectable(r))}))},tf([B],t.prototype,"init",null),tf([Y("selectableService")],t)}(Ge),rf=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),nf=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},sf=function(e){function t(){var t=e.call(this)||this;return t.previousAndFirstButtonsDisabled=!1,t.nextButtonDisabled=!1,t.lastButtonDisabled=!1,t}return rf(t,e),t.prototype.postConstruct=function(){var e=this,t=this.gridOptionsWrapper.isEnableRtl();this.setTemplate(this.getTemplate()),this.btFirst.insertAdjacentElement("afterbegin",Hr(t?"last":"first",this.gridOptionsWrapper)),this.btPrevious.insertAdjacentElement("afterbegin",Hr(t?"next":"previous",this.gridOptionsWrapper)),this.btNext.insertAdjacentElement("afterbegin",Hr(t?"previous":"next",this.gridOptionsWrapper)),this.btLast.insertAdjacentElement("afterbegin",Hr(t?"first":"last",this.gridOptionsWrapper)),this.gridOptionsWrapper.isPagination()&&!this.gridOptionsWrapper.isSuppressPaginationPanel()?(this.addManagedListener(this.eventService,We.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}].forEach((function(t){var o=t.el,r=t.fn;e.addManagedListener(o,"click",r),e.addManagedListener(o,"keydown",(function(e){e.key!==jr.ENTER&&e.key!==jr.SPACE||(e.preventDefault(),r())}))})),this.onPaginationChanged()):this.setDisplayed(!1)},t.prototype.onPaginationChanged=function(){this.enableOrDisableButtons(),this.updateRowLabels(),this.setCurrentPageLabel(),this.setTotalLabels()},t.prototype.onBtFirst=function(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToFirstPage()},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();if(t)return t({value:e});var o=this.gridOptionsWrapper.getLocaleTextFunc();return Ut(e,o("thousandSeparator",","),o("decimalSeparator","."))},t.prototype.getTemplate=function(){var e=this.gridOptionsWrapper.getLocaleTextFunc(),t=e("page","Page"),o=e("to","to"),r=e("of","of"),n=e("firstPage","First Page"),i=e("previousPage","Previous Page"),s=e("nextPage","Next Page"),a=e("lastPage","Last Page"),l=this.getCompId();return'<div class="ag-paging-panel ag-unselectable" id="ag-'+l+'">\n <span class="ag-paging-row-summary-panel" role="status">\n <span id="ag-'+l+'-first-row" ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>\n <span id="ag-'+l+'-to">'+o+'</span>\n <span id="ag-'+l+'-last-row" ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>\n <span id="ag-'+l+'-of">'+r+'</span>\n <span id="ag-'+l+'-row-count" ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>\n </span>\n <span class="ag-paging-page-summary-panel" role="presentation">\n <div ref="btFirst" class="ag-paging-button" role="button" aria-label="'+n+'"></div>\n <div ref="btPrevious" class="ag-paging-button" role="button" aria-label="'+i+'"></div>\n <span class="ag-paging-description" role="status">\n <span id="ag-'+l+'-start-page">'+t+'</span>\n <span id="ag-'+l+'-start-page-number" ref="lbCurrent" class="ag-paging-number"></span>\n <span id="ag-'+l+'-of-page">'+r+'</span>\n <span id="ag-'+l+'-of-page-number" ref="lbTotal" class="ag-paging-number"></span>\n </span>\n <div ref="btNext" class="ag-paging-button" role="button" aria-label="'+s+'"></div>\n <div ref="btLast" class="ag-paging-button" role="button" aria-label="'+a+'"></div>\n </span>\n </div>'},t.prototype.onBtNext=function(){this.nextButtonDisabled||this.paginationProxy.goToNextPage()},t.prototype.onBtPrevious=function(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToPreviousPage()},t.prototype.onBtLast=function(){this.lastButtonDisabled||this.paginationProxy.goToLastPage()},t.prototype.enableOrDisableButtons=function(){var e=this.paginationProxy.getCurrentPage(),t=this.paginationProxy.isLastPageFound(),o=this.paginationProxy.getTotalPages();this.previousAndFirstButtonsDisabled=0===e,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);var r=this.isZeroPagesToDisplay(),n=t&&e===o-1;this.nextButtonDisabled=n||r,this.lastButtonDisabled=!t||r||e===o-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)},t.prototype.toggleButtonDisabled=function(e,t){gr(e,t),e.classList.toggle("ag-disabled",t),t?e.removeAttribute("tabindex"):e.setAttribute("tabindex","0")},t.prototype.updateRowLabels=function(){var e,t,o=this.paginationProxy.getCurrentPage(),r=this.paginationProxy.getPageSize(),n=this.paginationProxy.isLastPageFound(),i=this.paginationProxy.isLastPageFound()?this.paginationProxy.getMasterRowCount():null;this.isZeroPagesToDisplay()?e=t=0:(t=(e=r*o+1)+r-1,n&&t>i&&(t=i)),this.lbFirstRowOnPage.innerHTML=this.formatNumber(e),this.rowNodeBlockLoader.isLoading()?this.lbLastRowOnPage.innerHTML="?":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=e?this.paginationProxy.getMasterRowCount():null;if(1===o){var r=this.paginationProxy.getRow(0);if(r&&r.group&&!r.groupData&&!r.aggData)return void this.setTotalLabelsToZero()}if(e)this.lbTotal.innerHTML=this.formatNumber(t),this.lbRecordCount.innerHTML=this.formatNumber(o);else{var n=this.gridOptionsWrapper.getLocaleTextFunc()("more","more");this.lbTotal.innerHTML=n,this.lbRecordCount.innerHTML=n}},t.prototype.setTotalLabelsToZero=function(){this.lbFirstRowOnPage.innerHTML=this.formatNumber(0),this.lbCurrent.innerHTML=this.formatNumber(0),this.lbLastRowOnPage.innerHTML=this.formatNumber(0),this.lbTotal.innerHTML=this.formatNumber(0),this.lbRecordCount.innerHTML=this.formatNumber(0)},nf([z("paginationProxy")],t.prototype,"paginationProxy",void 0),nf([z("rowNodeBlockLoader")],t.prototype,"rowNodeBlockLoader",void 0),nf([vn("btFirst")],t.prototype,"btFirst",void 0),nf([vn("btPrevious")],t.prototype,"btPrevious",void 0),nf([vn("btNext")],t.prototype,"btNext",void 0),nf([vn("btLast")],t.prototype,"btLast",void 0),nf([vn("lbRecordCount")],t.prototype,"lbRecordCount",void 0),nf([vn("lbFirstRowOnPage")],t.prototype,"lbFirstRowOnPage",void 0),nf([vn("lbLastRowOnPage")],t.prototype,"lbLastRowOnPage",void 0),nf([vn("lbCurrent")],t.prototype,"lbCurrent",void 0),nf([vn("lbTotal")],t.prototype,"lbTotal",void 0),nf([B],t.prototype,"postConstruct",null),t}(mn),af=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),lf=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};!function(e){e[e.Loading=0]="Loading",e[e.NoRows=1]="NoRows"}(Nd||(Nd={}));var uf=function(e){function t(){var o=e.call(this,t.TEMPLATE)||this;return o.inProgress=!1,o.destroyRequested=!1,o.manuallyDisplayed=!1,o}return af(t,e),t.prototype.updateLayoutClasses=function(e,t){var o=this.eOverlayWrapper.classList;o.toggle(sa.AUTO_HEIGHT,t.autoHeight),o.toggle(sa.NORMAL,t.normal),o.toggle(sa.PRINT,t.print)},t.prototype.postConstruct=function(){this.createManagedBean(new _a(this)),this.setDisplayed(!1),this.addManagedListener(this.eventService,We.EVENT_ROW_DATA_UPDATED,this.onRowDataUpdated.bind(this)),this.addManagedListener(this.eventService,We.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.gridOptionsWrapper.isRowModelDefault()&&!this.gridOptionsWrapper.getRowData()&&this.showLoadingOverlay(),this.gridApi.registerOverlayWrapperComp(this)},t.prototype.setWrapperTypeClass=function(e){var t=this.eOverlayWrapper.classList;t.toggle("ag-overlay-loading-wrapper",e===Nd.Loading),t.toggle("ag-overlay-no-rows-wrapper",e===Nd.NoRows)},t.prototype.showLoadingOverlay=function(){if(!this.gridOptionsWrapper.isSuppressLoadingOverlay()){var e=this.userComponentFactory.getLoadingOverlayCompDetails({}).newAgStackInstance();this.showOverlay(e,Nd.Loading)}},t.prototype.showNoRowsOverlay=function(){if(!this.gridOptionsWrapper.isSuppressNoRowsOverlay()){var e=this.userComponentFactory.getNoRowsOverlayCompDetails({}).newAgStackInstance();this.showOverlay(e,Nd.NoRows)}},t.prototype.showOverlay=function(e,t){var o=this;this.inProgress||(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.inProgress=!0,e&&e.then((function(e){o.inProgress=!1,o.eOverlayWrapper.appendChild(e.getGui()),o.activeOverlay=e,o.destroyRequested&&(o.destroyRequested=!1,o.destroyActiveOverlay())})),this.manuallyDisplayed=this.columnModel.isReady()&&!this.paginationProxy.isEmpty(),this.setDisplayed(!0))},t.prototype.destroyActiveOverlay=function(){this.inProgress?this.destroyRequested=!0:this.activeOverlay&&(this.activeOverlay=this.getContext().destroyBean(this.activeOverlay),No(this.eOverlayWrapper))},t.prototype.hideOverlay=function(){this.manuallyDisplayed=!1,this.destroyActiveOverlay(),this.setDisplayed(!1)},t.prototype.destroy=function(){this.destroyActiveOverlay(),e.prototype.destroy.call(this)},t.prototype.showOrHideOverlay=function(){var e=this.paginationProxy.isEmpty(),t=this.gridOptionsWrapper.isSuppressNoRowsOverlay();e&&!t?this.showNoRowsOverlay():this.hideOverlay()},t.prototype.onRowDataUpdated=function(){this.showOrHideOverlay()},t.prototype.onNewColumnsLoaded=function(){!this.columnModel.isReady()||this.paginationProxy.isEmpty()||this.manuallyDisplayed||this.hideOverlay()},t.TEMPLATE='\n <div class="ag-overlay" aria-hidden="true">\n <div class="ag-overlay-panel">\n <div class="ag-overlay-wrapper" ref="eOverlayWrapper"></div>\n </div>\n </div>',lf([z("userComponentFactory")],t.prototype,"userComponentFactory",void 0),lf([z("paginationProxy")],t.prototype,"paginationProxy",void 0),lf([z("gridApi")],t.prototype,"gridApi",void 0),lf([z("columnModel")],t.prototype,"columnModel",void 0),lf([vn("eOverlayWrapper")],t.prototype,"eOverlayWrapper",void 0),lf([B],t.prototype,"postConstruct",null),t}(mn),pf=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),cf=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},df=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pf(t,e),t.prototype.getFirstRow=function(){var e,t=0;return this.pinnedRowModel.getPinnedTopRowCount()?e=oe.PINNED_TOP:this.rowModel.getRowCount()?(e=null,t=this.paginationProxy.getPageFirstRow()):this.pinnedRowModel.getPinnedBottomRowCount()&&(e=oe.PINNED_BOTTOM),void 0===e?null:{rowIndex:t,rowPinned:e}},t.prototype.getLastRow=function(){var e,t=null,o=this.pinnedRowModel.getPinnedBottomRowCount(),r=this.pinnedRowModel.getPinnedTopRowCount();return o?(t=oe.PINNED_BOTTOM,e=o-1):this.rowModel.getRowCount()?(t=null,e=this.paginationProxy.getPageLastRow()):r&&(t=oe.PINNED_TOP,e=r-1),void 0===e?null:{rowIndex:e,rowPinned:t}},t.prototype.getRowNode=function(e){switch(e.rowPinned){case oe.PINNED_TOP:return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case oe.PINNED_BOTTOM:return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}},t.prototype.sameRow=function(e,t){return!e&&!t||!(e&&!t||!e&&t)&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned},t.prototype.before=function(e,t){switch(e.rowPinned){case oe.PINNED_TOP:if(t.rowPinned!==oe.PINNED_TOP)return!0;break;case oe.PINNED_BOTTOM:if(t.rowPinned!==oe.PINNED_BOTTOM)return!1;break;default:if(n(t.rowPinned))return t.rowPinned!==oe.PINNED_TOP}return e.rowIndex<t.rowIndex},t.prototype.rowMax=function(e){var t,o=this;return e.forEach((function(e){(void 0===t||o.before(t,e))&&(t=e)})),t},t.prototype.rowMin=function(e){var t,o=this;return e.forEach((function(e){(void 0===t||o.before(e,t))&&(t=e)})),t},cf([z("rowModel")],t.prototype,"rowModel",void 0),cf([z("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),cf([z("paginationProxy")],t.prototype,"paginationProxy",void 0),cf([Y("rowPositionUtils")],t)}(Ge),hf=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),ff=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hf(t,e),t.prototype.createId=function(e){var t=e.rowIndex,o=e.rowPinned,r=e.column;return this.createIdFromValues(t,r,o)},t.prototype.createIdFromValues=function(e,t,o){return e+"."+(null==o?"null":o)+"."+t.getId()},t.prototype.equals=function(e,t){var o=e.column===t.column,r=e.rowPinned===t.rowPinned,n=e.rowIndex===t.rowIndex;return o&&r&&n},function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s}([Y("cellPositionUtils")],t)}(Ge),gf=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),mf=function(e){this.cellValueChanges=e},yf=function(e){function t(t,o,r,n){var i=e.call(this,t)||this;return i.initialRange=o,i.finalRange=r,i.ranges=n,i}return gf(t,e),t}(mf),vf=function(){function e(t){this.actionStack=[],this.maxStackSize=t||e.DEFAULT_STACK_SIZE,this.actionStack=new Array(this.maxStackSize)}return e.prototype.pop=function(){return this.actionStack.pop()},e.prototype.push=function(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))},e.prototype.clear=function(){this.actionStack=[]},e.prototype.getCurrentStackSize=function(){return this.actionStack.length},e.DEFAULT_STACK_SIZE=10,e}(),Cf=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),wf=function(){return wf=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},wf.apply(this,arguments)},Ef=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},_f=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s},Sf=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellValueChanges=[],t.activeCellEdit=null,t.activeRowEdit=null,t.isPasting=!1,t.isRangeInAction=!1,t.onCellValueChanged=function(e){var o={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},r=null!==t.activeCellEdit&&t.cellPositionUtils.equals(t.activeCellEdit,o),n=null!==t.activeRowEdit&&t.rowPositionUtils.sameRow(t.activeRowEdit,o);if(r||n||t.isPasting||t.isRangeInAction){var i=e.rowPinned,s=e.rowIndex,a=e.column,l=e.oldValue,u=e.value,p={rowPinned:i,rowIndex:s,columnId:a.getColId(),newValue:u,oldValue:l};t.cellValueChanges.push(p)}},t.clearStacks=function(){t.undoStack.clear(),t.redoStack.clear()},t}return Cf(t,e),t.prototype.init=function(){var e=this;if(this.gridOptionsWrapper.isUndoRedoCellEditing()){var t=this.gridOptionsWrapper.getUndoRedoCellEditingLimit();t<=0||(this.undoStack=new vf(t),this.redoStack=new vf(t),this.addRowEditingListeners(),this.addCellEditingListeners(),this.addPasteListeners(),this.addFillListeners(),this.addCellKeyListeners(),this.addManagedListener(this.eventService,We.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged),this.addManagedListener(this.eventService,We.EVENT_MODEL_UPDATED,(function(t){t.keepUndoRedoStack||e.clearStacks()})),this.addManagedListener(this.eventService,We.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,We.EVENT_NEW_COLUMNS_LOADED,this.clearStacks),this.addManagedListener(this.eventService,We.EVENT_COLUMN_GROUP_OPENED,this.clearStacks),this.addManagedListener(this.eventService,We.EVENT_COLUMN_ROW_GROUP_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,We.EVENT_COLUMN_MOVED,this.clearStacks),this.addManagedListener(this.eventService,We.EVENT_COLUMN_PINNED,this.clearStacks),this.addManagedListener(this.eventService,We.EVENT_COLUMN_VISIBLE,this.clearStacks),this.addManagedListener(this.eventService,We.EVENT_ROW_DRAG_END,this.clearStacks),this.ctrlsService.whenReady((function(){e.gridBodyCtrl=e.ctrlsService.getGridBodyCtrl()})))}},t.prototype.getCurrentUndoStackSize=function(){return this.undoStack?this.undoStack.getCurrentStackSize():0},t.prototype.getCurrentRedoStackSize=function(){return this.redoStack?this.redoStack.getCurrentStackSize():0},t.prototype.undo=function(){if(this.undoStack){var e=this.undoStack.pop();e&&e.cellValueChanges&&(this.processAction(e,(function(e){return e.oldValue})),e instanceof yf?this.processRange(e.ranges||[e.initialRange]):this.processCell(e.cellValueChanges),this.redoStack.push(e))}},t.prototype.redo=function(){if(this.redoStack){var e=this.redoStack.pop();e&&e.cellValueChanges&&(this.processAction(e,(function(e){return e.newValue})),e instanceof yf?this.processRange(e.ranges||[e.finalRange]):this.processCell(e.cellValueChanges),this.undoStack.push(e))}},t.prototype.processAction=function(e,t){var o=this;e.cellValueChanges.forEach((function(e){var r,n=e.rowIndex,i=e.rowPinned,s=e.columnId,a={rowIndex:n,rowPinned:i},l=o.getRowNode(a);if(l.displayed){var u=t(e),p="function"==typeof(null===(r=u)||void 0===r?void 0:r.toString)?u.toString():u;l.setDataValue(s,p)}}))},t.prototype.processRange=function(e){var t,o=this;this.rangeService.removeAllCellRanges(!0),e.forEach((function(r,n){if(r){var i=r.startRow,s=r.endRow;n===e.length-1&&(t={rowPinned:i.rowPinned,rowIndex:i.rowIndex,columnId:r.startColumn.getColId()},o.setLastFocusedCell(t));var a={rowStartIndex:i.rowIndex,rowStartPinned:i.rowPinned,rowEndIndex:s.rowIndex,rowEndPinned:s.rowPinned,columnStart:r.startColumn,columns:r.columns};o.rangeService.addCellRange(a)}}))},t.prototype.processCell=function(e){var t=e[0],o={rowIndex:t.rowIndex,rowPinned:t.rowPinned},r=this.getRowNode(o),n={rowPinned:t.rowPinned,rowIndex:r.rowIndex,columnId:t.columnId};this.setLastFocusedCell(n,!0)},t.prototype.setLastFocusedCell=function(e,t){var o=e.rowIndex,r=e.columnId,n=e.rowPinned,i=this.gridBodyCtrl.getScrollFeature(),s=this.columnModel.getGridColumn(r);if(s){i.ensureIndexVisible(o),i.ensureColumnVisible(s);var a={rowIndex:o,column:s,rowPinned:n};this.focusService.setFocusedCell(wf(wf({},a),{forceBrowserFocus:!0})),t&&this.rangeService.setRangeToCell(a)}},t.prototype.addRowEditingListeners=function(){var e=this;this.addManagedListener(this.eventService,We.EVENT_ROW_EDITING_STARTED,(function(t){e.activeRowEdit={rowIndex:t.rowIndex,rowPinned:t.rowPinned}})),this.addManagedListener(this.eventService,We.EVENT_ROW_EDITING_STOPPED,(function(){var t=new mf(e.cellValueChanges);e.pushActionsToUndoStack(t),e.activeRowEdit=null}))},t.prototype.addCellEditingListeners=function(){var e=this;this.addManagedListener(this.eventService,We.EVENT_CELL_EDITING_STARTED,(function(t){e.activeCellEdit={column:t.column,rowIndex:t.rowIndex,rowPinned:t.rowPinned}})),this.addManagedListener(this.eventService,We.EVENT_CELL_EDITING_STOPPED,(function(t){if(e.activeCellEdit=null,t.valueChanged&&!e.activeRowEdit&&!e.isPasting&&!e.isRangeInAction){var o=new mf(e.cellValueChanges);e.pushActionsToUndoStack(o)}}))},t.prototype.addPasteListeners=function(){var e=this;this.addManagedListener(this.eventService,We.EVENT_PASTE_START,(function(){e.isPasting=!0})),this.addManagedListener(this.eventService,We.EVENT_PASTE_END,(function(){var t=new mf(e.cellValueChanges);e.pushActionsToUndoStack(t),e.isPasting=!1}))},t.prototype.addFillListeners=function(){var e=this;this.addManagedListener(this.eventService,We.EVENT_FILL_START,(function(){e.isRangeInAction=!0})),this.addManagedListener(this.eventService,We.EVENT_FILL_END,(function(t){var o=new yf(e.cellValueChanges,t.initialRange,t.finalRange);e.pushActionsToUndoStack(o),e.isRangeInAction=!1}))},t.prototype.addCellKeyListeners=function(){var e=this;this.addManagedListener(this.eventService,We.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,(function(){e.isRangeInAction=!0})),this.addManagedListener(this.eventService,We.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,(function(){var t;t=e.rangeService&&e.gridOptionsWrapper.isEnableRangeSelection()?new yf(e.cellValueChanges,void 0,void 0,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_f(arguments[t]));return e}(e.rangeService.getCellRanges())):new mf(e.cellValueChanges),e.pushActionsToUndoStack(t),e.isRangeInAction=!1}))},t.prototype.pushActionsToUndoStack=function(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()},t.prototype.getRowNode=function(e){switch(e.rowPinned){case oe.PINNED_TOP:return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case oe.PINNED_BOTTOM:return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}},Ef([z("focusService")],t.prototype,"focusService",void 0),Ef([z("ctrlsService")],t.prototype,"ctrlsService",void 0),Ef([z("rowModel")],t.prototype,"rowModel",void 0),Ef([z("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Ef([z("cellPositionUtils")],t.prototype,"cellPositionUtils",void 0),Ef([z("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),Ef([z("columnModel")],t.prototype,"columnModel",void 0),Ef([K("rangeService")],t.prototype,"rangeService",void 0),Ef([B],t.prototype,"init",null),Ef([Y("undoRedoService")],t)}(Ge),Rf=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),bf=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Of=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Rf(t,e),t.prototype.findHeader=function(e,t){var o,r,n;if(e.column instanceof Ce?(r="getDisplayedGroup"+t,o=this.columnModel[r](e.column)):(n="getDisplayedCol"+t,o=this.columnModel[n](e.column)),o)return{column:o,headerRowIndex:e.headerRowIndex}},t.prototype.findColAtEdgeForHeaderRow=function(e,t){var o=this.columnModel.getAllDisplayedColumns(),r=o["start"===t?0:o.length-1];if(r){var n=this.ctrlsService.getHeaderRowContainerCtrl(r.getPinned()).getRowType(e);return n==Vl.COLUMN_GROUP?{headerRowIndex:e,column:this.columnModel.getColumnGroupAtLevel(r,e)}:{headerRowIndex:null==n?-1:e,column:r}}},bf([z("columnModel")],t.prototype,"columnModel",void 0),bf([z("ctrlsService")],t.prototype,"ctrlsService",void 0),bf([Y("headerPositionUtils")],t)}(Ge),Pf=function(){function e(){}return e.prototype.buildColumnDefs=function(e,t,o){var r=this,n=[],i={};return e.forEach((function(e){for(var s=!0,a=r.createDefFromColumn(e,t,o),l=e.getOriginalParent();l;){var u=null;if(l.isPadding())l=l.getOriginalParent();else{var p=i[l.getGroupId()];if(p){p.children.push(a),s=!1;break}(u=r.createDefFromGroup(l))&&(u.children=[a],i[u.groupId]=u,a=u,l=l.getOriginalParent())}}s&&n.push(a)})),n},e.prototype.createDefFromGroup=function(e){var t=m(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t},e.prototype.createDefFromColumn=function(e,t,o){var r=m(e.getColDef());return r.colId=e.getColId(),r.width=e.getActualWidth(),r.rowGroup=e.isRowGroupActive(),r.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,r.pivot=e.isPivotActive(),r.pivotIndex=e.isPivotActive()?o.indexOf(e):null,r.aggFunc=e.isValueActive()?e.getAggFunc():null,r.hide=!e.isVisible()||void 0,r.pinned=e.isPinned()?e.getPinned():null,r.sort=e.getSort()?e.getSort():null,r.sortIndex=null!=e.getSortIndex()?e.getSortIndex():null,r},function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s}([Y("columnDefFactory")],e)}(),Tf=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Af=function(){function e(){}return e.prototype.getInitialRowClasses=function(e){var t=[];return n(e.extraCssClass)&&t.push(e.extraCssClass),t.push("ag-row"),t.push(e.rowFocused?"ag-row-focus":"ag-row-no-focus"),e.fadeRowIn&&t.push("ag-opacity-zero"),t.push(e.rowIsEven?"ag-row-even":"ag-row-odd"),e.rowNode.isRowPinned()&&t.push("ag-row-pinned"),e.rowNode.isSelected()&&t.push("ag-row-selected"),e.rowNode.footer&&t.push("ag-row-footer"),t.push("ag-row-level-"+e.rowLevel),e.rowNode.stub&&t.push("ag-row-loading"),e.fullWidthRow&&t.push("ag-full-width-row"),e.expandable&&(t.push("ag-row-group"),t.push(e.rowNode.expanded?"ag-row-group-expanded":"ag-row-group-contracted")),e.rowNode.dragging&&t.push("ag-row-dragging"),ye(t,this.processClassesFromGridOptions(e.rowNode)),ye(t,this.preProcessRowClassRules(e.rowNode)),t.push(e.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),e.firstRowOnPage&&t.push("ag-row-first"),e.lastRowOnPage&&t.push("ag-row-last"),e.fullWidthRow&&(e.pinned===oe.PINNED_LEFT&&t.push("ag-cell-last-left-pinned"),e.pinned===oe.PINNED_RIGHT&&t.push("ag-cell-first-right-pinned")),t},e.prototype.processClassesFromGridOptions=function(e){var t=[],o=function(e){"string"==typeof e?t.push(e):Array.isArray(e)&&e.forEach((function(e){return t.push(e)}))},r=this.gridOptionsWrapper.getRowClass();if(r){if("function"==typeof r)return console.warn("AG Grid: rowClass should not be a function, please use getRowClass instead"),[];o(r)}var n=this.gridOptionsWrapper.getRowClassFunc();return n&&o(n({data:e.data,node:e,rowIndex:e.rowIndex})),t},e.prototype.preProcessRowClassRules=function(e){var t=[];return this.processRowClassRules(e,(function(e){t.push(e)}),(function(e){})),t},e.prototype.processRowClassRules=function(e,t,o){var r={data:e.data,node:e,rowIndex:e.rowIndex,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()};this.stylingService.processClassRules(this.gridOptionsWrapper.rowClassRules(),r,t,o)},e.prototype.calculateRowLevel=function(e){return e.group?e.level:e.parent?e.parent.level+1:0},Tf([z("stylingService")],e.prototype,"stylingService",void 0),Tf([z("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),Tf([Y("rowCssClassCalculator")],e)}(),Df=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},If=function(){function e(){}return e.prototype.doFullSort=function(e,t){var o=e.map((function(e,t){return{currentPos:t,rowNode:e}}));return o.sort(this.compareRowNodes.bind(this,t)),o.map((function(e){return e.rowNode}))},e.prototype.compareRowNodes=function(e,t,o){for(var r=t.rowNode,n=o.rowNode,i=0,s=e.length;i<s;i++){var a,l=e[i],u=l.sort===oe.SORT_DESC,p=this.getValue(r,l.column),c=this.getValue(n,l.column),d=this.getComparator(l,r);if(a=d?d(p,c,r,n,u):on.defaultComparator(p,c,this.gridOptionsWrapper.isAccentedSort()),!isNaN(a)&&0!==a)return l.sort===oe.SORT_ASC?a:-1*a}return t.currentPos-o.currentPos},e.prototype.getComparator=function(e,t){var o=e.column,r=o.getColDef().comparator;if(null!=r)return r;if(o.getColDef().showRowGroup){var n=!t.group&&o.getColDef().field;if(n){var i=this.columnModel.getPrimaryColumn(n);if(i)return i.getColDef().comparator}}},e.prototype.getValue=function(e,t){var o,r;if(!this.gridOptionsWrapper.isColumnsSortingCoupledToGroup())return this.valueService.getValue(t,e,!1,!1);if(e.rowGroupColumn===t){if(this.gridOptionsWrapper.isGroupUseEntireRow(this.columnModel.isPivotActive())){if(t.getColDef().keyCreator)return e.key;var n=null===(o=e.allLeafChildren)||void 0===o?void 0:o[0];return n?this.valueService.getValue(t,n,!1,!1):void 0}var i=this.columnModel.getGroupDisplayColumnForGroup(t.getId());if(!i)return;return null===(r=e.groupData)||void 0===r?void 0:r[i.getId()]}return e.group&&t.getColDef().showRowGroup?void 0:this.valueService.getValue(t,e,!1,!1)},Df([z("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),Df([z("valueService")],e.prototype,"valueService",void 0),Df([z("columnModel")],e.prototype,"columnModel",void 0),Df([Y("rowNodeSorter")],e)}(),Nf=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),xf=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ready=!1,t.readyCallbacks=[],t}var o;return Nf(t,e),o=t,t.prototype.checkReady=function(){if(this.ready=null!=this.gridCtrl&&null!=this.gridBodyCtrl&&null!=this.centerRowContainerCtrl&&null!=this.leftRowContainerCtrl&&null!=this.rightRowContainerCtrl&&null!=this.bottomCenterRowContainerCtrl&&null!=this.bottomLeftRowContainerCtrl&&null!=this.bottomRightRowContainerCtrl&&null!=this.topCenterRowContainerCtrl&&null!=this.topLeftRowContainerCtrl&&null!=this.topRightRowContainerCtrl&&null!=this.stickyTopCenterRowContainerCtrl&&null!=this.stickyTopLeftRowContainerCtrl&&null!=this.stickyTopRightRowContainerCtrl&&null!=this.centerHeaderRowContainerCtrl&&null!=this.leftHeaderRowContainerCtrl&&null!=this.rightHeaderRowContainerCtrl&&null!=this.fakeHScrollCtrl&&null!=this.gridHeaderCtrl,this.ready){var e=this.createReadyParams();this.readyCallbacks.forEach((function(t){return t(e)})),this.readyCallbacks.length=0}},t.prototype.whenReady=function(e){this.ready?e(this.createReadyParams()):this.readyCallbacks.push(e)},t.prototype.createReadyParams=function(){return{centerRowContainerCtrl:this.centerRowContainerCtrl,leftRowContainerCtrl:this.leftRowContainerCtrl,rightRowContainerCtrl:this.rightRowContainerCtrl,bottomCenterRowContainerCtrl:this.bottomCenterRowContainerCtrl,bottomLeftRowContainerCtrl:this.bottomLeftRowContainerCtrl,bottomRightRowContainerCtrl:this.bottomRightRowContainerCtrl,topCenterRowContainerCtrl:this.topCenterRowContainerCtrl,topLeftRowContainerCtrl:this.topLeftRowContainerCtrl,topRightRowContainerCtrl:this.topRightRowContainerCtrl,stickyTopCenterRowContainerCtrl:this.stickyTopCenterRowContainerCtrl,stickyTopLeftRowContainerCtrl:this.stickyTopLeftRowContainerCtrl,stickyTopRightRowContainerCtrl:this.stickyTopRightRowContainerCtrl,centerHeaderRowContainerCtrl:this.centerHeaderRowContainerCtrl,leftHeaderRowContainerCtrl:this.leftHeaderRowContainerCtrl,rightHeaderRowContainerCtrl:this.rightHeaderRowContainerCtrl,fakeHScrollCtrl:this.fakeHScrollCtrl,gridBodyCtrl:this.gridBodyCtrl,gridCtrl:this.gridCtrl,gridHeaderCtrl:this.gridHeaderCtrl}},t.prototype.registerFakeHScrollCtrl=function(e){this.fakeHScrollCtrl=e,this.checkReady()},t.prototype.registerGridHeaderCtrl=function(e){this.gridHeaderCtrl=e,this.checkReady()},t.prototype.registerCenterRowContainerCtrl=function(e){this.centerRowContainerCtrl=e,this.checkReady()},t.prototype.registerLeftRowContainerCtrl=function(e){this.leftRowContainerCtrl=e,this.checkReady()},t.prototype.registerRightRowContainerCtrl=function(e){this.rightRowContainerCtrl=e,this.checkReady()},t.prototype.registerTopCenterRowContainerCtrl=function(e){this.topCenterRowContainerCtrl=e,this.checkReady()},t.prototype.registerTopLeftRowContainerCon=function(e){this.topLeftRowContainerCtrl=e,this.checkReady()},t.prototype.registerTopRightRowContainerCtrl=function(e){this.topRightRowContainerCtrl=e,this.checkReady()},t.prototype.registerStickyTopCenterRowContainerCtrl=function(e){this.stickyTopCenterRowContainerCtrl=e,this.checkReady()},t.prototype.registerStickyTopLeftRowContainerCon=function(e){this.stickyTopLeftRowContainerCtrl=e,this.checkReady()},t.prototype.registerStickyTopRightRowContainerCtrl=function(e){this.stickyTopRightRowContainerCtrl=e,this.checkReady()},t.prototype.registerBottomCenterRowContainerCtrl=function(e){this.bottomCenterRowContainerCtrl=e,this.checkReady()},t.prototype.registerBottomLeftRowContainerCtrl=function(e){this.bottomLeftRowContainerCtrl=e,this.checkReady()},t.prototype.registerBottomRightRowContainerCtrl=function(e){this.bottomRightRowContainerCtrl=e,this.checkReady()},t.prototype.registerHeaderContainer=function(e,t){switch(t){case oe.PINNED_LEFT:this.leftHeaderRowContainerCtrl=e;break;case oe.PINNED_RIGHT:this.rightHeaderRowContainerCtrl=e;break;default:this.centerHeaderRowContainerCtrl=e}this.checkReady()},t.prototype.registerGridBodyCtrl=function(e){this.gridBodyCtrl=e,this.checkReady()},t.prototype.registerGridCtrl=function(e){this.gridCtrl=e,this.checkReady()},t.prototype.getFakeHScrollCtrl=function(){return this.fakeHScrollCtrl},t.prototype.getGridHeaderCtrl=function(){return this.gridHeaderCtrl},t.prototype.getGridCtrl=function(){return this.gridCtrl},t.prototype.getCenterRowContainerCtrl=function(){return this.centerRowContainerCtrl},t.prototype.getTopCenterRowContainerCtrl=function(){return this.topCenterRowContainerCtrl},t.prototype.getBottomCenterRowContainerCtrl=function(){return this.bottomCenterRowContainerCtrl},t.prototype.getStickyTopCenterRowContainerCtrl=function(){return this.stickyTopCenterRowContainerCtrl},t.prototype.getGridBodyCtrl=function(){return this.gridBodyCtrl},t.prototype.getHeaderRowContainerCtrls=function(){return[this.leftHeaderRowContainerCtrl,this.rightHeaderRowContainerCtrl,this.centerHeaderRowContainerCtrl]},t.prototype.getHeaderRowContainerCtrl=function(e){switch(e){case oe.PINNED_LEFT:return this.leftHeaderRowContainerCtrl;case oe.PINNED_RIGHT:return this.rightHeaderRowContainerCtrl;default:return this.centerHeaderRowContainerCtrl}},t.NAME="ctrlsService",function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s}([Y(o.NAME)],t)}(Ge),Mf=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Lf=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.registry={},t}return Mf(t,e),t.prototype.register=function(e){this.registry[e.controllerName]=e.controllerClass},t.prototype.getInstance=function(e){var t=this.registry[e];if(null!=t)return new t},function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s}([Y("ctrlsFactory")],t)}(Ge),Ff=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Gf=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},kf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ff(t,e),t.prototype.setComp=function(e,t,o,r){this.view=e,this.eViewport=o,this.eContainer=r,this.eGui=t,this.addManagedListener(this.eventService,We.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this));var n=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedListener(this.eventService,We.EVENT_DISPLAYED_COLUMNS_CHANGED,n),this.addManagedListener(this.eventService,We.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,n),this.addManagedListener(this.gridOptionsWrapper,eo.PROP_DOM_LAYOUT,n),this.addManagedListener(this.eventService,We.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.onScrollVisibilityChanged(),this.ctrlsService.registerFakeHScrollCtrl(this),this.view.addOrRemoveCssClass("ag-apple-scrollbar",Rt()||bt())},t.prototype.addActiveListenerToggles=function(){var e=this;["mouseenter","mousedown","touchstart"].forEach((function(t){return e.addManagedListener(e.eGui,t,(function(){return e.view.addOrRemoveCssClass("ag-scrollbar-active",!0)}))})),["mouseleave","touchend"].forEach((function(t){return e.addManagedListener(e.eGui,t,(function(){return e.view.addOrRemoveCssClass("ag-scrollbar-active",!1)}))}))},t.prototype.initialiseInvisibleScrollbar=function(){void 0===this.invisibleScrollbar&&(this.enableRtl=this.gridOptionsWrapper.isEnableRtl(),this.invisibleScrollbar=It(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles(),this.refreshCompBottom()))},t.prototype.onPinnedRowDataChanged=function(){this.refreshCompBottom()},t.prototype.refreshCompBottom=function(){if(this.invisibleScrollbar){var e=this.pinnedRowModel.getPinnedBottomTotalHeight();this.view.setBottom(e)}},t.prototype.onScrollVisibilityChanged=function(){void 0===this.invisibleScrollbar&&this.initialiseInvisibleScrollbar(),this.setScrollVisible(),this.setFakeHScrollSpacerWidths()},t.prototype.hideAndShowInvisibleScrollAsNeeded=function(){var e=this;this.addManagedListener(this.eventService,We.EVENT_BODY_SCROLL,(function(t){"horizontal"===t.direction&&e.view.addOrRemoveCssClass("ag-scrollbar-scrolling",!0)})),this.addManagedListener(this.eventService,We.EVENT_BODY_SCROLL_END,(function(){return e.view.addOrRemoveCssClass("ag-scrollbar-scrolling",!1)}))},t.prototype.setFakeHScrollSpacerWidths=function(){var e=this.scrollVisibleService.isVerticalScrollShowing(),t=this.columnModel.getDisplayedColumnsRightWidth(),o=!this.enableRtl&&e,r=this.gridOptionsWrapper.getScrollbarWidth();o&&(t+=r),this.view.setRightSpacerFixedWidth(t),this.view.includeRightSpacerScrollerCss("ag-scroller-corner",t<=r);var n=this.columnModel.getDisplayedColumnsLeftWidth();this.enableRtl&&e&&(n+=r),this.view.setLeftSpacerFixedWidth(n),this.view.includeLeftSpacerScrollerCss("ag-scroller-corner",n<=r)},t.prototype.setScrollVisible=function(){var e=this.scrollVisibleService.isHorizontalScrollShowing(),t=this.invisibleScrollbar,o=this.gridOptionsWrapper.isSuppressHorizontalScroll(),r=e&&this.gridOptionsWrapper.getScrollbarWidth()||0,n=o?0:0===r&&t?15:r;this.view.addOrRemoveCssClass("ag-scrollbar-invisible",t),this.view.setHeight(n),this.view.setViewportHeight(n),this.view.setContainerHeight(n),this.view.addOrRemoveCssClass("ag-hidden",!e)},t.prototype.getViewport=function(){return this.eViewport},t.prototype.getContainer=function(){return this.eContainer},Gf([z("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),Gf([z("columnModel")],t.prototype,"columnModel",void 0),Gf([z("ctrlsService")],t.prototype,"ctrlsService",void 0),Gf([z("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),t}(Ge),Vf=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Hf=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Wf=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return Vf(t,e),t.prototype.postConstruct=function(){var e=this,t={addOrRemoveCssClass:function(t,o){return e.addOrRemoveCssClass(t,o)},setHeight:function(t){return zo(e.getGui(),t)},setBottom:function(t){return e.getGui().style.bottom=t+"px"},setContainerHeight:function(t){return zo(e.eContainer,t)},setViewportHeight:function(t){return zo(e.eViewport,t)},setRightSpacerFixedWidth:function(t){return Yo(e.eRightSpacer,t)},setLeftSpacerFixedWidth:function(t){return Yo(e.eLeftSpacer,t)},includeLeftSpacerScrollerCss:function(t,o){return e.eLeftSpacer.classList.toggle(t,o)},includeRightSpacerScrollerCss:function(t,o){return e.eRightSpacer.classList.toggle(t,o)}};this.createManagedBean(new kf).setComp(t,this.getGui(),this.eViewport,this.eContainer),this.createManagedBean(new Ml((function(t){return e.eContainer.style.width=t+"px"})))},t.TEMPLATE='<div class="ag-body-horizontal-scroll" aria-hidden="true">\n <div class="ag-horizontal-left-spacer" ref="eLeftSpacer"></div>\n <div class="ag-body-horizontal-scroll-viewport" ref="eViewport">\n <div class="ag-body-horizontal-scroll-container" ref="eContainer"></div>\n </div>\n <div class="ag-horizontal-right-spacer" ref="eRightSpacer"></div>\n </div>',Hf([vn("eLeftSpacer")],t.prototype,"eLeftSpacer",void 0),Hf([vn("eRightSpacer")],t.prototype,"eRightSpacer",void 0),Hf([vn("eViewport")],t.prototype,"eViewport",void 0),Hf([vn("eContainer")],t.prototype,"eContainer",void 0),Hf([B],t.prototype,"postConstruct",null),t}(mn),jf=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Bf=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Uf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jf(t,e),t.prototype.postConstruct=function(){var e=this.checkContainerWidths.bind(this);this.addManagedListener(this.eventService,We.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,We.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedListener(this.gridOptionsWrapper,eo.PROP_DOM_LAYOUT,e)},t.prototype.checkContainerWidths=function(){var e=this.gridOptionsWrapper.getDomLayout()===oe.DOM_LAYOUT_PRINT,t=e?0:this.columnModel.getDisplayedColumnsLeftWidth(),o=e?0:this.columnModel.getDisplayedColumnsRightWidth();t!=this.leftWidth&&(this.leftWidth=t,this.eventService.dispatchEvent({type:We.EVENT_LEFT_PINNED_WIDTH_CHANGED})),o!=this.rightWidth&&(this.rightWidth=o,this.eventService.dispatchEvent({type:We.EVENT_RIGHT_PINNED_WIDTH_CHANGED}))},t.prototype.getPinnedRightWidth=function(){return this.rightWidth},t.prototype.getPinnedLeftWidth=function(){return this.leftWidth},Bf([z("columnModel")],t.prototype,"columnModel",void 0),Bf([B],t.prototype,"postConstruct",null),Bf([Y("pinnedWidthService")],t)}(Ge),Yf=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),zf=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Kf=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.events=[],t}return Yf(t,e),t.prototype.postConstruct=function(){this.rowModel.getType()==oe.ROW_MODEL_TYPE_CLIENT_SIDE&&(this.clientSideRowModel=this.rowModel)},t.prototype.dispatchExpanded=function(e){var t=this;null!=this.clientSideRowModel?(this.events.push(e),null==this.dispatchExpandedDebounced&&(this.dispatchExpandedDebounced=this.animationFrameService.debounce((function(){t.clientSideRowModel&&t.clientSideRowModel.onRowGroupOpened(),t.events.forEach((function(e){return t.eventService.dispatchEvent(e)})),t.events=[]}))),this.dispatchExpandedDebounced()):this.eventService.dispatchEvent(e)},zf([z("animationFrameService")],t.prototype,"animationFrameService",void 0),zf([z("rowModel")],t.prototype,"rowModel",void 0),zf([B],t.prototype,"postConstruct",null),zf([Y("rowNodeEventThrottle")],t)}(Ge),$f=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s},qf=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat($f(arguments[t]));return e},Zf=function(){function e(e,t,o){t?(this.gridOptions=t,(new Xf).create(e,t,(function(t){var o=new mh(e);t.createBean(o)}),void 0,o)):console.error("AG Grid: no gridOptions provided to the grid")}return e.prototype.destroy=function(){this.gridOptions&&this.gridOptions.api&&this.gridOptions.api.destroy()},e}(),Xf=function(){function e(){}return e.prototype.create=function(e,t,o,r,n){var i=this,s=!!t.debug,a=this.getRegisteredModules(n),l=this.createBeansList(t.rowModelType,a),u=this.createProvidedBeans(e,t,n);if(l){var p={providedBeanInstances:u,beanClasses:l,debug:s},c=new ph("AG Grid",(function(){return t.debug})),d=new ph("Context",(function(){return p.debug})),h=new W(p,d),f=h.getBean("beans");this.registerModuleUserComponents(f,a),this.registerStackComponents(f,a),this.registerControllers(f,a),o(h),f.ctrlsService.whenReady((function(){i.setColumnsAndData(f),i.dispatchGridReadyEvent(f);var e=re.isRegistered(X.EnterpriseCoreModule);c.log("initialised successfully, enterprise = "+e)})),r&&r(h)}},e.prototype.registerControllers=function(e,t){t.forEach((function(t){t.controllers&&t.controllers.forEach((function(t){return e.ctrlsFactory.register(t)}))}))},e.prototype.registerStackComponents=function(e,t){var o=this.createAgStackComponentsList(t);e.agStackComponentsRegistry.setupComponents(o)},e.prototype.getRegisteredModules=function(e){var t=e?e.modules:null,o=re.getRegisteredModules(),r=[],n={};function i(e,t){var o;n[(o=t).moduleName]||(n[o.moduleName]=!0,r.push(o),re.register(o,e)),t.dependantModules&&t.dependantModules.forEach(i.bind(null,e))}return t&&t.forEach(i.bind(null,!0)),o&&o.forEach(i.bind(null,!re.isPackageBased())),r},e.prototype.registerModuleUserComponents=function(e,t){this.extractModuleEntity(t,(function(e){return e.userComponents?e.userComponents:[]})).forEach((function(t){e.userComponentRegistry.registerDefaultComponent(t.componentName,t.componentClass)}))},e.prototype.createProvidedBeans=function(e,t,o){var r=o?o.frameworkOverrides:null;i(r)&&(r=new Hd);var n={gridOptions:t,eGridDiv:e,globalEventListener:o?o.globalEventListener:null,frameworkOverrides:r};return o&&o.providedBeanInstances&&Object.assign(n,o.providedBeanInstances),n},e.prototype.createAgStackComponentsList=function(e){var t=[{componentName:"AgCheckbox",componentClass:Ju},{componentName:"AgRadioButton",componentClass:xc},{componentName:"AgToggleButton",componentClass:Lc},{componentName:"AgInputTextField",componentClass:Gc},{componentName:"AgInputTextArea",componentClass:Vc},{componentName:"AgInputNumberField",componentClass:Wc},{componentName:"AgInputRange",componentClass:Bc},{componentName:"AgSelect",componentClass:zn},{componentName:"AgSlider",componentClass:zc},{componentName:"AgAngleSelect",componentClass:qc},{componentName:"AgColorPicker",componentClass:sd},{componentName:"AgGridBody",componentClass:Kl},{componentName:"AgHeaderRoot",componentClass:Np},{componentName:"AgSortIndicator",componentClass:Ii},{componentName:"AgPagination",componentClass:sf},{componentName:"AgOverlayWrapper",componentClass:uf},{componentName:"AgGroupComponent",componentClass:ud},{componentName:"AgPanel",componentClass:td},{componentName:"AgDialog",componentClass:nd},{componentName:"AgRowContainer",componentClass:hu},{componentName:"AgFakeHorizontalScroll",componentClass:Wf}],o=this.extractModuleEntity(e,(function(e){return e.agStackComponents?e.agStackComponents:[]}));return t.concat(o)},e.prototype.createBeansList=function(e,t){var o=this.getRowModelClass(e,t);if(o){var r=[o,Za,df,ff,Of,Nh,Hu,ks,Wh,Uh,Yp,ia,Jh,Lp,vc,ua,po,te,eo,Md,Zd,ha,so,Pp,Tc,cc,nh,He,sh,Kd,ru,Lh,th,uh,lo,oc,kp,hs,Qd,Td,Jl,Zh,Ud,gc,Ic,Zl,Eh,Sh,Oh,of,Ah,kh,$p,Sf,ho,Pf,Af,bc,If,xf,Uf,Kf,Lf],n=this.extractModuleEntity(t,(function(e){return e.beans?e.beans:[]}));r.push.apply(r,qf(n));var i=[];return r.forEach((function(e){i.indexOf(e)<0&&i.push(e)})),i}},e.prototype.extractModuleEntity=function(e,t){return[].concat.apply([],qf(e.map(t)))},e.prototype.setColumnsAndData=function(e){var t=e.gridOptionsWrapper.getColumnDefs();e.columnModel.setColumnDefs(t||[],"gridInitializing"),e.rowModel.start()},e.prototype.dispatchGridReadyEvent=function(e){var t={type:We.EVENT_GRID_READY};e.eventService.dispatchEvent(t)},e.prototype.getRowModelClass=function(e,t){e||(e=oe.ROW_MODEL_TYPE_CLIENT_SIDE);var o={};t.forEach((function(e){f(e.rowModels,(function(e,t){o[e]=t}))}));var r=o[e];if(n(r))return r;re.isPackageBased()?[oe.ROW_MODEL_TYPE_VIEWPORT,oe.ROW_MODEL_TYPE_SERVER_SIDE].includes(e)?console.error('AG Grid: Row Model "'+e+"\" not found. Please ensure the package 'ag-grid-enterprise' is imported. Please see: https://www.ag-grid.com/javascript-grid/packages/"):console.error("AG Grid: could not find row model for rowModelType "+e):e===oe.ROW_MODEL_TYPE_INFINITE?console.error('AG Grid: Row Model "Infinite" not found. Please ensure the '+X.InfiniteRowModelModule+" module is registered. Please see: https://www.ag-grid.com/javascript-grid/modules/"):e===oe.ROW_MODEL_TYPE_VIEWPORT?console.error('AG Grid: Row Model "Viewport" not found. Please ensure the AG Grid Enterprise Module '+X.ViewportRowModelModule+" module is registered. Please see: https://www.ag-grid.com/javascript-grid/modules/"):e===oe.ROW_MODEL_TYPE_SERVER_SIDE?console.error('AG Grid: Row Model "Server Side" not found. Please ensure the AG Grid Enterprise Module '+X.ServerSideRowModelModule+" module is registered. Please see: https://www.ag-grid.com/javascript-grid/modules/"):e===oe.ROW_MODEL_TYPE_CLIENT_SIDE?console.error('AG Grid: Row Model "Client Side" not found. Please ensure the '+X.ClientSideRowModelModule+" module is registered. Please see: https://www.ag-grid.com/javascript-grid/modules/"):console.error("AG Grid: could not find row model for rowModelType "+e)},e}();function Qf(e,t,o,r,i){void 0===i&&(i=!1),console.warn("AG Grid: Since ag-grid 11.0.0 defaultGroupComparator is not necessary. You can remove this from your colDef");var s=n(o)&&o.group,a=n(r)&&r.group,l=!s&&!a;return s&&a?p(o.key,r.key,i):l?p(e,t,i):s?1:-1}var Jf,eg=function(){function e(){}return e.prototype.wrap=function(e,t,o,r){var n=this;void 0===o&&(o=[]);var i=this.createWrapper(e,r);return t.forEach((function(e){n.createMethod(i,e,!0)})),o.forEach((function(e){n.createMethod(i,e,!1)})),i},e.prototype.unwrap=function(e){return e},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}(),tg={columnGroup:["column","stackedColumn","normalizedColumn"],barGroup:["bar","stackedBar","normalizedBar"],pieGroup:["pie","doughnut"],lineGroup:["line"],scatterGroup:["scatter","bubble"],areaGroup:["area","stackedArea","normalizedArea"],histogramGroup:["histogram"],combinationGroup:["columnLineCombo","areaColumnCombo","customCombo"]},og=["chartSettings","chartData","chartFormat"],rg=["chartUnlink","chartLink","chartDownload"],ng={settings:"chartSettings",data:"chartData",format:"chartFormat"};!function(e){e.InsideBase="insideBase",e.InsideEnd="insideEnd",e.Center="center",e.OutsideEnd="outsideEnd"}(Jf||(Jf={}));var ig=void 0===o.g?{}:o.g;ig.HTMLElement="undefined"==typeof HTMLElement?{}:HTMLElement,ig.HTMLButtonElement="undefined"==typeof HTMLButtonElement?{}:HTMLButtonElement,ig.HTMLSelectElement="undefined"==typeof HTMLSelectElement?{}:HTMLSelectElement,ig.HTMLInputElement="undefined"==typeof HTMLInputElement?{}:HTMLInputElement,ig.Node="undefined"==typeof Node?{}:Node,ig.MouseEvent="undefined"==typeof MouseEvent?{}:MouseEvent;var sg,ag=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s},lg=function(){function e(t,o,r,n,i,s){this.nextId=0,this.allNodesMap={},this.rootNode=t,this.gridOptionsWrapper=o,this.eventService=r,this.columnModel=n,this.beans=s,this.selectionService=i,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.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[],this.postConstruct()}return e.prototype.postConstruct=function(){this.suppressParentsInRowNodes=this.gridOptionsWrapper.isSuppressParentsInRowNodes(),this.isRowMasterFunc=this.gridOptionsWrapper.getIsRowMasterFunc(),this.doingTreeData=this.gridOptionsWrapper.isTreeData(),this.doingMasterDetail=this.gridOptionsWrapper.isMasterDetail()},e.prototype.getCopyOfNodesMap=function(){return on.cloneObject(this.allNodesMap)},e.prototype.getRowNode=function(e){return this.allNodesMap[e]},e.prototype.setRowData=function(t){var o=this;if("string"!=typeof t){var r=this.rootNode,n=this.rootNode.sibling;r.childrenAfterFilter=null,r.childrenAfterGroup=null,r.childrenAfterAggFilter=null,r.childrenAfterSort=null,r.childrenMapped=null,r.updateHasChildren(),this.nextId=0,this.allNodesMap={},t?r.allLeafChildren=t.map((function(t){return o.createNode(t,o.rootNode,e.TOP_LEVEL)})):(r.allLeafChildren=[],r.childrenAfterGroup=[]),n&&(n.childrenAfterFilter=r.childrenAfterFilter,n.childrenAfterGroup=r.childrenAfterGroup,n.childrenAfterAggFilter=r.childrenAfterAggFilter,n.childrenAfterSort=r.childrenAfterSort,n.childrenMapped=r.childrenMapped,n.allLeafChildren=r.allLeafChildren)}else 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.updateRowData=function(e,t){var o={remove:[],update:[],add:[]},r=[];return this.executeRemove(e,o,r),this.executeUpdate(e,o,r),this.executeAdd(e,o),this.updateSelection(r),t&&on.sortRowNodesByOrder(this.rootNode.allLeafChildren,t),o},e.prototype.updateSelection=function(e){var t=e.length>0;if(t&&e.forEach((function(e){e.setSelected(!1,!1,!0)})),this.selectionService.updateGroupsFromChildrenSelections(),t){var o={type:We.EVENT_SELECTION_CHANGED};this.eventService.dispatchEvent(o)}},e.prototype.executeAdd=function(t,o){var r=this,n=t.add,i=t.addIndex;if(!on.missingOrEmpty(n)){var s,a,l=n.map((function(t){return r.createNode(t,r.rootNode,e.TOP_LEVEL)}));if("number"==typeof i&&i>=0){var u=this.rootNode.allLeafChildren,p=0===i?0:u.reduce((function(e,t,o){var r,n=t.rowIndex,s=null===(r=u[e])||void 0===r?void 0:r.rowIndex;return null!=n&&null!=s&&n<i&&n>s?o:e}),0)+1;s=u.slice(0,p),a=u.slice(p,u.length)}else s=this.rootNode.allLeafChildren,a=[];this.rootNode.allLeafChildren=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ag(arguments[t]));return e}(s,l,a),this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren),o.add=l}},e.prototype.executeRemove=function(e,t,o){var r=this,n=e.remove;if(!on.missingOrEmpty(n)){var i={};n.forEach((function(e){var n=r.lookupRowNode(e);n&&(n.isSelected()&&o.push(n),n.clearRowTopAndRowIndex(),i[n.id]=!0,delete r.allNodesMap[n.id],t.remove.push(n))})),this.rootNode.allLeafChildren=this.rootNode.allLeafChildren.filter((function(e){return!i[e.id]})),this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren)}},e.prototype.executeUpdate=function(t,o,r){var n=this,i=t.update;on.missingOrEmpty(i)||i.forEach((function(t){var i=n.lookupRowNode(t);i&&(i.updateData(t),!i.selectable&&i.isSelected()&&r.push(i),n.setMasterForRow(i,t,e.TOP_LEVEL,!1),o.update.push(i))}))},e.prototype.lookupRowNode=function(e){var t,o=this.gridOptionsWrapper.getRowIdFunc();if(o){var r=o({data:e,level:0});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=this.rootNode.allLeafChildren.find((function(t){return t.data===e}))))return console.error("AG Grid: could not find data item as object was not found",e),console.error("Consider using getRowId to help the Grid find matching row data"),null;return t||null},e.prototype.createNode=function(e,t,o){var r=new ns(this.beans);return r.group=!1,this.setMasterForRow(r,e,o,!0),t&&!this.suppressParentsInRowNodes&&(r.parent=t),r.level=o,r.setDataAndId(e,this.nextId.toString()),this.allNodesMap[r.id]&&console.warn("AG Grid: duplicate node id '"+r.id+"' detected from getRowId callback, this could cause issues in your grid."),this.allNodesMap[r.id]=r,this.nextId++,r},e.prototype.setMasterForRow=function(e,t,o,r){if(this.doingTreeData)e.setMaster(!1),r&&(e.expanded=!1);else if(this.doingMasterDetail?this.isRowMasterFunc?e.setMaster(this.isRowMasterFunc(t)):e.setMaster(!0):e.setMaster(!1),r){var n=this.columnModel.getRowGroupColumns(),i=o+(n?n.length:0);e.expanded=!!e.master&&this.isExpanded(i)}},e.prototype.isExpanded=function(e){var t=this.gridOptionsWrapper.getGroupDefaultExpanded();return-1===t||e<t},e.TOP_LEVEL=0,e.ROOT_NODE_ID="ROOT_NODE_ID",e}(),ug=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),pg=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};!function(e){e[e.Normal=0]="Normal",e[e.AfterFilter=1]="AfterFilter",e[e.AfterFilterAndSort=2]="AfterFilterAndSort",e[e.PivotNodes=3]="PivotNodes"}(sg||(sg={}));var cg,dg=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onRowHeightChanged_debounced=on.debounce(t.onRowHeightChanged.bind(t),100),t.rowsToDisplay=[],t}return ug(t,e),t.prototype.init=function(){var e=this.refreshModel.bind(this,{step:Iu.EVERYTHING}),t=!this.gridOptionsWrapper.isSuppressAnimationFrame(),o=this.refreshModel.bind(this,{step:Iu.EVERYTHING,afterColumnsChanged:!0,keepRenderedRows:!0,animate:t});this.addManagedListener(this.eventService,We.EVENT_NEW_COLUMNS_LOADED,o),this.addManagedListener(this.eventService,We.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.addManagedListener(this.eventService,We.EVENT_COLUMN_VALUE_CHANGED,this.onValueChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_COLUMN_PIVOT_CHANGED,this.refreshModel.bind(this,{step:Iu.PIVOT})),this.addManagedListener(this.eventService,We.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_COLUMN_PIVOT_MODE_CHANGED,e);var r=this.refreshModel.bind(this,{step:Iu.MAP,keepRenderedRows:!0,animate:t});this.addManagedListener(this.gridOptionsWrapper,eo.PROP_GROUP_REMOVE_SINGLE_CHILDREN,r),this.addManagedListener(this.gridOptionsWrapper,eo.PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN,r),this.rootNode=new ns(this.beans),this.nodeManager=new lg(this.rootNode,this.gridOptionsWrapper,this.eventService,this.columnModel,this.selectionService,this.beans)},t.prototype.start=function(){var e=this.gridOptionsWrapper.getRowData();e&&this.setRowData(e)},t.prototype.ensureRowHeightsValid=function(e,t,o,r){var n,i=!1;do{n=!1;for(var s=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(s,o),u=Math.min(a,r),p=l;p<=u;p++){var c=this.getRow(p);if(c.rowHeightEstimated){var d=this.gridOptionsWrapper.getRowHeightForNode(c);c.setRowHeight(d.height),n=!0,i=!0}}n&&this.setRowTopAndRowIndex()}while(n);return i},t.prototype.setRowTopAndRowIndex=function(){for(var e=this.gridOptionsWrapper.getDefaultRowHeight(),t=0,o=new Set,r=this.gridOptionsWrapper.getDomLayout()===oe.DOM_LAYOUT_NORMAL,n=0;n<this.rowsToDisplay.length;n++){var i=this.rowsToDisplay[n];if(null!=i.id&&o.add(i.id),null==i.rowHeight){var s=this.gridOptionsWrapper.getRowHeightForNode(i,r,e);i.setRowHeight(s.height,s.estimated)}i.setRowTop(t),i.setRowIndex(n),t+=i.rowHeight}return o},t.prototype.clearRowTopAndRowIndex=function(e,t){var o=e.isActive(),r=function(e){e&&null!=e.id&&!t.has(e.id)&&e.clearRowTopAndRowIndex()},n=function(e){if(r(e),r(e.detailNode),r(e.sibling),e.hasChildren()&&e.childrenAfterGroup){var t=-1==e.level;o&&!t&&!e.expanded||e.childrenAfterGroup.forEach(n)}};n(this.rootNode)},t.prototype.ensureRowsAtPixel=function(e,t,o){var r=this;void 0===o&&(o=0);var n=this.getRowIndexAtPixel(t),i=this.getRow(n),s=!this.gridOptionsWrapper.isSuppressAnimationFrame();return i!==e[0]&&(e.forEach((function(e){on.removeFromArray(r.rootNode.allLeafChildren,e)})),e.forEach((function(e,t){on.insertIntoArray(r.rootNode.allLeafChildren,e,Math.max(n+o,0)+t)})),this.refreshModel({step:Iu.EVERYTHING,keepRenderedRows:!0,keepEditingRows:!0,animate:s}),!0)},t.prototype.highlightRowAtPixel=function(e,t){var o=null!=t?this.getRowIndexAtPixel(t):null,r=null!=o?this.getRow(o):null;if(r&&e&&r!==e&&null!=t){var n=this.getHighlightPosition(t,r);this.lastHighlightedRow&&this.lastHighlightedRow!==r&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null),r.setHighlighted(n),this.lastHighlightedRow=r}else this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null)},t.prototype.getHighlightPosition=function(e,t){if(!t){var o=this.getRowIndexAtPixel(e);if(!(t=this.getRow(o||0)))return Qn.Below}return e-t.rowTop<t.rowHeight/2?Qn.Above:Qn.Below},t.prototype.getLastHighlightedRowNode=function(){return this.lastHighlightedRow},t.prototype.isLastRowIndexKnown=function(){return!0},t.prototype.getRowCount=function(){return this.rowsToDisplay?this.rowsToDisplay.length:0},t.prototype.getTopLevelRowCount=function(){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return 1;var e=this.rootNode.childrenAfterAggFilter;return e?e.length:0},t.prototype.getTopLevelRowDisplayedIndex=function(e){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return e;var t=this.rootNode.childrenAfterSort[e];if(this.gridOptionsWrapper.isGroupHideOpenParents())for(;t.expanded&&t.childrenAfterSort&&t.childrenAfterSort.length>0;)t=t.childrenAfterSort[0];return t.rowIndex},t.prototype.getRowBounds=function(e){if(on.missing(this.rowsToDisplay))return null;var t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null},t.prototype.onRowGroupOpened=function(){var e=this.gridOptionsWrapper.isAnimateRows();this.refreshModel({step:Iu.MAP,keepRenderedRows:!0,animate:e})},t.prototype.onFilterChanged=function(e){if(!e.afterDataChange){var t=this.gridOptionsWrapper.isAnimateRows(),o=0===e.columns.length||e.columns.some((function(e){return e.isPrimary()}))?Iu.FILTER:Iu.FILTER_AGGREGATES;this.refreshModel({step:o,keepRenderedRows:!0,animate:t})}},t.prototype.onSortChanged=function(){var e=this.gridOptionsWrapper.isAnimateRows();this.refreshModel({step:Iu.SORT,keepRenderedRows:!0,animate:e,keepEditingRows:!0})},t.prototype.getType=function(){return oe.ROW_MODEL_TYPE_CLIENT_SIDE},t.prototype.onValueChanged=function(){this.columnModel.isPivotActive()?this.refreshModel({step:Iu.PIVOT}):this.refreshModel({step:Iu.AGGREGATE})},t.prototype.createChangePath=function(e){var t=on.missingOrEmpty(e),o=new wc(!1,this.rootNode);return(t||this.gridOptionsWrapper.isTreeData())&&o.setInactive(),o},t.prototype.isSuppressModelUpdateAfterUpdateTransaction=function(e){if(!this.gridOptionsWrapper.isSuppressModelUpdateAfterUpdateTransaction())return!1;if(null==e.rowNodeTransactions)return!1;var t=e.rowNodeTransactions.filter((function(e){return null!=e.add&&e.add.length>0||null!=e.remove&&e.remove.length>0}));return null==t||0==t.length},t.prototype.refreshModel=function(e){if(!this.isSuppressModelUpdateAfterUpdateTransaction(e)){var t=this.createChangePath(e.rowNodeTransactions);switch(e.step){case Iu.EVERYTHING:this.doRowGrouping(e.groupState,e.rowNodeTransactions,e.rowNodeOrder,t,!!e.afterColumnsChanged);case Iu.FILTER:this.doFilter(t);case Iu.PIVOT:this.doPivot(t);case Iu.AGGREGATE:this.doAggregate(t);case Iu.FILTER_AGGREGATES:this.doFilterAggregates(t);case Iu.SORT:this.doSort(e.rowNodeTransactions,t);case Iu.MAP:this.doRowsToDisplay()}var o=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(t,o);var r={type:We.EVENT_MODEL_UPDATED,animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack};this.eventService.dispatchEvent(r)}},t.prototype.isEmpty=function(){var e=on.missing(this.rootNode.allLeafChildren)||0===this.rootNode.allLeafChildren.length;return on.missing(this.rootNode)||e||!this.columnModel.isReady()},t.prototype.isRowsToRender=function(){return on.exists(this.rowsToDisplay)&&this.rowsToDisplay.length>0},t.prototype.getNodesInRangeForSelection=function(e,t){var o,r=!t,n=!1,i=[],s=this.gridOptionsWrapper.isGroupSelectsChildren();return this.forEachNodeAfterFilterAndSort((function(a){var l=r&&!n;if(r||a!==t&&a!==e||(r=!0),!a.group||!s){var u=r&&!n,p=a.isParentOfNode(o);(u||p)&&i.push(a)}l&&(a!==t&&a!==e||(n=!0,o=a===t?t:e))})),i},t.prototype.setDatasource=function(e){console.error("AG Grid: should never call setDatasource on clientSideRowController")},t.prototype.getTopLevelNodes=function(){return this.rootNode?this.rootNode.childrenAfterGroup:null},t.prototype.getRootNode=function(){return this.rootNode},t.prototype.getRow=function(e){return this.rowsToDisplay[e]},t.prototype.isRowPresent=function(e){return this.rowsToDisplay.indexOf(e)>=0},t.prototype.getRowIndexAtPixel=function(e){if(this.isEmpty()||0===this.rowsToDisplay.length)return-1;var t=0,o=this.rowsToDisplay.length-1;if(e<=0)return 0;if(on.last(this.rowsToDisplay).rowTop<=e)return this.rowsToDisplay.length-1;for(var r=-1,n=-1;;){var i=Math.floor((t+o)/2),s=this.rowsToDisplay[i];if(this.isRowInPixel(s,e))return i;if(s.rowTop<e?t=i+1:s.rowTop>e&&(o=i-1),r===t&&n===o)return i;r=t,n=o}},t.prototype.isRowInPixel=function(e,t){var o=e.rowTop,r=e.rowTop+e.rowHeight;return o<=t&&r>t},t.prototype.forEachLeafNode=function(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach((function(t,o){return e(t,o)}))},t.prototype.forEachNode=function(e){this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterGroup,e,sg.Normal,0)},t.prototype.forEachNodeAfterFilter=function(e){this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterAggFilter,e,sg.AfterFilter,0)},t.prototype.forEachNodeAfterFilterAndSort=function(e){this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterSort,e,sg.AfterFilterAndSort,0)},t.prototype.forEachPivotNode=function(e){this.recursivelyWalkNodesAndCallback([this.rootNode],e,sg.PivotNodes,0)},t.prototype.recursivelyWalkNodesAndCallback=function(e,t,o,r){if(!e)return r;for(var n=0;n<e.length;n++){var i=e[n];if(t(i,r++),i.hasChildren()){var s=null;switch(o){case sg.Normal:s=i.childrenAfterGroup;break;case sg.AfterFilter:s=i.childrenAfterAggFilter;break;case sg.AfterFilterAndSort:s=i.childrenAfterSort;break;case sg.PivotNodes:s=i.leafGroup?null:i.childrenAfterSort}s&&(r=this.recursivelyWalkNodesAndCallback(s,t,o,r))}}return r},t.prototype.doAggregate=function(e){this.aggregationStage&&this.aggregationStage.execute({rowNode:this.rootNode,changedPath:e})},t.prototype.doFilterAggregates=function(e){this.filterAggregatesStage?this.filterAggregatesStage.execute({rowNode:this.rootNode,changedPath:e}):this.rootNode.childrenAfterAggFilter=this.rootNode.childrenAfterFilter},t.prototype.expandOrCollapseAll=function(e){var t=this.gridOptionsWrapper.isTreeData(),o=this.columnModel.isPivotActive(),r=function(n){n&&n.forEach((function(n){var i=function(){n.expanded=e,r(n.childrenAfterGroup)};t?on.exists(n.childrenAfterGroup)&&i():o?!n.leafGroup&&i():n.group&&i()}))};this.rootNode&&r(this.rootNode.childrenAfterGroup),this.refreshModel({step:Iu.MAP});var n=e?"expandAll":"collapseAll",i={type:We.EVENT_EXPAND_COLLAPSE_ALL,source:n};this.eventService.dispatchEvent(i)},t.prototype.doSort=function(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t})},t.prototype.doRowGrouping=function(e,t,o,r,n){this.groupStage?(t?this.groupStage.execute({rowNode:this.rootNode,rowNodeTransactions:t,rowNodeOrder:o,changedPath:r}):(this.groupStage.execute({rowNode:this.rootNode,changedPath:r,afterColumnsChanged:n}),this.restoreGroupState(e)),this.gridOptionsWrapper.isGroupSelectsChildren()&&this.selectionService.updateGroupsFromChildrenSelections(r)):(this.rootNode.childrenAfterGroup=this.rootNode.allLeafChildren,this.rootNode.sibling&&(this.rootNode.sibling.childrenAfterGroup=this.rootNode.childrenAfterGroup),this.rootNode.updateHasChildren())},t.prototype.restoreGroupState=function(e){e&&on.traverseNodesWithKey(this.rootNode.childrenAfterGroup,(function(t,o){"boolean"==typeof e[o]&&(t.expanded=e[o])}))},t.prototype.doFilter=function(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})},t.prototype.doPivot=function(e){this.pivotStage&&this.pivotStage.execute({rowNode:this.rootNode,changedPath:e})},t.prototype.getGroupState=function(){if(!this.rootNode.childrenAfterGroup||!this.gridOptionsWrapper.isRememberGroupStateWhenNewData())return null;var e={};return on.traverseNodesWithKey(this.rootNode.childrenAfterGroup,(function(t,o){return e[o]=t.expanded})),e},t.prototype.getCopyOfNodesMap=function(){return this.nodeManager.getCopyOfNodesMap()},t.prototype.getRowNode=function(e){if("string"==typeof e&&0==e.indexOf(ns.ID_PREFIX_ROW_GROUP)){var t=void 0;return this.forEachNode((function(o){o.id===e&&(t=o)})),t}return this.nodeManager.getRowNode(e)},t.prototype.setRowData=function(e){var t=this.getGroupState();this.nodeManager.setRowData(e),this.selectionService.reset(),this.filterManager.onNewRowsLoaded("rowDataUpdated");var o={type:We.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(o),this.refreshModel({step:Iu.EVERYTHING,groupState:t,newData:!0})},t.prototype.batchUpdateRowData=function(e,t){var o=this;if(null==this.applyAsyncTransactionsTimeout){this.rowDataTransactionBatch=[];var r=this.gridOptionsWrapper.getAsyncTransactionWaitMillis();this.applyAsyncTransactionsTimeout=window.setTimeout((function(){o.executeBatchUpdateRowData()}),r)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})},t.prototype.flushAsyncTransactions=function(){null!=this.applyAsyncTransactionsTimeout&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())},t.prototype.executeBatchUpdateRowData=function(){var e=this;this.valueCache.onDataChanged();var t=[],o=[],r=!1;if(this.rowDataTransactionBatch&&this.rowDataTransactionBatch.forEach((function(n){var i=e.nodeManager.updateRowData(n.rowDataTransaction,void 0);o.push(i),n.callback&&t.push(n.callback.bind(null,i)),"number"==typeof n.rowDataTransaction.addIndex&&(r=!0)})),this.commonUpdateRowData(o,void 0,r),t.length>0&&window.setTimeout((function(){t.forEach((function(e){return e()}))}),0),o.length>0){var n={type:We.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:o};this.eventService.dispatchEvent(n)}this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0},t.prototype.updateRowData=function(e,t){this.valueCache.onDataChanged();var o=this.nodeManager.updateRowData(e,t),r="number"==typeof e.addIndex;return this.commonUpdateRowData([o],t,r),o},t.prototype.createRowNodeOrder=function(){if(!this.gridOptionsWrapper.isSuppressMaintainUnsortedOrder()){var e={};if(this.rootNode&&this.rootNode.allLeafChildren)for(var t=0;t<this.rootNode.allLeafChildren.length;t++)e[this.rootNode.allLeafChildren[t].id]=t;return e}},t.prototype.commonUpdateRowData=function(e,t,o){var r=!this.gridOptionsWrapper.isSuppressAnimationFrame();o&&(t=this.createRowNodeOrder()),this.refreshModel({step:Iu.EVERYTHING,rowNodeTransactions:e,rowNodeOrder:t,keepRenderedRows:!0,keepEditingRows:!0,animate:r}),this.filterManager.onNewRowsLoaded("rowDataUpdated");var n={type:We.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(n)},t.prototype.doRowsToDisplay=function(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})},t.prototype.onRowHeightChanged=function(){this.refreshModel({step:Iu.MAP,keepRenderedRows:!0,keepEditingRows:!0,keepUndoRedoStack:!0})},t.prototype.onRowHeightChangedDebounced=function(){this.onRowHeightChanged_debounced()},t.prototype.resetRowHeights=function(){var e=!1;this.forEachNode((function(t){t.setRowHeight(t.rowHeight,!0);var o=t.detailNode;o&&o.setRowHeight(o.rowHeight,!0),e=!0})),e&&this.onRowHeightChanged()},pg([z("columnModel")],t.prototype,"columnModel",void 0),pg([z("selectionService")],t.prototype,"selectionService",void 0),pg([z("filterManager")],t.prototype,"filterManager",void 0),pg([z("valueCache")],t.prototype,"valueCache",void 0),pg([z("beans")],t.prototype,"beans",void 0),pg([z("filterStage")],t.prototype,"filterStage",void 0),pg([z("sortStage")],t.prototype,"sortStage",void 0),pg([z("flattenStage")],t.prototype,"flattenStage",void 0),pg([K("groupStage")],t.prototype,"groupStage",void 0),pg([K("aggregationStage")],t.prototype,"aggregationStage",void 0),pg([K("pivotStage")],t.prototype,"pivotStage",void 0),pg([K("filterAggregatesStage")],t.prototype,"filterAggregatesStage",void 0),pg([B],t.prototype,"init",null),pg([Y("rowModel")],t)}(Ge),hg=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),fg=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},gg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hg(t,e),t.prototype.execute=function(e){var t=e.changedPath;this.filterService.filter(t)},fg([z("filterService")],t.prototype,"filterService",void 0),fg([Y("filterStage")],t)}(Ge),mg=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),yg=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},vg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return mg(t,e),t.prototype.execute=function(e){var t=this,o=this.sortController.getSortOptions(),r=on.exists(o)&&o.length>0,n=r&&on.exists(e.rowNodeTransactions)&&this.gridOptionsWrapper.isDeltaSort(),i=o.some((function(e){return!!t.columnModel.getGroupDisplayColumnForGroup(e.column.getId())}));this.sortService.sort(o,r,n,e.rowNodeTransactions,e.changedPath,i)},yg([z("sortService")],t.prototype,"sortService",void 0),yg([z("sortController")],t.prototype,"sortController",void 0),yg([z("columnModel")],t.prototype,"columnModel",void 0),yg([Y("sortStage")],t)}(Ge),Cg=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),wg=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Eg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Cg(t,e),t.prototype.execute=function(e){var t=e.rowNode,o=[],r={value:0},n=this.columnModel.isPivotMode(),i=n&&t.leafGroup,s=i?[t]:t.childrenAfterSort;return this.recursivelyAddToRowsToDisplay(s,o,r,n,0),!i&&o.length>0&&this.gridOptionsWrapper.isGroupIncludeTotalFooter()&&(this.ensureFooterNodeExists(t),this.addRowNodeToRowsToDisplay(t.sibling,o,r,0)),o},t.prototype.recursivelyAddToRowsToDisplay=function(e,t,o,r,n){if(!on.missingOrEmpty(e))for(var i=this.gridOptionsWrapper.isGroupHideOpenParents(),s=this.gridOptionsWrapper.isGroupRemoveSingleChildren(),a=!s&&this.gridOptionsWrapper.isGroupRemoveLowestSingleChildren(),l=0;l<e.length;l++){var u=e[l],p=u.hasChildren(),c=r&&!p,d=s&&p&&1===u.childrenAfterGroup.length,h=a&&p&&u.leafGroup&&1===u.childrenAfterGroup.length,f=r&&u.leafGroup,g=i&&u.expanded&&!u.master&&!f;if(!(c||g||d||h)&&this.addRowNodeToRowsToDisplay(u,t,o,n),!r||!u.leafGroup)if(p){var m=d||h;if(u.expanded||m){var y=m?n:n+1;this.recursivelyAddToRowsToDisplay(u.childrenAfterSort,t,o,r,y),this.gridOptionsWrapper.isGroupIncludeFooter()&&(this.ensureFooterNodeExists(u),this.addRowNodeToRowsToDisplay(u.sibling,t,o,n))}}else if(u.master&&u.expanded){var v=this.createDetailNode(u);this.addRowNodeToRowsToDisplay(v,t,o,n)}}},t.prototype.addRowNodeToRowsToDisplay=function(e,t,o,r){var n=this.gridOptionsWrapper.isGroupMultiAutoColumn();t.push(e),e.setUiLevel(n?0:r)},t.prototype.ensureFooterNodeExists=function(e){if(!on.exists(e.sibling)){var t=new ns(this.beans);Object.keys(e).forEach((function(o){t[o]=e[o]})),t.footer=!0,t.setRowTop(null),t.setRowIndex(null),t.oldRowTop=null,on.exists(t.id)&&(t.id="rowGroupFooter_"+t.id),t.sibling=e,e.sibling=t}},t.prototype.createDetailNode=function(e){if(on.exists(e.detailNode))return e.detailNode;var t=new ns(this.beans);return t.detail=!0,t.selectable=!1,t.parent=e,on.exists(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,t},wg([z("columnModel")],t.prototype,"columnModel",void 0),wg([z("beans")],t.prototype,"beans",void 0),wg([Y("flattenStage")],t)}(Ge),_g=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Sg=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Rg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _g(t,e),t.prototype.init=function(){this.postSortFunc=this.gridOptionsWrapper.getPostSortFunc()},t.prototype.sort=function(e,t,o,r,n,i){var s=this,a=this.gridOptionsWrapper.isGroupMaintainOrder(),l=this.columnModel.getAllGridColumns().some((function(e){return e.isRowGroupActive()})),u={};o&&r&&(u=this.calculateDirtyNodes(r));var p=this.columnModel.isPivotMode();n&&n.forEachChangedNodeDepthFirst((function(r){s.pullDownGroupDataForHideOpenParents(r.childrenAfterAggFilter,!0);var c=p&&r.leafGroup,d=a&&l&&!r.leafGroup&&!i;if(!t||d||c){var h=r.childrenAfterAggFilter.slice(0);if(a&&r.childrenAfterSort){var f=r.childrenAfterSort.reduce((function(e,t,o){return e[t.id]=o,e}),{});h.sort((function(e,t){return(f[e.id]||0)-(f[t.id]||0)}))}r.childrenAfterSort=h}else r.childrenAfterSort=o?s.doDeltaSort(r,u,n,e):s.rowNodeSorter.doFullSort(r.childrenAfterAggFilter,e);if(r.sibling&&(r.sibling.childrenAfterSort=r.childrenAfterSort),s.updateChildIndexes(r),s.postSortFunc){var g={nodes:r.childrenAfterSort};s.postSortFunc(g)}})),this.updateGroupDataForHideOpenParents(n)},t.prototype.calculateDirtyNodes=function(e){var t={},o=function(e){e&&e.forEach((function(e){return t[e.id]=!0}))};return e&&e.forEach((function(e){o(e.add),o(e.update),o(e.remove)})),t},t.prototype.doDeltaSort=function(e,t,o,r){var n=this,i=e.childrenAfterAggFilter,s=e.childrenAfterSort;if(!s)return this.rowNodeSorter.doFullSort(i,r);var a={},l=[];i.forEach((function(e){t[e.id]||!o.canSkip(e)?l.push(e):a[e.id]=!0}));var u=s.filter((function(e){return a[e.id]})),p=function(e,t){return{currentPos:t,rowNode:e}},c=l.map(p).sort((function(e,t){return n.rowNodeSorter.compareRowNodes(r,e,t)}));return this.mergeSortedArrays(r,c,u.map(p)).map((function(e){return e.rowNode}))},t.prototype.mergeSortedArrays=function(e,t,o){for(var r=[],n=0,i=0;n<t.length&&i<o.length;)this.rowNodeSorter.compareRowNodes(e,t[n],o[i])<0?r.push(t[n++]):r.push(o[i++]);for(;n<t.length;)r.push(t[n++]);for(;i<o.length;)r.push(o[i++]);return r},t.prototype.updateChildIndexes=function(e){if(!on.missing(e.childrenAfterSort))for(var t=e.childrenAfterSort,o=0;o<t.length;o++){var r=t[o],n=0===o,i=o===e.childrenAfterSort.length-1;r.setFirstChild(n),r.setLastChild(i),r.setChildIndex(o)}},t.prototype.updateGroupDataForHideOpenParents=function(e){var t=this;if(this.gridOptionsWrapper.isGroupHideOpenParents()){if(this.gridOptionsWrapper.isTreeData())return on.doOnce((function(){return console.warn("AG Grid: The property hideOpenParents dose not work with Tree Data. This is because Tree Data has values at the group level, it doesn't make sense to hide them (as opposed to Row Grouping, which only has Aggregated Values at the group level).")}),"sortService.hideOpenParentsWithTreeData"),!1;var o=function(e){t.pullDownGroupDataForHideOpenParents(e.childrenAfterSort,!1),e.childrenAfterSort.forEach((function(e){e.hasChildren()&&o(e)}))};e&&e.executeFromRootNode((function(e){return o(e)}))}},t.prototype.pullDownGroupDataForHideOpenParents=function(e,t){var o=this;this.gridOptionsWrapper.isGroupHideOpenParents()&&!on.missing(e)&&e.forEach((function(e){o.columnModel.getGroupDisplayColumns().forEach((function(r){var n=r.getColDef().showRowGroup;if("string"==typeof n){var i=n,s=o.columnModel.getPrimaryColumn(i);if(s!==e.rowGroupColumn)if(t)e.setGroupValue(r.getId(),void 0);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")}))}))},Sg([z("columnModel")],t.prototype,"columnModel",void 0),Sg([z("rowNodeSorter")],t.prototype,"rowNodeSorter",void 0),Sg([B],t.prototype,"init",null),Sg([Y("sortService")],t)}(Ge),bg=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Og=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Pg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return bg(t,e),t.prototype.filter=function(e){var t=this.filterManager.isColumnFilterPresent()||this.filterManager.isQuickFilterPresent()||this.filterManager.isExternalFilterPresent();this.filterNodes(t,e)},t.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({rowNode:e});return t||r})):t.childrenAfterGroup:t.childrenAfterFilter=t.childrenAfterGroup,t.sibling&&(t.sibling.childrenAfterFilter=t.childrenAfterFilter)};if(this.doingTreeDataFiltering()){var n=function(e,t){if(e.childrenAfterGroup)for(var i=0;i<e.childrenAfterGroup.length;i++){var s=e.childrenAfterGroup[i],a=t||o.filterManager.doesRowPassFilter({rowNode:s});s.childrenAfterGroup?n(e.childrenAfterGroup[i],a):r(s,a)}r(e,t)};t.executeFromRootNode((function(e){return n(e,!1)}))}else t.forEachChangedNodeDepthFirst((function(e){return r(e,!1)}),!0)},t.prototype.doingTreeDataFiltering=function(){return this.gridOptionsWrapper.isTreeData()&&!this.gridOptionsWrapper.isExcludeChildrenWhenTreeDataFiltering()},Og([z("filterManager")],t.prototype,"filterManager",void 0),Og([Y("filterService")],t)}(Ge),Tg=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Ag=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Dg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),t.prototype.postConstruct=function(){this.rowModel.getType()===oe.ROW_MODEL_TYPE_CLIENT_SIDE&&(this.clientSideRowModel=this.rowModel)},t.prototype.isActive=function(){return this.gridOptionsWrapper.isImmutableData()},t.prototype.setRowData=function(e){var t=this.createTransactionForRowData(e);if(t){var o=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var r,n,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return s}(t,2),r=o[0],n=o[1],i=this.clientSideRowModel.updateRowData(r,n);i&&this.rowRenderer.refreshFullWidthRows(i.update)}},t.prototype.createTransactionForRowData=function(e){if(on.missing(this.clientSideRowModel))console.error("AG Grid: ImmutableService only works with ClientSideRowModel");else{var t=this.gridOptionsWrapper.getRowIdFunc();if(null!=t){var o={remove:[],update:[],add:[]},r=this.clientSideRowModel.getCopyOfNodesMap(),n=this.gridOptionsWrapper.isSuppressMaintainUnsortedOrder()?void 0:{};return on.exists(e)&&e.forEach((function(e,i){var s=t({data:e,level:0}),a=r[s];n&&(n[s]=i),a?(a.data!==e&&o.update.push(e),r[s]=void 0):o.add.push(e)})),on.iterateObject(r,(function(e,t){t&&o.remove.push(t.data)})),[o,n]}console.error("AG Grid: ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!")}},Ag([z("rowModel")],t.prototype,"rowModel",void 0),Ag([z("rowRenderer")],t.prototype,"rowRenderer",void 0),Ag([z("columnApi")],t.prototype,"columnApi",void 0),Ag([z("gridApi")],t.prototype,"gridApi",void 0),Ag([z("filterManager")],t.prototype,"filterManager",void 0),Ag([B],t.prototype,"postConstruct",null),Ag([Y("immutableService")],t)}(Ge),Ig={moduleName:X.ClientSideRowModelModule,beans:[gg,vg,Eg,Rg,Pg,Dg],rowModels:{clientSide:dg}},Ng=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),xg=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Mg=function(e){function t(t,o,r){var n=e.call(this,t)||this;return n.parentCache=o,n.params=r,n.startRow=t*r.blockSize,n.endRow=n.startRow+r.blockSize,n}return Ng(t,e),t.prototype.postConstruct=function(){this.createRowNodes()},t.prototype.getBlockStateJson=function(){return{id:""+this.getId(),state:{blockNumber:this.getId(),startRow:this.getStartRow(),endRow:this.getEndRow(),pageStatus:this.getState()}}},t.prototype.setDataAndId=function(e,t,o){!e.id&&e.alreadyRendered&&(e.alreadyRendered=!1),on.exists(t)?e.setDataAndId(t,o.toString()):e.setDataAndId(void 0,void 0)},t.prototype.loadFromDatasource=function(){var e=this,t=this.createLoadParams();on.missing(this.params.datasource.getRows)?console.warn("AG Grid: datasource is missing getRows method"):window.setTimeout((function(){e.params.datasource.getRows(t)}),0)},t.prototype.processServerFail=function(){},t.prototype.createLoadParams=function(){return{startRow:this.getStartRow(),endRow:this.getEndRow(),successCallback:this.pageLoaded.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this,this.getVersion()),sortModel:this.params.sortModel,filterModel:this.params.filterModel,context:this.gridOptionsWrapper.getContext()}},t.prototype.forEachNode=function(e,t,o){var r=this;this.rowNodes.forEach((function(n,i){r.startRow+i<o&&e(n,t.next())}))},t.prototype.getLastAccessed=function(){return this.lastAccessed},t.prototype.getRow=function(e,t){void 0===t&&(t=!1),t||(this.lastAccessed=this.params.lastAccessedSequence.next());var o=e-this.startRow;return this.rowNodes[o]},t.prototype.getStartRow=function(){return this.startRow},t.prototype.getEndRow=function(){return this.endRow},t.prototype.createRowNodes=function(){this.rowNodes=[];for(var e=0;e<this.params.blockSize;e++){var t=this.startRow+e,o=new ns(this.beans);o.setRowHeight(this.params.rowHeight),o.uiLevel=0,o.setRowIndex(t),o.setRowTop(this.params.rowHeight*t),this.rowNodes.push(o)}},t.prototype.processServerResult=function(e){var t=this;this.rowNodes.forEach((function(o,r){var n=e.rowData?e.rowData[r]:void 0;t.setDataAndId(o,n,t.startRow+r)}));var o=null!=e.rowCount&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,o)},t.prototype.destroyRowNodes=function(){this.rowNodes.forEach((function(e){e.clearRowTopAndRowIndex()}))},xg([z("beans")],t.prototype,"beans",void 0),xg([B],t.prototype,"postConstruct",null),xg([U],t.prototype,"destroyRowNodes",null),t}(_c),Lg=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Fg=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Gg=function(e){function t(t){var o=e.call(this)||this;return o.lastRowIndexKnown=!1,o.blocks={},o.blockCount=0,o.rowCount=t.initialRowCount,o.params=t,o}return Lg(t,e),t.prototype.setBeans=function(e){this.logger=e.create("InfiniteCache")},t.prototype.getRow=function(e,t){void 0===t&&(t=!1);var o=Math.floor(e/this.params.blockSize),r=this.blocks[o];if(!r){if(t)return;r=this.createBlock(o)}return r.getRow(e)},t.prototype.createBlock=function(e){var t=this.createBean(new Mg(e,this,this.params));return this.blocks[t.getId()]=t,this.blockCount++,this.purgeBlocksIfNeeded(t),this.params.rowNodeBlockLoader.addBlock(t),t},t.prototype.refreshCache=function(){0==this.blockCount?this.purgeCache():(this.getBlocksInOrder().forEach((function(e){return e.setStateWaitingToLoad()})),this.params.rowNodeBlockLoader.checkBlockToLoad())},t.prototype.destroyAllBlocks=function(){var e=this;this.getBlocksInOrder().forEach((function(t){return e.destroyBlock(t)}))},t.prototype.getRowCount=function(){return this.rowCount},t.prototype.isLastRowIndexKnown=function(){return this.lastRowIndexKnown},t.prototype.pageLoaded=function(e,t){this.isAlive()&&(this.logger.log("onPageLoaded: page = "+e.getId()+", lastRow = "+t),this.checkRowCount(e,t),this.onCacheUpdated())},t.prototype.purgeBlocksIfNeeded=function(e){var o=this,r=this.getBlocksInOrder().filter((function(t){return t!=e}));r.sort((function(e,t){return t.getLastAccessed()-e.getLastAccessed()}));var n=this.params.maxBlocksInCache>0,i=n?this.params.maxBlocksInCache-1:null,s=t.MAX_EMPTY_BLOCKS_TO_KEEP-1;r.forEach((function(e,t){if(e.getState()===Mg.STATE_WAITING_TO_LOAD&&t>=s||n&&t>=i){if(o.isBlockCurrentlyDisplayed(e))return;if(o.isBlockFocused(e))return;o.removeBlockFromCache(e)}}))},t.prototype.isBlockFocused=function(e){var t=this.focusService.getFocusCellToUseAfterRefresh();if(!t)return!1;if(null!=t.rowPinned)return!1;var o=e.getStartRow(),r=e.getEndRow();return t.rowIndex>=o&&t.rowIndex<r},t.prototype.isBlockCurrentlyDisplayed=function(e){var t=e.getStartRow(),o=e.getEndRow()-1;return this.rowRenderer.isRangeInRenderedViewport(t,o)},t.prototype.removeBlockFromCache=function(e){e&&this.destroyBlock(e)},t.prototype.checkRowCount=function(e,t){if("number"==typeof t&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){var o=(e.getId()+1)*this.params.blockSize+this.params.overflowSize;this.rowCount<o&&(this.rowCount=o)}},t.prototype.setRowCount=function(e,t){this.rowCount=e,on.exists(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize==0&&this.rowCount++,this.onCacheUpdated()},t.prototype.forEachNodeDeep=function(e){var t=this,o=new rn;this.getBlocksInOrder().forEach((function(r){return r.forEachNode(e,o,t.rowCount)}))},t.prototype.getBlocksInOrder=function(){return on.getAllValuesInObject(this.blocks).sort((function(e,t){return e.getId()-t.getId()}))},t.prototype.destroyBlock=function(e){delete this.blocks[e.getId()],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)},t.prototype.onCacheUpdated=function(){if(this.isAlive()){this.destroyAllBlocksPastVirtualRowCount();var e={type:We.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)}},t.prototype.destroyAllBlocksPastVirtualRowCount=function(){var e=this,t=[];this.getBlocksInOrder().forEach((function(o){o.getId()*e.params.blockSize>=e.rowCount&&t.push(o)})),t.length>0&&t.forEach((function(t){return e.destroyBlock(t)}))},t.prototype.purgeCache=function(){var e=this;this.getBlocksInOrder().forEach((function(t){return e.removeBlockFromCache(t)})),this.lastRowIndexKnown=!1,0===this.rowCount&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()},t.prototype.getRowNodesInRange=function(e,t){var o=this,r=[],n=-1,i=!1,s=new rn;on.missing(e)&&(i=!0);var a=!1;return this.getBlocksInOrder().forEach((function(l){a||(i&&n+1!==l.getId()?a=!0:(n=l.getId(),l.forEachNode((function(o){var n=o===e||o===t;(i||n)&&r.push(o),n&&(i=!i)}),s,o.rowCount)))})),a||i?[]:r},t.MAX_EMPTY_BLOCKS_TO_KEEP=2,Fg([z("rowRenderer")],t.prototype,"rowRenderer",void 0),Fg([z("focusService")],t.prototype,"focusService",void 0),Fg([(o=0,r=q("loggerFactory"),function(e,t){r(e,t,o)})],t.prototype,"setBeans",null),Fg([U],t.prototype,"destroyAllBlocks",null),t;var o,r}(Ge),kg=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Vg=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Hg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kg(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.addDestroyFunc((function(){return e.destroyCache()})),this.verifyProps())},t.prototype.verifyProps=function(){null!=this.gridOptionsWrapper.getInitialGroupOrderComparator()&&on.doOnce((function(){return console.warn("AG Grid: initialGroupOrderComparator cannot be used with Infinite Row Model. If using Infinite Row Model, then sorting is done on the server side, nothing to do with the client.")}),"IRM.InitialGroupOrderComparator")},t.prototype.start=function(){this.setDatasource(this.gridOptionsWrapper.getDatasource())},t.prototype.destroyDatasource=function(){this.datasource&&(this.getContext().destroyBean(this.datasource),this.rowRenderer.datasourceChanged(),this.datasource=null)},t.prototype.addEventListeners=function(){this.addManagedListener(this.eventService,We.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,We.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this)),this.addManagedListener(this.eventService,We.EVENT_STORE_UPDATED,this.onCacheUpdated.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!on.jsonEquals(this.cacheParams.sortModel,this.sortController.getSortModel())},t.prototype.getType=function(){return oe.ROW_MODEL_TYPE_INFINITE},t.prototype.setDatasource=function(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()},t.prototype.isEmpty=function(){return!this.infiniteCache},t.prototype.isRowsToRender=function(){return!!this.infiniteCache},t.prototype.getNodesInRangeForSelection=function(e,t){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(e,t):[]},t.prototype.reset=function(){if(this.datasource){null!=this.gridOptionsWrapper.getRowIdFunc()||this.selectionService.reset(),this.resetCache();var e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}},t.prototype.createModelUpdatedEvent=function(){return{type:We.EVENT_MODEL_UPDATED,newPage:!1,newData:!1,keepRenderedRows:!0,animate:!1}},t.prototype.resetCache=function(){this.destroyCache(),this.cacheParams={datasource:this.datasource,filterModel:this.filterManager.getFilterModel(),sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,initialRowCount:this.defaultIfInvalid(this.gridOptionsWrapper.getInfiniteInitialRowCount(),1),maxBlocksInCache:this.gridOptionsWrapper.getMaxBlocksInCache(),rowHeight:this.gridOptionsWrapper.getRowHeightAsNumber(),overflowSize:this.defaultIfInvalid(this.gridOptionsWrapper.getCacheOverflowSize(),1),blockSize:this.defaultIfInvalid(this.gridOptionsWrapper.getCacheBlockSize(),100),lastAccessedSequence:new rn},this.infiniteCache=this.createBean(new Gg(this.cacheParams))},t.prototype.defaultIfInvalid=function(e,t){return e>0?e:t},t.prototype.destroyCache=function(){this.infiniteCache&&(this.infiniteCache=this.destroyBean(this.infiniteCache))},t.prototype.onCacheUpdated=function(){var e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)},t.prototype.getRow=function(e){if(this.infiniteCache&&!(e>=this.infiniteCache.getRowCount()))return this.infiniteCache.getRow(e)},t.prototype.getRowNode=function(e){var t;return this.forEachNode((function(o){o.id===e&&(t=o)})),t},t.prototype.forEachNode=function(e){this.infiniteCache&&this.infiniteCache.forEachNodeDeep(e)},t.prototype.getTopLevelRowCount=function(){return this.getRowCount()},t.prototype.getTopLevelRowDisplayedIndex=function(e){return e},t.prototype.getRowIndexAtPixel=function(e){if(0!==this.rowHeight){var t=Math.floor(e/this.rowHeight),o=this.getRowCount()-1;return t>o?o:t}return 0},t.prototype.getRowCount=function(){return this.infiniteCache?this.infiniteCache.getRowCount():0},t.prototype.isRowPresent=function(e){return!!this.getRowNode(e.id)},t.prototype.refreshCache=function(){this.infiniteCache&&this.infiniteCache.refreshCache()},t.prototype.purgeCache=function(){this.infiniteCache&&this.infiniteCache.purgeCache()},t.prototype.isLastRowIndexKnown=function(){return!!this.infiniteCache&&this.infiniteCache.isLastRowIndexKnown()},t.prototype.setRowCount=function(e,t){this.infiniteCache&&this.infiniteCache.setRowCount(e,t)},Vg([z("filterManager")],t.prototype,"filterManager",void 0),Vg([z("sortController")],t.prototype,"sortController",void 0),Vg([z("selectionService")],t.prototype,"selectionService",void 0),Vg([z("rowRenderer")],t.prototype,"rowRenderer",void 0),Vg([z("rowNodeBlockLoader")],t.prototype,"rowNodeBlockLoader",void 0),Vg([B],t.prototype,"init",null),Vg([U],t.prototype,"destroyDatasource",null),Vg([Y("rowModel")],t)}(Ge),Wg={moduleName:X.InfiniteRowModelModule,rowModels:{infinite:Hg}},jg=function(){function e(){}return e.prototype.setBeans=function(e){this.beans=e},e.prototype.getFileName=function(e){var t=this.getDefaultFileExtension();return null!=e&&e.length||(e=this.getDefaultFileName()),-1===e.indexOf(".")?e+"."+t:e},e.prototype.getData=function(e){var t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)},e}(),Bg=function(){function e(e){this.groupColumns=[];var t=e.columnModel,o=e.valueService,r=e.gridOptionsWrapper,n=e.processCellCallback,i=e.processHeaderCallback,s=e.processGroupHeaderCallback,a=e.processRowGroupCallback;this.columnModel=t,this.valueService=o,this.gridOptionsWrapper=r,this.processCellCallback=n,this.processHeaderCallback=i,this.processGroupHeaderCallback=s,this.processRowGroupCallback=a}return e.prototype.prepare=function(e){this.groupColumns=e.filter((function(e){return!!e.getColDef().showRowGroup}))},e.prototype.extractHeaderValue=function(e){var t=this.getHeaderName(this.processHeaderCallback,e);return null!=t?t:""},e.prototype.extractRowCellValue=function(e,t,o,r,n){var i=!this.gridOptionsWrapper.isGroupHideOpenParents()&&this.shouldRenderGroupSummaryCell(n,e,t)?this.createValueForGroupNode(n):this.valueService.getValue(e,n),s=this.processCell({accumulatedRowIndex:o,rowNode:n,column:e,value:i,processCellCallback:this.processCellCallback,type:r});return null!=s?s:""},e.prototype.shouldRenderGroupSummaryCell=function(e,t,o){var r;if(!e||!e.group)return!1;if(-1!==this.groupColumns.indexOf(t)&&(null===(r=e.groupData)||void 0===r?void 0:r[t.getId()]))return!0;var n=this.gridOptionsWrapper.isGroupUseEntireRow(this.columnModel.isPivotMode());return 0===o&&n},e.prototype.getHeaderName=function(e,t){return e?e({column:t,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()}):this.columnModel.getDisplayNameForColumn(t,"csv",!0)},e.prototype.createValueForGroupNode=function(e){if(this.processRowGroupCallback)return this.processRowGroupCallback({node:e,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()});var t=[e.key];if(!this.gridOptionsWrapper.isGroupMultiAutoColumn())for(;e.parent;)e=e.parent,t.push(e.key);return t.reverse().join(" -> ")},e.prototype.processCell=function(e){var t=e.accumulatedRowIndex,o=e.rowNode,r=e.column,n=e.value,i=e.processCellCallback,s=e.type;return i?i({accumulatedRowIndex:t,column:r,node:o,value:n,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext(),type:s}):null!=n?n:""},e}(),Ug=function(){function e(){}return e.download=function(e,t){var o=document.defaultView||window;if(o){var r=document.createElement("a"),n=o.URL.createObjectURL(t);r.setAttribute("href",n),r.setAttribute("download",e),r.style.display="none",document.body.appendChild(r),r.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:o})),document.body.removeChild(r),o.setTimeout((function(){o.URL.revokeObjectURL(n)}),0)}else console.warn("AG Grid: There is no `window` associated with the current `document`")},e}(),Yg=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),zg=function(e){function t(t){var o=e.call(this,t)||this;o.isFirstLine=!0,o.result="";var r=t.suppressQuotes,n=t.columnSeparator;return o.suppressQuotes=r,o.columnSeparator=n,o}return Yg(t,e),t.prototype.addCustomContent=function(e){var t=this;e&&("string"==typeof e?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,"\r\n"),this.result+=e):e.forEach((function(e){t.beginNewLine(),e.forEach((function(e,o){0!==o&&(t.result+=t.columnSeparator),t.result+=t.putInQuotes(e.data.value||""),e.mergeAcross&&t.appendEmptyCells(e.mergeAcross)}))})))},t.prototype.onNewHeaderGroupingRow=function(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}},t.prototype.onNewHeaderGroupingRowColumn=function(e,t,o,r){0!=o&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(r)},t.prototype.appendEmptyCells=function(e){for(var t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")},t.prototype.onNewHeaderRow=function(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}},t.prototype.onNewHeaderRowColumn=function(e,t){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))},t.prototype.onNewBodyRow=function(){return this.beginNewLine(),{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,t,oe.EXPORT_TYPE_CSV,o))},t.prototype.putInQuotes=function(e){return this.suppressQuotes?e:null==e?'""':("string"==typeof e?t=e:"function"==typeof e.toString?t=e.toString():(console.warn("AG Grid: unknown value type during csv conversion"),t=""),'"'+t.replace(/"/g,'""')+'"');var t},t.prototype.parse=function(){return this.result},t.prototype.beginNewLine=function(){this.isFirstLine||(this.result+="\r\n"),this.isFirstLine=!1},t}(Bg),Kg=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),$g=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},qg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kg(t,e),t.prototype.postConstruct=function(){this.setBeans({gridSerializer:this.gridSerializer,gridOptionsWrapper:this.gridOptionsWrapper})},t.prototype.getMergedParams=function(e){var t=this.gridOptionsWrapper.getDefaultExportParams("csv");return Object.assign({},t,e)},t.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.getMergedParams(e),o=this.getData(t),r=new Blob(["\ufeff",o],{type:"text/plain"});return Ug.download(this.getFileName(t.fileName),r),o},t.prototype.exportDataAsCsv=function(e){return this.export(e)},t.prototype.getDataAsCsv=function(e,t){void 0===t&&(t=!1);var o=t?Object.assign({},e):this.getMergedParams(e);return this.getData(o)},t.prototype.getDefaultFileName=function(){return"export.csv"},t.prototype.getDefaultFileExtension=function(){return"csv"},t.prototype.createSerializingSession=function(e){var t=this,o=t.columnModel,r=t.valueService,n=t.gridOptionsWrapper,i=e,s=i.processCellCallback,a=i.processHeaderCallback,l=i.processGroupHeaderCallback,u=i.processRowGroupCallback,p=i.suppressQuotes,c=i.columnSeparator;return new zg({columnModel:o,valueService:r,gridOptionsWrapper:n,processCellCallback:s||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:u||void 0,suppressQuotes:p||!1,columnSeparator:c||","})},t.prototype.isExportSuppressed=function(){return this.gridOptionsWrapper.isSuppressCsvExport()},$g([z("columnModel")],t.prototype,"columnModel",void 0),$g([z("valueService")],t.prototype,"valueService",void 0),$g([z("gridSerializer")],t.prototype,"gridSerializer",void 0),$g([z("gridOptionsWrapper")],t.prototype,"gridOptionsWrapper",void 0),$g([B],t.prototype,"postConstruct",null),$g([Y("csvCreator")],t)}(jg),Zg=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),Xg=function(e,t,o,r){var n,i=arguments.length,s=i<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--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};!function(e){e[e.HEADER_GROUPING=0]="HEADER_GROUPING",e[e.HEADER=1]="HEADER",e[e.BODY=2]="BODY"}(cg||(cg={}));var Qg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Zg(t,e),t.prototype.serialize=function(e,t){void 0===t&&(t={});var o=this.getColumnsToExport(t.allColumns,t.columnKeys);return on.compose(this.prepareSession(o),this.prependContent(t),this.exportColumnGroups(t,o),this.exportHeaders(t,o),this.processPinnedTopRows(t,o),this.processRows(t,o),this.processPinnedBottomRows(t,o),this.appendContent(t))(e).parse()},t.prototype.processRow=function(e,t,o,r){var n=t.shouldRowBeSkipped||function(){return!1},i=this.gridOptionsWrapper,s=i.getContext(),a=i.getApi(),l=i.getColumnApi(),u=i.isGroupRemoveSingleChildren(),p=i.isGroupRemoveLowestSingleChildren(),c=null!=t.rowPositions,d=c||!!t.onlySelected,h=i.isGroupHideOpenParents()&&!d,f=this.columnModel.isPivotMode()?r.leafGroup:!r.group,g=t.skipGroups||t.skipRowGroups,m=p&&r.leafGroup,y=1===r.allChildrenCount&&(u||m);if(g&&t.skipGroups&&on.doOnce((function(){return console.warn("AG Grid: Since v25.2 `skipGroups` has been renamed to `skipRowGroups`.")}),"gridSerializer-skipGroups"),!(!f&&(t.skipRowGroups||y||h)||t.onlySelected&&!r.isSelected()||t.skipPinnedTop&&"top"===r.rowPinned||t.skipPinnedBottom&&"bottom"===r.rowPinned)&&(-1!==r.level||r.leafGroup||r.footer&&c)&&!n({node:r,api:a,columnApi:l,context:s})){var v=e.onNewBodyRow();if(o.forEach((function(e,t){v.onColumn(e,t,r)})),t.getCustomContentBelowRow){var C=t.getCustomContentBelowRow({node:r,api:a,columnApi:l,context:s});C&&e.addCustomContent(C)}}},t.prototype.appendContent=function(e){return function(t){var o=e.customFooter||e.appendContent;return o&&(e.customFooter&&on.doOnce((function(){return console.warn("AG Grid: Since version 25.2.0 the `customFooter` param has been deprecated. Use `appendContent` instead.")}),"gridSerializer-customFooter"),t.addCustomContent(o)),t}},t.prototype.prependContent=function(e){return function(t){var o=e.customHeader||e.prependContent;return o&&(e.customHeader&&on.doOnce((function(){return console.warn("AG Grid: Since version 25.2.0 the `customHeader` param has been deprecated. Use `prependContent` instead.")}),"gridSerializer-customHeader"),t.addCustomContent(o)),t}},t.prototype.prepareSession=function(e){return function(t){return t.prepare(e),t}},t.prototype.exportColumnGroups=function(e,t){var o=this;return function(r){if(e.skipColumnGroupHeaders)e.columnGroups&&on.doOnce((function(){return console.warn("AG Grid: Since v25.2 the `columnGroups` param has deprecated, and groups are exported by default.")}),"gridSerializer-columnGroups");else{var n=new je,i=o.displayedGroupCreator.createDisplayedGroups(t,o.columnModel.getGridBalancedTree(),n,null);o.recursivelyAddHeaderGroups(i,r,e.processGroupHeaderCallback)}return r}},t.prototype.exportHeaders=function(e,t){return function(o){if(e.skipHeader||e.skipColumnHeaders)e.skipHeader&&on.doOnce((function(){return console.warn("AG Grid: Since v25.2 the `skipHeader` param has been renamed to `skipColumnHeaders`.")}),"gridSerializer-skipHeader");else{var r=o.onNewHeaderRow();t.forEach((function(e,t){r.onColumn(e,t,void 0)}))}return o}},t.prototype.processPinnedTopRows=function(e,t){var o=this;return function(r){var n=o.processRow.bind(o,r,e,t);return e.rowPositions?e.rowPositions.filter((function(e){return"top"===e.rowPinned})).sort((function(e,t){return e.rowIndex-t.rowIndex})).map((function(e){return o.pinnedRowModel.getPinnedTopRow(e.rowIndex)})).forEach(n):o.pinnedRowModel.forEachPinnedTopRow(n),r}},t.prototype.processRows=function(e,t){var o=this;return function(r){var n=o.rowModel,i=n.getType(),s=i===oe.ROW_MODEL_TYPE_CLIENT_SIDE,a=i===oe.ROW_MODEL_TYPE_SERVER_SIDE,l=!s&&e.onlySelected,u=o.processRow.bind(o,r,e,t),p=e.exportedRows,c=void 0===p?"filteredAndSorted":p;return e.rowPositions?e.rowPositions.filter((function(e){return null==e.rowPinned})).sort((function(e,t){return e.rowIndex-t.rowIndex})).map((function(e){return n.getRow(e.rowIndex)})).forEach(u):o.columnModel.isPivotMode()?s?n.forEachPivotNode(u):n.forEachNode(u):e.onlySelectedAllPages||l?o.selectionService.getSelectedNodes().forEach(u):"all"===c?n.forEachNode(u):s||a?n.forEachNodeAfterFilterAndSort(u):n.forEachNode(u),r}},t.prototype.processPinnedBottomRows=function(e,t){var o=this;return function(r){var n=o.processRow.bind(o,r,e,t);return e.rowPositions?e.rowPositions.filter((function(e){return"bottom"===e.rowPinned})).sort((function(e,t){return e.rowIndex-t.rowIndex})).map((function(e){return o.pinnedRowModel.getPinnedBottomRow(e.rowIndex)})).forEach(n):o.pinnedRowModel.forEachPinnedBottomRow(n),r}},t.prototype.getColumnsToExport=function(e,t){void 0===e&&(e=!1);var o=this.columnModel.isPivotMode();return t&&t.length?this.columnModel.getGridColumns(t):e&&!o?(this.gridOptionsWrapper.isTreeData()?this.columnModel.getGridColumns([oe.GROUP_AUTO_COLUMN_ID]):[]).concat(this.columnModel.getAllPrimaryColumns()||[]):this.columnModel.getAllDisplayedColumns()},t.prototype.recursivelyAddHeaderGroups=function(e,t,o){var r=[];e.forEach((function(e){var t=e;t.getChildren&&t.getChildren().forEach((function(e){return r.push(e)}))})),e.length>0&&e[0]instanceof Ce&&this.doAddHeaderHeader(t,e,o),r&&r.length>0&&this.recursivelyAddHeaderGroups(r,t,o)},t.prototype.doAddHeaderHeader=function(e,t,o){var r=this,n=e.onNewHeaderGroupingRow(),i=0;t.forEach((function(e){var t,s=e;t=o?o({columnGroup:s,api:r.gridOptionsWrapper.getApi(),columnApi:r.gridOptionsWrapper.getColumnApi(),context:r.gridOptionsWrapper.getContext()}):r.columnModel.getDisplayNameForColumnGroup(s,"header");var a=s.getLeafColumns().reduce((function(e,t,o,r){var n=on.last(e);return"open"===t.getColumnGroupShow()?n&&null==n[1]||(n=[o],e.push(n)):n&&null==n[1]&&(n[1]=o-1),o===r.length-1&&n&&null==n[1]&&(n[1]=o),e}),[]);n.onColumn(s,t||"",i++,s.getLeafColumns().length-1,a)}))},Xg([z("displayedGroupCreator")],t.prototype,"displayedGroupCreator",void 0),Xg([z("columnModel")],t.prototype,"columnModel",void 0),Xg([z("rowModel")],t.prototype,"rowModel",void 0),Xg([z("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Xg([z("selectionService")],t.prototype,"selectionService",void 0),Xg([z("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),Xg([Y("gridSerializer")],t)}(Ge),Jg={moduleName:X.CsvExportModule,beans:[qg,Qg]},em="\r\n",tm=function(){function e(){}return e.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.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(n){r+=o.returnAttributeIfPopulated(e.prefix+n,e.map[n],t)}))})),e.properties.rawMap&&Object.keys(e.properties.rawMap).forEach((function(n){r+=o.returnAttributeIfPopulated(n,e.properties.rawMap[n],t)})));var n="<"+e.name+r;return e.children||null!=e.textNode?null!=e.textNode?n+">"+e.textNode+"</"+e.name+">"+em:(n+=">\r\n",e.children&&e.children.forEach((function(e){n+=o.createXml(e,t)})),n+"</"+e.name+">"+em):n+"/>"+em},e.returnAttributeIfPopulated=function(e,t,o){if(!t&&""!==t&&0!==t)return"";var r=t;return"boolean"==typeof t&&o&&(r=o(t))," "+e+'="'+r+'"'},e}(),om=new Uint32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),rm=function(){function e(){}return e.addFolders=function(e){e.forEach(this.addFolder.bind(this))},e.addFolder=function(e){this.folders.push({path:e,created:new Date,isBase64:!1})},e.addFile=function(e,t,o){void 0===o&&(o=!1),this.files.push({path:e,created:new Date,content:t,isBase64:o})},e.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.clearStream=function(){this.folders=[],this.files=[]},e.buildFileStream=function(e){var t,o;void 0===e&&(e="");var r=this.folders.concat(this.files),n=r.length,i="",s=0,a=0;try{for(var l=function(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],r=0;if(o)return o.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),u=l.next();!u.done;u=l.next()){var p=u.value,c=this.getHeader(p,s),d=c.fileHeader,h=c.folderHeader,f=c.content;s+=d.length+f.length,a+=h.length,e+=d+f,i+=h}}catch(e){t={error:e}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(t)throw t.error}}return e+i+this.buildFolderEnd(n,a,s)},e.getHeader=function(e,t){var o=e.content,r=e.path,n=e.created,i=e.isBase64,s=on.utf8_encode,a=on.decToHex,l=s(r),u=l!==r,p=this.convertTime(n),c=this.convertDate(n),d="";if(u){var h=a(1,1)+a(this.getFromCrc32Table(l),4)+l;d="up"+a(h.length,2)+h}var f=o?this.getConvertedContent(o,i):{size:0,content:""},g=f.size,m=f.content,y="\n\0"+(u?"\0\b":"\0\0")+"\0\0"+a(p,2)+a(c,2)+a(g?this.getFromCrc32Table(m):0,4)+a(g,4)+a(g,4)+a(l.length,2)+a(d.length,2);return{fileHeader:"PK"+y+l+d,folderHeader:"PK\0"+y+"\0\0\0\0\0\0"+(o?"\0\0\0\0":"\0\0\0")+a(t,4)+l+d,content:m||""}},e.getConvertedContent=function(e,t){return void 0===t&&(t=!1),t&&(e=e.split(";base64,")[1]),{size:(e=t?atob(e):e).length,content:e}},e.buildFolderEnd=function(e,t,o){var r=on.decToHex;return"PK\0\0\0\0"+r(e,2)+r(e,2)+r(t,4)+r(o,4)+"\0\0"},e.buildUint8Array=function(e){for(var t=new Uint8Array(e.length),o=0;o<t.length;o++)t[o]=e.charCodeAt(o);return t},e.getFromCrc32Table=function(e){if(!e.length)return 0;for(var t=e.length,o=new Uint8Array(t),r=0;r<t;r++)o[r]=e.charCodeAt(r);var n=-1,i=0;for(r=0;r<t;r++)i=o[r],n=n>>>8^om[255&(n^i)];return~n},e.convertTime=function(e){var t=e.getHours();return t<<=6,t|=e.getMinutes(),(t<<=5)|e.getSeconds()/2},e.convertDate=function(e){var t=e.getFullYear()-1980;return t<<=4,t|=e.getMonth()+1,(t<<=5)|e.getDate()},e.folders=[],e.files=[],e}(),nm=[Ig,Wg,Jg];re.registerModules(nm)},64159:(e,t,o)=>{o.d(t,{Ay:()=>n});var r=o(47772);const n=r.default;r.CommaAndColonSeparatedRecord,r.ConnectionString,r.redactConnectionString},65317:function(e){!function(t){const o="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${o}\\.${o}\\.${o}\\.${o}$`,"i"),threeOctet:new RegExp(`^${o}\\.${o}\\.${o}$`,"i"),twoOctet:new RegExp(`^${o}\\.${o}$`,"i"),longValue:new RegExp(`^${o}$`,"i")},n=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),s="%[0-9a-z]{1,}",a="(?:[0-9a-f]+::?)+",l={zoneIndex:new RegExp(s,"i"),native:new RegExp(`^(::)?(${a})?([0-9a-f]+)?(::)?(${s})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${o}\\.${o}\\.${o}\\.${o}(${s})?)$`,"i"),transitional:new RegExp(`^((?:${a})|(?:::)(?:${a})?)${o}\\.${o}\\.${o}\\.${o}(${s})?$`,"i")};function u(e,t){if(e.indexOf("::")!==e.lastIndexOf("::"))return null;let o,r,n=0,i=-1,s=(e.match(l.zoneIndex)||[])[0];for(s&&(s=s.substring(1),e=e.replace(/%.+$/,""));(i=e.indexOf(":",i+1))>=0;)n++;if("::"===e.substr(0,2)&&n--,"::"===e.substr(-2,2)&&n--,n>=t)return null;for(r=t-n,o=":";r--;)o+="0:";return":"===(e=e.replace("::",o))[0]&&(e=e.slice(1)),":"===e[e.length-1]&&(e=e.slice(0,-1)),{parts:t=function(){const t=e.split(":"),o=[];for(let e=0;e<t.length;e++)o.push(t[e].length>4?NaN:parseInt(t[e],16));return o}(),zoneId:s}}function p(e,t,o,r){if(e.length!==t.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let n,i=0;for(;r>0;){if(n=o-r,n<0&&(n=0),e[i]>>n!=t[i]>>n)return!1;r-=o,i+=1}return!0}function c(e){if(i.test(e))return parseInt(e,16);if("0"===e[0]&&!isNaN(parseInt(e[1],10))){if(n.test(e))return parseInt(e,8);throw new Error(`ipaddr: cannot parse ${e} as octal`)}return parseInt(e,10)}function d(e,t){for(;e.length<t;)e=`0${e}`;return e}const h={};h.IPv4=function(){function e(e){if(4!==e.length)throw new Error("ipaddr: ipv4 octet count should be 4");let t,o;for(t=0;t<e.length;t++)if(o=e[t],!(0<=o&&o<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=e}return e.prototype.SpecialRanges={unspecified:[[new e([0,0,0,0]),8]],broadcast:[[new e([255,255,255,255]),32]],multicast:[[new e([224,0,0,0]),4]],linkLocal:[[new e([169,254,0,0]),16]],loopback:[[new e([127,0,0,0]),8]],carrierGradeNat:[[new e([100,64,0,0]),10]],private:[[new e([10,0,0,0]),8],[new e([172,16,0,0]),12],[new e([192,168,0,0]),16]],reserved:[[new e([192,0,0,0]),24],[new e([192,0,2,0]),24],[new e([192,88,99,0]),24],[new e([198,18,0,0]),15],[new e([198,51,100,0]),24],[new e([203,0,113,0]),24],[new e([240,0,0,0]),4]],as112:[[new e([192,175,48,0]),24],[new e([192,31,196,0]),24]],amt:[[new e([192,52,193,0]),24]]},e.prototype.kind=function(){return"ipv4"},e.prototype.match=function(e,t){let o;if(void 0===t&&(o=e,e=o[0],t=o[1]),"ipv4"!==e.kind())throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return p(this.octets,e.octets,8,t)},e.prototype.prefixLengthFromSubnetMask=function(){let e=0,t=!1;const o={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0};let r,n,i;for(r=3;r>=0;r-=1){if(n=this.octets[r],!(n in o))return null;if(i=o[n],t&&0!==i)return null;8!==i&&(t=!0),e+=i}return 32-e},e.prototype.range=function(){return h.subnetMatch(this,this.SpecialRanges)},e.prototype.toByteArray=function(){return this.octets.slice(0)},e.prototype.toIPv4MappedAddress=function(){return h.IPv6.parse(`::ffff:${this.toString()}`)},e.prototype.toNormalizedString=function(){return this.toString()},e.prototype.toString=function(){return this.octets.join(".")},e}(),h.IPv4.broadcastAddressFromCIDR=function(e){try{const t=this.parseCIDR(e),o=t[0].toByteArray(),r=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),n=[];let i=0;for(;i<4;)n.push(parseInt(o[i],10)|255^parseInt(r[i],10)),i++;return new this(n)}catch(e){throw new Error("ipaddr: the address does not have IPv4 CIDR format",{cause:e})}},h.IPv4.isIPv4=function(e){return null!==this.parser(e)},h.IPv4.isValid=function(e){try{return new this(this.parser(e)),!0}catch{return!1}},h.IPv4.isValidCIDR=function(e){try{return this.parseCIDR(e),!0}catch{return!1}},h.IPv4.isValidFourPartDecimal=function(e){return!(!h.IPv4.isValid(e)||!e.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},h.IPv4.isValidCIDRFourPartDecimal=function(e){const t=e.match(/^(.+)\/(\d+)$/);return!(!h.IPv4.isValidCIDR(e)||!t)&&h.IPv4.isValidFourPartDecimal(t[1])},h.IPv4.networkAddressFromCIDR=function(e){let t,o,r,n,i;try{for(t=this.parseCIDR(e),r=t[0].toByteArray(),i=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),n=[],o=0;o<4;)n.push(parseInt(r[o],10)&parseInt(i[o],10)),o++;return new this(n)}catch(e){throw new Error("ipaddr: the address does not have IPv4 CIDR format",{cause:e})}},h.IPv4.parse=function(e){const t=this.parser(e);if(null===t)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(t)},h.IPv4.parseCIDR=function(e){let t;if(t=e.match(/^(.+)\/(\d+)$/)){const e=parseInt(t[2]);if(e>=0&&e<=32){const o=[this.parse(t[1]),e];return Object.defineProperty(o,"toString",{value:function(){return this.join("/")}}),o}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},h.IPv4.parser=function(e){let t,o,n;if(t=e.match(r.fourOctet))return function(){const e=t.slice(1,6),r=[];for(let t=0;t<e.length;t++)o=e[t],r.push(c(o));return r}();if(t=e.match(r.longValue)){if(n=c(t[1]),n>4294967295||n<0)throw new Error("ipaddr: address outside defined range");return function(){const e=[];let t;for(t=0;t<=24;t+=8)e.push(n>>t&255);return e}().reverse()}return(t=e.match(r.twoOctet))?function(){const e=t.slice(1,4),o=[];if(n=c(e[1]),n>16777215||n<0)throw new Error("ipaddr: address outside defined range");return o.push(c(e[0])),o.push(n>>16&255),o.push(n>>8&255),o.push(255&n),o}():(t=e.match(r.threeOctet))?function(){const e=t.slice(1,5),o=[];if(n=c(e[2]),n>65535||n<0)throw new Error("ipaddr: address outside defined range");return o.push(c(e[0])),o.push(c(e[1])),o.push(n>>8&255),o.push(255&n),o}():null},h.IPv4.subnetMaskFromPrefixLength=function(e){if(e=parseInt(e),Number.isNaN(e)||e<0||e>32)throw new Error("ipaddr: invalid IPv4 prefix length");const t=[0,0,0,0];let o=0;const r=Math.floor(e/8);for(;o<r;)t[o]=255,o++;return r<4&&(t[r]=Math.pow(2,e%8)-1<<8-e%8),new this(t)},h.IPv6=function(){function e(e,t){let o,r;if(16===e.length)for(this.parts=[],o=0;o<=14;o+=2)this.parts.push(e[o]<<8|e[o+1]);else{if(8!==e.length)throw new Error("ipaddr: ipv6 part count should be 8 or 16");this.parts=e}for(o=0;o<this.parts.length;o++)if(r=this.parts[o],!(0<=r&&r<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");t&&(this.zoneId=t)}return e.prototype.SpecialRanges={unspecified:[new e([0,0,0,0,0,0,0,0]),128],linkLocal:[new e([65152,0,0,0,0,0,0,0]),10],multicast:[new e([65280,0,0,0,0,0,0,0]),8],loopback:[new e([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new e([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new e([0,0,0,0,0,65535,0,0]),96],deprecatedSiteLocal:[new e([65216,0,0,0,0,0,0,0]),10],discard:[new e([256,0,0,0,0,0,0,0]),64],rfc6145:[new e([0,0,0,0,65535,0,0,0]),96],rfc6052:[[new e([100,65435,0,0,0,0,0,0]),96],[new e([100,65435,1,0,0,0,0,0]),48]],"6to4":[new e([8194,0,0,0,0,0,0,0]),16],teredo:[new e([8193,0,0,0,0,0,0,0]),32],benchmarking:[new e([8193,2,0,0,0,0,0,0]),48],amt:[new e([8193,3,0,0,0,0,0,0]),32],as112v6:[[new e([8193,4,274,0,0,0,0,0]),48],[new e([9760,79,32768,0,0,0,0,0]),48]],deprecatedOrchid:[new e([8193,16,0,0,0,0,0,0]),28],orchid2:[new e([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new e([8193,48,0,0,0,0,0,0]),28],segmentRouting:[new e([24320,0,0,0,0,0,0,0]),16],reserved:[[new e([8193,0,0,0,0,0,0,0]),23],[new e([8193,3512,0,0,0,0,0,0]),32],[new e([16383,0,0,0,0,0,0,0]),20]]},e.prototype.isIPv4MappedAddress=function(){return"ipv4Mapped"===this.range()},e.prototype.kind=function(){return"ipv6"},e.prototype.match=function(e,t){let o;if(void 0===t&&(o=e,e=o[0],t=o[1]),"ipv6"!==e.kind())throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return p(this.parts,e.parts,16,t)},e.prototype.prefixLengthFromSubnetMask=function(){let e=0,t=!1;const o={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0};let r,n;for(let i=7;i>=0;i-=1){if(r=this.parts[i],!(r in o))return null;if(n=o[r],t&&0!==n)return null;16!==n&&(t=!0),e+=n}return 128-e},e.prototype.range=function(){return h.subnetMatch(this,this.SpecialRanges)},e.prototype.toByteArray=function(){let e;const t=[],o=this.parts;for(let r=0;r<o.length;r++)e=o[r],t.push(e>>8),t.push(255&e);return t},e.prototype.toFixedLengthString=function(){const e=function(){const e=[];for(let t=0;t<this.parts.length;t++)e.push(d(this.parts[t].toString(16),4));return e}.call(this).join(":");let t="";return this.zoneId&&(t=`%${this.zoneId}`),e+t},e.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");const e=this.parts.slice(-2),t=e[0],o=e[1];return new h.IPv4([t>>8,255&t,o>>8,255&o])},e.prototype.toNormalizedString=function(){const e=function(){const e=[];for(let t=0;t<this.parts.length;t++)e.push(this.parts[t].toString(16));return e}.call(this).join(":");let t="";return this.zoneId&&(t=`%${this.zoneId}`),e+t},e.prototype.toRFC5952String=function(){const e=/((^|:)(0(:|$)){2,})/g;let t="";this.zoneId&&(t=`%${this.zoneId}`);const o=this.toNormalizedString(),r=o.slice(0,o.length-t.length);let n,i=0,s=-1,a=-1;for(;n=e.exec(r);){const e=(n[0].match(/0/g)||[]).length;e>a&&(a=e,i=n.index,s=n[0].length)}return s<0?r+t:`${r.substring(0,i)}::${r.substring(i+s)}${t}`},e.prototype.toString=function(){return this.toRFC5952String()},e}(),h.IPv6.broadcastAddressFromCIDR=function(e){try{const t=this.parseCIDR(e),o=t[0].toByteArray(),r=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),n=[];let i=0;for(;i<16;)n.push(parseInt(o[i],10)|255^parseInt(r[i],10)),i++;return new this(n)}catch(e){throw new Error("ipaddr: the address does not have IPv6 CIDR format",{cause:e})}},h.IPv6.isIPv6=function(e){return null!==this.parser(e)},h.IPv6.isValid=function(e){if("string"==typeof e&&-1===e.indexOf(":"))return!1;try{const t=this.parser(e);return new this(t.parts,t.zoneId),!0}catch{return!1}},h.IPv6.isValidCIDR=function(e){if("string"==typeof e&&-1===e.indexOf(":"))return!1;try{return this.parseCIDR(e),!0}catch{return!1}},h.IPv6.networkAddressFromCIDR=function(e){let t,o,r,n,i;try{for(t=this.parseCIDR(e),r=t[0].toByteArray(),i=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),n=[],o=0;o<16;)n.push(parseInt(r[o],10)&parseInt(i[o],10)),o++;return new this(n)}catch(e){throw new Error("ipaddr: the address does not have IPv6 CIDR format",{cause:e})}},h.IPv6.parse=function(e){const t=this.parser(e);if(null===t)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(t.parts,t.zoneId)},h.IPv6.parseCIDR=function(e){let t,o,r;if((o=e.match(/^(.+)\/(\d+)$/))&&(t=parseInt(o[2]),t>=0&&t<=128))return r=[this.parse(o[1]),t],Object.defineProperty(r,"toString",{value:function(){return this.join("/")}}),r;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},h.IPv6.parser=function(e){let t,o,r,n,i,s;if(r=e.match(l.deprecatedTransitional))return this.parser(`::ffff:${r[1]}`);if(l.native.test(e))return u(e,8);if((r=e.match(l.transitional))&&(s=r[6]||"",t=r[1],r[1].endsWith("::")||(t=t.slice(0,-1)),t=u(t+s,6),t&&t.parts)){for(i=[parseInt(r[2]),parseInt(r[3]),parseInt(r[4]),parseInt(r[5])],o=0;o<i.length;o++)if(n=i[o],!(0<=n&&n<=255))return null;return t.parts.push(i[0]<<8|i[1]),t.parts.push(i[2]<<8|i[3]),{parts:t.parts,zoneId:t.zoneId}}return null},h.IPv6.subnetMaskFromPrefixLength=function(e){if(e=parseInt(e),Number.isNaN(e)||e<0||e>128)throw new Error("ipaddr: invalid IPv6 prefix length");const t=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];let o=0;const r=Math.floor(e/8);for(;o<r;)t[o]=255,o++;return r<16&&(t[r]=Math.pow(2,e%8)-1<<8-e%8),new this(t)},h.fromByteArray=function(e){const t=e.length;if(4===t)return new h.IPv4(e);if(16===t)return new h.IPv6(e);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},h.isValid=function(e){return h.IPv6.isValid(e)||h.IPv4.isValid(e)},h.isValidCIDR=function(e){return h.IPv6.isValidCIDR(e)||h.IPv4.isValidCIDR(e)},h.parse=function(e){if(h.IPv6.isValid(e))return h.IPv6.parse(e);if(h.IPv4.isValid(e))return h.IPv4.parse(e);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},h.parseCIDR=function(e){try{return h.IPv6.parseCIDR(e)}catch{try{return h.IPv4.parseCIDR(e)}catch(e){throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format",{cause:e})}}},h.process=function(e){const t=this.parse(e);return"ipv6"===t.kind()&&t.isIPv4MappedAddress()?t.toIPv4Address():t},h.subnetMatch=function(e,t,o){let r,n,i,s;for(n in null==o&&(o="unicast"),t)if(Object.prototype.hasOwnProperty.call(t,n))for(i=t[n],!i[0]||i[0]instanceof Array||(i=[i]),r=0;r<i.length;r++)if(s=i[r],e.kind()===s[0].kind()&&e.match.apply(e,s))return n;return o},e.exports?e.exports=h:t.ipaddr=h}(this)},66099:function(e,t,o){var r,n=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(t,o);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,n)}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[t.length]=o);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o=r(e),s=0;s<o.length;s++)"default"!==o[s]&&n(t,e,o[s]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.redactValidConnectionString=function(e,t){const o=e.clone(),r=t?.replacementString??"_credentials_",n=t?.redactUsernames??!0;if((o.username||o.password)&&n?(o.username=r,o.password=""):o.password&&(o.password=r),o.searchParams.has("authMechanismProperties")){const e=new a.CommaAndColonSeparatedRecord(o.searchParams.get("authMechanismProperties"));e.get("AWS_SESSION_TOKEN")&&(e.set("AWS_SESSION_TOKEN",r),o.searchParams.set("authMechanismProperties",e.toString()))}return o.searchParams.has("tlsCertificateKeyFilePassword")&&o.searchParams.set("tlsCertificateKeyFilePassword",r),o.searchParams.has("proxyUsername")&&n&&o.searchParams.set("proxyUsername",r),o.searchParams.has("proxyPassword")&&o.searchParams.set("proxyPassword",r),o},t.redactConnectionString=function(e,t){const o=t?.replacementString??"<credentials>",r=t?.redactUsernames??!0;let n;try{n=new a.default(e)}catch{}if(n)return t={...t,replacementString:"___credentials___"},n.redact(t).toString().replace(/___credentials___/g,o);const i=o,s=[e=>e.replace(r?/(\/\/)(.*)(@)/g:/(\/\/[^@]*:)(.*)(@)/g,`$1${i}$3`),e=>e.replace(/(AWS_SESSION_TOKEN(:|%3A))([^,&]+)/gi,`$1${i}`),e=>e.replace(/(tlsCertificateKeyFilePassword=)([^&]+)/gi,`$1${i}`),e=>r?e.replace(/(proxyUsername=)([^&]+)/gi,`$1${i}`):e,e=>e.replace(/(proxyPassword=)([^&]+)/gi,`$1${i}`)];for(const t of s)e=t(e);return e};const a=s(o(47772))},68446:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CommaAndColonSeparatedRecord=t.ConnectionString=t.redactConnectionString=void 0;const r=o(21655),n=o(30149);Object.defineProperty(t,"redactConnectionString",{enumerable:!0,get:function(){return n.redactConnectionString}});const i="__this_is_a_placeholder__",s=/^(?<protocol>[^/]+):\/\/(?:(?<username>[^:@]*)(?::(?<password>[^@]*))?@)?(?<hosts>(?!:)[^/?@]*)(?<rest>.*)/;class a extends Map{delete(e){return super.delete(this._normalizeKey(e))}get(e){return super.get(this._normalizeKey(e))}has(e){return super.has(this._normalizeKey(e))}set(e,t){return super.set(this._normalizeKey(e),t)}_normalizeKey(e){e=`${e}`;for(const t of this.keys())if(t.toLowerCase()===e.toLowerCase()){e=t;break}return e}}class l extends r.URL{}class u extends Error{get name(){return"MongoParseError"}}class p extends l{_hosts;constructor(e,t={}){const{looseValidation:o}=t;if(!o&&!(r=e).startsWith("mongodb://")&&!r.startsWith("mongodb+srv://"))throw new u('Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"');var r;const n=e.match(s);if(!n)throw new u("Invalid connection string");const{protocol:l,username:c,password:d,hosts:h,rest:f}=n.groups??{};if(!o){if(!l||!h)throw new u("Protocol and host list are required in the uri");try{decodeURIComponent(c??""),decodeURIComponent(d??"")}catch(e){throw new u(e.message)}const t=/[:/?#[\]@]/gi;if(c?.match(t))throw new u(`Username contains unescaped characters ${c}`);if(!c||!d){const t=e.replace(`${l}://`,"");if(t.startsWith("@")||t.startsWith(":"))throw new u("URI contained empty userinfo section")}if(d?.match(t))throw new u("Password contains unescaped characters");if(f?.match(/^[^/?]*@/))throw new u("Invalid connection string")}let g="";"string"==typeof c&&(g+=c),"string"==typeof d&&(g+=`:${d}`),g&&(g+="@");try{super(`${l.toLowerCase()}://${g}${i}${f}`)}catch(r){throw o&&new p(e,{...t,looseValidation:!1}),"string"==typeof r.message&&(r.message=r.message.replace(i,h)),r}if(this._hosts=h.split(","),!o){if(this.isSRV&&1!==this.hosts.length)throw new u("mongodb+srv URI cannot have multiple service names");if(this.isSRV&&this.hosts.some((e=>e.includes(":"))))throw new u("mongodb+srv URI cannot have port number")}var m;this.pathname||(this.pathname="/"),Object.setPrototypeOf(this.searchParams,(m=this.searchParams.constructor,class extends m{append(e,t){return super.append(this._normalizeKey(e),t)}delete(e){return super.delete(this._normalizeKey(e))}get(e){return super.get(this._normalizeKey(e))}getAll(e){return super.getAll(this._normalizeKey(e))}has(e){return super.has(this._normalizeKey(e))}set(e,t){return super.set(this._normalizeKey(e),t)}keys(){return super.keys()}values(){return super.values()}entries(){return super.entries()}[Symbol.iterator](){return super[Symbol.iterator]()}_normalizeKey(e){return a.prototype._normalizeKey.call(this,e)}}).prototype)}get host(){return i}set host(e){throw new Error("No single host for connection string")}get hostname(){return i}set hostname(e){throw new Error("No single host for connection string")}get port(){return""}set port(e){throw new Error("No single host for connection string")}get href(){return this.toString()}set href(e){throw new Error("Cannot set href for connection strings")}get isSRV(){return this.protocol.includes("srv")}get hosts(){return this._hosts}set hosts(e){this._hosts=e}toString(){return super.toString().replace(i,this.hosts.join(","))}clone(){return new p(this.toString(),{looseValidation:!0})}redact(e){return(0,n.redactValidConnectionString)(this,e)}typedSearchParams(){return this.searchParams}[Symbol.for("nodejs.util.inspect.custom")](){const{href:e,origin:t,protocol:o,username:r,password:n,hosts:i,pathname:s,search:a,searchParams:l,hash:u}=this;return{href:e,origin:t,protocol:o,username:r,password:n,hosts:i,pathname:s,search:a,searchParams:l,hash:u}}}t.ConnectionString=p,t.CommaAndColonSeparatedRecord=class extends a{constructor(e){super();for(const t of(e??"").split(",")){if(!t)continue;const e=t.indexOf(":");-1===e?this.set(t,""):this.set(t.slice(0,e),t.slice(e+1))}}toString(){return[...this].map((e=>e.join(":"))).join(",")}},t.default=p},69829:function(e,t,o){var r,n=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)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(96652),a=o(46410),l=o(61146),u=o(29072),p=o(67994),c=i(o(83178)),d=function(e){function t(t,o,r,n){var i=e.call(this,t,r,n)||this;return i.staticMarkup=null,i.staticRenderTime=0,i.parentComponent=o,i}return n(t,e),t.prototype.init=function(e){var t=this;return this.eParentElement=this.createParentElement(e),this.renderStaticMarkup(e),new l.AgPromise((function(o){return t.createReactComponent(e,o)}))},t.prototype.createReactComponent=function(e,t){var o=this;this.isStatelessComponent()||(e.ref=function(e){o.componentInstance=e,o.addParentContainerStyleAndClasses(),o.removeStaticMarkup()});var r=s.createElement(this.reactComponent,e),n=a.createPortal(r,this.eParentElement,c.default());this.portal=n,this.portalManager.mountReactPortal(n,this,(function(e){t(e),o.isStatelessComponent()&&(o.isSlowRenderer()&&o.removeStaticMarkup(),setTimeout((function(){o.removeStaticMarkup()})))}))},t.prototype.fallbackMethodAvailable=function(e){return!1},t.prototype.fallbackMethod=function(e,t){},t.prototype.isSlowRenderer=function(){return this.staticRenderTime>=t.SLOW_RENDERING_THRESHOLD},t.prototype.isNullValue=function(){return""===this.staticMarkup},t.prototype.renderStaticMarkup=function(e){if(!this.parentComponent.isDisableStaticMarkup()&&this.componentType.cellRenderer){var t=console.error,o=s.createElement(this.reactComponent,e);try{console.error=function(){};var r=Date.now(),n=p.renderToStaticMarkup(o);this.staticRenderTime=Date.now()-r,console.error=t,""===n?this.staticMarkup=n:n&&(this.staticMarkup=document.createElement("span"),this.staticMarkup.innerHTML=n,this.eParentElement.appendChild(this.staticMarkup))}catch(e){}finally{console.error=t}}},t.prototype.removeStaticMarkup=function(){!this.parentComponent.isDisableStaticMarkup()&&this.componentType.cellRenderer&&this.staticMarkup&&(this.staticMarkup.remove?(this.staticMarkup.remove(),this.staticMarkup=null):this.eParentElement.removeChild&&(this.eParentElement.removeChild(this.staticMarkup),this.staticMarkup=null))},t.prototype.rendered=function(){return this.isNullValue()||!!this.staticMarkup||this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())},t.SLOW_RENDERING_THRESHOLD=3,t}(u.ReactComponent);t.LegacyReactComponent=d},71893:function(e,t,o){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},r.apply(this,arguments)},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=n(o(96652)),s=o(17642),a=o(41320),l=o(30345),u=o(36431);t.default=i.memo((function(e){var t=i.useContext(s.BeansContext).context,o=i.useState(new u.CssClasses),n=o[0],p=o[1],c=i.useState(new u.CssClasses),d=c[0],h=c[1],f=i.useState(),g=f[0],m=f[1],y=i.useState(),v=y[0],C=y[1],w=i.useState(),E=w[0],_=w[1],S=i.useState(),R=S[0],b=S[1],O=i.useState(),P=O[0],T=O[1],A=i.useRef(null),D=i.useRef(null),I=e.ctrl;l.useEffectOnce((function(){var e={setWidth:function(e){return m(e)},addOrRemoveCssClass:function(e,t){return p((function(o){return o.setClass(e,t)}))},setColId:function(e){return _(e)},setTitle:function(e){return C(e)},setUserCompDetails:function(e){return T(e)},addOrRemoveResizableCssClass:function(e,t){return h((function(o){return o.setClass(e,t)}))},setAriaExpanded:function(e){return b(e)}};I.setComp(e,A.current,D.current)})),i.useEffect((function(){return a.showJsComp(P,t,A.current)}),[P]),i.useEffect((function(){var e=void 0;A.current.childNodes.forEach((function(t){null!=t&&t!==D.current&&(e=t)})),e&&I.setDragSource(e)}),[P]);var N=i.useMemo((function(){return{width:g}}),[g]),x=i.useMemo((function(){return"ag-header-group-cell "+n.toString()}),[n]),M=i.useMemo((function(){return"ag-header-cell-resize "+d.toString()}),[d]),L=P&&P.componentFromFramework,F=P&&P.componentClass;return i.default.createElement("div",{ref:A,className:x,style:N,title:v,"col-id":E,role:"columnheader",tabIndex:-1,"aria-expanded":R},L&&i.default.createElement(F,r({},P.params)),i.default.createElement("div",{ref:D,className:M}))}))},74770:(e,t,o)=>{o.d(t,{JS:()=>Le,jN:()=>A});var r,n,i,s,a,l,u,p,c,d,h,f,g,m,y=o(33997),v=o(86637),C=o(42343),w=o(33868),E=o(18578),_=o(21655).URL,S=o(34110).Buffer,R=Symbol.for("vercel.ai.gateway.error"),b=class e extends(n=Error,r=R,n){constructor({message:e,statusCode:t=500,cause:o,generationId:n}){super(n?`${e} [${n}]`:e),this[r]=!0,this.statusCode=t,this.cause=o,this.generationId=n}static isInstance(t){return e.hasMarker(t)}static hasMarker(e){return"object"==typeof e&&null!==e&&R in e&&!0===e[R]}},O="GatewayAuthenticationError",P=`vercel.ai.gateway.error.${O}`,T=Symbol.for(P),A=class e extends(s=b,i=T,s){constructor({message:e="Authentication failed",statusCode:t=401,cause:o,generationId:r}={}){super({message:e,statusCode:t,cause:o,generationId:r}),this[i]=!0,this.name=O,this.type="authentication_error"}static isInstance(e){return b.hasMarker(e)&&T in e}static createContextualError({apiKeyProvided:t,oidcTokenProvided:o,message:r="Authentication failed",statusCode:n=401,cause:i,generationId:s}){let a;return a=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:a,statusCode:n,cause:i,generationId:s})}},D="GatewayInvalidRequestError",I=`vercel.ai.gateway.error.${D}`,N=Symbol.for(I),x=class extends(l=b,a=N,l){constructor({message:e="Invalid request",statusCode:t=400,cause:o,generationId:r}={}){super({message:e,statusCode:t,cause:o,generationId:r}),this[a]=!0,this.name=D,this.type="invalid_request_error"}static isInstance(e){return b.hasMarker(e)&&N in e}},M="GatewayRateLimitError",L=`vercel.ai.gateway.error.${M}`,F=Symbol.for(L),G=class extends(p=b,u=F,p){constructor({message:e="Rate limit exceeded",statusCode:t=429,cause:o,generationId:r}={}){super({message:e,statusCode:t,cause:o,generationId:r}),this[u]=!0,this.name=M,this.type="rate_limit_exceeded"}static isInstance(e){return b.hasMarker(e)&&F in e}},k="GatewayModelNotFoundError",V=`vercel.ai.gateway.error.${k}`,H=Symbol.for(V),W=(0,y.ID)((()=>(0,y.jN)(C.Ik({modelId:C.Yj()})))),j=class extends(d=b,c=H,d){constructor({message:e="Model not found",statusCode:t=404,modelId:o,cause:r,generationId:n}={}){super({message:e,statusCode:t,cause:r,generationId:n}),this[c]=!0,this.name=k,this.type="model_not_found",this.modelId=o}static isInstance(e){return b.hasMarker(e)&&H in e}},B="GatewayInternalServerError",U=`vercel.ai.gateway.error.${B}`,Y=Symbol.for(U),z=class extends(f=b,h=Y,f){constructor({message:e="Internal server error",statusCode:t=500,cause:o,generationId:r}={}){super({message:e,statusCode:t,cause:o,generationId:r}),this[h]=!0,this.name=B,this.type="internal_server_error"}static isInstance(e){return b.hasMarker(e)&&Y in e}},K="GatewayResponseError",$=`vercel.ai.gateway.error.${K}`,q=Symbol.for($),Z=class extends(m=b,g=q,m){constructor({message:e="Invalid response from Gateway",statusCode:t=502,response:o,validationError:r,cause:n,generationId:i}={}){super({message:e,statusCode:t,cause:n,generationId:i}),this[g]=!0,this.name=K,this.type="response_error",this.response=o,this.validationError=r}static isInstance(e){return b.hasMarker(e)&&q in e}};async function X({response:e,statusCode:t,defaultMessage:o="Gateway request failed",cause:r,authMethod:n}){var i;const s=await(0,y.ZZ)({value:e,schema:ee});if(!s.success){const n="object"==typeof e&&null!==e&&"generationId"in e?e.generationId:void 0;return new Z({message:`Invalid error response format: ${o}`,statusCode:t,response:e,validationError:s.error,cause:r,generationId:n})}const a=s.value,l=a.error.type,u=a.error.message,p=null!=(i=a.generationId)?i:void 0;switch(l){case"authentication_error":return A.createContextualError({apiKeyProvided:"api-key"===n,oidcTokenProvided:"oidc"===n,statusCode:t,cause:r,generationId:p});case"invalid_request_error":return new x({message:u,statusCode:t,cause:r,generationId:p});case"rate_limit_exceeded":return new G({message:u,statusCode:t,cause:r,generationId:p});case"model_not_found":{const e=await(0,y.ZZ)({value:a.error.param,schema:W});return new j({message:u,statusCode:t,modelId:e.success?e.value.modelId:void 0,cause:r,generationId:p})}default:return new z({message:u,statusCode:t,cause:r,generationId:p})}}var Q,J,ee=(0,y.ID)((()=>(0,y.jN)(C.Ik({error:C.Ik({message:C.Yj(),type:C.Yj().nullish(),param:C.L5().nullish(),code:C.KC([C.Yj(),C.ai()]).nullish()}),generationId:C.Yj().nullish()})))),te="GatewayTimeoutError",oe=`vercel.ai.gateway.error.${te}`,re=Symbol.for(oe),ne=class e extends(J=b,Q=re,J){constructor({message:e="Request timed out",statusCode:t=408,cause:o,generationId:r}={}){super({message:e,statusCode:t,cause:o,generationId:r}),this[Q]=!0,this.name=te,this.type="timeout_error"}static isInstance(e){return b.hasMarker(e)&&re in e}static createTimeoutError({originalMessage:t,statusCode:o=408,cause:r,generationId:n}){return new e({message:`Gateway request timed out: ${t}\n\n This is a client-side timeout. To resolve this, increase your timeout configuration: https://vercel.com/docs/ai-gateway/capabilities/video-generation#extending-timeouts-for-node.js`,statusCode:o,cause:r,generationId:n})}};function ie(e){if(!(e instanceof Error))return!1;const t=e.code;return"string"==typeof t&&["UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_CONNECT_TIMEOUT"].includes(t)}async function se(e,t){var o;return b.isInstance(e)?e:ie(e)?ne.createTimeoutError({originalMessage:e instanceof Error?e.message:"Unknown error",cause:e}):v.hL.isInstance(e)?e.cause&&ie(e.cause)?ne.createTimeoutError({originalMessage:e.message,cause:e}):await X({response:ae(e),statusCode:null!=(o=e.statusCode)?o:500,defaultMessage:"Gateway request failed",cause:e,authMethod:t}):await X({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="ai-gateway-auth-method";async function ue(e){const t=await(0,y.ZZ)({value:e[le],schema:pe});return t.success?t.value:void 0}var pe=(0,y.ID)((()=>(0,y.jN)(C.KC([C.eu("api-key"),C.eu("oidc")])))),ce=class{constructor(e){this.config=e}async getAvailableModels(){try{const{value:e}=await(0,y.$b)({url:`${this.config.baseURL}/config`,headers:await(0,y.hd)(this.config.headers()),successfulResponseHandler:(0,y.cV)(de),failedResponseHandler:(0,y.sl)({errorSchema:C.bz(),errorToMessage:e=>e}),fetch:this.config.fetch});return e}catch(e){throw await se(e)}}async getCredits(){try{const e=new _(this.config.baseURL),{value:t}=await(0,y.$b)({url:`${e.origin}/v1/credits`,headers:await(0,y.hd)(this.config.headers()),successfulResponseHandler:(0,y.cV)(he),failedResponseHandler:(0,y.sl)({errorSchema:C.bz(),errorToMessage:e=>e}),fetch:this.config.fetch});return t}catch(e){throw await se(e)}}},de=(0,y.ID)((()=>(0,y.jN)(C.Ik({models:C.YO(C.Ik({id:C.Yj(),name:C.Yj(),description:C.Yj().nullish(),pricing:C.Ik({input:C.Yj(),output:C.Yj(),input_cache_read:C.Yj().nullish(),input_cache_write:C.Yj().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:C.Ik({specificationVersion:C.eu("v3"),provider:C.Yj(),modelId:C.Yj()}),modelType:C.k5(["embedding","image","language","video"]).nullish()}))})))),he=(0,y.ID)((()=>(0,y.jN)(C.Ik({balance:C.Yj(),total_used:C.Yj()}).transform((({balance:e,total_used:t})=>({balance:e,totalUsed:t})))))),fe=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3",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,n=await(0,y.hd)(this.config.headers());try{const{responseHeaders:i,value:s,rawValue:a}=await(0,y.GU)({url:this.getUrl(),headers:(0,y.m2)(n,e.headers,this.getModelConfigHeaders(this.modelId,!1),await(0,y.hd)(this.config.o11yHeaders)),body:t,successfulResponseHandler:(0,y.cV)(C.bz()),failedResponseHandler:(0,y.sl)({errorSchema:C.bz(),errorToMessage:e=>e}),...r&&{abortSignal:r},fetch:this.config.fetch});return{...s,request:{body:t},response:{headers:i,body:a},warnings:o}}catch(e){throw await se(e,await ue(n))}}async doStream(e){const{args:t,warnings:o}=await this.getArgs(e),{abortSignal:r}=e,n=await(0,y.hd)(this.config.headers());try{const{value:i,responseHeaders:s}=await(0,y.GU)({url:this.getUrl(),headers:(0,y.m2)(n,e.headers,this.getModelConfigHeaders(this.modelId,!0),await(0,y.hd)(this.config.o11yHeaders)),body:t,successfulResponseHandler:(0,y.Ds)(C.bz()),failedResponseHandler:(0,y.sl)({errorSchema:C.bz(),errorToMessage:e=>e}),...r&&{abortSignal:r},fetch:this.config.fetch});return{stream:i.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 ue(n))}}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=S.from(e).toString("base64");t.data=new _(`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":"3","ai-language-model-id":e,"ai-language-model-streaming":String(t)}}},ge=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0}get provider(){return this.config.provider}async doEmbed({values:e,headers:t,abortSignal:o,providerOptions:r}){var n;const i=await(0,y.hd)(this.config.headers());try{const{responseHeaders:s,value:a,rawValue:l}=await(0,y.GU)({url:this.getUrl(),headers:(0,y.m2)(i,null!=t?t:{},this.getModelConfigHeaders(),await(0,y.hd)(this.config.o11yHeaders)),body:{values:e,...r?{providerOptions:r}:{}},successfulResponseHandler:(0,y.cV)(me),failedResponseHandler:(0,y.sl)({errorSchema:C.bz(),errorToMessage:e=>e}),...o&&{abortSignal:o},fetch:this.config.fetch});return{embeddings:a.embeddings,usage:null!=(n=a.usage)?n:void 0,providerMetadata:a.providerMetadata,response:{headers:s,body:l},warnings:[]}}catch(e){throw await se(e,await ue(i))}}getUrl(){return`${this.config.baseURL}/embedding-model`}getModelConfigHeaders(){return{"ai-embedding-model-specification-version":"3","ai-model-id":this.modelId}}},me=(0,y.ID)((()=>(0,y.jN)(C.Ik({embeddings:C.YO(C.YO(C.ai())),usage:C.Ik({tokens:C.ai()}).nullish(),providerMetadata:C.g1(C.Yj(),C.g1(C.Yj(),C.L5())).optional()})))),ye=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3",this.maxImagesPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:e,n:t,size:o,aspectRatio:r,seed:n,files:i,mask:s,providerOptions:a,headers:l,abortSignal:u}){var p,c,d,h;const f=await(0,y.hd)(this.config.headers());try{const{responseHeaders:g,value:m,rawValue:v}=await(0,y.GU)({url:this.getUrl(),headers:(0,y.m2)(f,null!=l?l:{},this.getModelConfigHeaders(),await(0,y.hd)(this.config.o11yHeaders)),body:{prompt:e,n:t,...o&&{size:o},...r&&{aspectRatio:r},...n&&{seed:n},...a&&{providerOptions:a},...i&&{files:i.map((e=>ve(e)))},...s&&{mask:ve(s)}},successfulResponseHandler:(0,y.cV)(_e),failedResponseHandler:(0,y.sl)({errorSchema:C.bz(),errorToMessage:e=>e}),...u&&{abortSignal:u},fetch:this.config.fetch});return{images:m.images,warnings:null!=(p=m.warnings)?p:[],providerMetadata:m.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:g},...null!=m.usage&&{usage:{inputTokens:null!=(c=m.usage.inputTokens)?c:void 0,outputTokens:null!=(d=m.usage.outputTokens)?d:void 0,totalTokens:null!=(h=m.usage.totalTokens)?h:void 0}}}}catch(e){throw await se(e,await ue(f))}}getUrl(){return`${this.config.baseURL}/image-model`}getModelConfigHeaders(){return{"ai-image-model-specification-version":"3","ai-model-id":this.modelId}}};function ve(e){return"file"===e.type&&e.data instanceof Uint8Array?{...e,data:(0,y.n_)(e.data)}:e}var Ce=C.Ik({images:C.YO(C.L5()).optional()}).catchall(C.L5()),we=C.gM("type",[C.Ik({type:C.eu("unsupported"),feature:C.Yj(),details:C.Yj().optional()}),C.Ik({type:C.eu("compatibility"),feature:C.Yj(),details:C.Yj().optional()}),C.Ik({type:C.eu("other"),message:C.Yj()})]),Ee=C.Ik({inputTokens:C.ai().nullish(),outputTokens:C.ai().nullish(),totalTokens:C.ai().nullish()}),_e=C.Ik({images:C.YO(C.Yj()),warnings:C.YO(we).optional(),providerMetadata:C.g1(C.Yj(),Ce).optional(),usage:Ee.optional()}),Se=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3",this.maxVideosPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:e,n:t,aspectRatio:o,resolution:r,duration:n,fps:i,seed:s,image:a,providerOptions:l,headers:u,abortSignal:p}){var c;const d=await(0,y.hd)(this.config.headers());try{const{responseHeaders:f,value:g,rawValue:m}=await(0,y.GU)({url:this.getUrl(),headers:(0,y.m2)(d,null!=u?u:{},this.getModelConfigHeaders(),await(0,y.hd)(this.config.o11yHeaders)),body:{prompt:e,n:t,...o&&{aspectRatio:o},...r&&{resolution:r},...n&&{duration:n},...i&&{fps:i},...s&&{seed:s},...l&&{providerOptions:l},...a&&{image:(h=a,"file"===h.type&&h.data instanceof Uint8Array?{...h,data:(0,y.n_)(h.data)}:h)}},successfulResponseHandler:(0,y.cV)(Pe),failedResponseHandler:(0,y.sl)({errorSchema:C.bz(),errorToMessage:e=>e}),...p&&{abortSignal:p},fetch:this.config.fetch});return{videos:g.videos,warnings:null!=(c=g.warnings)?c:[],providerMetadata:g.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:f}}}catch(e){throw await se(e,await ue(d))}var h}getUrl(){return`${this.config.baseURL}/video-model`}getModelConfigHeaders(){return{"ai-video-model-specification-version":"3","ai-model-id":this.modelId}}};var Re=C.Ik({videos:C.YO(C.L5()).optional()}).catchall(C.L5()),be=C.KC([C.Ik({type:C.eu("url"),url:C.Yj(),mediaType:C.Yj()}),C.Ik({type:C.eu("base64"),data:C.Yj(),mediaType:C.Yj()})]),Oe=C.gM("type",[C.Ik({type:C.eu("unsupported"),feature:C.Yj(),details:C.Yj().optional()}),C.Ik({type:C.eu("compatibility"),feature:C.Yj(),details:C.Yj().optional()}),C.Ik({type:C.eu("other"),message:C.Yj()})]),Pe=C.Ik({videos:C.YO(be),warnings:C.YO(Oe).optional(),providerMetadata:C.g1(C.Yj(),Re).optional()}),Te=(0,y.ID)((()=>(0,y.jN)(w.Ik({objective:w.Yj().describe("Natural-language description of the web research goal, including source or freshness guidance and broader context from the task. Maximum 5000 characters."),search_queries:w.YO(w.Yj()).optional().describe("Optional search queries to supplement the objective. Maximum 200 characters per query."),mode:w.k5(["one-shot","agentic"]).optional().describe('Mode preset: "one-shot" for comprehensive results with longer excerpts (default), "agentic" for concise, token-efficient results for multi-step workflows.'),max_results:w.ai().optional().describe("Maximum number of results to return (1-20). Defaults to 10 if not specified."),source_policy:w.Ik({include_domains:w.YO(w.Yj()).optional().describe("List of domains to include in search results."),exclude_domains:w.YO(w.Yj()).optional().describe("List of domains to exclude from search results."),after_date:w.Yj().optional().describe("Only include results published after this date (ISO 8601 format).")}).optional().describe("Source policy for controlling which domains to include/exclude and freshness."),excerpts:w.Ik({max_chars_per_result:w.ai().optional().describe("Maximum characters per result."),max_chars_total:w.ai().optional().describe("Maximum total characters across all results.")}).optional().describe("Excerpt configuration for controlling result length."),fetch_policy:w.Ik({max_age_seconds:w.ai().optional().describe("Maximum age in seconds for cached content. Set to 0 to always fetch fresh content.")}).optional().describe("Fetch policy for controlling content freshness.")})))),Ae=(0,y.ID)((()=>(0,y.jN)(w.KC([w.Ik({searchId:w.Yj(),results:w.YO(w.Ik({url:w.Yj(),title:w.Yj(),excerpt:w.Yj(),publishDate:w.Yj().nullable().optional(),relevanceScore:w.ai().optional()}))}),w.Ik({error:w.k5(["api_error","rate_limit","timeout","invalid_input","configuration_error","unknown"]),statusCode:w.ai().optional(),message:w.Yj()})])))),De=(0,y.wA)({id:"gateway.parallel_search",inputSchema:Te,outputSchema:Ae}),Ie=(0,y.ID)((()=>(0,y.jN)(w.Ik({query:w.KC([w.Yj(),w.YO(w.Yj())]).describe("Search query (string) or multiple queries (array of up to 5 strings). Multi-query searches return combined results from all queries."),max_results:w.ai().optional().describe("Maximum number of search results to return (1-20, default: 10)"),max_tokens_per_page:w.ai().optional().describe("Maximum number of tokens to extract per search result page (256-2048, default: 2048)"),max_tokens:w.ai().optional().describe("Maximum total tokens across all search results (default: 25000, max: 1000000)"),country:w.Yj().optional().describe("Two-letter ISO 3166-1 alpha-2 country code for regional search results (e.g., 'US', 'GB', 'FR')"),search_domain_filter:w.YO(w.Yj()).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:w.YO(w.Yj()).optional().describe("List of ISO 639-1 language codes to filter results (max 10, lowercase). Examples: ['en', 'fr', 'de']"),search_after_date:w.Yj().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:w.Yj().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:w.Yj().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:w.Yj().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:w.k5(["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,y.ID)((()=>(0,y.jN)(w.KC([w.Ik({results:w.YO(w.Ik({title:w.Yj(),url:w.Yj(),snippet:w.Yj(),date:w.Yj().optional(),lastUpdated:w.Yj().optional()})),id:w.Yj()}),w.Ik({error:w.k5(["api_error","rate_limit","timeout","invalid_input","unknown"]),statusCode:w.ai().optional(),message:w.Yj()})])))),xe=(0,y.wA)({id:"gateway.perplexity_search",inputSchema:Ie,outputSchema:Ne}),Me={parallelSearch:(e={})=>De(e),perplexitySearch:(e={})=>xe(e)},Le=function(e={}){var t,o;let r=null,n=null;const i=null!=(t=e.metadataCacheRefreshMillis)?t:3e5;let s=0;const a=null!=(o=(0,y.ae)(e.baseURL))?o:"https://ai-gateway.vercel.sh/v3/ai",l=async()=>{try{const t=await async function(e){const t=(0,y.x3)({settingValue:e.apiKey,environmentVariableName:"AI_GATEWAY_API_KEY"});return t?{token:t,authMethod:"api-key"}:{token:await(0,E.getVercelOidcToken)(),authMethod:"oidc"}}(e);return(0,y.WZ)({Authorization:`Bearer ${t.token}`,"ai-gateway-protocol-version":"0.0.1",[le]:t.authMethod,...e.headers},"ai-sdk/gateway/3.0.46")}catch(e){throw A.createContextualError({apiKeyProvided:!1,oidcTokenProvided:!1,statusCode:401,cause:e})}},u=()=>{const e=(0,y.x3)({settingValue:void 0,environmentVariableName:"VERCEL_DEPLOYMENT_ID"}),t=(0,y.x3)({settingValue:void 0,environmentVariableName:"VERCEL_ENV"}),o=(0,y.x3)({settingValue:void 0,environmentVariableName:"VERCEL_REGION"});return async()=>{const r=await async function(){var e;return null==(e=(0,E.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}}}},p=t=>new fe(t,{provider:"gateway",baseURL:a,headers:l,fetch:e.fetch,o11yHeaders:u()}),c=function(e){if(new.target)throw new Error("The Gateway Provider model function cannot be called with the new keyword.");return p(e)};c.specificationVersion="v3",c.getAvailableModels=async()=>{var t,o,u;const p=null!=(u=null==(o=null==(t=e._internal)?void 0:t.currentDate)?void 0:o.call(t).getTime())?u:Date.now();return(!r||p-s>i)&&(s=p,r=new ce({baseURL:a,headers:l,fetch:e.fetch}).getAvailableModels().then((e=>(n=e,e))).catch((async e=>{throw await se(e,await ue(await l()))}))),n?Promise.resolve(n):r},c.getCredits=async()=>new ce({baseURL:a,headers:l,fetch:e.fetch}).getCredits().catch((async e=>{throw await se(e,await ue(await l()))})),c.imageModel=t=>new ye(t,{provider:"gateway",baseURL:a,headers:l,fetch:e.fetch,o11yHeaders:u()}),c.languageModel=p;const d=t=>new ge(t,{provider:"gateway",baseURL:a,headers:l,fetch:e.fetch,o11yHeaders:u()});return c.embeddingModel=d,c.textEmbeddingModel=d,c.videoModel=t=>new Se(t,{provider:"gateway",baseURL:a,headers:l,fetch:e.fetch,o11yHeaders:u()}),c.chat=c.languageModel,c.embedding=c.embeddingModel,c.image=c.imageModel,c.video=c.videoModel,c.tools=Me,c}()},79193:(e,t,o)=>{o.d(t,{Ay:()=>n});var r=o(7386);const n=r.default;r.CommaAndColonSeparatedRecord,r.ConnectionString,r.redactConnectionString},80286: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},80572:function(e,t,o){var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var n=o(61146),i=r(o(96652)),s=o(46410),a=o(17642),l=o(30345);t.default=i.memo((function(e){var t=i.useState(),o=t[0],r=t[1],u=i.useContext(a.BeansContext),p=u.context,c=u.popupService,d=u.gridOptionsWrapper;return l.useEffectOnce((function(){var t=e.editDetails,o=e.cellCtrl,i=e.eParentCell,s=t.compDetails,a=d.isStopEditingWhenCellsLoseFocus(),l=p.createBean(new n.PopupEditorWrapper(s.params)),u=l.getGui();if(e.jsChildComp){var h=e.jsChildComp.getGui();h&&u.appendChild(h)}var f={column:o.getColumn(),rowNode:o.getRowNode(),type:"popupCellEditor",eventSource:i,ePopup:u,keepWithinBounds:!0},g="under"===t.popupPosition?c.positionPopupUnderComponent.bind(c,f):c.positionPopupOverComponent.bind(c,f),m=d.getLocaleTextFunc(),y=c.addPopup({modal:a,eChild:u,closeOnEsc:!0,closedCallback:function(){o.onPopupEditorClosed()},anchorToElement:i,positionCallback:g,ariaLabel:m("ariaLabelCellEditor","Cell Editor")}),v=y?y.hideFunc:void 0;return r(l),e.jsChildComp&&e.jsChildComp.afterGuiAttached&&e.jsChildComp.afterGuiAttached(),function(){null!=v&&v(),p.destroyBean(l)}})),i.default.createElement(i.default.Fragment,null,o&&e.wrappedContent&&s.createPortal(e.wrappedContent,o.getGui()))}))},81952:function(e,t,o){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},r.apply(this,arguments)},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=n(o(96652)),s=o(36431),a=o(17642),l=o(1743),u=o(30345);t.default=i.forwardRef((function(e,t){var o=i.useContext(a.BeansContext),n=o.ctrlsFactory,p=o.context,c=o.gridOptionsWrapper,d=o.resizeObserverService,h=o.clientSideRowModel,f=o.serverSideRowModel,g=i.useState(new s.CssClasses),m=g[0],y=g[1],v=i.useState(new s.CssClasses),C=v[0],w=v[1],E=i.useState(),_=E[0],S=E[1],R=i.useState(),b=R[0],O=R[1],P=i.useRef(),T=i.useRef(null),A=i.useMemo((function(){return m.toString()+" ag-details-row"}),[m]),D=i.useMemo((function(){return C.toString()+" ag-details-grid"}),[C]);t&&i.useImperativeHandle(t,(function(){return{refresh:function(){return P.current.refresh()}}})),u.useEffectOnce((function(){e.template&&"string"==typeof e.template&&console.warn("AG Grid: detailCellRendererParams.template is not supported by React - this only works with frameworks that work against String templates. To change the template, please provide your own React Detail Cell Renderer.")})),u.useEffectOnce((function(){var t={addOrRemoveCssClass:function(e,t){return y((function(o){return o.setClass(e,t)}))},addOrRemoveDetailGridCssClass:function(e,t){return w((function(o){return o.setClass(e,t)}))},setDetailGrid:function(e){return S(e)},setRowData:function(e){return O(e)},getGui:function(){return T.current}},o=n.getInstance("detailCellRenderer");if(o){var r;if(p.createBean(o),o.init(t,e),P.current=o,c.isDetailRowAutoHeight()){var i=function(){if(null!=T.current){var t=T.current.clientHeight;null!=t&&t>0&&setTimeout((function(){e.node.setRowHeight(t),h?h.onRowHeightChanged():f&&f.onRowHeightChanged()}),0)}};r=d.observeResize(T.current,i),i()}return function(){p.destroyBean(o),r&&r()}}}));var I=i.useCallback((function(e,t){P.current.registerDetailWithMaster(e,t)}),[]);return i.default.createElement("div",{className:A,ref:T},_&&i.default.createElement(l.AgGridReactUi,r({className:D},_,{rowData:b,setGridApi:I})))}))},83178:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=0;t.default=function(){return"agPortalKey_"+ ++o}},85859:(e,t,o)=>{var r,n=o(13390),i=o(78773);function s(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),-1===e.indexOf("-")&&-1===e.indexOf("_"))return e;{let t="",o=!1;const r=e.match(/^-+/);for(let n=r?r[0].length:0;n<e.length;n++){let r=e.charAt(n);o&&(o=!1,r=r.toUpperCase()),0===n||"-"!==r&&"_"!==r?"-"!==r&&"_"!==r&&(t+=r):o=!0}return t}}function a(e,t){const o=e.toLowerCase();t=t||"-";let r="";for(let n=0;n<e.length;n++){const i=o.charAt(n),s=e.charAt(n);r+=i!==s&&n>0?`${t}${o.charAt(n)}`:s}return r}function l(e){return null!=e&&("number"==typeof e||!!/^0x[0-9a-f]+$/i.test(e)||!/^0[^.]/.test(e)&&/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e))}let u;function p(e){return void 0!==e?e+1:1}function c(e){return"__proto__"===e?"___proto___":e}!function(e){e.BOOLEAN="boolean",e.STRING="string",e.NUMBER="number",e.ARRAY="array"}(r||(r={}));var d,h,f,g=o(4308),m=o(15088).process;const y=m&&m.env&&m.env.YARGS_MIN_NODE_VERSION?Number(m.env.YARGS_MIN_NODE_VERSION):12,v=null!==(h=null===(d=null==m?void 0:m.versions)||void 0===d?void 0:d.node)&&void 0!==h?h:null===(f=null==m?void 0:m.version)||void 0===f?void 0:f.slice(1);if(v&&Number(v.match(/^([^.]+)/)[1])<y)throw Error(`yargs parser supports a minimum Node.js version of ${y}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);const C=m?m.env:{},w=new class{constructor(e){u=e}parse(e,t){const o=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},t),n=function(e){if(Array.isArray(e))return e.map((e=>"string"!=typeof e?e+"":e));e=e.trim();let t=0,o=null,r=null,n=null;const i=[];for(let s=0;s<e.length;s++)o=r,r=e.charAt(s)," "!==r||n?(r===n?n=null:"'"!==r&&'"'!==r||n||(n=r),i[t]||(i[t]=""),i[t]+=r):" "!==o&&t++;return i}(e),i="string"==typeof e,d=function(e){const t=[],o=Object.create(null);let r=!0;for(Object.keys(e).forEach((function(o){t.push([].concat(e[o],o))}));r;){r=!1;for(let e=0;e<t.length;e++)for(let o=e+1;o<t.length;o++)if(t[e].filter((function(e){return-1!==t[o].indexOf(e)})).length){t[e]=t[e].concat(t[o]),t.splice(o,1),r=!0;break}}return t.forEach((function(e){const t=(e=e.filter((function(e,t,o){return o.indexOf(e)===t}))).pop();void 0!==t&&"string"==typeof t&&(o[t]=e)})),o}(Object.assign(Object.create(null),o.alias)),h=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},o.configuration),f=Object.assign(Object.create(null),o.default),g=o.configObjects||[],m=o.envPrefix,y=h["populate--"],v=y?"--":"_",C=Object.create(null),w=Object.create(null),E=o.__||u.format,_={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},S=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,R=new RegExp("^--"+h["negation-prefix"]+"(.+)");[].concat(o.array||[]).filter(Boolean).forEach((function(e){const t="object"==typeof e?e.key:e,o=Object.keys(e).map((function(e){return{boolean:"bools",string:"strings",number:"numbers"}[e]})).filter(Boolean).pop();o&&(_[o][t]=!0),_.arrays[t]=!0,_.keys.push(t)})),[].concat(o.boolean||[]).filter(Boolean).forEach((function(e){_.bools[e]=!0,_.keys.push(e)})),[].concat(o.string||[]).filter(Boolean).forEach((function(e){_.strings[e]=!0,_.keys.push(e)})),[].concat(o.number||[]).filter(Boolean).forEach((function(e){_.numbers[e]=!0,_.keys.push(e)})),[].concat(o.count||[]).filter(Boolean).forEach((function(e){_.counts[e]=!0,_.keys.push(e)})),[].concat(o.normalize||[]).filter(Boolean).forEach((function(e){_.normalize[e]=!0,_.keys.push(e)})),"object"==typeof o.narg&&Object.entries(o.narg).forEach((([e,t])=>{"number"==typeof t&&(_.nargs[e]=t,_.keys.push(e))})),"object"==typeof o.coerce&&Object.entries(o.coerce).forEach((([e,t])=>{"function"==typeof t&&(_.coercions[e]=t,_.keys.push(e))})),void 0!==o.config&&(Array.isArray(o.config)||"string"==typeof o.config?[].concat(o.config).filter(Boolean).forEach((function(e){_.configs[e]=!0})):"object"==typeof o.config&&Object.entries(o.config).forEach((([e,t])=>{"boolean"!=typeof t&&"function"!=typeof t||(_.configs[e]=t)}))),function(...e){e.forEach((function(e){Object.keys(e||{}).forEach((function(e){_.aliases[e]||(_.aliases[e]=[].concat(d[e]||[]),_.aliases[e].concat(e).forEach((function(t){if(/-/.test(t)&&h["camel-case-expansion"]){const o=s(t);o!==e&&-1===_.aliases[e].indexOf(o)&&(_.aliases[e].push(o),C[o]=!0)}})),_.aliases[e].concat(e).forEach((function(t){if(t.length>1&&/[A-Z]/.test(t)&&h["camel-case-expansion"]){const o=a(t,"-");o!==e&&-1===_.aliases[e].indexOf(o)&&(_.aliases[e].push(o),C[o]=!0)}})),_.aliases[e].forEach((function(t){_.aliases[t]=[e].concat(_.aliases[e].filter((function(e){return t!==e})))})))}))}))}(o.key,d,o.default,_.arrays),Object.keys(f).forEach((function(e){(_.aliases[e]||[]).forEach((function(t){f[t]=f[e]}))}));let b=null;Object.keys(_.counts).find((e=>W(e,_.arrays)?(b=Error(E("Invalid configuration: %s, opts.count excludes opts.array.",e)),!0):!!W(e,_.nargs)&&(b=Error(E("Invalid configuration: %s, opts.count excludes opts.narg.",e)),!0)));let O=[];const P=Object.assign(Object.create(null),{_:[]}),T={};for(let e=0;e<n.length;e++){const t=n[e],o=t.replace(/^-{3,}/,"---");let r,i,s,a,l,u;if("--"!==t&&/^-/.test(t)&&B(t))A(t);else{if(o.match(/^---+(=|$)/)){A(t);continue}if(t.match(/^--.+=/)||!h["short-option-groups"]&&t.match(/^-.+=/))a=t.match(/^--?([^=]+)=([\s\S]*)$/),null!==a&&Array.isArray(a)&&a.length>=3&&(W(a[1],_.arrays)?e=I(e,a[1],n,a[2]):!1!==W(a[1],_.nargs)?e=D(e,a[1],n,a[2]):N(a[1],a[2],!0));else if(t.match(R)&&h["boolean-negation"])a=t.match(R),null!==a&&Array.isArray(a)&&a.length>=2&&(i=a[1],N(i,!!W(i,_.arrays)&&[!1]));else if(t.match(/^--.+/)||!h["short-option-groups"]&&t.match(/^-[^-]+/))a=t.match(/^--?(.+)/),null!==a&&Array.isArray(a)&&a.length>=2&&(i=a[1],W(i,_.arrays)?e=I(e,i,n):!1!==W(i,_.nargs)?e=D(e,i,n):(l=n[e+1],void 0===l||l.match(/^-/)&&!l.match(S)||W(i,_.bools)||W(i,_.counts)?/^(true|false)$/.test(l)?(N(i,l),e++):N(i,U(i)):(N(i,l),e++)));else if(t.match(/^-.\..+=/))a=t.match(/^-([^=]+)=([\s\S]*)$/),null!==a&&Array.isArray(a)&&a.length>=3&&N(a[1],a[2]);else if(t.match(/^-.\..+/)&&!t.match(S))l=n[e+1],a=t.match(/^-(.\..+)/),null!==a&&Array.isArray(a)&&a.length>=2&&(i=a[1],void 0===l||l.match(/^-/)||W(i,_.bools)||W(i,_.counts)?N(i,U(i)):(N(i,l),e++));else if(t.match(/^-[^-]+/)&&!t.match(S)){s=t.slice(1,-1).split(""),r=!1;for(let o=0;o<s.length;o++){if(l=t.slice(o+2),s[o+1]&&"="===s[o+1]){u=t.slice(o+3),i=s[o],W(i,_.arrays)?e=I(e,i,n,u):!1!==W(i,_.nargs)?e=D(e,i,n,u):N(i,u),r=!0;break}if("-"!==l){if(/[A-Za-z]/.test(s[o])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(l)&&!1===W(l,_.bools)){N(s[o],l),r=!0;break}if(s[o+1]&&s[o+1].match(/\W/)){N(s[o],l),r=!0;break}N(s[o],U(s[o]))}else N(s[o],l)}i=t.slice(-1)[0],r||"-"===i||(W(i,_.arrays)?e=I(e,i,n):!1!==W(i,_.nargs)?e=D(e,i,n):(l=n[e+1],void 0===l||/^(-|--)[^-]/.test(l)&&!l.match(S)||W(i,_.bools)||W(i,_.counts)?/^(true|false)$/.test(l)?(N(i,l),e++):N(i,U(i)):(N(i,l),e++)))}else if(t.match(/^-[0-9]$/)&&t.match(S)&&W(t.slice(1),_.bools))i=t.slice(1),N(i,U(i));else{if("--"===t){O=n.slice(e+1);break}if(h["halt-at-non-option"]){O=n.slice(e);break}A(t)}}}function A(e){const t=L("_",e);"string"!=typeof t&&"number"!=typeof t||P._.push(t)}function D(e,t,o,r){let n,i=W(t,_.nargs);if(i="number"!=typeof i||isNaN(i)?1:i,0===i)return Y(r)||(b=Error(E("Argument unexpected for: %s",t))),N(t,U(t)),e;let s=Y(r)?0:1;if(h["nargs-eats-options"])o.length-(e+1)+s<i&&(b=Error(E("Not enough arguments following: %s",t))),s=i;else{for(n=e+1;n<o.length&&(!o[n].match(/^-[^0-9]/)||o[n].match(S)||B(o[n]));n++)s++;s<i&&(b=Error(E("Not enough arguments following: %s",t)))}let a=Math.min(s,i);for(!Y(r)&&a>0&&(N(t,r),a--),n=e+1;n<a+e+1;n++)N(t,o[n]);return e+a}function I(e,t,o,r){let n=[],s=r||o[e+1];const a=W(t,_.nargs);if(W(t,_.bools)&&!/^(true|false)$/.test(s))n.push(!0);else if(Y(s)||Y(r)&&/^-/.test(s)&&!S.test(s)&&!B(s)){if(void 0!==f[t]){const e=f[t];n=Array.isArray(e)?e:[e]}}else{Y(r)||n.push(M(t,r,!0));for(let r=e+1;r<o.length&&!(!h["greedy-arrays"]&&n.length>0||a&&"number"==typeof a&&n.length>=a)&&(s=o[r],!/^-/.test(s)||S.test(s)||B(s));r++)e=r,n.push(M(t,s,i))}return"number"==typeof a&&(a&&n.length<a||isNaN(a)&&0===n.length)&&(b=Error(E("Not enough arguments following: %s",t))),N(t,n),e}function N(e,t,o=i){if(/-/.test(e)&&h["camel-case-expansion"]){const t=e.split(".").map((function(e){return s(e)})).join(".");x(e,t)}const r=M(e,t,o),n=e.split(".");H(P,n,r),_.aliases[e]&&_.aliases[e].forEach((function(e){const t=e.split(".");H(P,t,r)})),n.length>1&&h["dot-notation"]&&(_.aliases[n[0]]||[]).forEach((function(t){let o=t.split(".");const i=[].concat(n);i.shift(),o=o.concat(i),(_.aliases[e]||[]).includes(o.join("."))||H(P,o,r)})),W(e,_.normalize)&&!W(e,_.arrays)&&[e].concat(_.aliases[e]||[]).forEach((function(e){Object.defineProperty(T,e,{enumerable:!0,get:()=>t,set(e){t="string"==typeof e?u.normalize(e):e}})}))}function x(e,t){_.aliases[e]&&_.aliases[e].length||(_.aliases[e]=[t],C[t]=!0),_.aliases[t]&&_.aliases[t].length||x(t,e)}function M(e,t,o){o&&(t=function(e){return"string"!=typeof e||"'"!==e[0]&&'"'!==e[0]||e[e.length-1]!==e[0]?e:e.substring(1,e.length-1)}(t)),(W(e,_.bools)||W(e,_.counts))&&"string"==typeof t&&(t="true"===t);let r=Array.isArray(t)?t.map((function(t){return L(e,t)})):L(e,t);return W(e,_.counts)&&(Y(r)||"boolean"==typeof r)&&(r=p()),W(e,_.normalize)&&W(e,_.arrays)&&(r=Array.isArray(t)?t.map((e=>u.normalize(e))):u.normalize(t)),r}function L(e,t){return h["parse-positional-numbers"]||"_"!==e?(W(e,_.strings)||W(e,_.bools)||Array.isArray(t)||(l(t)&&h["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${t}`)))||!Y(t)&&W(e,_.numbers))&&(t=Number(t)),t):t}function F(e,t){Object.keys(e).forEach((function(o){const r=e[o],n=t?t+"."+o:o;"object"==typeof r&&null!==r&&!Array.isArray(r)&&h["dot-notation"]?F(r,n):(!V(P,n.split("."))||W(n,_.arrays)&&h["combine-arrays"])&&N(n,r)}))}function G(e,t){if(void 0===m)return;const o="string"==typeof m?m:"",r=u.env();Object.keys(r).forEach((function(n){if(""===o||0===n.lastIndexOf(o,0)){const i=n.split("__").map((function(e,t){return 0===t&&(e=e.substring(o.length)),s(e)}));(t&&_.configs[i.join(".")]||!t)&&!V(e,i)&&N(i.join("."),r[n])}}))}function k(e,t,o,r=!1){Object.keys(o).forEach((function(n){V(e,n.split("."))||(H(e,n.split("."),o[n]),r&&(w[n]=!0),(t[n]||[]).forEach((function(t){V(e,t.split("."))||H(e,t.split("."),o[n])})))}))}function V(e,t){let o=e;h["dot-notation"]||(t=[t.join(".")]),t.slice(0,-1).forEach((function(e){o=o[e]||{}}));const r=t[t.length-1];return"object"==typeof o&&r in o}function H(e,t,o){let r=e;h["dot-notation"]||(t=[t.join(".")]),t.slice(0,-1).forEach((function(e){e=c(e),"object"==typeof r&&void 0===r[e]&&(r[e]={}),"object"!=typeof r[e]||Array.isArray(r[e])?(Array.isArray(r[e])?r[e].push({}):r[e]=[r[e],{}],r=r[e][r[e].length-1]):r=r[e]}));const n=c(t[t.length-1]),i=W(t.join("."),_.arrays),s=Array.isArray(o);let a=h["duplicate-arguments-array"];!a&&W(n,_.nargs)&&(a=!0,(!Y(r[n])&&1===_.nargs[n]||Array.isArray(r[n])&&r[n].length===_.nargs[n])&&(r[n]=void 0)),o===p()?r[n]=p(r[n]):Array.isArray(r[n])?a&&i&&s?r[n]=h["flatten-duplicate-arrays"]?r[n].concat(o):(Array.isArray(r[n][0])?r[n]:[r[n]]).concat([o]):a||Boolean(i)!==Boolean(s)?r[n]=r[n].concat([o]):r[n]=o:void 0===r[n]&&i?r[n]=s?o:[o]:!a||void 0===r[n]||W(n,_.counts)||W(n,_.bools)?r[n]=o:r[n]=[r[n],o]}function W(e,t){const o=[].concat(_.aliases[e]||[],e),r=Object.keys(t),n=o.find((e=>r.includes(e)));return!!n&&t[n]}function j(e){const t=Object.keys(_);return[].concat(t.map((e=>_[e]))).some((function(t){return Array.isArray(t)?t.includes(e):t[e]}))}function B(e){return h["unknown-options-as-args"]&&function(e){return!(e=e.replace(/^-{3,}/,"--")).match(S)&&(!function(e){if(e.match(S)||!e.match(/^-[^-]+/))return!1;let t,o=!0;const r=e.slice(1).split("");for(let n=0;n<r.length;n++){if(t=e.slice(n+2),!j(r[n])){o=!1;break}if(r[n+1]&&"="===r[n+1]||"-"===t||/[A-Za-z]/.test(r[n])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(t)||r[n+1]&&r[n+1].match(/\W/))break}return o}(e)&&!function(e,...t){return[].concat(...t).some((function(t){const o=e.match(t);return o&&j(o[1])}))}(e,/^-+([^=]+?)=[\s\S]*$/,R,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/))}(e)}function U(e){return W(e,_.bools)||W(e,_.counts)||!(`${e}`in f)?(t=function(e){let t=r.BOOLEAN;return W(e,_.strings)?t=r.STRING:W(e,_.numbers)?t=r.NUMBER:W(e,_.bools)?t=r.BOOLEAN:W(e,_.arrays)&&(t=r.ARRAY),t}(e),{[r.BOOLEAN]:!0,[r.STRING]:"",[r.NUMBER]:void 0,[r.ARRAY]:[]}[t]):f[e];var t}function Y(e){return void 0===e}return G(P,!0),G(P,!1),function(e){const t=Object.create(null);k(t,_.aliases,f),Object.keys(_.configs).forEach((function(o){const r=e[o]||t[o];if(r)try{let e=null;const t=u.resolve(u.cwd(),r),n=_.configs[o];if("function"==typeof n){try{e=n(t)}catch(t){e=t}if(e instanceof Error)return void(b=e)}else e=u.require(t);F(e)}catch(t){"PermissionDenied"===t.name?b=t:e[o]&&(b=Error(E("Invalid JSON config file: %s",r)))}}))}(P),void 0!==g&&g.forEach((function(e){F(e)})),k(P,_.aliases,f,!0),function(e){let t;const o=new Set;Object.keys(e).forEach((function(r){if(!o.has(r)&&(t=W(r,_.coercions),"function"==typeof t))try{const n=L(r,t(e[r]));[].concat(_.aliases[r]||[],r).forEach((t=>{o.add(t),e[t]=n}))}catch(e){b=e}}))}(P),h["set-placeholder-key"]&&function(e){_.keys.forEach((t=>{~t.indexOf(".")||void 0===e[t]&&(e[t]=void 0)}))}(P),Object.keys(_.counts).forEach((function(e){V(P,e.split("."))||N(e,0)})),y&&O.length&&(P[v]=[]),O.forEach((function(e){P[v].push(e)})),h["camel-case-expansion"]&&h["strip-dashed"]&&Object.keys(P).filter((e=>"--"!==e&&e.includes("-"))).forEach((e=>{delete P[e]})),h["strip-aliased"]&&[].concat(...Object.keys(d).map((e=>d[e]))).forEach((e=>{h["camel-case-expansion"]&&e.includes("-")&&delete P[e.split(".").map((e=>s(e))).join(".")],delete P[e]})),{aliases:Object.assign({},_.aliases),argv:Object.assign(T,P),configuration:h,defaulted:Object.assign({},w),error:b,newAliases:Object.assign({},C)}}}({cwd:m.cwd,env:()=>C,format:n.format,normalize:i.normalize,resolve:i.resolve,require:e=>{if("undefined"!=typeof require)return require(e);if(e.match(/\.json$/))return JSON.parse((0,g.readFileSync)(e,"utf8"));throw Error("only .json config files are supported in ESM")}}),E=function(e,t){return w.parse(e.slice(),t).argv};E.detailed=function(e,t){return w.parse(e.slice(),t)},E.camelCase=s,E.decamelize=a,E.looksLikeNumber=l},86637:(e,t,o)=>{o.d(t,{Di:()=>F,M3:()=>H,Tt:()=>C,b8:()=>ue,bD:()=>c,eM:()=>ee,hL:()=>g,iM:()=>ie,u1:()=>w,u6:()=>Y});var r,n,i,s,a,l,u="vercel.ai.error",p=Symbol.for(u),c=class e extends(n=Error,r=p,n){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,u)}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,i=f,s){constructor({message:e,url:t,requestBodyValues:o,statusCode:r,responseHeaders:n,responseBody:s,cause:a,isRetryable:l=null!=r&&(408===r||409===r||429===r||r>=500),data:u}){super({name:d,message:e,cause:a}),this[i]=!0,this.url=t,this.requestBodyValues=o,this.statusCode=r,this.responseHeaders=n,this.responseBody=s,this.isRetryable=l,this.data=u}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,_,S,R,b,O,P,T,A,D,I,N,x="AI_InvalidArgumentError",M=`vercel.ai.error.${x}`,L=Symbol.for(M),F=class extends(_=c,E=L,_){constructor({message:e,cause:t,argument:o}){super({name:x,message:e,cause:t}),this[E]=!0,this.argument=o}static isInstance(e){return c.hasMarker(e,M)}},G="AI_InvalidPromptError",k=`vercel.ai.error.${G}`,V=Symbol.for(k),H=class extends(R=c,S=V,R){constructor({prompt:e,message:t,cause:o}){super({name:G,message:`Invalid prompt: ${t}`,cause:o}),this[S]=!0,this.prompt=e}static isInstance(e){return c.hasMarker(e,k)}},W=Symbol.for("vercel.ai.error.AI_InvalidResponseDataError"),j="AI_JSONParseError",B=`vercel.ai.error.${j}`,U=Symbol.for(B),Y=class extends(O=c,b=U,O){constructor({text:e,cause:t}){super({name:j,message:`JSON parsing failed: Text: ${e}.\nError message: ${w(t)}`,cause:t}),this[b]=!0,this.text=e}static isInstance(e){return c.hasMarker(e,B)}},z=Symbol.for("vercel.ai.error.AI_LoadAPIKeyError"),K=`vercel.ai.error.${"AI_LoadSettingError"}`,$=Symbol.for(K),q=`vercel.ai.error.${"AI_NoContentGeneratedError"}`,Z=Symbol.for(q),X="AI_NoSuchModelError",Q=`vercel.ai.error.${X}`,J=Symbol.for(Q),ee=class extends(T=c,P=J,T){constructor({errorName:e=X,modelId:t,modelType:o,message:r=`No such ${o}: ${t}`}){super({name:e,message:r}),this[P]=!0,this.modelId=t,this.modelType=o}static isInstance(e){return c.hasMarker(e,Q)}},te=Symbol.for("vercel.ai.error.AI_TooManyEmbeddingValuesForCallError"),oe="AI_TypeValidationError",re=`vercel.ai.error.${oe}`,ne=Symbol.for(re),ie=class e extends(D=c,A=ne,D){constructor({value:e,cause:t,context:o}){let r="Type validation failed";if((null==o?void 0:o.field)&&(r+=` for ${o.field}`),(null==o?void 0:o.entityName)||(null==o?void 0:o.entityId)){r+=" (";const e=[];o.entityName&&e.push(o.entityName),o.entityId&&e.push(`id: "${o.entityId}"`),r+=e.join(", "),r+=")"}super({name:oe,message:`${r}: Value: ${JSON.stringify(e)}.\nError message: ${w(t)}`,cause:t}),this[A]=!0,this.value=e,this.context=o}static isInstance(e){return c.hasMarker(e,re)}static wrap({value:t,cause:o,context:r}){var n,i,s;return e.isInstance(o)&&o.value===t&&(null==(n=o.context)?void 0:n.field)===(null==r?void 0:r.field)&&(null==(i=o.context)?void 0:i.entityName)===(null==r?void 0:r.entityName)&&(null==(s=o.context)?void 0:s.entityId)===(null==r?void 0:r.entityId)?o:new e({value:t,cause:o,context:r})}},se="AI_UnsupportedFunctionalityError",ae=`vercel.ai.error.${se}`,le=Symbol.for(ae),ue=class extends(N=c,I=le,N){constructor({functionality:e,message:t=`'${e}' functionality not supported.`}){super({name:se,message:t}),this[I]=!0,this.functionality=e}static isInstance(e){return c.hasMarker(e,ae)}}},86834:function(e,t,o){var r,n=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(t,o);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,n)}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[t.length]=o);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o=r(e),s=0;s<o.length;s++)"default"!==o[s]&&n(t,e,o[s]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.redactValidConnectionString=function(e,t){const o=e.clone(),r=t?.replacementString??"_credentials_",n=t?.redactUsernames??!0;if((o.username||o.password)&&n?(o.username=r,o.password=""):o.password&&(o.password=r),o.searchParams.has("authMechanismProperties")){const e=new a.CommaAndColonSeparatedRecord(o.searchParams.get("authMechanismProperties"));e.get("AWS_SESSION_TOKEN")&&(e.set("AWS_SESSION_TOKEN",r),o.searchParams.set("authMechanismProperties",e.toString()))}return o.searchParams.has("tlsCertificateKeyFilePassword")&&o.searchParams.set("tlsCertificateKeyFilePassword",r),o.searchParams.has("proxyUsername")&&n&&o.searchParams.set("proxyUsername",r),o.searchParams.has("proxyPassword")&&o.searchParams.set("proxyPassword",r),o},t.redactConnectionString=function(e,t){const o=t?.replacementString??"<credentials>",r=t?.redactUsernames??!0;let n;try{n=new a.default(e)}catch{}if(n)return t={...t,replacementString:"___credentials___"},n.redact(t).toString().replace(/___credentials___/g,o);const i=o,s=[e=>e.replace(r?/(\/\/)(.*)(@)/g:/(\/\/[^@]*:)(.*)(@)/g,`$1${i}$3`),e=>e.replace(/(AWS_SESSION_TOKEN(:|%3A))([^,&]+)/gi,`$1${i}`),e=>e.replace(/(tlsCertificateKeyFilePassword=)([^&]+)/gi,`$1${i}`),e=>r?e.replace(/(proxyUsername=)([^&]+)/gi,`$1${i}`):e,e=>e.replace(/(proxyPassword=)([^&]+)/gi,`$1${i}`)];for(const t of s)e=t(e);return e};const a=s(o(2511))},88245:function(e,t,o){var r,n=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(t,o);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,n)}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[t.length]=o);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o=r(e),s=0;s<o.length;s++)"default"!==o[s]&&n(t,e,o[s]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.redactValidConnectionString=function(e,t){const o=e.clone(),r=t?.replacementString??"_credentials_",n=t?.redactUsernames??!0;if((o.username||o.password)&&n?(o.username=r,o.password=""):o.password&&(o.password=r),o.searchParams.has("authMechanismProperties")){const e=new a.CommaAndColonSeparatedRecord(o.searchParams.get("authMechanismProperties"));e.get("AWS_SESSION_TOKEN")&&(e.set("AWS_SESSION_TOKEN",r),o.searchParams.set("authMechanismProperties",e.toString()))}return o.searchParams.has("tlsCertificateKeyFilePassword")&&o.searchParams.set("tlsCertificateKeyFilePassword",r),o.searchParams.has("proxyUsername")&&n&&o.searchParams.set("proxyUsername",r),o.searchParams.has("proxyPassword")&&o.searchParams.set("proxyPassword",r),o},t.redactConnectionString=function(e,t){const o=t?.replacementString??"<credentials>",r=t?.redactUsernames??!0;let n;try{n=new a.default(e)}catch{}if(n)return t={...t,replacementString:"___credentials___"},n.redact(t).toString().replace(/___credentials___/g,o);const i=o,s=[e=>e.replace(r?/(\/\/)(.*)(@)/g:/(\/\/[^@]*:)(.*)(@)/g,`$1${i}$3`),e=>e.replace(/(AWS_SESSION_TOKEN(:|%3A))([^,&]+)/gi,`$1${i}`),e=>e.replace(/(tlsCertificateKeyFilePassword=)([^&]+)/gi,`$1${i}`),e=>r?e.replace(/(proxyUsername=)([^&]+)/gi,`$1${i}`):e,e=>e.replace(/(proxyPassword=)([^&]+)/gi,`$1${i}`)];for(const t of s)e=t(e);return e};const a=s(o(99598))},91705:function(e,t,o){var r,n=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(t,o);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,n)}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[t.length]=o);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o=r(e),s=0;s<o.length;s++)"default"!==o[s]&&n(t,e,o[s]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.redactValidConnectionString=function(e,t){const o=e.clone(),r=t?.replacementString??"_credentials_",n=t?.redactUsernames??!0;if((o.username||o.password)&&n?(o.username=r,o.password=""):o.password&&(o.password=r),o.searchParams.has("authMechanismProperties")){const e=new a.CommaAndColonSeparatedRecord(o.searchParams.get("authMechanismProperties"));e.get("AWS_SESSION_TOKEN")&&(e.set("AWS_SESSION_TOKEN",r),o.searchParams.set("authMechanismProperties",e.toString()))}return o.searchParams.has("tlsCertificateKeyFilePassword")&&o.searchParams.set("tlsCertificateKeyFilePassword",r),o.searchParams.has("proxyUsername")&&n&&o.searchParams.set("proxyUsername",r),o.searchParams.has("proxyPassword")&&o.searchParams.set("proxyPassword",r),o},t.redactConnectionString=function(e,t){const o=t?.replacementString??"<credentials>",r=t?.redactUsernames??!0;let n;try{n=new a.default(e)}catch{}if(n)return t={...t,replacementString:"___credentials___"},n.redact(t).toString().replace(/___credentials___/g,o);const i=o,s=[e=>e.replace(r?/(\/\/)(.*)(@)/g:/(\/\/[^@]*:)(.*)(@)/g,`$1${i}$3`),e=>e.replace(/(AWS_SESSION_TOKEN(:|%3A))([^,&]+)/gi,`$1${i}`),e=>e.replace(/(tlsCertificateKeyFilePassword=)([^&]+)/gi,`$1${i}`),e=>r?e.replace(/(proxyUsername=)([^&]+)/gi,`$1${i}`):e,e=>e.replace(/(proxyPassword=)([^&]+)/gi,`$1${i}`)];for(const t of s)e=t(e);return e};const a=s(o(7386))},92926:e=>{e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(o){!function(e,t,o){var r=o.css,n=o.media,i=o.sourceMap;n?e.setAttribute("media",n):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e)}(t,e,o)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},93431:(e,t,o)=>{o.d(t,{Ay:()=>n,J0:()=>i});var r=o(68446);const n=r.default,i=(r.CommaAndColonSeparatedRecord,r.ConnectionString,r.redactConnectionString)},93706:(e,t,o)=>{o.d(t,{A:()=>T});var r=o(1582);const n=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"];var i=o(72741),s=o(11269),a=o(75272),l=o(23666),u=o(28615),p=o(59597),c=o(52211);const d=f(1),h=f(-1);function f(e){return function(t,o,r){const n=t?t.children:[];let i=(o||0)+e,s=n&&n[i];if(!r)for(;s&&(0,c.m)(s);)i+=e,s=n[i];return s}}const g={}.hasOwnProperty;function m(e){return function(t,o,r){return g.call(e,t.tagName)&&e[t.tagName](t,o,r)}}const y=m({html:function(e,t,o){const r=d(o,t);return!r||"comment"!==r.type},head:v,body:function(e,t,o){const r=d(o,t);return!r||"comment"!==r.type},p:function(e,t,o){const r=d(o,t);return r?"element"===r.type&&("address"===r.tagName||"article"===r.tagName||"aside"===r.tagName||"blockquote"===r.tagName||"details"===r.tagName||"div"===r.tagName||"dl"===r.tagName||"fieldset"===r.tagName||"figcaption"===r.tagName||"figure"===r.tagName||"footer"===r.tagName||"form"===r.tagName||"h1"===r.tagName||"h2"===r.tagName||"h3"===r.tagName||"h4"===r.tagName||"h5"===r.tagName||"h6"===r.tagName||"header"===r.tagName||"hgroup"===r.tagName||"hr"===r.tagName||"main"===r.tagName||"menu"===r.tagName||"nav"===r.tagName||"ol"===r.tagName||"p"===r.tagName||"pre"===r.tagName||"section"===r.tagName||"table"===r.tagName||"ul"===r.tagName):!o||!("element"===o.type&&("a"===o.tagName||"audio"===o.tagName||"del"===o.tagName||"ins"===o.tagName||"map"===o.tagName||"noscript"===o.tagName||"video"===o.tagName))},li:function(e,t,o){const r=d(o,t);return!r||"element"===r.type&&"li"===r.tagName},dt:function(e,t,o){const r=d(o,t);return r&&"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName)},dd:function(e,t,o){const r=d(o,t);return!r||"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName)},rt:C,rp:C,optgroup:function(e,t,o){const r=d(o,t);return!r||"element"===r.type&&"optgroup"===r.tagName},option:function(e,t,o){const r=d(o,t);return!r||"element"===r.type&&("option"===r.tagName||"optgroup"===r.tagName)},menuitem:function(e,t,o){const r=d(o,t);return!r||"element"===r.type&&("menuitem"===r.tagName||"hr"===r.tagName||"menu"===r.tagName)},colgroup:v,caption:v,thead:function(e,t,o){const r=d(o,t);return r&&"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName)},tbody:function(e,t,o){const r=d(o,t);return!r||"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName)},tfoot:function(e,t,o){return!d(o,t)},tr:function(e,t,o){const r=d(o,t);return!r||"element"===r.type&&"tr"===r.tagName},td:w,th:w});function v(e,t,o){const r=d(o,t,!0);return!r||"comment"!==r.type&&!("text"===r.type&&(0,c.m)(r.value.charAt(0)))}function C(e,t,o){const r=d(o,t);return!r||"element"===r.type&&("rp"===r.tagName||"rt"===r.tagName)}function w(e,t,o){const r=d(o,t);return!r||"element"===r.type&&("td"===r.tagName||"th"===r.tagName)}const E=m({html:function(e){const t=d(e,-1);return!t||"comment"!==t.type},head:function(e){const t=e.children,o=[];let r=-1;for(;++r<t.length;){const e=t[r];if("element"===e.type&&("title"===e.tagName||"base"===e.tagName)){if(o.includes(e.tagName))return!1;o.push(e.tagName)}}return t.length>0},body:function(e){const t=d(e,-1,!0);return!(t&&("comment"===t.type||"text"===t.type&&(0,c.m)(t.value.charAt(0))||"element"===t.type&&("meta"===t.tagName||"link"===t.tagName||"script"===t.tagName||"style"===t.tagName||"template"===t.tagName)))},colgroup:function(e,t,o){const r=h(o,t),n=d(e,-1,!0);return!(o&&r&&"element"===r.type&&"colgroup"===r.tagName&&y(r,o.children.indexOf(r),o))&&(n&&"element"===n.type&&"col"===n.tagName)},tbody:function(e,t,o){const r=h(o,t),n=d(e,-1);return(!o||!r||"element"!==r.type||"thead"!==r.tagName&&"tbody"!==r.tagName||!y(r,o.children.indexOf(r),o))&&(n&&"element"===n.type&&"tr"===n.tagName)}}),_={name:[["\t\n\f\r &/=>".split(""),"\t\n\f\r \"&'/=>`".split("")],["\0\t\n\f\r \"&'/<=>".split(""),"\0\t\n\f\r \"&'/<=>`".split("")]],unquoted:[["\t\n\f\r &>".split(""),"\0\t\n\f\r \"&'<=>`".split("")],["\0\t\n\f\r \"&'<=>`".split(""),"\0\t\n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function S(e,t,o){const r=(0,u.I)(e.schema,t),n=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,i=e.settings.allowDangerousCharacters?0:1;let c,d=e.quote;if(!r.overloadedBoolean||o!==r.attribute&&""!==o?(r.boolean||r.overloadedBoolean&&"string"!=typeof o)&&(o=Boolean(o)):o=!0,null==o||!1===o||"number"==typeof o&&Number.isNaN(o))return"";const h=(0,s.l)(r.attribute,Object.assign({},e.settings.characterReferences,{subset:_.name[n][i]}));return!0===o?h:(o=Array.isArray(o)?(r.commaSeparated?l.A:p.A)(o,{padLeft:!e.settings.tightCommaSeparatedLists}):String(o),e.settings.collapseEmptyAttributes&&!o?h:(e.settings.preferUnquoted&&(c=(0,s.l)(o,Object.assign({},e.settings.characterReferences,{subset:_.unquoted[n][i],attribute:!0}))),c!==o&&(e.settings.quoteSmart&&(0,a.D)(o,d)>(0,a.D)(o,e.alternative)&&(d=e.alternative),c=d+(0,s.l)(o,Object.assign({},e.settings.characterReferences,{subset:("'"===d?_.single:_.double)[n][i],attribute:!0}))+d),h+(c?"="+c:c)))}function R(e,t,o,r){return!o||"element"!==o.type||"script"!==o.tagName&&"style"!==o.tagName?(0,s.l)(e.value,Object.assign({},r.settings.characterReferences,{subset:["<","&"]})):e.value}const b=(0,i.A)("type",{invalid:function(e){throw new Error("Expected node, not `"+e+"`")},unknown:function(e){throw new Error("Cannot compile unknown node `"+e.type+"`")},handlers:{comment:function(e,t,o,r){return r.settings.bogusComments?"<?"+(0,s.l)(e.value,Object.assign({},r.settings.characterReferences,{subset:[">"]}))+">":"\x3c!--"+e.value.replace(/^>|^->|<!--|-->|--!>|<!-$/g,(function(e){return(0,s.l)(e,Object.assign({},r.settings.characterReferences,{subset:["<",">"]}))}))+"--\x3e"},doctype:function(e,t,o,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"},element:function(e,t,o,n){const i=n.schema,s="svg"!==i.space&&n.settings.omitOptionalTags;let a="svg"===i.space?n.settings.closeEmptyElements:n.settings.voids.includes(e.tagName.toLowerCase());const l=[];let u;"html"===i.space&&"svg"===e.tagName&&(n.schema=r.JW);const p=function(e,t){const o=[];let r,n=-1;if(t)for(r in t)if(void 0!==t[r]&&null!==t[r]){const n=S(e,r,t[r]);n&&o.push(n)}for(;++n<o.length;){const t=e.settings.tightAttributes?o[n].charAt(o[n].length-1):null;n!==o.length-1&&'"'!==t&&"'"!==t&&(o[n]+=" ")}return o.join("")}(n,e.properties),c=n.all("html"===i.space&&"template"===e.tagName?e.content:e);return n.schema=i,c&&(a=!1),!p&&s&&E(e,t,o)||(l.push("<",e.tagName,p?" "+p:""),a&&("svg"===i.space||n.settings.closeSelfClosing)&&(u=p.charAt(p.length-1),(!n.settings.tightSelfClosing||"/"===u||u&&'"'!==u&&"'"!==u)&&l.push(" "),l.push("/")),l.push(">")),l.push(c),a||s&&y(e,t,o)||l.push("</"+e.tagName+">"),l.join("")},raw:function(e,t,o,r){return r.settings.allowDangerousHtml?e.value:R(e,0,o,r)},root:function(e,t,o,r){return r.all(e)},text:R}});function O(e,t,o){return b(e,t,o,this)}function P(e){const t=[],o=e&&e.children||[];let r=-1;for(;++r<o.length;)t[r]=this.one(o[r],r,e);return t.join("")}function T(e){const t=this.data("settings"),o=Object.assign({},t,e);Object.assign(this,{Compiler:function(e){return function(e,t){const o=t||{},i=o.quote||'"',s='"'===i?"'":'"';if('"'!==i&&"'"!==i)throw new Error("Invalid quote `"+i+"`, expected `'` or `\"`");return{one:O,all:P,settings:{omitOptionalTags:o.omitOptionalTags||!1,allowParseErrors:o.allowParseErrors||!1,allowDangerousCharacters:o.allowDangerousCharacters||!1,quoteSmart:o.quoteSmart||!1,preferUnquoted:o.preferUnquoted||!1,tightAttributes:o.tightAttributes||!1,upperDoctype:o.upperDoctype||!1,tightDoctype:o.tightDoctype||!1,bogusComments:o.bogusComments||!1,tightCommaSeparatedLists:o.tightCommaSeparatedLists||!1,tightSelfClosing:o.tightSelfClosing||!1,collapseEmptyAttributes:o.collapseEmptyAttributes||!1,allowDangerousHtml:o.allowDangerousHtml||!1,voids:o.voids||n,characterReferences:o.characterReferences||o.entities||{},closeSelfClosing:o.closeSelfClosing||!1,closeEmptyElements:o.closeEmptyElements||!1},schema:"svg"===o.space?r.JW:r.qy,quote:i,alternative:s}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}(e,o)}})}},95012:(e,t,o)=>{o.d(t,{Ay:()=>n});var r=o(2511);const n=r.default;r.CommaAndColonSeparatedRecord,r.ConnectionString,r.redactConnectionString},95469:(e,t,o)=>{o.d(t,{Ay:()=>n});var r=o(99598);const n=r.default;r.CommaAndColonSeparatedRecord,r.ConnectionString,r.redactConnectionString},95593:e=>{var t=[];function o(e){for(var o=-1,r=0;r<t.length;r++)if(t[r].identifier===e){o=r;break}return o}function r(e,r){for(var i={},s=[],a=0;a<e.length;a++){var l=e[a],u=r.base?l[0]+r.base:l[0],p=i[u]||0,c="".concat(u," ").concat(p);i[u]=p+1;var d=o(c),h={css:l[1],media:l[2],sourceMap:l[3]};-1!==d?(t[d].references++,t[d].updater(h)):t.push({identifier:c,updater:n(h,r),references:1}),s.push(c)}return s}function n(e,t){var o=t.domAPI(t);return o.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o.update(e=t)}else o.remove()}}e.exports=function(e,n){var i=r(e=e||[],n=n||{});return function(e){e=e||[];for(var s=0;s<i.length;s++){var a=o(i[s]);t[a].references--}for(var l=r(e,n),u=0;u<i.length;u++){var p=o(i[u]);0===t[p].references&&(t[p].updater(),t.splice(p,1))}i=l}}},96300:function(e,t,o){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},r.apply(this,arguments)},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=n(o(96652)),s=o(17642),a=o(61146),l=o(36431),u=o(41320),p=o(30345);t.default=i.memo((function(e){var t=i.useContext(s.BeansContext).context,o=i.useState(new l.CssClasses("ag-header-cell","ag-floating-filter")),n=o[0],c=o[1],d=i.useState(new l.CssClasses),h=d[0],f=d[1],g=i.useState(new l.CssClasses("ag-floating-filter-button","ag-hidden")),m=g[0],y=g[1],v=i.useState(),C=v[0],w=v[1],E=i.useState(),_=E[0],S=E[1],R=i.useRef(null),b=i.useRef(null),O=i.useRef(null),P=i.useRef(null),T=i.useRef(!1),A=i.useRef(),D=i.useRef();p.useEffectOnce((function(){D.current=new a.AgPromise((function(e){A.current=e}))}));var I=function(e){T.current||null!=e&&(A.current&&A.current(e),T.current=!0)},N=e.ctrl;p.useEffectOnce((function(){var e={addOrRemoveCssClass:function(e,t){return c((function(o){return o.setClass(e,t)}))},addOrRemoveBodyCssClass:function(e,t){return f((function(o){return o.setClass(e,t)}))},addOrRemoveButtonWrapperCssClass:function(e,t){return y((function(o){return o.setClass(e,t)}))},setWidth:function(e){return w(e)},setCompDetails:function(e){return S(e)},getFloatingFilterComp:function(){return D.current?D.current:null},setMenuIcon:function(e){return P.current.appendChild(e)}};N.setComp(e,R.current,P.current,b.current)})),i.useEffect((function(){return u.showJsComp(_,t,b.current,I)}),[_]);var x=i.useMemo((function(){return{width:C}}),[C]),M=i.useMemo((function(){return n.toString()}),[n]),L=i.useMemo((function(){return h.toString()}),[h]),F=i.useMemo((function(){return m.toString()}),[m]),G=i.useMemo((function(){return!!(_&&_.componentFromFramework&&l.isComponentStateless(_.componentClass))}),[_]),k=_&&_.componentFromFramework,V=_&&_.componentClass;return i.default.createElement("div",{ref:R,className:M,style:x,role:"gridcell",tabIndex:-1},i.default.createElement("div",{ref:b,className:L,role:"presentation"},k&&G&&i.default.createElement(V,r({},_.params)),k&&!G&&i.default.createElement(V,r({},_.params,{ref:I}))),i.default.createElement("div",{ref:O,className:F,role:"presentation"},i.default.createElement("button",{ref:P,type:"button","aria-label":"Open Filter Menu",className:"ag-floating-filter-button-button",tabIndex:-1})))}))},98206:function(e,t,o){var r,n=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)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(61146),a=i(o(46984)),l=i(o(81952)),u=function(e){function t(t){var o=e.call(this)||this;return o.frameworkComponents={agGroupCellRenderer:a.default,agGroupRowRenderer:a.default,agDetailCellRenderer:l.default},o.reactUi=t,o}return n(t,e),t.prototype.frameworkComponent=function(e){if(this.reactUi)return this.frameworkComponents[e]},t.prototype.isFrameworkComponent=function(e){if(!e)return!1;var t=e.prototype;return!(t&&"getGui"in t)},t}(s.VanillaFrameworkOverrides);t.ReactFrameworkOverrides=u},99094:(e,t,o)=>{o.d(t,{J0:()=>n});var r=o(34633);r.default,r.CommaAndColonSeparatedRecord,r.ConnectionString;const n=r.redactConnectionString},99598:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CommaAndColonSeparatedRecord=t.ConnectionString=t.redactConnectionString=void 0;const r=o(21655),n=o(88245);Object.defineProperty(t,"redactConnectionString",{enumerable:!0,get:function(){return n.redactConnectionString}});const i="__this_is_a_placeholder__",s=/^(?<protocol>[^/]+):\/\/(?:(?<username>[^:@]*)(?::(?<password>[^@]*))?@)?(?<hosts>(?!:)[^/?@]*)(?<rest>.*)/;class a extends Map{delete(e){return super.delete(this._normalizeKey(e))}get(e){return super.get(this._normalizeKey(e))}has(e){return super.has(this._normalizeKey(e))}set(e,t){return super.set(this._normalizeKey(e),t)}_normalizeKey(e){e=`${e}`;for(const t of this.keys())if(t.toLowerCase()===e.toLowerCase()){e=t;break}return e}}class l extends r.URL{}class u extends Error{get name(){return"MongoParseError"}}class p extends l{_hosts;constructor(e,t={}){const{looseValidation:o}=t;if(!o&&!(r=e).startsWith("mongodb://")&&!r.startsWith("mongodb+srv://"))throw new u('Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"');var r;const n=e.match(s);if(!n)throw new u("Invalid connection string");const{protocol:l,username:c,password:d,hosts:h,rest:f}=n.groups??{};if(!o){if(!l||!h)throw new u("Protocol and host list are required in the uri");try{decodeURIComponent(c??""),decodeURIComponent(d??"")}catch(e){throw new u(e.message)}const t=/[:/?#[\]@]/gi;if(c?.match(t))throw new u(`Username contains unescaped characters ${c}`);if(!c||!d){const t=e.replace(`${l}://`,"");if(t.startsWith("@")||t.startsWith(":"))throw new u("URI contained empty userinfo section")}if(d?.match(t))throw new u("Password contains unescaped characters");if(f?.match(/^[^/?]*@/))throw new u("Invalid connection string")}let g="";"string"==typeof c&&(g+=c),"string"==typeof d&&(g+=`:${d}`),g&&(g+="@");try{super(`${l.toLowerCase()}://${g}${i}${f}`)}catch(r){throw o&&new p(e,{...t,looseValidation:!1}),"string"==typeof r.message&&(r.message=r.message.replace(i,h)),r}if(this._hosts=h.split(","),!o){if(this.isSRV&&1!==this.hosts.length)throw new u("mongodb+srv URI cannot have multiple service names");if(this.isSRV&&this.hosts.some((e=>e.includes(":"))))throw new u("mongodb+srv URI cannot have port number")}var m;this.pathname||(this.pathname="/"),Object.setPrototypeOf(this.searchParams,(m=this.searchParams.constructor,class extends m{append(e,t){return super.append(this._normalizeKey(e),t)}delete(e){return super.delete(this._normalizeKey(e))}get(e){return super.get(this._normalizeKey(e))}getAll(e){return super.getAll(this._normalizeKey(e))}has(e){return super.has(this._normalizeKey(e))}set(e,t){return super.set(this._normalizeKey(e),t)}keys(){return super.keys()}values(){return super.values()}entries(){return super.entries()}[Symbol.iterator](){return super[Symbol.iterator]()}_normalizeKey(e){return a.prototype._normalizeKey.call(this,e)}}).prototype)}get host(){return i}set host(e){throw new Error("No single host for connection string")}get hostname(){return i}set hostname(e){throw new Error("No single host for connection string")}get port(){return""}set port(e){throw new Error("No single host for connection string")}get href(){return this.toString()}set href(e){throw new Error("Cannot set href for connection strings")}get isSRV(){return this.protocol.includes("srv")}get hosts(){return this._hosts}set hosts(e){this._hosts=e}toString(){return super.toString().replace(i,this.hosts.join(","))}clone(){return new p(this.toString(),{looseValidation:!0})}redact(e){return(0,n.redactValidConnectionString)(this,e)}typedSearchParams(){return this.searchParams}[Symbol.for("nodejs.util.inspect.custom")](){const{href:e,origin:t,protocol:o,username:r,password:n,hosts:i,pathname:s,search:a,searchParams:l,hash:u}=this;return{href:e,origin:t,protocol:o,username:r,password:n,hosts:i,pathname:s,search:a,searchParams:l,hash:u}}}t.ConnectionString=p,t.CommaAndColonSeparatedRecord=class extends a{constructor(e){super();for(const t of(e??"").split(",")){if(!t)continue;const e=t.indexOf(":");-1===e?this.set(t,""):this.set(t.slice(0,e),t.slice(e+1))}}toString(){return[...this].map((e=>e.join(":"))).join(",")}},t.default=p},99627:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(96652),n=o(17642),i=o(30345);t.default=function(e,t,o,s,a,l){var u=r.useContext(n.BeansContext),p=u.context,c=(u.userComponentFactory,r.useCallback((function(){var e=a.current;if(e){var t=e.getGui();t&&t.parentElement&&t.parentElement.removeChild(t),p.destroyBean(e),a.current=void 0}}),[]));r.useEffect((function(){var r=null!=e,n=e&&e.compDetails&&!e.compDetails.componentFromFramework;if(!r||!n||t&&null==o)c();else{var i=e.compDetails;if(a.current){var s=a.current,u=!(null==s.refresh||0!=e.force)&&s.refresh(i.params);if(!0===u||void 0===u)return;c()}var p=i.newAgStackInstance();if(p){var d=p.resolveNow(null,(function(e){return e}));if(d){var h=d.getGui();h&&((t?o:l.current).appendChild(h),a.current=d)}}}}),[e,t,s]),i.useEffectOnce((function(){return c}))}},99807:function(e,t,o){var r,n=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)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=s(o(96652)),l=o(20142),u=o(1743),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.setGridApi=function(e,o){t.api=e,t.columnApi=o},t}return n(t,e),t.prototype.render=function(){return this.props.suppressReactUi?a.default.createElement(l.AgGridReactLegacy,i({},this.props,{setGridApi:this.setGridApi})):a.default.createElement(u.AgGridReactUi,i({},this.props,{setGridApi:this.setGridApi}))},t}(a.Component);t.AgGridReact=p}};