@arbocollab/arbo-plugin-item-table 0.1.240 → 0.1.241

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.
@@ -190,7 +190,7 @@ ${u}`:l)}else throw i},onCacheKey:i=>$ie(t,n,i)}}function Sle(e){if(Ct(e))return
190
190
  * vue-i18n v9.14.5
191
191
  * (c) 2025 kazuya kawaguchi
192
192
  * Released under the MIT License.
193
- */const kle="9.14.5";function Fle(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Ra().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Ra().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Ra().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Ra().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Ra().__INTLIFY_PROD_DEVTOOLS__=!1)}const AV=ms.__EXTEND_POINT__,Da=Ry(AV),jn={FALLBACK_TO_ROOT:AV,NOT_SUPPORTED_PRESERVE:Da(),NOT_SUPPORTED_FORMATTER:Da(),NOT_SUPPORTED_PRESERVE_DIRECTIVE:Da(),NOT_SUPPORTED_GET_CHOICE_INDEX:Da(),COMPONENT_NAME_LEGACY_COMPATIBLE:Da(),NOT_FOUND_PARENT_SCOPE:Da(),IGNORE_OBJ_FLATTEN:Da(),NOTICE_DROP_ALLOW_COMPOSITION:Da(),NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG:Da()},Ole={[jn.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[jn.NOT_SUPPORTED_PRESERVE]:"Not supported 'preserve'.",[jn.NOT_SUPPORTED_FORMATTER]:"Not supported 'formatter'.",[jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE]:"Not supported 'preserveDirectiveContent'.",[jn.NOT_SUPPORTED_GET_CHOICE_INDEX]:"Not supported 'getChoiceIndex'.",[jn.COMPONENT_NAME_LEGACY_COMPATIBLE]:"Component name legacy compatible: '{name}' -> 'i18n'",[jn.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[jn.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[jn.NOTICE_DROP_ALLOW_COMPOSITION]:"'allowComposition' option will be dropped in the next major version. For more information, please see šŸ‘‰ https://tinyurl.com/2p97mcze",[jn.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG]:"'translateExistCompatible' option will be dropped in the next major version."};function Is(e,...t){return P0(Ole[e],...t)}const PV=Bo.__EXTEND_POINT__,xs=Ry(PV),fn={UNEXPECTED_RETURN_TYPE:PV,INVALID_ARGUMENT:xs(),MUST_BE_CALL_SETUP_TOP:xs(),NOT_INSTALLED:xs(),NOT_AVAILABLE_IN_LEGACY_MODE:xs(),REQUIRED_VALUE:xs(),INVALID_VALUE:xs(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:xs(),NOT_INSTALLED_WITH_PROVIDE:xs(),UNEXPECTED_ERROR:xs(),NOT_COMPATIBLE_LEGACY_VUE_I18N:xs(),BRIDGE_SUPPORT_VUE_2_ONLY:xs(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:xs(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:xs(),__EXTEND_POINT__:xs()};function ko(e,...t){return Pd(e,null,ee.env.NODE_ENV!=="production"?{messages:Mle,args:t}:void 0)}const Mle={[fn.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[fn.INVALID_ARGUMENT]:"Invalid argument",[fn.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[fn.NOT_INSTALLED]:"Need to install with `app.use` function",[fn.UNEXPECTED_ERROR]:"Unexpected error",[fn.NOT_AVAILABLE_IN_LEGACY_MODE]:"Not available in legacy mode",[fn.REQUIRED_VALUE]:"Required in value: {0}",[fn.INVALID_VALUE]:"Invalid value",[fn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[fn.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[fn.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[fn.BRIDGE_SUPPORT_VUE_2_ONLY]:"vue-i18n-bridge support Vue 2.x only",[fn.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]:"Must define ā€˜i18n’ option or custom block in Composition API with using local scope in Legacy API mode",[fn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},z0=Ii("__translateVNode"),j0=Ii("__datetimeParts"),K0=Ii("__numberParts"),Uu=Ii("__enableEmitter"),bp=Ii("__disableEmitter"),kV=Ii("__setPluralRules"),FV=Ii("__injectWithOption"),q0=Ii("__dispose");function Sp(e){if(!dn(e)||Tr(e))return e;for(const t in e)if(Zr(e,t))if(!t.includes("."))dn(e[t])&&Sp(e[t]);else{const n=t.split("."),o=n.length-1;let s=e,r=!1;for(let i=0;i<o;i++){if(n[i]==="__proto__")throw new Error(`unsafe key: ${n[i]}`);if(n[i]in s||(s[n[i]]=An()),!dn(s[n[i]])){ee.env.NODE_ENV!=="production"&&Co(Is(jn.IGNORE_OBJ_FLATTEN,{key:n[i]})),r=!0;break}s=s[n[i]]}if(r||(Tr(s)?KL.includes(n[o])||delete e[t]:(s[n[o]]=e[t],delete e[t])),!Tr(s)){const i=s[n[o]];dn(i)&&Sp(i)}}return e}function Oy(e,t){const{messages:n,__i18n:o,messageResolver:s,flatJson:r}=t,i=zt(n)?n:Mn(o)?An():{[e]:An()};if(Mn(o)&&o.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:l,resource:u}=a;l?(i[l]=i[l]||An(),Dy(u,i[l])):Dy(u,i)}else Ct(a)&&Dy(JSON.parse(a),i)}),s==null&&r)for(const a in i)Zr(i,a)&&Sp(i[a]);return i}function OV(e){return e.type}function MV(e,t,n){let o=dn(t.messages)?t.messages:An();"__i18nGlobal"in n&&(o=Oy(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const s=Object.keys(o);s.length&&s.forEach(r=>{e.mergeLocaleMessage(r,o[r])});{if(dn(t.datetimeFormats)){const r=Object.keys(t.datetimeFormats);r.length&&r.forEach(i=>{e.mergeDateTimeFormat(i,t.datetimeFormats[i])})}if(dn(t.numberFormats)){const r=Object.keys(t.numberFormats);r.length&&r.forEach(i=>{e.mergeNumberFormat(i,t.numberFormats[i])})}}}function NV(e){return ye(Ka,null,e,0)}const LV="__INTLIFY_META__",VV=()=>[],Nle=()=>!1;let BV=0;function $V(e){return(t,n,o,s)=>e(n,o,oo()||void 0,s)}const Lle=()=>{const e=oo();let t=null;return e&&(t=OV(e)[LV])?{[LV]:t}:null};function Y0(e={},t){const{__root:n,__injectWithOption:o}=e,s=n===void 0,r=e.flatJson,i=Xr?$:xh,a=!!e.translateExistCompatible;ee.env.NODE_ENV!=="production"&&a&&RL(Is(jn.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG));let l=on(e.inheritLocale)?e.inheritLocale:!0;const u=i(n&&l?n.locale.value:Ct(e.locale)?e.locale:Od),c=i(n&&l?n.fallbackLocale.value:Ct(e.fallbackLocale)||Mn(e.fallbackLocale)||zt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:u.value),d=i(Oy(u.value,e)),h=i(zt(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),f=i(zt(e.numberFormats)?e.numberFormats:{[u.value]:{}});let p=n?n.missingWarn:on(e.missingWarn)||El(e.missingWarn)?e.missingWarn:!0,g=n?n.fallbackWarn:on(e.fallbackWarn)||El(e.fallbackWarn)?e.fallbackWarn:!0,v=n?n.fallbackRoot:on(e.fallbackRoot)?e.fallbackRoot:!0,w=!!e.fallbackFormat,S=Pn(e.missing)?e.missing:null,b=Pn(e.missing)?$V(e.missing):null,y=Pn(e.postTranslation)?e.postTranslation:null,E=n?n.warnHtmlMessage:on(e.warnHtmlMessage)?e.warnHtmlMessage:!0,_=!!e.escapeParameter;const I=n?n.modifiers:zt(e.modifiers)?e.modifiers:{};let T=e.pluralRules||n&&n.pluralRules,F;F=(()=>{s&&lV(null);const ve={version:kle,locale:u.value,fallbackLocale:c.value,messages:d.value,modifiers:I,pluralRules:T,missing:b===null?void 0:b,missingWarn:p,fallbackWarn:g,fallbackFormat:w,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:E,escapeParameter:_,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};ve.datetimeFormats=h.value,ve.numberFormats=f.value,ve.__datetimeFormatters=zt(F)?F.__datetimeFormatters:void 0,ve.__numberFormatters=zt(F)?F.__numberFormatters:void 0,ee.env.NODE_ENV!=="production"&&(ve.__v_emitter=zt(F)?F.__v_emitter:void 0);const Be=fle(ve);return s&&lV(Be),Be})(),Cp(F,u.value,c.value);function x(){return[u.value,c.value,d.value,h.value,f.value]}const P=X({get:()=>u.value,set:ve=>{u.value=ve,F.locale=u.value}}),k=X({get:()=>c.value,set:ve=>{c.value=ve,F.fallbackLocale=c.value,Cp(F,u.value,ve)}}),M=X(()=>d.value),N=X(()=>h.value),B=X(()=>f.value);function z(){return Pn(y)?y:null}function oe(ve){y=ve,F.postTranslation=ve}function ie(){return S}function te(ve){ve!==null&&(b=$V(ve)),S=ve,F.missing=b}function se(ve,Be){return ve!=="translate"||!Be.resolvedMessage}const Z=(ve,Be,wt,Dt,tn,en)=>{x();let bn;try{ee.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,s||(F.fallbackContext=n?hle():void 0),bn=ve(F)}finally{ee.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,s||(F.fallbackContext=void 0)}if(wt!=="translate exists"&&ro(bn)&&bn===Py||wt==="translate exists"&&!bn){const[Le,Ge]=Be();if(ee.env.NODE_ENV!=="production"&&n&&Ct(Le)&&se(wt,Ge)&&(v&&(Fy(g,Le)||cV(p,Le))&&Co(Is(jn.FALLBACK_TO_ROOT,{key:Le,type:wt})),ee.env.NODE_ENV!=="production")){const{__v_emitter:Rt}=F;Rt&&v&&Rt.emit("fallback",{type:wt,key:Le,to:"global",groupId:`${wt}:${Le}`})}return n&&v?Dt(n):tn(Le)}else{if(en(bn))return bn;throw ko(fn.UNEXPECTED_RETURN_TYPE)}};function A(...ve){return Z(Be=>Reflect.apply(yV,null,[Be,...ve]),()=>H0(...ve),"translate",Be=>Reflect.apply(Be.t,Be,[...ve]),Be=>Be,Be=>Ct(Be))}function j(...ve){const[Be,wt,Dt]=ve;if(Dt&&!dn(Dt))throw ko(fn.INVALID_ARGUMENT);return A(Be,wt,Ko({resolvedMessage:!0},Dt||{}))}function ne(...ve){return Z(Be=>Reflect.apply(EV,null,[Be,...ve]),()=>G0(...ve),"datetime format",Be=>Reflect.apply(Be.d,Be,[...ve]),()=>ky,Be=>Ct(Be))}function ge(...ve){return Z(Be=>Reflect.apply(TV,null,[Be,...ve]),()=>U0(...ve),"number format",Be=>Reflect.apply(Be.n,Be,[...ve]),()=>ky,Be=>Ct(Be))}function xe(ve){return ve.map(Be=>Ct(Be)||ro(Be)||on(Be)?NV(String(Be)):Be)}const K={normalize:xe,interpolate:ve=>ve,type:"vnode"};function Y(...ve){return Z(Be=>{let wt;const Dt=Be;try{Dt.processor=K,wt=Reflect.apply(yV,null,[Dt,...ve])}finally{Dt.processor=null}return wt},()=>H0(...ve),"translate",Be=>Be[z0](...ve),Be=>[NV(Be)],Be=>Mn(Be))}function re(...ve){return Z(Be=>Reflect.apply(TV,null,[Be,...ve]),()=>U0(...ve),"number format",Be=>Be[K0](...ve),VV,Be=>Ct(Be)||Mn(Be))}function R(...ve){return Z(Be=>Reflect.apply(EV,null,[Be,...ve]),()=>G0(...ve),"datetime format",Be=>Be[j0](...ve),VV,Be=>Ct(Be)||Mn(Be))}function G(ve){T=ve,F.pluralRules=T}function J(ve,Be){return Z(()=>{if(!ve)return!1;const wt=Ct(Be)?Be:u.value,Dt=Ce(wt),tn=F.messageResolver(Dt,ve);return a?tn!=null:Tr(tn)||Dr(tn)||Ct(tn)},()=>[ve],"translate exists",wt=>Reflect.apply(wt.te,wt,[ve,Be]),Nle,wt=>on(wt))}function ce(ve){let Be=null;const wt=QL(F,c.value,u.value);for(let Dt=0;Dt<wt.length;Dt++){const tn=d.value[wt[Dt]]||{},en=F.messageResolver(tn,ve);if(en!=null){Be=en;break}}return Be}function Ee(ve){const Be=ce(ve);return Be??(n?n.tm(ve)||{}:{})}function Ce(ve){return d.value[ve]||{}}function Ne(ve,Be){if(r){const wt={[ve]:Be};for(const Dt in wt)Zr(wt,Dt)&&Sp(wt[Dt]);Be=wt[ve]}d.value[ve]=Be,F.messages=d.value}function pe(ve,Be){d.value[ve]=d.value[ve]||{};const wt={[ve]:Be};if(r)for(const Dt in wt)Zr(wt,Dt)&&Sp(wt[Dt]);Be=wt[ve],Dy(Be,d.value[ve]),F.messages=d.value}function H(ve){return h.value[ve]||{}}function W(ve,Be){h.value[ve]=Be,F.datetimeFormats=h.value,RV(F,ve,Be)}function be(ve,Be){h.value[ve]=Ko(h.value[ve]||{},Be),F.datetimeFormats=h.value,RV(F,ve,Be)}function Ae(ve){return f.value[ve]||{}}function He(ve,Be){f.value[ve]=Be,F.numberFormats=f.value,IV(F,ve,Be)}function Te(ve,Be){f.value[ve]=Ko(f.value[ve]||{},Be),F.numberFormats=f.value,IV(F,ve,Be)}BV++,n&&Xr&&(Qe(n.locale,ve=>{l&&(u.value=ve,F.locale=ve,Cp(F,u.value,c.value))}),Qe(n.fallbackLocale,ve=>{l&&(c.value=ve,F.fallbackLocale=ve,Cp(F,u.value,c.value))}));const Xe={id:BV,locale:P,fallbackLocale:k,get inheritLocale(){return l},set inheritLocale(ve){l=ve,ve&&n&&(u.value=n.locale.value,c.value=n.fallbackLocale.value,Cp(F,u.value,c.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:M,get modifiers(){return I},get pluralRules(){return T||{}},get isGlobal(){return s},get missingWarn(){return p},set missingWarn(ve){p=ve,F.missingWarn=p},get fallbackWarn(){return g},set fallbackWarn(ve){g=ve,F.fallbackWarn=g},get fallbackRoot(){return v},set fallbackRoot(ve){v=ve},get fallbackFormat(){return w},set fallbackFormat(ve){w=ve,F.fallbackFormat=w},get warnHtmlMessage(){return E},set warnHtmlMessage(ve){E=ve,F.warnHtmlMessage=ve},get escapeParameter(){return _},set escapeParameter(ve){_=ve,F.escapeParameter=ve},t:A,getLocaleMessage:Ce,setLocaleMessage:Ne,mergeLocaleMessage:pe,getPostTranslationHandler:z,setPostTranslationHandler:oe,getMissingHandler:ie,setMissingHandler:te,[kV]:G};return Xe.datetimeFormats=N,Xe.numberFormats=B,Xe.rt=j,Xe.te=J,Xe.tm=Ee,Xe.d=ne,Xe.n=ge,Xe.getDateTimeFormat=H,Xe.setDateTimeFormat=W,Xe.mergeDateTimeFormat=be,Xe.getNumberFormat=Ae,Xe.setNumberFormat=He,Xe.mergeNumberFormat=Te,Xe[FV]=o,Xe[z0]=Y,Xe[j0]=R,Xe[K0]=re,ee.env.NODE_ENV!=="production"&&(Xe[Uu]=ve=>{F.__v_emitter=ve},Xe[bp]=()=>{F.__v_emitter=void 0}),Xe}function Vle(e){const t=Ct(e.locale)?e.locale:Od,n=Ct(e.fallbackLocale)||Mn(e.fallbackLocale)||zt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=Pn(e.missing)?e.missing:void 0,s=on(e.silentTranslationWarn)||El(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,r=on(e.silentFallbackWarn)||El(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,i=on(e.fallbackRoot)?e.fallbackRoot:!0,a=!!e.formatFallbackMessages,l=zt(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=Pn(e.postTranslation)?e.postTranslation:void 0,d=Ct(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,h=!!e.escapeParameterHtml,f=on(e.sync)?e.sync:!0;ee.env.NODE_ENV!=="production"&&e.formatter&&Co(Is(jn.NOT_SUPPORTED_FORMATTER)),ee.env.NODE_ENV!=="production"&&e.preserveDirectiveContent&&Co(Is(jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE));let p=e.messages;if(zt(e.sharedMessages)){const _=e.sharedMessages;p=Object.keys(_).reduce((T,F)=>{const L=T[F]||(T[F]={});return Ko(L,_[F]),T},p||{})}const{__i18n:g,__root:v,__injectWithOption:w}=e,S=e.datetimeFormats,b=e.numberFormats,y=e.flatJson,E=e.translateExistCompatible;return{locale:t,fallbackLocale:n,messages:p,flatJson:y,datetimeFormats:S,numberFormats:b,missing:o,missingWarn:s,fallbackWarn:r,fallbackRoot:i,fallbackFormat:a,modifiers:l,pluralRules:u,postTranslation:c,warnHtmlMessage:d,escapeParameter:h,messageResolver:e.messageResolver,inheritLocale:f,translateExistCompatible:E,__i18n:g,__root:v,__injectWithOption:w}}function X0(e={},t){{const n=Y0(Vle(e)),{__extender:o}=e,s={id:n.id,get locale(){return n.locale.value},set locale(r){n.locale.value=r},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(r){n.fallbackLocale.value=r},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_FORMATTER)),{interpolate(){return[]}}},set formatter(r){ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_FORMATTER))},get missing(){return n.getMissingHandler()},set missing(r){n.setMissingHandler(r)},get silentTranslationWarn(){return on(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(r){n.missingWarn=on(r)?!r:r},get silentFallbackWarn(){return on(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(r){n.fallbackWarn=on(r)?!r:r},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(r){n.fallbackFormat=r},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(r){n.setPostTranslationHandler(r)},get sync(){return n.inheritLocale},set sync(r){n.inheritLocale=r},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(r){n.warnHtmlMessage=r!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(r){n.escapeParameter=r},get preserveDirectiveContent(){return ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE)),!0},set preserveDirectiveContent(r){ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE))},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...r){const[i,a,l]=r,u={};let c=null,d=null;if(!Ct(i))throw ko(fn.INVALID_ARGUMENT);const h=i;return Ct(a)?u.locale=a:Mn(a)?c=a:zt(a)&&(d=a),Mn(l)?c=l:zt(l)&&(d=l),Reflect.apply(n.t,n,[h,c||d||{},u])},rt(...r){return Reflect.apply(n.rt,n,[...r])},tc(...r){const[i,a,l]=r,u={plural:1};let c=null,d=null;if(!Ct(i))throw ko(fn.INVALID_ARGUMENT);const h=i;return Ct(a)?u.locale=a:ro(a)?u.plural=a:Mn(a)?c=a:zt(a)&&(d=a),Ct(l)?u.locale=l:Mn(l)?c=l:zt(l)&&(d=l),Reflect.apply(n.t,n,[h,c||d||{},u])},te(r,i){return n.te(r,i)},tm(r){return n.tm(r)},getLocaleMessage(r){return n.getLocaleMessage(r)},setLocaleMessage(r,i){n.setLocaleMessage(r,i)},mergeLocaleMessage(r,i){n.mergeLocaleMessage(r,i)},d(...r){return Reflect.apply(n.d,n,[...r])},getDateTimeFormat(r){return n.getDateTimeFormat(r)},setDateTimeFormat(r,i){n.setDateTimeFormat(r,i)},mergeDateTimeFormat(r,i){n.mergeDateTimeFormat(r,i)},n(...r){return Reflect.apply(n.n,n,[...r])},getNumberFormat(r){return n.getNumberFormat(r)},setNumberFormat(r,i){n.setNumberFormat(r,i)},mergeNumberFormat(r,i){n.mergeNumberFormat(r,i)},getChoiceIndex(r,i){return ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_GET_CHOICE_INDEX)),-1}};return s.__extender=o,ee.env.NODE_ENV!=="production"&&(s.__enableEmitter=r=>{const i=n;i[Uu]&&i[Uu](r)},s.__disableEmitter=()=>{const r=n;r[bp]&&r[bp]()}),s}}const Z0={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function Ble({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,s)=>[...o,...s.type===Pt?s.children:[s]],[]):t.reduce((n,o)=>{const s=e[o];return s&&(n[o]=s()),n},An())}function HV(e){return Pt}const J0=ot({name:"i18n-t",props:Ko({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>ro(e)||!isNaN(e)}},Z0),setup(e,t){const{slots:n,attrs:o}=t,s=e.i18n||n_({useScope:e.scope,__useComponent:!0});return()=>{const r=Object.keys(n).filter(d=>d!=="_"),i=An();e.locale&&(i.locale=e.locale),e.plural!==void 0&&(i.plural=Ct(e.plural)?+e.plural:e.plural);const a=Ble(t,r),l=s[z0](e.keypath,a,i),u=Ko(An(),o),c=Ct(e.tag)||dn(e.tag)?e.tag:HV();return Tc(c,u,l)}}});function $le(e){return Mn(e)&&!Ct(e[0])}function GV(e,t,n,o){const{slots:s,attrs:r}=t;return()=>{const i={part:!0};let a=An();e.locale&&(i.locale=e.locale),Ct(e.format)?i.key=e.format:dn(e.format)&&(Ct(e.format.key)&&(i.key=e.format.key),a=Object.keys(e.format).reduce((h,f)=>n.includes(f)?Ko(An(),h,{[f]:e.format[f]}):h,An()));const l=o(e.value,i,a);let u=[i.key];Mn(l)?u=l.map((h,f)=>{const p=s[h.type],g=p?p({[h.type]:h.value,index:f,parts:l}):[h.value];return $le(g)&&(g[0].key=`${h.type}-${f}`),g}):Ct(l)&&(u=[l]);const c=Ko(An(),r),d=Ct(e.tag)||dn(e.tag)?e.tag:HV();return Tc(d,c,u)}}const UV=ot({name:"i18n-n",props:Ko({value:{type:Number,required:!0},format:{type:[String,Object]}},Z0),setup(e,t){const n=e.i18n||n_({useScope:e.scope,__useComponent:!0});return GV(e,t,DV,(...o)=>n[K0](...o))}}),WV=ot({name:"i18n-d",props:Ko({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Z0),setup(e,t){const n=e.i18n||n_({useScope:e.scope,__useComponent:!0});return GV(e,t,_V,(...o)=>n[j0](...o))}});function Hle(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function Gle(e){const t=i=>{const{instance:a,modifiers:l,value:u}=i;if(!a||!a.$)throw ko(fn.UNEXPECTED_ERROR);const c=Hle(e,a.$);ee.env.NODE_ENV!=="production"&&l.preserve&&Co(Is(jn.NOT_SUPPORTED_PRESERVE));const d=zV(u);return[Reflect.apply(c.t,c,[...jV(d)]),c]};return{created:(i,a)=>{const[l,u]=t(a);Xr&&e.global===u&&(i.__i18nWatcher=Qe(u.locale,()=>{a.instance&&a.instance.$forceUpdate()})),i.__composer=u,i.textContent=l},unmounted:i=>{Xr&&i.__i18nWatcher&&(i.__i18nWatcher(),i.__i18nWatcher=void 0,delete i.__i18nWatcher),i.__composer&&(i.__composer=void 0,delete i.__composer)},beforeUpdate:(i,{value:a})=>{if(i.__composer){const l=i.__composer,u=zV(a);i.textContent=Reflect.apply(l.t,l,[...jV(u)])}},getSSRProps:i=>{const[a]=t(i);return{textContent:a}}}}function zV(e){if(Ct(e))return{path:e};if(zt(e)){if(!("path"in e))throw ko(fn.REQUIRED_VALUE,"path");return e}else throw ko(fn.INVALID_VALUE)}function jV(e){const{path:t,locale:n,args:o,choice:s,plural:r}=e,i={},a=o||{};return Ct(n)&&(i.locale=n),ro(s)&&(i.plural=s),ro(r)&&(i.plural=r),[t,a,i]}function Ule(e,t,...n){const o=zt(n[0])?n[0]:{},s=!!o.useI18nComponentName,r=on(o.globalInstall)?o.globalInstall:!0;ee.env.NODE_ENV!=="production"&&r&&s&&Co(Is(jn.COMPONENT_NAME_LEGACY_COMPATIBLE,{name:J0.name})),r&&([s?"i18n":J0.name,"I18nT"].forEach(i=>e.component(i,J0)),[UV.name,"I18nN"].forEach(i=>e.component(i,UV)),[WV.name,"I18nD"].forEach(i=>e.component(i,WV))),e.directive("t",Gle(t))}const Q0={"vue-devtools-plugin-vue-i18n":"Vue I18n devtools","vue-i18n-resource-inspector":"I18n Resources","vue-i18n-timeline":"Vue I18n"},Wle={"vue-i18n-resource-inspector":"Search for scopes ..."},zle={"vue-i18n-timeline":16764185},KV="vue-i18n: composer properties";let e_;async function jle(e,t){return new Promise((n,o)=>{try{Ple({id:"vue-devtools-plugin-vue-i18n",label:Q0["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[KV],app:e},s=>{e_=s,s.on.visitComponentTree(({componentInstance:i,treeNode:a})=>{Kle(i,a,t)}),s.on.inspectComponent(({componentInstance:i,instanceData:a})=>{i.vnode.el&&i.vnode.el.__VUE_I18N__&&a&&(t.mode==="legacy"?i.vnode.el.__VUE_I18N__!==t.global.__composer&&YV(a,i.vnode.el.__VUE_I18N__):YV(a,i.vnode.el.__VUE_I18N__))}),s.addInspector({id:"vue-i18n-resource-inspector",label:Q0["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:Wle["vue-i18n-resource-inspector"]}),s.on.getInspectorTree(i=>{i.app===e&&i.inspectorId==="vue-i18n-resource-inspector"&&Jle(i,t)});const r=new Map;s.on.getInspectorState(async i=>{if(i.app===e&&i.inspectorId==="vue-i18n-resource-inspector")if(s.unhighlightElement(),eue(i,t),i.nodeId==="global"){if(!r.has(i.app)){const[a]=await s.getComponentInstances(i.app);r.set(i.app,a)}s.highlightElement(r.get(i.app))}else{const a=Qle(i.nodeId,t);a&&s.highlightElement(a)}}),s.on.editInspectorState(i=>{i.app===e&&i.inspectorId==="vue-i18n-resource-inspector"&&nue(i,t)}),s.addTimelineLayer({id:"vue-i18n-timeline",label:Q0["vue-i18n-timeline"],color:zle["vue-i18n-timeline"]}),n(!0)})}catch(s){console.error(s),o(!1)}})}function qV(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function Kle(e,t,n){const o=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&e.vnode.el.__VUE_I18N__!==o){const s={label:`i18n (${qV(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(s)}}function YV(e,t){const n=KV;e.state.push({type:n,key:"locale",editable:!0,value:t.locale.value}),e.state.push({type:n,key:"availableLocales",editable:!1,value:t.availableLocales}),e.state.push({type:n,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value}),e.state.push({type:n,key:"inheritLocale",editable:!0,value:t.inheritLocale}),e.state.push({type:n,key:"messages",editable:!1,value:t_(t.messages.value)}),e.state.push({type:n,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}),e.state.push({type:n,key:"numberFormats",editable:!1,value:t.numberFormats.value})}function t_(e){const t={};return Object.keys(e).forEach(n=>{const o=e[n];Pn(o)&&"source"in o?t[n]=Zle(o):Tr(o)&&o.loc&&o.loc.source?t[n]=o.loc.source:dn(o)?t[n]=t_(o):t[n]=o}),t}const qle={"<":"&lt;",">":"&gt;",'"':"&quot;","&":"&amp;"};function Yle(e){return e.replace(/[<>"&]/g,Xle)}function Xle(e){return qle[e]||e}function Zle(e){return{_custom:{type:"function",display:`<span>ʒ</span> ${e.source?`("${Yle(e.source)}")`:"(?)"}`}}}function Jle(e,t){e.rootNodes.push({id:"global",label:"Global Scope"});const n=t.mode==="composition"?t.global:t.global.__composer;for(const[o,s]of t.__instances){const r=t.mode==="composition"?s:s.__composer;n!==r&&e.rootNodes.push({id:r.id.toString(),label:`${qV(o)} Scope`})}}function Qle(e,t){let n=null;if(e!=="global"){for(const[o,s]of t.__instances.entries())if(s.id.toString()===e){n=o;break}}return n}function XV(e,t){if(e==="global")return t.mode==="composition"?t.global:t.global.__composer;{const n=Array.from(t.__instances.values()).find(o=>o.id.toString()===e);return n?t.mode==="composition"?n:n.__composer:null}}function eue(e,t){const n=XV(e.nodeId,t);return n&&(e.state=tue(n)),null}function tue(e){const t={},n="Locale related info",o=[{type:n,key:"locale",editable:!0,value:e.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:e.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}];t[n]=o;const s="Locale messages info",r=[{type:s,key:"messages",editable:!1,value:t_(e.messages.value)}];t[s]=r;{const i="Datetime formats info",a=[{type:i,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];t[i]=a;const l="Datetime formats info",u=[{type:l,key:"numberFormats",editable:!1,value:e.numberFormats.value}];t[l]=u}return t}function Ep(e,t){if(e_){let n;t&&"groupId"in t&&(n=t.groupId,delete t.groupId),e_.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:e,groupId:n,time:Date.now(),meta:{},data:t||{},logType:e==="compile-error"?"error":e==="fallback"||e==="missing"?"warning":"default"}})}}function nue(e,t){const n=XV(e.nodeId,t);if(n){const[o]=e.path;o==="locale"&&Ct(e.state.value)?n.locale.value=e.state.value:o==="fallbackLocale"&&(Ct(e.state.value)||Mn(e.state.value)||dn(e.state.value))?n.fallbackLocale.value=e.state.value:o==="inheritLocale"&&on(e.state.value)&&(n.inheritLocale=e.state.value)}}function oue(e,t,n){return{beforeCreate(){const o=oo();if(!o)throw ko(fn.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const r=s.i18n;if(s.__i18n&&(r.__i18n=s.__i18n),r.__root=t,this===this.$root)this.$i18n=ZV(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=X0(r);const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=ZV(e,s);else{this.$i18n=X0({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}else this.$i18n=e;s.__i18nGlobal&&MV(t,s,s),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...r),this.$tc=(...r)=>this.$i18n.tc(...r),this.$te=(r,i)=>this.$i18n.te(r,i),this.$d=(...r)=>this.$i18n.d(...r),this.$n=(...r)=>this.$i18n.n(...r),this.$tm=r=>this.$i18n.tm(r),n.__setInstance(o,this.$i18n)},mounted(){if(ee.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const o=this.$i18n;this.$el.__VUE_I18N__=o.__composer;const s=this.__v_emitter=k0();o.__enableEmitter&&o.__enableEmitter(s),s.on("*",Ep)}},unmounted(){const o=oo();if(!o)throw ko(fn.UNEXPECTED_ERROR);const s=this.$i18n;ee.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Ep),delete this.__v_emitter),this.$i18n&&(s.__disableEmitter&&s.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(o),delete this.$i18n}}}function ZV(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[kV](t.pluralizationRules||e.pluralizationRules);const n=Oy(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o])),t.numberFormats&&Object.keys(t.numberFormats).forEach(o=>e.mergeNumberFormat(o,t.numberFormats[o])),e}const sue=Ii("global-vue-i18n");function rue(e={},t){const n=__VUE_I18N_LEGACY_API__&&on(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,o=on(e.globalInjection)?e.globalInjection:!0,s=__VUE_I18N_LEGACY_API__&&n?!!e.allowComposition:!0,r=new Map,[i,a]=iue(e,n),l=Ii(ee.env.NODE_ENV!=="production"?"vue-i18n":"");ee.env.NODE_ENV!=="production"&&n&&s&&Co(Is(jn.NOTICE_DROP_ALLOW_COMPOSITION));function u(h){return r.get(h)||null}function c(h,f){r.set(h,f)}function d(h){r.delete(h)}{const h={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},get allowComposition(){return s},async install(f,...p){if(ee.env.NODE_ENV!=="production"&&(f.__VUE_I18N__=h),f.__VUE_I18N_SYMBOL__=l,f.provide(f.__VUE_I18N_SYMBOL__,h),zt(p[0])){const w=p[0];h.__composerExtend=w.__composerExtend,h.__vueI18nExtend=w.__vueI18nExtend}let g=null;!n&&o&&(g=gue(f,h.global)),__VUE_I18N_FULL_INSTALL__&&Ule(f,h,...p),__VUE_I18N_LEGACY_API__&&n&&f.mixin(oue(a,a.__composer,h));const v=f.unmount;if(f.unmount=()=>{g&&g(),h.dispose(),v()},ee.env.NODE_ENV!=="production"){if(!await jle(f,h))throw ko(fn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const S=k0();if(n){const b=a;b.__enableEmitter&&b.__enableEmitter(S)}else{const b=a;b[Uu]&&b[Uu](S)}S.on("*",Ep)}},get global(){return a},dispose(){i.stop()},__instances:r,__getInstance:u,__setInstance:c,__deleteInstance:d};return h}}function n_(e={}){const t=oo();if(t==null)throw ko(fn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw ko(fn.NOT_INSTALLED);const n=aue(t),o=uue(n),s=OV(t),r=lue(e,s);if(__VUE_I18N_LEGACY_API__&&n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw ko(fn.NOT_AVAILABLE_IN_LEGACY_MODE);return fue(t,r,o,e)}if(r==="global")return MV(o,e,s),o;if(r==="parent"){let l=cue(n,t,e.__useComponent);return l==null&&(ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_FOUND_PARENT_SCOPE)),l=o),l}const i=n;let a=i.__getInstance(t);if(a==null){const l=Ko({},e);"__i18n"in s&&(l.__i18n=s.__i18n),o&&(l.__root=o),a=Y0(l),i.__composerExtend&&(a[q0]=i.__composerExtend(a)),hue(i,t,a),i.__setInstance(t,a)}return a}function iue(e,t,n){const o=cC();{const s=__VUE_I18N_LEGACY_API__&&t?o.run(()=>X0(e)):o.run(()=>Y0(e));if(s==null)throw ko(fn.UNEXPECTED_ERROR);return[o,s]}}function aue(e){{const t=Dn(e.isCE?sue:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw ko(e.isCE?fn.NOT_INSTALLED_WITH_PROVIDE:fn.UNEXPECTED_ERROR);return t}}function lue(e,t){return _y(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function uue(e){return e.mode==="composition"?e.global:e.global.__composer}function cue(e,t,n=!1){let o=null;const s=t.root;let r=due(t,n);for(;r!=null;){const i=e;if(e.mode==="composition")o=i.__getInstance(r);else if(__VUE_I18N_LEGACY_API__){const a=i.__getInstance(r);a!=null&&(o=a.__composer,n&&o&&!o[FV]&&(o=null))}if(o!=null||s===r)break;r=r.parent}return o}function due(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function hue(e,t,n){let o=null;Xt(()=>{if(ee.env.NODE_ENV!=="production"&&t.vnode.el){t.vnode.el.__VUE_I18N__=n,o=k0();const s=n;s[Uu]&&s[Uu](o),o.on("*",Ep)}},t),nu(()=>{const s=n;ee.env.NODE_ENV!=="production"&&t.vnode.el&&t.vnode.el.__VUE_I18N__&&(o&&o.off("*",Ep),s[bp]&&s[bp](),delete t.vnode.el.__VUE_I18N__),e.__deleteInstance(t);const r=s[q0];r&&(r(),delete s[q0])},t)}function fue(e,t,n,o={}){const s=t==="local",r=xh(null);if(s&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw ko(fn.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const i=on(o.inheritLocale)?o.inheritLocale:!Ct(o.locale),a=$(!s||i?n.locale.value:Ct(o.locale)?o.locale:Od),l=$(!s||i?n.fallbackLocale.value:Ct(o.fallbackLocale)||Mn(o.fallbackLocale)||zt(o.fallbackLocale)||o.fallbackLocale===!1?o.fallbackLocale:a.value),u=$(Oy(a.value,o)),c=$(zt(o.datetimeFormats)?o.datetimeFormats:{[a.value]:{}}),d=$(zt(o.numberFormats)?o.numberFormats:{[a.value]:{}}),h=s?n.missingWarn:on(o.missingWarn)||El(o.missingWarn)?o.missingWarn:!0,f=s?n.fallbackWarn:on(o.fallbackWarn)||El(o.fallbackWarn)?o.fallbackWarn:!0,p=s?n.fallbackRoot:on(o.fallbackRoot)?o.fallbackRoot:!0,g=!!o.fallbackFormat,v=Pn(o.missing)?o.missing:null,w=Pn(o.postTranslation)?o.postTranslation:null,S=s?n.warnHtmlMessage:on(o.warnHtmlMessage)?o.warnHtmlMessage:!0,b=!!o.escapeParameter,y=s?n.modifiers:zt(o.modifiers)?o.modifiers:{},E=o.pluralRules||s&&n.pluralRules;function _(){return[a.value,l.value,u.value,c.value,d.value]}const I=X({get:()=>r.value?r.value.locale.value:a.value,set:J=>{r.value&&(r.value.locale.value=J),a.value=J}}),T=X({get:()=>r.value?r.value.fallbackLocale.value:l.value,set:J=>{r.value&&(r.value.fallbackLocale.value=J),l.value=J}}),F=X(()=>r.value?r.value.messages.value:u.value),L=X(()=>c.value),x=X(()=>d.value);function P(){return r.value?r.value.getPostTranslationHandler():w}function k(J){r.value&&r.value.setPostTranslationHandler(J)}function M(){return r.value?r.value.getMissingHandler():v}function N(J){r.value&&r.value.setMissingHandler(J)}function B(J){return _(),J()}function z(...J){return r.value?B(()=>Reflect.apply(r.value.t,null,[...J])):B(()=>"")}function oe(...J){return r.value?Reflect.apply(r.value.rt,null,[...J]):""}function ie(...J){return r.value?B(()=>Reflect.apply(r.value.d,null,[...J])):B(()=>"")}function te(...J){return r.value?B(()=>Reflect.apply(r.value.n,null,[...J])):B(()=>"")}function se(J){return r.value?r.value.tm(J):{}}function Z(J,ce){return r.value?r.value.te(J,ce):!1}function A(J){return r.value?r.value.getLocaleMessage(J):{}}function j(J,ce){r.value&&(r.value.setLocaleMessage(J,ce),u.value[J]=ce)}function ne(J,ce){r.value&&r.value.mergeLocaleMessage(J,ce)}function ge(J){return r.value?r.value.getDateTimeFormat(J):{}}function xe(J,ce){r.value&&(r.value.setDateTimeFormat(J,ce),c.value[J]=ce)}function ue(J,ce){r.value&&r.value.mergeDateTimeFormat(J,ce)}function K(J){return r.value?r.value.getNumberFormat(J):{}}function Y(J,ce){r.value&&(r.value.setNumberFormat(J,ce),d.value[J]=ce)}function re(J,ce){r.value&&r.value.mergeNumberFormat(J,ce)}const R={get id(){return r.value?r.value.id:-1},locale:I,fallbackLocale:T,messages:F,datetimeFormats:L,numberFormats:x,get inheritLocale(){return r.value?r.value.inheritLocale:i},set inheritLocale(J){r.value&&(r.value.inheritLocale=J)},get availableLocales(){return r.value?r.value.availableLocales:Object.keys(u.value)},get modifiers(){return r.value?r.value.modifiers:y},get pluralRules(){return r.value?r.value.pluralRules:E},get isGlobal(){return r.value?r.value.isGlobal:!1},get missingWarn(){return r.value?r.value.missingWarn:h},set missingWarn(J){r.value&&(r.value.missingWarn=J)},get fallbackWarn(){return r.value?r.value.fallbackWarn:f},set fallbackWarn(J){r.value&&(r.value.missingWarn=J)},get fallbackRoot(){return r.value?r.value.fallbackRoot:p},set fallbackRoot(J){r.value&&(r.value.fallbackRoot=J)},get fallbackFormat(){return r.value?r.value.fallbackFormat:g},set fallbackFormat(J){r.value&&(r.value.fallbackFormat=J)},get warnHtmlMessage(){return r.value?r.value.warnHtmlMessage:S},set warnHtmlMessage(J){r.value&&(r.value.warnHtmlMessage=J)},get escapeParameter(){return r.value?r.value.escapeParameter:b},set escapeParameter(J){r.value&&(r.value.escapeParameter=J)},t:z,getPostTranslationHandler:P,setPostTranslationHandler:k,getMissingHandler:M,setMissingHandler:N,rt:oe,d:ie,n:te,tm:se,te:Z,getLocaleMessage:A,setLocaleMessage:j,mergeLocaleMessage:ne,getDateTimeFormat:ge,setDateTimeFormat:xe,mergeDateTimeFormat:ue,getNumberFormat:K,setNumberFormat:Y,mergeNumberFormat:re};function G(J){J.locale.value=a.value,J.fallbackLocale.value=l.value,Object.keys(u.value).forEach(ce=>{J.mergeLocaleMessage(ce,u.value[ce])}),Object.keys(c.value).forEach(ce=>{J.mergeDateTimeFormat(ce,c.value[ce])}),Object.keys(d.value).forEach(ce=>{J.mergeNumberFormat(ce,d.value[ce])}),J.escapeParameter=b,J.fallbackFormat=g,J.fallbackRoot=p,J.fallbackWarn=f,J.missingWarn=h,J.warnHtmlMessage=S}return Bh(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw ko(fn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const J=r.value=e.proxy.$i18n.__composer;t==="global"?(a.value=J.locale.value,l.value=J.fallbackLocale.value,u.value=J.messages.value,c.value=J.datetimeFormats.value,d.value=J.numberFormats.value):s&&G(J)}),R}const pue=["locale","fallbackLocale","availableLocales"],JV=["t","rt","d","n","tm","te"];function gue(e,t){const n=Object.create(null);return pue.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r)throw ko(fn.UNEXPECTED_ERROR);const i=mn(r.value)?{get(){return r.value.value},set(a){r.value.value=a}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,s,i)}),e.config.globalProperties.$i18n=n,JV.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r||!r.value)throw ko(fn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,r)}),()=>{delete e.config.globalProperties.$i18n,JV.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}if(Fle(),__INTLIFY_JIT_COMPILATION__?oV(yle):oV(vle),lle(Gae),ule(QL),ee.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=Ra();e.__INTLIFY__=!0,Zae(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}ee.env.NODE_ENV;const QV={en:{}};function mue(e){const t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):null}async function vue(e,t=10,n=300){for(let o=0;o<t;o++){const s=mue(e);if(s)return s;await new Promise(r=>setTimeout(r,n))}return null}async function yue(){const e=await vue("account.tessr_i18n_file_version_url");if(!e)return{};const t=await fetch(e);if(!t.ok)throw new Error("Failed to load en-error.json");return await t.json()}async function wue(){const e=await yue();return{...QV,en:{...QV.en,errorMessages:e}}}async function Cue(){return rue({legacy:!1,locale:"en",fallbackLocale:"en",messages:await wue(),formatFallbackMessages:!0})}const bue=async()=>{const e=await Cue();return oQ(e.global),e},eB=32,Sue=Math.round(eB*16/9),Eue="arbo-thumbnails",_p="thumbnails";let Rp=null;const o_=new Map,s_=new Map;function tB(){return Rp||(Rp=new Promise((e,t)=>{const n=indexedDB.open(Eue,1);n.onupgradeneeded=()=>n.result.createObjectStore(_p),n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)}),Rp.catch(()=>Rp=null)),Rp}async function _ue(e,t){try{const n=await tB();return await new Promise((o,s)=>{const r=n.transaction(_p,"readonly").objectStore(_p).get(e);r.onsuccess=()=>{const i=r.result;o((i==null?void 0:i.url)===t&&i.blob instanceof Blob?i.blob:null)},r.onerror=()=>s(r.error)})}catch{return null}}async function Rue(e,t,n){try{const o=await tB();if(s_.get(e)!==t)return;await new Promise((s,r)=>{const i=o.transaction(_p,"readwrite");i.objectStore(_p).put({url:t,blob:n},e),i.oncomplete=()=>s(),i.onerror=()=>r(i.error)})}catch{}}function Tue(e){return new Promise(t=>{new xP(e,{width:Sue,height:eB,resize:"cover",quality:.8,success:t,error:()=>t(e)})})}function Due(e,t){s_.set(e,t);let n=o_.get(e);n||(n=new Map,o_.set(e,n));const o=n.get(t);if(o)return o;const s=(async()=>{const r=await _ue(e,t);if(r)return r;const i=await fetch(t);if(!i.ok)throw new Error(`Thumbnail request failed: ${i.status}`);const a=await Tue(await i.blob());return await Rue(e,t,a),a})().finally(()=>{n.delete(t),n.size===0&&(o_.delete(e),s_.delete(e))});return n.set(t,s),s}const Iue="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAPoAgMAAAAwzTx3AAAACVBMVEXz9fjX19fo6etc+oS8AAAINUlEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGD24EAAAAAAAMj/tRFUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVXYOWPjuGEgii45w4DKWQIDu4orAcEtB3Z0iWdUBpuAY4W2qnRACTgLiwVS/MUbJ7YV6AnEx1+Sp8FgMBgMBoPBYNDGy3sB+kD+3zfqnu9c4E4XM8v8oc554RKOLiYu0Pu6By7xoIuFCxzUNSsXOeliV344PRO4SP1L7tQxM9e9uMxJ/bJwEZ9STknCfglc5PGUBoBBN3OZW0w5yCt+bbDamBkw4/eGa5k1PPVKYG6osYibPWrpNRZxsyctvcaqYdgnK7fVWMCTfeeWGguZc1tzjYWr8aGpxiJG/MxNNVaHuqSxxiKebhOXeYoDxNNtba2xeC1eHdbTnkA82HdNKF0YiAf7Xt/BC6j6xhc/fv3++ufrsH5kXxO67jRbvZWEcpiFntVDPaOV0/tbz3UuVEvJpHS2uWf1ehVdtQ3ds3qofu+7FuOh4xJfP502rbds0OpqUd+R1ecY8ObUpzjMmFNf+OIOqu7qAe9A1X1DjbWnHlPOnHqqsaDqjkrMdlc9NRp76pvdmIvTC6i6oyIreKVpKLJsT53sji+pzmGqO2oo8ZjqnhpGN3vqcWC3p56qLKS6o8RfPk65ykKq+/8fqBzyLVlw9evyfhWrLLj65XJIVfaAVHdf/s4PqcpCqnttWEk5B62+8wdilYVWD3GFpSqLqO6yl6WcVGUR1X32stRdqrLI6jtHxCoLrL5x5BRy7gao7qJj5CZVWUB1H69sNec8rvrECS9VWRvqUsQzoLp7Wl21yuKp+/xF4EOssrDqOz8hjuz21GOVxVN3wodcTinn8NS9pC5WWVT1wE/cxJyzpx6rLJy6E9WlKgunLq+6VGXtqcecs6eeqiyaurjX5Rep0NSlVT9JrLKg6lu+6tmzCQvqp/wiFZq6q6pT/GcwdWVyy6osvvpR+swXpvqiqMeRHUxduTeXVVkwdeVmdD6yQ6pnjyDEKgupTpx4UCnnsNSVZ255lcVSVx4y5zmHqb5kZ5tQZTHVpyzgpYiHUo/RlVLO2qrTli1tPraCqi9pqxtLeJozv/wWFZa6E35PjbE297mjf1I54DHHl7jsb0Rka3L7XN1X5YNPHkzdUWJ+v9bc1l2ahJJy5tRn8DuyESXlQO/D/yPnjG0ch4EoahlQ4AJcgvpQCRNohLlMyfXBJpRfcslWuYGBAaRPcybl548WhpMHmp+PErmNzORvXxp5k79za+Qkf9N6zVDv179nYj9Vcc1QZ2m+Z2E/QXXNUOfmEi1Hh14d9aHOyMYtR3sy+pKxzsPHLceHbpHGDov+VPq7L981lrfmJGq5YRe3RYdVmrcqrcha+CXa7YuEBT/opvWlqoM+qphVlfYBlcUtx/pYUmKNHfJh9KflhnwF8dFY1gsgFrcc6+tGSWgs9wWQZsuRnqqwhMaSXgC5ov/8q7Uc6QkqueGUisZyXwDxj6zWcpynJe02yntNYzkvgMAol0rLcZ6MlvsoHxWN5b4A4p9YpeA5b0HYfbOyocZ6Vlb01+1XvQC6UKELbFYKaKxno0I3WMtW/wJkZ0U/r7+DSTGFFF1j9JUJXWAt27zwMcKEbt+PjpwKMU705T6h3wrZOdGddEWl8TChC25WxGcAZiVCN9ysWKPnDkb0CSe0YowRfVbPo9FzROjiKDihF8UQoVtlFT9aPUeIrp6myh586NV/EK8Y40GHRTxQ2Y0H3WrqVho9x4fuC1mksoUO/dRsz9GgC0hrtGWnQTcY30BlNzb0WT3Bll3Z0D8gKZUtLOgCwxtt2Q8WdKtOamtUvHChP1XzPceFDj/shsruLOgCBR+qbCFBt/oidjRUdqVCP9UTq6xQoasnobJGgi4wtuGWfSdBNyj4WGULEfqikLXVc0ToPrQ5lRUOdPE/8yprHOgGNR6r7M6DDiMbvH1SHnSosmjLvlKgC9LFKntQoBtoS6bnaNAVEqjsxoIO4xpu2ZUCXcBaMiq7MqAbFFmq50jQYVhjlTUS9FOrsVbPMaALoqHKYhjQDQo+pbKFAh1qLKOyBwU6kGUOUgkButQLPlLZjQDdoMVSB6l2BnQo+JzKFgJ0mMk5lT36Rxco+JzKSv/oBkOaU9mNAP1USEZldwJ0haRWN/3fPfofhaScRv92j+4JTBZDje77l+HQd//mcOhe8OOh47KO2R895sy23Ew36o4eKvxwo+5UJx06DGbmzRN+qce8ky038aGDo8VbVow9esyS1Vg+9DlAT9WhPHrMK1nwwazoMVNOY6dgVvSYZ1JjA+3pMlmNpfNY769QY+lkLgt18hmNL9iRxvIt6z6LA40lXNt+2bNjHARCIAqgExMLucfeyVh5qe0tzZ5SVxMaI2zomLxX0xDg8wl1Vp0am/BuezuSckvGgG8nWB2TMeAjlgPRnTLlmkXtmjrlmhfXPXON3a39x3rOox5x7v855Xusf52665l1v9dFHauxt5jZpVdjc+b7x9qpsUlDblfGa+wjJldGa+wzple2X3Va219TpzsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8GIPDgQAAAAAgPxfG0FVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVdqDQwIAAAAAQf9f+8IEAAAAAAAAwCmRg3Unf/8l+AAAAABJRU5ErkJggg==",xue="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAPoAgMAAAAwzTx3AAAACVBMVEXz9fjX19fk5OUH9i6SAAAGd0lEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGD24EAAAAAAAMj/tRFUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVXYuXvcCGEgDMODJQrScwSK3GKP4GI/ZKWiSZRjcAn326TZU0YRsOwPkcCuPN88Nxi9wRjwxhhjjDHGGLOPuyYZpXhvSHSRwjkkK737D5L1UrQGGQYpWYsMZymYwy4ar/YaWbyUK2IvbQudw27a/uIb7Kdsje+QKUipIsB6sSObFKpCtpOUqcFBeta5DgfpWedaHKVmGx9xlJolHodpWeIdEujYylZIoeLu1iCFirtbjRQqHtmJR++QQsWepsWk/0rwWfSeps3alUQFow+SpCl5OxezNiVOweiSqOTRMy/WtuBNfObdqbPRS0Q/updENe/o5VcPVt2qW3WK6sQrvN3XrbpVt+pWXWt14vu67easulXnqO5l9Y6Pkah6uJ8c6CmrO/wZGKtPGXvG6pgMNNX989GaQFM9rKPM+KpHzE5s1R0Wnq16g8WZpbpfI856lurh9YT4SFY94uZEVh2rgat6hZUnqb4x+pmkeng9IX7mql5j1XNV73CHq/rD6CTV/cZv3kaO6mFrdKvOUT3izomq+uPoHNU9b/Vg1a06e3W7r2uvbrs5xie3QP/kVmPVk1SfR29439IQv5ursApc1R3ve3jiry/S8n5z63Bj39dpqldYBLbqgsXAUt3L8zo3slQPTxXR852bc5h4vtOSt/9Tw1d9foIJjCejp+wj43l4cRH4pvwVhIi7XmTDdVRf/d+8H/qrb3IABpXV/Z7lLKis/sveHdtGDgNRGJYEbKACVIKSq4IlzAF8xIRKrg8mVwL7PSwM35jiCiC5kR73y+hs/Nvy2AZErXnDWBizOp7iiNVnPB0jVl/xJIzVpWpz8YzVteo9imHE6vgSx6u+4Isbr/qKL0JYXepeJ+4Jq2vlO7XHq45vcbTqC7650aqv+CZ81aXy0gTlq66VdyGF0aon/DdY9QXGjVV9hjnoqkvt1TBKV11rb3zzY1VPgBmq+oKf3EjVZ/x0sFWX6guwlK26Vl+A5UeqnpAZqTpycZzqM3IHWXWpv9xRyKpr/TV/nrr6r1iusYa5+gMh2glnkbh6dp5xdnBVl9MjPRRPOSNc1fUcMtrpzPNW3wDgsNNZ4K2efy5QiqzVFzx5OxUcVXU5b2/BTgWhqq5Fx2inM2Wtvmdf1RtKgbV6yhYXvMJaPfuqXvCKY6peLq7ennIFYaqu5eJqkxWUs/qeLS4bXgmc1bfsF7SElzirJ8A+tOA1R1Rdyv8yqT3zCgdRdS3/MhGsaUEZq9uwsKYFz1h9z76hEy4wVk/ZNzSuOJ7q8v9odJpx5eCpbpefGD89cEX5qufv39pxxfNVzzrHhEt81TfAOFyLNNXFHvDmN64dNNXtzWOVhK36jFqerfqKWoGt+o5qkaW6vT24lmOprnaoJFzVF9TzXNVX1Atc1R9oEEmqiyWs5Uiqq62xtYSqOlooU/UZLQJT9RVNSKqLjVHNcVRXW2OrCVH1hCbKU31Bm8BTfUYjjupiU9RzFNXVpqh30FRPaKQ01dHKs1Rf0Iyiutga2yAyVNfnEM0OkuobmglJ9YRmnqP6gg4M1WWa0SESVNdpRYeDovqODkJRfUMHT1EdPQJBdVnQJd6/uq7o4giqP9BFCKrv6OIJqid0CQTV0env7Uf/jU5/bj96v8/od/QZ/TN6pzDdUfqM/hm9j5/uaPuMPuDoO/A+ne7oAbxPpjsaePQVeN8x3dEMvM9Nd7QA74vTLaEHw28vfescxR7bt9NQbDR9Ow3FRtP3043iZ9s/9uvYCkAQCKKgj9D+TKzO2Cp9lsAasc60AHzuot+t429LEt8S+CDxLYEPOtdSufnO1VQuGGVLxtjgsbcMNMnKXrGsz974tvs+McZ39X2q8V19/xq6c1vb+OlLf+1H6NqWN+7I8mcOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADzswYEAAAAAAJD/ayOoqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkp7cEgAAAAAIOj/a1+YAAAAAAAAALgEoKO2OvzgJtMAAAAASUVORK5CYII=",Aue=["src"],Pue=["src"],kue=["src"],Fue=_t(ot({__name:"ThumbnailRender",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean}},setup(e){const t=e,n=X(()=>t.value),o=X(()=>t.id),s=X(()=>t.disabled),r=X(()=>t.readOnly),i=$("");let a=null;const l=$(!1),u=X(()=>n.value==null||n.value===""),c=X(()=>!u.value&&l.value),d=()=>{l.value=!0},h=()=>{a&&URL.revokeObjectURL(a),a=null},f=()=>{i.value="",h()},p=fd(),{openSceneHub:g}=p,v=X(()=>{const b=un.getInstance().getItem("ws.code"),y=un.getInstance().getItem("BASE_URL"),E=b||t.workspaceId;return es({type:"scene_hub",config:{baseDomain:y,ws_code:E,scene_id:String(t.id)}}).url}),w=b=>{try{if(b.ctrlKey||b.metaKey){window.open(v.value,"_blank");return}g(String(t.id))}catch{window.open(v.value,"_blank")}finally{S()}},S=()=>{var E,_,I,T,F,L;(E=t.params)==null||E.api.clearFocusedCell();const b=((I=(_=t.params)==null?void 0:_.column)==null?void 0:I.getColId())||"",y=((F=(T=t.params)==null?void 0:T.node)==null?void 0:F.rowIndex)||0;(L=t.params)==null||L.api.setFocusedCell(y,b)};return Qe(()=>[o.value,n.value],async([b,y],E,_)=>{let I=!0;if(_(()=>{I=!1,h()}),l.value=!1,i.value="",!(b==null||b===""||!y))try{const T=await Due(String(b),y);if(!I||b!==o.value||y!==n.value)return;a=URL.createObjectURL(T),i.value=a}catch(T){I&&b===o.value&&y===n.value&&(console.warn("Failed to load cached thumbnail; using the original URL.",T),i.value=y)}},{immediate:!0}),Vn(f),(b,y)=>(q(),de("div",{class:le(["thumbnail-wrapper",{disabled:s.value,"read-only":r.value}]),onClick:w},[u.value?(q(),de("img",{key:0,src:V(xue),alt:"No thumbnail"},null,8,Aue)):c.value?(q(),de("img",{key:1,src:V(Iue),alt:"Broken thumbnail"},null,8,Pue)):i.value?(q(),de("img",{key:2,src:i.value,alt:"Thumbnail",onError:d},null,40,kue)):Ye("",!0)],2))}}),[["__scopeId","data-v-1fd3dd73"]]),Oue={class:"left-section"},Mue={class:"create-count"},Nue={class:"modified-template-options"},Lue=["onClick"],Vue={class:"setting-count"},Bue={class:"field-label"},$ue={class:"field-label"},Hue={class:"status-selection"},Gue={class:"preview-section"},Uue={key:0,class:"preview-list"},Wue={key:0,class:"preview-more"},zue={key:1,style:{color:"var(--tessr-text-secondary, #6b6b6b)"}},nB=1e3,oB=8,sB=7,jue=_t(ot({__name:"BulkCreateCount",props:{item:{},takeName:{},options:{default:()=>[{id:"number_up",name:"Number",icon:"ArrowLeft",description:{active:"Remove from the name",inactive:"Add a number that counts up",switch:"Switch to a number that counts up"}},{id:"number_down",name:"Number",icon:"ArrowRight",description:{active:"Remove from the name",inactive:"Add a number that counts down",switch:"Switch to a number that counts down"}},{id:"letter_up",name:"Letter",icon:"ArrowLeft",description:{active:"Remove from the name",inactive:"Add a letter that counts up",switch:"Switch to a letter that counts up"}},{id:"letter_down",name:"Letter",icon:"ArrowRight",description:{active:"Remove from the name",inactive:"Add a letter that counts down",switch:"Switch to a letter that counts down"}}]},getStatusFunc:{},workspaceId:{},entityId:{}},emits:["cancel","changed"],setup(e,{expose:t,emit:n}){const o=Kt,s=Io,r=$(null),i=$(null),a=["number","letter","name"],l={number_up:"1→9",number_down:"9→1",letter_up:"A→Z",letter_down:"Z→A",name:"Name"},u=$(null),c=$({}),d=(Y,re)=>{c.value[Y]=re instanceof HTMLElement?re:null},h=$(null),f=$("1"),p=e,g=$([p.takeName,{id:"number",text:"1→9",direction:"up"}," "]),v=X(()=>{const Y=w.value;let re=1;const R="9999.",G={createCount:`${R}0`,input:`${R}1`,firstField:`${R}5`,stepField:`${R}6`,number_up:`${R}1`,number_down:`${R}2`,letter_up:`${R}3`,letter_down:`${R}4`,statusSelect:`${R}7`};return["number_up","number_down","letter_up","letter_down"].forEach((ce,Ee)=>{re++,G[ce]=`${R}${re}`}),Y?(re++,G.statusSelect=`${R}${re}`,re++,G.firstField=`${R}${re}`,re++,G.stepField=`${R}${re}`):(delete G.firstField,delete G.stepField),G}),w=X(()=>g.value.find(Y=>typeof Y!="string"&&(Y.id==="number"||Y.id==="letter"))),S=$("number"),b=$("up"),y=Fo({...Ei.number}),E=Fo({...Ei.number}),_=()=>{Object.assign(y,Ei[S.value]),Object.assign(E,Ei[S.value])};Qe(w,Y=>{if(!Y)return;const re=Y.id;re!==S.value&&(S.value=re,_()),b.value=Y.direction==="down"?"down":"up"},{immediate:!0,flush:"sync"});const I=X(()=>YO[b.value]),T=X(()=>{const Y=Number(f.value);return Number.isFinite(Y)?Math.min(nB,Math.max(0,Math.floor(Y))):0}),F=(Y,re)=>{const R=JO(S.value,Y,re);y[Y]=R,Mv(Y,R)&&(E[Y]=R)},L=$(null),x=$(null),P=$(null),k=(Y,re)=>{var G,J,ce,Ee;if(re.key==="Enter"||re.key==="Escape")return;if(re.key==="Tab"){re.preventDefault(),re.stopPropagation(),re.stopImmediatePropagation();const Ce=re.shiftKey;Y=="first"&&(Ce?(G=c.value.letter_down)==null||G.focus():(J=L.value)==null||J.focus()),Y=="step"&&(Ce?(ce=L.value)==null||ce.focus():(Ee=i.value)==null||Ee.focus());return}re.key.length===1&&!re.ctrlKey&&!re.metaKey&&!re.altKey&&!ZO(S.value,Y,re.key)&&re.preventDefault()},M=(Y,re)=>{var Ee;re.preventDefault();const R=re.target,G=((Ee=re.clipboardData)==null?void 0:Ee.getData("text/plain"))??"",J=R.selectionStart??R.value.length,ce=R.selectionEnd??R.value.length;R.value=R.value.slice(0,J)+G+R.value.slice(ce),F(Y,R.value),R.value=y[Y]},N=Y=>{if(Mv(Y,y[Y]))return;const re=Ei[S.value][Y];y[Y]=re,E[Y]=re},B=X(()=>w.value?CE({type:S.value,direction:b.value,first:E.first,step:E.step,count:T.value}):[]),z=X(()=>g.value.every(Y=>typeof Y=="string"&&!Y)),oe=X(()=>T.value===0||z.value?[]:Array.from({length:T.value}).map((Y,re)=>g.value.map(R=>typeof R=="string"?R:R.id==="name"?p.takeName:B.value[re]??"").join(""))),ie=X(()=>oe.value.length>oB?oe.value.length-sB:0),te=X(()=>oe.value.length>oB?oe.value.slice(0,sB):oe.value),se=Y=>{A.value=[Y];const re=Y.id.split("_")[0],R=Y.id.split("_")[1],G=l[Y.id],J=r.value;if(!J)return;const ce=Ce=>g.value.find(Ne=>typeof Ne!="string"&&Ce.includes(Ne.id));if(re==="name"){ce(["name"])?J.deleteTag("name"):J.insertTag({id:re,text:G,direction:void 0});return}const Ee=ce(["number","letter"]);if(Ee){const Ce=Ee.id===re,Ne=Ee.direction===R;if(Ce&&Ne){J.deleteTag(Ee.id);return}J.deleteTag(Ee.id),J.insertTag({id:re,text:G,direction:R})}else J.insertTag({id:re,text:G,direction:R})},Z=Y=>j(Y.id)?Y.description.active:!!w.value&&Y.description.switch?Y.description.switch:Y.description.inactive,A=$(null),j=Y=>{const[re,R]=Y.split("_");return g.value.some(G=>typeof G!="string"&&G.id===re&&G.direction===R)},ne=n,ge=X(()=>{const[Y]=g.value;return g.value.length===1&&typeof Y!="string"&&Y.id==="name"});X(()=>g.value.length===0||ge.value);const xe=()=>{const Y=g.value.map(re=>typeof re=="string"?{type:"text",value:re}:re.id==="name"?{type:"current_name"}:{type:"counter",value:y.first,direction:re.direction=="up"?"asc":"desc",format:re.id==="number"?"number":"letter",step:y.step});ne("changed",{data:Y,count:T.value,template_flow_status_id:u.value||void 0})};Qe([g,f,y,u],()=>{xe()},{deep:!0}),t({reset:()=>{A.value=null,g.value=[]},focus:()=>{var Y;(Y=i.value)==null||Y.focus()}}),Xt(()=>{var Y;(Y=i.value)==null||Y.focus()});const K=Y=>{var re,R;Y.preventDefault(),Y.stopPropagation(),(re=i.value)==null||re.blur(),(R=h.value)==null||R.focus()};return(Y,re)=>(q(),de("div",{class:"bulk-rename-core",ref_key:"popupRef",ref:h,tabindex:"-1"},[Se("div",Oue,[Se("div",Mue,[re[11]||(re[11]=Se("span",null,"How many to create?",-1)),ze(ye(V(hl),{modelValue:f.value,"onUpdate:modelValue":re[0]||(re[0]=R=>f.value=R),type:"number","max-value":nB,"max-decimal-char":0,"show-clear":!1,ref_key:"counterRef",ref:i,placeholder:""},null,8,["modelValue"]),[[V(s),v.value.createCount]])]),ze(ye(VN,{modelValue:g.value,"onUpdate:modelValue":re[1]||(re[1]=R=>g.value=R),"allowed-tags":a,ref_key:"templateInputRef",ref:r,placeholder:"Enter name",onEscape:K},null,8,["modelValue"]),[[V(s),v.value.input]]),Se("div",Nue,[(q(!0),de(Pt,null,xn(e.options,R=>ze((q(),de("button",{onClick:G=>se(R),ref_for:!0,ref:G=>d(R.id,G),key:R.id,class:le([{active:j(R.id)},"template-option"])},[tt(at(R.name)+" ",1),R.icon?(q(),je(V(gt),{key:0,src:R.icon,style:{transform:"rotate(90deg)"}},null,8,["src"])):Ye("",!0)],10,Lue)),[[V(o),{content:Z(R),bypassOverflowCheck:!0,delay:[300,0],interactive:!1,hideOnClick:!1,appendTo:"parent"}],[V(s),`${v.value[R.id]}`]])),128))]),Se("div",Vue,[Se("span",Bue,at(I.value.first),1),ze((q(),je(V(hl),{ref_key:"firstFieldRef",ref:x,"model-value":y.first,disabled:!w.value,"max-length":V(yE),onInput:re[2]||(re[2]=R=>F("first",R)),onKeydown:re[3]||(re[3]=R=>k("first",R)),onPaste:re[4]||(re[4]=R=>M("first",R)),onBlur:re[5]||(re[5]=R=>N("first")),"show-clear":!1},{clear:we(()=>[...re[12]||(re[12]=[Se("div",null,null,-1)])]),_:1},8,["model-value","disabled","max-length"])),[[V(s),v.value.firstField]]),Se("span",$ue,at(I.value.step),1),ze(ye(V(hl),{"model-value":y.step,disabled:!w.value,"max-length":V(wE),onInput:re[6]||(re[6]=R=>F("step",R)),onKeydown:re[7]||(re[7]=R=>k("step",R)),onPaste:re[8]||(re[8]=R=>M("step",R)),onBlur:re[9]||(re[9]=R=>N("step")),"show-clear":!1,ref_key:"fieldStepRef",ref:L},null,8,["model-value","disabled","max-length"]),[[V(s),v.value.stepField]])]),Se("div",Hue,[re[13]||(re[13]=Se("span",null,"Status",-1)),ye(V(wL),{modelValue:u.value,"onUpdate:modelValue":re[10]||(re[10]=R=>u.value=R),"get-status-func":p.getStatusFunc,"workspace-id":p.workspaceId,id:p.entityId,style:{width:"100%"},"max-width":"372px",ref_key:"selectStatusRef",ref:P,"focus-index":v.value.statusSelect},null,8,["modelValue","get-status-func","workspace-id","id","focus-index"])])]),Se("div",Gue,[re[14]||(re[14]=Se("span",{class:"preview-title"},"Preview",-1)),te.value.length>0?(q(),de("ul",Uue,[(q(!0),de(Pt,null,xn(te.value,(R,G)=>(q(),de("li",{key:G},[ye($N,{text:R},null,8,["text"])]))),128)),ie.value>0?(q(),de("li",Wue," … "+at(ie.value)+" more ",1)):Ye("",!0)])):(q(),de("div",zue," Add a name or a counter to see a preview. "))])],512))}}),[["__scopeId","data-v-5c3f1777"]]),rB={text:yl,id:void 0,assignees:Mse,status:KN,dateRange:Nse,isStarted:yl,isCompleted:yl,lastUpdated:yl,completedOn:yl,isDeleted:yl,isArchived:yl,isProcessing:yl,name:GN,options:CQ,metric:zN,__checkboxSelection:void 0,description:Vie,thumbnail:Fue},Kue={text:!1,id:!1,assignees:!0,status:!0,dateRange:!0,isStarted:!1,isCompleted:!1,lastUpdated:!1,completedOn:!1,isDeleted:!1,isArchived:!1,isProcessing:!1,name:!1,options:!0,metric:!1,__checkboxSelection:!1,description:!1,thumbnail:!1},que={text:null,id:void 0,assignees:oM,status:NN,dateRange:Lse,isStarted:void 0,isCompleted:void 0,lastUpdated:void 0,completedOn:void 0,isDeleted:void 0,isArchived:void 0,isProcessing:void 0,name:GN,options:UN,metric:void 0,__checkboxSelection:void 0,description:void 0,thumbnail:void 0},Yue={id:[100,100],assignees:[200,200],status:[200,200],dateRange:[255,255],isStarted:[150,150],isCompleted:[150,150],lastUpdated:[180,180],completedOn:[180,180],isDeleted:[void 0,void 0],isArchived:[void 0,void 0],isProcessing:[void 0,void 0],name:[350,500],options:[50,50],metric:[200,300],__checkboxSelection:[50,50],text:[200,300],description:[200,300],thumbnail:[82,82]},Xue={dateRange:{cellEditorPopupPosition:"under",cellEditorPopup:!1},name:{cellEditorPopupPosition:"over",cellEditor:!1,cellEditorPopup:!1},metric:{suppressKeyboardEvent:void 0,suppressNavigable:!1,suppressMovable:!1,cellClass:"ag-cell-optimized",editable:!0}},Zue=e=>{var t,n,o;if(e){if(Number((t=e.metric_type)==null?void 0:t.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number((n=e.metric_type)==null?void 0:n.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number((o=e.metric_type)==null?void 0:o.id)==3)return}},Ld=e=>{if(e)return Zue(e)};function iB(e,t){var s,r,i,a;const n=(s=t==null?void 0:t.data)==null?void 0:s.permissions;let o={disabled:!1,readOnly:!1,type:void 0};if(!t||!e)o={disabled:!1,readOnly:!0,type:void 0};else if(e==="options")o={disabled:!1,readOnly:!1,type:void 0};else if(e!=null&&e.includes("metric")){const l=`metric_permission_${e==null?void 0:e.replace("metric_","")}`;o={disabled:!1,readOnly:!((t==null?void 0:t.data)&&t.data[l]&&((r=t.data[l])==null?void 0:r.permission)==2&&!((i=t.colDef)!=null&&i.context.formula)&&!t.data.isLocked&&!t.data.isDeleted),type:Ld((a=t.colDef)==null?void 0:a.context)}}else{const u={assignees:(n==null?void 0:n.has_update_assignee_permission)??0,completedOn:0,name:(n==null?void 0:n.has_edit_permission)??0,permissions:0,status:(n==null?void 0:n.has_edit_template_flow_status_permission)??0,dateRange:(n==null?void 0:n.has_edit_date_permission)??0,isStarted:0,isDeleted:0,isArchived:0,isLocked:0,isProcessing:0,lastUpdated:0,id:0,isCompleted:0,options:1,disabled:0,description:(n==null?void 0:n.has_edit_permission)??0,thumbnail:1}[e]??0;o={disabled:u===-1,readOnly:u!==1,type:void 0}}return o}class r_{constructor(){Rn(this,"eGui");Rn(this,"params")}init(t){this.params=t}getGui(){var n,o,s,r,i;const t=document.createElement("div");return(n=this.params)!=null&&n.height&&t.style.setProperty("--height",(o=this.params)==null?void 0:o.height),(s=this.params)!=null&&s.width?t.style.setProperty("--width",(r=this.params)==null?void 0:r.width):(i=this.params)!=null&&i.fullwidth?t.style.setProperty("--width","100%"):t.style.setProperty("--width",`${Math.floor(Math.random()*50)+50}%`),t.className="ag-cell-skeleton",t.addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation()}),this.eGui=t,t}refresh(t){return!1}getValue(){var t;return(t=this.params)==null?void 0:t.value}isPopup(t){return!1}getPopupPosition(){}destroy(){}}const aB=new Map;class Tp{static initialize(t){this.wrappers=t}static getWrappers(){if(!this.wrappers)throw new Error("CellRendererFactory: Not initialized. Please call CellRendererFactory.initialize() first.");return this.wrappers}static buildCommonCellParams(t,n){var u,c,d;const o=t.data||((u=t.node)==null?void 0:u.data),s=(c=t.colDef)==null?void 0:c.field,r=s&&o?o[s]:void 0,i=iB((d=t.colDef)==null?void 0:d.field,t),a=typeof n=="function"?n(t):n??{};return{...t,value:r,disabled:i==null?void 0:i.disabled,readOnly:i==null?void 0:i.readOnly,type:Ld(t.context),...a}}static resolveRendererComponent(t,n){let o;return t.includes("metric")&&rB.metric?Ld(n)==="rating"?o=kie:o=zN:o=rB[t]??void 0,o}static resolveEditorComponent(t,n){const o=t.includes("metric");let s;const r=Ld(n);return o&&["number","dropdown"].includes(r)?s=Wre:s=que[t],s}static canEditField(t,n){var r;if(n.data===void 0)return!1;const o=iB((r=n.colDef)==null?void 0:r.field,n),s=Kue[t]??!0;return!(o!=null&&o.disabled)&&!(o!=null&&o.readOnly)&&s&&(o==null?void 0:o.type)!=="rating"}static resolveSize(t){const[n=250,o=300]=Yue[t]??[];return{minWidth:n,maxWidth:o}}static buildHeaderComponentParams(t){return n=>typeof t=="function"?t(n):t??{}}static fromType(t){const{wrapVueCellEditor:n}=this.getWrappers(),o=String(t.field??""),s=this.resolveSize(o),r=Xue[o]??{},i=Ld(t.context),a=i==="number"||i==="rating",l=i=="rating"?t.context.range*24+20:s.minWidth;return{...t,headerName:t.headerName,...s,...t,cellEditorSelector:c=>{const d=this.resolveEditorComponent(o,t.context);return{component:n(d),params:this.buildCommonCellParams(c,t.cellRendererParams),popup:!a}},singleClickEdit:!0,cellEditorPopup:!a,cellEditorPopupPosition:a?void 0:"under",editable:c=>{let d;return c.data===void 0||c.data.isDeleted||c.node.data===void 0?d=!1:d=this.canEditField(o,c),d},minWidth:l,cellRendererSelector:c=>Jue(c,{component:n(this.resolveRendererComponent(o,t.context)),params:this.buildCommonCellParams(c,t.cellRendererParams)}),headerComponentParams:this.buildHeaderComponentParams(t.headerComponentParams),...r,cellClass:c=>`${i}--${c.colDef.field}`}}}Rn(Tp,"wrappers",null);const Jue=(e,t)=>{var s;const n=(s=e.colDef)==null?void 0:s.field,o=`${n}-${e.node.rowIndex}`;return aB.set(o,(aB.get(o)??0)+1),n!=null&&n.includes("metric")?e.value===void 0?{component:r_,params:{fullwidth:!1}}:t:e.data&&(n!=null&&n.includes("thumbnail"))||e.data&&e.value!==void 0?t:!n||n==="options"||n==="__checkboxSelection"?e.data?t:{component:r_,params:{fullwidth:!0,width:"24px",height:"24px"}}:!e.data||e.value===void 0?{component:r_,params:{fullwidth:!1}}:t},Que=_t(ot({__name:"Vue3Wrapper",props:{component:{},params:{},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!0},value:{},data:{},id:{},tooltip:{},isNoData:{type:Boolean,default:!1},workspaceId:{},entityId:{},axiosService:{},isSearching:{type:Boolean,default:!1},isFiltering:{type:Boolean,default:!1},sortType:{default:"default"},maxRating:{default:5},config:{}},setup(e,{expose:t}){const n=e,o=$(null),s=X(()=>{var a;return((a=n.component)==null?void 0:a.name)||"UnknownComponent"}),r=X(()=>{var a;return((a=n.component)==null?void 0:a.default)||n.component}),i=X(()=>({params:n.params,disabled:n.disabled,readOnly:n.readOnly,value:n.value,maxRating:n.maxRating,data:n.data,id:n.id,workspaceId:n.workspaceId,entityId:n.entityId,axiosService:n.axiosService,tooltip:n.tooltip,isSearching:n.isSearching,isFiltering:n.isFiltering,isNoData:n.isNoData,config:n.config}));return t({focus:()=>{var a;return(a=o.value)!=null&&a.focus?o.value.focus():console.warn(`Component ${s.value} does not have a focus method.`),!0},blur:()=>{var a,l;return(l=(a=o.value)==null?void 0:a.blur)==null||l.call(a),!0},trigger:(a,l)=>{var u;return(u=o.value)==null||u.$emit(a,l),!0}}),(a,l)=>(q(),je(OC(r.value),jt(i.value,{ref_key:"componentRef",ref:o}),null,16))}}),[["__cssModules",{$style:{skeleton:"_skeleton_7xde7_1",shimmer:"_shimmer_7xde7_16","skeleton-loading":"_skeleton-loading_7xde7_1"}}]]);function ece(e){return"stopEditing"in e}const tce=8,nce=e=>{if(!e)return;const t=e.__vueParentComponent,n=t==null?void 0:t.exposed;n&&typeof n.triggerFocus=="function"?n.triggerFocus():e.focus()};function lB(e){return class{constructor(){Rn(this,"container");Rn(this,"vNode",null);Rn(this,"componentInstance",null);Rn(this,"componsenExposed",null);Rn(this,"params");Rn(this,"isEditor",!1);Rn(this,"_destroyed",!1)}init(n){var l,u,c,d;if(!n){console.error("[Vue3CellWrapper] Missing params");return}const o=performance.now();this.params=n,this.isEditor=ece(n),this.container=document.createElement("div"),this.container.classList.add("ag-vue3-cell-wrapper"),this.container.style.width="100%",this.container.style.height="100%";const s=n.context.apiClass,r=n,i={component:e,params:Object.freeze(n),disabled:!1,readOnly:r.readOnly??!1,value:n.value,maxRating:r.maxRating??void 0,data:n.data,id:(l=n==null?void 0:n.data)==null?void 0:l.id,workspaceId:n.context.workspaceId,entityId:n.context.entityId,axiosService:s,tooltip:r.tooltip??void 0,isSearching:r.isSearching??!1,isFiltering:r.isFiltering??!1,isNoData:r.isNoData??!1,config:r.config,sceneId:(r==null?void 0:r.sceneId)||void 0};this.vNode=ye(Que,i),rb(this.vNode,this.container);const a=performance.now()-o;a>tce&&console.warn(`[Vue3CellWrapper] Slow render (${a.toFixed(1)}ms) for "${(u=n.colDef)==null?void 0:u.field}"`),this.componentInstance=(c=this.vNode.component)==null?void 0:c.proxy,this.componsenExposed=(d=this.vNode.component)==null?void 0:d.exposed}getGui(){return this.container}refresh(n){return!1}focusUi(){var n;(n=this.componsenExposed)!=null&&n.focus?this.componsenExposed.focus():nce(this.container)}getValue(){var n,o,s;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((s=(o=this.componentInstance).getValue)==null?void 0:s.call(o))??this.componentInstance.value:(console.warn("[Vue3CellWrapper] getValue() called but component instance not available"),(n=this.params)==null?void 0:n.value)}isPopup(n){var i,a,l,u,c;const o=(l=(a=(i=this.params)==null?void 0:i.colDef)==null?void 0:a.field)==null?void 0:l.includes("metric"),s=((u=this.params)==null?void 0:u.context)&&Ld(this.params.context);return o||(s==="number"||s==="rating")||!this.isEditor?!1:(c=this.componentInstance)!=null&&c.isPopup?this.componentInstance.isPopup():!0}getPopupPosition(){var o,s,r;return this.isEditor?(o=this.componentInstance)!=null&&o.getPopupPosition?this.componentInstance.getPopupPosition():((r=(s=this.params)==null?void 0:s.colDef)==null?void 0:r.cellEditorPopupPosition)??"under":void 0}afterGuiAttached(){!this.isEditor||this.componentInstance}destroy(){if(!this._destroyed&&(this._destroyed=!0,!!this.container))try{const n=this.componentInstance;if(n){try{typeof n.$destroy=="function"&&n.$destroy()}catch(s){console.warn("[Vue3CellWrapper] Error during $destroy:",s)}try{typeof n.destroy=="function"&&n.destroy()}catch(s){console.warn("[Vue3CellWrapper] Error during destroy():",s)}}(typeof queueMicrotask=="function"?queueMicrotask:s=>Promise.resolve().then(s))(()=>{try{rb(null,this.container)}catch(s){console.warn("[Vue3CellWrapper] Error during unmount:",s)}finally{this.container.textContent=""}})}catch(n){console.error("[Vue3CellWrapper] Error during cleanup:",n)}finally{this.vNode=null,this.componentInstance=null}}}}function My(e){return lB(e)}function uB(e){return lB(e)}var Wu=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,n){const o=t?this.allAsyncListeners:this.allSyncListeners;let s=o.get(e);return!s&&n&&(s=new Set,o.set(e,s)),s}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,n=!1){this.getListeners(e,n,!0).add(t)}removeEventListener(e,t,n=!1){const o=this.getListeners(e,n,!1);o&&(o.delete(t),o.size===0&&(n?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const n=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:o}=this,s=a=>{const l=o?()=>o.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},r=this.getListeners(n,t,!1);if(((r==null?void 0:r.size)??0)>0){const a=new Set(r);for(const l of a)r!=null&&r.has(l)&&s(()=>l(e))}const i=this.getGlobalListeners(t);if(i.size>0){const a=new Set(i);for(const l of a)s(()=>l(n,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}};function Ia(e){return e==null||e===""?null:e}function ft(e){return e!=null&&e!==""}function Gn(e){return!ft(e)}function i_(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Dp(e,t){const n=e?JSON.stringify(e):null,o=t?JSON.stringify(t):null;return n===o}function oce(e,t,n=!1){const o=e==null,s=t==null;if(e!=null&&e.toNumber&&(e=e.toNumber()),t!=null&&t.toNumber&&(t=t.toNumber()),o&&s)return 0;if(o)return-1;if(s)return 1;function r(i,a){return i>a?1:i<a?-1:0}if(typeof e!="string"||!n)return r(e,t);try{return e.localeCompare(t)}catch{return r(e,t)}}var sce=/[&<>"']/g,rce={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Vd(e){return(e==null?void 0:e.toString().toString())??null}function Ip(e){var t;return((t=Vd(e))==null?void 0:t.replace(sce,n=>rce[n]))??null}function Ai(e){return e.eRootDiv.getRootNode()}function Kn(e){return Ai(e).activeElement}function $o(e){const{gos:t,eRootDiv:n}=e;let o=null;const s=t.get("getDocument");return s&&ft(s)?o=s():n&&(o=n.ownerDocument),o&&ft(o)?o:document}function cB(e){const t=Kn(e);return t===null||t===$o(e).body}function dB(e){return $o(e).defaultView||window}function a_(e){let t=null,n=null;try{t=$o(e).fullscreenElement}catch{}finally{t||(t=Ai(e));const o=t.querySelector("body");o?n=o:t instanceof ShadowRoot?n=t:t instanceof Document?n=t==null?void 0:t.documentElement:n=t}return n}function ice(e){const t=a_(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function ace(e){const t=a_(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function Qr(e,t,n){n==null||typeof n=="string"&&n==""?hB(e,t):Ir(e,t,n)}function Ir(e,t,n){e.setAttribute(fB(t),n.toString())}function hB(e,t){e.removeAttribute(fB(t))}function fB(e){return`aria-${e}`}function Dl(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function lce(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function uce(e){return e.getAttribute("aria-label")}function Bd(e,t){Qr(e,"label",t)}function xp(e,t){Qr(e,"labelledby",t)}function pB(e,t){Qr(e,"live",t)}function cce(e,t){Qr(e,"atomic",t)}function dce(e,t){Qr(e,"relevant",t)}function hce(e,t){Qr(e,"invalid",t)}function fce(e,t){Qr(e,"disabled",t)}function gB(e,t){Qr(e,"hidden",t)}function l_(e,t){Ir(e,"expanded",t)}function pce(e,t){Ir(e,"setsize",t)}function gce(e,t){Ir(e,"posinset",t)}function mce(e,t){Ir(e,"multiselectable",t)}function vce(e,t){Ir(e,"rowcount",t)}function Ny(e,t){Ir(e,"rowindex",t)}function yce(e,t){Ir(e,"rowspan",t)}function wce(e,t){Ir(e,"colcount",t)}function mB(e,t){Ir(e,"colindex",t)}function Cce(e,t){Ir(e,"colspan",t)}function bce(e,t){Ir(e,"sort",t)}function Sce(e){hB(e,"sort")}function vB(e,t){Qr(e,"selected",t)}function Ece(e,t){Qr(e,"controls",t)}function _ce(e,t){Ece(e,t.id),xp(t,e.id)}function yB(e,t){Qr(e,"owns",t)}function Ly(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Rce="[tabindex], input, select, button, textarea, [href]",wB="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Ap(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(wB)?!1:Pi(e)}function Un(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-hidden",!t),o||gB(e,!t)}function Tce(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-invisible",!t),o||gB(e,!t)}function Pp(e,t){const n="disabled",o=t?r=>r.setAttribute(n,""):r=>r.removeAttribute(n);o(e);const s=e.querySelectorAll("input")??[];for(const r of s)o(r)}function zu(e,t,n){let o=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof n=="number"){if(++o>n)break}else if(e===n)break}return!1}function ju(e){const{height:t,width:n,borderTopWidth:o,borderRightWidth:s,borderBottomWidth:r,borderLeftWidth:i,paddingTop:a,paddingRight:l,paddingBottom:u,paddingLeft:c,marginTop:d,marginRight:h,marginBottom:f,marginLeft:p,boxSizing:g}=window.getComputedStyle(e),v=Number.parseFloat;return{height:v(t||"0"),width:v(n||"0"),borderTopWidth:v(o||"0"),borderRightWidth:v(s||"0"),borderBottomWidth:v(r||"0"),borderLeftWidth:v(i||"0"),paddingTop:v(a||"0"),paddingRight:v(l||"0"),paddingBottom:v(u||"0"),paddingLeft:v(c||"0"),marginTop:v(d||"0"),marginRight:v(h||"0"),marginBottom:v(f||"0"),marginLeft:v(p||"0"),boxSizing:g}}function u_(e){const t=ju(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function kp(e){const t=ju(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function CB(e){const{height:t,marginBottom:n,marginTop:o}=ju(e);return Math.floor(t+n+o)}function Vy(e){const{width:t,marginLeft:n,marginRight:o}=ju(e);return Math.floor(t+n+o)}function bB(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:o,borderRightWidth:s,borderBottomWidth:r}=ju(e);return{top:t.top+(n||0),left:t.left+(o||0),right:t.right+(s||0),bottom:t.bottom+(r||0)}}function By(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function $y(e,t,n){n&&(t*=-1),e.scrollLeft=t}function qo(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function ei(e){e!=null&&e.parentNode&&e.remove()}function SB(e){return!!e.offsetParent}function Pi(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!SB(e)||window.getComputedStyle(e).visibility!=="visible")}function c_(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function EB(e,t,n){n&&n.nextSibling===t||(e.firstChild?n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function _B(e,t){for(let n=0;n<t.length;n++){const o=t[n],s=e.children[n];s!==o&&e.insertBefore(o,s)}}function Dce(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Fp(e,t){if(t)for(const n of Object.keys(t)){const o=t[n];if(!(n!=null&&n.length)||o==null)continue;const s=Dce(n),r=o.toString(),i=r.replace(/\s*!important/g,""),a=i.length!=r.length?"important":void 0;e.style.setProperty(s,i,a)}}function Hy(e){return()=>{const t=e();return t?d_(t)||RB(t):!0}}function d_(e){return e.clientWidth<e.scrollWidth}function RB(e){return e.clientHeight<e.scrollHeight}function Gy(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):ki(e,t)}function ki(e,t){t=h_(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Op(e,t){t=h_(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function h_(e){return typeof e=="number"?`${e}px`:e}function f_(e){return e instanceof Node||e instanceof HTMLElement}function Js(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function Il(e,t,n){const s=dB(e).ResizeObserver,r=s?new s(n):null;return r==null||r.observe(t),()=>r==null?void 0:r.disconnect()}function xa(e,t){const n=dB(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var TB="data-ref",p_;function DB(){return p_??(p_=document.createTextNode(" ")),p_.cloneNode()}function Mp(e){const{attrs:t,children:n,cls:o,ref:s,role:r,tag:i}=e,a=document.createElement(i);if(o&&(a.className=o),s&&a.setAttribute(TB,s),r&&a.setAttribute("role",r),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(n)if(typeof n=="string")a.textContent=n;else{let l=!0;for(const u of n)u&&(typeof u=="string"?(a.appendChild(document.createTextNode(u)),l=!1):typeof u=="function"?a.appendChild(u()):(l&&(a.appendChild(DB()),l=!1),a.append(Mp(u)),a.appendChild(DB())))}return a}var Ice=["touchstart","touchend","touchmove","touchcancel","scroll"],xce=["wheel"],g_={},IB=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof g_[n]=="boolean")return g_[n];const o=document.createElement(e[n]||"div");return n="on"+n,g_[n]=n in o}})();function Ace(e,t){return!t||!e?!1:kce(t).indexOf(e)>=0}function Pce(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function kce(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Pce(t)}function Fce(e,t,n){const o=Oce(t);let s;o!=null&&(s={passive:o}),e.addEventListener(t,n,s)}var Oce=e=>{const t=Ice.includes(e),n=xce.includes(e);if(t)return!0;if(n)return!1};function xB(e,t,n){if(n===0)return!1;const o=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(o,s)<=n}var Np=(e,t)=>{const n=e.identifier;for(let o=0,s=t.length;o<s;++o){const r=t[o];if(r.identifier===n)return r}return null};function Lp(e,t){return e.gos.isElementInThisInstance(t.target)}function Mce(e,t,n){const s=e.getBoundingClientRect().height,r=ice(n)-2,i=ace(n)-2;if(!e.offsetParent)return;const l=bB(e.offsetParent),{clientY:u,clientX:c}=t;let d=u-l.top-s/2,h=c-l.left-10;const f=$o(n),p=f.defaultView||window,g=p.pageYOffset||f.documentElement.scrollTop,v=p.pageXOffset||f.documentElement.scrollLeft;r>0&&h+e.clientWidth>r+v&&(h=r+v-e.clientWidth),h<0&&(h=0),i>0&&d+e.clientHeight>i+g&&(d=i+g-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}var Uy=(e,...t)=>{for(const n of t){const[o,s,r,i]=n;o.addEventListener(s,r,i),e.push(n)}},m_=e=>{if(e){for(const[t,n,o,s]of e)t.removeEventListener(n,o,s);e.length=0}},xl=e=>{e.cancelable&&e.preventDefault()};function Nce(e,t){return t}function AB(e){return(e==null?void 0:e.getLocaleTextFunc())??Nce}function Lce(e,t,n,o){const s=t[n];return e.getLocaleTextFunc()(n,typeof s=="function"?s(o):s,o)}function Vce(e){return(t,n,o)=>e({key:t,defaultValue:n,variableValues:o})}function Bce(e){return(t,n,o)=>{let s=e==null?void 0:e[t];if(s&&(o!=null&&o.length)){let r=0;for(;!(r>=o.length||s.indexOf("${variable}")===-1);)s=s.replace("${variable}",o[r++])}return s??n}}var Fi=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,n){this.localEventService||(this.localEventService=new Wu),this.localEventService.addEventListener(e,t,n)}removeEventListener(e,t,n){var o;(o=this.localEventService)==null||o.removeEventListener(e,t,n)}dispatchLocalEvent(e){var t;(t=this.localEventService)==null||t.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const n=[];for(const o of Object.keys(t)){const s=t[o];s&&n.push(this._setupListener(e,o,s))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let o;if($ce(e))e.__addEventListener(t,n),o=()=>(e.__removeEventListener(t,n),null);else{const s=Hce(e);e instanceof HTMLElement?Fce(e,t,n):s?e.addListener(t,n):e.addEventListener(t,n),o=s?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}setupPropertyListener(e,t){const{gos:n}=this;n.addPropertyEventListener(e,t);const o=()=>(n.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const n=e.join("-")+this.propertyListenerId++,o=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=s.changeSet.id}const r={type:"propertyChanged",changeSet:s.changeSet,source:s.source};t(r)};for(const s of e)this.setupPropertyListener(s,o)}getLocaleTextFunc(){return AB(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const n=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),n}createBean(e,t,n){return(t||this.stubContext).createBean(e,n)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function $ce(e){return e.__addEventListener!==void 0}function Hce(e){return e.eventServiceType==="global"}var qe=class extends Fi{},PB={};function v_(e,t){PB[t]||(e(),PB[t]=!0)}var Gce={pending:!1,funcs:[]},Uce={pending:!1,funcs:[]};function y_(e,t="setTimeout",n){const o=t==="raf"?Uce:Gce;if(o.funcs.push(e),o.pending)return;o.pending=!0;const s=()=>{const r=o.funcs.slice();o.funcs.length=0,o.pending=!1;for(const i of r)i()};t==="raf"?xa(n,s):window.setTimeout(s,0)}function Yo(e,t,n){let o;return function(...s){const r=this;window.clearTimeout(o),o=window.setTimeout(function(){e.isAlive()&&t.apply(r,s)},n)}}function kB(e,t){let n=0;return function(...o){const s=this,r=Date.now();r-n<t||(n=r,e.apply(s,o))}}function Wce(e,t,n,o=100){const s=Date.now();let r=null,i=!1;const a=()=>{r!=null&&(window.clearInterval(r),r=null)};e.addDestroyFunc(a);const l=()=>{const u=Date.now()-s>o;(t()||u)&&(n(),i=!0,a())};l(),i||(r=window.setInterval(l,10))}var FB=new Set(["__proto__","constructor","prototype"]);function zce(e,t){if(e!=null){if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(n.toString(),e[n]);return}for(const n of Object.keys(e).filter(o=>!FB.has(o)))t(n,e[n])}}function vs(e,t,n=!0,o=!1){ft(t)&&zce(t,(s,r)=>{let i=e[s];i!==r&&(o&&i==null&&r!=null&&typeof r=="object"&&r.constructor===Object&&(i={},e[s]=i),OB(r)&&OB(i)&&!Array.isArray(i)?vs(i,r,n,o):(n||r!==void 0)&&(e[s]=r))})}function OB(e){return typeof e=="object"&&e!==null}var w_=class Ga{static applyGlobalGridOptions(t){if(!Ga.gridOptions)return{...t};let n={};return vs(n,Ga.gridOptions,!0,!0),Ga.mergeStrategy==="deep"?vs(n,t,!0,!0):n={...n,...t},Ga.gridOptions.context&&(n.context=Ga.gridOptions.context),t.context&&(Ga.mergeStrategy==="deep"&&n.context&&vs(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(Ga.mergeStrategy==="deep"){const o=jce(t);if(o&&typeof o=="object"&&typeof n=="object")return Ga.applyGlobalGridOptions({[t]:n})[t]}return n}};w_.gridOptions=void 0,w_.mergeStrategy="shallow";var C_=w_;function jce(e){var t;return(t=C_.gridOptions)==null?void 0:t[e]}var Kce={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1},MB="https://www.ag-grid.com";function Al(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function Vp(e,...t){v_(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function $d(e,...t){v_(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var NB=new Set,Wy={},Hd={},zy,LB=!1,VB=!1,qce=!1;function Yce(e){const[t,n]=e.version.split(".")||[],[o,s]=zy.split(".")||[];return t===o&&n===s}function Xce(e){var o;zy||(zy=e.version);const t=s=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${s} Please update all modules to the same version.`;e.version?Yce(e)||$d(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${zy}.`)):$d(t(`'${e.moduleName}' is incompatible.`));const n=(o=e.validate)==null?void 0:o.call(e);n&&!n.isValid&&$d(`${n.message}`)}function Bp(e,t,n=!1){n||(LB=!0),Xce(e);const o=e.rowModels??["all"];NB.add(e);let s;t!==void 0?(VB=!0,Hd[t]===void 0&&(Hd[t]={}),s=Hd[t]):s=Wy;for(const r of o)s[r]===void 0&&(s[r]={}),s[r][e.moduleName]=e;if(e.dependsOn)for(const r of e.dependsOn)Bp(r,t,n)}function Zce(e){delete Hd[e]}function b_(e,t,n){const o=s=>{var r,i,a;return!!((r=Wy[s])!=null&&r[e])||!!((a=(i=Hd[t])==null?void 0:i[s])!=null&&a[e])};return o(n)||o("all")}function S_(){return VB}function Jce(e,t){const n=Hd[e]??{};return[...Object.values(Wy.all??{}),...Object.values(n.all??{}),...Object.values(Wy[t]??{}),...Object.values(n[t]??{})]}function Qce(){return new Set(NB)}function ede(){return LB}function BB(){return qce}var tde=class{static register(e){Bp(e,void 0)}static registerModules(e){for(const t of e)Bp(t,void 0)}},ct="34.3.1",$B=2e3,HB=100,GB="_version_",jy=null,Gd=`${MB}/javascript-data-grid`;function nde(e){jy=e}function ode(e){Gd=e}function UB(e,t,n){return(jy==null?void 0:jy(e,t))??[ade(e,t,n)]}function E_(e,t,n,o,s){e(`${o?"warning":"error"} #${t}`,...UB(t,n,s))}function sde(e){if(!e)return String(e);const t={};for(const n of Object.keys(e))typeof e[n]!="object"&&typeof e[n]!="function"&&(t[n]=e[n]);return JSON.stringify(t)}function rde(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=sde(e)),t}function Ky(e){return e===void 0?"undefined":e===null?"null":e}function __(e,t){return`${e}?${t.toString()}`}function ide(e,t,n){const o=Array.from(t.entries()).sort((r,i)=>i[1].length-r[1].length);let s=__(e,t);for(const[r,i]of o){if(r===GB)continue;const a=s.length-n;if(a<=0)break;const l="...",u=a+l.length,c=i.length-u>HB?i.slice(0,i.length-u)+l:i.slice(0,HB)+l;t.set(r,c),s=__(e,t)}return s}function WB(e,t){const n=new URLSearchParams;if(n.append(GB,ct),t)for(const r of Object.keys(t))n.append(r,rde(t[r]));const o=`${Gd}/errors/${e}`,s=__(o,n);return s.length<=$B?s:ide(o,n,$B)}var ade=(e,t,n)=>{const o=WB(e,t),s=`${n?n+`
193
+ */const kle="9.14.5";function Fle(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Ra().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Ra().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Ra().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Ra().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Ra().__INTLIFY_PROD_DEVTOOLS__=!1)}const AV=ms.__EXTEND_POINT__,Da=Ry(AV),jn={FALLBACK_TO_ROOT:AV,NOT_SUPPORTED_PRESERVE:Da(),NOT_SUPPORTED_FORMATTER:Da(),NOT_SUPPORTED_PRESERVE_DIRECTIVE:Da(),NOT_SUPPORTED_GET_CHOICE_INDEX:Da(),COMPONENT_NAME_LEGACY_COMPATIBLE:Da(),NOT_FOUND_PARENT_SCOPE:Da(),IGNORE_OBJ_FLATTEN:Da(),NOTICE_DROP_ALLOW_COMPOSITION:Da(),NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG:Da()},Ole={[jn.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[jn.NOT_SUPPORTED_PRESERVE]:"Not supported 'preserve'.",[jn.NOT_SUPPORTED_FORMATTER]:"Not supported 'formatter'.",[jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE]:"Not supported 'preserveDirectiveContent'.",[jn.NOT_SUPPORTED_GET_CHOICE_INDEX]:"Not supported 'getChoiceIndex'.",[jn.COMPONENT_NAME_LEGACY_COMPATIBLE]:"Component name legacy compatible: '{name}' -> 'i18n'",[jn.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[jn.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[jn.NOTICE_DROP_ALLOW_COMPOSITION]:"'allowComposition' option will be dropped in the next major version. For more information, please see šŸ‘‰ https://tinyurl.com/2p97mcze",[jn.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG]:"'translateExistCompatible' option will be dropped in the next major version."};function Is(e,...t){return P0(Ole[e],...t)}const PV=Bo.__EXTEND_POINT__,xs=Ry(PV),fn={UNEXPECTED_RETURN_TYPE:PV,INVALID_ARGUMENT:xs(),MUST_BE_CALL_SETUP_TOP:xs(),NOT_INSTALLED:xs(),NOT_AVAILABLE_IN_LEGACY_MODE:xs(),REQUIRED_VALUE:xs(),INVALID_VALUE:xs(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:xs(),NOT_INSTALLED_WITH_PROVIDE:xs(),UNEXPECTED_ERROR:xs(),NOT_COMPATIBLE_LEGACY_VUE_I18N:xs(),BRIDGE_SUPPORT_VUE_2_ONLY:xs(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:xs(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:xs(),__EXTEND_POINT__:xs()};function ko(e,...t){return Pd(e,null,ee.env.NODE_ENV!=="production"?{messages:Mle,args:t}:void 0)}const Mle={[fn.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[fn.INVALID_ARGUMENT]:"Invalid argument",[fn.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[fn.NOT_INSTALLED]:"Need to install with `app.use` function",[fn.UNEXPECTED_ERROR]:"Unexpected error",[fn.NOT_AVAILABLE_IN_LEGACY_MODE]:"Not available in legacy mode",[fn.REQUIRED_VALUE]:"Required in value: {0}",[fn.INVALID_VALUE]:"Invalid value",[fn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[fn.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[fn.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[fn.BRIDGE_SUPPORT_VUE_2_ONLY]:"vue-i18n-bridge support Vue 2.x only",[fn.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]:"Must define ā€˜i18n’ option or custom block in Composition API with using local scope in Legacy API mode",[fn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},z0=Ii("__translateVNode"),j0=Ii("__datetimeParts"),K0=Ii("__numberParts"),Uu=Ii("__enableEmitter"),bp=Ii("__disableEmitter"),kV=Ii("__setPluralRules"),FV=Ii("__injectWithOption"),q0=Ii("__dispose");function Sp(e){if(!dn(e)||Tr(e))return e;for(const t in e)if(Zr(e,t))if(!t.includes("."))dn(e[t])&&Sp(e[t]);else{const n=t.split("."),o=n.length-1;let s=e,r=!1;for(let i=0;i<o;i++){if(n[i]==="__proto__")throw new Error(`unsafe key: ${n[i]}`);if(n[i]in s||(s[n[i]]=An()),!dn(s[n[i]])){ee.env.NODE_ENV!=="production"&&Co(Is(jn.IGNORE_OBJ_FLATTEN,{key:n[i]})),r=!0;break}s=s[n[i]]}if(r||(Tr(s)?KL.includes(n[o])||delete e[t]:(s[n[o]]=e[t],delete e[t])),!Tr(s)){const i=s[n[o]];dn(i)&&Sp(i)}}return e}function Oy(e,t){const{messages:n,__i18n:o,messageResolver:s,flatJson:r}=t,i=zt(n)?n:Mn(o)?An():{[e]:An()};if(Mn(o)&&o.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:l,resource:u}=a;l?(i[l]=i[l]||An(),Dy(u,i[l])):Dy(u,i)}else Ct(a)&&Dy(JSON.parse(a),i)}),s==null&&r)for(const a in i)Zr(i,a)&&Sp(i[a]);return i}function OV(e){return e.type}function MV(e,t,n){let o=dn(t.messages)?t.messages:An();"__i18nGlobal"in n&&(o=Oy(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const s=Object.keys(o);s.length&&s.forEach(r=>{e.mergeLocaleMessage(r,o[r])});{if(dn(t.datetimeFormats)){const r=Object.keys(t.datetimeFormats);r.length&&r.forEach(i=>{e.mergeDateTimeFormat(i,t.datetimeFormats[i])})}if(dn(t.numberFormats)){const r=Object.keys(t.numberFormats);r.length&&r.forEach(i=>{e.mergeNumberFormat(i,t.numberFormats[i])})}}}function NV(e){return ye(Ka,null,e,0)}const LV="__INTLIFY_META__",VV=()=>[],Nle=()=>!1;let BV=0;function $V(e){return(t,n,o,s)=>e(n,o,oo()||void 0,s)}const Lle=()=>{const e=oo();let t=null;return e&&(t=OV(e)[LV])?{[LV]:t}:null};function Y0(e={},t){const{__root:n,__injectWithOption:o}=e,s=n===void 0,r=e.flatJson,i=Xr?$:xh,a=!!e.translateExistCompatible;ee.env.NODE_ENV!=="production"&&a&&RL(Is(jn.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG));let l=on(e.inheritLocale)?e.inheritLocale:!0;const u=i(n&&l?n.locale.value:Ct(e.locale)?e.locale:Od),c=i(n&&l?n.fallbackLocale.value:Ct(e.fallbackLocale)||Mn(e.fallbackLocale)||zt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:u.value),d=i(Oy(u.value,e)),h=i(zt(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),f=i(zt(e.numberFormats)?e.numberFormats:{[u.value]:{}});let p=n?n.missingWarn:on(e.missingWarn)||El(e.missingWarn)?e.missingWarn:!0,g=n?n.fallbackWarn:on(e.fallbackWarn)||El(e.fallbackWarn)?e.fallbackWarn:!0,v=n?n.fallbackRoot:on(e.fallbackRoot)?e.fallbackRoot:!0,w=!!e.fallbackFormat,S=Pn(e.missing)?e.missing:null,b=Pn(e.missing)?$V(e.missing):null,y=Pn(e.postTranslation)?e.postTranslation:null,E=n?n.warnHtmlMessage:on(e.warnHtmlMessage)?e.warnHtmlMessage:!0,_=!!e.escapeParameter;const I=n?n.modifiers:zt(e.modifiers)?e.modifiers:{};let T=e.pluralRules||n&&n.pluralRules,F;F=(()=>{s&&lV(null);const ve={version:kle,locale:u.value,fallbackLocale:c.value,messages:d.value,modifiers:I,pluralRules:T,missing:b===null?void 0:b,missingWarn:p,fallbackWarn:g,fallbackFormat:w,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:E,escapeParameter:_,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};ve.datetimeFormats=h.value,ve.numberFormats=f.value,ve.__datetimeFormatters=zt(F)?F.__datetimeFormatters:void 0,ve.__numberFormatters=zt(F)?F.__numberFormatters:void 0,ee.env.NODE_ENV!=="production"&&(ve.__v_emitter=zt(F)?F.__v_emitter:void 0);const Be=fle(ve);return s&&lV(Be),Be})(),Cp(F,u.value,c.value);function x(){return[u.value,c.value,d.value,h.value,f.value]}const P=X({get:()=>u.value,set:ve=>{u.value=ve,F.locale=u.value}}),k=X({get:()=>c.value,set:ve=>{c.value=ve,F.fallbackLocale=c.value,Cp(F,u.value,ve)}}),M=X(()=>d.value),N=X(()=>h.value),B=X(()=>f.value);function z(){return Pn(y)?y:null}function oe(ve){y=ve,F.postTranslation=ve}function ie(){return S}function te(ve){ve!==null&&(b=$V(ve)),S=ve,F.missing=b}function se(ve,Be){return ve!=="translate"||!Be.resolvedMessage}const Z=(ve,Be,wt,Dt,tn,en)=>{x();let bn;try{ee.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,s||(F.fallbackContext=n?hle():void 0),bn=ve(F)}finally{ee.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,s||(F.fallbackContext=void 0)}if(wt!=="translate exists"&&ro(bn)&&bn===Py||wt==="translate exists"&&!bn){const[Le,Ge]=Be();if(ee.env.NODE_ENV!=="production"&&n&&Ct(Le)&&se(wt,Ge)&&(v&&(Fy(g,Le)||cV(p,Le))&&Co(Is(jn.FALLBACK_TO_ROOT,{key:Le,type:wt})),ee.env.NODE_ENV!=="production")){const{__v_emitter:Rt}=F;Rt&&v&&Rt.emit("fallback",{type:wt,key:Le,to:"global",groupId:`${wt}:${Le}`})}return n&&v?Dt(n):tn(Le)}else{if(en(bn))return bn;throw ko(fn.UNEXPECTED_RETURN_TYPE)}};function A(...ve){return Z(Be=>Reflect.apply(yV,null,[Be,...ve]),()=>H0(...ve),"translate",Be=>Reflect.apply(Be.t,Be,[...ve]),Be=>Be,Be=>Ct(Be))}function j(...ve){const[Be,wt,Dt]=ve;if(Dt&&!dn(Dt))throw ko(fn.INVALID_ARGUMENT);return A(Be,wt,Ko({resolvedMessage:!0},Dt||{}))}function ne(...ve){return Z(Be=>Reflect.apply(EV,null,[Be,...ve]),()=>G0(...ve),"datetime format",Be=>Reflect.apply(Be.d,Be,[...ve]),()=>ky,Be=>Ct(Be))}function ge(...ve){return Z(Be=>Reflect.apply(TV,null,[Be,...ve]),()=>U0(...ve),"number format",Be=>Reflect.apply(Be.n,Be,[...ve]),()=>ky,Be=>Ct(Be))}function xe(ve){return ve.map(Be=>Ct(Be)||ro(Be)||on(Be)?NV(String(Be)):Be)}const K={normalize:xe,interpolate:ve=>ve,type:"vnode"};function Y(...ve){return Z(Be=>{let wt;const Dt=Be;try{Dt.processor=K,wt=Reflect.apply(yV,null,[Dt,...ve])}finally{Dt.processor=null}return wt},()=>H0(...ve),"translate",Be=>Be[z0](...ve),Be=>[NV(Be)],Be=>Mn(Be))}function re(...ve){return Z(Be=>Reflect.apply(TV,null,[Be,...ve]),()=>U0(...ve),"number format",Be=>Be[K0](...ve),VV,Be=>Ct(Be)||Mn(Be))}function R(...ve){return Z(Be=>Reflect.apply(EV,null,[Be,...ve]),()=>G0(...ve),"datetime format",Be=>Be[j0](...ve),VV,Be=>Ct(Be)||Mn(Be))}function G(ve){T=ve,F.pluralRules=T}function J(ve,Be){return Z(()=>{if(!ve)return!1;const wt=Ct(Be)?Be:u.value,Dt=Ce(wt),tn=F.messageResolver(Dt,ve);return a?tn!=null:Tr(tn)||Dr(tn)||Ct(tn)},()=>[ve],"translate exists",wt=>Reflect.apply(wt.te,wt,[ve,Be]),Nle,wt=>on(wt))}function ce(ve){let Be=null;const wt=QL(F,c.value,u.value);for(let Dt=0;Dt<wt.length;Dt++){const tn=d.value[wt[Dt]]||{},en=F.messageResolver(tn,ve);if(en!=null){Be=en;break}}return Be}function Ee(ve){const Be=ce(ve);return Be??(n?n.tm(ve)||{}:{})}function Ce(ve){return d.value[ve]||{}}function Ne(ve,Be){if(r){const wt={[ve]:Be};for(const Dt in wt)Zr(wt,Dt)&&Sp(wt[Dt]);Be=wt[ve]}d.value[ve]=Be,F.messages=d.value}function pe(ve,Be){d.value[ve]=d.value[ve]||{};const wt={[ve]:Be};if(r)for(const Dt in wt)Zr(wt,Dt)&&Sp(wt[Dt]);Be=wt[ve],Dy(Be,d.value[ve]),F.messages=d.value}function H(ve){return h.value[ve]||{}}function W(ve,Be){h.value[ve]=Be,F.datetimeFormats=h.value,RV(F,ve,Be)}function be(ve,Be){h.value[ve]=Ko(h.value[ve]||{},Be),F.datetimeFormats=h.value,RV(F,ve,Be)}function Ae(ve){return f.value[ve]||{}}function He(ve,Be){f.value[ve]=Be,F.numberFormats=f.value,IV(F,ve,Be)}function Te(ve,Be){f.value[ve]=Ko(f.value[ve]||{},Be),F.numberFormats=f.value,IV(F,ve,Be)}BV++,n&&Xr&&(Qe(n.locale,ve=>{l&&(u.value=ve,F.locale=ve,Cp(F,u.value,c.value))}),Qe(n.fallbackLocale,ve=>{l&&(c.value=ve,F.fallbackLocale=ve,Cp(F,u.value,c.value))}));const Xe={id:BV,locale:P,fallbackLocale:k,get inheritLocale(){return l},set inheritLocale(ve){l=ve,ve&&n&&(u.value=n.locale.value,c.value=n.fallbackLocale.value,Cp(F,u.value,c.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:M,get modifiers(){return I},get pluralRules(){return T||{}},get isGlobal(){return s},get missingWarn(){return p},set missingWarn(ve){p=ve,F.missingWarn=p},get fallbackWarn(){return g},set fallbackWarn(ve){g=ve,F.fallbackWarn=g},get fallbackRoot(){return v},set fallbackRoot(ve){v=ve},get fallbackFormat(){return w},set fallbackFormat(ve){w=ve,F.fallbackFormat=w},get warnHtmlMessage(){return E},set warnHtmlMessage(ve){E=ve,F.warnHtmlMessage=ve},get escapeParameter(){return _},set escapeParameter(ve){_=ve,F.escapeParameter=ve},t:A,getLocaleMessage:Ce,setLocaleMessage:Ne,mergeLocaleMessage:pe,getPostTranslationHandler:z,setPostTranslationHandler:oe,getMissingHandler:ie,setMissingHandler:te,[kV]:G};return Xe.datetimeFormats=N,Xe.numberFormats=B,Xe.rt=j,Xe.te=J,Xe.tm=Ee,Xe.d=ne,Xe.n=ge,Xe.getDateTimeFormat=H,Xe.setDateTimeFormat=W,Xe.mergeDateTimeFormat=be,Xe.getNumberFormat=Ae,Xe.setNumberFormat=He,Xe.mergeNumberFormat=Te,Xe[FV]=o,Xe[z0]=Y,Xe[j0]=R,Xe[K0]=re,ee.env.NODE_ENV!=="production"&&(Xe[Uu]=ve=>{F.__v_emitter=ve},Xe[bp]=()=>{F.__v_emitter=void 0}),Xe}function Vle(e){const t=Ct(e.locale)?e.locale:Od,n=Ct(e.fallbackLocale)||Mn(e.fallbackLocale)||zt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=Pn(e.missing)?e.missing:void 0,s=on(e.silentTranslationWarn)||El(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,r=on(e.silentFallbackWarn)||El(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,i=on(e.fallbackRoot)?e.fallbackRoot:!0,a=!!e.formatFallbackMessages,l=zt(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=Pn(e.postTranslation)?e.postTranslation:void 0,d=Ct(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,h=!!e.escapeParameterHtml,f=on(e.sync)?e.sync:!0;ee.env.NODE_ENV!=="production"&&e.formatter&&Co(Is(jn.NOT_SUPPORTED_FORMATTER)),ee.env.NODE_ENV!=="production"&&e.preserveDirectiveContent&&Co(Is(jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE));let p=e.messages;if(zt(e.sharedMessages)){const _=e.sharedMessages;p=Object.keys(_).reduce((T,F)=>{const L=T[F]||(T[F]={});return Ko(L,_[F]),T},p||{})}const{__i18n:g,__root:v,__injectWithOption:w}=e,S=e.datetimeFormats,b=e.numberFormats,y=e.flatJson,E=e.translateExistCompatible;return{locale:t,fallbackLocale:n,messages:p,flatJson:y,datetimeFormats:S,numberFormats:b,missing:o,missingWarn:s,fallbackWarn:r,fallbackRoot:i,fallbackFormat:a,modifiers:l,pluralRules:u,postTranslation:c,warnHtmlMessage:d,escapeParameter:h,messageResolver:e.messageResolver,inheritLocale:f,translateExistCompatible:E,__i18n:g,__root:v,__injectWithOption:w}}function X0(e={},t){{const n=Y0(Vle(e)),{__extender:o}=e,s={id:n.id,get locale(){return n.locale.value},set locale(r){n.locale.value=r},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(r){n.fallbackLocale.value=r},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_FORMATTER)),{interpolate(){return[]}}},set formatter(r){ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_FORMATTER))},get missing(){return n.getMissingHandler()},set missing(r){n.setMissingHandler(r)},get silentTranslationWarn(){return on(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(r){n.missingWarn=on(r)?!r:r},get silentFallbackWarn(){return on(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(r){n.fallbackWarn=on(r)?!r:r},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(r){n.fallbackFormat=r},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(r){n.setPostTranslationHandler(r)},get sync(){return n.inheritLocale},set sync(r){n.inheritLocale=r},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(r){n.warnHtmlMessage=r!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(r){n.escapeParameter=r},get preserveDirectiveContent(){return ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE)),!0},set preserveDirectiveContent(r){ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE))},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...r){const[i,a,l]=r,u={};let c=null,d=null;if(!Ct(i))throw ko(fn.INVALID_ARGUMENT);const h=i;return Ct(a)?u.locale=a:Mn(a)?c=a:zt(a)&&(d=a),Mn(l)?c=l:zt(l)&&(d=l),Reflect.apply(n.t,n,[h,c||d||{},u])},rt(...r){return Reflect.apply(n.rt,n,[...r])},tc(...r){const[i,a,l]=r,u={plural:1};let c=null,d=null;if(!Ct(i))throw ko(fn.INVALID_ARGUMENT);const h=i;return Ct(a)?u.locale=a:ro(a)?u.plural=a:Mn(a)?c=a:zt(a)&&(d=a),Ct(l)?u.locale=l:Mn(l)?c=l:zt(l)&&(d=l),Reflect.apply(n.t,n,[h,c||d||{},u])},te(r,i){return n.te(r,i)},tm(r){return n.tm(r)},getLocaleMessage(r){return n.getLocaleMessage(r)},setLocaleMessage(r,i){n.setLocaleMessage(r,i)},mergeLocaleMessage(r,i){n.mergeLocaleMessage(r,i)},d(...r){return Reflect.apply(n.d,n,[...r])},getDateTimeFormat(r){return n.getDateTimeFormat(r)},setDateTimeFormat(r,i){n.setDateTimeFormat(r,i)},mergeDateTimeFormat(r,i){n.mergeDateTimeFormat(r,i)},n(...r){return Reflect.apply(n.n,n,[...r])},getNumberFormat(r){return n.getNumberFormat(r)},setNumberFormat(r,i){n.setNumberFormat(r,i)},mergeNumberFormat(r,i){n.mergeNumberFormat(r,i)},getChoiceIndex(r,i){return ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_GET_CHOICE_INDEX)),-1}};return s.__extender=o,ee.env.NODE_ENV!=="production"&&(s.__enableEmitter=r=>{const i=n;i[Uu]&&i[Uu](r)},s.__disableEmitter=()=>{const r=n;r[bp]&&r[bp]()}),s}}const Z0={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function Ble({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,s)=>[...o,...s.type===Pt?s.children:[s]],[]):t.reduce((n,o)=>{const s=e[o];return s&&(n[o]=s()),n},An())}function HV(e){return Pt}const J0=ot({name:"i18n-t",props:Ko({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>ro(e)||!isNaN(e)}},Z0),setup(e,t){const{slots:n,attrs:o}=t,s=e.i18n||n_({useScope:e.scope,__useComponent:!0});return()=>{const r=Object.keys(n).filter(d=>d!=="_"),i=An();e.locale&&(i.locale=e.locale),e.plural!==void 0&&(i.plural=Ct(e.plural)?+e.plural:e.plural);const a=Ble(t,r),l=s[z0](e.keypath,a,i),u=Ko(An(),o),c=Ct(e.tag)||dn(e.tag)?e.tag:HV();return Tc(c,u,l)}}});function $le(e){return Mn(e)&&!Ct(e[0])}function GV(e,t,n,o){const{slots:s,attrs:r}=t;return()=>{const i={part:!0};let a=An();e.locale&&(i.locale=e.locale),Ct(e.format)?i.key=e.format:dn(e.format)&&(Ct(e.format.key)&&(i.key=e.format.key),a=Object.keys(e.format).reduce((h,f)=>n.includes(f)?Ko(An(),h,{[f]:e.format[f]}):h,An()));const l=o(e.value,i,a);let u=[i.key];Mn(l)?u=l.map((h,f)=>{const p=s[h.type],g=p?p({[h.type]:h.value,index:f,parts:l}):[h.value];return $le(g)&&(g[0].key=`${h.type}-${f}`),g}):Ct(l)&&(u=[l]);const c=Ko(An(),r),d=Ct(e.tag)||dn(e.tag)?e.tag:HV();return Tc(d,c,u)}}const UV=ot({name:"i18n-n",props:Ko({value:{type:Number,required:!0},format:{type:[String,Object]}},Z0),setup(e,t){const n=e.i18n||n_({useScope:e.scope,__useComponent:!0});return GV(e,t,DV,(...o)=>n[K0](...o))}}),WV=ot({name:"i18n-d",props:Ko({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Z0),setup(e,t){const n=e.i18n||n_({useScope:e.scope,__useComponent:!0});return GV(e,t,_V,(...o)=>n[j0](...o))}});function Hle(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function Gle(e){const t=i=>{const{instance:a,modifiers:l,value:u}=i;if(!a||!a.$)throw ko(fn.UNEXPECTED_ERROR);const c=Hle(e,a.$);ee.env.NODE_ENV!=="production"&&l.preserve&&Co(Is(jn.NOT_SUPPORTED_PRESERVE));const d=zV(u);return[Reflect.apply(c.t,c,[...jV(d)]),c]};return{created:(i,a)=>{const[l,u]=t(a);Xr&&e.global===u&&(i.__i18nWatcher=Qe(u.locale,()=>{a.instance&&a.instance.$forceUpdate()})),i.__composer=u,i.textContent=l},unmounted:i=>{Xr&&i.__i18nWatcher&&(i.__i18nWatcher(),i.__i18nWatcher=void 0,delete i.__i18nWatcher),i.__composer&&(i.__composer=void 0,delete i.__composer)},beforeUpdate:(i,{value:a})=>{if(i.__composer){const l=i.__composer,u=zV(a);i.textContent=Reflect.apply(l.t,l,[...jV(u)])}},getSSRProps:i=>{const[a]=t(i);return{textContent:a}}}}function zV(e){if(Ct(e))return{path:e};if(zt(e)){if(!("path"in e))throw ko(fn.REQUIRED_VALUE,"path");return e}else throw ko(fn.INVALID_VALUE)}function jV(e){const{path:t,locale:n,args:o,choice:s,plural:r}=e,i={},a=o||{};return Ct(n)&&(i.locale=n),ro(s)&&(i.plural=s),ro(r)&&(i.plural=r),[t,a,i]}function Ule(e,t,...n){const o=zt(n[0])?n[0]:{},s=!!o.useI18nComponentName,r=on(o.globalInstall)?o.globalInstall:!0;ee.env.NODE_ENV!=="production"&&r&&s&&Co(Is(jn.COMPONENT_NAME_LEGACY_COMPATIBLE,{name:J0.name})),r&&([s?"i18n":J0.name,"I18nT"].forEach(i=>e.component(i,J0)),[UV.name,"I18nN"].forEach(i=>e.component(i,UV)),[WV.name,"I18nD"].forEach(i=>e.component(i,WV))),e.directive("t",Gle(t))}const Q0={"vue-devtools-plugin-vue-i18n":"Vue I18n devtools","vue-i18n-resource-inspector":"I18n Resources","vue-i18n-timeline":"Vue I18n"},Wle={"vue-i18n-resource-inspector":"Search for scopes ..."},zle={"vue-i18n-timeline":16764185},KV="vue-i18n: composer properties";let e_;async function jle(e,t){return new Promise((n,o)=>{try{Ple({id:"vue-devtools-plugin-vue-i18n",label:Q0["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[KV],app:e},s=>{e_=s,s.on.visitComponentTree(({componentInstance:i,treeNode:a})=>{Kle(i,a,t)}),s.on.inspectComponent(({componentInstance:i,instanceData:a})=>{i.vnode.el&&i.vnode.el.__VUE_I18N__&&a&&(t.mode==="legacy"?i.vnode.el.__VUE_I18N__!==t.global.__composer&&YV(a,i.vnode.el.__VUE_I18N__):YV(a,i.vnode.el.__VUE_I18N__))}),s.addInspector({id:"vue-i18n-resource-inspector",label:Q0["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:Wle["vue-i18n-resource-inspector"]}),s.on.getInspectorTree(i=>{i.app===e&&i.inspectorId==="vue-i18n-resource-inspector"&&Jle(i,t)});const r=new Map;s.on.getInspectorState(async i=>{if(i.app===e&&i.inspectorId==="vue-i18n-resource-inspector")if(s.unhighlightElement(),eue(i,t),i.nodeId==="global"){if(!r.has(i.app)){const[a]=await s.getComponentInstances(i.app);r.set(i.app,a)}s.highlightElement(r.get(i.app))}else{const a=Qle(i.nodeId,t);a&&s.highlightElement(a)}}),s.on.editInspectorState(i=>{i.app===e&&i.inspectorId==="vue-i18n-resource-inspector"&&nue(i,t)}),s.addTimelineLayer({id:"vue-i18n-timeline",label:Q0["vue-i18n-timeline"],color:zle["vue-i18n-timeline"]}),n(!0)})}catch(s){console.error(s),o(!1)}})}function qV(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function Kle(e,t,n){const o=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&e.vnode.el.__VUE_I18N__!==o){const s={label:`i18n (${qV(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(s)}}function YV(e,t){const n=KV;e.state.push({type:n,key:"locale",editable:!0,value:t.locale.value}),e.state.push({type:n,key:"availableLocales",editable:!1,value:t.availableLocales}),e.state.push({type:n,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value}),e.state.push({type:n,key:"inheritLocale",editable:!0,value:t.inheritLocale}),e.state.push({type:n,key:"messages",editable:!1,value:t_(t.messages.value)}),e.state.push({type:n,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}),e.state.push({type:n,key:"numberFormats",editable:!1,value:t.numberFormats.value})}function t_(e){const t={};return Object.keys(e).forEach(n=>{const o=e[n];Pn(o)&&"source"in o?t[n]=Zle(o):Tr(o)&&o.loc&&o.loc.source?t[n]=o.loc.source:dn(o)?t[n]=t_(o):t[n]=o}),t}const qle={"<":"&lt;",">":"&gt;",'"':"&quot;","&":"&amp;"};function Yle(e){return e.replace(/[<>"&]/g,Xle)}function Xle(e){return qle[e]||e}function Zle(e){return{_custom:{type:"function",display:`<span>ʒ</span> ${e.source?`("${Yle(e.source)}")`:"(?)"}`}}}function Jle(e,t){e.rootNodes.push({id:"global",label:"Global Scope"});const n=t.mode==="composition"?t.global:t.global.__composer;for(const[o,s]of t.__instances){const r=t.mode==="composition"?s:s.__composer;n!==r&&e.rootNodes.push({id:r.id.toString(),label:`${qV(o)} Scope`})}}function Qle(e,t){let n=null;if(e!=="global"){for(const[o,s]of t.__instances.entries())if(s.id.toString()===e){n=o;break}}return n}function XV(e,t){if(e==="global")return t.mode==="composition"?t.global:t.global.__composer;{const n=Array.from(t.__instances.values()).find(o=>o.id.toString()===e);return n?t.mode==="composition"?n:n.__composer:null}}function eue(e,t){const n=XV(e.nodeId,t);return n&&(e.state=tue(n)),null}function tue(e){const t={},n="Locale related info",o=[{type:n,key:"locale",editable:!0,value:e.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:e.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}];t[n]=o;const s="Locale messages info",r=[{type:s,key:"messages",editable:!1,value:t_(e.messages.value)}];t[s]=r;{const i="Datetime formats info",a=[{type:i,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];t[i]=a;const l="Datetime formats info",u=[{type:l,key:"numberFormats",editable:!1,value:e.numberFormats.value}];t[l]=u}return t}function Ep(e,t){if(e_){let n;t&&"groupId"in t&&(n=t.groupId,delete t.groupId),e_.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:e,groupId:n,time:Date.now(),meta:{},data:t||{},logType:e==="compile-error"?"error":e==="fallback"||e==="missing"?"warning":"default"}})}}function nue(e,t){const n=XV(e.nodeId,t);if(n){const[o]=e.path;o==="locale"&&Ct(e.state.value)?n.locale.value=e.state.value:o==="fallbackLocale"&&(Ct(e.state.value)||Mn(e.state.value)||dn(e.state.value))?n.fallbackLocale.value=e.state.value:o==="inheritLocale"&&on(e.state.value)&&(n.inheritLocale=e.state.value)}}function oue(e,t,n){return{beforeCreate(){const o=oo();if(!o)throw ko(fn.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const r=s.i18n;if(s.__i18n&&(r.__i18n=s.__i18n),r.__root=t,this===this.$root)this.$i18n=ZV(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=X0(r);const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=ZV(e,s);else{this.$i18n=X0({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}else this.$i18n=e;s.__i18nGlobal&&MV(t,s,s),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...r),this.$tc=(...r)=>this.$i18n.tc(...r),this.$te=(r,i)=>this.$i18n.te(r,i),this.$d=(...r)=>this.$i18n.d(...r),this.$n=(...r)=>this.$i18n.n(...r),this.$tm=r=>this.$i18n.tm(r),n.__setInstance(o,this.$i18n)},mounted(){if(ee.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const o=this.$i18n;this.$el.__VUE_I18N__=o.__composer;const s=this.__v_emitter=k0();o.__enableEmitter&&o.__enableEmitter(s),s.on("*",Ep)}},unmounted(){const o=oo();if(!o)throw ko(fn.UNEXPECTED_ERROR);const s=this.$i18n;ee.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Ep),delete this.__v_emitter),this.$i18n&&(s.__disableEmitter&&s.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(o),delete this.$i18n}}}function ZV(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[kV](t.pluralizationRules||e.pluralizationRules);const n=Oy(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o])),t.numberFormats&&Object.keys(t.numberFormats).forEach(o=>e.mergeNumberFormat(o,t.numberFormats[o])),e}const sue=Ii("global-vue-i18n");function rue(e={},t){const n=__VUE_I18N_LEGACY_API__&&on(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,o=on(e.globalInjection)?e.globalInjection:!0,s=__VUE_I18N_LEGACY_API__&&n?!!e.allowComposition:!0,r=new Map,[i,a]=iue(e,n),l=Ii(ee.env.NODE_ENV!=="production"?"vue-i18n":"");ee.env.NODE_ENV!=="production"&&n&&s&&Co(Is(jn.NOTICE_DROP_ALLOW_COMPOSITION));function u(h){return r.get(h)||null}function c(h,f){r.set(h,f)}function d(h){r.delete(h)}{const h={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},get allowComposition(){return s},async install(f,...p){if(ee.env.NODE_ENV!=="production"&&(f.__VUE_I18N__=h),f.__VUE_I18N_SYMBOL__=l,f.provide(f.__VUE_I18N_SYMBOL__,h),zt(p[0])){const w=p[0];h.__composerExtend=w.__composerExtend,h.__vueI18nExtend=w.__vueI18nExtend}let g=null;!n&&o&&(g=gue(f,h.global)),__VUE_I18N_FULL_INSTALL__&&Ule(f,h,...p),__VUE_I18N_LEGACY_API__&&n&&f.mixin(oue(a,a.__composer,h));const v=f.unmount;if(f.unmount=()=>{g&&g(),h.dispose(),v()},ee.env.NODE_ENV!=="production"){if(!await jle(f,h))throw ko(fn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const S=k0();if(n){const b=a;b.__enableEmitter&&b.__enableEmitter(S)}else{const b=a;b[Uu]&&b[Uu](S)}S.on("*",Ep)}},get global(){return a},dispose(){i.stop()},__instances:r,__getInstance:u,__setInstance:c,__deleteInstance:d};return h}}function n_(e={}){const t=oo();if(t==null)throw ko(fn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw ko(fn.NOT_INSTALLED);const n=aue(t),o=uue(n),s=OV(t),r=lue(e,s);if(__VUE_I18N_LEGACY_API__&&n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw ko(fn.NOT_AVAILABLE_IN_LEGACY_MODE);return fue(t,r,o,e)}if(r==="global")return MV(o,e,s),o;if(r==="parent"){let l=cue(n,t,e.__useComponent);return l==null&&(ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_FOUND_PARENT_SCOPE)),l=o),l}const i=n;let a=i.__getInstance(t);if(a==null){const l=Ko({},e);"__i18n"in s&&(l.__i18n=s.__i18n),o&&(l.__root=o),a=Y0(l),i.__composerExtend&&(a[q0]=i.__composerExtend(a)),hue(i,t,a),i.__setInstance(t,a)}return a}function iue(e,t,n){const o=cC();{const s=__VUE_I18N_LEGACY_API__&&t?o.run(()=>X0(e)):o.run(()=>Y0(e));if(s==null)throw ko(fn.UNEXPECTED_ERROR);return[o,s]}}function aue(e){{const t=Dn(e.isCE?sue:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw ko(e.isCE?fn.NOT_INSTALLED_WITH_PROVIDE:fn.UNEXPECTED_ERROR);return t}}function lue(e,t){return _y(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function uue(e){return e.mode==="composition"?e.global:e.global.__composer}function cue(e,t,n=!1){let o=null;const s=t.root;let r=due(t,n);for(;r!=null;){const i=e;if(e.mode==="composition")o=i.__getInstance(r);else if(__VUE_I18N_LEGACY_API__){const a=i.__getInstance(r);a!=null&&(o=a.__composer,n&&o&&!o[FV]&&(o=null))}if(o!=null||s===r)break;r=r.parent}return o}function due(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function hue(e,t,n){let o=null;Xt(()=>{if(ee.env.NODE_ENV!=="production"&&t.vnode.el){t.vnode.el.__VUE_I18N__=n,o=k0();const s=n;s[Uu]&&s[Uu](o),o.on("*",Ep)}},t),nu(()=>{const s=n;ee.env.NODE_ENV!=="production"&&t.vnode.el&&t.vnode.el.__VUE_I18N__&&(o&&o.off("*",Ep),s[bp]&&s[bp](),delete t.vnode.el.__VUE_I18N__),e.__deleteInstance(t);const r=s[q0];r&&(r(),delete s[q0])},t)}function fue(e,t,n,o={}){const s=t==="local",r=xh(null);if(s&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw ko(fn.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const i=on(o.inheritLocale)?o.inheritLocale:!Ct(o.locale),a=$(!s||i?n.locale.value:Ct(o.locale)?o.locale:Od),l=$(!s||i?n.fallbackLocale.value:Ct(o.fallbackLocale)||Mn(o.fallbackLocale)||zt(o.fallbackLocale)||o.fallbackLocale===!1?o.fallbackLocale:a.value),u=$(Oy(a.value,o)),c=$(zt(o.datetimeFormats)?o.datetimeFormats:{[a.value]:{}}),d=$(zt(o.numberFormats)?o.numberFormats:{[a.value]:{}}),h=s?n.missingWarn:on(o.missingWarn)||El(o.missingWarn)?o.missingWarn:!0,f=s?n.fallbackWarn:on(o.fallbackWarn)||El(o.fallbackWarn)?o.fallbackWarn:!0,p=s?n.fallbackRoot:on(o.fallbackRoot)?o.fallbackRoot:!0,g=!!o.fallbackFormat,v=Pn(o.missing)?o.missing:null,w=Pn(o.postTranslation)?o.postTranslation:null,S=s?n.warnHtmlMessage:on(o.warnHtmlMessage)?o.warnHtmlMessage:!0,b=!!o.escapeParameter,y=s?n.modifiers:zt(o.modifiers)?o.modifiers:{},E=o.pluralRules||s&&n.pluralRules;function _(){return[a.value,l.value,u.value,c.value,d.value]}const I=X({get:()=>r.value?r.value.locale.value:a.value,set:J=>{r.value&&(r.value.locale.value=J),a.value=J}}),T=X({get:()=>r.value?r.value.fallbackLocale.value:l.value,set:J=>{r.value&&(r.value.fallbackLocale.value=J),l.value=J}}),F=X(()=>r.value?r.value.messages.value:u.value),L=X(()=>c.value),x=X(()=>d.value);function P(){return r.value?r.value.getPostTranslationHandler():w}function k(J){r.value&&r.value.setPostTranslationHandler(J)}function M(){return r.value?r.value.getMissingHandler():v}function N(J){r.value&&r.value.setMissingHandler(J)}function B(J){return _(),J()}function z(...J){return r.value?B(()=>Reflect.apply(r.value.t,null,[...J])):B(()=>"")}function oe(...J){return r.value?Reflect.apply(r.value.rt,null,[...J]):""}function ie(...J){return r.value?B(()=>Reflect.apply(r.value.d,null,[...J])):B(()=>"")}function te(...J){return r.value?B(()=>Reflect.apply(r.value.n,null,[...J])):B(()=>"")}function se(J){return r.value?r.value.tm(J):{}}function Z(J,ce){return r.value?r.value.te(J,ce):!1}function A(J){return r.value?r.value.getLocaleMessage(J):{}}function j(J,ce){r.value&&(r.value.setLocaleMessage(J,ce),u.value[J]=ce)}function ne(J,ce){r.value&&r.value.mergeLocaleMessage(J,ce)}function ge(J){return r.value?r.value.getDateTimeFormat(J):{}}function xe(J,ce){r.value&&(r.value.setDateTimeFormat(J,ce),c.value[J]=ce)}function ue(J,ce){r.value&&r.value.mergeDateTimeFormat(J,ce)}function K(J){return r.value?r.value.getNumberFormat(J):{}}function Y(J,ce){r.value&&(r.value.setNumberFormat(J,ce),d.value[J]=ce)}function re(J,ce){r.value&&r.value.mergeNumberFormat(J,ce)}const R={get id(){return r.value?r.value.id:-1},locale:I,fallbackLocale:T,messages:F,datetimeFormats:L,numberFormats:x,get inheritLocale(){return r.value?r.value.inheritLocale:i},set inheritLocale(J){r.value&&(r.value.inheritLocale=J)},get availableLocales(){return r.value?r.value.availableLocales:Object.keys(u.value)},get modifiers(){return r.value?r.value.modifiers:y},get pluralRules(){return r.value?r.value.pluralRules:E},get isGlobal(){return r.value?r.value.isGlobal:!1},get missingWarn(){return r.value?r.value.missingWarn:h},set missingWarn(J){r.value&&(r.value.missingWarn=J)},get fallbackWarn(){return r.value?r.value.fallbackWarn:f},set fallbackWarn(J){r.value&&(r.value.missingWarn=J)},get fallbackRoot(){return r.value?r.value.fallbackRoot:p},set fallbackRoot(J){r.value&&(r.value.fallbackRoot=J)},get fallbackFormat(){return r.value?r.value.fallbackFormat:g},set fallbackFormat(J){r.value&&(r.value.fallbackFormat=J)},get warnHtmlMessage(){return r.value?r.value.warnHtmlMessage:S},set warnHtmlMessage(J){r.value&&(r.value.warnHtmlMessage=J)},get escapeParameter(){return r.value?r.value.escapeParameter:b},set escapeParameter(J){r.value&&(r.value.escapeParameter=J)},t:z,getPostTranslationHandler:P,setPostTranslationHandler:k,getMissingHandler:M,setMissingHandler:N,rt:oe,d:ie,n:te,tm:se,te:Z,getLocaleMessage:A,setLocaleMessage:j,mergeLocaleMessage:ne,getDateTimeFormat:ge,setDateTimeFormat:xe,mergeDateTimeFormat:ue,getNumberFormat:K,setNumberFormat:Y,mergeNumberFormat:re};function G(J){J.locale.value=a.value,J.fallbackLocale.value=l.value,Object.keys(u.value).forEach(ce=>{J.mergeLocaleMessage(ce,u.value[ce])}),Object.keys(c.value).forEach(ce=>{J.mergeDateTimeFormat(ce,c.value[ce])}),Object.keys(d.value).forEach(ce=>{J.mergeNumberFormat(ce,d.value[ce])}),J.escapeParameter=b,J.fallbackFormat=g,J.fallbackRoot=p,J.fallbackWarn=f,J.missingWarn=h,J.warnHtmlMessage=S}return Bh(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw ko(fn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const J=r.value=e.proxy.$i18n.__composer;t==="global"?(a.value=J.locale.value,l.value=J.fallbackLocale.value,u.value=J.messages.value,c.value=J.datetimeFormats.value,d.value=J.numberFormats.value):s&&G(J)}),R}const pue=["locale","fallbackLocale","availableLocales"],JV=["t","rt","d","n","tm","te"];function gue(e,t){const n=Object.create(null);return pue.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r)throw ko(fn.UNEXPECTED_ERROR);const i=mn(r.value)?{get(){return r.value.value},set(a){r.value.value=a}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,s,i)}),e.config.globalProperties.$i18n=n,JV.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r||!r.value)throw ko(fn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,r)}),()=>{delete e.config.globalProperties.$i18n,JV.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}if(Fle(),__INTLIFY_JIT_COMPILATION__?oV(yle):oV(vle),lle(Gae),ule(QL),ee.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=Ra();e.__INTLIFY__=!0,Zae(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}ee.env.NODE_ENV;const QV={en:{}};function mue(e){const t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):null}async function vue(e,t=10,n=300){for(let o=0;o<t;o++){const s=mue(e);if(s)return s;await new Promise(r=>setTimeout(r,n))}return null}async function yue(){const e=await vue("account.tessr_i18n_file_version_url");if(!e)return{};const t=await fetch(e);if(!t.ok)throw new Error("Failed to load en-error.json");return await t.json()}async function wue(){const e=await yue();return{...QV,en:{...QV.en,errorMessages:e}}}async function Cue(){return rue({legacy:!1,locale:"en",fallbackLocale:"en",messages:await wue(),formatFallbackMessages:!0})}const bue=async()=>{const e=await Cue();return oQ(e.global),e},eB=32,Sue=Math.round(eB*16/9),Eue="arbo-thumbnails",_p="thumbnails";let Rp=null;const o_=new Map,s_=new Map;function tB(){return Rp||(Rp=new Promise((e,t)=>{const n=indexedDB.open(Eue,1);n.onupgradeneeded=()=>n.result.createObjectStore(_p),n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)}),Rp.catch(()=>Rp=null)),Rp}async function _ue(e,t){try{const n=await tB();return await new Promise((o,s)=>{const r=n.transaction(_p,"readonly").objectStore(_p).get(e);r.onsuccess=()=>{const i=r.result;o((i==null?void 0:i.url)===t&&i.blob instanceof Blob?i.blob:null)},r.onerror=()=>s(r.error)})}catch{return null}}async function Rue(e,t,n){try{const o=await tB();if(s_.get(e)!==t)return;await new Promise((s,r)=>{const i=o.transaction(_p,"readwrite");i.objectStore(_p).put({url:t,blob:n},e),i.oncomplete=()=>s(),i.onerror=()=>r(i.error)})}catch{}}function Tue(e){return new Promise(t=>{new xP(e,{width:Sue,height:eB,resize:"cover",quality:.8,success:t,error:()=>t(e)})})}function Due(e,t){s_.set(e,t);let n=o_.get(e);n||(n=new Map,o_.set(e,n));const o=n.get(t);if(o)return o;const s=(async()=>{const r=await _ue(e,t);if(r)return r;const i=await fetch(t);if(!i.ok)throw new Error(`Thumbnail request failed: ${i.status}`);const a=await Tue(await i.blob());return await Rue(e,t,a),a})().finally(()=>{n.delete(t),n.size===0&&(o_.delete(e),s_.delete(e))});return n.set(t,s),s}const Iue="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAPoAgMAAAAwzTx3AAAACVBMVEXz9fjX19fo6etc+oS8AAAINUlEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGD24EAAAAAAAMj/tRFUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVXYOWPjuGEgii45w4DKWQIDu4orAcEtB3Z0iWdUBpuAY4W2qnRACTgLiwVS/MUbJ7YV6AnEx1+Sp8FgMBgMBoPBYNDGy3sB+kD+3zfqnu9c4E4XM8v8oc554RKOLiYu0Pu6By7xoIuFCxzUNSsXOeliV344PRO4SP1L7tQxM9e9uMxJ/bJwEZ9STknCfglc5PGUBoBBN3OZW0w5yCt+bbDamBkw4/eGa5k1PPVKYG6osYibPWrpNRZxsyctvcaqYdgnK7fVWMCTfeeWGguZc1tzjYWr8aGpxiJG/MxNNVaHuqSxxiKebhOXeYoDxNNtba2xeC1eHdbTnkA82HdNKF0YiAf7Xt/BC6j6xhc/fv3++ufrsH5kXxO67jRbvZWEcpiFntVDPaOV0/tbz3UuVEvJpHS2uWf1ehVdtQ3ds3qofu+7FuOh4xJfP502rbds0OpqUd+R1ecY8ObUpzjMmFNf+OIOqu7qAe9A1X1DjbWnHlPOnHqqsaDqjkrMdlc9NRp76pvdmIvTC6i6oyIreKVpKLJsT53sji+pzmGqO2oo8ZjqnhpGN3vqcWC3p56qLKS6o8RfPk65ykKq+/8fqBzyLVlw9evyfhWrLLj65XJIVfaAVHdf/s4PqcpCqnttWEk5B62+8wdilYVWD3GFpSqLqO6yl6WcVGUR1X32stRdqrLI6jtHxCoLrL5x5BRy7gao7qJj5CZVWUB1H69sNec8rvrECS9VWRvqUsQzoLp7Wl21yuKp+/xF4EOssrDqOz8hjuz21GOVxVN3wodcTinn8NS9pC5WWVT1wE/cxJyzpx6rLJy6E9WlKgunLq+6VGXtqcecs6eeqiyaurjX5Rep0NSlVT9JrLKg6lu+6tmzCQvqp/wiFZq6q6pT/GcwdWVyy6osvvpR+swXpvqiqMeRHUxduTeXVVkwdeVmdD6yQ6pnjyDEKgupTpx4UCnnsNSVZ255lcVSVx4y5zmHqb5kZ5tQZTHVpyzgpYiHUo/RlVLO2qrTli1tPraCqi9pqxtLeJozv/wWFZa6E35PjbE297mjf1I54DHHl7jsb0Rka3L7XN1X5YNPHkzdUWJ+v9bc1l2ahJJy5tRn8DuyESXlQO/D/yPnjG0ch4EoahlQ4AJcgvpQCRNohLlMyfXBJpRfcslWuYGBAaRPcybl548WhpMHmp+PErmNzORvXxp5k79za+Qkf9N6zVDv179nYj9Vcc1QZ2m+Z2E/QXXNUOfmEi1Hh14d9aHOyMYtR3sy+pKxzsPHLceHbpHGDov+VPq7L981lrfmJGq5YRe3RYdVmrcqrcha+CXa7YuEBT/opvWlqoM+qphVlfYBlcUtx/pYUmKNHfJh9KflhnwF8dFY1gsgFrcc6+tGSWgs9wWQZsuRnqqwhMaSXgC5ov/8q7Uc6QkqueGUisZyXwDxj6zWcpynJe02yntNYzkvgMAol0rLcZ6MlvsoHxWN5b4A4p9YpeA5b0HYfbOyocZ6Vlb01+1XvQC6UKELbFYKaKxno0I3WMtW/wJkZ0U/r7+DSTGFFF1j9JUJXWAt27zwMcKEbt+PjpwKMU705T6h3wrZOdGddEWl8TChC25WxGcAZiVCN9ysWKPnDkb0CSe0YowRfVbPo9FzROjiKDihF8UQoVtlFT9aPUeIrp6myh586NV/EK8Y40GHRTxQ2Y0H3WrqVho9x4fuC1mksoUO/dRsz9GgC0hrtGWnQTcY30BlNzb0WT3Bll3Z0D8gKZUtLOgCwxtt2Q8WdKtOamtUvHChP1XzPceFDj/shsruLOgCBR+qbCFBt/oidjRUdqVCP9UTq6xQoasnobJGgi4wtuGWfSdBNyj4WGULEfqikLXVc0ToPrQ5lRUOdPE/8yprHOgGNR6r7M6DDiMbvH1SHnSosmjLvlKgC9LFKntQoBtoS6bnaNAVEqjsxoIO4xpu2ZUCXcBaMiq7MqAbFFmq50jQYVhjlTUS9FOrsVbPMaALoqHKYhjQDQo+pbKFAh1qLKOyBwU6kGUOUgkButQLPlLZjQDdoMVSB6l2BnQo+JzKFgJ0mMk5lT36Rxco+JzKSv/oBkOaU9mNAP1USEZldwJ0haRWN/3fPfofhaScRv92j+4JTBZDje77l+HQd//mcOhe8OOh47KO2R895sy23Ew36o4eKvxwo+5UJx06DGbmzRN+qce8ky038aGDo8VbVow9esyS1Vg+9DlAT9WhPHrMK1nwwazoMVNOY6dgVvSYZ1JjA+3pMlmNpfNY769QY+lkLgt18hmNL9iRxvIt6z6LA40lXNt+2bNjHARCIAqgExMLucfeyVh5qe0tzZ5SVxMaI2zomLxX0xDg8wl1Vp0am/BuezuSckvGgG8nWB2TMeAjlgPRnTLlmkXtmjrlmhfXPXON3a39x3rOox5x7v855Xusf52665l1v9dFHauxt5jZpVdjc+b7x9qpsUlDblfGa+wjJldGa+wzple2X3Va219TpzsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8GIPDgQAAAAAgPxfG0FVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVdqDQwIAAAAAQf9f+8IEAAAAAAAAwCmRg3Unf/8l+AAAAABJRU5ErkJggg==",xue="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAPoAgMAAAAwzTx3AAAACVBMVEXz9fjX19fk5OUH9i6SAAAGd0lEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGD24EAAAAAAAMj/tRFUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVXYuXvcCGEgDMODJQrScwSK3GKP4GI/ZKWiSZRjcAn326TZU0YRsOwPkcCuPN88Nxi9wRjwxhhjjDHGGLOPuyYZpXhvSHSRwjkkK737D5L1UrQGGQYpWYsMZymYwy4ar/YaWbyUK2IvbQudw27a/uIb7Kdsje+QKUipIsB6sSObFKpCtpOUqcFBeta5DgfpWedaHKVmGx9xlJolHodpWeIdEujYylZIoeLu1iCFirtbjRQqHtmJR++QQsWepsWk/0rwWfSeps3alUQFow+SpCl5OxezNiVOweiSqOTRMy/WtuBNfObdqbPRS0Q/updENe/o5VcPVt2qW3WK6sQrvN3XrbpVt+pWXWt14vu67easulXnqO5l9Y6Pkah6uJ8c6CmrO/wZGKtPGXvG6pgMNNX989GaQFM9rKPM+KpHzE5s1R0Wnq16g8WZpbpfI856lurh9YT4SFY94uZEVh2rgat6hZUnqb4x+pmkeng9IX7mql5j1XNV73CHq/rD6CTV/cZv3kaO6mFrdKvOUT3izomq+uPoHNU9b/Vg1a06e3W7r2uvbrs5xie3QP/kVmPVk1SfR29439IQv5ursApc1R3ve3jiry/S8n5z63Bj39dpqldYBLbqgsXAUt3L8zo3slQPTxXR852bc5h4vtOSt/9Tw1d9foIJjCejp+wj43l4cRH4pvwVhIi7XmTDdVRf/d+8H/qrb3IABpXV/Z7lLKis/sveHdtGDgNRGJYEbKACVIKSq4IlzAF8xIRKrg8mVwL7PSwM35jiCiC5kR73y+hs/Nvy2AZErXnDWBizOp7iiNVnPB0jVl/xJIzVpWpz8YzVteo9imHE6vgSx6u+4Isbr/qKL0JYXepeJ+4Jq2vlO7XHq45vcbTqC7650aqv+CZ81aXy0gTlq66VdyGF0aon/DdY9QXGjVV9hjnoqkvt1TBKV11rb3zzY1VPgBmq+oKf3EjVZ/x0sFWX6guwlK26Vl+A5UeqnpAZqTpycZzqM3IHWXWpv9xRyKpr/TV/nrr6r1iusYa5+gMh2glnkbh6dp5xdnBVl9MjPRRPOSNc1fUcMtrpzPNW3wDgsNNZ4K2efy5QiqzVFzx5OxUcVXU5b2/BTgWhqq5Fx2inM2Wtvmdf1RtKgbV6yhYXvMJaPfuqXvCKY6peLq7ennIFYaqu5eJqkxWUs/qeLS4bXgmc1bfsF7SElzirJ8A+tOA1R1Rdyv8yqT3zCgdRdS3/MhGsaUEZq9uwsKYFz1h9z76hEy4wVk/ZNzSuOJ7q8v9odJpx5eCpbpefGD89cEX5qufv39pxxfNVzzrHhEt81TfAOFyLNNXFHvDmN64dNNXtzWOVhK36jFqerfqKWoGt+o5qkaW6vT24lmOprnaoJFzVF9TzXNVX1Atc1R9oEEmqiyWs5Uiqq62xtYSqOlooU/UZLQJT9RVNSKqLjVHNcVRXW2OrCVH1hCbKU31Bm8BTfUYjjupiU9RzFNXVpqh30FRPaKQ01dHKs1Rf0Iyiutga2yAyVNfnEM0OkuobmglJ9YRmnqP6gg4M1WWa0SESVNdpRYeDovqODkJRfUMHT1EdPQJBdVnQJd6/uq7o4giqP9BFCKrv6OIJqid0CQTV0env7Uf/jU5/bj96v8/od/QZ/TN6pzDdUfqM/hm9j5/uaPuMPuDoO/A+ne7oAbxPpjsaePQVeN8x3dEMvM9Nd7QA74vTLaEHw28vfescxR7bt9NQbDR9Ow3FRtP3043iZ9s/9uvYCkAQCKKgj9D+TKzO2Cp9lsAasc60AHzuot+t429LEt8S+CDxLYEPOtdSufnO1VQuGGVLxtjgsbcMNMnKXrGsz974tvs+McZ39X2q8V19/xq6c1vb+OlLf+1H6NqWN+7I8mcOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADzswYEAAAAAAJD/ayOoqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkp7cEgAAAAAIOj/a1+YAAAAAAAAALgEoKO2OvzgJtMAAAAASUVORK5CYII=",Aue=["src"],Pue=["src"],kue=["src"],Fue=_t(ot({__name:"ThumbnailRender",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean}},setup(e){const t=e,n=X(()=>t.value),o=X(()=>t.id),s=X(()=>t.disabled),r=X(()=>t.readOnly),i=$("");let a=null;const l=$(!1),u=X(()=>n.value==null||n.value===""),c=X(()=>!u.value&&l.value),d=()=>{l.value=!0},h=()=>{a&&URL.revokeObjectURL(a),a=null},f=()=>{i.value="",h()},p=fd(),{openSceneHub:g}=p,v=X(()=>{const b=un.getInstance().getItem("ws.code"),y=un.getInstance().getItem("BASE_URL"),E=b||t.workspaceId;return es({type:"scene_hub",config:{baseDomain:y,ws_code:E,scene_id:String(t.id)}}).url}),w=b=>{try{if(b.ctrlKey||b.metaKey){window.open(v.value,"_blank");return}g(String(t.id))}catch{window.open(v.value,"_blank")}finally{S()}},S=()=>{var E,_,I,T,F,L;(E=t.params)==null||E.api.clearFocusedCell();const b=((I=(_=t.params)==null?void 0:_.column)==null?void 0:I.getColId())||"",y=((F=(T=t.params)==null?void 0:T.node)==null?void 0:F.rowIndex)||0;(L=t.params)==null||L.api.setFocusedCell(y,b)};return Qe(()=>[o.value,n.value],async([b,y],E,_)=>{let I=!0;if(_(()=>{I=!1,h()}),l.value=!1,i.value="",!(b==null||b===""||!y))try{const T=await Due(String(b),y);if(!I||b!==o.value||y!==n.value)return;a=URL.createObjectURL(T),i.value=a}catch(T){I&&b===o.value&&y===n.value&&(console.warn("Failed to load cached thumbnail; using the original URL.",T),i.value=y)}},{immediate:!0}),Vn(f),(b,y)=>(q(),de("div",{class:le(["thumbnail-wrapper",{disabled:s.value,"read-only":r.value}]),onClick:w},[u.value?(q(),de("img",{key:0,src:V(xue),alt:"No thumbnail"},null,8,Aue)):c.value?(q(),de("img",{key:1,src:V(Iue),alt:"Broken thumbnail"},null,8,Pue)):i.value?(q(),de("img",{key:2,src:i.value,alt:"Thumbnail",onError:d},null,40,kue)):Ye("",!0)],2))}}),[["__scopeId","data-v-1fd3dd73"]]),Oue={class:"left-section"},Mue={class:"create-count"},Nue={class:"modified-template-options"},Lue=["onClick"],Vue={class:"setting-count"},Bue={class:"field-label"},$ue={class:"field-label"},Hue={class:"status-selection"},Gue={class:"preview-section"},Uue={key:0,class:"preview-list"},Wue={key:0,class:"preview-more"},zue={key:1,style:{color:"var(--tessr-text-secondary, #6b6b6b)"}},nB=1e3,oB=8,sB=7,jue=_t(ot({__name:"BulkCreateCount",props:{item:{},takeName:{},options:{default:()=>[{id:"number_up",name:"Number",icon:"ArrowLeft",description:{active:"Remove from the name",inactive:"Add a number that counts up",switch:"Switch to a number that counts up"}},{id:"number_down",name:"Number",icon:"ArrowRight",description:{active:"Remove from the name",inactive:"Add a number that counts down",switch:"Switch to a number that counts down"}},{id:"letter_up",name:"Letter",icon:"ArrowLeft",description:{active:"Remove from the name",inactive:"Add a letter that counts up",switch:"Switch to a letter that counts up"}},{id:"letter_down",name:"Letter",icon:"ArrowRight",description:{active:"Remove from the name",inactive:"Add a letter that counts down",switch:"Switch to a letter that counts down"}}]},getStatusFunc:{},workspaceId:{},entityId:{}},emits:["cancel","changed"],setup(e,{expose:t,emit:n}){const o=Kt,s=Io,r=$(null),i=$(null),a=["number","letter","name"],l={number_up:"1→9",number_down:"9→1",letter_up:"A→Z",letter_down:"Z→A",name:"Name"},u=$(null),c=$({}),d=(Y,re)=>{c.value[Y]=re instanceof HTMLElement?re:null},h=$(null),f=$("1"),p=e,g=$([p.takeName,{id:"number",text:"1→9",direction:"up"}," "]),v=X(()=>{const Y=w.value;let re=1;const R="9999.",G={createCount:`${R}0`,input:`${R}1`,firstField:`${R}5`,stepField:`${R}6`,number_up:`${R}1`,number_down:`${R}2`,letter_up:`${R}3`,letter_down:`${R}4`,statusSelect:`${R}7`};return["number_up","number_down","letter_up","letter_down"].forEach((ce,Ee)=>{re++,G[ce]=`${R}${re}`}),Y?(re++,G.statusSelect=`${R}${re}`,re++,G.firstField=`${R}${re}`,re++,G.stepField=`${R}${re}`):(delete G.firstField,delete G.stepField),G}),w=X(()=>g.value.find(Y=>typeof Y!="string"&&(Y.id==="number"||Y.id==="letter"))),S=$("number"),b=$("up"),y=Fo({...Ei.number}),E=Fo({...Ei.number}),_=()=>{Object.assign(y,Ei[S.value]),Object.assign(E,Ei[S.value])};Qe(w,Y=>{if(!Y)return;const re=Y.id;re!==S.value&&(S.value=re,_()),b.value=Y.direction==="down"?"down":"up"},{immediate:!0,flush:"sync"});const I=X(()=>YO[b.value]),T=X(()=>{const Y=Number(f.value);return Number.isFinite(Y)?Math.min(nB,Math.max(0,Math.floor(Y))):0}),F=(Y,re)=>{const R=JO(S.value,Y,re);y[Y]=R,Mv(Y,R)&&(E[Y]=R)},L=$(null),x=$(null),P=$(null),k=(Y,re)=>{var G,J,ce,Ee;if(re.key==="Enter"||re.key==="Escape")return;if(re.key==="Tab"){re.preventDefault(),re.stopPropagation(),re.stopImmediatePropagation();const Ce=re.shiftKey;Y=="first"&&(Ce?(G=c.value.letter_down)==null||G.focus():(J=L.value)==null||J.focus()),Y=="step"&&(Ce?(ce=L.value)==null||ce.focus():(Ee=i.value)==null||Ee.focus());return}re.key.length===1&&!re.ctrlKey&&!re.metaKey&&!re.altKey&&!ZO(S.value,Y,re.key)&&re.preventDefault()},M=(Y,re)=>{var Ee;re.preventDefault();const R=re.target,G=((Ee=re.clipboardData)==null?void 0:Ee.getData("text/plain"))??"",J=R.selectionStart??R.value.length,ce=R.selectionEnd??R.value.length;R.value=R.value.slice(0,J)+G+R.value.slice(ce),F(Y,R.value),R.value=y[Y]},N=Y=>{if(Mv(Y,y[Y]))return;const re=Ei[S.value][Y];y[Y]=re,E[Y]=re},B=X(()=>w.value?CE({type:S.value,direction:b.value,first:E.first,step:E.step,count:T.value}):[]),z=X(()=>g.value.every(Y=>typeof Y=="string"&&!Y)),oe=X(()=>T.value===0||z.value?[]:Array.from({length:T.value}).map((Y,re)=>g.value.map(R=>typeof R=="string"?R:R.id==="name"?p.takeName:B.value[re]??"").join(""))),ie=X(()=>oe.value.length>oB?oe.value.length-sB:0),te=X(()=>oe.value.length>oB?oe.value.slice(0,sB):oe.value),se=Y=>{A.value=[Y];const re=Y.id.split("_")[0],R=Y.id.split("_")[1],G=l[Y.id],J=r.value;if(!J)return;const ce=Ce=>g.value.find(Ne=>typeof Ne!="string"&&Ce.includes(Ne.id));if(re==="name"){ce(["name"])?J.deleteTag("name"):J.insertTag({id:re,text:G,direction:void 0});return}const Ee=ce(["number","letter"]);if(Ee){const Ce=Ee.id===re,Ne=Ee.direction===R;if(Ce&&Ne){J.deleteTag(Ee.id);return}J.deleteTag(Ee.id),J.insertTag({id:re,text:G,direction:R})}else J.insertTag({id:re,text:G,direction:R})},Z=Y=>j(Y.id)?Y.description.active:!!w.value&&Y.description.switch?Y.description.switch:Y.description.inactive,A=$(null),j=Y=>{const[re,R]=Y.split("_");return g.value.some(G=>typeof G!="string"&&G.id===re&&G.direction===R)},ne=n,ge=X(()=>{const[Y]=g.value;return g.value.length===1&&typeof Y!="string"&&Y.id==="name"});X(()=>g.value.length===0||ge.value);const xe=()=>{const Y=g.value.map(re=>typeof re=="string"?{type:"text",value:re}:re.id==="name"?{type:"current_name"}:{type:"counter",value:y.first,direction:re.direction=="up"?"asc":"desc",format:re.id==="number"?"number":"letter",step:y.step});ne("changed",{data:Y,count:T.value,template_flow_status_id:u.value||void 0})};Qe([g,f,y,u],()=>{xe()},{deep:!0,immediate:!0}),t({reset:()=>{A.value=null,g.value=[]},focus:()=>{var Y;(Y=i.value)==null||Y.focus()}}),Xt(()=>{var Y;(Y=i.value)==null||Y.focus()});const K=Y=>{var re,R;Y.preventDefault(),Y.stopPropagation(),(re=i.value)==null||re.blur(),(R=h.value)==null||R.focus()};return(Y,re)=>(q(),de("div",{class:"bulk-rename-core",ref_key:"popupRef",ref:h,tabindex:"-1"},[Se("div",Oue,[Se("div",Mue,[re[11]||(re[11]=Se("span",null,"How many to create?",-1)),ze(ye(V(hl),{modelValue:f.value,"onUpdate:modelValue":re[0]||(re[0]=R=>f.value=R),type:"number","max-value":nB,"max-decimal-char":0,"show-clear":!1,ref_key:"counterRef",ref:i,placeholder:""},null,8,["modelValue"]),[[V(s),v.value.createCount]])]),ze(ye(VN,{modelValue:g.value,"onUpdate:modelValue":re[1]||(re[1]=R=>g.value=R),"allowed-tags":a,ref_key:"templateInputRef",ref:r,placeholder:"Enter name",onEscape:K},null,8,["modelValue"]),[[V(s),v.value.input]]),Se("div",Nue,[(q(!0),de(Pt,null,xn(e.options,R=>ze((q(),de("button",{onClick:G=>se(R),ref_for:!0,ref:G=>d(R.id,G),key:R.id,class:le([{active:j(R.id)},"template-option"])},[tt(at(R.name)+" ",1),R.icon?(q(),je(V(gt),{key:0,src:R.icon,style:{transform:"rotate(90deg)"}},null,8,["src"])):Ye("",!0)],10,Lue)),[[V(o),{content:Z(R),bypassOverflowCheck:!0,delay:[300,0],interactive:!1,hideOnClick:!1,appendTo:"parent"}],[V(s),`${v.value[R.id]}`]])),128))]),Se("div",Vue,[Se("span",Bue,at(I.value.first),1),ze((q(),je(V(hl),{ref_key:"firstFieldRef",ref:x,"model-value":y.first,disabled:!w.value,"max-length":V(yE),onInput:re[2]||(re[2]=R=>F("first",R)),onKeydown:re[3]||(re[3]=R=>k("first",R)),onPaste:re[4]||(re[4]=R=>M("first",R)),onBlur:re[5]||(re[5]=R=>N("first")),"show-clear":!1},{clear:we(()=>[...re[12]||(re[12]=[Se("div",null,null,-1)])]),_:1},8,["model-value","disabled","max-length"])),[[V(s),v.value.firstField]]),Se("span",$ue,at(I.value.step),1),ze(ye(V(hl),{"model-value":y.step,disabled:!w.value,"max-length":V(wE),onInput:re[6]||(re[6]=R=>F("step",R)),onKeydown:re[7]||(re[7]=R=>k("step",R)),onPaste:re[8]||(re[8]=R=>M("step",R)),onBlur:re[9]||(re[9]=R=>N("step")),"show-clear":!1,ref_key:"fieldStepRef",ref:L},null,8,["model-value","disabled","max-length"]),[[V(s),v.value.stepField]])]),Se("div",Hue,[re[13]||(re[13]=Se("span",null,"Status",-1)),ye(V(wL),{modelValue:u.value,"onUpdate:modelValue":re[10]||(re[10]=R=>u.value=R),"get-status-func":p.getStatusFunc,"workspace-id":p.workspaceId,id:p.entityId,style:{width:"100%"},"max-width":"372px",ref_key:"selectStatusRef",ref:P,"focus-index":v.value.statusSelect},null,8,["modelValue","get-status-func","workspace-id","id","focus-index"])])]),Se("div",Gue,[re[14]||(re[14]=Se("span",{class:"preview-title"},"Preview",-1)),te.value.length>0?(q(),de("ul",Uue,[(q(!0),de(Pt,null,xn(te.value,(R,G)=>(q(),de("li",{key:G},[ye($N,{text:R},null,8,["text"])]))),128)),ie.value>0?(q(),de("li",Wue," … "+at(ie.value)+" more ",1)):Ye("",!0)])):(q(),de("div",zue," Add a name or a counter to see a preview. "))])],512))}}),[["__scopeId","data-v-744a8ab0"]]),rB={text:yl,id:void 0,assignees:Mse,status:KN,dateRange:Nse,isStarted:yl,isCompleted:yl,lastUpdated:yl,completedOn:yl,isDeleted:yl,isArchived:yl,isProcessing:yl,name:GN,options:CQ,metric:zN,__checkboxSelection:void 0,description:Vie,thumbnail:Fue},Kue={text:!1,id:!1,assignees:!0,status:!0,dateRange:!0,isStarted:!1,isCompleted:!1,lastUpdated:!1,completedOn:!1,isDeleted:!1,isArchived:!1,isProcessing:!1,name:!1,options:!0,metric:!1,__checkboxSelection:!1,description:!1,thumbnail:!1},que={text:null,id:void 0,assignees:oM,status:NN,dateRange:Lse,isStarted:void 0,isCompleted:void 0,lastUpdated:void 0,completedOn:void 0,isDeleted:void 0,isArchived:void 0,isProcessing:void 0,name:GN,options:UN,metric:void 0,__checkboxSelection:void 0,description:void 0,thumbnail:void 0},Yue={id:[100,100],assignees:[200,200],status:[200,200],dateRange:[255,255],isStarted:[150,150],isCompleted:[150,150],lastUpdated:[180,180],completedOn:[180,180],isDeleted:[void 0,void 0],isArchived:[void 0,void 0],isProcessing:[void 0,void 0],name:[350,500],options:[50,50],metric:[200,300],__checkboxSelection:[50,50],text:[200,300],description:[200,300],thumbnail:[82,82]},Xue={dateRange:{cellEditorPopupPosition:"under",cellEditorPopup:!1},name:{cellEditorPopupPosition:"over",cellEditor:!1,cellEditorPopup:!1},metric:{suppressKeyboardEvent:void 0,suppressNavigable:!1,suppressMovable:!1,cellClass:"ag-cell-optimized",editable:!0}},Zue=e=>{var t,n,o;if(e){if(Number((t=e.metric_type)==null?void 0:t.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number((n=e.metric_type)==null?void 0:n.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number((o=e.metric_type)==null?void 0:o.id)==3)return}},Ld=e=>{if(e)return Zue(e)};function iB(e,t){var s,r,i,a;const n=(s=t==null?void 0:t.data)==null?void 0:s.permissions;let o={disabled:!1,readOnly:!1,type:void 0};if(!t||!e)o={disabled:!1,readOnly:!0,type:void 0};else if(e==="options")o={disabled:!1,readOnly:!1,type:void 0};else if(e!=null&&e.includes("metric")){const l=`metric_permission_${e==null?void 0:e.replace("metric_","")}`;o={disabled:!1,readOnly:!((t==null?void 0:t.data)&&t.data[l]&&((r=t.data[l])==null?void 0:r.permission)==2&&!((i=t.colDef)!=null&&i.context.formula)&&!t.data.isLocked&&!t.data.isDeleted),type:Ld((a=t.colDef)==null?void 0:a.context)}}else{const u={assignees:(n==null?void 0:n.has_update_assignee_permission)??0,completedOn:0,name:(n==null?void 0:n.has_edit_permission)??0,permissions:0,status:(n==null?void 0:n.has_edit_template_flow_status_permission)??0,dateRange:(n==null?void 0:n.has_edit_date_permission)??0,isStarted:0,isDeleted:0,isArchived:0,isLocked:0,isProcessing:0,lastUpdated:0,id:0,isCompleted:0,options:1,disabled:0,description:(n==null?void 0:n.has_edit_permission)??0,thumbnail:1}[e]??0;o={disabled:u===-1,readOnly:u!==1,type:void 0}}return o}class r_{constructor(){Rn(this,"eGui");Rn(this,"params")}init(t){this.params=t}getGui(){var n,o,s,r,i;const t=document.createElement("div");return(n=this.params)!=null&&n.height&&t.style.setProperty("--height",(o=this.params)==null?void 0:o.height),(s=this.params)!=null&&s.width?t.style.setProperty("--width",(r=this.params)==null?void 0:r.width):(i=this.params)!=null&&i.fullwidth?t.style.setProperty("--width","100%"):t.style.setProperty("--width",`${Math.floor(Math.random()*50)+50}%`),t.className="ag-cell-skeleton",t.addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation()}),this.eGui=t,t}refresh(t){return!1}getValue(){var t;return(t=this.params)==null?void 0:t.value}isPopup(t){return!1}getPopupPosition(){}destroy(){}}const aB=new Map;class Tp{static initialize(t){this.wrappers=t}static getWrappers(){if(!this.wrappers)throw new Error("CellRendererFactory: Not initialized. Please call CellRendererFactory.initialize() first.");return this.wrappers}static buildCommonCellParams(t,n){var u,c,d;const o=t.data||((u=t.node)==null?void 0:u.data),s=(c=t.colDef)==null?void 0:c.field,r=s&&o?o[s]:void 0,i=iB((d=t.colDef)==null?void 0:d.field,t),a=typeof n=="function"?n(t):n??{};return{...t,value:r,disabled:i==null?void 0:i.disabled,readOnly:i==null?void 0:i.readOnly,type:Ld(t.context),...a}}static resolveRendererComponent(t,n){let o;return t.includes("metric")&&rB.metric?Ld(n)==="rating"?o=kie:o=zN:o=rB[t]??void 0,o}static resolveEditorComponent(t,n){const o=t.includes("metric");let s;const r=Ld(n);return o&&["number","dropdown"].includes(r)?s=Wre:s=que[t],s}static canEditField(t,n){var r;if(n.data===void 0)return!1;const o=iB((r=n.colDef)==null?void 0:r.field,n),s=Kue[t]??!0;return!(o!=null&&o.disabled)&&!(o!=null&&o.readOnly)&&s&&(o==null?void 0:o.type)!=="rating"}static resolveSize(t){const[n=250,o=300]=Yue[t]??[];return{minWidth:n,maxWidth:o}}static buildHeaderComponentParams(t){return n=>typeof t=="function"?t(n):t??{}}static fromType(t){const{wrapVueCellEditor:n}=this.getWrappers(),o=String(t.field??""),s=this.resolveSize(o),r=Xue[o]??{},i=Ld(t.context),a=i==="number"||i==="rating",l=i=="rating"?t.context.range*24+20:s.minWidth;return{...t,headerName:t.headerName,...s,...t,cellEditorSelector:c=>{const d=this.resolveEditorComponent(o,t.context);return{component:n(d),params:this.buildCommonCellParams(c,t.cellRendererParams),popup:!a}},singleClickEdit:!0,cellEditorPopup:!a,cellEditorPopupPosition:a?void 0:"under",editable:c=>{let d;return c.data===void 0||c.data.isDeleted||c.node.data===void 0?d=!1:d=this.canEditField(o,c),d},minWidth:l,cellRendererSelector:c=>Jue(c,{component:n(this.resolveRendererComponent(o,t.context)),params:this.buildCommonCellParams(c,t.cellRendererParams)}),headerComponentParams:this.buildHeaderComponentParams(t.headerComponentParams),...r,cellClass:c=>`${i}--${c.colDef.field}`}}}Rn(Tp,"wrappers",null);const Jue=(e,t)=>{var s;const n=(s=e.colDef)==null?void 0:s.field,o=`${n}-${e.node.rowIndex}`;return aB.set(o,(aB.get(o)??0)+1),n!=null&&n.includes("metric")?e.value===void 0?{component:r_,params:{fullwidth:!1}}:t:e.data&&(n!=null&&n.includes("thumbnail"))||e.data&&e.value!==void 0?t:!n||n==="options"||n==="__checkboxSelection"?e.data?t:{component:r_,params:{fullwidth:!0,width:"24px",height:"24px"}}:!e.data||e.value===void 0?{component:r_,params:{fullwidth:!1}}:t},Que=_t(ot({__name:"Vue3Wrapper",props:{component:{},params:{},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!0},value:{},data:{},id:{},tooltip:{},isNoData:{type:Boolean,default:!1},workspaceId:{},entityId:{},axiosService:{},isSearching:{type:Boolean,default:!1},isFiltering:{type:Boolean,default:!1},sortType:{default:"default"},maxRating:{default:5},config:{}},setup(e,{expose:t}){const n=e,o=$(null),s=X(()=>{var a;return((a=n.component)==null?void 0:a.name)||"UnknownComponent"}),r=X(()=>{var a;return((a=n.component)==null?void 0:a.default)||n.component}),i=X(()=>({params:n.params,disabled:n.disabled,readOnly:n.readOnly,value:n.value,maxRating:n.maxRating,data:n.data,id:n.id,workspaceId:n.workspaceId,entityId:n.entityId,axiosService:n.axiosService,tooltip:n.tooltip,isSearching:n.isSearching,isFiltering:n.isFiltering,isNoData:n.isNoData,config:n.config}));return t({focus:()=>{var a;return(a=o.value)!=null&&a.focus?o.value.focus():console.warn(`Component ${s.value} does not have a focus method.`),!0},blur:()=>{var a,l;return(l=(a=o.value)==null?void 0:a.blur)==null||l.call(a),!0},trigger:(a,l)=>{var u;return(u=o.value)==null||u.$emit(a,l),!0}}),(a,l)=>(q(),je(OC(r.value),jt(i.value,{ref_key:"componentRef",ref:o}),null,16))}}),[["__cssModules",{$style:{skeleton:"_skeleton_7xde7_1",shimmer:"_shimmer_7xde7_16","skeleton-loading":"_skeleton-loading_7xde7_1"}}]]);function ece(e){return"stopEditing"in e}const tce=8,nce=e=>{if(!e)return;const t=e.__vueParentComponent,n=t==null?void 0:t.exposed;n&&typeof n.triggerFocus=="function"?n.triggerFocus():e.focus()};function lB(e){return class{constructor(){Rn(this,"container");Rn(this,"vNode",null);Rn(this,"componentInstance",null);Rn(this,"componsenExposed",null);Rn(this,"params");Rn(this,"isEditor",!1);Rn(this,"_destroyed",!1)}init(n){var l,u,c,d;if(!n){console.error("[Vue3CellWrapper] Missing params");return}const o=performance.now();this.params=n,this.isEditor=ece(n),this.container=document.createElement("div"),this.container.classList.add("ag-vue3-cell-wrapper"),this.container.style.width="100%",this.container.style.height="100%";const s=n.context.apiClass,r=n,i={component:e,params:Object.freeze(n),disabled:!1,readOnly:r.readOnly??!1,value:n.value,maxRating:r.maxRating??void 0,data:n.data,id:(l=n==null?void 0:n.data)==null?void 0:l.id,workspaceId:n.context.workspaceId,entityId:n.context.entityId,axiosService:s,tooltip:r.tooltip??void 0,isSearching:r.isSearching??!1,isFiltering:r.isFiltering??!1,isNoData:r.isNoData??!1,config:r.config,sceneId:(r==null?void 0:r.sceneId)||void 0};this.vNode=ye(Que,i),rb(this.vNode,this.container);const a=performance.now()-o;a>tce&&console.warn(`[Vue3CellWrapper] Slow render (${a.toFixed(1)}ms) for "${(u=n.colDef)==null?void 0:u.field}"`),this.componentInstance=(c=this.vNode.component)==null?void 0:c.proxy,this.componsenExposed=(d=this.vNode.component)==null?void 0:d.exposed}getGui(){return this.container}refresh(n){return!1}focusUi(){var n;(n=this.componsenExposed)!=null&&n.focus?this.componsenExposed.focus():nce(this.container)}getValue(){var n,o,s;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((s=(o=this.componentInstance).getValue)==null?void 0:s.call(o))??this.componentInstance.value:(console.warn("[Vue3CellWrapper] getValue() called but component instance not available"),(n=this.params)==null?void 0:n.value)}isPopup(n){var i,a,l,u,c;const o=(l=(a=(i=this.params)==null?void 0:i.colDef)==null?void 0:a.field)==null?void 0:l.includes("metric"),s=((u=this.params)==null?void 0:u.context)&&Ld(this.params.context);return o||(s==="number"||s==="rating")||!this.isEditor?!1:(c=this.componentInstance)!=null&&c.isPopup?this.componentInstance.isPopup():!0}getPopupPosition(){var o,s,r;return this.isEditor?(o=this.componentInstance)!=null&&o.getPopupPosition?this.componentInstance.getPopupPosition():((r=(s=this.params)==null?void 0:s.colDef)==null?void 0:r.cellEditorPopupPosition)??"under":void 0}afterGuiAttached(){!this.isEditor||this.componentInstance}destroy(){if(!this._destroyed&&(this._destroyed=!0,!!this.container))try{const n=this.componentInstance;if(n){try{typeof n.$destroy=="function"&&n.$destroy()}catch(s){console.warn("[Vue3CellWrapper] Error during $destroy:",s)}try{typeof n.destroy=="function"&&n.destroy()}catch(s){console.warn("[Vue3CellWrapper] Error during destroy():",s)}}(typeof queueMicrotask=="function"?queueMicrotask:s=>Promise.resolve().then(s))(()=>{try{rb(null,this.container)}catch(s){console.warn("[Vue3CellWrapper] Error during unmount:",s)}finally{this.container.textContent=""}})}catch(n){console.error("[Vue3CellWrapper] Error during cleanup:",n)}finally{this.vNode=null,this.componentInstance=null}}}}function My(e){return lB(e)}function uB(e){return lB(e)}var Wu=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,n){const o=t?this.allAsyncListeners:this.allSyncListeners;let s=o.get(e);return!s&&n&&(s=new Set,o.set(e,s)),s}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,n=!1){this.getListeners(e,n,!0).add(t)}removeEventListener(e,t,n=!1){const o=this.getListeners(e,n,!1);o&&(o.delete(t),o.size===0&&(n?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const n=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:o}=this,s=a=>{const l=o?()=>o.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},r=this.getListeners(n,t,!1);if(((r==null?void 0:r.size)??0)>0){const a=new Set(r);for(const l of a)r!=null&&r.has(l)&&s(()=>l(e))}const i=this.getGlobalListeners(t);if(i.size>0){const a=new Set(i);for(const l of a)s(()=>l(n,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}};function Ia(e){return e==null||e===""?null:e}function ft(e){return e!=null&&e!==""}function Gn(e){return!ft(e)}function i_(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Dp(e,t){const n=e?JSON.stringify(e):null,o=t?JSON.stringify(t):null;return n===o}function oce(e,t,n=!1){const o=e==null,s=t==null;if(e!=null&&e.toNumber&&(e=e.toNumber()),t!=null&&t.toNumber&&(t=t.toNumber()),o&&s)return 0;if(o)return-1;if(s)return 1;function r(i,a){return i>a?1:i<a?-1:0}if(typeof e!="string"||!n)return r(e,t);try{return e.localeCompare(t)}catch{return r(e,t)}}var sce=/[&<>"']/g,rce={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Vd(e){return(e==null?void 0:e.toString().toString())??null}function Ip(e){var t;return((t=Vd(e))==null?void 0:t.replace(sce,n=>rce[n]))??null}function Ai(e){return e.eRootDiv.getRootNode()}function Kn(e){return Ai(e).activeElement}function $o(e){const{gos:t,eRootDiv:n}=e;let o=null;const s=t.get("getDocument");return s&&ft(s)?o=s():n&&(o=n.ownerDocument),o&&ft(o)?o:document}function cB(e){const t=Kn(e);return t===null||t===$o(e).body}function dB(e){return $o(e).defaultView||window}function a_(e){let t=null,n=null;try{t=$o(e).fullscreenElement}catch{}finally{t||(t=Ai(e));const o=t.querySelector("body");o?n=o:t instanceof ShadowRoot?n=t:t instanceof Document?n=t==null?void 0:t.documentElement:n=t}return n}function ice(e){const t=a_(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function ace(e){const t=a_(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function Qr(e,t,n){n==null||typeof n=="string"&&n==""?hB(e,t):Ir(e,t,n)}function Ir(e,t,n){e.setAttribute(fB(t),n.toString())}function hB(e,t){e.removeAttribute(fB(t))}function fB(e){return`aria-${e}`}function Dl(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function lce(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function uce(e){return e.getAttribute("aria-label")}function Bd(e,t){Qr(e,"label",t)}function xp(e,t){Qr(e,"labelledby",t)}function pB(e,t){Qr(e,"live",t)}function cce(e,t){Qr(e,"atomic",t)}function dce(e,t){Qr(e,"relevant",t)}function hce(e,t){Qr(e,"invalid",t)}function fce(e,t){Qr(e,"disabled",t)}function gB(e,t){Qr(e,"hidden",t)}function l_(e,t){Ir(e,"expanded",t)}function pce(e,t){Ir(e,"setsize",t)}function gce(e,t){Ir(e,"posinset",t)}function mce(e,t){Ir(e,"multiselectable",t)}function vce(e,t){Ir(e,"rowcount",t)}function Ny(e,t){Ir(e,"rowindex",t)}function yce(e,t){Ir(e,"rowspan",t)}function wce(e,t){Ir(e,"colcount",t)}function mB(e,t){Ir(e,"colindex",t)}function Cce(e,t){Ir(e,"colspan",t)}function bce(e,t){Ir(e,"sort",t)}function Sce(e){hB(e,"sort")}function vB(e,t){Qr(e,"selected",t)}function Ece(e,t){Qr(e,"controls",t)}function _ce(e,t){Ece(e,t.id),xp(t,e.id)}function yB(e,t){Qr(e,"owns",t)}function Ly(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Rce="[tabindex], input, select, button, textarea, [href]",wB="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Ap(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(wB)?!1:Pi(e)}function Un(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-hidden",!t),o||gB(e,!t)}function Tce(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-invisible",!t),o||gB(e,!t)}function Pp(e,t){const n="disabled",o=t?r=>r.setAttribute(n,""):r=>r.removeAttribute(n);o(e);const s=e.querySelectorAll("input")??[];for(const r of s)o(r)}function zu(e,t,n){let o=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof n=="number"){if(++o>n)break}else if(e===n)break}return!1}function ju(e){const{height:t,width:n,borderTopWidth:o,borderRightWidth:s,borderBottomWidth:r,borderLeftWidth:i,paddingTop:a,paddingRight:l,paddingBottom:u,paddingLeft:c,marginTop:d,marginRight:h,marginBottom:f,marginLeft:p,boxSizing:g}=window.getComputedStyle(e),v=Number.parseFloat;return{height:v(t||"0"),width:v(n||"0"),borderTopWidth:v(o||"0"),borderRightWidth:v(s||"0"),borderBottomWidth:v(r||"0"),borderLeftWidth:v(i||"0"),paddingTop:v(a||"0"),paddingRight:v(l||"0"),paddingBottom:v(u||"0"),paddingLeft:v(c||"0"),marginTop:v(d||"0"),marginRight:v(h||"0"),marginBottom:v(f||"0"),marginLeft:v(p||"0"),boxSizing:g}}function u_(e){const t=ju(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function kp(e){const t=ju(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function CB(e){const{height:t,marginBottom:n,marginTop:o}=ju(e);return Math.floor(t+n+o)}function Vy(e){const{width:t,marginLeft:n,marginRight:o}=ju(e);return Math.floor(t+n+o)}function bB(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:o,borderRightWidth:s,borderBottomWidth:r}=ju(e);return{top:t.top+(n||0),left:t.left+(o||0),right:t.right+(s||0),bottom:t.bottom+(r||0)}}function By(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function $y(e,t,n){n&&(t*=-1),e.scrollLeft=t}function qo(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function ei(e){e!=null&&e.parentNode&&e.remove()}function SB(e){return!!e.offsetParent}function Pi(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!SB(e)||window.getComputedStyle(e).visibility!=="visible")}function c_(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function EB(e,t,n){n&&n.nextSibling===t||(e.firstChild?n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function _B(e,t){for(let n=0;n<t.length;n++){const o=t[n],s=e.children[n];s!==o&&e.insertBefore(o,s)}}function Dce(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Fp(e,t){if(t)for(const n of Object.keys(t)){const o=t[n];if(!(n!=null&&n.length)||o==null)continue;const s=Dce(n),r=o.toString(),i=r.replace(/\s*!important/g,""),a=i.length!=r.length?"important":void 0;e.style.setProperty(s,i,a)}}function Hy(e){return()=>{const t=e();return t?d_(t)||RB(t):!0}}function d_(e){return e.clientWidth<e.scrollWidth}function RB(e){return e.clientHeight<e.scrollHeight}function Gy(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):ki(e,t)}function ki(e,t){t=h_(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Op(e,t){t=h_(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function h_(e){return typeof e=="number"?`${e}px`:e}function f_(e){return e instanceof Node||e instanceof HTMLElement}function Js(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function Il(e,t,n){const s=dB(e).ResizeObserver,r=s?new s(n):null;return r==null||r.observe(t),()=>r==null?void 0:r.disconnect()}function xa(e,t){const n=dB(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var TB="data-ref",p_;function DB(){return p_??(p_=document.createTextNode(" ")),p_.cloneNode()}function Mp(e){const{attrs:t,children:n,cls:o,ref:s,role:r,tag:i}=e,a=document.createElement(i);if(o&&(a.className=o),s&&a.setAttribute(TB,s),r&&a.setAttribute("role",r),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(n)if(typeof n=="string")a.textContent=n;else{let l=!0;for(const u of n)u&&(typeof u=="string"?(a.appendChild(document.createTextNode(u)),l=!1):typeof u=="function"?a.appendChild(u()):(l&&(a.appendChild(DB()),l=!1),a.append(Mp(u)),a.appendChild(DB())))}return a}var Ice=["touchstart","touchend","touchmove","touchcancel","scroll"],xce=["wheel"],g_={},IB=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof g_[n]=="boolean")return g_[n];const o=document.createElement(e[n]||"div");return n="on"+n,g_[n]=n in o}})();function Ace(e,t){return!t||!e?!1:kce(t).indexOf(e)>=0}function Pce(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function kce(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Pce(t)}function Fce(e,t,n){const o=Oce(t);let s;o!=null&&(s={passive:o}),e.addEventListener(t,n,s)}var Oce=e=>{const t=Ice.includes(e),n=xce.includes(e);if(t)return!0;if(n)return!1};function xB(e,t,n){if(n===0)return!1;const o=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(o,s)<=n}var Np=(e,t)=>{const n=e.identifier;for(let o=0,s=t.length;o<s;++o){const r=t[o];if(r.identifier===n)return r}return null};function Lp(e,t){return e.gos.isElementInThisInstance(t.target)}function Mce(e,t,n){const s=e.getBoundingClientRect().height,r=ice(n)-2,i=ace(n)-2;if(!e.offsetParent)return;const l=bB(e.offsetParent),{clientY:u,clientX:c}=t;let d=u-l.top-s/2,h=c-l.left-10;const f=$o(n),p=f.defaultView||window,g=p.pageYOffset||f.documentElement.scrollTop,v=p.pageXOffset||f.documentElement.scrollLeft;r>0&&h+e.clientWidth>r+v&&(h=r+v-e.clientWidth),h<0&&(h=0),i>0&&d+e.clientHeight>i+g&&(d=i+g-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}var Uy=(e,...t)=>{for(const n of t){const[o,s,r,i]=n;o.addEventListener(s,r,i),e.push(n)}},m_=e=>{if(e){for(const[t,n,o,s]of e)t.removeEventListener(n,o,s);e.length=0}},xl=e=>{e.cancelable&&e.preventDefault()};function Nce(e,t){return t}function AB(e){return(e==null?void 0:e.getLocaleTextFunc())??Nce}function Lce(e,t,n,o){const s=t[n];return e.getLocaleTextFunc()(n,typeof s=="function"?s(o):s,o)}function Vce(e){return(t,n,o)=>e({key:t,defaultValue:n,variableValues:o})}function Bce(e){return(t,n,o)=>{let s=e==null?void 0:e[t];if(s&&(o!=null&&o.length)){let r=0;for(;!(r>=o.length||s.indexOf("${variable}")===-1);)s=s.replace("${variable}",o[r++])}return s??n}}var Fi=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,n){this.localEventService||(this.localEventService=new Wu),this.localEventService.addEventListener(e,t,n)}removeEventListener(e,t,n){var o;(o=this.localEventService)==null||o.removeEventListener(e,t,n)}dispatchLocalEvent(e){var t;(t=this.localEventService)==null||t.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const n=[];for(const o of Object.keys(t)){const s=t[o];s&&n.push(this._setupListener(e,o,s))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let o;if($ce(e))e.__addEventListener(t,n),o=()=>(e.__removeEventListener(t,n),null);else{const s=Hce(e);e instanceof HTMLElement?Fce(e,t,n):s?e.addListener(t,n):e.addEventListener(t,n),o=s?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}setupPropertyListener(e,t){const{gos:n}=this;n.addPropertyEventListener(e,t);const o=()=>(n.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const n=e.join("-")+this.propertyListenerId++,o=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=s.changeSet.id}const r={type:"propertyChanged",changeSet:s.changeSet,source:s.source};t(r)};for(const s of e)this.setupPropertyListener(s,o)}getLocaleTextFunc(){return AB(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const n=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),n}createBean(e,t,n){return(t||this.stubContext).createBean(e,n)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function $ce(e){return e.__addEventListener!==void 0}function Hce(e){return e.eventServiceType==="global"}var qe=class extends Fi{},PB={};function v_(e,t){PB[t]||(e(),PB[t]=!0)}var Gce={pending:!1,funcs:[]},Uce={pending:!1,funcs:[]};function y_(e,t="setTimeout",n){const o=t==="raf"?Uce:Gce;if(o.funcs.push(e),o.pending)return;o.pending=!0;const s=()=>{const r=o.funcs.slice();o.funcs.length=0,o.pending=!1;for(const i of r)i()};t==="raf"?xa(n,s):window.setTimeout(s,0)}function Yo(e,t,n){let o;return function(...s){const r=this;window.clearTimeout(o),o=window.setTimeout(function(){e.isAlive()&&t.apply(r,s)},n)}}function kB(e,t){let n=0;return function(...o){const s=this,r=Date.now();r-n<t||(n=r,e.apply(s,o))}}function Wce(e,t,n,o=100){const s=Date.now();let r=null,i=!1;const a=()=>{r!=null&&(window.clearInterval(r),r=null)};e.addDestroyFunc(a);const l=()=>{const u=Date.now()-s>o;(t()||u)&&(n(),i=!0,a())};l(),i||(r=window.setInterval(l,10))}var FB=new Set(["__proto__","constructor","prototype"]);function zce(e,t){if(e!=null){if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(n.toString(),e[n]);return}for(const n of Object.keys(e).filter(o=>!FB.has(o)))t(n,e[n])}}function vs(e,t,n=!0,o=!1){ft(t)&&zce(t,(s,r)=>{let i=e[s];i!==r&&(o&&i==null&&r!=null&&typeof r=="object"&&r.constructor===Object&&(i={},e[s]=i),OB(r)&&OB(i)&&!Array.isArray(i)?vs(i,r,n,o):(n||r!==void 0)&&(e[s]=r))})}function OB(e){return typeof e=="object"&&e!==null}var w_=class Ga{static applyGlobalGridOptions(t){if(!Ga.gridOptions)return{...t};let n={};return vs(n,Ga.gridOptions,!0,!0),Ga.mergeStrategy==="deep"?vs(n,t,!0,!0):n={...n,...t},Ga.gridOptions.context&&(n.context=Ga.gridOptions.context),t.context&&(Ga.mergeStrategy==="deep"&&n.context&&vs(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(Ga.mergeStrategy==="deep"){const o=jce(t);if(o&&typeof o=="object"&&typeof n=="object")return Ga.applyGlobalGridOptions({[t]:n})[t]}return n}};w_.gridOptions=void 0,w_.mergeStrategy="shallow";var C_=w_;function jce(e){var t;return(t=C_.gridOptions)==null?void 0:t[e]}var Kce={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1},MB="https://www.ag-grid.com";function Al(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function Vp(e,...t){v_(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function $d(e,...t){v_(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var NB=new Set,Wy={},Hd={},zy,LB=!1,VB=!1,qce=!1;function Yce(e){const[t,n]=e.version.split(".")||[],[o,s]=zy.split(".")||[];return t===o&&n===s}function Xce(e){var o;zy||(zy=e.version);const t=s=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${s} Please update all modules to the same version.`;e.version?Yce(e)||$d(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${zy}.`)):$d(t(`'${e.moduleName}' is incompatible.`));const n=(o=e.validate)==null?void 0:o.call(e);n&&!n.isValid&&$d(`${n.message}`)}function Bp(e,t,n=!1){n||(LB=!0),Xce(e);const o=e.rowModels??["all"];NB.add(e);let s;t!==void 0?(VB=!0,Hd[t]===void 0&&(Hd[t]={}),s=Hd[t]):s=Wy;for(const r of o)s[r]===void 0&&(s[r]={}),s[r][e.moduleName]=e;if(e.dependsOn)for(const r of e.dependsOn)Bp(r,t,n)}function Zce(e){delete Hd[e]}function b_(e,t,n){const o=s=>{var r,i,a;return!!((r=Wy[s])!=null&&r[e])||!!((a=(i=Hd[t])==null?void 0:i[s])!=null&&a[e])};return o(n)||o("all")}function S_(){return VB}function Jce(e,t){const n=Hd[e]??{};return[...Object.values(Wy.all??{}),...Object.values(n.all??{}),...Object.values(Wy[t]??{}),...Object.values(n[t]??{})]}function Qce(){return new Set(NB)}function ede(){return LB}function BB(){return qce}var tde=class{static register(e){Bp(e,void 0)}static registerModules(e){for(const t of e)Bp(t,void 0)}},ct="34.3.1",$B=2e3,HB=100,GB="_version_",jy=null,Gd=`${MB}/javascript-data-grid`;function nde(e){jy=e}function ode(e){Gd=e}function UB(e,t,n){return(jy==null?void 0:jy(e,t))??[ade(e,t,n)]}function E_(e,t,n,o,s){e(`${o?"warning":"error"} #${t}`,...UB(t,n,s))}function sde(e){if(!e)return String(e);const t={};for(const n of Object.keys(e))typeof e[n]!="object"&&typeof e[n]!="function"&&(t[n]=e[n]);return JSON.stringify(t)}function rde(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=sde(e)),t}function Ky(e){return e===void 0?"undefined":e===null?"null":e}function __(e,t){return`${e}?${t.toString()}`}function ide(e,t,n){const o=Array.from(t.entries()).sort((r,i)=>i[1].length-r[1].length);let s=__(e,t);for(const[r,i]of o){if(r===GB)continue;const a=s.length-n;if(a<=0)break;const l="...",u=a+l.length,c=i.length-u>HB?i.slice(0,i.length-u)+l:i.slice(0,HB)+l;t.set(r,c),s=__(e,t)}return s}function WB(e,t){const n=new URLSearchParams;if(n.append(GB,ct),t)for(const r of Object.keys(t))n.append(r,rde(t[r]));const o=`${Gd}/errors/${e}`,s=__(o,n);return s.length<=$B?s:ide(o,n,$B)}var ade=(e,t,n)=>{const o=WB(e,t),s=`${n?n+`
194
194
  `:""}Visit ${o}`;return BB()?s:`${s}${n?"":`
195
195
  Alternatively register the ValidationModule to see the full message in the console.`}`};function Je(...e){E_(Vp,e[0],e[1],!0)}function _n(...e){E_($d,e[0],e[1],!1)}function $p(e,t,n){E_($d,e,t,!1,n)}function lde(e,t){const n=t[0];return`error #${n} `+UB(n,t[1],e).join(" ")}function Oi(...e){return lde(void 0,e)}function zB(e,t){return e.get("rowModelType")===t}function io(e,t){return zB(e,"clientSide")}function Ud(e,t){return zB(e,"serverSide")}function Xo(e,t){return e.get("domLayout")===t}function Ku(e){return Xy(e)!==void 0}function jB(e){return typeof e.get("getRowHeight")=="function"}function ude(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function Pl(e,t,n=!1,o){const{gos:s,environment:r}=e;if(o==null&&(o=r.getDefaultRowHeight()),jB(s)){if(n)return{height:o,estimated:!0};const l={node:t,data:t.data},u=s.getCallback("getRowHeight")(l);if(R_(u))return u===0&&Je(23),{height:Math.max(1,u),estimated:!1}}if(t.detail&&s.get("masterDetail"))return cde(s);const i=s.get("rowHeight");return{height:i&&R_(i)?i:o,estimated:!1}}function cde(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return R_(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function qu(e){const{environment:t,gos:n}=e,o=n.get("rowHeight");if(!o||Gn(o))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(Je(24),t.getDefaultRowHeight())}function R_(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function KB(e,t,n){const o=t[e.getDomDataKey()];return o?o[n]:void 0}function Yu(e,t,n,o){const s=e.getDomDataKey();let r=t[s];Gn(r)&&(r={},t[s]=r),r[n]=o}function Wd(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function qB(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Xo(e,"print"))}function Mi(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function T_(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function YB(e){return e.get("grandTotalRow")}function XB(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function ZB(e,t,n){return!!t.group&&!t.footer&&XB(e,n)}function zd(e){const t=e.getCallback("getRowId");return t===void 0?t:n=>{let o=t(n);return typeof o!="string"&&(v_(()=>Je(25,{id:o}),"getRowIdString"),o=String(o)),o}}function dde(e,t){const n=e.get("groupHideParentOfSingleChild");return!!(n===!0||n==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function hde(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function jd(e){return(e==null?void 0:e.checkboxes)??!0}function qy(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function Yy(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function D_(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function fde(e){return typeof e.get("rowSelection")!="string"}function Aa(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function JB(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const n=e.get("suppressRowClickSelection"),o=e.get("suppressRowDeselection");return n&&o?!1:n?"enableDeselection":o?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function pde(e){const t=JB(e);return t===!0||t==="enableSelection"}function gde(e){const t=JB(e);return t===!0||t==="enableDeselection"}function I_(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function Xy(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t==null?void 0:t.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function Hp(e){return Xy(e)==="multiRow"}function mde(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function Zy(e){const t=e.get("rowSelection");if(typeof t=="string"){const n=e.get("groupSelectsChildren"),o=e.get("groupSelectsFiltered");return n&&o?"filteredDescendants":n?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function QB(e,t=!0){const n=e.get("rowSelection");return typeof n!="object"?t?"all":void 0:n.mode==="multiRow"?n.selectAll:"all"}function vde(e){const t=e.get("rowSelection");return typeof t=="string"?!1:(t==null?void 0:t.mode)==="multiRow"?t.ctrlASelectsRows??!1:!1}function Gp(e){const t=Zy(e);return t==="descendants"||t==="filteredDescendants"}function e2(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function yde(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function Qs(e){return e.get("columnMenu")==="legacy"}function wde(e){return!Qs(e)}function Cde(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function Ot(e,t){return e.addCommon(t)}function t2({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var bde={resizable:!0,sortable:!0},Sde=0;function n2(){return Sde++}function kl(e){return e instanceof Xu}var Xu=class extends qe{constructor(e,t,n,o){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=n,this.primary=o,this.isColumn=!0,this.instanceId=n2(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new Wu,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Ip(n)}destroy(){var e;super.destroy(),(e=this.beans.rowSpanSvc)==null||e.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:n,colFlex:o}}=this;t==null||t.initCol(this);const s=e.hide;s!==void 0?this.visible=!s:this.visible=!e.initialHide,n==null||n.initCol(this),o==null||o.initCol(this)}setColDef(e,t,n){var s;const o=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),o&&((s=this.beans.rowSpanSvc)==null||s.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",n)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.setState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:n}}=this,o=e.get("suppressFieldDotNotation");this.fieldContainsDots=ft(t)&&t.includes(".")&&!o,this.tooltipFieldContainsDots=ft(n)&&n.includes(".")&&!o}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){var e;(e=this.beans.tooltipSvc)==null||e.initCol(this)}initRowSpan(){var e;this.colDef.spanRows&&((e=this.beans.rowSpanSvc)==null||e.register(this))}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:n=>{const o=e.recreateColDef(this.colDef);this.setColDef(o,o,n.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const n=e.width,o=e.initialWidth;return n!=null?t=n:o!=null?t=o:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){var t;return((t=this.beans.showRowGroupCols)==null?void 0:t.isRowGroupDisplayed(this,e))??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){var o,s,r;this.frameworkEventListenerService=(s=(o=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:s.call(o,this.frameworkEventListenerService,this.colEventSvc);const n=((r=this.frameworkEventListenerService)==null?void 0:r.wrap(e,t))??t;this.colEventSvc.addEventListener(e,n)}removeEventListener(e,t){var o;const n=((o=this.frameworkEventListenerService)==null?void 0:o.unwrap(e,t))??t;this.colEventSvc.removeEventListener(e,n)}createColumnFunctionCallbackParams(e){return Ot(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){var t;return((t=this.beans.cellNavigation)==null?void 0:t.isSuppressNavigable(this,e))??!1}isCellEditable(e){var t;return((t=this.beans.editSvc)==null?void 0:t.isCellEditable({rowNode:e,column:this}))??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){var t;return((t=this.beans.selectionSvc)==null?void 0:t.isCellCheckboxSelection(this,e))??!1}isSuppressPaste(e){var t;return this.isColumnFunc(e,((t=this.colDef)==null?void 0:t.suppressPaste)??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??bde[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const n=this.createColumnFunctionCallbackParams(e);return t(n)}return!1}createColumnEvent(e,t){return Ot(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return Gn(this.sort)}isSorting(){return ft(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){var e;return Je(261),!!((e=this.beans.colHover)!=null&&e.isHovered(this))}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const n=e===!0;this.visible!==n&&(this.visible=n,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e!=null&&e.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!(e!=null&&e.isPadding()))return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let n=!0;for(;e;){if(!e.isPadding()){n=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:n}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return Ot(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(Gn(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.colSpan(t);return Math.max(n,1)}getRowSpan(e){if(Gn(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.rowSpan(t);return Math.max(n,1)}setActualWidth(e,t,n=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),n||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchColEvent(e,t,n){const o=this.createColumnEvent(e,t);n&&vs(o,n),this.colEventSvc.dispatchEvent(o)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function ss(e){return e instanceof Jy}var Jy=class extends qe{constructor(e,t,n,o){super(),this.colGroupDef=e,this.groupId=t,this.padding=n,this.level=o,this.isColumn=!1,this.expandable=!1,this.instanceId=n2(),this.expandableListenerRemoveCallback=null,this.expanded=!!(e!=null&&e.openByDefault)}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(const t of this.children)kl(t)?e(t):ss(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)kl(t)?e.push(t):ss(t)&&t.addLeafColumns(e)}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);for(const t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(const t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,n=!1;const o=this.findChildrenRemovingPadding();for(let r=0,i=o.length;r<i;r++){const a=o[r];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,n=!0):l==="closed"?(t=!0,n=!0):(e=!0,t=!0)}const s=e&&t&&n;this.expandable!==s&&(this.expandable=s,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=n=>{for(const o of n)ss(o)&&o.isPadding()?t(o.children):e.push(o)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},Ede={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function o2(e,t,n){const o={},s=e.gos;return Object.assign(o,s.get("defaultColGroupDef")),Object.assign(o,t),s.validateColDef(o,n),o}var _de=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=i_(e);let n=0;for(;;){let o=e??t;if(o?n!==0&&(o+="_"+n):o=n,!this.existingKeys[o]){const s=String(o);return e&&n>0&&Je(273,{providedId:e,usedId:s}),this.existingKeys[s]=!0,s}n++}}};function kn(e){if(e!=null&&e.length)return e[e.length-1]}function Fl(e,t,n){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const o=e.length;if(o!==t.length)return!1;for(let s=0;s<o;s++)if(e[s]!==t[s]&&!(n!=null&&n(e[s],t[s])))return!1;return!0}function Up(e,t){if(e)for(const n of e)t(n)}function ti(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}function s2(e,t,n){for(let o=0;o<t.length;o++)ti(e,t[o]);for(let o=t.length-1;o>=0;o--)e.splice(n,0,t[o])}var Qy="ag-Grid-AutoColumn",r2="ag-Grid-SelectionColumn",i2="ag-Grid-RowNumbersColumn";function a2(e){const t=[],n=o=>{for(let s=0;s<o.length;s++){const r=o[s];kl(r)?t.push(r):ss(r)&&n(r.getChildren())}};return n(e),t}function Pa(e){return e.reduce((t,n)=>t+n.getActualWidth(),0)}function ew(e,t,n){const o={};if(!t)return;Oa(null,t,r=>{o[r.getInstanceId()]=r}),n&&Oa(null,n,r=>{o[r.getInstanceId()]=null});const s=Object.values(o).filter(r=>r!=null);e.context.destroyBeans(s)}function x_(e){return e.getId().startsWith(Qy)}function ka(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(r2))??!1}function Fa(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(i2))??!1}function Rde(e){return ka(e)||Fa(e)}function tw(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function Tde(e,t){return Fl(e,t,(n,o)=>n.getColId()===o.getColId())}function Dde(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function Kd(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function Wp(e,t){const n=e===t,o=e.getColDef()===t,s=e.getColId()==t;return n||o||s}var Ide=(e,t)=>(n,o)=>{const s={value1:void 0,value2:void 0};let r=!1;return e&&(e[n]!==void 0&&(s.value1=e[n],r=!0),ft(o)&&e[o]!==void 0&&(s.value2=e[o],r=!0)),!r&&t&&(t[n]!==void 0&&(s.value1=t[n]),ft(o)&&t[o]!==void 0&&(s.value2=t[o])),s},xde=(e,t)=>{ss(e)&&e.setupExpandable(),e.originalParent=t};function Ade(e,t=null,n,o,s){const r=new _de,{existingCols:i,existingGroups:a,existingColKeys:l}=Pde(o);r.addExistingKeys(l);const u=l2(e,t,0,n,i,r,a,s),{colGroupSvc:c}=e,d=(c==null?void 0:c.findMaxDepth(u,0))??0,h=c?c.balanceColumnTree(u,0,d,r):u;return Oa(null,h,xde),{columnTree:h,treeDepth:d}}function Pde(e){const t=[],n=[],o=[];return e&&Oa(null,e,s=>{if(ss(s)){const r=s;n.push(r)}else{const r=s;o.push(r.getId()),t.push(r)}}),{existingCols:t,existingGroups:n,existingColKeys:o}}function l2(e,t,n,o,s,r,i,a){if(!t)return[];const{colGroupSvc:l}=e,u=new Array(t.length);for(let c=0;c<u.length;c++){const d=t[c];l&&Lde(d)?u[c]=l.createProvidedColumnGroup(o,d,n,s,r,i,a):u[c]=kde(e,o,d,s,r,a)}return u}function kde(e,t,n,o,s,r){var l;const i=Ode(n,o);i&&(o==null||o.splice(i.idx,1));let a=i==null?void 0:i.column;if(a){const u=A_(e,n,a.getColId());a.setColDef(u,n,r),Fde(e,a,u,r)}else{const u=s.getUniqueKey(n.colId,n.field),c=A_(e,n,u);a=new Xu(c,n,u,t),e.context.createBean(a)}return(l=e.dataTypeSvc)==null||l.addColumnListeners(a),a}function u2(e,t,n,o,s,r,i,a){const{sortSvc:l,pinnedCols:u,colFlex:c}=e;n!==void 0&&t.setVisible(!n,a),l&&(l.updateColSort(t,o,a),s!==void 0&&l.setColSortIndex(t,s)),r!==void 0&&(u==null||u.setColPinned(t,r)),i!==void 0&&(c==null||c.setColFlex(t,i))}function Fde(e,t,n,o){u2(e,t,n.hide,n.sort,n.sortIndex,n.pinned,n.flex,o);const s=t.getFlex();if(!(s!=null&&s>0))if(n.width!=null)t.setActualWidth(n.width,o);else{const r=t.getActualWidth();t.setActualWidth(r,o)}}function Ode(e,t){if(t)for(let n=0;n<t.length;n++){const o=t[n].getUserProvidedColDef();if(!o)continue;if(e.colId!=null){if(t[n].getId()===e.colId)return{idx:n,column:t[n]};continue}if(e.field!=null){if(o.field===e.field)return{idx:n,column:t[n]};continue}if(o===e)return{idx:n,column:t[n]}}}function A_(e,t,n,o){const{gos:s,dataTypeSvc:r}=e,i={},a=s.get("defaultColDef");vs(i,a,!1,!0);const l=Mde(e,i,t,n);l&&Nde(e,l,i);const u=i.cellDataType;vs(i,t,!1,!0),u!==void 0&&(i.cellDataType=u);const c=s.get("autoGroupColumnDef"),d=Mi(s);return t.rowGroup&&c&&d&&vs(i,{sort:c.sort,initialSort:c.initialSort},!1,!0),r&&(r.postProcess(i),r.validateColDef(i)),s.validateColDef(i,n,o),i}function Mde(e,t,n,o){var i;const s=(i=e.dataTypeSvc)==null?void 0:i.updateColDefAndGetColumnType(t,n,o),r=n.type??s??t.type;return t.type=r,r?tw(r):void 0}function Nde(e,t,n){if(!t.length)return;const o=Object.assign({},Ede),s=e.gos.get("columnTypes")||{};for(const r of Object.keys(s)){const i=s[r];r in o?Je(34,{key:r}):(i.type&&Je(35),o[r]=i)}for(const r of t){const i=o[r.trim()];i?vs(n,i,!1,!0):Je(36,{t:r})}}function Lde(e){return e.children!==void 0}function Oa(e,t,n){if(t)for(let o=0;o<t.length;o++){const s=t[o];ss(s)&&Oa(s,s.getChildren(),n),n(s,e)}}function c2(e,t){const n=[],o=[],s=[];return e.forEach(i=>{const a=i.getColDef().lockPosition;a==="right"?s.push(i):a==="left"||a===!0?n.push(i):o.push(i)}),t.get("enableRtl")?[...s,...o,...n]:[...n,...o,...s]}function d2(e,t){let n=!0;return Oa(null,t,o=>{if(!ss(o))return;const s=o,r=s.getColGroupDef();if(!(r==null?void 0:r.marryChildren))return;const a=[];for(const h of s.getLeafColumns()){const f=e.indexOf(h);a.push(f)}const l=Math.max.apply(Math,a),u=Math.min.apply(Math,a),c=l-u,d=s.getLeafColumns().length-1;c>d&&(n=!1)}),n}function h2(e,t){if(!e||e.length==0)return;const n=t(e[0]);for(let o=1;o<e.length;o++)if(n!==t(e[o]))return;return n}function f2(e,t,n){if(!t.length)return;const o=t.length===1?t[0]:null,s=h2(t,r=>r.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:o,source:n})}function Vde(e,t,n){if(!t.length)return;const o=t.length===1?t[0]:null,s=h2(t,r=>r.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:o,source:n})}function Bde(e,t,n,o){e.dispatchEvent({type:t,columns:n,column:n&&n.length==1?n[0]:null,source:o})}function qd(e,t,n,o,s=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:s,finished:n,source:o})}function ni(e,t,n){var E;const{colModel:o,rowGroupColsSvc:s,pivotColsSvc:r,autoColSvc:i,selectionColSvc:a,colAnimation:l,visibleCols:u,pivotResultCols:c,environment:d,valueColsSvc:h,eventSvc:f,gos:p}=e,g=o.getColDefCols()??[],v=a==null?void 0:a.getColumns();if(!g.length&&!(v!=null&&v.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return Je(32),!1;const w=(_,I,T,F,L)=>{if(!_)return;const x=Ide(I,t.defaultState),P=x("flex").value1;if(u2(e,_,x("hide").value1,x("sort").value1,x("sortIndex").value1,x("pinned").value1,P,n),P==null){const k=x("width").value1;if(k!=null){const M=_.getColDef().minWidth??d.getDefaultColumnMinWidth();M!=null&&k>=M&&_.setActualWidth(k,n)}}L||!_.isPrimary()||(h==null||h.syncColumnWithState(_,n,x),s==null||s.syncColumnWithState(_,n,x,T),r==null||r.syncColumnWithState(_,n,x,F))},S=(_,I,T)=>{var se,Z;const F=p2(e,n),L=I.slice(),x={},P={},k=[],M=[],N=[];let B=0;const z=(s==null?void 0:s.columns.slice())??[],oe=(r==null?void 0:r.columns.slice())??[];for(const A of _){const j=A.colId;if(j.startsWith(Qy)){k.push(A),N.push(A);continue}if(ka(j)){M.push(A),N.push(A);continue}const ge=T(j);ge?(w(ge,A,x,P,!1),ti(L,ge)):(N.push(A),B+=1)}const ie=A=>w(A,null,x,P,!1);L.forEach(ie),s==null||s.sortColumns(m2.bind(s,x,z)),r==null||r.sortColumns(m2.bind(r,P,oe)),o.refreshCols(!1,n);const te=(A,j,ne=[])=>{for(const ge of j){const xe=A(ge.colId);ti(ne,xe),w(xe,ge,null,null,!0)}ne.forEach(ie)};return te(A=>(i==null?void 0:i.getColumn(A))??null,k,(se=i==null?void 0:i.getColumns())==null?void 0:se.slice()),te(A=>(a==null?void 0:a.getColumn(A))??null,M,(Z=a==null?void 0:a.getColumns())==null?void 0:Z.slice()),Hde(t,o,p),u.refresh(n),f.dispatchEvent({type:"columnEverythingChanged",source:n}),F(),{unmatchedAndAutoStates:N,unmatchedCount:B}};l==null||l.start();let{unmatchedAndAutoStates:b,unmatchedCount:y}=S(t.state||[],g,_=>o.getColDefCol(_));if(b.length>0||ft(t.defaultState)){const _=((E=c==null?void 0:c.getPivotResultCols())==null?void 0:E.list)??[];y=S(b,_,I=>(c==null?void 0:c.getPivotResultCol(I))??null).unmatchedCount}return l==null||l.finish(),y===0}function $de(e,t){var S,b;const{colModel:n,autoColSvc:o,selectionColSvc:s,eventSvc:r,gos:i}=e,a=n.getColDefCols();if(!(a!=null&&a.length))return;const l=n.getColDefColTree(),u=a2(l),c=[];let d=1e3,h=1e3;const f=y=>{const E=g2(y);Gn(E.rowGroupIndex)&&E.rowGroup&&(E.rowGroupIndex=d++),Gn(E.pivotIndex)&&E.pivot&&(E.pivotIndex=h++),c.push(E)};(S=o==null?void 0:o.getColumns())==null||S.forEach(f),(b=s==null?void 0:s.getColumns())==null||b.forEach(f),u==null||u.forEach(f),ni(e,{state:c},t);const p=(o==null?void 0:o.getColumns())??[],w=[...(s==null?void 0:s.getColumns())??[],...p,...a].map(y=>({colId:y.colId}));ni(e,{state:w,applyOrder:!0},t),r.dispatchEvent(Ot(i,{type:"columnsReset",source:t}))}function p2(e,t){const{rowGroupColsSvc:n,pivotColsSvc:o,valueColsSvc:s,colModel:r,sortSvc:i,eventSvc:a}=e,l={rowGroupColumns:(n==null?void 0:n.columns.slice())??[],pivotColumns:(o==null?void 0:o.columns.slice())??[],valueColumns:(s==null?void 0:s.columns.slice())??[]},u=nw(e),c={};for(const d of u)c[d.colId]=d;return()=>{const d=(_,I,T,F)=>{const L=I.map(F),x=T.map(F);if(Fl(L,x))return;const k=new Set(I);for(const N of T)k.delete(N)||k.add(N);const M=[...k];a.dispatchEvent({type:_,columns:M,column:M.length===1?M[0]:null,source:t})},h=_=>{const I=[];return r.forAllCols(T=>{const F=c[T.getColId()];F&&_(F,T)&&I.push(T)}),I},f=_=>_.getColId();d("columnRowGroupChanged",l.rowGroupColumns,(n==null?void 0:n.columns)??[],f),d("columnPivotChanged",l.pivotColumns,(o==null?void 0:o.columns)??[],f);const g=h((_,I)=>{const T=_.aggFunc!=null,F=T!=I.isValueActive(),L=T&&_.aggFunc!=I.getAggFunc();return F||L});g.length>0&&Bde(a,"columnValueChanged",g,t),qd(a,h((_,I)=>_.width!=I.getActualWidth()),!0,t),f2(a,h((_,I)=>_.pinned!=I.getPinned()),t),Vde(a,h((_,I)=>_.hide==I.isVisible()),t);const y=h((_,I)=>_.sort!=I.getSort()||_.sortIndex!=I.getSortIndex());y.length>0&&(i==null||i.dispatchSortChangedEvents(t,y));const E=nw(e);Ude(u,E,t,r,a)}}function nw(e){const{colModel:t,rowGroupColsSvc:n,pivotColsSvc:o}=e,s=t.getColDefCols();if(Gn(s)||!t.isAlive())return[];const r=n==null?void 0:n.columns,i=o==null?void 0:o.columns,a=[],l=c=>{const d=c.isRowGroupActive()&&r?r.indexOf(c):null,h=c.isPivotActive()&&i?i.indexOf(c):null,f=c.isValueActive()?c.getAggFunc():null,p=c.getSort()!=null?c.getSort():null,g=c.getSortIndex()!=null?c.getSortIndex():null;a.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:p,sortIndex:g,aggFunc:f,rowGroup:c.isRowGroupActive(),rowGroupIndex:d,pivot:c.isPivotActive(),pivotIndex:h,flex:c.getFlex()??null})};t.forAllCols(c=>l(c));const u=new Map(t.getCols().map((c,d)=>[c.getColId(),d]));return a.sort((c,d)=>{const h=u.has(c.colId)?u.get(c.colId):-1,f=u.has(d.colId)?u.get(d.colId):-1;return h-f}),a}function g2(e){const t=(p,g)=>p??g??null,n=e.getColDef(),o=t(n.sort,n.initialSort),s=t(n.sortIndex,n.initialSortIndex),r=t(n.hide,n.initialHide),i=t(n.pinned,n.initialPinned),a=t(n.width,n.initialWidth),l=t(n.flex,n.initialFlex);let u=t(n.rowGroupIndex,n.initialRowGroupIndex),c=t(n.rowGroup,n.initialRowGroup);u==null&&!c&&(u=null,c=null);let d=t(n.pivotIndex,n.initialPivotIndex),h=t(n.pivot,n.initialPivot);d==null&&!h&&(d=null,h=null);const f=t(n.aggFunc,n.initialAggFunc);return{colId:e.getColId(),sort:o,sortIndex:s,hide:r,pinned:i,width:a,flex:l,rowGroup:c,rowGroupIndex:u,pivot:h,pivotIndex:d,aggFunc:f}}function Hde(e,t,n){if(!e.applyOrder||!e.state)return;const o=[];for(const s of e.state)s.colId!=null&&o.push(s.colId);Gde(t.cols,o,t,n)}function Gde(e,t,n,o){if(e==null)return;let s=[];const r={};for(const a of t){if(r[a])continue;const l=e.map[a];l&&(s.push(l),r[a]=!0)}let i=0;for(const a of e.list){const l=a.getColId();if(r[l]!=null)continue;l.startsWith(Qy)?s.splice(i++,0,a):s.push(a)}if(s=c2(s,o),!d2(s,n.getColTree())){Je(39);return}e.list=s}function Ude(e,t,n,o,s){const r={};for(const c of t)r[c.colId]=c;const i={};for(const c of e)r[c.colId]&&(i[c.colId]=!0);const a=e.filter(c=>i[c.colId]),l=t.filter(c=>i[c.colId]),u=[];l.forEach((c,d)=>{const h=a==null?void 0:a[d];if(h&&h.colId!==c.colId){const f=o.getCol(h.colId);f&&u.push(f)}}),u.length&&s.dispatchEvent({type:"columnMoved",columns:u,column:u.length===1?u[0]:null,finished:!0,source:n})}var m2=(e,t,n,o)=>{const s=e[n.getId()],r=e[o.getId()],i=s!=null,a=r!=null;if(i&&a)return s-r;if(i)return-1;if(a)return 1;const l=t.indexOf(n),u=t.indexOf(o),c=l>=0,d=u>=0;return c&&d?l-u:c?-1:1},Wde=class extends qe{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(Kd(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),Kd(e.source)))}createColsFromColDefs(e){var S,b,y;const{beans:t}=this,{valueCache:n,colAutosize:o,rowGroupColsSvc:s,pivotColsSvc:r,valueColsSvc:i,visibleCols:a,eventSvc:l,groupHierarchyColSvc:u}=t,c=this.colDefs?p2(t,e):void 0;n==null||n.expire();const d=(S=this.colDefCols)==null?void 0:S.list,h=(b=this.colDefCols)==null?void 0:b.tree,f=Ade(t,this.colDefs,!0,h,e);ew(t,(y=this.colDefCols)==null?void 0:y.tree,f.columnTree);const p=f.columnTree,g=f.treeDepth,v=a2(p),w={};for(const E of v)w[E.getId()]=E;this.colDefCols={tree:p,treeDepth:g,list:v,map:w},this.createColumnsForService([u],this.colDefCols,e),s==null||s.extractCols(e,d),r==null||r.extractCols(e,d),i==null||i.extractCols(e,d),this.ready=!0,this.refreshCols(!0,e),a.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),c&&(this.changeEventsDispatching=!0,c(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&(o==null||o.applyAutosizeStrategy())}refreshCols(e,t){var v;if(!this.colDefCols)return;const n=(v=this.cols)==null?void 0:v.tree;this.saveColOrder();const{autoColSvc:o,selectionColSvc:s,rowNumbersSvc:r,quickFilter:i,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:u,visibleCols:c,colViewport:d,eventSvc:h}=this.beans,f=this.selectCols(a,this.colDefCols);this.createColumnsForService([o,s,r],f,t);const p=ude(this.gos,this.showingPivotResult);(!e||p)&&this.restoreColOrder(f),this.positionLockedCols(f),l==null||l.refresh(),i==null||i.refreshCols(),this.setColSpanActive(),u==null||u.setAutoHeightActive(f),c.clear(),d.clear(),!Fl(n,this.cols.tree)&&h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,n){for(const o of e)o&&(o.createColumns(t,s=>{this.lastOrder=s(this.lastOrder),this.lastPivotOrder=s(this.lastPivotOrder)},n),o.addColumns(t))}selectCols(e,t){const n=(e==null?void 0:e.getPivotResultCols())??null;this.showingPivotResult=n!=null;const{map:o,list:s,tree:r,treeDepth:i}=n??t;return this.cols={list:s.slice(),map:{...o},tree:r.slice(),treeDepth:i},n&&(n.list.some(l=>{var u;return((u=this.cols)==null?void 0:u.map[l.getColId()])!==void 0})||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{valueColsSvc:e,selectionColSvc:t,gos:n}=this.beans,o=this.isPivotMode()&&!this.showingPivotResult,s=t==null?void 0:t.isSelectionColumnEnabled(),r=n.get("rowNumbers"),i=e==null?void 0:e.columns;return this.cols.list.filter(l=>{const u=x_(l);if(o){const c=i==null?void 0:i.includes(l);return u||c||s&&ka(l)||r&&Fa(l)}else return u||l.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,n){ni(this.beans,{state:e.map(o=>({colId:typeof o=="string"?o:o.getColId(),hide:!t}))},n)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const n=t.filter(d=>e.map[d.getId()]!=null);if(n.length===0)return;if(n.length===e.list.length){e.list=n;return}const o=d=>{const h=d.getOriginalParent();return h?h.getChildren().length>1?!0:o(h):!1};if(!n.some(d=>o(d))){const d=new Set(n);for(const h of e.list)d.has(h)||n.push(h);e.list=n;return}const s=new Map;for(let d=0;d<n.length;d++){const h=n[d];s.set(h,d)}const r=e.list.filter(d=>!s.has(d));if(r.length===0){e.list=n;return}const i=(d,h)=>{const f=h?h.getOriginalParent():d.getOriginalParent();if(!f)return null;let p=null,g=null;for(const v of f.getChildren())if(!(v===h||v===d)){if(v instanceof Xu){const w=s.get(v);if(w==null)continue;(p==null||p<w)&&(p=w,g=v);continue}v.forEachLeafColumn(w=>{const S=s.get(w);S!=null&&(p==null||p<S)&&(p=S,g=w)})}return g??i(d,f)},a=[],l=new Map;for(const d of r){const h=i(d,null);if(h==null){a.push(d);continue}const f=l.get(h);f===void 0?l.set(h,d):Array.isArray(f)?f.push(d):l.set(h,[f,d])}const u=new Array(e.list.length);let c=u.length-1;for(let d=a.length-1;d>=0;d--)u[c--]=a[d];for(let d=n.length-1;d>=0;d--){const h=n[d],f=l.get(h);if(f)if(Array.isArray(f))for(let p=f.length-1;p>=0;p--){const g=f[p];u[c--]=g}else u[c--]=f;u[c--]=h}e.list=u}positionLockedCols(e){e.list=c2(e.list,this.gos)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=((e=this.cols)==null?void 0:e.list)??null:this.lastOrder=((t=this.cols)==null?void 0:t.list)??null}getColumnDefs(e){var t,n;return this.colDefCols&&((n=this.beans.colDefFactory)==null?void 0:n.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,((t=this.cols)==null?void 0:t.list)??[],e))}setColSpanActive(){var e;this.colSpanActive=!!((e=this.cols)!=null&&e.list.some(t=>t.getColDef().colSpan!=null))}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);const{visibleCols:n,eventSvc:o}=this.beans;n.refresh(t),o.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){var t;const e=(t=this.beans.pivotColsSvc)==null?void 0:t.columns;return this.pivotMode&&!!(e!=null&&e.length)}recreateColumnDefs(e){var n;if(!this.cols)return;(n=this.beans.autoColSvc)==null||n.updateColumns(e);const t=Kd(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;ew(this.beans,(e=this.colDefCols)==null?void 0:e.tree),super.destroy()}getColTree(){var e;return((e=this.cols)==null?void 0:e.tree)??[]}getColDefColTree(){var e;return((e=this.colDefCols)==null?void 0:e.tree)??[]}getColDefCols(){var e;return((e=this.colDefCols)==null?void 0:e.list)??null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}forAllCols(e){var r,i,a,l,u;const{pivotResultCols:t,autoColSvc:n,selectionColSvc:o,groupHierarchyColSvc:s}=this.beans;Up((r=this.colDefCols)==null?void 0:r.list,e),Up((i=n==null?void 0:n.columns)==null?void 0:i.list,e),Up((a=o==null?void 0:o.columns)==null?void 0:a.list,e),Up((l=s==null?void 0:s.columns)==null?void 0:l.list,e),Up((u=t==null?void 0:t.getPivotResultCols())==null?void 0:u.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){var t;return((t=this.cols)==null?void 0:t.map[e])??null}getColFromCollection(e,t){if(t==null)return null;const{map:n,list:o}=t;if(typeof e=="string"&&n[e])return n[e];for(let a=0;a<o.length;a++)if(Wp(o[a],e))return o[a];const{autoColSvc:s,selectionColSvc:r,groupHierarchyColSvc:i}=this.beans;return(s==null?void 0:s.getColumn(e))??(r==null?void 0:r.getColumn(e))??(i==null?void 0:i.getColumn(e))??null}},v2=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let n;return typeof t!="number"?n=0:n=t+1,this.existingIds[e]=n,n}};function zp(e,t,n){return n&&e.addDestroyFunc(()=>t.destroyBean(n)),n??e}var dt=null;function y2(e){return typeof(e==null?void 0:e.getGui)=="function"}var w2=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){var o;if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){for(const r of s)this.toggleCss(r,t);return}}this.cssClassStates[e]!==t&&e.length&&((o=this.getGui())==null||o.classList.toggle(e,t),this.cssClassStates[e]=t)}},zde=0,jp=class extends Fi{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=zde++,this.cssManager=new w2(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(n=>[n.selector,n])),e&&this.setTemplate(e)}preConstruct(){var t,n;this.wireTemplate(this.getGui());const e="component-"+((n=(t=Object.getPrototypeOf(this))==null?void 0:t.constructor)==null?void 0:n.name);for(const o of this.css??[])this.beans.environment.addGlobalCSS(o,e)}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(TB):null}applyElementsToComponent(e,t,n,o=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===dt)this[t]=o??e;else{const r=n==null?void 0:n[t];if(!this.suppressDataRefValidation&&!r)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${s}`)}}}createChildComponentsFromTags(e,t){const n=[];for(const o of e.childNodes??[])n.push(o);for(const o of n){if(!(o instanceof HTMLElement))continue;const s=this.createComponentFromElement(o,r=>{const i=r.getGui();if(i)for(const a of o.attributes??[])i.setAttribute(a.name,a.value)},t);if(s){if(s.addItems&&o.children.length){this.createChildComponentsFromTags(o,t);const r=Array.prototype.slice.call(o.children);s.addItems(r)}this.swapComponentForNode(s,e,o)}else o.childNodes&&this.createChildComponentsFromTags(o,t)}}createComponentFromElement(e,t,n){const o=e.nodeName,s=this.getDataRefAttribute(e),r=o.indexOf("AG-")===0,i=r?this.componentSelectors.get(o):null;let a=null;if(i){const l=n&&s?n[s]:void 0;a=new i.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(r)throw new Error(`selector: ${o}`);return this.applyElementsToComponent(e,s,n,a),a}swapComponentForNode(e,t,n){const o=e.getGui();t.replaceChild(o,n),t.insertBefore(document.createComment(n.nodeName),o),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(const n of e)n.setAttribute("tabindex",t.toString())}setTemplate(e,t,n){let o;typeof e=="string"||e==null?o=c_(e):o=Mp(e),this.setTemplateFromElement(o,t,n)}setTemplateFromElement(e,t,n,o=!1){if(this.eGui=e,this.suppressDataRefValidation=o,t)for(let s=0;s<t.length;s++){const r=t[s];this.componentSelectors.set(r.selector,r)}this.wireTemplate(e,n)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let n=t;return e==null?null:(n||(n=this.eGui),f_(e)?{element:e,parent:n}:{element:e.getGui(),parent:n})}prependChild(e,t){const{element:n,parent:o}=this.getContainerAndElement(e,t)||{};!n||!o||o.insertAdjacentElement("afterbegin",n)}appendChild(e,t){const{element:n,parent:o}=this.getContainerAndElement(e,t)||{};!n||!o||o.appendChild(n)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:n}=t;Tce(this.eGui,e,{skipAriaHidden:n})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:n}=t;Un(this.eGui,e,{skipAriaHidden:n});const o={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(o)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,n){this.eGui.addEventListener(e,t,n),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}},Cn=class extends jp{};function C2(e){return typeof e=="object"&&!!e.component}function jde(e,t){return new Yn(n=>{n(window.setInterval(e,t))})}var Yn=class Sg{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(n=>this.onDone(n),n=>this.onReject(n))}static all(t){return t.length?new Sg(n=>{let o=t.length;const s=new Array(o);t.forEach((r,i)=>{r.then(a=>{s[i]=a,o--,o===0&&n(s)})})}):Sg.resolve()}static resolve(t=null){return new Sg(n=>n(t))}then(t){return new Sg(n=>{this.status===1?n(t(this.resolution)):this.waiters.push(o=>n(t(o)))})}onDone(t){this.status=1,this.resolution=t;for(const n of this.waiters)n(t)}onReject(t){}};function Kde(e){return e?e.prototype&&"getGui"in e.prototype:!1}function b2(e,t,n,o){const{name:s}=n;let r,i,a,l,u,c;if(t){const d=t,h=d[s+"Selector"],f=h?h(o):null,p=g=>{typeof g=="string"?r=g:g!=null&&g!==!0&&(e.isFrameworkComponent(g)?a=g:i=g)};f?(p(f.component),l=f.params,u=f.popup,c=f.popupPosition):p(d[s])}return{compName:r,jsComp:i,fwComp:a,paramsFromSelector:l,popupFromSelector:u,popupPositionFromSelector:c}}var qde=class extends qe{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,n,o=!1){return this.getCompDetails(this.gridOptions,e,t,n,o)}getCompDetails(e,t,n,o,s=!1){var b;const{name:r,cellRenderer:i}=t;let{compName:a,jsComp:l,fwComp:u,paramsFromSelector:c,popupFromSelector:d,popupPositionFromSelector:h}=b2(this.beans.frameworkOverrides,e,t,o),f,p;const g=y=>{const E=this.registry.getUserComponent(r,y);E&&(l=E.componentFromFramework?void 0:E.component,u=E.componentFromFramework?E.component:void 0,f=E.params,p=E.processParams)};if(a!=null&&g(a),l==null&&u==null&&n!=null&&g(n),l&&i&&!Kde(l)&&(l=(b=this.agCompUtils)==null?void 0:b.adaptFunction(t,l)),!l&&!u){const{validation:y}=this.beans;s&&(a!==n||!n)?a?y!=null&&y.isProvidedUserComp(a)||_n(50,{compName:a}):n?y||_n(260,{...this.gos.getModuleErrorParams(),propName:r,compName:n}):_n(216,{name:r}):n&&!y&&_n(146,{comp:n});return}const v=this.mergeParams(e,t,o,c,f,p),w=l==null,S=l??u;return{componentFromFramework:w,componentClass:S,params:v,type:t,popupFromSelector:d,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(S,w,v,t)}}newAgStackInstance(e,t,n,o){var a;const s=!t;let r;s?r=new e:r=this.frameworkCompWrapper.wrap(e,o.mandatoryMethods,o.optionalMethods,o),this.createBean(r);const i=(a=r.init)==null?void 0:a.call(r,n);return i==null?Yn.resolve(r):i.then(()=>r)}mergeParams(e,t,n,o=null,s,r){const i={...n,...s},a=e,l=a==null?void 0:a[t.name+"Params"];if(typeof l=="function"){const u=l(n);vs(i,u)}else typeof l=="object"&&vs(i,l);return vs(i,o),r?r(i):i}},Yde={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},Xde={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},Zde={name:"headerComponent",optionalMethods:["refresh"]},Jde={name:"innerHeaderComponent"},Qde={name:"innerHeaderGroupComponent"},ehe={name:"headerGroupComponent"},the={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},nhe={name:"loadingCellRenderer",cellRenderer:!0},ohe={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},she={name:"loadingOverlayComponent",optionalMethods:["refresh"]},rhe={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},ihe={name:"tooltipComponent"},P_={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},ahe={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},lhe={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},uhe={name:"loadingCellRenderer",cellRenderer:!0},che={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},dhe={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function hhe(e,t){return e.getCompDetailsFromGridOptions(Xde,"agDragAndDropImage",t,!0)}function fhe(e,t,n){return e.getCompDetails(t,Zde,"agColumnHeader",n)}function phe(e,t,n){return e.getCompDetails(t,Jde,void 0,n)}function ghe(e,t){const n=t.columnGroup.getColGroupDef();return e.getCompDetails(n,ehe,"agColumnGroupHeader",t)}function mhe(e,t,n){return e.getCompDetails(t,Qde,void 0,n)}function vhe(e,t){return e.getCompDetailsFromGridOptions(lhe,void 0,t,!0)}function yhe(e,t){return e.getCompDetailsFromGridOptions(uhe,"agLoadingCellRenderer",t,!0)}function whe(e,t){return e.getCompDetailsFromGridOptions(che,"agGroupRowRenderer",t,!0)}function Che(e,t){return e.getCompDetailsFromGridOptions(dhe,"agDetailCellRenderer",t,!0)}function S2(e,t,n){return e.getCompDetails(t,the,void 0,n)}function E2(e,t,n){return e.getCompDetails(t,nhe,"agSkeletonCellRenderer",n,!0)}function _2(e,t,n){return e.getCompDetails(t,ohe,"agCellEditor",n,!0)}function bhe(e,t,n,o){const s=t.filter;return C2(s)&&(t={filter:s.component,filterParams:t.filterParams}),e.getCompDetails(t,P_,o,n,!0)}function She(e,t,n){return e.getCompDetails(t,Yde,"agDateInput",n,!0)}function Ehe(e,t){return e.getCompDetailsFromGridOptions(she,"agLoadingOverlay",t,!0)}function _he(e,t){return e.getCompDetailsFromGridOptions(rhe,"agNoRowsOverlay",t,!0)}function Rhe(e,t){return e.getCompDetails(t.colDef,ihe,"agTooltipComponent",t,!0)}function The(e,t,n,o){return e.getCompDetails(t,ahe,o,n)}function R2(e,t){return b2(e,t,P_)}function k_(e,t,n){return e.mergeParams(t,P_,n)}function Kp(e){const t=e;return(t==null?void 0:t.getFrameworkComponentInstance)!=null?t.getFrameworkComponentInstance():e}function Dhe(e){return typeof e=="object"&&!!e.getComp}var Ve={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},F_=class extends jp{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;(e==null?void 0:e.isAlive())&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},O_,M_,N_,L_,V_,B_,$_;function Ol(){return O_===void 0&&(O_=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),O_}function T2(){return M_===void 0&&(M_=/(firefox)/i.test(navigator.userAgent)),M_}function D2(){return N_===void 0&&(N_=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),N_}function Zu(){return L_===void 0&&(L_=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),L_}function H_(e){if(!e)return null;const t=e.tabIndex,n=e.getAttribute("tabIndex");return t===-1&&(n===null||n===""&&!T2())?null:t.toString()}function Ihe(){if($_!==void 0)return $_;if(!document.body)return-1;let e=1e6;const t=T2()?6e6:1e9,n=document.createElement("div");for(document.body.appendChild(n);;){const o=e*2;if(n.style.height=o+"px",o>t||n.clientHeight!==o)break;e=o}return n.remove(),$_=e,e}function xhe(){return B_==null&&I2(),B_}function I2(){const 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);let n=t.offsetWidth-t.clientWidth;n===0&&t.clientWidth===0&&(n=null),t.parentNode&&t.remove(),n!=null&&(B_=n,V_=n===0)}function x2(){return V_==null&&I2(),V_}var G_="T",Ahe=new RegExp(`[${G_} ]`),Phe=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${G_}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function Ni(e,t){return e.toString().padStart(t,"0")}function er(e,t=!0,n=G_){if(!e)return null;let o=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>Ni(s,2)).join("-");return t&&(o+=n+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>Ni(s,2)).join(":")),o}function ow(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),Ni(e.getDate(),2),Ni(e.getHours(),2),`:${Ni(e.getMinutes(),2)}`,`:${Ni(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,Ni(e.getDate(),2)].map(String):null}var U_=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"},A2=["January","February","March","April","May","June","July","August","September","October","November","December"],W_=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function z_(e,t){if(t==null)return er(e,!1);const n=Ni(e.getFullYear(),4),o={YYYY:()=>n.slice(n.length-4,n.length),YY:()=>n.slice(n.length-2,n.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>A2[e.getMonth()],MMM:()=>A2[e.getMonth()].slice(0,3),MM:()=>Ni(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${U_(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${U_(e.getDate())}`,DD:()=>Ni(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>W_[e.getDay()],ddd:()=>W_[e.getDay()].slice(0,3),dd:()=>W_[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${U_(e.getDay())}`,d:()=>`${e.getDay()}`},s=new RegExp(Object.keys(o).join("|"),"g");return t.replace(s,r=>r in o?o[r]():r)}function sw(e,t=!1){return!!As(e,t)}function khe(e){return sw(e,!0)}function As(e,t=!1,n){if(!e||!n&&!Phe.test(e))return null;const[o,s]=e.split(Ahe);if(!o)return null;const r=o.split("-").map(f=>Number.parseInt(f,10));if(r.filter(f=>!isNaN(f)).length!==3)return null;const[i,a,l]=r,u=new Date(i,a-1,l);if(u.getFullYear()!==i||u.getMonth()!==a-1||u.getDate()!==l||!s&&t)return null;if(!s||s==="00:00:00")return u;const[c,d,h]=s.split(":").map(f=>Number.parseInt(f,10));if(c>=0&&c<24)u.setHours(c);else if(t)return null;if(d>=0&&d<60)u.setMinutes(d);else if(t)return null;if(h>=0&&h<60)u.setSeconds(h);else if(t)return null;return u}function j_(e){const{inputValue:t,allSuggestions:n,hideIrrelevant:o,filterByPercentageOfBestMatch:s}=e;let r=(n??[]).map((l,u)=>({value:l,relevance:Fhe(t,l),idx:u}));if(r.sort((l,u)=>l.relevance-u.relevance),o&&(r=r.filter(l=>l.relevance<Math.max(l.value.length,t.length))),r.length>0&&s&&s>0){const u=r[0].relevance*s;r=r.filter(c=>u-c.relevance<0)}const i=[],a=[];for(const l of r)i.push(l.value),a.push(l.idx);return{values:i,indices:a}}function Fhe(e,t){e.length<t.length&&([e,t]=[t,e]);let n=[],o=[];const s=e.length,r=t.length;for(let a=0;a<=r;a++)n[a]=a;let i=0;for(let a=1;a<=s;a++){o[0]=a;for(let l=1;l<=r;l++){const u=e[a-1],c=t[l-1];if(u.toLocaleLowerCase()===c.toLocaleLowerCase())++i,u===c&&++i,a>1&&l>1&&e[a-2].toLocaleLowerCase()===t[l-2].toLocaleLowerCase()&&(++i,e[a-2]===t[l-2]&&++i),a<s/2-10&&++i,o[l]=n[l-1];else{const d=o[l-1],h=n[l],f=n[l-1];o[l]=1+Math.min(d,h,f)}}[n,o]=[o,n]}return n[r]/(i+1)}function P2(e){var n;return e.altKey||e.ctrlKey||e.metaKey?!1:((n=e.key)==null?void 0:n.length)===1}var K_=!1,rw=0;function Ohe(e){rw>0||(e.addEventListener("keydown",iw),e.addEventListener("mousedown",iw))}function Mhe(e){rw>0||(e.removeEventListener("keydown",iw),e.removeEventListener("mousedown",iw))}function iw(e){const t=K_,n=e.type==="keydown";n&&(e.ctrlKey||e.metaKey||e.altKey)||t!==n&&(K_=n)}function Nhe(e){const t=$o(e);return Ohe(t),rw++,()=>{rw--,Mhe(t)}}function Lhe(){return K_}function Yd(e,t,n=!1){const o=Rce;let s=wB;t&&(s+=", "+t),n&&(s+=', [tabindex="-1"]');const r=Array.prototype.slice.apply(e.querySelectorAll(o)).filter(l=>Pi(l)),i=Array.prototype.slice.apply(e.querySelectorAll(s));return i.length?((l,u)=>l.filter(c=>u.indexOf(c)===-1))(r,i):r}function Ju(e,t=!1,n=!1,o=!1){const s=Yd(e,o?".ag-tab-guard":null,n),r=t?kn(s):s[0];return r?(r.focus({preventScroll:!0}),!0):!1}function Qu(e,t,n,o){const s=Yd(t,n?':not([tabindex="-1"])':null),r=Kn(e);let i;n?i=s.findIndex(l=>l.contains(r)):i=s.indexOf(r);const a=i+(o?-1:1);return a<0||a>=s.length?null:s[a]}function k2(e,t=5){let n=0;for(;e&&H_(e)===null&&++n<=t;)e=e.parentElement;return H_(e)===null?null:e}var Vhe=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",Bhe=class extends jp{constructor(e,t,n){super(t,n),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(Vhe)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:n,labelAlignment:o,disabled:s}=this.config;s!=null&&this.setDisabled(s),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),n!=null&&this.setLabelWidth(n),this.setLabelAlignment(o||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;qo(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(Un(t,!1),Dl(t,"presentation")):(Un(t,!0),Dl(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const n=this.getGui().classList;return n.toggle("ag-label-align-left",e==="left"),n.toggle("ag-label-align-right",e==="right"),n.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(Gy(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return Pp(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},F2=class extends Bhe{constructor(e,t,n,o){super(e,t,n),this.className=o}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:n}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),n!=null&&this.onValueChange(n),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),n=this.getLabel();n==null||n==""||uce(e)!==null?xp(e,""):xp(e,t??"")}setAriaLabel(e){return Bd(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return ki(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function $he(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var ec=class extends F2{constructor(e,t,n="text",o="input"){super(e,(e==null?void 0:e.template)??$he(o),[],t),this.inputType=n,this.displayFieldTag=o,this.eLabel=dt,this.eWrapper=dt,this.eInput=dt}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:n,className:o}=this;e.classList.add(`${o}-label`),t.classList.add(`${o}-input-wrapper`),n.classList.add(`${o}-input`),this.addCss("ag-input-field"),n.id=n.id||`ag-${this.getCompId()}-input`;const{inputName:s,inputWidth:r}=this.config;s!=null&&this.setInputName(s),r!=null&&this.setInputWidth(r),this.addInputListeners(),this.activateTabIndex([n])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,Js(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return Gy(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return Js(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Bd(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Pp(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Js(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Js(this.eInput,"autocomplete",t)}return this}},q_=class extends ec{constructor(e,t="ag-checkbox",n="checkbox"){super(e,t,n),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const n=this.eInput;n.checked=e,n.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,n){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:n});const o=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:o.id,name:o.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),n=this.selected=e.target.checked;this.refreshSelectedClass(n),this.dispatchChange(n,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},Y_={selector:"AG-CHECKBOX",component:q_},Hhe=class extends q_{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},tc=class extends ec{constructor(e,t="ag-text-field",n="text"){super(e,t,n)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const n=this.eInput;return n.value!==e&&(n.value=ft(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=n=>{P2(n)&&n.key&&!e.test(n.key)&&n.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:n=>{var s;const o=(s=n.clipboardData)==null?void 0:s.getData("text");o!=null&&o.split("").some(r=>!e.test(r))&&n.preventDefault()}})}},aw={selector:"AG-INPUT-TEXT-FIELD",component:tc},Ghe=class extends ec{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const n=super.setValue(e,t);return this.eInput.value=e,n}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},Uhe={selector:"AG-INPUT-TEXT-AREA",component:Ghe},X_=class extends tc{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const r=Number.parseFloat(e.value),i=isNaN(r)?"":this.normalizeValue(r.toString());this.value!==i&&this.setValue(i)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:n,max:o,step:s}=this.config;typeof t=="number"&&this.setPrecision(t),typeof n=="number"&&this.setMin(n),typeof o=="number"&&this.setMax(o),typeof s=="number"&&this.setStep(s)}onWheel(e){Kn(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const n=this.precision;if(n==null)return e;if(t){const s=Number.parseFloat(e).toFixed(n);return Number.parseFloat(s).toString()}const o=String(e).split(".");if(o.length>1){if(o[1].length<=n)return e;if(n>0)return`${o[0]}.${o[1].slice(0,n)}`}return o[0]}setMin(e){return this.min===e?this:(this.min=e,Js(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Js(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Js(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(n=>super.setValue(n,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,n){if(ft(n)){let o=this.isScientificNotation(n);if(o&&this.eInput.validity.valid)return e(n);if(!o){n=this.adjustPrecision(n);const s=this.normalizeValue(n);o=n!=s}if(o)return t(n)}return e(n)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},Whe={selector:"AG-INPUT-NUMBER-FIELD",component:X_},zhe=class extends tc{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=Ol();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){Kn(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?er(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,Js(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?er(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,Js(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Js(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return As(this.getValue())??void 0}setDate(e,t){this.setValue(er(e??null,this.includeTime),t)}},O2={selector:"AG-INPUT-DATE-FIELD",component:zhe},jhe=".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}",Khe="ag-active-item",qhe=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",ref:"eText",children:t}]}),Yhe=class extends jp{constructor(e,t,n){super(qhe(e,t)),this.label=t,this.value=n,this.eText=dt}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(Khe,e),vB(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const n=this.getGui();gce(n,e),pce(n,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>d_(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},Xhe=class extends jp{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(jhe)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case Ve.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const n=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(n)}break;case Ve.DOWN:case Ve.UP:e.preventDefault(),this.navigate(t);break;case Ve.PAGE_DOWN:case Ve.PAGE_UP:case Ve.PAGE_HOME:case Ve.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:n}=e,o=n??t;return this.options.push({value:t,text:o}),this.renderOption(t,o),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();qo(this.getGui()),this.listItems=[],this.refreshAriaRole()}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const n=this.options.findIndex(o=>o.value===e);if(n!==-1){const o=this.options[n];this.value=o.value,this.displayValue=o.text,this.highlightItem(this.listItems[n]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!Pi(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const n=this.getGui(),{scrollTop:o,clientHeight:s}=n,{offsetTop:r,offsetHeight:i}=t;(r+i>o+s||r<o)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){var e,t;(t=(e=this.highlightedItem)==null?void 0:e.tooltipFeature)==null||t.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){var e;(e=this.highlightedItem)==null||e.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const n=new Yhe(this.cssIdentifier,t,e);n.setParentComponent(this);const o=this.createManagedBean(n);this.listItems.push(o),this.getGui().appendChild(o.getGui())}navigate(e){const t=e===Ve.DOWN;let n;const{listItems:o,highlightedItem:s}=this;if(!s)n=t?o[0]:kn(o);else{let i=o.indexOf(s)+(t?1:-1);i=Math.min(Math.max(i,0),o.length-1),n=o[i]}this.highlightItem(n)}navigateToPage(e){const{listItems:t,highlightedItem:n}=this;if(!n||t.length===0)return;const o=t.indexOf(n),s=this.options.length-1,r=t[0].getHeight(),i=Math.floor(this.getGui().clientHeight/r);let a=-1;e===Ve.PAGE_HOME?a=0:e===Ve.PAGE_END?a=s:e===Ve.PAGE_DOWN?a=Math.min(o+i,s):e===Ve.PAGE_UP&&(a=Math.max(o-i,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){Dl(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((n,o)=>{n.setIndex(o+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},Zhe=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.ag-picker-has-focus),&:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:disabled{opacity:.5}}",Jhe={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},Qhe=class extends F2{constructor(e){if(super(e,(e==null?void 0:e.template)||Jhe,(e==null?void 0:e.agComponents)||[],e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=dt,this.eWrapper=dt,this.eDisplayField=dt,this.eIcon=dt,this.registerCSS(Zhe),this.ariaRole=e==null?void 0:e.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:n,variableWidth:o,minPickerWidth:s,maxPickerWidth:r}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!o,n!=null&&this.setPickerMaxHeight(n),s!=null&&this.setPickerMinWidth(s),r!=null&&this.setPickerMaxWidth(r)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:n,inputWidth:o}=this.config;if(n){const s=this.beans.iconSvc.createIconNoSpan(n);s&&this.eIcon.appendChild(s)}o!=null&&this.setInputWidth(o)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),l_(e,!1),this.ariaRole&&Dl(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&(e==null?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case Ve.UP:case Ve.DOWN:case Ve.ENTER:case Ve.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case Ve.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:n,pickerAriaLabelValue:o,modalPicker:s=!0},maxPickerHeight:r,minPickerWidth:i,maxPickerWidth:a,variableWidth:l,beans:u,eWrapper:c}=this,d={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const g=cB(u);this.beforeHidePicker(),g&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(n,o),anchorToElement:c};e.style.position="absolute";const h=u.popupSvc,f=h.addPopup(d);l?(i&&(e.style.minWidth=i),e.style.width=h_(Vy(c)),a&&(e.style.maxWidth=a)):Gy(e,a??Vy(c));const p=r??`${u_(h.getPopupParent())}px`;return e.style.setProperty("max-height",p),this.alignPickerToComponent(),f.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:n,gos:o},eWrapper:s,pickerComponent:r}=this,i=o.get("enableRtl")?"right":"left";n.positionPopupByComponent({type:t,eventSource:s,ePopup:r.getGui(),position:"under",alignSide:i,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();l_(t,e);const n=this.eWrapper.classList;n.toggle("ag-picker-expanded",e),n.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var t;(t=this.pickerComponent)!=null&&t.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return Gy(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},efe=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}",Z_=class extends Qhe{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(efe)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Hy(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:n}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),n&&t==null&&(this.eDisplayField.textContent=n),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new Xhe("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",n),_ce(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:o=>{o==null||o.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){var e;(e=this.listComponent)==null||e.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){var n;const{key:t}=e;switch(t===Ve.TAB&&this.hidePicker(),t){case Ve.ENTER:case Ve.UP:case Ve.DOWN:case Ve.PAGE_UP:case Ve.PAGE_DOWN:case Ve.PAGE_HOME:case Ve.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(n=this.listComponent)==null||n.handleKeyDown(e):super.onKeyDown(e);break;case Ve.ESCAPE:super.onKeyDown(e);break;case Ve.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){var e;return(e=this.listComponent)==null||e.clearOptions(),this.setValue(void 0,!0),this}setValue(e,t,n){const{listComponent:o,config:{placeholder:s},eDisplayField:r,tooltipFeature:i}=this;if(this.value===e||!o)return this;if(n||o.setValue(e,!0),o.getValue()===this.getValue())return this;let l=o.getDisplayValue();return l==null&&s&&(l=s),r.textContent=l,i==null||i.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},tfe={selector:"AG-SELECT",component:Z_},nfe=':where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}&:where(button){color:inherit}}:where(.ag-root-wrapper,ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',J_=typeof window!="object"||!((GG=(HG=window==null?void 0:window.document)==null?void 0:HG.fonts)!=null&&GG.forEach),Xd=(e,t,n,o,s,r)=>{if(J_)return;o&&(e=`@layer ${CSS.escape(o)} { ${e} }`);let i=Zd.map.get(t);if(i||(i=[],Zd.map.set(t,i)),i.some(c=>c.css===e))return;const a=document.createElement("style");r&&a.setAttribute("nonce",r),a.dataset.agGlobalCss=n,a.textContent=e;const l={css:e,el:a,priority:s};let u;for(const c of i){if(c.priority>s)break;u=c}if(u){u.el.insertAdjacentElement("afterend",a);const c=i.indexOf(u);i.splice(c+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),i.push(l)},M2=(e,t,n,o)=>{Xd(nfe,e,"shared",t,0,n),o==null||o.forEach((s,r)=>s.forEach(i=>Xd(i,e,r,t,0,n)))},ofe=e=>{Zd.grids.add(e)},sfe=e=>{if(Zd.grids.delete(e),Zd.grids.size===0){Zd.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},N2,Zd=(N2=typeof window=="object"?window:{}).agStyleInjectionState??(N2.agStyleInjectionState={map:new WeakMap,grids:new Set}),Li=e=>new L2(e),Ml="$default",rfe=0,L2=class{constructor({feature:e,params:t,modeParams:n={},css:o,cssImports:s}){this.feature=e,this.css=o,this.cssImports=s,this.modeParams={[Ml]:{...n[Ml]??{},...t??{}},...n}}use(e,t,n){let o=this._inject;if(o==null){let{css:s}=this;if(s){const r=`ag-theme-${this.feature??"part"}-${++rfe}`;typeof s=="function"&&(s=s()),s=`:where(.${r}) {
196
196
  ${s}
@@ -253,4 +253,4 @@ If you are trying to annotate ${o} with application data, use the '${o}.context'
253
253
  `,d_e=class extends $be{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:n}=e;this.suppressQuotes=t,this.columnSeparator=n}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,TG),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((n,o)=>{o!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(n.data.value||""),n.mergeAcross&&this.appendEmptyCells(n.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,n,o){n!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(o)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,n){t!=0&&(this.result+=this.columnSeparator);const o=this.extractRowCellValue(e,t,t,"csv",n);this.result+=this.putInQuotes(o.valueFormatted??o.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(Je(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=TG),this.isFirstLine=!1}},h_e=class extends Bbe{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){Je(51);return}const t=this.getMergedParams(e),n=this.getData(t),o=new Blob(["\uFEFF",n],{type:"text/plain"}),s=typeof t.fileName=="function"?t.fileName(Ot(this.gos,{})):t.fileName;Hbe(this.getFileName(s),o)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const n=t?Object.assign({},e):this.getMergedParams(e);return this.getData(n)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:n,rowGroupColsSvc:o,valueSvc:s,gos:r}=this,{processCellCallback:i,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:u,suppressQuotes:c,columnSeparator:d}=e;return new d_e({colModel:t,colNames:n,valueSvc:s,gos:r,processCellCallback:i||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:u||void 0,suppressQuotes:c||!1,columnSeparator:d||",",rowGroupColsSvc:o})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function f_e(e,t){var n;return(n=e.csvCreator)==null?void 0:n.getDataAsCsv(t)}function p_e(e,t){var n;(n=e.csvCreator)==null||n.exportDataAsCsv(t)}var g_e={moduleName:"CsvExport",version:ct,beans:[h_e],apiFunctions:{getDataAsCsv:f_e,exportDataAsCsv:p_e},dependsOn:[c_e]},m_e=class extends qe{constructor(e,t,n){super(),this.id=e,this.parentCache=t,this.params=n,this.state="needsLoading",this.version=0,this.startRow=e*n.blockSize,this.endRow=this.startRow+n.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,n){this.successCommon(e,{rowData:t,rowCount:n})}isRequestMostRecentAndLive(e){const t=e===this.version,n=this.isAlive();return t&&n}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:n,beans:o,rowNodes:s}=this;for(let r=0;r<e;r++){const i=n+r,a=new Nl(o);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(i),a.setRowTop(t*i),s.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:n,state:o}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:n,pageStatus:o}}}setDataAndId(e,t,n){ft(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(Gn(this.params.datasource.getRows)){Je(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:n,params:{sortModel:o,filterModel:s},gos:r}=this;return{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,n),failCallback:this.pageLoadFailed.bind(this,n),sortModel:o,filterModel:s,context:Ot(r,{}).context}}forEachNode(e,t,n){this.rowNodes.forEach((o,s)=>{this.startRow+s<n&&e(o,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const n=e-this.startRow;return this.rowNodes[n]}processServerResult(e){const{rowNodes:t,beans:n}=this;t.forEach((s,r)=>{const i=e.rowData?e.rowData[r]:void 0;!s.id&&s.alreadyRendered&&i&&(t[r]=new Nl(n),t[r].setRowIndex(s.rowIndex),t[r].setRowTop(s.rowTop),t[r].setRowHeight(s.rowHeight),s.clearRowTopAndRowIndex()),this.setDataAndId(t[r],i,this.startRow+r)});const o=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,o)}destroy(){for(const e of this.rowNodes)e.clearRowTopAndRowIndex();super.destroy()}},v_e=2,y_e=class extends qe{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const n=Math.floor(e/this.params.blockSize);let o=this.blocks[n];if(!o){if(t)return;o=this.createBlock(n)}return o.getRow(e)}createBlock(e){const t=this.params,n=this.createBean(new m_e(e,this,t));return this.blocks[n.id]=n,this.blockCount++,this.purgeBlocksIfNeeded(n),t.rowNodeBlockLoader.addBlock(n),n}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(Al(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(i=>i!=e),n=(i,a)=>a.lastAccessed-i.lastAccessed;t.sort(n);const o=this.params.maxBlocksInCache>0,s=o?this.params.maxBlocksInCache-1:null,r=v_e-1;t.forEach((i,a)=>{const l=i.state==="needsLoading"&&a>=r,u=o?a>=s:!1;if(l||u){if(this.isBlockCurrentlyDisplayed(i)||this.isBlockFocused(i))return;this.removeBlockFromCache(i)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:n,endRow:o}=e;return t.rowIndex>=n&&t.rowIndex<o}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:n}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,n-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:n,overflowSize:o}=this.params,r=(e.id+1)*n+o;this.rowCount<r&&(this.rowCount=r)}}setRowCount(e,t){this.rowCount=e,ft(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const n of this.getBlocksInOrder())n.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(n,o)=>n.id-o.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const n=[];let o=-1,s=!1;const r={value:0};let i=!1;for(const l of this.getBlocksInOrder())if(!i){if(s&&o+1!==l.id){i=!0;continue}o=l.id,l.forEachNode(u=>{const c=u===e||u===t;(s||c)&&n.push(u),c&&(s=!s)},r,this.rowCount)}return i||s?[]:n}},w_e=class extends qe{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new Nl(e);this.rootNode=t,t.level=-1,this.rowHeight=qu(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=qu(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){var t;let e;this.cacheParams?e=!Dp(this.cacheParams.sortModel,((t=this.beans.sortSvc)==null?void 0:t.getSortModel())??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){var n;return((n=this.infiniteCache)==null?void 0:n.getRowNodesInRange(e,t))??[]}reset(){var n;if(!this.datasource)return;zd(this.gos)!=null||(n=this.beans.selectionSvc)==null||n.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:n,rowNodeBlockLoader:o,eventSvc:s,gos:r}=e;this.cacheParams={datasource:this.datasource,filterModel:(t==null?void 0:t.getFilterModel())??{},sortModel:(n==null?void 0:n.getSortModel())??[],rowNodeBlockLoader:o,initialRowCount:r.get("infiniteInitialRowCount"),maxBlocksInCache:r.get("maxBlocksInCache"),rowHeight:qu(e),overflowSize:r.get("cacheOverflowSize"),blockSize:r.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new y_e(this.cacheParams)),s.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(n=>{n.id===e&&(t=n)}),t}forEachNode(e){var t;(t=this.infiniteCache)==null||t.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),n=this.getRowCount()-1;return t>n?n:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){var e;(e=this.infiniteCache)==null||e.refreshCache()}purgeCache(){var e;(e=this.infiniteCache)==null||e.purgeCache()}isLastRowIndexKnown(){var e;return((e=this.infiniteCache)==null?void 0:e.isLastRowIndexKnown())??!1}setRowCount(e,t){var n;(n=this.infiniteCache)==null||n.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function C_e(e){var t;(t=Fw(e))==null||t.refreshCache()}function b_e(e){var t;(t=Fw(e))==null||t.purgeCache()}function S_e(e){var t;return(t=Fw(e))==null?void 0:t.getRowCount()}var E_e=class extends qe{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=hde(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=Yo(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){ti(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){Al(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(n=>n.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const n of t)n.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:n,state:o}=t.getBlockStateJson();e[n]=o}),e}printCacheStatus(){Al(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},__e={moduleName:"InfiniteRowModelCore",version:ct,rowModels:["infinite"],beans:[w_e,E_e]},R_e={moduleName:"InfiniteRowModel",version:ct,apiFunctions:{refreshInfiniteCache:C_e,purgeInfiniteCache:b_e,getInfiniteRowCount:S_e},dependsOn:[__e,V0e]},T_e="↑",D_e="↓",I_e={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},x_e=class extends Cn{constructor(){super(I_e),this.eValue=dt,this.eDelta=dt,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const n=Math.abs(t),o=e.formatValue(n),s=ft(o)?o:n,r=t>=0,i=this.eDelta;r?i.textContent=T_e+s:i.textContent=D_e+s,i.classList.toggle("ag-value-change-delta-up",r),i.classList.toggle("ag-value-change-delta-down",!r)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),qo(this.eDelta)}refresh(e,t=!1){var u;const{value:n,valueFormatted:o}=e,{eValue:s,lastValue:r,beans:i}=this;if(n===r||(ft(o)?s.textContent=o:ft(n)?s.textContent=n:qo(s),(u=i.filterManager)!=null&&u.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n,l=r&&typeof r=="object"&&"toNumber"in r?r.toNumber():r;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return r&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=n,!0}},A_e=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",P_e={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},k_e=class extends Cn{constructor(){super(P_e),this.eCurrent=dt,this.refreshCount=0,this.registerCSS(A_e)}init(e){this.refresh(e,!0)}addSlideAnimation(){var s;this.refreshCount++;const e=this.refreshCount;(s=this.ePrevious)==null||s.remove();const{beans:t,eCurrent:n}=this,o=lo({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=o,o.textContent=n.textContent,this.getGui().insertBefore(o,n),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{var r;e===this.refreshCount&&((r=this.ePrevious)==null||r.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var s;let n=e.value;if(Gn(n)&&(n=""),n===this.lastValue||(s=this.beans.filterManager)!=null&&s.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=n;const o=this.eCurrent;return ft(e.valueFormatted)?o.textContent=e.valueFormatted:ft(e.value)?o.textContent=n:qo(o),!0}},F_e=class extends qe{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,n=this.beans.gos.get("cellFlashDuration"),o=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const r=Date.now(),i=r+n,a=r+n+o,l={phase:"flash",flashEndTime:i,fadeEndTime:a};s.set(e,l);const u=`ag-cell-${t}`,c=`${u}-animation`,{comp:d,eGui:{style:h}}=e;d.toggleCss(u,!0),d.toggleCss(c,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&i+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),n)}),this.nextAnimationTime=i)}advanceAnimations(){const e=Date.now();let t=null;for(const n of Object.keys(this.animations)){const o=this.animations[n],s=`ag-cell-${n}`,r=`${s}-animation`;for(const[i,a]of o){if(!i.isAlive()||!i.comp){o.delete(i);continue}const{phase:l,flashEndTime:u,fadeEndTime:c}=a,d=l==="flash"?u:c;if(!(e+15>=d)){t=Math.min(d,t??1/0);continue}const{comp:f,eGui:{style:p}}=i;switch(l){case"flash":f.toggleCss(s,!1),f.toggleCss(r,!0),p.transition=`background-color ${c-u}ms`,p.transitionDelay=`${u-e}ms`,t=Math.min(c,t??1/0),a.phase="fade";break;case"fade":f.toggleCss(s,!1),f.toggleCss(r,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),o.delete(i);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const n=kme(e.cellPosition);t.cells[n]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t==null?void 0:t.flashDuration,t==null?void 0:t.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function O_e(e,t={}){const{cellFlashSvc:n}=e;n&&e.frameworkOverrides.wrapIncoming(()=>{for(const o of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))n.flashCell(o,t)})}var M_e={moduleName:"HighlightChanges",version:ct,beans:[F_e],userComponents:{agAnimateShowChangeCellRenderer:x_e,agAnimateSlideCellRenderer:k_e},apiFunctions:{flashCells:O_e}};function N_e(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function L_e(e,t,n){var o;return(o=e.stateSvc)==null?void 0:o.setState(t,n)}function DG(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=V_e(e)),e.version=ct,e}function V_e(e){return e.cellSelection=B_e(e,"rangeSelection"),e}function B_e(e,t){if(e&&typeof e=="object")return e[t]}var $_e=class extends qe{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=Yo(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=Yo(this,()=>{this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(this.updateCachedState("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowGroupExpansion",void 0)):(this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("ssrmRowGroupExpansion",void 0))},0),this.onRowSelectedDebounced=Yo(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:n}=this.beans;this.isClientSideRowModel=io(e);const o=DG(e.get("initialState")??{}),s=o.partialColumnState;delete o.partialColumnState,this.cachedState=o;const r=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>r(()=>this.setupStateOnGridReady(o))),(o.columnOrder||o.columnVisibility||o.columnSizing||o.columnPinning||o.columnGroup)&&(n==null||n.hideColumns("columnState"));const[i,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:u})=>{u==="gridInitializing"&&(i(),r(()=>{this.setupStateOnColumnsInitialised(o,!!s),n==null||n.revealColumns("columnState")}))},rowCountReady:()=>{a==null||a(),r(()=>this.setupStateOnRowCountReady(o))},firstDataRendered:()=>{l==null||l(),r(()=>this.setupStateOnFirstDataRendered(o))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const n=DG(e);delete n.partialColumnState,this.cachedState=n,this.startSuppressEvents();const o="api",s=t?new Set(t):void 0;this.setGridReadyState(n,o,s),this.setColumnsInitialisedState(n,o,!!s,s),this.setRowCountState(n,o,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(n,o,s),this.stopSuppressEvents(o)})}setGridReadyState(e,t,n){var o,s;t==="api"&&!(n!=null&&n.has("sideBar"))&&((s=(o=this.beans.sideBar)==null?void 0:o.comp)==null||s.setState(e.sideBar)),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,n,o){this.setColumnState(e,t,n,o),this.setColumnGroupState(e,t,o),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const n=o=>()=>this.updateColumnState([o]);this.addManagedEventListeners({columnValueChanged:n("aggregation"),columnMoved:n("columnOrder"),columnPinned:n("columnPinning"),columnResized:n("columnSizing"),columnVisible:n("columnVisibility"),columnPivotChanged:n("pivot"),columnPivotModeChanged:n("pivot"),columnRowGroupChanged:n("rowGroup"),sortChanged:n("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,n){const{filter:o,rowGroupExpansion:s,ssrmRowGroupExpansion:r,rowSelection:i,pagination:a}=e,l=(c,d)=>!(n!=null&&n.has(c))&&(d||t==="api");l("filter",o)&&this.setFilterState(o),l("rowGroupExpansion",s)&&this.setRowGroupExpansionState(r,s,t),l("rowSelection",i)&&this.setRowSelectionState(i,t),l("pagination",a)&&this.setPaginationState(a,t);const u=this.updateCachedState.bind(this);u("filter",this.getFilterState()),this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(u("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),u("rowGroupExpansion",void 0)):(u("rowGroupExpansion",this.getRowGroupExpansionState()),u("ssrmRowGroupExpansion",void 0)),u("rowSelection",this.getRowSelectionState()),u("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(t("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),t("rowGroupExpansion",void 0)):(t("rowGroupExpansion",this.getRowGroupExpansionState()),t("ssrmRowGroupExpansion",void 0))},o=()=>t("filter",this.getFilterState()),{gos:s,colFilter:r}=this.beans;this.addManagedEventListeners({filterChanged:o,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{(s.get("groupDefaultExpanded")!==0||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(n)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:i=>{(i.newPage||i.newPageSize)&&t("pagination",this.getPaginationState())}}),r&&this.addManagedListeners(r,{filterStateChanged:o})}setFirstDataRenderedState(e,t,n){const{scroll:o,cellSelection:s,focusedCell:r,columnOrder:i,rowPinning:a}=e,l=(d,h)=>!(n!=null&&n.has(d))&&(h||t==="api");l("focusedCell",r)&&this.setFocusedCellState(r),l("cellSelection",s)&&this.setCellSelectionState(s),l("scroll",o)&&this.setScrollState(o),l("rowPinning",a)&&this.setRowPinningState(a),this.setColumnPivotState(!!(i!=null&&i.orderedColIds),t);const u=this.updateCachedState.bind(this);u("sideBar",this.getSideBarState()),u("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();u("rangeSelection",c),u("cellSelection",c),u("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:n,cellFocusCleared:n,cellSelectionChanged:o=>{if(o.finished){const s=this.getRangeSelectionState();t("rangeSelection",s),t("cellSelection",s)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return Nbe(nw(e),e.colModel.isPivotMode())}setColumnState(e,t,n,o){const{sort:s,rowGroup:r,aggregation:i,pivot:a,columnPinning:l,columnVisibility:u,columnSizing:c,columnOrder:d}=e;let h=!1;const f=(x,P)=>{const k=!(o!=null&&o.has(x))&&!!(P||t==="api");return h||(h=k),k},p={},g=x=>{let P=p[x];return P||(P={colId:x},p[x]=P,P)},v={},w=f("sort",s);w&&(s==null||s.sortModel.forEach(({colId:x,sort:P},k)=>{const M=g(x);M.sort=P,M.sortIndex=k})),(w||!n)&&(v.sort=null,v.sortIndex=null);const S=f("rowGroup",r);S&&(r==null||r.groupColIds.forEach((x,P)=>{const k=g(x);k.rowGroup=!0,k.rowGroupIndex=P})),(S||!n)&&(v.rowGroup=null,v.rowGroupIndex=null);const b=f("aggregation",i);b&&(i==null||i.aggregationModel.forEach(({colId:x,aggFunc:P})=>{g(x).aggFunc=P})),(b||!n)&&(v.aggFunc=null);const y=f("pivot",a);y&&(a==null||a.pivotColIds.forEach((x,P)=>{const k=g(x);k.pivot=!0,k.pivotIndex=P}),this.gos.updateGridOptions({options:{pivotMode:!!(a!=null&&a.pivotMode)},source:t})),(y||!n)&&(v.pivot=null,v.pivotIndex=null);const E=f("columnPinning",l);if(E){for(const x of(l==null?void 0:l.leftColIds)??[])g(x).pinned="left";for(const x of(l==null?void 0:l.rightColIds)??[])g(x).pinned="right"}(E||!n)&&(v.pinned=null);const _=f("columnVisibility",u);if(_)for(const x of(u==null?void 0:u.hiddenColIds)??[])g(x).hide=!0;(_||!n)&&(v.hide=null);const I=f("columnSizing",c);if(I)for(const{colId:x,flex:P,width:k}of(c==null?void 0:c.columnSizingModel)??[]){const M=g(x);M.flex=P??null,M.width=k}(I||!n)&&(v.flex=null);const T=d==null?void 0:d.orderedColIds,F=!!(T!=null&&T.length)&&!(o!=null&&o.has("columnOrder")),L=F?T.map(x=>g(x)):Object.values(p);(L.length||h)&&(this.columnStates=L,ni(this.beans,{state:L,applyOrder:F,defaultState:v},t))}setColumnPivotState(e,t){const n=this.columnStates;this.columnStates=void 0;const o=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:r,colGroupSvc:i}=s;if(r!=null&&r.isPivotResultColsPresent()){if(n){const a=[];for(const l of n)r.getPivotResultCol(l.colId)&&a.push(l);ni(s,{state:a,applyOrder:e},t)}o&&(i==null||i.setColumnGroupState(o,t))}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return Lbe(t)}setColumnGroupState(e,t,n){var a;const o=this.beans.colGroupSvc;if(!o||n!=null&&n.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set((a=e.columnGroup)==null?void 0:a.openColumnGroupIds),i=o.getColumnGroupState().map(({groupId:l})=>{const u=s.has(l);return u&&s.delete(l),{groupId:l,open:u}});for(const l of s)i.push({groupId:l,open:!0});i.length&&(this.columnGroupStates=i),o.setColumnGroupState(i,t)}getFilterState(){const e=this.beans.filterManager;let t=e==null?void 0:e.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const n=e==null?void 0:e.getFilterState(),o=(e==null?void 0:e.getAdvFilterModel())??void 0;return t||o||n?{filterModel:t,columnFilterState:n,advancedFilterModel:o}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:n,columnFilterState:o,advancedFilterModel:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(n!==void 0||o!==void 0)&&(t==null||t.setFilterState(n??null,o??null,"columnFilter")),s!==void 0&&(t==null||t.setAdvFilterModel(s??null,"advancedFilter"))}getRangeSelectionState(){var t;const e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(n=>{const{id:o,type:s,startRow:r,endRow:i,columns:a,startColumn:l}=n;return{id:o,type:s,startRow:r,endRow:i,colIds:a.map(u=>u.getColId()),startColId:l.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:n,colModel:o,visibleCols:s}=this.beans;if(!Aa(t)||!n)return;const r=[];for(const i of(e==null?void 0:e.cellRanges)??[]){const a=[];for(const u of i.colIds){const c=o.getCol(u);c&&a.push(c)}if(!a.length)continue;let l=o.getCol(i.startColId);if(!l){const u=s.allCols,c=new Set(a);l=u.find(d=>c.has(d))}r.push({...i,columns:a,startColumn:l})}n.setCellRanges(r)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(e==null?void 0:e.getHScrollPosition())??{left:0},{top:n}=(e==null?void 0:e.getVScrollPosition())??{top:0};return n||t?{top:n,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:n}=e??{top:0,left:0},{frameworkOverrides:o,rowRenderer:s,animationFrameSvc:r,ctrlsSvc:i}=this.beans;o.wrapIncoming(()=>{var a;i.get("center").setCenterViewportScrollLeft(n),(a=i.getScrollFeature())==null||a.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),r==null||r.flushAllFrames()})}getSideBarState(){var e,t;return(t=(e=this.beans.sideBar)==null?void 0:e.comp)==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:n,rowPinned:o}=e;return{colId:t.getColId(),rowIndex:n,rowPinned:o}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:n}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:o,rowIndex:s,rowPinned:r}=e;t.setFocusedCell({column:n.getCol(o),rowIndex:s,rowPinned:r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const n=e.getCurrentPage(),o=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!n&&!o))return{page:n,pageSize:o}}setPaginationState(e,t){const{pagination:n,gos:o}=this.beans;if(!n)return;const{pageSize:s,page:r}=e??{page:0,pageSize:o.get("paginationPageSize")},i=t==="gridInitializing";s&&!o.get("paginationAutoPageSize")&&n.setPageSize(s,i?"initialState":"pageSizeSelector"),typeof r=="number"&&(i?n.setPage(r):n.goToPage(r))}getRowSelectionState(){var o;const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((o=t==null?void 0:t.toggledNodes)!=null&&o.length)?void 0:t}setRowSelectionState(e,t){var n;(n=this.beans.selectionSvc)==null||n.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e}=this.beans;if(e)return e.getExpansionState()}getRowPinningState(){var e;return(e=this.beans.pinnedRowModel)==null?void 0:e.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t==null||t.setPinnedState(e):t==null||t.reset()}setRowGroupExpansionState(e,t,n){const o=this.beans.expansionSvc;if(!o)return;const s=t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};o.setExpansionState(s,n)}updateColumnState(e){const t=this.getColumnState();let n=!1;const o=this.cachedState;for(const s of Object.keys(t)){const r=t[s];Dp(r,o[s])||(n=!0)}this.cachedState={...o,...t},n&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const n=this.cachedState[e];this.setCachedStateValue(e,t),Dp(t,n)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){var e;this.suppressEvents=!0,(e=this.beans.colAnimation)==null||e.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{var t;this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&((t=this.beans.colAnimation)==null||t.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},H_e={moduleName:"GridState",version:ct,beans:[$_e],apiFunctions:{getState:N_e,setState:L_e}};function G_e(e){return e.rowModel.isLastRowIndexKnown()}function U_e(e){var t;return((t=e.pagination)==null?void 0:t.getPageSize())??100}function W_e(e){var t;return((t=e.pagination)==null?void 0:t.getCurrentPage())??0}function z_e(e){var t;return((t=e.pagination)==null?void 0:t.getTotalPages())??1}function j_e(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function K_e(e){var t;(t=e.pagination)==null||t.goToNextPage()}function q_e(e){var t;(t=e.pagination)==null||t.goToPreviousPage()}function Y_e(e){var t;(t=e.pagination)==null||t.goToFirstPage()}function X_e(e){var t;(t=e.pagination)==null||t.goToLastPage()}function Z_e(e,t){var n;(n=e.pagination)==null||n.goToPage(t)}var J_e=class extends qe{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,n=()=>{const o=Math.max(qu(t),1),s=Math.floor(e/o);t.pagination.setPageSize(s,"autoCalculated")};this.isBodyRendered?Yo(this,n,50)():(n(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},ug="paginationPageSizeSelector",Q_e={tag:"span",cls:"ag-paging-page-size"},eRe=class extends Cn{constructor(){super(Q_e),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(ug,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!(e!=null&&e.newPageSize))return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){qo(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(ug)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),n=!t||!e.includes(t);if(n){const s=this.gos.exists("paginationPageSize"),r=this.gos.get(ug)!==!0;Je(94,{pageSizeSet:s,pageSizesSet:r,pageSizeOptions:e,paginationPageSizeOption:t}),r||Je(95,{paginationPageSizeOption:t,paginationPageSizeSelector:ug}),e.unshift("")}const o=String(n?"":t);this.selectPageSizeComp?(Fl(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(o,!0)):this.createPageSizeSelectorComp(e,o),this.hasEmptyOption=n}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const n=this.getLocaleTextFunc(),o=n("pageSizeSelectorLabel","Page Size:"),s=n("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Z_).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(s).setLabel(o).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(ug);return!Array.isArray(t)||!(t!=null&&t.length)?e:[...t].sort((n,o)=>n-o)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},tRe={selector:"AG-PAGE-SIZE-SELECTOR",component:eRe},nRe=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:var(--ag-pagination-panel-height);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}",oRe=class extends V${constructor(){super(),this.btFirst=dt,this.btPrevious=dt,this.btNext=dt,this.btLast=dt,this.lbRecordCount=dt,this.lbFirstRowOnPage=dt,this.lbLastRowOnPage=dt,this.lbCurrent=dt,this.lbTotal=dt,this.pageSizeComp=dt,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(nRe)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[tRe]);const{btFirst:t,btPrevious:n,btNext:o,btLast:s}=this;this.activateTabIndex([t,n,o,s]),t.insertAdjacentElement("afterbegin",kr(e?"last":"first",this.beans)),n.insertAdjacentElement("afterbegin",kr(e?"next":"previous",this.beans)),o.insertAdjacentElement("afterbegin",kr(e?"previous":"next",this.beans)),s.insertAdjacentElement("afterbegin",kr(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:r=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(r):Jpe(this.beans,r),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){const{el:t,fn:n}=e;this.addManagedListeners(t,{click:n,keydown:o=>{(o.key===Ve.ENTER||o.key===Ve.SPACE)&&(o.preventDefault(),n())}})}Zpe(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):Vbe(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),n=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const o=this.isZeroPagesToDisplay(),s=e===n-1;this.nextButtonDisabled=s||o,this.lastButtonDisabled=!t||o||e===n-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){fce(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),n=this.pagination.getMasterRowCount(),o=e?n:null,s=this.pagination.getCurrentPage(),r=this.pagination.getPageSize();let i,a;this.isZeroPagesToDisplay()?i=a=0:(i=r*s+1,a=i+r-1,e&&a>o&&(a=o));const l=i+r-1,u=!e&&n<l,c=this.formatNumber(i);this.lbFirstRowOnPage.textContent=c;let d;const h=this.getLocaleTextFunc();u?d=h("pageLastRowUnknown","?"):d=this.formatNumber(a),this.lbLastRowOnPage.textContent=d;const p=t>0?s+1:0,g=this.formatNumber(p);this.lbCurrent.textContent=g;let v,w;if(e)v=this.formatNumber(t),w=this.formatNumber(o);else{const S=h("more","more");v=S,w=S}this.lbTotal.textContent=v,this.lbRecordCount.textContent=w,this.announceAriaStatus(c,d,w,g,v)}announceAriaStatus(e,t,n,o,s){var d,h;const r=this.getLocaleTextFunc(),i=r("page","Page"),a=r("to","to"),l=r("of","of"),u=`${e} ${a} ${t} ${l} ${n}`,c=`${i} ${o} ${l} ${s}`;u!==this.ariaRowStatus&&(this.ariaRowStatus=u,(d=this.ariaAnnounce)==null||d.announceValue(u,"paginationRow")),c!==this.ariaPageStatus&&(this.ariaPageStatus=c,(h=this.ariaAnnounce)==null||h.announceValue(c,"paginationPage"))}},sRe={selector:"AG-PAGINATION",component:oRe},rRe=class extends qe{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return sRe}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:n}=this.beans;n!=null&&n.isEditing()&&(n.isBatchEditing()?n.cleanupEditors():n.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){var n,o;if(!this.active)return;let t=e;this.paginateChildRows||(t=((o=(n=this.beans.rowModel).getTopLevelIndexFromDisplayedIndex)==null?void 0:o.call(n,e))??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return ft(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:ft(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:ft(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:ft(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const n=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}n!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const n=this.pageSize,o=t-1;this.totalPages=Math.floor(o/n)+1,this.adjustCurrentPageIfInvalid();const s=this.currentPage,r=n*s;let i=n*(s+1)-1;if(i>o&&(i=o),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(r),i===o)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(i+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:n}=this,o=e-1;this.totalPages=Math.floor(o/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*n,this.bottomDisplayedRowIndex=t*(n+1)-1,this.bottomDisplayedRowIndex>o&&(this.bottomDisplayedRowIndex=o)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:n=!1,newPageSize:o=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:n,newPageSize:o,keepRenderedRows:t})}},iRe={moduleName:"Pagination",version:ct,beans:[rRe,J_e],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:G_e,paginationGetPageSize:U_e,paginationGetCurrentPage:W_e,paginationGetTotalPages:z_e,paginationGetRowCount:j_e,paginationGoToNextPage:K_e,paginationGoToPreviousPage:q_e,paginationGoToFirstPage:Y_e,paginationGoToLastPage:X_e,paginationGoToPage:Z_e},dependsOn:[Ow]};function aRe(e,t={}){const n=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(n))}function IG(e,t,n,o,s){t&&(o&&t.parent&&t.parent.level!==-1&&IG(e,t.parent,n,o,s),t.setExpanded(n,void 0,s))}function lRe(e,t){return e.rowModel.getRowNode(t)}function uRe(e,t,n,o){e.rowRenderer.addRenderedRowListener(t,n,o)}function cRe(e){return e.rowRenderer.getRenderedNodes()}function dRe(e,t,n){e.rowModel.forEachNode(t,n)}function hRe(e){return e.rowRenderer.firstRenderedRow}function fRe(e){return e.rowRenderer.lastRenderedRow}function pRe(e,t){return e.rowModel.getRow(t)}function gRe(e){return e.rowModel.getRowCount()}var mRe={moduleName:"RowApi",version:ct,apiFunctions:{redrawRows:aRe,setRowNodeExpanded:IG,getRowNode:lRe,addRenderedRowListener:uRe,getRenderedNodes:cRe,forEachNode:dRe,getFirstDisplayedRowIndex:hRe,getLastDisplayedRowIndex:fRe,getDisplayedRowAtIndex:pRe,getDisplayedRowCount:gRe}},vRe={moduleName:"ScrollApi",version:ct,apiFunctions:{getVerticalPixelRange:AEe,getHorizontalPixelRange:PEe,ensureColumnVisible:uG,ensureIndexVisible:cG,ensureNodeVisible:kEe}};function yRe(e,t,n){if(!t)return;const o=e.ctrlsSvc.getGridBodyCtrl().eGridBody,s=`aria-${t}`;n===null?o.removeAttribute(s):o.setAttribute(s,n)}function wRe(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function CRe(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function bRe(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function SRe(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function ERe(e){return{rowHeight:qu(e),headerHeight:Xp(e)}}function _Re(e,t={}){var r;const n=[];for(const i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const a=i.getCellRenderer();a!=null&&n.push(Kp(a))}if((r=t.columns)!=null&&r.length)return n;const o=[],s=qR(t.rowNodes);for(const i of e.rowRenderer.getAllRowCtrls()){if(s&&!YR(i.rowNode,s)||!i.isFullWidth())continue;const a=i.getFullWidthCellRenderers();for(let l=0;l<a.length;l++){const u=a[l];u!=null&&o.push(Kp(u))}}return[...o,...n]}var RRe={moduleName:"RenderApi",version:ct,apiFunctions:{setGridAriaProperty:yRe,refreshCells:wRe,refreshHeader:CRe,isAnimationFrameQueueEmpty:bRe,flushAllAnimationFrames:SRe,getSizesForCurrentTheme:ERe,getCellRendererInstances:_Re}};function TRe(e,t){var n,o;typeof t=="number"?(n=e.colAutosize)==null||n.sizeColumnsToFit(t,"api"):(o=e.colAutosize)==null||o.sizeColumnsToFitGridBody(t)}function xG({colAutosize:e,visibleCols:t},n,o){Array.isArray(n)?e==null||e.autoSizeCols({colKeys:n,skipHeader:o,source:"api"}):e==null||e.autoSizeCols({...n,colKeys:n.colIds??t.allCols,source:"api"})}function DRe(e,t){var n;t&&typeof t=="object"?xG(e,t):(n=e.colAutosize)==null||n.autoSizeAllColumns({source:"api",skipHeader:t})}var IRe=class extends qe{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){var n;const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let o=!1;const s=t.type;if(s==="fitGridWidth"||s==="fitProvidedWidth")o=!0;else if(s==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const r=e.get("rowData");o=r!=null&&r.length>0&&io(e)}o&&((n=this.beans.colDelayRenderSvc)==null||n.hideColumns(s))}}autoSizeCols(e){const{eventSvc:t,visibleCols:n}=this.beans;this.innerAutoSizeCols(e).then(o=>{var u;const s=c=>qd(t,Array.from(c),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return s(o);const r=AG(this.beans),i=c=>n.leftCols.some(d=>Wp(d,c)),a=c=>n.rightCols.some(d=>Wp(d,c)),l=e.colKeys.filter(c=>!ka(c)&&!Fa(c)&&!i(c)&&!a(c));this.sizeColumnsToFit(r,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:(u=e.columnLimits)==null?void 0:u.map(c=>({...c,key:c.colId})),colKeys:l,onlyScaleUp:!0}),s(o)})}innerAutoSizeCols(e){return new Promise((t,n)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,n));const{colKeys:o,skipHeader:s,skipHeaderGroups:r,stopAtGroup:i,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:u=[],source:c="api"}=e,{animationFrameSvc:d,renderStatus:h,colModel:f,autoWidthCalc:p,visibleCols:g}=this.beans;if(d==null||d.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,n)});return}this.timesDelayed=0;const v=new Set;let w=-1;const S=Object.fromEntries(u.map(({colId:E,..._})=>[E,_])),b=s??this.gos.get("skipHeaderOnAutoSize"),y=r??b;for(;w!==0;){w=0;const E=[];for(const _ of o){if(!_||Rde(_))continue;const I=f.getCol(_);if(!I||v.has(I))continue;const T=p.getPreferredWidthForColumn(I,b);if(T>0){const F=S[I.colId]??{};F.minWidth??(F.minWidth=l),F.maxWidth??(F.maxWidth=a);const L=xRe(I,T,F);I.setActualWidth(L,c),v.add(I),w++}E.push(I)}E.length&&g.refresh(c)}y||this.autoSizeColumnGroupsByColumns(o,c,i),t(v)})}autoSizeColumn(e,t,n){this.autoSizeCols({colKeys:[e],skipHeader:n,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,n){const{colModel:o,ctrlsSvc:s}=this.beans,r=new Set,i=o.getColsForKeys(e);for(const l of i){let u=l.getParent();for(;u&&u!=n;)u.isPadding()||r.add(u),u=u.getParent()}let a;for(const l of r){for(const u of s.getHeaderRowContainerCtrls())if(a=u.getHeaderCtrlForColumn(l),a)break;a==null||a.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const n=this.gos.get("skipHeaderOnAutoSize"),o=()=>{this.autoSizeColumn(t,"uiColumnResized",n)};e.addEventListener("dblclick",o);const s=new sc(e);return s.addEventListener("doubleTap",o),()=>{e.removeEventListener("dblclick",o),s.destroy()}}addColumnGroupResize(e,t,n){const o=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const r=[],i=t.getDisplayedLeafColumns();for(const a of i)a.getColDef().suppressAutoSize||r.push(a.getColId());r.length>0&&this.autoSizeCols({colKeys:r,skipHeader:o,stopAtGroup:t,source:"uiColumnResized"}),n()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const n=AG(this.beans);if(n>0){this.sizeColumnsToFit(n,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):Je(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",n,o){var p,g;if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,n,o));return}const s={};for(const{key:v,...w}of(o==null?void 0:o.columnLimits)??[])s[typeof v=="string"?v:v.getColId()]=w;const r=this.beans.visibleCols.allCols;if(e<=0||!r.length)return;const i=Pa(r);if(o!=null&&o.onlyScaleUp&&i>e||e===i&&r.every(w=>{if(w.colDef.suppressSizeToFit)return!0;const S=s==null?void 0:s[w.getId()],b=(S==null?void 0:S.minWidth)??(o==null?void 0:o.defaultMinWidth),y=(S==null?void 0:S.maxWidth)??(o==null?void 0:o.defaultMaxWidth),E=w.getActualWidth();return(b==null||E>=b)&&(y==null||E<=y)}))return;const l=[],u=[];for(const v of r){const w=((p=o==null?void 0:o.colKeys)==null?void 0:p.some(S=>Wp(v,S)))??!0;v.getColDef().suppressSizeToFit||!w?u.push(v):l.push(v)}const c=l.slice(0);let d=!1;const h=v=>{ti(l,v),u.push(v)};for(const v of l){v.resetActualWidth(t);const w=s==null?void 0:s[v.getId()],S=(w==null?void 0:w.minWidth)??(o==null?void 0:o.defaultMinWidth),b=(w==null?void 0:w.maxWidth)??(o==null?void 0:o.defaultMaxWidth),y=v.getActualWidth();typeof S=="number"&&y<S?v.setActualWidth(S,t,!0):typeof b=="number"&&y>b&&v.setActualWidth(b,t,!0)}for(;!d;){d=!0;const v=e-Pa(u);if(v<=0)for(const w of l){const S=((g=s==null?void 0:s[w.getId()])==null?void 0:g.minWidth)??(o==null?void 0:o.defaultMinWidth)??w.minWidth;w.setActualWidth(S,t,!0)}else{const w=v/Pa(l);let S=v;for(let b=l.length-1;b>=0;b--){const y=l[b],E=s==null?void 0:s[y.getId()],_=(E==null?void 0:E.minWidth)??(o==null?void 0:o.defaultMinWidth),I=(E==null?void 0:E.maxWidth)??(o==null?void 0:o.defaultMaxWidth),T=y.getMinWidth(),F=y.getMaxWidth(),L=typeof _=="number"&&_>T?_:T,x=typeof I=="number"&&I<F?I:F;let P=Math.round(y.getActualWidth()*w);P<L?(P=L,h(y),d=!1):P>x?(P=x,h(y),d=!1):b===0&&(P=S),y.setActualWidth(P,t,!0),S-=P}}}for(const v of c)v.fireColumnWidthChangedEvent(t);const f=this.beans.visibleCols;f.setLeftValues(t),f.updateBodyWidths(),!n&&qd(this.eventSvc,c,!0,t)}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,n=e.get("autoSizeStrategy");(n==null?void 0:n.type)!=="fitGridWidth"&&(n==null?void 0:n.type)!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const o=n.type;if(o==="fitGridWidth"){const{columnLimits:s,defaultMinWidth:r,defaultMaxWidth:i}=n,a=s==null?void 0:s.map(({colId:l,minWidth:u,maxWidth:c})=>({key:l,minWidth:u,maxWidth:c}));this.sizeColumnsToFitGridBody({defaultMinWidth:r,defaultMaxWidth:i,columnLimits:a})}else o==="fitProvidedWidth"&&this.sizeColumnsToFit(n.width,"sizeColumnsToFit");t==null||t.revealColumns(o)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{var o;if(!this.isAlive())return;const n="autosizeColumns";e?this.autoSizeCols({...t,source:n,colKeys:e}):this.autoSizeAllColumns({...t,source:n}),(o=this.beans.colDelayRenderSvc)==null||o.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function xRe(e,t,n={}){const o=n.minWidth??e.getMinWidth();t<o&&(t=o);const s=n.maxWidth??e.getMaxWidth();return t>s&&(t=s),t}function AG({ctrlsSvc:e,scrollVisibleSvc:t}){const n=e.getGridBodyCtrl(),s=n.isVerticalScrollShowing()?t.getScrollbarWidth():0;return kp(n.eGridBody)-s}var ARe={moduleName:"ColumnAutoSize",version:ct,beans:[IRe],apiFunctions:{sizeColumnsToFit:TRe,autoSizeColumns:xG,autoSizeAllColumns:DRe},dependsOn:[tH]},PRe=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function kRe(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function FRe(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function ORe(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedTopRow(t)}function MRe(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedBottomRow(t)}function NRe(e,t,n){var o;return(o=e.pinnedRowModel)==null?void 0:o.forEachPinnedRow(t,n)}var LRe={moduleName:"PinnedRow",version:ct,beans:[Oge],css:[PRe],apiFunctions:{getPinnedTopRowCount:kRe,getPinnedBottomRowCount:FRe,getPinnedTopRow:ORe,getPinnedBottomRow:MRe,forEachPinnedRow:NRe},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},VRe=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){var n;const e=(n=this.firstNode.__autoHeights)==null?void 0:n[this.col.getColId()];if(e==null)return;let t=0;for(const o of this.spannedNodes)o!==this.lastNode&&(t+=o.rowHeight);return e-t}},BRe=class extends qe{constructor(e){super(),this.column=e}buildCache(e){var b;const{column:t,beans:{gos:n,pinnedRowModel:o,rowModel:s,valueSvc:r,pagination:i}}=this,{colDef:a}=t,l=this.getNodeMap(e),u=new Map,c=n.getCallback("isFullWidthRow"),d=a.equals,h=a.spanRows,f=typeof h=="function";let p=null,g=null,v;const w=(y,E)=>{p=y,g=null,v=E},S=y=>{const E=!y.isExpandable()&&!y.group&&!y.detail&&(c?!c({rowNode:y}):!0);if(y.rowIndex==null||!E){w(null,null);return}if(p==null||y.level!==p.level||y.footer||g&&y.rowIndex-1!==(g==null?void 0:g.getLastNode().rowIndex)){w(y,r.getValue(t,y));return}const _=r.getValue(t,y);if(f){const I=Ot(n,{valueA:v,nodeA:p,valueB:_,nodeB:y,column:t,colDef:a});if(!h(I)){w(y,_);return}}else if(d?!d(v,_):v!==_){w(y,_);return}if(!g){const I=l==null?void 0:l.get(p);(I==null?void 0:I.firstNode)===p?(I.reset(),g=I):g=new VRe(t,p),u.set(p,g)}g.addSpannedNode(y),u.set(y,g)};switch(e){case"center":(b=s.forEachDisplayedNode)==null||b.call(s,y=>{(!i||i.isRowInPage(y.rowIndex))&&S(y)}),this.centerValueNodeMap=u;break;case"top":o==null||o.forEachPinnedRow("top",S),this.topValueNodeMap=u;break;case"bottom":o==null||o.forEachPinnedRow("bottom",S),this.bottomValueNodeMap=u;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},$Re=class extends qe{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=Yo(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=Yo(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const n=this.createManagedBean(new BRe(e));this.spanningColumns.set(e,n),n.buildCache("top"),n.buildCache("bottom"),n.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t==null||t.createCtrls("top"),t==null||t.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t==null||t.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const n=this.spanningColumns.get(e);return n?n.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:n}=this.beans,o=e.column,s=e.rowIndex,r=this.spanningColumns.get(o);if(!r)return;let i;switch(e.rowPinned){case"top":i=t==null?void 0:t.getPinnedTopRow(s);break;case"bottom":i=t==null?void 0:t.getPinnedBottomRow(s);break;default:i=n.getRow(s)}if(i)return r.getCellSpan(i)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const n=this.spanningColumns.get(e);if(n)return n.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[n,o]of this.spanningColumns)if(o.isCellSpanning(e)){const s=o.getCellSpan(e);t(n,s)}}destroy(){super.destroy(),this.spanningColumns.clear()}},HRe=class extends ih{constructor(e,t,n){super(e.col,e.firstNode,n,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,n,o,s,r,i){this.eWrapper=n,super.setComp(e,t,n,o,s,r,i),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||Ny(e,t.rowIndex)}setAriaRowSpan(){yce(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(Sw(t)){this.focusedCellPosition=void 0;return}const n=this.isCellFocused();n||(this.focusedCellPosition=void 0),e&&n&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},GRe=class extends kw{onRowIndexChanged(){super.onRowIndexChanged();for(const e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){var o;const t=(o=this.beans.rowSpanSvc)==null?void 0:o.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new HRe(t,this,this.beans)}isCorrectCtrlForSpan(e){var o;const t=(o=this.beans.rowSpanSvc)==null?void 0:o.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},URe=class extends qe{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,n=this.getCtrlsMap(e),o=n.size,s=this.getAllRelevantRowControls(e),r=new Map;let i=!1;for(const l of s)l.isAlive()&&(t==null||t.forEachSpannedColumn(l.rowNode,(u,c)=>{if(r.has(c.firstNode))return;const d=n.get(c.firstNode);if(d){r.set(c.firstNode,d),n.delete(c.firstNode);return}i=!0;const h=new GRe(c.firstNode,this.beans,!1,!1,!1);r.set(c.firstNode,h)}));this.setCtrlsMap(e,r);const a=r.size===o;if(!(!i&&a)){for(const l of n.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,n=t==null?void 0:t.getCellSpanByPosition(e);if(!n)return;const o=this.getCtrlsMap(e.rowPinned).get(n.firstNode);if(o)return o.getAllCellCtrls().find(s=>s.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},WRe={moduleName:"CellSpan",version:ct,beans:[$Re,URe]},zRe=class extends qe{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,n=e.colDef,o=n.cellClassRules,s=this.getCellClassParams(e,n);jR(this.beans.expressionSvc,o===this.cellClassRules?void 0:this.cellClassRules,o,s,r=>t.toggleCss(r,!0),r=>t.toggleCss(r,!1)),this.cellClassRules=o}applyUserStyles(){const e=this.column,t=e.colDef,n=t.cellStyle;if(!n)return;let o;if(typeof n=="function"){const s=this.getCellClassParams(e,t);o=n(s)}else o=n;o&&this.cellComp.setUserStyles(o)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,n=e.colDef,o=this.getCellClassParams(e,n);for(const r of this.staticClasses)t.toggleCss(r,!1);const s=this.beans.cellStyles.getStaticCellClasses(n,o);this.staticClasses=s;for(const r of s)t.toggleCss(r,!0)}getCellClassParams(e,t){const{value:n,rowNode:o}=this.cellCtrl;return Ot(this.beans.gos,{value:n,data:o.data,node:o,colDef:t,column:e,rowIndex:o.rowIndex})}},jRe=class extends qe{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,n,o){jR(this.beans.expressionSvc,void 0,e.cellClassRules,t,n,o),this.processStaticCellClasses(e,t,n)}getStaticCellClasses(e,t){const{cellClass:n}=e;if(!n)return[];let o;return typeof n=="function"?o=n(t):o=n,typeof o=="string"&&(o=[o]),o||[]}createCellCustomStyleFeature(e,t){return new zRe(e,t)}processStaticCellClasses(e,t,n){this.getStaticCellClasses(e,t).forEach(s=>{n(s)})}},KRe={moduleName:"CellStyle",version:ct,beans:[jRe]},qRe={moduleName:"RowStyle",version:ct,beans:[OCe]};function YRe(e,t){var n;return!!((n=e.colHover)!=null&&n.isHovered(t))}var XRe=class extends qe{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=n=>{const{beans:o,gos:s,element:r,columns:i}=this,a=o.colHover;if(n??!!s.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(r,{mouseover:a.setMouseOver.bind(a,i),mouseout:a.clearMouseOver.bind(a)});else{for(const u of this.destroyManagedListeners)u();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},ZRe="ag-column-hover",JRe=class extends qe{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,n){const o=()=>{const s=this.isHovered(n);t.toggleCss("ag-column-hover",s)};e.addManagedEventListeners({columnHoverChanged:o}),o()}onCellColumnHover(e,t){if(!t)return;const n=this.isHovered(e);t.toggleCss(ZRe,n)}addHeaderFilterColumnHoverListener(e,t,n,o){this.createHoverFeature(e,[n],o);const s=()=>{const r=this.isHovered(n);t.toggleCss("ag-column-hover",r)};e.addManagedEventListeners({columnHoverChanged:s}),s()}createHoverFeature(e,t,n){e.createManagedBean(new XRe(t,n))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},QRe={moduleName:"ColumnHover",version:ct,beans:[JRe],apiFunctions:{isColumnHovered:YRe}},eTe=class extends qe{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){var e,t;this.wrapSvc=(t=(e=this.beans.frameworkOverrides).createGlobalEventListenerWrapper)==null?void 0:t.call(e)}addListener(e,t){var r;const n=((r=this.wrapSvc)==null?void 0:r.wrap(e,t))??t,o=!xw.has(e),s=o?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(n),this.eventSvc.addListener(e,n,o)}removeListener(e,t){var r,i;const n=((r=this.wrapSvc)==null?void 0:r.unwrap(e,t))??t,o=this.asyncListeners.get(e),s=!!(o!=null&&o.delete(n));s||(i=this.syncListeners.get(e))==null||i.delete(n),this.eventSvc.removeListener(e,n,s)}addGlobalListener(e){var r;const t=((r=this.wrapSvc)==null?void 0:r.wrapGlobal(e))??e,n=(i,a)=>{xw.has(i)&&t(i,a)},o=(i,a)=>{xw.has(i)||t(i,a)};this.globalListenerPairs.set(e,{syncListener:n,asyncListener:o});const s=this.eventSvc;s.addGlobalListener(n,!1),s.addGlobalListener(o,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:n,globalListenerPairs:o}=this,s=(n==null?void 0:n.unwrapGlobal(e))??e;if(o.has(s)){const{syncListener:i,asyncListener:a}=o.get(s);t.removeGlobalListener(i,!1),t.removeGlobalListener(a,!0),o.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((n,o)=>{n.forEach(s=>this.eventSvc.removeListener(o,s,t)),n.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const n of e)this.eventSvc.removeGlobalListener(n,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:n,asyncListener:o})=>{t.removeGlobalListener(n,!1),t.removeGlobalListener(o,!0)}),e.clear()}};function tTe(e,t,n){var o;(o=e.apiEventSvc)==null||o.addListener(t,n)}function nTe(e,t,n){var o;(o=e.apiEventSvc)==null||o.removeListener(t,n)}function oTe(e,t){var n;(n=e.apiEventSvc)==null||n.addGlobalListener(t)}function sTe(e,t){var n;(n=e.apiEventSvc)==null||n.removeGlobalListener(t)}var rTe={moduleName:"EventApi",version:ct,apiFunctions:{addEventListener:tTe,addGlobalListener:oTe,removeEventListener:nTe,removeGlobalListener:sTe},beans:[eTe]},iTe={moduleName:"Locale",version:ct,beans:[Mbe]},aTe=class extends qe{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=Yo(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){var a,l,u,c;const{visibleCols:e,rowModel:t,rowSpanSvc:n,pinnedRowModel:o}=this.beans,s=e.autoHeightCols;let r=!1;const i=d=>{var p;const h=d.__autoHeights;let f=Pl(this.beans,d).height;for(const g of s){let v=h==null?void 0:h[g.getColId()];const w=n==null?void 0:n.getCellSpan(g,d);if(w){if(w.getLastNode()!==d)continue;if(v=(p=n==null?void 0:n.getCellSpan(g,d))==null?void 0:p.getLastNodeAutoHeight(),!v)return}if(v==null){if(this.colSpanSkipCell(g,d))continue;return}f=Math.max(v,f)}f!==d.rowHeight&&(d.setRowHeight(f),r=!0)};(a=o==null?void 0:o.forEachPinnedRow)==null||a.call(o,"top",i),(l=o==null?void 0:o.forEachPinnedRow)==null||l.call(o,"bottom",i),(u=t.forEachDisplayedNode)==null||u.call(t,i),r&&((c=t.onRowHeightChanged)==null||c.call(t))}setRowAutoHeight(e,t,n){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[n.getId()];return}const o=e.__autoHeights[n.getId()];e.__autoHeights[n.getId()]=t,o!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:n,colViewport:o,visibleCols:s}=this.beans;if(!n.colSpanActive)return!1;let r=[];switch(e.getPinned()){case"left":r=s.getLeftColsForRow(t);break;case"right":r=s.getRightColsForRow(t);break;case null:r=o.getColsWithinViewport(t);break}return!r.includes(e)}setupCellAutoHeight(e,t,n){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const o=t.parentElement,{rowNode:s,column:r}=e,i=this.beans,a=c=>{var S;if((S=this.beans.editSvc)!=null&&S.isEditing(e)||!e.isAlive()||!n.isAlive())return;const{paddingTop:d,paddingBottom:h,borderBottomWidth:f,borderTopWidth:p}=ju(o),g=d+h+f+p,w=t.offsetHeight+g;if(c<5){const b=$o(i),y=!(b!=null&&b.contains(t)),E=w==0;if(y||E){window.setTimeout(()=>a(c+1),0);return}}this.setRowAutoHeight(s,w,r)},l=()=>a(0);l();const u=Il(i,t,l);return n.addDestroyFunc(()=>{u(),this.setRowAutoHeight(s,void 0,r)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:n}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(n).filter(s=>s.isAutoHeight())),t.length!==0){if(!n.__autoHeights)return!1;for(const o of t){const s=n.__autoHeights[o.getColId()];if(!s||n.rowHeight<s)return!1}}return!0}},lTe={moduleName:"RowAutoHeight",version:ct,beans:[aTe]},uTe={moduleName:"AllCommunity",version:ct,dependsOn:[RG,g_e,R_e,Qbe,u0e,c0e,d0e,h0e,f0e,p0e,g0e,l0e,tEe,nEe,oEe,eEe,rEe,iEe,H_e,$0e,iRe,rH,mRe,vRe,RRe,ARe,qme,LRe,A0e,mbe,KRe,QRe,qRe,rTe,wbe,M_e,iG,iTe,lTe,Kme,l_e,WRe]};let PG=!1;PG||(tde.registerModules([uTe,RG]),PG=!0);class cTe{constructor(t,n){Rn(this,"gridApi",null);Rn(this,"container");Rn(this,"config");Rn(this,"eventListeners",new Map);this.container=t,this.config=n}init(){if(this.gridApi)throw new Error("Grid already initialized");const{onGridReady:t,onCellClicked:n,onCellFocused:o,onRowSelected:s,...r}=this.config,i={...r,onGridReady:a=>{this.gridApi=a.api,t&&t(a)},onCellClicked:a=>{n&&n(a)},onCellFocused:a=>{o&&o(a)},onRowSelected:a=>{s&&s(a)}};return this.gridApi=Pbe(this.container,i),this.gridApi}updateRowData(t){this.gridApi&&this.gridApi.setGridOption("rowData",t)}updateColumnDefs(t){this.gridApi&&this.gridApi.setGridOption("columnDefs",t)}setColumnWidth(t){var n;this.gridApi&&((n=this.gridApi)==null||n.applyColumnState({state:t,applyOrder:!1}))}updateDatasource(t){this.gridApi&&this.gridApi.setGridOption("datasource",t)}refreshInfiniteCache(){this.gridApi&&this.gridApi.refreshInfiniteCache()}sizeColumnsToFit(){this.gridApi}deselectAll(){this.gridApi&&this.gridApi.deselectAll()}getSelectedRows(){var t;return((t=this.gridApi)==null?void 0:t.getSelectedRows())||[]}setQuickFilterText(t){this.gridApi&&this.gridApi.setGridOption("quickFilterText",t)}getColumnState(){var t;return(t=this.gridApi)==null?void 0:t.getColumnState()}addEventListener(t,n){if(!this.gridApi)throw new Error("Grid not initialized");this.eventListeners.has(t)||this.eventListeners.set(t,new Set),this.eventListeners.get(t).add(n),this.gridApi.addEventListener(t,n)}addRow(t,n="bottom"){if(this.gridApi){const o={add:[t],addIndex:n==="bottom"?void 0:0};if(this.gridApi.applyTransaction(o),n==="bottom"){const s=this.gridApi.getDisplayedRowCount();s>0&&this.gridApi.ensureIndexVisible(s-1,"bottom")}}}addRows(t,n="bottom"){if(this.gridApi&&t.length>0){const o={add:t,addIndex:n==="bottom"?void 0:0};if(this.gridApi.applyTransaction(o),n==="bottom"){const s=this.gridApi.getDisplayedRowCount();s>0&&this.gridApi.ensureIndexVisible(s-1,"bottom")}}}destroy(){this.gridApi&&(this.eventListeners.forEach((t,n)=>{t.forEach(o=>{var s;(s=this.gridApi)==null||s.removeEventListener(n,o)})}),this.eventListeners.clear(),this.gridApi.destroy(),this.gridApi=null)}getApi(){return this.gridApi}switchTheme(t){document.body.dataset.agThemeMode=t==="dark"?"dark":"light"}}const dTe=dH.withParams({accentColor:"var(--primary-color)",backgroundColor:"#ffffff",borderColor:"#e5e7eb",borderRadius:4,browserColorScheme:"light",chromeBackgroundColor:"#f9fafb",columnBorder:!0,fontFamily:"inherit",fontSize:14,foregroundColor:"#111827",headerBackgroundColor:"#fff",headerFontSize:14,headerFontWeight:600,headerTextColor:"#374151",iconSize:16,rowBorder:!0,spacing:8,headerHeight:40,rowHeight:32,wrapperBorder:!0,wrapperBorderRadius:4},"light").withParams({accentColor:"var(--primary-color)",backgroundColor:"#1f2937",borderColor:"#374151",borderRadius:4,browserColorScheme:"dark",chromeBackgroundColor:"#111827",columnBorder:!0,fontFamily:"inherit",fontSize:14,foregroundColor:"#f9fafb",headerBackgroundColor:"#374151",headerFontSize:14,headerFontWeight:600,headerTextColor:"#f9fafb",iconSize:16,rowBorder:!0,spacing:8,headerHeight:40,rowHeight:32,wrapperBorder:!0,wrapperBorderRadius:4},"dark"),hTe=ot({__name:"AgTable",props:{statusBar:{},sideBar:{type:[Object,String,Array,Boolean,null]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:{},suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:{},tooltipShowDelay:{},tooltipHideDelay:{},tooltipMouseTrack:{type:Boolean},tooltipShowMode:{},tooltipInteraction:{type:Boolean},popupParent:{},copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:{},suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:{},defaultColDef:{},defaultColGroupDef:{},columnTypes:{},dataTypeDefinitions:{},maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:{},groupHeaderHeight:{},floatingFiltersHeight:{},pivotHeaderHeight:{},pivotGroupHeaderHeight:{},hidePaddedHeaderRows:{type:Boolean},allowDragFromColumnsToolPanel:{type:Boolean},suppressMovableColumns:{type:Boolean},suppressColumnMoveAnimation:{type:Boolean},suppressMoveWhenColumnDragging:{type:Boolean},suppressDragLeaveHidesColumns:{type:Boolean},suppressGroupChangesColumnVisibility:{type:[Boolean,String]},suppressMakeColumnVisibleAfterUnGroup:{type:Boolean},suppressRowGroupHidesColumns:{type:Boolean},colResizeDefault:{},suppressAutoSize:{type:Boolean},autoSizePadding:{},skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:{},components:{},editType:{},suppressStartEditOnTab:{type:Boolean},getFullRowEditValidationErrors:{type:Function},invalidEditValueMode:{},singleClickEdit:{type:Boolean},suppressClickEdit:{type:Boolean},readOnlyEdit:{type:Boolean},stopEditingWhenCellsLoseFocus:{type:Boolean},enterNavigatesVertically:{type:Boolean},enterNavigatesVerticallyAfterEdit:{type:Boolean},enableCellEditingOnBackspace:{type:Boolean},undoRedoCellEditing:{type:Boolean},undoRedoCellEditingLimit:{},defaultCsvExportParams:{},suppressCsvExport:{type:Boolean},defaultExcelExportParams:{},suppressExcelExport:{type:Boolean},excelStyles:{},findSearchValue:{},findOptions:{},quickFilterText:{},cacheQuickFilter:{type:Boolean},includeHiddenColumnsInQuickFilter:{type:Boolean},quickFilterParser:{type:Function},quickFilterMatcher:{type:Function},applyQuickFilterBeforePivotOrAgg:{type:Boolean},excludeChildrenWhenTreeDataFiltering:{type:Boolean},enableAdvancedFilter:{type:Boolean},alwaysPassFilter:{type:Function},includeHiddenColumnsInAdvancedFilter:{type:Boolean},advancedFilterParent:{},advancedFilterBuilderParams:{},advancedFilterParams:{},suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableFilterHandlers:{type:Boolean},filterHandlers:{},enableCharts:{type:Boolean},chartThemes:{},customChartThemes:{},chartThemeOverrides:{},chartToolPanelsDef:{},chartMenuItems:{type:[Array,Function]},loadingCellRenderer:{},loadingCellRendererParams:{},loadingCellRendererSelector:{type:Function},localeText:{},masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:{},detailCellRenderer:{},detailCellRendererParams:{},detailRowHeight:{},detailRowAutoHeight:{type:Boolean},context:{},alignedGrids:{type:[Array,Function]},tabIndex:{},rowBuffer:{},valueCache:{type:Boolean},valueCacheNeverExpires:{type:Boolean},enableCellExpressions:{type:Boolean},suppressTouch:{type:Boolean},suppressFocusAfterRefresh:{type:Boolean},suppressBrowserResizeObserver:{type:Boolean},suppressPropertyNamesCheck:{type:Boolean},suppressChangeDetection:{type:Boolean},debug:{type:Boolean},loading:{type:Boolean},overlayLoadingTemplate:{},loadingOverlayComponent:{},loadingOverlayComponentParams:{},suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:{},noRowsOverlayComponent:{},noRowsOverlayComponentParams:{},suppressNoRowsOverlay:{type:Boolean},pagination:{type:Boolean},paginationPageSize:{},paginationPageSizeSelector:{type:[Array,Boolean]},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:{},pivotMaxGeneratedColumns:{},pivotDefaultExpanded:{},pivotColumnGroupTotals:{},pivotRowTotals:{},pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:{},suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:{},cellFadeDuration:{},allowShowChangeAfterFilter:{type:Boolean},domLayout:{},ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},rowDragInsertDelay:{},suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},dragAndDropImageComponent:{},dragAndDropImageComponentParams:{},fullWidthCellRenderer:{},fullWidthCellRendererParams:{},embedFullWidthRows:{type:Boolean},groupDisplayType:{},groupDefaultExpanded:{},autoGroupColumnDef:{},groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:{},groupAggFiltering:{type:[Boolean,Function]},groupTotalRow:{type:[String,Function]},grandTotalRow:{},suppressStickyTotalRow:{type:[Boolean,String]},groupSuppressBlankHeader:{type:Boolean},groupSelectsFiltered:{type:Boolean},showOpenedGroup:{type:Boolean},groupHideParentOfSingleChild:{type:[Boolean,String]},groupRemoveSingleChildren:{type:Boolean},groupRemoveLowestSingleChildren:{type:Boolean},groupHideOpenParents:{type:Boolean},groupAllowUnbalanced:{type:Boolean},rowGroupPanelShow:{},groupRowRenderer:{},groupRowRendererParams:{},treeData:{type:Boolean},treeDataChildrenField:{},treeDataParentIdField:{},rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},groupHierarchyConfig:{},pinnedTopRowData:{},pinnedBottomRowData:{},enableRowPinning:{type:[Boolean,String]},isRowPinnable:{type:Function},isRowPinned:{type:Function},rowModelType:{},rowData:{},asyncTransactionWaitMillis:{},suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:{},cacheOverflowSize:{},infiniteInitialRowCount:{},serverSideInitialRowCount:{},suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:{},maxBlocksInCache:{},maxConcurrentDatasourceRequests:{},blockLoadDebounceMillis:{},purgeClosedRowNodes:{type:Boolean},serverSideDatasource:{},serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:{},viewportDatasource:{},viewportRowModelPageSize:{},viewportRowModelBufferSize:{},alwaysShowHorizontalScroll:{type:Boolean},alwaysShowVerticalScroll:{type:Boolean},debounceVerticalScrollbar:{type:Boolean},suppressHorizontalScroll:{type:Boolean},suppressScrollOnNewData:{type:Boolean},suppressScrollWhenPopupsAreOpen:{type:Boolean},suppressAnimationFrame:{type:Boolean},suppressMiddleClickScrolls:{type:Boolean},suppressPreventDefaultOnMouseWheel:{type:Boolean},scrollbarWidth:{},rowSelection:{},cellSelection:{type:[Boolean,Object]},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:{},rowNumbers:{type:[Boolean,Object]},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:{},suppressClearOnFillReduction:{type:Boolean},sortingOrder:{},accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:{},suppressMaintainUnsortedOrder:{type:Boolean},icons:{},rowHeight:{},rowStyle:{},rowClass:{},rowClassRules:{},suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:{},deltaSort:{type:Boolean},treeDataDisplayType:{},enableGroupEdit:{type:Boolean},initialState:{},reactiveCustomComponents:{type:Boolean},renderingMode:{},theme:{},loadThemeGoogleFonts:{type:Boolean},themeCssLayer:{},styleNonce:{},themeStyleContainer:{},getContextMenuItems:{type:Function},getMainMenuItems:{type:Function},postProcessPopup:{type:Function},processUnpinnedColumns:{type:Function},processCellForClipboard:{type:Function},processHeaderForClipboard:{type:Function},processGroupHeaderForClipboard:{type:Function},processCellFromClipboard:{type:Function},sendToClipboard:{type:Function},processDataFromClipboard:{type:Function},isExternalFilterPresent:{type:Function},doesExternalFilterPass:{type:Function},getChartToolbarItems:{type:Function},createChartContainer:{type:Function},focusGridInnerElement:{type:Function},navigateToNextHeader:{type:Function},tabToNextHeader:{type:Function},navigateToNextCell:{type:Function},tabToNextCell:{type:Function},getLocaleText:{type:Function},getDocument:{type:Function},paginationNumberFormatter:{type:Function},getGroupRowAgg:{type:Function},isGroupOpenByDefault:{type:Function},ssrmExpandAllAffectsAllRows:{type:Boolean},initialGroupOrderComparator:{type:Function},processPivotResultColDef:{type:Function},processPivotResultColGroupDef:{type:Function},getDataPath:{type:Function},getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:{type:Function},isServerSideGroup:{type:Function},getServerSideGroupKey:{type:Function},getBusinessKeyForNode:{type:Function},getRowId:{type:Function},resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:{type:Function},isRowMaster:{type:Function},fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},onToolPanelVisibleChanged:{type:Function},onToolPanelSizeChanged:{type:Function},onColumnMenuVisibleChanged:{type:Function},onContextMenuVisibleChanged:{type:Function},onCutStart:{type:Function},onCutEnd:{type:Function},onPasteStart:{type:Function},onPasteEnd:{type:Function},onColumnVisible:{type:Function},onColumnPinned:{type:Function},onColumnResized:{type:Function},onColumnMoved:{type:Function},onColumnValueChanged:{type:Function},onColumnPivotModeChanged:{type:Function},onColumnPivotChanged:{type:Function},onColumnGroupOpened:{type:Function},onNewColumnsLoaded:{type:Function},onGridColumnsChanged:{type:Function},onDisplayedColumnsChanged:{type:Function},onVirtualColumnsChanged:{type:Function},onColumnEverythingChanged:{type:Function},onColumnsReset:{type:Function},onColumnHeaderMouseOver:{type:Function},onColumnHeaderMouseLeave:{type:Function},onColumnHeaderClicked:{type:Function},onColumnHeaderContextMenu:{type:Function},onComponentStateChanged:{type:Function},onCellValueChanged:{type:Function},onCellEditRequest:{type:Function},onRowValueChanged:{type:Function},onCellEditingStarted:{type:Function},onCellEditingStopped:{type:Function},onRowEditingStarted:{type:Function},onRowEditingStopped:{type:Function},onBulkEditingStarted:{type:Function},onBulkEditingStopped:{type:Function},onBatchEditingStarted:{type:Function},onBatchEditingStopped:{type:Function},onUndoStarted:{type:Function},onUndoEnded:{type:Function},onRedoStarted:{type:Function},onRedoEnded:{type:Function},onCellSelectionDeleteStart:{type:Function},onCellSelectionDeleteEnd:{type:Function},onRangeDeleteStart:{type:Function},onRangeDeleteEnd:{type:Function},onFillStart:{type:Function},onFillEnd:{type:Function},onFilterOpened:{type:Function},onFilterChanged:{type:Function},onFilterModified:{type:Function},onFilterUiChanged:{type:Function},onFloatingFilterUiChanged:{type:Function},onAdvancedFilterBuilderVisibleChanged:{type:Function},onFindChanged:{type:Function},onChartCreated:{type:Function},onChartRangeSelectionChanged:{type:Function},onChartOptionsChanged:{type:Function},onChartDestroyed:{type:Function},onCellKeyDown:{type:Function},onGridReady:{type:Function},onGridPreDestroyed:{type:Function},onFirstDataRendered:{type:Function},onGridSizeChanged:{type:Function},onModelUpdated:{type:Function},onVirtualRowRemoved:{type:Function},onViewportChanged:{type:Function},onBodyScroll:{type:Function},onBodyScrollEnd:{type:Function},onDragStarted:{type:Function},onDragStopped:{type:Function},onDragCancelled:{type:Function},onStateUpdated:{type:Function},onPaginationChanged:{type:Function},onRowDragEnter:{type:Function},onRowDragMove:{type:Function},onRowDragLeave:{type:Function},onRowDragEnd:{type:Function},onRowDragCancel:{type:Function},isRowValidDropPosition:{type:Function},onRowResizeStarted:{type:Function},onRowResizeEnded:{type:Function},onColumnRowGroupChanged:{type:Function},onRowGroupOpened:{type:Function},onExpandOrCollapseAll:{type:Function},onPivotMaxColumnsExceeded:{type:Function},onPinnedRowDataChanged:{type:Function},onPinnedRowsChanged:{type:Function},onRowDataUpdated:{type:Function},onAsyncTransactionsFlushed:{type:Function},onStoreRefreshed:{type:Function},onHeaderFocused:{type:Function},onCellClicked:{type:Function},onCellDoubleClicked:{type:Function},onCellFocused:{type:Function},onCellMouseOver:{type:Function},onCellMouseOut:{type:Function},onCellMouseDown:{type:Function},onRowClicked:{type:Function},onRowDoubleClicked:{type:Function},onRowSelected:{type:Function},onSelectionChanged:{type:Function},onCellContextMenu:{type:Function},onRangeSelectionChanged:{type:Function},onCellSelectionChanged:{type:Function},onTooltipShow:{type:Function},onTooltipHide:{type:Function},onSortChanged:{type:Function},height:{},isSorting:{type:Boolean}},emits:["onGridReady","row-clicked","cell-clicked","cell-focused","row-selected","on-scroll"],setup(e,{expose:t,emit:n}){const o=e,s=n,r=$(null);_E(r,()=>{var v;const g=(v=i.value)==null?void 0:v.getApi();g==null||g.clearFocusedCell()});const i=$(null),a=X(()=>({width:"100%",height:o.height||"500px"})),l=X(()=>({...o,theme:dTe}));function u(){var v;if(!r.value){console.warn("Grid container element not found");return}const g={...l.value,height:o.height};i.value=new cTe(r.value,g),i.value.init(),(v=i.value.getApi())==null||v.addEventListener("bodyScroll",()=>{s("on-scroll",new Event("scroll"))}),c()}function c(){var v;const g=((v=i.value)==null?void 0:v.getApi())??null;s("onGridReady",g)}function d(g){var w,S;if(!g)return;(w=i.value)==null||w.updateColumnDefs(g);const v=g.map(b=>b.field&&b.width&&!b.hide?{colId:b.field,width:b.width,flex:null}:null).filter(b=>b!==null);(S=i.value)==null||S.setColumnWidth(v)}function h(){var g;(g=i.value)==null||g.destroy(),i.value=null}function f(){var g;return((g=i.value)==null?void 0:g.getApi())||void 0}function p(){return i.value||null}return Qe(()=>o.columnDefs,(g,v)=>{const w=g==null?void 0:g.filter(b=>!b.hide).map(b=>b.field).join(","),S=v==null?void 0:v.filter(b=>!b.hide).map(b=>b.field).join(",");w!==S&&d(g)},{deep:!0}),Vn(()=>{h()}),t({gridApi:f,gridManager:p,syncColumnDefs:d}),Xt(()=>{u()}),Vn(()=>{h()}),(g,v)=>(q(),de("div",{ref_key:"gridContainerRef",ref:r,style:hn(a.value),class:le(["ag-theme-quartz",["ag-table-container",o.isSorting?"is-sorting":""]])},null,6))}});function lc(e){return uB(e)}const fTe=()=>[...[{headerName:"Thumbnail",field:"thumbnail",sortable:!1,filter:!1,pinned:"left",lockPinned:!0,suppressMovable:!0,headerComponent:lc(Sl),width:86,resizable:!1},{headerName:"Name",field:"name",sortable:!1,filter:!1,pinned:"left",lockPinned:!0,headerComponent:lc(Sl),suppressMovable:!0},{headerName:"Notes",field:"description",sortable:!1,filter:!1,suppressMovable:!1},{headerName:"Assignee",field:"assignees",sortable:!1,filter:!1,headerComponent:lc(Sl)},{headerName:"Status",field:"status",sortable:!1,filter:!1,headerComponent:lc(Sl)},{headerName:"Date Range",field:"dateRange",sortable:!1,filter:!1,headerComponent:lc(Sl)},{headerName:"Last Updated",field:"lastUpdated",sortable:!1,filter:!1,headerComponent:lc(Sl),cellRendererParams:n=>{var o,s,r;return{...n,value:(o=n==null?void 0:n.data)==null?void 0:o.lastUpdated.value,tooltip:((r=(s=n==null?void 0:n.data)==null?void 0:s.lastUpdated)==null?void 0:r.tooltip)||void 0,readOnly:!0}}},{headerName:"Completed On",field:"completedOn",sortable:!1,filter:!1,headerComponent:lc(Sl),cellRendererParams:n=>{var o,s,r;return{...n,value:(o=n==null?void 0:n.data)==null?void 0:o.completedOn.value,tooltip:((r=(s=n==null?void 0:n.data)==null?void 0:s.completedOn)==null?void 0:r.tooltip)||void 0,readOnly:!0}}}].map(n=>Tp.fromType(n))],$w={WIDTH:60,HEADER_CLASS:"ag-checkbox-header"},pTe=()=>({field:"__checkboxSelection",checkboxSelection:!0,headerCheckboxSelection:!0,pinned:"left",width:$w.WIDTH,minWidth:$w.WIDTH,maxWidth:$w.WIDTH,cellClass:"ag-checkbox-cell",headerClass:$w.HEADER_CLASS,headerComponent:My(zse),suppressMovable:!0}),kG="blank",gTe=[kG,"__checkboxSelection","options"],mTe=["uiColumnResized","uiColumnMoved","api"],vTe={headerName:"",field:"options",sortable:!1,filter:!1,editable:!0,pinned:"right",lockPosition:!0,suppressMovable:!0,resizable:!1},FG=(e,t)=>t!=null&&t.width?{...e,width:t.width,flex:void 0}:e,yTe=(e,t,n)=>{const{getCachedValue:o,setCachedValue:s}=bf({dbName:"item_table_column_configs",storeName:"column_configs"}),r=async()=>{const d=await o(t);if(!d||typeof d!="string")return null;try{const h=JSON.parse(d);return Array.isArray(h)?h:null}catch(h){return console.error("Failed to parse cached column config:",h),null}},i=$([]),a=pTe();let l=0;const u=async d=>{const h=++l,f=await r();if(h!==l)return;const p=new Map(f==null?void 0:f.map(k=>[k.field,k])),g=fTe(),v=Tp.fromType(vTe),w=!!f,b=((d==null?void 0:d.map(k=>{var M;return{headerName:k.name,field:`metric_${k.id}`,editable:((M=k==null?void 0:k.auth_permission)==null?void 0:M.permission)==2,sortable:!0,filter:!1,flex:1,context:{...k},hide:w?!p.has(`metric_${k.id}`):!(k.is_primary||k.is_point_metric),cellClass:"ag-cell-optimized",headerComponent:My(Sl),headerComponentParams:()=>({headerType:k.metric_type.code=="number"||k.metric_type.code=="formula"?"number":"default"})}}))||[]).map(k=>Tp.fromType(k)),y=[a,...g,...b,v],E=[],_=[],I=[];for(const k of y)k.pinned==="left"?E.push(k):k.pinned==="right"||k.field===kG?_.push(k):I.push(k);if(!f||f.length===0){i.value=y;return}const T=new Map(I.map(k=>[k.field,k])),F=[];for(const k of f)if(k.field&&T.has(k.field)){const M=T.get(k.field);F.push({...FG(M,k),hide:k.hide}),T.delete(k.field)}const L=Array.from(T.values()),x=[...F,...L].map(k=>({...k,lockPinned:!0})),P=k=>{const M=p.get(k.field),N=FG(k,M);return M&&M.hide!==void 0?{...N,hide:M.hide}:N};i.value=[...E.map(P),...x,..._.map(P)]};Qe(e,d=>u(d),{immediate:!0});const c=Cr((d,h)=>{if((d==null?void 0:d.source)!==void 0&&!mTe.includes(d.source))return;const f=n.value,p=f==null?void 0:f.getColumnDefs(),g=new Map;if(f==null||f.getColumnState().forEach(w=>{w.width&&g.set(w.colId,Number(w.width))}),i.value=p||i.value,!h)return;const v=(p??[]).filter(w=>w.field&&!gTe.includes(w.field)).map(w=>({field:w.field,hide:w.hide,width:g.get(w.field)||w.width,pinned:w.pinned}));s(t,JSON.stringify(v))},Si);return nD(()=>c.cancel()),{columnDefs:i,checkboxColumn:a,saveColumnConfig:c}},wTe=()=>{const e=un.getInstance().getItem("API_BASE_URL");return e!=null&&e.includes("v1")?e.slice(0,e.lastIndexOf("/v1")):String(e)},CTe=e=>{var P,k,M;const{showMessage:t,showErrorNetMessage:n}=Rs(),o=oo(),s={domainApi:wTe(),wsCode:un.getInstance().getItem("ws.code"),entityId:e.value.entityId},r=(M=(k=(P=o==null?void 0:o.appContext)==null?void 0:P.config)==null?void 0:k.globalProperties)==null?void 0:M.apiConfig;if(!r||s.domainApi===""||s.wsCode==="")throw new Error("API configuration is missing in useItems");const i=new ON(r,s);i.on("call-api",N=>{N.success?t(N.apiCode,"success"):n(N)});const a=Fo({}),l=$([]),u=$(!1),c=$(null),d=$(null),h=$(1),f=$(20);let p=Promise.resolve();const{setCachedUsers:g}=RJ(),v=N=>({workspaceId:e.value.workspaceId,entityIds:[e.value.entityId],orderBy:"id-asc",include_permission:"{include_permission}",include_permission_names:!0,q:N}),w=50,S=async(N,B,z)=>{if(!N.length)return[];const oe=B9(N,B);return(await Promise.all(oe.map(z))).flat()},b=async N=>{try{return(await i.getPermissionForItems({workspaceId:e.value.workspaceId,itemIds:N})).data.map(z=>[z==null?void 0:z.id,z.permission])}catch(B){return console.error("Failed to fetch item permissions chunk:",B),[]}},y=async(N,B)=>{try{const z=await i.getMetricValues({workspaceId:e.value.workspaceId,item_ids:N,per_page:N.length*B.length,metric_ids:B}),oe=z.data.map(te=>{const se=new Map(te.item_metrics.map(A=>[A.metric_id,{value:A.value,auth_permission:A==null?void 0:A.auth_permission}])),Z=Object.fromEntries(B.map(A=>[A,se.get(A)??null]));return[te==null?void 0:te.id,Z]}),ie=new Set(z.data.map(te=>te==null?void 0:te.id));for(const te of N)if(!ie.has(te)){const se=Object.fromEntries(B.map(Z=>[Z,{value:null,auth_permission:void 0}]));oe.push([te,se])}return oe}catch(z){return console.error("Failed to fetch a chunk of metric values:",z),N.map(ie=>[ie,Object.fromEntries(B.map(te=>[te,void 0]))])}},E=async N=>{try{const B=await i.getAssignedUser({workspaceId:e.value.workspaceId,item_ids:N,per_page:N.length}),z=B.data.flatMap(oe=>oe.assignees);return g(z),B.data.map(oe=>[oe==null?void 0:oe.id,oe==null?void 0:oe.assignees])}catch(B){return console.error("Failed to fetch a chunk of assigned users:",B),[]}},_=async N=>{if(!N.length)return console.warn("getPermissionForItems: Empty itemIds"),{};try{const B=await S(N,w,b);return Object.fromEntries(B)}catch(B){return console.error("Failed to fetch item permissions:",B),{}}},I=async(N,B)=>!N.length||!B.length?{}:(p=p.then(async()=>{try{const ie=[];let te=0;for(let Z=0;Z<B.length;Z+=5){te++;const A=B.slice(Z,Z+5),j=[];for(let ge=0;ge<A.length;ge++){const xe=A[ge],ue=await S(N,w,K=>y(K,[xe]));j.push(ue),await new Promise(K=>setTimeout(K,500))}ie.push(...j);const ne=Z+5>=B.length}const se={};for(const Z of ie.flat()){const[A,j]=Z;se[A]||(se[A]={}),Object.assign(se[A],j)}return se}catch(z){return console.error("Failed to fetch metric values:",z),{}}}),p),T=async N=>{if(!N.length)return console.warn("getAssignedUsers: Empty itemIds"),{};try{const B=await S(N,w,E);return Object.fromEntries(B)}catch(B){return console.error("Failed to fetch assigned users:",B),{}}};return{items:l,loading:u,error:c,pagination:d,currentPage:h,pageSize:f,cusorMap:a,fetchItems:async N=>{const{cursor:B,offset:z,size:oe,searchQuery:ie}=N;let te=[];u.value=!0,c.value=null;try{const se=await i.getAllItem_cursor({...N,cursor:B||void 0,offset:z||void 0,pageSize:oe||f.value,...v(ie),sortBy:N.sort_by});return l.value=se.data,d.value=se.meta,h.value=se.meta.current_page||0,te=se.data.map(Z=>Z==null?void 0:Z.id),se}catch(se){throw c.value=se,console.error("Failed to fetch items (cursor):",se),se}finally{const se=async()=>{try{const[Z,A]=await Promise.all([T(te),_(te)]);e.value.updateItemData({assignees:Z,permission:A},te);const j=await I(te,e.value.metricIds);e.value.setMetricValues(j,new Set(te),e.value.metricIds)}catch(Z){console.error("Post-fetch processing failed:",Z)}};u.value=!1,setTimeout(se)}},getAssignableStatus:async N=>{try{return await i.getAssignableStatus({workspaceId:e.value.workspaceId,itemIds:N})}catch(B){throw console.error("Failed to fetch assignable status:",B),B}},getMetricList:async N=>{try{return await i.getMetricList({workspaceId:e.value.workspaceId,entityId:N})}catch(B){throw console.error("Failed to fetch metric list:",B),B}},getMetricValues:I,getAssignedUsers:T}};function bTe(e){return{updateRowData:(o,s)=>{if(!e.value)return;const r=[],i=new Set,a=e.value.getColumnDefs();if(!a)return;const l=a.map(u=>{if(u.field&&u.field.startsWith("metric_")&&(u.hide===!1||u.hide===void 0))return u.field}).filter(Boolean);s.forEach(u=>{var d;const c=(d=e.value)==null?void 0:d.getRowNode(u);if(c){if(r.push(c),o.assignees){const h=hJ((o.assignees[u]||[]).map(bO));c.data.assignees=h,i.add("assignees")}o.permission&&(c.data.permissions=o.permission[u]),l.forEach(h=>{c.data[h]=c.data[h]??null})}}),i.add("assignees"),i.add("status"),i.add("dateRange"),i.add("moreActions"),i.add("name"),i.add("description"),e.value.refreshCells({rowNodes:r,columns:Array.from(i),force:!0})},setMetricValues:(o,s,r)=>{const i=e.value;if(!i)return;const a=new Map(Array.from(s).map(u=>[u,new Map(r.map(c=>[c,{value:null,auth_permission:void 0}]))]));Object.entries(o).forEach(([u,c])=>{Object.entries(c).forEach(([d,h])=>{var f;(f=a.get(u))==null||f.set(d,{value:h==null?void 0:h.value,auth_permission:h==null?void 0:h.auth_permission})})});const l=Array.from(a.entries()).map(([u,c])=>{const d=i.getRowNode(u);return d!=null&&d.data?(c.forEach((h,f)=>{const p=`metric_${f}`;d.data[p]=(h==null?void 0:h.value)||null;const g=`metric_permission_${f}`;d.data[p]=(h==null?void 0:h.value)||null,d.data[g]=(h==null?void 0:h.auth_permission)||null}),d):null});l.length>0&&i.refreshCells({rowNodes:l,columns:Array.from(r).map(u=>`metric_${u}`),force:!0})}}}function STe(e,t,n,o,s){let r=!0;return{async getRows(i){try{o(!0),r&&(s(!0),r=!1);const a=Math.floor(i.startRow/t)+1,{rows:l,total:u}=await e({page:a,pageSize:t,filterText:n(),sort_by:i.sortModel});let c=-1;Number.isFinite(u)?c=u:l.length<t&&(c=i.startRow+l.length),i.context={pageSize:t,text:n()},i.successCallback(l,c),o(!1),s(!1)}catch(a){console.error("Datasource fetch error:",a),i.failCallback(),o(!1),s(!1)}}}}function ETe(e){const{selectRowData:t,isSidebarOpen:n,quickFilterText:o,gridApi:s,fetcher:r}=e,i=$(!0),a=$(!0),l=$(!1),u=()=>{n.value=!n.value},c=v=>{if(i.value=!1,s.value=v,!v)return null;const{addEventListener:w,setGridOption:S}=v;if(!r)return console.error("Fetcher function is undefined"),null;const b=STe(r,e.perPage,()=>o.value,y=>{i.value=y},y=>{a.value=y});return S==null||S("datasource",b),w==null||w("selectionChanged",()=>{t.value=v.getSelectedRows()}),v||null},d=v=>{var w,S;if((w=s.value)==null||w.hideOverlay(),v!==void 0&&(o.value=v),(S=s.value)==null||S.deselectAll(),t.value=[],i.value=!0,!s.value||!r){console.error("Grid API or fetcher is not available"),i.value=!1;return}l.value=!0,a.value=!0,s.value.purgeInfiniteCache(),s.value.ensureIndexVisible(0,"top"),setTimeout(()=>{i.value=!1,setTimeout(()=>{l.value=!1},100)},300)},h=()=>{var v;(v=s.value)==null||v.deselectAll(),t.value=[]},f=Cr(v=>{d(v)},Si);return{isLoading:i,toggleSidebar:u,onGridReady:c,onSearch:f,handleUnSelect:h,firstLoad:a,cacheCleared:l,handleSelectAll:()=>{s.value},isSelectAll:$(!1)}}const _Te={changelog:{"1.0.1":{date:"2024-06-20",changes:["Fixed styling issues for archived and deleted rows."]},"1.0.0":{date:"2024-06-15",changes:["Initial release of the Item Table package."]},"0.0.1-alpha.8":{date:"2024-06-10",changes:["Improved performance of row updates.","Added support for custom cell renderers.","Add row hover effect for better UX.","Add loading skeleton for filter","Beta release with core functionalities implemented."]},"0.0.1-alpha.9":{date:"2024-06-05",changes:["Add row selection feature.","Fix bug with column resizing.","Optimize rendering for large datasets.","Implement getLog function to retrieve changelog entries based on version.","Display app version and changelog in the Item Table component tooltip.","Clean up unused autocomplete and memoized config composables.","Update styles for better consistency and readability."]},"0.0.1-alpha.11":{date:"2024-06-18",changes:["Add bulk process status display: items now show an hourglass icon and tooltip when being processed.","Update data model: added isProcessing and bulk_process properties to track item status.","Improve row focus: focused rows now flash for better visibility.","Set 'Last Updated' and 'Completed On' columns as read-only.","Fix: resolve visual fetching issue in useRemoteFiles composable.","Fix: use correct upload icon in PopupCreateScenes component.","Enhance data conversion to include processing status in item rows."]},"0.0.1-alpha.12":{date:"2024-06-12",changes:["feat: enhance Snackbar component and notification handling","Refactor Snackbar.vue for improved readability and styling, including color adjustments for icons and text.","Add showMessage function in notifications store to display messages based on API keys, improving notification management.","Introduce notificationMessage constant to centralize notification messages for various API actions, enhancing maintainability.","Remove unnecessary console logs from useRemoteFiles and improve logging in notification store for better debugging."]},"0.0.1-alpha.16":{date:"2024-06-20",changes:["Add onboarding tour feature and enhance UI components with new dependencies","Refactor UI components for improved styling and functionality","Updated RatingComponent.vue to streamline class bindings and improve accessibility attributes.","Enhanced SearchBox.vue by adding a clear event handler and simplifying icon rendering.","Modified AssigneeGroupEditor.vue and AssigneeGroupRenderer.vue to remove unnecessary size attributes from icons.","Adjusted DateRangeRenderer.vue to remove size attributes from icons for consistency.","Updated HeaderCheckbox.vue to set dropdown placement to 'bottom-start'.","Refined HeaderSorting.vue to simplify sort option labels and improve sorting logic.","Enhanced HeaderWrapper.vue to utilize reactive properties for sorting state.","Improved HyperLinkEditor.vue and HyperLinkInlineEditor.vue by removing size attributes from icons.","Updated PopupLayout.vue to use a CSS variable for box-shadow styling.","Refined Snackbar.vue to standardize icon colors and improve styling consistency.","Adjusted useTippy.ts to set default placement and arrow visibility for tooltips.","Modified notificationMessage.ts to remove error messages for list fetching.","Cleaned up notifications.ts by removing console logs for a cleaner codebase.","Updated sortStore.ts to comment out unnecessary console logs for better performance.","Enhanced styles.scss by defining new icon size variables and standardizing box-shadow styles."]},"0.0.99":{date:"2024-06-24",changes:["Fix: resolve issue with incorrect version display in Item Table component.","Update changelog retrieval logic to ensure accurate version matching.","Enhance tooltip display for app version and changelog in Item Table component."]}}},RTe=e=>{var t;return(t=Object.entries(_Te.changelog).find(([n,o])=>n===e))==null?void 0:t[1].changes},TTe={class:"visual-btn-visual"},DTe={class:"visual-btn--label"},ITe={key:0,class:"visual-btn--description"},xTe={key:1,class:"visual-btn--description"},Hw=_t(ot({__name:"VisualButton",props:{label:{},description:{},disabled:{type:Boolean}},emits:["onClick"],setup(e,{emit:t}){const n=e,o=()=>{n.disabled||s("onClick")},s=t;return(r,i)=>(q(),de("div",{class:le(["visual-btn",{"visual-btn--disabled":e.disabled}]),onClick:o},[Se("div",TTe,[kt(r.$slots,"visual",{},()=>[i[0]||(i[0]=Mz('<svg width="42" height="36" viewBox="0 0 42 36" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-c2003bd7><g clip-path="url(#clip0_4824_13082)" data-v-c2003bd7><path d="M5.14286 18V10.2857H18V18H5.14286ZM5.14286 23.1 429H18V30.8571H5.14286V23.1429ZM23.1429 30.8571V23.1429H36V30.8571H23.1429ZM36 18H23.1429V10.2857H36V18ZM5.14286 0C2.30625 0 0 2.30625 0 5.14286V30.8571C0 33.6937 2.30625 36 5.14286 36H36C38.8366 36 41.1429 33.6937 41.1429 30.8571V5.14286C41.1429 2.30625 38.8366 0 36 0H5.14286Z" fill="#D7D7D7" data-v-c2003bd7></path><path d="M0 5.14286C0 2.30625 2.30625 0 5.14286 0H36C38.8366 0 41.1429 2.30625 41.1429 5.14286V10.318H0V5.14286Z" fill="#A6A6A6" data-v-c2003bd7></path></g><defs data-v-c2003bd7><clipPath id="clip0_4824_13082" data-v-c2003bd7><rect width="41.1429" height="36" fill="white" data-v-c2003bd7></rect></clipPath></defs></svg>',1))],!0)]),Se("div",DTe,at(n.label),1),n.disabled?(q(),de("div",ITe," Coming soon ")):(q(),de("div",xTe,at(n.description),1))],2))}}),[["__scopeId","data-v-c2003bd7"]]),OG="xlsx_toolbox",MG="feedback_lockup_toolbox",ATe="TOOLBOX_EXPORT_DATA",PTe="https://app.arbocollab.com",kTe=1e3,NG=()=>sessionStorage.getItem("BASE_URL"),LG=(e,t="xlsx-mapping")=>{const n=Dn("switchInstance",void 0),o=`${t}:load`,s=`${t}:edit`,r=new Set;let i;const a=()=>{const h=t==="xlsx-mapping"?OG:MG,f={showLoad:!1};n?n(h,"",f):window.appManager.switchInstance(h,"",f)},l=(h,f)=>{const p=setTimeout(()=>{r.delete(p),window.postMessage({type:h,payload:f},`${NG()}`)},kTe);r.add(p)},u=h=>{if(!h)throw new Error("Payload is missing");a(),l(o,h)},c=(h,f)=>{if(!h)throw new Error("Error file is missing");a(),l(s,{file:h})},d=h=>{if((h==null?void 0:h.type)!==ATe)return;const{file:f,fileName:p}=h.payload;e({channel:t,file:new File([f],p,{type:f.type}),fileName:p});const g=t==="xlsx-mapping"?OG:MG;g=="xlsx_toolbox"&&window.appManager.hide(g)};return Xt(()=>{i=zne({target:window,allowedOrigins:[NG()||PTe],onMessage:d,onInvalidMessage:(h,f,p)=>{console.warn("Rejected postMessage:",f,p.origin)}})}),Vn(()=>{i==null||i(),r.forEach(clearTimeout),r.clear()}),{openToolbox:u,sendBackErrorFile:c}},FTe={class:"header-name"},OTe={class:"description"},MTe={key:0,class:"error-message"},NTe={class:"dynamic"},LTe={key:1,class:"choose-method-container"},VTe={key:3,class:"select-status-container"},BTe={key:4,class:"result-container"},$Te={key:5,class:"result-container"},HTe={key:0},GTe={key:3},VG="text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel",UTe=20,WTe=_t(ot({__name:"PopupToolboxUploader",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const o=Kt,s=X(()=>[1,2,6].includes(b.value)),r=X(()=>Sv()),i=X(()=>({1:{title:`Create ${r.value} in bulk`,description:""},2:{title:"Select status",description:"Choose the starting status for the new work."},3:{title:"Import successful",description:"Work will be created in background. Refresh to see updates."},4:{title:"Import failed",description:"Some data doesn't meet the requirements. Review it and try again."},6:{title:`Create ${r.value} by count`,description:""},7:{title:"Creation in progress",description:"Work will be created in the background. Refresh to see updates."},8:{title:"Create failed",description:""}})),a=["csv","xlsx","xls"],l=$({segments:[],count:0}),u=({data:R,count:G,template_flow_status_id:J})=>{console.log("handleChangeCreateWithCount called with data:",R,"count:",G,"template_flow_status_id:",J),l.value={segments:R,count:G,template_flow_status_id:J}},c=$(!1),d=async()=>{var R;if(!((R=v.value)!=null&&R.bulkCreate)){console.error("API services not available");return}c.value=!0;try{(await v.value.bulkCreate({workspaceId:f.workspaceId,entityId:f.entityId,payload:{...l.value,entity_id:f.entityId},filter:{}})).status===fs.ACCEPTED&&(b.value=7,g("import-success"))}catch(G){B(G),b.value=8}finally{c.value=!1}},h={"--popup-pt":"20px","--popup-pb":"20px","--popup-pl":"24px","--popup-pr":"24px"},f=e,p=X(()=>Sv()),g=n,{apiServices:v}=so(!1,f),w=1,S=$(),b=$(w),y=$(null),E=$(null),_=$(null),I=$(void 0),T=$(null),F=X(()=>i.value[b.value]),L=$(),x=()=>{var R;y.value=null,b.value=w,E.value=null,_.value=null,M.value=null,T.value=null,(R=L.value)==null||R.clear(),I.value=void 0,l.value={segments:[],count:0}},P=()=>{b.value=6},k=()=>{var R;x(),(R=S.value)==null||R.hide()};Qe([E,_],([R,G])=>{b.value===1&&R&&G&&(b.value=2)});const M=$(null),N=R=>Rs().getErrorMessageFromResponse(R),B=R=>{if(console.error(R),typeof R=="string"){M.value=R;return}const G=R.response,J=G==null?void 0:G.data,ce=N(J);M.value=ce??R.message},z=async(R,G)=>{var ce;if(!v.value||!f.workspaceId||!f.entityId){console.error("API services not available");return}K.value=!0;const J=new FormData;J.append("file",R),J.append("format",((ce=G??R.name)==null?void 0:ce.split(".").pop())??R.name.split(".").pop()??""),J.append("entity_id",f.entityId),J.append("template_flow_status_id",y.value??"");try{await v.value.addNewSceneViaImportFile(f.workspaceId,f.entityId,J),b.value=3,g("import-success")}catch(Ee){console.error("Error uploading file:",Ee),B(Ee||"An unknown error occurred during file upload."),b.value=4}finally{K.value=!1}},{openToolbox:oe,sendBackErrorFile:ie}=LG(({file:R,fileName:G,channel:J})=>{J==="xlsx-mapping"&&(_.value=R,I.value=G??R.name,b.value=2)}),te=$(null),se=async()=>{var R,G;b.value=6,await ht(),(G=(R=te.value)==null?void 0:R.focus)==null||G.call(R)},Z=async()=>{try{const R=await j();oe({template:R})}catch(R){console.error("Error opening toolbox:",R),Rs().showErrorNetMessage("Failed to open toolbox.")}},A=$(!1),j=async()=>{A.value=!0;const R=f.workspaceId,G=f.entityId;if(!R||!G||!v.value)return A.value=!1,Promise.reject(new Error("Workspace ID or Entity ID is missing"));try{const J=await v.value.downloadTemplate(R,G,!1);if(!J)throw new Error("No response from downloadTemplate API");return J}catch(J){return console.error("Error downloading template:",J),Promise.reject(J)}finally{A.value=!1}},ne=R=>{var ce;const G=((ce=R.name.split(".").pop())==null?void 0:ce.toLowerCase())??"",J=VG.split(",").map(Ee=>Ee.trim()).includes(R.type)||a.includes(G);return J||(console.error("Invalid file type:",R.type),Rs().addNotification({id:"invalid-file-type",message:"Invalid file type. Please upload a xlsx, xls, csv file.",type:"error"})),J},ge=async()=>{const R=document.createElement("input");R.type="file",R.accept=`${VG}, ${a.map(G=>`.${G}`).join(", ")}`,R.onchange=async()=>{var J;const G=(J=R.files)==null?void 0:J[0];if(G){if(!ne(G)){x();return}E.value=nv(G);try{const ce=await j();if(!ce){Rs().addNotification({id:"failed-download-template",message:"Failed to download template file.",type:"error"});return}oe({source:G,template:ce})}catch(ce){console.error("Error opening toolbox:",ce),Rs().addNotification({id:"failed-open-toolbox",message:"Failed to open toolbox.",type:"error"})}}},R.click()},xe=async R=>{var G;if(!((G=v.value)!=null&&G.getAssignableStatuses)){console.error("API services not available");return}return v.value.getAssignableStatuses(f.workspaceId,{entity_id:f.entityId,name_like:R.name_like,page:R.page,per_page:UTe})},ue=X(()=>{var R;return l.value.count==0||!((R=l.value.segments)!=null&&R.length)}),K=$(!1),Y=()=>{y.value=null,_.value&&I.value&&ie(_.value,I.value)},re=()=>{y.value&&_.value&&z(_.value,I.value)};return t({open:()=>{var R;return(R=S.value)==null?void 0:R.show()},close:()=>{var R;return(R=S.value)==null?void 0:R.hide()}}),(R,G)=>(q(),je(V(qN),jt({ref_key:"popupRef",ref:S,style:h,onHidden:x},{popupIndex:10,popupName:F.value.title,minWidth:"420px",showOverlay:!0,overlayOpacity:.5,closeOnOverlayClick:!1,closeOnEscape:!0,showCloseBtn:s.value}),Hh({header:we(()=>[Se("span",FTe,at(F.value.title),1)]),default:we(()=>[Se("div",{class:le(["modal-body",{"bulk-count":b.value===6,"choose-method":b.value===1}])},[Se("div",OTe,at(F.value.description),1),M.value&&b.value===4?(q(),de("div",MTe,[G[1]||(G[1]=tt(" Error code ",-1)),Se("span",NTe,at(M.value),1)])):Ye("",!0),b.value===1?(q(),de("div",LTe,[ye(Hw,{disabled:!1,label:"Create by count",description:"Enter how many to create.",onOnClick:se},{visual:we(()=>[ye(V(va),{src:"CreateByCount",size:65})]),_:1}),ye(Hw,{disabled:!1,label:"Start with a blank sheet",description:`Type or paste ${r.value} details
254
254
  into a table.`,onOnClick:Z},{visual:we(()=>[ye(V(va),{src:"BlankSheet",size:65})]),_:1},8,["description"]),ye(Hw,{label:"Import from file",description:`Create ${r.value} from a CSV or
255
255
  Excel file.`,onOnClick:ge},{visual:we(()=>[ye(V(va),{src:"UploadFile",size:65,"max-width":"65"})]),_:1},8,["description"])])):Ye("",!0),b.value===6?(q(),je(V(jue),{key:2,ref_key:"bulkCreateCountRef",ref:te,"get-status-func":xe,"workspace-id":f.workspaceId,"take-name":p.value,onChanged:u,"entity-id":f.entityId},null,8,["workspace-id","take-name","entity-id"])):b.value===2?(q(),de("div",VTe,[ye(V(wL),{modelValue:y.value,"onUpdate:modelValue":G[0]||(G[0]=J=>y.value=J),"get-status-func":xe,"workspace-id":f.workspaceId,id:f.entityId,style:{width:"100%"},"max-width":"372px",ref_key:"selectStatusRef",ref:L},null,8,["modelValue","workspace-id","id"])])):b.value===3||b.value===7?(q(),de("div",BTe,[ye(V(va),{src:"Success",width:240,height:180,ratio:"unset"})])):b.value===4||b.value===8?(q(),de("div",$Te,[ye(V(va),{src:"Failed",width:240,height:180,ratio:"unset"})])):Ye("",!0)],2)]),_:2},[b.value===2||b.value===4||b.value===3||b.value===6||b.value===7||b.value===8?{name:"footer",fn:we(()=>[b.value==6?ze((q(),de("div",HTe,[ye(V(St),{variant:"primary",loading:c.value,disabled:ue.value||c.value,onClick:d},{default:we(()=>[...G[2]||(G[2]=[tt(" Create ",-1)])]),_:1},8,["loading","disabled"])])),[[V(o),{content:ue.value?"Add a name or a counter first.":void 0,bypassOverflowCheck:!0}]]):Ye("",!0),b.value===4||b.value===8?(q(),je(V(St),{key:1,variant:"secondary",onClick:k},{default:we(()=>[...G[3]||(G[3]=[tt(" Close ",-1)])]),_:1})):b.value===3?(q(),je(V(St),{key:2,variant:"secondary",onClick:k},{default:we(()=>[...G[4]||(G[4]=[tt(" Got it ",-1)])]),_:1})):Ye("",!0),b.value===2?ze((q(),de("div",GTe,[ye(V(St),{loading:K.value,disabled:K.value||!y.value,onClick:re},{default:we(()=>[...G[5]||(G[5]=[tt(" Import ",-1)])]),_:1},8,["loading","disabled"])])),[[V(o),{content:K.value||!y.value?"Select a status first":void 0,bypassOverflowCheck:!0}]]):Ye("",!0),b.value===4?(q(),je(V(St),{key:4,onClick:Y},{default:we(()=>[...G[6]||(G[6]=[tt(" Try Again ",-1)])]),_:1})):Ye("",!0),b.value===8?(q(),je(V(St),{key:5,onClick:P},{default:we(()=>[...G[7]||(G[7]=[tt("Try Again",-1)])]),_:1})):Ye("",!0),b.value===7?(q(),je(V(St),{key:6,onClick:k,variant:"secondary"},{default:we(()=>[...G[8]||(G[8]=[tt(" Got it ",-1)])]),_:1})):Ye("",!0)]),key:"0"}:void 0]),1040))}}),[["__scopeId","data-v-81f75cd1"]]),zTe={class:"header-name"},jTe={class:"modal-body"},KTe={class:"description"},qTe={key:0,class:"error-message"},YTe={class:"dynamic"},XTe={key:1,class:"choose-method-container"},ZTe={key:2,class:"result-container"},JTe={key:3,class:"result-container"},QTe={key:2},BG="text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel",eDe=_t(ot({__name:"PopupBulkUpdate",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const o=Kt,s=X(()=>[1,2].includes(f.value)),r=X(()=>Sv()),i=X(()=>({1:{title:`Update ${r.value} in bulk`,description:""},2:{title:`Update ${r.value} in bulk`,description:""},3:{title:"Import successful",description:"Work will be created in background. Refresh to see updates."},4:{title:"Import failed",description:"Some data doesn't meet the requirements. Review it and try again."},5:{title:"Waiting for Toolbox",description:"Waiting for Toolbox"}})),a={"--popup-pt":"20px","--popup-pb":"20px","--popup-pl":"24px","--popup-pr":"24px"},l=e,u=n,{apiServices:c}=so(!1,l),d=1,h=$(),f=$(d),p=$(null),g=$(null),v=$(null),w=$(void 0),S=$(null),b=X(()=>i.value[f.value]),y=$(),E=()=>{var ie;p.value=null,f.value=d,g.value=null,v.value=null,_.value=null,S.value=null,(ie=y.value)==null||ie.clear(),w.value=void 0};Qe([g,v],([ie,te])=>{f.value===1&&ie&&te&&(f.value=2)});const _=$(null),I=ie=>Rs().getErrorMessageFromResponse(ie),T=ie=>{if(typeof ie=="string"){_.value=ie;return}const te=ie.response,se=te==null?void 0:te.data,Z=I(se);_.value=Z??ie.message,console.log("Error message set to:",{errorMsg:Z,message:ie})},F=async(ie,te)=>{var A;B.value=!0;const se=new FormData,Z=((A=ie.name.split(".").pop())==null?void 0:A.toString())||"";if(se.append("file",ie),se.append("format",Z),se.append("entity_id",l.entityId||""),!c.value){console.error("API services not available");return}try{await c.value.overwriteScenesViaImportFile(l.workspaceId,l.entityId,se),f.value=3,u("import-success")}catch(j){console.error("Error uploading file:",j),T(j),f.value=4}finally{B.value=!1,window.appManager.hide("feedback_lockup_toolbox")}},{openToolbox:L,sendBackErrorFile:x}=LG(({file:ie,fileName:te,channel:se})=>{se==="feedback-merge"&&(v.value=ie,w.value=te??ie.name,F(ie))},"feedback-merge"),P=$(!1),k=async()=>{P.value=!0;const ie=l.workspaceId,te=l.entityId;if(!ie||!te||!c.value)return console.error("Workspace ID or Entity ID is missing"),Promise.reject(new Error("Workspace ID or Entity ID is missing"));try{const se=await c.value.downloadExportedItemsFile(ie,te,!1);if(!se)throw new Error("No response from downloadTemplate API");return se}catch(se){return console.error("Error downloading template:",se),Promise.reject(se)}finally{P.value=!1}},M=ie=>{const te=BG.includes(ie.type);return te||(console.error("Invalid file type:",ie.type),Rs().addNotification({id:"invalid-file-type",message:"Invalid file type. Please upload a xlsx, xls, csv file.",type:"error"})),te},N=async()=>{const ie=document.createElement("input");ie.type="file",ie.accept=BG,ie.onchange=async()=>{var se;const te=(se=ie.files)==null?void 0:se[0];if(te){if(!M(te)){E();return}g.value=nv(te);try{const Z=await k();if(!Z){Rs().addNotification({id:"failed-download-template",message:"Failed to download file.",type:"error"});return}L({exportFile:Z,feedbackFile:te})}catch(Z){console.error("Error opening toolbox:",Z),Rs().addNotification({id:"failed-open-toolbox",message:"Failed to open toolbox.",type:"error"})}}},ie.click()},B=$(!1),z=()=>{p.value=null,v.value&&w.value&&x(v.value,w.value)},oe=()=>{p.value&&v.value&&(B.value=!0,F(v.value,w.value).finally(()=>{B.value=!1}))};return t({open:()=>{var ie;return(ie=h.value)==null?void 0:ie.show()},close:()=>{var ie;return(ie=h.value)==null?void 0:ie.hide()}}),(ie,te)=>(q(),je(V(qN),jt({ref_key:"popupRef",ref:h,style:a,onHidden:E},{popupIndex:10,popupName:b.value.title,minWidth:"420px",showOverlay:!0,overlayOpacity:.5,closeOnOverlayClick:!1,closeOnEscape:!0,showCloseBtn:s.value}),Hh({header:we(()=>[Se("span",zTe,at(b.value.title),1)]),default:we(()=>[Se("div",jTe,[Se("div",KTe,at(b.value.description),1),_.value&&f.value===4?(q(),de("div",qTe,[te[2]||(te[2]=tt(" Error code ",-1)),Se("span",YTe,at(_.value),1)])):Ye("",!0),f.value===1?(q(),de("div",XTe,[ye(Hw,{disabled:!1,label:"Import from file",description:`Update ${r.value} from a CSV or Excel file.`,onOnClick:N,style:{width:"100%"}},{visual:we(()=>[ye(V(va),{src:"UploadFile",size:65})]),_:1},8,["description"])])):f.value===3?(q(),de("div",ZTe,[ye(V(va),{src:"Success",width:240,height:180,ratio:"unset"})])):f.value===4?(q(),de("div",JTe,[ye(V(va),{src:"Failed",width:240,height:180,ratio:"unset"})])):Ye("",!0)])]),_:2},[f.value===4||f.value===3?{name:"footer",fn:we(()=>[f.value===4?(q(),je(V(St),{key:0,variant:"secondary",onClick:te[0]||(te[0]=()=>{var se;E(),(se=h.value)==null||se.hide()})},{default:we(()=>[...te[3]||(te[3]=[tt(" Close ",-1)])]),_:1})):f.value===3?(q(),je(V(St),{key:1,variant:"secondary",onClick:te[1]||(te[1]=()=>{var se;E(),(se=h.value)==null||se.hide()})},{default:we(()=>[...te[4]||(te[4]=[tt(" Got it ",-1)])]),_:1})):Ye("",!0),f.value===2?ze((q(),de("div",QTe,[ye(V(St),{loading:B.value,disabled:B.value||!p.value,onClick:oe},{default:we(()=>[...te[5]||(te[5]=[tt(" Import ",-1)])]),_:1},8,["loading","disabled"])])),[[V(o),{content:B.value||!p.value?"Select a status first":void 0,bypassOverflowCheck:!0}]]):Ye("",!0),f.value===4?(q(),je(V(St),{key:3,onClick:z},{default:we(()=>[...te[6]||(te[6]=[tt(" Try Again ",-1)])]),_:1})):Ye("",!0)]),key:"0"}:void 0]),1040))}}),[["__scopeId","data-v-9a73e40c"]]),tDe=_t(ot({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const n=$s,o=cE(),{setUserPermissions:s,setEntityPermissions:r}=o,{entityPermissions:i}=go(o),a=Kt,l=Io,u=Lv(),{entityData:c}=go(u),d={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},h=$(""),f=X(()=>{var Ke;const Pe=((Ke=i.value)==null?void 0:Ke.has_create_item_permission)==1||!1;return[{label:"Create in bulk",value:"import_scenes",type:"text",id:"import_scenes_option",hide:!Pe},{label:"Update in bulk",value:"bulk_update",type:"text",hide:!Pe,id:"bulk_update_option"}]}),p=e;Tp.initialize({wrapVueCellRenderer:My,wrapVueCellEditor:uB});const g=fd(),{switchInstanceFunc:v}=go(g);Xt(()=>{const Pe=oo();v.value=Pe==null?void 0:Pe.appContext.config.globalProperties.switchInstance;const Ke=new BroadcastChannel("focusable_channel");ht(()=>{setTimeout(()=>{Ke.postMessage("Focusable elements updated")},7e3)})});const w=$(null),S=$([]),b=Gf(),{rowCount:y}=go(b),E=$(!1),_=$(""),I=$(),T=iM(),{metricList:F}=go(T),L=$(""),x=$(!1),P=$(new Set),k=$(new Map),{apiServices:M}=so(!1,p),{columnDefs:N,checkboxColumn:B,saveColumnConfig:z}=yTe(F,p.entityId,w),oe=$();Qe(()=>N,()=>{var Pe;(Pe=oe.value)==null||Pe.updateColumnDefs(N.value)},{deep:!0});const ie=(Pe,Ke)=>{z(Pe,Ke)},{updateRowData:te,setMetricValues:se}=bTe(w),Z=X(()=>({isSearching:_.value.length>0,isFiltering:!(Object.keys(pe.value||{}).length==1&&Object.keys(pe.value)[0]=="preflight_status")&&Object.keys(pe.value||{}).length>0})),A=X(Cv),j=X(()=>N.value.filter(Pe=>{var Ke;return((Ke=Pe.field)==null?void 0:Ke.startsWith("metric_"))&&!Pe.hide}).map(Pe=>{var Ke;return((Ke=Pe.field)==null?void 0:Ke.replace("metric_",""))||""}));ci("timezone",A);const ne=X(()=>({autoFetch:!1,workspaceId:p.workspaceId,entityId:p.entityId,metricIds:j.value,updateItemData:te,setMetricValues:se})),{fetchItems:ge,getMetricList:xe,cusorMap:ue,getMetricValues:K}=CTe(ne),Y=X(()=>{if(!w.value)return!1;const Pe=w.value.getSelectedRows().length;return Pe>0&&Pe>=y.value.total}),re=X(()=>{var Pe;return((Pe=c.value)==null?void 0:Pe.name)||"Items"}),R=Pe=>{setTimeout(()=>{ht(()=>{var Ke,Mt;w.value&&(Pe?(Ke=w.value)==null||Ke.showNoRowsOverlay():(Mt=w.value)==null||Mt.hideOverlay())})},500)},G=(Pe,Ke)=>{var Mt;y.value.total=Pe.meta.total??0,(Mt=Pe.meta.next)!=null&&Mt.cursor&&(ue[Ke+1]=Pe.meta.next.cursor),L.value=Pe.meta["X-Tsr-signature"]||"",Pe.meta.total===0?R(!0):R(!1)},J=vE(),{setDefaultSort:ce}=J,Ee=$(null),{sortingAPIConfiguration:Ce,isSortingRunning:Ne}=go(J),pe=$({preflight_status:"1"}),H=X(()=>({...pe.value,search:_.value}));ci("filterParams",H);const W=$([]),be=X(()=>{var Pe;return((Pe=c.value)==null?void 0:Pe.name)||"Items"}),Ae=async({page:Pe,pageSize:Ke,filterText:Mt})=>{var uo,Zo,Os;(uo=w.value)==null||uo.hideOverlay();const Lt=ue[Pe],So=!Lt&&Pe>1?(Pe-1)*Ke:void 0,Xn=Ce.value;Xn.length>0&&(Ne.value=!0);try{const dc={cursor:Lt,size:Ke,searchQuery:Mt,offset:So,sort_by:Xn,...pe.value},Wl=await ge(dc);if(!Wl)return{rows:[],total:0};const Xi=(Os=(Zo=Wl.meta)==null?void 0:Zo.extra)==null?void 0:Os.default_sort;Xi&&ce(Xi);const gh=(Gw=>{const sn=Gw.data.map(hc=>EO(hc,A.value,be.value));return sn.forEach(hc=>{P.value.add(String(hc.id)),k.value.set(String(hc.id),{})}),sn})(Wl);return G(Wl,Pe),{rows:gh,total:y.value.total}}catch(dc){return console.error("Failed to fetch items:",dc),{rows:[],total:0}}finally{Ne.value=!1}},{isLoading:He,toggleSidebar:Te,onGridReady:Xe,handleUnSelect:ve,handleSelectAll:Be,onSearch:wt,firstLoad:Dt}=ETe({selectRowData:$([]),isSidebarOpen:E,quickFilterText:_,gridApi:w,perPage:d.ROWS_PER_PAGE,fetcher:Ae}),tn=$([]),en=Cr(()=>{var Xn;const Pe=((Xn=w.value)==null?void 0:Xn.getSelectedRows())||[],Ke=new Map(Pe.map(uo=>[uo.id,uo])),So=Pe.map(uo=>uo.id).map(uo=>{var Zo,Os;return[uo,(Os=(Zo=w.value)==null?void 0:Zo.getRowNode(uo))==null?void 0:Os.rowIndex]}).sort((uo,Zo)=>(uo[1]??0)-(Zo[1]??0)).map(([uo])=>Ke.get(uo));tn.value=So.filter(uo=>uo!==void 0)}),bn=Fo({columnsDisplay:[],rowsDisplay:{fromIndex:0,toIndex:0}}),Le=X(()=>({blockLoadDebounceMillis:1e3,columnDefs:N.value,rowModelType:"infinite",cacheBlockSize:d.ROWS_PER_PAGE,infiniteInitialRowCount:20,popupParent:document.getElementById("item-table-layout-id")||void 0,rowSelection:{mode:"multiRow",checkboxes:!1,enableClickSelection:!1,enableSelectionWithoutKeys:!1},pagination:!1,rowHeight:d.ROW_HEIGHT,suppressHorizontalScroll:!1,suppressColumnVirtualisation:!1,debounceVerticalScrollbar:!1,animateRows:!1,suppressAnimationFrame:!1,suppressScrollOnNewData:!0,suppressScrollWhenPopupsAreOpen:!1,rowBuffer:20,enableCellTextSelection:!1,suppressDragLeaveHidesColumns:!0,suppressMaxRenderedRowRestriction:!1,height:d.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:Ge,noRowsOverlayComponent:My(zre),noRowsOverlayComponentParams:()=>Z.value,defaultColDef:{editable:!1,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:Pe=>Pe.data.id,rowClassRules:{"row-deleted":Pe=>{var Ke;return(Ke=Pe.data)==null?void 0:Ke.isDeleted},"row-locked":Pe=>{var Ke;return(Ke=Pe.data)==null?void 0:Ke.isLocked},"row-archived":Pe=>{var Ke;return(Ke=Pe.data)==null?void 0:Ke.isArchived},"row-process-locked":Pe=>{var Ke,Mt;return((Mt=(Ke=Pe.data)==null?void 0:Ke.isProcessing)==null?void 0:Mt.state)==0},"row-inactive":Pe=>{var Ke;return!((Ke=Pe.data)!=null&&Ke.id)},"row-empty":Pe=>!Pe.data},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:p.workspaceId,entityId:p.entityId,apiServices:M.value,sorting:Ne.value},onCellKeyDown:Pe=>{var Ke,Mt,Lt;if(Pe.data.isDeleted)return!1;if(((Ke=Pe==null?void 0:Pe.event)==null?void 0:Ke.key)==="Enter"){const{api:So,node:Xn,column:uo}=Pe,Zo=So.getCellRendererInstances({rowNodes:[Xn],columns:[uo]});if(Zo.length>0){const Os=Zo[0];Os&&typeof((Mt=Os.componsenExposed)==null?void 0:Mt.focus)=="function"&&((Lt=Os.componsenExposed)==null||Lt.focus())}}},isRowSelectable:Pe=>{var Ke,Mt;return!Pe.group&&((Mt=(Ke=Pe.data)==null?void 0:Ke.isProcessing)==null?void 0:Mt.state)!=0},suppressKeyboardEvent:Pe=>{var Lt;if((Lt=Pe.data)!=null&&Lt.isDeleted)return!0;const Ke=Pe.event.key,Mt=Pe.editing;return Mt&&Ke==="Tab"?!0:Mt&&Ke==="Enter"?!1:Ke==="Enter"?(Pe.event.preventDefault(),Pe.event.stopPropagation(),!0):Ke==="ArrowUp"||Ke==="ArrowDown"||Ke==="ArrowLeft"||Ke==="ArrowRight"||Ke==="Tab"||Ke==="Enter"},navigateToNextCell:()=>null,onBodyScroll:Pe=>{const Ke=Pe.api.getFirstDisplayedRowIndex(),Mt=Pe.api.getLastDisplayedRowIndex();bn.rowsDisplay.fromIndex=Ke,bn.rowsDisplay.toIndex=Mt,bn.columnsDisplay=Pe.api.getAllDisplayedVirtualColumns().map(Lt=>Lt.getColId())},onViewportChanged:Pe=>{bn.columnsDisplay=Pe.api.getAllDisplayedVirtualColumns().map(Ke=>Ke.getColId())},suppressHeaderFocus:!0,onCellEditingStarted(Pe){if(Pe.data.isDeleted&&Pe.api.stopEditing(),Pe.colDef.field=="options"){const Ke=Pe.api.getCellRendererInstances({rowNodes:[Pe.node],columns:[Pe.column]});Ke.length>0&&Ke[0].focusUi()}},tabToNextCell:Pe=>{let Ke=Pe.nextCellPosition;if(Ke&&Ke.column.getColId()==="ag-Grid-SelectionColumn"){const Mt=Pe.api.getAllDisplayedColumns(),Lt=Mt.indexOf(Ke.column),So=Pe.backwards?-1:1,Xn=Mt[Lt+So];if(Xn)return{rowIndex:Ke.rowIndex,column:Xn,rowPinned:Ke.rowPinned}}return Ke}}));function Ge(){if(!w.value)return;let Pe=0;w.value.forEachNode(Ke=>{Ke.data&&Pe++}),y.value.loaded=Math.min(Pe,y.value.total)}Qe(()=>Ce,()=>{w.value&&(L.value="",P.value.clear(),w.value.deselectAll(),Object.keys(ue).forEach(Pe=>delete ue[Number(Pe)]),w.value.purgeInfiniteCache(),w.value.ensureIndexVisible(0))},{deep:!0});const Rt=$(),Jt=$(),qt=()=>{is.showPopupOverwriteScenes=!0,ht(()=>{var Pe;(Pe=Jt.value)==null||Pe.open()})},nt=$(),Go=()=>{is.showPopupBulkUpdate=!0,ht(()=>{var Pe;(Pe=nt.value)==null||Pe.open()})},si=()=>{is.showPopupToolboxUploader=!0,ht(()=>{var Pe;(Pe=Rt.value)==null||Pe.open()})},tr=async()=>{Dt.value=!0,w.value&&(L.value="",P.value.clear(),Object.keys(ue).forEach(Pe=>delete ue[Number(Pe)]),await w.value.deselectAll(),await w.value.ensureIndexVisible(0,"top"),await w.value.purgeInfiniteCache(),await w.value.refreshInfiniteCache())},Mr=X(()=>un.getInstance().getItem("ITEM_TABLE_APP_VERSION")||""),Ui=$();X(()=>{var Pe;return(Pe=RTe(Mr.value))==null?void 0:Pe.map(Ke=>`<div>• ${Ke}</div>`).join(`
256
- `)});function Wi(Pe){var Ke;Pe==="new_scene"?(Ke=Ui.value)==null||Ke.show():Pe==="import_scenes"?si():Pe==="overwrite_scenes"?qt():Pe==="bulk_update"&&Go()}const zi=Pe=>{S.value=Pe.api.getSelectedRows().map(Ke=>Ke.id)},ji=Pe=>{const Ke=Xe(Pe);return Ke&&(Ke.addEventListener("modelUpdated",Ge),Ke.addEventListener("bodyScroll",()=>Ke.stopEditing()),Ke.addEventListener("selectionChanged",en),Ke.addEventListener("columnMoved",Lt=>ie(Lt,!0)),Ke.addEventListener("columnResized",Lt=>ie(Lt,!0)),Ke.addEventListener("firstDataRendered",()=>{Dt.value=!1}),!document.querySelector(".ag-body-viewport"))||Pe==null||Pe.setColumnsVisible(["ag-Grid-SelectionColumn"],!1),Ke},Fs=()=>{var Pe;h.value=(((Pe=document.getElementById("item-table-layout-id"))==null?void 0:Pe.clientHeight)??0)-78+"px"};Xt(()=>{ht(()=>{Fs()}),window.addEventListener("resize",Fs);function Pe(){requestAnimationFrame(Pe)}Pe()}),Vn(()=>{window.removeEventListener("resize",Fs)});const Ki=async({code:Pe,name:Ke})=>{await wt(Pe),setTimeout(()=>{var Mt;(Mt=I.value)==null||Mt.setValue(Ke)},300)},dh=Pe=>{if(!w.value)return;const Ke=w.value.getRowNode(Pe);Ke?(w.value.ensureIndexVisible(Number(Ke.rowIndex),"middle"),w.value.flashCells({rowNodes:[Ke],flashDuration:3e3,fadeDuration:1e3})):w.value.ensureIndexVisible(y.value.total-1,"bottom")},Nn=Pe=>Pe.metric_type.code==="number"?"number":"default",bo=async()=>{if(p.entityId)try{const Pe=await xe(p.entityId);F.value=Pe.data.map(Ke=>({...Ke,sortType:Nn(Ke)}))}catch(Pe){console.error("Failed to initialize metric list:",Pe),F.value=[]}},fT=async()=>{if(M.value)try{const Pe=await M.value.getUserPermission(p.workspaceId);s(Pe)}catch(Pe){console.error("Failed to fetch user permissions:",Pe)}},hh=async()=>{if(M.value)try{const Pe=await M.value.getEntityDetail(p.workspaceId,p.entityId);r(Pe.permission),c.value=Pe}catch(Pe){console.error("Failed to fetch entity details:",Pe)}},cc=Ey(),{setUser:fh}=cc,pT=async()=>{if(M.value)try{const Pe=await M.value.getMe();return fh(Pe),Pe}catch(Pe){console.error("Failed to fetch user details:",Pe)}},qi=async()=>{var Pe;if(M.value)try{const Ke=await M.value.getWorkspaces(p.workspaceId),Mt=(Pe=Ke.data[0])==null?void 0:Pe.ws_user_role_id;return Mt&&cc.setUserRoleId(Mt),Ke}catch(Ke){console.error("Failed to fetch workspace details:",Ke)}};Qe(()=>[p.entityId,p.workspaceId],async([Pe,Ke])=>{!Pe||!Ke||(pT(),qi(),bo(),fT(),hh())},{immediate:!0,deep:!0}),Qe(j,(Pe,Ke)=>{const Mt=Pe.filter(Lt=>!(Ke!=null&&Ke.includes(Lt)));Mt.length>0&&K(Array.from(P.value),Mt).then(Lt=>{se(Lt,P.value,Mt)})},{immediate:!0,deep:!0}),Qe(L,(Pe,Ke)=>{x.value=!!(Ke&&Pe&&Ke!==Pe)}),t({refreshTable:tr});const Ul=Pe=>{pe.value=Pe,tr()},Yi=Pe=>{W.value=Pe,tr()},ph=Pe=>{N.value=Pe||[],ie({},!0)},gT=X(()=>{var Lt;const Pe=un.getInstance().getItem("ws.terminology"),Ke=Pe?JSON.parse(Pe):null;return`New ${((Lt=Ke==null?void 0:Ke.find(So=>So.code==="scene"))==null?void 0:Lt.name)||"Scene"}`}),is=Fo({showPopupBulkUpdate:!1,showPopupToolboxUploader:!1,showPopupSceneCreator:!1,showPopupItemDetails:!1,showPopupOverwriteScenes:!1}),cg=Pe=>{var So,Xn;const Ke=Pe.data,{action:Mt,type:Lt}=Ke;console.log("App loader close event received:",Ke),Mt=="APP_LOADER:HIDE"&&(Lt==="xlsx_toolbox"||Lt==="feedback_lockup_toolbox")&&((So=Rt.value)==null||So.close(),(Xn=nt.value)==null||Xn.close())};return Xt(()=>{window.addEventListener("message",cg)}),Vn(()=>{window.removeEventListener("message",cg)}),(Pe,Ke)=>(q(),je(V(Vse),{"is-sidebar-open":E.value,onCloseSidebar:V(Te),onSidebarClear:V(Te),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:V(Te)},{"header-left":we(()=>{var Mt;return[((Mt=V(i))==null?void 0:Mt.has_create_item_permission)==1?(q(),je(V(u0),{key:0,variant:["primary"],options:f.value,onSelect:Wi,onHandleClick:Ke[1]||(Ke[1]=Lt=>Wi("new_scene")),id:"create_scene_dropdown",tabIndex:2},{prefix:we(()=>[ze(ye(V(St),{"data-focus-index":"1",id:"create_new_scene",variant:["primary"],onClick:Ke[0]||(Ke[0]=Lt=>Wi("new_scene")),label:gT.value},null,8,["label"]),[[V(l),1]])]),_:1},8,["options"])):Ye("",!0)]}),"header-actions":we(()=>[ye(V(Pie),{"onUpdate:assignees":Yi,onApplyFilter:Ul,loading:V(Dt),entityId:p.entityId},null,8,["loading","entityId"]),ze(ye(V(RE),{focusIndex:"4",modelValue:_.value,"onUpdate:modelValue":Ke[2]||(Ke[2]=Mt=>_.value=Mt),onSearch:V(wt),class:le(Pe.$style.itemSearchBox),onClear:Ke[3]||(Ke[3]=Mt=>V(wt)("")),id:"item_search_box",ref_key:"searchBoxRef",ref:I},null,8,["modelValue","onSearch","class"]),[[V(n),{isLoading:V(Dt),fullwidth:!0}]]),ze((q(),je(V(eM),{status:V(He)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":x.value},{default:we(()=>[ze((q(),je(V(St),{variant:["secondary","icon"],disabled:V(He),onClick:tr},{default:we(()=>[ye(V(gt),{src:"ArrowsRotate"})]),_:1},8,["disabled"])),[[V(l),5],[V(a),"Refresh"]])]),_:1},8,["status","show-badge"])),[[V(n),{isLoading:V(Dt),fullwidth:!0}]]),ze(ye(V(Gre),{"model-value":V(N),onChange:Ke[4]||(Ke[4]=Mt=>ph(Mt)),id:"table_customization",gridApi:w.value,ref_key:"tableCustomizationRef",ref:oe,"checkbox-column":V(B),tableHeight:h.value},null,8,["model-value","gridApi","checkbox-column","tableHeight"]),[[V(n),{isLoading:V(Dt),fullwidth:!0}]])]),grid:we(({availableHeight:Mt})=>[ye(V(hTe),jt({id:"item_table_main",ref_key:"agGrid",ref:Ee},Le.value,{height:Mt+"px",isSorting:V(Ne),onOnGridReady:ji,onSelectionChanged:zi}),null,16,["height","isSorting"])]),footer:we(()=>[Se("div",{class:le(Pe.$style.tableFooter),id:"table_footer"},[Se("span",null,[Ke[7]||(Ke[7]=tt(" Showing ",-1)),Se("b",null,at(V(y).loaded)+" of "+at(V(y).total),1)])],2)]),"new-row":we(()=>[ye(V(uie),{ref_key:"createNewSceneRef",ref:Ui,onSearchForCode:Ki,onFocusOnId:dh},null,512)]),"bulk-update-actions":we(()=>[!E.value&&S.value.length>0?ze((q(),je(V(Ase),{key:0,selectRowData:tn.value,"workspace-id":p.workspaceId,"entity-id":p.entityId,"grid-api":w.value,onUnselect:V(ve),onSelectAll:V(Be),"take-name":re.value,"selected-all":Y.value,"total-rows":V(y).total,"visible-rows":V(y).loaded,onUpdated:V(en),loading:V(He),onRefreshSelectedRow:V(en)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","onSelectAll","take-name","selected-all","total-rows","visible-rows","onUpdated","loading","onRefreshSelectedRow"])),[[dr,!E.value&&S.value.length>0]]):Ye("",!0)]),snackbar:we(()=>[ye(V(Zse))]),popup:we(()=>[is.showPopupToolboxUploader?(q(),je(WTe,{key:0,ref_key:"popupToolboxUploaderRef",ref:Rt,"workspace-id":p.workspaceId,"entity-id":p.entityId,onImportSuccess:tr,onHide:Ke[5]||(Ke[5]=Mt=>is.showPopupToolboxUploader=!1)},null,8,["workspace-id","entity-id"])):Ye("",!0),is.showPopupBulkUpdate?(q(),je(eDe,{key:1,ref_key:"popupBulkUpdateRef",ref:nt,"workspace-id":p.workspaceId,"entity-id":p.entityId,onImportSuccess:tr,onHide:Ke[6]||(Ke[6]=Mt=>is.showPopupBulkUpdate=!1)},null,8,["workspace-id","entity-id"])):Ye("",!0)]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1sow5_1",tableFooter:"_tableFooter_1sow5_7",footerStart:"_footerStart_1sow5_17",newRow:"_newRow_1sow5_25","warning-text":"_warning-text_1sow5_43","has-error":"_has-error_1sow5_48",itemSearchBox:"_itemSearchBox_1sow5_52","beta-tag":"_beta-tag_1sow5_56"}}]]),$G="0.1.240",nDe={key:0},oDe=_t(ot({__name:"app",setup(e){const t=X(()=>n.id.length===0||n.workspaceId.length===0),n=Fo({id:"",workspaceId:"",apiConfig:{}}),o=Rs(),{showMessage:s,showErrorNetMessage:r}=o,i=["basicInfor","importItems"],a=h=>{h.success?s(h.apiCode,"success"):i.includes(h.apiCode)||r(h)},l=$(null),u=()=>{const h=un.getInstance().getItem("API_BASE_URL");return h!=null&&h.includes("v1")?h.slice(0,h.lastIndexOf("/v1")):String(h)};Bh(()=>{var h,f,p;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",$G);try{if(l.value=oo(),!l.value)throw new Error("Current instance is null");n.id=((h=l.value)==null?void 0:h.appContext.config.globalProperties.id)||"",n.workspaceId=((f=l.value)==null?void 0:f.appContext.config.globalProperties.workspaceId)||un.getInstance().getItem("ws.code");const g={domainApi:u(),wsCode:un.getInstance().getItem("ws.code"),entityId:n.id};if(n.apiConfig=(p=l.value)==null?void 0:p.appContext.config.globalProperties.apiConfig,!g.entityId||!g.wsCode||!g.domainApi)throw new Error("API configuration is missing in dashboardConfig");const v=new ON(n.apiConfig,g);v.on("call-api",a),l.value.appContext.config.globalProperties.apiServices=v}catch(g){console.error("Error getting current instance:",g)}}),Vn(()=>{l.value.appContext.config.globalProperties.apiServices.off("call-api",a)});const c=X(()=>n.id),d=X(()=>n.workspaceId);return ci("workspaceId",d),ci("entityId",c),(h,f)=>(q(),de("div",{class:le(h.$style.dashboardPluginWrapper)},[t.value?(q(),de("span",nDe," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):c.value?(q(),je(V(tDe),{key:1,entityId:c.value,workspaceId:d.value},null,8,["entityId","workspaceId"])):Ye("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),hT=async(e={},t={})=>{const n=gI(oDe),o=n5();n.use(o);const s=["apiConfig","workspaceId","id"],r={};Object.entries(e).forEach(([a,l])=>{l!==void 0&&(n.config.globalProperties[a]=l,r[a]=l,s.includes(a)&&typeof l=="string"?sessionStorage.setItem(a,l):console.error(`[Config Error] Key "${a}" has an invalid value and will not be persisted.`))}),n.config.globalProperties.$arboConfig=r,Object.values(t).forEach(a=>{a&&typeof a.install=="function"&&n.use(a)}),n.config.errorHandler=(a,l,u)=>{console.error("[Vue Error]",a),u&&console.error("[Info]",u)},console.log(`%cArbo Dashboard Plugin v${$G}`,"color: #4CAF50; font-weight: bold;"),console.log(n.config.globalProperties),globalThis.window.$switchInstance=n.config.globalProperties.switchInstance,n.provide("switchInstance",n.config.globalProperties.switchInstance),n.directive("tooltip",Kt),n.directive("focusable",Io);const i=await bue();return n.use(i),n};globalThis.window!==void 0&&(globalThis.window.arboDashboard=hT),Ln.default=hT,Ln.initDashboard=hT,Object.defineProperties(Ln,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
256
+ `)});function Wi(Pe){var Ke;Pe==="new_scene"?(Ke=Ui.value)==null||Ke.show():Pe==="import_scenes"?si():Pe==="overwrite_scenes"?qt():Pe==="bulk_update"&&Go()}const zi=Pe=>{S.value=Pe.api.getSelectedRows().map(Ke=>Ke.id)},ji=Pe=>{const Ke=Xe(Pe);return Ke&&(Ke.addEventListener("modelUpdated",Ge),Ke.addEventListener("bodyScroll",()=>Ke.stopEditing()),Ke.addEventListener("selectionChanged",en),Ke.addEventListener("columnMoved",Lt=>ie(Lt,!0)),Ke.addEventListener("columnResized",Lt=>ie(Lt,!0)),Ke.addEventListener("firstDataRendered",()=>{Dt.value=!1}),!document.querySelector(".ag-body-viewport"))||Pe==null||Pe.setColumnsVisible(["ag-Grid-SelectionColumn"],!1),Ke},Fs=()=>{var Pe;h.value=(((Pe=document.getElementById("item-table-layout-id"))==null?void 0:Pe.clientHeight)??0)-78+"px"};Xt(()=>{ht(()=>{Fs()}),window.addEventListener("resize",Fs);function Pe(){requestAnimationFrame(Pe)}Pe()}),Vn(()=>{window.removeEventListener("resize",Fs)});const Ki=async({code:Pe,name:Ke})=>{await wt(Pe),setTimeout(()=>{var Mt;(Mt=I.value)==null||Mt.setValue(Ke)},300)},dh=Pe=>{if(!w.value)return;const Ke=w.value.getRowNode(Pe);Ke?(w.value.ensureIndexVisible(Number(Ke.rowIndex),"middle"),w.value.flashCells({rowNodes:[Ke],flashDuration:3e3,fadeDuration:1e3})):w.value.ensureIndexVisible(y.value.total-1,"bottom")},Nn=Pe=>Pe.metric_type.code==="number"?"number":"default",bo=async()=>{if(p.entityId)try{const Pe=await xe(p.entityId);F.value=Pe.data.map(Ke=>({...Ke,sortType:Nn(Ke)}))}catch(Pe){console.error("Failed to initialize metric list:",Pe),F.value=[]}},fT=async()=>{if(M.value)try{const Pe=await M.value.getUserPermission(p.workspaceId);s(Pe)}catch(Pe){console.error("Failed to fetch user permissions:",Pe)}},hh=async()=>{if(M.value)try{const Pe=await M.value.getEntityDetail(p.workspaceId,p.entityId);r(Pe.permission),c.value=Pe}catch(Pe){console.error("Failed to fetch entity details:",Pe)}},cc=Ey(),{setUser:fh}=cc,pT=async()=>{if(M.value)try{const Pe=await M.value.getMe();return fh(Pe),Pe}catch(Pe){console.error("Failed to fetch user details:",Pe)}},qi=async()=>{var Pe;if(M.value)try{const Ke=await M.value.getWorkspaces(p.workspaceId),Mt=(Pe=Ke.data[0])==null?void 0:Pe.ws_user_role_id;return Mt&&cc.setUserRoleId(Mt),Ke}catch(Ke){console.error("Failed to fetch workspace details:",Ke)}};Qe(()=>[p.entityId,p.workspaceId],async([Pe,Ke])=>{!Pe||!Ke||(pT(),qi(),bo(),fT(),hh())},{immediate:!0,deep:!0}),Qe(j,(Pe,Ke)=>{const Mt=Pe.filter(Lt=>!(Ke!=null&&Ke.includes(Lt)));Mt.length>0&&K(Array.from(P.value),Mt).then(Lt=>{se(Lt,P.value,Mt)})},{immediate:!0,deep:!0}),Qe(L,(Pe,Ke)=>{x.value=!!(Ke&&Pe&&Ke!==Pe)}),t({refreshTable:tr});const Ul=Pe=>{pe.value=Pe,tr()},Yi=Pe=>{W.value=Pe,tr()},ph=Pe=>{N.value=Pe||[],ie({},!0)},gT=X(()=>{var Lt;const Pe=un.getInstance().getItem("ws.terminology"),Ke=Pe?JSON.parse(Pe):null;return`New ${((Lt=Ke==null?void 0:Ke.find(So=>So.code==="scene"))==null?void 0:Lt.name)||"Scene"}`}),is=Fo({showPopupBulkUpdate:!1,showPopupToolboxUploader:!1,showPopupSceneCreator:!1,showPopupItemDetails:!1,showPopupOverwriteScenes:!1}),cg=Pe=>{var So,Xn;const Ke=Pe.data,{action:Mt,type:Lt}=Ke;console.log("App loader close event received:",Ke),Mt=="APP_LOADER:HIDE"&&(Lt==="xlsx_toolbox"||Lt==="feedback_lockup_toolbox")&&((So=Rt.value)==null||So.close(),(Xn=nt.value)==null||Xn.close())};return Xt(()=>{window.addEventListener("message",cg)}),Vn(()=>{window.removeEventListener("message",cg)}),(Pe,Ke)=>(q(),je(V(Vse),{"is-sidebar-open":E.value,onCloseSidebar:V(Te),onSidebarClear:V(Te),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:V(Te)},{"header-left":we(()=>{var Mt;return[((Mt=V(i))==null?void 0:Mt.has_create_item_permission)==1?(q(),je(V(u0),{key:0,variant:["primary"],options:f.value,onSelect:Wi,onHandleClick:Ke[1]||(Ke[1]=Lt=>Wi("new_scene")),id:"create_scene_dropdown",tabIndex:2},{prefix:we(()=>[ze(ye(V(St),{"data-focus-index":"1",id:"create_new_scene",variant:["primary"],onClick:Ke[0]||(Ke[0]=Lt=>Wi("new_scene")),label:gT.value},null,8,["label"]),[[V(l),1]])]),_:1},8,["options"])):Ye("",!0)]}),"header-actions":we(()=>[ye(V(Pie),{"onUpdate:assignees":Yi,onApplyFilter:Ul,loading:V(Dt),entityId:p.entityId},null,8,["loading","entityId"]),ze(ye(V(RE),{focusIndex:"4",modelValue:_.value,"onUpdate:modelValue":Ke[2]||(Ke[2]=Mt=>_.value=Mt),onSearch:V(wt),class:le(Pe.$style.itemSearchBox),onClear:Ke[3]||(Ke[3]=Mt=>V(wt)("")),id:"item_search_box",ref_key:"searchBoxRef",ref:I},null,8,["modelValue","onSearch","class"]),[[V(n),{isLoading:V(Dt),fullwidth:!0}]]),ze((q(),je(V(eM),{status:V(He)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":x.value},{default:we(()=>[ze((q(),je(V(St),{variant:["secondary","icon"],disabled:V(He),onClick:tr},{default:we(()=>[ye(V(gt),{src:"ArrowsRotate"})]),_:1},8,["disabled"])),[[V(l),5],[V(a),"Refresh"]])]),_:1},8,["status","show-badge"])),[[V(n),{isLoading:V(Dt),fullwidth:!0}]]),ze(ye(V(Gre),{"model-value":V(N),onChange:Ke[4]||(Ke[4]=Mt=>ph(Mt)),id:"table_customization",gridApi:w.value,ref_key:"tableCustomizationRef",ref:oe,"checkbox-column":V(B),tableHeight:h.value},null,8,["model-value","gridApi","checkbox-column","tableHeight"]),[[V(n),{isLoading:V(Dt),fullwidth:!0}]])]),grid:we(({availableHeight:Mt})=>[ye(V(hTe),jt({id:"item_table_main",ref_key:"agGrid",ref:Ee},Le.value,{height:Mt+"px",isSorting:V(Ne),onOnGridReady:ji,onSelectionChanged:zi}),null,16,["height","isSorting"])]),footer:we(()=>[Se("div",{class:le(Pe.$style.tableFooter),id:"table_footer"},[Se("span",null,[Ke[7]||(Ke[7]=tt(" Showing ",-1)),Se("b",null,at(V(y).loaded)+" of "+at(V(y).total),1)])],2)]),"new-row":we(()=>[ye(V(uie),{ref_key:"createNewSceneRef",ref:Ui,onSearchForCode:Ki,onFocusOnId:dh},null,512)]),"bulk-update-actions":we(()=>[!E.value&&S.value.length>0?ze((q(),je(V(Ase),{key:0,selectRowData:tn.value,"workspace-id":p.workspaceId,"entity-id":p.entityId,"grid-api":w.value,onUnselect:V(ve),onSelectAll:V(Be),"take-name":re.value,"selected-all":Y.value,"total-rows":V(y).total,"visible-rows":V(y).loaded,onUpdated:V(en),loading:V(He),onRefreshSelectedRow:V(en)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","onSelectAll","take-name","selected-all","total-rows","visible-rows","onUpdated","loading","onRefreshSelectedRow"])),[[dr,!E.value&&S.value.length>0]]):Ye("",!0)]),snackbar:we(()=>[ye(V(Zse))]),popup:we(()=>[is.showPopupToolboxUploader?(q(),je(WTe,{key:0,ref_key:"popupToolboxUploaderRef",ref:Rt,"workspace-id":p.workspaceId,"entity-id":p.entityId,onImportSuccess:tr,onHide:Ke[5]||(Ke[5]=Mt=>is.showPopupToolboxUploader=!1)},null,8,["workspace-id","entity-id"])):Ye("",!0),is.showPopupBulkUpdate?(q(),je(eDe,{key:1,ref_key:"popupBulkUpdateRef",ref:nt,"workspace-id":p.workspaceId,"entity-id":p.entityId,onImportSuccess:tr,onHide:Ke[6]||(Ke[6]=Mt=>is.showPopupBulkUpdate=!1)},null,8,["workspace-id","entity-id"])):Ye("",!0)]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1sow5_1",tableFooter:"_tableFooter_1sow5_7",footerStart:"_footerStart_1sow5_17",newRow:"_newRow_1sow5_25","warning-text":"_warning-text_1sow5_43","has-error":"_has-error_1sow5_48",itemSearchBox:"_itemSearchBox_1sow5_52","beta-tag":"_beta-tag_1sow5_56"}}]]),$G="0.1.241",nDe={key:0},oDe=_t(ot({__name:"app",setup(e){const t=X(()=>n.id.length===0||n.workspaceId.length===0),n=Fo({id:"",workspaceId:"",apiConfig:{}}),o=Rs(),{showMessage:s,showErrorNetMessage:r}=o,i=["basicInfor","importItems"],a=h=>{h.success?s(h.apiCode,"success"):i.includes(h.apiCode)||r(h)},l=$(null),u=()=>{const h=un.getInstance().getItem("API_BASE_URL");return h!=null&&h.includes("v1")?h.slice(0,h.lastIndexOf("/v1")):String(h)};Bh(()=>{var h,f,p;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",$G);try{if(l.value=oo(),!l.value)throw new Error("Current instance is null");n.id=((h=l.value)==null?void 0:h.appContext.config.globalProperties.id)||"",n.workspaceId=((f=l.value)==null?void 0:f.appContext.config.globalProperties.workspaceId)||un.getInstance().getItem("ws.code");const g={domainApi:u(),wsCode:un.getInstance().getItem("ws.code"),entityId:n.id};if(n.apiConfig=(p=l.value)==null?void 0:p.appContext.config.globalProperties.apiConfig,!g.entityId||!g.wsCode||!g.domainApi)throw new Error("API configuration is missing in dashboardConfig");const v=new ON(n.apiConfig,g);v.on("call-api",a),l.value.appContext.config.globalProperties.apiServices=v}catch(g){console.error("Error getting current instance:",g)}}),Vn(()=>{l.value.appContext.config.globalProperties.apiServices.off("call-api",a)});const c=X(()=>n.id),d=X(()=>n.workspaceId);return ci("workspaceId",d),ci("entityId",c),(h,f)=>(q(),de("div",{class:le(h.$style.dashboardPluginWrapper)},[t.value?(q(),de("span",nDe," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):c.value?(q(),je(V(tDe),{key:1,entityId:c.value,workspaceId:d.value},null,8,["entityId","workspaceId"])):Ye("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),hT=async(e={},t={})=>{const n=gI(oDe),o=n5();n.use(o);const s=["apiConfig","workspaceId","id"],r={};Object.entries(e).forEach(([a,l])=>{l!==void 0&&(n.config.globalProperties[a]=l,r[a]=l,s.includes(a)&&typeof l=="string"?sessionStorage.setItem(a,l):console.error(`[Config Error] Key "${a}" has an invalid value and will not be persisted.`))}),n.config.globalProperties.$arboConfig=r,Object.values(t).forEach(a=>{a&&typeof a.install=="function"&&n.use(a)}),n.config.errorHandler=(a,l,u)=>{console.error("[Vue Error]",a),u&&console.error("[Info]",u)},console.log(`%cArbo Dashboard Plugin v${$G}`,"color: #4CAF50; font-weight: bold;"),console.log(n.config.globalProperties),globalThis.window.$switchInstance=n.config.globalProperties.switchInstance,n.provide("switchInstance",n.config.globalProperties.switchInstance),n.directive("tooltip",Kt),n.directive("focusable",Io);const i=await bue();return n.use(i),n};globalThis.window!==void 0&&(globalThis.window.arboDashboard=hT),Ln.default=hT,Ln.initDashboard=hT,Object.defineProperties(Ln,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});