@arbocollab/arbo-plugin-item-table 0.0.1-alpha.21 → 0.0.1-alpha.22

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.
@@ -31047,8 +31047,9 @@ function Nm(e) {
31047
31047
  isProcessing: 0,
31048
31048
  lastUpdated: 0,
31049
31049
  id: 0,
31050
- isCompleted: 0
31051
- /* readOnly */
31050
+ isCompleted: 0,
31051
+ options: 1
31052
+ /* editable */
31052
31053
  }[(l = e.colDef) == null ? void 0 : l.field];
31053
31054
  return o ? {
31054
31055
  disabled: o === -1,
@@ -73457,7 +73458,7 @@ const Ife = `<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="
73457
73458
  itemSearchBox: Vfe
73458
73459
  }, Hfe = {
73459
73460
  $style: Bfe
73460
- }, Gfe = /* @__PURE__ */ St(kfe, [["__cssModules", Hfe]]), $fe = "0.0.1-alpha.21", Wfe = { key: 0 }, zfe = /* @__PURE__ */ rt({
73461
+ }, Gfe = /* @__PURE__ */ St(kfe, [["__cssModules", Hfe]]), $fe = "0.0.1-alpha.22", Wfe = { key: 0 }, zfe = /* @__PURE__ */ rt({
73461
73462
  __name: "app",
73462
73463
  setup(e) {
73463
73464
  const t = G(() => n.id.length === 0 || n.workspaceId.length === 0), n = so({
@@ -85,7 +85,7 @@ Only state can be modified.`);r[0]="$state",Ll=!1,i.set(o,r,i.state.value),Ll=!0
85
85
  state: () => new MyClass()
