ag-grid-enterprise
Version:
Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
34 lines • 1.22 MB
JavaScript
var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var i in t)__defProp(e,i,{get:t[i],enumerable:!0})},__copyProps=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of __getOwnPropNames(t))!__hasOwnProp.call(e,r)&&r!==i&&__defProp(e,r,{get:()=>t[r],enumerable:!(s=__getOwnPropDesc(t,r))||s.enumerable});return e},__reExport=(e,t,i)=>(__copyProps(e,t,"default"),i&&__copyProps(i,t,"default")),__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),main_exports={};__export(main_exports,{AdvancedFilterModule:()=>AdvancedFilterModule,AgDialog:()=>AgDialog,AgGroupComponent:()=>AgGroupComponent,AgGroupComponentSelector:()=>AgGroupComponentSelector,AgMenuItemComponent:()=>AgMenuItemComponent,AgMenuItemRenderer:()=>AgMenuItemRenderer,AgMenuList:()=>AgMenuList,AgMenuPanel:()=>AgMenuPanel,AgPanel:()=>AgPanel,AgPrimaryCols:()=>AgPrimaryCols,AgRichSelect:()=>AgRichSelect,ClipboardModule:()=>ClipboardModule,ColumnsToolPanelModule:()=>ColumnsToolPanelModule,EnterpriseCoreModule:()=>EnterpriseCoreModule,ExcelExportModule:()=>ExcelExportModule,FiltersToolPanelModule:()=>FiltersToolPanelModule,GridChartsModule:()=>GridChartsModule,GroupCellRenderer:()=>GroupCellRenderer,GroupCellRendererCtrl:()=>GroupCellRendererCtrl,LicenseManager:()=>GridLicenseManager,MasterDetailModule:()=>MasterDetailModule,MenuModule:()=>MenuModule,MultiFilter:()=>MultiFilter,MultiFilterModule:()=>MultiFilterModule,PillDragComp:()=>PillDragComp,PillDropZonePanel:()=>PillDropZonePanel,PivotDropZonePanel:()=>PivotDropZonePanel,RangeSelectionModule:()=>RangeSelectionModule,RichSelectModule:()=>RichSelectModule,RowGroupDropZonePanel:()=>RowGroupDropZonePanel,RowGroupingModule:()=>RowGroupingModule,ServerSideRowModelModule:()=>ServerSideRowModelModule,SetFilter:()=>SetFilter,SetFilterModule:()=>SetFilterModule,SideBarModule:()=>SideBarModule,SparklinesModule:()=>SparklinesModule,StatusBarModule:()=>StatusBarModule,TabbedLayout:()=>TabbedLayout,ToolPanelColDefService:()=>ToolPanelColDefService,ValuesDropZonePanel:()=>ValuesDropZonePanel,ViewportRowModelModule:()=>ViewportRowModelModule,VirtualList:()=>VirtualList,VirtualListDragFeature:()=>VirtualListDragFeature,agCharts:()=>agCharts,checkboxStyleDefault:()=>checkboxStyleDefault,colorSchemeDark:()=>colorSchemeDark,colorSchemeDarkBlue:()=>colorSchemeDarkBlue,colorSchemeDarkWarm:()=>colorSchemeDarkWarm,colorSchemeLight:()=>colorSchemeLight,colorSchemeLightCold:()=>colorSchemeLightCold,colorSchemeLightWarm:()=>colorSchemeLightWarm,createPart:()=>createPart,createTheme:()=>createTheme,exportMultipleSheetsAsExcel:()=>exportMultipleSheetsAsExcel,getMultipleSheetsAsExcel:()=>getMultipleSheetsAsExcel,getParamType:()=>getParamType,iconSetAlpine:()=>iconSetAlpine,iconSetMaterial:()=>iconSetMaterial,iconSetQuartz:()=>iconSetQuartz,iconSetQuartzBold:()=>iconSetQuartzBold,iconSetQuartzLight:()=>iconSetQuartzLight,iconSetQuartzRegular:()=>iconSetQuartzRegular,inputStyleBase:()=>inputStyleBase,inputStyleBordered:()=>inputStyleBordered,inputStyleUnderlined:()=>inputStyleUnderlined,paramValueToCss:()=>paramValueToCss,tabStyleAlpine:()=>tabStyleAlpine,tabStyleBase:()=>tabStyleBase,tabStyleMaterial:()=>tabStyleMaterial,tabStyleQuartz:()=>tabStyleQuartz,tabStyleRolodex:()=>tabStyleRolodex,themeAlpine:()=>themeAlpine,themeBalham:()=>themeBalham,themeQuartz:()=>themeQuartz}),module.exports=__toCommonJS(main_exports);var import_client_side_row_model=require("ag-grid-community"),import_core315=require("ag-grid-community"),import_csv_export6=require("ag-grid-community"),import_infinite_row_model=require("ag-grid-community"),import_core25=require("ag-grid-community"),import_core5=require("ag-grid-community"),import_core3=require("ag-grid-community"),import_core=require("ag-grid-community"),MD5=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility=this.md5("hello")!="5d41402abc4b2a76b9719d911017c592"}md5cycle(e,t){let i=e[0],s=e[1],r=e[2],a=e[3];i=this.ff(i,s,r,a,t[0],7,-680876936),a=this.ff(a,i,s,r,t[1],12,-389564586),r=this.ff(r,a,i,s,t[2],17,606105819),s=this.ff(s,r,a,i,t[3],22,-1044525330),i=this.ff(i,s,r,a,t[4],7,-176418897),a=this.ff(a,i,s,r,t[5],12,1200080426),r=this.ff(r,a,i,s,t[6],17,-1473231341),s=this.ff(s,r,a,i,t[7],22,-45705983),i=this.ff(i,s,r,a,t[8],7,1770035416),a=this.ff(a,i,s,r,t[9],12,-1958414417),r=this.ff(r,a,i,s,t[10],17,-42063),s=this.ff(s,r,a,i,t[11],22,-1990404162),i=this.ff(i,s,r,a,t[12],7,1804603682),a=this.ff(a,i,s,r,t[13],12,-40341101),r=this.ff(r,a,i,s,t[14],17,-1502002290),s=this.ff(s,r,a,i,t[15],22,1236535329),i=this.gg(i,s,r,a,t[1],5,-165796510),a=this.gg(a,i,s,r,t[6],9,-1069501632),r=this.gg(r,a,i,s,t[11],14,643717713),s=this.gg(s,r,a,i,t[0],20,-373897302),i=this.gg(i,s,r,a,t[5],5,-701558691),a=this.gg(a,i,s,r,t[10],9,38016083),r=this.gg(r,a,i,s,t[15],14,-660478335),s=this.gg(s,r,a,i,t[4],20,-405537848),i=this.gg(i,s,r,a,t[9],5,568446438),a=this.gg(a,i,s,r,t[14],9,-1019803690),r=this.gg(r,a,i,s,t[3],14,-187363961),s=this.gg(s,r,a,i,t[8],20,1163531501),i=this.gg(i,s,r,a,t[13],5,-1444681467),a=this.gg(a,i,s,r,t[2],9,-51403784),r=this.gg(r,a,i,s,t[7],14,1735328473),s=this.gg(s,r,a,i,t[12],20,-1926607734),i=this.hh(i,s,r,a,t[5],4,-378558),a=this.hh(a,i,s,r,t[8],11,-2022574463),r=this.hh(r,a,i,s,t[11],16,1839030562),s=this.hh(s,r,a,i,t[14],23,-35309556),i=this.hh(i,s,r,a,t[1],4,-1530992060),a=this.hh(a,i,s,r,t[4],11,1272893353),r=this.hh(r,a,i,s,t[7],16,-155497632),s=this.hh(s,r,a,i,t[10],23,-1094730640),i=this.hh(i,s,r,a,t[13],4,681279174),a=this.hh(a,i,s,r,t[0],11,-358537222),r=this.hh(r,a,i,s,t[3],16,-722521979),s=this.hh(s,r,a,i,t[6],23,76029189),i=this.hh(i,s,r,a,t[9],4,-640364487),a=this.hh(a,i,s,r,t[12],11,-421815835),r=this.hh(r,a,i,s,t[15],16,530742520),s=this.hh(s,r,a,i,t[2],23,-995338651),i=this.ii(i,s,r,a,t[0],6,-198630844),a=this.ii(a,i,s,r,t[7],10,1126891415),r=this.ii(r,a,i,s,t[14],15,-1416354905),s=this.ii(s,r,a,i,t[5],21,-57434055),i=this.ii(i,s,r,a,t[12],6,1700485571),a=this.ii(a,i,s,r,t[3],10,-1894986606),r=this.ii(r,a,i,s,t[10],15,-1051523),s=this.ii(s,r,a,i,t[1],21,-2054922799),i=this.ii(i,s,r,a,t[8],6,1873313359),a=this.ii(a,i,s,r,t[15],10,-30611744),r=this.ii(r,a,i,s,t[6],15,-1560198380),s=this.ii(s,r,a,i,t[13],21,1309151649),i=this.ii(i,s,r,a,t[4],6,-145523070),a=this.ii(a,i,s,r,t[11],10,-1120210379),r=this.ii(r,a,i,s,t[2],15,718787259),s=this.ii(s,r,a,i,t[9],21,-343485551),e[0]=this.add32(i,e[0]),e[1]=this.add32(s,e[1]),e[2]=this.add32(r,e[2]),e[3]=this.add32(a,e[3])}cmn(e,t,i,s,r,a){return t=this.add32(this.add32(t,e),this.add32(s,a)),this.add32(t<<r|t>>>32-r,i)}ff(e,t,i,s,r,a,o){return this.cmn(t&i|~t&s,e,t,r,a,o)}gg(e,t,i,s,r,a,o){return this.cmn(t&s|i&~s,e,t,r,a,o)}hh(e,t,i,s,r,a,o){return this.cmn(t^i^s,e,t,r,a,o)}ii(e,t,i,s,r,a,o){return this.cmn(i^(t|~s),e,t,r,a,o)}md51(e){const t=e.length,i=[1732584193,-271733879,-1732584194,271733878];let s;for(s=64;s<=e.length;s+=64)this.md5cycle(i,this.md5blk(e.substring(s-64,s)));e=e.substring(s-64);const r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(s=0;s<e.length;s++)r[s>>2]|=e.charCodeAt(s)<<(s%4<<3);if(r[s>>2]|=128<<(s%4<<3),s>55)for(this.md5cycle(i,r),s=0;s<16;s++)r[s]=0;return r[14]=t*8,this.md5cycle(i,r),i}md5blk(e){const t=[];for(let i=0;i<64;i+=4)t[i>>2]=e.charCodeAt(i)+(e.charCodeAt(i+1)<<8)+(e.charCodeAt(i+2)<<16)+(e.charCodeAt(i+3)<<24);return t}rhex(e){const t="0123456789abcdef".split("");let i="",s=0;for(;s<4;s++)i+=t[e>>s*8+4&15]+t[e>>s*8&15];return i}hex(e){for(let t=0;t<e.length;t++)e[t]=this.rhex(e[t]);return e.join("")}md5(e){return this.hex(this.md51(e))}add32(e,t){return this.ieCompatibility?this.add32Compat(e,t):this.add32Std(e,t)}add32Std(e,t){return e+t&4294967295}add32Compat(e,t){const i=(e&65535)+(t&65535);return(e>>16)+(t>>16)+(i>>16)<<16|i&65535}},LICENSE_TYPES={"01":"GRID","02":"CHARTS","0102":"BOTH"},LICENSING_HELP_URL="https://ag-grid.com/licensing/",_LicenseManager=class O{constructor(t){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=t,this.md5=new MD5,this.md5.init()}validateLicense(){const t=this.getLicenseDetails(O.licenseKey),i=`AG Grid ${t.currentLicenseType==="BOTH"?"and AG Charts ":""}Enterprise`,s=t.suppliedLicenseType===void 0?"":`AG ${t.suppliedLicenseType==="BOTH"?"Grid and AG Charts":t.suppliedLicenseType==="GRID"?"Grid":"Charts"} Enterprise`;if(t.missing)(!this.isWebsiteUrl()||this.isForceWatermark())&&this.outputMissingLicenseKey(i);else if(t.expired){const r=O.getGridReleaseDate(),a=O.formatDate(r);this.outputExpiredKey(t.expiry,a,i,s)}else t.valid?t.isTrial&&t.trialExpired&&this.outputExpiredTrialKey(t.expiry,i,s):this.outputInvalidLicenseKey(!!t.incorrectLicenseType,i,s)}static extractExpiry(t){const i=t.substring(t.lastIndexOf("_")+1,t.length);return new Date(parseInt(O.decode(i),10))}static extractLicenseComponents(t){let i=t.replace(/[\u200B-\u200D\uFEFF]/g,"");if(i=i.replace(/\r?\n|\r/g,""),t.length<=32)return{md5:null,license:t,version:null,isTrial:null};const s=i.length-32,r=i.substring(s),a=i.substring(0,s),[o,n,l]=O.extractBracketedInformation(i);return{md5:r,license:a,version:o,isTrial:n,type:l}}getLicenseDetails(t){const i=O.chartsLicenseManager?"BOTH":"GRID";if((0,import_core._missingOrEmpty)(t))return{licenseKey:t,valid:!1,missing:!0,currentLicenseType:i};const s=O.getGridReleaseDate(),{md5:r,license:a,version:o,isTrial:n,type:l}=O.extractLicenseComponents(t);let c=r===this.md5.md5(a)&&t.indexOf("For_Trialing_ag-Grid_Only")===-1,d,h,u=null,g=!1,p;function m(){d=u<new Date,h=void 0}if(c&&(u=O.extractExpiry(a),c=!isNaN(u.getTime()),c))switch(h=s>u,o){case"legacy":case"2":{n&&m();break}case"3":(0,import_core._missingOrEmpty)(l)?c=!1:(p=l,l!==LICENSE_TYPES["01"]&&l!==LICENSE_TYPES["0102"]||i==="BOTH"&&p!=="BOTH"?(c=!1,g=!0):n&&m())}return c?{licenseKey:t,valid:c,expiry:O.formatDate(u),expired:h,version:o,isTrial:n,trialExpired:d,incorrectLicenseType:g,currentLicenseType:i,suppliedLicenseType:p}:{licenseKey:t,valid:c,incorrectLicenseType:g,currentLicenseType:i,suppliedLicenseType:p}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isWebsiteUrl()&&!(0,import_core._missingOrEmpty)(this.watermarkMessage)}getWatermarkMessage(){return this.watermarkMessage||""}getHostname(){const i=(this.document.defaultView||window).location,{hostname:s=""}=i;return s}isForceWatermark(){const i=(this.document.defaultView||window).location,{pathname:s}=i;return s?s.indexOf("forceWatermark")!==-1:!1}isWebsiteUrl(){return this.getHostname().match(/^((?:[\w-]+\.)?ag-grid\.com)$/)!==null}isLocalhost(){return this.getHostname().match(/^(?:127\.0\.0\.1|localhost)$/)!==null}static formatDate(t){const i=["January","February","March","April","May","June","July","August","September","October","November","December"],s=t.getDate(),r=t.getMonth(),a=t.getFullYear();return s+" "+i[r]+" "+a}static getGridReleaseDate(){return new Date(parseInt(O.decode(O.RELEASE_INFORMATION),10))}static decode(t){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let s="",r,a,o,n,l,c,d,h=0;const u=t.replace(/[^A-Za-z0-9+/=]/g,"");for(;h<u.length;)n=i.indexOf(u.charAt(h++)),l=i.indexOf(u.charAt(h++)),c=i.indexOf(u.charAt(h++)),d=i.indexOf(u.charAt(h++)),r=n<<2|l>>4,a=(l&15)<<4|c>>2,o=(c&3)<<6|d,s=s+String.fromCharCode(r),c!=64&&(s=s+String.fromCharCode(a)),d!=64&&(s=s+String.fromCharCode(o));return s=O.utf8_decode(s),s}static utf8_decode(t){t=t.replace(/rn/g,"n");let i="";for(let s=0;s<t.length;s++){const r=t.charCodeAt(s);r<128?i+=String.fromCharCode(r):r>127&&r<2048?(i+=String.fromCharCode(r>>6|192),i+=String.fromCharCode(r&63|128)):(i+=String.fromCharCode(r>>12|224),i+=String.fromCharCode(r>>6&63|128),i+=String.fromCharCode(r&63|128))}return i}static setChartsLicenseManager(t){this.chartsLicenseManager=t}static setLicenseKey(t){this.licenseKey=t,this.chartsLicenseManager&&this.chartsLicenseManager.setLicenseKey(t,!0)}static extractBracketedInformation(t){if(!t.includes("["))return["legacy",!1,void 0];const i=t.match(/\[(.*?)\]/g).map(n=>n.replace("[","").replace("]",""));if(!i||i.length===0)return["legacy",!1,void 0];const s=i.filter(n=>n==="TRIAL").length===1,r=i.filter(n=>n.indexOf("v")===0)[0],a=r?r.replace("v",""):"legacy",o=LICENSE_TYPES[i.filter(n=>LICENSE_TYPES[n])[0]];return[a,s,o]}centerPadAndOutput(t){const i=this.totalMessageLength-t.length;console.error(t.padStart(i/2+t.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(t,i="*",s=""){console.error(t.padEnd(this.totalMessageLength-s.length,i)+s)}outputInvalidLicenseKey(t,i,s){t?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${s} only and does not cover you for ${i}.`," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${LICENSING_HELP_URL}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")):(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Invalid License Key "),this.padAndOutput("* Your license key is not valid."," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${LICENSING_HELP_URL}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(t,i,s){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${s} expired on ${t}.`," ","*"),this.padAndOutput("* Please email info@ag-grid.com to purchase a license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="Trial Period Expired"}outputMissingLicenseKey(t){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" License Key Not Found "),this.padAndOutput(`* All ${t} features are unlocked for trial.`," ","*"),this.padAndOutput("* If you want to hide the watermark please email info@ag-grid.com for a trial license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="For Trial Use Only"}outputExpiredKey(t,i,s,r){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${s} License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${r} released before ${t}.`," ","*"),this.padAndOutput(`* The version you are trying to use was released on ${i}.`," ","*"),this.padAndOutput("* Please contact info@ag-grid.com to renew your license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="License Expired"}};_LicenseManager.RELEASE_INFORMATION="MTcyNzI1NTEwMTc0NQ==";var LicenseManager=_LicenseManager,import_core2=require("ag-grid-community"),AgWatermark=class extends import_core2.Component{constructor(){super(`<div class="ag-watermark">
<div data-ref="eLicenseTextRef" class="ag-watermark-text"></div>
</div>`),this.eLicenseTextRef=import_core2.RefPlaceholder}wireBeans(e){this.licenseManager=e.licenseManager}postConstruct(){const e=this.shouldDisplayWatermark();this.setDisplayed(e),e&&(this.eLicenseTextRef.innerText=this.licenseManager.getWatermarkMessage(),window.setTimeout(()=>this.addCssClass("ag-opacity-zero"),0),window.setTimeout(()=>this.setDisplayed(!1),5e3))}shouldDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}},AgWatermarkSelector={selector:"AG-WATERMARK",component:AgWatermark},GridLicenseManager=class extends import_core3.BeanStub{constructor(){super(...arguments),this.beanName="licenseManager"}postConstruct(){this.validateLicense()}validateLicense(){this.licenseManager=new LicenseManager((0,import_core3._getDocument)(this.gos)),this.licenseManager.validateLicense()}static getLicenseDetails(e){return new LicenseManager(null).getLicenseDetails(e)}getWatermarkSelector(){return AgWatermarkSelector}isDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}getWatermarkMessage(){return this.licenseManager.getWatermarkMessage()}static setLicenseKey(e){LicenseManager.setLicenseKey(e)}static setChartsLicenseManager(e){LicenseManager.setChartsLicenseManager(e)}},VERSION="32.2.1",import_core4=require("ag-grid-community"),AgMenuItemRenderer=class extends import_core4.Component{constructor(){super(),this.setTemplate("<div></div>")}init(e){this.params=e,this.cssClassPrefix=this.params.cssClassPrefix??"ag-menu-option",this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu()}configureDefaults(){return!0}addIcon(){if(this.params.isCompact)return;const e=(0,import_core4._loadTemplate)(`<span data-ref="eIcon" class="${this.getClassName("part")} ${this.getClassName("icon")}" role="presentation"></span>`),{checked:t,icon:i}=this.params;t?e.appendChild((0,import_core4._createIconNoSpan)("check",this.gos)):i&&((0,import_core4._isNodeOrElement)(i)?e.appendChild(i):typeof i=="string"?e.innerHTML=i:(0,import_core4._warnOnce)("menu item icon must be DOM node or string")),this.getGui().appendChild(e)}addName(){const e=(0,import_core4._loadTemplate)(`<span data-ref="eName" class="${this.getClassName("part")} ${this.getClassName("text")}">${this.params.name||""}</span>`);this.getGui().appendChild(e)}addShortcut(){if(this.params.isCompact)return;const e=(0,import_core4._loadTemplate)(`<span data-ref="eShortcut" class="${this.getClassName("part")} ${this.getClassName("shortcut")}">${this.params.shortcut||""}</span>`);this.getGui().appendChild(e)}addSubMenu(){const e=(0,import_core4._loadTemplate)(`<span data-ref="ePopupPointer" class="${this.getClassName("part")} ${this.getClassName("popup-pointer")}"></span>`),t=this.getGui();if(this.params.subMenu){const i=this.gos.get("enableRtl")?"smallLeft":"smallRight";(0,import_core4._setAriaExpanded)(t,!1),e.appendChild((0,import_core4._createIconNoSpan)(i,this.gos))}t.appendChild(e)}getClassName(e){return`${this.cssClassPrefix}-${e}`}destroy(){super.destroy()}},EnterpriseCoreModule=(0,import_core5._defineModule)({version:VERSION,moduleName:import_core5.ModuleNames.EnterpriseCoreModule,beans:[GridLicenseManager],userComponents:[{name:"agMenuItem",classImp:AgMenuItemRenderer}]}),import_core6=require("ag-grid-community");function getAgGroupComponentTemplate(e){const t=e.cssIdentifier||"default",i=e.direction||"vertical";return`
<div class="ag-group ag-${t}-group" role="presentation">
<div data-ref="eToolbar" class="ag-group-toolbar ag-${t}-group-toolbar">
<ag-checkbox data-ref="cbGroupEnabled"></ag-checkbox>
</div>
<div data-ref="eContainer" class="ag-group-container ag-group-container-${i} ag-${t}-group-container"></div>
</div>
`}var AgGroupComponent=class extends import_core6.Component{constructor(e={}){super(getAgGroupComponentTemplate(e),[import_core6.AgCheckboxSelector]),this.params=e,this.suppressEnabledCheckbox=!0,this.suppressToggleExpandOnEnableChange=!1,this.eToolbar=import_core6.RefPlaceholder,this.cbGroupEnabled=import_core6.RefPlaceholder,this.eContainer=import_core6.RefPlaceholder;const{enabled:t,items:i,suppressEnabledCheckbox:s,expanded:r,suppressToggleExpandOnEnableChange:a,useToggle:o}=e;this.cssIdentifier=e.cssIdentifier||"default",this.enabled=t??!0,this.items=i||[],this.useToggle=o??!1,this.alignItems=e.alignItems||"center",this.expanded=r??!0,s!=null&&(this.suppressEnabledCheckbox=s),a!=null&&(this.suppressToggleExpandOnEnableChange=a)}postConstruct(){if(this.setupTitleBar(),this.items.length){const r=this.items;this.items=[],this.addItems(r)}const e=this.localeService.getLocaleTextFunc();this.cbGroupEnabled.setLabel(e("enabled","Enabled")),this.enabled&&this.setEnabled(this.enabled,void 0,!0),this.setAlignItems(this.alignItems);const{onEnableChange:t,onExpandedChange:i,suppressOpenCloseIcons:s}=this.params;this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(s??!1),this.refreshChildDisplay(),(0,import_core6._setDisplayed)(this.eContainer,this.expanded),this.cbGroupEnabled.onValueChange(r=>{this.setEnabled(r,!0,this.suppressToggleExpandOnEnableChange),this.dispatchEnableChangeEvent(r)}),t!=null&&this.onEnableChange(t),i!=null&&this.onExpandedChange(i)}refreshChildDisplay(){(0,import_core6._setDisplayed)(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),this.eTitleBar?.refreshOnExpand(this.expanded)}isExpanded(){return this.expanded}setAlignItems(e){this.alignItems!==e&&this.removeCssClass(`ag-group-item-alignment-${this.alignItems}`),this.alignItems=e;const t=`ag-group-item-alignment-${this.alignItems}`;return this.addCssClass(t),this}toggleGroupExpand(e,t){if(this.eTitleBar?.isSuppressCollapse()&&!this.useToggle)e=!0,t=!0;else if(e=e??!this.expanded,this.expanded===e)return this;return this.expanded=e,this.refreshChildDisplay(),(0,import_core6._setDisplayed)(this.eContainer,e),t||this.dispatchLocalEvent({type:e?"expanded":"collapsed"}),this}addItems(e){e.forEach(t=>this.addItem(t))}prependItem(e){this.insertItem(e,!0)}addItem(e){this.insertItem(e,!1)}insertItem(e,t){const i=this.eContainer,s=e instanceof import_core6.Component?e.getGui():e;s.classList.add("ag-group-item",`ag-${this.cssIdentifier}-group-item`),t?(i.insertAdjacentElement("afterbegin",s),this.items.unshift(s)):(i.appendChild(s),this.items.push(s))}hideItem(e,t){const i=this.items[t];(0,import_core6._setDisplayed)(i,!e)}getItemIndex(e){const t=e instanceof import_core6.Component?e.getGui():e;return this.items.indexOf(t)}setTitle(e){return this.eTitleBar?.setTitle(e),this}addTitleBarWidget(e){return this.eTitleBar?.addWidget(e),this}addCssClassToTitleBar(e){this.eTitleBar?.addCssClass(e)}dispatchEnableChangeEvent(e){const t={type:"enableChange",enabled:e};this.dispatchLocalEvent(t)}setEnabled(e,t,i){return this.enabled=e,this.refreshDisabledStyles(),i||this.toggleGroupExpand(e),t||(this.cbGroupEnabled.setValue(e),this.eToggle?.setValue(e)),this}isEnabled(){return this.enabled}onEnableChange(e){return this.addManagedListeners(this,{enableChange:t=>e(t.enabled)}),this}onExpandedChange(e){return this.addManagedListeners(this,{expanded:()=>e(!0),collapsed:()=>e(!1)}),this}hideEnabledCheckbox(e){return this.suppressEnabledCheckbox=e,this.refreshChildDisplay(),this.refreshDisabledStyles(),this}hideOpenCloseIcons(e){return this.eTitleBar?.hideOpenCloseIcons(e),this}refreshDisabledStyles(){const e=!this.enabled;this.eContainer.classList.toggle("ag-disabled",e),this.eTitleBar?.refreshDisabledStyles(this.suppressEnabledCheckbox&&e),this.eContainer.classList.toggle("ag-disabled-group-container",e)}setupTitleBar(){const e=this.useToggle?this.createToggleTitleBar():this.createDefaultTitleBar();this.eToolbar.insertAdjacentElement("beforebegin",e.getGui())}createDefaultTitleBar(){const e=this.createManagedBean(new DefaultTitleBar(this.params));return this.eTitleBar=e,e.refreshOnExpand(this.expanded),this.addManagedListeners(e,{expandedChanged:t=>this.toggleGroupExpand(t.expanded)}),e}createToggleTitleBar(){const e=this.createManagedBean(new import_core6.AgToggleButton({value:this.enabled,label:this.params.title,labelAlignment:"left",labelWidth:"flex",onValueChange:t=>{this.setEnabled(t,!0),this.dispatchEnableChangeEvent(t)}}));return e.addCssClass("ag-group-title-bar"),e.addCssClass(`ag-${this.params.cssIdentifier??"default"}-group-title-bar ag-unselectable`),this.eToggle=e,this.toggleGroupExpand(this.enabled),e}},TITLE_BAR_DISABLED_CLASS="ag-disabled-group-title-bar";function getDefaultTitleBarTemplate(e){const t=e.cssIdentifier??"default",i=e.suppressKeyboardNavigation?"presentation":"role";return`
<div class="ag-group-title-bar ag-${t}-group-title-bar ag-unselectable" role="${i}">
<span class="ag-group-title-bar-icon ag-${t}-group-title-bar-icon" data-ref="eGroupOpenedIcon" role="presentation"></span>
<span class="ag-group-title-bar-icon ag-${t}-group-title-bar-icon" data-ref="eGroupClosedIcon" role="presentation"></span>
<span data-ref="eTitle" class="ag-group-title ag-${t}-group-title"></span>
</div>
`}var DefaultTitleBar=class extends import_core6.Component{constructor(e={}){super(getDefaultTitleBarTemplate(e)),this.suppressOpenCloseIcons=!1,this.suppressKeyboardNavigation=!1,this.eGroupOpenedIcon=import_core6.RefPlaceholder,this.eGroupClosedIcon=import_core6.RefPlaceholder,this.eTitle=import_core6.RefPlaceholder;const{title:t,suppressOpenCloseIcons:i,suppressKeyboardNavigation:s}=e;t&&t.length>0&&(this.title=t),i!=null&&(this.suppressOpenCloseIcons=i),this.suppressKeyboardNavigation=s??!1}postConstruct(){this.setTitle(this.title),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract()}setupExpandContract(){this.eGroupClosedIcon.appendChild((0,import_core6._createIcon)("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild((0,import_core6._createIcon)("columnSelectOpen",this.gos,null)),this.addManagedElementListeners(this.getGui(),{click:()=>this.dispatchExpandChanged(),keydown:e=>{switch(e.key){case import_core6.KeyCode.ENTER:case import_core6.KeyCode.SPACE:e.preventDefault(),this.dispatchExpandChanged();break;case import_core6.KeyCode.RIGHT:case import_core6.KeyCode.LEFT:e.preventDefault(),this.dispatchExpandChanged(e.key===import_core6.KeyCode.RIGHT);break}}})}refreshOnExpand(e){this.refreshAriaStatus(e),this.refreshOpenCloseIcons(e)}refreshAriaStatus(e){this.suppressOpenCloseIcons||(0,import_core6._setAriaExpanded)(this.getGui(),e)}refreshOpenCloseIcons(e){const t=!this.suppressOpenCloseIcons;(0,import_core6._setDisplayed)(this.eGroupOpenedIcon,t&&e),(0,import_core6._setDisplayed)(this.eGroupClosedIcon,t&&!e)}isSuppressCollapse(){return this.suppressOpenCloseIcons}dispatchExpandChanged(e){const t={type:"expandedChanged",expanded:e};this.dispatchLocalEvent(t)}setTitle(e){const t=this.getGui(),i=!!e&&e.length>0;e=i?e:void 0,this.eTitle.textContent=e??"",(0,import_core6._setDisplayed)(t,i),e!==this.title&&(this.title=e);const s=t.classList.contains(TITLE_BAR_DISABLED_CLASS);return this.refreshDisabledStyles(s),this}addWidget(e){return this.getGui().appendChild(e),this}hideOpenCloseIcons(e){return this.suppressOpenCloseIcons=e,e&&this.dispatchExpandChanged(!0),this}refreshDisabledStyles(e){const t=this.getGui();e?(t.classList.add(TITLE_BAR_DISABLED_CLASS),t.removeAttribute("tabindex")):(t.classList.remove(TITLE_BAR_DISABLED_CLASS),typeof this.title=="string"&&!this.suppressKeyboardNavigation?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex"))}},AgGroupComponentSelector={selector:"AG-GROUP-COMPONENT",component:AgGroupComponent},import_core13=require("ag-grid-community"),import_core9=require("ag-grid-community"),import_core7=require("ag-grid-community"),import_core8=require("ag-grid-community"),AgPill=class extends import_core8.Component{constructor(e){super(`
<div class="ag-pill" role="option">
<span class="ag-pill-text" data-ref="eText"></span>
<span class="ag-button ag-pill-button" data-ref="eButton" role="presentation"></span>
</div>
`),this.config=e,this.eText=import_core7.RefPlaceholder,this.eButton=import_core7.RefPlaceholder}postConstruct(){const{config:e,eButton:t}=this,{onKeyDown:i,onButtonClick:s}=e;this.getGui().setAttribute("tabindex",String(this.gos.get("tabIndex"))),this.addGuiEventListener("focus",()=>{this.eButton.focus()}),i&&this.addGuiEventListener("keydown",i),s&&this.addManagedElementListeners(t,{click:s})}toggleCloseButtonClass(e,t){this.eButton.classList.toggle(e,t)}setText(e){this.eText.textContent=e}getText(){return this.eText.textContent}},AgPillContainer=class extends import_core9.Component{constructor(){super(`
<div class="ag-pill-container" role="listbox"></div>
`),this.pills=[]}wireBeans(e){this.focusService=e.focusService}init(e){this.params=e,this.refresh()}refresh(){this.clearPills();const{params:e,onPillKeyDown:t}=this,i=e.getValue();if(!Array.isArray(i))return;const s=i.length;for(let r=0;r<s;r++){const a=i[r],o=this.createBean(new AgPill({onButtonClick:()=>this.onPillButtonClick(o),onKeyDown:t.bind(this)})),n=o.getGui();(0,import_core9._setAriaPosInSet)(n,r+1),(0,import_core9._setAriaSetSize)(n,s),e.onPillMouseDown&&o.addGuiEventListener("mousedown",e.onPillMouseDown),e.announceItemFocus&&o.addGuiEventListener("focus",e.announceItemFocus),o.setText(a),o.toggleCloseButtonClass("ag-icon-cancel",!0),this.appendChild(n),this.pills.push(o)}}onNavigationKeyDown(e){const{key:t}=e;if(!this.pills.length||t!==import_core9.KeyCode.LEFT&&t!==import_core9.KeyCode.RIGHT)return;e.preventDefault();const i=(0,import_core9._getActiveDomElement)(this.gos),s=this.getGui(),{params:r,focusService:a}=this;if(s.contains(i)){const o=a.findNextFocusableElement(s,!1,t===import_core9.KeyCode.LEFT);o?o.focus():r.eWrapper&&r.eWrapper.focus()}else{const o=a.findFocusableElements(s);o.length>0&&o[t===import_core9.KeyCode.RIGHT?0:o.length-1].focus()}}clearPills(){const e=this.getGui();e.contains((0,import_core9._getActiveDomElement)(this.gos))&&this.params.eWrapper&&this.params.eWrapper.focus(),(0,import_core9._clearElement)(e),this.destroyBeans(this.pills),this.pills=[]}onPillButtonClick(e){this.deletePill(e)}onPillKeyDown(e){const t=e.key;if(t!==import_core9.KeyCode.DELETE&&t!==import_core9.KeyCode.BACKSPACE)return;e.preventDefault();const i=(0,import_core9._getDocument)(this.gos),s=this.pills.findIndex(a=>a.getGui().contains(i.activeElement));if(s===-1)return;const r=this.pills[s];r&&this.deletePill(r,s)}deletePill(e,t){const i=e.getText(),s=(this.params.getValue()||[]).filter(r=>r!==i);if(this.params.setValue(s),!s.length&&this.params.eWrapper)this.params.eWrapper.focus();else if(t!=null){const r=this.pills[Math.min(t,this.pills.length-1)];r&&r.getFocusableElement().focus()}}destroy(){this.clearPills(),super.destroy()}},import_core12=require("ag-grid-community"),import_core10=require("ag-grid-community"),RichSelectRow=class extends import_core10.Component{constructor(e){super('<div class="ag-rich-select-row" role="presentation"></div>'),this.params=e}wireBeans(e){this.userComponentFactory=e.userComponentFactory}setState(e){let t="";const{params:i}=this;i.valueFormatter&&(t=i.valueFormatter(e)),this.populateWithRenderer(e,t)||this.populateWithoutRenderer(e,t),this.value=e}highlightString(e){const{parsedValue:t}=this;if(this.params.cellRenderer||!(0,import_core10._exists)(t))return;let i=(0,import_core10._exists)(e);if(i){const s=t?.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(s>=0){const r=s+e.length,a=(0,import_core10._escapeString)(t.slice(0,s),!0),o=(0,import_core10._escapeString)(t.slice(s,r),!0),n=(0,import_core10._escapeString)(t.slice(r));this.renderValueWithoutRenderer(`${a}<span class="ag-rich-select-row-text-highlight">${o}</span>${n}`)}else i=!1}i||this.renderValueWithoutRenderer(t)}updateSelected(e){const t=this.getGui();(0,import_core10._setAriaSelected)(t.parentElement,e),this.addOrRemoveCssClass("ag-rich-select-row-selected",e)}getValue(){return this.value}toggleHighlighted(e){this.addOrRemoveCssClass("ag-rich-select-row-highlighted",e)}populateWithoutRenderer(e,t){const i=(0,import_core10._getDocument)(this.gos),s=this.getGui(),r=i.createElement("span");r.style.overflow="hidden",r.style.textOverflow="ellipsis";const a=(0,import_core10._escapeString)((0,import_core10._exists)(t)?t:e,!0);this.parsedValue=(0,import_core10._exists)(a)?a:null,s.appendChild(r),this.renderValueWithoutRenderer(a),this.setTooltip({newTooltipText:this.parsedValue,shouldDisplayTooltip:()=>r.scrollWidth>r.clientWidth})}renderValueWithoutRenderer(e){const t=this.getGui().querySelector("span");t&&(t.innerHTML=(0,import_core10._exists)(e)?e:" ")}populateWithRenderer(e,t){let i,s;if(this.params.cellRenderer){const r=this.getParentComponent()?.getParentComponent();s=this.userComponentFactory.getEditorRendererDetails(this.params,{value:e,valueFormatted:t,getValue:()=>r?.getValue(),setValue:a=>{r?.setValue(a,!0)},setTooltip:(a,o)=>{this.setTooltip({newTooltipText:a,shouldDisplayTooltip:o})}})}return s&&(i=s.newAgStackInstance()),i&&(0,import_core10._bindCellRendererToHtmlElement)(i,this.getGui()),i?(i.then(r=>{this.addDestroyFunc(()=>{this.destroyBean(r)})}),!0):!1}},import_core11=require("ag-grid-community");function getVirtualListTemplate(e){return`<div class="ag-virtual-list-viewport ag-${e}-virtual-list-viewport" role="presentation">
<div class="ag-virtual-list-container ag-${e}-virtual-list-container" data-ref="eContainer"></div>
</div>`}var VirtualList=class extends import_core11.TabGuardComp{constructor(e){super(getVirtualListTemplate(e?.cssIdentifier||"default")),this.renderedRows=new Map,this.rowHeight=20,this.pageSize=-1,this.isScrolling=!1,this.isHeightFromTheme=!0,this.eContainer=import_core11.RefPlaceholder,this.awaitStableCallbacks=[];const{cssIdentifier:t="default",ariaRole:i="listbox",listName:s}=e||{};this.cssIdentifier=t,this.ariaRole=i,this.listName=s}wireBeans(e){this.resizeObserverService=e.resizeObserverService,this.animationFrameService=e.animationFrameService,this.environment=e.environment}postConstruct(){this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e),focusInnerElement:e=>this.focusInnerElement(e),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)}),this.setAriaProperties(),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanged.bind(this)})}onGridStylesChanged(e){e.listItemHeightChanged&&(this.rowHeight=this.getItemHeight(),this.refresh())}setAriaProperties(){const t=this.localeService.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),i=this.eContainer;(0,import_core11._setAriaRole)(i,this.ariaRole),(0,import_core11._setAriaLabel)(i,t)}addResizeObserver(){const e=()=>this.animationFrameService.requestAnimationFrame(()=>this.drawVirtualRows()),t=this.resizeObserverService.observeResize(this.getGui(),e);this.addDestroyFunc(t)}focusInnerElement(e){this.focusRow(e?this.model.getRowCount()-1:0)}onFocusIn(e){const t=e.target;t.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=(0,import_core11._getAriaPosInSet)(t)-1)}onFocusOut(e){this.getFocusableElement().contains(e.relatedTarget)||(this.lastFocusedRowIndex=null)}handleKeyDown(e){switch(e.key){case import_core11.KeyCode.UP:case import_core11.KeyCode.DOWN:this.navigate(e.key===import_core11.KeyCode.UP)&&e.preventDefault();break;case import_core11.KeyCode.PAGE_HOME:case import_core11.KeyCode.PAGE_END:case import_core11.KeyCode.PAGE_UP:case import_core11.KeyCode.PAGE_DOWN:this.navigateToPage(e.key)!==null&&e.preventDefault();break}}onTabKeyDown(e){(0,import_core11._stopPropagationForAgGrid)(e),this.forceFocusOutOfContainer(e.shiftKey)}navigate(e){if(this.lastFocusedRowIndex==null)return!1;const t=this.lastFocusedRowIndex+(e?-1:1);return t<0||t>=this.model.getRowCount()?!1:(this.focusRow(t),!0)}navigateToPage(e,t="focused"){let i=!1;t==="focused"&&(t=this.getLastFocusedRow(),i=!0);const s=this.model.getRowCount()-1;let r=-1;return e===import_core11.KeyCode.PAGE_HOME?r=0:e===import_core11.KeyCode.PAGE_END?r=s:e===import_core11.KeyCode.PAGE_DOWN?r=Math.min(t+this.pageSize,s):e===import_core11.KeyCode.PAGE_UP&&(r=Math.max(t-this.pageSize,0)),r===-1?null:(i?this.focusRow(r):this.ensureIndexVisible(r),r)}getLastFocusedRow(){return this.lastFocusedRowIndex}focusRow(e){this.isScrolling||(this.isScrolling=!0,this.ensureIndexVisible(e),this.animationFrameService.requestAnimationFrame(()=>{if(this.isScrolling=!1,!this.isAlive())return;const t=this.renderedRows.get(e);t&&t.eDiv.focus()}))}getComponentAt(e){const t=this.renderedRows.get(e);return t&&t.rowComponent}forEachRenderedRow(e){this.renderedRows.forEach((t,i)=>e(t.rowComponent,i))}getItemHeight(){return this.isHeightFromTheme?this.environment.getDefaultListItemHeight():this.rowHeight}ensureIndexVisible(e,t=!0){const i=this.model.getRowCount();if(typeof e!="number"||e<0||e>=i)return(0,import_core11._warnOnce)("invalid row index for ensureIndexVisible: ",e),!1;const s=e*this.rowHeight,r=s+this.rowHeight,a=this.getGui(),o=a.scrollTop,n=a.offsetHeight,l=o+n,c=t?0:this.rowHeight,d=o>s+c,h=l<r-c;if(d)return a.scrollTop=s,!0;if(h){const u=r-n;return a.scrollTop=u,!0}return!1}setComponentCreator(e){this.componentCreator=e}setComponentUpdater(e){this.componentUpdater=e}getRowHeight(){return this.rowHeight}getScrollTop(){return this.getGui().scrollTop}setRowHeight(e){this.isHeightFromTheme=!1,this.rowHeight=e,this.refresh()}refresh(e){if(this.model==null||!this.isAlive())return;const t=this.model.getRowCount();this.eContainer.style.height=`${t*this.rowHeight}px`,this.awaitStable(()=>{this.isAlive()&&(this.canSoftRefresh(e)?this.drawVirtualRows(!0):(this.clearVirtualRows(),this.drawVirtualRows()))})}awaitStable(e){if(this.awaitStableCallbacks.push(e),this.awaitStableCallbacks.length>1)return;const t=this.model.getRowCount();(0,import_core11._waitUntil)(()=>this.eContainer.clientHeight>=t*this.rowHeight,()=>{const i=this.awaitStableCallbacks;this.awaitStableCallbacks=[],i.forEach(s=>s())})}canSoftRefresh(e){return!!(e&&this.renderedRows.size&&typeof this.model.areRowsEqual=="function"&&this.componentUpdater)}clearVirtualRows(){this.renderedRows.forEach((e,t)=>this.removeRow(t))}drawVirtualRows(e){if(!this.isAlive()||!this.model)return;const t=this.getGui(),i=t.scrollTop,s=i+t.offsetHeight,r=Math.floor(i/this.rowHeight),a=Math.floor(s/this.rowHeight);this.pageSize=Math.floor((s-i)/this.rowHeight),this.ensureRowsRendered(r,a,e)}ensureRowsRendered(e,t,i){this.renderedRows.forEach((s,r)=>{(r<e||r>t)&&r!==this.lastFocusedRowIndex&&this.removeRow(r)}),i&&this.refreshRows();for(let s=e;s<=t;s++)this.renderedRows.has(s)||s<this.model.getRowCount()&&this.insertRow(s)}insertRow(e){const t=this.model.getRow(e),i=document.createElement("div");i.classList.add("ag-virtual-list-item",`ag-${this.cssIdentifier}-virtual-list-item`),(0,import_core11._setAriaRole)(i,this.ariaRole==="tree"?"treeitem":"option"),(0,import_core11._setAriaSetSize)(i,this.model.getRowCount()),(0,import_core11._setAriaPosInSet)(i,e+1),i.setAttribute("tabindex","-1"),i.style.height=`${this.rowHeight}px`,i.style.top=`${this.rowHeight*e}px`;const s=this.componentCreator(t,i);s.addGuiEventListener("focusin",()=>this.lastFocusedRowIndex=e),i.appendChild(s.getGui()),this.renderedRows.has(e-1)?this.renderedRows.get(e-1).eDiv.insertAdjacentElement("afterend",i):this.renderedRows.has(e+1)?this.renderedRows.get(e+1).eDiv.insertAdjacentElement("beforebegin",i):this.eContainer.appendChild(i),this.renderedRows.set(e,{rowComponent:s,eDiv:i,value:t})}removeRow(e){const t=this.renderedRows.get(e);this.eContainer.removeChild(t.eDiv),this.destroyBean(t.rowComponent),this.renderedRows.delete(e)}refreshRows(){const e=this.model.getRowCount();this.renderedRows.forEach((t,i)=>{if(i>=e)this.removeRow(i);else{const s=this.model.getRow(i);this.model.areRowsEqual?.(t.value,s)?this.componentUpdater(s,t.rowComponent):this.removeRow(i)}})}addScrollListener(){this.addGuiEventListener("scroll",()=>this.drawVirtualRows(),{passive:!0})}setModel(e){this.model=e}getAriaElement(){return this.eContainer}destroy(){this.isAlive()&&(this.clearVirtualRows(),this.awaitStableCallbacks.length=0,super.destroy())}},LIST_COMPONENT_NAME="ag-rich-select-list",ROW_COMPONENT_NAME="ag-rich-select-row",AgRichSelectList=class extends VirtualList{constructor(e,t,i){super({cssIdentifier:"rich-select"}),this.params=e,this.richSelectWrapper=t,this.getSearchString=i,this.lastRowHovered=-1,this.selectedItems=new Set,this.params=e,this.setComponentCreator(this.createRowComponent.bind(this)),this.setComponentUpdater(()=>{})}postConstruct(){super.postConstruct(),this.createLoadingElement();const{cellRowHeight:e,pickerAriaLabelKey:t,pickerAriaLabelValue:i}=this.params;e&&this.setRowHeight(e);const s=this.getGui(),r=this.getAriaElement();this.addManagedListeners(s,{mousemove:this.onMouseMove.bind(this),mouseout:this.onMouseOut.bind(this),mousedown:this.onMouseDown.bind(this),click:this.onClick.bind(this)}),s.classList.add(LIST_COMPONENT_NAME);const a=`${LIST_COMPONENT_NAME}-${this.getCompId()}`;r.setAttribute("id",a);const n=this.localeService.getLocaleTextFunc()(t,i);(0,import_core12._setAriaLabel)(r,n),(0,import_core12._setAriaControls)(this.richSelectWrapper,r)}navigateToPage(e){const t=super.navigateToPage(e,this.lastRowHovered);return t!=null&&this.animationFrameService.requestAnimationFrame(()=>{if(!this.isAlive())return null;this.highlightIndex(t)}),t}drawVirtualRows(e){super.drawVirtualRows(e),this.refreshSelectedItems()}highlightFilterMatch(e){this.forEachRenderedRow(t=>{t.highlightString(e)})}onNavigationKeyDown(e,t){this.animationFrameService.requestAnimationFrame(()=>{if(!this.currentList||!this.isAlive())return;const i=this.currentList.length,s=this.lastRowHovered,r=e===import_core12.KeyCode.DOWN?1:-1,a=Math.min(Math.max(s===-1?0:s+r,0),i-1);this.highlightIndex(a),t()})}selectValue(e){if(!this.currentList)return this.eLoading&&this.appendChild(this.eLoading),!1;if(this.eLoading?.offsetParent&&this.eLoading.parentElement?.removeChild(this.eLoading),e==null)return!1;const t=this.getIndicesForValues(e),i=t.length>0;return i&&(this.refresh(),this.ensureIndexVisible(t[0]),this.refresh(!0)),this.selectListItems(Array.isArray(e)?e:[e]),i}selectListItems(e,t=!1){t||this.selectedItems.clear();for(let i=0;i<e.length;i++){const s=e[i];this.selectedItems.has(s)||this.selectedItems.add(s)}this.refreshSelectedItems()}getCurrentList(){return this.currentList}setCurrentList(e){this.currentList=e,this.setModel({getRowCount:()=>e.length,getRow:t=>e[t],areRowsEqual:(t,i)=>t===i})}getSelectedItems(){return this.selectedItems}getLastItemHovered(){return this.currentList[this.lastRowHovered]}highlightIndex(e,t){this.currentList&&(e<0||e>=this.currentList.length?this.lastRowHovered=-1:(this.lastRowHovered=e,this.ensureIndexVisible(e,!t)&&!t&&this.refresh(!0)),this.forEachRenderedRow((i,s)=>{const r=e===s;if(i.toggleHighlighted(r),r){const a=`${ROW_COMPONENT_NAME}-${i.getCompId()}`;(0,import_core12._setAriaActiveDescendant)(this.richSelectWrapper,a),this.richSelectWrapper.setAttribute("data-active-option",a)}}))}getIndicesForValues(e){const{currentList:t}=this;if(!t||t.length===0||e==null)return[];if(Array.isArray(e)||(e=[e]),e.length===0)return[];const i=[];for(let s=0;s<e.length;s++){const r=t.indexOf(e[s]);r>=0&&i.push(r)}return i}toggleListItemSelection(e){this.selectedItems.has(e)?this.selectedItems.delete(e):this.selectedItems.add(e),this.refreshSelectedItems(),this.dispatchValueSelected()}refreshSelectedItems(){this.forEachRenderedRow(e=>{const t=this.selectedItems.has(e.getValue());e.updateSelected(t)})}createLoadingElement(){const e=(0,import_core12._getDocument)(this.gos),t=this.localeService.getLocaleTextFunc(),i=e.createElement("div");i.classList.add("ag-loading-text"),i.innerText=t("loadingOoo","Loading..."),this.eLoading=i}createRowComponent(e,t){const i=new RichSelectRow(this.params);t.setAttribute("id",`${ROW_COMPONENT_NAME}-${i.getCompId()}`),i.setParentComponent(this),this.createBean(i),i.setState(e);const{highlightMatch:s,searchType:r="fuzzy"}=this.params;return s&&r!=="fuzzy"&&i.highlightString(this.getSearchString()),i}getRowForMouseEvent(e){const i=this.getGui().getBoundingClientRect(),s=this.getScrollTop(),r=e.clientY-i.top+s;return Math.floor(r/this.getRowHeight())}onMouseMove(e){const t=this.getRowForMouseEvent(e);t!==-1&&t!=this.lastRowHovered&&(this.lastRowHovered=t,this.highlightIndex(t,!0))}onMouseDown(e){e.preventDefault()}onMouseOut(e){this.getGui().contains(e.relatedTarget)||this.highlightIndex(-1)}onClick(e){const{multiSelect:t}=this.params;if(!this.currentList)return;const i=this.getRowForMouseEvent(e),s=this.currentList[i];t?this.toggleListItemSelection(s):(this.selectListItems([s]),this.dispatchValueSelected())}dispatchValueSelected(){this.dispatchLocalEvent({type:"richSelectListRowSelected",fromEnterKey:!1,value:this.selectedItems})}destroy(){super.destroy(),this.eLoading=void 0}},AgRichSelect=class extends import_core13.AgPickerField{constructor(e){super({pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"ag-list",className:"ag-rich-select",pickerIcon:"smallDown",ariaRole:"combobox",template:e?.template??`
<div class="ag-picker-field" role="presentation">
<div data-ref="eLabel"></div>
<div data-ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-rich-select-value ag-picker-collapsed">
<span data-ref="eDisplayField" class="ag-picker-field-display"></span>
<ag-input-text-field data-ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>
<span data-ref="eDeselect" class="ag-rich-select-deselect-button ag-picker-field-icon" role="presentation"></span>
<span data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></span>
</div>
</div>`,agComponents:[import_core13.AgInputTextFieldSelector],modalPicker:!1,...e,maxPickerHeight:e?.maxPickerHeight??"calc(var(--ag-row-height) * 6.5)"}),this.searchString="",this.searchStringCreator=null,this.eInput=import_core13.RefPlaceholder,this.eDeselect=import_core13.RefPlaceholder,this.skipWrapperAnnouncement=!1;const{value:t,valueList:i,searchStringCreator:s}=e||{};t!==void 0&&(this.value=t),i!=null&&(this.values=i),s&&(this.searchStringCreator=s)}wireBeans(e){super.wireBeans(e),this.userComponentFactory=e.userComponentFactory,this.ariaAnnouncementService=e.ariaAnnouncementService}postConstruct(){super.postConstruct(),this.createListComponent(),this.eDeselect.appendChild((0,import_core13._createIconNoSpan)("cancel",this.gos));const{allowTyping:e,placeholder:t,suppressDeselectAll:i}=this.config;this.eDeselect.classList.add("ag-hidden"),e?(this.eInput.setAutoComplete(!1).setInputPlaceholder(t),this.eDisplayField.classList.add("ag-hidden")):this.eInput.setDisplayed(!1),this.setupAriaProperties();const{searchDebounceDelay:s=300}=this.config;this.clearSearchString=(0,import_core13._debounce)(this.clearSearchString,s),this.renderSelectedValue(),e&&this.eInput.onValueChange(r=>this.searchTextFromString(r)),this.addManagedElementListeners(this.eWrapper,{focus:this.onWrapperFocus.bind(this)}),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)}),i||this.addManagedElementListeners(this.eDeselect,{mousedown:this.onDeselectAllMouseDown.bind(this),click:this.onDeselectAllClick.bind(this)})}setupAriaProperties(){const{eWrapper:e,gos:t,localeService:i}=this;e.tabIndex=t.get("tabIndex");const s=i.getLocaleTextFunc();this.ariaDeleteSelection=s("ariaLabelRichSelectDeleteSelection","Press DELETE to deselect item"),this.ariaDeselectAllItems=s("ariaLabelRichSelectDeselectAllItems","Press DELETE to deselect all items"),this.ariaToggleSelection=s("ariaLabelRichSelectToggleSelection","Press SPACE to toggle selection")}createListComponent(){this.listComponent=this.createBean(new AgRichSelectList(this.config,this.eWrapper,()=>this.searchString)),this.listComponent.setParentComponent(this),this.addManagedListeners(this.listComponent,{richSelectListRowSelected:e=>{this.onListValueSelected(e.value,e.fromEnterKey)}})}renderSelectedValue(){const{value:e,eDisplayField:t,config:i}=this,{allowTyping:s,cellRenderer:r,initialInputValue:a,multiSelect:o,suppressDeselectAll:n,suppressMultiSelectPillRenderer:l}=i,c=this.config.valueFormatter?this.config.valueFormatter(e):e;if(s){this.eInput.setValue(a??c);return}if(o&&!n){const u=e==null||Array.isArray(e)&&e.length===0;this.eDeselect.classList.toggle("ag-hidden",u)}let d;if(o&&!l){this.createOrUpdatePillContainer(t);return}r&&(d=this.userComponentFactory.getEditorRendererDetails(i,{value:e,valueFormatted:c,getValue:()=>this.getValue(),setValue:u=>{this.setValue(u,!0)},setTooltip:(u,g)=>{this.setTooltip({newTooltipText:u,shouldDisplayTooltip:g})}}));let h;if(d&&(h=d.newAgStackInstance()),h)(0,import_core13._clearElement)(t),(0,import_core13._bindCellRendererToHtmlElement)(h,t),h.then(u=>{this.addDestroyFunc(()=>this.destroyBean(u))});else{if((0,import_core13._exists)(this.value))t.innerText=c,t.classList.remove("ag-display-as-placeholder");else{const{placeholder:u}=i;(0,import_core13._exists)(u)?(t.innerHTML=`${(0,import_core13._escapeString)(u)}`,t.classList.add("ag-display-as-placeholder")):(0,import_core13._clearElement)(t)}this.setTooltip({newTooltipText:c??null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth})}}createPickerComponent(){const{values:e}=this;return e&&this.setValueList({valueList:e}),this.listComponent}setSearchStringCreator(e){this.searchStringCreator=e}setValueList(e){const{valueList:t,refresh:i}=e;!this.listComponent||this.listComponent.getCurrentList()===t||(this.listComponent.setCurrentList(t),i&&(this.values?this.listComponent.refresh(!0):(this.values=t,this.isPickerDisplayed&&(this.listComponent.selectValue(this.value)||this.listComponent.refresh())),this.alignPickerToComponent()))}showPicker(){super.showPicker();const{listComponent:e,value:t}=this;if(!e)return;let i=null;this.value!=null&&(e.selectValue(this.value),i=e.getIndicesForValues(Array.isArray(t)?t:[t])[0]),i!=null?e.highlightIndex(i):e.refresh(),this.displayOrHidePicker()}beforeHidePicker(){super.beforeHidePicker()}createOrUpdatePillContainer(e){if(!this.pillContainer){const t=this.pillContainer=this.createBean(new AgPillContainer);this.addDestroyFunc(()=>{this.destroyBean(this.pillContainer),this.pillContainer=null}),(0,import_core13._clearElement)(e),e.appendChild(t.getGui()),t.init({eWrapper:this.eWrapper,onPillMouseDown:i=>{i.stopImmediatePropagation()},announceItemFocus:()=>{this.announceAriaValue(this.ariaDeleteSelection)},getValue:(