86
86
  Found in store "${F.$id}".`),g&&o&&n.hydrate&&n.hydrate(F.$state,g),u=!0,c=!0,F}/*! #__NO_SIDE_EFFECTS__ */function m_(e,t,n){let i;const s=typeof t=="function";i=s?n:t;function o(r,a){const l=em();if(r=(k.env.NODE_ENV==="test"&&ha&&ha._testing?null:r)||(l?Di(Tf,null):null),r&&Nc(r),k.env.NODE_ENV!=="production"&&!ha)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
87
87
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
88
- This will fail in production.`);r=ha,r._s.has(e)||(s?PC(e,t,i,r):g_(e,i,r),k.env.NODE_ENV!=="production"&&(o._pinia=r));const u=r._s.get(e);if(k.env.NODE_ENV!=="production"&&a){const c="__hot:"+e,d=s?PC(c,t,i,r,!0):g_(c,Qi({},i),r,!0);a._hotUpdate(d),delete r.state.value[c],r._s.delete(c)}if(k.env.NODE_ENV!=="production"&&Po){const c=gi();if(c&&c.proxy&&!a){const d=c.proxy,h="_pStores"in d?d._pStores:d._pStores={};h[e]=u}}return u}return o.$id=e,o}function AC(e){const t=vt(e),n={};for(const i in t){const s=t[i];s.effect?n[i]=G({get:()=>e[i],set(o){e[i]=o}}):($t(s)||Hi(s))&&(n[i]=Jo(e,i))}return n}const mj={list:{error:void 0},list_cursor:{error:"Failed to fetch data. Please reload table."},assignedUser:{error:"Failed to fetch assignees. Please reload table."},metricValues:{error:"Failed to fetch metric values. Please reload table."},assignableUser:{error:"Failed to fetch people. Please try again."},assignableStatus:{error:"Failed to fetch statuses. Please try again."},basicInfor:{error:"Failed to fetch data. Please try again."},item:{error:"Update failed. Please try again."},bulkUpdate:{error:"Update failed. Please try again."},assigneeReplace:{error:"Update failed. Please try again."},unAssignAll:{error:"Update failed. Please try again."},removeAssignee:{error:"Update failed. Please try again."},createNewScene:{error:"Creation failed. Please try again."},metricList:{error:"Failed to fetch metrics. Please try again."},multipleAssignableUser:{error:"Failed to fetch data. Please reload table."},getPermission:{error:"Failed to fetch permissions."},delete_item:{success:"Deletion successful.",error:"Deletion failed. Please try again."},delete_rendition:{success:"Deletion successful.",error:"Deletion failed. Please try again."},archive_item:{success:"Archive successful.",error:"Archive failed. Please try again."},unarchive_item:{success:"Unarchive successful.",error:"Unarchive failed. Please try again."},bulkDelete:{success:"Deletion successful.",error:"Deletion failed. Please try again."},bulkArchive:{success:"Archive successful.",error:"Archive failed. Please try again."},bulkDateUpdate:{error:"Failed to update items."},bulkAssignUpdate:{error:"Failed to update assignees."},bulkStatusUpdate:{error:"Failed to update items."},bulkMetricUpdate:{error:"Failed to update metrics."}},kf=m_("toast",()=>{const e=ae([]),t=(s,o)=>{const r=mj[s];if(r){const a=r[o];if(a){n({id:s,type:o,message:a});return}}else n({id:s,type:o,message:s})},n=(s,o=5e3)=>{const r={...s,id:s.id??Date.now()+Math.random()};e.value.push(r),setTimeout(()=>{i(r.id)},o)};function i(s){e.value=e.value.filter(o=>o.id!==s)}return{notifications:e,addNotification:n,removeNotification:i,showMessage:t}}),vj=["innerHTML"],Cj=bt(rt({__name:"Snackbar",setup(e){const t=bN,n=kf(),{removeNotification:i}=n,{notifications:s}=AC(n),o=u=>u.trim().startsWith("<svg"),r=ae("Copy to clipboard"),a=()=>{setTimeout(()=>{r.value="Copy to clipboard"},1e3)},l=u=>{navigator.clipboard.writeText(u).then(()=>{r.value="Copied!",a()},()=>{r.value="Copy failed",a()})};return(u,c)=>{const d=DS("tooltip");return z(),Ze(sN,{name:"list",tag:"div",class:W(u.$style["notification-wrapper"])},{default:Fe(()=>[(z(!0),Ce(Ft,null,En(Z(s),h=>{var f;return tt((z(),Ce("div",{key:h.id,class:W([u.$style["notification-item"],u.$style[`notification--${h.type||"info"}`],!(h!=null&&h.actions)||((f=h==null?void 0:h.actions)==null?void 0:f.length)==0?u.$style["snackbar-type"]:""])},[ye("p",{class:W(u.$style.snackbar__message)},[h.icon&&!o(h.icon)?(z(),Ze(ut,{key:0,src:h.icon,source:"remote"},null,8,["src"])):at("",!0),h.icon&&o(h.icon)?(z(),Ce("i",{key:1,class:W(u.$style["icon-draw"]),innerHTML:h.icon},null,10,vj)):at("",!0),tt((z(),Ce("span",{class:W(u.$style["error-message"])},[pt(mt(h.message),1)],2)),[[d,{content:h.message}]])],2),h.actions?(z(),Ce("div",{key:0,class:W(u.$style["actions-notification"])},[(z(!0),Ce(Ft,null,En(h.actions,g=>(z(),Ze(yt,vn({key:g.label},{ref_for:!0},g,{onClick:g.action}),{prefix:Fe(()=>[g.btnIcon?(z(),Ze(ut,{key:0,src:g.btnIcon,source:"remote",color:"white"},null,8,["src"])):at("",!0)]),_:2},1040,["onClick"]))),128))],2)):at("",!0),h.type=="error"?tt((z(),Ze(yt,{key:1,variant:"tertiary",onClick:g=>l(h.message)},{prefix:Fe(()=>[we(ut,{src:"Copy",source:"remote",color:"white"})]),_:1},8,["onClick"])),[[d,r.value]]):at("",!0),we(yt,{variant:"tertiary",onClick:g=>Z(i)(h.id),class:W(u.$style["close-btn"]),size:18},{default:Fe(()=>[we(ut,{src:"Xmark",color:"var(--icon-color)"})]),_:1},8,["onClick","class"])],2)),[[Z(t)]])}),128))]),_:1},8,["class"])}}}),[["__cssModules",{$style:{"notification-wrapper":"_notification-wrapper_468tm_1","notification-item":"_notification-item_468tm_16","notification--success":"_notification--success_468tm_30","notification--error":"_notification--error_468tm_33","close-btn":"_close-btn_468tm_37","notification--info":"_notification--info_468tm_40","notification--warning":"_notification--warning_468tm_47","notification--interactive":"_notification--interactive_468tm_54","snackbar-type":"_snackbar-type_468tm_60",snackbar__message:"_snackbar__message_468tm_68","error-message":"_error-message_468tm_80","actions-notification":"_actions-notification_468tm_89"}}]]),yj=["draggable","onDragstart","onDragenter","onDragleave","onDrop","onFocus"],wj=bt(rt({__name:"DragDropList",props:{modelValue:{default:()=>[]},value:{default:void 0},groupName:{default:"default"},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},emits:["update","update:modelValue","input"],setup(e,{emit:t}){const n=e,i=t,s=ae([]),o=ae(null),r=ae(null),a=ae(null),l=ae(0),u=G(()=>n.value!==void 0?n.value:n.modelValue);ht(u,E=>{s.value=[...E]},{immediate:!0});const c=(E,y)=>{var R;if(n.disabled||n.readOnly||(R=s.value[y])!=null&&R.required){E.preventDefault();return}r.value=y,E.dataTransfer&&(E.dataTransfer.effectAllowed="move",E.dataTransfer.setData("text/plain",y.toString()),E.dataTransfer.setData("application/json",JSON.stringify({index:y,groupName:n.groupName}))),setTimeout(()=>{const T=E.target;T==null||T.classList.add("drag-item--dragging")},0)},d=E=>{r.value=null,a.value=null,l.value=0;const y=E.target;y==null||y.classList.remove("drag-item--dragging")},h=(E,y)=>{n.disabled||n.readOnly||(E.preventDefault(),!(r.value===null||r.value===y)&&(l.value++,a.value=y))},f=(E,y)=>{l.value--,l.value===0&&(a.value=null)},g=E=>{n.disabled||n.readOnly||(E.preventDefault(),E.dataTransfer&&(E.dataTransfer.dropEffect="move"))},v=(E,y)=>{if(n.disabled||n.readOnly)return;E.preventDefault(),E.stopPropagation();const R=r.value;if(R===null||R===y){b();return}const T=[...s.value],[F]=T.splice(R,1);T.splice(y,0,F),s.value=T,D(T),b()},C=E=>{E.preventDefault(),b()},b=()=>{r.value=null,a.value=null,l.value=0},D=E=>{i("update",E,n.groupName),i("update:modelValue",E),i("input",E)};return(E,y)=>(z(),Ce("div",{class:W([E.$style["drag-drop-container"],{[E.$style["is-disabled"]]:n.disabled,[E.$style["is-readonly"]]:n.readOnly}]),onDragover:jt(g,["prevent"]),onDrop:jt(C,["prevent"])},[(z(!0),Ce(Ft,null,En(s.value,(R,T)=>(z(),Ce("div",{key:R.id||T,class:W({[E.$style["drag-item"]]:!0,[E.$style["drag-item--focused"]]:o.value===T,[E.$style["drag-item--dragging"]]:r.value===T,[E.$style["drag-item--over"]]:a.value===T,[E.$style["drag-item--disabled"]]:R.required}),draggable:!n.disabled&&!n.readOnly,tabindex:"0",onDragstart:F=>c(F,T),onDragend:d,onDragenter:jt(F=>h(F,T),["prevent"]),onDragleave:F=>f(),onDragover:jt(g,["prevent"]),onDrop:jt(F=>v(F,T),["prevent"]),onFocus:F=>o.value=T,onBlur:y[0]||(y[0]=F=>o.value=null)},[Ct(E.$slots,"item",{item:R,index:T},()=>[R.required?at("",!0):(z(),Ce("span",{key:0,class:W(E.$style["drag-handle"]),"aria-hidden":"true"}," :: ",2)),ye("div",{class:W(E.$style["draggable-item"])},mt(R.name),3)])],42,yj))),128))],34))}}),[["__cssModules",{$style:{"drag-drop-container":"_drag-drop-container_fuk6u_1","is-disabled":"_is-disabled_fuk6u_7","is-readonly":"_is-readonly_fuk6u_11","drag-item":"_drag-item_fuk6u_15","drag-item--dragging":"_drag-item--dragging_fuk6u_23","drag-item--over":"_drag-item--over_fuk6u_30"}}]]),IC=bt(rt({__name:"DragDropItem",props:{item:{},disabled:{type:Boolean},readOnly:{type:Boolean},columnStates:{}},emits:["toggle-column"],setup(e,{emit:t}){const n=Cn,i=e,s=ae(!1),o=ae(i.columnStates[String(i.item.field)]||!1),r=t,a=G(()=>{var l,u;return(u=(l=i.item)==null?void 0:l.field)==null?void 0:u.includes("metric")});return ht(()=>o.value,()=>{r("toggle-column",i.item.field,i.item.required)}),(l,u)=>(z(),Ce("div",{key:e.item.field,class:W([l.$style["column-config__item"],{[l.$style.disabled]:e.disabled||i.readOnly}])},[we(gT,{id:`col-${e.item.field}`,modelValue:o.value,"onUpdate:modelValue":u[0]||(u[0]=c=>o.value=c),disabled:e.disabled},null,8,["id","modelValue","disabled"]),we(ut,{color:e.disabled?"var(--disabled-color)":"var(--primary-color)",source:"remote",src:"GripVertical",class:W(l.$style.handler)},null,8,["color","class"]),tt((z(),Ce("span",{class:W(l.$style["column-config__item-label"])},[pt(mt(e.item.headerName),1)],2)),[[Z(n),{content:e.item.headerName}]]),a.value?tt((z(),Ce("div",{key:0,class:W(l.$style.badge),onHover:u[1]||(u[1]=c=>s.value=!0)},[...u[2]||(u[2]=[pt(" M ",-1)])],34)),[[Z(n),"Metric"]]):at("",!0)],2))}}),[["__cssModules",{$style:{"column-config__item":"_column-config__item_qpc5s_1",disabled:"_disabled_qpc5s_13",readOnly:"_readOnly_qpc5s_17","column-config__item--pinned":"_column-config__item--pinned_qpc5s_20",handler:"_handler_qpc5s_27",badge:"_badge_qpc5s_31","column-config__item-label":"_column-config__item-label_qpc5s_45"}}]]),bj=bt(rt({__name:"TableCustomization",props:{modelValue:{},readOnly:{type:Boolean},disabled:{type:Boolean},checkboxColumn:{}},emits:["update:modelValue","input"],setup(e,{emit:t}){const n=Cn,i=e,s=t,o=ae(""),r=ae([]),a=ae({}),{triggerRef:l,popupRef:u}=vs({placement:"bottom-end",trigger:"click"}),c=G(()=>r.value.filter(E=>E.pinned==="left"&&E.field&&E.headerName)),d=G(()=>r.value.filter(E=>E.pinned==="right"&&E.field||E.field==="blank")),h=G({get:()=>r.value.filter(E=>!E.pinned&&E.field&&E.field!=="blank"),set:E=>{r.value=[...c.value,...E,...d.value]}}),f=G(()=>{if(!o.value)return{};const E=o.value.toLowerCase();return[...r.value,...h.value].reduce((y,R)=>{var T;return(T=R.headerName)!=null&&T.toLowerCase().includes(E)&&R.field&&(y[R.field]=!0),y},{})}),g=G(()=>i.modelValue),v=()=>{const E={};r.value.forEach(y=>{y.field&&(E[y.field]=!y.hide)}),a.value=E},C=()=>{const E=r.value.map(y=>({...y,hide:y.field?!a.value[y.field]:!1}));s("update:modelValue",E),s("input",E)},b=E=>{const y=[...c.value,...E,...d.value];i.checkboxColumn&&y.unshift(i.checkboxColumn),r.value=y,C()},D=(E,y)=>{!y&&E&&(a.value[E]=!a.value[E],C())};return ht(g,E=>{E&&E.length>0&&(r.value=[...E],v())},{immediate:!0}),(E,y)=>(z(),Ce("div",{class:W(E.$style["table-customization"])},[ye("div",{ref_key:"triggerRef",ref:l},[Ct(E.$slots,"trigger",{},()=>[tt((z(),Ze(yt,{variant:["secondary"],disabled:i.disabled},{prefix:Fe(()=>[we(ut,{src:"Gear"})]),default:Fe(()=>[y[2]||(y[2]=pt(" Customise ",-1))]),_:1},8,["disabled"])),[[Z(n),"Customise table columns"]])])],512),ye("div",{ref_key:"popupRef",ref:u,class:W(E.$style["tippy-content-wrapper"])},[ye("div",{class:W(E.$style["column-config"])},[we(Jv,{modelValue:o.value,"onUpdate:modelValue":y[0]||(y[0]=R=>o.value=R)},null,8,["modelValue"]),ye("div",{class:W(E.$style["column-config__header"])},[...y[3]||(y[3]=[ye("label",null,"Manage columns",-1)])],2),Object.entries(f.value).length===0&&o.value.length>0?(z(),Ce("div",{key:0,class:W(E.$style["no-columns"])},[...y[4]||(y[4]=[pt(" No results. ",-1),ye("br",null,null,-1),pt(" Try another search. ",-1)])],2)):at("",!0),ye("div",{class:W(E.$style["column-config__list"])},[c.value.length>0?(z(),Ce("div",{key:0,class:W(E.$style["column-config__pinned-section"])},[(z(!0),Ce(Ft,null,En(c.value,R=>tt((z(),Ze(IC,{key:R.field,item:R,disabled:!0,readOnly:!0,columnStates:a.value},null,8,["item","columnStates"])),[[bo,f.value[R.field]||!o.value]])),128))],2)):at("",!0),we(wj,{modelValue:h.value,"onUpdate:modelValue":y[1]||(y[1]=R=>h.value=R),"group-name":"columns",onUpdate:b,disabled:i.disabled,readOnly:i.readOnly},{item:Fe(({item:R})=>[tt(we(IC,{item:R,columnStates:a.value,disabled:i.disabled,readOnly:i.readOnly,onToggleColumn:D},null,8,["item","columnStates","disabled","readOnly"]),[[bo,f.value[R.field]||!o.value]])]),_:1},8,["modelValue","disabled","readOnly"]),d.value.length>0?(z(),Ce("div",{key:1,class:W(E.$style["column-config__pinned-section"])},[(z(!0),Ce(Ft,null,En(d.value.filter(R=>{var T;return R.headerName&&((T=R.headerName)==null?void 0:T.length)>0}),R=>tt((z(),Ze(IC,{key:R.field,item:R,disabled:i.disabled,readOnly:i.readOnly,columnStates:a.value},null,8,["item","disabled","readOnly","columnStates"])),[[bo,f.value[R.field]||!o.value]])),128))],2)):at("",!0)],2),ye("div",{class:W(E.$style["column-config__footer"])},[we(yt,{type:"button",variant:"secondary",disabled:!0},{default:Fe(()=>[...y[5]||(y[5]=[ye("span",null,"Add Column",-1)])]),_:1})],2)],2)],2)],2))}}),[["__cssModules",{$style:{"table-customization":"_table-customization_z1p39_1","table-customization__trigger":"_table-customization__trigger_z1p39_7","column-config":"_column-config_z1p39_23","column-config__header":"_column-config__header_z1p39_33","icon-color":"_icon-color_z1p39_43","column-config__list":"_column-config__list_z1p39_46","column-config__section-label":"_column-config__section-label_z1p39_50","column-config__footer":"_column-config__footer_z1p39_59","column-config__add-button":"_column-config__add-button_z1p39_62","cs-icon":"_cs-icon_z1p39_80","no-columns":"_no-columns_z1p39_84"}}]]),Sj=bt(rt({__name:"StatusSelect",props:{modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=[{label:"Online",value:"online",color:"green"},{label:"Offline",value:"offline",color:"gray"},{label:"Busy",value:"busy",color:"red"},{label:"Away",value:"away",color:"yellow"}],i=e,s=ae(i.modelValue),o=G(()=>i.modelValue||"Select status"),r=G(()=>{const a="red";return{backgroundColor:a,border:qm(a,"white")?"1px solid #ccc":"1px solid #fff"}});return(a,l)=>(z(),Ze(V4,{options:n,value:s.value},{trigger:Fe(({visibled:u})=>[we(js,{actived:u,class:W(a.$style["status-wrapper"])},{suffix:Fe(()=>[we(ut,{src:"ChevronUp",source:"remote",class:W([[a.$style["dropdown-icon"]],{[a.$style["dropdown-icon-show"]]:!u}])},null,8,["class"])]),default:Fe(()=>[ye("div",{class:W(a.$style.status)},[ye("div",{class:W(a.$style["color-indicator"]),style:mn(r.value)},null,6),pt(" "+mt(o.value),1)],2)]),_:2},1032,["actived","class"])]),options:Fe(()=>[(z(),Ce(Ft,null,En(n,u=>we(xc,{key:u.value,label:u.label,value:u,type:"status",data:{color:u.color}},null,8,["label","value","data"])),64))]),_:1},8,["value"]))}}),[["__cssModules",{$style:{"status-wrapper":"_status-wrapper_xxnkg_1",status:"_status_xxnkg_1","color-indicator":"_color-indicator_xxnkg_11","dropdown-icon":"_dropdown-icon_xxnkg_16","dropdown-icon-show":"_dropdown-icon-show_xxnkg_22"}}]]),Ej=bt(rt({name:"EmptyData",__name:"EmptyData",props:{isSearching:{type:Boolean},isFiltering:{type:Boolean}},setup(e){const t=e,n={noData:"No data available.",noSearchResults:"No results. Try another search.",noFilterResults:"No results. Try another filter."},i=G(()=>t.isSearching||t.isFiltering?"NoDataSearchFilter":"ClickToCreate"),s=G(()=>t.isSearching?n.noSearchResults:t.isFiltering?n.noFilterResults:n.noData);return(o,r)=>(z(),Ce("div",{class:W(o.$style["no-data-item-table"])},[ye("div",{class:W(o.$style.visual)},[we(z3,{source:"remote",src:i.value,ratio:"4/3",maxWidth:500,maxHeight:350},null,8,["src"])],2),ye("div",{class:W(o.$style.description)},mt(s.value),3)],2))}}),[["__cssModules",{$style:{"no-data-item-table":"_no-data-item-table_oh0wi_1",visual:"_visual_oh0wi_12",description:"_description_oh0wi_19"}}]]),v_=m_("sortStore",()=>{const e=ae({}),t={id:"id",name:"name",isStated:"actual_start_date",isCompleted:"actual_due_date",lastUpdated:"updated_at",completedOn:"due_date",status:"template_flow_status",assignees:"assignee"},n={start_asc:{column:"start_date",direction:"asc"},start_desc:{column:"start_date",direction:"desc"},due_asc:{column:"due_date",direction:"asc"},due_desc:{column:"due_date",direction:"desc"}},i=G(()=>{const a=e.value;return Object.values(a).filter(u=>u.sort!=="none"&&!!u.sort).map(u=>{let c;switch(u.colId){case"dateRange":c=n[u.sort];break;default:if(u.colId.includes("metric")){const[d,h]=u.colId.split("_");c={column:d,direction:u.sort,type:h}}else c={column:t[u.colId]||u.colId,direction:u.sort};break}return c})}),s=(a,l)=>{e.value={[a]:{colId:a,sort:l}}},o=()=>{e.value={}},r=ae(!1);return{sortingAPIConfiguration:i,sorts:e,setSort:s,clearSorting:o,isSortingRunning:r}}),ga=rt({name:"HeaderSorting",__name:"HeaderWrapper",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean}},setup(e){const t=e,n=v_(),{sorts:i}=AC(n),s=G(()=>{var a,l;return((l=(a=t.params)==null?void 0:a.column)==null?void 0:l.getColId())||"template_col_id"}),o=a=>{s.value&&n.setSort(s.value,a)},r=ae("none");return ht(()=>i.value,Ws(()=>{if(s.value){const a=i.value[s.value];r.value=a?a.sort:"none"}},200),{deep:!0,immediate:!0}),(a,l)=>s.value?(z(),Ze(B4,vn({key:0},t,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),onSortChanged:o}),null,16,["modelValue"])):at("",!0)}});function Rj(){const e=As({isCreating:!1,name:"",error:void 0});return{newItemData:e,validateNewItem:()=>{const s=e.name.trim();s.length===0?e.error="Name cannot be empty":s.length>25?e.error="Name cannot exceed 25 characters":e.error=void 0},openNewItemForm:()=>{e.isCreating=!0,e.name="",e.error=void 0},closeNewItemForm:()=>{e.isCreating=!1},resetNewItemForm:()=>{e.name="",e.error=void 0}}}const Dj=bt(rt({__name:"CreateNewScene",emits:["create-new-item"],setup(e,{expose:t,emit:n}){const i=wS("target"),s=wS("newSceneInputRef");cT(i,f=>r());const o=()=>{a.isCreating=!0},r=()=>{a.isCreating=!1,u()},{newItemData:a,validateNewItem:l,resetNewItemForm:u,closeNewItemForm:c}=Rj(),d=n,h=f=>{d("create-new-item",f)};return ht(()=>a.isCreating,f=>{f&&un(()=>{s.value&&s.value.focus()})}),t({show:o,hide:r}),(f,g)=>tt((z(),Ce("div",{class:W(f.$style.newRow),ref_key:"target",ref:i},[we(nT,{ref_key:"newSceneInputRef",ref:s,modelValue:Z(a).name,"onUpdate:modelValue":g[0]||(g[0]=v=>Z(a).name=v),onChange:Z(l),onEnter:g[1]||(g[1]=v=>h(Z(a).name)),placeholder:"Enter name",focused:!0,"max-length":25},{clear:Fe(()=>[Z(a).name.length==0?(z(),Ze(ut,{key:0,src:"Pen",color:"#f7941d"})):at("",!0)]),_:1},8,["modelValue","onChange"]),we(yt,{onClick:g[2]||(g[2]=v=>h(Z(a).name)),disabled:!!Z(a).error||!Z(a).name.trim()},{prefix:Fe(()=>[we(ut,{src:"Plus"})]),default:Fe(()=>[g[3]||(g[3]=pt(" Create ",-1))]),_:1},8,["disabled"]),we(yt,{variant:["secondary","icon"],onClick:Z(c)},{prefix:Fe(()=>[we(ut,{src:"XMarkSolid"})]),_:1},8,["onClick"])],2)),[[bo,Z(a).isCreating]])}}),[["__cssModules",{$style:{newRow:"_newRow_1vpac_1","warning-text":"_warning-text_1vpac_20","has-error":"_has-error_1vpac_25"}}]]),Fj={class:"create-scenes-body"},Tj={class:"step step-1-download-sample"},xj={class:"step step-2-upload-file"},_j={class:"drop-area-content"},Pj={class:"step step-3-select-status"},Aj={class:"step description"},Ij=bt(rt({__name:"PopupCreateScenes",setup(e,{expose:t}){const n=ae(null),i=ae(null),s=ae(!1),o=()=>{n.value&&n.value.show()},r=()=>{var f;(f=i.value)==null||f.click()},a=f=>{s.value=!0},l=f=>{s.value=!1},u=f=>{var v;s.value=!1;const g=(v=f.dataTransfer)==null?void 0:v.files;g&&g.length>0&&d(g[0])},c=f=>{const v=f.target.files;v&&v.length>0&&d(v[0])},d=f=>{};Sn(()=>{un(()=>{})}),t({open:o});const h=ae(null);return(f,g)=>(z(),Ze(Z(z4),{"popup-name":"Create Scenes","show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:n},{default:Fe(()=>[ye("div",Fj,[ye("div",Tj,[g[3]||(g[3]=ye("h2",null,"Step 1: Download sample",-1)),g[4]||(g[4]=ye("p",null,"This file contains all columns available for editing.",-1)),we(Z(yt),{class:"download-sample-btn",size:12,variant:"secondary"},{prefix:Fe(()=>[we(Z(ut),{src:"Download"})]),default:Fe(()=>[g[2]||(g[2]=pt(" Download sample file ",-1))]),_:1})]),ye("div",xj,[g[6]||(g[6]=ye("h2",null,"Step 2: Upload file (.xlsx, .xls, .csv)",-1)),ye("div",{class:W(["drop-area",{"is-dragging":s.value}]),onDragenter:jt(a,["prevent"]),onDragover:g[0]||(g[0]=jt(()=>{},["prevent"])),onDragleave:jt(l,["prevent"]),onDrop:jt(u,["prevent"]),onClick:r},[ye("div",_j,[we(Z(ut),{src:"Upload",size:"48"}),g[5]||(g[5]=ye("p",null,[pt(" Drag & drop your file here or "),ye("span",{class:"browse"},"browse")],-1))]),ye("input",{ref_key:"fileInput",ref:i,type:"file",style:{display:"none"},accept:".xlsx, .xls, .csv",onChange:c},null,544)],34)]),ye("div",Pj,[g[7]||(g[7]=ye("h2",null,"Step 3: Select status",-1)),we(Z(Sj),{modelValue:h.value,"onUpdate:modelValue":g[1]||(g[1]=v=>h.value=v)},null,8,["modelValue"])]),ye("div",Aj,[g[9]||(g[9]=ye("h3",null,"Date format guide",-1)),g[10]||(g[10]=pt(" Ensure all dates follow one of the two formats below: ",-1)),g[11]||(g[11]=ye("ul",null,[ye("li",null,"DD MM YYYY (Day-Month-Year)"),ye("li",null,"YYYY MM DD (Year-Month-Day)")],-1)),we(Z(yt),null,{prefix:Fe(()=>[we(Z(ut),{src:"InfoCircle"})]),default:Fe(()=>[g[8]||(g[8]=pt(" Check valid formats ",-1))]),_:1})])])]),_:1},512))}}),[["__scopeId","data-v-f795fc39"]]),kj={status:W4,dateRange:F4,checkbox:void 0,dateTime:A4,format:void 0,number:void 0,rating:pT,more:$3,assignee:D4,name:dT,text:v4,metric:L4},Oj={status:!0,dateRange:!0,checkbox:!0,dateTime:!1,format:!1,number:!1,rating:!1,more:!0,assignee:!0,name:!1,text:!1,metric:!1},Mj={status:lT,checkbox:"agCheckboxCellEditor",dateTime:null,format:hT,number:"agNumberCellEditor",more:fT,assignee:sT,dateRange:T4,rating:null,name:dT,text:null,metric:null},C_={status:[200,200],dateRange:[255,255],checkbox:[50,50],dateTime:[200,200],format:[200,200],number:[200,200],rating:[200,200],more:[50,50],assignee:[200,200],name:[300,window.innerWidth*.7],metric:[200,300]},Lj={dateRange:{cellEditorPopupPosition:"under",cellEditorPopup:!1},name:{cellEditorPopupPosition:"over",cellEditor:!1,cellEditorPopup:!1},metric:{suppressKeyboardEvent:void 0,suppressNavigable:!1,suppressMovable:!1,cellClass:"ag-cell-optimized"}};function kC(e){var a,l;const n=((a=e==null?void 0:e.data)==null?void 0:a.permissions)||void 0;let i;(u=>{u[u.disabled=-1]="disabled",u[u.readOnly=0]="readOnly",u[u.editable=1]="editable"})(i||(i={}));const o={assignees:(n==null?void 0:n.has_edit_permission)||1,completedOn:0,name:0,permissions:0,status:(n==null?void 0:n.has_edit_permission)||1,dateRange:(n==null?void 0:n.has_edit_date_permission)||1,isStarted:0,isDeleted:0,isArchived:0,isProcessing:0,lastUpdated:0,id:0,isCompleted:0}[(l=e.colDef)==null?void 0:l.field];return o?{disabled:o===-1,readOnly:o!==-1&&o!==1,editable:o===1}:{disabled:!1,readOnly:!0,editable:!1}}class ma{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){var r,a;const n=t.data||((r=t.node)==null?void 0:r.data),i=(a=t.colDef)==null?void 0:a.field,s=i&&n?n[i]:void 0,o=kC(t);return{...t,value:s,disabled:(o==null?void 0:o.disabled)||!1,readOnly:(o==null?void 0:o.readOnly)||!1}}static fromType(t,n){var g,v;const{wrapVueCellRenderer:i,wrapVueCellEditor:s}=this.getWrappers(),o=kj[t],r=Mj[t],a=Oj[t]??!1,l={minWidth:((g=C_[t])==null?void 0:g[0])||180,maxWidth:((v=C_[t])==null?void 0:v[1])||180},u=Lj[t]||{},c=C=>!!C&&typeof C!="string",d=c(o)?i(o):o;let h={};return h={cellEditorSelector:C=>{const b=kC(C);console.log("Editor Selector Params:",C.colDef.field,b);const D=!!(!(b!=null&&b.disabled)&&!(b!=null&&b.readOnly)&&(b!=null&&b.editable))&&a;return D?{component:D?c(r)?s(r):r:null,params:D?this.buildCommonCellParams(C):void 0}:void 0},singleClickEdit:!0,cellEditorPopup:!0,cellEditorPopupPosition:"under",...u},{headerName:t,...l,...n,...h,editable:C=>{const b=kC(C);return b?!(b!=null&&b.disabled)&&!(b!=null&&b.readOnly)&&(b==null?void 0:b.editable):!0},context:{...n.context,workspaceId:this.workspaceId,entityId:this.entityId},cellRenderer:d,cellRendererParams:n.cellRendererParams??this.buildCommonCellParams,headerComponentParams:C=>({...typeof n.headerComponentParams=="function"?n.headerComponentParams(C):n.headerComponentParams,headerType:t})}}}ln(ma,"wrappers",null),ln(ma,"workspaceId",""),ln(ma,"entityId","");function Nj(e){return"stopEditing"in e}const Vj=rt({name:"AgGridVue3CellWrapper",props:{component:{type:Object,required:!0},params:{type:Object,required:!0},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},value:{type:null,default:void 0},data:{type:Object,default:void 0},id:{type:[String,Number],default:void 0},tooltip:{type:[String,Number],default:void 0},isNoData:{type:Boolean,default:!1},workspaceId:{type:String,default:void 0},entityId:{type:String,default:void 0},axiosService:{type:Object,default:void 0},isSearching:{type:Boolean,default:!1},isFiltering:{type:Boolean,default:!1}},setup(e){var n;const t=((n=e.component)==null?void 0:n.default)||e.component;return t||console.error("[Vue3CellWrapper] Invalid component provided:",e.component),()=>we(t,{...e})}}),Bj=()=>`${Math.max(50,Math.round(yz(0,100)))}%`,Hj=8,Gj=e=>e?e.querySelectorAll("*").length+1:0,$j=e=>e?Object.keys(e).filter(t=>/^on[A-Z]/.test(t)).length:0;function y_(e){return class{constructor(){ln(this,"container");ln(this,"vNode",null);ln(this,"componentInstance",null);ln(this,"params");ln(this,"isEditor",!1)}init(n){var l,u,c,d,h,f,g;if(!n){console.error("[Vue3CellWrapper] Missing context information: workspaceId or entityId. Cannot initialize wrapper.");return}const i=performance.now(),s=n.context.apiClass;this.params=n,this.isEditor=Nj(n),this.container=document.createElement("div"),this.container.classList.add("ag-vue3-cell-wrapper"),this.container.classList.add(`${e.name||"unknown-component"}`),this.container.style.setProperty("--loading-overlay-width",Bj()),this.container.style.width="100%",this.container.style.height="100%";const o=Object.freeze(n),r={component:e,params:o,disabled:n.disabled??!1,readOnly:n.readOnly??!1,value:n.value,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:n.tooltip??void 0,isSearching:n.isSearching??!1,isNoData:n.isNoData??!1};this.vNode=we(Vj,r),Y0(this.vNode,this.container);const a=performance.now()-i;if(a>Hj){console.warn(`[Vue3CellWrapper] Slow render detected (${a.toFixed(1)}ms) for component "${(u=n.colDef)==null?void 0:u.field}" and field "${(c=n.data)==null?void 0:c.id}"`);{const v=Gj(this.container),C=$j((d=this.vNode)==null?void 0:d.props),b=Object.keys(((h=this.vNode)==null?void 0:h.props)||{}).length,D=Object.keys(n.context||{}).length;console.debug("[Vue3CellWrapper] Render diagnostics",{field:(f=n.colDef)==null?void 0:f.field,domCount:v,eventProps:C,propCount:b,contextCount:D,durationMs:a.toFixed(1)})}}this.componentInstance=(g=this.vNode.component)==null?void 0:g.proxy,this.componentInstance||console.warn("[Vue3CellWrapper] Component instance not available after render")}getGui(){return this.container}refresh(n){return!1}getValue(){var n,i,s;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((s=(i=this.componentInstance).getValue)==null?void 0:s.call(i))??this.componentInstance.value:(console.warn("[Vue3CellWrapper] getValue() called but component instance not available"),(n=this.params)==null?void 0:n.value)}isPopup(){var n;return this.isEditor?(n=this.componentInstance)!=null&&n.isPopup?this.componentInstance.isPopup():!0:!1}getPopupPosition(){var i,s,o;return this.isEditor?(i=this.componentInstance)!=null&&i.getPopupPosition?this.componentInstance.getPopupPosition():((o=(s=this.params)==null?void 0:s.colDef)==null?void 0:o.cellEditorPopupPosition)??"under":void 0}afterGuiAttached(){!this.isEditor||this.componentInstance}destroy(){if(!(!this.container||!this.vNode))try{this.componentInstance&&(typeof this.componentInstance.$destroy=="function"&&this.componentInstance.$destroy(),typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy()),Promise.resolve().then(()=>{try{Y0(null,this.container)}catch(n){console.warn("[Vue3CellWrapper] Error during unmount:",n)}})}catch(n){console.error("[Vue3CellWrapper] Error during cleanup:",n)}finally{this.vNode=null,this.componentInstance=null}}}}function Of(e){return y_(e)}function w_(e){return y_(e)}var va=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 i=t?this.allAsyncListeners:this.allSyncListeners;let s=i.get(e);return!s&&n&&(s=new Set,i.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 i=this.getListeners(e,n,!1);i&&(i.delete(t),i.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:i}=this,s=a=>{const l=i?()=>i.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},o=this.getListeners(n,t,!1);if(((o==null?void 0:o.size)??0)>0){const a=new Set(o);for(const l of a)o!=null&&o.has(l)&&s(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);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 Io(e){return e==null||e===""?null:e}function We(e){return e!=null&&e!==""}function sn(e){return!We(e)}function OC(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Vc(e,t){const n=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return n===i}function Wj(e,t,n=!1){const i=e==null,s=t==null;if(e!=null&&e.toNumber&&(e=e.toNumber()),t!=null&&t.toNumber&&(t=t.toNumber()),i&&s)return 0;if(i)return-1;if(s)return 1;function o(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!n)return o(e,t);try{return e.localeCompare(t)}catch{return o(e,t)}}var zj=/[&<>"']/g,Uj={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Vl(e){return(e==null?void 0:e.toString().toString())??null}function Bc(e){var t;return((t=Vl(e))==null?void 0:t.replace(zj,n=>Uj[n]))??null}function Ys(e){return e.eRootDiv.getRootNode()}function cn(e){return Ys(e).activeElement}function Nn(e){const{gos:t,eRootDiv:n}=e;let i=null;const s=t.get("getDocument");return s&&We(s)?i=s():n&&(i=n.ownerDocument),i&&We(i)?i:document}function b_(e){const t=cn(e);return t===null||t===Nn(e).body}function S_(e){return Nn(e).defaultView||window}function MC(e){let t=null,n=null;try{t=Nn(e).fullscreenElement}catch{}finally{t||(t=Ys(e));const i=t.querySelector("body");i?n=i:t instanceof ShadowRoot?n=t:t instanceof Document?n=t==null?void 0:t.documentElement:n=t}return n}function jj(e){const t=MC(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function Kj(e){const t=MC(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function Es(e,t,n){n==null||typeof n=="string"&&n==""?E_(e,t):Xi(e,t,n)}function Xi(e,t,n){e.setAttribute(R_(t),n.toString())}function E_(e,t){e.removeAttribute(R_(t))}function R_(e){return`aria-${e}`}function hr(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function qj(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Yj(e){return e.getAttribute("aria-label")}function Bl(e,t){Es(e,"label",t)}function Hc(e,t){Es(e,"labelledby",t)}function D_(e,t){Es(e,"live",t)}function Zj(e,t){Es(e,"atomic",t)}function Jj(e,t){Es(e,"relevant",t)}function Qj(e,t){Es(e,"invalid",t)}function Xj(e,t){Es(e,"disabled",t)}function F_(e,t){Es(e,"hidden",t)}function LC(e,t){Xi(e,"expanded",t)}function e8(e,t){Xi(e,"setsize",t)}function t8(e,t){Xi(e,"posinset",t)}function n8(e,t){Xi(e,"multiselectable",t)}function i8(e,t){Xi(e,"rowcount",t)}function Mf(e,t){Xi(e,"rowindex",t)}function s8(e,t){Xi(e,"rowspan",t)}function o8(e,t){Xi(e,"colcount",t)}function T_(e,t){Xi(e,"colindex",t)}function r8(e,t){Xi(e,"colspan",t)}function a8(e,t){Xi(e,"sort",t)}function l8(e){E_(e,"sort")}function x_(e,t){Es(e,"selected",t)}function u8(e,t){Es(e,"controls",t)}function c8(e,t){u8(e,t.id),Hc(t,e.id)}function __(e,t){Es(e,"owns",t)}function Lf(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var d8="[tabindex], input, select, button, textarea, [href]",P_="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Gc(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(P_)?!1:Zs(e)}function on(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-hidden",!t),i||F_(e,!t)}function h8(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-invisible",!t),i||F_(e,!t)}function $c(e,t){const n="disabled",i=t?o=>o.setAttribute(n,""):o=>o.removeAttribute(n);i(e);const s=e.querySelectorAll("input")??[];for(const o of s)i(o)}function Ca(e,t,n){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof n=="number"){if(++i>n)break}else if(e===n)break}return!1}function ya(e){const{height:t,width:n,borderTopWidth:i,borderRightWidth:s,borderBottomWidth:o,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:u,paddingLeft:c,marginTop:d,marginRight:h,marginBottom:f,marginLeft:g,boxSizing:v}=window.getComputedStyle(e),C=Number.parseFloat;return{height:C(t||"0"),width:C(n||"0"),borderTopWidth:C(i||"0"),borderRightWidth:C(s||"0"),borderBottomWidth:C(o||"0"),borderLeftWidth:C(r||"0"),paddingTop:C(a||"0"),paddingRight:C(l||"0"),paddingBottom:C(u||"0"),paddingLeft:C(c||"0"),marginTop:C(d||"0"),marginRight:C(h||"0"),marginBottom:C(f||"0"),marginLeft:C(g||"0"),boxSizing:v}}function NC(e){const t=ya(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Wc(e){const t=ya(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function A_(e){const{height:t,marginBottom:n,marginTop:i}=ya(e);return Math.floor(t+n+i)}function Nf(e){const{width:t,marginLeft:n,marginRight:i}=ya(e);return Math.floor(t+n+i)}function I_(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:i,borderRightWidth:s,borderBottomWidth:o}=ya(e);return{top:t.top+(n||0),left:t.left+(i||0),right:t.right+(s||0),bottom:t.bottom+(o||0)}}function Vf(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function Bf(e,t,n){n&&(t*=-1),e.scrollLeft=t}function $n(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function Rs(e){e!=null&&e.parentNode&&e.remove()}function k_(e){return!!e.offsetParent}function Zs(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!k_(e)||window.getComputedStyle(e).visibility!=="visible")}function VC(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function O_(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 M_(e,t){for(let n=0;n<t.length;n++){const i=t[n],s=e.children[n];s!==i&&e.insertBefore(i,s)}}function f8(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function zc(e,t){if(t)for(const n of Object.keys(t)){const i=t[n];if(!(n!=null&&n.length)||i==null)continue;const s=f8(n),o=i.toString(),r=o.replace(/\s*!important/g,""),a=r.length!=o.length?"important":void 0;e.style.setProperty(s,r,a)}}function Hf(e){return()=>{const t=e();return t?BC(t)||L_(t):!0}}function BC(e){return e.clientWidth<e.scrollWidth}function L_(e){return e.clientHeight<e.scrollHeight}function Gf(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Js(e,t)}function Js(e,t){t=HC(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Uc(e,t){t=HC(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function HC(e){return typeof e=="number"?`${e}px`:e}function GC(e){return e instanceof Node||e instanceof HTMLElement}function Mi(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function fr(e,t,n){const s=S_(e).ResizeObserver,o=s?new s(n):null;return o==null||o.observe(t),()=>o==null?void 0:o.disconnect()}function ko(e,t){const n=S_(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var N_="data-ref",$C;function V_(){return $C??($C=document.createTextNode(" ")),$C.cloneNode()}function jc(e){const{attrs:t,children:n,cls:i,ref:s,role:o,tag:r}=e,a=document.createElement(r);if(i&&(a.className=i),s&&a.setAttribute(N_,s),o&&a.setAttribute("role",o),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(V_()),l=!1),a.append(jc(u)),a.appendChild(V_())))}return a}var p8=["touchstart","touchend","touchmove","touchcancel","scroll"],g8=["wheel"],WC={},B_=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof WC[n]=="boolean")return WC[n];const i=document.createElement(e[n]||"div");return n="on"+n,WC[n]=n in i}})();function m8(e,t){return!t||!e?!1:C8(t).indexOf(e)>=0}function v8(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function C8(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():v8(t)}function y8(e,t,n){const i=w8(t);let s;i!=null&&(s={passive:i}),e.addEventListener(t,n,s)}var w8=e=>{const t=p8.includes(e),n=g8.includes(e);if(t)return!0;if(n)return!1};function H_(e,t,n){if(n===0)return!1;const i=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(i,s)<=n}var Kc=(e,t)=>{const n=e.identifier;for(let i=0,s=t.length;i<s;++i){const o=t[i];if(o.identifier===n)return o}return null};function qc(e,t){return e.gos.isElementInThisInstance(t.target)}function b8(e,t,n){const s=e.getBoundingClientRect().height,o=jj(n)-2,r=Kj(n)-2;if(!e.offsetParent)return;const l=I_(e.offsetParent),{clientY:u,clientX:c}=t;let d=u-l.top-s/2,h=c-l.left-10;const f=Nn(n),g=f.defaultView||window,v=g.pageYOffset||f.documentElement.scrollTop,C=g.pageXOffset||f.documentElement.scrollLeft;o>0&&h+e.clientWidth>o+C&&(h=o+C-e.clientWidth),h<0&&(h=0),r>0&&d+e.clientHeight>r+v&&(d=r+v-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}var $f=(e,...t)=>{for(const n of t){const[i,s,o,r]=n;i.addEventListener(s,o,r),e.push(n)}},zC=e=>{if(e){for(const[t,n,i,s]of e)t.removeEventListener(n,i,s);e.length=0}},pr=e=>{e.cancelable&&e.preventDefault()};function S8(e,t){return t}function G_(e){return(e==null?void 0:e.getLocaleTextFunc())??S8}function E8(e,t,n,i){const s=t[n];return e.getLocaleTextFunc()(n,typeof s=="function"?s(i):s,i)}function R8(e){return(t,n,i)=>e({key:t,defaultValue:n,variableValues:i})}function D8(e){return(t,n,i)=>{let s=e==null?void 0:e[t];if(s&&(i!=null&&i.length)){let o=0;for(;!(o>=i.length||s.indexOf("${variable}")===-1);)s=s.replace("${variable}",i[o++])}return s??n}}var Qs=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 va),this.localEventService.addEventListener(e,t,n)}removeEventListener(e,t,n){var i;(i=this.localEventService)==null||i.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 i of Object.keys(t)){const s=t[i];s&&n.push(this._setupListener(e,i,s))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let i;if(F8(e))e.__addEventListener(t,n),i=()=>(e.__removeEventListener(t,n),null);else{const s=T8(e);e instanceof HTMLElement?y8(e,t,n):s?e.addListener(t,n):e.addEventListener(t,n),i=s?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}setupPropertyListener(e,t){const{gos:n}=this;n.addPropertyEventListener(e,t);const i=()=>(n.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),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++,i=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=s.changeSet.id}const o={type:"propertyChanged",changeSet:s.changeSet,source:s.source};t(o)};for(const s of e)this.setupPropertyListener(s,i)}getLocaleTextFunc(){return G_(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 F8(e){return e.__addEventListener!==void 0}function T8(e){return e.eventServiceType==="global"}var ve=class extends Qs{},$_={};function UC(e,t){$_[t]||(e(),$_[t]=!0)}var x8={pending:!1,funcs:[]},_8={pending:!1,funcs:[]};function jC(e,t="setTimeout",n){const i=t==="raf"?_8:x8;if(i.funcs.push(e),i.pending)return;i.pending=!0;const s=()=>{const o=i.funcs.slice();i.funcs.length=0,i.pending=!1;for(const r of o)r()};t==="raf"?ko(n,s):window.setTimeout(s,0)}function Wn(e,t,n){let i;return function(...s){const o=this;window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(o,s)},n)}}function W_(e,t){let n=0;return function(...i){const s=this,o=Date.now();o-n<t||(n=o,e.apply(s,i))}}function P8(e,t,n,i=100){const s=Date.now();let o=null,r=!1;const a=()=>{o!=null&&(window.clearInterval(o),o=null)};e.addDestroyFunc(a);const l=()=>{const u=Date.now()-s>i;(t()||u)&&(n(),r=!0,a())};l(),r||(o=window.setInterval(l,10))}var z_=new Set(["__proto__","constructor","prototype"]);function A8(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(i=>!z_.has(i)))t(n,e[n])}}function di(e,t,n=!0,i=!1){We(t)&&A8(t,(s,o)=>{let r=e[s];r!==o&&(i&&r==null&&o!=null&&typeof o=="object"&&o.constructor===Object&&(r={},e[s]=r),U_(o)&&U_(r)&&!Array.isArray(r)?di(r,o,n,i):(n||o!==void 0)&&(e[s]=o))})}function U_(e){return typeof e=="object"&&e!==null}var KC=class qo{static applyGlobalGridOptions(t){if(!qo.gridOptions)return{...t};let n={};return di(n,qo.gridOptions,!0,!0),qo.mergeStrategy==="deep"?di(n,t,!0,!0):n={...n,...t},qo.gridOptions.context&&(n.context=qo.gridOptions.context),t.context&&(qo.mergeStrategy==="deep"&&n.context&&di(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(qo.mergeStrategy==="deep"){const i=I8(t);if(i&&typeof i=="object"&&typeof n=="object")return qo.applyGlobalGridOptions({[t]:n})[t]}return n}};KC.gridOptions=void 0,KC.mergeStrategy="shallow";var qC=KC;function I8(e){var t;return(t=qC.gridOptions)==null?void 0:t[e]}var k8={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},j_="https://www.ag-grid.com";function gr(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function Yc(e,...t){UC(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Hl(e,...t){UC(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var K_=new Set,Wf={},Gl={},zf,q_=!1,Y_=!1,O8=!1;function M8(e){const[t,n]=e.version.split(".")||[],[i,s]=zf.split(".")||[];return t===i&&n===s}function L8(e){var i;zf||(zf=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?M8(e)||Hl(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${zf}.`)):Hl(t(`'${e.moduleName}' is incompatible.`));const n=(i=e.validate)==null?void 0:i.call(e);n&&!n.isValid&&Hl(`${n.message}`)}function Zc(e,t,n=!1){n||(q_=!0),L8(e);const i=e.rowModels??["all"];K_.add(e);let s;t!==void 0?(Y_=!0,Gl[t]===void 0&&(Gl[t]={}),s=Gl[t]):s=Wf;for(const o of i)s[o]===void 0&&(s[o]={}),s[o][e.moduleName]=e;if(e.dependsOn)for(const o of e.dependsOn)Zc(o,t,n)}function N8(e){delete Gl[e]}function YC(e,t,n){const i=s=>{var o,r,a;return!!((o=Wf[s])!=null&&o[e])||!!((a=(r=Gl[t])==null?void 0:r[s])!=null&&a[e])};return i(n)||i("all")}function ZC(){return Y_}function V8(e,t){const n=Gl[e]??{};return[...Object.values(Wf.all??{}),...Object.values(n.all??{}),...Object.values(Wf[t]??{}),...Object.values(n[t]??{})]}function B8(){return new Set(K_)}function H8(){return q_}function G8(){return O8}var $8=class{static register(e){Zc(e,void 0)}static registerModules(e){for(const t of e)Zc(t,void 0)}},Ge="34.3.1",Z_=2e3,J_=100,Q_="_version_",Uf=null,$l=`${j_}/javascript-data-grid`;function W8(e){Uf=e}function z8(e){$l=e}function X_(e,t,n){return(Uf==null?void 0:Uf(e,t))??[q8(e,t,n)]}function JC(e,t,n,i,s){e(`${i?"warning":"error"} #${t}`,...X_(t,n,s))}function U8(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 j8(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=U8(e)),t}function jf(e){return e===void 0?"undefined":e===null?"null":e}function QC(e,t){return`${e}?${t.toString()}`}function K8(e,t,n){const i=Array.from(t.entries()).sort((o,r)=>r[1].length-o[1].length);let s=QC(e,t);for(const[o,r]of i){if(o===Q_)continue;const a=s.length-n;if(a<=0)break;const l="...",u=a+l.length,c=r.length-u>J_?r.slice(0,r.length-u)+l:r.slice(0,J_)+l;t.set(o,c),s=QC(e,t)}return s}function eP(e,t){const n=new URLSearchParams;if(n.append(Q_,Ge),t)for(const o of Object.keys(t))n.append(o,j8(t[o]));const i=`${$l}/errors/${e}`,s=QC(i,n);return s.length<=Z_?s:K8(i,n,Z_)}var q8=(e,t,n)=>{const i=eP(e,t);return`${`${n?n+`
88
+ This will fail in production.`);r=ha,r._s.has(e)||(s?PC(e,t,i,r):g_(e,i,r),k.env.NODE_ENV!=="production"&&(o._pinia=r));const u=r._s.get(e);if(k.env.NODE_ENV!=="production"&&a){const c="__hot:"+e,d=s?PC(c,t,i,r,!0):g_(c,Qi({},i),r,!0);a._hotUpdate(d),delete r.state.value[c],r._s.delete(c)}if(k.env.NODE_ENV!=="production"&&Po){const c=gi();if(c&&c.proxy&&!a){const d=c.proxy,h="_pStores"in d?d._pStores:d._pStores={};h[e]=u}}return u}return o.$id=e,o}function AC(e){const t=vt(e),n={};for(const i in t){const s=t[i];s.effect?n[i]=G({get:()=>e[i],set(o){e[i]=o}}):($t(s)||Hi(s))&&(n[i]=Jo(e,i))}return n}const mj={list:{error:void 0},list_cursor:{error:"Failed to fetch data. Please reload table."},assignedUser:{error:"Failed to fetch assignees. Please reload table."},metricValues:{error:"Failed to fetch metric values. Please reload table."},assignableUser:{error:"Failed to fetch people. Please try again."},assignableStatus:{error:"Failed to fetch statuses. Please try again."},basicInfor:{error:"Failed to fetch data. Please try again."},item:{error:"Update failed. Please try again."},bulkUpdate:{error:"Update failed. Please try again."},assigneeReplace:{error:"Update failed. Please try again."},unAssignAll:{error:"Update failed. Please try again."},removeAssignee:{error:"Update failed. Please try again."},createNewScene:{error:"Creation failed. Please try again."},metricList:{error:"Failed to fetch metrics. Please try again."},multipleAssignableUser:{error:"Failed to fetch data. Please reload table."},getPermission:{error:"Failed to fetch permissions."},delete_item:{success:"Deletion successful.",error:"Deletion failed. Please try again."},delete_rendition:{success:"Deletion successful.",error:"Deletion failed. Please try again."},archive_item:{success:"Archive successful.",error:"Archive failed. Please try again."},unarchive_item:{success:"Unarchive successful.",error:"Unarchive failed. Please try again."},bulkDelete:{success:"Deletion successful.",error:"Deletion failed. Please try again."},bulkArchive:{success:"Archive successful.",error:"Archive failed. Please try again."},bulkDateUpdate:{error:"Failed to update items."},bulkAssignUpdate:{error:"Failed to update assignees."},bulkStatusUpdate:{error:"Failed to update items."},bulkMetricUpdate:{error:"Failed to update metrics."}},kf=m_("toast",()=>{const e=ae([]),t=(s,o)=>{const r=mj[s];if(r){const a=r[o];if(a){n({id:s,type:o,message:a});return}}else n({id:s,type:o,message:s})},n=(s,o=5e3)=>{const r={...s,id:s.id??Date.now()+Math.random()};e.value.push(r),setTimeout(()=>{i(r.id)},o)};function i(s){e.value=e.value.filter(o=>o.id!==s)}return{notifications:e,addNotification:n,removeNotification:i,showMessage:t}}),vj=["innerHTML"],Cj=bt(rt({__name:"Snackbar",setup(e){const t=bN,n=kf(),{removeNotification:i}=n,{notifications:s}=AC(n),o=u=>u.trim().startsWith("<svg"),r=ae("Copy to clipboard"),a=()=>{setTimeout(()=>{r.value="Copy to clipboard"},1e3)},l=u=>{navigator.clipboard.writeText(u).then(()=>{r.value="Copied!",a()},()=>{r.value="Copy failed",a()})};return(u,c)=>{const d=DS("tooltip");return z(),Ze(sN,{name:"list",tag:"div",class:W(u.$style["notification-wrapper"])},{default:Fe(()=>[(z(!0),Ce(Ft,null,En(Z(s),h=>{var f;return tt((z(),Ce("div",{key:h.id,class:W([u.$style["notification-item"],u.$style[`notification--${h.type||"info"}`],!(h!=null&&h.actions)||((f=h==null?void 0:h.actions)==null?void 0:f.length)==0?u.$style["snackbar-type"]:""])},[ye("p",{class:W(u.$style.snackbar__message)},[h.icon&&!o(h.icon)?(z(),Ze(ut,{key:0,src:h.icon,source:"remote"},null,8,["src"])):at("",!0),h.icon&&o(h.icon)?(z(),Ce("i",{key:1,class:W(u.$style["icon-draw"]),innerHTML:h.icon},null,10,vj)):at("",!0),tt((z(),Ce("span",{class:W(u.$style["error-message"])},[pt(mt(h.message),1)],2)),[[d,{content:h.message}]])],2),h.actions?(z(),Ce("div",{key:0,class:W(u.$style["actions-notification"])},[(z(!0),Ce(Ft,null,En(h.actions,g=>(z(),Ze(yt,vn({key:g.label},{ref_for:!0},g,{onClick:g.action}),{prefix:Fe(()=>[g.btnIcon?(z(),Ze(ut,{key:0,src:g.btnIcon,source:"remote",color:"white"},null,8,["src"])):at("",!0)]),_:2},1040,["onClick"]))),128))],2)):at("",!0),h.type=="error"?tt((z(),Ze(yt,{key:1,variant:"tertiary",onClick:g=>l(h.message)},{prefix:Fe(()=>[we(ut,{src:"Copy",source:"remote",color:"white"})]),_:1},8,["onClick"])),[[d,r.value]]):at("",!0),we(yt,{variant:"tertiary",onClick:g=>Z(i)(h.id),class:W(u.$style["close-btn"]),size:18},{default:Fe(()=>[we(ut,{src:"Xmark",color:"var(--icon-color)"})]),_:1},8,["onClick","class"])],2)),[[Z(t)]])}),128))]),_:1},8,["class"])}}}),[["__cssModules",{$style:{"notification-wrapper":"_notification-wrapper_468tm_1","notification-item":"_notification-item_468tm_16","notification--success":"_notification--success_468tm_30","notification--error":"_notification--error_468tm_33","close-btn":"_close-btn_468tm_37","notification--info":"_notification--info_468tm_40","notification--warning":"_notification--warning_468tm_47","notification--interactive":"_notification--interactive_468tm_54","snackbar-type":"_snackbar-type_468tm_60",snackbar__message:"_snackbar__message_468tm_68","error-message":"_error-message_468tm_80","actions-notification":"_actions-notification_468tm_89"}}]]),yj=["draggable","onDragstart","onDragenter","onDragleave","onDrop","onFocus"],wj=bt(rt({__name:"DragDropList",props:{modelValue:{default:()=>[]},value:{default:void 0},groupName:{default:"default"},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},emits:["update","update:modelValue","input"],setup(e,{emit:t}){const n=e,i=t,s=ae([]),o=ae(null),r=ae(null),a=ae(null),l=ae(0),u=G(()=>n.value!==void 0?n.value:n.modelValue);ht(u,E=>{s.value=[...E]},{immediate:!0});const c=(E,y)=>{var R;if(n.disabled||n.readOnly||(R=s.value[y])!=null&&R.required){E.preventDefault();return}r.value=y,E.dataTransfer&&(E.dataTransfer.effectAllowed="move",E.dataTransfer.setData("text/plain",y.toString()),E.dataTransfer.setData("application/json",JSON.stringify({index:y,groupName:n.groupName}))),setTimeout(()=>{const T=E.target;T==null||T.classList.add("drag-item--dragging")},0)},d=E=>{r.value=null,a.value=null,l.value=0;const y=E.target;y==null||y.classList.remove("drag-item--dragging")},h=(E,y)=>{n.disabled||n.readOnly||(E.preventDefault(),!(r.value===null||r.value===y)&&(l.value++,a.value=y))},f=(E,y)=>{l.value--,l.value===0&&(a.value=null)},g=E=>{n.disabled||n.readOnly||(E.preventDefault(),E.dataTransfer&&(E.dataTransfer.dropEffect="move"))},v=(E,y)=>{if(n.disabled||n.readOnly)return;E.preventDefault(),E.stopPropagation();const R=r.value;if(R===null||R===y){b();return}const T=[...s.value],[F]=T.splice(R,1);T.splice(y,0,F),s.value=T,D(T),b()},C=E=>{E.preventDefault(),b()},b=()=>{r.value=null,a.value=null,l.value=0},D=E=>{i("update",E,n.groupName),i("update:modelValue",E),i("input",E)};return(E,y)=>(z(),Ce("div",{class:W([E.$style["drag-drop-container"],{[E.$style["is-disabled"]]:n.disabled,[E.$style["is-readonly"]]:n.readOnly}]),onDragover:jt(g,["prevent"]),onDrop:jt(C,["prevent"])},[(z(!0),Ce(Ft,null,En(s.value,(R,T)=>(z(),Ce("div",{key:R.id||T,class:W({[E.$style["drag-item"]]:!0,[E.$style["drag-item--focused"]]:o.value===T,[E.$style["drag-item--dragging"]]:r.value===T,[E.$style["drag-item--over"]]:a.value===T,[E.$style["drag-item--disabled"]]:R.required}),draggable:!n.disabled&&!n.readOnly,tabindex:"0",onDragstart:F=>c(F,T),onDragend:d,onDragenter:jt(F=>h(F,T),["prevent"]),onDragleave:F=>f(),onDragover:jt(g,["prevent"]),onDrop:jt(F=>v(F,T),["prevent"]),onFocus:F=>o.value=T,onBlur:y[0]||(y[0]=F=>o.value=null)},[Ct(E.$slots,"item",{item:R,index:T},()=>[R.required?at("",!0):(z(),Ce("span",{key:0,class:W(E.$style["drag-handle"]),"aria-hidden":"true"}," :: ",2)),ye("div",{class:W(E.$style["draggable-item"])},mt(R.name),3)])],42,yj))),128))],34))}}),[["__cssModules",{$style:{"drag-drop-container":"_drag-drop-container_fuk6u_1","is-disabled":"_is-disabled_fuk6u_7","is-readonly":"_is-readonly_fuk6u_11","drag-item":"_drag-item_fuk6u_15","drag-item--dragging":"_drag-item--dragging_fuk6u_23","drag-item--over":"_drag-item--over_fuk6u_30"}}]]),IC=bt(rt({__name:"DragDropItem",props:{item:{},disabled:{type:Boolean},readOnly:{type:Boolean},columnStates:{}},emits:["toggle-column"],setup(e,{emit:t}){const n=Cn,i=e,s=ae(!1),o=ae(i.columnStates[String(i.item.field)]||!1),r=t,a=G(()=>{var l,u;return(u=(l=i.item)==null?void 0:l.field)==null?void 0:u.includes("metric")});return ht(()=>o.value,()=>{r("toggle-column",i.item.field,i.item.required)}),(l,u)=>(z(),Ce("div",{key:e.item.field,class:W([l.$style["column-config__item"],{[l.$style.disabled]:e.disabled||i.readOnly}])},[we(gT,{id:`col-${e.item.field}`,modelValue:o.value,"onUpdate:modelValue":u[0]||(u[0]=c=>o.value=c),disabled:e.disabled},null,8,["id","modelValue","disabled"]),we(ut,{color:e.disabled?"var(--disabled-color)":"var(--primary-color)",source:"remote",src:"GripVertical",class:W(l.$style.handler)},null,8,["color","class"]),tt((z(),Ce("span",{class:W(l.$style["column-config__item-label"])},[pt(mt(e.item.headerName),1)],2)),[[Z(n),{content:e.item.headerName}]]),a.value?tt((z(),Ce("div",{key:0,class:W(l.$style.badge),onHover:u[1]||(u[1]=c=>s.value=!0)},[...u[2]||(u[2]=[pt(" M ",-1)])],34)),[[Z(n),"Metric"]]):at("",!0)],2))}}),[["__cssModules",{$style:{"column-config__item":"_column-config__item_qpc5s_1",disabled:"_disabled_qpc5s_13",readOnly:"_readOnly_qpc5s_17","column-config__item--pinned":"_column-config__item--pinned_qpc5s_20",handler:"_handler_qpc5s_27",badge:"_badge_qpc5s_31","column-config__item-label":"_column-config__item-label_qpc5s_45"}}]]),bj=bt(rt({__name:"TableCustomization",props:{modelValue:{},readOnly:{type:Boolean},disabled:{type:Boolean},checkboxColumn:{}},emits:["update:modelValue","input"],setup(e,{emit:t}){const n=Cn,i=e,s=t,o=ae(""),r=ae([]),a=ae({}),{triggerRef:l,popupRef:u}=vs({placement:"bottom-end",trigger:"click"}),c=G(()=>r.value.filter(E=>E.pinned==="left"&&E.field&&E.headerName)),d=G(()=>r.value.filter(E=>E.pinned==="right"&&E.field||E.field==="blank")),h=G({get:()=>r.value.filter(E=>!E.pinned&&E.field&&E.field!=="blank"),set:E=>{r.value=[...c.value,...E,...d.value]}}),f=G(()=>{if(!o.value)return{};const E=o.value.toLowerCase();return[...r.value,...h.value].reduce((y,R)=>{var T;return(T=R.headerName)!=null&&T.toLowerCase().includes(E)&&R.field&&(y[R.field]=!0),y},{})}),g=G(()=>i.modelValue),v=()=>{const E={};r.value.forEach(y=>{y.field&&(E[y.field]=!y.hide)}),a.value=E},C=()=>{const E=r.value.map(y=>({...y,hide:y.field?!a.value[y.field]:!1}));s("update:modelValue",E),s("input",E)},b=E=>{const y=[...c.value,...E,...d.value];i.checkboxColumn&&y.unshift(i.checkboxColumn),r.value=y,C()},D=(E,y)=>{!y&&E&&(a.value[E]=!a.value[E],C())};return ht(g,E=>{E&&E.length>0&&(r.value=[...E],v())},{immediate:!0}),(E,y)=>(z(),Ce("div",{class:W(E.$style["table-customization"])},[ye("div",{ref_key:"triggerRef",ref:l},[Ct(E.$slots,"trigger",{},()=>[tt((z(),Ze(yt,{variant:["secondary"],disabled:i.disabled},{prefix:Fe(()=>[we(ut,{src:"Gear"})]),default:Fe(()=>[y[2]||(y[2]=pt(" Customise ",-1))]),_:1},8,["disabled"])),[[Z(n),"Customise table columns"]])])],512),ye("div",{ref_key:"popupRef",ref:u,class:W(E.$style["tippy-content-wrapper"])},[ye("div",{class:W(E.$style["column-config"])},[we(Jv,{modelValue:o.value,"onUpdate:modelValue":y[0]||(y[0]=R=>o.value=R)},null,8,["modelValue"]),ye("div",{class:W(E.$style["column-config__header"])},[...y[3]||(y[3]=[ye("label",null,"Manage columns",-1)])],2),Object.entries(f.value).length===0&&o.value.length>0?(z(),Ce("div",{key:0,class:W(E.$style["no-columns"])},[...y[4]||(y[4]=[pt(" No results. ",-1),ye("br",null,null,-1),pt(" Try another search. ",-1)])],2)):at("",!0),ye("div",{class:W(E.$style["column-config__list"])},[c.value.length>0?(z(),Ce("div",{key:0,class:W(E.$style["column-config__pinned-section"])},[(z(!0),Ce(Ft,null,En(c.value,R=>tt((z(),Ze(IC,{key:R.field,item:R,disabled:!0,readOnly:!0,columnStates:a.value},null,8,["item","columnStates"])),[[bo,f.value[R.field]||!o.value]])),128))],2)):at("",!0),we(wj,{modelValue:h.value,"onUpdate:modelValue":y[1]||(y[1]=R=>h.value=R),"group-name":"columns",onUpdate:b,disabled:i.disabled,readOnly:i.readOnly},{item:Fe(({item:R})=>[tt(we(IC,{item:R,columnStates:a.value,disabled:i.disabled,readOnly:i.readOnly,onToggleColumn:D},null,8,["item","columnStates","disabled","readOnly"]),[[bo,f.value[R.field]||!o.value]])]),_:1},8,["modelValue","disabled","readOnly"]),d.value.length>0?(z(),Ce("div",{key:1,class:W(E.$style["column-config__pinned-section"])},[(z(!0),Ce(Ft,null,En(d.value.filter(R=>{var T;return R.headerName&&((T=R.headerName)==null?void 0:T.length)>0}),R=>tt((z(),Ze(IC,{key:R.field,item:R,disabled:i.disabled,readOnly:i.readOnly,columnStates:a.value},null,8,["item","disabled","readOnly","columnStates"])),[[bo,f.value[R.field]||!o.value]])),128))],2)):at("",!0)],2),ye("div",{class:W(E.$style["column-config__footer"])},[we(yt,{type:"button",variant:"secondary",disabled:!0},{default:Fe(()=>[...y[5]||(y[5]=[ye("span",null,"Add Column",-1)])]),_:1})],2)],2)],2)],2))}}),[["__cssModules",{$style:{"table-customization":"_table-customization_z1p39_1","table-customization__trigger":"_table-customization__trigger_z1p39_7","column-config":"_column-config_z1p39_23","column-config__header":"_column-config__header_z1p39_33","icon-color":"_icon-color_z1p39_43","column-config__list":"_column-config__list_z1p39_46","column-config__section-label":"_column-config__section-label_z1p39_50","column-config__footer":"_column-config__footer_z1p39_59","column-config__add-button":"_column-config__add-button_z1p39_62","cs-icon":"_cs-icon_z1p39_80","no-columns":"_no-columns_z1p39_84"}}]]),Sj=bt(rt({__name:"StatusSelect",props:{modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=[{label:"Online",value:"online",color:"green"},{label:"Offline",value:"offline",color:"gray"},{label:"Busy",value:"busy",color:"red"},{label:"Away",value:"away",color:"yellow"}],i=e,s=ae(i.modelValue),o=G(()=>i.modelValue||"Select status"),r=G(()=>{const a="red";return{backgroundColor:a,border:qm(a,"white")?"1px solid #ccc":"1px solid #fff"}});return(a,l)=>(z(),Ze(V4,{options:n,value:s.value},{trigger:Fe(({visibled:u})=>[we(js,{actived:u,class:W(a.$style["status-wrapper"])},{suffix:Fe(()=>[we(ut,{src:"ChevronUp",source:"remote",class:W([[a.$style["dropdown-icon"]],{[a.$style["dropdown-icon-show"]]:!u}])},null,8,["class"])]),default:Fe(()=>[ye("div",{class:W(a.$style.status)},[ye("div",{class:W(a.$style["color-indicator"]),style:mn(r.value)},null,6),pt(" "+mt(o.value),1)],2)]),_:2},1032,["actived","class"])]),options:Fe(()=>[(z(),Ce(Ft,null,En(n,u=>we(xc,{key:u.value,label:u.label,value:u,type:"status",data:{color:u.color}},null,8,["label","value","data"])),64))]),_:1},8,["value"]))}}),[["__cssModules",{$style:{"status-wrapper":"_status-wrapper_xxnkg_1",status:"_status_xxnkg_1","color-indicator":"_color-indicator_xxnkg_11","dropdown-icon":"_dropdown-icon_xxnkg_16","dropdown-icon-show":"_dropdown-icon-show_xxnkg_22"}}]]),Ej=bt(rt({name:"EmptyData",__name:"EmptyData",props:{isSearching:{type:Boolean},isFiltering:{type:Boolean}},setup(e){const t=e,n={noData:"No data available.",noSearchResults:"No results. Try another search.",noFilterResults:"No results. Try another filter."},i=G(()=>t.isSearching||t.isFiltering?"NoDataSearchFilter":"ClickToCreate"),s=G(()=>t.isSearching?n.noSearchResults:t.isFiltering?n.noFilterResults:n.noData);return(o,r)=>(z(),Ce("div",{class:W(o.$style["no-data-item-table"])},[ye("div",{class:W(o.$style.visual)},[we(z3,{source:"remote",src:i.value,ratio:"4/3",maxWidth:500,maxHeight:350},null,8,["src"])],2),ye("div",{class:W(o.$style.description)},mt(s.value),3)],2))}}),[["__cssModules",{$style:{"no-data-item-table":"_no-data-item-table_oh0wi_1",visual:"_visual_oh0wi_12",description:"_description_oh0wi_19"}}]]),v_=m_("sortStore",()=>{const e=ae({}),t={id:"id",name:"name",isStated:"actual_start_date",isCompleted:"actual_due_date",lastUpdated:"updated_at",completedOn:"due_date",status:"template_flow_status",assignees:"assignee"},n={start_asc:{column:"start_date",direction:"asc"},start_desc:{column:"start_date",direction:"desc"},due_asc:{column:"due_date",direction:"asc"},due_desc:{column:"due_date",direction:"desc"}},i=G(()=>{const a=e.value;return Object.values(a).filter(u=>u.sort!=="none"&&!!u.sort).map(u=>{let c;switch(u.colId){case"dateRange":c=n[u.sort];break;default:if(u.colId.includes("metric")){const[d,h]=u.colId.split("_");c={column:d,direction:u.sort,type:h}}else c={column:t[u.colId]||u.colId,direction:u.sort};break}return c})}),s=(a,l)=>{e.value={[a]:{colId:a,sort:l}}},o=()=>{e.value={}},r=ae(!1);return{sortingAPIConfiguration:i,sorts:e,setSort:s,clearSorting:o,isSortingRunning:r}}),ga=rt({name:"HeaderSorting",__name:"HeaderWrapper",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean}},setup(e){const t=e,n=v_(),{sorts:i}=AC(n),s=G(()=>{var a,l;return((l=(a=t.params)==null?void 0:a.column)==null?void 0:l.getColId())||"template_col_id"}),o=a=>{s.value&&n.setSort(s.value,a)},r=ae("none");return ht(()=>i.value,Ws(()=>{if(s.value){const a=i.value[s.value];r.value=a?a.sort:"none"}},200),{deep:!0,immediate:!0}),(a,l)=>s.value?(z(),Ze(B4,vn({key:0},t,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),onSortChanged:o}),null,16,["modelValue"])):at("",!0)}});function Rj(){const e=As({isCreating:!1,name:"",error:void 0});return{newItemData:e,validateNewItem:()=>{const s=e.name.trim();s.length===0?e.error="Name cannot be empty":s.length>25?e.error="Name cannot exceed 25 characters":e.error=void 0},openNewItemForm:()=>{e.isCreating=!0,e.name="",e.error=void 0},closeNewItemForm:()=>{e.isCreating=!1},resetNewItemForm:()=>{e.name="",e.error=void 0}}}const Dj=bt(rt({__name:"CreateNewScene",emits:["create-new-item"],setup(e,{expose:t,emit:n}){const i=wS("target"),s=wS("newSceneInputRef");cT(i,f=>r());const o=()=>{a.isCreating=!0},r=()=>{a.isCreating=!1,u()},{newItemData:a,validateNewItem:l,resetNewItemForm:u,closeNewItemForm:c}=Rj(),d=n,h=f=>{d("create-new-item",f)};return ht(()=>a.isCreating,f=>{f&&un(()=>{s.value&&s.value.focus()})}),t({show:o,hide:r}),(f,g)=>tt((z(),Ce("div",{class:W(f.$style.newRow),ref_key:"target",ref:i},[we(nT,{ref_key:"newSceneInputRef",ref:s,modelValue:Z(a).name,"onUpdate:modelValue":g[0]||(g[0]=v=>Z(a).name=v),onChange:Z(l),onEnter:g[1]||(g[1]=v=>h(Z(a).name)),placeholder:"Enter name",focused:!0,"max-length":25},{clear:Fe(()=>[Z(a).name.length==0?(z(),Ze(ut,{key:0,src:"Pen",color:"#f7941d"})):at("",!0)]),_:1},8,["modelValue","onChange"]),we(yt,{onClick:g[2]||(g[2]=v=>h(Z(a).name)),disabled:!!Z(a).error||!Z(a).name.trim()},{prefix:Fe(()=>[we(ut,{src:"Plus"})]),default:Fe(()=>[g[3]||(g[3]=pt(" Create ",-1))]),_:1},8,["disabled"]),we(yt,{variant:["secondary","icon"],onClick:Z(c)},{prefix:Fe(()=>[we(ut,{src:"XMarkSolid"})]),_:1},8,["onClick"])],2)),[[bo,Z(a).isCreating]])}}),[["__cssModules",{$style:{newRow:"_newRow_1vpac_1","warning-text":"_warning-text_1vpac_20","has-error":"_has-error_1vpac_25"}}]]),Fj={class:"create-scenes-body"},Tj={class:"step step-1-download-sample"},xj={class:"step step-2-upload-file"},_j={class:"drop-area-content"},Pj={class:"step step-3-select-status"},Aj={class:"step description"},Ij=bt(rt({__name:"PopupCreateScenes",setup(e,{expose:t}){const n=ae(null),i=ae(null),s=ae(!1),o=()=>{n.value&&n.value.show()},r=()=>{var f;(f=i.value)==null||f.click()},a=f=>{s.value=!0},l=f=>{s.value=!1},u=f=>{var v;s.value=!1;const g=(v=f.dataTransfer)==null?void 0:v.files;g&&g.length>0&&d(g[0])},c=f=>{const v=f.target.files;v&&v.length>0&&d(v[0])},d=f=>{};Sn(()=>{un(()=>{})}),t({open:o});const h=ae(null);return(f,g)=>(z(),Ze(Z(z4),{"popup-name":"Create Scenes","show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:n},{default:Fe(()=>[ye("div",Fj,[ye("div",Tj,[g[3]||(g[3]=ye("h2",null,"Step 1: Download sample",-1)),g[4]||(g[4]=ye("p",null,"This file contains all columns available for editing.",-1)),we(Z(yt),{class:"download-sample-btn",size:12,variant:"secondary"},{prefix:Fe(()=>[we(Z(ut),{src:"Download"})]),default:Fe(()=>[g[2]||(g[2]=pt(" Download sample file ",-1))]),_:1})]),ye("div",xj,[g[6]||(g[6]=ye("h2",null,"Step 2: Upload file (.xlsx, .xls, .csv)",-1)),ye("div",{class:W(["drop-area",{"is-dragging":s.value}]),onDragenter:jt(a,["prevent"]),onDragover:g[0]||(g[0]=jt(()=>{},["prevent"])),onDragleave:jt(l,["prevent"]),onDrop:jt(u,["prevent"]),onClick:r},[ye("div",_j,[we(Z(ut),{src:"Upload",size:"48"}),g[5]||(g[5]=ye("p",null,[pt(" Drag & drop your file here or "),ye("span",{class:"browse"},"browse")],-1))]),ye("input",{ref_key:"fileInput",ref:i,type:"file",style:{display:"none"},accept:".xlsx, .xls, .csv",onChange:c},null,544)],34)]),ye("div",Pj,[g[7]||(g[7]=ye("h2",null,"Step 3: Select status",-1)),we(Z(Sj),{modelValue:h.value,"onUpdate:modelValue":g[1]||(g[1]=v=>h.value=v)},null,8,["modelValue"])]),ye("div",Aj,[g[9]||(g[9]=ye("h3",null,"Date format guide",-1)),g[10]||(g[10]=pt(" Ensure all dates follow one of the two formats below: ",-1)),g[11]||(g[11]=ye("ul",null,[ye("li",null,"DD MM YYYY (Day-Month-Year)"),ye("li",null,"YYYY MM DD (Year-Month-Day)")],-1)),we(Z(yt),null,{prefix:Fe(()=>[we(Z(ut),{src:"InfoCircle"})]),default:Fe(()=>[g[8]||(g[8]=pt(" Check valid formats ",-1))]),_:1})])])]),_:1},512))}}),[["__scopeId","data-v-f795fc39"]]),kj={status:W4,dateRange:F4,checkbox:void 0,dateTime:A4,format:void 0,number:void 0,rating:pT,more:$3,assignee:D4,name:dT,text:v4,metric:L4},Oj={status:!0,dateRange:!0,checkbox:!0,dateTime:!1,format:!1,number:!1,rating:!1,more:!0,assignee:!0,name:!1,text:!1,metric:!1},Mj={status:lT,checkbox:"agCheckboxCellEditor",dateTime:null,format:hT,number:"agNumberCellEditor",more:fT,assignee:sT,dateRange:T4,rating:null,name:dT,text:null,metric:null},C_={status:[200,200],dateRange:[255,255],checkbox:[50,50],dateTime:[200,200],format:[200,200],number:[200,200],rating:[200,200],more:[50,50],assignee:[200,200],name:[300,window.innerWidth*.7],metric:[200,300]},Lj={dateRange:{cellEditorPopupPosition:"under",cellEditorPopup:!1},name:{cellEditorPopupPosition:"over",cellEditor:!1,cellEditorPopup:!1},metric:{suppressKeyboardEvent:void 0,suppressNavigable:!1,suppressMovable:!1,cellClass:"ag-cell-optimized"}};function kC(e){var a,l;const n=((a=e==null?void 0:e.data)==null?void 0:a.permissions)||void 0;let i;(u=>{u[u.disabled=-1]="disabled",u[u.readOnly=0]="readOnly",u[u.editable=1]="editable"})(i||(i={}));const o={assignees:(n==null?void 0:n.has_edit_permission)||1,completedOn:0,name:0,permissions:0,status:(n==null?void 0:n.has_edit_permission)||1,dateRange:(n==null?void 0:n.has_edit_date_permission)||1,isStarted:0,isDeleted:0,isArchived:0,isProcessing:0,lastUpdated:0,id:0,isCompleted:0,options:1}[(l=e.colDef)==null?void 0:l.field];return o?{disabled:o===-1,readOnly:o!==-1&&o!==1,editable:o===1}:{disabled:!1,readOnly:!0,editable:!1}}class ma{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){var r,a;const n=t.data||((r=t.node)==null?void 0:r.data),i=(a=t.colDef)==null?void 0:a.field,s=i&&n?n[i]:void 0,o=kC(t);return{...t,value:s,disabled:(o==null?void 0:o.disabled)||!1,readOnly:(o==null?void 0:o.readOnly)||!1}}static fromType(t,n){var g,v;const{wrapVueCellRenderer:i,wrapVueCellEditor:s}=this.getWrappers(),o=kj[t],r=Mj[t],a=Oj[t]??!1,l={minWidth:((g=C_[t])==null?void 0:g[0])||180,maxWidth:((v=C_[t])==null?void 0:v[1])||180},u=Lj[t]||{},c=C=>!!C&&typeof C!="string",d=c(o)?i(o):o;let h={};return h={cellEditorSelector:C=>{const b=kC(C);console.log("Editor Selector Params:",C.colDef.field,b);const D=!!(!(b!=null&&b.disabled)&&!(b!=null&&b.readOnly)&&(b!=null&&b.editable))&&a;return D?{component:D?c(r)?s(r):r:null,params:D?this.buildCommonCellParams(C):void 0}:void 0},singleClickEdit:!0,cellEditorPopup:!0,cellEditorPopupPosition:"under",...u},{headerName:t,...l,...n,...h,editable:C=>{const b=kC(C);return b?!(b!=null&&b.disabled)&&!(b!=null&&b.readOnly)&&(b==null?void 0:b.editable):!0},context:{...n.context,workspaceId:this.workspaceId,entityId:this.entityId},cellRenderer:d,cellRendererParams:n.cellRendererParams??this.buildCommonCellParams,headerComponentParams:C=>({...typeof n.headerComponentParams=="function"?n.headerComponentParams(C):n.headerComponentParams,headerType:t})}}}ln(ma,"wrappers",null),ln(ma,"workspaceId",""),ln(ma,"entityId","");function Nj(e){return"stopEditing"in e}const Vj=rt({name:"AgGridVue3CellWrapper",props:{component:{type:Object,required:!0},params:{type:Object,required:!0},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},value:{type:null,default:void 0},data:{type:Object,default:void 0},id:{type:[String,Number],default:void 0},tooltip:{type:[String,Number],default:void 0},isNoData:{type:Boolean,default:!1},workspaceId:{type:String,default:void 0},entityId:{type:String,default:void 0},axiosService:{type:Object,default:void 0},isSearching:{type:Boolean,default:!1},isFiltering:{type:Boolean,default:!1}},setup(e){var n;const t=((n=e.component)==null?void 0:n.default)||e.component;return t||console.error("[Vue3CellWrapper] Invalid component provided:",e.component),()=>we(t,{...e})}}),Bj=()=>`${Math.max(50,Math.round(yz(0,100)))}%`,Hj=8,Gj=e=>e?e.querySelectorAll("*").length+1:0,$j=e=>e?Object.keys(e).filter(t=>/^on[A-Z]/.test(t)).length:0;function y_(e){return class{constructor(){ln(this,"container");ln(this,"vNode",null);ln(this,"componentInstance",null);ln(this,"params");ln(this,"isEditor",!1)}init(n){var l,u,c,d,h,f,g;if(!n){console.error("[Vue3CellWrapper] Missing context information: workspaceId or entityId. Cannot initialize wrapper.");return}const i=performance.now(),s=n.context.apiClass;this.params=n,this.isEditor=Nj(n),this.container=document.createElement("div"),this.container.classList.add("ag-vue3-cell-wrapper"),this.container.classList.add(`${e.name||"unknown-component"}`),this.container.style.setProperty("--loading-overlay-width",Bj()),this.container.style.width="100%",this.container.style.height="100%";const o=Object.freeze(n),r={component:e,params:o,disabled:n.disabled??!1,readOnly:n.readOnly??!1,value:n.value,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:n.tooltip??void 0,isSearching:n.isSearching??!1,isNoData:n.isNoData??!1};this.vNode=we(Vj,r),Y0(this.vNode,this.container);const a=performance.now()-i;if(a>Hj){console.warn(`[Vue3CellWrapper] Slow render detected (${a.toFixed(1)}ms) for component "${(u=n.colDef)==null?void 0:u.field}" and field "${(c=n.data)==null?void 0:c.id}"`);{const v=Gj(this.container),C=$j((d=this.vNode)==null?void 0:d.props),b=Object.keys(((h=this.vNode)==null?void 0:h.props)||{}).length,D=Object.keys(n.context||{}).length;console.debug("[Vue3CellWrapper] Render diagnostics",{field:(f=n.colDef)==null?void 0:f.field,domCount:v,eventProps:C,propCount:b,contextCount:D,durationMs:a.toFixed(1)})}}this.componentInstance=(g=this.vNode.component)==null?void 0:g.proxy,this.componentInstance||console.warn("[Vue3CellWrapper] Component instance not available after render")}getGui(){return this.container}refresh(n){return!1}getValue(){var n,i,s;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((s=(i=this.componentInstance).getValue)==null?void 0:s.call(i))??this.componentInstance.value:(console.warn("[Vue3CellWrapper] getValue() called but component instance not available"),(n=this.params)==null?void 0:n.value)}isPopup(){var n;return this.isEditor?(n=this.componentInstance)!=null&&n.isPopup?this.componentInstance.isPopup():!0:!1}getPopupPosition(){var i,s,o;return this.isEditor?(i=this.componentInstance)!=null&&i.getPopupPosition?this.componentInstance.getPopupPosition():((o=(s=this.params)==null?void 0:s.colDef)==null?void 0:o.cellEditorPopupPosition)??"under":void 0}afterGuiAttached(){!this.isEditor||this.componentInstance}destroy(){if(!(!this.container||!this.vNode))try{this.componentInstance&&(typeof this.componentInstance.$destroy=="function"&&this.componentInstance.$destroy(),typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy()),Promise.resolve().then(()=>{try{Y0(null,this.container)}catch(n){console.warn("[Vue3CellWrapper] Error during unmount:",n)}})}catch(n){console.error("[Vue3CellWrapper] Error during cleanup:",n)}finally{this.vNode=null,this.componentInstance=null}}}}function Of(e){return y_(e)}function w_(e){return y_(e)}var va=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 i=t?this.allAsyncListeners:this.allSyncListeners;let s=i.get(e);return!s&&n&&(s=new Set,i.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 i=this.getListeners(e,n,!1);i&&(i.delete(t),i.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:i}=this,s=a=>{const l=i?()=>i.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},o=this.getListeners(n,t,!1);if(((o==null?void 0:o.size)??0)>0){const a=new Set(o);for(const l of a)o!=null&&o.has(l)&&s(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);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 Io(e){return e==null||e===""?null:e}function We(e){return e!=null&&e!==""}function sn(e){return!We(e)}function OC(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Vc(e,t){const n=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return n===i}function Wj(e,t,n=!1){const i=e==null,s=t==null;if(e!=null&&e.toNumber&&(e=e.toNumber()),t!=null&&t.toNumber&&(t=t.toNumber()),i&&s)return 0;if(i)return-1;if(s)return 1;function o(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!n)return o(e,t);try{return e.localeCompare(t)}catch{return o(e,t)}}var zj=/[&<>"']/g,Uj={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Vl(e){return(e==null?void 0:e.toString().toString())??null}function Bc(e){var t;return((t=Vl(e))==null?void 0:t.replace(zj,n=>Uj[n]))??null}function Ys(e){return e.eRootDiv.getRootNode()}function cn(e){return Ys(e).activeElement}function Nn(e){const{gos:t,eRootDiv:n}=e;let i=null;const s=t.get("getDocument");return s&&We(s)?i=s():n&&(i=n.ownerDocument),i&&We(i)?i:document}function b_(e){const t=cn(e);return t===null||t===Nn(e).body}function S_(e){return Nn(e).defaultView||window}function MC(e){let t=null,n=null;try{t=Nn(e).fullscreenElement}catch{}finally{t||(t=Ys(e));const i=t.querySelector("body");i?n=i:t instanceof ShadowRoot?n=t:t instanceof Document?n=t==null?void 0:t.documentElement:n=t}return n}function jj(e){const t=MC(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function Kj(e){const t=MC(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function Es(e,t,n){n==null||typeof n=="string"&&n==""?E_(e,t):Xi(e,t,n)}function Xi(e,t,n){e.setAttribute(R_(t),n.toString())}function E_(e,t){e.removeAttribute(R_(t))}function R_(e){return`aria-${e}`}function hr(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function qj(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Yj(e){return e.getAttribute("aria-label")}function Bl(e,t){Es(e,"label",t)}function Hc(e,t){Es(e,"labelledby",t)}function D_(e,t){Es(e,"live",t)}function Zj(e,t){Es(e,"atomic",t)}function Jj(e,t){Es(e,"relevant",t)}function Qj(e,t){Es(e,"invalid",t)}function Xj(e,t){Es(e,"disabled",t)}function F_(e,t){Es(e,"hidden",t)}function LC(e,t){Xi(e,"expanded",t)}function e8(e,t){Xi(e,"setsize",t)}function t8(e,t){Xi(e,"posinset",t)}function n8(e,t){Xi(e,"multiselectable",t)}function i8(e,t){Xi(e,"rowcount",t)}function Mf(e,t){Xi(e,"rowindex",t)}function s8(e,t){Xi(e,"rowspan",t)}function o8(e,t){Xi(e,"colcount",t)}function T_(e,t){Xi(e,"colindex",t)}function r8(e,t){Xi(e,"colspan",t)}function a8(e,t){Xi(e,"sort",t)}function l8(e){E_(e,"sort")}function x_(e,t){Es(e,"selected",t)}function u8(e,t){Es(e,"controls",t)}function c8(e,t){u8(e,t.id),Hc(t,e.id)}function __(e,t){Es(e,"owns",t)}function Lf(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var d8="[tabindex], input, select, button, textarea, [href]",P_="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Gc(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(P_)?!1:Zs(e)}function on(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-hidden",!t),i||F_(e,!t)}function h8(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-invisible",!t),i||F_(e,!t)}function $c(e,t){const n="disabled",i=t?o=>o.setAttribute(n,""):o=>o.removeAttribute(n);i(e);const s=e.querySelectorAll("input")??[];for(const o of s)i(o)}function Ca(e,t,n){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof n=="number"){if(++i>n)break}else if(e===n)break}return!1}function ya(e){const{height:t,width:n,borderTopWidth:i,borderRightWidth:s,borderBottomWidth:o,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:u,paddingLeft:c,marginTop:d,marginRight:h,marginBottom:f,marginLeft:g,boxSizing:v}=window.getComputedStyle(e),C=Number.parseFloat;return{height:C(t||"0"),width:C(n||"0"),borderTopWidth:C(i||"0"),borderRightWidth:C(s||"0"),borderBottomWidth:C(o||"0"),borderLeftWidth:C(r||"0"),paddingTop:C(a||"0"),paddingRight:C(l||"0"),paddingBottom:C(u||"0"),paddingLeft:C(c||"0"),marginTop:C(d||"0"),marginRight:C(h||"0"),marginBottom:C(f||"0"),marginLeft:C(g||"0"),boxSizing:v}}function NC(e){const t=ya(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Wc(e){const t=ya(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function A_(e){const{height:t,marginBottom:n,marginTop:i}=ya(e);return Math.floor(t+n+i)}function Nf(e){const{width:t,marginLeft:n,marginRight:i}=ya(e);return Math.floor(t+n+i)}function I_(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:i,borderRightWidth:s,borderBottomWidth:o}=ya(e);return{top:t.top+(n||0),left:t.left+(i||0),right:t.right+(s||0),bottom:t.bottom+(o||0)}}function Vf(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function Bf(e,t,n){n&&(t*=-1),e.scrollLeft=t}function $n(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function Rs(e){e!=null&&e.parentNode&&e.remove()}function k_(e){return!!e.offsetParent}function Zs(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!k_(e)||window.getComputedStyle(e).visibility!=="visible")}function VC(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function O_(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 M_(e,t){for(let n=0;n<t.length;n++){const i=t[n],s=e.children[n];s!==i&&e.insertBefore(i,s)}}function f8(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function zc(e,t){if(t)for(const n of Object.keys(t)){const i=t[n];if(!(n!=null&&n.length)||i==null)continue;const s=f8(n),o=i.toString(),r=o.replace(/\s*!important/g,""),a=r.length!=o.length?"important":void 0;e.style.setProperty(s,r,a)}}function Hf(e){return()=>{const t=e();return t?BC(t)||L_(t):!0}}function BC(e){return e.clientWidth<e.scrollWidth}function L_(e){return e.clientHeight<e.scrollHeight}function Gf(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Js(e,t)}function Js(e,t){t=HC(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Uc(e,t){t=HC(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function HC(e){return typeof e=="number"?`${e}px`:e}function GC(e){return e instanceof Node||e instanceof HTMLElement}function Mi(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function fr(e,t,n){const s=S_(e).ResizeObserver,o=s?new s(n):null;return o==null||o.observe(t),()=>o==null?void 0:o.disconnect()}function ko(e,t){const n=S_(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var N_="data-ref",$C;function V_(){return $C??($C=document.createTextNode(" ")),$C.cloneNode()}function jc(e){const{attrs:t,children:n,cls:i,ref:s,role:o,tag:r}=e,a=document.createElement(r);if(i&&(a.className=i),s&&a.setAttribute(N_,s),o&&a.setAttribute("role",o),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(V_()),l=!1),a.append(jc(u)),a.appendChild(V_())))}return a}var p8=["touchstart","touchend","touchmove","touchcancel","scroll"],g8=["wheel"],WC={},B_=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof WC[n]=="boolean")return WC[n];const i=document.createElement(e[n]||"div");return n="on"+n,WC[n]=n in i}})();function m8(e,t){return!t||!e?!1:C8(t).indexOf(e)>=0}function v8(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function C8(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():v8(t)}function y8(e,t,n){const i=w8(t);let s;i!=null&&(s={passive:i}),e.addEventListener(t,n,s)}var w8=e=>{const t=p8.includes(e),n=g8.includes(e);if(t)return!0;if(n)return!1};function H_(e,t,n){if(n===0)return!1;const i=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(i,s)<=n}var Kc=(e,t)=>{const n=e.identifier;for(let i=0,s=t.length;i<s;++i){const o=t[i];if(o.identifier===n)return o}return null};function qc(e,t){return e.gos.isElementInThisInstance(t.target)}function b8(e,t,n){const s=e.getBoundingClientRect().height,o=jj(n)-2,r=Kj(n)-2;if(!e.offsetParent)return;const l=I_(e.offsetParent),{clientY:u,clientX:c}=t;let d=u-l.top-s/2,h=c-l.left-10;const f=Nn(n),g=f.defaultView||window,v=g.pageYOffset||f.documentElement.scrollTop,C=g.pageXOffset||f.documentElement.scrollLeft;o>0&&h+e.clientWidth>o+C&&(h=o+C-e.clientWidth),h<0&&(h=0),r>0&&d+e.clientHeight>r+v&&(d=r+v-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}var $f=(e,...t)=>{for(const n of t){const[i,s,o,r]=n;i.addEventListener(s,o,r),e.push(n)}},zC=e=>{if(e){for(const[t,n,i,s]of e)t.removeEventListener(n,i,s);e.length=0}},pr=e=>{e.cancelable&&e.preventDefault()};function S8(e,t){return t}function G_(e){return(e==null?void 0:e.getLocaleTextFunc())??S8}function E8(e,t,n,i){const s=t[n];return e.getLocaleTextFunc()(n,typeof s=="function"?s(i):s,i)}function R8(e){return(t,n,i)=>e({key:t,defaultValue:n,variableValues:i})}function D8(e){return(t,n,i)=>{let s=e==null?void 0:e[t];if(s&&(i!=null&&i.length)){let o=0;for(;!(o>=i.length||s.indexOf("${variable}")===-1);)s=s.replace("${variable}",i[o++])}return s??n}}var Qs=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 va),this.localEventService.addEventListener(e,t,n)}removeEventListener(e,t,n){var i;(i=this.localEventService)==null||i.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 i of Object.keys(t)){const s=t[i];s&&n.push(this._setupListener(e,i,s))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let i;if(F8(e))e.__addEventListener(t,n),i=()=>(e.__removeEventListener(t,n),null);else{const s=T8(e);e instanceof HTMLElement?y8(e,t,n):s?e.addListener(t,n):e.addEventListener(t,n),i=s?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}setupPropertyListener(e,t){const{gos:n}=this;n.addPropertyEventListener(e,t);const i=()=>(n.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),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++,i=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=s.changeSet.id}const o={type:"propertyChanged",changeSet:s.changeSet,source:s.source};t(o)};for(const s of e)this.setupPropertyListener(s,i)}getLocaleTextFunc(){return G_(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 F8(e){return e.__addEventListener!==void 0}function T8(e){return e.eventServiceType==="global"}var ve=class extends Qs{},$_={};function UC(e,t){$_[t]||(e(),$_[t]=!0)}var x8={pending:!1,funcs:[]},_8={pending:!1,funcs:[]};function jC(e,t="setTimeout",n){const i=t==="raf"?_8:x8;if(i.funcs.push(e),i.pending)return;i.pending=!0;const s=()=>{const o=i.funcs.slice();i.funcs.length=0,i.pending=!1;for(const r of o)r()};t==="raf"?ko(n,s):window.setTimeout(s,0)}function Wn(e,t,n){let i;return function(...s){const o=this;window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(o,s)},n)}}function W_(e,t){let n=0;return function(...i){const s=this,o=Date.now();o-n<t||(n=o,e.apply(s,i))}}function P8(e,t,n,i=100){const s=Date.now();let o=null,r=!1;const a=()=>{o!=null&&(window.clearInterval(o),o=null)};e.addDestroyFunc(a);const l=()=>{const u=Date.now()-s>i;(t()||u)&&(n(),r=!0,a())};l(),r||(o=window.setInterval(l,10))}var z_=new Set(["__proto__","constructor","prototype"]);function A8(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(i=>!z_.has(i)))t(n,e[n])}}function di(e,t,n=!0,i=!1){We(t)&&A8(t,(s,o)=>{let r=e[s];r!==o&&(i&&r==null&&o!=null&&typeof o=="object"&&o.constructor===Object&&(r={},e[s]=r),U_(o)&&U_(r)&&!Array.isArray(r)?di(r,o,n,i):(n||o!==void 0)&&(e[s]=o))})}function U_(e){return typeof e=="object"&&e!==null}var KC=class qo{static applyGlobalGridOptions(t){if(!qo.gridOptions)return{...t};let n={};return di(n,qo.gridOptions,!0,!0),qo.mergeStrategy==="deep"?di(n,t,!0,!0):n={...n,...t},qo.gridOptions.context&&(n.context=qo.gridOptions.context),t.context&&(qo.mergeStrategy==="deep"&&n.context&&di(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(qo.mergeStrategy==="deep"){const i=I8(t);if(i&&typeof i=="object"&&typeof n=="object")return qo.applyGlobalGridOptions({[t]:n})[t]}return n}};KC.gridOptions=void 0,KC.mergeStrategy="shallow";var qC=KC;function I8(e){var t;return(t=qC.gridOptions)==null?void 0:t[e]}var k8={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},j_="https://www.ag-grid.com";function gr(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function Yc(e,...t){UC(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Hl(e,...t){UC(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var K_=new Set,Wf={},Gl={},zf,q_=!1,Y_=!1,O8=!1;function M8(e){const[t,n]=e.version.split(".")||[],[i,s]=zf.split(".")||[];return t===i&&n===s}function L8(e){var i;zf||(zf=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?M8(e)||Hl(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${zf}.`)):Hl(t(`'${e.moduleName}' is incompatible.`));const n=(i=e.validate)==null?void 0:i.call(e);n&&!n.isValid&&Hl(`${n.message}`)}function Zc(e,t,n=!1){n||(q_=!0),L8(e);const i=e.rowModels??["all"];K_.add(e);let s;t!==void 0?(Y_=!0,Gl[t]===void 0&&(Gl[t]={}),s=Gl[t]):s=Wf;for(const o of i)s[o]===void 0&&(s[o]={}),s[o][e.moduleName]=e;if(e.dependsOn)for(const o of e.dependsOn)Zc(o,t,n)}function N8(e){delete Gl[e]}function YC(e,t,n){const i=s=>{var o,r,a;return!!((o=Wf[s])!=null&&o[e])||!!((a=(r=Gl[t])==null?void 0:r[s])!=null&&a[e])};return i(n)||i("all")}function ZC(){return Y_}function V8(e,t){const n=Gl[e]??{};return[...Object.values(Wf.all??{}),...Object.values(n.all??{}),...Object.values(Wf[t]??{}),...Object.values(n[t]??{})]}function B8(){return new Set(K_)}function H8(){return q_}function G8(){return O8}var $8=class{static register(e){Zc(e,void 0)}static registerModules(e){for(const t of e)Zc(t,void 0)}},Ge="34.3.1",Z_=2e3,J_=100,Q_="_version_",Uf=null,$l=`${j_}/javascript-data-grid`;function W8(e){Uf=e}function z8(e){$l=e}function X_(e,t,n){return(Uf==null?void 0:Uf(e,t))??[q8(e,t,n)]}function JC(e,t,n,i,s){e(`${i?"warning":"error"} #${t}`,...X_(t,n,s))}function U8(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 j8(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=U8(e)),t}function jf(e){return e===void 0?"undefined":e===null?"null":e}function QC(e,t){return`${e}?${t.toString()}`}function K8(e,t,n){const i=Array.from(t.entries()).sort((o,r)=>r[1].length-o[1].length);let s=QC(e,t);for(const[o,r]of i){if(o===Q_)continue;const a=s.length-n;if(a<=0)break;const l="...",u=a+l.length,c=r.length-u>J_?r.slice(0,r.length-u)+l:r.slice(0,J_)+l;t.set(o,c),s=QC(e,t)}return s}function eP(e,t){const n=new URLSearchParams;if(n.append(Q_,Ge),t)for(const o of Object.keys(t))n.append(o,j8(t[o]));const i=`${$l}/errors/${e}`,s=QC(i,n);return s.length<=Z_?s:K8(i,n,Z_)}var q8=(e,t,n)=>{const i=eP(e,t);return`${`${n?n+`
89
89
  `:""}Visit ${i}`}${n?"":`
90
90
  Alternatively register the ValidationModule to see the full message in the console.`}`};function xe(...e){JC(Yc,e[0],e[1],!0)}function qt(...e){JC(Hl,e[0],e[1],!1)}function Jc(e,t,n){JC(Hl,e,t,!1,n)}function Y8(e,t){const n=t[0];return`error #${n} `+X_(n,t[1],e).join(" ")}function Xs(...e){return Y8(void 0,e)}function tP(e,t){return e.get("rowModelType")===t}function Rn(e,t){return tP(e,"clientSide")}function Wl(e,t){return tP(e,"serverSide")}function zn(e,t){return e.get("domLayout")===t}function wa(e){return Yf(e)!==void 0}function nP(e){return typeof e.get("getRowHeight")=="function"}function Z8(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function mr(e,t,n=!1,i){const{gos:s,environment:o}=e;if(i==null&&(i=o.getDefaultRowHeight()),nP(s)){if(n)return{height:i,estimated:!0};const l={node:t,data:t.data},u=s.getCallback("getRowHeight")(l);if(XC(u))return u===0&&xe(23),{height:Math.max(1,u),estimated:!1}}if(t.detail&&s.get("masterDetail"))return J8(s);const r=s.get("rowHeight");return{height:r&&XC(r)?r:i,estimated:!1}}function J8(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return XC(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function ba(e){const{environment:t,gos:n}=e,i=n.get("rowHeight");if(!i||sn(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(xe(24),t.getDefaultRowHeight())}function XC(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function iP(e,t,n){const i=t[e.getDomDataKey()];return i?i[n]:void 0}function Sa(e,t,n,i){const s=e.getDomDataKey();let o=t[s];sn(o)&&(o={},t[s]=o),o[n]=i}function zl(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function sP(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||zn(e,"print"))}function eo(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function ey(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function oP(e){return e.get("grandTotalRow")}function rP(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function aP(e,t,n){return!!t.group&&!t.footer&&rP(e,n)}function Ul(e){const t=e.getCallback("getRowId");return t===void 0?t:n=>{let i=t(n);return typeof i!="string"&&(UC(()=>xe(25,{id:i}),"getRowIdString"),i=String(i)),i}}function Q8(e,t){const n=e.get("groupHideParentOfSingleChild");return!!(n===!0||n==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function X8(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function jl(e){return(e==null?void 0:e.checkboxes)??!0}function Kf(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function qf(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function ty(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function eK(e){return typeof e.get("rowSelection")!="string"}function Oo(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function lP(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const n=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return n&&i?!1:n?"enableDeselection":i?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function tK(e){const t=lP(e);return t===!0||t==="enableSelection"}function nK(e){const t=lP(e);return t===!0||t==="enableDeselection"}function ny(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function Yf(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 Qc(e){return Yf(e)==="multiRow"}function iK(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function Zf(e){const t=e.get("rowSelection");if(typeof t=="string"){const n=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return n&&i?"filteredDescendants":n?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function uP(e,t=!0){const n=e.get("rowSelection");return typeof n!="object"?t?"all":void 0:n.mode==="multiRow"?n.selectAll:"all"}function sK(e){const t=e.get("rowSelection");return typeof t=="string"?!1:(t==null?void 0:t.mode)==="multiRow"?t.ctrlASelectsRows??!1:!1}function Xc(e){const t=Zf(e);return t==="descendants"||t==="filteredDescendants"}function cP(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function oK(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function Li(e){return e.get("columnMenu")==="legacy"}function rK(e){return!Li(e)}function aK(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function lt(e,t){return e.addCommon(t)}function dP({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var lK={resizable:!0,sortable:!0},uK=0;function hP(){return uK++}function vr(e){return e instanceof Ea}var Ea=class extends ve{constructor(e,t,n,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=n,this.primary=i,this.isColumn=!0,this.instanceId=hP(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new va,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Bc(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:i}}=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),i==null||i.initCol(this)}setColDef(e,t,n){var s;const i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&((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,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=We(t)&&t.includes(".")&&!i,this.tooltipFieldContainsDots=We(n)&&n.includes(".")&&!i}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 i=e.recreateColDef(this.colDef);this.setColDef(i,i,n.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const n=e.width,i=e.initialWidth;return n!=null?t=n:i!=null?t=i: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 i,s,o;this.frameworkEventListenerService=(s=(i=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:s.call(i,this.frameworkEventListenerService,this.colEventSvc);const n=((o=this.frameworkEventListenerService)==null?void 0:o.wrap(e,t))??t;this.colEventSvc.addEventListener(e,n)}removeEventListener(e,t){var i;const n=((i=this.frameworkEventListenerService)==null?void 0:i.unwrap(e,t))??t;this.colEventSvc.removeEventListener(e,n)}createColumnFunctionCallbackParams(e){return lt(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]??lK[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 lt(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 sn(this.sort)}isSorting(){return We(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 xe(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 lt(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(sn(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.colSpan(t);return Math.max(n,1)}getRowSpan(e){if(sn(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 i=this.createColumnEvent(e,t);n&&di(i,n),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function Jn(e){return e instanceof Jf}var Jf=class extends ve{constructor(e,t,n,i){super(),this.colGroupDef=e,this.groupId=t,this.padding=n,this.level=i,this.isColumn=!1,this.expandable=!1,this.instanceId=hP(),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)vr(t)?e(t):Jn(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)vr(t)?e.push(t):Jn(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 i=this.findChildrenRemovingPadding();for(let o=0,r=i.length;o<r;o++){const a=i[o];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 i of n)Jn(i)&&i.isPadding()?t(i.children):e.push(i)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},cK={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function fP(e,t,n){const i={},s=e.gos;return Object.assign(i,s.get("defaultColGroupDef")),Object.assign(i,t),s.validateColDef(i,n),i}var dK=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=OC(e);let n=0;for(;;){let i=e??t;if(i?n!==0&&(i+="_"+n):i=n,!this.existingKeys[i]){const s=String(i);return e&&n>0&&xe(273,{providedId:e,usedId:s}),this.existingKeys[s]=!0,s}n++}}};function Yt(e){if(e!=null&&e.length)return e[e.length-1]}function Cr(e,t,n){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const i=e.length;if(i!==t.length)return!1;for(let s=0;s<i;s++)if(e[s]!==t[s]&&!(n!=null&&n(e[s],t[s])))return!1;return!0}function ed(e,t){if(e)for(const n of e)t(n)}function Ds(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}function pP(e,t,n){for(let i=0;i<t.length;i++)Ds(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(n,0,t[i])}var Qf="ag-Grid-AutoColumn",gP="ag-Grid-SelectionColumn",mP="ag-Grid-RowNumbersColumn";function vP(e){const t=[],n=i=>{for(let s=0;s<i.length;s++){const o=i[s];vr(o)?t.push(o):Jn(o)&&n(o.getChildren())}};return n(e),t}function Mo(e){return e.reduce((t,n)=>t+n.getActualWidth(),0)}function Xf(e,t,n){const i={};if(!t)return;Vo(null,t,o=>{i[o.getInstanceId()]=o}),n&&Vo(null,n,o=>{i[o.getInstanceId()]=null});const s=Object.values(i).filter(o=>o!=null);e.context.destroyBeans(s)}function iy(e){return e.getId().startsWith(Qf)}function Lo(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(gP))??!1}function No(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(mP))??!1}function hK(e){return Lo(e)||No(e)}function ep(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function fK(e,t){return Cr(e,t,(n,i)=>n.getColId()===i.getColId())}function pK(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function Kl(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function td(e,t){const n=e===t,i=e.getColDef()===t,s=e.getColId()==t;return n||i||s}var gK=(e,t)=>(n,i)=>{const s={value1:void 0,value2:void 0};let o=!1;return e&&(e[n]!==void 0&&(s.value1=e[n],o=!0),We(i)&&e[i]!==void 0&&(s.value2=e[i],o=!0)),!o&&t&&(t[n]!==void 0&&(s.value1=t[n]),We(i)&&t[i]!==void 0&&(s.value2=t[i])),s},mK=(e,t)=>{Jn(e)&&e.setupExpandable(),e.originalParent=t};function vK(e,t=null,n,i,s){const o=new dK,{existingCols:r,existingGroups:a,existingColKeys:l}=CK(i);o.addExistingKeys(l);const u=CP(e,t,0,n,r,o,a,s),{colGroupSvc:c}=e,d=(c==null?void 0:c.findMaxDepth(u,0))??0,h=c?c.balanceColumnTree(u,0,d,o):u;return Vo(null,h,mK),{columnTree:h,treeDepth:d}}function CK(e){const t=[],n=[],i=[];return e&&Vo(null,e,s=>{if(Jn(s)){const o=s;n.push(o)}else{const o=s;i.push(o.getId()),t.push(o)}}),{existingCols:t,existingGroups:n,existingColKeys:i}}function CP(e,t,n,i,s,o,r,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&&RK(d)?u[c]=l.createProvidedColumnGroup(i,d,n,s,o,r,a):u[c]=yK(e,i,d,s,o,a)}return u}function yK(e,t,n,i,s,o){var l;const r=bK(n,i);r&&(i==null||i.splice(r.idx,1));let a=r==null?void 0:r.column;if(a){const u=sy(e,n,a.getColId());a.setColDef(u,n,o),wK(e,a,u,o)}else{const u=s.getUniqueKey(n.colId,n.field),c=sy(e,n,u);a=new Ea(c,n,u,t),e.context.createBean(a)}return(l=e.dataTypeSvc)==null||l.addColumnListeners(a),a}function yP(e,t,n,i,s,o,r,a){const{sortSvc:l,pinnedCols:u,colFlex:c}=e;n!==void 0&&t.setVisible(!n,a),l&&(l.updateColSort(t,i,a),s!==void 0&&l.setColSortIndex(t,s)),o!==void 0&&(u==null||u.setColPinned(t,o)),r!==void 0&&(c==null||c.setColFlex(t,r))}function wK(e,t,n,i){yP(e,t,n.hide,n.sort,n.sortIndex,n.pinned,n.flex,i);const s=t.getFlex();if(!(s!=null&&s>0))if(n.width!=null)t.setActualWidth(n.width,i);else{const o=t.getActualWidth();t.setActualWidth(o,i)}}function bK(e,t){if(t)for(let n=0;n<t.length;n++){const i=t[n].getUserProvidedColDef();if(!i)continue;if(e.colId!=null){if(t[n].getId()===e.colId)return{idx:n,column:t[n]};continue}if(e.field!=null){if(i.field===e.field)return{idx:n,column:t[n]};continue}if(i===e)return{idx:n,column:t[n]}}}function sy(e,t,n,i){const{gos:s,dataTypeSvc:o}=e,r={},a=s.get("defaultColDef");di(r,a,!1,!0);const l=SK(e,r,t,n);l&&EK(e,l,r);const u=r.cellDataType;di(r,t,!1,!0),u!==void 0&&(r.cellDataType=u);const c=s.get("autoGroupColumnDef"),d=eo(s);return t.rowGroup&&c&&d&&di(r,{sort:c.sort,initialSort:c.initialSort},!1,!0),o&&(o.postProcess(r),o.validateColDef(r)),s.validateColDef(r,n,i),r}function SK(e,t,n,i){var r;const s=(r=e.dataTypeSvc)==null?void 0:r.updateColDefAndGetColumnType(t,n,i),o=n.type??s??t.type;return t.type=o,o?ep(o):void 0}function EK(e,t,n){if(!t.length)return;const i=Object.assign({},cK),s=e.gos.get("columnTypes")||{};for(const o of Object.keys(s)){const r=s[o];o in i?xe(34,{key:o}):(r.type&&xe(35),i[o]=r)}for(const o of t){const r=i[o.trim()];r?di(n,r,!1,!0):xe(36,{t:o})}}function RK(e){return e.children!==void 0}function Vo(e,t,n){if(t)for(let i=0;i<t.length;i++){const s=t[i];Jn(s)&&Vo(s,s.getChildren(),n),n(s,e)}}function wP(e,t){const n=[],i=[],s=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?s.push(r):a==="left"||a===!0?n.push(r):i.push(r)}),t.get("enableRtl")?[...s,...i,...n]:[...n,...i,...s]}function bP(e,t){let n=!0;return Vo(null,t,i=>{if(!Jn(i))return;const s=i,o=s.getColGroupDef();if(!(o==null?void 0:o.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 SP(e,t){if(!e||e.length==0)return;const n=t(e[0]);for(let i=1;i<e.length;i++)if(n!==t(e[i]))return;return n}function EP(e,t,n){if(!t.length)return;const i=t.length===1?t[0]:null,s=SP(t,o=>o.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:i,source:n})}function DK(e,t,n){if(!t.length)return;const i=t.length===1?t[0]:null,s=SP(t,o=>o.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:i,source:n})}function FK(e,t,n,i){e.dispatchEvent({type:t,columns:n,column:n&&n.length==1?n[0]:null,source:i})}function ql(e,t,n,i,s=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:s,finished:n,source:i})}function Fs(e,t,n){var R;const{colModel:i,rowGroupColsSvc:s,pivotColsSvc:o,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:u,pivotResultCols:c,environment:d,valueColsSvc:h,eventSvc:f,gos:g}=e,v=i.getColDefCols()??[],C=a==null?void 0:a.getColumns();if(!v.length&&!(C!=null&&C.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return xe(32),!1;const b=(T,F,I,P,N)=>{if(!T)return;const _=gK(F,t.defaultState),L=_("flex").value1;if(yP(e,T,_("hide").value1,_("sort").value1,_("sortIndex").value1,_("pinned").value1,L,n),L==null){const K=_("width").value1;if(K!=null){const me=T.getColDef().minWidth??d.getDefaultColumnMinWidth();me!=null&&K>=me&&T.setActualWidth(K,n)}}N||!T.isPrimary()||(h==null||h.syncColumnWithState(T,n,_),s==null||s.syncColumnWithState(T,n,_,I),o==null||o.syncColumnWithState(T,n,_,P))},D=(T,F,I)=>{var Re,_e;const P=RP(e,n),N=F.slice(),_={},L={},K=[],me=[],Pe=[];let ee=0;const ie=(s==null?void 0:s.columns.slice())??[],se=(o==null?void 0:o.columns.slice())??[];for(const Ie of T){const ot=Ie.colId;if(ot.startsWith(Qf)){K.push(Ie),Pe.push(Ie);continue}if(Lo(ot)){me.push(Ie),Pe.push(Ie);continue}const ct=I(ot);ct?(b(ct,Ie,_,L,!1),Ds(N,ct)):(Pe.push(Ie),ee+=1)}const O=Ie=>b(Ie,null,_,L,!1);N.forEach(O),s==null||s.sortColumns(FP.bind(s,_,ie)),o==null||o.sortColumns(FP.bind(o,L,se)),i.refreshCols(!1,n);const te=(Ie,ot,nt=[])=>{for(const ct of ot){const At=Ie(ct.colId);Ds(nt,At),b(At,ct,null,null,!0)}nt.forEach(O)};return te(Ie=>(r==null?void 0:r.getColumn(Ie))??null,K,(Re=r==null?void 0:r.getColumns())==null?void 0:Re.slice()),te(Ie=>(a==null?void 0:a.getColumn(Ie))??null,me,(_e=a==null?void 0:a.getColumns())==null?void 0:_e.slice()),xK(t,i,g),u.refresh(n),f.dispatchEvent({type:"columnEverythingChanged",source:n}),P(),{unmatchedAndAutoStates:Pe,unmatchedCount:ee}};l==null||l.start();let{unmatchedAndAutoStates:E,unmatchedCount:y}=D(t.state||[],v,T=>i.getColDefCol(T));if(E.length>0||We(t.defaultState)){const T=((R=c==null?void 0:c.getPivotResultCols())==null?void 0:R.list)??[];y=D(E,T,F=>(c==null?void 0:c.getPivotResultCol(F))??null).unmatchedCount}return l==null||l.finish(),y===0}function TK(e,t){var D,E;const{colModel:n,autoColSvc:i,selectionColSvc:s,eventSvc:o,gos:r}=e,a=n.getColDefCols();if(!(a!=null&&a.length))return;const l=n.getColDefColTree(),u=vP(l),c=[];let d=1e3,h=1e3;const f=y=>{const R=DP(y);sn(R.rowGroupIndex)&&R.rowGroup&&(R.rowGroupIndex=d++),sn(R.pivotIndex)&&R.pivot&&(R.pivotIndex=h++),c.push(R)};(D=i==null?void 0:i.getColumns())==null||D.forEach(f),(E=s==null?void 0:s.getColumns())==null||E.forEach(f),u==null||u.forEach(f),Fs(e,{state:c},t);const g=(i==null?void 0:i.getColumns())??[],b=[...(s==null?void 0:s.getColumns())??[],...g,...a].map(y=>({colId:y.colId}));Fs(e,{state:b,applyOrder:!0},t),o.dispatchEvent(lt(r,{type:"columnsReset",source:t}))}function RP(e,t){const{rowGroupColsSvc:n,pivotColsSvc:i,valueColsSvc:s,colModel:o,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:(n==null?void 0:n.columns.slice())??[],pivotColumns:(i==null?void 0:i.columns.slice())??[],valueColumns:(s==null?void 0:s.columns.slice())??[]},u=tp(e),c={};for(const d of u)c[d.colId]=d;return()=>{const d=(T,F,I,P)=>{const N=F.map(P),_=I.map(P);if(Cr(N,_))return;const K=new Set(F);for(const Pe of I)K.delete(Pe)||K.add(Pe);const me=[...K];a.dispatchEvent({type:T,columns:me,column:me.length===1?me[0]:null,source:t})},h=T=>{const F=[];return o.forAllCols(I=>{const P=c[I.getColId()];P&&T(P,I)&&F.push(I)}),F},f=T=>T.getColId();d("columnRowGroupChanged",l.rowGroupColumns,(n==null?void 0:n.columns)??[],f),d("columnPivotChanged",l.pivotColumns,(i==null?void 0:i.columns)??[],f);const v=h((T,F)=>{const I=T.aggFunc!=null,P=I!=F.isValueActive(),N=I&&T.aggFunc!=F.getAggFunc();return P||N});v.length>0&&FK(a,"columnValueChanged",v,t),ql(a,h((T,F)=>T.width!=F.getActualWidth()),!0,t),EP(a,h((T,F)=>T.pinned!=F.getPinned()),t),DK(a,h((T,F)=>T.hide==F.isVisible()),t);const y=h((T,F)=>T.sort!=F.getSort()||T.sortIndex!=F.getSortIndex());y.length>0&&(r==null||r.dispatchSortChangedEvents(t,y));const R=tp(e);PK(u,R,t,o,a)}}function tp(e){const{colModel:t,rowGroupColsSvc:n,pivotColsSvc:i}=e,s=t.getColDefCols();if(sn(s)||!t.isAlive())return[];const o=n==null?void 0:n.columns,r=i==null?void 0:i.columns,a=[],l=c=>{const d=c.isRowGroupActive()&&o?o.indexOf(c):null,h=c.isPivotActive()&&r?r.indexOf(c):null,f=c.isValueActive()?c.getAggFunc():null,g=c.getSort()!=null?c.getSort():null,v=c.getSortIndex()!=null?c.getSortIndex():null;a.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:g,sortIndex:v,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 DP(e){const t=(g,v)=>g??v??null,n=e.getColDef(),i=t(n.sort,n.initialSort),s=t(n.sortIndex,n.initialSortIndex),o=t(n.hide,n.initialHide),r=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:i,sortIndex:s,hide:o,pinned:r,width:a,flex:l,rowGroup:c,rowGroupIndex:u,pivot:h,pivotIndex:d,aggFunc:f}}function xK(e,t,n){if(!e.applyOrder||!e.state)return;const i=[];for(const s of e.state)s.colId!=null&&i.push(s.colId);_K(t.cols,i,t,n)}function _K(e,t,n,i){if(e==null)return;let s=[];const o={};for(const a of t){if(o[a])continue;const l=e.map[a];l&&(s.push(l),o[a]=!0)}let r=0;for(const a of e.list){const l=a.getColId();if(o[l]!=null)continue;l.startsWith(Qf)?s.splice(r++,0,a):s.push(a)}if(s=wP(s,i),!bP(s,n.getColTree())){xe(39);return}e.list=s}function PK(e,t,n,i,s){const o={};for(const c of t)o[c.colId]=c;const r={};for(const c of e)o[c.colId]&&(r[c.colId]=!0);const a=e.filter(c=>r[c.colId]),l=t.filter(c=>r[c.colId]),u=[];l.forEach((c,d)=>{const h=a==null?void 0:a[d];if(h&&h.colId!==c.colId){const f=i.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 FP=(e,t,n,i)=>{const s=e[n.getId()],o=e[i.getId()],r=s!=null,a=o!=null;if(r&&a)return s-o;if(r)return-1;if(a)return 1;const l=t.indexOf(n),u=t.indexOf(i),c=l>=0,d=u>=0;return c&&d?l-u:c?-1:1},AK=class extends ve{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(Kl(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),Kl(e.source)))}createColsFromColDefs(e){var D,E,y;const{beans:t}=this,{valueCache:n,colAutosize:i,rowGroupColsSvc:s,pivotColsSvc:o,valueColsSvc:r,visibleCols:a,eventSvc:l,groupHierarchyColSvc:u}=t,c=this.colDefs?RP(t,e):void 0;n==null||n.expire();const d=(D=this.colDefCols)==null?void 0:D.list,h=(E=this.colDefCols)==null?void 0:E.tree,f=vK(t,this.colDefs,!0,h,e);Xf(t,(y=this.colDefCols)==null?void 0:y.tree,f.columnTree);const g=f.columnTree,v=f.treeDepth,C=vP(g),b={};for(const R of C)b[R.getId()]=R;this.colDefCols={tree:g,treeDepth:v,list:C,map:b},this.createColumnsForService([u],this.colDefCols,e),s==null||s.extractCols(e,d),o==null||o.extractCols(e,d),r==null||r.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"&&(i==null||i.applyAutosizeStrategy())}refreshCols(e,t){var C;if(!this.colDefCols)return;const n=(C=this.cols)==null?void 0:C.tree;this.saveColOrder();const{autoColSvc:i,selectionColSvc:s,rowNumbersSvc:o,quickFilter:r,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:u,visibleCols:c,colViewport:d,eventSvc:h}=this.beans,f=this.selectCols(a,this.colDefCols);this.createColumnsForService([i,s,o],f,t);const g=Z8(this.gos,this.showingPivotResult);(!e||g)&&this.restoreColOrder(f),this.positionLockedCols(f),l==null||l.refresh(),r==null||r.refreshCols(),this.setColSpanActive(),u==null||u.setAutoHeightActive(f),c.clear(),d.clear(),!Cr(n,this.cols.tree)&&h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,n){for(const i of e)i&&(i.createColumns(t,s=>{this.lastOrder=s(this.lastOrder),this.lastPivotOrder=s(this.lastPivotOrder)},n),i.addColumns(t))}selectCols(e,t){const n=(e==null?void 0:e.getPivotResultCols())??null;this.showingPivotResult=n!=null;const{map:i,list:s,tree:o,treeDepth:r}=n??t;return this.cols={list:s.slice(),map:{...i},tree:o.slice(),treeDepth:r},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,i=this.isPivotMode()&&!this.showingPivotResult,s=t==null?void 0:t.isSelectionColumnEnabled(),o=n.get("rowNumbers"),r=e==null?void 0:e.columns;return this.cols.list.filter(l=>{const u=iy(l);if(i){const c=r==null?void 0:r.includes(l);return u||c||s&&Lo(l)||o&&No(l)}else return u||l.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,n){Fs(this.beans,{state:e.map(i=>({colId:typeof i=="string"?i:i.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 i=d=>{const h=d.getOriginalParent();return h?h.getChildren().length>1?!0:i(h):!1};if(!n.some(d=>i(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 o=e.list.filter(d=>!s.has(d));if(o.length===0){e.list=n;return}const r=(d,h)=>{const f=h?h.getOriginalParent():d.getOriginalParent();if(!f)return null;let g=null,v=null;for(const C of f.getChildren())if(!(C===h||C===d)){if(C instanceof Ea){const b=s.get(C);if(b==null)continue;(g==null||g<b)&&(g=b,v=C);continue}C.forEachLeafColumn(b=>{const D=s.get(b);D!=null&&(g==null||g<D)&&(g=D,v=b)})}return v??r(d,f)},a=[],l=new Map;for(const d of o){const h=r(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 g=f.length-1;g>=0;g--){const v=f[g];u[c--]=v}else u[c--]=f;u[c--]=h}e.list=u}positionLockedCols(e){e.list=wP(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:i}=this.beans;n.refresh(t),i.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=Kl(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;Xf(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 o,r,a,l,u;const{pivotResultCols:t,autoColSvc:n,selectionColSvc:i,groupHierarchyColSvc:s}=this.beans;ed((o=this.colDefCols)==null?void 0:o.list,e),ed((r=n==null?void 0:n.columns)==null?void 0:r.list,e),ed((a=i==null?void 0:i.columns)==null?void 0:a.list,e),ed((l=s==null?void 0:s.columns)==null?void 0:l.list,e),ed((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:i}=t;if(typeof e=="string"&&n[e])return n[e];for(let a=0;a<i.length;a++)if(td(i[a],e))return i[a];const{autoColSvc:s,selectionColSvc:o,groupHierarchyColSvc:r}=this.beans;return(s==null?void 0:s.getColumn(e))??(o==null?void 0:o.getColumn(e))??(r==null?void 0:r.getColumn(e))??null}},TP=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 nd(e,t,n){return n&&e.addDestroyFunc(()=>t.destroyBean(n)),n??e}var $e=null;function xP(e){return typeof(e==null?void 0:e.getGui)=="function"}var _P=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){var i;if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){for(const o of s)this.toggleCss(o,t);return}}this.cssClassStates[e]!==t&&e.length&&((i=this.getGui())==null||i.classList.toggle(e,t),this.cssClassStates[e]=t)}},IK=0,id=class extends Qs{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=IK++,this.cssManager=new _P(()=>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 i of this.css??[])this.beans.environment.addGlobalCSS(i,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(N_):null}applyElementsToComponent(e,t,n,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===$e)this[t]=i??e;else{const o=n==null?void 0:n[t];if(!this.suppressDataRefValidation&&!o)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${s}`)}}}createChildComponentsFromTags(e,t){const n=[];for(const i of e.childNodes??[])n.push(i);for(const i of n){if(!(i instanceof HTMLElement))continue;const s=this.createComponentFromElement(i,o=>{const r=o.getGui();if(r)for(const a of i.attributes??[])r.setAttribute(a.name,a.value)},t);if(s){if(s.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);const o=Array.prototype.slice.call(i.children);s.addItems(o)}this.swapComponentForNode(s,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)}}createComponentFromElement(e,t,n){const i=e.nodeName,s=this.getDataRefAttribute(e),o=i.indexOf("AG-")===0,r=o?this.componentSelectors.get(i):null;let a=null;if(r){const l=n&&s?n[s]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(o)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,s,n,a),a}swapComponentForNode(e,t,n){const i=e.getGui();t.replaceChild(i,n),t.insertBefore(document.createComment(n.nodeName),i),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 i;typeof e=="string"||e==null?i=VC(e):i=jc(e),this.setTemplateFromElement(i,t,n)}setTemplateFromElement(e,t,n,i=!1){if(this.eGui=e,this.suppressDataRefValidation=i,t)for(let s=0;s<t.length;s++){const o=t[s];this.componentSelectors.set(o.selector,o)}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),GC(e)?{element:e,parent:n}:{element:e.getGui(),parent:n})}prependChild(e,t){const{element:n,parent:i}=this.getContainerAndElement(e,t)||{};!n||!i||i.insertAdjacentElement("afterbegin",n)}appendChild(e,t){const{element:n,parent:i}=this.getContainerAndElement(e,t)||{};!n||!i||i.appendChild(n)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:n}=t;h8(this.eGui,e,{skipAriaHidden:n})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:n}=t;on(this.eGui,e,{skipAriaHidden:n});const i={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(i)}}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)}},zt=class extends id{};function PP(e){return typeof e=="object"&&!!e.component}function kK(e,t){return new pn(n=>{n(window.setInterval(e,t))})}var pn=class Nd{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 Nd(n=>{let i=t.length;const s=new Array(i);t.forEach((o,r)=>{o.then(a=>{s[r]=a,i--,i===0&&n(s)})})}):Nd.resolve()}static resolve(t=null){return new Nd(n=>n(t))}then(t){return new Nd(n=>{this.status===1?n(t(this.resolution)):this.waiters.push(i=>n(t(i)))})}onDone(t){this.status=1,this.resolution=t;for(const n of this.waiters)n(t)}onReject(t){}};function OK(e){return e?e.prototype&&"getGui"in e.prototype:!1}function AP(e,t,n,i){const{name:s}=n;let o,r,a,l,u,c;if(t){const d=t,h=d[s+"Selector"],f=h?h(i):null,g=v=>{typeof v=="string"?o=v:v!=null&&v!==!0&&(e.isFrameworkComponent(v)?a=v:r=v)};f?(g(f.component),l=f.params,u=f.popup,c=f.popupPosition):g(d[s])}return{compName:o,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:u,popupPositionFromSelector:c}}var MK=class extends ve{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,i=!1){return this.getCompDetails(this.gridOptions,e,t,n,i)}getCompDetails(e,t,n,i,s=!1){var E;const{name:o,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:u,paramsFromSelector:c,popupFromSelector:d,popupPositionFromSelector:h}=AP(this.beans.frameworkOverrides,e,t,i),f,g;const v=y=>{const R=this.registry.getUserComponent(o,y);R&&(l=R.componentFromFramework?void 0:R.component,u=R.componentFromFramework?R.component:void 0,f=R.params,g=R.processParams)};if(a!=null&&v(a),l==null&&u==null&&n!=null&&v(n),l&&r&&!OK(l)&&(l=(E=this.agCompUtils)==null?void 0:E.adaptFunction(t,l)),!l&&!u){const{validation:y}=this.beans;s&&(a!==n||!n)?a?y!=null&&y.isProvidedUserComp(a)||qt(50,{compName:a}):n?y||qt(260,{...this.gos.getModuleErrorParams(),propName:o,compName:n}):qt(216,{name:o}):n&&!y&&qt(146,{comp:n});return}const C=this.mergeParams(e,t,i,c,f,g),b=l==null,D=l??u;return{componentFromFramework:b,componentClass:D,params:C,type:t,popupFromSelector:d,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(D,b,C,t)}}newAgStackInstance(e,t,n,i){var a;const s=!t;let o;s?o=new e:o=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(o);const r=(a=o.init)==null?void 0:a.call(o,n);return r==null?pn.resolve(o):r.then(()=>o)}mergeParams(e,t,n,i=null,s,o){const r={...n,...s},a=e,l=a==null?void 0:a[t.name+"Params"];if(typeof l=="function"){const u=l(n);di(r,u)}else typeof l=="object"&&di(r,l);return di(r,i),o?o(r):r}},LK={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},NK={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},VK={name:"headerComponent",optionalMethods:["refresh"]},BK={name:"innerHeaderComponent"},HK={name:"innerHeaderGroupComponent"},GK={name:"headerGroupComponent"},$K={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},WK={name:"loadingCellRenderer",cellRenderer:!0},zK={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},UK={name:"loadingOverlayComponent",optionalMethods:["refresh"]},jK={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},KK={name:"tooltipComponent"},oy={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},qK={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},YK={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},ZK={name:"loadingCellRenderer",cellRenderer:!0},JK={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},QK={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function XK(e,t){return e.getCompDetailsFromGridOptions(NK,"agDragAndDropImage",t,!0)}function e7(e,t,n){return e.getCompDetails(t,VK,"agColumnHeader",n)}function t7(e,t,n){return e.getCompDetails(t,BK,void 0,n)}function n7(e,t){const n=t.columnGroup.getColGroupDef();return e.getCompDetails(n,GK,"agColumnGroupHeader",t)}function i7(e,t,n){return e.getCompDetails(t,HK,void 0,n)}function s7(e,t){return e.getCompDetailsFromGridOptions(YK,void 0,t,!0)}function o7(e,t){return e.getCompDetailsFromGridOptions(ZK,"agLoadingCellRenderer",t,!0)}function r7(e,t){return e.getCompDetailsFromGridOptions(JK,"agGroupRowRenderer",t,!0)}function a7(e,t){return e.getCompDetailsFromGridOptions(QK,"agDetailCellRenderer",t,!0)}function IP(e,t,n){return e.getCompDetails(t,$K,void 0,n)}function kP(e,t,n){return e.getCompDetails(t,WK,"agSkeletonCellRenderer",n,!0)}function OP(e,t,n){return e.getCompDetails(t,zK,"agCellEditor",n,!0)}function l7(e,t,n,i){const s=t.filter;return PP(s)&&(t={filter:s.component,filterParams:t.filterParams}),e.getCompDetails(t,oy,i,n,!0)}function u7(e,t,n){return e.getCompDetails(t,LK,"agDateInput",n,!0)}function c7(e,t){return e.getCompDetailsFromGridOptions(UK,"agLoadingOverlay",t,!0)}function d7(e,t){return e.getCompDetailsFromGridOptions(jK,"agNoRowsOverlay",t,!0)}function h7(e,t){return e.getCompDetails(t.colDef,KK,"agTooltipComponent",t,!0)}function f7(e,t,n,i){return e.getCompDetails(t,qK,i,n)}function MP(e,t){return AP(e,t,oy)}function ry(e,t,n){return e.mergeParams(t,oy,n)}function sd(e){const t=e;return(t==null?void 0:t.getFrameworkComponentInstance)!=null?t.getFrameworkComponentInstance():e}function p7(e){return typeof e=="object"&&!!e.getComp}var le={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"},ay=class extends id{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()}},ly,uy,cy,dy,hy,fy,py;function yr(){return ly===void 0&&(ly=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),ly}function LP(){return uy===void 0&&(uy=/(firefox)/i.test(navigator.userAgent)),uy}function NP(){return cy===void 0&&(cy=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),cy}function Ra(){return dy===void 0&&(dy=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),dy}function gy(e){if(!e)return null;const t=e.tabIndex,n=e.getAttribute("tabIndex");return t===-1&&(n===null||n===""&&!LP())?null:t.toString()}function g7(){if(py!==void 0)return py;if(!document.body)return-1;let e=1e6;const t=LP()?6e6:1e9,n=document.createElement("div");for(document.body.appendChild(n);;){const i=e*2;if(n.style.height=i+"px",i>t||n.clientHeight!==i)break;e=i}return n.remove(),py=e,e}function m7(){return fy==null&&VP(),fy}function VP(){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&&(fy=n,hy=n===0)}function BP(){return hy==null&&VP(),hy}var my="T",v7=new RegExp(`[${my} ]`),C7=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${my}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function to(e,t){return e.toString().padStart(t,"0")}function Ni(e,t=!0,n=my){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>to(s,2)).join("-");return t&&(i+=n+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>to(s,2)).join(":")),i}function np(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),to(e.getDate(),2),to(e.getHours(),2),`:${to(e.getMinutes(),2)}`,`:${to(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,to(e.getDate(),2)].map(String):null}var vy=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"},HP=["January","February","March","April","May","June","July","August","September","October","November","December"],Cy=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function yy(e,t){if(t==null)return Ni(e,!1);const n=to(e.getFullYear(),4),i={YYYY:()=>n.slice(n.length-4,n.length),YY:()=>n.slice(n.length-2,n.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>HP[e.getMonth()],MMM:()=>HP[e.getMonth()].slice(0,3),MM:()=>to(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${vy(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${vy(e.getDate())}`,DD:()=>to(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>Cy[e.getDay()],ddd:()=>Cy[e.getDay()].slice(0,3),dd:()=>Cy[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${vy(e.getDay())}`,d:()=>`${e.getDay()}`},s=new RegExp(Object.keys(i).join("|"),"g");return t.replace(s,o=>o in i?i[o]():o)}function ip(e,t=!1){return!!yi(e,t)}function y7(e){return ip(e,!0)}function yi(e,t=!1,n){if(!e||!n&&!C7.test(e))return null;const[i,s]=e.split(v7);if(!i)return null;const o=i.split("-").map(f=>Number.parseInt(f,10));if(o.filter(f=>!isNaN(f)).length!==3)return null;const[r,a,l]=o,u=new Date(r,a-1,l);if(u.getFullYear()!==r||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 wy(e){const{inputValue:t,allSuggestions:n,hideIrrelevant:i,filterByPercentageOfBestMatch:s}=e;let o=(n??[]).map((l,u)=>({value:l,relevance:w7(t,l),idx:u}));if(o.sort((l,u)=>l.relevance-u.relevance),i&&(o=o.filter(l=>l.relevance<Math.max(l.value.length,t.length))),o.length>0&&s&&s>0){const u=o[0].relevance*s;o=o.filter(c=>u-c.relevance<0)}const r=[],a=[];for(const l of o)r.push(l.value),a.push(l.idx);return{values:r,indices:a}}function w7(e,t){e.length<t.length&&([e,t]=[t,e]);let n=[],i=[];const s=e.length,o=t.length;for(let a=0;a<=o;a++)n[a]=a;let r=0;for(let a=1;a<=s;a++){i[0]=a;for(let l=1;l<=o;l++){const u=e[a-1],c=t[l-1];if(u.toLocaleLowerCase()===c.toLocaleLowerCase())++r,u===c&&++r,a>1&&l>1&&e[a-2].toLocaleLowerCase()===t[l-2].toLocaleLowerCase()&&(++r,e[a-2]===t[l-2]&&++r),a<s/2-10&&++r,i[l]=n[l-1];else{const d=i[l-1],h=n[l],f=n[l-1];i[l]=1+Math.min(d,h,f)}}[n,i]=[i,n]}return n[o]/(r+1)}function GP(e){var n;return e.altKey||e.ctrlKey||e.metaKey?!1:((n=e.key)==null?void 0:n.length)===1}var by=!1,sp=0;function b7(e){sp>0||(e.addEventListener("keydown",op),e.addEventListener("mousedown",op))}function S7(e){sp>0||(e.removeEventListener("keydown",op),e.removeEventListener("mousedown",op))}function op(e){const t=by,n=e.type==="keydown";n&&(e.ctrlKey||e.metaKey||e.altKey)||t!==n&&(by=n)}function E7(e){const t=Nn(e);return b7(t),sp++,()=>{sp--,S7(t)}}function R7(){return by}function Yl(e,t,n=!1){const i=d8;let s=P_;t&&(s+=", "+t),n&&(s+=', [tabindex="-1"]');const o=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(l=>Zs(l)),r=Array.prototype.slice.apply(e.querySelectorAll(s));return r.length?((l,u)=>l.filter(c=>u.indexOf(c)===-1))(o,r):o}function Da(e,t=!1,n=!1,i=!1){const s=Yl(e,i?".ag-tab-guard":null,n),o=t?Yt(s):s[0];return o?(o.focus({preventScroll:!0}),!0):!1}function Fa(e,t,n,i){const s=Yl(t,n?':not([tabindex="-1"])':null),o=cn(e);let r;n?r=s.findIndex(l=>l.contains(o)):r=s.indexOf(o);const a=r+(i?-1:1);return a<0||a>=s.length?null:s[a]}function $P(e,t=5){let n=0;for(;e&&gy(e)===null&&++n<=t;)e=e.parentElement;return gy(e)===null?null:e}var D7=".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)}",F7=class extends id{constructor(e,t,n){super(t,n),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(D7)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:n,labelAlignment:i,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(i||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;$n(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(on(t,!1),hr(t,"presentation")):(on(t,!0),hr(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:(Gf(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return $c(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},WP=class extends F7{constructor(e,t,n,i){super(e,t,n),this.className=i}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==""||Yj(e)!==null?Hc(e,""):Hc(e,t??"")}setAriaLabel(e){return Bl(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 Js(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 T7(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 Ta=class extends WP{constructor(e,t,n="text",i="input"){super(e,(e==null?void 0:e.template)??T7(i),[],t),this.inputType=n,this.displayFieldTag=i,this.eLabel=$e,this.eWrapper=$e,this.eInput=$e}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:n,className:i}=this;e.classList.add(`${i}-label`),t.classList.add(`${i}-input-wrapper`),n.classList.add(`${i}-input`),this.addCss("ag-input-field"),n.id=n.id||`ag-${this.getCompId()}-input`;const{inputName:s,inputWidth:o}=this.config;s!=null&&this.setInputName(s),o!=null&&this.setInputWidth(o),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,Mi(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return Gf(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 Mi(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Bl(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return $c(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Mi(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Mi(this.eInput,"autocomplete",t)}return this}},Sy=class extends Ta{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 i=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:i.id,name:i.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)}},Ey={selector:"AG-CHECKBOX",component:Sy},x7=class extends Sy{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)}},xa=class extends Ta{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=We(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=n=>{GP(n)&&n.key&&!e.test(n.key)&&n.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:n=>{var s;const i=(s=n.clipboardData)==null?void 0:s.getData("text");i!=null&&i.split("").some(o=>!e.test(o))&&n.preventDefault()}})}},rp={selector:"AG-INPUT-TEXT-FIELD",component:xa},_7=class extends Ta{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}},P7={selector:"AG-INPUT-TEXT-AREA",component:_7},Ry=class extends xa{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const o=Number.parseFloat(e.value),r=isNaN(o)?"":this.normalizeValue(o.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:n,max:i,step:s}=this.config;typeof t=="number"&&this.setPrecision(t),typeof n=="number"&&this.setMin(n),typeof i=="number"&&this.setMax(i),typeof s=="number"&&this.setStep(s)}onWheel(e){cn(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 i=String(e).split(".");if(i.length>1){if(i[1].length<=n)return e;if(n>0)return`${i[0]}.${i[1].slice(0,n)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,Mi(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Mi(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Mi(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(We(n)){let i=this.isScientificNotation(n);if(i&&this.eInput.validity.valid)return e(n);if(!i){n=this.adjustPrecision(n);const s=this.normalizeValue(n);i=n!=s}if(i)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")}},A7={selector:"AG-INPUT-NUMBER-FIELD",component:Ry},I7=class extends xa{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=yr();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){cn(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?Ni(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,Mi(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?Ni(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,Mi(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Mi(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 yi(this.getValue())??void 0}setDate(e,t){this.setValue(Ni(e??null,this.includeTime),t)}},zP={selector:"AG-INPUT-DATE-FIELD",component:I7},k7=".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)}}",O7="ag-active-item",M7=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",ref:"eText",children:t}]}),L7=class extends id{constructor(e,t,n){super(M7(e,t)),this.label=t,this.value=n,this.eText=$e}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(O7,e),x_(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const n=this.getGui();t8(n,e),e8(n,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>BC(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)}))}},N7=class extends id{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(k7)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case le.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const n=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(n)}break;case le.DOWN:case le.UP:e.preventDefault(),this.navigate(t);break;case le.PAGE_DOWN:case le.PAGE_UP:case le.PAGE_HOME:case le.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,i=n??t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();$n(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(i=>i.value===e);if(n!==-1){const i=this.options[n];this.value=i.value,this.displayValue=i.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(!Zs(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const n=this.getGui(),{scrollTop:i,clientHeight:s}=n,{offsetTop:o,offsetHeight:r}=t;(o+r>i+s||o<i)&&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 L7(this.cssIdentifier,t,e);n.setParentComponent(this);const i=this.createManagedBean(n);this.listItems.push(i),this.getGui().appendChild(i.getGui())}navigate(e){const t=e===le.DOWN;let n;const{listItems:i,highlightedItem:s}=this;if(!s)n=t?i[0]:Yt(i);else{let r=i.indexOf(s)+(t?1:-1);r=Math.min(Math.max(r,0),i.length-1),n=i[r]}this.highlightItem(n)}navigateToPage(e){const{listItems:t,highlightedItem:n}=this;if(!n||t.length===0)return;const i=t.indexOf(n),s=this.options.length-1,o=t[0].getHeight(),r=Math.floor(this.getGui().clientHeight/o);let a=-1;e===le.PAGE_HOME?a=0:e===le.PAGE_END?a=s:e===le.PAGE_DOWN?a=Math.min(i+r,s):e===le.PAGE_UP&&(a=Math.max(i-r,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){hr(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((n,i)=>{n.setIndex(i+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},V7=".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}}",B7={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"}}]}]},H7=class extends WP{constructor(e){if(super(e,(e==null?void 0:e.template)||B7,(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=$e,this.eWrapper=$e,this.eDisplayField=$e,this.eIcon=$e,this.registerCSS(V7),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:i,minPickerWidth:s,maxPickerWidth:o}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,n!=null&&this.setPickerMaxHeight(n),s!=null&&this.setPickerMinWidth(s),o!=null&&this.setPickerMaxWidth(o)}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:i}=this.config;if(n){const s=this.beans.iconSvc.createIconNoSpan(n);s&&this.eIcon.appendChild(s)}i!=null&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),LC(e,!1),this.ariaRole&&hr(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 le.UP:case le.DOWN:case le.ENTER:case le.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case le.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:i,modalPicker:s=!0},maxPickerHeight:o,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:u,eWrapper:c}=this,d={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const v=b_(u);this.beforeHidePicker(),v&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(n,i),anchorToElement:c};e.style.position="absolute";const h=u.popupSvc,f=h.addPopup(d);l?(r&&(e.style.minWidth=r),e.style.width=HC(Nf(c)),a&&(e.style.maxWidth=a)):Gf(e,a??Nf(c));const g=o??`${NC(h.getPopupParent())}px`;return e.style.setProperty("max-height",g),this.alignPickerToComponent(),f.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:n,gos:i},eWrapper:s,pickerComponent:o}=this,r=i.get("enableRtl")?"right":"left";n.positionPopupByComponent({type:t,eventSource:s,ePopup:o.getGui(),position:"under",alignSide:r,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();LC(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 Gf(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()}},G7=".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)}",Dy=class extends H7{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(G7)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Hf(()=>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 N7("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",n),c8(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i==null||i.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===le.TAB&&this.hidePicker(),t){case le.ENTER:case le.UP:case le.DOWN:case le.PAGE_UP:case le.PAGE_DOWN:case le.PAGE_HOME:case le.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(n=this.listComponent)==null||n.handleKeyDown(e):super.onKeyDown(e);break;case le.ESCAPE:super.onKeyDown(e);break;case le.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:i,config:{placeholder:s},eDisplayField:o,tooltipFeature:r}=this;if(this.value===e||!i)return this;if(n||i.setValue(e,!0),i.getValue()===this.getValue())return this;let l=i.getDisplayValue();return l==null&&s&&(l=s),o.textContent=l,r==null||r.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},$7={selector:"AG-SELECT",component:Dy},W7=':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}}',Fy=typeof window!="object"||!((_k=(xk=window==null?void 0:window.document)==null?void 0:xk.fonts)!=null&&_k.forEach),Zl=(e,t,n,i,s,o)=>{if(Fy)return;i&&(e=`@layer ${CSS.escape(i)} { ${e} }`);let r=Jl.map.get(t);if(r||(r=[],Jl.map.set(t,r)),r.some(c=>c.css===e))return;const a=document.createElement("style");o&&a.setAttribute("nonce",o),a.dataset.agGlobalCss=n,a.textContent=e;const l={css:e,el:a,priority:s};let u;for(const c of r){if(c.priority>s)break;u=c}if(u){u.el.insertAdjacentElement("afterend",a);const c=r.indexOf(u);r.splice(c+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),r.push(l)},UP=(e,t,n,i)=>{Zl(W7,e,"shared",t,0,n),i==null||i.forEach((s,o)=>s.forEach(r=>Zl(r,e,o,t,0,n)))},z7=e=>{Jl.grids.add(e)},U7=e=>{if(Jl.grids.delete(e),Jl.grids.size===0){Jl.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},jP,Jl=(jP=typeof window=="object"?window:{}).agStyleInjectionState??(jP.agStyleInjectionState={map:new WeakMap,grids:new Set}),no=e=>new KP(e),wr="$default",j7=0,KP=class{constructor({feature:e,params:t,modeParams:n={},css:i,cssImports:s}){this.feature=e,this.css=i,this.cssImports=s,this.modeParams={[wr]:{...n[wr]??{},...t??{}},...n}}use(e,t,n){let i=this._inject;if(i==null){let{css:s}=this;if(s){const o=`ag-theme-${this.feature??"part"}-${++j7}`;typeof s=="function"&&(s=s()),s=`:where(.${o}) {
91
91
  ${s}
@@ -168,4 +168,4 @@ If you are trying to annotate ${i} with application data, use the '${i}.context'
168
168
  <rect width="32" height="32" rx="4" fill="#CCF3EB"/>
169
169
  <path d="M11 9C9.89688 9 9 9.89688 9 11V21C9 22.1031 9.89688 23 11 23H21C22.1031 23 23 22.1031 23 21V11C23 9.89688 22.1031 9 21 9H11ZM19.5312 14.5312L15.5312 18.5312C15.2375 18.825 14.7625 18.825 14.4719 18.5312L12.4719 16.5312C12.1781 16.2375 12.1781 15.7625 12.4719 15.4719C12.7656 15.1813 13.2406 15.1781 13.5312 15.4719L15 16.9406L18.4688 13.4688C18.7625 13.175 19.2375 13.175 19.5281 13.4688C19.8187 13.7625 19.8219 14.2375 19.5281 14.5281L19.5312 14.5312Z" fill="#00A18D"/>
170
170
  </svg>
171
- `,$le=bt(rt({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const{addNotification:n}=kf(),i={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},s=[{label:"Create manually",value:"new_scene",iconName:"Plus",type:"icon"},{label:"Import from CSV or Excel",value:"import_scenes",iconName:"FileImport",type:"icon",disabled:!1},{label:"Update existing (CSV or Excel)",value:"overwrite_scenes",iconName:"FilePen",type:"icon",disabled:!0}],o=e;ma.initialize({wrapVueCellRenderer:Of,wrapVueCellEditor:w_});const r=ae(null),a=ae([]),l=ae(0),u=ae(!1),c=ae(""),d=ae(),h=ae(""),f=ae(!1),g=As({totalItems:0}),v=ae(new Set),C=ae(new Map),{apiServices:b}=zs(!1,o),{columnDefs:D,checkboxColumn:E}=aae(d,o.entityId),{updateRowData:y,setMetricValues:R}=Vle(r),T=G(()=>c.value.length>0),F=G(()=>!1),I=G(Uv),P=G(()=>D.value.filter(re=>{var Y;return((Y=re.field)==null?void 0:Y.startsWith("metric_"))&&!re.hide}).map(re=>{var Y;return((Y=re.field)==null?void 0:Y.replace("metric_",""))||""}));Yr("timezone",I);const N=G(()=>({autoFetch:!1,workspaceId:o.workspaceId,entityId:o.entityId,metricIds:P.value,updateItemData:y})),{fetchItems:_,getMetricList:L,cusorMap:K,getMetricValues:me}=Nle(N),Pe=(re,Y,de)=>re===1?Y:de,ee=G(()=>{const re=Pe(g.totalItems,"scene","scenes"),Y=Pe(l.value,"scene","scenes");return{visible:`${l.value} ${re}`,total:`${g.totalItems} ${Y}`}}),ie=(re,Y)=>{var de,Be,Me;g.totalItems=re.meta.total??0,(de=re.meta.next)!=null&&de.cursor&&(K[Y+1]=re.meta.next.cursor),h.value=re.meta["X-Tsr-content-sha256"]||"",re.meta.total===0?(Be=r.value)==null||Be.showNoRowsOverlay():(Me=r.value)==null||Me.hideOverlay()},se=v_(),{sortingAPIConfiguration:O,isSortingRunning:te}=AC(se),Re=async({page:re,pageSize:Y,filterText:de})=>{var it;(it=r.value)==null||it.hideOverlay();const Be=K[re],Me=!Be&&re>1?(re-1)*Y:void 0,Qe=O.value;Qe.length>0&&(te.value=!0);try{const gt=await _({cursor:Be,size:Y,searchQuery:de,offset:Me,sort_by:Qe});if(!gt)return{rows:[],total:0};const Ot=(gn=>{const Zt=gn.data.map(bn=>QF(bn,I.value));return Zt.forEach(bn=>{v.value.add(String(bn.id)),C.value.set(String(bn.id),{})}),Zt})(gt);return ie(gt,re),{rows:Ot,total:g.totalItems}}catch(gt){return console.error("Failed to fetch items:",gt),{rows:[],total:0}}finally{te.value=!1}},{isLoading:_e,toggleSidebar:Ie,onGridReady:ot,handleUnSelect:nt,onSearch:ct}=Hle({selectRowData:ae([]),isSidebarOpen:u,quickFilterText:c,gridApi:r,columnDefs:D,perPage:i.ROWS_PER_PAGE,fetcher:Re}),At=G(()=>({blockLoadDebounceMillis:Dc,columnDefs:D.value,rowModelType:"infinite",cacheBlockSize:i.ROWS_PER_PAGE,popupParent:document.getElementById("item-table-layout-id")||void 0,rowSelection:{mode:"multiRow",checkboxes:!1,headerCheckbox:!1,enableClickSelection:!1,enableSelectionWithoutKeys:!1},suppressHeaderFocus:!1,pagination:!1,rowHeight:i.ROW_HEIGHT,suppressHorizontalScroll:!1,suppressColumnVirtualisation:!0,debounceVerticalScrollbar:!1,animateRows:!1,suppressAnimationFrame:!1,suppressScrollOnNewData:!0,suppressScrollWhenPopupsAreOpen:!1,rowBuffer:20,enableCellTextSelection:!1,suppressDragLeaveHidesColumns:!0,suppressMaxRenderedRowRestriction:!1,height:i.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:Vt,noRowsOverlayComponent:Of(Ej),noRowsOverlayComponentParams:()=>({isSearching:T.value,isFiltering:F.value}),defaultColDef:{editable:!1,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:re=>re.data.id,getRowClass:re=>{if(!re.data)return["row-empty"];const Y=["row-highlight"];return re.data.id||Y.push("row-inactive"),re.data.isDeleted&&Y.push("row-deleted"),re.data.isArchived&&Y.push("row-archived"),Y},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:o.workspaceId,entityId:o.entityId,apiServices:b.value,sorting:te.value}}));function Vt(){if(!r.value)return;const re=r.value.getCacheBlockState();if(!re)return;const Y=Object.values(re).reduce((de,Be)=>(Be==null?void 0:Be.pageStatus)==="loaded"?de+(Be.endRow-Be.startRow):de,0);l.value=Math.min(Y,g.totalItems)}ht(()=>O,()=>{r.value&&(h.value="",v.value.clear(),r.value.deselectAll(),Object.keys(K).forEach(re=>delete K[Number(re)]),r.value.purgeInfiniteCache(),r.value.ensureIndexVisible(0),r.value.refreshCells({force:!0}))},{deep:!0});const Ye=ae(),rn=()=>{var re;(re=Ye.value)==null||re.open()},Bt=()=>{r.value&&(h.value="",v.value.clear(),Object.keys(K).forEach(re=>delete K[Number(re)]),r.value.refreshInfiniteCache())},Tt=G(()=>sessionStorage.getItem("ITEM_TABLE_APP_VERSION")||""),V=ae();function $(re){var Y;re==="new_scene"?(Y=V.value)==null||Y.show():re==="import_scenes"&&rn()}const ce=re=>{const Y=ot(re);return Y&&(Y.addEventListener("modelUpdated",Vt),Y.addEventListener("bodyScroll",()=>Y.stopEditing())),Y==null||Y.sizeColumnsToFit(),Y},Te=(re,Y)=>{if(!r.value)return;const de=r.value.getRowNode(re);de?(r.value.ensureIndexVisible(Number(de.rowIndex),"middle"),r.value.flashCells({rowNodes:[de],flashDuration:3e3,fadeDuration:1e3})):r.value.ensureIndexVisible(g.totalItems-1,"bottom")},Se=async re=>{var de;let Y;if(!(!b.value||!re.trim())){_e.value=!0;try{Y=await b.value.createNewScene({workspaceId:o.workspaceId,entityId:o.entityId,name:re}),g.totalItems<50&&await Bt()}catch(Be){console.error("Error creating new scene:",Be)}finally{_e.value=!1,Y!=null&&Y.id&&n({id:String(Y==null?void 0:Y.id),message:`${re} created successfully`,actions:[{label:"View",variant:"secondary",action:()=>{Te(String(Y==null?void 0:Y.id))}},{label:"Scene Hub",variant:"primary",action:()=>{const Be=gs({type:"scene_hub",config:{ws_code:o.workspaceId,baseDomain:sessionStorage.getItem("URL_BASE")||"app.arbocollab.com",scene_id:String(Y==null?void 0:Y.id)}}).url;window.open(Be,"_blank")},btnIcon:"CustomSceneHub"}],icon:Gle,type:"interactive"}),(de=V.value)==null||de.hide()}}};ht(()=>[o.entityId,o.workspaceId],async([re,Y])=>{if(!(!re||!Y)){_e.value=!0;try{const de=await L(re);d.value=de.data}catch(de){console.error("Failed to initialize metric list:",de),d.value=[]}finally{_e.value=!1}}},{immediate:!0,deep:!0}),ht(P,(re,Y)=>{const de=re.filter(Be=>!(Y!=null&&Y.includes(Be)));de.length>0&&me(Array.from(v.value),de).then(Be=>{R(Be,v.value,de)})},{immediate:!0,deep:!0}),ht(h,(re,Y)=>{f.value=!!(Y&&re&&Y!==re)}),t({refreshTable:Bt});const De=ae(),Oe=()=>{const re=document.documentElement;re.getAttribute("data-theme")==="dark"?(re.setAttribute("data-theme","light"),document.body.dataset.agThemeMode="light"):(re.setAttribute("data-theme","dark"),document.body.dataset.agThemeMode="dark")};return(re,Y)=>(z(),Ze(Z(x4),{"is-sidebar-open":u.value,onCloseSidebar:Z(Ie),onSidebarClear:Z(Ie),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:Z(Ie)},{"header-left":Fe(()=>[ye("h1",{class:W(re.$style.tableTitle)},"Scenes",2),we(Z(tC),{variant:["primary"],options:s,onSelect:$,onHandleClick:Y[1]||(Y[1]=de=>$("new_scene")),id:"create_scene_dropdown"},{prefix:Fe(()=>[we(Z(yt),{id:"create_new_scene",variant:["primary"],onClick:Y[0]||(Y[0]=de=>$("new_scene")),label:"New"})]),_:1}),ye("span",null,mt(Tt.value),1),we(Z(yt),{onClick:Oe},{default:Fe(()=>[...Y[6]||(Y[6]=[pt("Toggle Theme",-1)])]),_:1}),Y[7]||(Y[7]=ye("div",{class:"loading-wrapper",style:{width:"200px",height:"24px"}},null,-1))]),"header-actions":Fe(()=>[we(Z(Jv),{modelValue:c.value,"onUpdate:modelValue":Y[2]||(Y[2]=de=>c.value=de),onSearch:Z(ct),class:W(re.$style.itemSearchBox),onClear:Y[3]||(Y[3]=de=>Z(ct)("")),id:"item_search_box"},null,8,["modelValue","onSearch","class"]),we(Z(ZF),{status:Z(_e)?"busy":"online",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":f.value},{default:Fe(()=>[we(Z(yt),{variant:"secondary",onClick:Bt},{prefix:Fe(()=>[we(Z(ut),{src:"ArrowsRotate"})]),default:Fe(()=>[Y[8]||(Y[8]=pt(" Refresh ",-1))]),_:1})]),_:1},8,["status","show-badge"]),we(Z(bj),{modelValue:Z(D),"onUpdate:modelValue":Y[4]||(Y[4]=de=>$t(D)?D.value=de:null),checkboxColumn:Z(E),id:"table_customization"},null,8,["modelValue","checkboxColumn"])]),grid:Fe(({availableHeight:de})=>[we(Z(tae),vn({id:"item_table_main",ref_key:"agGrid",ref:De},At.value,{height:de+"px",isSorting:Z(te),onOnGridReady:ce,onSelectionChanged:Y[5]||(Y[5]=Be=>a.value=Be.api.getSelectedRows().map(Me=>Me.id))}),null,16,["height","isSorting"])]),footer:Fe(()=>[ye("div",{class:W(re.$style.tableFooter),id:"table_footer"},[ye("div",{class:W(re.$style.footerStart)},[we(Z(ut),{src:"Eye"}),ye("span",null,[Y[9]||(Y[9]=pt(" Visibles: ",-1)),ye("b",null,mt(ee.value.visible),1)])],2),ye("div",{class:W(re.$style.footerStart)},[we(Z(ut),{src:"List"}),ye("span",null,[Y[10]||(Y[10]=pt(" Total: ",-1)),ye("b",null,mt(ee.value.total),1)])],2)],2)]),"new-row":Fe(()=>[we(Z(Dj),{onCreateNewItem:Se,ref_key:"createNewSceneRef",ref:V},null,512)]),"bulk-update-actions":Fe(()=>{var de;return[!u.value&&a.value.length>0?(z(),Ze(Z(m4),{key:0,selectRowData:((de=r.value)==null?void 0:de.getSelectedRows())||[],"workspace-id":o.workspaceId,"entity-id":o.entityId,"grid-api":r.value,onUnselect:Z(nt)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect"])):at("",!0)]}),snackbar:Fe(()=>[we(Z(Cj))]),popup:Fe(()=>[we(Ij,{ref_key:"popupCreateSceneRef",ref:Ye},null,512)]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_8hmh0_1",tableFooter:"_tableFooter_8hmh0_7",footerStart:"_footerStart_8hmh0_17",newRow:"_newRow_8hmh0_25","warning-text":"_warning-text_8hmh0_44","has-error":"_has-error_8hmh0_49",itemSearchBox:"_itemSearchBox_8hmh0_53"}}]]),Wle="0.0.1-alpha.21",zle={key:0},Ule=bt(rt({__name:"app",setup(e){const t=G(()=>n.id.length===0||n.workspaceId.length===0),n=As({id:"",workspaceId:"",apiConfig:{}}),i=kf(),{showMessage:s}=i,o=u=>{var c,d;u.success==!1?s(((d=(c=u.res)==null?void 0:c.data)==null?void 0:d.message)||u.apiCode,"error"):s(u.apiCode,"success")},r=ae(null);Ug(()=>{var u,c,d;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",Wle);try{if(r.value=gi(),!r.value)throw new Error("Current instance is null");n.id=((u=r.value)==null?void 0:u.appContext.config.globalProperties.id)||"",n.workspaceId=((c=r.value)==null?void 0:c.appContext.config.globalProperties.workspaceId)||sessionStorage.getItem("ws.code")||"",n.apiConfig=((d=r.value)==null?void 0:d.appContext.config.globalProperties.apiConfig)||{};const h=new Tk(n.apiConfig);h.on("call-api",o),r.value.appContext.config.globalProperties.apiServices=h}catch(h){console.error("Error getting current instance:",h)}}),ri(()=>{r.value.appContext.config.globalProperties.apiServices.off("call-api",o)});const a=G(()=>n.id),l=G(()=>n.workspaceId);return Yr("workspaceId",l),Yr("entityId",a),(u,c)=>(z(),Ce("div",{class:W(u.$style.dashboardPluginWrapper)},[t.value?(z(),Ce("span",zle," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):a.value?(z(),Ze(Z($le),{key:1,entityId:a.value,workspaceId:l.value},null,8,["entityId","workspaceId"])):at("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),Jw=async(e={},t={})=>{const n=Z0(Ule),i=hj();n.use(i);const s=["apiConfig","workspaceId","id"],o={};return Object.entries(e).forEach(([r,a])=>{a!==void 0&&(n.config.globalProperties[r]=a,o[r]=a,s.includes(r)&&typeof a=="string"?sessionStorage.setItem(r,a):console.error(`[Config Error] Key "${r}" has an invalid value and will not be persisted.`))}),n.config.globalProperties.$arboConfig=o,Object.values(t).forEach(r=>{r&&typeof r.install=="function"&&n.use(r)}),n.config.errorHandler=(r,a,l)=>{console.error("[Vue Error]",r),l&&console.error("[Info]",l)},n};typeof window<"u"&&(window.arboDashboard=Jw),en.default=Jw,en.initDashboard=Jw,Object.defineProperties(en,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
171
+ `,$le=bt(rt({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const{addNotification:n}=kf(),i={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},s=[{label:"Create manually",value:"new_scene",iconName:"Plus",type:"icon"},{label:"Import from CSV or Excel",value:"import_scenes",iconName:"FileImport",type:"icon",disabled:!1},{label:"Update existing (CSV or Excel)",value:"overwrite_scenes",iconName:"FilePen",type:"icon",disabled:!0}],o=e;ma.initialize({wrapVueCellRenderer:Of,wrapVueCellEditor:w_});const r=ae(null),a=ae([]),l=ae(0),u=ae(!1),c=ae(""),d=ae(),h=ae(""),f=ae(!1),g=As({totalItems:0}),v=ae(new Set),C=ae(new Map),{apiServices:b}=zs(!1,o),{columnDefs:D,checkboxColumn:E}=aae(d,o.entityId),{updateRowData:y,setMetricValues:R}=Vle(r),T=G(()=>c.value.length>0),F=G(()=>!1),I=G(Uv),P=G(()=>D.value.filter(re=>{var Y;return((Y=re.field)==null?void 0:Y.startsWith("metric_"))&&!re.hide}).map(re=>{var Y;return((Y=re.field)==null?void 0:Y.replace("metric_",""))||""}));Yr("timezone",I);const N=G(()=>({autoFetch:!1,workspaceId:o.workspaceId,entityId:o.entityId,metricIds:P.value,updateItemData:y})),{fetchItems:_,getMetricList:L,cusorMap:K,getMetricValues:me}=Nle(N),Pe=(re,Y,de)=>re===1?Y:de,ee=G(()=>{const re=Pe(g.totalItems,"scene","scenes"),Y=Pe(l.value,"scene","scenes");return{visible:`${l.value} ${re}`,total:`${g.totalItems} ${Y}`}}),ie=(re,Y)=>{var de,Be,Me;g.totalItems=re.meta.total??0,(de=re.meta.next)!=null&&de.cursor&&(K[Y+1]=re.meta.next.cursor),h.value=re.meta["X-Tsr-content-sha256"]||"",re.meta.total===0?(Be=r.value)==null||Be.showNoRowsOverlay():(Me=r.value)==null||Me.hideOverlay()},se=v_(),{sortingAPIConfiguration:O,isSortingRunning:te}=AC(se),Re=async({page:re,pageSize:Y,filterText:de})=>{var it;(it=r.value)==null||it.hideOverlay();const Be=K[re],Me=!Be&&re>1?(re-1)*Y:void 0,Qe=O.value;Qe.length>0&&(te.value=!0);try{const gt=await _({cursor:Be,size:Y,searchQuery:de,offset:Me,sort_by:Qe});if(!gt)return{rows:[],total:0};const Ot=(gn=>{const Zt=gn.data.map(bn=>QF(bn,I.value));return Zt.forEach(bn=>{v.value.add(String(bn.id)),C.value.set(String(bn.id),{})}),Zt})(gt);return ie(gt,re),{rows:Ot,total:g.totalItems}}catch(gt){return console.error("Failed to fetch items:",gt),{rows:[],total:0}}finally{te.value=!1}},{isLoading:_e,toggleSidebar:Ie,onGridReady:ot,handleUnSelect:nt,onSearch:ct}=Hle({selectRowData:ae([]),isSidebarOpen:u,quickFilterText:c,gridApi:r,columnDefs:D,perPage:i.ROWS_PER_PAGE,fetcher:Re}),At=G(()=>({blockLoadDebounceMillis:Dc,columnDefs:D.value,rowModelType:"infinite",cacheBlockSize:i.ROWS_PER_PAGE,popupParent:document.getElementById("item-table-layout-id")||void 0,rowSelection:{mode:"multiRow",checkboxes:!1,headerCheckbox:!1,enableClickSelection:!1,enableSelectionWithoutKeys:!1},suppressHeaderFocus:!1,pagination:!1,rowHeight:i.ROW_HEIGHT,suppressHorizontalScroll:!1,suppressColumnVirtualisation:!0,debounceVerticalScrollbar:!1,animateRows:!1,suppressAnimationFrame:!1,suppressScrollOnNewData:!0,suppressScrollWhenPopupsAreOpen:!1,rowBuffer:20,enableCellTextSelection:!1,suppressDragLeaveHidesColumns:!0,suppressMaxRenderedRowRestriction:!1,height:i.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:Vt,noRowsOverlayComponent:Of(Ej),noRowsOverlayComponentParams:()=>({isSearching:T.value,isFiltering:F.value}),defaultColDef:{editable:!1,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:re=>re.data.id,getRowClass:re=>{if(!re.data)return["row-empty"];const Y=["row-highlight"];return re.data.id||Y.push("row-inactive"),re.data.isDeleted&&Y.push("row-deleted"),re.data.isArchived&&Y.push("row-archived"),Y},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:o.workspaceId,entityId:o.entityId,apiServices:b.value,sorting:te.value}}));function Vt(){if(!r.value)return;const re=r.value.getCacheBlockState();if(!re)return;const Y=Object.values(re).reduce((de,Be)=>(Be==null?void 0:Be.pageStatus)==="loaded"?de+(Be.endRow-Be.startRow):de,0);l.value=Math.min(Y,g.totalItems)}ht(()=>O,()=>{r.value&&(h.value="",v.value.clear(),r.value.deselectAll(),Object.keys(K).forEach(re=>delete K[Number(re)]),r.value.purgeInfiniteCache(),r.value.ensureIndexVisible(0),r.value.refreshCells({force:!0}))},{deep:!0});const Ye=ae(),rn=()=>{var re;(re=Ye.value)==null||re.open()},Bt=()=>{r.value&&(h.value="",v.value.clear(),Object.keys(K).forEach(re=>delete K[Number(re)]),r.value.refreshInfiniteCache())},Tt=G(()=>sessionStorage.getItem("ITEM_TABLE_APP_VERSION")||""),V=ae();function $(re){var Y;re==="new_scene"?(Y=V.value)==null||Y.show():re==="import_scenes"&&rn()}const ce=re=>{const Y=ot(re);return Y&&(Y.addEventListener("modelUpdated",Vt),Y.addEventListener("bodyScroll",()=>Y.stopEditing())),Y==null||Y.sizeColumnsToFit(),Y},Te=(re,Y)=>{if(!r.value)return;const de=r.value.getRowNode(re);de?(r.value.ensureIndexVisible(Number(de.rowIndex),"middle"),r.value.flashCells({rowNodes:[de],flashDuration:3e3,fadeDuration:1e3})):r.value.ensureIndexVisible(g.totalItems-1,"bottom")},Se=async re=>{var de;let Y;if(!(!b.value||!re.trim())){_e.value=!0;try{Y=await b.value.createNewScene({workspaceId:o.workspaceId,entityId:o.entityId,name:re}),g.totalItems<50&&await Bt()}catch(Be){console.error("Error creating new scene:",Be)}finally{_e.value=!1,Y!=null&&Y.id&&n({id:String(Y==null?void 0:Y.id),message:`${re} created successfully`,actions:[{label:"View",variant:"secondary",action:()=>{Te(String(Y==null?void 0:Y.id))}},{label:"Scene Hub",variant:"primary",action:()=>{const Be=gs({type:"scene_hub",config:{ws_code:o.workspaceId,baseDomain:sessionStorage.getItem("URL_BASE")||"app.arbocollab.com",scene_id:String(Y==null?void 0:Y.id)}}).url;window.open(Be,"_blank")},btnIcon:"CustomSceneHub"}],icon:Gle,type:"interactive"}),(de=V.value)==null||de.hide()}}};ht(()=>[o.entityId,o.workspaceId],async([re,Y])=>{if(!(!re||!Y)){_e.value=!0;try{const de=await L(re);d.value=de.data}catch(de){console.error("Failed to initialize metric list:",de),d.value=[]}finally{_e.value=!1}}},{immediate:!0,deep:!0}),ht(P,(re,Y)=>{const de=re.filter(Be=>!(Y!=null&&Y.includes(Be)));de.length>0&&me(Array.from(v.value),de).then(Be=>{R(Be,v.value,de)})},{immediate:!0,deep:!0}),ht(h,(re,Y)=>{f.value=!!(Y&&re&&Y!==re)}),t({refreshTable:Bt});const De=ae(),Oe=()=>{const re=document.documentElement;re.getAttribute("data-theme")==="dark"?(re.setAttribute("data-theme","light"),document.body.dataset.agThemeMode="light"):(re.setAttribute("data-theme","dark"),document.body.dataset.agThemeMode="dark")};return(re,Y)=>(z(),Ze(Z(x4),{"is-sidebar-open":u.value,onCloseSidebar:Z(Ie),onSidebarClear:Z(Ie),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:Z(Ie)},{"header-left":Fe(()=>[ye("h1",{class:W(re.$style.tableTitle)},"Scenes",2),we(Z(tC),{variant:["primary"],options:s,onSelect:$,onHandleClick:Y[1]||(Y[1]=de=>$("new_scene")),id:"create_scene_dropdown"},{prefix:Fe(()=>[we(Z(yt),{id:"create_new_scene",variant:["primary"],onClick:Y[0]||(Y[0]=de=>$("new_scene")),label:"New"})]),_:1}),ye("span",null,mt(Tt.value),1),we(Z(yt),{onClick:Oe},{default:Fe(()=>[...Y[6]||(Y[6]=[pt("Toggle Theme",-1)])]),_:1}),Y[7]||(Y[7]=ye("div",{class:"loading-wrapper",style:{width:"200px",height:"24px"}},null,-1))]),"header-actions":Fe(()=>[we(Z(Jv),{modelValue:c.value,"onUpdate:modelValue":Y[2]||(Y[2]=de=>c.value=de),onSearch:Z(ct),class:W(re.$style.itemSearchBox),onClear:Y[3]||(Y[3]=de=>Z(ct)("")),id:"item_search_box"},null,8,["modelValue","onSearch","class"]),we(Z(ZF),{status:Z(_e)?"busy":"online",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":f.value},{default:Fe(()=>[we(Z(yt),{variant:"secondary",onClick:Bt},{prefix:Fe(()=>[we(Z(ut),{src:"ArrowsRotate"})]),default:Fe(()=>[Y[8]||(Y[8]=pt(" Refresh ",-1))]),_:1})]),_:1},8,["status","show-badge"]),we(Z(bj),{modelValue:Z(D),"onUpdate:modelValue":Y[4]||(Y[4]=de=>$t(D)?D.value=de:null),checkboxColumn:Z(E),id:"table_customization"},null,8,["modelValue","checkboxColumn"])]),grid:Fe(({availableHeight:de})=>[we(Z(tae),vn({id:"item_table_main",ref_key:"agGrid",ref:De},At.value,{height:de+"px",isSorting:Z(te),onOnGridReady:ce,onSelectionChanged:Y[5]||(Y[5]=Be=>a.value=Be.api.getSelectedRows().map(Me=>Me.id))}),null,16,["height","isSorting"])]),footer:Fe(()=>[ye("div",{class:W(re.$style.tableFooter),id:"table_footer"},[ye("div",{class:W(re.$style.footerStart)},[we(Z(ut),{src:"Eye"}),ye("span",null,[Y[9]||(Y[9]=pt(" Visibles: ",-1)),ye("b",null,mt(ee.value.visible),1)])],2),ye("div",{class:W(re.$style.footerStart)},[we(Z(ut),{src:"List"}),ye("span",null,[Y[10]||(Y[10]=pt(" Total: ",-1)),ye("b",null,mt(ee.value.total),1)])],2)],2)]),"new-row":Fe(()=>[we(Z(Dj),{onCreateNewItem:Se,ref_key:"createNewSceneRef",ref:V},null,512)]),"bulk-update-actions":Fe(()=>{var de;return[!u.value&&a.value.length>0?(z(),Ze(Z(m4),{key:0,selectRowData:((de=r.value)==null?void 0:de.getSelectedRows())||[],"workspace-id":o.workspaceId,"entity-id":o.entityId,"grid-api":r.value,onUnselect:Z(nt)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect"])):at("",!0)]}),snackbar:Fe(()=>[we(Z(Cj))]),popup:Fe(()=>[we(Ij,{ref_key:"popupCreateSceneRef",ref:Ye},null,512)]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_8hmh0_1",tableFooter:"_tableFooter_8hmh0_7",footerStart:"_footerStart_8hmh0_17",newRow:"_newRow_8hmh0_25","warning-text":"_warning-text_8hmh0_44","has-error":"_has-error_8hmh0_49",itemSearchBox:"_itemSearchBox_8hmh0_53"}}]]),Wle="0.0.1-alpha.22",zle={key:0},Ule=bt(rt({__name:"app",setup(e){const t=G(()=>n.id.length===0||n.workspaceId.length===0),n=As({id:"",workspaceId:"",apiConfig:{}}),i=kf(),{showMessage:s}=i,o=u=>{var c,d;u.success==!1?s(((d=(c=u.res)==null?void 0:c.data)==null?void 0:d.message)||u.apiCode,"error"):s(u.apiCode,"success")},r=ae(null);Ug(()=>{var u,c,d;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",Wle);try{if(r.value=gi(),!r.value)throw new Error("Current instance is null");n.id=((u=r.value)==null?void 0:u.appContext.config.globalProperties.id)||"",n.workspaceId=((c=r.value)==null?void 0:c.appContext.config.globalProperties.workspaceId)||sessionStorage.getItem("ws.code")||"",n.apiConfig=((d=r.value)==null?void 0:d.appContext.config.globalProperties.apiConfig)||{};const h=new Tk(n.apiConfig);h.on("call-api",o),r.value.appContext.config.globalProperties.apiServices=h}catch(h){console.error("Error getting current instance:",h)}}),ri(()=>{r.value.appContext.config.globalProperties.apiServices.off("call-api",o)});const a=G(()=>n.id),l=G(()=>n.workspaceId);return Yr("workspaceId",l),Yr("entityId",a),(u,c)=>(z(),Ce("div",{class:W(u.$style.dashboardPluginWrapper)},[t.value?(z(),Ce("span",zle," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):a.value?(z(),Ze(Z($le),{key:1,entityId:a.value,workspaceId:l.value},null,8,["entityId","workspaceId"])):at("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),Jw=async(e={},t={})=>{const n=Z0(Ule),i=hj();n.use(i);const s=["apiConfig","workspaceId","id"],o={};return Object.entries(e).forEach(([r,a])=>{a!==void 0&&(n.config.globalProperties[r]=a,o[r]=a,s.includes(r)&&typeof a=="string"?sessionStorage.setItem(r,a):console.error(`[Config Error] Key "${r}" has an invalid value and will not be persisted.`))}),n.config.globalProperties.$arboConfig=o,Object.values(t).forEach(r=>{r&&typeof r.install=="function"&&n.use(r)}),n.config.errorHandler=(r,a,l)=>{console.error("[Vue Error]",r),l&&console.error("[Info]",l)},n};typeof window<"u"&&(window.arboDashboard=Jw),en.default=Jw,en.initDashboard=Jw,Object.defineProperties(en,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbocollab/arbo-plugin-item-table",
3
- "version": "0.0.1-alpha.21",
3
+ "version": "0.0.1-alpha.22",
4
4
  "type": "module",
5
5
  "main": "./lib/index.umd.js",
6
6
  "module": "./lib/index.es.js",