@arbocollab/arbo-plugin-item-table 0.1.241 → 0.1.243
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/es/index.es.js +46 -46
- package/lib/style.css +1 -1
- package/lib/umd/index.umd.js +5 -5
- package/package.json +1 -1
package/lib/umd/index.umd.js
CHANGED
|
@@ -144,7 +144,7 @@ This will fail in production.`);i=du,i._s.has(e)||(s?Fb(e,t,o,i):gA(e,o,i),ee.en
|
|
|
144
144
|
transform: translate(-50%, -50%);
|
|
145
145
|
z-index: ${i};
|
|
146
146
|
display: block;
|
|
147
|
-
`},u=()=>{const p=xv(n),g=e.zIndex?e.zIndex-1:998;if(t.centered&&p){if(r.value=!0,l(p),t.showOverlay){const v=()=>{t.closeOnOverlayClick&&c()};a=AO(t.overlayOpacity,g,v)}}else if(s.value&&(s.value.show(),r.value=!0,t.showOverlay)){const v=()=>{t.closeOnOverlayClick&&c()};a=AO(t.overlayOpacity,g,v)}},c=()=>{const p=xv(n);t.centered&&p?(r.value=!1,p.style.display="none",t.showOverlay&&(uE(a||void 0),a=null)):s.value&&(s.value.hide(),r.value=!1,t.showOverlay&&(uE(a||void 0),a=null))},d=()=>{r.value?c():u()},h=()=>{s.value&&(s.value.destroy(),s.value=null),t.showOverlay&&a&&(uE(a),a=null)},f=()=>{var v;const p=xv(n);if(!p)return;if(p.style.display="none",t.centered){t.showOnInit&&u();return}const g={content:p,placement:t.placement,theme:t.theme,trigger:t.trigger,interactive:t.interactive,appendTo:t.appendTo,arrow:t.showArrow,allowHTML:!0,hideOnClick:!1,popperOptions:{...t.popperOptions,modifiers:[...((v=t.popperOptions)==null?void 0:v.modifiers)||[],{name:"computeStyles",options:{adaptive:!1}}]},onShow(){r.value=!0,p.style.display="block"},onHide(){r.value=!1}};if(t.useTrigger){const w=xv(o);if(!w)return;s.value=tl(w,g)}else{const w=document.createElement("div");w.style.display="none",document.body.appendChild(w),s.value=tl(w,g)}t.showOnInit&&u()};return Xt(()=>{f()}),Vn(()=>{h()}),Qe(()=>t.alwaysShow,p=>{p?u():c()},{immediate:!0}),{popupRef:n,triggerRef:o,instance:s,isVisible:r,show:u,hide:c,toggle:d,destroy:h}}const cE=Ja("permissionStore",()=>{const e=$([]),t=$(),n=$({});return{userPermissions:e,entityPermissions:t,itemPermission:n,setUserPermissions:i=>{e.value=i},setEntityPermissions:i=>{t.value=i},setItemPermission:(i,a)=>{n.value[i]=a}}}),xJ="woohoo_getWoohooUserInterface_read",dE="media_getReviewUserInterface_read",AJ="update_getUpdateUserInterface_read",PO="Unarchive parent folder first to continue",PJ=(e,t,n,o,s,r)=>{const i=cE(),{userPermissions:a}=go(i),l=X(()=>{const T=un.getInstance().getItem("BASE_URL"),F=un.getInstance().getItem("BASE_REVIEW_URL"),{ws_code:L,entity_id:x,scene_id:P}=e.value;return{baseDomain:T||"",ws_code:L||"",entity_id:x||"",scene_id:P||"",reviewDomain:F||"",take_id:x||"",woohoo_id:x||"",parent_id:x||""}}),u=X(()=>{var F;const T=e.value.permissions;return{canOpenSceneHub:!0,canOpenReview:a.value.includes(dE),canCopyLink:!0,canRename:(T==null?void 0:T.has_edit_permission)??!1,canOpenTakeInReview:a.value.includes(dE),canOpenTakeInUpdate:a.value.includes(AJ),canOpenTakeInWoohoo:a.value.includes(xJ),canDeleteRendition:((F=T==null?void 0:T.media)==null?void 0:F.has_delete_rendition_permission)??!1,canDeleteThumbnail:(T==null?void 0:T.has_edit_thumbnail_permission)??!1,canArchiveScene:T==null?void 0:T.has_archive_permission,canUnarchiveScene:T==null?void 0:T.has_archive_permission,canDeleteScene:(T==null?void 0:T.has_delete_permission)??!1,canEditDescription:(T==null?void 0:T.has_edit_permission)??!1}}),c=X(()=>({project:es({type:"project",config:l.value}).url,take_review:es({type:"review_take",config:l.value}).url,review:es({type:"review_scene",config:l.value}).url,review_scene:es({type:"review_scene",config:l.value}).url,woohoo:es({type:"woohoo",config:l.value}).url,update:es({type:"update",config:l.value}).url,scene_hub:es({type:"scene_hub",config:l.value}).url})),d=(T,F)=>{const L=T.metaKey||T.ctrlKey,x=c.value[F]||"";if(x){if(F==="scene_hub"){if(L){window.open(x,"_blank");return}if(!o){console.error("Switch instance not found.",{openSceneHub:o,windowFunc:globalThis.window.$switchInstance});return}o(l.value.scene_id||"");return}L?window.open(x,"_blank"):window.location.href=x}},h=async(T,F)=>{var L;try{const x=await((L=e.value.axiosService.value)==null?void 0:L.deleteRendition({workspaceId:l.value.ws_code,itemIds:[l.value.scene_id||""],deleteAll:!0}));(x==null?void 0:x.message)!="Done"&&console.error("Failed to delete rendition.")}catch(x){console.error("Error deleting rendition",x)}finally{s()}},f=async(T,F)=>{var L;try{await((L=e.value.axiosService.value)==null?void 0:L.deleteThumbnail({workspaceId:l.value.ws_code,itemIds:[l.value.scene_id||""]}))}catch(x){console.error("Error deleting thumbnail",x)}finally{s()}},p=async(T,F)=>{var L;try{const x=await((L=e.value.axiosService.value)==null?void 0:L.archiveScene(l.value.ws_code,l.value.entity_id,[l.value.scene_id]));(x==null?void 0:x.message)!="Done"&&console.error("Failed to archive scene."),F&&F("archived")}catch(x){console.error("Error archiving item",x)}finally{s()}},g=async(T,F)=>{var L;try{const x=await((L=e.value.axiosService.value)==null?void 0:L.deleteScene(l.value.ws_code,l.value.entity_id,l.value.scene_id));(x==null?void 0:x.message)!="Done"&&console.error("Failed to delete scene."),F&&F("deleted")}catch(x){console.error("Error deleting item",x)}finally{s()}},v=T=>{const F=c.value.scene_hub||"";F&&(E.value="Copied",navigator.clipboard.writeText(F),setTimeout(()=>{E.value="Copy link"},5e3))},w=async(T,F)=>{var L;try{const x=await((L=e.value.axiosService.value)==null?void 0:L.unarchiveScene(l.value.ws_code,l.value.entity_id,[l.value.scene_id]));(x==null?void 0:x.message)!="Done"&&console.error("Failed to unarchive scene."),F&&F("unarchived")}catch(x){console.error("Error unarchiving item",x)}finally{s()}},S=T=>p(T,t),b=T=>w(T,t),y=T=>g(T,t),E=$("Copy link"),_=T=>d(T,"review"),I=X(()=>{let T=[];if(!l.value.scene_id&&e.value.optionBlock&&T.push(...e.value.optionBlock),Array.isArray(e.value.optionBlock)&&e.value.optionBlock.length)return e.value.optionBlock;const F=()=>Math.random().toString(36).substring(2,9);return[{id:F(),type:"column",groupLabel:"Download Options",options:[{id:"open_review",label:"Open Review",icon:"PenRuler",action:_,hide:!u.value.canOpenReview,disabled:!u.value.canOpenReview,description:"",type:"icon"},{id:F(),label:E.value,icon:"Link",action:v,hide:!u.value.canCopyLink,disabled:!u.value.canCopyLink,description:"",type:"icon"}]},{id:F(),type:"column",groupLabel:"Download Options",options:[{id:"archive",label:"Archive",icon:"BoxArchive",action:S,hide:u.value.canArchiveScene==0,disabled:u.value.canArchiveScene!==1,description:u.value.canArchiveScene==-1?PO:"",type:"icon"},{id:"unarchive",label:"Unarchive",icon:"BoxArchive",action:b,hide:u.value.canUnarchiveScene==0,disabled:u.value.canUnarchiveScene!==1,description:u.value.canUnarchiveScene===-1?PO:"",type:"icon"},{id:"delete",label:"Delete",icon:"TrashCan",isDanger:!0,description:"Delete permanently",action:y,hide:!u.value.canDeleteScene,type:"icon"}]}]});return{linkMap:c,handleOpen:d,copyLink:v,deleteRendition:h,deleteThumbnail:f,archiveItem:p,deleteItem:g,unArchiveItem:w,options:I}};function xo(e){const t=$(!1),n=$(!1),o=X(()=>{var d;const u=e.value,c=!!u.readOnly;return{readOnly:c,disabled:!!u.disabled,hovered:n.value,focused:t.value,isEmpty:u.empty??!1,error:!!u.error,actived:!!((d=u.active)!=null&&d.value),clickable:c?!1:u.clickable??!1}}),s=()=>{t.value=!0,ht(()=>{const u=l(e.value.inputRef);u==null||u.focus()})},r=()=>{t.value=!1},i=()=>{n.value=!0},a=()=>{n.value=!1},l=u=>{if(!u)return null;const c=u.value||u;return(c instanceof HTMLElement?c:c==null?void 0:c.$el)||null};return Xt(()=>{const u=l(e.value.inputRef),c=l(e.value.wrapperRef);u&&(u.addEventListener("focus",s),u.addEventListener("blur",r)),c&&(c.addEventListener("mouseenter",i),c.addEventListener("mouseleave",a))}),Vn(()=>{const u=l(e.value.inputRef),c=l(e.value.wrapperRef);u&&(u.removeEventListener("focus",s),u.removeEventListener("blur",r)),c&&(c.removeEventListener("mouseenter",i),c.removeEventListener("mouseleave",a))}),{isFocus:t,isHover:n,argsMain:o,handleFocus:s}}const ld=e=>{const t=$(!1),n=X(()=>t.value);return Xt(()=>{var a,l,u,c;const o=(a=e.params)==null?void 0:a.api,s=(l=e.params)==null?void 0:l.node,r=s==null?void 0:s.rowIndex,i=(c=(u=e.params)==null?void 0:u.colDef)==null?void 0:c.field;return o==null||o.addEventListener("cellEditingStarted",d=>{d.rowIndex===r&&d.colDef.field===i&&(t.value=!0)}),o==null||o.addEventListener("cellEditingStopped",d=>{d.rowIndex===r&&d.colDef.field===i&&(t.value=!1)}),{isEditing:n}}),Qe(()=>e,()=>{e.isEditing!==void 0&&(t.value=e.isEditing)}),{isEditing:n}};var fs=(e=>(e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.ALREADY_REPORTED=208]="ALREADY_REPORTED",e[e.IM_USED=226]="IM_USED",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.FOUND=302]="FOUND",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.SWITCH_PROXY=306]="SWITCH_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",e[e.URI_TOO_LONG=414]="URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.TOO_EARLY=425]="TOO_EARLY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.LOOP_DETECTED=508]="LOOP_DETECTED",e[e.NOT_EXTENDED=510]="NOT_EXTENDED",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",e))(fs||{});const Gf=Ja("bulkUpdate",()=>{const e=$(Ft.UNCHECK),t=Fo({loaded:0,total:0}),n=c=>{t.total=c},o=c=>{t.loaded=c},s=Fo({isBulkUpdating:!1});function r(c){s.isBulkUpdating=c}const i=$({}),a=c=>{i.value=c},l=(c,d)=>{i.value[c]=d},u=c=>{e.value=c};return{bulkUpdateState:s,setIsBulkUpdating:r,selectionIds:i,setSelectionIds:a,setCheckedForId:l,setSelectionStatus:u,selectionStatus:e,rowCount:t,setTotalRowCount:n,setLoadedRowCount:o,handelSelectAll:()=>{u(Ft.CHECKED)}}}),kJ={...{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 basic information."},item:{error:"Update failed. Please try again."},removeAssignee:{error:"Update 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_rendition:{error:"Deletion failed. Please try again."},delete_thumbnail:{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:{error:"Deletion failed. Please try again."},bulkArchive:{error:"Archive failed. Please try again."},bulkDateUpdate:{error:"Failed to update items."},bulkAssignUpdate:{error:"Failed to update assignees."},bulkStatusUpdate:{error:"Failed to update items."},getUserPermission:{error:"Failed to fetch user permissions."},getEntityDetail:{error:"Failed to fetch entity details."},bulkUnarchive:{error:"Unarchive failed. Please try again."},downloadTemplate:{},importItems:{},exportItems:{},updateFromFile:{},me:{},workspaces:{},entityUserRoles:{},templateFlowStatuses:{},bulkMetricUpdate:{error:"Update failed. Please try again."},createNewItem:{},getAssignableAssignees:{},getAssignableStatuses:{},getFilterStatuses:{},bulkRename:{},bulkCreate:{}},offline:{error:"You are currently offline. Please check your network connection."}};function kO(e,t,n){return(t=OJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function OJ(e){var t=FJ(e,"string");return typeof t=="symbol"?t:t+""}function Du(e){"@babel/helpers - typeof";return Du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Du(e)}var FO=function(e){return e.TOOLBOX_EXPORT_DATA="TOOLBOX_EXPORT_DATA",e.SW_APP_LOADER="SW_APP_LOADER",e}({});function OO(e){return Du(e)==="object"&&e!==null&&!Array.isArray(e)}function MO(e,t){var n=Object.keys(e);return n.length===t.length&&t.every(function(o){return n.includes(o)})}function MJ(e){return typeof Blob<"u"&&e instanceof Blob}var NJ=function(t){return OO(t)&&MO(t,["file","fileName"])&&MJ(t.file)&&typeof t.fileName=="string"},LJ=function(t){return OO(t)&&MO(t,["scene_id","people_id","openGS","queryParams"])&&(typeof t.scene_id=="string"||t.scene_id===null)&&(typeof t.people_id=="string"||t.people_id===null)&&(typeof t.openGS=="boolean"||t.openGS===null)&&typeof t.queryParams=="string"};Object.freeze(kO(kO({},FO.TOOLBOX_EXPORT_DATA,NJ),FO.SW_APP_LOADER,LJ));let VJ=class extends Error{},dl=class extends VJ{constructor(){super("Zone is an abstract class")}},NO=class{get type(){throw new dl}get name(){throw new dl}get ianaName(){return this.name}get isUniversal(){throw new dl}offsetName(t,n){throw new dl}formatOffset(t,n){throw new dl}offset(t){throw new dl}equals(t){throw new dl}get isValid(){throw new dl}};const hE=new Map;function BJ(e){let t=hE.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),hE.set(e,t)),t}const $J={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function HJ(e,t){const n=e.format(t).replace(/\u200E/g,""),o=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,r,i,a,l,u,c]=o;return[i,s,r,a,l,u,c]}function GJ(e,t){const n=e.formatToParts(t),o=[];for(let s=0;s<n.length;s++){const{type:r,value:i}=n[s],a=$J[r];r==="era"?o[a]=i:Av(a)||(o[a]=parseInt(i,10))}return o}const fE=new Map;let UJ=class UT extends NO{static create(t){let n=fE.get(t);return n===void 0&&fE.set(t,n=new UT(t)),n}static resetCache(){fE.clear(),hE.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=UT.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:o}){return KJ(t,n,o,this.name)}formatOffset(t,n){return kv(this.offset(t),n)}offset(t){if(!this.valid)return NaN;const n=new Date(t);if(isNaN(n))return NaN;const o=BJ(this.name);let[s,r,i,a,l,u,c]=o.formatToParts?GJ(o,n):HJ(o,n);a==="BC"&&(s=-Math.abs(s)+1);const h=jJ({year:s,month:r,day:i,hour:l===24?0:l,minute:u,second:c,millisecond:0});let f=+n;const p=f%1e3;return f-=p>=0?p:1e3+p,(h-f)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}},pE=null,WJ=class bg extends NO{static get utcInstance(){return pE===null&&(pE=new bg(0)),pE}static instance(t){return t===0?bg.utcInstance:new bg(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new bg(VO(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${kv(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${kv(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return kv(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}};function Av(e){return typeof e>"u"}function Pv(e,t=2){const n=e<0;let o;return n?o="-"+(""+-e).padStart(t,"0"):o=(""+e).padStart(t,"0"),o}function LO(e){if(!(Av(e)||e===null||e===""))return parseInt(e,10)}function zJ(e){if(!(Av(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function jJ(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function KJ(e,t,n,o=null){const s=new Date(e),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};o&&(r.timeZone=o);const i={timeZoneName:t,...r},a=new Intl.DateTimeFormat(n,i).formatToParts(s).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function VO(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const o=parseInt(t,10)||0,s=n<0||Object.is(n,-0)?-o:o;return n*60+s}function kv(e,t){const n=Math.trunc(Math.abs(e/60)),o=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${Pv(n,2)}:${Pv(o,2)}`;case"narrow":return`${s}${n}${o>0?`:${o}`:""}`;case"techie":return`${s}${Pv(n,2)}${Pv(o,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}const BO=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ud(...e){const t=e.reduce((n,o)=>n+o.source,"");return RegExp(`^${t}$`)}function cd(...e){return t=>e.reduce(([n,o,s],r)=>{const[i,a,l]=r(t,s);return[{...n,...i},a||o,l]},[{},null,1]).slice(0,2)}function $O(...e){return(t,n)=>{const o={};let s;for(s=0;s<e.length;s++)o[e[s]]=LO(t[n+s]);return[o,null,n+s]}}const HO=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,qJ=`(?:${HO.source}?(?:\\[(${BO.source})\\])?)?`,GO=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,UO=RegExp(`${GO.source}${qJ}`),gE=RegExp(`(?:[Tt]${UO.source})?`),YJ=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,XJ=/(\d{4})-?W(\d\d)(?:-?(\d))?/,ZJ=/(\d{4})-?(\d{3})/,JJ=$O("weekYear","weekNumber","weekDay"),QJ=$O("year","ordinal"),eQ=/(\d{4})-(\d\d)-(\d\d)/,WO=RegExp(`${GO.source} ?(?:${HO.source}|(${BO.source}))?`),tQ=RegExp(`(?: ${WO.source})?`);function dd(e,t,n){const o=e[t];return Av(o)?n:LO(o)}function nQ(e,t){return[{year:dd(e,t),month:dd(e,t+1,1),day:dd(e,t+2,1)},null,t+3]}function hd(e,t){return[{hours:dd(e,t,0),minutes:dd(e,t+1,0),seconds:dd(e,t+2,0),milliseconds:zJ(e[t+3])},null,t+4]}function Uf(e,t){const n=!e[t]&&!e[t+1],o=VO(e[t+1],e[t+2]),s=n?null:WJ.instance(o);return[{},s,t+3]}function Wf(e,t){const n=e[t]?UJ.create(e[t]):null;return[{},n,t+1]}ud(YJ,gE),ud(XJ,gE),ud(ZJ,gE),ud(UO),cd(nQ,hd,Uf,Wf),cd(JJ,hd,Uf,Wf),cd(QJ,hd,Uf,Wf),cd(hd,Uf,Wf),cd(hd),ud(eQ,tQ),ud(WO),cd(hd,Uf,Wf);var Mo=function(e){return e.review="{reviewDomain}/{ws_code}",e.review_take="{reviewDomain}/{ws_code}?id={take_id}",e.review_scene="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&tab=iteration",e.review_rendition="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}",e.review_frame="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}&tab=comment&refresh_marker=true#type=frame&data={frame}",e.review_rendition_comment="{reviewDomain}/{ws_code}?scene_id={scene_id}&rendition_id={rendition_id}&comment_id={comment_id}&tab=comment",e.review_comment="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&comment_id={comment_id}",e.scene_hub="{baseDomain}/{ws_code}/{scene_id}?o=st",e.hub_rendition="{baseDomain}/{ws_code}/{scene_id}?o=st&renditionId={rendition_id}",e.hub_comment="{baseDomain}/{ws_code}/{scene_id}?o=st&comment_id={comment_id}",e.people_insight="{baseDomain}/{ws_code}/{user_id}?o=pt",e.people_detail="{baseDomain}/{ws_code}/ws/ppl/{display_name}-{user_id}",e.project="{baseDomain}/{ws_code}/pl/dir/{entity_id}",e.project_focusMode="{baseDomain}/{ws_code}/pl/dir/{parent_id}?f={entity_id}",e.woohoo="{baseDomain}/{ws_code}/pl/woo/rpt/{woohoo_id}",e.update="{baseDomain}/{ws_code}/pl/au?id={entity_id}",e.core="{baseDomain}/{ws_code}",e}(Mo||{});Mo.review,Mo.review_take,Mo.review_scene,Mo.review_rendition,Mo.review_frame,Mo.review_rendition_comment,Mo.review_comment,Mo.scene_hub,Mo.hub_rendition,Mo.hub_comment,Mo.people_insight,Mo.people_detail,Mo.project,Mo.woohoo,Mo.update,Mo.core,Mo.project_focusMode;var mE=null;function oQ(e){mE=e}function Fv(){if(!mE)throw new Error("i18n instance not set. Call setI18nInstance(i18n) before using errorHelper.");return mE}function Ov(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function zO(){try{var e=sessionStorage.getItem("APP_DEBUG")?"✅":"",t=Fv();return"".concat(Ov(t.t("errorMessages.fallback.unknownError"))," ").concat(e)}catch{return"An error occurred. Please try again or contact support."}}function sQ(e,t,n,o){var s=e.replace(/{field}/g,t);if(o&&Du(o)==="object")Object.keys(o).forEach(function(i){var a="{".concat(i,"}"),l=o[i];Array.isArray(l)?l=l.join(", "):i==="value"&&(o.min||o.max)&&(l="".concat(o.min||o.value," and ").concat(o.max||o.value)),s=s.replace(new RegExp(a,"g"),l||"")});else if(Array.isArray(n)&&n.length>0){var r=n[0]||"";n.length>1?r="".concat(n[0]," and ").concat(n[1]):n.length===1&&Array.isArray(n[0])&&(r=n[0].join(", ")),s=s.replace(/{value}/g,r)}return s}function rQ(e,t){for(var n=Object.keys(t),o=0,s=n;o<s.length;o++){var r=s[o],i=Array.isArray(t[r])?t[r].join(", "):String(t[r]);e=e.replace(new RegExp("\\{".concat(r,"\\}"),"g"),i)}if(n.length>0&&e.includes("{value}")){var a=t[n[0]],l=Array.isArray(a)?a.join(", "):String(a);e=e.replace(/{value}/g,l)}return e}function jO(e){return!!(e&&e.validation&&e.validation.fields&&Object.keys(e.validation.fields).length>0)}function KO(e,t){if(!e||Du(e)!=="object")return null;try{var n=Fv();if(e.validation&&e.validation.fields)for(var o=e.validation.fields,s=Object.keys(o),r=0,i=s;r<i.length;r++){var a=i[r],l=o[a];if(l&&l.rule){var u=l.rule,c=l.data||[],d=l.params||{};try{var h,f,p=((h=n.messages)===null||h===void 0?void 0:h.value)||n.messages,g=((f=n.locale)===null||f===void 0?void 0:f.value)||n.locale,v=null;if(t){var w,S=t.toUpperCase();v=(w=p[g])===null||w===void 0||(w=w.errorMessages)===null||w===void 0||(w=w[S])===null||w===void 0||(w=w.validation_rules)===null||w===void 0?void 0:w[u]}if(!v){var b;v=(b=p[g])===null||b===void 0||(b=b.errorMessages)===null||b===void 0||(b=b.GEN)===null||b===void 0||(b=b.validation_rules)===null||b===void 0?void 0:b[u]}if(v&&typeof v=="string")return Ov(sQ(v,a,c,d))}catch(y){console.error("Error in validation rules",y)}}}}catch(y){return console.error("Error in getValidationErrorMessage:",y),null}return null}function qO(e){var t=sessionStorage.getItem("APP_DEBUG")?"✅":"";if(!e)return zO();var n=e.code,o=e.error,s=e.details,r=e.message;if(jO(s)&&s){var i=KO(s,o==null?void 0:o.type);if(sessionStorage.getItem("APP_DEBUG")&&console.log("[Error Utils Debug]",i),i)return n!==""?"[".concat(n,"] ").concat(i," ").concat(t):"".concat(i);try{var a=Fv();return Ov(a.t("errorMessages.GEN.validation_error"))}catch{return"Validation error occurred."}}if(o&&Du(o)==="object"&&o.type&&o.key){var l=o.type.toUpperCase();try{var u,c,d,h="errorMessages.".concat(l,".").concat(o.key),f=Fv(),p=((u=f.messages)===null||u===void 0?void 0:u.value)||f.messages,g=((c=f.locale)===null||c===void 0?void 0:c.value)||f.locale,v=(d=p[g])===null||d===void 0||(d=d.errorMessages)===null||d===void 0||(d=d[l])===null||d===void 0?void 0:d[o.key];if(v&&typeof v=="string"){var w=v;return s!=null&&s.context&&(w=rQ(w,s.context),sessionStorage.getItem("APP_DEBUG")&&console.log("[Error Utils Debug]",w)),w=Ov(w),n!==""?"[".concat(n,"] ").concat(w," ").concat(t):"".concat(w," ").concat(t)}}catch(b){console.error("[Error Utils Debug]",b)}}if(o&&Du(o)!=="object"&&jO(s)){var S=KO(s);if(S)return n!==""?"[".concat(n,"] ").concat(S," ").concat(t):"".concat(S," ").concat(t)}return r?"".concat(r):zO()}const Rs=Ja("toast",()=>{const e=u=>qO(u),t=u=>{var c;if((u==null?void 0:u.apiCode)==="offline")r({id:"offline",type:"error",message:"You are currently offline. Please check your network connection."});else{const d=qO((c=u==null?void 0:u.res)==null?void 0:c.data);r({id:u==null?void 0:u.apiCode,type:"error",message:d})}},n=$([]),o=(u,c)=>{const d=kJ[u];if(d){const h=d[c];if(h){r({id:u,type:c,message:h});return}}else r({id:u,type:c,message:u})},s=new Map,r=(u,c=5e3)=>{const d={...u,id:u.id??Date.now()+Math.random()};if(n.value.push(d),c>0){const h=Date.now(),f=setTimeout(()=>{i(d.id),s.delete(d.id)},c);s.set(d.id,{timeoutId:f,remainingTime:c,startTime:h})}};function i(u){n.value=n.value.filter(d=>d.id!==u);const c=s.get(u);c&&(clearTimeout(c.timeoutId),s.delete(u))}function a(u){const c=s.get(u);if(c){clearTimeout(c.timeoutId);const d=Date.now()-c.startTime;c.remainingTime=Math.max(0,c.remainingTime-d)}}function l(u){const c=s.get(u);if(c&&c.remainingTime>0){const d=setTimeout(()=>{i(u),s.delete(u)},c.remainingTime);c.timeoutId=d,c.startTime=Date.now()}}return{notifications:n,addNotification:r,removeNotification:i,showMessage:o,showErrorNetMessage:t,pauseAutoDismiss:a,resumeAutoDismiss:l,getErrorMessageFromResponse:e}}),vE=Ja("sortStore",()=>{const e=$({}),t=$(void 0),n={id:"id",name:"name",isStated:"actual_start_date",isCompleted:"actual_due_date",lastUpdated:"updated_at",completedOn:"actual_due_date",status:"template_flow_status",assignees:"assignee"},o={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"}};return{sortingAPIConfiguration:X(()=>{const u=e.value;return Object.values(u).filter(d=>d.sort!=="none"&&!!d.sort).map(d=>{let h;switch(d.colId){case"dateRange":h=o[d.sort];break;default:if(d.colId.includes("metric")){const[f,p]=d.colId.split("_");h={column:f,direction:d.sort,type:p}}else h={column:n[d.colId]||d.colId,direction:d.sort};break}return h})}),sorts:e,setSort:(u,c)=>{e.value={[u]:{colId:u,sort:c}}},clearSorting:()=>{e.value={}},isSortingRunning:$(!1),defaultSortStorePreferences:t,setDefaultSort:u=>{t.value=u}}}),yE=10,wE=5,Ei={number:{first:"000",step:"1"},letter:{first:"A",step:"1"}},YO={up:{first:"Start at",step:"Increase by"},down:{first:"End at",step:"Decrease by"}},iQ=/^[0-9]$/,aQ=/^[A-Za-z]$/,XO=(e,t)=>t==="first"&&e==="letter"?aQ:iQ,ZO=(e,t,n)=>XO(e,t).test(n),lQ=e=>e==="first"?yE:wE,uQ=e=>e&&e[0]===e[0].toLowerCase()?e.toLowerCase():e.toUpperCase(),JO=(e,t,n)=>{const o=XO(e,t),s=Array.from(n).filter(r=>o.test(r)).join("").slice(0,lQ(t));return t==="first"&&e==="letter"?uQ(s):s},Mv=(e,t)=>t!==""&&(e==="first"||Number(t)>0),cQ=e=>Array.from(e.toUpperCase()).reduce((t,n)=>t*26+(n.charCodeAt(0)-64),0),dQ=e=>{let t="",n=e;for(;n>0;){const o=(n-1)%26;t=String.fromCharCode(65+o)+t,n=Math.floor((n-1)/26)}return t},CE=({type:e,direction:t,first:n,step:o,count:s})=>{const r=Number(o)||1,i=u=>(t==="up"?u:s-1-u)*r;if(e==="number"){const u=Number(n);return Array.from({length:s},(c,d)=>String(u+i(d)).padStart(n.length,"0"))}const a=cQ(n),l=n!==""&&n[0]===n[0].toLowerCase();return Array.from({length:s},(u,c)=>{const d=dQ(a+i(c));return l?d.toLowerCase():d})},hQ="Your update is queued. Reload the table later to see the changes.",bE="Update failed.",fQ=new Set(["bulkDelete","bulkArchive","bulkUnarchive","bulkDateUpdate","bulkAssignUpdate","bulkStatusUpdate","bulkMetricUpdate","bulkRename","removeAssignee","delete_thumbnail","delete_rendition"]),pQ=(e,t,n)=>{const o=e.getRowNode(t);o&&o.setData({...o.data,...n})},gQ=(e,{currentName:t,counterValue:n})=>e.map(o=>{switch(o.type){case"text":return o.value;case"current_name":return t;case"counter":return n;default:return""}}).join(""),mQ=(e,t)=>{const n=e.find(o=>o.type==="counter");return n?CE({type:n.format,direction:n.direction==="asc"?"up":"down",first:n.value,step:n.step,count:t}):[]},QO=(e,t,n)=>Rs().addNotification({id:n,type:e,message:t}),vQ=(e,t,n={})=>{const o=Gf(),{selectionStatus:s}=go(o),{sortingAPIConfiguration:r}=go(vE()),i=X(()=>s.value===Ft.CHECKED),a=X(()=>e.selectRowData.map(se=>se.id)),l=X(()=>e.selectRowData.length>0),{apiServices:u}=so(!1,e),c=Dn("filterParams",void 0),d=X(()=>({workspaceId:String(e.workspaceId),itemIds:l.value&&i.value?[]:a.value,entityId:e.entityId,filterParams:c!=null&&c.value?c.value:void 0})),h=$(!0),f=$(!1);let p=null;const g=se=>{var A,j;if(!se.apiCode||!fQ.has(se.apiCode))return;const Z=(A=se.res)==null?void 0:A.data;p={success:se.success,status:(j=se.res)==null?void 0:j.status,data:typeof Z=="object"&&Z!==null?Z:void 0,error:se.error}};Qe(u,(se,Z)=>{Z==null||Z.off("call-api",g),se==null||se.on("call-api",g)},{immediate:!0}),Vn(()=>{var se;return(se=u.value)==null?void 0:se.off("call-api",g)}),Qe(()=>e.selectRowData,()=>{h.value=!1},{deep:!0,immediate:!0});const v=()=>{p=null},w=se=>{var xe,ue;const Z=p,A=Z==null?void 0:Z.data,j=(Z==null?void 0:Z.error)??se,ne=(A==null?void 0:A.message)??((ue=(xe=j==null?void 0:j.response)==null?void 0:xe.data)==null?void 0:ue.message),ge=typeof ne=="string"&&ne.trim()?ne:bE;QO("error",ge,"bulk-update-error")},S=(se,Z,A,j)=>{se.length!==0&&(se.forEach(ne=>{const ge=Z.getRowNode(ne);ge&&ge.setData({...ge.data,...A})}),Z.refreshCells({...j.length>0?{columns:j}:{},force:!0}))},b=se=>{const Z=e.gridApi;if(Z){if(i.value){Z.deselectAll();return}se.forEach(A=>{var j;return(j=Z.getRowNode(A))==null?void 0:j.setSelected(!1)})}},y=({ids:se,apply:Z,columns:A,isDelete:j=!1})=>{var Y;let ne=se;se.length==0&&(ne=e.selectRowData.map(re=>re.id)??[]),console.log("Finishing bulk action for ids:",{ids:ne,columns:A,isDelete:j,selectedRows:e.selectRowData,lastOutcome:p});const ge=p;if((ge==null?void 0:ge.status)!==fs.ACCEPTED){Z(),j&&b(ne);return}QO("white",hQ,"bulk-update-queued");const xe=(Y=ge.data)==null?void 0:Y.bulk_process;let ue;typeof(xe==null?void 0:xe.state)=="number"?ue=xe.state:ue=j?0:1;const K=e.gridApi;K&&(ne.forEach(re=>pQ(K,re,{isProcessing:{state:ue,message:typeof(xe==null?void 0:xe.message)=="string"?xe.message:""}})),K.refreshCells({columns:[...A,"name"],force:!0})),(j||ue==0)&&b(ne)},E=async({request:se,apply:Z,columns:A,isDelete:j=!1})=>{var xe,ue,K;const ne=a.value,ge=e.gridApi;if(!ge){console.error("Grid API is not available for bulk action.");return}v();try{const Y=se();if(!Y)throw new Error("Bulk update service is unavailable.");await Y}catch(Y){console.error("Bulk action failed:",Y),w(Y),(xe=t.value)==null||xe.open();return}if((p==null?void 0:p.success)===!1){const Y=p.error??new Error(bE);console.error("Bulk action failed:",Y),w(Y),(ue=t.value)==null||ue.open();return}y({ids:ne,columns:A,isDelete:j,apply:()=>Z(ne,ge)}),(K=t.value)==null||K.hide()},_=({itemIds:se,data:Z,isUpdateAll:A})=>{let j=se;A&&(console.log("Bulk update for all items with data:",Z),j=a.value),console.log("Handling bulk update for status with itemIds:",j,"and data:",Z);const ne=e.gridApi;if(!ne){console.error("Grid API is undefined");return}y({ids:j,columns:["status"],apply:()=>{S(j,ne,{status:Z},["status"])}})},I=({itemIds:se,data:Z})=>{var j;const A=e.gridApi;if(!A){console.error("Grid API is undefined");return}y({ids:se,columns:["dateRange","name"],apply:()=>{let ne=se;console.log("Applying bulk date update for itemIds:",se,"with data:",Z),(!se||se.length===0)&&(console.warn("No itemIds provided for bulk date update."),ne=e.selectRowData.map(ge=>ge.id)),ne.forEach(ge=>{const xe=A.getRowNode(ge);if(xe){const ue=[...xe.data.dateRange||[null,null]];"startDate"in Z&&Z.startDate!==void 0&&(ue[0]=Z.startDate?new Date(Z.startDate):null),"dueDate"in Z&&Z.dueDate!==void 0&&(ue[1]=Z.dueDate?new Date(Z.dueDate):null),xe.setData({...xe.data,dateRange:ue})}})}}),(j=n.onUpdated)==null||j.call(n)},T=se=>{var ne;const Z=e.gridApi,{id:A,value:j}=se;if(!Z){console.error("Grid API is undefined");return}y({ids:a.value,columns:[`metric_${A}`,"name"],apply:()=>{S(a.value,Z,{[`metric_${A}`]:j},[`metric_${A}`])}}),(ne=n.onUpdated)==null||ne.call(n)},F=se=>{const{assignees:Z,type:A}=se,j=e.gridApi;if(!j){console.error("Grid API is not available for bulk update.");return}const ne=new Set(Z.map(xe=>xe.id)),ge=xe=>{const ue=j.getRowNode(xe);if(!ue)return;const K=ue.data.assignees||[];let Y=[];switch(A){case"add":{const re=new Set(K.map(R=>R.id));Y=[...K,...Z.filter(R=>!re.has(R.id))];break}case"overwrite":Y=Z;break;case"remove":Y=K.filter(re=>!ne.has(re.id));break;case"removeAll":Y=[];break}ue.setData({...ue.data,assignees:Y})};y({ids:a.value,columns:["assignees","name"],apply:()=>a.value.forEach(ge)})},L=()=>E({request:()=>{var se;return(se=u.value)==null?void 0:se.bulkDeleteItems(d.value)},isDelete:!0,columns:["name"],apply:(se,Z)=>S(se,Z,{isDeleted:!0,disabled:!0,isProcessing:{state:0,message:""}},[])}),x=()=>E({request:()=>{var se;return(se=u.value)==null?void 0:se.bulkUnarchiveItems(d.value)},columns:["name"],apply:(se,Z)=>S(se,Z,{isArchived:!1},["name"])}),P=()=>E({request:()=>{var se;return(se=u.value)==null?void 0:se.bulkArchiveItems(d.value)},columns:["name"],apply:(se,Z)=>S(se,Z,{isArchived:!0},["name"])}),k=()=>E({request:()=>{var se;return(se=u.value)==null?void 0:se.deleteThumbnail(d.value)},columns:["thumbnail"],apply:(se,Z)=>S(se,Z,{thumbnail:null},["thumbnail"])}),M=()=>E({request:()=>{var se;return(se=u.value)==null?void 0:se.deleteRendition(d.value)},columns:["name"],apply:(se,Z)=>S(se,Z,{},["name"])}),N=()=>{v(),h.value=!0},B=se=>{console.trace("Bulk update response:",se),ht(()=>{h.value=!1})},z=()=>{w(),B({})},oe=(se,Z)=>{const A=new Map(e.selectRowData.map(ne=>[ne.id,ne.name||""])),j=mQ(se,Z.length);return Z.map((ne,ge)=>{const xe=A.get(ne)??"",ue=gQ(se,{currentName:xe,counterValue:j[ge]??""});return{id:ne,from:xe,to:ue}})},ie=()=>{const se=e.gridApi;return se==null?[]:e.selectRowData.map((Z,A)=>{var j;return{id:Z.id,rowIndex:((j=se.getRowNode(Z.id))==null?void 0:j.rowIndex)??A}}).sort((Z,A)=>Z.rowIndex-A.rowIndex).map(({id:Z})=>Z)};return{apiServices:u,selectionStatus:s,isSelectAll:i,selectedIds:a,isBulkUpdate:l,isUpdating:h,isLoading:f,handleUpdateStart:N,handleUpdatePostUpdate:B,handleUpdateFailed:z,handleUpdateBulkStatus:_,handleUpdateBulkDate:I,handleBulkUpdateMetric:T,handleUpdateNewAssignee:F,handleDelete:L,handleArchive:P,handleUnarchive:x,deleteThumbnail:k,deleteRendition:M,handleBulkUpdateName:async se=>{var xe;if(!e.workspaceId||!e.entityId)return;const Z=ie(),A={item_ids:Z,segments:se},j=r.value;i.value&&(delete A.item_ids,A.entity_id=e.entityId),A.sort_by=j;const ne={workspaceId:e.workspaceId,entityId:e.entityId,payload:A,filter:c!=null&&c.value?c.value:void 0},ge=oe(se,Z);v(),h.value=!0,f.value=!0;try{const ue=(xe=u.value)==null?void 0:xe.bulkRename(ne);if(!ue)throw new Error("Bulk update service is unavailable.");if(await ue,(p==null?void 0:p.success)===!1){w(p.error??new Error(bE));return}}catch(ue){w(ue);return}finally{h.value=!1,f.value=!1}y({ids:Z,columns:["name"],apply:()=>{var K;const ue=e.gridApi;ue&&(ge.forEach(({id:Y,to:re})=>{var R;return(R=ue.getRowNode(Y))==null?void 0:R.setDataValue("name",re)}),(K=n.onRefreshSelectedRow)==null||K.call(n))}})}}},eM=_t(ot({__name:"StatusBadge",props:{size:{default:16},color:{default:"#02C39A"},label:{default:""},status:{default:void 0},statusTooltip:{default:"Online"},showBadge:{type:Boolean,default:!0},loading:{type:Boolean}},setup(e){const t=$s,{triggerRef:n,popupRef:o}=vo({toggleOnClick:!0,trigger:"mouseenter focus",theme:"dark",placement:"right",arrow:!0}),s=X(()=>{switch(r.status){case"active":return"#02C39A";case"offline":return"#808080";case"busy":return"#ff0000";case"away":return"#F7941D";default:return"transparent"}}),r=e;return(i,a)=>(q(),de("div",{class:le(i.$style["status-badge-wrapper"]),style:hn({"--badge-size":`${r.size}px`,"--badge-color":s.value})},[kt(i.$slots,"default"),ze(Se("div",{class:le(i.$style["badge-indicator"]),ref_key:"triggerRef",ref:n},null,2),[[dr,r.showBadge],[V(t),{isLoading:r.loading,fullwidth:!0}]]),Se("div",{ref_key:"popupRef",ref:o,class:le(i.$style["badge-tooltip"])},at(r.statusTooltip),3)],6))}}),[["__cssModules",{$style:{"status-badge-wrapper":"_status-badge-wrapper_30ykl_1","badge-indicator":"_badge-indicator_30ykl_6",active:"_active_30ykl_19",offline:"_offline_30ykl_22",busy:"_busy_30ykl_25",away:"_away_30ykl_28","badge-tooltip":"_badge-tooltip_30ykl_32"}}]]),fd=Ja("switchStore",()=>{const e=$(null),t=Dn("switchInstance");return{openSceneHub:(s,r)=>{if(s){if(!t)throw console.error("Switch instance not found"),new Error("Switch instance not found");r?t("scene_hub",{id:s,commentId:r},{showLoading:!1}):t("scene_hub",{id:s,tab:"home"},{showLoading:!1})}},openPeopleInsight:s=>{if(!s){console.error("No people_id provided, defaulting to empty string");return}const r=t||e.value;if(!r)console.error("Switch instance not found");else if(window.switchApploader)window.switchApploader("people_insight",{tab:"home",id:s||""},{showLoading:!1});else throw console.error("Switch instance not found and switchApploader is not available"),new Error("Switch instance not found and switchApploader is not available");r("people_insight",{tab:"home",id:s||""},{showLoading:!1})},switchInstanceFunc:e}}),yQ=ot({__name:"MiniPeopleCard",props:{user:{},status:{default:void 0},timezone:{default:Cv()},userConfig:{default:()=>({size:96,isUseShortLabel:!0,bgColor:"#E0E0E0",color:"#757575",isMe:!1})},showInsightButton:{type:Boolean,default:!0},showCopyLinkButton:{type:Boolean,default:!0},apiUpdateFunction:{type:Function,default:void 0},refreshInterval:{default:3e4},enableAutoRefresh:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},private:{type:Boolean,default:!1},showPrivateUser:{type:Boolean,default:!1},switchInstance:{type:Function,default:void 0}},emits:["insightClick","copyLink","dataUpdated"],setup(e,{emit:t}){const n=Kt,o=$s,s=e,r=t,i={active:"Active in the workspace in the last 10 minutes.",offline:"Logged out from account.",busy:"User is busy",away:"No activity in the workspace within the last 10 minutes"},a=$(new Date),l=$(!0),u=$(!1),c=$(!1),d=$(null);let h=null,f=null;const p=fd(),{openPeopleInsight:g}=p,v=X(()=>!s.private&&!u.value),w=X(()=>{var B,z;return((B=d.value)==null?void 0:B.display_name)??((z=s.user)==null?void 0:z.name)}),S=X(()=>{var B,z;return!v.value||!d.value?s.status:(B=d.value.private_info)!=null&&B.is_offline?"offline":(z=d.value.private_info)!=null&&z.last_active?"active":"away"}),b=X(()=>{var B;return!!((B=d.value)!=null&&B.private_info)}),y=X(()=>{const B=S.value;return B?i[B]:""}),E=X(()=>{var B,z;return((z=(B=d.value)==null?void 0:B.private_info)==null?void 0:z.timezone)??s.timezone}),_=X(()=>{if(!E.value)return"";try{return a.value.toLocaleTimeString("en-US",{timeZone:E.value,hour:"numeric",minute:"2-digit",hour12:!0})}catch{return console.error("Invalid timezone:",E.value),""}}),I=X(()=>{var B,z,oe;return{id:s.user.id,name:w.value,initial:((B=d.value)==null?void 0:B.initial)??s.user.initial,profile_image:((z=d.value)==null?void 0:z.profile_image)??s.user.profile_image,color:((oe=d.value)==null?void 0:oe.color)??s.user.color,size:72,borderRadius:"8px"}}),T=X(()=>{const B=un.getInstance().getItem("BASE_URL"),z=un.getInstance().getItem("ws.code")||"";return es({type:"people_insight",config:{ws_code:z,baseDomain:B,user_id:s.user.id}}).url}),{copyToClipboard:F,tooltip:L}=IO(T.value,()=>r("copyLink",s.user.id)),x=async()=>{if(!s.apiUpdateFunction){l.value=!1;return}try{const B=await s.apiUpdateFunction(s.user.id);B?(d.value=B,r("dataUpdated",B)):(u.value=!0,c.value=!0,r("dataUpdated",null))}catch(B){u.value=!0,c.value=!0,console.error("Failed to fetch user data:",B)}finally{l.value=!1}},P=()=>{k(),s.apiUpdateFunction&&s.enableAutoRefresh&&(f=setInterval(x,s.refreshInterval))},k=()=>{f!==null&&(clearInterval(f),f=null)},M=B=>{var z;if(B.ctrlKey||B.metaKey){window.open(T.value,"_blank");return}try{g(String(s.user.id))}catch{s.switchInstance?(z=s.switchInstance)==null||z.call(s,"people_insight",{tab:"home",id:s.user.id||""},{showLoading:!1}):window.open(T.value,"_blank")}},N=B=>{M(B),r("insightClick",s.user.id)};return Qe([()=>s.enableAutoRefresh,()=>s.refreshInterval,()=>s.apiUpdateFunction],P),Xt(async()=>{h=setInterval(()=>{a.value=new Date},1e4),s.apiUpdateFunction?(await x(),P()):l.value=!1}),nu(()=>{h&&clearInterval(h),k()}),(B,z)=>s.showPrivateUser&&(s.private||c.value)?(q(),de("div",{key:0,class:le([B.$style["info-row"],B.$style["private-badge"]])},[...z[0]||(z[0]=[Se("span",null,"Private User",-1)])],2)):(q(),de("div",{key:1,class:le([B.$style["mini-people-card"],{[B.$style.loading]:l.value},"bg-skeleton"])},[Se("div",{class:le(B.$style["avatar-section"])},[v.value&&b.value?(q(),je(eM,{key:0,size:12,status:S.value,loading:l.value,"status-tooltip":y.value},{default:we(()=>[ye(Ef,jt({readOnly:!0},I.value),null,16)]),_:1},8,["status","loading","status-tooltip"])):(q(),je(Ef,jt({key:1,readOnly:!0},I.value),null,16))],2),Se("div",{class:le(B.$style["user-info"])},[Se("div",{class:le(B.$style["info-column"])},[ze((q(),de("span",{class:le(B.$style["user-name"])},[tt(at(w.value),1)],2)),[[V(n),{content:w.value,delay:[1e3,0]}]]),E.value&&v.value&&b.value?(q(),de("div",{key:0,class:le([B.$style["info-row"],B.$style["time-row"]])},[ze((q(),de("div",{class:le(B.$style["time-display"])},[ye(gt,{source:"remote",src:"Globe",class:le(B.$style["clock-icon"]),size:"10"},null,8,["class"]),Se("span",{class:le(B.$style["time-text"])},at(_.value)+" ("+at(E.value)+")",3)],2)),[[V(o),{isLoading:l.value,fullwidth:!0}]])],2)):Ye("",!0)],2),!e.readOnly&&v.value?(q(),de("div",{key:0,class:le([B.$style["info-row"],B.$style.actions])},[e.showInsightButton&&b.value?(q(),je(St,{key:0,label:"Insights",variant:"secondary",size:"small",onClick:Ht(N,["prevent","stop"]),disabled:s.disabled},null,8,["disabled"])):Ye("",!0),e.showCopyLinkButton&&b.value?ze((q(),je(St,{key:1,variant:["icon","secondary"],size:"small",onClick:Ht(V(F),["prevent","stop"]),disabled:s.disabled},{default:we(()=>[ye(gt,{source:"remote",src:"Link"})]),_:1},8,["onClick","disabled"])),[[V(n),{content:V(L),contentClass:["extra-padding"],hideOnClick:!1,delay:[300,0]}]]):Ye("",!0)],2)):Ye("",!0)],2)],2))}}),wQ=_t(yQ,[["__cssModules",{$style:{"mini-people-card":"_mini-people-card_ign8a_1",loading:"_loading_ign8a_25","avatar-section":"_avatar-section_ign8a_28","user-info":"_user-info_ign8a_33","info-column":"_info-column_ign8a_42","info-row":"_info-row_ign8a_50","time-row":"_time-row_ign8a_56","time-display":"_time-display_ign8a_62","time-text":"_time-text_ign8a_70",actions:"_actions_ign8a_79","user-name":"_user-name_ign8a_83","v-enter-active":"_v-enter-active_ign8a_103","v-leave-active":"_v-leave-active_ign8a_104","v-enter-from":"_v-enter-from_ign8a_108","v-leave-to":"_v-leave-to_ign8a_109"}}]]),CQ=_t(ot({name:"MoreOption",__name:"MoreOption",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean}},setup(e,{expose:t}){const n=Io,o=Kt,s=e,{isEditing:r}=ld(s),i=()=>{var h,f;const c=(h=s.params)==null?void 0:h.api,d={rowIndex:(f=c==null?void 0:c.getRowNode(String(s.id)))==null?void 0:f.rowIndex,colKey:"options"};c==null||c.startEditingCell(d)},a=X(()=>{var d,h;const c=(h=(d=s.params)==null?void 0:d.api)==null?void 0:h.getRowNode(String(s.id));return((c==null?void 0:c.rowIndex)??0)+10}),l=()=>{var c,d;(d=(c=s.params)==null?void 0:c.api)==null||d.stopEditing()},u=$();return t({focus(){var c;(c=u.value)==null||c.focus()},blur(){var c;(c=u.value)==null||c.blur()}}),(c,d)=>ze((q(),je(St,{class:le(c.$style.btnMoreOptions),variant:["secondary","icon"],size:"small",actived:V(r),onClick:Ht(i,["stop"]),onEscape:l,ref_key:"buttonRef",ref:u},{default:we(()=>[ye(gt,{src:"EllipsisVertical",source:"remote"})]),_:1},8,["class","actived"])),[[V(o),"More actions"],[V(n),a.value]])}}),[["__cssModules",{$style:{btnMoreOptions:"_btnMoreOptions_137ge_1"}}]]),bQ=["src","width","height","alt"],va=_t(ot({__name:"Visual",props:{src:{},source:{default:"remote"},size:{},minWidth:{},maxWidth:{},minHeight:{},maxHeight:{},color:{},ratio:{default:"1/1"}},setup(e){const t=$s,{getCachedValue:n,setCachedValue:o}=bf({dbName:"visual-cache-db",storeName:"visuals"}),s=h=>{if(h!==void 0)return typeof h=="number"?`${h}px`:typeof h=="string"&&/^\d+$/.test(h)?`${h}px`:h},r=e,i=X(()=>({minWidth:s(r.minWidth),maxWidth:s(r.maxWidth),minHeight:s(r.minHeight),maxHeight:s(r.maxHeight),aspectRatio:r.ratio,width:s(r.size)})),a=async h=>{const f=await n(h);if(typeof f=="string")return f},l=async(h,f)=>{await o(h,f)},u=X(()=>({name:r.src,size:Number(r.size||100),color:""})),{url:c,loading:d}=UP(u,"visual",l,a);return(h,f)=>ze((q(),de("div",{class:le([h.$style.visualWrapper,{[h.$style.loading]:V(d)}]),style:hn(i.value)},[Se("img",{src:V(c),width:e.size,height:e.size,alt:"visual-"+e.src,style:hn(i.value)},null,12,bQ)],6)),[[V(t),{isLoading:V(d),type:"skeleton",size:"cover",fullwidth:!0}]])}}),[["__cssModules",{$style:{visualWrapper:"_visualWrapper_lvp0k_1",loading:"_loading_lvp0k_8",pulse:"_pulse_lvp0k_1"}}]]),SQ=["tabindex"],No=_t(ot({__name:"DisplayWrapper",props:{prefix:{},suffix:{},inputType:{},readOnly:{type:Boolean},disabled:{type:Boolean},hovered:{type:Boolean},focused:{type:Boolean},error:{type:Boolean},actived:{type:Boolean},clickable:{type:Boolean},size:{},bordered:{type:Boolean},tabIndex:{},focusableIndex:{}},emits:["event","escape"],setup(e,{expose:t,emit:n}){const o=e,s=n;Zg();const r=dm(),i=$(null),a=$("default"),l=X(()=>{if(typeof o.size=="number")return`${o.size}px`;switch(o.size){case"small":return"32px";case"large":return"48px";case"default":default:return"32px"}}),u=X(()=>`${Math.max(50,Math.round(Math.random()*100))}%`),c=X(()=>({[r["display-wrapper"]]:!0,[r.disabled]:o.disabled,[r.readOnly]:o.readOnly,[r.error]:o.error,[r.clickable]:o.clickable,[r.active]:o.actived,[r.hovered]:o.hovered,[r.focused]:!o.readOnly&&!o.disabled&&o.focused,[r.bordered]:o.bordered})),d=()=>{var y,E;const g=((y=i.value)==null?void 0:y.querySelectorAll(":scope > .wrapper-prefix").length)||0,v=((E=i.value)==null?void 0:E.querySelectorAll(":scope > .wrapper-suffix").length)||0,w="var(--icon-size)",b=`calc(var(--gap-size) * ${g+v})`;return g&&!v?`repeat(${g}, ${w}) calc(100% - (${g} * ${w} + ${b}))`:!g&&v?`calc(100% - (${v} * ${w} + ${b})) repeat(${v}, ${w})`:g&&v?`repeat(${g}, ${w}) calc(100% - (${g} * ${w} + ${v} * ${w} + ${b})) repeat(${v}, ${w})`:"100%"},h=$("100%"),f=()=>{h.value=d()};$h(()=>{f()}),Xt(()=>{f()});const p=g=>{a.value=g};return t({rootEl:i,updateState:p,componentState:a,focus:()=>{ht(()=>{var g;(g=i.value)==null||g.focus()})},triggerFocus:()=>{console.log("triggerFocus called"),ht(()=>{var g;(g=i.value)==null||g.focus()})},escape:()=>{s("escape")}}),(g,v)=>{const w=Sc("focusable");return ze((q(),de("div",{ref_key:"rootEl",ref:i,class:le([V(r)["display-wrapper"],c.value]),tabindex:e.tabIndex,style:hn({"--grid-template":h.value,"--wrapper-size":l.value,"--loading-overlay-width":u.value})},[kt(g.$slots,"prefix",{hovered:o.hovered,focused:o.focused}),kt(g.$slots,"default",{hovered:o.hovered,focused:o.focused,updateComponentState:p,disabled:o.disabled}),kt(g.$slots,"suffix",{hovered:o.hovered,focused:o.focused})],14,SQ)),[[w,o.focusableIndex]])}}}),[["__cssModules",{$style:{"display-wrapper":"_display-wrapper_rxmoy_1",readOnly:"_readOnly_rxmoy_26",bordered:"_bordered_rxmoy_29",disabled:"_disabled_rxmoy_29",active:"_active_rxmoy_29",focused:"_focused_rxmoy_29",hovered:"_hovered_rxmoy_33",error:"_error_rxmoy_37",clickable:"_clickable_rxmoy_50",suffix:"_suffix_rxmoy_56",prefix:"_prefix_rxmoy_57"}}]]),EQ=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const _Q=Object.prototype.toString,RQ=e=>_Q.call(e)==="[object Object]",_i=()=>{};function TQ(e,t){function n(...o){return new Promise((s,r)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(s).catch(r)})}return"cancel"in e&&Object.assign(n,{cancel:e.cancel,flush:e.flush,isPending:e.isPending}),n}function DQ(e,t={}){let n,o,s=_i,r=_i;const i=xh(!1),a=c=>{clearTimeout(c),s(),s=_i};let l;return Object.assign(c=>{const d=ta(e),h=ta(t.maxWait);return n&&a(n),d<=0||h!==void 0&&h<=0?(o&&(a(o),o=void 0),i.value=!1,Promise.resolve(c())):(i.value=!0,new Promise((f,p)=>{s=t.rejectOnCancel?p:f,r=f,l=c,h&&!o&&(o=setTimeout(()=>{n&&a(n),o=void 0,i.value=!1,f(l())},h)),n=setTimeout(()=>{o&&a(o),o=void 0,i.value=!1,f(c())},d)}))},{cancel:()=>{n&&(a(n),n=void 0),o&&(a(o),o=void 0),i.value=!1,r=_i},flush:()=>{if(i.value){n&&(clearTimeout(n),n=void 0),o&&(clearTimeout(o),o=void 0),i.value=!1;const c=r;s=_i,r=_i,c(l())}},isPending:Vr(i)})}function SE(e){return Array.isArray(e)?e:[e]}function IQ(e,t=200,n={}){return TQ(DQ(t,n),e)}function xQ(e,t,n){return Qe(e,t,{...n,immediate:!0})}const tM=EQ?window:void 0;function zf(e){var t;const n=ta(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function EE(...e){const t=(o,s,r,i)=>(o.addEventListener(s,r,i),()=>o.removeEventListener(s,r,i)),n=X(()=>{const o=SE(ta(e[0])).filter(s=>s!=null);return o.every(s=>typeof s!="string")?o:void 0});return xQ(()=>{var o,s;return[(o=(s=n.value)===null||s===void 0?void 0:s.map(r=>zf(r)))!==null&&o!==void 0?o:[tM].filter(r=>r!=null),SE(ta(n.value?e[1]:e[0])),SE(V(n.value?e[2]:e[1])),ta(n.value?e[3]:e[2])]},([o,s,r,i],a,l)=>{if(!(o!=null&&o.length)||!(s!=null&&s.length)||!(r!=null&&r.length))return;const u=RQ(i)?{...i}:i,c=o.flatMap(d=>s.flatMap(h=>r.map(f=>t(d,h,f,u))));l(()=>{c.forEach(d=>d())})},{flush:"post"})}function _E(e,t,n={}){const{window:o=tM,ignore:s=[],capture:r=!0,detectIframe:i=!1,controls:a=!1}=n;if(!o)return a?{stop:_i,cancel:_i,trigger:_i}:_i;let l=!0;const u=v=>ta(s).some(w=>{if(typeof w=="string")return Array.from(o.document.querySelectorAll(w)).some(S=>S===v.target||v.composedPath().includes(S));{const S=zf(w);return S&&(v.target===S||v.composedPath().includes(S))}});function c(v){const w=ta(v);return w&&w.$.subTree.shapeFlag===16}function d(v,w){const S=ta(v),b=S.$.subTree&&S.$.subTree.children;return b==null||!Array.isArray(b)?!1:b.some(y=>y.el===w.target||w.composedPath().includes(y.el))}const h=v=>{const w=zf(e);if(v.target!=null&&!(!(w instanceof Element)&&c(e)&&d(e,v))&&!(!w||w===v.target||v.composedPath().includes(w))){if("detail"in v&&v.detail===0&&(l=!u(v)),!l){l=!0;return}t(v)}};let f=!1;const p=[EE(o,"click",v=>{f||(f=!0,setTimeout(()=>{f=!1},0),h(v))},{passive:!0,capture:r}),EE(o,"pointerdown",v=>{const w=zf(e);l=!u(v)&&!!(w&&!v.composedPath().includes(w))},{passive:!0}),i&&EE(o,"blur",v=>{setTimeout(()=>{const w=zf(e);let S=o.document.activeElement;for(;S!=null&&S.shadowRoot;)S=S.shadowRoot.activeElement;(S==null?void 0:S.tagName)==="IFRAME"&&!(w!=null&&w.contains(o.document.activeElement))&&t(v)},0)},{passive:!0})].filter(Boolean),g=()=>p.forEach(v=>v());return a?{stop:g,cancel:()=>{l=!1},trigger:v=>{l=!0,h(v),l=!1}}:g}const AQ=["type","value","placeholder","max","min","disabled","readonly","aria-invalid","aria-disabled","inputmode","maxlength"],hl=_t(ot({__name:"InputText",props:{type:{default:"text"},autoEmit:{type:Boolean,default:!1},debounceDelay:{default:300},selectOnFocus:{type:Boolean,default:!1},submitOnEnter:{type:Boolean,default:!0},blurOnEscape:{type:Boolean,default:!0},maxDecimalChar:{},showClear:{type:Boolean,default:!0},maxValue:{default:void 0},minValue:{default:0},modelValue:{},placeholder:{},focused:{type:Boolean},validatorFnc:{},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{},bordered:{type:Boolean},focusIndex:{}},emits:["update:modelValue","input","clear","focus","blur","change","enterValue","enter","escape","cancel","tab","keydown","keyup","paste","cut","select","onValidation"],setup(e,{expose:t,emit:n}){const o=Io,s=Kt,r=e,i=n,a=$(null),l=$(r.modelValue||""),u=$(!1),c=$(!1),d=$(r.modelValue||"");Qe(()=>r.modelValue,A=>{l.value=A||"",d.value=A||""});const h=X(()=>l.value.length>0),f={text:A=>A.slice(0,r.maxLength||255),number:A=>{const j=r.minValue<0;let ne=A.replace(j?/[^\d.-]/g:/[^\d.]/g,"");const ge=ne.split(".");ge.length>2&&(ne=ge[0]+"."+ge.slice(1).join("")),ne=ne.replace(/-/g,(re,R)=>R===0?re:"");const ue=ne.startsWith("-")?"-":"",Y=ne.replace("-","").split(".");return Y[0].length>17&&(Y[0]=Y[0].substring(0,17)),r.maxDecimalChar!==void 0&&Y.length>1&&(Y[1]=Y[1].substring(0,r.maxDecimalChar)),ne=ue+Y.join("."),ne},email:A=>A.replace(/\s/g,"").slice(0,r.maxLength||255),url:A=>A.replace(/\s/g,"").slice(0,r.maxLength||255),tel:A=>A.replace(/[^\d+\-() ]/g,"").slice(0,r.maxLength||20)},p=A=>{const j=f[r.type];return j?j(A):A},g=IQ(A=>{r.autoEmit&&(i("update:modelValue",A),i("input",A))},r.debounceDelay),v=A=>{const j=A;if(r.disabled||r.readOnly){j.preventDefault();return}const ne=j.target,ge=ne.selectionStart??ne.value.length,xe=ne.value,ue=l.value;let K=p(xe);if(r.type==="number"&&K!==""&&K!=="-"){const Y=Number(K);(r.maxValue!==void 0&&Y>r.maxValue||!Number.isNaN(Y)&&Y<r.minValue)&&(K=ue)}if(ne.value!==K){const Y=Math.max(0,xe.length-K.length);ne.value=K;const re=Math.max(0,Math.min(ge-Y,K.length));ne.setSelectionRange(re,re)}ue!==K&&(l.value=K,i("input",K),r.autoEmit&&g(K))},w=A=>{if(r.disabled||r.readOnly){A.preventDefault();return}c.value=!0;const j=l.value;l.value="",i("update:modelValue",""),i("clear"),j!==""&&i("change",""),A.preventDefault(),A.stopImmediatePropagation(),A.stopPropagation(),ht(()=>{var ne;(ne=a.value)==null||ne.focus(),setTimeout(()=>{c.value=!1},100)})},S=A=>{r.disabled||r.readOnly||(i("focus",A),r.selectOnFocus&&ht(()=>{A.target.select()}))},b=A=>{if(c.value)return;const ne=A.target.value;r.autoEmit||i("update:modelValue",ne),d.value!==ne&&(i("change",ne),d.value=ne),i("blur",ne,A)},y=A=>{const j=A.target.value;i("enter",j,A),i("enterValue",j),r.submitOnEnter&&(A.preventDefault(),r.autoEmit||i("update:modelValue",j),d.value!==j&&(i("change",j),d.value=j))},E=A=>{const j=A.target,ne=j.value;if(i("escape",ne,A),A.preventDefault(),A.stopImmediatePropagation(),A.stopPropagation(),r.autoEmit){i("cancel"),r.blurOnEscape&&j.blur();return}l.value=r.modelValue||"",a.value&&(a.value.value=l.value),i("cancel"),r.blurOnEscape&&j.blur()},_=A=>{const ne=A.target.value;i("tab",ne,A),r.autoEmit||(i("update:modelValue",ne),d.value!==ne&&(i("change",ne),d.value=ne))},I=(A,j,ne)=>new RegExp(`^-?\\d{0,${j}}(\\.\\d{0,${ne}})?$`).test(A)?ne>0||!A.includes("."):!1,T=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Tab","Enter","Escape","Home","End"]),F=A=>{if(i("keydown",A),A.key===" "&&A.stopPropagation(),r.type==="number"){if(A.key==="e"||A.key==="E"){A.preventDefault();return}if(A.key.length===1&&!A.ctrlKey&&!A.metaKey&&!A.altKey&&!T.has(A.key)){if(!(r.minValue<0?/[\d.-]/:/[\d.]/).test(A.key)){A.preventDefault();return}const ne=A.target,ge=l.value,xe=ne.selectionStart??ge.length,ue=ne.selectionEnd??xe,K=ge.slice(0,xe)+A.key+ge.slice(ue);if(!I(K,17,r.maxDecimalChar??2)){A.preventDefault();return}const Y=Number(K);if(r.maxValue!==void 0&&Y>r.maxValue||K!=="-"&&!Number.isNaN(Y)&&Y<r.minValue){A.preventDefault();return}}}A.key==="Escape"?E(A):A.key==="Enter"?y(A):A.key==="Tab"?_(A):(A.key==="ArrowUp"||A.key==="ArrowDown")&&r.type==="number"&&A.preventDefault()},L=A=>{i("keyup",A)},x=A=>{if(r.disabled||r.readOnly){A.preventDefault();return}i("paste",A)},P=A=>{if(r.disabled||r.readOnly){A.preventDefault();return}i("cut",A)},k=A=>{i("select",A)},M=`input-text-${Math.random().toString(36).slice(2,11)}`,N=X(()=>{switch(r.type){case"number":return"decimal";case"email":return"email";case"tel":return"tel";case"url":return"url";default:return"text"}});Qe(l,A=>{i("onValidation",A),u.value=r.validatorFnc?!!A&&!r.validatorFnc(A):!1});const B=$(null),z=X(()=>({disabled:r.disabled,readOnly:r.readOnly,error:u.value,inputRef:a,clickable:!r.disabled&&!r.readOnly,focused:r.focused,wrapperRef:B,bordered:!0})),{argsMain:oe,isHover:ie,isFocus:te}=xo(z);t({triggerFocus:()=>{ht(()=>{var A;(A=a.value)==null||A.focus()})},focus:()=>{se()},blur:()=>{ht(()=>{var A;(A=a.value)==null||A.blur()})},select:()=>{ht(()=>{var A;(A=a.value)==null||A.select()})},setSelectionRange:(A,j)=>{ht(()=>{var ne;(ne=a.value)==null||ne.setSelectionRange(A,j)})},getValue:()=>l.value,setValue:A=>{l.value=p(A),a.value&&(a.value.value=l.value)},reset:()=>{l.value=r.modelValue||"",a.value&&(a.value.value=l.value)}});const se=()=>{!r.disabled&&!r.readOnly&&ht(()=>{var A;(A=a.value)==null||A.focus()})},Z=X(()=>te.value&&h.value);return(A,j)=>(q(),de("div",{class:le([A.$style["input-wrapper"],"input-editor"]),onClick:se},[ze((q(),je(No,jt(V(oe),{ref_key:"wrapperRef",ref:B,class:[A.$style["input-box"],{[A.$style["is-hovered"]]:V(ie),[A.$style["is-focused"]]:V(te),[A.$style["has-input"]]:h.value,[A.$style["is-editting"]]:Z.value}],style:{"--icon-size":"20px","--gap-size":"4px"},bordered:r.bordered}),{prefix:we(()=>[kt(A.$slots,"prefix")]),suffix:we(()=>[h.value&&!r.disabled&&!r.readOnly&&r.showClear?kt(A.$slots,"clear",{},()=>[ze((q(),je(St,{variant:["icon","tertiary"],"aria-label":"Clear",onMousedown:Ht(w,["prevent","stop"]),size:18,rounded:!0,class:le(["wrapper-suffix",A.$style["clear-button"]])},{default:we(()=>[ye(gt,{src:"CircleXMark",size:"20",color:"var(--primary-color)"})]),_:1},8,["class"])),[[V(s),{content:"Clear",contentClass:"extra-padding"}]])],void 0,0):kt(A.$slots,"suffix",{},void 0,void 0,1)]),default:we(()=>[Se("input",{tabindex:"-1",ref_key:"inputRef",ref:a,type:r.type,value:l.value,placeholder:e.placeholder,class:le([A.$style["column-config__input"]]),max:r.maxValue,min:r.minValue,id:M,disabled:e.disabled,readonly:e.readOnly,"aria-invalid":u.value||void 0,"aria-disabled":e.disabled||void 0,inputmode:N.value,maxlength:r.maxLength,onInput:v,onFocus:S,onBlur:b,onKeydown:F,onKeyup:L,onPaste:x,onCut:P,onSelect:k},null,42,AQ)]),_:3},16,["class","bordered"])),[[V(o),r.focusIndex]]),u.value?kt(A.$slots,"error",{},void 0,void 0,0):Ye("",!0)],2))}}),[["__cssModules",{$style:{"input-box":"_input-box_83ot4_1","is-disabled":"_is-disabled_83ot4_16","is-readonly":"_is-readonly_83ot4_16","is-hovered":"_is-hovered_83ot4_16","is-focused":"_is-focused_83ot4_20","column-config__input":"_column-config__input_83ot4_44","clear-button":"_clear-button_83ot4_59"}}]]),PQ={class:"wrapper-prefix",style:{width:"18px",height:"18px"}},RE=ot({__name:"SearchBox",props:{modelValue:{default:""},placeholder:{default:"Search"},focused:{type:Boolean},validatorFnc:{},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{},bordered:{type:Boolean},focusIndex:{default:void 0}},emits:["update:modelValue","search","clear","cancel"],setup(e,{expose:t,emit:n}){const o=e,s=n,r=$(null),i=Cr(u=>{s("update:modelValue",u),s("search",u)},Si),a=()=>{s("update:modelValue",""),s("clear"),ht(()=>{var u;(u=r.value)==null||u.focus()})},l=$(o.modelValue);return t({focus:()=>{var u;(u=r.value)==null||u.focus()},setValue(u){l.value=u}}),(u,c)=>(q(),je(hl,{focusIndex:o.focusIndex,ref_key:"searchInput",ref:r,modelValue:l.value,"onUpdate:modelValue":c[0]||(c[0]=d=>l.value=d),type:"text",placeholder:e.placeholder,onInput:V(i),onClear:a,onCancel:c[1]||(c[1]=d=>s("cancel")),"auto-emit":!0},{prefix:we(()=>[Se("div",PQ,[ye(gt,{src:"MagnifyingGlass",color:"var(--grey-200)",size:"14"})])]),_:1},8,["focusIndex","modelValue","placeholder","onInput"]))}}),fl=_t(ot({name:"ListItem",directives:{tooltip:Kt,focusable:Io},__name:"ListItem",props:{itemWidth:{default:"250px"},label:{},value:{},type:{},selected:{type:Boolean},disabled:{type:Boolean},hover:{type:Boolean},clickable:{type:Boolean,default:!0},danger:{type:Boolean},data:{},icon:{},readOnly:{type:Boolean,default:!1},show:{type:Boolean},focusIndex:{}},emits:["click","handleClick","keydown","update:selected","select","escape"],setup(e,{expose:t,emit:n}){const o=Io,s=e,r=n,i=$(!1),a=$(!1);function l(E){if(!E||typeof E!="object")return!1;const _=E;return typeof _.name=="string"&&typeof _.id=="string"&&typeof _.initial=="string"}const u=X(()=>s.type==="status"||s.type==="assignee"||s.type==="icon"||!!y.prefix),c=X(()=>!!y.suffix||s.danger&&i.value),d=X(()=>{var E;return s.type==="status"&&typeof((E=s.data)==null?void 0:E.color)=="string"?{backgroundColor:s.data.color,border:uS(s.data.color,"white")?"1px solid #ccc":"1px solid #fff"}:{}}),h=dm(),f=X(()=>({[h.active]:s.selected??!1,[h.disabled]:s.disabled??!1,[h.hover]:s.hover??!1,[h.clickable]:(s.clickable??!0)&&!s.disabled,[h.danger]:s.danger??!1,[h["has-prefix"]]:u.value,[h["has-suffix"]]:c.value,[h.readOnly]:s.readOnly}));X(()=>({content:"Cancel",...b})),X(()=>({content:"Confirm",theme:"warning",...b}));function p(E){return{name:E.name,initial:E.initial,id:E.id,profile_image:E.profile_image??null,color:E.color,size:24}}function g(){i.value=!1}function v(E){E?r("click",E):(s.clickable??!0)&&(r("update:selected",!s.selected),r("select",!s.selected))}function w(E){if(!s.disabled){if(s.danger&&!i.value){i.value=!0;return}else s.danger||v(E);r("handleClick",E)}}const S=()=>{i.value?g():r("escape")},b=Object.freeze({delay:[300,0],contentClass:["extra-padding"]}),y=Zg();return Qe(()=>s.show,E=>{E===!1&&(i.value=!1)}),t({select:()=>{w(new MouseEvent("click",{bubbles:!0,cancelable:!0}))}}),(E,_)=>{const I=Sc("tooltip");return ze((q(),je(St,{variant:["menu-item",e.danger?"danger":"menu-item"],class:le([E.$style["list-item"],f.value]),onHandleClick:w,onMouseenter:_[0]||(_[0]=T=>a.value=!0),onMouseleave:_[1]||(_[1]=T=>a.value=!1),onEscape:S,style:hn({width:s.itemWidth})},{default:we(()=>[u.value?(q(),de("div",{key:0,class:le(E.$style["list-item__prefix"])},[kt(E.$slots,"prefix",{},()=>[e.type==="icon"&&e.icon?(q(),je(gt,{key:0,src:e.icon,source:"remote",class:le(E.$style["item-icon"]),color:s.danger?void 0:"#a6a6a6"},null,8,["src","class","color"])):e.type==="status"?(q(),de("div",{key:1,class:le(E.$style["status-indicator"]),style:hn(d.value)},null,6)):e.type==="assignee"&&l(e.data)?(q(),je(Ef,jt({key:2},p(e.data),{class:E.$style["item-avatar"],readOnly:!0}),null,16,["class"])):Ye("",!0)])],2)):Ye("",!0),Se("div",{class:le(E.$style["list-item__label"])},[kt(E.$slots,"label",{selected:e.selected},()=>[tt(at(e.label),1)])],2),c.value?(q(),de("div",{key:1,class:le(E.$style["list-item__suffix"])},[kt(E.$slots,"suffix",{item:E.$props,hovered:a.value},()=>[e.danger&&i.value?(q(),de("div",{key:0,class:le(E.$style["confirm-action"])},[ze((q(),je(St,{variant:["tertiary","icon","danger"],size:"small",onClick:Ht(g,["stop","prevent"])},{default:we(()=>[ye(gt,{src:"Xmark",source:"remote"})]),_:1})),[[V(o),`${s.focusIndex}.0`],[I,{content:"Cancel ",delay:[300,0],contentClass:["extra-padding"]}]]),ze((q(),je(St,{variant:["danger","primary","icon"],size:"small",onClick:Ht(v,["stop","prevent"])},{default:we(()=>[ye(gt,{src:"Check",source:"remote"})]),_:1})),[[V(o),`${s.focusIndex}.1`],[I,{delay:[300,0],contentClass:["extra-padding"],content:"Confirm ",theme:"warning"}]])],2)):Ye("",!0)])],2)):Ye("",!0)]),_:3},8,["variant","class","style"])),[[V(o),s.focusIndex]])}}}),[["__cssModules",{$style:{"list-item":"_list-item_iekfz_1",disabled:"_disabled_iekfz_17",danger:"_danger_iekfz_24","has-prefix":"_has-prefix_iekfz_27","has-suffix":"_has-suffix_iekfz_27",clickable:"_clickable_iekfz_41",readOnly:"_readOnly_iekfz_44",hover:"_hover_iekfz_48",active:"_active_iekfz_54","list-item__prefix":"_list-item__prefix_iekfz_79","list-item__label":"_list-item__label_iekfz_87","list-item__suffix":"_list-item__suffix_iekfz_101","status-indicator":"_status-indicator_iekfz_108","item-icon":"_item-icon_iekfz_114","arbo-icon-state":"_arbo-icon-state_iekfz_119","item-avatar":"_item-avatar_iekfz_122","confirm-action":"_confirm-action_iekfz_131"}}]]),kQ=["aria-activedescendant"],FQ=["innerHTML"],OQ=10,ya=_t(ot({__name:"SearchList",props:{options:{default:()=>[]},selectedId:{},loading:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},hasMore:{type:Boolean,default:!1},error:{default:null},params:{},maxHeight:{default:"218px"},width:{default:"250px"},itemWidth:{default:"250px"},minQueryLength:{default:0}},emits:["select","close","search","loadMore","cancel","tab"],setup(e,{expose:t,emit:n}){const o=Kt,s={ARROW_DOWN:"ArrowDown",ARROW_UP:"ArrowUp",ENTER:"Enter",ESCAPE:"Escape",TAB:"Tab"},r=e,i=n,a=$(""),l=$(-1),u=$(null),c=$(null),d=$(new Map),h=X(()=>rE(a.value)),f=()=>{const Z=h.value;if(!Z||Z.length<r.minQueryLength)return r.options;if(d.value.has(Z))return d.value.get(Z);const A=r.options.map(j=>({item:j,score:mJ(` ${j.label} `,Z)})).filter(({score:j})=>j>0).sort((j,ne)=>ne.score-j.score).map(({item:j})=>j);return d.value.set(Z,A),A},p=$([]);Qe(()=>r.options,()=>{p.value=f()},{immediate:!0,deep:!0});const g=X(()=>r.hasMore&&!r.loading&&!r.loadingMore),v=Cr(Z=>{a.value=Z,l.value=-1,i("search",Z)},Si),w=async Z=>{te.value=0,await v(Z||""),te.value=1},S=Z=>a.value?vJ(Z,a.value):Z,b=Z=>{const j={[s.ARROW_DOWN]:()=>y(Z),[s.ARROW_UP]:()=>E(Z),[s.ENTER]:()=>T(Z),[s.ESCAPE]:()=>F(Z),[s.TAB]:()=>L(Z)}[Z.key];j&&j()},y=Z=>{Z.preventDefault(),_(1)},E=Z=>{Z.preventDefault(),_(-1)},_=Z=>{const A=p.value.length;if(A===0)return;let j;Z>0?j=(l.value+1)%A:l.value>0?j=l.value-1:j=A-1,l.value=j,I()},I=()=>{ht(()=>{var A;const Z=(A=c.value)==null?void 0:A.querySelectorAll('[role="menuitem"]')[l.value];Z==null||Z.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})},T=Z=>{if(Z.preventDefault(),l.value>=0&&l.value<p.value.length){const j=p.value[l.value];x(j,Z)}},F=Z=>{Z.preventDefault(),k()},L=Z=>{i("tab",Z)},x=(Z,A)=>{!Z||Z.disabled||(i("select",Z,A),l.value=-1,k())},P=Z=>{Z>=0&&Z<p.value.length&&(l.value=Z)},k=()=>{i("close")},M=()=>{if(!g.value||!c.value)return;const{scrollTop:Z,clientHeight:A,scrollHeight:j}=c.value;j-(Z+A)<=OQ&&i("loadMore")},N=()=>{var Z,A,j;(Z=c.value)==null||Z.addEventListener("scroll",M),(j=(A=oe.value)==null?void 0:A.$el)==null||j.addEventListener("keydown",b)},B=()=>{var Z,A,j;(Z=c.value)==null||Z.removeEventListener("scroll",M),(j=(A=oe.value)==null?void 0:A.$el)==null||j.removeEventListener("keydown",b)};Xt(()=>{N()}),Vn(()=>{B()}),Qe(()=>r.loading,Z=>{!Z&&p.value.length>0&&(l.value=-1)});const z=Z=>Z?Array.isArray(r.selectedId)?r.selectedId.includes(String(Z.id)):r.selectedId==Z.id:!1,oe=$(null);Qe(l,()=>{I()});const ie=()=>{ht(()=>{var Z;(Z=oe.value)==null||Z.focus()})};t({focus:()=>{ht(()=>{var Z;(Z=oe.value)==null||Z.focus()})},reset:()=>{var Z;(Z=oe.value)==null||Z.focus(),l.value=-1},query:a,filteredOptions:p,selectedIndex:l,closeDropdown:k,clearSearch:()=>{a.value=""},scrollTo:Z=>{c.value&&(c.value.scrollTop=Z)},selectIndex:Z=>{Z>=0&&Z<p.value.length&&(l.value=Z,I())}});const te=$(0);Qe([()=>r.loading,()=>a.value,()=>r.options,()=>r.loadingMore],()=>{const Z=r.options.length>0&&p.value.length>0,A=!Z&&a.value.length>0,j=!Z&&a.value.length===0;r.loading?te.value=0:Z?te.value=1:A?te.value=2:j&&(te.value=3)},{immediate:!0,deep:!0});const se=()=>{i("cancel")};return(Z,A)=>(q(),de("datalist",{ref_key:"searchListRef",ref:u,class:le([Z.$style["search-list"],te.value===3||te.value===2?Z.$style.empty:"",p.value.length>8?Z.$style.scrollable:""]),"aria-activedescendant":l.value>=0?`item-${l.value}`:void 0,style:hn({width:e.itemWidth||e.width})},[ye(RE,{ref_key:"searchBoxRef",ref:oe,modelValue:a.value,"onUpdate:modelValue":A[0]||(A[0]=j=>a.value=j),class:le(Z.$style["search-box"]),disabled:e.loading,onSearch:w,onClear:A[1]||(A[1]=j=>w("")),onCancel:se},null,8,["modelValue","class","disabled"]),Se("div",{ref_key:"popupRef",ref:c,class:le(Z.$style["list-container"])},[kt(Z.$slots,"extra-item",{query:a.value,isEmpty:te.value===3||te.value===2,isLoading:r.loading}),(q(!0),de(Pt,null,xn(p.value,(j,ne)=>ze((q(),de("div",{key:`${j.id}-${ne}`,role:"menuitem"},[kt(Z.$slots,"item",{item:j,index:ne,selectedIndex:l.value,isSelected:z,handleSelect:x,handleItemHover:P,getHighlightedLabel:S,query:a.value,idx:ne,focused:l.value==ne,focus:ie},()=>[j.hide?Ye("",!0):(q(),je(fl,jt({key:0,ref_for:!0},j,{hover:ne===l.value,selected:z(j),type:j.type,id:`item-${ne}`,"aria-selected":ne===l.value,onClick:ge=>x(j,ge),onMouseover:ge=>P(ne),onEscape:k,itemWidth:e.itemWidth||e.width}),{prefix:we(()=>[kt(Z.$slots,"prefix-item",{item:j})]),label:we(()=>[a.value?ze((q(),de("span",{key:0,class:le(Z.$style.match),innerHTML:S(j.label)},null,10,FQ)),[[V(o),{content:j.label,delay:[1e3,0]}]]):ze((q(),de("span",{key:1,class:le(Z.$style["item-label"])},[tt(at(j.label),1)],2)),[[V(o),{content:j.label,delay:[1e3,0]}]])]),suffix:we(({hovered:ge})=>[kt(Z.$slots,"action",{item:j,isHovered:ne===l.value,hovered:ge,selected:l.value==ne})]),_:2},1040,["hover","selected","type","id","aria-selected","onClick","onMouseover","itemWidth"]))])])),[[dr,te.value===1]])),128)),te.value===0?kt(Z.$slots,"loading-more",{},()=>[(q(),de(Pt,null,xn(8,j=>Se("div",{class:le(Z.$style["loading-more"]),key:j},[Se("div",{class:le(Z.$style["loading-skeleton"])},null,2),Se("div",{class:le(Z.$style["loading-skeleton"])},null,2)],2)),64))],void 0,0):Ye("",!0),te.value===2?(q(),de("div",{key:1,class:le(Z.$style["no-results"])},[kt(Z.$slots,"empty",{query:a.value},()=>[Se("div",{class:le(Z.$style["no-results-content"])},[...A[2]||(A[2]=[Se("div",null,[tt(" No results. "),Se("br"),tt(" Try another search. ")],-1)])],2)])],2)):Ye("",!0),te.value===3?(q(),de("div",{key:2,class:le(Z.$style["no-results"])},[kt(Z.$slots,"empty-list",{},()=>[Se("div",{class:le(Z.$style["no-results-content"])},[...A[3]||(A[3]=[Se("div",null,"No items available.",-1)])],2)])],2)):Ye("",!0),kt(Z.$slots,"footer")],2)],14,kQ))}}),[["__cssModules",{$style:{"search-list":"_search-list_1rcj9_1",empty:"_empty_1rcj9_11",scrollable:"_scrollable_1rcj9_17","list-container":"_list-container_1rcj9_24","item-label":"_item-label_1rcj9_45","loading-state":"_loading-state_1rcj9_53","loading-more":"_loading-more_1rcj9_54","loading-skeleton":"_loading-skeleton_1rcj9_65","is-loading":"_is-loading_1rcj9_72","no-results":"_no-results_1rcj9_127","no-results-content":"_no-results-content_1rcj9_134",title:"_title_1rcj9_137",tips:"_tips_1rcj9_143",match:"_match_1rcj9_157","skeleton-loading":"_skeleton-loading_1rcj9_1"}}]]),Iu=ot({__name:"AvatarProfile",props:{user:{},showProfile:{type:Boolean,default:!0},apiUpdateFunction:{},appendTo:{}},setup(e){const t=ej,n=e,o=$(n.appendTo||void 0),s=()=>({user:n.showProfile?n.user:void 0,placement:"bottom-start",showInsightButton:!0,showCopyLinkButton:!0,apiUpdateFunction:n.apiUpdateFunction,appendTo:o.value}),r=$(s());Qe(()=>n,()=>{setTimeout(()=>{ht(()=>{o.value=n.appendTo||void 0,r.value=s()})},50)},{immediate:!0,deep:!0});const i=X(()=>un.getInstance().getItem("user.ws_user_role_id")),a=X(()=>({id:n.user.id,name:n.user.name,profile_image:n.user.profile_image,color:n.user.color,initial:n.user.initial,isMe:n.user.id===i.value}));return(l,u)=>ze((q(),je(Ef,_U(A1(a.value)),null,16)),[[V(t),r.value]])}}),MQ={class:"avatar-wrapper"},NQ={class:"assignee-label"},LQ=_t(ot({__name:"AssigneeItem",props:{user:{},hovered:{type:Boolean},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},multipleSelect:{type:Boolean,default:!1},isMe:{type:Boolean},appendTo:{},apiUpdateFunction:{}},emits:["select","deselect","reselect"],setup(e,{emit:t}){const n=Kt,o=e,s=X(()=>({name:o.user.name,id:o.user.id,profile_image:o.user.profile_image,color:{bgColor:o.user.color.bgColor,textColor:o.user.color.textColor},initial:o.user.initial})),r=Zg(),i=X(()=>{if(!a.value&&!o.hover&&!o.focused||!r.actions)return 0;let l=0;const u=c=>{c.forEach(d=>{d.type===Pt&&Array.isArray(d.children)?u(d.children):d.type!==no&&d.type!==Ka&&l++})};return u(r.actions()),l}),a=$(!1);return(l,u)=>(q(),de("div",{class:le(["assignee-selector-item",{hovered:a.value||o.hovered,disabled:o.disabled,selected:o.selected,single:i.value==0,focused:o.focused}]),style:hn({"--actions-count":i.value}),onMouseenter:u[0]||(u[0]=c=>a.value=!0),onMouseleave:u[1]||(u[1]=c=>a.value=!1)},[Se("div",MQ,[ye(Iu,{user:s.value,"show-profile":!0,"append-to":o.appendTo,"api-update-function":o.apiUpdateFunction},null,8,["user","append-to","api-update-function"]),o.multipleSelect?(q(),de("div",{key:0,class:le(["avatar-indicator",[o.selected?"remove":"add"]])},[o.selected?(q(),je(gt,{key:0,src:"CircleXMark"})):(q(),je(gt,{key:1,src:"CirclePlus"}))],2)):Ye("",!0)]),ze((q(),de("div",NQ,[kt(l.$slots,"name",{},()=>[tt(at(o.user.name),1)],!0)])),[[V(n),{content:o.user.name,delay:[1e3,0]}]]),a.value||o.hovered||o.focused?kt(l.$slots,"actions",{},void 0,!0,0):Ye("",!0)],38))}}),[["__scopeId","data-v-4de522be"]]),VQ={class:"unassign-icon"},TE=_t(ot({__name:"UnassignBtn",props:{actived:{type:Boolean,default:!1},label:{default:"No assignee"},borderLeft:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t,o=()=>{n("click")};return(s,r)=>(q(),je(V(St),{variant:"menu-item",onClick:o,actived:e.actived,style:hn({"border-top-width":0,"border-bottom-width":0,"border-left-width":e.borderLeft?"4px":"0"})},{prefix:we(()=>[Se("div",VQ,[kt(s.$slots,"icon",{},()=>[r[0]||(r[0]=Se("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Se("path",{d:"M2.17953 2.75285C1.98276 2.5977 1.69706 2.63365 1.54191 2.83042C1.38677 3.0272 1.42271 3.3129 1.61949 3.46805L12.8204 12.2471C13.0172 12.4023 13.3029 12.3663 13.458 12.1696C13.6132 11.9728 13.5772 11.6871 13.3805 11.532L8.13003 7.41675C9.16308 7.14051 9.9218 6.19827 9.9218 5.07818C9.9218 3.7405 8.83765 2.65636 7.49997 2.65636C6.17932 2.65636 5.10653 3.71212 5.07815 5.0252L2.17953 2.75285ZM6.4461 8.41386C4.67136 8.51035 3.26179 9.98237 3.26179 11.7817C3.26179 12.092 3.51343 12.3436 3.82372 12.3436H11.1762C11.25 12.3436 11.32 12.3304 11.3843 12.3039L6.4461 8.41386Z",fill:"#a6a6a6"})],-1))],!0)])]),default:we(()=>[kt(s.$slots,"label",{},()=>[tt(at(e.label),1)],!0)]),_:3},8,["actived","style"]))}}),[["__scopeId","data-v-ec3b3a15"]]),BQ=["innerHTML"],nM=20,oM=_t(ot({__name:"AssigneeGroupEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},ids:{}},emits:["updated","cancel","update-start","update-failed","update-completed"],setup(e,{expose:t,emit:n}){const o=Kt,s=e,{id:r}=Ng(s),i=n,a=j=>{var ge,xe;const ne=(xe=(ge=s.params)==null?void 0:ge.api)==null?void 0:xe.getRowNode(String(r.value));ne==null||ne.setDataValue("assignees",nv(j.assignees)),A("updated",j)},l=$(!1),u=$(!1),c=$(null),d=$(1),h=$(!0),f=$(0),p=$(""),g=Dn("bulkUpdate",$(!1)),v=Dn("isSelectAll",$(!1)),w=X(()=>{var j;return g.value&&v.value?[]:(j=s.ids)!=null&&j.length?s.ids:[String(r.value)]}),{unAssignAll:S,replaceAssignees:b,handleSelect:y,assigneeList:E,mergedOptions:_,selectedUserIds:I}=Iv({...s,entityId:s.entityId,updateRowData:a,value:s.value,isBulkUpdate:g,isSelectAll:v,errorCallback:()=>{A("update-failed")}},w),{apiServices:T}=so(!g.value,s),F=Dn("workspaceId"),L=async(j=1,ne="",ge=!1)=>{var ue,K,Y,re,R,G;if(!T.value)throw console.error("API service or item identifiers are undefined",T.value),new Error("API service or item identifiers are undefined");if(ge?u.value=!0:l.value=!0,c.value=null,!((ue=T.value)!=null&&ue.multipleAssignableUser))throw new Error("API service getAssignableUsers is undefined");const xe=(s.ids??(s.id?[s.id]:[])).map(String);try{let J;xe.length==0?J=await((K=T.value)==null?void 0:K.getEntityUserRoles({workspaceId:String(F),page:j,per_page:nM,display_name_like:ne.trim(),entity_ids:String(s.entityId)})):J=await((Y=T.value)==null?void 0:Y.multipleAssignableUser({workspaceId:String(F),itemIds:xe,page:j,perPage:nM,q:ne.trim(),entityId:String(s.entityId)}));const ce=((re=ad(J.data))==null?void 0:re.map(Dv))??[];E.value=ge?Kc(E.value,ce,"id"):ce,f.value=J.meta.total,h.value=(((R=J==null?void 0:J.meta)==null?void 0:R.current_page)||0)<(((G=J==null?void 0:J.meta)==null?void 0:G.last_page)||0),d.value=j}catch(J){console.error("Error fetching assignable users:",J),c.value="Failed to load assignable users"}finally{l.value=!1,u.value=!1}},x=()=>{!u.value&&h.value&&L(d.value+1,p.value,!0)},P=Cr(async j=>{p.value=j,await L(1,j,!1)},Si),k=()=>L(1,p.value,!1);Xt(()=>{var j;(j=N.value)==null||j.focus()}),t({getValue:()=>{var j;return(j=_.value.find(ne=>ne.selected))==null?void 0:j.value},refresh:k,clearInternal:()=>{I.value=[]},focus:()=>{var j;(j=N.value)==null||j.focus()}});const M=()=>{const j=un.getInstance().getItem("BASE_URL"),ne=es({type:"access_setting",config:{baseDomain:j,ws_code:s.workspaceId,entity_id:F}}).url;window.open(ne,"_blank")},N=$(null);Xt(()=>{ht(()=>{var j;(j=N.value)==null||j.focus()})}),Qe([()=>s.id,()=>s.workspaceId],()=>{L()},{deep:!0,immediate:!0});const B=j=>{var ge;const ne=un.getInstance().getItem("ws.code");return((ge=T.value)==null?void 0:ge.getUserInformation(ne,j))||Promise.resolve(null)},z=async(j,ne,ge)=>{ne.preventDefault(),ne.stopPropagation(),ne.stopImmediatePropagation(),A("update-start");try{const xe=await y(j);if(xe)A("update-completed",xe);else throw new Error("Failed to update assignees")}catch(xe){A("update-failed"),console.error("Error updating assignees:",xe)}},oe=async()=>{try{A("update-start");const j=await S();if(j)A("update-completed",j);else throw new Error("Failed to unassign all assignees")}catch(j){A("update-failed"),console.error("Error unassigning all assignees:",j)}finally{}},ie=async j=>{try{A("update-start");const ne=await b(j);if(ne)A("update-completed",ne);else throw new Error("Failed to replace assignees")}catch(ne){A("update-failed"),console.error("Error replacing assignees:",ne)}finally{}},te=()=>{var j,ne;i("cancel"),(ne=(j=s.params)==null?void 0:j.api)==null||ne.stopEditing()};ci("popupAttachRef",N);const se=$(),Z=$(!1),A=(j,ne)=>{switch(j){case"updated":i("updated",ne);break;case"update-start":i("update-start");break;case"update-failed":i("update-failed");break;case"update-completed":i("update-completed",ne);break}};return Xt(()=>{ht(()=>{setTimeout(()=>{Z.value=!0},50)})}),(j,ne)=>(q(),de("div",{class:"assigne-editor-wrapper",ref_key:"wrapperRef",ref:se},[ye(ya,jt({"selected-id":V(I)},{...s},{options:V(_),loading:l.value,ref_key:"popupRef",ref:N,"loading-more":u.value,"has-more":h.value,onSelect:ne[0]||(ne[0]=(ge,xe)=>{z(ge,xe)}),"data-wrapper":"true",onSearch:V(P),onLoadMore:x,onCancel:te,onClose:te}),Hh({"extra-item":we(({isEmpty:ge,isLoading:xe})=>[!ge&&!xe?(q(),je(TE,{key:0,onClick:oe,actived:!1,label:"Unassign"},{icon:we(()=>[ye(gt,{src:"UserXMark",source:"remote"})]),_:1})):Ye("",!0)]),item:we(({item:ge,selectedIndex:xe,isSelected:ue,handleItemHover:K,getHighlightedLabel:Y,query:re,idx:R,focused:G})=>[ye(LQ,{user:ge.data,"multiple-select":!0,"append-to":se.value,isMe:!1,hover:R===xe,selected:ue(ge),focused:G,onClick:Ht(J=>z(ge,J,"click"),["stop","prevent"]),onMouseover:J=>K(R),"api-update-function":B},{name:we(()=>[re?ze((q(),de("span",{key:0,class:le([j.$style["item-label"],j.$style.match]),style:{flex:"1"},innerHTML:Y(ge.label)},null,10,BQ)),[[V(o),{content:ge.label}]]):ze((q(),de("span",{key:1,class:le(j.$style["item-label"]),style:{flex:"1"}},[tt(at(ge.label),1)],2)),[[V(o),{content:ge.label}]])]),actions:we(()=>[ze((q(),je(St,{tabindex:-1,variant:["secondary","icon"],size:"small",label:"",onClick:Ht(J=>{var ce;return ie((ce=ge.data)==null?void 0:ce.id)},["stop"])},{default:we(()=>[ye(gt,{src:"PeopleArrows"})]),_:1},8,["onClick"])),[[V(o),"Unassign others and reassign"]])]),_:2},1032,["user","append-to","hover","selected","focused","onClick","onMouseover"])]),"empty-list":we(()=>[Se("div",{class:le(j.$style["empty-state"])},[ne[3]||(ne[3]=tt(" No assignee available. ",-1)),ne[4]||(ne[4]=Se("br",null,null,-1)),ye(St,{onClick:M,variant:["tertiary"],size:"small"},{default:we(()=>[...ne[2]||(ne[2]=[tt(" Go to Access Settings to add team. ",-1)])]),_:1})],2)]),_:2},[c.value?{name:"error",fn:we(()=>[Se("div",{class:le(j.$style["error-message"])},[tt(at(c.value)+" ",1),ye(St,{onClick:k,size:"small"},{default:we(()=>[...ne[1]||(ne[1]=[tt(" Retry ",-1)])]),_:1})],2)]),key:"0"}:void 0]),1040,["selected-id","options","loading","loading-more","has-more","onSearch"])],512))}}),[["__cssModules",{$style:{action:"_action_nv6on_1","item-assignee":"_item-assignee_nv6on_6","item-action":"_item-action_nv6on_6","item-label":"_item-label_nv6on_16","error-message":"_error-message_nv6on_25","empty-state":"_empty-state_nv6on_35","skeleton-avatar":"_skeleton-avatar_nv6on_48"}}]]),$Q={key:0,class:"inner"},jf=_t(ot({__name:"BulkUpdateBtnWrapper",props:{isUpdating:{type:Boolean,default:!1},disabled:{type:Boolean}},emits:["onVisibleChange"],setup(e,{expose:t,emit:n}){const o=e,s=$(null),{triggerRef:r,popupRef:i,isVisible:a,hide:l,toggle:u,show:c}=vo({toggleOnClick:!0,zIndex:2,disabled:o.disabled,placement:"top",appendTo:s.value||void 0}),d=$(null),h=v=>{v.key==="Escape"&&i.value&&l()},f=Fo({isShow:!1,isRender:!1});Xt(()=>{var w;const v=d.value instanceof HTMLElement?d.value:(w=d.value)==null?void 0:w.$el;v&&v.addEventListener("keydown",h)}),Vn(()=>{var w;const v=d.value instanceof HTMLElement?d.value:(w=d.value)==null?void 0:w.$el;v&&v.removeEventListener("keydown",h)});const p=n,g=(v,w)=>{f.isShow=v,f.isRender=w};return Qe(()=>a.value,(v,w)=>{v?ht(()=>{a.value&&g(!0,!0)}):f.isShow=!1,p("onVisibleChange",v,w)}),t({hide:()=>{console.log(" "),l(),g(!1,!0)},isVisible:a,open:()=>{c(),g(!0,!0)},destroy(){l(),g(!1,!1)}}),(v,w)=>(q(),de("div",{class:"bulk-update-btn-wrapper",ref_key:"containerRef",ref:s},[Se("div",{class:"trigger-slot",ref_key:"triggerRef",ref:r},[kt(v.$slots,"trigger",{isVisible:V(a),hide:V(l),disabled:o.isUpdating||o.disabled,popupRef:V(i),triggerRef:V(r),toggle:V(u)},void 0,!0)],512),Se("div",{class:"popup-slot",ref_key:"popupRef",ref:i},[f.isRender?ze((q(),de("div",$Q,[kt(v.$slots,"popup",{isVisible:V(a),hide:V(l),popupRef:V(i),triggerRef:V(r),toggle:V(u),open:V(c)},void 0,!0)],512)),[[dr,f.isShow]]):Ye("",!0)],512)],512))}}),[["__scopeId","data-v-af84b00b"]]),HQ=ot({__name:"AssignneeUpdateButton",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},ids:{},variant:{},selectedAll:{type:Boolean}},emits:["update","update-start","update-completed","update-failed"],setup(e,{emit:t}){const n=e;ci("bulkUpdate",!0);const o=$(!1),s=t,r=$(null),i=()=>{var d;o.value=!0,s("update-start"),(d=l.value)==null||d.hide()},a=(d,h)=>{var f,p;o.value=!1,d?(s("update-completed",h),(f=l.value)==null||f.destroy()):(s("update-failed"),(p=l.value)==null||p.open())},l=$(null),u=d=>{var h;s("update",d),(h=r.value)==null||h.clearInternal()},c=(d,h)=>{ht(()=>{var f,p;d?(f=r.value)==null||f.focus():(p=r.value)==null||p.clearInternal()})};return(d,h)=>(q(),je(jf,{ref_key:"wrapperRef",ref:l,isUpdating:o.value,disabled:n.disabled||o.value,onOnVisibleChange:c},{trigger:we(({hide:f,disabled:p})=>[ye(St,{variant:n.variant,loading:o.value,disabled:p,onEscape:f},{default:we(()=>[ye(gt,{src:"UserPlus",class:"icon"}),h[2]||(h[2]=tt(" Assignee ",-1))]),_:1},8,["variant","loading","disabled","onEscape"])]),popup:we(({hide:f})=>[ye(oM,jt({ref_key:"assigneeGroupEditorRef",ref:r},n,{ids:e.ids,onUpdated:u,onUpdateStart:i,onUpdateFailed:h[0]||(h[0]=p=>a(!1)),onUpdateCompleted:h[1]||(h[1]=p=>a(!0,p)),onCancel:f}),null,16,["ids","onCancel"])]),default:we(()=>[h[3]||(h[3]=tt(" > ",-1))]),_:1},8,["isUpdating","disabled"]))}}),Kf=["start-input","due-input","prev-btn","month-btn","year-btn","next-btn","month-selection","year-selection","date-selection","today-btn","cancel-btn","save-btn"],GQ=new Set(["Tab","Enter","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),pl=(e,t)=>{const n=o=>{var s,r;if(o.key==="Tab"){const i=o.shiftKey||o.metaKey;o.preventDefault(),o.stopImmediatePropagation(),o.stopPropagation();const a=document.activeElement,l=(s=a==null?void 0:a.dataset)==null?void 0:s.index;if(l){let u=Kf.indexOf(l);const c=i?-1:1;for(const d of Kf){u=(u+c+Kf.length)%Kf.length;const h=Kf[u],f=document.querySelector(`[data-index="${h}"]`);if(f){f.focus();return}}}}else if(o.key==="Enter")(r=o.target)==null||r.dispatchEvent(new MouseEvent("click",{bubbles:!0}));else if(o.key==="Escape"){o.stopPropagation(),o.stopImmediatePropagation();const i=document.querySelector('[data-index="calendar-wrapper"]');i==null||i.focus()}};if(GQ.has(e.key))e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),n(e),t&&t(e);else return},UQ=["aria-label"],WQ=["disabled","readOnly","aria-label","data-date","data-weekday","tabindex","onClick"],zQ={style:{flex:"1"}},jQ=_t(ot({__name:"MainCalendar",props:QD({year:{},month:{},startDate:{},endDate:{},timezone:{default:"UTC"},activeField:{default:"start"},requireConfirm:{type:Boolean,default:!1},locale:{default:"en-US"},weekdayLabelStyle:{default:"narrow"},weekStart:{default:0},cancelLabel:{default:"Cancel"},confirmLabel:{default:"Confirm"},immediatelyUpdate:{type:Boolean,default:!1},disabled:{type:Boolean},readOnly:{type:Boolean},disableConfirm:{type:Boolean,default:!1},hasWarning:{type:Boolean,default:!0},disabledTooltip:{default:"This date is disabled"},parentConfig:{}},{tracingCase:{default:()=>({case:"",behavior:""})},tracingCaseModifiers:{}}),emits:QD(["select-start","select-end","select-start-utc","select-end-utc","update:activeField","update:tracingCase","update:month","update:year","close","confirm","cancel","gotoToday"],["update:tracingCase"]),setup(e,{expose:t,emit:n}){const o=Kt,s=$(null),r=e,i=X(()=>r.startDate&&r.endDate),a=az(e,"tracingCase"),l=n,u=$(r.year),c=$(r.month),d=X(()=>{var xe,ue,K;const A=Y=>Y==null?void 0:Y.toFormat("yyyy-MM-dd"),j=(xe=r.parentConfig)==null?void 0:xe.parentName,ne=(ue=r.parentConfig)==null?void 0:ue.parentStartDate,ge=(K=r.parentConfig)==null?void 0:K.parentDueDate;return{smaller:`Before the ${j} start date (${A(ne)})`,larger:`After the ${j} due date (${A(ge)})`,none:""}});Qe(()=>[r.year,r.month],([A,j])=>{u.value=A,c.value=j});const h=X(()=>lt.fromObject({year:u.value,month:c.value,day:1},{zone:r.timezone}).setLocale(r.locale||"en-US").toFormat("LLLL yyyy")),f=X(()=>lt.now().setZone(r.timezone)),p=X(()=>r.startDate?lt.fromJSDate(r.startDate,{zone:r.timezone}):null),g=X(()=>r.endDate?lt.fromJSDate(r.endDate,{zone:r.timezone}):null),v=$(p.value),w=$(g.value),S=$(p.value),b=$(g.value);Qe([p,g],()=>{r.requireConfirm||(v.value=p.value,w.value=g.value,S.value=p.value,b.value=g.value)},{immediate:!0});const y=X(()=>r.requireConfirm?v.value:p.value),E=X(()=>r.requireConfirm?w.value:g.value);Qe(()=>r.activeField,A=>{const j=A==="start"?y.value:E.value;j&&(u.value=j.year,c.value=j.month)}),Qe(()=>{var A,j;return[(A=y.value)==null?void 0:A.toISODate(),(j=E.value)==null?void 0:j.toISODate(),r.activeField]},()=>{const A=r.activeField==="start"?y.value:E.value;A&&(A.year!==u.value||A.month!==c.value)&&(u.value=A.year,c.value=A.month)});function _(A){return A.setZone("utc")}const I=$("");function T(A){I.value=A.toISODate()||"",ht(()=>{const j=document.querySelector(`.arbo-calendar-day[data-date="${I.value}"]`);j==null||j.focus()})}Qe(()=>{var A,j;return[u.value,c.value,r.activeField,(A=y.value)==null?void 0:A.toISODate(),(j=E.value)==null?void 0:j.toISODate()]},()=>{const A=r.activeField==="start"?y.value:E.value;let j;A&&A.year===u.value&&A.month===c.value?j=A:y.value&&y.value.year===u.value&&y.value.month===c.value?j=y.value:j=f.value,T(j)});function F(A){return A.toFormat("d")}const L=X(()=>{var G,J,ce,Ee,Ce,Ne,pe,H;const A=lt.fromObject({year:u.value,month:c.value,day:1},{zone:r.timezone}),j=A.weekday,ne=r.weekStart===1?(j+6)%7:j%7;let ge=A.minus({days:ne});const xe=[],ue=rd.weekdays(r.weekdayLabelStyle||"short",{locale:r.locale||"en-US"}),K=dm(),Y=(J=(G=r.parentConfig)==null?void 0:G.parentStartDate)==null?void 0:J.startOf("day").toMillis(),re=(Ee=(ce=r.parentConfig)==null?void 0:ce.parentDueDate)==null?void 0:Ee.endOf("day").toMillis();console.log("calculating classes for cursor:",{cursor:ge.toISODate(),parentStartMs:Y,parentDueMs:re,parentConfig:r.parentConfig});for(let W=0;W<42;W++){const be=[];ge.month!==c.value&&be.push(K["is-outside"]),ge.hasSame(f.value,"day")&&be.push(K["is-today"]),y.value&&ge.hasSame(y.value,"day")&&be.push(K["is-selected-start"]),E.value&&ge.hasSame(E.value,"day")&&be.push(K["is-selected-end"]),y.value&&E.value&&ge>y.value&&ge<E.value&&be.push(K["is-in-range"]);const Ae=F(ge),He=ue[ge.weekday-1]||"";let Te="none";const Xe=ge.startOf("day").toMillis();Y!==void 0&&Xe<Y?Te="smaller":re!==void 0&&Xe>re&&(Te="larger"),console.log("dayMs:",ge.startOf("day").toFormat("yyyy-MM-dd"),"parentStartMs:",(Ne=(Ce=r.parentConfig)==null?void 0:Ce.parentStartDate)==null?void 0:Ne.toFormat("yyyy-MM-dd"),"parentDueMs:",(H=(pe=r.parentConfig)==null?void 0:pe.parentDueDate)==null?void 0:H.toFormat("yyyy-MM-dd"),"resulting warning:",Te),xe.push({dt:ge,iso:ge.toISODate()||"",label:ge.toFormat("d"),displayLabel:Ae,weekdayLabel:He,aria:ge.setLocale(r.locale||"en-US").toFormat("cccc, d LLLL yyyy"),warning:Te,classes:be}),ge=ge.plus({days:1})}const R=[];for(let W=0;W<6;W++)R.push(xe.slice(W*7,W*7+7));return console.log("cells:",R),R}),x=X(()=>{const A=rd.weekdays(r.weekdayLabelStyle||"short",{locale:r.locale||"en-US"});return r.weekStart===1?A:[A[6],...A.slice(0,6)]});function P(A,j,ne){const ge=A==="start"?j.startOf("day"):j.endOf("day"),xe=_(ge),ue={year:ge.year,month:ge.month,day:ge.day,utc:xe.toISO()||""};A==="start"?(l("select-start",ue,ne??!0),l("select-start-utc",ue.utc)):(l("select-end",ue),l("select-end-utc",ue.utc))}function k(A){let j=u.value,ne=c.value+A;for(;ne<1;)ne+=12,j-=1;for(;ne>12;)ne-=12,j+=1;u.value=j,c.value=ne,l("update:year",j),l("update:month",ne)}function M(A){const ne=(I.value?lt.fromISO(I.value,{zone:r.timezone}):f.value).plus({days:A});ne.month===c.value&&ne.year===u.value&&T(ne)}function N(A=!1){const ne=(I.value?lt.fromISO(I.value,{zone:r.timezone}):f.value).weekday%7,ge=A?6-ne:-ne;M(ge)}const B=A=>{z(A)};function z(A){switch(A.preventDefault(),A.stopPropagation(),A.key){case"ArrowLeft":A.preventDefault(),M(-1);break;case"ArrowRight":A.preventDefault(),M(1);break;case"ArrowUp":A.preventDefault(),M(-7);break;case"ArrowDown":A.preventDefault(),M(7);break;case"Home":A.preventDefault(),N(!1);break;case"End":A.preventDefault(),N(!0);break;case"PageUp":A.preventDefault(),k(A.shiftKey?-12:-1);break;case"PageDown":A.preventDefault(),k(A.shiftKey?12:1);break;case"Enter":case" ":{A.preventDefault();const j=I.value?lt.fromISO(I.value,{zone:r.timezone}):f.value,ne=L.value.flat().find(ge=>ge.iso===j.toISODate());ne&&ie(ne);break}}}const oe=A=>{const j=lt.now().setZone(r.timezone);u.value=j.year,c.value=j.month,l("update:year",j.year),l("update:month",j.month),T(j),l("gotoToday")};function ie(A){var Ee,Ce;const j=!!p.value,ne=!!g.value,ge=r.activeField,xe=((Ee=p.value)==null?void 0:Ee.toISODate())||"null",ue=((Ce=g.value)==null?void 0:Ce.toISODate())||"null",K=A.dt.toISODate()||"",Y=(Ne,pe)=>{a.value={case:Ne,behavior:pe}},re=()=>`Selected start ${K} > existing end ${ue} -> reset both to ${K}`,R=()=>`Selected end ${K} < existing start ${xe} -> reset both to ${K}`,G=()=>{P("start",A.dt,!0),P("end",A.dt),l("update:activeField","end")},J=(Ne=!1)=>{P("start",A.dt,Ne),Ne&&l("update:activeField","end")},ce=(Ne=!1)=>{P("end",A.dt),Ne&&l("close")};if(j&&ne){ge==="start"?g.value&&A.dt>g.value?(G(),Y("INVERT_RANGE_FROM_START",re())):(J(!1),Y("UPDATE_START_IN_RANGE",`Updated start from ${xe} to ${K}; end remains ${ue}`)):p.value&&A.dt<p.value?(G(),Y("INVERT_RANGE_FROM_END",R())):(ce(!1),Y("UPDATE_END_IN_RANGE",`Updated end from ${ue} to ${K}; start remains ${xe}`));return}if(!j&&ne&&ge==="start"&&g.value&&A.dt>g.value){G(),Y("CREATE_RANGE_FROM_LATE_START",re());return}if(j&&!ne&&ge==="end"&&p.value&&A.dt<p.value){G(),Y("CREATE_RANGE_FROM_EARLY_END",R());return}if(!j&&!ne){if(ge==="start"){J(!0),Y("INIT_START",`Picked start ${K}; awaiting end selection`);return}ce(r.immediatelyUpdate),Y("INIT_END",`Picked end ${K}; awaiting start selection`);return}if(!j&&ne){if(ge==="start"){J(!0),Y("FILL_MISSING_START",`Inserted start ${K}; existing end ${ue}`);return}ce(!1),Y("STRICT_UPDATE_END_ONLY",`Updated end to ${K}; start still null`);return}if(j&&!ne){if(ge==="start"){J(!0),Y("RESELECT_START_BEFORE_END",`Replaced start with ${K}; end still null, switching to end`);return}ce(r.immediatelyUpdate),Y("FILL_MISSING_END",`Picked end ${K}; start ${xe}`);return}}function te(){S.value=v.value,b.value=w.value,l("confirm")}function se(){v.value=S.value,w.value=b.value,l("cancel")}function Z(){ht(()=>{var A;(A=s.value)==null||A.focus()})}return Xt(()=>{Z()}),t({focus:Z}),(A,j)=>(q(),de("div",{ref_key:"calendarRef",ref:s,class:le([A.$style["arbo-calendar"],{[A.$style["arbo-date-range-picker"]]:i.value}]),role:"grid","aria-label":h.value,tabindex:"0"},[Se("div",{class:le([A.$style["arbo-calendar-header"],A.$style["arbo-calendar-week"]]),role:"row"},[(q(!0),de(Pt,null,xn(x.value,ne=>(q(),de("div",{key:ne,class:le(A.$style["arbo-calendar-weekday"]),role:"columnheader"},at(ne),3))),128))],2),Se("div",{class:le(A.$style["arbo-calendar-weeks"]),"data-index":"date-selection",tabindex:"0",onKeydownCapture:j[0]||(j[0]=Ht(ne=>V(pl)(ne,B),["prevent","stop"]))},[(q(!0),de(Pt,null,xn(L.value,(ne,ge)=>(q(),de("div",{key:ge,class:le(A.$style["arbo-calendar-week"])},[(q(!0),de(Pt,null,xn(ne,xe=>ze((q(),de("button",{key:xe.iso,class:le([A.$style["arbo-calendar-day"],xe.classes,{[A.$style["is-focused"]]:xe.iso===I.value},{[A.$style["is-warning"]]:xe.warning!=="none"}]),disabled:r.disabled,readOnly:r.readOnly,"aria-label":xe.aria,"data-date":xe.iso,"data-weekday":xe.weekdayLabel,tabindex:xe.iso===I.value?0:-1,onClick:ue=>ie(xe)},[tt(at(xe.displayLabel),1)],10,WQ)),[[V(o),{content:r.disabled||r.readOnly?r.disabledTooltip:d.value[xe.warning],bypassOverflowCheck:!0}]])),128))],2))),128))],34),r.hasWarning?(q(),de("div",{key:0,class:le(A.$style["warning-selection"])},[ye(gt,{src:"InfoCircle",size:"16",color:"var(--tessr-snackbar-fg-warning, #F7941D)"}),j[2]||(j[2]=tt(" Outside the parent folder's date range. You can still confirm. ",-1))],2)):Ye("",!0),r.readOnly?Ye("",!0):(q(),de("div",{key:1,class:le(A.$style["arbo-calendar-actions"])},[Se("div",zQ,[ze((q(),je(St,{variant:"secondary",size:"medium",onClick:j[1]||(j[1]=ne=>oe()),onKeydown:V(pl),"data-index":"today-btn"},{prefix:we(()=>[ye(gt,{src:"CalendarDay"})]),_:1},8,["onKeydown"])),[[V(o),"Today"]])]),ye(St,{disabled:r.disabled,readOnly:r.readOnly,onKeydown:V(pl),variant:"secondary",size:"medium",onClick:se,"data-index":"cancel-btn"},{default:we(()=>[tt(at(r.cancelLabel),1)]),_:1},8,["disabled","readOnly","onKeydown"]),ye(St,{disabled:r.disabled||r.disableConfirm,readOnly:r.readOnly,variant:"primary",size:"medium","data-index":"save-btn",onKeydown:V(pl),onClick:te},{default:we(()=>[tt(at(r.confirmLabel),1)]),_:1},8,["disabled","readOnly","onKeydown"])],2))],10,UQ))}}),[["__cssModules",{$style:{"arbo-date-range-picker":"_arbo-date-range-picker_2hwrk_1","arbo-calendar-week":"_arbo-calendar-week_2hwrk_2","arbo-calendar-day":"_arbo-calendar-day_2hwrk_3","arbo-calendar":"_arbo-calendar_2hwrk_2","arbo-calendar-nav":"_arbo-calendar-nav_2hwrk_36","arbo-calendar-nav-btn":"_arbo-calendar-nav-btn_2hwrk_44","arbo-calendar-nav-label":"_arbo-calendar-nav-label_2hwrk_51","arbo-calendar-weekday":"_arbo-calendar-weekday_2hwrk_56","arbo-calendar-weeks":"_arbo-calendar-weeks_2hwrk_61","is-today":"_is-today_2hwrk_95","is-selected-start":"_is-selected-start_2hwrk_100","is-selected-end":"_is-selected-end_2hwrk_108","is-outside":"_is-outside_2hwrk_128","is-focused":"_is-focused_2hwrk_131","is-in-range":"_is-in-range_2hwrk_136","is-warning":"_is-warning_2hwrk_141","arbo-calendar-actions":"_arbo-calendar-actions_2hwrk_154","warning-selection":"_warning-selection_2hwrk_162","arbo-calendar-btn":"_arbo-calendar-btn_2hwrk_179",cancel:"_cancel_2hwrk_188",confirm:"_confirm_2hwrk_193"}}]]),KQ=["onClick"],qQ=["variant","onClick"],YQ=_t(ot({__name:"CalendarNavigationControl",props:{year:{},month:{},minYear:{default:1970},maxYear:{default:2100},yearSpan:{default:12},monthLabels:{},locale:{default:"en-US"},monthLabelStyle:{default:"short"},ariaPrevLabel:{default:"Previous"},ariaNextLabel:{default:"Next"},ariaToolbarLabel:{default:"Calendar navigation"},ariaSelectYearLabel:{default:"Select year"},ariaSelectMonthLabel:{default:"Select month"},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["update:year","update:month","mode-change","year-selected","month-selected"],setup(e,{expose:t,emit:n}){const o=e,s=X(()=>{if(o.monthLabels&&o.monthLabels.length===12)return o.monthLabels;const k=o.locale||"en-US",M=o.monthLabelStyle||"short",N=new Intl.DateTimeFormat(k,{month:M,timeZone:"UTC"});return Array.from({length:12},(z,oe)=>N.format(new Date(Date.UTC(2020,oe,1))))}),r=n,i=$(o.year),a=$(o.month),l=$(o.year);Qe(()=>o.year,k=>{k!==i.value&&(i.value=k,l.value=k)}),Qe(()=>o.month,k=>{k!==a.value&&(a.value=k)});const u=$("days");function c(k){u.value!==k&&(u.value=k,r("mode-change",k))}const d=X(()=>o.minYear),h=X(()=>o.maxYear),f=X(()=>{const k=o.yearSpan;return l.value-l.value%k}),p=X(()=>f.value+o.yearSpan-1);function g(){const k=o.yearSpan,M=f.value-k;M>=d.value&&(l.value=M)}function v(){const k=o.yearSpan,M=f.value+k;M<=h.value&&(l.value=M)}const w=X(()=>f.value-o.yearSpan<d.value),S=X(()=>p.value+o.yearSpan>h.value),b=X(()=>{const k=o.yearSpan;return Math.ceil(k/3)});function y(k){const N=f.value+(k-1)*3;return Array.from({length:3},(B,z)=>N+z).filter(B=>B<=p.value)}function E(){u.value==="months"?c("days"):c("months")}function _(){u.value==="years"?c("days"):c("years")}function I(k){i.value=k,l.value=k,r("update:year",k),r("year-selected",k),c("months")}function T(k){a.value=k,r("update:month",k),r("month-selected",k),c("days")}function F(){if(u.value==="days"){let k=i.value,M=a.value-1;if(M<1&&(M=12,k--),k<d.value)return;i.value=k,a.value=M,r("update:year",k),r("update:month",M)}else if(u.value==="months"){if(i.value-1<d.value)return;i.value--,r("update:year",i.value)}else u.value==="years"&&g()}function L(){if(u.value==="days"){let k=i.value,M=a.value+1;if(M>12&&(M=1,k++),k>h.value)return;i.value=k,a.value=M,r("update:year",k),r("update:month",M)}else if(u.value==="months"){if(i.value+1>h.value)return;i.value++,r("update:year",i.value)}else u.value==="years"&&v()}const x=X(()=>u.value==="days"?i.value===d.value&&a.value===1:u.value==="months"?i.value-1<d.value:w.value),P=X(()=>u.value==="days"?i.value===h.value&&a.value===12:u.value==="months"?i.value+1>h.value:S.value);return t({setNavigation:(k,M)=>{i.value=k,a.value=M}}),(k,M)=>(q(),de("div",{class:le([k.$style["cal-nav-wrapper"]])},[kt(k.$slots,"selection"),u.value==="days"?(q(),de("div",{key:0,class:le(k.$style["cal-nav-bar"]),"aria-label":"Calendar navigation"},[ye(St,{variant:"tertiary",class:le([k.$style["cal-nav-btn"],k.$style.prev]),"aria-label":"Previous",disabled:x.value,label:"",onClick:F,"data-index":"prev-btn",onKeydownCapture:po(Ht(F,["prevent","stop"]),["enter"]),onKeydown:V(pl)},{default:we(({hovered:N})=>[ye(gt,{src:"AnglesRight",source:"remote",color:N?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled","onKeydownCapture","onKeydown"]),Se("div",{class:le(k.$style["cal-nav-center"])},[ye(St,{"data-index":"month-btn",variant:"secondary",onClick:E,onKeydown:V(pl)},{default:we(()=>[tt(at(s.value[a.value-1]),1)]),_:1},8,["onKeydown"]),ye(St,{variant:"secondary",onClick:_,"data-index":"year-btn",onKeydown:V(pl)},{default:we(()=>[tt(at(i.value),1)]),_:1},8,["onKeydown"])],2),ye(St,{"data-index":"next-btn",variant:"tertiary",class:le([k.$style["cal-nav-btn"],k.$style.next]),"aria-label":"Next",disabled:P.value,label:"",onClick:L,onKeydownCapture:po(Ht(L,["prevent","stop"]),["enter"]),onKeydown:V(pl)},{default:we(({hovered:N})=>[ye(gt,{src:"AnglesRight",source:"remote",color:N?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled","onKeydownCapture","onKeydown"])],2)):Ye("",!0),u.value==="years"?(q(),de("div",{key:1,class:le(k.$style["year-grid"])},[Se("div",{class:le(k.$style["year-grid-header"])},[ye(St,{variant:"tertiary",class:le([k.$style["cal-nav-btn"],k.$style.prev]),"aria-label":"Next",disabled:w.value,"prefix-icon":"AnglesRight",label:"",onClick:g},{default:we(({hovered:N})=>[ye(gt,{src:"AnglesRight",source:"remote",color:N?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled"]),Se("div",{class:le(k.$style["range-label"])},at(f.value)+" - "+at(p.value),3),ye(St,{variant:"tertiary",class:le([k.$style["cal-nav-btn"],k.$style.next]),"aria-label":"Next",disabled:S.value,"prefix-icon":"AnglesRight",label:"",onClick:v},{default:we(({hovered:N})=>[ye(gt,{src:"AnglesRight",source:"remote",color:N?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled"])],2),Se("div",{class:le(k.$style["year-grid-body"]),role:"grid","data-index":"year-selection"},[(q(!0),de(Pt,null,xn(b.value,N=>(q(),de("div",{key:"yr-row-"+N,class:le(k.$style["year-grid-row"])},[(q(!0),de(Pt,null,xn(y(N),B=>(q(),de("a",{key:B,tabindex:"0",class:le([k.$style["year-cell"],{[k.$style.selected]:B===i.value}]),onClick:z=>I(B)},at(B),11,KQ))),128))],2))),128))],2)],2)):u.value==="months"?(q(),de("div",{key:2,class:le(k.$style["month-grid"]),"aria-label":"Select month","data-index":"month-selection"},[Se("div",{class:le(k.$style.months)},[(q(!0),de(Pt,null,xn(s.value,(N,B)=>(q(),de("a",{tabindex:"0",key:N,variant:B+1===a.value?"primary":"text",class:le([k.$style["month-cell"],{[k.$style.selected]:B+1===a.value}]),onClick:z=>T(B+1)},at(N),11,qQ))),128))],2)],2)):(q(),de("div",{key:3,class:le(k.$style["days-slot"])},[kt(k.$slots,"default",{year:i.value,month:a.value,mode:u.value})],2))],2))}}),[["__cssModules",{$style:{"cal-nav-wrapper":"_cal-nav-wrapper_mtd4w_1","cal-nav-bar":"_cal-nav-bar_mtd4w_12","cal-nav-btn":"_cal-nav-btn_mtd4w_20",prev:"_prev_mtd4w_33","year-grid-header":"_year-grid-header_mtd4w_37","cal-nav-center":"_cal-nav-center_mtd4w_46","cal-nav-label":"_cal-nav-label_mtd4w_52","month-grid":"_month-grid_mtd4w_66","year-grid":"_year-grid_mtd4w_37",months:"_months_mtd4w_75","month-cell":"_month-cell_mtd4w_82","year-cell":"_year-cell_mtd4w_83","pg-btn":"_pg-btn_mtd4w_105","year-grid-body":"_year-grid-body_mtd4w_118","year-grid-row":"_year-grid-row_mtd4w_125",selected:"_selected_mtd4w_131","days-slot":"_days-slot_mtd4w_137","range-label":"_range-label_mtd4w_141"}}]]);function XQ(e){const{format:t="dd/MM/yyyy",timezone:n="local",minDate:o,maxDate:s}=e,r=$(""),i=X(()=>{const g=lt.fromFormat(r.value,t,{zone:n});return g.isValid?g:null}),a=X(()=>{if(!o||!i.value)return!0;const g={year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()},v={year:i.value.year,month:i.value.month,day:i.value.day};return v.year>g.year?!0:v.year<g.year?!1:v.month>g.month?!0:v.month<g.month?!1:l(v,g)>=0}),l=(g,v)=>{const w=new Date(g.year,g.month-1,g.day),S=new Date(v.year,v.month-1,v.day);return w<S?-1:w>S?1:0},u=X(()=>{if(!s||!i.value)return!0;const g={year:s.getFullYear(),month:s.getMonth()+1,day:s.getDate()},v={year:i.value.year,month:i.value.month,day:i.value.day};return v.year<g.year?!0:v.year>g.year?!1:v.month<g.month?!0:v.month>g.month?!1:l(v,g)<=0}),c=X(()=>r.value.length==0||r.value.length>0&&i.value!==null&&a.value&&u.value),d=X(()=>r.value.length===t.length&&c.value);return{inputValue:r,isValid:c,isComplete:d,clear:()=>{r.value=""},setDate:g=>{let v;g instanceof Date?v=lt.fromJSDate(g,{zone:n}):v=g.setZone(n),v.isValid?r.value=v.toFormat(t):r.value=""},getDate:()=>c.value?i.value:null}}const ZQ={key:0,style:{marginLeft:"8px"}},JQ=["disabled","readonly","placeholder"],sM=_t(ot({__name:"DateInput",props:{modelValue:{},format:{default:"dd/MM/yyyy"},showDebug:{type:Boolean,default:!0},allowPastDates:{type:Boolean,default:!0},allowFutureDates:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},timezone:{default:""},placeholder:{default:""},size:{},minDate:{default:void 0},maxDate:{default:void 0},isMultipleDate:{type:Boolean,default:!1}},emits:["complete","invalid","clear","blur","tab"],setup(e,{expose:t,emit:n}){const o=Kt,s=e,r=n,i=$(null),a=$(null),{isValid:l,isComplete:u,inputValue:c,clear:d,setDate:h,getDate:f}=XQ({format:s.format,allowPastDates:s.allowPastDates,allowFutureDates:s.allowFutureDates,timezone:s.timezone,minDate:s.minDate,maxDate:s.maxDate}),p=X(()=>s.active),g=X(()=>({disabled:s.disabled,error:!l.value&&c.value.length>0,readOnly:s.readOnly,isEmpty:c.value.length===0,inputRef:i,wrapperRef:a,active:p})),{argsMain:v,isHover:w,isFocus:S}=xo(g),b=T=>{var L;const F=(L=T.clipboardData)==null?void 0:L.getData("text/plain");F&&(c.value=F.trim())},y=T=>{if(T.key==="Escape"){r("blur"),T.target.blur(),T.preventDefault(),T.stopPropagation(),T.stopImmediatePropagation();return}else T.key==="Tab"&&I(T)},E=()=>{d(),r("clear")};t({clear:E,setDate:h,getDate:f,focus:()=>{var T;return(T=i.value)==null?void 0:T.focus()}}),Qe(()=>s.modelValue,T=>{T?h(T):d()},{immediate:!0}),Qe([()=>u.value,()=>c.value],()=>{if(c.value.length===0)r("complete",null);else if(l.value&&!s.readOnly&&!s.disabled&&u.value){const T=f();(T||c.value.length===0)&&r("complete",T)}}),Qe(()=>l.value,T=>{T||r("invalid","")});const _=X(()=>!!s.isMultipleDate),I=T=>{T.preventDefault(),T.stopImmediatePropagation(),T.stopPropagation(),r("tab",T)};return(T,F)=>(q(),je(No,jt(V(v),{ref_key:"wrapperRef",ref:a,bordered:!0,actived:p.value,size:32,style:{padding:"0 4px 0 0",background:"#FAFAFA"}}),{default:we(()=>[Se("div",{class:le([T.$style["date-input-wrapper"]])},[_.value?(q(),de("span",ZQ," Multiple ")):ze((q(),de("input",{key:1,disabled:s.disabled,readonly:s.readOnly,ref_key:"inputRef",ref:i,type:"text","onUpdate:modelValue":F[0]||(F[0]=L=>mn(c)?c.value=L:null),onPaste:Ht(b,["prevent"]),placeholder:s.placeholder,class:le([T.$style["date-input"]]),onKeydown:y},null,42,JQ)),[[hI,V(c)]]),kt(T.$slots,"clear",{handleClear:E},()=>[(V(c).length>0||_.value)&&!s.readOnly&&!s.disabled&&(V(w)||V(S))?ze((q(),je(St,{key:0,variant:["icon","primary"],onClick:Ht(E,["stop"]),size:16,rounded:!0},{default:we(()=>[ye(gt,{src:"XMarkSolid",source:"remote",size:"8",color:"white"})]),_:1})),[[V(o),"Clear"]]):(q(),je(gt,{key:1,src:"Calendar",source:"remote",class:le(T.$style["icon-calendar"]),color:"var(--grey-200)"},null,8,["class"]))])],2)]),_:3},16,["actived"]))}}),[["__cssModules",{$style:{"date-input-wrapper":"_date-input-wrapper_132fk_1","icon-calendar":"_icon-calendar_132fk_9",focus:"_focus_132fk_12",hover:"_hover_132fk_12",active:"_active_132fk_12","date-input":"_date-input_132fk_1",invalid:"_invalid_132fk_38"}}]]),rM=(e,t)=>{if(e==null||e==="")return null;let n;return lt.isDateTime(e)?n=e.setZone(t):e instanceof Date?n=lt.fromJSDate(e,{zone:t}):typeof e=="number"?n=lt.fromMillis(e,{zone:t}):n=lt.fromISO(e,{zone:t}),n.isValid?n:null},QQ=ot({__name:"Calendar",props:{params:{},label:{},value:{},timezone:{default:lE()},format:{default:"LLL dd"},placeholder:{},enableRangeFeedback:{type:Boolean},messages:{},isCompleted:{type:Boolean},isStarted:{type:Boolean},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},size:{},duePlaceholder:{default:"Due"},startPlaceholder:{default:"Start"},startTooltip:{default:"Select start date"},dueTooltip:{default:"Select due date"},showCalendarIcon:{type:Boolean,default:!0},locale:{default:"en-US"},immediatelyUpdate:{type:Boolean,default:!1},multipleStartDates:{type:Boolean},multipleDueDates:{type:Boolean},parent_name:{},parentConfig:{}},emits:["clearStart","clearDue","clearAll","update","update:start","update:end","range:invalid","range:corrected","tracing","confirmed","closed","start-update","finish-update","tab"],setup(e,{expose:t,emit:n}){const o=$({case:"",behavior:""}),s=e,r=$(null),i=n,a=async(R,G)=>{i("start-update"),await R(),i("finish-update"),ht(()=>{var J,ce;G(),(ce=(J=s.params)==null?void 0:J.api)==null||ce.stopEditing()})},l=(R,G)=>{R(),ht(()=>{var J,ce;G(),(ce=(J=s.params)==null?void 0:J.api)==null||ce.stopEditing()})},u=()=>{var G;const R=lt.now().setZone(s.timezone);A.value=R.year,j.value=R.month,(G=Z.value)==null||G.setNavigation(R.year,R.month)},c=Fo({start:!1,end:!1}),{states:d,showMultipleStartDates:h,showMultipleDueDates:f,selectEndDate:p,cancelSelection:g,confirmSelection:v,selectStartDate:w,beginInteraction:S,clearStart:b,clearDue:y}=bJ(s,i),E=X(()=>{if(d.isSelectingStart)return"start";if(d.isSelectingEnd)return"end"});Qe(()=>s.multipleStartDates,R=>{h.value=!!R},{immediate:!0}),Qe(()=>s.multipleDueDates,R=>{f.value=!!R},{immediate:!0});const _=$(null),I=$(null),T=R=>{R.preventDefault(),R.stopImmediatePropagation(),R.stopPropagation(),ie()},F=()=>{var R;(R=I.value)==null||R.focus()},L=R=>{if(!R){c.start=!1,b();return}const G=d.endDate?lt.fromJSDate(d.endDate,{zone:s.timezone}):null;if(G&&x(R,G)>0){const ce={year:R.year,month:R.month,day:R.day};c.start=!1,w(ce,!1),p(ce),ht(()=>{d.isSelectingStart=!0,d.isSelectingEnd=!1});return}const J={year:R.year,month:R.month,day:R.day};c.start=!1,w(J,!0)},x=(R,G)=>{const J=R.startOf("day"),ce=G.startOf("day");return J<ce?-1:J>ce?1:0},P=R=>{var G;R.preventDefault(),R.stopImmediatePropagation(),R.stopPropagation(),(G=document.querySelector('[data-index="prev-btn"]'))==null||G.focus()},k=R=>{if(!R){c.end=!1,y();return}const G=d.startDate?lt.fromJSDate(d.startDate,{zone:s.timezone}):null;if(G&&x(R,G)<0){const ce={year:R.year,month:R.month,day:R.day};c.end=!1,w(ce),p(ce),ht(()=>{d.isSelectingEnd=!0,d.isSelectingStart=!1});return}const J={year:R.year,month:R.month,day:R.day};c.end=!1,p(J)},M=()=>{h.value=!1,b()},N=()=>{f.value=!1,y()},B=()=>{te()},z=X(()=>d.isSelectingStart||d.isSelectingEnd);function oe(){s.disabled||s.readOnly||(S(),d.isSelectingStart=!0,d.isSelectingEnd=!1,ht(()=>{var R;(R=r.value)==null||R.focus()}))}function ie(){s.disabled||s.readOnly||(S(),d.isSelectingEnd=!0,d.isSelectingStart=!1,ht(()=>{var R;(R=_.value)==null||R.focus()}))}function te(){d.isSelectingStart=!1,d.isSelectingEnd=!1,i("closed")}function se(R){R.key==="Escape"?(R.stopPropagation(),te()):R.key=="Tab"&&i("tab",R)}const Z=$(null),A=$(new Date().getFullYear()),j=$(new Date().getMonth()+1);Qe(()=>[d.isSelectingStart,d.isSelectingEnd,d.startDate,d.endDate],()=>{d.isSelectingStart&&d.startDate?(A.value=d.startDate.getFullYear(),j.value=d.startDate.getMonth()+1):d.isSelectingEnd&&d.endDate&&(A.value=d.endDate.getFullYear(),j.value=d.endDate.getMonth()+1)},{immediate:!0});const ne=$(null);function ge(){if(Array.isArray(s.value)){const[G,J]=s.value;d.startDate=G||null,d.endDate=J||null}d.isSelectingStart=!1,d.isSelectingEnd=!1;const R=d.startDate||d.endDate||new Date;A.value=R.getFullYear(),j.value=R.getMonth()+1}Qe(()=>{var R,G,J,ce,Ee,Ce,Ne,pe;return[((J=(G=(R=s.value)==null?void 0:R[0])==null?void 0:G.getTime)==null?void 0:J.call(G))||((ce=s.value)==null?void 0:ce[0]),((Ne=(Ce=(Ee=s.value)==null?void 0:Ee[1])==null?void 0:Ce.getTime)==null?void 0:Ne.call(Ce))||((pe=s.value)==null?void 0:pe[1]),s.timezone,s.format,s.placeholder,s.enableRangeFeedback]},()=>{ge()},{immediate:!0,deep:!0}),t({resetCalendarLogic:ge,openStart:oe,openEnd:ie,closePicker:te,clearAll:B,isOpen:z,drpRef:ne,getValues:()=>({startDate:d.startDate,endDate:d.endDate,dateRange:[d.startDate,d.endDate]}),focus:()=>{d.startDate||d.endDate?d.startDate?oe():ie():oe()}});const ue=$(null);Qe(()=>z.value,R=>{if(s.disabled||s.readOnly)return;const G=ue.value;G&&(R?G.show():G.hide())},{immediate:!0});const K=R=>lt.fromJSDate(R,{zone:s.timezone}),Y=X(()=>{var R,G,J;return{start:rM((R=s.parentConfig)==null?void 0:R.parentStartDate,s.timezone),due:rM((G=s.parentConfig)==null?void 0:G.parentDueDate,s.timezone),name:(J=s.parentConfig)==null?void 0:J.parentName}}),re=X(()=>{const{startDate:R,endDate:G}=d,J=Y.value.start,ce=Y.value.due,Ee=Ne=>!!(Ne&&J&&K(Ne).startOf("day")<J.startOf("day")),Ce=Ne=>!!(Ne&&ce&&K(Ne).startOf("day")>ce.startOf("day"));return Ee(R)||Ee(G)||Ce(R)||Ce(G)});return(R,G)=>(q(),de("div",{class:le(R.$style["calendar-wrapper"]),ref_key:"calendarWrapperRef",ref:I,onKeydown:se,tabindex:"1","data-index":"calendar-wrapper"},[ye(YQ,{year:A.value,"onUpdate:year":G[6]||(G[6]=J=>A.value=J),month:j.value,"onUpdate:month":G[7]||(G[7]=J=>j.value=J),locale:s.locale,disabled:s.disabled,readOnly:s.readOnly,ref_key:"navigationRef",ref:Z},{selection:we(()=>[Se("div",{class:le(R.$style["calendar-input-section"])},[ye(sM,{ref_key:"starDateRef",ref:r,"model-value":V(d).startDate,placeholder:s.startPlaceholder,timezone:s.timezone,active:V(d).isSelectingStart,onClick:oe,onClear:M,onComplete:L,onInvalid:G[0]||(G[0]=J=>c.start=!0),disabled:s.disabled,readOnly:s.readOnly,onBlur:F,onTab:T},null,8,["model-value","placeholder","timezone","active","disabled","readOnly"]),ye(sM,{ref_key:"endDateRef",ref:_,"model-value":V(d).endDate,placeholder:s.duePlaceholder,timezone:s.timezone,active:V(d).isSelectingEnd,onClick:ie,onClear:N,disabled:s.disabled,onComplete:k,onInvalid:G[1]||(G[1]=J=>c.end=!0),readOnly:s.readOnly,isMultipleDate:V(f),onTab:P},null,8,["model-value","placeholder","timezone","active","disabled","readOnly","isMultipleDate"])],2)]),default:we(({year:J,month:ce})=>[ye(jQ,{disabled:s.disabled,"has-warning":re.value,disableConfirm:c.end||c.start,readOnly:s.readOnly,ref_key:"drpRef",ref:ne,"tracing-case":o.value,"onUpdate:tracingCase":G[2]||(G[2]=Ee=>o.value=Ee),year:J,month:ce,"start-date":V(d).startDate,"end-date":V(d).endDate,"active-field":E.value,timezone:s.timezone,parentConfig:s.parentConfig,immediatelyUpdate:e.immediatelyUpdate,onSelectStart:V(w),onSelectEnd:V(p),onGotoToday:u,onConfirm:G[3]||(G[3]=()=>{a(V(v),te)}),onCancel:G[4]||(G[4]=Ee=>l(V(g),te)),onClose:G[5]||(G[5]=Ee=>a(V(v),te))},null,8,["disabled","has-warning","disableConfirm","readOnly","tracing-case","year","month","start-date","end-date","active-field","timezone","parentConfig","immediatelyUpdate","onSelectStart","onSelectEnd"])]),_:1},8,["year","month","locale","disabled","readOnly"])],34))}}),Nv=_t(QQ,[["__cssModules",{$style:{"calendar-wrapper":"_calendar-wrapper_k2sex_1","calendar-input-section":"_calendar-input-section_k2sex_11","display-wrapper":"_display-wrapper_k2sex_19","calendar-actions":"_calendar-actions_k2sex_23","clear-all-btn":"_clear-all-btn_k2sex_29"}}]]),Lv=Ja("entity",()=>{const e=$(null);function t(i){e.value=i}const n=X(()=>{var i;return((i=e.value)==null?void 0:i.name)??""}),o=X(()=>{var i;return((i=e.value)==null?void 0:i.start_date)??""}),s=X(()=>{var i;return((i=e.value)==null?void 0:i.due_date)??""}),r=X(()=>{const i=e.value;return{parentName:(i==null?void 0:i.name)??null,parentStartDate:i!=null&&i.start_date?lt.fromJSDate(new Date(i==null?void 0:i.start_date)):null,parentDueDate:i!=null&&i.due_date?lt.fromJSDate(new Date(i==null?void 0:i.due_date)):null}});return{entityData:e,setEntityData:t,entityName:n,entityStartDate:o,entityEndDate:s,parentConfig:r}}),eee=ot({__name:"DateUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{},rowSelected:{},disabled:{type:Boolean},selectedAll:{type:Boolean}},emits:["updated","update-start","update-completed","update-failed"],setup(e,{emit:t}){const n=t,o=e,s=Dn("isSelectAll",$(!1)),r=Dn("bulkUpdate",$(!1)),i=X(()=>!!o.entityId&&r.value&&s.value),{apiServices:a}=so(!r.value,o),l=Dn("filterParams",null),u=$(null),c=async L=>{var x,P,k,M;try{y.value=!0,n("update-start");let N={workspaceId:o.workspaceId,entityId:o.entityId,itemIds:o.ids,startDate:void 0,dueDate:void 0,filterParams:l!=null&&l.value?l.value:void 0};"start"in L&&(N.startDate=L.start?Tv(L.start):null),"end"in L&&(N.dueDate=L.end?Tv(L.end):null),i.value?(N.itemIds=void 0,N.entityId=o.entityId):N.entityId=void 0;const B=await((P=(x=a.value)==null?void 0:x.changeDate)==null?void 0:P.call(x,N));n("updated",{workspaceId:o.workspaceId,itemIds:o.ids,data:N}),n("update-completed",B),(k=u.value)==null||k.hide()}catch(N){console.error("Failed to update dates:",N),ht(()=>{ht(()=>{var B;n("update-failed"),(B=u.value)==null||B.open()})})}finally{(M=S.value)==null||M.resetCalendarLogic(),y.value=!1}},d=()=>{if(!o.rowSelected||o.rowSelected.length===0){h();return}o.rowSelected.length===1?f():p()},h=()=>{w.value=!1,v.value=!1,b.value=[null,null]},f=()=>{const x=o.rowSelected[0].dateRange;b.value=[(x==null?void 0:x[0])??null,(x==null?void 0:x[1])??null],w.value=!1,v.value=!1},p=()=>{var x,P;if(o.rowSelected.some(k=>k.dateRange&&(k.dateRange[0]!==null||k.dateRange[1]!==null))){const k=g(0),M=g(1);if(v.value=k,w.value=M,k)b.value[0]=null;else{const N=((x=o.rowSelected[0].dateRange)==null?void 0:x[0])??null;b.value[0]=N}if(M)b.value[1]=null;else{const N=((P=o.rowSelected[0].dateRange)==null?void 0:P[1])??null;b.value[1]=N}}else v.value=!1,w.value=!1,b.value=[null,null]},g=L=>{const x=o.rowSelected.map(k=>{var M;return(M=k.dateRange)==null?void 0:M[L]});return x.length===0?!1:new Set(x.map(k=>{var M;return(M=k==null?void 0:k.getTime)==null?void 0:M.call(k)})).size>1},v=$(!1),w=$(!1),S=$(null),b=$([null,null]);Qe([()=>o.ids,()=>o.rowSelected],L=>{d(),ht(()=>{var x;(x=S.value)==null||x.focus()})},{immediate:!0,deep:!0});const y=$(!1),E=()=>{y.value=!0},_=()=>{ht(()=>{setTimeout(()=>{y.value=!1},500)})},I=(L,x)=>{L&&ht(()=>{var P;(P=S.value)==null||P.focus()})},T=Lv(),{parentConfig:F}=go(T);return(L,x)=>(q(),je(jf,{ref_key:"wrapperRef",ref:u,isUpdating:y.value,disabled:o.disabled||y.value,onOnVisibleChange:I},{trigger:we(({hide:P,disabled:k})=>[ye(St,{variant:o.variant,loading:y.value,disabled:k,onEscape:P},{default:we(()=>[ye(gt,{src:"Calendar"}),x[0]||(x[0]=tt(" Date ",-1))]),_:1},8,["variant","loading","disabled","onEscape"])]),popup:we(({isVisible:P,hide:k})=>[P?(q(),je(Nv,{key:0,"parent-config":V(F),immediatelyUpdate:!1,value:b.value,onConfirmed:c,ref_key:"calendarRef",ref:S,onClosed:k,onStartUpdate:E,onFinishUpdate:_,multipleDueDates:w.value,multipleStartDates:v.value},null,8,["parent-config","value","onClosed","multipleDueDates","multipleStartDates"])):Ye("",!0)]),default:we(()=>[x[1]||(x[1]=tt(" > ",-1))]),_:1},8,["isUpdating","disabled"]))}}),tee=e=>{if(Number(e.metric_type.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number(e.metric_type.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number(e.metric_type.id)==3)return"formula"},iM=Ja("metricStore",()=>{const e=$();return{metricList:e,setMetricList:o=>{e.value=o},checkEditType:o=>{var s;if(((s=o==null?void 0:o.auth_permission)==null?void 0:s.permission)==2)return tee(o)}}}),nee=["onKeydown"],oee=["width","height","viewBox"],see=["d"],ree="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z",aM=ot({__name:"RatingComponent",props:{params:{default:()=>({maxRating:5,readOnly:!1,disabled:!1})},modelValue:{},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},emits:["update","update:modelValue","change","handleEnter","cancel"],setup(e,{expose:t,emit:n}){const o=e,s=n,r=$(o.modelValue??0),i=$(null),a=X(()=>{var x;return((x=o.params)==null?void 0:x.size)??24}),l=X(()=>{var x;return((x=o.params)==null?void 0:x.iconViewBox)??"0 0 24 24"}),u=X(()=>{var x;return((x=o.params)==null?void 0:x.iconPath)??ree}),c=X(()=>{var x;return((x=o.params)==null?void 0:x.wrapperTag)??"span"}),d=X(()=>{var x;return o.disabled||((x=o.params)==null?void 0:x.disabled)||!1}),h=X(()=>{var x;return o.readOnly||((x=o.params)==null?void 0:x.readOnly)||!1}),f=X(()=>!d.value&&!h.value),p=X(()=>d.value?"not-allowed":h.value?"default":"pointer");Qe(()=>o.modelValue,x=>{typeof x=="number"&&x!==r.value&&(r.value=x)});const g=x=>{var P;return((P=o.params)==null?void 0:P.maxRating)-x+1<=r.value&&!v.value},v=$(!1),w=()=>{v.value=!0},S=()=>{v.value=!1},b=x=>{f.value&&y(x)},y=x=>{var k,M;if(!f.value)return;let P=((k=o.params)==null?void 0:k.maxRating)-x+1;P===r.value&&(P=0),r.value=P,s("update:modelValue",P),s("update",P),s("change",P),(M=o.params)!=null&&M.onUpdate&&o.params.onUpdate(P)},E=x=>{var P;x!==r.value&&(r.value=x,s("update:modelValue",x),s("update",x),s("change",x),(P=o.params)!=null&&P.onUpdate&&o.params.onUpdate(x),_.value=x)},_=$(r.value),I=x=>{x.preventDefault(),x.stopPropagation(),x.stopImmediatePropagation(),r.value=_.value,s("cancel")},T=x=>{x.preventDefault(),E(r.value),s("handleEnter",r.value)},F=()=>{f.value&&(r.value=Math.min(r.value+1%(o.params.maxRating+1),o.params.maxRating),E(r.value))},L=()=>{f.value&&(r.value=Math.max(r.value-1,0),E(r.value))};return t({focus:()=>{var x;(x=i.value)==null||x.focus()}}),(x,P)=>(q(),de("div",{class:le(["rating-component",{"rating-component--disabled":d.value,"rating-component--readOnly":h.value}]),style:hn({"--max-rating":e.params.maxRating}),ref_key:"ratingRef",ref:i,tabindex:"1",onKeydown:[po(Ht(L,["prevent"]),["left"]),po(Ht(F,["prevent"]),["right"]),po(Ht(L,["prevent"]),["down"]),po(Ht(F,["prevent"]),["up"]),po(Ht(T,["prevent"]),["enter"]),po(Ht(T,["prevent"]),["tab"]),po(Ht(I,["prevent"]),["escape"])]},[(q(!0),de(Pt,null,xn(e.params.maxRating,k=>(q(),je(OC(c.value),{key:k,class:le(["rating-item",{filled:g(k),"rating-item--disabled":d.value,"rating-item--readOnly":h.value}]),style:hn({cursor:p.value,order:e.params.maxRating-k,height:a.value+"px",width:a.value+"px"}),"aria-checked":g(k),"aria-disabled":d.value,"aria-readOnly":h.value,title:e.params.maxRating-k+1,tabindex:-1,onClick:Ht(M=>b(k),["prevent","stop"]),onMouseenter:w,onMouseleave:S},{default:we(()=>[kt(x.$slots,"icon",{index:k,filled:g(k),size:a.value,iconViewBox:l.value,disabled:d.value,readOnly:h.value,value:k},()=>[(q(),de("svg",{class:"rating-icon",width:a.value,height:a.value,viewBox:l.value,"aria-hidden":"true",focusable:"false"},[Se("path",{d:u.value},null,8,see)],8,oee))]),kt(x.$slots,"overlay",{index:k,filled:g(k),disabled:d.value,readOnly:h.value})]),_:2},1064,["class","style","aria-checked","aria-disabled","aria-readOnly","title","onClick"]))),128))],46,nee))}}),iee={style:{maxWidth:"180px",lineHeight:"15px"}},aee=["innerHTML"],lM=ot({__name:"MetricEditorDropdown",props:{config:{},modelValue:{}},emits:["update:modelValue","change","close","handleCancel"],setup(e,{expose:t,emit:n}){const o=Kt,s=e,r=n,i=()=>{r("handleCancel")},a=()=>{r("close")},l=v=>{var w;if(v.format_type==="dropdown"&&v.format_value)try{const S=JSON.parse(v.format_value);if(Array.isArray(S)){const b=S.map(y=>({label:y.name,value:y.name,id:y.name}));return b.unshift({label:"-",value:void 0,id:"-"}),b}}catch(S){console.error("Failed to parse dropdown options",S)}if(v.format_type=="number"&&v.restricted_type=="exact"){const S=((w=v.restricted_value)==null?void 0:w.split(",").map(b=>({label:v.mapping[`!${b}`]||b,value:b,id:b})))||[];return S.unshift({label:"-",value:void 0,id:"-"}),S}return[]},u=X(()=>l(s.config)),c=$(s.modelValue),d=v=>{c.value=v,r("update:modelValue",v),r("change",v||null)},h=$(u.value),f=$(!1),p=v=>{f.value=!0,v?h.value=u.value.filter(w=>w.label.toLowerCase().includes(v.toLowerCase())):h.value=u.value,setTimeout(()=>{f.value=!1},300)},g=$(null);return Xt(()=>{var v;(v=g.value)==null||v.focus()}),t({focus:()=>{var v;(v=g.value)==null||v.focus()}}),(v,w)=>(q(),je(ya,{style:{width:326},loading:f.value,options:h.value,"selected-id":e.modelValue||void 0,onSearch:p,onSelect:w[0]||(w[0]=S=>d(S.id)),ref_key:"searchListRef",ref:g,onClose:a,onCancel:i},{item:we(({item:S,getHighlightedLabel:b,selectedIndex:y,index:E})=>[ye(fl,{hover:y==E,selected:S.value===e.modelValue,label:S.label,onSelect:_=>d(S.value||null),onClick:_=>d(S.value||null)},{label:we(()=>[Se("div",iee,[ze(Se("span",{innerHTML:b(S.label)},null,8,aee),[[V(o),{content:S.label}]])])]),_:2},1032,["hover","selected","label","onSelect","onClick"])]),"empty-list":we(()=>[...w[1]||(w[1]=[tt("No options available.",-1)])]),_:1},8,["loading","options","selected-id"]))}}),lee={class:"metric-input-wrapper"},uee={key:0,class:"error-text input-2"},uM=ot({__name:"MetricEditorInput",props:{config:{},modelValue:{},saveOnBlur:{type:Boolean,default:!0},saveOnEscape:{type:Boolean,default:!1},showInlineError:{type:Boolean,default:!1}},emits:["update:modelValue","handleChange","cancel","enter","onValidation"],setup(e,{expose:t,emit:n}){const o=Kt,s=e,r=$(s.modelValue),i=$(s.modelValue),a=$(!1),l=$(!0),u=$(""),c=X(()=>{var N;const M=Number.parseInt(String((N=s.config)==null?void 0:N.format_value)||"2",10);return Number.isFinite(M)&&M>=0?M:2}),d=M=>{if(!M)return M;const N=String(M).split(".");return N.length>1&&N[1].length>c.value?c.value===0?N[0]:`${N[0]}.${N[1].slice(0,c.value)}`:String(M)},h=M=>{const N=d(M);N!==M&&b.value?r.value=N:r.value=M},f=M=>{const N=M.target;if(!N)return;const B=N.value||"",z=B.indexOf(".");if(M.key==="."&&c.value===0){M.preventDefault();return}z!==-1&&/[0-9]/.test(M.key)&&B.slice(z+1).length>=c.value&&M.preventDefault()},p=X(()=>l.value||s.showInlineError?{content:""}:{content:u.value,placement:"top",theme:"error",trigger:"mouseenter focus",hideOnClick:!1,interactive:!0,showOnCreate:!0,alwayShow:!0,maxWidth:"200px"}),g=()=>{var se;const M=s.config.restricted_type.trim(),N=((se=s.config.restricted_value)==null?void 0:se.split(",").map(Number))||[],[B,z]=N,ie={range:`Enter a value between ${B} and ${z}`,not:`These values are not allowed: ${N.join(", ")}`,exact:"Value is not allowed"}[M];return l.value?"":ie},v=X(()=>{var N;let M="";return Number((N=s.config)==null?void 0:N.format_value)&&(M+="."+Array.from({length:Number(s.config.format_value)}).map(()=>"0").join("")),`0${M}`});Qe(()=>s.modelValue,M=>{r.value=M,i.value=M});const w=M=>bv(s.config,M),S=n,b=$(null),y=M=>{const N=M===""?null:M,B=i.value===""?null:i.value;return N!==B},E=M=>{const N=d(M);if(!y(N))return!1;const B=N===""?null:N;return r.value=B,i.value=B,S("update:modelValue",B),S("handleChange",B),!0},_=()=>{r.value=i.value,S("update:modelValue",i.value)},I=(M,N)=>{E(M),S("enter")},T=(M,N)=>{if(a.value){a.value=!1;return}s.saveOnBlur?E(M):_()},F=M=>{if(M===null||M===""){l.value=!0;return}l.value=bv(s.config,Number(M)),u.value=l.value?"":g()},L=(M,N)=>{a.value=!0,s.saveOnEscape?E(M):_(),S("cancel"),setTimeout(()=>{a.value=!1},100)},x=M=>{F(M),S("onValidation",M)},P=()=>{a.value=!0,_(),S("cancel"),setTimeout(()=>{a.value=!1},100)},k=()=>{var M;r.value=null,i.value=null,S("update:modelValue",null),S("handleChange",null),(M=b.value)==null||M.focus()};return t({focus:()=>{var M;return(M=b.value)==null?void 0:M.focus()},blur:()=>{var M;return(M=b.value)==null?void 0:M.blur()},getValue:()=>r.value,getCachedValue:()=>i.value,save:()=>E(r.value),revert:_}),Xt(()=>{var M;(M=b.value)==null||M.focus()}),(M,N)=>ze((q(),de("div",lee,[ye(hl,{maxDecimalChar:c.value,modelValue:r.value,"onUpdate:modelValue":N[0]||(N[0]=B=>r.value=B),placeholder:v.value,validatorFnc:w,style:{"--bg-input":"#FAFAFA"},onInput:h,onKeydown:f,onEnter:I,onBlur:T,onClear:k,onEscape:L,onCancel:P,onOnValidation:x,type:"number",autoEmit:!1,submitOnEnter:!0,blurOnEscape:!1,ref_key:"inputRef",ref:b},null,8,["maxDecimalChar","modelValue","placeholder"]),!l.value&&e.showInlineError?(q(),de("span",uee,at(u.value),1)):Ye("",!0)])),[[V(o),p.value]])}}),cee={key:2},dee={class:"wrapper-suffix"},hee={key:3},fee=_t(ot({__name:"MetricEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},config:{},attachTo:{},focus:{type:Boolean}},emits:["enter","cancel","blur","updateMetric"],setup(e,{expose:t,emit:n}){const o=Kt,s=e,r=$(null),i=$(0),a=$(null),l=$(null),u=X(()=>TO(s.config)),c=$(!1),d=X(()=>!!ne.value),h=n,f=()=>{c.value=!1,j(),h("cancel")},p=$(!0),g=ue=>{if(ue===null||ue===""){p.value=!0;return}if(u.value!=="number"){p.value=!0;return}p.value=bv(s.config,Number(ue)),w.value=S()},v=()=>{c.value=!0,z()},w=$(""),S=()=>{var ce;const ue=s.config.restricted_type.trim(),K=((ce=s.config.restricted_value)==null?void 0:ce.split(",").map(Number))||[],[Y,re]=K,G={range:`Enter a value between ${Y} and ${re}`,not:`These values are not allowed: ${K.join(", ")}`,exact:"Value is not allowed"}[ue];return p.value?"":G},b=X(()=>{var K;const ue=Number.parseInt(String((K=s.config)==null?void 0:K.format_value)||"2",10);return Number.isFinite(ue)&&ue>=0?ue:2}),y=ue=>{c.value=!0,r.value=ue},E=()=>{c.value=!0,j(),z()},_=ue=>{i.value=ue,c.value=!0,z()},I=()=>(s.config.format_symbol||"BoltSolid").split(/[\s-_]+/).map(K=>K.charAt(0).toUpperCase()+K.slice(1)).join("").replace(/Outline|Solid/g,""),T=$(null),F=$(!0),L=X(()=>{var ue;return{disabled:s.disabled,error:!1,readOnly:!1,isEmpty:((ue=r.value)==null?void 0:ue.length)===0,wrapperRef:Z,active:d,focus:s.focus,bordered:!0}}),x=$(null),P=X(()=>F.value),k=X(()=>({disabled:s.disabled,error:!1,readOnly:!1,isEmpty:i.value===0,wrapperRef:x,active:P,focus:F.value,bordered:!0})),{argsMain:M}=xo(k),{argsMain:N}=xo(L),B=$(null),z=()=>{ht(()=>{var ue;(ue=B.value)==null||ue.focus()})},oe=ue=>{var K;if(ue.format_type==="dropdown"&&ue.format_value)try{const Y=JSON.parse(ue.format_value);if(Array.isArray(Y))return Y.map(re=>({label:re.name,value:re.name,id:re.name}))}catch(Y){console.error("Failed to parse dropdown options",Y)}return ue.format_type=="number"&&ue.restricted_type=="exact"?((K=ue.restricted_value)==null?void 0:K.split(",").map(re=>({label:ue.mapping[`!${re}`]||re,value:re,id:re})))||[]:[]},ie=X(()=>oe(s.config)),te=X(()=>{var ue;return((ue=ie.value.find(K=>K.value===r.value))==null?void 0:ue.label)||r.value||"-"}),se=()=>{var ue;if(u.value=="rating")h("updateMetric",i.value==0?null:i.value);else if(u.value=="number"){const K=(ue=l.value)==null?void 0:ue.getValue();h("updateMetric",K||null)}else h("updateMetric",r.value||null);c.value=!1,j()},{triggerRef:Z,popupRef:A,hide:j,isVisible:ne,show:ge}=vo({toggleOnClick:!0,appendTo:()=>s.attachTo||"parent",zIndex:1e4,offset:[0,0]}),xe=()=>{switch(u.value){case"number":ht(()=>{var ue;(ue=l.value)==null||ue.focus()});break;case"dropdown":ge(),ht(()=>{var ue;(ue=T.value)==null||ue.focus()});break;case"rating":F.value=!0,ht(()=>{var ue;(ue=a.value)==null||ue.focus()});break}};return t({resetState:()=>{r.value=null,i.value=0,c.value=!1},focus:xe,hasChanges:()=>c.value}),Xt(()=>{ht(()=>{setTimeout(()=>{xe()},300)})}),(ue,K)=>(q(),de("div",{class:le(ue.$style["metric-editor"])},[u.value=="number"?(q(),je(uM,{key:0,config:s.config,modelValue:r.value,"onUpdate:modelValue":K[0]||(K[0]=Y=>r.value=Y),style:{width:"100%"},saveOnBlur:!0,saveOnEscape:!1,"show-inline-error":!0,onCancel:f,onOnValidation:g,onEnter:v,onHandleChange:y,maxDecimalChar:b.value,ref_key:"metricEditorInputRef",ref:l},null,8,["config","modelValue","maxDecimalChar"])):u.value=="rating"?(q(),je(No,jt({key:1,"tab-index":1},V(M),{ref_key:"triggerRef2",ref:x,bordered:!0,style:{"--box-padding":"0 ","--icon-size":"18px",background:"#FAFAFA"}}),{default:we(()=>[ye(aM,{params:{maxRating:s.config.range},modelValue:i.value,"onUpdate:modelValue":K[1]||(K[1]=Y=>i.value=Y),onHandleEnter:_,onCancel:f,ref_key:"ratingComponentRef",ref:a},{icon:we(()=>[ye(gt,{source:"rating",src:I()||"Star",size:17},null,8,["src"])]),_:1},8,["params","modelValue"])]),_:1},16)):u.value=="dropdown"?(q(),de("div",cee,[ye(No,jt(V(N),{ref_key:"triggerRef",ref:Z,bordered:!0,style:{"--box-padding":"0 4px 0 4px","--icon-size":"18px",background:"#FAFAFA"}}),{suffix:we(({})=>[Se("div",dee,[ye(gt,{src:"ChevronDown",color:"#A6A6A6",size:"12"})])]),default:we(()=>[ze((q(),de("span",null,[tt(at(te.value||""),1)])),[[V(o),{content:te.value}]])]),_:1},16),Se("div",{ref_key:"popupRef",ref:A},[V(ne)?(q(),je(lM,{key:0,ref_key:"metricEditorDropdownRef",ref:T,config:s.config,modelValue:r.value,"onUpdate:modelValue":K[2]||(K[2]=Y=>r.value=Y),onChange:E,onCancel:f},null,8,["config","modelValue"])):Ye("",!0)],512)])):(q(),de("span",hee,"Formular")),ze((q(),je(St,{ref_key:"confirmButtonRef",ref:B,onHandleClick:se,"tab-index":"1",onKeypress:[po(Ht(xe,["shift","prevent"]),["tab"]),po(Ht(f,["prevent"]),["escape"])],disabled:!p.value},{default:we(()=>[ye(gt,{src:"Check"})]),_:1},8,["onKeypress","disabled"])),[[V(o),"Update"]])],2))}}),[["__cssModules",{$style:{"metric-editor":"_metric-editor_18l4p_1","dropdown-trigger":"_dropdown-trigger_18l4p_10"}}]]),pee=_t(ot({__name:"MetricBulkItem",props:{label:{},morpheme:{},type:{},config:{},attachTo:{}},emits:["loseFocus","open","handleUpdate","focusOnSearch","openSibling"],setup(e,{expose:t,emit:n}){const o=Kt,s=e,r=n,i=$(!1),a=$(null),l=$(null),u=()=>{i.value=!i.value},c=()=>{var g;i.value=!1,(g=l.value)==null||g.resetState()},d=async()=>{var g;i.value=!0,await ht(),(g=l.value)==null||g.focus()},h=g=>{r("handleUpdate",{id:s.config.id.toString(),value:g})},f=()=>{var g;(g=a.value)==null||g.focus(),r("loseFocus")},p=g=>{const w={Escape:()=>{g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation(),r("focusOnSearch",g)},Tab:()=>{i.value&&c()},Enter:()=>{i.value||d()},ArrowDown:()=>{r("openSibling","down")},ArrowUp:()=>{r("openSibling","up")}}[g.key];w&&w()};return Qe(i,g=>{g&&r("open")}),t({hide:c,show:d}),(g,v)=>(q(),de("div",{class:le([g.$style["metric-item"],i.value?g.$style.open:""]),tabindex:"0",ref_key:"metricRef",ref:a,onKeydown:p},[Se("div",{class:le(g.$style["metric-label"]),onClick:Ht(u,["stop"])},[kt(g.$slots,"default",{open:i.value},()=>[ze((q(),de("span",{class:le(g.$style["metric-name"])},[tt(at(e.label),1)],2)),[[V(o),{content:e.label}]]),e.morpheme&&i.value?(q(),de("small",{key:0,class:le(g.$style["metric-morpheme"])}," ("+at(e.morpheme)+") ",3)):Ye("",!0)])],2),ye(Xz,{mode:"out-in",name:"slide"},{default:we(()=>[i.value?(q(),je(fee,{key:`editor-${e.config.id}`,"read-only":!1,focus:i.value,type:e.type,config:e.config,"attach-to":e.attachTo,ref_key:"metricEditorRef",ref:l,onCancel:f,onUpdateMetric:h},null,8,["focus","type","config","attach-to"])):Ye("",!0)]),_:1})],34))}}),[["__cssModules",{$style:{"metric-item":"_metric-item_18ft8_1","metric-label":"_metric-label_18ft8_11",open:"_open_18ft8_19","metric-name":"_metric-name_18ft8_23","metric-morpheme":"_metric-morpheme_18ft8_29"}}]]);function cM(e,t){return function(){return e.apply(t,arguments)}}const{toString:gee}=Object.prototype,{getPrototypeOf:wa}=Object,{iterator:qf,toStringTag:dM}=Symbol,Ca=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),hM=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),Vv=(e,t,n)=>e===Object.prototype||!n&&t===null,mee=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(n=>{if(hM(n))return!1;const o=Object.getOwnPropertyDescriptor(e,n);return!!o&&o.configurable&&o.writable===!0})},DE=(e,t)=>{let n=e;const o=[];for(;n!=null;){if(o.indexOf(n)!==-1)return!1;o.push(n);const s=wa(n);if(Vv(n,s,n===e))return!1;if(Ca(n,t))return!0;n=s}return!1},vee=(e,t)=>e!=null&&DE(e,t)?e[t]:void 0,yee=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=wa(e);if(t===null&&mee(e))return e;const n=Object.create(null),o=Object.create(null),s=[];let r=e;for(;r!=null&&s.indexOf(r)===-1;){s.push(r);const i=r===e?t:wa(r);if(Vv(r,i,r===e))break;const a=Object.getOwnPropertyNames(r);Object.getOwnPropertySymbols&&a.push(...Object.getOwnPropertySymbols(r));for(const l of a)hM(l)||Ca(o,l)||(n[l]=e[l],o[l]=!0);r=i}return n},IE=(e=>t=>{const n=gee.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),_r=e=>(e=e.toLowerCase(),t=>IE(t)===e),Bv=e=>t=>typeof t===e,{isArray:xu}=Array,Au=Bv("undefined");function pd(e){return e!==null&&!Au(e)&&e.constructor!==null&&!Au(e.constructor)&&Ts(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const fM=_r("ArrayBuffer");function wee(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&fM(e.buffer),t}const Cee=Bv("string"),Ts=Bv("function"),bee=Bv("number"),gd=e=>e!==null&&typeof e=="object",See=e=>e===!0||e===!1,$v=e=>{if(!gd(e))return!1;const t=wa(e);return(t===null||t===Object.prototype||wa(t)===null)&&(Vv(e,t,!0)||!Ca(e,dM)&&!Ca(e,qf))},Eee=e=>{if(!gd(e)||pd(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},_ee=_r("Date"),Ree=_r("File"),Tee=e=>!!(e&&typeof e.uri<"u"),Dee=e=>e&&typeof e.getParts<"u",Iee=_r("Blob"),xee=_r("FileList"),Aee=_r("Set"),Pee=e=>gd(e)&&Ts(e.pipe);function kee(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const pM=kee(),gM=typeof pM.FormData<"u"?pM.FormData:void 0,Fee=e=>{if(!e)return!1;if(gM&&e instanceof gM)return!0;const t=wa(e);if(!t||t===Object.prototype||!Ts(e.append))return!1;const n=IE(e);return n==="formdata"||n==="object"&&Ts(e.toString)&&e.toString()==="[object FormData]"},Oee=_r("URLSearchParams"),[Mee,Nee,Lee,Vee]=["ReadableStream","Request","Response","Headers"].map(_r),Bee=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Yf(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,s;if(typeof e!="object"&&(e=[e]),xu(e))for(o=0,s=e.length;o<s;o++)t.call(null,e[o],o,e);else{if(pd(e))return;const r=n?Object.getOwnPropertyNames(e):Object.keys(e),i=r.length;let a;for(o=0;o<i;o++)a=r[o],t.call(null,e[a],a,e)}}function $ee(e,t){if(pd(e))return null;t=t.toLowerCase();const n=Object.keys(e);let o=n.length,s;for(;o-- >0;)if(s=n[o],t===s.toLowerCase())return s;return null}const Pu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,mM=e=>!Au(e)&&e!==Pu;function xE(...e){const{caseless:t,skipUndefined:n}=mM(this)&&this||{},o={},s=t?Object.create(null):null,r=(i,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;let l=a;if(s&&typeof a=="string"){const c=a.toLowerCase(),d=s[c];d!==void 0&&Ca(o,d)?l=d:s[c]=a}const u=Ca(o,l)?o[l]:void 0;$v(u)&&$v(i)?o[l]=xE(u,i):$v(i)?o[l]=xE({},i):xu(i)?o[l]=i.slice():(!n||!Au(i))&&(o[l]=i)};for(let i=0,a=e.length;i<a;i++){const l=e[i];if(!l||pd(l)||(Yf(l,r),typeof l!="object"||xu(l)||!Object.getOwnPropertySymbols))continue;const u=Object.getOwnPropertySymbols(l);for(let c=0;c<u.length;c++){const d=u[c];Jee.call(l,d)&&r(l[d],d)}}return o}const Hee=(e,t,n,{allOwnKeys:o}={})=>(Yf(t,(s,r)=>{n&&Ts(s)?Object.defineProperty(e,r,{__proto__:null,value:cM(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),e),Gee=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Uee=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Wee=(e,t,n,o)=>{let s,r,i;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),r=s.length;r-- >0;)i=s[r],(!o||o(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&wa(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},zee=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n},jee=e=>{if(!e)return null;if(xu(e))return e;let t=e.length;if(!Number.isSafeInteger(t)||t<0||t>4294967295)return null;const n=new Set,o=new Set;let s=e;for(;s!=null&&n.size<t;){if(o.has(s))return null;o.add(s);const i=wa(s);if(Vv(s,i,s===e))break;Object.getOwnPropertyNames(s).forEach(a=>{const l=+a;Number.isInteger(l)&&l>=0&&l<t&&String(l)===a&&Ca(s,a)&&n.add(l)}),s=i}if(n.size!==t)return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Kee=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&wa(Uint8Array)),qee=(e,t)=>{const o=(e&&e[qf]).call(e);let s;for(;(s=o.next())&&!s.done;){const r=s.value;t.call(e,r[0],r[1])}},Yee=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},Xee=_r("HTMLFormElement"),Zee=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,s){return o.toUpperCase()+s}),{propertyIsEnumerable:Jee}=Object.prototype,Qee=_r("RegExp"),vM=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};Yf(n,(s,r)=>{let i;(i=t(s,r,e))!==!1&&(o[r]=i||s)}),Object.defineProperties(e,o)},ete=e=>{vM(e,(t,n)=>{if(Ts(e)&&["arguments","caller","callee"].includes(n))return!1;const o=e[n];if(Ts(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},tte=(e,t)=>{const n={},o=s=>{s.forEach(r=>{n[r]=!0})};return xu(e)?o(e):o(String(e).split(t)),n},nte=()=>{},ote=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ste(e){return!!(e&&Ts(e.append)&&e[dM]==="FormData"&&e[qf])}const rte=e=>{const t=new WeakSet,n=o=>{if(gd(o)){if(t.has(o))return;if(pd(o))return o;if(!("toJSON"in o)){t.add(o);let s;if(Aee(o)){s=[];for(const r of o){const i=n(r);!Au(i)&&s.push(i)}}else s=xu(o)?[]:{},Yf(o,(r,i)=>{const a=n(r);!Au(a)&&(s[i]=a)});return t.delete(o),s}}return o};return n(e)},ite=_r("AsyncFunction"),ate=e=>e&&(gd(e)||Ts(e))&&Ts(e.then)&&Ts(e.catch),yM=((e,t)=>e?setImmediate:t?((n,o)=>(Pu.addEventListener("message",({source:s,data:r})=>{s===Pu&&r===n&&o.length&&o.shift()()},!1),s=>{o.push(s),Pu.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ts(Pu.postMessage)),lte=typeof queueMicrotask<"u"?queueMicrotask.bind(Pu):typeof ee<"u"&&ee.nextTick||yM,wM=e=>e!=null&&Ts(e[qf]),he={isArray:xu,isArrayBuffer:fM,isBuffer:pd,isFormData:Fee,isArrayBufferView:wee,isString:Cee,isNumber:bee,isBoolean:See,isObject:gd,isPlainObject:$v,isEmptyObject:Eee,isReadableStream:Mee,isRequest:Nee,isResponse:Lee,isHeaders:Vee,isUndefined:Au,isDate:_ee,isFile:Ree,isReactNativeBlob:Tee,isReactNative:Dee,isBlob:Iee,isRegExp:Qee,isFunction:Ts,isStream:Pee,isURLSearchParams:Oee,isTypedArray:Kee,isFileList:xee,forEach:Yf,merge:xE,extend:Hee,trim:Bee,stripBOM:Gee,inherits:Uee,toFlatObject:Wee,kindOf:IE,kindOfTest:_r,endsWith:zee,toArray:jee,forEachEntry:qee,matchAll:Yee,isHTMLForm:Xee,hasOwnProperty:Ca,hasOwnProp:Ca,hasOwnInPrototypeChain:DE,getSafeProp:vee,toSafeFlatObject:yee,reduceDescriptors:vM,freezeMethods:ete,toObjectSet:tte,toCamelCase:Zee,noop:nte,toFiniteNumber:ote,findKey:$ee,global:Pu,isContextDefined:mM,isSpecCompliantForm:ste,toJSONObject:rte,isAsyncFn:ite,isThenable:ate,setImmediate:yM,asap:lte,isIterable:wM,isSafeIterable:e=>e!=null&&DE(e,qf)&&wM(e)},ute=he.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),cte=e=>{const t=Object.create(null);let n,o,s;return e&&e.split(`
|
|
147
|
+
`},u=()=>{const p=xv(n),g=e.zIndex?e.zIndex-1:998;if(t.centered&&p){if(r.value=!0,l(p),t.showOverlay){const v=()=>{t.closeOnOverlayClick&&c()};a=AO(t.overlayOpacity,g,v)}}else if(s.value&&(s.value.show(),r.value=!0,t.showOverlay)){const v=()=>{t.closeOnOverlayClick&&c()};a=AO(t.overlayOpacity,g,v)}},c=()=>{const p=xv(n);t.centered&&p?(r.value=!1,p.style.display="none",t.showOverlay&&(uE(a||void 0),a=null)):s.value&&(s.value.hide(),r.value=!1,t.showOverlay&&(uE(a||void 0),a=null))},d=()=>{r.value?c():u()},h=()=>{s.value&&(s.value.destroy(),s.value=null),t.showOverlay&&a&&(uE(a),a=null)},f=()=>{var v;const p=xv(n);if(!p)return;if(p.style.display="none",t.centered){t.showOnInit&&u();return}const g={content:p,placement:t.placement,theme:t.theme,trigger:t.trigger,interactive:t.interactive,appendTo:t.appendTo,arrow:t.showArrow,allowHTML:!0,hideOnClick:!1,popperOptions:{...t.popperOptions,modifiers:[...((v=t.popperOptions)==null?void 0:v.modifiers)||[],{name:"computeStyles",options:{adaptive:!1}}]},onShow(){r.value=!0,p.style.display="block"},onHide(){r.value=!1}};if(t.useTrigger){const w=xv(o);if(!w)return;s.value=tl(w,g)}else{const w=document.createElement("div");w.style.display="none",document.body.appendChild(w),s.value=tl(w,g)}t.showOnInit&&u()};return Xt(()=>{f()}),Vn(()=>{h()}),Qe(()=>t.alwaysShow,p=>{p?u():c()},{immediate:!0}),{popupRef:n,triggerRef:o,instance:s,isVisible:r,show:u,hide:c,toggle:d,destroy:h}}const cE=Ja("permissionStore",()=>{const e=$([]),t=$(),n=$({});return{userPermissions:e,entityPermissions:t,itemPermission:n,setUserPermissions:i=>{e.value=i},setEntityPermissions:i=>{t.value=i},setItemPermission:(i,a)=>{n.value[i]=a}}}),xJ="woohoo_getWoohooUserInterface_read",dE="media_getReviewUserInterface_read",AJ="update_getUpdateUserInterface_read",PO="Unarchive parent folder first to continue",PJ=(e,t,n,o,s,r)=>{const i=cE(),{userPermissions:a}=go(i),l=X(()=>{const T=un.getInstance().getItem("BASE_URL"),F=un.getInstance().getItem("BASE_REVIEW_URL"),{ws_code:L,entity_id:x,scene_id:P}=e.value;return{baseDomain:T||"",ws_code:L||"",entity_id:x||"",scene_id:P||"",reviewDomain:F||"",take_id:x||"",woohoo_id:x||"",parent_id:x||""}}),u=X(()=>{var F;const T=e.value.permissions;return{canOpenSceneHub:!0,canOpenReview:a.value.includes(dE),canCopyLink:!0,canRename:(T==null?void 0:T.has_edit_permission)??!1,canOpenTakeInReview:a.value.includes(dE),canOpenTakeInUpdate:a.value.includes(AJ),canOpenTakeInWoohoo:a.value.includes(xJ),canDeleteRendition:((F=T==null?void 0:T.media)==null?void 0:F.has_delete_rendition_permission)??!1,canDeleteThumbnail:(T==null?void 0:T.has_edit_thumbnail_permission)??!1,canArchiveScene:T==null?void 0:T.has_archive_permission,canUnarchiveScene:T==null?void 0:T.has_archive_permission,canDeleteScene:(T==null?void 0:T.has_delete_permission)??!1,canEditDescription:(T==null?void 0:T.has_edit_permission)??!1}}),c=X(()=>({project:es({type:"project",config:l.value}).url,take_review:es({type:"review_take",config:l.value}).url,review:es({type:"review_scene",config:l.value}).url,review_scene:es({type:"review_scene",config:l.value}).url,woohoo:es({type:"woohoo",config:l.value}).url,update:es({type:"update",config:l.value}).url,scene_hub:es({type:"scene_hub",config:l.value}).url})),d=(T,F)=>{const L=T.metaKey||T.ctrlKey,x=c.value[F]||"";if(x){if(F==="scene_hub"){if(L){window.open(x,"_blank");return}if(!o){console.error("Switch instance not found.",{openSceneHub:o,windowFunc:globalThis.window.$switchInstance});return}o(l.value.scene_id||"");return}L?window.open(x,"_blank"):window.location.href=x}},h=async(T,F)=>{var L;try{const x=await((L=e.value.axiosService.value)==null?void 0:L.deleteRendition({workspaceId:l.value.ws_code,itemIds:[l.value.scene_id||""],deleteAll:!0}));(x==null?void 0:x.message)!="Done"&&console.error("Failed to delete rendition.")}catch(x){console.error("Error deleting rendition",x)}finally{s()}},f=async(T,F)=>{var L;try{await((L=e.value.axiosService.value)==null?void 0:L.deleteThumbnail({workspaceId:l.value.ws_code,itemIds:[l.value.scene_id||""]}))}catch(x){console.error("Error deleting thumbnail",x)}finally{s()}},p=async(T,F)=>{var L;try{const x=await((L=e.value.axiosService.value)==null?void 0:L.archiveScene(l.value.ws_code,l.value.entity_id,[l.value.scene_id]));(x==null?void 0:x.message)!="Done"&&console.error("Failed to archive scene."),F&&F("archived")}catch(x){console.error("Error archiving item",x)}finally{s()}},g=async(T,F)=>{var L;try{const x=await((L=e.value.axiosService.value)==null?void 0:L.deleteScene(l.value.ws_code,l.value.entity_id,l.value.scene_id));(x==null?void 0:x.message)!="Done"&&console.error("Failed to delete scene."),F&&F("deleted")}catch(x){console.error("Error deleting item",x)}finally{s()}},v=T=>{const F=c.value.scene_hub||"";F&&(E.value="Copied",navigator.clipboard.writeText(F),setTimeout(()=>{E.value="Copy link"},5e3))},w=async(T,F)=>{var L;try{const x=await((L=e.value.axiosService.value)==null?void 0:L.unarchiveScene(l.value.ws_code,l.value.entity_id,[l.value.scene_id]));(x==null?void 0:x.message)!="Done"&&console.error("Failed to unarchive scene."),F&&F("unarchived")}catch(x){console.error("Error unarchiving item",x)}finally{s()}},S=T=>p(T,t),b=T=>w(T,t),y=T=>g(T,t),E=$("Copy link"),_=T=>d(T,"review"),I=X(()=>{let T=[];if(!l.value.scene_id&&e.value.optionBlock&&T.push(...e.value.optionBlock),Array.isArray(e.value.optionBlock)&&e.value.optionBlock.length)return e.value.optionBlock;const F=()=>Math.random().toString(36).substring(2,9);return[{id:F(),type:"column",groupLabel:"Download Options",options:[{id:"open_review",label:"Open Review",icon:"PenRuler",action:_,hide:!u.value.canOpenReview,disabled:!u.value.canOpenReview,description:"",type:"icon"},{id:F(),label:E.value,icon:"Link",action:v,hide:!u.value.canCopyLink,disabled:!u.value.canCopyLink,description:"",type:"icon"}]},{id:F(),type:"column",groupLabel:"Download Options",options:[{id:"archive",label:"Archive",icon:"BoxArchive",action:S,hide:u.value.canArchiveScene==0,disabled:u.value.canArchiveScene!==1,description:u.value.canArchiveScene==-1?PO:"",type:"icon"},{id:"unarchive",label:"Unarchive",icon:"BoxArchive",action:b,hide:u.value.canUnarchiveScene==0,disabled:u.value.canUnarchiveScene!==1,description:u.value.canUnarchiveScene===-1?PO:"",type:"icon"},{id:"delete",label:"Delete",icon:"TrashCan",isDanger:!0,description:"Delete permanently",action:y,hide:!u.value.canDeleteScene,type:"icon"}]}]});return{linkMap:c,handleOpen:d,copyLink:v,deleteRendition:h,deleteThumbnail:f,archiveItem:p,deleteItem:g,unArchiveItem:w,options:I}};function xo(e){const t=$(!1),n=$(!1),o=X(()=>{var d;const u=e.value,c=!!u.readOnly;return{readOnly:c,disabled:!!u.disabled,hovered:n.value,focused:t.value,isEmpty:u.empty??!1,error:!!u.error,actived:!!((d=u.active)!=null&&d.value),clickable:c?!1:u.clickable??!1}}),s=()=>{t.value=!0,ht(()=>{const u=l(e.value.inputRef);u==null||u.focus()})},r=()=>{t.value=!1},i=()=>{n.value=!0},a=()=>{n.value=!1},l=u=>{if(!u)return null;const c=u.value||u;return(c instanceof HTMLElement?c:c==null?void 0:c.$el)||null};return Xt(()=>{const u=l(e.value.inputRef),c=l(e.value.wrapperRef);u&&(u.addEventListener("focus",s),u.addEventListener("blur",r)),c&&(c.addEventListener("mouseenter",i),c.addEventListener("mouseleave",a))}),Vn(()=>{const u=l(e.value.inputRef),c=l(e.value.wrapperRef);u&&(u.removeEventListener("focus",s),u.removeEventListener("blur",r)),c&&(c.removeEventListener("mouseenter",i),c.removeEventListener("mouseleave",a))}),{isFocus:t,isHover:n,argsMain:o,handleFocus:s}}const ld=e=>{const t=$(!1),n=X(()=>t.value);return Xt(()=>{var a,l,u,c;const o=(a=e.params)==null?void 0:a.api,s=(l=e.params)==null?void 0:l.node,r=s==null?void 0:s.rowIndex,i=(c=(u=e.params)==null?void 0:u.colDef)==null?void 0:c.field;return o==null||o.addEventListener("cellEditingStarted",d=>{d.rowIndex===r&&d.colDef.field===i&&(t.value=!0)}),o==null||o.addEventListener("cellEditingStopped",d=>{d.rowIndex===r&&d.colDef.field===i&&(t.value=!1)}),{isEditing:n}}),Qe(()=>e,()=>{e.isEditing!==void 0&&(t.value=e.isEditing)}),{isEditing:n}};var fs=(e=>(e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.ALREADY_REPORTED=208]="ALREADY_REPORTED",e[e.IM_USED=226]="IM_USED",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.FOUND=302]="FOUND",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.SWITCH_PROXY=306]="SWITCH_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",e[e.URI_TOO_LONG=414]="URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.TOO_EARLY=425]="TOO_EARLY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.LOOP_DETECTED=508]="LOOP_DETECTED",e[e.NOT_EXTENDED=510]="NOT_EXTENDED",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",e))(fs||{});const Gf=Ja("bulkUpdate",()=>{const e=$(Ft.UNCHECK),t=Fo({loaded:0,total:0}),n=c=>{t.total=c},o=c=>{t.loaded=c},s=Fo({isBulkUpdating:!1});function r(c){s.isBulkUpdating=c}const i=$({}),a=c=>{i.value=c},l=(c,d)=>{i.value[c]=d},u=c=>{e.value=c};return{bulkUpdateState:s,setIsBulkUpdating:r,selectionIds:i,setSelectionIds:a,setCheckedForId:l,setSelectionStatus:u,selectionStatus:e,rowCount:t,setTotalRowCount:n,setLoadedRowCount:o,handelSelectAll:()=>{u(Ft.CHECKED)}}}),kJ={...{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 basic information."},item:{error:"Update failed. Please try again."},removeAssignee:{error:"Update 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_rendition:{error:"Deletion failed. Please try again."},delete_thumbnail:{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:{error:"Deletion failed. Please try again."},bulkArchive:{error:"Archive failed. Please try again."},bulkDateUpdate:{error:"Failed to update items."},bulkAssignUpdate:{error:"Failed to update assignees."},bulkStatusUpdate:{error:"Failed to update items."},getUserPermission:{error:"Failed to fetch user permissions."},getEntityDetail:{error:"Failed to fetch entity details."},bulkUnarchive:{error:"Unarchive failed. Please try again."},downloadTemplate:{},importItems:{},exportItems:{},updateFromFile:{},me:{},workspaces:{},entityUserRoles:{},templateFlowStatuses:{},bulkMetricUpdate:{error:"Update failed. Please try again."},createNewItem:{},getAssignableAssignees:{},getAssignableStatuses:{},getFilterStatuses:{},bulkRename:{},bulkCreate:{}},offline:{error:"You are currently offline. Please check your network connection."}};function kO(e,t,n){return(t=OJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function OJ(e){var t=FJ(e,"string");return typeof t=="symbol"?t:t+""}function Du(e){"@babel/helpers - typeof";return Du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Du(e)}var FO=function(e){return e.TOOLBOX_EXPORT_DATA="TOOLBOX_EXPORT_DATA",e.SW_APP_LOADER="SW_APP_LOADER",e}({});function OO(e){return Du(e)==="object"&&e!==null&&!Array.isArray(e)}function MO(e,t){var n=Object.keys(e);return n.length===t.length&&t.every(function(o){return n.includes(o)})}function MJ(e){return typeof Blob<"u"&&e instanceof Blob}var NJ=function(t){return OO(t)&&MO(t,["file","fileName"])&&MJ(t.file)&&typeof t.fileName=="string"},LJ=function(t){return OO(t)&&MO(t,["scene_id","people_id","openGS","queryParams"])&&(typeof t.scene_id=="string"||t.scene_id===null)&&(typeof t.people_id=="string"||t.people_id===null)&&(typeof t.openGS=="boolean"||t.openGS===null)&&typeof t.queryParams=="string"};Object.freeze(kO(kO({},FO.TOOLBOX_EXPORT_DATA,NJ),FO.SW_APP_LOADER,LJ));let VJ=class extends Error{},dl=class extends VJ{constructor(){super("Zone is an abstract class")}},NO=class{get type(){throw new dl}get name(){throw new dl}get ianaName(){return this.name}get isUniversal(){throw new dl}offsetName(t,n){throw new dl}formatOffset(t,n){throw new dl}offset(t){throw new dl}equals(t){throw new dl}get isValid(){throw new dl}};const hE=new Map;function BJ(e){let t=hE.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),hE.set(e,t)),t}const $J={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function HJ(e,t){const n=e.format(t).replace(/\u200E/g,""),o=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,r,i,a,l,u,c]=o;return[i,s,r,a,l,u,c]}function GJ(e,t){const n=e.formatToParts(t),o=[];for(let s=0;s<n.length;s++){const{type:r,value:i}=n[s],a=$J[r];r==="era"?o[a]=i:Av(a)||(o[a]=parseInt(i,10))}return o}const fE=new Map;let UJ=class UT extends NO{static create(t){let n=fE.get(t);return n===void 0&&fE.set(t,n=new UT(t)),n}static resetCache(){fE.clear(),hE.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=UT.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:o}){return KJ(t,n,o,this.name)}formatOffset(t,n){return kv(this.offset(t),n)}offset(t){if(!this.valid)return NaN;const n=new Date(t);if(isNaN(n))return NaN;const o=BJ(this.name);let[s,r,i,a,l,u,c]=o.formatToParts?GJ(o,n):HJ(o,n);a==="BC"&&(s=-Math.abs(s)+1);const h=jJ({year:s,month:r,day:i,hour:l===24?0:l,minute:u,second:c,millisecond:0});let f=+n;const p=f%1e3;return f-=p>=0?p:1e3+p,(h-f)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}},pE=null,WJ=class bg extends NO{static get utcInstance(){return pE===null&&(pE=new bg(0)),pE}static instance(t){return t===0?bg.utcInstance:new bg(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new bg(VO(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${kv(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${kv(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return kv(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}};function Av(e){return typeof e>"u"}function Pv(e,t=2){const n=e<0;let o;return n?o="-"+(""+-e).padStart(t,"0"):o=(""+e).padStart(t,"0"),o}function LO(e){if(!(Av(e)||e===null||e===""))return parseInt(e,10)}function zJ(e){if(!(Av(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function jJ(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function KJ(e,t,n,o=null){const s=new Date(e),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};o&&(r.timeZone=o);const i={timeZoneName:t,...r},a=new Intl.DateTimeFormat(n,i).formatToParts(s).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function VO(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const o=parseInt(t,10)||0,s=n<0||Object.is(n,-0)?-o:o;return n*60+s}function kv(e,t){const n=Math.trunc(Math.abs(e/60)),o=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${Pv(n,2)}:${Pv(o,2)}`;case"narrow":return`${s}${n}${o>0?`:${o}`:""}`;case"techie":return`${s}${Pv(n,2)}${Pv(o,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}const BO=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ud(...e){const t=e.reduce((n,o)=>n+o.source,"");return RegExp(`^${t}$`)}function cd(...e){return t=>e.reduce(([n,o,s],r)=>{const[i,a,l]=r(t,s);return[{...n,...i},a||o,l]},[{},null,1]).slice(0,2)}function $O(...e){return(t,n)=>{const o={};let s;for(s=0;s<e.length;s++)o[e[s]]=LO(t[n+s]);return[o,null,n+s]}}const HO=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,qJ=`(?:${HO.source}?(?:\\[(${BO.source})\\])?)?`,GO=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,UO=RegExp(`${GO.source}${qJ}`),gE=RegExp(`(?:[Tt]${UO.source})?`),YJ=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,XJ=/(\d{4})-?W(\d\d)(?:-?(\d))?/,ZJ=/(\d{4})-?(\d{3})/,JJ=$O("weekYear","weekNumber","weekDay"),QJ=$O("year","ordinal"),eQ=/(\d{4})-(\d\d)-(\d\d)/,WO=RegExp(`${GO.source} ?(?:${HO.source}|(${BO.source}))?`),tQ=RegExp(`(?: ${WO.source})?`);function dd(e,t,n){const o=e[t];return Av(o)?n:LO(o)}function nQ(e,t){return[{year:dd(e,t),month:dd(e,t+1,1),day:dd(e,t+2,1)},null,t+3]}function hd(e,t){return[{hours:dd(e,t,0),minutes:dd(e,t+1,0),seconds:dd(e,t+2,0),milliseconds:zJ(e[t+3])},null,t+4]}function Uf(e,t){const n=!e[t]&&!e[t+1],o=VO(e[t+1],e[t+2]),s=n?null:WJ.instance(o);return[{},s,t+3]}function Wf(e,t){const n=e[t]?UJ.create(e[t]):null;return[{},n,t+1]}ud(YJ,gE),ud(XJ,gE),ud(ZJ,gE),ud(UO),cd(nQ,hd,Uf,Wf),cd(JJ,hd,Uf,Wf),cd(QJ,hd,Uf,Wf),cd(hd,Uf,Wf),cd(hd),ud(eQ,tQ),ud(WO),cd(hd,Uf,Wf);var Mo=function(e){return e.review="{reviewDomain}/{ws_code}",e.review_take="{reviewDomain}/{ws_code}?id={take_id}",e.review_scene="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&tab=iteration",e.review_rendition="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}",e.review_frame="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}&tab=comment&refresh_marker=true#type=frame&data={frame}",e.review_rendition_comment="{reviewDomain}/{ws_code}?scene_id={scene_id}&rendition_id={rendition_id}&comment_id={comment_id}&tab=comment",e.review_comment="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&comment_id={comment_id}",e.scene_hub="{baseDomain}/{ws_code}/{scene_id}?o=st",e.hub_rendition="{baseDomain}/{ws_code}/{scene_id}?o=st&renditionId={rendition_id}",e.hub_comment="{baseDomain}/{ws_code}/{scene_id}?o=st&comment_id={comment_id}",e.people_insight="{baseDomain}/{ws_code}/{user_id}?o=pt",e.people_detail="{baseDomain}/{ws_code}/ws/ppl/{display_name}-{user_id}",e.project="{baseDomain}/{ws_code}/pl/dir/{entity_id}",e.project_focusMode="{baseDomain}/{ws_code}/pl/dir/{parent_id}?f={entity_id}",e.woohoo="{baseDomain}/{ws_code}/pl/woo/rpt/{woohoo_id}",e.update="{baseDomain}/{ws_code}/pl/au?id={entity_id}",e.core="{baseDomain}/{ws_code}",e}(Mo||{});Mo.review,Mo.review_take,Mo.review_scene,Mo.review_rendition,Mo.review_frame,Mo.review_rendition_comment,Mo.review_comment,Mo.scene_hub,Mo.hub_rendition,Mo.hub_comment,Mo.people_insight,Mo.people_detail,Mo.project,Mo.woohoo,Mo.update,Mo.core,Mo.project_focusMode;var mE=null;function oQ(e){mE=e}function Fv(){if(!mE)throw new Error("i18n instance not set. Call setI18nInstance(i18n) before using errorHelper.");return mE}function Ov(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function zO(){try{var e=sessionStorage.getItem("APP_DEBUG")?"✅":"",t=Fv();return"".concat(Ov(t.t("errorMessages.fallback.unknownError"))," ").concat(e)}catch{return"An error occurred. Please try again or contact support."}}function sQ(e,t,n,o){var s=e.replace(/{field}/g,t);if(o&&Du(o)==="object")Object.keys(o).forEach(function(i){var a="{".concat(i,"}"),l=o[i];Array.isArray(l)?l=l.join(", "):i==="value"&&(o.min||o.max)&&(l="".concat(o.min||o.value," and ").concat(o.max||o.value)),s=s.replace(new RegExp(a,"g"),l||"")});else if(Array.isArray(n)&&n.length>0){var r=n[0]||"";n.length>1?r="".concat(n[0]," and ").concat(n[1]):n.length===1&&Array.isArray(n[0])&&(r=n[0].join(", ")),s=s.replace(/{value}/g,r)}return s}function rQ(e,t){for(var n=Object.keys(t),o=0,s=n;o<s.length;o++){var r=s[o],i=Array.isArray(t[r])?t[r].join(", "):String(t[r]);e=e.replace(new RegExp("\\{".concat(r,"\\}"),"g"),i)}if(n.length>0&&e.includes("{value}")){var a=t[n[0]],l=Array.isArray(a)?a.join(", "):String(a);e=e.replace(/{value}/g,l)}return e}function jO(e){return!!(e&&e.validation&&e.validation.fields&&Object.keys(e.validation.fields).length>0)}function KO(e,t){if(!e||Du(e)!=="object")return null;try{var n=Fv();if(e.validation&&e.validation.fields)for(var o=e.validation.fields,s=Object.keys(o),r=0,i=s;r<i.length;r++){var a=i[r],l=o[a];if(l&&l.rule){var u=l.rule,c=l.data||[],d=l.params||{};try{var h,f,p=((h=n.messages)===null||h===void 0?void 0:h.value)||n.messages,g=((f=n.locale)===null||f===void 0?void 0:f.value)||n.locale,v=null;if(t){var w,S=t.toUpperCase();v=(w=p[g])===null||w===void 0||(w=w.errorMessages)===null||w===void 0||(w=w[S])===null||w===void 0||(w=w.validation_rules)===null||w===void 0?void 0:w[u]}if(!v){var b;v=(b=p[g])===null||b===void 0||(b=b.errorMessages)===null||b===void 0||(b=b.GEN)===null||b===void 0||(b=b.validation_rules)===null||b===void 0?void 0:b[u]}if(v&&typeof v=="string")return Ov(sQ(v,a,c,d))}catch(y){console.error("Error in validation rules",y)}}}}catch(y){return console.error("Error in getValidationErrorMessage:",y),null}return null}function qO(e){var t=sessionStorage.getItem("APP_DEBUG")?"✅":"";if(!e)return zO();var n=e.code,o=e.error,s=e.details,r=e.message;if(jO(s)&&s){var i=KO(s,o==null?void 0:o.type);if(sessionStorage.getItem("APP_DEBUG")&&console.log("[Error Utils Debug]",i),i)return n!==""?"[".concat(n,"] ").concat(i," ").concat(t):"".concat(i);try{var a=Fv();return Ov(a.t("errorMessages.GEN.validation_error"))}catch{return"Validation error occurred."}}if(o&&Du(o)==="object"&&o.type&&o.key){var l=o.type.toUpperCase();try{var u,c,d,h="errorMessages.".concat(l,".").concat(o.key),f=Fv(),p=((u=f.messages)===null||u===void 0?void 0:u.value)||f.messages,g=((c=f.locale)===null||c===void 0?void 0:c.value)||f.locale,v=(d=p[g])===null||d===void 0||(d=d.errorMessages)===null||d===void 0||(d=d[l])===null||d===void 0?void 0:d[o.key];if(v&&typeof v=="string"){var w=v;return s!=null&&s.context&&(w=rQ(w,s.context),sessionStorage.getItem("APP_DEBUG")&&console.log("[Error Utils Debug]",w)),w=Ov(w),n!==""?"[".concat(n,"] ").concat(w," ").concat(t):"".concat(w," ").concat(t)}}catch(b){console.error("[Error Utils Debug]",b)}}if(o&&Du(o)!=="object"&&jO(s)){var S=KO(s);if(S)return n!==""?"[".concat(n,"] ").concat(S," ").concat(t):"".concat(S," ").concat(t)}return r?"".concat(r):zO()}const Rs=Ja("toast",()=>{const e=u=>qO(u),t=u=>{var c;if((u==null?void 0:u.apiCode)==="offline")r({id:"offline",type:"error",message:"You are currently offline. Please check your network connection."});else{const d=qO((c=u==null?void 0:u.res)==null?void 0:c.data);r({id:u==null?void 0:u.apiCode,type:"error",message:d})}},n=$([]),o=(u,c)=>{const d=kJ[u];if(d){const h=d[c];if(h){r({id:u,type:c,message:h});return}}else r({id:u,type:c,message:u})},s=new Map,r=(u,c=5e3)=>{const d={...u,id:u.id??Date.now()+Math.random()};if(n.value.push(d),c>0){const h=Date.now(),f=setTimeout(()=>{i(d.id),s.delete(d.id)},c);s.set(d.id,{timeoutId:f,remainingTime:c,startTime:h})}};function i(u){n.value=n.value.filter(d=>d.id!==u);const c=s.get(u);c&&(clearTimeout(c.timeoutId),s.delete(u))}function a(u){const c=s.get(u);if(c){clearTimeout(c.timeoutId);const d=Date.now()-c.startTime;c.remainingTime=Math.max(0,c.remainingTime-d)}}function l(u){const c=s.get(u);if(c&&c.remainingTime>0){const d=setTimeout(()=>{i(u),s.delete(u)},c.remainingTime);c.timeoutId=d,c.startTime=Date.now()}}return{notifications:n,addNotification:r,removeNotification:i,showMessage:o,showErrorNetMessage:t,pauseAutoDismiss:a,resumeAutoDismiss:l,getErrorMessageFromResponse:e}}),vE=Ja("sortStore",()=>{const e=$({}),t=$(void 0),n={id:"id",name:"name",isStated:"actual_start_date",isCompleted:"actual_due_date",lastUpdated:"updated_at",completedOn:"actual_due_date",status:"template_flow_status",assignees:"assignee"},o={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"}};return{sortingAPIConfiguration:X(()=>{const u=e.value;return Object.values(u).filter(d=>d.sort!=="none"&&!!d.sort).map(d=>{let h;switch(d.colId){case"dateRange":h=o[d.sort];break;default:if(d.colId.includes("metric")){const[f,p]=d.colId.split("_");h={column:f,direction:d.sort,type:p}}else h={column:n[d.colId]||d.colId,direction:d.sort};break}return h})}),sorts:e,setSort:(u,c)=>{e.value={[u]:{colId:u,sort:c}}},clearSorting:()=>{e.value={}},isSortingRunning:$(!1),defaultSortStorePreferences:t,setDefaultSort:u=>{t.value=u}}}),yE=10,wE=5,Ei={number:{first:"000",step:"1"},letter:{first:"A",step:"1"}},YO={up:{first:"Start at",step:"Increase by"},down:{first:"End at",step:"Decrease by"}},iQ=/^[0-9]$/,aQ=/^[A-Za-z]$/,XO=(e,t)=>t==="first"&&e==="letter"?aQ:iQ,ZO=(e,t,n)=>XO(e,t).test(n),lQ=e=>e==="first"?yE:wE,uQ=e=>e&&e[0]===e[0].toLowerCase()?e.toLowerCase():e.toUpperCase(),JO=(e,t,n)=>{const o=XO(e,t),s=Array.from(n).filter(r=>o.test(r)).join("").slice(0,lQ(t));return t==="first"&&e==="letter"?uQ(s):s},Mv=(e,t)=>t!==""&&(e==="first"||Number(t)>0),cQ=e=>Array.from(e.toUpperCase()).reduce((t,n)=>t*26+(n.charCodeAt(0)-64),0),dQ=e=>{let t="",n=e;for(;n>0;){const o=(n-1)%26;t=String.fromCharCode(65+o)+t,n=Math.floor((n-1)/26)}return t},CE=({type:e,direction:t,first:n,step:o,count:s})=>{const r=Number(o)||1,i=u=>(t==="up"?u:s-1-u)*r;if(e==="number"){const u=Number(n);return Array.from({length:s},(c,d)=>String(u+i(d)).padStart(n.length,"0"))}const a=cQ(n),l=n!==""&&n[0]===n[0].toLowerCase();return Array.from({length:s},(u,c)=>{const d=dQ(a+i(c));return l?d.toLowerCase():d})},hQ="Your update is queued. Reload the table later to see the changes.",bE="Update failed.",fQ=new Set(["bulkDelete","bulkArchive","bulkUnarchive","bulkDateUpdate","bulkAssignUpdate","bulkStatusUpdate","bulkMetricUpdate","bulkRename","removeAssignee","delete_thumbnail","delete_rendition"]),pQ=(e,t,n)=>{const o=e.getRowNode(t);o&&o.setData({...o.data,...n})},gQ=(e,{currentName:t,counterValue:n})=>e.map(o=>{switch(o.type){case"text":return o.value;case"current_name":return t;case"counter":return n;default:return""}}).join(""),mQ=(e,t)=>{const n=e.find(o=>o.type==="counter");return n?CE({type:n.format,direction:n.direction==="asc"?"up":"down",first:n.value,step:n.step,count:t}):[]},QO=(e,t,n)=>Rs().addNotification({id:n,type:e,message:t}),vQ=(e,t,n={})=>{const o=Gf(),{selectionStatus:s}=go(o),{sortingAPIConfiguration:r}=go(vE()),i=X(()=>s.value===Ft.CHECKED),a=X(()=>e.selectRowData.map(se=>se.id)),l=X(()=>e.selectRowData.length>0),{apiServices:u}=so(!1,e),c=Dn("filterParams",void 0),d=X(()=>({workspaceId:String(e.workspaceId),itemIds:l.value&&i.value?[]:a.value,entityId:e.entityId,filterParams:c!=null&&c.value?c.value:void 0})),h=$(!0),f=$(!1);let p=null;const g=se=>{var A,j;if(!se.apiCode||!fQ.has(se.apiCode))return;const Z=(A=se.res)==null?void 0:A.data;p={success:se.success,status:(j=se.res)==null?void 0:j.status,data:typeof Z=="object"&&Z!==null?Z:void 0,error:se.error}};Qe(u,(se,Z)=>{Z==null||Z.off("call-api",g),se==null||se.on("call-api",g)},{immediate:!0}),Vn(()=>{var se;return(se=u.value)==null?void 0:se.off("call-api",g)}),Qe(()=>e.selectRowData,()=>{h.value=!1},{deep:!0,immediate:!0});const v=()=>{p=null},w=se=>{var xe,ue;const Z=p,A=Z==null?void 0:Z.data,j=(Z==null?void 0:Z.error)??se,ne=(A==null?void 0:A.message)??((ue=(xe=j==null?void 0:j.response)==null?void 0:xe.data)==null?void 0:ue.message),ge=typeof ne=="string"&&ne.trim()?ne:bE;QO("error",ge,"bulk-update-error")},S=(se,Z,A,j)=>{se.length!==0&&(se.forEach(ne=>{const ge=Z.getRowNode(ne);ge&&ge.setData({...ge.data,...A})}),Z.refreshCells({...j.length>0?{columns:j}:{},force:!0}))},b=se=>{const Z=e.gridApi;if(Z){if(i.value){Z.deselectAll();return}se.forEach(A=>{var j;return(j=Z.getRowNode(A))==null?void 0:j.setSelected(!1)})}},y=({ids:se,apply:Z,columns:A,isDelete:j=!1})=>{var Y;let ne=se;se.length==0&&(ne=e.selectRowData.map(re=>re.id)??[]),console.log("Finishing bulk action for ids:",{ids:ne,columns:A,isDelete:j,selectedRows:e.selectRowData,lastOutcome:p});const ge=p;if((ge==null?void 0:ge.status)!==fs.ACCEPTED){Z(),j&&b(ne);return}QO("white",hQ,"bulk-update-queued");const xe=(Y=ge.data)==null?void 0:Y.bulk_process;let ue;typeof(xe==null?void 0:xe.state)=="number"?ue=xe.state:ue=j?0:1;const K=e.gridApi;K&&(ne.forEach(re=>pQ(K,re,{isProcessing:{state:ue,message:typeof(xe==null?void 0:xe.message)=="string"?xe.message:""}})),K.refreshCells({columns:[...A,"name"],force:!0})),(j||ue==0)&&b(ne)},E=async({request:se,apply:Z,columns:A,isDelete:j=!1})=>{var xe,ue,K;const ne=a.value,ge=e.gridApi;if(!ge){console.error("Grid API is not available for bulk action.");return}v();try{const Y=se();if(!Y)throw new Error("Bulk update service is unavailable.");await Y}catch(Y){console.error("Bulk action failed:",Y),w(Y),(xe=t.value)==null||xe.open();return}if((p==null?void 0:p.success)===!1){const Y=p.error??new Error(bE);console.error("Bulk action failed:",Y),w(Y),(ue=t.value)==null||ue.open();return}y({ids:ne,columns:A,isDelete:j,apply:()=>Z(ne,ge)}),(K=t.value)==null||K.hide()},_=({itemIds:se,data:Z,isUpdateAll:A})=>{let j=se;A&&(console.log("Bulk update for all items with data:",Z),j=a.value),console.log("Handling bulk update for status with itemIds:",j,"and data:",Z);const ne=e.gridApi;if(!ne){console.error("Grid API is undefined");return}y({ids:j,columns:["status"],apply:()=>{S(j,ne,{status:Z},["status"])}})},I=({itemIds:se,data:Z})=>{var j;const A=e.gridApi;if(!A){console.error("Grid API is undefined");return}y({ids:se,columns:["dateRange","name"],apply:()=>{let ne=se;console.log("Applying bulk date update for itemIds:",se,"with data:",Z),(!se||se.length===0)&&(console.warn("No itemIds provided for bulk date update."),ne=e.selectRowData.map(ge=>ge.id)),ne.forEach(ge=>{const xe=A.getRowNode(ge);if(xe){const ue=[...xe.data.dateRange||[null,null]];"startDate"in Z&&Z.startDate!==void 0&&(ue[0]=Z.startDate?new Date(Z.startDate):null),"dueDate"in Z&&Z.dueDate!==void 0&&(ue[1]=Z.dueDate?new Date(Z.dueDate):null),xe.setData({...xe.data,dateRange:ue})}})}}),(j=n.onUpdated)==null||j.call(n)},T=se=>{var ne;const Z=e.gridApi,{id:A,value:j}=se;if(!Z){console.error("Grid API is undefined");return}y({ids:a.value,columns:[`metric_${A}`,"name"],apply:()=>{S(a.value,Z,{[`metric_${A}`]:j},[`metric_${A}`])}}),(ne=n.onUpdated)==null||ne.call(n)},F=se=>{const{assignees:Z,type:A}=se,j=e.gridApi;if(!j){console.error("Grid API is not available for bulk update.");return}const ne=new Set(Z.map(xe=>xe.id)),ge=xe=>{const ue=j.getRowNode(xe);if(!ue)return;const K=ue.data.assignees||[];let Y=[];switch(A){case"add":{const re=new Set(K.map(R=>R.id));Y=[...K,...Z.filter(R=>!re.has(R.id))];break}case"overwrite":Y=Z;break;case"remove":Y=K.filter(re=>!ne.has(re.id));break;case"removeAll":Y=[];break}ue.setData({...ue.data,assignees:Y})};y({ids:a.value,columns:["assignees","name"],apply:()=>a.value.forEach(ge)})},L=()=>E({request:()=>{var se;return(se=u.value)==null?void 0:se.bulkDeleteItems(d.value)},isDelete:!0,columns:["name"],apply:(se,Z)=>S(se,Z,{isDeleted:!0,disabled:!0,isProcessing:{state:0,message:""}},[])}),x=()=>E({request:()=>{var se;return(se=u.value)==null?void 0:se.bulkUnarchiveItems(d.value)},columns:["name"],apply:(se,Z)=>S(se,Z,{isArchived:!1},["name"])}),P=()=>E({request:()=>{var se;return(se=u.value)==null?void 0:se.bulkArchiveItems(d.value)},columns:["name"],apply:(se,Z)=>S(se,Z,{isArchived:!0},["name"])}),k=()=>E({request:()=>{var se;return(se=u.value)==null?void 0:se.deleteThumbnail(d.value)},columns:["thumbnail"],apply:(se,Z)=>S(se,Z,{thumbnail:null},["thumbnail"])}),M=()=>E({request:()=>{var se;return(se=u.value)==null?void 0:se.deleteRendition(d.value)},columns:["name"],apply:(se,Z)=>S(se,Z,{},["name"])}),N=()=>{v(),h.value=!0},B=se=>{console.trace("Bulk update response:",se),ht(()=>{h.value=!1})},z=()=>{w(),B({})},oe=(se,Z)=>{const A=new Map(e.selectRowData.map(ne=>[ne.id,ne.name||""])),j=mQ(se,Z.length);return Z.map((ne,ge)=>{const xe=A.get(ne)??"",ue=gQ(se,{currentName:xe,counterValue:j[ge]??""});return{id:ne,from:xe,to:ue}})},ie=()=>{const se=e.gridApi;return se==null?[]:e.selectRowData.map((Z,A)=>{var j;return{id:Z.id,rowIndex:((j=se.getRowNode(Z.id))==null?void 0:j.rowIndex)??A}}).sort((Z,A)=>Z.rowIndex-A.rowIndex).map(({id:Z})=>Z)};return{apiServices:u,selectionStatus:s,isSelectAll:i,selectedIds:a,isBulkUpdate:l,isUpdating:h,isLoading:f,handleUpdateStart:N,handleUpdatePostUpdate:B,handleUpdateFailed:z,handleUpdateBulkStatus:_,handleUpdateBulkDate:I,handleBulkUpdateMetric:T,handleUpdateNewAssignee:F,handleDelete:L,handleArchive:P,handleUnarchive:x,deleteThumbnail:k,deleteRendition:M,handleBulkUpdateName:async se=>{var xe;if(!e.workspaceId||!e.entityId)return;const Z=ie(),A={item_ids:Z,segments:se},j=r.value;i.value&&(delete A.item_ids,A.entity_id=e.entityId),A.sort_by=j;const ne={workspaceId:e.workspaceId,entityId:e.entityId,payload:A,filter:c!=null&&c.value?c.value:void 0},ge=oe(se,Z);v(),h.value=!0,f.value=!0;try{const ue=(xe=u.value)==null?void 0:xe.bulkRename(ne);if(!ue)throw new Error("Bulk update service is unavailable.");if(await ue,(p==null?void 0:p.success)===!1){w(p.error??new Error(bE));return}}catch(ue){w(ue);return}finally{h.value=!1,f.value=!1}y({ids:Z,columns:["name"],apply:()=>{var K;const ue=e.gridApi;ue&&(ge.forEach(({id:Y,to:re})=>{var R;return(R=ue.getRowNode(Y))==null?void 0:R.setDataValue("name",re)}),(K=n.onRefreshSelectedRow)==null||K.call(n))}})}}},eM=_t(ot({__name:"StatusBadge",props:{size:{default:16},color:{default:"#02C39A"},label:{default:""},status:{default:void 0},statusTooltip:{default:"Online"},showBadge:{type:Boolean,default:!0},loading:{type:Boolean}},setup(e){const t=$s,{triggerRef:n,popupRef:o}=vo({toggleOnClick:!0,trigger:"mouseenter focus",theme:"dark",placement:"right",arrow:!0}),s=X(()=>{switch(r.status){case"active":return"#02C39A";case"offline":return"#808080";case"busy":return"#ff0000";case"away":return"#F7941D";default:return"transparent"}}),r=e;return(i,a)=>(q(),de("div",{class:le(i.$style["status-badge-wrapper"]),style:hn({"--badge-size":`${r.size}px`,"--badge-color":s.value})},[kt(i.$slots,"default"),ze(Se("div",{class:le(i.$style["badge-indicator"]),ref_key:"triggerRef",ref:n},null,2),[[dr,r.showBadge],[V(t),{isLoading:r.loading,fullwidth:!0}]]),Se("div",{ref_key:"popupRef",ref:o,class:le(i.$style["badge-tooltip"])},at(r.statusTooltip),3)],6))}}),[["__cssModules",{$style:{"status-badge-wrapper":"_status-badge-wrapper_30ykl_1","badge-indicator":"_badge-indicator_30ykl_6",active:"_active_30ykl_19",offline:"_offline_30ykl_22",busy:"_busy_30ykl_25",away:"_away_30ykl_28","badge-tooltip":"_badge-tooltip_30ykl_32"}}]]),fd=Ja("switchStore",()=>{const e=$(null),t=Dn("switchInstance");return{openSceneHub:(s,r)=>{if(s){if(!t)throw console.error("Switch instance not found"),new Error("Switch instance not found");r?t("scene_hub",{id:s,commentId:r},{showLoading:!1}):t("scene_hub",{id:s,tab:"home"},{showLoading:!1})}},openPeopleInsight:s=>{if(!s){console.error("No people_id provided, defaulting to empty string");return}const r=t||e.value;if(!r)console.error("Switch instance not found");else if(window.switchApploader)window.switchApploader("people_insight",{tab:"home",id:s||""},{showLoading:!1});else throw console.error("Switch instance not found and switchApploader is not available"),new Error("Switch instance not found and switchApploader is not available");r("people_insight",{tab:"home",id:s||""},{showLoading:!1})},switchInstanceFunc:e}}),yQ=ot({__name:"MiniPeopleCard",props:{user:{},status:{default:void 0},timezone:{default:Cv()},userConfig:{default:()=>({size:96,isUseShortLabel:!0,bgColor:"#E0E0E0",color:"#757575",isMe:!1})},showInsightButton:{type:Boolean,default:!0},showCopyLinkButton:{type:Boolean,default:!0},apiUpdateFunction:{type:Function,default:void 0},refreshInterval:{default:3e4},enableAutoRefresh:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},private:{type:Boolean,default:!1},showPrivateUser:{type:Boolean,default:!1},switchInstance:{type:Function,default:void 0}},emits:["insightClick","copyLink","dataUpdated"],setup(e,{emit:t}){const n=Kt,o=$s,s=e,r=t,i={active:"Active in the workspace in the last 10 minutes.",offline:"Logged out from account.",busy:"User is busy",away:"No activity in the workspace within the last 10 minutes"},a=$(new Date),l=$(!0),u=$(!1),c=$(!1),d=$(null);let h=null,f=null;const p=fd(),{openPeopleInsight:g}=p,v=X(()=>!s.private&&!u.value),w=X(()=>{var B,z;return((B=d.value)==null?void 0:B.display_name)??((z=s.user)==null?void 0:z.name)}),S=X(()=>{var B,z;return!v.value||!d.value?s.status:(B=d.value.private_info)!=null&&B.is_offline?"offline":(z=d.value.private_info)!=null&&z.last_active?"active":"away"}),b=X(()=>{var B;return!!((B=d.value)!=null&&B.private_info)}),y=X(()=>{const B=S.value;return B?i[B]:""}),E=X(()=>{var B,z;return((z=(B=d.value)==null?void 0:B.private_info)==null?void 0:z.timezone)??s.timezone}),_=X(()=>{if(!E.value)return"";try{return a.value.toLocaleTimeString("en-US",{timeZone:E.value,hour:"numeric",minute:"2-digit",hour12:!0})}catch{return console.error("Invalid timezone:",E.value),""}}),I=X(()=>{var B,z,oe;return{id:s.user.id,name:w.value,initial:((B=d.value)==null?void 0:B.initial)??s.user.initial,profile_image:((z=d.value)==null?void 0:z.profile_image)??s.user.profile_image,color:((oe=d.value)==null?void 0:oe.color)??s.user.color,size:72,borderRadius:"8px"}}),T=X(()=>{const B=un.getInstance().getItem("BASE_URL"),z=un.getInstance().getItem("ws.code")||"";return es({type:"people_insight",config:{ws_code:z,baseDomain:B,user_id:s.user.id}}).url}),{copyToClipboard:F,tooltip:L}=IO(T.value,()=>r("copyLink",s.user.id)),x=async()=>{if(!s.apiUpdateFunction){l.value=!1;return}try{const B=await s.apiUpdateFunction(s.user.id);B?(d.value=B,r("dataUpdated",B)):(u.value=!0,c.value=!0,r("dataUpdated",null))}catch(B){u.value=!0,c.value=!0,console.error("Failed to fetch user data:",B)}finally{l.value=!1}},P=()=>{k(),s.apiUpdateFunction&&s.enableAutoRefresh&&(f=setInterval(x,s.refreshInterval))},k=()=>{f!==null&&(clearInterval(f),f=null)},M=B=>{var z;if(B.ctrlKey||B.metaKey){window.open(T.value,"_blank");return}try{g(String(s.user.id))}catch{s.switchInstance?(z=s.switchInstance)==null||z.call(s,"people_insight",{tab:"home",id:s.user.id||""},{showLoading:!1}):window.open(T.value,"_blank")}},N=B=>{M(B),r("insightClick",s.user.id)};return Qe([()=>s.enableAutoRefresh,()=>s.refreshInterval,()=>s.apiUpdateFunction],P),Xt(async()=>{h=setInterval(()=>{a.value=new Date},1e4),s.apiUpdateFunction?(await x(),P()):l.value=!1}),nu(()=>{h&&clearInterval(h),k()}),(B,z)=>s.showPrivateUser&&(s.private||c.value)?(q(),de("div",{key:0,class:le([B.$style["info-row"],B.$style["private-badge"]])},[...z[0]||(z[0]=[Se("span",null,"Private User",-1)])],2)):(q(),de("div",{key:1,class:le([B.$style["mini-people-card"],{[B.$style.loading]:l.value},"bg-skeleton"])},[Se("div",{class:le(B.$style["avatar-section"])},[v.value&&b.value?(q(),je(eM,{key:0,size:12,status:S.value,loading:l.value,"status-tooltip":y.value},{default:we(()=>[ye(Ef,jt({readOnly:!0},I.value),null,16)]),_:1},8,["status","loading","status-tooltip"])):(q(),je(Ef,jt({key:1,readOnly:!0},I.value),null,16))],2),Se("div",{class:le(B.$style["user-info"])},[Se("div",{class:le(B.$style["info-column"])},[ze((q(),de("span",{class:le(B.$style["user-name"])},[tt(at(w.value),1)],2)),[[V(n),{content:w.value,delay:[1e3,0]}]]),E.value&&v.value&&b.value?(q(),de("div",{key:0,class:le([B.$style["info-row"],B.$style["time-row"]])},[ze((q(),de("div",{class:le(B.$style["time-display"])},[ye(gt,{source:"remote",src:"Globe",class:le(B.$style["clock-icon"]),size:"10"},null,8,["class"]),Se("span",{class:le(B.$style["time-text"])},at(_.value)+" ("+at(E.value)+")",3)],2)),[[V(o),{isLoading:l.value,fullwidth:!0}]])],2)):Ye("",!0)],2),!e.readOnly&&v.value?(q(),de("div",{key:0,class:le([B.$style["info-row"],B.$style.actions])},[e.showInsightButton&&b.value?(q(),je(St,{key:0,label:"Insights",variant:"secondary",size:"small",onClick:Ht(N,["prevent","stop"]),disabled:s.disabled},null,8,["disabled"])):Ye("",!0),e.showCopyLinkButton&&b.value?ze((q(),je(St,{key:1,variant:["icon","secondary"],size:"small",onClick:Ht(V(F),["prevent","stop"]),disabled:s.disabled},{default:we(()=>[ye(gt,{source:"remote",src:"Link"})]),_:1},8,["onClick","disabled"])),[[V(n),{content:V(L),contentClass:["extra-padding"],hideOnClick:!1,delay:[300,0]}]]):Ye("",!0)],2)):Ye("",!0)],2)],2))}}),wQ=_t(yQ,[["__cssModules",{$style:{"mini-people-card":"_mini-people-card_ign8a_1",loading:"_loading_ign8a_25","avatar-section":"_avatar-section_ign8a_28","user-info":"_user-info_ign8a_33","info-column":"_info-column_ign8a_42","info-row":"_info-row_ign8a_50","time-row":"_time-row_ign8a_56","time-display":"_time-display_ign8a_62","time-text":"_time-text_ign8a_70",actions:"_actions_ign8a_79","user-name":"_user-name_ign8a_83","v-enter-active":"_v-enter-active_ign8a_103","v-leave-active":"_v-leave-active_ign8a_104","v-enter-from":"_v-enter-from_ign8a_108","v-leave-to":"_v-leave-to_ign8a_109"}}]]),CQ=_t(ot({name:"MoreOption",__name:"MoreOption",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean}},setup(e,{expose:t}){const n=Io,o=Kt,s=e,{isEditing:r}=ld(s),i=()=>{var h,f;const c=(h=s.params)==null?void 0:h.api,d={rowIndex:(f=c==null?void 0:c.getRowNode(String(s.id)))==null?void 0:f.rowIndex,colKey:"options"};c==null||c.startEditingCell(d)},a=X(()=>{var d,h;const c=(h=(d=s.params)==null?void 0:d.api)==null?void 0:h.getRowNode(String(s.id));return((c==null?void 0:c.rowIndex)??0)+10}),l=()=>{var c,d;(d=(c=s.params)==null?void 0:c.api)==null||d.stopEditing()},u=$();return t({focus(){var c;(c=u.value)==null||c.focus()},blur(){var c;(c=u.value)==null||c.blur()}}),(c,d)=>ze((q(),je(St,{class:le(c.$style.btnMoreOptions),variant:["secondary","icon"],size:"small",actived:V(r),onClick:Ht(i,["stop"]),onEscape:l,ref_key:"buttonRef",ref:u},{default:we(()=>[ye(gt,{src:"EllipsisVertical",source:"remote"})]),_:1},8,["class","actived"])),[[V(o),"More actions"],[V(n),a.value]])}}),[["__cssModules",{$style:{btnMoreOptions:"_btnMoreOptions_137ge_1"}}]]),bQ=["src","width","height","alt"],va=_t(ot({__name:"Visual",props:{src:{},source:{default:"remote"},size:{},minWidth:{},maxWidth:{},minHeight:{},maxHeight:{},color:{},ratio:{default:"1/1"}},setup(e){const t=$s,{getCachedValue:n,setCachedValue:o}=bf({dbName:"visual-cache-db",storeName:"visuals"}),s=h=>{if(h!==void 0)return typeof h=="number"?`${h}px`:typeof h=="string"&&/^\d+$/.test(h)?`${h}px`:h},r=e,i=X(()=>({minWidth:s(r.minWidth),maxWidth:s(r.maxWidth),minHeight:s(r.minHeight),maxHeight:s(r.maxHeight),aspectRatio:r.ratio,width:s(r.size)})),a=async h=>{const f=await n(h);if(typeof f=="string")return f},l=async(h,f)=>{await o(h,f)},u=X(()=>({name:r.src,size:Number(r.size||100),color:""})),{url:c,loading:d}=UP(u,"visual",l,a);return(h,f)=>ze((q(),de("div",{class:le([h.$style.visualWrapper,{[h.$style.loading]:V(d)}]),style:hn(i.value)},[Se("img",{src:V(c),width:e.size,height:e.size,alt:"visual-"+e.src,style:hn(i.value)},null,12,bQ)],6)),[[V(t),{isLoading:V(d),type:"skeleton",size:"cover",fullwidth:!0}]])}}),[["__cssModules",{$style:{visualWrapper:"_visualWrapper_lvp0k_1",loading:"_loading_lvp0k_8",pulse:"_pulse_lvp0k_1"}}]]),SQ=["tabindex"],No=_t(ot({__name:"DisplayWrapper",props:{prefix:{},suffix:{},inputType:{},readOnly:{type:Boolean},disabled:{type:Boolean},hovered:{type:Boolean},focused:{type:Boolean},error:{type:Boolean},actived:{type:Boolean},clickable:{type:Boolean},size:{},bordered:{type:Boolean},tabIndex:{},focusableIndex:{}},emits:["event","escape"],setup(e,{expose:t,emit:n}){const o=e,s=n;Zg();const r=dm(),i=$(null),a=$("default"),l=X(()=>{if(typeof o.size=="number")return`${o.size}px`;switch(o.size){case"small":return"32px";case"large":return"48px";case"default":default:return"32px"}}),u=X(()=>`${Math.max(50,Math.round(Math.random()*100))}%`),c=X(()=>({[r["display-wrapper"]]:!0,[r.disabled]:o.disabled,[r.readOnly]:o.readOnly,[r.error]:o.error,[r.clickable]:o.clickable,[r.active]:o.actived,[r.hovered]:o.hovered,[r.focused]:!o.readOnly&&!o.disabled&&o.focused,[r.bordered]:o.bordered})),d=()=>{var y,E;const g=((y=i.value)==null?void 0:y.querySelectorAll(":scope > .wrapper-prefix").length)||0,v=((E=i.value)==null?void 0:E.querySelectorAll(":scope > .wrapper-suffix").length)||0,w="var(--icon-size)",b=`calc(var(--gap-size) * ${g+v})`;return g&&!v?`repeat(${g}, ${w}) calc(100% - (${g} * ${w} + ${b}))`:!g&&v?`calc(100% - (${v} * ${w} + ${b})) repeat(${v}, ${w})`:g&&v?`repeat(${g}, ${w}) calc(100% - (${g} * ${w} + ${v} * ${w} + ${b})) repeat(${v}, ${w})`:"100%"},h=$("100%"),f=()=>{h.value=d()};$h(()=>{f()}),Xt(()=>{f()});const p=g=>{a.value=g};return t({rootEl:i,updateState:p,componentState:a,focus:()=>{ht(()=>{var g;(g=i.value)==null||g.focus()})},triggerFocus:()=>{console.log("triggerFocus called"),ht(()=>{var g;(g=i.value)==null||g.focus()})},escape:()=>{s("escape")}}),(g,v)=>{const w=Sc("focusable");return ze((q(),de("div",{ref_key:"rootEl",ref:i,class:le([V(r)["display-wrapper"],c.value]),tabindex:e.tabIndex,style:hn({"--grid-template":h.value,"--wrapper-size":l.value,"--loading-overlay-width":u.value})},[kt(g.$slots,"prefix",{hovered:o.hovered,focused:o.focused}),kt(g.$slots,"default",{hovered:o.hovered,focused:o.focused,updateComponentState:p,disabled:o.disabled}),kt(g.$slots,"suffix",{hovered:o.hovered,focused:o.focused})],14,SQ)),[[w,o.focusableIndex]])}}}),[["__cssModules",{$style:{"display-wrapper":"_display-wrapper_rxmoy_1",readOnly:"_readOnly_rxmoy_26",bordered:"_bordered_rxmoy_29",disabled:"_disabled_rxmoy_29",active:"_active_rxmoy_29",focused:"_focused_rxmoy_29",hovered:"_hovered_rxmoy_33",error:"_error_rxmoy_37",clickable:"_clickable_rxmoy_50",suffix:"_suffix_rxmoy_56",prefix:"_prefix_rxmoy_57"}}]]),EQ=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const _Q=Object.prototype.toString,RQ=e=>_Q.call(e)==="[object Object]",_i=()=>{};function TQ(e,t){function n(...o){return new Promise((s,r)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(s).catch(r)})}return"cancel"in e&&Object.assign(n,{cancel:e.cancel,flush:e.flush,isPending:e.isPending}),n}function DQ(e,t={}){let n,o,s=_i,r=_i;const i=xh(!1),a=c=>{clearTimeout(c),s(),s=_i};let l;return Object.assign(c=>{const d=ta(e),h=ta(t.maxWait);return n&&a(n),d<=0||h!==void 0&&h<=0?(o&&(a(o),o=void 0),i.value=!1,Promise.resolve(c())):(i.value=!0,new Promise((f,p)=>{s=t.rejectOnCancel?p:f,r=f,l=c,h&&!o&&(o=setTimeout(()=>{n&&a(n),o=void 0,i.value=!1,f(l())},h)),n=setTimeout(()=>{o&&a(o),o=void 0,i.value=!1,f(c())},d)}))},{cancel:()=>{n&&(a(n),n=void 0),o&&(a(o),o=void 0),i.value=!1,r=_i},flush:()=>{if(i.value){n&&(clearTimeout(n),n=void 0),o&&(clearTimeout(o),o=void 0),i.value=!1;const c=r;s=_i,r=_i,c(l())}},isPending:Vr(i)})}function SE(e){return Array.isArray(e)?e:[e]}function IQ(e,t=200,n={}){return TQ(DQ(t,n),e)}function xQ(e,t,n){return Qe(e,t,{...n,immediate:!0})}const tM=EQ?window:void 0;function zf(e){var t;const n=ta(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function EE(...e){const t=(o,s,r,i)=>(o.addEventListener(s,r,i),()=>o.removeEventListener(s,r,i)),n=X(()=>{const o=SE(ta(e[0])).filter(s=>s!=null);return o.every(s=>typeof s!="string")?o:void 0});return xQ(()=>{var o,s;return[(o=(s=n.value)===null||s===void 0?void 0:s.map(r=>zf(r)))!==null&&o!==void 0?o:[tM].filter(r=>r!=null),SE(ta(n.value?e[1]:e[0])),SE(V(n.value?e[2]:e[1])),ta(n.value?e[3]:e[2])]},([o,s,r,i],a,l)=>{if(!(o!=null&&o.length)||!(s!=null&&s.length)||!(r!=null&&r.length))return;const u=RQ(i)?{...i}:i,c=o.flatMap(d=>s.flatMap(h=>r.map(f=>t(d,h,f,u))));l(()=>{c.forEach(d=>d())})},{flush:"post"})}function _E(e,t,n={}){const{window:o=tM,ignore:s=[],capture:r=!0,detectIframe:i=!1,controls:a=!1}=n;if(!o)return a?{stop:_i,cancel:_i,trigger:_i}:_i;let l=!0;const u=v=>ta(s).some(w=>{if(typeof w=="string")return Array.from(o.document.querySelectorAll(w)).some(S=>S===v.target||v.composedPath().includes(S));{const S=zf(w);return S&&(v.target===S||v.composedPath().includes(S))}});function c(v){const w=ta(v);return w&&w.$.subTree.shapeFlag===16}function d(v,w){const S=ta(v),b=S.$.subTree&&S.$.subTree.children;return b==null||!Array.isArray(b)?!1:b.some(y=>y.el===w.target||w.composedPath().includes(y.el))}const h=v=>{const w=zf(e);if(v.target!=null&&!(!(w instanceof Element)&&c(e)&&d(e,v))&&!(!w||w===v.target||v.composedPath().includes(w))){if("detail"in v&&v.detail===0&&(l=!u(v)),!l){l=!0;return}t(v)}};let f=!1;const p=[EE(o,"click",v=>{f||(f=!0,setTimeout(()=>{f=!1},0),h(v))},{passive:!0,capture:r}),EE(o,"pointerdown",v=>{const w=zf(e);l=!u(v)&&!!(w&&!v.composedPath().includes(w))},{passive:!0}),i&&EE(o,"blur",v=>{setTimeout(()=>{const w=zf(e);let S=o.document.activeElement;for(;S!=null&&S.shadowRoot;)S=S.shadowRoot.activeElement;(S==null?void 0:S.tagName)==="IFRAME"&&!(w!=null&&w.contains(o.document.activeElement))&&t(v)},0)},{passive:!0})].filter(Boolean),g=()=>p.forEach(v=>v());return a?{stop:g,cancel:()=>{l=!1},trigger:v=>{l=!0,h(v),l=!1}}:g}const AQ=["type","value","placeholder","max","min","disabled","readonly","aria-invalid","aria-disabled","inputmode","maxlength"],hl=_t(ot({__name:"InputText",props:{type:{default:"text"},autoEmit:{type:Boolean,default:!1},debounceDelay:{default:300},selectOnFocus:{type:Boolean,default:!1},submitOnEnter:{type:Boolean,default:!0},blurOnEscape:{type:Boolean,default:!0},maxDecimalChar:{},showClear:{type:Boolean,default:!0},maxValue:{default:void 0},minValue:{default:0},modelValue:{},placeholder:{},focused:{type:Boolean},validatorFnc:{},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{},bordered:{type:Boolean},focusIndex:{}},emits:["update:modelValue","input","clear","focus","blur","change","enterValue","enter","escape","cancel","tab","keydown","keyup","paste","cut","select","onValidation"],setup(e,{expose:t,emit:n}){const o=Io,s=Kt,r=e,i=n,a=$(null),l=$(r.modelValue||""),u=$(!1),c=$(!1),d=$(r.modelValue||"");Qe(()=>r.modelValue,A=>{l.value=A||"",d.value=A||""});const h=X(()=>l.value.length>0),f={text:A=>A.slice(0,r.maxLength||255),number:A=>{const j=r.minValue<0;let ne=A.replace(j?/[^\d.-]/g:/[^\d.]/g,"");const ge=ne.split(".");ge.length>2&&(ne=ge[0]+"."+ge.slice(1).join("")),ne=ne.replace(/-/g,(re,R)=>R===0?re:"");const ue=ne.startsWith("-")?"-":"",Y=ne.replace("-","").split(".");return Y[0].length>17&&(Y[0]=Y[0].substring(0,17)),r.maxDecimalChar!==void 0&&Y.length>1&&(Y[1]=Y[1].substring(0,r.maxDecimalChar)),ne=ue+Y.join("."),ne},email:A=>A.replace(/\s/g,"").slice(0,r.maxLength||255),url:A=>A.replace(/\s/g,"").slice(0,r.maxLength||255),tel:A=>A.replace(/[^\d+\-() ]/g,"").slice(0,r.maxLength||20)},p=A=>{const j=f[r.type];return j?j(A):A},g=IQ(A=>{r.autoEmit&&(i("update:modelValue",A),i("input",A))},r.debounceDelay),v=A=>{const j=A;if(r.disabled||r.readOnly){j.preventDefault();return}const ne=j.target,ge=ne.selectionStart??ne.value.length,xe=ne.value,ue=l.value;let K=p(xe);if(r.type==="number"&&K!==""&&K!=="-"){const Y=Number(K);(r.maxValue!==void 0&&Y>r.maxValue||!Number.isNaN(Y)&&Y<r.minValue)&&(K=ue)}if(ne.value!==K){const Y=Math.max(0,xe.length-K.length);ne.value=K;const re=Math.max(0,Math.min(ge-Y,K.length));ne.setSelectionRange(re,re)}ue!==K&&(l.value=K,i("input",K),r.autoEmit&&g(K))},w=A=>{if(r.disabled||r.readOnly){A.preventDefault();return}c.value=!0;const j=l.value;l.value="",i("update:modelValue",""),i("clear"),j!==""&&i("change",""),A.preventDefault(),A.stopImmediatePropagation(),A.stopPropagation(),ht(()=>{var ne;(ne=a.value)==null||ne.focus(),setTimeout(()=>{c.value=!1},100)})},S=A=>{r.disabled||r.readOnly||(i("focus",A),r.selectOnFocus&&ht(()=>{A.target.select()}))},b=A=>{if(c.value)return;const ne=A.target.value;r.autoEmit||i("update:modelValue",ne),d.value!==ne&&(i("change",ne),d.value=ne),i("blur",ne,A)},y=A=>{const j=A.target.value;i("enter",j,A),i("enterValue",j),r.submitOnEnter&&(A.preventDefault(),r.autoEmit||i("update:modelValue",j),d.value!==j&&(i("change",j),d.value=j))},E=A=>{const j=A.target,ne=j.value;if(i("escape",ne,A),A.preventDefault(),A.stopImmediatePropagation(),A.stopPropagation(),r.autoEmit){i("cancel"),r.blurOnEscape&&j.blur();return}l.value=r.modelValue||"",a.value&&(a.value.value=l.value),i("cancel"),r.blurOnEscape&&j.blur()},_=A=>{const ne=A.target.value;i("tab",ne,A),r.autoEmit||(i("update:modelValue",ne),d.value!==ne&&(i("change",ne),d.value=ne))},I=(A,j,ne)=>new RegExp(`^-?\\d{0,${j}}(\\.\\d{0,${ne}})?$`).test(A)?ne>0||!A.includes("."):!1,T=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Tab","Enter","Escape","Home","End"]),F=A=>{if(i("keydown",A),A.key===" "&&A.stopPropagation(),r.type==="number"){if(A.key==="e"||A.key==="E"){A.preventDefault();return}if(A.key.length===1&&!A.ctrlKey&&!A.metaKey&&!A.altKey&&!T.has(A.key)){if(!(r.minValue<0?/[\d.-]/:/[\d.]/).test(A.key)){A.preventDefault();return}const ne=A.target,ge=l.value,xe=ne.selectionStart??ge.length,ue=ne.selectionEnd??xe,K=ge.slice(0,xe)+A.key+ge.slice(ue);if(!I(K,17,r.maxDecimalChar??2)){A.preventDefault();return}const Y=Number(K);if(r.maxValue!==void 0&&Y>r.maxValue||K!=="-"&&!Number.isNaN(Y)&&Y<r.minValue){A.preventDefault();return}}}A.key==="Escape"?E(A):A.key==="Enter"?y(A):A.key==="Tab"?_(A):(A.key==="ArrowUp"||A.key==="ArrowDown")&&r.type==="number"&&A.preventDefault()},L=A=>{i("keyup",A)},x=A=>{if(r.disabled||r.readOnly){A.preventDefault();return}i("paste",A)},P=A=>{if(r.disabled||r.readOnly){A.preventDefault();return}i("cut",A)},k=A=>{i("select",A)},M=`input-text-${Math.random().toString(36).slice(2,11)}`,N=X(()=>{switch(r.type){case"number":return"decimal";case"email":return"email";case"tel":return"tel";case"url":return"url";default:return"text"}});Qe(l,A=>{i("onValidation",A),u.value=r.validatorFnc?!!A&&!r.validatorFnc(A):!1});const B=$(null),z=X(()=>({disabled:r.disabled,readOnly:r.readOnly,error:u.value,inputRef:a,clickable:!r.disabled&&!r.readOnly,focused:r.focused,wrapperRef:B,bordered:!0})),{argsMain:oe,isHover:ie,isFocus:te}=xo(z);t({triggerFocus:()=>{ht(()=>{var A;(A=a.value)==null||A.focus()})},focus:()=>{se()},blur:()=>{ht(()=>{var A;(A=a.value)==null||A.blur()})},select:()=>{ht(()=>{var A;(A=a.value)==null||A.select()})},setSelectionRange:(A,j)=>{ht(()=>{var ne;(ne=a.value)==null||ne.setSelectionRange(A,j)})},getValue:()=>l.value,setValue:A=>{l.value=p(A),a.value&&(a.value.value=l.value)},reset:()=>{l.value=r.modelValue||"",a.value&&(a.value.value=l.value)}});const se=()=>{!r.disabled&&!r.readOnly&&ht(()=>{var A;(A=a.value)==null||A.focus()})},Z=X(()=>te.value&&h.value);return(A,j)=>(q(),de("div",{class:le([A.$style["input-wrapper"],"input-editor"]),onClick:se},[ze((q(),je(No,jt(V(oe),{ref_key:"wrapperRef",ref:B,class:[A.$style["input-box"],{[A.$style["is-hovered"]]:V(ie),[A.$style["is-focused"]]:V(te),[A.$style["has-input"]]:h.value,[A.$style["is-editting"]]:Z.value}],style:{"--icon-size":"20px","--gap-size":"4px"},bordered:r.bordered}),{prefix:we(()=>[kt(A.$slots,"prefix")]),suffix:we(()=>[h.value&&!r.disabled&&!r.readOnly&&r.showClear?kt(A.$slots,"clear",{},()=>[ze((q(),je(St,{variant:["icon","tertiary"],"aria-label":"Clear",onMousedown:Ht(w,["prevent","stop"]),size:18,rounded:!0,class:le(["wrapper-suffix",A.$style["clear-button"]])},{default:we(()=>[ye(gt,{src:"CircleXMark",size:"20",color:"var(--primary-color)"})]),_:1},8,["class"])),[[V(s),{content:"Clear",contentClass:"extra-padding"}]])],void 0,0):kt(A.$slots,"suffix",{},void 0,void 0,1)]),default:we(()=>[Se("input",{tabindex:"-1",ref_key:"inputRef",ref:a,type:r.type,value:l.value,placeholder:e.placeholder,class:le([A.$style["column-config__input"]]),max:r.maxValue,min:r.minValue,id:M,disabled:e.disabled,readonly:e.readOnly,"aria-invalid":u.value||void 0,"aria-disabled":e.disabled||void 0,inputmode:N.value,maxlength:r.maxLength,onInput:v,onFocus:S,onBlur:b,onKeydown:F,onKeyup:L,onPaste:x,onCut:P,onSelect:k},null,42,AQ)]),_:3},16,["class","bordered"])),[[V(o),r.focusIndex]]),u.value?kt(A.$slots,"error",{},void 0,void 0,0):Ye("",!0)],2))}}),[["__cssModules",{$style:{"input-box":"_input-box_83ot4_1","is-disabled":"_is-disabled_83ot4_16","is-readonly":"_is-readonly_83ot4_16","is-hovered":"_is-hovered_83ot4_16","is-focused":"_is-focused_83ot4_20","column-config__input":"_column-config__input_83ot4_44","clear-button":"_clear-button_83ot4_59"}}]]),PQ={class:"wrapper-prefix",style:{width:"18px",height:"18px"}},RE=ot({__name:"SearchBox",props:{modelValue:{default:""},placeholder:{default:"Search"},focused:{type:Boolean},validatorFnc:{},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{},bordered:{type:Boolean},focusIndex:{default:void 0}},emits:["update:modelValue","search","clear","cancel"],setup(e,{expose:t,emit:n}){const o=e,s=n,r=$(null),i=Cr(u=>{s("update:modelValue",u),s("search",u)},Si),a=()=>{s("update:modelValue",""),s("clear"),ht(()=>{var u;(u=r.value)==null||u.focus()})},l=$(o.modelValue);return t({focus:()=>{var u;(u=r.value)==null||u.focus()},setValue(u){l.value=u}}),(u,c)=>(q(),je(hl,{focusIndex:o.focusIndex,ref_key:"searchInput",ref:r,modelValue:l.value,"onUpdate:modelValue":c[0]||(c[0]=d=>l.value=d),type:"text",placeholder:e.placeholder,onInput:V(i),onClear:a,onCancel:c[1]||(c[1]=d=>s("cancel")),"auto-emit":!0},{prefix:we(()=>[Se("div",PQ,[ye(gt,{src:"MagnifyingGlass",color:"var(--grey-200)",size:"14"})])]),_:1},8,["focusIndex","modelValue","placeholder","onInput"]))}}),fl=_t(ot({name:"ListItem",directives:{tooltip:Kt,focusable:Io},__name:"ListItem",props:{itemWidth:{default:"250px"},label:{},value:{},type:{},selected:{type:Boolean},disabled:{type:Boolean},hover:{type:Boolean},clickable:{type:Boolean,default:!0},danger:{type:Boolean},data:{},icon:{},readOnly:{type:Boolean,default:!1},show:{type:Boolean},focusIndex:{}},emits:["click","handleClick","keydown","update:selected","select","escape"],setup(e,{expose:t,emit:n}){const o=Io,s=e,r=n,i=$(!1),a=$(!1);function l(E){if(!E||typeof E!="object")return!1;const _=E;return typeof _.name=="string"&&typeof _.id=="string"&&typeof _.initial=="string"}const u=X(()=>s.type==="status"||s.type==="assignee"||s.type==="icon"||!!y.prefix),c=X(()=>!!y.suffix||s.danger&&i.value),d=X(()=>{var E;return s.type==="status"&&typeof((E=s.data)==null?void 0:E.color)=="string"?{backgroundColor:s.data.color,border:uS(s.data.color,"white")?"1px solid #ccc":"1px solid #fff"}:{}}),h=dm(),f=X(()=>({[h.active]:s.selected??!1,[h.disabled]:s.disabled??!1,[h.hover]:s.hover??!1,[h.clickable]:(s.clickable??!0)&&!s.disabled,[h.danger]:s.danger??!1,[h["has-prefix"]]:u.value,[h["has-suffix"]]:c.value,[h.readOnly]:s.readOnly}));X(()=>({content:"Cancel",...b})),X(()=>({content:"Confirm",theme:"warning",...b}));function p(E){return{name:E.name,initial:E.initial,id:E.id,profile_image:E.profile_image??null,color:E.color,size:24}}function g(){i.value=!1}function v(E){E?r("click",E):(s.clickable??!0)&&(r("update:selected",!s.selected),r("select",!s.selected))}function w(E){if(!s.disabled){if(s.danger&&!i.value){i.value=!0;return}else s.danger||v(E);r("handleClick",E)}}const S=()=>{i.value?g():r("escape")},b=Object.freeze({delay:[300,0],contentClass:["extra-padding"]}),y=Zg();return Qe(()=>s.show,E=>{E===!1&&(i.value=!1)}),t({select:()=>{w(new MouseEvent("click",{bubbles:!0,cancelable:!0}))}}),(E,_)=>{const I=Sc("tooltip");return ze((q(),je(St,{variant:["menu-item",e.danger?"danger":"menu-item"],class:le([E.$style["list-item"],f.value]),onHandleClick:w,onMouseenter:_[0]||(_[0]=T=>a.value=!0),onMouseleave:_[1]||(_[1]=T=>a.value=!1),onEscape:S,style:hn({width:s.itemWidth})},{default:we(()=>[u.value?(q(),de("div",{key:0,class:le(E.$style["list-item__prefix"])},[kt(E.$slots,"prefix",{},()=>[e.type==="icon"&&e.icon?(q(),je(gt,{key:0,src:e.icon,source:"remote",class:le(E.$style["item-icon"]),color:s.danger?void 0:"#a6a6a6"},null,8,["src","class","color"])):e.type==="status"?(q(),de("div",{key:1,class:le(E.$style["status-indicator"]),style:hn(d.value)},null,6)):e.type==="assignee"&&l(e.data)?(q(),je(Ef,jt({key:2},p(e.data),{class:E.$style["item-avatar"],readOnly:!0}),null,16,["class"])):Ye("",!0)])],2)):Ye("",!0),Se("div",{class:le(E.$style["list-item__label"])},[kt(E.$slots,"label",{selected:e.selected},()=>[tt(at(e.label),1)])],2),c.value?(q(),de("div",{key:1,class:le(E.$style["list-item__suffix"])},[kt(E.$slots,"suffix",{item:E.$props,hovered:a.value},()=>[e.danger&&i.value?(q(),de("div",{key:0,class:le(E.$style["confirm-action"])},[ze((q(),je(St,{variant:["tertiary","icon","danger"],size:"small",onClick:Ht(g,["stop","prevent"])},{default:we(()=>[ye(gt,{src:"Xmark",source:"remote"})]),_:1})),[[V(o),`${s.focusIndex}.0`],[I,{content:"Cancel ",delay:[300,0],contentClass:["extra-padding"]}]]),ze((q(),je(St,{variant:["danger","primary","icon"],size:"small",onClick:Ht(v,["stop","prevent"])},{default:we(()=>[ye(gt,{src:"Check",source:"remote"})]),_:1})),[[V(o),`${s.focusIndex}.1`],[I,{delay:[300,0],contentClass:["extra-padding"],content:"Confirm ",theme:"warning"}]])],2)):Ye("",!0)])],2)):Ye("",!0)]),_:3},8,["variant","class","style"])),[[V(o),s.focusIndex]])}}}),[["__cssModules",{$style:{"list-item":"_list-item_iekfz_1",disabled:"_disabled_iekfz_17",danger:"_danger_iekfz_24","has-prefix":"_has-prefix_iekfz_27","has-suffix":"_has-suffix_iekfz_27",clickable:"_clickable_iekfz_41",readOnly:"_readOnly_iekfz_44",hover:"_hover_iekfz_48",active:"_active_iekfz_54","list-item__prefix":"_list-item__prefix_iekfz_79","list-item__label":"_list-item__label_iekfz_87","list-item__suffix":"_list-item__suffix_iekfz_101","status-indicator":"_status-indicator_iekfz_108","item-icon":"_item-icon_iekfz_114","arbo-icon-state":"_arbo-icon-state_iekfz_119","item-avatar":"_item-avatar_iekfz_122","confirm-action":"_confirm-action_iekfz_131"}}]]),kQ=["aria-activedescendant"],FQ=["innerHTML"],OQ=10,ya=_t(ot({__name:"SearchList",props:{options:{default:()=>[]},selectedId:{},loading:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},hasMore:{type:Boolean,default:!1},error:{default:null},params:{},maxHeight:{default:"218px"},width:{default:"250px"},itemWidth:{default:"250px"},minQueryLength:{default:0}},emits:["select","close","search","loadMore","cancel","tab"],setup(e,{expose:t,emit:n}){const o=Kt,s={ARROW_DOWN:"ArrowDown",ARROW_UP:"ArrowUp",ENTER:"Enter",ESCAPE:"Escape",TAB:"Tab"},r=e,i=n,a=$(""),l=$(-1),u=$(null),c=$(null),d=$(new Map),h=X(()=>rE(a.value)),f=()=>{const Z=h.value;if(!Z||Z.length<r.minQueryLength)return r.options;if(d.value.has(Z))return d.value.get(Z);const A=r.options.map(j=>({item:j,score:mJ(` ${j.label} `,Z)})).filter(({score:j})=>j>0).sort((j,ne)=>ne.score-j.score).map(({item:j})=>j);return d.value.set(Z,A),A},p=$([]);Qe(()=>r.options,()=>{p.value=f()},{immediate:!0,deep:!0});const g=X(()=>r.hasMore&&!r.loading&&!r.loadingMore),v=Cr(Z=>{a.value=Z,l.value=-1,i("search",Z)},Si),w=async Z=>{te.value=0,await v(Z||""),te.value=1},S=Z=>a.value?vJ(Z,a.value):Z,b=Z=>{const j={[s.ARROW_DOWN]:()=>y(Z),[s.ARROW_UP]:()=>E(Z),[s.ENTER]:()=>T(Z),[s.ESCAPE]:()=>F(Z),[s.TAB]:()=>L(Z)}[Z.key];j&&j()},y=Z=>{Z.preventDefault(),_(1)},E=Z=>{Z.preventDefault(),_(-1)},_=Z=>{const A=p.value.length;if(A===0)return;let j;Z>0?j=(l.value+1)%A:l.value>0?j=l.value-1:j=A-1,l.value=j,I()},I=()=>{ht(()=>{var A;const Z=(A=c.value)==null?void 0:A.querySelectorAll('[role="menuitem"]')[l.value];Z==null||Z.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})},T=Z=>{if(Z.preventDefault(),l.value>=0&&l.value<p.value.length){const j=p.value[l.value];x(j,Z)}},F=Z=>{Z.preventDefault(),k()},L=Z=>{i("tab",Z)},x=(Z,A)=>{!Z||Z.disabled||(i("select",Z,A),l.value=-1,k())},P=Z=>{Z>=0&&Z<p.value.length&&(l.value=Z)},k=()=>{i("close")},M=()=>{if(!g.value||!c.value)return;const{scrollTop:Z,clientHeight:A,scrollHeight:j}=c.value;j-(Z+A)<=OQ&&i("loadMore")},N=()=>{var Z,A,j;(Z=c.value)==null||Z.addEventListener("scroll",M),(j=(A=oe.value)==null?void 0:A.$el)==null||j.addEventListener("keydown",b)},B=()=>{var Z,A,j;(Z=c.value)==null||Z.removeEventListener("scroll",M),(j=(A=oe.value)==null?void 0:A.$el)==null||j.removeEventListener("keydown",b)};Xt(()=>{N()}),Vn(()=>{B()}),Qe(()=>r.loading,Z=>{!Z&&p.value.length>0&&(l.value=-1)});const z=Z=>Z?Array.isArray(r.selectedId)?r.selectedId.includes(String(Z.id)):r.selectedId==Z.id:!1,oe=$(null);Qe(l,()=>{I()});const ie=()=>{ht(()=>{var Z;(Z=oe.value)==null||Z.focus()})};t({focus:()=>{ht(()=>{var Z;(Z=oe.value)==null||Z.focus()})},reset:()=>{var Z;(Z=oe.value)==null||Z.focus(),l.value=-1},query:a,filteredOptions:p,selectedIndex:l,closeDropdown:k,clearSearch:()=>{a.value=""},scrollTo:Z=>{c.value&&(c.value.scrollTop=Z)},selectIndex:Z=>{Z>=0&&Z<p.value.length&&(l.value=Z,I())}});const te=$(0);Qe([()=>r.loading,()=>a.value,()=>r.options,()=>r.loadingMore],()=>{const Z=r.options.length>0&&p.value.length>0,A=!Z&&a.value.length>0,j=!Z&&a.value.length===0;r.loading?te.value=0:Z?te.value=1:A?te.value=2:j&&(te.value=3)},{immediate:!0,deep:!0});const se=()=>{i("cancel")};return(Z,A)=>(q(),de("datalist",{ref_key:"searchListRef",ref:u,class:le([Z.$style["search-list"],te.value===3||te.value===2?Z.$style.empty:"",p.value.length>8?Z.$style.scrollable:""]),"aria-activedescendant":l.value>=0?`item-${l.value}`:void 0,style:hn({width:e.itemWidth||e.width})},[ye(RE,{ref_key:"searchBoxRef",ref:oe,modelValue:a.value,"onUpdate:modelValue":A[0]||(A[0]=j=>a.value=j),class:le(Z.$style["search-box"]),disabled:e.loading,onSearch:w,onClear:A[1]||(A[1]=j=>w("")),onCancel:se},null,8,["modelValue","class","disabled"]),Se("div",{ref_key:"popupRef",ref:c,class:le(Z.$style["list-container"])},[kt(Z.$slots,"extra-item",{query:a.value,isEmpty:te.value===3||te.value===2,isLoading:r.loading}),(q(!0),de(Pt,null,xn(p.value,(j,ne)=>ze((q(),de("div",{key:`${j.id}-${ne}`,role:"menuitem"},[kt(Z.$slots,"item",{item:j,index:ne,selectedIndex:l.value,isSelected:z,handleSelect:x,handleItemHover:P,getHighlightedLabel:S,query:a.value,idx:ne,focused:l.value==ne,focus:ie},()=>[j.hide?Ye("",!0):(q(),je(fl,jt({key:0,ref_for:!0},j,{hover:ne===l.value,selected:z(j),type:j.type,id:`item-${ne}`,"aria-selected":ne===l.value,onClick:ge=>x(j,ge),onMouseover:ge=>P(ne),onEscape:k,itemWidth:e.itemWidth||e.width}),{prefix:we(()=>[kt(Z.$slots,"prefix-item",{item:j})]),label:we(()=>[a.value?ze((q(),de("span",{key:0,class:le(Z.$style.match),innerHTML:S(j.label)},null,10,FQ)),[[V(o),{content:j.label,delay:[1e3,0]}]]):ze((q(),de("span",{key:1,class:le(Z.$style["item-label"])},[tt(at(j.label),1)],2)),[[V(o),{content:j.label,delay:[1e3,0]}]])]),suffix:we(({hovered:ge})=>[kt(Z.$slots,"action",{item:j,isHovered:ne===l.value,hovered:ge,selected:l.value==ne})]),_:2},1040,["hover","selected","type","id","aria-selected","onClick","onMouseover","itemWidth"]))])])),[[dr,te.value===1]])),128)),te.value===0?kt(Z.$slots,"loading-more",{},()=>[(q(),de(Pt,null,xn(8,j=>Se("div",{class:le(Z.$style["loading-more"]),key:j},[Se("div",{class:le(Z.$style["loading-skeleton"])},null,2),Se("div",{class:le(Z.$style["loading-skeleton"])},null,2)],2)),64))],void 0,0):Ye("",!0),te.value===2?(q(),de("div",{key:1,class:le(Z.$style["no-results"])},[kt(Z.$slots,"empty",{query:a.value},()=>[Se("div",{class:le(Z.$style["no-results-content"])},[...A[2]||(A[2]=[Se("div",null,[tt(" No results. "),Se("br"),tt(" Try another search. ")],-1)])],2)])],2)):Ye("",!0),te.value===3?(q(),de("div",{key:2,class:le(Z.$style["no-results"])},[kt(Z.$slots,"empty-list",{},()=>[Se("div",{class:le(Z.$style["no-results-content"])},[...A[3]||(A[3]=[Se("div",null,"No items available.",-1)])],2)])],2)):Ye("",!0),kt(Z.$slots,"footer")],2)],14,kQ))}}),[["__cssModules",{$style:{"search-list":"_search-list_1rcj9_1",empty:"_empty_1rcj9_11",scrollable:"_scrollable_1rcj9_17","list-container":"_list-container_1rcj9_24","item-label":"_item-label_1rcj9_45","loading-state":"_loading-state_1rcj9_53","loading-more":"_loading-more_1rcj9_54","loading-skeleton":"_loading-skeleton_1rcj9_65","is-loading":"_is-loading_1rcj9_72","no-results":"_no-results_1rcj9_127","no-results-content":"_no-results-content_1rcj9_134",title:"_title_1rcj9_137",tips:"_tips_1rcj9_143",match:"_match_1rcj9_157","skeleton-loading":"_skeleton-loading_1rcj9_1"}}]]),Iu=ot({__name:"AvatarProfile",props:{user:{},showProfile:{type:Boolean,default:!0},apiUpdateFunction:{},appendTo:{}},setup(e){const t=ej,n=e,o=$(n.appendTo||void 0),s=()=>({user:n.showProfile?n.user:void 0,placement:"bottom-start",showInsightButton:!0,showCopyLinkButton:!0,apiUpdateFunction:n.apiUpdateFunction,appendTo:o.value}),r=$(s());Qe(()=>n,()=>{setTimeout(()=>{ht(()=>{o.value=n.appendTo||void 0,r.value=s()})},50)},{immediate:!0,deep:!0});const i=X(()=>un.getInstance().getItem("user.ws_user_role_id")),a=X(()=>({id:n.user.id,name:n.user.name,profile_image:n.user.profile_image,color:n.user.color,initial:n.user.initial,isMe:n.user.id===i.value}));return(l,u)=>ze((q(),je(Ef,_U(A1(a.value)),null,16)),[[V(t),r.value]])}}),MQ={class:"avatar-wrapper"},NQ={class:"assignee-label"},LQ=_t(ot({__name:"AssigneeItem",props:{user:{},hovered:{type:Boolean},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},multipleSelect:{type:Boolean,default:!1},isMe:{type:Boolean},appendTo:{},apiUpdateFunction:{}},emits:["select","deselect","reselect"],setup(e,{emit:t}){const n=Kt,o=e,s=X(()=>({name:o.user.name,id:o.user.id,profile_image:o.user.profile_image,color:{bgColor:o.user.color.bgColor,textColor:o.user.color.textColor},initial:o.user.initial})),r=Zg(),i=X(()=>{if(!a.value&&!o.hover&&!o.focused||!r.actions)return 0;let l=0;const u=c=>{c.forEach(d=>{d.type===Pt&&Array.isArray(d.children)?u(d.children):d.type!==no&&d.type!==Ka&&l++})};return u(r.actions()),l}),a=$(!1);return(l,u)=>(q(),de("div",{class:le(["assignee-selector-item",{hovered:a.value||o.hovered,disabled:o.disabled,selected:o.selected,single:i.value==0,focused:o.focused}]),style:hn({"--actions-count":i.value}),onMouseenter:u[0]||(u[0]=c=>a.value=!0),onMouseleave:u[1]||(u[1]=c=>a.value=!1)},[Se("div",MQ,[ye(Iu,{user:s.value,"show-profile":!0,"append-to":o.appendTo,"api-update-function":o.apiUpdateFunction},null,8,["user","append-to","api-update-function"]),o.multipleSelect?(q(),de("div",{key:0,class:le(["avatar-indicator",[o.selected?"remove":"add"]])},[o.selected?(q(),je(gt,{key:0,src:"CircleXMark"})):(q(),je(gt,{key:1,src:"CirclePlus"}))],2)):Ye("",!0)]),ze((q(),de("div",NQ,[kt(l.$slots,"name",{},()=>[tt(at(o.user.name),1)],!0)])),[[V(n),{content:o.user.name,delay:[1e3,0]}]]),a.value||o.hovered||o.focused?kt(l.$slots,"actions",{},void 0,!0,0):Ye("",!0)],38))}}),[["__scopeId","data-v-4de522be"]]),VQ={class:"unassign-icon"},TE=_t(ot({__name:"UnassignBtn",props:{actived:{type:Boolean,default:!1},label:{default:"No assignee"},borderLeft:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t,o=()=>{n("click")};return(s,r)=>(q(),je(V(St),{variant:"menu-item",onClick:o,actived:e.actived,style:hn({"border-top-width":0,"border-bottom-width":0,"border-left-width":e.borderLeft?"4px":"0"})},{prefix:we(()=>[Se("div",VQ,[kt(s.$slots,"icon",{},()=>[r[0]||(r[0]=Se("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Se("path",{d:"M2.17953 2.75285C1.98276 2.5977 1.69706 2.63365 1.54191 2.83042C1.38677 3.0272 1.42271 3.3129 1.61949 3.46805L12.8204 12.2471C13.0172 12.4023 13.3029 12.3663 13.458 12.1696C13.6132 11.9728 13.5772 11.6871 13.3805 11.532L8.13003 7.41675C9.16308 7.14051 9.9218 6.19827 9.9218 5.07818C9.9218 3.7405 8.83765 2.65636 7.49997 2.65636C6.17932 2.65636 5.10653 3.71212 5.07815 5.0252L2.17953 2.75285ZM6.4461 8.41386C4.67136 8.51035 3.26179 9.98237 3.26179 11.7817C3.26179 12.092 3.51343 12.3436 3.82372 12.3436H11.1762C11.25 12.3436 11.32 12.3304 11.3843 12.3039L6.4461 8.41386Z",fill:"#a6a6a6"})],-1))],!0)])]),default:we(()=>[kt(s.$slots,"label",{},()=>[tt(at(e.label),1)],!0)]),_:3},8,["actived","style"]))}}),[["__scopeId","data-v-ec3b3a15"]]),BQ=["innerHTML"],nM=20,oM=_t(ot({__name:"AssigneeGroupEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},ids:{}},emits:["updated","cancel","update-start","update-failed","update-completed"],setup(e,{expose:t,emit:n}){const o=Kt,s=e,{id:r}=Ng(s),i=n,a=j=>{var ge,xe;const ne=(xe=(ge=s.params)==null?void 0:ge.api)==null?void 0:xe.getRowNode(String(r.value));ne==null||ne.setDataValue("assignees",nv(j.assignees)),A("updated",j)},l=$(!1),u=$(!1),c=$(null),d=$(1),h=$(!0),f=$(0),p=$(""),g=Dn("bulkUpdate",$(!1)),v=Dn("isSelectAll",$(!1)),w=X(()=>{var j;return g.value&&v.value?[]:(j=s.ids)!=null&&j.length?s.ids:[String(r.value)]}),{unAssignAll:S,replaceAssignees:b,handleSelect:y,assigneeList:E,mergedOptions:_,selectedUserIds:I}=Iv({...s,entityId:s.entityId,updateRowData:a,value:s.value,isBulkUpdate:g,isSelectAll:v,errorCallback:()=>{A("update-failed")}},w),{apiServices:T}=so(!g.value,s),F=Dn("workspaceId"),L=async(j=1,ne="",ge=!1)=>{var ue,K,Y,re,R,G;if(!T.value)throw console.error("API service or item identifiers are undefined",T.value),new Error("API service or item identifiers are undefined");if(ge?u.value=!0:l.value=!0,c.value=null,!((ue=T.value)!=null&&ue.multipleAssignableUser))throw new Error("API service getAssignableUsers is undefined");const xe=(s.ids??(s.id?[s.id]:[])).map(String);try{let J;xe.length==0?J=await((K=T.value)==null?void 0:K.getEntityUserRoles({workspaceId:String(F),page:j,per_page:nM,display_name_like:ne.trim(),entity_ids:String(s.entityId)})):J=await((Y=T.value)==null?void 0:Y.multipleAssignableUser({workspaceId:String(F),itemIds:xe,page:j,perPage:nM,q:ne.trim(),entityId:String(s.entityId)}));const ce=((re=ad(J.data))==null?void 0:re.map(Dv))??[];E.value=ge?Kc(E.value,ce,"id"):ce,f.value=J.meta.total,h.value=(((R=J==null?void 0:J.meta)==null?void 0:R.current_page)||0)<(((G=J==null?void 0:J.meta)==null?void 0:G.last_page)||0),d.value=j}catch(J){console.error("Error fetching assignable users:",J),c.value="Failed to load assignable users"}finally{l.value=!1,u.value=!1}},x=()=>{!u.value&&h.value&&L(d.value+1,p.value,!0)},P=Cr(async j=>{p.value=j,await L(1,j,!1)},Si),k=()=>L(1,p.value,!1);Xt(()=>{var j;(j=N.value)==null||j.focus()}),t({getValue:()=>{var j;return(j=_.value.find(ne=>ne.selected))==null?void 0:j.value},refresh:k,clearInternal:()=>{I.value=[]},focus:()=>{var j;(j=N.value)==null||j.focus()}});const M=()=>{const j=un.getInstance().getItem("BASE_URL"),ne=es({type:"access_setting",config:{baseDomain:j,ws_code:s.workspaceId,entity_id:F}}).url;window.open(ne,"_blank")},N=$(null);Xt(()=>{ht(()=>{var j;(j=N.value)==null||j.focus()})}),Qe([()=>s.id,()=>s.workspaceId],()=>{L()},{deep:!0,immediate:!0});const B=j=>{var ge;const ne=un.getInstance().getItem("ws.code");return((ge=T.value)==null?void 0:ge.getUserInformation(ne,j))||Promise.resolve(null)},z=async(j,ne,ge)=>{ne.preventDefault(),ne.stopPropagation(),ne.stopImmediatePropagation(),A("update-start");try{const xe=await y(j);if(xe)A("update-completed",xe);else throw new Error("Failed to update assignees")}catch(xe){A("update-failed"),console.error("Error updating assignees:",xe)}},oe=async()=>{try{A("update-start");const j=await S();if(j)A("update-completed",j);else throw new Error("Failed to unassign all assignees")}catch(j){A("update-failed"),console.error("Error unassigning all assignees:",j)}finally{}},ie=async j=>{try{A("update-start");const ne=await b(j);if(ne)A("update-completed",ne);else throw new Error("Failed to replace assignees")}catch(ne){A("update-failed"),console.error("Error replacing assignees:",ne)}finally{}},te=()=>{var j,ne;i("cancel"),(ne=(j=s.params)==null?void 0:j.api)==null||ne.stopEditing()};ci("popupAttachRef",N);const se=$(),Z=$(!1),A=(j,ne)=>{switch(j){case"updated":i("updated",ne);break;case"update-start":i("update-start");break;case"update-failed":i("update-failed");break;case"update-completed":i("update-completed",ne);break}};return Xt(()=>{ht(()=>{setTimeout(()=>{Z.value=!0},50)})}),(j,ne)=>(q(),de("div",{class:"assigne-editor-wrapper",ref_key:"wrapperRef",ref:se},[ye(ya,jt({"selected-id":V(I)},{...s},{options:V(_),loading:l.value,ref_key:"popupRef",ref:N,"loading-more":u.value,"has-more":h.value,onSelect:ne[0]||(ne[0]=(ge,xe)=>{z(ge,xe)}),"data-wrapper":"true",onSearch:V(P),onLoadMore:x,onCancel:te,onClose:te}),Hh({"extra-item":we(({isEmpty:ge,isLoading:xe})=>[!ge&&!xe?(q(),je(TE,{key:0,onClick:oe,actived:!1,label:"Unassign"},{icon:we(()=>[ye(gt,{src:"UserXMark",source:"remote"})]),_:1})):Ye("",!0)]),item:we(({item:ge,selectedIndex:xe,isSelected:ue,handleItemHover:K,getHighlightedLabel:Y,query:re,idx:R,focused:G})=>[ye(LQ,{user:ge.data,"multiple-select":!0,"append-to":se.value,isMe:!1,hover:R===xe,selected:ue(ge),focused:G,onClick:Ht(J=>z(ge,J,"click"),["stop","prevent"]),onMouseover:J=>K(R),"api-update-function":B},{name:we(()=>[re?ze((q(),de("span",{key:0,class:le([j.$style["item-label"],j.$style.match]),style:{flex:"1"},innerHTML:Y(ge.label)},null,10,BQ)),[[V(o),{content:ge.label}]]):ze((q(),de("span",{key:1,class:le(j.$style["item-label"]),style:{flex:"1"}},[tt(at(ge.label),1)],2)),[[V(o),{content:ge.label}]])]),actions:we(()=>[ze((q(),je(St,{tabindex:-1,variant:["secondary","icon"],size:"small",label:"",onClick:Ht(J=>{var ce;return ie((ce=ge.data)==null?void 0:ce.id)},["stop"])},{default:we(()=>[ye(gt,{src:"PeopleArrows"})]),_:1},8,["onClick"])),[[V(o),"Unassign others and reassign"]])]),_:2},1032,["user","append-to","hover","selected","focused","onClick","onMouseover"])]),"empty-list":we(()=>[Se("div",{class:le(j.$style["empty-state"])},[ne[3]||(ne[3]=tt(" No assignee available. ",-1)),ne[4]||(ne[4]=Se("br",null,null,-1)),ye(St,{onClick:M,variant:["tertiary"],size:"small"},{default:we(()=>[...ne[2]||(ne[2]=[tt(" Go to Access Settings to add team. ",-1)])]),_:1})],2)]),_:2},[c.value?{name:"error",fn:we(()=>[Se("div",{class:le(j.$style["error-message"])},[tt(at(c.value)+" ",1),ye(St,{onClick:k,size:"small"},{default:we(()=>[...ne[1]||(ne[1]=[tt(" Retry ",-1)])]),_:1})],2)]),key:"0"}:void 0]),1040,["selected-id","options","loading","loading-more","has-more","onSearch"])],512))}}),[["__cssModules",{$style:{action:"_action_nv6on_1","item-assignee":"_item-assignee_nv6on_6","item-action":"_item-action_nv6on_6","item-label":"_item-label_nv6on_16","error-message":"_error-message_nv6on_25","empty-state":"_empty-state_nv6on_35","skeleton-avatar":"_skeleton-avatar_nv6on_48"}}]]),$Q={key:0,class:"inner"},jf=_t(ot({__name:"BulkUpdateBtnWrapper",props:{isUpdating:{type:Boolean,default:!1},disabled:{type:Boolean}},emits:["onVisibleChange"],setup(e,{expose:t,emit:n}){const o=e,s=$(null),{triggerRef:r,popupRef:i,isVisible:a,hide:l,toggle:u,show:c}=vo({toggleOnClick:!0,zIndex:2,disabled:o.disabled,placement:"top",appendTo:s.value||void 0}),d=$(null),h=v=>{v.key==="Escape"&&i.value&&l()},f=Fo({isShow:!1,isRender:!1});Xt(()=>{var w;const v=d.value instanceof HTMLElement?d.value:(w=d.value)==null?void 0:w.$el;v&&v.addEventListener("keydown",h)}),Vn(()=>{var w;const v=d.value instanceof HTMLElement?d.value:(w=d.value)==null?void 0:w.$el;v&&v.removeEventListener("keydown",h)});const p=n,g=(v,w)=>{f.isShow=v,f.isRender=w};return Qe(()=>a.value,(v,w)=>{v?ht(()=>{a.value&&g(!0,!0)}):f.isShow=!1,p("onVisibleChange",v,w)}),t({hide:()=>{console.log(" "),l(),g(!1,!0)},isVisible:a,open:()=>{c(),g(!0,!0)},destroy(){l(),g(!1,!1)}}),(v,w)=>(q(),de("div",{class:"bulk-update-btn-wrapper",ref_key:"containerRef",ref:s},[Se("div",{class:"trigger-slot",ref_key:"triggerRef",ref:r},[kt(v.$slots,"trigger",{isVisible:V(a),hide:V(l),disabled:o.isUpdating||o.disabled,popupRef:V(i),triggerRef:V(r),toggle:V(u)},void 0,!0)],512),Se("div",{class:"popup-slot",ref_key:"popupRef",ref:i},[f.isRender?ze((q(),de("div",$Q,[kt(v.$slots,"popup",{isVisible:V(a),hide:V(l),popupRef:V(i),triggerRef:V(r),toggle:V(u),open:V(c)},void 0,!0)],512)),[[dr,f.isShow]]):Ye("",!0)],512)],512))}}),[["__scopeId","data-v-af84b00b"]]),HQ=ot({__name:"AssignneeUpdateButton",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},ids:{},variant:{},selectedAll:{type:Boolean}},emits:["update","update-start","update-completed","update-failed"],setup(e,{emit:t}){const n=e;ci("bulkUpdate",!0);const o=$(!1),s=t,r=$(null),i=()=>{var d;o.value=!0,s("update-start"),(d=l.value)==null||d.hide()},a=(d,h)=>{var f,p;o.value=!1,d?(s("update-completed",h),(f=l.value)==null||f.destroy()):(s("update-failed"),(p=l.value)==null||p.open())},l=$(null),u=d=>{var h;s("update",d),(h=r.value)==null||h.clearInternal()},c=(d,h)=>{ht(()=>{var f,p;d?(f=r.value)==null||f.focus():(p=r.value)==null||p.clearInternal()})};return(d,h)=>(q(),je(jf,{ref_key:"wrapperRef",ref:l,isUpdating:o.value,disabled:n.disabled||o.value,onOnVisibleChange:c},{trigger:we(({hide:f,disabled:p})=>[ye(St,{variant:n.variant,loading:o.value,disabled:p,onEscape:f},{default:we(()=>[ye(gt,{src:"UserPlus",class:"icon"}),h[2]||(h[2]=tt(" Assignee ",-1))]),_:1},8,["variant","loading","disabled","onEscape"])]),popup:we(({hide:f})=>[ye(oM,jt({ref_key:"assigneeGroupEditorRef",ref:r},n,{ids:e.ids,onUpdated:u,onUpdateStart:i,onUpdateFailed:h[0]||(h[0]=p=>a(!1)),onUpdateCompleted:h[1]||(h[1]=p=>a(!0,p)),onCancel:f}),null,16,["ids","onCancel"])]),default:we(()=>[h[3]||(h[3]=tt(" > ",-1))]),_:1},8,["isUpdating","disabled"]))}}),Kf=["start-input","due-input","prev-btn","month-btn","year-btn","next-btn","month-selection","year-selection","date-selection","today-btn","cancel-btn","save-btn"],GQ=new Set(["Tab","Enter","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),pl=(e,t)=>{const n=o=>{var s,r;if(o.key==="Tab"){const i=o.shiftKey||o.metaKey;o.preventDefault(),o.stopImmediatePropagation(),o.stopPropagation();const a=document.activeElement,l=(s=a==null?void 0:a.dataset)==null?void 0:s.index;if(l){let u=Kf.indexOf(l);const c=i?-1:1;for(const d of Kf){u=(u+c+Kf.length)%Kf.length;const h=Kf[u],f=document.querySelector(`[data-index="${h}"]`);if(f){f.focus();return}}}}else if(o.key==="Enter")(r=o.target)==null||r.dispatchEvent(new MouseEvent("click",{bubbles:!0}));else if(o.key==="Escape"){o.stopPropagation(),o.stopImmediatePropagation();const i=document.querySelector('[data-index="calendar-wrapper"]');i==null||i.focus()}};if(GQ.has(e.key))e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),n(e),t&&t(e);else return},UQ=["aria-label"],WQ=["disabled","readOnly","aria-label","data-date","data-weekday","tabindex","onClick"],zQ={style:{flex:"1"}},jQ=_t(ot({__name:"MainCalendar",props:QD({year:{},month:{},startDate:{},endDate:{},timezone:{default:"UTC"},activeField:{default:"start"},requireConfirm:{type:Boolean,default:!1},locale:{default:"en-US"},weekdayLabelStyle:{default:"narrow"},weekStart:{default:0},cancelLabel:{default:"Cancel"},confirmLabel:{default:"Confirm"},immediatelyUpdate:{type:Boolean,default:!1},disabled:{type:Boolean},readOnly:{type:Boolean},disableConfirm:{type:Boolean,default:!1},hasWarning:{type:Boolean,default:!0},disabledTooltip:{default:"This date is disabled"},parentConfig:{}},{tracingCase:{default:()=>({case:"",behavior:""})},tracingCaseModifiers:{}}),emits:QD(["select-start","select-end","select-start-utc","select-end-utc","update:activeField","update:tracingCase","update:month","update:year","close","confirm","cancel","gotoToday"],["update:tracingCase"]),setup(e,{expose:t,emit:n}){const o=Kt,s=$(null),r=e,i=X(()=>r.startDate&&r.endDate),a=az(e,"tracingCase"),l=n,u=$(r.year),c=$(r.month),d=X(()=>{var xe,ue,K;const A=Y=>Y==null?void 0:Y.toFormat("yyyy-MM-dd"),j=(xe=r.parentConfig)==null?void 0:xe.parentName,ne=(ue=r.parentConfig)==null?void 0:ue.parentStartDate,ge=(K=r.parentConfig)==null?void 0:K.parentDueDate;return{smaller:`Before the ${j} start date (${A(ne)})`,larger:`After the ${j} due date (${A(ge)})`,none:""}});Qe(()=>[r.year,r.month],([A,j])=>{u.value=A,c.value=j});const h=X(()=>lt.fromObject({year:u.value,month:c.value,day:1},{zone:r.timezone}).setLocale(r.locale||"en-US").toFormat("LLLL yyyy")),f=X(()=>lt.now().setZone(r.timezone)),p=X(()=>r.startDate?lt.fromJSDate(r.startDate,{zone:r.timezone}):null),g=X(()=>r.endDate?lt.fromJSDate(r.endDate,{zone:r.timezone}):null),v=$(p.value),w=$(g.value),S=$(p.value),b=$(g.value);Qe([p,g],()=>{r.requireConfirm||(v.value=p.value,w.value=g.value,S.value=p.value,b.value=g.value)},{immediate:!0});const y=X(()=>r.requireConfirm?v.value:p.value),E=X(()=>r.requireConfirm?w.value:g.value);Qe(()=>r.activeField,A=>{const j=A==="start"?y.value:E.value;j&&(u.value=j.year,c.value=j.month)}),Qe(()=>{var A,j;return[(A=y.value)==null?void 0:A.toISODate(),(j=E.value)==null?void 0:j.toISODate(),r.activeField]},()=>{const A=r.activeField==="start"?y.value:E.value;A&&(A.year!==u.value||A.month!==c.value)&&(u.value=A.year,c.value=A.month)});function _(A){return A.setZone("utc")}const I=$("");function T(A){I.value=A.toISODate()||"",ht(()=>{const j=document.querySelector(`.arbo-calendar-day[data-date="${I.value}"]`);j==null||j.focus()})}Qe(()=>{var A,j;return[u.value,c.value,r.activeField,(A=y.value)==null?void 0:A.toISODate(),(j=E.value)==null?void 0:j.toISODate()]},()=>{const A=r.activeField==="start"?y.value:E.value;let j;A&&A.year===u.value&&A.month===c.value?j=A:y.value&&y.value.year===u.value&&y.value.month===c.value?j=y.value:j=f.value,T(j)});function F(A){return A.toFormat("d")}const L=X(()=>{var G,J,ce,Ee,Ce,Ne,pe,H;const A=lt.fromObject({year:u.value,month:c.value,day:1},{zone:r.timezone}),j=A.weekday,ne=r.weekStart===1?(j+6)%7:j%7;let ge=A.minus({days:ne});const xe=[],ue=rd.weekdays(r.weekdayLabelStyle||"short",{locale:r.locale||"en-US"}),K=dm(),Y=(J=(G=r.parentConfig)==null?void 0:G.parentStartDate)==null?void 0:J.startOf("day").toMillis(),re=(Ee=(ce=r.parentConfig)==null?void 0:ce.parentDueDate)==null?void 0:Ee.endOf("day").toMillis();console.log("calculating classes for cursor:",{cursor:ge.toISODate(),parentStartMs:Y,parentDueMs:re,parentConfig:r.parentConfig});for(let W=0;W<42;W++){const be=[];ge.month!==c.value&&be.push(K["is-outside"]),ge.hasSame(f.value,"day")&&be.push(K["is-today"]),y.value&&ge.hasSame(y.value,"day")&&be.push(K["is-selected-start"]),E.value&&ge.hasSame(E.value,"day")&&be.push(K["is-selected-end"]),y.value&&E.value&&ge>y.value&&ge<E.value&&be.push(K["is-in-range"]);const Ae=F(ge),He=ue[ge.weekday-1]||"";let Te="none";const Xe=ge.startOf("day").toMillis();Y!==void 0&&Xe<Y?Te="smaller":re!==void 0&&Xe>re&&(Te="larger"),console.log("dayMs:",ge.startOf("day").toFormat("yyyy-MM-dd"),"parentStartMs:",(Ne=(Ce=r.parentConfig)==null?void 0:Ce.parentStartDate)==null?void 0:Ne.toFormat("yyyy-MM-dd"),"parentDueMs:",(H=(pe=r.parentConfig)==null?void 0:pe.parentDueDate)==null?void 0:H.toFormat("yyyy-MM-dd"),"resulting warning:",Te),xe.push({dt:ge,iso:ge.toISODate()||"",label:ge.toFormat("d"),displayLabel:Ae,weekdayLabel:He,aria:ge.setLocale(r.locale||"en-US").toFormat("cccc, d LLLL yyyy"),warning:Te,classes:be}),ge=ge.plus({days:1})}const R=[];for(let W=0;W<6;W++)R.push(xe.slice(W*7,W*7+7));return console.log("cells:",R),R}),x=X(()=>{const A=rd.weekdays(r.weekdayLabelStyle||"short",{locale:r.locale||"en-US"});return r.weekStart===1?A:[A[6],...A.slice(0,6)]});function P(A,j,ne){const ge=A==="start"?j.startOf("day"):j.endOf("day"),xe=_(ge),ue={year:ge.year,month:ge.month,day:ge.day,utc:xe.toISO()||""};A==="start"?(l("select-start",ue,ne??!0),l("select-start-utc",ue.utc)):(l("select-end",ue),l("select-end-utc",ue.utc))}function k(A){let j=u.value,ne=c.value+A;for(;ne<1;)ne+=12,j-=1;for(;ne>12;)ne-=12,j+=1;u.value=j,c.value=ne,l("update:year",j),l("update:month",ne)}function M(A){const ne=(I.value?lt.fromISO(I.value,{zone:r.timezone}):f.value).plus({days:A});ne.month===c.value&&ne.year===u.value&&T(ne)}function N(A=!1){const ne=(I.value?lt.fromISO(I.value,{zone:r.timezone}):f.value).weekday%7,ge=A?6-ne:-ne;M(ge)}const B=A=>{z(A)};function z(A){switch(A.preventDefault(),A.stopPropagation(),A.key){case"ArrowLeft":A.preventDefault(),M(-1);break;case"ArrowRight":A.preventDefault(),M(1);break;case"ArrowUp":A.preventDefault(),M(-7);break;case"ArrowDown":A.preventDefault(),M(7);break;case"Home":A.preventDefault(),N(!1);break;case"End":A.preventDefault(),N(!0);break;case"PageUp":A.preventDefault(),k(A.shiftKey?-12:-1);break;case"PageDown":A.preventDefault(),k(A.shiftKey?12:1);break;case"Enter":case" ":{A.preventDefault();const j=I.value?lt.fromISO(I.value,{zone:r.timezone}):f.value,ne=L.value.flat().find(ge=>ge.iso===j.toISODate());ne&&ie(ne);break}}}const oe=A=>{const j=lt.now().setZone(r.timezone);u.value=j.year,c.value=j.month,l("update:year",j.year),l("update:month",j.month),T(j),l("gotoToday")};function ie(A){var Ee,Ce;const j=!!p.value,ne=!!g.value,ge=r.activeField,xe=((Ee=p.value)==null?void 0:Ee.toISODate())||"null",ue=((Ce=g.value)==null?void 0:Ce.toISODate())||"null",K=A.dt.toISODate()||"",Y=(Ne,pe)=>{a.value={case:Ne,behavior:pe}},re=()=>`Selected start ${K} > existing end ${ue} -> reset both to ${K}`,R=()=>`Selected end ${K} < existing start ${xe} -> reset both to ${K}`,G=()=>{P("start",A.dt,!0),P("end",A.dt),l("update:activeField","end")},J=(Ne=!1)=>{P("start",A.dt,Ne),Ne&&l("update:activeField","end")},ce=(Ne=!1)=>{P("end",A.dt),Ne&&l("close")};if(j&&ne){ge==="start"?g.value&&A.dt>g.value?(G(),Y("INVERT_RANGE_FROM_START",re())):(J(!1),Y("UPDATE_START_IN_RANGE",`Updated start from ${xe} to ${K}; end remains ${ue}`)):p.value&&A.dt<p.value?(G(),Y("INVERT_RANGE_FROM_END",R())):(ce(!1),Y("UPDATE_END_IN_RANGE",`Updated end from ${ue} to ${K}; start remains ${xe}`));return}if(!j&&ne&&ge==="start"&&g.value&&A.dt>g.value){G(),Y("CREATE_RANGE_FROM_LATE_START",re());return}if(j&&!ne&&ge==="end"&&p.value&&A.dt<p.value){G(),Y("CREATE_RANGE_FROM_EARLY_END",R());return}if(!j&&!ne){if(ge==="start"){J(!0),Y("INIT_START",`Picked start ${K}; awaiting end selection`);return}ce(r.immediatelyUpdate),Y("INIT_END",`Picked end ${K}; awaiting start selection`);return}if(!j&&ne){if(ge==="start"){J(!0),Y("FILL_MISSING_START",`Inserted start ${K}; existing end ${ue}`);return}ce(!1),Y("STRICT_UPDATE_END_ONLY",`Updated end to ${K}; start still null`);return}if(j&&!ne){if(ge==="start"){J(!0),Y("RESELECT_START_BEFORE_END",`Replaced start with ${K}; end still null, switching to end`);return}ce(r.immediatelyUpdate),Y("FILL_MISSING_END",`Picked end ${K}; start ${xe}`);return}}function te(){S.value=v.value,b.value=w.value,l("confirm")}function se(){v.value=S.value,w.value=b.value,l("cancel")}function Z(){ht(()=>{var A;(A=s.value)==null||A.focus()})}return Xt(()=>{Z()}),t({focus:Z}),(A,j)=>(q(),de("div",{ref_key:"calendarRef",ref:s,class:le([A.$style["arbo-calendar"],{[A.$style["arbo-date-range-picker"]]:i.value}]),role:"grid","aria-label":h.value,tabindex:"0"},[Se("div",{class:le([A.$style["arbo-calendar-header"],A.$style["arbo-calendar-week"]]),role:"row"},[(q(!0),de(Pt,null,xn(x.value,ne=>(q(),de("div",{key:ne,class:le(A.$style["arbo-calendar-weekday"]),role:"columnheader"},at(ne),3))),128))],2),Se("div",{class:le(A.$style["arbo-calendar-weeks"]),"data-index":"date-selection",tabindex:"0",onKeydownCapture:j[0]||(j[0]=Ht(ne=>V(pl)(ne,B),["prevent","stop"]))},[(q(!0),de(Pt,null,xn(L.value,(ne,ge)=>(q(),de("div",{key:ge,class:le(A.$style["arbo-calendar-week"])},[(q(!0),de(Pt,null,xn(ne,xe=>ze((q(),de("button",{key:xe.iso,class:le([A.$style["arbo-calendar-day"],xe.classes,{[A.$style["is-focused"]]:xe.iso===I.value},{[A.$style["is-warning"]]:xe.warning!=="none"}]),disabled:r.disabled,readOnly:r.readOnly,"aria-label":xe.aria,"data-date":xe.iso,"data-weekday":xe.weekdayLabel,tabindex:xe.iso===I.value?0:-1,onClick:ue=>ie(xe)},[tt(at(xe.displayLabel),1)],10,WQ)),[[V(o),{content:r.disabled||r.readOnly?r.disabledTooltip:d.value[xe.warning],bypassOverflowCheck:!0}]])),128))],2))),128))],34),r.hasWarning?(q(),de("div",{key:0,class:le(A.$style["warning-selection"])},[ye(gt,{src:"InfoCircle",size:"16",color:"var(--tessr-snackbar-fg-warning, #F7941D)"}),j[2]||(j[2]=tt(" Outside the parent folder's date range. You can still confirm. ",-1))],2)):Ye("",!0),r.readOnly?Ye("",!0):(q(),de("div",{key:1,class:le(A.$style["arbo-calendar-actions"])},[Se("div",zQ,[ze((q(),je(St,{variant:"secondary",size:"medium",onClick:j[1]||(j[1]=ne=>oe()),onKeydown:V(pl),"data-index":"today-btn"},{prefix:we(()=>[ye(gt,{src:"CalendarDay"})]),_:1},8,["onKeydown"])),[[V(o),"Today"]])]),ye(St,{disabled:r.disabled,readOnly:r.readOnly,onKeydown:V(pl),variant:"secondary",size:"medium",onClick:se,"data-index":"cancel-btn"},{default:we(()=>[tt(at(r.cancelLabel),1)]),_:1},8,["disabled","readOnly","onKeydown"]),ye(St,{disabled:r.disabled||r.disableConfirm,readOnly:r.readOnly,variant:"primary",size:"medium","data-index":"save-btn",onKeydown:V(pl),onClick:te},{default:we(()=>[tt(at(r.confirmLabel),1)]),_:1},8,["disabled","readOnly","onKeydown"])],2))],10,UQ))}}),[["__cssModules",{$style:{"arbo-date-range-picker":"_arbo-date-range-picker_wwtcu_1","arbo-calendar-week":"_arbo-calendar-week_wwtcu_2","arbo-calendar-day":"_arbo-calendar-day_wwtcu_3","arbo-calendar":"_arbo-calendar_wwtcu_2","arbo-calendar-nav":"_arbo-calendar-nav_wwtcu_36","arbo-calendar-nav-btn":"_arbo-calendar-nav-btn_wwtcu_44","arbo-calendar-nav-label":"_arbo-calendar-nav-label_wwtcu_51","arbo-calendar-weekday":"_arbo-calendar-weekday_wwtcu_56","arbo-calendar-weeks":"_arbo-calendar-weeks_wwtcu_61","is-today":"_is-today_wwtcu_94","is-selected-start":"_is-selected-start_wwtcu_99","is-selected-end":"_is-selected-end_wwtcu_107","is-outside":"_is-outside_wwtcu_127","is-focused":"_is-focused_wwtcu_130","is-in-range":"_is-in-range_wwtcu_135","is-warning":"_is-warning_wwtcu_140","arbo-calendar-actions":"_arbo-calendar-actions_wwtcu_153","warning-selection":"_warning-selection_wwtcu_161","arbo-calendar-btn":"_arbo-calendar-btn_wwtcu_178",cancel:"_cancel_wwtcu_187",confirm:"_confirm_wwtcu_192"}}]]),KQ=["onClick"],qQ=["variant","onClick"],YQ=_t(ot({__name:"CalendarNavigationControl",props:{year:{},month:{},minYear:{default:1970},maxYear:{default:2100},yearSpan:{default:12},monthLabels:{},locale:{default:"en-US"},monthLabelStyle:{default:"short"},ariaPrevLabel:{default:"Previous"},ariaNextLabel:{default:"Next"},ariaToolbarLabel:{default:"Calendar navigation"},ariaSelectYearLabel:{default:"Select year"},ariaSelectMonthLabel:{default:"Select month"},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["update:year","update:month","mode-change","year-selected","month-selected"],setup(e,{expose:t,emit:n}){const o=e,s=X(()=>{if(o.monthLabels&&o.monthLabels.length===12)return o.monthLabels;const k=o.locale||"en-US",M=o.monthLabelStyle||"short",N=new Intl.DateTimeFormat(k,{month:M,timeZone:"UTC"});return Array.from({length:12},(z,oe)=>N.format(new Date(Date.UTC(2020,oe,1))))}),r=n,i=$(o.year),a=$(o.month),l=$(o.year);Qe(()=>o.year,k=>{k!==i.value&&(i.value=k,l.value=k)}),Qe(()=>o.month,k=>{k!==a.value&&(a.value=k)});const u=$("days");function c(k){u.value!==k&&(u.value=k,r("mode-change",k))}const d=X(()=>o.minYear),h=X(()=>o.maxYear),f=X(()=>{const k=o.yearSpan;return l.value-l.value%k}),p=X(()=>f.value+o.yearSpan-1);function g(){const k=o.yearSpan,M=f.value-k;M>=d.value&&(l.value=M)}function v(){const k=o.yearSpan,M=f.value+k;M<=h.value&&(l.value=M)}const w=X(()=>f.value-o.yearSpan<d.value),S=X(()=>p.value+o.yearSpan>h.value),b=X(()=>{const k=o.yearSpan;return Math.ceil(k/3)});function y(k){const N=f.value+(k-1)*3;return Array.from({length:3},(B,z)=>N+z).filter(B=>B<=p.value)}function E(){u.value==="months"?c("days"):c("months")}function _(){u.value==="years"?c("days"):c("years")}function I(k){i.value=k,l.value=k,r("update:year",k),r("year-selected",k),c("months")}function T(k){a.value=k,r("update:month",k),r("month-selected",k),c("days")}function F(){if(u.value==="days"){let k=i.value,M=a.value-1;if(M<1&&(M=12,k--),k<d.value)return;i.value=k,a.value=M,r("update:year",k),r("update:month",M)}else if(u.value==="months"){if(i.value-1<d.value)return;i.value--,r("update:year",i.value)}else u.value==="years"&&g()}function L(){if(u.value==="days"){let k=i.value,M=a.value+1;if(M>12&&(M=1,k++),k>h.value)return;i.value=k,a.value=M,r("update:year",k),r("update:month",M)}else if(u.value==="months"){if(i.value+1>h.value)return;i.value++,r("update:year",i.value)}else u.value==="years"&&v()}const x=X(()=>u.value==="days"?i.value===d.value&&a.value===1:u.value==="months"?i.value-1<d.value:w.value),P=X(()=>u.value==="days"?i.value===h.value&&a.value===12:u.value==="months"?i.value+1>h.value:S.value);return t({setNavigation:(k,M)=>{i.value=k,a.value=M}}),(k,M)=>(q(),de("div",{class:le([k.$style["cal-nav-wrapper"]])},[kt(k.$slots,"selection"),u.value==="days"?(q(),de("div",{key:0,class:le(k.$style["cal-nav-bar"]),"aria-label":"Calendar navigation"},[ye(St,{variant:"tertiary",class:le([k.$style["cal-nav-btn"],k.$style.prev]),"aria-label":"Previous",disabled:x.value,label:"",onClick:F,"data-index":"prev-btn",onKeydownCapture:po(Ht(F,["prevent","stop"]),["enter"]),onKeydown:V(pl)},{default:we(({hovered:N})=>[ye(gt,{src:"AnglesRight",source:"remote",color:N?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled","onKeydownCapture","onKeydown"]),Se("div",{class:le(k.$style["cal-nav-center"])},[ye(St,{"data-index":"month-btn",variant:"secondary",onClick:E,onKeydown:V(pl)},{default:we(()=>[tt(at(s.value[a.value-1]),1)]),_:1},8,["onKeydown"]),ye(St,{variant:"secondary",onClick:_,"data-index":"year-btn",onKeydown:V(pl)},{default:we(()=>[tt(at(i.value),1)]),_:1},8,["onKeydown"])],2),ye(St,{"data-index":"next-btn",variant:"tertiary",class:le([k.$style["cal-nav-btn"],k.$style.next]),"aria-label":"Next",disabled:P.value,label:"",onClick:L,onKeydownCapture:po(Ht(L,["prevent","stop"]),["enter"]),onKeydown:V(pl)},{default:we(({hovered:N})=>[ye(gt,{src:"AnglesRight",source:"remote",color:N?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled","onKeydownCapture","onKeydown"])],2)):Ye("",!0),u.value==="years"?(q(),de("div",{key:1,class:le(k.$style["year-grid"])},[Se("div",{class:le(k.$style["year-grid-header"])},[ye(St,{variant:"tertiary",class:le([k.$style["cal-nav-btn"],k.$style.prev]),"aria-label":"Next",disabled:w.value,"prefix-icon":"AnglesRight",label:"",onClick:g},{default:we(({hovered:N})=>[ye(gt,{src:"AnglesRight",source:"remote",color:N?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled"]),Se("div",{class:le(k.$style["range-label"])},at(f.value)+" - "+at(p.value),3),ye(St,{variant:"tertiary",class:le([k.$style["cal-nav-btn"],k.$style.next]),"aria-label":"Next",disabled:S.value,"prefix-icon":"AnglesRight",label:"",onClick:v},{default:we(({hovered:N})=>[ye(gt,{src:"AnglesRight",source:"remote",color:N?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled"])],2),Se("div",{class:le(k.$style["year-grid-body"]),role:"grid","data-index":"year-selection"},[(q(!0),de(Pt,null,xn(b.value,N=>(q(),de("div",{key:"yr-row-"+N,class:le(k.$style["year-grid-row"])},[(q(!0),de(Pt,null,xn(y(N),B=>(q(),de("a",{key:B,tabindex:"0",class:le([k.$style["year-cell"],{[k.$style.selected]:B===i.value}]),onClick:z=>I(B)},at(B),11,KQ))),128))],2))),128))],2)],2)):u.value==="months"?(q(),de("div",{key:2,class:le(k.$style["month-grid"]),"aria-label":"Select month","data-index":"month-selection"},[Se("div",{class:le(k.$style.months)},[(q(!0),de(Pt,null,xn(s.value,(N,B)=>(q(),de("a",{tabindex:"0",key:N,variant:B+1===a.value?"primary":"text",class:le([k.$style["month-cell"],{[k.$style.selected]:B+1===a.value}]),onClick:z=>T(B+1)},at(N),11,qQ))),128))],2)],2)):(q(),de("div",{key:3,class:le(k.$style["days-slot"])},[kt(k.$slots,"default",{year:i.value,month:a.value,mode:u.value})],2))],2))}}),[["__cssModules",{$style:{"cal-nav-wrapper":"_cal-nav-wrapper_1hrlu_1","cal-nav-bar":"_cal-nav-bar_1hrlu_10","cal-nav-btn":"_cal-nav-btn_1hrlu_18",prev:"_prev_1hrlu_31","year-grid-header":"_year-grid-header_1hrlu_35","cal-nav-center":"_cal-nav-center_1hrlu_44","cal-nav-label":"_cal-nav-label_1hrlu_50","month-grid":"_month-grid_1hrlu_64","year-grid":"_year-grid_1hrlu_35",months:"_months_1hrlu_73","month-cell":"_month-cell_1hrlu_80","year-cell":"_year-cell_1hrlu_81","pg-btn":"_pg-btn_1hrlu_103","year-grid-body":"_year-grid-body_1hrlu_116","year-grid-row":"_year-grid-row_1hrlu_123",selected:"_selected_1hrlu_129","days-slot":"_days-slot_1hrlu_135","range-label":"_range-label_1hrlu_139"}}]]);function XQ(e){const{format:t="dd/MM/yyyy",timezone:n="local",minDate:o,maxDate:s}=e,r=$(""),i=X(()=>{const g=lt.fromFormat(r.value,t,{zone:n});return g.isValid?g:null}),a=X(()=>{if(!o||!i.value)return!0;const g={year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()},v={year:i.value.year,month:i.value.month,day:i.value.day};return v.year>g.year?!0:v.year<g.year?!1:v.month>g.month?!0:v.month<g.month?!1:l(v,g)>=0}),l=(g,v)=>{const w=new Date(g.year,g.month-1,g.day),S=new Date(v.year,v.month-1,v.day);return w<S?-1:w>S?1:0},u=X(()=>{if(!s||!i.value)return!0;const g={year:s.getFullYear(),month:s.getMonth()+1,day:s.getDate()},v={year:i.value.year,month:i.value.month,day:i.value.day};return v.year<g.year?!0:v.year>g.year?!1:v.month<g.month?!0:v.month>g.month?!1:l(v,g)<=0}),c=X(()=>r.value.length==0||r.value.length>0&&i.value!==null&&a.value&&u.value),d=X(()=>r.value.length===t.length&&c.value);return{inputValue:r,isValid:c,isComplete:d,clear:()=>{r.value=""},setDate:g=>{let v;g instanceof Date?v=lt.fromJSDate(g,{zone:n}):v=g.setZone(n),v.isValid?r.value=v.toFormat(t):r.value=""},getDate:()=>c.value?i.value:null}}const ZQ={key:0,style:{marginLeft:"8px"}},JQ=["disabled","readonly","placeholder"],sM=_t(ot({__name:"DateInput",props:{modelValue:{},format:{default:"dd/MM/yyyy"},showDebug:{type:Boolean,default:!0},allowPastDates:{type:Boolean,default:!0},allowFutureDates:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},timezone:{default:""},placeholder:{default:""},size:{},minDate:{default:void 0},maxDate:{default:void 0},isMultipleDate:{type:Boolean,default:!1}},emits:["complete","invalid","clear","blur","tab"],setup(e,{expose:t,emit:n}){const o=Kt,s=e,r=n,i=$(null),a=$(null),{isValid:l,isComplete:u,inputValue:c,clear:d,setDate:h,getDate:f}=XQ({format:s.format,allowPastDates:s.allowPastDates,allowFutureDates:s.allowFutureDates,timezone:s.timezone,minDate:s.minDate,maxDate:s.maxDate}),p=X(()=>s.active),g=X(()=>({disabled:s.disabled,error:!l.value&&c.value.length>0,readOnly:s.readOnly,isEmpty:c.value.length===0,inputRef:i,wrapperRef:a,active:p})),{argsMain:v,isHover:w,isFocus:S}=xo(g),b=T=>{var L;const F=(L=T.clipboardData)==null?void 0:L.getData("text/plain");F&&(c.value=F.trim())},y=T=>{if(T.key==="Escape"){r("blur"),T.target.blur(),T.preventDefault(),T.stopPropagation(),T.stopImmediatePropagation();return}else T.key==="Tab"&&I(T)},E=()=>{d(),r("clear")};t({clear:E,setDate:h,getDate:f,focus:()=>{var T;return(T=i.value)==null?void 0:T.focus()}}),Qe(()=>s.modelValue,T=>{T?h(T):d()},{immediate:!0}),Qe([()=>u.value,()=>c.value],()=>{if(c.value.length===0)r("complete",null);else if(l.value&&!s.readOnly&&!s.disabled&&u.value){const T=f();(T||c.value.length===0)&&r("complete",T)}}),Qe(()=>l.value,T=>{T||r("invalid","")});const _=X(()=>!!s.isMultipleDate),I=T=>{T.preventDefault(),T.stopImmediatePropagation(),T.stopPropagation(),r("tab",T)};return(T,F)=>(q(),je(No,jt(V(v),{ref_key:"wrapperRef",ref:a,bordered:!0,actived:p.value,size:32,style:{padding:"0 4px 0 0",background:"#FAFAFA"}}),{default:we(()=>[Se("div",{class:le([T.$style["date-input-wrapper"]])},[_.value?(q(),de("span",ZQ," Multiple ")):ze((q(),de("input",{key:1,disabled:s.disabled,readonly:s.readOnly,ref_key:"inputRef",ref:i,type:"text","onUpdate:modelValue":F[0]||(F[0]=L=>mn(c)?c.value=L:null),onPaste:Ht(b,["prevent"]),placeholder:s.placeholder,class:le([T.$style["date-input"]]),onKeydown:y},null,42,JQ)),[[hI,V(c)]]),kt(T.$slots,"clear",{handleClear:E},()=>[(V(c).length>0||_.value)&&!s.readOnly&&!s.disabled&&(V(w)||V(S))?ze((q(),je(St,{key:0,variant:["icon","primary"],onClick:Ht(E,["stop"]),size:16,rounded:!0},{default:we(()=>[ye(gt,{src:"XMarkSolid",source:"remote",size:"8",color:"white"})]),_:1})),[[V(o),"Clear"]]):(q(),je(gt,{key:1,src:"Calendar",source:"remote",class:le(T.$style["icon-calendar"]),color:"var(--grey-200)"},null,8,["class"]))])],2)]),_:3},16,["actived"]))}}),[["__cssModules",{$style:{"date-input-wrapper":"_date-input-wrapper_132fk_1","icon-calendar":"_icon-calendar_132fk_9",focus:"_focus_132fk_12",hover:"_hover_132fk_12",active:"_active_132fk_12","date-input":"_date-input_132fk_1",invalid:"_invalid_132fk_38"}}]]),rM=(e,t)=>{if(e==null||e==="")return null;let n;return lt.isDateTime(e)?n=e.setZone(t):e instanceof Date?n=lt.fromJSDate(e,{zone:t}):typeof e=="number"?n=lt.fromMillis(e,{zone:t}):n=lt.fromISO(e,{zone:t}),n.isValid?n:null},QQ=ot({__name:"Calendar",props:{params:{},label:{},value:{},timezone:{default:lE()},format:{default:"LLL dd"},placeholder:{},enableRangeFeedback:{type:Boolean},messages:{},isCompleted:{type:Boolean},isStarted:{type:Boolean},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},size:{},duePlaceholder:{default:"Due"},startPlaceholder:{default:"Start"},startTooltip:{default:"Select start date"},dueTooltip:{default:"Select due date"},showCalendarIcon:{type:Boolean,default:!0},locale:{default:"en-US"},immediatelyUpdate:{type:Boolean,default:!1},multipleStartDates:{type:Boolean},multipleDueDates:{type:Boolean},parent_name:{},parentConfig:{}},emits:["clearStart","clearDue","clearAll","update","update:start","update:end","range:invalid","range:corrected","tracing","confirmed","closed","start-update","finish-update","tab"],setup(e,{expose:t,emit:n}){const o=$({case:"",behavior:""}),s=e,r=$(null),i=n,a=async(R,G)=>{i("start-update"),await R(),i("finish-update"),ht(()=>{var J,ce;G(),(ce=(J=s.params)==null?void 0:J.api)==null||ce.stopEditing()})},l=(R,G)=>{R(),ht(()=>{var J,ce;G(),(ce=(J=s.params)==null?void 0:J.api)==null||ce.stopEditing()})},u=()=>{var G;const R=lt.now().setZone(s.timezone);A.value=R.year,j.value=R.month,(G=Z.value)==null||G.setNavigation(R.year,R.month)},c=Fo({start:!1,end:!1}),{states:d,showMultipleStartDates:h,showMultipleDueDates:f,selectEndDate:p,cancelSelection:g,confirmSelection:v,selectStartDate:w,beginInteraction:S,clearStart:b,clearDue:y}=bJ(s,i),E=X(()=>{if(d.isSelectingStart)return"start";if(d.isSelectingEnd)return"end"});Qe(()=>s.multipleStartDates,R=>{h.value=!!R},{immediate:!0}),Qe(()=>s.multipleDueDates,R=>{f.value=!!R},{immediate:!0});const _=$(null),I=$(null),T=R=>{R.preventDefault(),R.stopImmediatePropagation(),R.stopPropagation(),ie()},F=()=>{var R;(R=I.value)==null||R.focus()},L=R=>{if(!R){c.start=!1,b();return}const G=d.endDate?lt.fromJSDate(d.endDate,{zone:s.timezone}):null;if(G&&x(R,G)>0){const ce={year:R.year,month:R.month,day:R.day};c.start=!1,w(ce,!1),p(ce),ht(()=>{d.isSelectingStart=!0,d.isSelectingEnd=!1});return}const J={year:R.year,month:R.month,day:R.day};c.start=!1,w(J,!0)},x=(R,G)=>{const J=R.startOf("day"),ce=G.startOf("day");return J<ce?-1:J>ce?1:0},P=R=>{var G;R.preventDefault(),R.stopImmediatePropagation(),R.stopPropagation(),(G=document.querySelector('[data-index="prev-btn"]'))==null||G.focus()},k=R=>{if(!R){c.end=!1,y();return}const G=d.startDate?lt.fromJSDate(d.startDate,{zone:s.timezone}):null;if(G&&x(R,G)<0){const ce={year:R.year,month:R.month,day:R.day};c.end=!1,w(ce),p(ce),ht(()=>{d.isSelectingEnd=!0,d.isSelectingStart=!1});return}const J={year:R.year,month:R.month,day:R.day};c.end=!1,p(J)},M=()=>{h.value=!1,b()},N=()=>{f.value=!1,y()},B=()=>{te()},z=X(()=>d.isSelectingStart||d.isSelectingEnd);function oe(){s.disabled||s.readOnly||(S(),d.isSelectingStart=!0,d.isSelectingEnd=!1,ht(()=>{var R;(R=r.value)==null||R.focus()}))}function ie(){s.disabled||s.readOnly||(S(),d.isSelectingEnd=!0,d.isSelectingStart=!1,ht(()=>{var R;(R=_.value)==null||R.focus()}))}function te(){d.isSelectingStart=!1,d.isSelectingEnd=!1,i("closed")}function se(R){R.key==="Escape"?(R.stopPropagation(),te()):R.key=="Tab"&&i("tab",R)}const Z=$(null),A=$(new Date().getFullYear()),j=$(new Date().getMonth()+1);Qe(()=>[d.isSelectingStart,d.isSelectingEnd,d.startDate,d.endDate],()=>{d.isSelectingStart&&d.startDate?(A.value=d.startDate.getFullYear(),j.value=d.startDate.getMonth()+1):d.isSelectingEnd&&d.endDate&&(A.value=d.endDate.getFullYear(),j.value=d.endDate.getMonth()+1)},{immediate:!0});const ne=$(null);function ge(){if(Array.isArray(s.value)){const[G,J]=s.value;d.startDate=G||null,d.endDate=J||null}d.isSelectingStart=!1,d.isSelectingEnd=!1;const R=d.startDate||d.endDate||new Date;A.value=R.getFullYear(),j.value=R.getMonth()+1}Qe(()=>{var R,G,J,ce,Ee,Ce,Ne,pe;return[((J=(G=(R=s.value)==null?void 0:R[0])==null?void 0:G.getTime)==null?void 0:J.call(G))||((ce=s.value)==null?void 0:ce[0]),((Ne=(Ce=(Ee=s.value)==null?void 0:Ee[1])==null?void 0:Ce.getTime)==null?void 0:Ne.call(Ce))||((pe=s.value)==null?void 0:pe[1]),s.timezone,s.format,s.placeholder,s.enableRangeFeedback]},()=>{ge()},{immediate:!0,deep:!0}),t({resetCalendarLogic:ge,openStart:oe,openEnd:ie,closePicker:te,clearAll:B,isOpen:z,drpRef:ne,getValues:()=>({startDate:d.startDate,endDate:d.endDate,dateRange:[d.startDate,d.endDate]}),focus:()=>{d.startDate||d.endDate?d.startDate?oe():ie():oe()}});const ue=$(null);Qe(()=>z.value,R=>{if(s.disabled||s.readOnly)return;const G=ue.value;G&&(R?G.show():G.hide())},{immediate:!0});const K=R=>lt.fromJSDate(R,{zone:s.timezone}),Y=X(()=>{var R,G,J;return{start:rM((R=s.parentConfig)==null?void 0:R.parentStartDate,s.timezone),due:rM((G=s.parentConfig)==null?void 0:G.parentDueDate,s.timezone),name:(J=s.parentConfig)==null?void 0:J.parentName}}),re=X(()=>{const{startDate:R,endDate:G}=d,J=Y.value.start,ce=Y.value.due,Ee=Ne=>!!(Ne&&J&&K(Ne).startOf("day")<J.startOf("day")),Ce=Ne=>!!(Ne&&ce&&K(Ne).startOf("day")>ce.startOf("day"));return Ee(R)||Ee(G)||Ce(R)||Ce(G)});return(R,G)=>(q(),de("div",{class:le(R.$style["calendar-wrapper"]),ref_key:"calendarWrapperRef",ref:I,onKeydown:se,tabindex:"1","data-index":"calendar-wrapper"},[ye(YQ,{year:A.value,"onUpdate:year":G[6]||(G[6]=J=>A.value=J),month:j.value,"onUpdate:month":G[7]||(G[7]=J=>j.value=J),locale:s.locale,disabled:s.disabled,readOnly:s.readOnly,ref_key:"navigationRef",ref:Z},{selection:we(()=>[Se("div",{class:le(R.$style["calendar-input-section"])},[ye(sM,{ref_key:"starDateRef",ref:r,"model-value":V(d).startDate,placeholder:s.startPlaceholder,timezone:s.timezone,active:V(d).isSelectingStart,onClick:oe,onClear:M,onComplete:L,onInvalid:G[0]||(G[0]=J=>c.start=!0),disabled:s.disabled,readOnly:s.readOnly,onBlur:F,onTab:T},null,8,["model-value","placeholder","timezone","active","disabled","readOnly"]),ye(sM,{ref_key:"endDateRef",ref:_,"model-value":V(d).endDate,placeholder:s.duePlaceholder,timezone:s.timezone,active:V(d).isSelectingEnd,onClick:ie,onClear:N,disabled:s.disabled,onComplete:k,onInvalid:G[1]||(G[1]=J=>c.end=!0),readOnly:s.readOnly,isMultipleDate:V(f),onTab:P},null,8,["model-value","placeholder","timezone","active","disabled","readOnly","isMultipleDate"])],2)]),default:we(({year:J,month:ce})=>[ye(jQ,{disabled:s.disabled,"has-warning":re.value,disableConfirm:c.end||c.start,readOnly:s.readOnly,ref_key:"drpRef",ref:ne,"tracing-case":o.value,"onUpdate:tracingCase":G[2]||(G[2]=Ee=>o.value=Ee),year:J,month:ce,"start-date":V(d).startDate,"end-date":V(d).endDate,"active-field":E.value,timezone:s.timezone,parentConfig:s.parentConfig,immediatelyUpdate:e.immediatelyUpdate,onSelectStart:V(w),onSelectEnd:V(p),onGotoToday:u,onConfirm:G[3]||(G[3]=()=>{a(V(v),te)}),onCancel:G[4]||(G[4]=Ee=>l(V(g),te)),onClose:G[5]||(G[5]=Ee=>a(V(v),te))},null,8,["disabled","has-warning","disableConfirm","readOnly","tracing-case","year","month","start-date","end-date","active-field","timezone","parentConfig","immediatelyUpdate","onSelectStart","onSelectEnd"])]),_:1},8,["year","month","locale","disabled","readOnly"])],34))}}),Nv=_t(QQ,[["__cssModules",{$style:{"calendar-wrapper":"_calendar-wrapper_5tolc_1","calendar-input-section":"_calendar-input-section_5tolc_11","display-wrapper":"_display-wrapper_5tolc_19","calendar-actions":"_calendar-actions_5tolc_23","clear-all-btn":"_clear-all-btn_5tolc_29"}}]]),Lv=Ja("entity",()=>{const e=$(null);function t(i){e.value=i}const n=X(()=>{var i;return((i=e.value)==null?void 0:i.name)??""}),o=X(()=>{var i;return((i=e.value)==null?void 0:i.start_date)??""}),s=X(()=>{var i;return((i=e.value)==null?void 0:i.due_date)??""}),r=X(()=>{const i=e.value;return{parentName:(i==null?void 0:i.name)??null,parentStartDate:i!=null&&i.start_date?lt.fromJSDate(new Date(i==null?void 0:i.start_date)):null,parentDueDate:i!=null&&i.due_date?lt.fromJSDate(new Date(i==null?void 0:i.due_date)):null}});return{entityData:e,setEntityData:t,entityName:n,entityStartDate:o,entityEndDate:s,parentConfig:r}}),eee=ot({__name:"DateUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{},rowSelected:{},disabled:{type:Boolean},selectedAll:{type:Boolean}},emits:["updated","update-start","update-completed","update-failed"],setup(e,{emit:t}){const n=t,o=e,s=Dn("isSelectAll",$(!1)),r=Dn("bulkUpdate",$(!1)),i=X(()=>!!o.entityId&&r.value&&s.value),{apiServices:a}=so(!r.value,o),l=Dn("filterParams",null),u=$(null),c=async L=>{var x,P,k,M;try{y.value=!0,n("update-start");let N={workspaceId:o.workspaceId,entityId:o.entityId,itemIds:o.ids,startDate:void 0,dueDate:void 0,filterParams:l!=null&&l.value?l.value:void 0};"start"in L&&(N.startDate=L.start?Tv(L.start):null),"end"in L&&(N.dueDate=L.end?Tv(L.end):null),i.value?(N.itemIds=void 0,N.entityId=o.entityId):N.entityId=void 0;const B=await((P=(x=a.value)==null?void 0:x.changeDate)==null?void 0:P.call(x,N));n("updated",{workspaceId:o.workspaceId,itemIds:o.ids,data:N}),n("update-completed",B),(k=u.value)==null||k.hide()}catch(N){console.error("Failed to update dates:",N),ht(()=>{ht(()=>{var B;n("update-failed"),(B=u.value)==null||B.open()})})}finally{(M=S.value)==null||M.resetCalendarLogic(),y.value=!1}},d=()=>{if(!o.rowSelected||o.rowSelected.length===0){h();return}o.rowSelected.length===1?f():p()},h=()=>{w.value=!1,v.value=!1,b.value=[null,null]},f=()=>{const x=o.rowSelected[0].dateRange;b.value=[(x==null?void 0:x[0])??null,(x==null?void 0:x[1])??null],w.value=!1,v.value=!1},p=()=>{var x,P;if(o.rowSelected.some(k=>k.dateRange&&(k.dateRange[0]!==null||k.dateRange[1]!==null))){const k=g(0),M=g(1);if(v.value=k,w.value=M,k)b.value[0]=null;else{const N=((x=o.rowSelected[0].dateRange)==null?void 0:x[0])??null;b.value[0]=N}if(M)b.value[1]=null;else{const N=((P=o.rowSelected[0].dateRange)==null?void 0:P[1])??null;b.value[1]=N}}else v.value=!1,w.value=!1,b.value=[null,null]},g=L=>{const x=o.rowSelected.map(k=>{var M;return(M=k.dateRange)==null?void 0:M[L]});return x.length===0?!1:new Set(x.map(k=>{var M;return(M=k==null?void 0:k.getTime)==null?void 0:M.call(k)})).size>1},v=$(!1),w=$(!1),S=$(null),b=$([null,null]);Qe([()=>o.ids,()=>o.rowSelected],L=>{d(),ht(()=>{var x;(x=S.value)==null||x.focus()})},{immediate:!0,deep:!0});const y=$(!1),E=()=>{y.value=!0},_=()=>{ht(()=>{setTimeout(()=>{y.value=!1},500)})},I=(L,x)=>{L&&ht(()=>{var P;(P=S.value)==null||P.focus()})},T=Lv(),{parentConfig:F}=go(T);return(L,x)=>(q(),je(jf,{ref_key:"wrapperRef",ref:u,isUpdating:y.value,disabled:o.disabled||y.value,onOnVisibleChange:I},{trigger:we(({hide:P,disabled:k})=>[ye(St,{variant:o.variant,loading:y.value,disabled:k,onEscape:P},{default:we(()=>[ye(gt,{src:"Calendar"}),x[0]||(x[0]=tt(" Date ",-1))]),_:1},8,["variant","loading","disabled","onEscape"])]),popup:we(({isVisible:P,hide:k})=>[P?(q(),je(Nv,{key:0,"parent-config":V(F),immediatelyUpdate:!1,value:b.value,onConfirmed:c,ref_key:"calendarRef",ref:S,onClosed:k,onStartUpdate:E,onFinishUpdate:_,multipleDueDates:w.value,multipleStartDates:v.value},null,8,["parent-config","value","onClosed","multipleDueDates","multipleStartDates"])):Ye("",!0)]),default:we(()=>[x[1]||(x[1]=tt(" > ",-1))]),_:1},8,["isUpdating","disabled"]))}}),tee=e=>{if(Number(e.metric_type.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number(e.metric_type.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number(e.metric_type.id)==3)return"formula"},iM=Ja("metricStore",()=>{const e=$();return{metricList:e,setMetricList:o=>{e.value=o},checkEditType:o=>{var s;if(((s=o==null?void 0:o.auth_permission)==null?void 0:s.permission)==2)return tee(o)}}}),nee=["onKeydown"],oee=["width","height","viewBox"],see=["d"],ree="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z",aM=ot({__name:"RatingComponent",props:{params:{default:()=>({maxRating:5,readOnly:!1,disabled:!1})},modelValue:{},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},emits:["update","update:modelValue","change","handleEnter","cancel"],setup(e,{expose:t,emit:n}){const o=e,s=n,r=$(o.modelValue??0),i=$(null),a=X(()=>{var x;return((x=o.params)==null?void 0:x.size)??24}),l=X(()=>{var x;return((x=o.params)==null?void 0:x.iconViewBox)??"0 0 24 24"}),u=X(()=>{var x;return((x=o.params)==null?void 0:x.iconPath)??ree}),c=X(()=>{var x;return((x=o.params)==null?void 0:x.wrapperTag)??"span"}),d=X(()=>{var x;return o.disabled||((x=o.params)==null?void 0:x.disabled)||!1}),h=X(()=>{var x;return o.readOnly||((x=o.params)==null?void 0:x.readOnly)||!1}),f=X(()=>!d.value&&!h.value),p=X(()=>d.value?"not-allowed":h.value?"default":"pointer");Qe(()=>o.modelValue,x=>{typeof x=="number"&&x!==r.value&&(r.value=x)});const g=x=>{var P;return((P=o.params)==null?void 0:P.maxRating)-x+1<=r.value&&!v.value},v=$(!1),w=()=>{v.value=!0},S=()=>{v.value=!1},b=x=>{f.value&&y(x)},y=x=>{var k,M;if(!f.value)return;let P=((k=o.params)==null?void 0:k.maxRating)-x+1;P===r.value&&(P=0),r.value=P,s("update:modelValue",P),s("update",P),s("change",P),(M=o.params)!=null&&M.onUpdate&&o.params.onUpdate(P)},E=x=>{var P;x!==r.value&&(r.value=x,s("update:modelValue",x),s("update",x),s("change",x),(P=o.params)!=null&&P.onUpdate&&o.params.onUpdate(x),_.value=x)},_=$(r.value),I=x=>{x.preventDefault(),x.stopPropagation(),x.stopImmediatePropagation(),r.value=_.value,s("cancel")},T=x=>{x.preventDefault(),E(r.value),s("handleEnter",r.value)},F=()=>{f.value&&(r.value=Math.min(r.value+1%(o.params.maxRating+1),o.params.maxRating),E(r.value))},L=()=>{f.value&&(r.value=Math.max(r.value-1,0),E(r.value))};return t({focus:()=>{var x;(x=i.value)==null||x.focus()}}),(x,P)=>(q(),de("div",{class:le(["rating-component",{"rating-component--disabled":d.value,"rating-component--readOnly":h.value}]),style:hn({"--max-rating":e.params.maxRating}),ref_key:"ratingRef",ref:i,tabindex:"1",onKeydown:[po(Ht(L,["prevent"]),["left"]),po(Ht(F,["prevent"]),["right"]),po(Ht(L,["prevent"]),["down"]),po(Ht(F,["prevent"]),["up"]),po(Ht(T,["prevent"]),["enter"]),po(Ht(T,["prevent"]),["tab"]),po(Ht(I,["prevent"]),["escape"])]},[(q(!0),de(Pt,null,xn(e.params.maxRating,k=>(q(),je(OC(c.value),{key:k,class:le(["rating-item",{filled:g(k),"rating-item--disabled":d.value,"rating-item--readOnly":h.value}]),style:hn({cursor:p.value,order:e.params.maxRating-k,height:a.value+"px",width:a.value+"px"}),"aria-checked":g(k),"aria-disabled":d.value,"aria-readOnly":h.value,title:e.params.maxRating-k+1,tabindex:-1,onClick:Ht(M=>b(k),["prevent","stop"]),onMouseenter:w,onMouseleave:S},{default:we(()=>[kt(x.$slots,"icon",{index:k,filled:g(k),size:a.value,iconViewBox:l.value,disabled:d.value,readOnly:h.value,value:k},()=>[(q(),de("svg",{class:"rating-icon",width:a.value,height:a.value,viewBox:l.value,"aria-hidden":"true",focusable:"false"},[Se("path",{d:u.value},null,8,see)],8,oee))]),kt(x.$slots,"overlay",{index:k,filled:g(k),disabled:d.value,readOnly:h.value})]),_:2},1064,["class","style","aria-checked","aria-disabled","aria-readOnly","title","onClick"]))),128))],46,nee))}}),iee={style:{maxWidth:"180px",lineHeight:"15px"}},aee=["innerHTML"],lM=ot({__name:"MetricEditorDropdown",props:{config:{},modelValue:{}},emits:["update:modelValue","change","close","handleCancel"],setup(e,{expose:t,emit:n}){const o=Kt,s=e,r=n,i=()=>{r("handleCancel")},a=()=>{r("close")},l=v=>{var w;if(v.format_type==="dropdown"&&v.format_value)try{const S=JSON.parse(v.format_value);if(Array.isArray(S)){const b=S.map(y=>({label:y.name,value:y.name,id:y.name}));return b.unshift({label:"-",value:void 0,id:"-"}),b}}catch(S){console.error("Failed to parse dropdown options",S)}if(v.format_type=="number"&&v.restricted_type=="exact"){const S=((w=v.restricted_value)==null?void 0:w.split(",").map(b=>({label:v.mapping[`!${b}`]||b,value:b,id:b})))||[];return S.unshift({label:"-",value:void 0,id:"-"}),S}return[]},u=X(()=>l(s.config)),c=$(s.modelValue),d=v=>{c.value=v,r("update:modelValue",v),r("change",v||null)},h=$(u.value),f=$(!1),p=v=>{f.value=!0,v?h.value=u.value.filter(w=>w.label.toLowerCase().includes(v.toLowerCase())):h.value=u.value,setTimeout(()=>{f.value=!1},300)},g=$(null);return Xt(()=>{var v;(v=g.value)==null||v.focus()}),t({focus:()=>{var v;(v=g.value)==null||v.focus()}}),(v,w)=>(q(),je(ya,{style:{width:326},loading:f.value,options:h.value,"selected-id":e.modelValue||void 0,onSearch:p,onSelect:w[0]||(w[0]=S=>d(S.id)),ref_key:"searchListRef",ref:g,onClose:a,onCancel:i},{item:we(({item:S,getHighlightedLabel:b,selectedIndex:y,index:E})=>[ye(fl,{hover:y==E,selected:S.value===e.modelValue,label:S.label,onSelect:_=>d(S.value||null),onClick:_=>d(S.value||null)},{label:we(()=>[Se("div",iee,[ze(Se("span",{innerHTML:b(S.label)},null,8,aee),[[V(o),{content:S.label}]])])]),_:2},1032,["hover","selected","label","onSelect","onClick"])]),"empty-list":we(()=>[...w[1]||(w[1]=[tt("No options available.",-1)])]),_:1},8,["loading","options","selected-id"]))}}),lee={class:"metric-input-wrapper"},uee={key:0,class:"error-text input-2"},uM=ot({__name:"MetricEditorInput",props:{config:{},modelValue:{},saveOnBlur:{type:Boolean,default:!0},saveOnEscape:{type:Boolean,default:!1},showInlineError:{type:Boolean,default:!1}},emits:["update:modelValue","handleChange","cancel","enter","onValidation"],setup(e,{expose:t,emit:n}){const o=Kt,s=e,r=$(s.modelValue),i=$(s.modelValue),a=$(!1),l=$(!0),u=$(""),c=X(()=>{var N;const M=Number.parseInt(String((N=s.config)==null?void 0:N.format_value)||"2",10);return Number.isFinite(M)&&M>=0?M:2}),d=M=>{if(!M)return M;const N=String(M).split(".");return N.length>1&&N[1].length>c.value?c.value===0?N[0]:`${N[0]}.${N[1].slice(0,c.value)}`:String(M)},h=M=>{const N=d(M);N!==M&&b.value?r.value=N:r.value=M},f=M=>{const N=M.target;if(!N)return;const B=N.value||"",z=B.indexOf(".");if(M.key==="."&&c.value===0){M.preventDefault();return}z!==-1&&/[0-9]/.test(M.key)&&B.slice(z+1).length>=c.value&&M.preventDefault()},p=X(()=>l.value||s.showInlineError?{content:""}:{content:u.value,placement:"top",theme:"error",trigger:"mouseenter focus",hideOnClick:!1,interactive:!0,showOnCreate:!0,alwayShow:!0,maxWidth:"200px"}),g=()=>{var se;const M=s.config.restricted_type.trim(),N=((se=s.config.restricted_value)==null?void 0:se.split(",").map(Number))||[],[B,z]=N,ie={range:`Enter a value between ${B} and ${z}`,not:`These values are not allowed: ${N.join(", ")}`,exact:"Value is not allowed"}[M];return l.value?"":ie},v=X(()=>{var N;let M="";return Number((N=s.config)==null?void 0:N.format_value)&&(M+="."+Array.from({length:Number(s.config.format_value)}).map(()=>"0").join("")),`0${M}`});Qe(()=>s.modelValue,M=>{r.value=M,i.value=M});const w=M=>bv(s.config,M),S=n,b=$(null),y=M=>{const N=M===""?null:M,B=i.value===""?null:i.value;return N!==B},E=M=>{const N=d(M);if(!y(N))return!1;const B=N===""?null:N;return r.value=B,i.value=B,S("update:modelValue",B),S("handleChange",B),!0},_=()=>{r.value=i.value,S("update:modelValue",i.value)},I=(M,N)=>{E(M),S("enter")},T=(M,N)=>{if(a.value){a.value=!1;return}s.saveOnBlur?E(M):_()},F=M=>{if(M===null||M===""){l.value=!0;return}l.value=bv(s.config,Number(M)),u.value=l.value?"":g()},L=(M,N)=>{a.value=!0,s.saveOnEscape?E(M):_(),S("cancel"),setTimeout(()=>{a.value=!1},100)},x=M=>{F(M),S("onValidation",M)},P=()=>{a.value=!0,_(),S("cancel"),setTimeout(()=>{a.value=!1},100)},k=()=>{var M;r.value=null,i.value=null,S("update:modelValue",null),S("handleChange",null),(M=b.value)==null||M.focus()};return t({focus:()=>{var M;return(M=b.value)==null?void 0:M.focus()},blur:()=>{var M;return(M=b.value)==null?void 0:M.blur()},getValue:()=>r.value,getCachedValue:()=>i.value,save:()=>E(r.value),revert:_}),Xt(()=>{var M;(M=b.value)==null||M.focus()}),(M,N)=>ze((q(),de("div",lee,[ye(hl,{maxDecimalChar:c.value,modelValue:r.value,"onUpdate:modelValue":N[0]||(N[0]=B=>r.value=B),placeholder:v.value,validatorFnc:w,style:{"--bg-input":"#FAFAFA"},onInput:h,onKeydown:f,onEnter:I,onBlur:T,onClear:k,onEscape:L,onCancel:P,onOnValidation:x,type:"number",autoEmit:!1,submitOnEnter:!0,blurOnEscape:!1,ref_key:"inputRef",ref:b},null,8,["maxDecimalChar","modelValue","placeholder"]),!l.value&&e.showInlineError?(q(),de("span",uee,at(u.value),1)):Ye("",!0)])),[[V(o),p.value]])}}),cee={key:2},dee={class:"wrapper-suffix"},hee={key:3},fee=_t(ot({__name:"MetricEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},config:{},attachTo:{},focus:{type:Boolean}},emits:["enter","cancel","blur","updateMetric"],setup(e,{expose:t,emit:n}){const o=Kt,s=e,r=$(null),i=$(0),a=$(null),l=$(null),u=X(()=>TO(s.config)),c=$(!1),d=X(()=>!!ne.value),h=n,f=()=>{c.value=!1,j(),h("cancel")},p=$(!0),g=ue=>{if(ue===null||ue===""){p.value=!0;return}if(u.value!=="number"){p.value=!0;return}p.value=bv(s.config,Number(ue)),w.value=S()},v=()=>{c.value=!0,z()},w=$(""),S=()=>{var ce;const ue=s.config.restricted_type.trim(),K=((ce=s.config.restricted_value)==null?void 0:ce.split(",").map(Number))||[],[Y,re]=K,G={range:`Enter a value between ${Y} and ${re}`,not:`These values are not allowed: ${K.join(", ")}`,exact:"Value is not allowed"}[ue];return p.value?"":G},b=X(()=>{var K;const ue=Number.parseInt(String((K=s.config)==null?void 0:K.format_value)||"2",10);return Number.isFinite(ue)&&ue>=0?ue:2}),y=ue=>{c.value=!0,r.value=ue},E=()=>{c.value=!0,j(),z()},_=ue=>{i.value=ue,c.value=!0,z()},I=()=>(s.config.format_symbol||"BoltSolid").split(/[\s-_]+/).map(K=>K.charAt(0).toUpperCase()+K.slice(1)).join("").replace(/Outline|Solid/g,""),T=$(null),F=$(!0),L=X(()=>{var ue;return{disabled:s.disabled,error:!1,readOnly:!1,isEmpty:((ue=r.value)==null?void 0:ue.length)===0,wrapperRef:Z,active:d,focus:s.focus,bordered:!0}}),x=$(null),P=X(()=>F.value),k=X(()=>({disabled:s.disabled,error:!1,readOnly:!1,isEmpty:i.value===0,wrapperRef:x,active:P,focus:F.value,bordered:!0})),{argsMain:M}=xo(k),{argsMain:N}=xo(L),B=$(null),z=()=>{ht(()=>{var ue;(ue=B.value)==null||ue.focus()})},oe=ue=>{var K;if(ue.format_type==="dropdown"&&ue.format_value)try{const Y=JSON.parse(ue.format_value);if(Array.isArray(Y))return Y.map(re=>({label:re.name,value:re.name,id:re.name}))}catch(Y){console.error("Failed to parse dropdown options",Y)}return ue.format_type=="number"&&ue.restricted_type=="exact"?((K=ue.restricted_value)==null?void 0:K.split(",").map(re=>({label:ue.mapping[`!${re}`]||re,value:re,id:re})))||[]:[]},ie=X(()=>oe(s.config)),te=X(()=>{var ue;return((ue=ie.value.find(K=>K.value===r.value))==null?void 0:ue.label)||r.value||"-"}),se=()=>{var ue;if(u.value=="rating")h("updateMetric",i.value==0?null:i.value);else if(u.value=="number"){const K=(ue=l.value)==null?void 0:ue.getValue();h("updateMetric",K||null)}else h("updateMetric",r.value||null);c.value=!1,j()},{triggerRef:Z,popupRef:A,hide:j,isVisible:ne,show:ge}=vo({toggleOnClick:!0,appendTo:()=>s.attachTo||"parent",zIndex:1e4,offset:[0,0]}),xe=()=>{switch(u.value){case"number":ht(()=>{var ue;(ue=l.value)==null||ue.focus()});break;case"dropdown":ge(),ht(()=>{var ue;(ue=T.value)==null||ue.focus()});break;case"rating":F.value=!0,ht(()=>{var ue;(ue=a.value)==null||ue.focus()});break}};return t({resetState:()=>{r.value=null,i.value=0,c.value=!1},focus:xe,hasChanges:()=>c.value}),Xt(()=>{ht(()=>{setTimeout(()=>{xe()},300)})}),(ue,K)=>(q(),de("div",{class:le(ue.$style["metric-editor"])},[u.value=="number"?(q(),je(uM,{key:0,config:s.config,modelValue:r.value,"onUpdate:modelValue":K[0]||(K[0]=Y=>r.value=Y),style:{width:"100%"},saveOnBlur:!0,saveOnEscape:!1,"show-inline-error":!0,onCancel:f,onOnValidation:g,onEnter:v,onHandleChange:y,maxDecimalChar:b.value,ref_key:"metricEditorInputRef",ref:l},null,8,["config","modelValue","maxDecimalChar"])):u.value=="rating"?(q(),je(No,jt({key:1,"tab-index":1},V(M),{ref_key:"triggerRef2",ref:x,bordered:!0,style:{"--box-padding":"0 ","--icon-size":"18px",background:"#FAFAFA"}}),{default:we(()=>[ye(aM,{params:{maxRating:s.config.range},modelValue:i.value,"onUpdate:modelValue":K[1]||(K[1]=Y=>i.value=Y),onHandleEnter:_,onCancel:f,ref_key:"ratingComponentRef",ref:a},{icon:we(()=>[ye(gt,{source:"rating",src:I()||"Star",size:17},null,8,["src"])]),_:1},8,["params","modelValue"])]),_:1},16)):u.value=="dropdown"?(q(),de("div",cee,[ye(No,jt(V(N),{ref_key:"triggerRef",ref:Z,bordered:!0,style:{"--box-padding":"0 4px 0 4px","--icon-size":"18px",background:"#FAFAFA"}}),{suffix:we(({})=>[Se("div",dee,[ye(gt,{src:"ChevronDown",color:"#A6A6A6",size:"12"})])]),default:we(()=>[ze((q(),de("span",null,[tt(at(te.value||""),1)])),[[V(o),{content:te.value}]])]),_:1},16),Se("div",{ref_key:"popupRef",ref:A},[V(ne)?(q(),je(lM,{key:0,ref_key:"metricEditorDropdownRef",ref:T,config:s.config,modelValue:r.value,"onUpdate:modelValue":K[2]||(K[2]=Y=>r.value=Y),onChange:E,onCancel:f},null,8,["config","modelValue"])):Ye("",!0)],512)])):(q(),de("span",hee,"Formular")),ze((q(),je(St,{ref_key:"confirmButtonRef",ref:B,onHandleClick:se,"tab-index":"1",onKeypress:[po(Ht(xe,["shift","prevent"]),["tab"]),po(Ht(f,["prevent"]),["escape"])],disabled:!p.value},{default:we(()=>[ye(gt,{src:"Check"})]),_:1},8,["onKeypress","disabled"])),[[V(o),"Update"]])],2))}}),[["__cssModules",{$style:{"metric-editor":"_metric-editor_18l4p_1","dropdown-trigger":"_dropdown-trigger_18l4p_10"}}]]),pee=_t(ot({__name:"MetricBulkItem",props:{label:{},morpheme:{},type:{},config:{},attachTo:{}},emits:["loseFocus","open","handleUpdate","focusOnSearch","openSibling"],setup(e,{expose:t,emit:n}){const o=Kt,s=e,r=n,i=$(!1),a=$(null),l=$(null),u=()=>{i.value=!i.value},c=()=>{var g;i.value=!1,(g=l.value)==null||g.resetState()},d=async()=>{var g;i.value=!0,await ht(),(g=l.value)==null||g.focus()},h=g=>{r("handleUpdate",{id:s.config.id.toString(),value:g})},f=()=>{var g;(g=a.value)==null||g.focus(),r("loseFocus")},p=g=>{const w={Escape:()=>{g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation(),r("focusOnSearch",g)},Tab:()=>{i.value&&c()},Enter:()=>{i.value||d()},ArrowDown:()=>{r("openSibling","down")},ArrowUp:()=>{r("openSibling","up")}}[g.key];w&&w()};return Qe(i,g=>{g&&r("open")}),t({hide:c,show:d}),(g,v)=>(q(),de("div",{class:le([g.$style["metric-item"],i.value?g.$style.open:""]),tabindex:"0",ref_key:"metricRef",ref:a,onKeydown:p},[Se("div",{class:le(g.$style["metric-label"]),onClick:Ht(u,["stop"])},[kt(g.$slots,"default",{open:i.value},()=>[ze((q(),de("span",{class:le(g.$style["metric-name"])},[tt(at(e.label),1)],2)),[[V(o),{content:e.label}]]),e.morpheme&&i.value?(q(),de("small",{key:0,class:le(g.$style["metric-morpheme"])}," ("+at(e.morpheme)+") ",3)):Ye("",!0)])],2),ye(Xz,{mode:"out-in",name:"slide"},{default:we(()=>[i.value?(q(),je(fee,{key:`editor-${e.config.id}`,"read-only":!1,focus:i.value,type:e.type,config:e.config,"attach-to":e.attachTo,ref_key:"metricEditorRef",ref:l,onCancel:f,onUpdateMetric:h},null,8,["focus","type","config","attach-to"])):Ye("",!0)]),_:1})],34))}}),[["__cssModules",{$style:{"metric-item":"_metric-item_18ft8_1","metric-label":"_metric-label_18ft8_11",open:"_open_18ft8_19","metric-name":"_metric-name_18ft8_23","metric-morpheme":"_metric-morpheme_18ft8_29"}}]]);function cM(e,t){return function(){return e.apply(t,arguments)}}const{toString:gee}=Object.prototype,{getPrototypeOf:wa}=Object,{iterator:qf,toStringTag:dM}=Symbol,Ca=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),hM=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),Vv=(e,t,n)=>e===Object.prototype||!n&&t===null,mee=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(n=>{if(hM(n))return!1;const o=Object.getOwnPropertyDescriptor(e,n);return!!o&&o.configurable&&o.writable===!0})},DE=(e,t)=>{let n=e;const o=[];for(;n!=null;){if(o.indexOf(n)!==-1)return!1;o.push(n);const s=wa(n);if(Vv(n,s,n===e))return!1;if(Ca(n,t))return!0;n=s}return!1},vee=(e,t)=>e!=null&&DE(e,t)?e[t]:void 0,yee=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=wa(e);if(t===null&&mee(e))return e;const n=Object.create(null),o=Object.create(null),s=[];let r=e;for(;r!=null&&s.indexOf(r)===-1;){s.push(r);const i=r===e?t:wa(r);if(Vv(r,i,r===e))break;const a=Object.getOwnPropertyNames(r);Object.getOwnPropertySymbols&&a.push(...Object.getOwnPropertySymbols(r));for(const l of a)hM(l)||Ca(o,l)||(n[l]=e[l],o[l]=!0);r=i}return n},IE=(e=>t=>{const n=gee.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),_r=e=>(e=e.toLowerCase(),t=>IE(t)===e),Bv=e=>t=>typeof t===e,{isArray:xu}=Array,Au=Bv("undefined");function pd(e){return e!==null&&!Au(e)&&e.constructor!==null&&!Au(e.constructor)&&Ts(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const fM=_r("ArrayBuffer");function wee(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&fM(e.buffer),t}const Cee=Bv("string"),Ts=Bv("function"),bee=Bv("number"),gd=e=>e!==null&&typeof e=="object",See=e=>e===!0||e===!1,$v=e=>{if(!gd(e))return!1;const t=wa(e);return(t===null||t===Object.prototype||wa(t)===null)&&(Vv(e,t,!0)||!Ca(e,dM)&&!Ca(e,qf))},Eee=e=>{if(!gd(e)||pd(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},_ee=_r("Date"),Ree=_r("File"),Tee=e=>!!(e&&typeof e.uri<"u"),Dee=e=>e&&typeof e.getParts<"u",Iee=_r("Blob"),xee=_r("FileList"),Aee=_r("Set"),Pee=e=>gd(e)&&Ts(e.pipe);function kee(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const pM=kee(),gM=typeof pM.FormData<"u"?pM.FormData:void 0,Fee=e=>{if(!e)return!1;if(gM&&e instanceof gM)return!0;const t=wa(e);if(!t||t===Object.prototype||!Ts(e.append))return!1;const n=IE(e);return n==="formdata"||n==="object"&&Ts(e.toString)&&e.toString()==="[object FormData]"},Oee=_r("URLSearchParams"),[Mee,Nee,Lee,Vee]=["ReadableStream","Request","Response","Headers"].map(_r),Bee=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Yf(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,s;if(typeof e!="object"&&(e=[e]),xu(e))for(o=0,s=e.length;o<s;o++)t.call(null,e[o],o,e);else{if(pd(e))return;const r=n?Object.getOwnPropertyNames(e):Object.keys(e),i=r.length;let a;for(o=0;o<i;o++)a=r[o],t.call(null,e[a],a,e)}}function $ee(e,t){if(pd(e))return null;t=t.toLowerCase();const n=Object.keys(e);let o=n.length,s;for(;o-- >0;)if(s=n[o],t===s.toLowerCase())return s;return null}const Pu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,mM=e=>!Au(e)&&e!==Pu;function xE(...e){const{caseless:t,skipUndefined:n}=mM(this)&&this||{},o={},s=t?Object.create(null):null,r=(i,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;let l=a;if(s&&typeof a=="string"){const c=a.toLowerCase(),d=s[c];d!==void 0&&Ca(o,d)?l=d:s[c]=a}const u=Ca(o,l)?o[l]:void 0;$v(u)&&$v(i)?o[l]=xE(u,i):$v(i)?o[l]=xE({},i):xu(i)?o[l]=i.slice():(!n||!Au(i))&&(o[l]=i)};for(let i=0,a=e.length;i<a;i++){const l=e[i];if(!l||pd(l)||(Yf(l,r),typeof l!="object"||xu(l)||!Object.getOwnPropertySymbols))continue;const u=Object.getOwnPropertySymbols(l);for(let c=0;c<u.length;c++){const d=u[c];Jee.call(l,d)&&r(l[d],d)}}return o}const Hee=(e,t,n,{allOwnKeys:o}={})=>(Yf(t,(s,r)=>{n&&Ts(s)?Object.defineProperty(e,r,{__proto__:null,value:cM(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),e),Gee=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Uee=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Wee=(e,t,n,o)=>{let s,r,i;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),r=s.length;r-- >0;)i=s[r],(!o||o(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&wa(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},zee=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n},jee=e=>{if(!e)return null;if(xu(e))return e;let t=e.length;if(!Number.isSafeInteger(t)||t<0||t>4294967295)return null;const n=new Set,o=new Set;let s=e;for(;s!=null&&n.size<t;){if(o.has(s))return null;o.add(s);const i=wa(s);if(Vv(s,i,s===e))break;Object.getOwnPropertyNames(s).forEach(a=>{const l=+a;Number.isInteger(l)&&l>=0&&l<t&&String(l)===a&&Ca(s,a)&&n.add(l)}),s=i}if(n.size!==t)return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Kee=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&wa(Uint8Array)),qee=(e,t)=>{const o=(e&&e[qf]).call(e);let s;for(;(s=o.next())&&!s.done;){const r=s.value;t.call(e,r[0],r[1])}},Yee=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},Xee=_r("HTMLFormElement"),Zee=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,s){return o.toUpperCase()+s}),{propertyIsEnumerable:Jee}=Object.prototype,Qee=_r("RegExp"),vM=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};Yf(n,(s,r)=>{let i;(i=t(s,r,e))!==!1&&(o[r]=i||s)}),Object.defineProperties(e,o)},ete=e=>{vM(e,(t,n)=>{if(Ts(e)&&["arguments","caller","callee"].includes(n))return!1;const o=e[n];if(Ts(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},tte=(e,t)=>{const n={},o=s=>{s.forEach(r=>{n[r]=!0})};return xu(e)?o(e):o(String(e).split(t)),n},nte=()=>{},ote=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ste(e){return!!(e&&Ts(e.append)&&e[dM]==="FormData"&&e[qf])}const rte=e=>{const t=new WeakSet,n=o=>{if(gd(o)){if(t.has(o))return;if(pd(o))return o;if(!("toJSON"in o)){t.add(o);let s;if(Aee(o)){s=[];for(const r of o){const i=n(r);!Au(i)&&s.push(i)}}else s=xu(o)?[]:{},Yf(o,(r,i)=>{const a=n(r);!Au(a)&&(s[i]=a)});return t.delete(o),s}}return o};return n(e)},ite=_r("AsyncFunction"),ate=e=>e&&(gd(e)||Ts(e))&&Ts(e.then)&&Ts(e.catch),yM=((e,t)=>e?setImmediate:t?((n,o)=>(Pu.addEventListener("message",({source:s,data:r})=>{s===Pu&&r===n&&o.length&&o.shift()()},!1),s=>{o.push(s),Pu.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ts(Pu.postMessage)),lte=typeof queueMicrotask<"u"?queueMicrotask.bind(Pu):typeof ee<"u"&&ee.nextTick||yM,wM=e=>e!=null&&Ts(e[qf]),he={isArray:xu,isArrayBuffer:fM,isBuffer:pd,isFormData:Fee,isArrayBufferView:wee,isString:Cee,isNumber:bee,isBoolean:See,isObject:gd,isPlainObject:$v,isEmptyObject:Eee,isReadableStream:Mee,isRequest:Nee,isResponse:Lee,isHeaders:Vee,isUndefined:Au,isDate:_ee,isFile:Ree,isReactNativeBlob:Tee,isReactNative:Dee,isBlob:Iee,isRegExp:Qee,isFunction:Ts,isStream:Pee,isURLSearchParams:Oee,isTypedArray:Kee,isFileList:xee,forEach:Yf,merge:xE,extend:Hee,trim:Bee,stripBOM:Gee,inherits:Uee,toFlatObject:Wee,kindOf:IE,kindOfTest:_r,endsWith:zee,toArray:jee,forEachEntry:qee,matchAll:Yee,isHTMLForm:Xee,hasOwnProperty:Ca,hasOwnProp:Ca,hasOwnInPrototypeChain:DE,getSafeProp:vee,toSafeFlatObject:yee,reduceDescriptors:vM,freezeMethods:ete,toObjectSet:tte,toCamelCase:Zee,noop:nte,toFiniteNumber:ote,findKey:$ee,global:Pu,isContextDefined:mM,isSpecCompliantForm:ste,toJSONObject:rte,isAsyncFn:ite,isThenable:ate,setImmediate:yM,asap:lte,isIterable:wM,isSafeIterable:e=>e!=null&&DE(e,qf)&&wM(e)},ute=he.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),cte=e=>{const t=Object.create(null);let n,o,s;return e&&e.split(`
|
|
148
148
|
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),o=i.substring(s+1).trim();const a=he.hasOwnProp(t,n);!n||a&&he.hasOwnProp(ute,n)||(n==="set-cookie"?a?t[n].push(o):t[n]=[o]:t[n]=a?t[n]+", "+o:o)}),t};function dte(e){let t=0,n=e.length;for(;t<n;){const o=e.charCodeAt(t);if(o!==9&&o!==32)break;t+=1}for(;n>t;){const o=e.charCodeAt(n-1);if(o!==9&&o!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const hte=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),fte=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function AE(e,t){return he.isArray(e)?e.map(n=>AE(n,t)):dte(String(e).replace(t,""))}const pte=e=>AE(e,hte),gte=e=>AE(e,fte);function CM(e){const t=Object.create(null);return he.forEach(e.toJSON(),(n,o)=>{t[o]=gte(n)}),t}const bM=Symbol("internals");function Xf(e){return e&&String(e).trim().toLowerCase()}function Hv(e){return e===!1||e==null?e:he.isArray(e)?e.map(Hv):pte(String(e))}function mte(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}const vte=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function PE(e){let t=0,n=e.length;for(;t<n;){const o=e.charCodeAt(t);if(o!==9&&o!==32)break;t+=1}for(;n>t;){const o=e.charCodeAt(n-1);if(o!==9&&o!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function yte(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let o=1;o<t;o++){const s=e.charCodeAt(o);if(s===34||s===92&&(o+=1,o>=t))return e;n+=e[o]}return n}function wte(e){const t=Object.create(null),n=String(e);let o=0,s=!1,r=!1;function i(a){const l=PE(n.slice(o,a)),u=l.indexOf("=");if(u<1)return;const c=PE(l.slice(0,u));if(!vte.test(c))return;const d=c.toLowerCase();if(d==="__proto__"||d==="constructor"||d==="prototype")return;const h=PE(l.slice(u+1));t[d]=yte(h)}for(let a=0;a<n.length;a++){const l=n.charCodeAt(a);s?r?r=!1:l===92?r=!0:l===34&&(s=!1):l===34?s=!0:(l===44||l===59)&&(i(a),o=a+1)}return i(n.length),t}const Cte=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()),bte="__Proto__",SM=e=>e==="__proto__"?bte:e;function kE(e,t,n,o,s){if(he.isFunction(o))return o.call(e,t,n);if(s&&(t=n),!!he.isString(t)){if(he.isString(o))return t.indexOf(o)!==-1;if(he.isRegExp(o))return o.test(t)}}function Ste(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,o)=>n.toUpperCase()+o)}function Ete(e,t){const n=he.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+n,{__proto__:null,value:function(s,r,i){return this[o].call(this,t,s,r,i)},configurable:!0})})}let Ao=class{constructor(t){t&&this.set(t)}set(t,n,o){const s=this;function r(a,l,u){const c=Xf(l);if(!c)return;const d=he.findKey(s,c);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[SM(d||l)]=Hv(a))}const i=(a,l)=>he.forEach(a,(u,c)=>r(u,c,l));if(he.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(he.isString(t)&&(t=t.trim())&&!Cte(t))i(cte(t),n);else if(he.isObject(t)&&he.isSafeIterable(t)){let a=Object.create(null),l,u;for(const c of t){if(!he.isArray(c))throw new TypeError("Object iterator must return a key-value pair");u=c[0],he.hasOwnProp(a,u)?(l=a[u],a[u]=he.isArray(l)?[...l,c[1]]:[l,c[1]]):a[u]=c[1]}i(a,n)}else t!=null&&r(n,t,o);return this}get(t,n){if(t=Xf(t),t){const o=he.findKey(this,t);if(o){const s=this[o];if(!n)return s;if(n===!0)return mte(s);if(he.isFunction(n))return n.call(this,s,o);if(he.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Xf(t),t){const o=he.findKey(this,t);return!!(o&&this[o]!==void 0&&(!n||kE(this,this[o],o,n)))}return!1}delete(t,n){const o=this;let s=!1;function r(i){if(i=Xf(i),i){const a=he.findKey(o,i);a&&(!n||kE(o,o[a],a,n))&&(delete o[a],s=!0)}}return he.isArray(t)?t.forEach(r):r(t),s}clear(t){const n=Object.keys(this);let o=n.length,s=!1;for(;o--;){const r=n[o];(!t||kE(this,this[r],r,t,!0))&&(delete this[r],s=!0)}return s}normalize(t){const n=this,o=Object.create(null);return he.forEach(this,(s,r)=>{const i=he.findKey(o,r);if(i){n[i]=Hv(s),delete n[r];return}const a=SM(t?Ste(r):String(r).trim());a!==r&&delete n[r],n[a]=Hv(s),o[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return he.forEach(this,(o,s)=>{o!=null&&o!==!1&&(n[s]=t&&he.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
149
149
|
`)}getSetCookie(){const t=this.get("set-cookie");return he.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return wte(t)}static concat(t,...n){const o=new this(t);return n.forEach(s=>o.set(s)),o}static accessor(t){const o=(this[bM]=this[bM]={accessors:{}}).accessors,s=this.prototype;function r(i){const a=Xf(i);o[a]||(Ete(s,i),o[a]=!0)}return he.isArray(t)?t.forEach(r):r(t),this}};Ao.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),he.reduceDescriptors(Ao.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}}),he.freezeMethods(Ao);const Gv="[REDACTED ****]";function _te(e){if(he.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(he.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Rte(e,t){const n=new Set(t.map(r=>String(r).toLowerCase())),o=[],s=r=>{if(r===null||typeof r!="object"||he.isBuffer(r))return r;if(o.indexOf(r)!==-1)return;r instanceof Ao&&(r=r.toJSON()),o.push(r);let i;if(he.isArray(r))i=[],r.forEach((a,l)=>{const u=s(a);he.isUndefined(u)||(i[l]=u)});else{if(!he.isPlainObject(r)&&_te(r))return o.pop(),r;i=Object.create(null);for(const[a,l]of Object.entries(r)){const u=n.has(a.toLowerCase())?Gv:s(l);he.isUndefined(u)||(i[a]=u)}}return o.pop(),i};return s(e)}function EM(e){try{return String(e)}catch{return""}}function Tte(e){return e.errors.map(n=>{try{return n&&n.message?EM(n.message):EM(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}const Dte=`
|
|
150
150
|
Caused by: `,FE=Symbol("causeStack");function Ite(e,t){const n=he.hasOwnProp(e,FE)&&e[FE];return n&&t.endsWith(n)?t.length-n.length:-1}function xte(e,t){try{const n=t&&t.stack;if(typeof n!="string"||!n)return;const o=e.stack;if(typeof o!="string"||!o)return;const s=Dte+n;e.stack=o+s,Object.defineProperty(e,FE,{__proto__:null,value:s})}catch{}}let it=class hU extends Error{static from(t,n,o,s,r,i){let a=t.message;!a&&he.isArray(t.errors)&&t.errors.length&&(a=Tte(t));const l=new hU(a,n||t.code,o,s,r);return Object.defineProperty(l,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),l.name=t.name,xte(l,t),t.status!=null&&l.status==null&&(l.status=t.status),i&&Object.assign(l,i),l}constructor(t,n,o,s,r){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),o&&(this.config=o),s&&(this.request=s),r&&(this.response=r,this.status=r.status)}toJSON(){const t=this.config,n=t&&he.hasOwnProp(t,"redact")?t.redact:void 0,o=he.isArray(n)&&n.length>0?Rte(t,n):he.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:o,code:this.code,status:this.status}}};it.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",it.ERR_BAD_OPTION="ERR_BAD_OPTION",it.ECONNABORTED="ECONNABORTED",it.ETIMEDOUT="ETIMEDOUT",it.ECONNREFUSED="ECONNREFUSED",it.ERR_NETWORK="ERR_NETWORK",it.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",it.ERR_DEPRECATED="ERR_DEPRECATED",it.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",it.ERR_BAD_REQUEST="ERR_BAD_REQUEST",it.ERR_CANCELED="ERR_CANCELED",it.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",it.ERR_INVALID_URL="ERR_INVALID_URL",it.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Ate=null,_M=100;function OE(e){return he.isPlainObject(e)||he.isArray(e)}function RM(e){return he.endsWith(e,"[]")?e.slice(0,-2):e}function ME(e,t,n){return e?e.concat(t).map(function(s,r){return s=RM(s),!n&&r?"["+s+"]":s}).join(n?".":""):t}function Pte(e){return he.isArray(e)&&!e.some(OE)}const kte=he.toFlatObject(he,{},null,function(t){return/^is[A-Z]/.test(t)});function Uv(e,t,n){if(!he.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const o=(S,b)=>{const y=he.getSafeProp(n,S);return he.isUndefined(y)?b:y},s=o("metaTokens",!0),r=o("visitor")||g,i=o("dots",!1),a=o("indexes",!1),l=o("Blob")||typeof Blob<"u"&&Blob,u=o("maxDepth",_M),c=l&&he.isSpecCompliantForm(t),d=[];if(!he.isFunction(r))throw new TypeError("visitor must be a function");function h(S){if(S===null)return"";if(he.isDate(S))return S.toISOString();if(he.isBoolean(S))return S.toString();if(!c&&he.isBlob(S))throw new it("Blob is not supported. Use a Buffer instead.");if(he.isArrayBuffer(S)||he.isTypedArray(S)){if(c&&typeof l=="function")return new l([S]);throw new it("Blob is not supported. Use a Buffer instead.",it.ERR_NOT_SUPPORT)}return S}function f(S){if(S>u)throw new it("Object is too deeply nested ("+S+" levels). Max depth: "+u,it.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(S,b){if(u===1/0)return JSON.stringify(S);const y=[];return JSON.stringify(S,function(_,I){if(!he.isObject(I))return I;for(;y.length&&y[y.length-1]!==this;)y.pop();return y.push(I),f(b+y.length-1),I})}function g(S,b,y){let E=S;if(he.isReactNative(t)&&he.isReactNativeBlob(S))return t.append(ME(y,b,i),h(S)),!1;if(S&&!y&&typeof S=="object"){if(he.endsWith(b,"{}"))b=s?b:b.slice(0,-2),S=p(S,1);else if(he.isArray(S)&&Pte(S)||(he.isFileList(S)||he.endsWith(b,"[]"))&&(E=he.toArray(S)))return b=RM(b),E.forEach(function(I,T){!(he.isUndefined(I)||I===null)&&t.append(a===!0?ME([b],T,i):a===null?b:b+"[]",h(I))}),!1}return OE(S)?!0:(t.append(ME(y,b,i),h(S)),!1)}const v=Object.assign(kte,{defaultVisitor:g,convertValue:h,isVisitable:OE});function w(S,b,y=0){if(!he.isUndefined(S)){if(f(y),d.indexOf(S)!==-1)throw new Error("Circular reference detected in "+b.join("."));d.push(S),he.forEach(S,function(_,I){(!(he.isUndefined(_)||_===null)&&r.call(t,_,he.isString(I)?I.trim():I,b,v))===!0&&w(_,b?b.concat(I):[I],y+1)}),d.pop()}}if(!he.isObject(e))throw new TypeError("data must be an object");return w(e),t}function TM(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(o){return t[o]})}function NE(e,t){this._pairs=[],e&&Uv(e,this,t)}const DM=NE.prototype;DM.append=function(t,n){this._pairs.push([t,n])},DM.toString=function(t){const n=t?o=>t.call(this,o,TM):TM;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Fte(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function IM(e,t,n){if(!t)return e;e=e||"";const o=he.isFunction(n)?{serialize:n}:n,s=he.getSafeProp(o,"encode")||Fte,r=he.getSafeProp(o,"serialize");let i;if(r?i=r(t,o):i=he.isURLSearchParams(t)?t.toString():new NE(t,o).toString(s),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}const Zf=Symbol("internals");function xM(e){return e?e.length:0}function AM(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function Ote(e){return typeof e=="string"&&e!==""&&String(Number(e))===e?Number(e):e}function Jf(e,t){const n=e.handlers,o=xM(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):o!==t.handlersLength&&(o?t.handlerEntries.forEach(function(r,i){n[r.index]!==r.handler&&t.handlerEntries.delete(i)}):t.handlerEntries.clear()),t.handlersLength=o}class PM{constructor(){this.handlers=[],this[Zf]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(t,n,o){const s={fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null},r=this[Zf];this.handlers==null&&(this.handlers=[]),Jf(this,r);const i=r.nextId++;return this.handlers.push(s),r.handlerEntries.set(i,{handler:s,index:this.handlers.length-1}),r.handlersLength=this.handlers.length,i}eject(t){const n=this[Zf];Jf(this,n);const o=Ote(t),s=n.handlerEntries.get(o);if(s){if(n.handlerEntries.delete(o),this.handlers[s.index]!==s.handler)return;this.handlers[s.index]=null,n.iterationDepth||(AM(this.handlers),n.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],Jf(this,this[Zf]))}forEach(t){const n=this[Zf];Jf(this,n),n.iterationDepth++;try{he.forEach(this.handlers,function(s){s!==null&&t(s)})}finally{--n.iterationDepth||(Jf(this,n),AM(this.handlers),n.handlersLength=xM(this.handlers))}}}const LE={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0,encodeBasicAuthUsername:!1},Mte={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:NE,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},VE=typeof window<"u"&&typeof document<"u",BE=typeof navigator=="object"&&navigator||void 0,Nte=VE&&(!BE||["ReactNative","NativeScript","NS"].indexOf(BE.product)<0),Lte=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Vte=VE&&window.location.href||"http://localhost",yo={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:VE,hasStandardBrowserEnv:Nte,hasStandardBrowserWebWorkerEnv:Lte,navigator:BE,origin:Vte},Symbol.toStringTag,{value:"Module"})),...Mte};function Bte(e,t){return Uv(e,new yo.classes.URLSearchParams,{visitor:function(n,o,s,r){return yo.isNode&&he.isBuffer(n)?(this.append(o,n.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}const kM=_M;function FM(e){if(e>kM)throw new it("FormData field is too deeply nested ("+e+" levels). Max depth: "+kM,it.ERR_FORM_DATA_DEPTH_EXCEEDED)}function $te(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let o;for(;(o=n.exec(e))!==null;)FM(t.length),t.push(o[0]==="[]"?"":o[1]||o[0]);return t}function OM(e){const t={},n=Object.keys(e);let o;const s=n.length;let r;for(o=0;o<s;o++)r=n[o],t[r]=e[r];return t}function MM(e){if(!he.isArray(e))return e;const t=Object.keys(e);return t.length!==e.length||t.some((n,o)=>n!==String(o))?OM(e):e}function Hte(e){const t=[e];for(;t.length;){const n=t.pop();Object.keys(n).forEach(o=>{const s=n[o]=MM(n[o]);(he.isArray(s)||he.isPlainObject(s))&&t.push(s)})}return e}function NM(e){function t(n,o,s,r){FM(r);let i=n[r++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),l=r>=n.length;return i=!i&&he.isArray(s)?s.length:i,l?(he.hasOwnProp(s,i)?(s[i]=MM(s[i]),s[i]=he.isArray(s[i])?s[i].concat(o):[s[i],o]):s[i]=o,!a):((!he.hasOwnProp(s,i)||!he.isObject(s[i]))&&(s[i]=[]),t(n,o,s[i],r)&&he.isArray(s[i])&&(s[i]=OM(s[i])),!a)}if(he.isFormData(e)&&he.isFunction(e.entries)){const n={};return he.forEachEntry(e,(o,s)=>{t($te(o),s,n,0)}),Hte(n)}return null}const LM=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),md=(e,t)=>e!=null&&he.hasOwnProp(e,t)?e[t]:void 0;function Gte(e,t,n){if(he.isString(e))try{return(t||JSON.parse)(e),he.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(e)}const Qf={transitional:LE,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const o=n.getContentType()||"",s=o.indexOf("application/json")>-1,r=he.isObject(t);if(r&&he.isHTMLForm(t)&&(t=new FormData(t)),he.isFormData(t))return s?JSON.stringify(NM(t)):t;if(he.isArrayBuffer(t)||he.isBuffer(t)||he.isStream(t)||he.isFile(t)||he.isBlob(t)||he.isReadableStream(t))return t;if(he.isArrayBufferView(t))return t.buffer;if(he.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(r){const l=md(this,"formSerializer");if(o.indexOf("application/x-www-form-urlencoded")>-1)return Bte(t,l).toString();if((a=he.isFileList(t))||o.indexOf("multipart/form-data")>-1){const u=md(this,"env"),c=u&&u.FormData;return Uv(a?{"files[]":t}:t,c&&new c,l)}}return r||s?(n.setContentType("application/json",!1),Gte(t)):t}],transformResponse:[function(t){const n=md(this,"transitional")||Qf.transitional,o=n&&n.forcedJSONParsing,s=md(this,"responseType"),r=s==="json";if(he.isResponse(t)||he.isReadableStream(t))return t;if(t&&he.isString(t)&&(o&&!s||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t,md(this,"parseReviver"))}catch(l){if(a)throw l.name==="SyntaxError"?it.from(l,it.ERR_BAD_RESPONSE,this,null,md(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yo.classes.FormData,Blob:yo.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};he.forEach(LM,e=>{Qf.headers[e]={}});function $E(e,t){const n=this||Qf,o=t||n,s=Ao.from(o.headers);let r=o.data;return he.forEach(e,function(a){r=a.call(n,r,s.normalize(),t?t.status:void 0)}),s.normalize(),r}function VM(e){return!!(e&&e.__CANCEL__)}let ep=class extends it{constructor(t,n,o){super(t??"canceled",it.ERR_CANCELED,n,o),this.name="CanceledError",this.__CANCEL__=!0}};function BM(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new it("Request failed with status code "+n.status,n.status>=400&&n.status<500?it.ERR_BAD_REQUEST:it.ERR_BAD_RESPONSE,n.config,n.request,n))}const Ute=/[\t\n\r]/g;function $M(e){if(typeof e!="string")return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(Ute,"")}function HE(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1].toLowerCase()||""}const HM=e=>{try{return decodeURIComponent(e)}catch{return e}},GM=yo.hasStandardBrowserEnv?{write(e,t,n,o,s,r,i){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];he.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),he.isString(o)&&a.push(`path=${o}`),he.isString(s)&&a.push(`domain=${s}`),r===!0&&a.push("secure"),he.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie;if(!t)return null;const n=t.split(";");for(let o=0;o<n.length;o++){const s=n[o].replace(/^\s+/,""),r=s.indexOf("=");if(r!==-1&&s.slice(0,r)===e)return HM(s.slice(r+1))}return null},async readAsync(e){try{const t=typeof window<"u"&&window.cookieStore;if(t&&he.isFunction(t.get)){const n=await t.get(e);return n?HM(n.value):null}}catch{}return this.read(e)},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},async readAsync(){return null},remove(){}};function Wte(e,t){e=e||10;const n=new Array(e),o=new Array(e);let s=0,r=0,i;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=o[r];i||(i=u),n[s]=l,o[s]=u;let d=r,h=0;for(;d!==s;)h+=n[d++],d=d%e;if(s=(s+1)%e,s===r&&(r=(r+1)%e),u-i<t)return;const f=c&&u-c;return f?Math.round(h*1e3/f):void 0}}function zte(e,t){let n=0,o=1e3/t,s,r;const i=(c,d=Date.now())=>{n=d,s=null,r&&(clearTimeout(r),r=null),e(...c)};return[(...c)=>{const d=Date.now(),h=d-n;h>=o?i(c,d):(s=c,r||(r=setTimeout(()=>{r=null,i(s)},o-h)))},()=>s&&i(s),(...c)=>i(c)]}const Wv=(e,t,n=3)=>{let o=0;const s=Wte(50,250);return zte(r=>{if(!r||!he.isNumber(r.loaded))return;const i=r.loaded,a=r.lengthComputable?r.total:void 0,l=Math.max(0,a!=null?Math.min(i,a):i),u=Math.max(0,l-o),c=s(u);o=Math.max(o,l);const d={loaded:l,total:a,progress:a?l/a:void 0,bytes:u,rate:c||void 0,estimated:c&&a?(a-l)/c:void 0,event:r,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},UM=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},WM=(e,t=he.asap)=>(...n)=>t(()=>e(...n)),jte=yo.hasStandardBrowserEnv?(e=>t=>(t=new URL(t,document.baseURI||yo.origin),e.protocol===t.protocol&&e.host===t.host&&e.port===t.port))(new URL(yo.origin)):()=>!0;function Kte(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function qte(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const Yte=/^https?:(?!\/\/)/i;function Xte(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,o="")=>`${n}${o}${Gv}`)}function Zte(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Gv}@`),n=t.indexOf("#"),s=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Gv}`);return n===-1?s:`${s}#${Xte(t.slice(n+1))}`}function zM(e,t){if(typeof e=="string"){const n=$M(e);if(Yte.test(n))throw new it(`Invalid URL ${JSON.stringify(Zte(n))}: missing "//" after protocol`,it.ERR_INVALID_URL,t)}}function jM(e,t,n,o){zM(t,o);let s=!Kte(t);return e&&(s||n===!1)?(zM(e,o),qte(e,t)):t}function Jte(e){const t=[{value:e}],n=new WeakSet,o=new WeakSet;for(;t.length;){const{value:s,done:r}=t.pop();if(!he.isPlainObject(s)&&!he.isArray(s))continue;if(r){n.delete(s);continue}if(n.has(s))throw new it("Circular reference detected in params",it.ERR_BAD_OPTION_VALUE);if(o.has(s))continue;o.add(s),n.add(s),t.push({value:s,done:!0});const i=Object.keys(s);Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertySymbols(s).forEach(a=>{const l=Object.getOwnPropertyDescriptor(s,a);l&&l.enumerable&&i.push(a)}),i.forEach(a=>{if(a==="__proto__"||a==="constructor"||a==="prototype"){const l=Object.getOwnPropertyDescriptor(s,a);l&&he.hasOwnProp(l,"value")&&t.push({value:l.value})}else t.push({value:s[a]})})}}const KM=e=>e instanceof Ao?{...e}:e,GE=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>{const n=Object.getOwnPropertyDescriptor(e,t);return n&&n.enumerable})):Object.keys(e);function Qte(e,t){const n=[],o=new WeakMap,s={};function r(a,l){if(!he.isPlainObject(l))return he.isArray(l)?l.slice():l;const u=he.isPlainObject(a)?a:s;let c=o.get(l);if(c||(c=new WeakMap,o.set(l,c)),c.has(u))return c.get(u);const d={};return c.set(u,d),n.push({base:u,source:l,result:d}),d}const i=he.isUndefined(t)?r(void 0,e):r(e,t);for(;n.length;){const{base:a,source:l,result:u}=n.pop(),c=new Set(GE(a)),d=new Set(GE(l));new Set([...c,...d]).forEach(f=>{if(f==="__proto__"||f==="constructor"||f==="prototype")return;const p=d.has(f),g=p?l[f]:void 0,v=(!p||he.isPlainObject(g))&&c.has(f)?a[f]:void 0;u[f]=p?r(v,g):r(void 0,v)})}return Jte(i),i}function gl(e,t,n,o){return he.isPlainObject(e)&&he.isPlainObject(t)?he.merge.call({caseless:o},e,t):he.isPlainObject(t)?he.merge({},t):he.isArray(t)?t.slice():t}function qM(e,t,n,o){if(he.isUndefined(t)){if(!he.isUndefined(e))return gl(void 0,e,n,o)}else return gl(e,t,n,o)}function UE(e,t){if(!he.isUndefined(t))return gl(void 0,t)}function Hn(e,t){if(he.isUndefined(t)){if(!he.isUndefined(e))return gl(void 0,e)}else return gl(void 0,t)}function ene(e,t,n){const o=he.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!he.isUndefined(o))if(he.isPlainObject(o)){if(he.hasOwnProp(o,n))return o[n]}else return;const s=he.hasOwnProp(e,"transitional")?e.transitional:void 0;if(he.isPlainObject(s)&&he.hasOwnProp(s,n))return s[n]}function WE(e,t,n,o,s){if(he.hasOwnProp(s,n))return gl(e,t);if(he.hasOwnProp(o,n))return gl(void 0,e)}function tne(e,t,n){return qM(KM(e),KM(t),n,!0)}const nne=Object.freeze({__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0}),YM={url:UE,method:UE,data:UE,baseURL:Hn,transformRequest:Hn,transformResponse:Hn,params:Qte,paramsSerializer:Hn,timeout:Hn,timeoutErrorMessage:Hn,withCredentials:Hn,withXSRFToken:Hn,adapter:Hn,responseType:Hn,xsrfCookieName:Hn,xsrfHeaderName:Hn,onUploadProgress:Hn,onDownloadProgress:Hn,decompress:Hn,maxContentLength:Hn,maxBodyLength:Hn,beforeRedirect:Hn,transport:Hn,httpAgent:Hn,httpsAgent:Hn,cancelToken:Hn,socketPath:Hn,allowedSocketPaths:Hn,responseEncoding:Hn,validateStatus:WE,headers:tne};function ku(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",nne);const o=GE({...e,...t});for(let s=0,r=o.length;s<r;s++){const i=o[s];if(i==="__proto__"||i==="constructor"||i==="prototype")continue;const a=he.hasOwnProp(YM,i)?YM[i]:qM,l=he.hasOwnProp(e,i)?e[i]:void 0,u=he.hasOwnProp(t,i)?t[i]:void 0,c=a===WE?a(l,u,i,e,t):a(l,u,i);he.isUndefined(c)&&a!==WE||(n[i]=c)}return he.hasOwnProp(t,"validateStatus")&&he.isUndefined(t.validateStatus)&&ene(e,t,"validateStatusUndefinedResolves")===!1&&(he.hasOwnProp(e,"validateStatus")?n.validateStatus=gl(void 0,e.validateStatus):delete n.validateStatus),n}const one=["content-type","content-length"];function sne(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([o,s])=>{one.includes(o.toLowerCase())&&e.set(o,s)})}const XM=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),rne=e=>GM.read(e);function ZM(e,t=rne){const n=ku({},e),o=f=>he.hasOwnProp(n,f)?n[f]:void 0,s=o("data");let r=o("withXSRFToken");const i=o("xsrfHeaderName"),a=o("xsrfCookieName");let l=o("headers");const u=o("auth"),c=o("baseURL"),d=o("allowAbsoluteUrls"),h=o("url");if(n.headers=l=Ao.from(l),n.url=IM(jM(c,h,d,n),o("params"),o("paramsSerializer")),u){const f=he.getSafeProp(u,"username")||"",p=he.getSafeProp(u,"password")||"",g=o("transitional"),v=g&&he.hasOwnProp(g,"encodeBasicAuthUsername")&&g.encodeBasicAuthUsername===!0;try{l.set("Authorization","Basic "+btoa((v?XM(f):f)+":"+(p?XM(p):"")))}catch(w){throw it.from(w,it.ERR_BAD_OPTION_VALUE,e)}}if(he.isFormData(s)){const f=he.getSafeProp(s,"getHeaders");yo.hasStandardBrowserEnv||yo.hasStandardBrowserWebWorkerEnv||he.isReactNative(s)?l.setContentType(void 0):he.isFunction(f)&&sne(l,f.call(s),o("formDataHeaderPolicy"))}if(yo.hasStandardBrowserEnv&&(he.isFunction(r)&&(r=r(n)),r===!0||r==null&&jte(n.url))){const p=i&&a&&t(a);p&&l.set(i,p)}return n}const ine=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,o){let s;try{const T=yo.hasStandardBrowserEnv&&typeof window<"u"&&window.cookieStore;s=T&&he.isFunction(T.get)}catch{}let r;const i=ZM(e,s?T=>(r=T,null):void 0);let a=i.data;const l=Ao.from(i.headers).normalize();let{responseType:u,onUploadProgress:c,onDownloadProgress:d}=i,h,f,p,g,v,w,S;function b(){clearTimeout(f);try{v&&v()}catch(T){setTimeout(()=>{throw T})}try{w&&w()}catch(T){setTimeout(()=>{throw T})}y&&(g&&y.removeEventListener("progress",g),y.upload&&(p&&y.upload.removeEventListener("progress",p),v&&y.upload.removeEventListener("loadend",v))),i.cancelToken&&i.cancelToken.unsubscribe(h),i.signal&&i.signal.removeEventListener("abort",h)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function E(T){if(!y)return;if(y.status===0&&(HE($M(i.url))||HE(yo.origin))!=="file"&&!(y.responseURL&&y.responseURL.startsWith("file:"))){o(new it("Request aborted",it.ECONNABORTED,e,y)),b(),y=null;return}try{T?S&&S(T):w&&w()}catch(P){setTimeout(()=>{throw P})}if(!y)return;const F=Ao.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),x={data:!u||u==="text"||u==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:F,config:e,request:y};BM(function(k){n(k),b()},function(k){o(k),b()},x),y=null}if("onloadend"in y?y.onloadend=E:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.startsWith("file:"))||setTimeout(E)},y.onabort=function(){y&&(o(new it("Request aborted",it.ECONNABORTED,e,y)),b(),y=null)},y.onerror=function(F){const L=F&&F.message?F.message:"Network Error",x=new it(L,it.ERR_NETWORK,e,y);x.event=F||null,o(x),b(),y=null},y.ontimeout=function(){if(!y)return;let F=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const L=i.transitional||LE;i.timeoutErrorMessage&&(F=i.timeoutErrorMessage),o(new it(F,L.clarifyTimeoutError?it.ETIMEDOUT:it.ECONNABORTED,e,y)),b(),y=null},a===void 0&&l.setContentType(null),he.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),u&&u!=="json"&&(y.responseType=i.responseType),d&&([g,w,S]=Wv(d,!0),y.addEventListener("progress",g)),c&&y.upload&&([p,v]=Wv(c),y.upload.addEventListener("progress",p),y.upload.addEventListener("loadend",v)),i.cancelToken||i.signal){if(h=T=>{if(!y)return;o(!T||T.type?new ep(null,e,y):T);const F=y;b(),y=null,F.abort()},i.cancelToken&&i.cancelToken.subscribe(h),!y)return;i.signal&&(i.signal.aborted?h():i.signal.addEventListener("abort",h))}if(!y)return;const _=HE(i.url);if(_&&!yo.protocols.includes(_)){o(new it("Unsupported protocol "+_+":",it.ERR_BAD_REQUEST,e)),b();return}const I=()=>{y&&("setRequestHeader"in y&&he.forEach(CM(l),function(F,L){y.setRequestHeader(L,F)}),y.send(a||null))};if(r){const T=typeof performance<"u"&&he.isFunction(performance.now)?()=>performance.now():Date.now,F=y.timeout>0?T()+Number(y.timeout):void 0,L=()=>{if(!y)return;const x=y;x.ontimeout(),x.abort()};if(F!==void 0){const x=()=>{const P=F-T();P>0?f=setTimeout(x,Math.min(P,2147483647)):L()};x()}GM.readAsync(r).then(x=>{if(y){if(F!==void 0&&T()>=F){L();return}if(x){const P=he.hasOwnProp(i,"xsrfHeaderName")&&i.xsrfHeaderName;l.set(P,x)}I()}}).catch(x=>{y&&(o(it.from(x,null,e,y)),b(),y=null)})}else I()})},ane=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let o=!1;const s=function(l){if(!o){o=!0,i();const u=l instanceof Error?l:this.reason;n.abort(u instanceof it?u:new ep(u instanceof Error?u.message:u))}};let r=t&&setTimeout(()=>{r=null,s(new it(`timeout of ${t}ms exceeded`,it.ETIMEDOUT))},t);const i=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach(l=>{const u=he.getSafeProp(l,"unsubscribe");he.isFunction(u)?u.call(l,s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>{if(!o){if(l.aborted){s.call(l);return}l.addEventListener("abort",s,{once:!0})}});const{signal:a}=n;return a.unsubscribe=()=>he.asap(i),a},lne=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0,s;for(;o<n;)s=o+t,yield e.slice(o,s),o=s},une=async function*(e,t){for await(const n of cne(e))yield*lne(n,t)},cne=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:o}=await t.read();if(n)break;yield o}}finally{await t.cancel()}},JM=(e,t,n,o)=>{const s=une(e,t);let r=0,i,a=l=>{i||(i=!0,o&&o(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await s.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let h=r+=d;n(h)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},ml=`\r
|
|
@@ -190,7 +190,7 @@ ${u}`:l)}else throw i},onCacheKey:i=>$ie(t,n,i)}}function Sle(e){if(Ct(e))return
|
|
|
190
190
|
* vue-i18n v9.14.5
|
|
191
191
|
* (c) 2025 kazuya kawaguchi
|
|
192
192
|
* Released under the MIT License.
|
|
193
|
-
*/const kle="9.14.5";function Fle(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Ra().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Ra().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Ra().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Ra().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Ra().__INTLIFY_PROD_DEVTOOLS__=!1)}const AV=ms.__EXTEND_POINT__,Da=Ry(AV),jn={FALLBACK_TO_ROOT:AV,NOT_SUPPORTED_PRESERVE:Da(),NOT_SUPPORTED_FORMATTER:Da(),NOT_SUPPORTED_PRESERVE_DIRECTIVE:Da(),NOT_SUPPORTED_GET_CHOICE_INDEX:Da(),COMPONENT_NAME_LEGACY_COMPATIBLE:Da(),NOT_FOUND_PARENT_SCOPE:Da(),IGNORE_OBJ_FLATTEN:Da(),NOTICE_DROP_ALLOW_COMPOSITION:Da(),NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG:Da()},Ole={[jn.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[jn.NOT_SUPPORTED_PRESERVE]:"Not supported 'preserve'.",[jn.NOT_SUPPORTED_FORMATTER]:"Not supported 'formatter'.",[jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE]:"Not supported 'preserveDirectiveContent'.",[jn.NOT_SUPPORTED_GET_CHOICE_INDEX]:"Not supported 'getChoiceIndex'.",[jn.COMPONENT_NAME_LEGACY_COMPATIBLE]:"Component name legacy compatible: '{name}' -> 'i18n'",[jn.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[jn.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[jn.NOTICE_DROP_ALLOW_COMPOSITION]:"'allowComposition' option will be dropped in the next major version. For more information, please see 👉 https://tinyurl.com/2p97mcze",[jn.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG]:"'translateExistCompatible' option will be dropped in the next major version."};function Is(e,...t){return P0(Ole[e],...t)}const PV=Bo.__EXTEND_POINT__,xs=Ry(PV),fn={UNEXPECTED_RETURN_TYPE:PV,INVALID_ARGUMENT:xs(),MUST_BE_CALL_SETUP_TOP:xs(),NOT_INSTALLED:xs(),NOT_AVAILABLE_IN_LEGACY_MODE:xs(),REQUIRED_VALUE:xs(),INVALID_VALUE:xs(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:xs(),NOT_INSTALLED_WITH_PROVIDE:xs(),UNEXPECTED_ERROR:xs(),NOT_COMPATIBLE_LEGACY_VUE_I18N:xs(),BRIDGE_SUPPORT_VUE_2_ONLY:xs(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:xs(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:xs(),__EXTEND_POINT__:xs()};function ko(e,...t){return Pd(e,null,ee.env.NODE_ENV!=="production"?{messages:Mle,args:t}:void 0)}const Mle={[fn.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[fn.INVALID_ARGUMENT]:"Invalid argument",[fn.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[fn.NOT_INSTALLED]:"Need to install with `app.use` function",[fn.UNEXPECTED_ERROR]:"Unexpected error",[fn.NOT_AVAILABLE_IN_LEGACY_MODE]:"Not available in legacy mode",[fn.REQUIRED_VALUE]:"Required in value: {0}",[fn.INVALID_VALUE]:"Invalid value",[fn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[fn.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[fn.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[fn.BRIDGE_SUPPORT_VUE_2_ONLY]:"vue-i18n-bridge support Vue 2.x only",[fn.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]:"Must define ‘i18n’ option or custom block in Composition API with using local scope in Legacy API mode",[fn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},z0=Ii("__translateVNode"),j0=Ii("__datetimeParts"),K0=Ii("__numberParts"),Uu=Ii("__enableEmitter"),bp=Ii("__disableEmitter"),kV=Ii("__setPluralRules"),FV=Ii("__injectWithOption"),q0=Ii("__dispose");function Sp(e){if(!dn(e)||Tr(e))return e;for(const t in e)if(Zr(e,t))if(!t.includes("."))dn(e[t])&&Sp(e[t]);else{const n=t.split("."),o=n.length-1;let s=e,r=!1;for(let i=0;i<o;i++){if(n[i]==="__proto__")throw new Error(`unsafe key: ${n[i]}`);if(n[i]in s||(s[n[i]]=An()),!dn(s[n[i]])){ee.env.NODE_ENV!=="production"&&Co(Is(jn.IGNORE_OBJ_FLATTEN,{key:n[i]})),r=!0;break}s=s[n[i]]}if(r||(Tr(s)?KL.includes(n[o])||delete e[t]:(s[n[o]]=e[t],delete e[t])),!Tr(s)){const i=s[n[o]];dn(i)&&Sp(i)}}return e}function Oy(e,t){const{messages:n,__i18n:o,messageResolver:s,flatJson:r}=t,i=zt(n)?n:Mn(o)?An():{[e]:An()};if(Mn(o)&&o.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:l,resource:u}=a;l?(i[l]=i[l]||An(),Dy(u,i[l])):Dy(u,i)}else Ct(a)&&Dy(JSON.parse(a),i)}),s==null&&r)for(const a in i)Zr(i,a)&&Sp(i[a]);return i}function OV(e){return e.type}function MV(e,t,n){let o=dn(t.messages)?t.messages:An();"__i18nGlobal"in n&&(o=Oy(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const s=Object.keys(o);s.length&&s.forEach(r=>{e.mergeLocaleMessage(r,o[r])});{if(dn(t.datetimeFormats)){const r=Object.keys(t.datetimeFormats);r.length&&r.forEach(i=>{e.mergeDateTimeFormat(i,t.datetimeFormats[i])})}if(dn(t.numberFormats)){const r=Object.keys(t.numberFormats);r.length&&r.forEach(i=>{e.mergeNumberFormat(i,t.numberFormats[i])})}}}function NV(e){return ye(Ka,null,e,0)}const LV="__INTLIFY_META__",VV=()=>[],Nle=()=>!1;let BV=0;function $V(e){return(t,n,o,s)=>e(n,o,oo()||void 0,s)}const Lle=()=>{const e=oo();let t=null;return e&&(t=OV(e)[LV])?{[LV]:t}:null};function Y0(e={},t){const{__root:n,__injectWithOption:o}=e,s=n===void 0,r=e.flatJson,i=Xr?$:xh,a=!!e.translateExistCompatible;ee.env.NODE_ENV!=="production"&&a&&RL(Is(jn.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG));let l=on(e.inheritLocale)?e.inheritLocale:!0;const u=i(n&&l?n.locale.value:Ct(e.locale)?e.locale:Od),c=i(n&&l?n.fallbackLocale.value:Ct(e.fallbackLocale)||Mn(e.fallbackLocale)||zt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:u.value),d=i(Oy(u.value,e)),h=i(zt(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),f=i(zt(e.numberFormats)?e.numberFormats:{[u.value]:{}});let p=n?n.missingWarn:on(e.missingWarn)||El(e.missingWarn)?e.missingWarn:!0,g=n?n.fallbackWarn:on(e.fallbackWarn)||El(e.fallbackWarn)?e.fallbackWarn:!0,v=n?n.fallbackRoot:on(e.fallbackRoot)?e.fallbackRoot:!0,w=!!e.fallbackFormat,S=Pn(e.missing)?e.missing:null,b=Pn(e.missing)?$V(e.missing):null,y=Pn(e.postTranslation)?e.postTranslation:null,E=n?n.warnHtmlMessage:on(e.warnHtmlMessage)?e.warnHtmlMessage:!0,_=!!e.escapeParameter;const I=n?n.modifiers:zt(e.modifiers)?e.modifiers:{};let T=e.pluralRules||n&&n.pluralRules,F;F=(()=>{s&&lV(null);const ve={version:kle,locale:u.value,fallbackLocale:c.value,messages:d.value,modifiers:I,pluralRules:T,missing:b===null?void 0:b,missingWarn:p,fallbackWarn:g,fallbackFormat:w,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:E,escapeParameter:_,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};ve.datetimeFormats=h.value,ve.numberFormats=f.value,ve.__datetimeFormatters=zt(F)?F.__datetimeFormatters:void 0,ve.__numberFormatters=zt(F)?F.__numberFormatters:void 0,ee.env.NODE_ENV!=="production"&&(ve.__v_emitter=zt(F)?F.__v_emitter:void 0);const Be=fle(ve);return s&&lV(Be),Be})(),Cp(F,u.value,c.value);function x(){return[u.value,c.value,d.value,h.value,f.value]}const P=X({get:()=>u.value,set:ve=>{u.value=ve,F.locale=u.value}}),k=X({get:()=>c.value,set:ve=>{c.value=ve,F.fallbackLocale=c.value,Cp(F,u.value,ve)}}),M=X(()=>d.value),N=X(()=>h.value),B=X(()=>f.value);function z(){return Pn(y)?y:null}function oe(ve){y=ve,F.postTranslation=ve}function ie(){return S}function te(ve){ve!==null&&(b=$V(ve)),S=ve,F.missing=b}function se(ve,Be){return ve!=="translate"||!Be.resolvedMessage}const Z=(ve,Be,wt,Dt,tn,en)=>{x();let bn;try{ee.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,s||(F.fallbackContext=n?hle():void 0),bn=ve(F)}finally{ee.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,s||(F.fallbackContext=void 0)}if(wt!=="translate exists"&&ro(bn)&&bn===Py||wt==="translate exists"&&!bn){const[Le,Ge]=Be();if(ee.env.NODE_ENV!=="production"&&n&&Ct(Le)&&se(wt,Ge)&&(v&&(Fy(g,Le)||cV(p,Le))&&Co(Is(jn.FALLBACK_TO_ROOT,{key:Le,type:wt})),ee.env.NODE_ENV!=="production")){const{__v_emitter:Rt}=F;Rt&&v&&Rt.emit("fallback",{type:wt,key:Le,to:"global",groupId:`${wt}:${Le}`})}return n&&v?Dt(n):tn(Le)}else{if(en(bn))return bn;throw ko(fn.UNEXPECTED_RETURN_TYPE)}};function A(...ve){return Z(Be=>Reflect.apply(yV,null,[Be,...ve]),()=>H0(...ve),"translate",Be=>Reflect.apply(Be.t,Be,[...ve]),Be=>Be,Be=>Ct(Be))}function j(...ve){const[Be,wt,Dt]=ve;if(Dt&&!dn(Dt))throw ko(fn.INVALID_ARGUMENT);return A(Be,wt,Ko({resolvedMessage:!0},Dt||{}))}function ne(...ve){return Z(Be=>Reflect.apply(EV,null,[Be,...ve]),()=>G0(...ve),"datetime format",Be=>Reflect.apply(Be.d,Be,[...ve]),()=>ky,Be=>Ct(Be))}function ge(...ve){return Z(Be=>Reflect.apply(TV,null,[Be,...ve]),()=>U0(...ve),"number format",Be=>Reflect.apply(Be.n,Be,[...ve]),()=>ky,Be=>Ct(Be))}function xe(ve){return ve.map(Be=>Ct(Be)||ro(Be)||on(Be)?NV(String(Be)):Be)}const K={normalize:xe,interpolate:ve=>ve,type:"vnode"};function Y(...ve){return Z(Be=>{let wt;const Dt=Be;try{Dt.processor=K,wt=Reflect.apply(yV,null,[Dt,...ve])}finally{Dt.processor=null}return wt},()=>H0(...ve),"translate",Be=>Be[z0](...ve),Be=>[NV(Be)],Be=>Mn(Be))}function re(...ve){return Z(Be=>Reflect.apply(TV,null,[Be,...ve]),()=>U0(...ve),"number format",Be=>Be[K0](...ve),VV,Be=>Ct(Be)||Mn(Be))}function R(...ve){return Z(Be=>Reflect.apply(EV,null,[Be,...ve]),()=>G0(...ve),"datetime format",Be=>Be[j0](...ve),VV,Be=>Ct(Be)||Mn(Be))}function G(ve){T=ve,F.pluralRules=T}function J(ve,Be){return Z(()=>{if(!ve)return!1;const wt=Ct(Be)?Be:u.value,Dt=Ce(wt),tn=F.messageResolver(Dt,ve);return a?tn!=null:Tr(tn)||Dr(tn)||Ct(tn)},()=>[ve],"translate exists",wt=>Reflect.apply(wt.te,wt,[ve,Be]),Nle,wt=>on(wt))}function ce(ve){let Be=null;const wt=QL(F,c.value,u.value);for(let Dt=0;Dt<wt.length;Dt++){const tn=d.value[wt[Dt]]||{},en=F.messageResolver(tn,ve);if(en!=null){Be=en;break}}return Be}function Ee(ve){const Be=ce(ve);return Be??(n?n.tm(ve)||{}:{})}function Ce(ve){return d.value[ve]||{}}function Ne(ve,Be){if(r){const wt={[ve]:Be};for(const Dt in wt)Zr(wt,Dt)&&Sp(wt[Dt]);Be=wt[ve]}d.value[ve]=Be,F.messages=d.value}function pe(ve,Be){d.value[ve]=d.value[ve]||{};const wt={[ve]:Be};if(r)for(const Dt in wt)Zr(wt,Dt)&&Sp(wt[Dt]);Be=wt[ve],Dy(Be,d.value[ve]),F.messages=d.value}function H(ve){return h.value[ve]||{}}function W(ve,Be){h.value[ve]=Be,F.datetimeFormats=h.value,RV(F,ve,Be)}function be(ve,Be){h.value[ve]=Ko(h.value[ve]||{},Be),F.datetimeFormats=h.value,RV(F,ve,Be)}function Ae(ve){return f.value[ve]||{}}function He(ve,Be){f.value[ve]=Be,F.numberFormats=f.value,IV(F,ve,Be)}function Te(ve,Be){f.value[ve]=Ko(f.value[ve]||{},Be),F.numberFormats=f.value,IV(F,ve,Be)}BV++,n&&Xr&&(Qe(n.locale,ve=>{l&&(u.value=ve,F.locale=ve,Cp(F,u.value,c.value))}),Qe(n.fallbackLocale,ve=>{l&&(c.value=ve,F.fallbackLocale=ve,Cp(F,u.value,c.value))}));const Xe={id:BV,locale:P,fallbackLocale:k,get inheritLocale(){return l},set inheritLocale(ve){l=ve,ve&&n&&(u.value=n.locale.value,c.value=n.fallbackLocale.value,Cp(F,u.value,c.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:M,get modifiers(){return I},get pluralRules(){return T||{}},get isGlobal(){return s},get missingWarn(){return p},set missingWarn(ve){p=ve,F.missingWarn=p},get fallbackWarn(){return g},set fallbackWarn(ve){g=ve,F.fallbackWarn=g},get fallbackRoot(){return v},set fallbackRoot(ve){v=ve},get fallbackFormat(){return w},set fallbackFormat(ve){w=ve,F.fallbackFormat=w},get warnHtmlMessage(){return E},set warnHtmlMessage(ve){E=ve,F.warnHtmlMessage=ve},get escapeParameter(){return _},set escapeParameter(ve){_=ve,F.escapeParameter=ve},t:A,getLocaleMessage:Ce,setLocaleMessage:Ne,mergeLocaleMessage:pe,getPostTranslationHandler:z,setPostTranslationHandler:oe,getMissingHandler:ie,setMissingHandler:te,[kV]:G};return Xe.datetimeFormats=N,Xe.numberFormats=B,Xe.rt=j,Xe.te=J,Xe.tm=Ee,Xe.d=ne,Xe.n=ge,Xe.getDateTimeFormat=H,Xe.setDateTimeFormat=W,Xe.mergeDateTimeFormat=be,Xe.getNumberFormat=Ae,Xe.setNumberFormat=He,Xe.mergeNumberFormat=Te,Xe[FV]=o,Xe[z0]=Y,Xe[j0]=R,Xe[K0]=re,ee.env.NODE_ENV!=="production"&&(Xe[Uu]=ve=>{F.__v_emitter=ve},Xe[bp]=()=>{F.__v_emitter=void 0}),Xe}function Vle(e){const t=Ct(e.locale)?e.locale:Od,n=Ct(e.fallbackLocale)||Mn(e.fallbackLocale)||zt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=Pn(e.missing)?e.missing:void 0,s=on(e.silentTranslationWarn)||El(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,r=on(e.silentFallbackWarn)||El(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,i=on(e.fallbackRoot)?e.fallbackRoot:!0,a=!!e.formatFallbackMessages,l=zt(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=Pn(e.postTranslation)?e.postTranslation:void 0,d=Ct(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,h=!!e.escapeParameterHtml,f=on(e.sync)?e.sync:!0;ee.env.NODE_ENV!=="production"&&e.formatter&&Co(Is(jn.NOT_SUPPORTED_FORMATTER)),ee.env.NODE_ENV!=="production"&&e.preserveDirectiveContent&&Co(Is(jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE));let p=e.messages;if(zt(e.sharedMessages)){const _=e.sharedMessages;p=Object.keys(_).reduce((T,F)=>{const L=T[F]||(T[F]={});return Ko(L,_[F]),T},p||{})}const{__i18n:g,__root:v,__injectWithOption:w}=e,S=e.datetimeFormats,b=e.numberFormats,y=e.flatJson,E=e.translateExistCompatible;return{locale:t,fallbackLocale:n,messages:p,flatJson:y,datetimeFormats:S,numberFormats:b,missing:o,missingWarn:s,fallbackWarn:r,fallbackRoot:i,fallbackFormat:a,modifiers:l,pluralRules:u,postTranslation:c,warnHtmlMessage:d,escapeParameter:h,messageResolver:e.messageResolver,inheritLocale:f,translateExistCompatible:E,__i18n:g,__root:v,__injectWithOption:w}}function X0(e={},t){{const n=Y0(Vle(e)),{__extender:o}=e,s={id:n.id,get locale(){return n.locale.value},set locale(r){n.locale.value=r},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(r){n.fallbackLocale.value=r},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_FORMATTER)),{interpolate(){return[]}}},set formatter(r){ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_FORMATTER))},get missing(){return n.getMissingHandler()},set missing(r){n.setMissingHandler(r)},get silentTranslationWarn(){return on(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(r){n.missingWarn=on(r)?!r:r},get silentFallbackWarn(){return on(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(r){n.fallbackWarn=on(r)?!r:r},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(r){n.fallbackFormat=r},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(r){n.setPostTranslationHandler(r)},get sync(){return n.inheritLocale},set sync(r){n.inheritLocale=r},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(r){n.warnHtmlMessage=r!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(r){n.escapeParameter=r},get preserveDirectiveContent(){return ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE)),!0},set preserveDirectiveContent(r){ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE))},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...r){const[i,a,l]=r,u={};let c=null,d=null;if(!Ct(i))throw ko(fn.INVALID_ARGUMENT);const h=i;return Ct(a)?u.locale=a:Mn(a)?c=a:zt(a)&&(d=a),Mn(l)?c=l:zt(l)&&(d=l),Reflect.apply(n.t,n,[h,c||d||{},u])},rt(...r){return Reflect.apply(n.rt,n,[...r])},tc(...r){const[i,a,l]=r,u={plural:1};let c=null,d=null;if(!Ct(i))throw ko(fn.INVALID_ARGUMENT);const h=i;return Ct(a)?u.locale=a:ro(a)?u.plural=a:Mn(a)?c=a:zt(a)&&(d=a),Ct(l)?u.locale=l:Mn(l)?c=l:zt(l)&&(d=l),Reflect.apply(n.t,n,[h,c||d||{},u])},te(r,i){return n.te(r,i)},tm(r){return n.tm(r)},getLocaleMessage(r){return n.getLocaleMessage(r)},setLocaleMessage(r,i){n.setLocaleMessage(r,i)},mergeLocaleMessage(r,i){n.mergeLocaleMessage(r,i)},d(...r){return Reflect.apply(n.d,n,[...r])},getDateTimeFormat(r){return n.getDateTimeFormat(r)},setDateTimeFormat(r,i){n.setDateTimeFormat(r,i)},mergeDateTimeFormat(r,i){n.mergeDateTimeFormat(r,i)},n(...r){return Reflect.apply(n.n,n,[...r])},getNumberFormat(r){return n.getNumberFormat(r)},setNumberFormat(r,i){n.setNumberFormat(r,i)},mergeNumberFormat(r,i){n.mergeNumberFormat(r,i)},getChoiceIndex(r,i){return ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_GET_CHOICE_INDEX)),-1}};return s.__extender=o,ee.env.NODE_ENV!=="production"&&(s.__enableEmitter=r=>{const i=n;i[Uu]&&i[Uu](r)},s.__disableEmitter=()=>{const r=n;r[bp]&&r[bp]()}),s}}const Z0={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function Ble({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,s)=>[...o,...s.type===Pt?s.children:[s]],[]):t.reduce((n,o)=>{const s=e[o];return s&&(n[o]=s()),n},An())}function HV(e){return Pt}const J0=ot({name:"i18n-t",props:Ko({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>ro(e)||!isNaN(e)}},Z0),setup(e,t){const{slots:n,attrs:o}=t,s=e.i18n||n_({useScope:e.scope,__useComponent:!0});return()=>{const r=Object.keys(n).filter(d=>d!=="_"),i=An();e.locale&&(i.locale=e.locale),e.plural!==void 0&&(i.plural=Ct(e.plural)?+e.plural:e.plural);const a=Ble(t,r),l=s[z0](e.keypath,a,i),u=Ko(An(),o),c=Ct(e.tag)||dn(e.tag)?e.tag:HV();return Tc(c,u,l)}}});function $le(e){return Mn(e)&&!Ct(e[0])}function GV(e,t,n,o){const{slots:s,attrs:r}=t;return()=>{const i={part:!0};let a=An();e.locale&&(i.locale=e.locale),Ct(e.format)?i.key=e.format:dn(e.format)&&(Ct(e.format.key)&&(i.key=e.format.key),a=Object.keys(e.format).reduce((h,f)=>n.includes(f)?Ko(An(),h,{[f]:e.format[f]}):h,An()));const l=o(e.value,i,a);let u=[i.key];Mn(l)?u=l.map((h,f)=>{const p=s[h.type],g=p?p({[h.type]:h.value,index:f,parts:l}):[h.value];return $le(g)&&(g[0].key=`${h.type}-${f}`),g}):Ct(l)&&(u=[l]);const c=Ko(An(),r),d=Ct(e.tag)||dn(e.tag)?e.tag:HV();return Tc(d,c,u)}}const UV=ot({name:"i18n-n",props:Ko({value:{type:Number,required:!0},format:{type:[String,Object]}},Z0),setup(e,t){const n=e.i18n||n_({useScope:e.scope,__useComponent:!0});return GV(e,t,DV,(...o)=>n[K0](...o))}}),WV=ot({name:"i18n-d",props:Ko({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Z0),setup(e,t){const n=e.i18n||n_({useScope:e.scope,__useComponent:!0});return GV(e,t,_V,(...o)=>n[j0](...o))}});function Hle(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function Gle(e){const t=i=>{const{instance:a,modifiers:l,value:u}=i;if(!a||!a.$)throw ko(fn.UNEXPECTED_ERROR);const c=Hle(e,a.$);ee.env.NODE_ENV!=="production"&&l.preserve&&Co(Is(jn.NOT_SUPPORTED_PRESERVE));const d=zV(u);return[Reflect.apply(c.t,c,[...jV(d)]),c]};return{created:(i,a)=>{const[l,u]=t(a);Xr&&e.global===u&&(i.__i18nWatcher=Qe(u.locale,()=>{a.instance&&a.instance.$forceUpdate()})),i.__composer=u,i.textContent=l},unmounted:i=>{Xr&&i.__i18nWatcher&&(i.__i18nWatcher(),i.__i18nWatcher=void 0,delete i.__i18nWatcher),i.__composer&&(i.__composer=void 0,delete i.__composer)},beforeUpdate:(i,{value:a})=>{if(i.__composer){const l=i.__composer,u=zV(a);i.textContent=Reflect.apply(l.t,l,[...jV(u)])}},getSSRProps:i=>{const[a]=t(i);return{textContent:a}}}}function zV(e){if(Ct(e))return{path:e};if(zt(e)){if(!("path"in e))throw ko(fn.REQUIRED_VALUE,"path");return e}else throw ko(fn.INVALID_VALUE)}function jV(e){const{path:t,locale:n,args:o,choice:s,plural:r}=e,i={},a=o||{};return Ct(n)&&(i.locale=n),ro(s)&&(i.plural=s),ro(r)&&(i.plural=r),[t,a,i]}function Ule(e,t,...n){const o=zt(n[0])?n[0]:{},s=!!o.useI18nComponentName,r=on(o.globalInstall)?o.globalInstall:!0;ee.env.NODE_ENV!=="production"&&r&&s&&Co(Is(jn.COMPONENT_NAME_LEGACY_COMPATIBLE,{name:J0.name})),r&&([s?"i18n":J0.name,"I18nT"].forEach(i=>e.component(i,J0)),[UV.name,"I18nN"].forEach(i=>e.component(i,UV)),[WV.name,"I18nD"].forEach(i=>e.component(i,WV))),e.directive("t",Gle(t))}const Q0={"vue-devtools-plugin-vue-i18n":"Vue I18n devtools","vue-i18n-resource-inspector":"I18n Resources","vue-i18n-timeline":"Vue I18n"},Wle={"vue-i18n-resource-inspector":"Search for scopes ..."},zle={"vue-i18n-timeline":16764185},KV="vue-i18n: composer properties";let e_;async function jle(e,t){return new Promise((n,o)=>{try{Ple({id:"vue-devtools-plugin-vue-i18n",label:Q0["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[KV],app:e},s=>{e_=s,s.on.visitComponentTree(({componentInstance:i,treeNode:a})=>{Kle(i,a,t)}),s.on.inspectComponent(({componentInstance:i,instanceData:a})=>{i.vnode.el&&i.vnode.el.__VUE_I18N__&&a&&(t.mode==="legacy"?i.vnode.el.__VUE_I18N__!==t.global.__composer&&YV(a,i.vnode.el.__VUE_I18N__):YV(a,i.vnode.el.__VUE_I18N__))}),s.addInspector({id:"vue-i18n-resource-inspector",label:Q0["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:Wle["vue-i18n-resource-inspector"]}),s.on.getInspectorTree(i=>{i.app===e&&i.inspectorId==="vue-i18n-resource-inspector"&&Jle(i,t)});const r=new Map;s.on.getInspectorState(async i=>{if(i.app===e&&i.inspectorId==="vue-i18n-resource-inspector")if(s.unhighlightElement(),eue(i,t),i.nodeId==="global"){if(!r.has(i.app)){const[a]=await s.getComponentInstances(i.app);r.set(i.app,a)}s.highlightElement(r.get(i.app))}else{const a=Qle(i.nodeId,t);a&&s.highlightElement(a)}}),s.on.editInspectorState(i=>{i.app===e&&i.inspectorId==="vue-i18n-resource-inspector"&&nue(i,t)}),s.addTimelineLayer({id:"vue-i18n-timeline",label:Q0["vue-i18n-timeline"],color:zle["vue-i18n-timeline"]}),n(!0)})}catch(s){console.error(s),o(!1)}})}function qV(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function Kle(e,t,n){const o=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&e.vnode.el.__VUE_I18N__!==o){const s={label:`i18n (${qV(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(s)}}function YV(e,t){const n=KV;e.state.push({type:n,key:"locale",editable:!0,value:t.locale.value}),e.state.push({type:n,key:"availableLocales",editable:!1,value:t.availableLocales}),e.state.push({type:n,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value}),e.state.push({type:n,key:"inheritLocale",editable:!0,value:t.inheritLocale}),e.state.push({type:n,key:"messages",editable:!1,value:t_(t.messages.value)}),e.state.push({type:n,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}),e.state.push({type:n,key:"numberFormats",editable:!1,value:t.numberFormats.value})}function t_(e){const t={};return Object.keys(e).forEach(n=>{const o=e[n];Pn(o)&&"source"in o?t[n]=Zle(o):Tr(o)&&o.loc&&o.loc.source?t[n]=o.loc.source:dn(o)?t[n]=t_(o):t[n]=o}),t}const qle={"<":"<",">":">",'"':""","&":"&"};function Yle(e){return e.replace(/[<>"&]/g,Xle)}function Xle(e){return qle[e]||e}function Zle(e){return{_custom:{type:"function",display:`<span>ƒ</span> ${e.source?`("${Yle(e.source)}")`:"(?)"}`}}}function Jle(e,t){e.rootNodes.push({id:"global",label:"Global Scope"});const n=t.mode==="composition"?t.global:t.global.__composer;for(const[o,s]of t.__instances){const r=t.mode==="composition"?s:s.__composer;n!==r&&e.rootNodes.push({id:r.id.toString(),label:`${qV(o)} Scope`})}}function Qle(e,t){let n=null;if(e!=="global"){for(const[o,s]of t.__instances.entries())if(s.id.toString()===e){n=o;break}}return n}function XV(e,t){if(e==="global")return t.mode==="composition"?t.global:t.global.__composer;{const n=Array.from(t.__instances.values()).find(o=>o.id.toString()===e);return n?t.mode==="composition"?n:n.__composer:null}}function eue(e,t){const n=XV(e.nodeId,t);return n&&(e.state=tue(n)),null}function tue(e){const t={},n="Locale related info",o=[{type:n,key:"locale",editable:!0,value:e.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:e.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}];t[n]=o;const s="Locale messages info",r=[{type:s,key:"messages",editable:!1,value:t_(e.messages.value)}];t[s]=r;{const i="Datetime formats info",a=[{type:i,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];t[i]=a;const l="Datetime formats info",u=[{type:l,key:"numberFormats",editable:!1,value:e.numberFormats.value}];t[l]=u}return t}function Ep(e,t){if(e_){let n;t&&"groupId"in t&&(n=t.groupId,delete t.groupId),e_.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:e,groupId:n,time:Date.now(),meta:{},data:t||{},logType:e==="compile-error"?"error":e==="fallback"||e==="missing"?"warning":"default"}})}}function nue(e,t){const n=XV(e.nodeId,t);if(n){const[o]=e.path;o==="locale"&&Ct(e.state.value)?n.locale.value=e.state.value:o==="fallbackLocale"&&(Ct(e.state.value)||Mn(e.state.value)||dn(e.state.value))?n.fallbackLocale.value=e.state.value:o==="inheritLocale"&&on(e.state.value)&&(n.inheritLocale=e.state.value)}}function oue(e,t,n){return{beforeCreate(){const o=oo();if(!o)throw ko(fn.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const r=s.i18n;if(s.__i18n&&(r.__i18n=s.__i18n),r.__root=t,this===this.$root)this.$i18n=ZV(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=X0(r);const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=ZV(e,s);else{this.$i18n=X0({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}else this.$i18n=e;s.__i18nGlobal&&MV(t,s,s),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...r),this.$tc=(...r)=>this.$i18n.tc(...r),this.$te=(r,i)=>this.$i18n.te(r,i),this.$d=(...r)=>this.$i18n.d(...r),this.$n=(...r)=>this.$i18n.n(...r),this.$tm=r=>this.$i18n.tm(r),n.__setInstance(o,this.$i18n)},mounted(){if(ee.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const o=this.$i18n;this.$el.__VUE_I18N__=o.__composer;const s=this.__v_emitter=k0();o.__enableEmitter&&o.__enableEmitter(s),s.on("*",Ep)}},unmounted(){const o=oo();if(!o)throw ko(fn.UNEXPECTED_ERROR);const s=this.$i18n;ee.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Ep),delete this.__v_emitter),this.$i18n&&(s.__disableEmitter&&s.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(o),delete this.$i18n}}}function ZV(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[kV](t.pluralizationRules||e.pluralizationRules);const n=Oy(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o])),t.numberFormats&&Object.keys(t.numberFormats).forEach(o=>e.mergeNumberFormat(o,t.numberFormats[o])),e}const sue=Ii("global-vue-i18n");function rue(e={},t){const n=__VUE_I18N_LEGACY_API__&&on(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,o=on(e.globalInjection)?e.globalInjection:!0,s=__VUE_I18N_LEGACY_API__&&n?!!e.allowComposition:!0,r=new Map,[i,a]=iue(e,n),l=Ii(ee.env.NODE_ENV!=="production"?"vue-i18n":"");ee.env.NODE_ENV!=="production"&&n&&s&&Co(Is(jn.NOTICE_DROP_ALLOW_COMPOSITION));function u(h){return r.get(h)||null}function c(h,f){r.set(h,f)}function d(h){r.delete(h)}{const h={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},get allowComposition(){return s},async install(f,...p){if(ee.env.NODE_ENV!=="production"&&(f.__VUE_I18N__=h),f.__VUE_I18N_SYMBOL__=l,f.provide(f.__VUE_I18N_SYMBOL__,h),zt(p[0])){const w=p[0];h.__composerExtend=w.__composerExtend,h.__vueI18nExtend=w.__vueI18nExtend}let g=null;!n&&o&&(g=gue(f,h.global)),__VUE_I18N_FULL_INSTALL__&&Ule(f,h,...p),__VUE_I18N_LEGACY_API__&&n&&f.mixin(oue(a,a.__composer,h));const v=f.unmount;if(f.unmount=()=>{g&&g(),h.dispose(),v()},ee.env.NODE_ENV!=="production"){if(!await jle(f,h))throw ko(fn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const S=k0();if(n){const b=a;b.__enableEmitter&&b.__enableEmitter(S)}else{const b=a;b[Uu]&&b[Uu](S)}S.on("*",Ep)}},get global(){return a},dispose(){i.stop()},__instances:r,__getInstance:u,__setInstance:c,__deleteInstance:d};return h}}function n_(e={}){const t=oo();if(t==null)throw ko(fn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw ko(fn.NOT_INSTALLED);const n=aue(t),o=uue(n),s=OV(t),r=lue(e,s);if(__VUE_I18N_LEGACY_API__&&n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw ko(fn.NOT_AVAILABLE_IN_LEGACY_MODE);return fue(t,r,o,e)}if(r==="global")return MV(o,e,s),o;if(r==="parent"){let l=cue(n,t,e.__useComponent);return l==null&&(ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_FOUND_PARENT_SCOPE)),l=o),l}const i=n;let a=i.__getInstance(t);if(a==null){const l=Ko({},e);"__i18n"in s&&(l.__i18n=s.__i18n),o&&(l.__root=o),a=Y0(l),i.__composerExtend&&(a[q0]=i.__composerExtend(a)),hue(i,t,a),i.__setInstance(t,a)}return a}function iue(e,t,n){const o=cC();{const s=__VUE_I18N_LEGACY_API__&&t?o.run(()=>X0(e)):o.run(()=>Y0(e));if(s==null)throw ko(fn.UNEXPECTED_ERROR);return[o,s]}}function aue(e){{const t=Dn(e.isCE?sue:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw ko(e.isCE?fn.NOT_INSTALLED_WITH_PROVIDE:fn.UNEXPECTED_ERROR);return t}}function lue(e,t){return _y(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function uue(e){return e.mode==="composition"?e.global:e.global.__composer}function cue(e,t,n=!1){let o=null;const s=t.root;let r=due(t,n);for(;r!=null;){const i=e;if(e.mode==="composition")o=i.__getInstance(r);else if(__VUE_I18N_LEGACY_API__){const a=i.__getInstance(r);a!=null&&(o=a.__composer,n&&o&&!o[FV]&&(o=null))}if(o!=null||s===r)break;r=r.parent}return o}function due(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function hue(e,t,n){let o=null;Xt(()=>{if(ee.env.NODE_ENV!=="production"&&t.vnode.el){t.vnode.el.__VUE_I18N__=n,o=k0();const s=n;s[Uu]&&s[Uu](o),o.on("*",Ep)}},t),nu(()=>{const s=n;ee.env.NODE_ENV!=="production"&&t.vnode.el&&t.vnode.el.__VUE_I18N__&&(o&&o.off("*",Ep),s[bp]&&s[bp](),delete t.vnode.el.__VUE_I18N__),e.__deleteInstance(t);const r=s[q0];r&&(r(),delete s[q0])},t)}function fue(e,t,n,o={}){const s=t==="local",r=xh(null);if(s&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw ko(fn.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const i=on(o.inheritLocale)?o.inheritLocale:!Ct(o.locale),a=$(!s||i?n.locale.value:Ct(o.locale)?o.locale:Od),l=$(!s||i?n.fallbackLocale.value:Ct(o.fallbackLocale)||Mn(o.fallbackLocale)||zt(o.fallbackLocale)||o.fallbackLocale===!1?o.fallbackLocale:a.value),u=$(Oy(a.value,o)),c=$(zt(o.datetimeFormats)?o.datetimeFormats:{[a.value]:{}}),d=$(zt(o.numberFormats)?o.numberFormats:{[a.value]:{}}),h=s?n.missingWarn:on(o.missingWarn)||El(o.missingWarn)?o.missingWarn:!0,f=s?n.fallbackWarn:on(o.fallbackWarn)||El(o.fallbackWarn)?o.fallbackWarn:!0,p=s?n.fallbackRoot:on(o.fallbackRoot)?o.fallbackRoot:!0,g=!!o.fallbackFormat,v=Pn(o.missing)?o.missing:null,w=Pn(o.postTranslation)?o.postTranslation:null,S=s?n.warnHtmlMessage:on(o.warnHtmlMessage)?o.warnHtmlMessage:!0,b=!!o.escapeParameter,y=s?n.modifiers:zt(o.modifiers)?o.modifiers:{},E=o.pluralRules||s&&n.pluralRules;function _(){return[a.value,l.value,u.value,c.value,d.value]}const I=X({get:()=>r.value?r.value.locale.value:a.value,set:J=>{r.value&&(r.value.locale.value=J),a.value=J}}),T=X({get:()=>r.value?r.value.fallbackLocale.value:l.value,set:J=>{r.value&&(r.value.fallbackLocale.value=J),l.value=J}}),F=X(()=>r.value?r.value.messages.value:u.value),L=X(()=>c.value),x=X(()=>d.value);function P(){return r.value?r.value.getPostTranslationHandler():w}function k(J){r.value&&r.value.setPostTranslationHandler(J)}function M(){return r.value?r.value.getMissingHandler():v}function N(J){r.value&&r.value.setMissingHandler(J)}function B(J){return _(),J()}function z(...J){return r.value?B(()=>Reflect.apply(r.value.t,null,[...J])):B(()=>"")}function oe(...J){return r.value?Reflect.apply(r.value.rt,null,[...J]):""}function ie(...J){return r.value?B(()=>Reflect.apply(r.value.d,null,[...J])):B(()=>"")}function te(...J){return r.value?B(()=>Reflect.apply(r.value.n,null,[...J])):B(()=>"")}function se(J){return r.value?r.value.tm(J):{}}function Z(J,ce){return r.value?r.value.te(J,ce):!1}function A(J){return r.value?r.value.getLocaleMessage(J):{}}function j(J,ce){r.value&&(r.value.setLocaleMessage(J,ce),u.value[J]=ce)}function ne(J,ce){r.value&&r.value.mergeLocaleMessage(J,ce)}function ge(J){return r.value?r.value.getDateTimeFormat(J):{}}function xe(J,ce){r.value&&(r.value.setDateTimeFormat(J,ce),c.value[J]=ce)}function ue(J,ce){r.value&&r.value.mergeDateTimeFormat(J,ce)}function K(J){return r.value?r.value.getNumberFormat(J):{}}function Y(J,ce){r.value&&(r.value.setNumberFormat(J,ce),d.value[J]=ce)}function re(J,ce){r.value&&r.value.mergeNumberFormat(J,ce)}const R={get id(){return r.value?r.value.id:-1},locale:I,fallbackLocale:T,messages:F,datetimeFormats:L,numberFormats:x,get inheritLocale(){return r.value?r.value.inheritLocale:i},set inheritLocale(J){r.value&&(r.value.inheritLocale=J)},get availableLocales(){return r.value?r.value.availableLocales:Object.keys(u.value)},get modifiers(){return r.value?r.value.modifiers:y},get pluralRules(){return r.value?r.value.pluralRules:E},get isGlobal(){return r.value?r.value.isGlobal:!1},get missingWarn(){return r.value?r.value.missingWarn:h},set missingWarn(J){r.value&&(r.value.missingWarn=J)},get fallbackWarn(){return r.value?r.value.fallbackWarn:f},set fallbackWarn(J){r.value&&(r.value.missingWarn=J)},get fallbackRoot(){return r.value?r.value.fallbackRoot:p},set fallbackRoot(J){r.value&&(r.value.fallbackRoot=J)},get fallbackFormat(){return r.value?r.value.fallbackFormat:g},set fallbackFormat(J){r.value&&(r.value.fallbackFormat=J)},get warnHtmlMessage(){return r.value?r.value.warnHtmlMessage:S},set warnHtmlMessage(J){r.value&&(r.value.warnHtmlMessage=J)},get escapeParameter(){return r.value?r.value.escapeParameter:b},set escapeParameter(J){r.value&&(r.value.escapeParameter=J)},t:z,getPostTranslationHandler:P,setPostTranslationHandler:k,getMissingHandler:M,setMissingHandler:N,rt:oe,d:ie,n:te,tm:se,te:Z,getLocaleMessage:A,setLocaleMessage:j,mergeLocaleMessage:ne,getDateTimeFormat:ge,setDateTimeFormat:xe,mergeDateTimeFormat:ue,getNumberFormat:K,setNumberFormat:Y,mergeNumberFormat:re};function G(J){J.locale.value=a.value,J.fallbackLocale.value=l.value,Object.keys(u.value).forEach(ce=>{J.mergeLocaleMessage(ce,u.value[ce])}),Object.keys(c.value).forEach(ce=>{J.mergeDateTimeFormat(ce,c.value[ce])}),Object.keys(d.value).forEach(ce=>{J.mergeNumberFormat(ce,d.value[ce])}),J.escapeParameter=b,J.fallbackFormat=g,J.fallbackRoot=p,J.fallbackWarn=f,J.missingWarn=h,J.warnHtmlMessage=S}return Bh(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw ko(fn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const J=r.value=e.proxy.$i18n.__composer;t==="global"?(a.value=J.locale.value,l.value=J.fallbackLocale.value,u.value=J.messages.value,c.value=J.datetimeFormats.value,d.value=J.numberFormats.value):s&&G(J)}),R}const pue=["locale","fallbackLocale","availableLocales"],JV=["t","rt","d","n","tm","te"];function gue(e,t){const n=Object.create(null);return pue.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r)throw ko(fn.UNEXPECTED_ERROR);const i=mn(r.value)?{get(){return r.value.value},set(a){r.value.value=a}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,s,i)}),e.config.globalProperties.$i18n=n,JV.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r||!r.value)throw ko(fn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,r)}),()=>{delete e.config.globalProperties.$i18n,JV.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}if(Fle(),__INTLIFY_JIT_COMPILATION__?oV(yle):oV(vle),lle(Gae),ule(QL),ee.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=Ra();e.__INTLIFY__=!0,Zae(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}ee.env.NODE_ENV;const QV={en:{}};function mue(e){const t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):null}async function vue(e,t=10,n=300){for(let o=0;o<t;o++){const s=mue(e);if(s)return s;await new Promise(r=>setTimeout(r,n))}return null}async function yue(){const e=await vue("account.tessr_i18n_file_version_url");if(!e)return{};const t=await fetch(e);if(!t.ok)throw new Error("Failed to load en-error.json");return await t.json()}async function wue(){const e=await yue();return{...QV,en:{...QV.en,errorMessages:e}}}async function Cue(){return rue({legacy:!1,locale:"en",fallbackLocale:"en",messages:await wue(),formatFallbackMessages:!0})}const bue=async()=>{const e=await Cue();return oQ(e.global),e},eB=32,Sue=Math.round(eB*16/9),Eue="arbo-thumbnails",_p="thumbnails";let Rp=null;const o_=new Map,s_=new Map;function tB(){return Rp||(Rp=new Promise((e,t)=>{const n=indexedDB.open(Eue,1);n.onupgradeneeded=()=>n.result.createObjectStore(_p),n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)}),Rp.catch(()=>Rp=null)),Rp}async function _ue(e,t){try{const n=await tB();return await new Promise((o,s)=>{const r=n.transaction(_p,"readonly").objectStore(_p).get(e);r.onsuccess=()=>{const i=r.result;o((i==null?void 0:i.url)===t&&i.blob instanceof Blob?i.blob:null)},r.onerror=()=>s(r.error)})}catch{return null}}async function Rue(e,t,n){try{const o=await tB();if(s_.get(e)!==t)return;await new Promise((s,r)=>{const i=o.transaction(_p,"readwrite");i.objectStore(_p).put({url:t,blob:n},e),i.oncomplete=()=>s(),i.onerror=()=>r(i.error)})}catch{}}function Tue(e){return new Promise(t=>{new xP(e,{width:Sue,height:eB,resize:"cover",quality:.8,success:t,error:()=>t(e)})})}function Due(e,t){s_.set(e,t);let n=o_.get(e);n||(n=new Map,o_.set(e,n));const o=n.get(t);if(o)return o;const s=(async()=>{const r=await _ue(e,t);if(r)return r;const i=await fetch(t);if(!i.ok)throw new Error(`Thumbnail request failed: ${i.status}`);const a=await Tue(await i.blob());return await Rue(e,t,a),a})().finally(()=>{n.delete(t),n.size===0&&(o_.delete(e),s_.delete(e))});return n.set(t,s),s}const Iue="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAPoAgMAAAAwzTx3AAAACVBMVEXz9fjX19fo6etc+oS8AAAINUlEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGD24EAAAAAAAMj/tRFUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVXYOWPjuGEgii45w4DKWQIDu4orAcEtB3Z0iWdUBpuAY4W2qnRACTgLiwVS/MUbJ7YV6AnEx1+Sp8FgMBgMBoPBYNDGy3sB+kD+3zfqnu9c4E4XM8v8oc554RKOLiYu0Pu6By7xoIuFCxzUNSsXOeliV344PRO4SP1L7tQxM9e9uMxJ/bJwEZ9STknCfglc5PGUBoBBN3OZW0w5yCt+bbDamBkw4/eGa5k1PPVKYG6osYibPWrpNRZxsyctvcaqYdgnK7fVWMCTfeeWGguZc1tzjYWr8aGpxiJG/MxNNVaHuqSxxiKebhOXeYoDxNNtba2xeC1eHdbTnkA82HdNKF0YiAf7Xt/BC6j6xhc/fv3++ufrsH5kXxO67jRbvZWEcpiFntVDPaOV0/tbz3UuVEvJpHS2uWf1ehVdtQ3ds3qofu+7FuOh4xJfP502rbds0OpqUd+R1ecY8ObUpzjMmFNf+OIOqu7qAe9A1X1DjbWnHlPOnHqqsaDqjkrMdlc9NRp76pvdmIvTC6i6oyIreKVpKLJsT53sji+pzmGqO2oo8ZjqnhpGN3vqcWC3p56qLKS6o8RfPk65ykKq+/8fqBzyLVlw9evyfhWrLLj65XJIVfaAVHdf/s4PqcpCqnttWEk5B62+8wdilYVWD3GFpSqLqO6yl6WcVGUR1X32stRdqrLI6jtHxCoLrL5x5BRy7gao7qJj5CZVWUB1H69sNec8rvrECS9VWRvqUsQzoLp7Wl21yuKp+/xF4EOssrDqOz8hjuz21GOVxVN3wodcTinn8NS9pC5WWVT1wE/cxJyzpx6rLJy6E9WlKgunLq+6VGXtqcecs6eeqiyaurjX5Rep0NSlVT9JrLKg6lu+6tmzCQvqp/wiFZq6q6pT/GcwdWVyy6osvvpR+swXpvqiqMeRHUxduTeXVVkwdeVmdD6yQ6pnjyDEKgupTpx4UCnnsNSVZ255lcVSVx4y5zmHqb5kZ5tQZTHVpyzgpYiHUo/RlVLO2qrTli1tPraCqi9pqxtLeJozv/wWFZa6E35PjbE297mjf1I54DHHl7jsb0Rka3L7XN1X5YNPHkzdUWJ+v9bc1l2ahJJy5tRn8DuyESXlQO/D/yPnjG0ch4EoahlQ4AJcgvpQCRNohLlMyfXBJpRfcslWuYGBAaRPcybl548WhpMHmp+PErmNzORvXxp5k79za+Qkf9N6zVDv179nYj9Vcc1QZ2m+Z2E/QXXNUOfmEi1Hh14d9aHOyMYtR3sy+pKxzsPHLceHbpHGDov+VPq7L981lrfmJGq5YRe3RYdVmrcqrcha+CXa7YuEBT/opvWlqoM+qphVlfYBlcUtx/pYUmKNHfJh9KflhnwF8dFY1gsgFrcc6+tGSWgs9wWQZsuRnqqwhMaSXgC5ov/8q7Uc6QkqueGUisZyXwDxj6zWcpynJe02yntNYzkvgMAol0rLcZ6MlvsoHxWN5b4A4p9YpeA5b0HYfbOyocZ6Vlb01+1XvQC6UKELbFYKaKxno0I3WMtW/wJkZ0U/r7+DSTGFFF1j9JUJXWAt27zwMcKEbt+PjpwKMU705T6h3wrZOdGddEWl8TChC25WxGcAZiVCN9ysWKPnDkb0CSe0YowRfVbPo9FzROjiKDihF8UQoVtlFT9aPUeIrp6myh586NV/EK8Y40GHRTxQ2Y0H3WrqVho9x4fuC1mksoUO/dRsz9GgC0hrtGWnQTcY30BlNzb0WT3Bll3Z0D8gKZUtLOgCwxtt2Q8WdKtOamtUvHChP1XzPceFDj/shsruLOgCBR+qbCFBt/oidjRUdqVCP9UTq6xQoasnobJGgi4wtuGWfSdBNyj4WGULEfqikLXVc0ToPrQ5lRUOdPE/8yprHOgGNR6r7M6DDiMbvH1SHnSosmjLvlKgC9LFKntQoBtoS6bnaNAVEqjsxoIO4xpu2ZUCXcBaMiq7MqAbFFmq50jQYVhjlTUS9FOrsVbPMaALoqHKYhjQDQo+pbKFAh1qLKOyBwU6kGUOUgkButQLPlLZjQDdoMVSB6l2BnQo+JzKFgJ0mMk5lT36Rxco+JzKSv/oBkOaU9mNAP1USEZldwJ0haRWN/3fPfofhaScRv92j+4JTBZDje77l+HQd//mcOhe8OOh47KO2R895sy23Ew36o4eKvxwo+5UJx06DGbmzRN+qce8ky038aGDo8VbVow9esyS1Vg+9DlAT9WhPHrMK1nwwazoMVNOY6dgVvSYZ1JjA+3pMlmNpfNY769QY+lkLgt18hmNL9iRxvIt6z6LA40lXNt+2bNjHARCIAqgExMLucfeyVh5qe0tzZ5SVxMaI2zomLxX0xDg8wl1Vp0am/BuezuSckvGgG8nWB2TMeAjlgPRnTLlmkXtmjrlmhfXPXON3a39x3rOox5x7v855Xusf52665l1v9dFHauxt5jZpVdjc+b7x9qpsUlDblfGa+wjJldGa+wzple2X3Va219TpzsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8GIPDgQAAAAAgPxfG0FVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVdqDQwIAAAAAQf9f+8IEAAAAAAAAwCmRg3Unf/8l+AAAAABJRU5ErkJggg==",xue="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAPoAgMAAAAwzTx3AAAACVBMVEXz9fjX19fk5OUH9i6SAAAGd0lEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGD24EAAAAAAAMj/tRFUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVXYuXvcCGEgDMODJQrScwSK3GKP4GI/ZKWiSZRjcAn326TZU0YRsOwPkcCuPN88Nxi9wRjwxhhjjDHGGLOPuyYZpXhvSHSRwjkkK737D5L1UrQGGQYpWYsMZymYwy4ar/YaWbyUK2IvbQudw27a/uIb7Kdsje+QKUipIsB6sSObFKpCtpOUqcFBeta5DgfpWedaHKVmGx9xlJolHodpWeIdEujYylZIoeLu1iCFirtbjRQqHtmJR++QQsWepsWk/0rwWfSeps3alUQFow+SpCl5OxezNiVOweiSqOTRMy/WtuBNfObdqbPRS0Q/updENe/o5VcPVt2qW3WK6sQrvN3XrbpVt+pWXWt14vu67easulXnqO5l9Y6Pkah6uJ8c6CmrO/wZGKtPGXvG6pgMNNX989GaQFM9rKPM+KpHzE5s1R0Wnq16g8WZpbpfI856lurh9YT4SFY94uZEVh2rgat6hZUnqb4x+pmkeng9IX7mql5j1XNV73CHq/rD6CTV/cZv3kaO6mFrdKvOUT3izomq+uPoHNU9b/Vg1a06e3W7r2uvbrs5xie3QP/kVmPVk1SfR29439IQv5ursApc1R3ve3jiry/S8n5z63Bj39dpqldYBLbqgsXAUt3L8zo3slQPTxXR852bc5h4vtOSt/9Tw1d9foIJjCejp+wj43l4cRH4pvwVhIi7XmTDdVRf/d+8H/qrb3IABpXV/Z7lLKis/sveHdtGDgNRGJYEbKACVIKSq4IlzAF8xIRKrg8mVwL7PSwM35jiCiC5kR73y+hs/Nvy2AZErXnDWBizOp7iiNVnPB0jVl/xJIzVpWpz8YzVteo9imHE6vgSx6u+4Isbr/qKL0JYXepeJ+4Jq2vlO7XHq45vcbTqC7650aqv+CZ81aXy0gTlq66VdyGF0aon/DdY9QXGjVV9hjnoqkvt1TBKV11rb3zzY1VPgBmq+oKf3EjVZ/x0sFWX6guwlK26Vl+A5UeqnpAZqTpycZzqM3IHWXWpv9xRyKpr/TV/nrr6r1iusYa5+gMh2glnkbh6dp5xdnBVl9MjPRRPOSNc1fUcMtrpzPNW3wDgsNNZ4K2efy5QiqzVFzx5OxUcVXU5b2/BTgWhqq5Fx2inM2Wtvmdf1RtKgbV6yhYXvMJaPfuqXvCKY6peLq7ennIFYaqu5eJqkxWUs/qeLS4bXgmc1bfsF7SElzirJ8A+tOA1R1Rdyv8yqT3zCgdRdS3/MhGsaUEZq9uwsKYFz1h9z76hEy4wVk/ZNzSuOJ7q8v9odJpx5eCpbpefGD89cEX5qufv39pxxfNVzzrHhEt81TfAOFyLNNXFHvDmN64dNNXtzWOVhK36jFqerfqKWoGt+o5qkaW6vT24lmOprnaoJFzVF9TzXNVX1Atc1R9oEEmqiyWs5Uiqq62xtYSqOlooU/UZLQJT9RVNSKqLjVHNcVRXW2OrCVH1hCbKU31Bm8BTfUYjjupiU9RzFNXVpqh30FRPaKQ01dHKs1Rf0Iyiutga2yAyVNfnEM0OkuobmglJ9YRmnqP6gg4M1WWa0SESVNdpRYeDovqODkJRfUMHT1EdPQJBdVnQJd6/uq7o4giqP9BFCKrv6OIJqid0CQTV0env7Uf/jU5/bj96v8/od/QZ/TN6pzDdUfqM/hm9j5/uaPuMPuDoO/A+ne7oAbxPpjsaePQVeN8x3dEMvM9Nd7QA74vTLaEHw28vfescxR7bt9NQbDR9Ow3FRtP3043iZ9s/9uvYCkAQCKKgj9D+TKzO2Cp9lsAasc60AHzuot+t429LEt8S+CDxLYEPOtdSufnO1VQuGGVLxtjgsbcMNMnKXrGsz974tvs+McZ39X2q8V19/xq6c1vb+OlLf+1H6NqWN+7I8mcOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADzswYEAAAAAAJD/ayOoqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkp7cEgAAAAAIOj/a1+YAAAAAAAAALgEoKO2OvzgJtMAAAAASUVORK5CYII=",Aue=["src"],Pue=["src"],kue=["src"],Fue=_t(ot({__name:"ThumbnailRender",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean}},setup(e){const t=e,n=X(()=>t.value),o=X(()=>t.id),s=X(()=>t.disabled),r=X(()=>t.readOnly),i=$("");let a=null;const l=$(!1),u=X(()=>n.value==null||n.value===""),c=X(()=>!u.value&&l.value),d=()=>{l.value=!0},h=()=>{a&&URL.revokeObjectURL(a),a=null},f=()=>{i.value="",h()},p=fd(),{openSceneHub:g}=p,v=X(()=>{const b=un.getInstance().getItem("ws.code"),y=un.getInstance().getItem("BASE_URL"),E=b||t.workspaceId;return es({type:"scene_hub",config:{baseDomain:y,ws_code:E,scene_id:String(t.id)}}).url}),w=b=>{try{if(b.ctrlKey||b.metaKey){window.open(v.value,"_blank");return}g(String(t.id))}catch{window.open(v.value,"_blank")}finally{S()}},S=()=>{var E,_,I,T,F,L;(E=t.params)==null||E.api.clearFocusedCell();const b=((I=(_=t.params)==null?void 0:_.column)==null?void 0:I.getColId())||"",y=((F=(T=t.params)==null?void 0:T.node)==null?void 0:F.rowIndex)||0;(L=t.params)==null||L.api.setFocusedCell(y,b)};return Qe(()=>[o.value,n.value],async([b,y],E,_)=>{let I=!0;if(_(()=>{I=!1,h()}),l.value=!1,i.value="",!(b==null||b===""||!y))try{const T=await Due(String(b),y);if(!I||b!==o.value||y!==n.value)return;a=URL.createObjectURL(T),i.value=a}catch(T){I&&b===o.value&&y===n.value&&(console.warn("Failed to load cached thumbnail; using the original URL.",T),i.value=y)}},{immediate:!0}),Vn(f),(b,y)=>(q(),de("div",{class:le(["thumbnail-wrapper",{disabled:s.value,"read-only":r.value}]),onClick:w},[u.value?(q(),de("img",{key:0,src:V(xue),alt:"No thumbnail"},null,8,Aue)):c.value?(q(),de("img",{key:1,src:V(Iue),alt:"Broken thumbnail"},null,8,Pue)):i.value?(q(),de("img",{key:2,src:i.value,alt:"Thumbnail",onError:d},null,40,kue)):Ye("",!0)],2))}}),[["__scopeId","data-v-1fd3dd73"]]),Oue={class:"left-section"},Mue={class:"create-count"},Nue={class:"modified-template-options"},Lue=["onClick"],Vue={class:"setting-count"},Bue={class:"field-label"},$ue={class:"field-label"},Hue={class:"status-selection"},Gue={class:"preview-section"},Uue={key:0,class:"preview-list"},Wue={key:0,class:"preview-more"},zue={key:1,style:{color:"var(--tessr-text-secondary, #6b6b6b)"}},nB=1e3,oB=8,sB=7,jue=_t(ot({__name:"BulkCreateCount",props:{item:{},takeName:{},options:{default:()=>[{id:"number_up",name:"Number",icon:"ArrowLeft",description:{active:"Remove from the name",inactive:"Add a number that counts up",switch:"Switch to a number that counts up"}},{id:"number_down",name:"Number",icon:"ArrowRight",description:{active:"Remove from the name",inactive:"Add a number that counts down",switch:"Switch to a number that counts down"}},{id:"letter_up",name:"Letter",icon:"ArrowLeft",description:{active:"Remove from the name",inactive:"Add a letter that counts up",switch:"Switch to a letter that counts up"}},{id:"letter_down",name:"Letter",icon:"ArrowRight",description:{active:"Remove from the name",inactive:"Add a letter that counts down",switch:"Switch to a letter that counts down"}}]},getStatusFunc:{},workspaceId:{},entityId:{}},emits:["cancel","changed"],setup(e,{expose:t,emit:n}){const o=Kt,s=Io,r=$(null),i=$(null),a=["number","letter","name"],l={number_up:"1→9",number_down:"9→1",letter_up:"A→Z",letter_down:"Z→A",name:"Name"},u=$(null),c=$({}),d=(Y,re)=>{c.value[Y]=re instanceof HTMLElement?re:null},h=$(null),f=$("1"),p=e,g=$([p.takeName,{id:"number",text:"1→9",direction:"up"}," "]),v=X(()=>{const Y=w.value;let re=1;const R="9999.",G={createCount:`${R}0`,input:`${R}1`,firstField:`${R}5`,stepField:`${R}6`,number_up:`${R}1`,number_down:`${R}2`,letter_up:`${R}3`,letter_down:`${R}4`,statusSelect:`${R}7`};return["number_up","number_down","letter_up","letter_down"].forEach((ce,Ee)=>{re++,G[ce]=`${R}${re}`}),Y?(re++,G.statusSelect=`${R}${re}`,re++,G.firstField=`${R}${re}`,re++,G.stepField=`${R}${re}`):(delete G.firstField,delete G.stepField),G}),w=X(()=>g.value.find(Y=>typeof Y!="string"&&(Y.id==="number"||Y.id==="letter"))),S=$("number"),b=$("up"),y=Fo({...Ei.number}),E=Fo({...Ei.number}),_=()=>{Object.assign(y,Ei[S.value]),Object.assign(E,Ei[S.value])};Qe(w,Y=>{if(!Y)return;const re=Y.id;re!==S.value&&(S.value=re,_()),b.value=Y.direction==="down"?"down":"up"},{immediate:!0,flush:"sync"});const I=X(()=>YO[b.value]),T=X(()=>{const Y=Number(f.value);return Number.isFinite(Y)?Math.min(nB,Math.max(0,Math.floor(Y))):0}),F=(Y,re)=>{const R=JO(S.value,Y,re);y[Y]=R,Mv(Y,R)&&(E[Y]=R)},L=$(null),x=$(null),P=$(null),k=(Y,re)=>{var G,J,ce,Ee;if(re.key==="Enter"||re.key==="Escape")return;if(re.key==="Tab"){re.preventDefault(),re.stopPropagation(),re.stopImmediatePropagation();const Ce=re.shiftKey;Y=="first"&&(Ce?(G=c.value.letter_down)==null||G.focus():(J=L.value)==null||J.focus()),Y=="step"&&(Ce?(ce=L.value)==null||ce.focus():(Ee=i.value)==null||Ee.focus());return}re.key.length===1&&!re.ctrlKey&&!re.metaKey&&!re.altKey&&!ZO(S.value,Y,re.key)&&re.preventDefault()},M=(Y,re)=>{var Ee;re.preventDefault();const R=re.target,G=((Ee=re.clipboardData)==null?void 0:Ee.getData("text/plain"))??"",J=R.selectionStart??R.value.length,ce=R.selectionEnd??R.value.length;R.value=R.value.slice(0,J)+G+R.value.slice(ce),F(Y,R.value),R.value=y[Y]},N=Y=>{if(Mv(Y,y[Y]))return;const re=Ei[S.value][Y];y[Y]=re,E[Y]=re},B=X(()=>w.value?CE({type:S.value,direction:b.value,first:E.first,step:E.step,count:T.value}):[]),z=X(()=>g.value.every(Y=>typeof Y=="string"&&!Y)),oe=X(()=>T.value===0||z.value?[]:Array.from({length:T.value}).map((Y,re)=>g.value.map(R=>typeof R=="string"?R:R.id==="name"?p.takeName:B.value[re]??"").join(""))),ie=X(()=>oe.value.length>oB?oe.value.length-sB:0),te=X(()=>oe.value.length>oB?oe.value.slice(0,sB):oe.value),se=Y=>{A.value=[Y];const re=Y.id.split("_")[0],R=Y.id.split("_")[1],G=l[Y.id],J=r.value;if(!J)return;const ce=Ce=>g.value.find(Ne=>typeof Ne!="string"&&Ce.includes(Ne.id));if(re==="name"){ce(["name"])?J.deleteTag("name"):J.insertTag({id:re,text:G,direction:void 0});return}const Ee=ce(["number","letter"]);if(Ee){const Ce=Ee.id===re,Ne=Ee.direction===R;if(Ce&&Ne){J.deleteTag(Ee.id);return}J.deleteTag(Ee.id),J.insertTag({id:re,text:G,direction:R})}else J.insertTag({id:re,text:G,direction:R})},Z=Y=>j(Y.id)?Y.description.active:!!w.value&&Y.description.switch?Y.description.switch:Y.description.inactive,A=$(null),j=Y=>{const[re,R]=Y.split("_");return g.value.some(G=>typeof G!="string"&&G.id===re&&G.direction===R)},ne=n,ge=X(()=>{const[Y]=g.value;return g.value.length===1&&typeof Y!="string"&&Y.id==="name"});X(()=>g.value.length===0||ge.value);const xe=()=>{const Y=g.value.map(re=>typeof re=="string"?{type:"text",value:re}:re.id==="name"?{type:"current_name"}:{type:"counter",value:y.first,direction:re.direction=="up"?"asc":"desc",format:re.id==="number"?"number":"letter",step:y.step});ne("changed",{data:Y,count:T.value,template_flow_status_id:u.value||void 0})};Qe([g,f,y,u],()=>{xe()},{deep:!0,immediate:!0}),t({reset:()=>{A.value=null,g.value=[]},focus:()=>{var Y;(Y=i.value)==null||Y.focus()}}),Xt(()=>{var Y;(Y=i.value)==null||Y.focus()});const K=Y=>{var re,R;Y.preventDefault(),Y.stopPropagation(),(re=i.value)==null||re.blur(),(R=h.value)==null||R.focus()};return(Y,re)=>(q(),de("div",{class:"bulk-rename-core",ref_key:"popupRef",ref:h,tabindex:"-1"},[Se("div",Oue,[Se("div",Mue,[re[11]||(re[11]=Se("span",null,"How many to create?",-1)),ze(ye(V(hl),{modelValue:f.value,"onUpdate:modelValue":re[0]||(re[0]=R=>f.value=R),type:"number","max-value":nB,"max-decimal-char":0,"show-clear":!1,ref_key:"counterRef",ref:i,placeholder:""},null,8,["modelValue"]),[[V(s),v.value.createCount]])]),ze(ye(VN,{modelValue:g.value,"onUpdate:modelValue":re[1]||(re[1]=R=>g.value=R),"allowed-tags":a,ref_key:"templateInputRef",ref:r,placeholder:"Enter name",onEscape:K},null,8,["modelValue"]),[[V(s),v.value.input]]),Se("div",Nue,[(q(!0),de(Pt,null,xn(e.options,R=>ze((q(),de("button",{onClick:G=>se(R),ref_for:!0,ref:G=>d(R.id,G),key:R.id,class:le([{active:j(R.id)},"template-option"])},[tt(at(R.name)+" ",1),R.icon?(q(),je(V(gt),{key:0,src:R.icon,style:{transform:"rotate(90deg)"}},null,8,["src"])):Ye("",!0)],10,Lue)),[[V(o),{content:Z(R),bypassOverflowCheck:!0,delay:[300,0],interactive:!1,hideOnClick:!1,appendTo:"parent"}],[V(s),`${v.value[R.id]}`]])),128))]),Se("div",Vue,[Se("span",Bue,at(I.value.first),1),ze((q(),je(V(hl),{ref_key:"firstFieldRef",ref:x,"model-value":y.first,disabled:!w.value,"max-length":V(yE),onInput:re[2]||(re[2]=R=>F("first",R)),onKeydown:re[3]||(re[3]=R=>k("first",R)),onPaste:re[4]||(re[4]=R=>M("first",R)),onBlur:re[5]||(re[5]=R=>N("first")),"show-clear":!1},{clear:we(()=>[...re[12]||(re[12]=[Se("div",null,null,-1)])]),_:1},8,["model-value","disabled","max-length"])),[[V(s),v.value.firstField]]),Se("span",$ue,at(I.value.step),1),ze(ye(V(hl),{"model-value":y.step,disabled:!w.value,"max-length":V(wE),onInput:re[6]||(re[6]=R=>F("step",R)),onKeydown:re[7]||(re[7]=R=>k("step",R)),onPaste:re[8]||(re[8]=R=>M("step",R)),onBlur:re[9]||(re[9]=R=>N("step")),"show-clear":!1,ref_key:"fieldStepRef",ref:L},null,8,["model-value","disabled","max-length"]),[[V(s),v.value.stepField]])]),Se("div",Hue,[re[13]||(re[13]=Se("span",null,"Status",-1)),ye(V(wL),{modelValue:u.value,"onUpdate:modelValue":re[10]||(re[10]=R=>u.value=R),"get-status-func":p.getStatusFunc,"workspace-id":p.workspaceId,id:p.entityId,style:{width:"100%"},"max-width":"372px",ref_key:"selectStatusRef",ref:P,"focus-index":v.value.statusSelect},null,8,["modelValue","get-status-func","workspace-id","id","focus-index"])])]),Se("div",Gue,[re[14]||(re[14]=Se("span",{class:"preview-title"},"Preview",-1)),te.value.length>0?(q(),de("ul",Uue,[(q(!0),de(Pt,null,xn(te.value,(R,G)=>(q(),de("li",{key:G},[ye($N,{text:R},null,8,["text"])]))),128)),ie.value>0?(q(),de("li",Wue," … "+at(ie.value)+" more ",1)):Ye("",!0)])):(q(),de("div",zue," Add a name or a counter to see a preview. "))])],512))}}),[["__scopeId","data-v-744a8ab0"]]),rB={text:yl,id:void 0,assignees:Mse,status:KN,dateRange:Nse,isStarted:yl,isCompleted:yl,lastUpdated:yl,completedOn:yl,isDeleted:yl,isArchived:yl,isProcessing:yl,name:GN,options:CQ,metric:zN,__checkboxSelection:void 0,description:Vie,thumbnail:Fue},Kue={text:!1,id:!1,assignees:!0,status:!0,dateRange:!0,isStarted:!1,isCompleted:!1,lastUpdated:!1,completedOn:!1,isDeleted:!1,isArchived:!1,isProcessing:!1,name:!1,options:!0,metric:!1,__checkboxSelection:!1,description:!1,thumbnail:!1},que={text:null,id:void 0,assignees:oM,status:NN,dateRange:Lse,isStarted:void 0,isCompleted:void 0,lastUpdated:void 0,completedOn:void 0,isDeleted:void 0,isArchived:void 0,isProcessing:void 0,name:GN,options:UN,metric:void 0,__checkboxSelection:void 0,description:void 0,thumbnail:void 0},Yue={id:[100,100],assignees:[200,200],status:[200,200],dateRange:[255,255],isStarted:[150,150],isCompleted:[150,150],lastUpdated:[180,180],completedOn:[180,180],isDeleted:[void 0,void 0],isArchived:[void 0,void 0],isProcessing:[void 0,void 0],name:[350,500],options:[50,50],metric:[200,300],__checkboxSelection:[50,50],text:[200,300],description:[200,300],thumbnail:[82,82]},Xue={dateRange:{cellEditorPopupPosition:"under",cellEditorPopup:!1},name:{cellEditorPopupPosition:"over",cellEditor:!1,cellEditorPopup:!1},metric:{suppressKeyboardEvent:void 0,suppressNavigable:!1,suppressMovable:!1,cellClass:"ag-cell-optimized",editable:!0}},Zue=e=>{var t,n,o;if(e){if(Number((t=e.metric_type)==null?void 0:t.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number((n=e.metric_type)==null?void 0:n.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number((o=e.metric_type)==null?void 0:o.id)==3)return}},Ld=e=>{if(e)return Zue(e)};function iB(e,t){var s,r,i,a;const n=(s=t==null?void 0:t.data)==null?void 0:s.permissions;let o={disabled:!1,readOnly:!1,type:void 0};if(!t||!e)o={disabled:!1,readOnly:!0,type:void 0};else if(e==="options")o={disabled:!1,readOnly:!1,type:void 0};else if(e!=null&&e.includes("metric")){const l=`metric_permission_${e==null?void 0:e.replace("metric_","")}`;o={disabled:!1,readOnly:!((t==null?void 0:t.data)&&t.data[l]&&((r=t.data[l])==null?void 0:r.permission)==2&&!((i=t.colDef)!=null&&i.context.formula)&&!t.data.isLocked&&!t.data.isDeleted),type:Ld((a=t.colDef)==null?void 0:a.context)}}else{const u={assignees:(n==null?void 0:n.has_update_assignee_permission)??0,completedOn:0,name:(n==null?void 0:n.has_edit_permission)??0,permissions:0,status:(n==null?void 0:n.has_edit_template_flow_status_permission)??0,dateRange:(n==null?void 0:n.has_edit_date_permission)??0,isStarted:0,isDeleted:0,isArchived:0,isLocked:0,isProcessing:0,lastUpdated:0,id:0,isCompleted:0,options:1,disabled:0,description:(n==null?void 0:n.has_edit_permission)??0,thumbnail:1}[e]??0;o={disabled:u===-1,readOnly:u!==1,type:void 0}}return o}class r_{constructor(){Rn(this,"eGui");Rn(this,"params")}init(t){this.params=t}getGui(){var n,o,s,r,i;const t=document.createElement("div");return(n=this.params)!=null&&n.height&&t.style.setProperty("--height",(o=this.params)==null?void 0:o.height),(s=this.params)!=null&&s.width?t.style.setProperty("--width",(r=this.params)==null?void 0:r.width):(i=this.params)!=null&&i.fullwidth?t.style.setProperty("--width","100%"):t.style.setProperty("--width",`${Math.floor(Math.random()*50)+50}%`),t.className="ag-cell-skeleton",t.addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation()}),this.eGui=t,t}refresh(t){return!1}getValue(){var t;return(t=this.params)==null?void 0:t.value}isPopup(t){return!1}getPopupPosition(){}destroy(){}}const aB=new Map;class Tp{static initialize(t){this.wrappers=t}static getWrappers(){if(!this.wrappers)throw new Error("CellRendererFactory: Not initialized. Please call CellRendererFactory.initialize() first.");return this.wrappers}static buildCommonCellParams(t,n){var u,c,d;const o=t.data||((u=t.node)==null?void 0:u.data),s=(c=t.colDef)==null?void 0:c.field,r=s&&o?o[s]:void 0,i=iB((d=t.colDef)==null?void 0:d.field,t),a=typeof n=="function"?n(t):n??{};return{...t,value:r,disabled:i==null?void 0:i.disabled,readOnly:i==null?void 0:i.readOnly,type:Ld(t.context),...a}}static resolveRendererComponent(t,n){let o;return t.includes("metric")&&rB.metric?Ld(n)==="rating"?o=kie:o=zN:o=rB[t]??void 0,o}static resolveEditorComponent(t,n){const o=t.includes("metric");let s;const r=Ld(n);return o&&["number","dropdown"].includes(r)?s=Wre:s=que[t],s}static canEditField(t,n){var r;if(n.data===void 0)return!1;const o=iB((r=n.colDef)==null?void 0:r.field,n),s=Kue[t]??!0;return!(o!=null&&o.disabled)&&!(o!=null&&o.readOnly)&&s&&(o==null?void 0:o.type)!=="rating"}static resolveSize(t){const[n=250,o=300]=Yue[t]??[];return{minWidth:n,maxWidth:o}}static buildHeaderComponentParams(t){return n=>typeof t=="function"?t(n):t??{}}static fromType(t){const{wrapVueCellEditor:n}=this.getWrappers(),o=String(t.field??""),s=this.resolveSize(o),r=Xue[o]??{},i=Ld(t.context),a=i==="number"||i==="rating",l=i=="rating"?t.context.range*24+20:s.minWidth;return{...t,headerName:t.headerName,...s,...t,cellEditorSelector:c=>{const d=this.resolveEditorComponent(o,t.context);return{component:n(d),params:this.buildCommonCellParams(c,t.cellRendererParams),popup:!a}},singleClickEdit:!0,cellEditorPopup:!a,cellEditorPopupPosition:a?void 0:"under",editable:c=>{let d;return c.data===void 0||c.data.isDeleted||c.node.data===void 0?d=!1:d=this.canEditField(o,c),d},minWidth:l,cellRendererSelector:c=>Jue(c,{component:n(this.resolveRendererComponent(o,t.context)),params:this.buildCommonCellParams(c,t.cellRendererParams)}),headerComponentParams:this.buildHeaderComponentParams(t.headerComponentParams),...r,cellClass:c=>`${i}--${c.colDef.field}`}}}Rn(Tp,"wrappers",null);const Jue=(e,t)=>{var s;const n=(s=e.colDef)==null?void 0:s.field,o=`${n}-${e.node.rowIndex}`;return aB.set(o,(aB.get(o)??0)+1),n!=null&&n.includes("metric")?e.value===void 0?{component:r_,params:{fullwidth:!1}}:t:e.data&&(n!=null&&n.includes("thumbnail"))||e.data&&e.value!==void 0?t:!n||n==="options"||n==="__checkboxSelection"?e.data?t:{component:r_,params:{fullwidth:!0,width:"24px",height:"24px"}}:!e.data||e.value===void 0?{component:r_,params:{fullwidth:!1}}:t},Que=_t(ot({__name:"Vue3Wrapper",props:{component:{},params:{},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!0},value:{},data:{},id:{},tooltip:{},isNoData:{type:Boolean,default:!1},workspaceId:{},entityId:{},axiosService:{},isSearching:{type:Boolean,default:!1},isFiltering:{type:Boolean,default:!1},sortType:{default:"default"},maxRating:{default:5},config:{}},setup(e,{expose:t}){const n=e,o=$(null),s=X(()=>{var a;return((a=n.component)==null?void 0:a.name)||"UnknownComponent"}),r=X(()=>{var a;return((a=n.component)==null?void 0:a.default)||n.component}),i=X(()=>({params:n.params,disabled:n.disabled,readOnly:n.readOnly,value:n.value,maxRating:n.maxRating,data:n.data,id:n.id,workspaceId:n.workspaceId,entityId:n.entityId,axiosService:n.axiosService,tooltip:n.tooltip,isSearching:n.isSearching,isFiltering:n.isFiltering,isNoData:n.isNoData,config:n.config}));return t({focus:()=>{var a;return(a=o.value)!=null&&a.focus?o.value.focus():console.warn(`Component ${s.value} does not have a focus method.`),!0},blur:()=>{var a,l;return(l=(a=o.value)==null?void 0:a.blur)==null||l.call(a),!0},trigger:(a,l)=>{var u;return(u=o.value)==null||u.$emit(a,l),!0}}),(a,l)=>(q(),je(OC(r.value),jt(i.value,{ref_key:"componentRef",ref:o}),null,16))}}),[["__cssModules",{$style:{skeleton:"_skeleton_7xde7_1",shimmer:"_shimmer_7xde7_16","skeleton-loading":"_skeleton-loading_7xde7_1"}}]]);function ece(e){return"stopEditing"in e}const tce=8,nce=e=>{if(!e)return;const t=e.__vueParentComponent,n=t==null?void 0:t.exposed;n&&typeof n.triggerFocus=="function"?n.triggerFocus():e.focus()};function lB(e){return class{constructor(){Rn(this,"container");Rn(this,"vNode",null);Rn(this,"componentInstance",null);Rn(this,"componsenExposed",null);Rn(this,"params");Rn(this,"isEditor",!1);Rn(this,"_destroyed",!1)}init(n){var l,u,c,d;if(!n){console.error("[Vue3CellWrapper] Missing params");return}const o=performance.now();this.params=n,this.isEditor=ece(n),this.container=document.createElement("div"),this.container.classList.add("ag-vue3-cell-wrapper"),this.container.style.width="100%",this.container.style.height="100%";const s=n.context.apiClass,r=n,i={component:e,params:Object.freeze(n),disabled:!1,readOnly:r.readOnly??!1,value:n.value,maxRating:r.maxRating??void 0,data:n.data,id:(l=n==null?void 0:n.data)==null?void 0:l.id,workspaceId:n.context.workspaceId,entityId:n.context.entityId,axiosService:s,tooltip:r.tooltip??void 0,isSearching:r.isSearching??!1,isFiltering:r.isFiltering??!1,isNoData:r.isNoData??!1,config:r.config,sceneId:(r==null?void 0:r.sceneId)||void 0};this.vNode=ye(Que,i),rb(this.vNode,this.container);const a=performance.now()-o;a>tce&&console.warn(`[Vue3CellWrapper] Slow render (${a.toFixed(1)}ms) for "${(u=n.colDef)==null?void 0:u.field}"`),this.componentInstance=(c=this.vNode.component)==null?void 0:c.proxy,this.componsenExposed=(d=this.vNode.component)==null?void 0:d.exposed}getGui(){return this.container}refresh(n){return!1}focusUi(){var n;(n=this.componsenExposed)!=null&&n.focus?this.componsenExposed.focus():nce(this.container)}getValue(){var n,o,s;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((s=(o=this.componentInstance).getValue)==null?void 0:s.call(o))??this.componentInstance.value:(console.warn("[Vue3CellWrapper] getValue() called but component instance not available"),(n=this.params)==null?void 0:n.value)}isPopup(n){var i,a,l,u,c;const o=(l=(a=(i=this.params)==null?void 0:i.colDef)==null?void 0:a.field)==null?void 0:l.includes("metric"),s=((u=this.params)==null?void 0:u.context)&&Ld(this.params.context);return o||(s==="number"||s==="rating")||!this.isEditor?!1:(c=this.componentInstance)!=null&&c.isPopup?this.componentInstance.isPopup():!0}getPopupPosition(){var o,s,r;return this.isEditor?(o=this.componentInstance)!=null&&o.getPopupPosition?this.componentInstance.getPopupPosition():((r=(s=this.params)==null?void 0:s.colDef)==null?void 0:r.cellEditorPopupPosition)??"under":void 0}afterGuiAttached(){!this.isEditor||this.componentInstance}destroy(){if(!this._destroyed&&(this._destroyed=!0,!!this.container))try{const n=this.componentInstance;if(n){try{typeof n.$destroy=="function"&&n.$destroy()}catch(s){console.warn("[Vue3CellWrapper] Error during $destroy:",s)}try{typeof n.destroy=="function"&&n.destroy()}catch(s){console.warn("[Vue3CellWrapper] Error during destroy():",s)}}(typeof queueMicrotask=="function"?queueMicrotask:s=>Promise.resolve().then(s))(()=>{try{rb(null,this.container)}catch(s){console.warn("[Vue3CellWrapper] Error during unmount:",s)}finally{this.container.textContent=""}})}catch(n){console.error("[Vue3CellWrapper] Error during cleanup:",n)}finally{this.vNode=null,this.componentInstance=null}}}}function My(e){return lB(e)}function uB(e){return lB(e)}var Wu=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,n){const o=t?this.allAsyncListeners:this.allSyncListeners;let s=o.get(e);return!s&&n&&(s=new Set,o.set(e,s)),s}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,n=!1){this.getListeners(e,n,!0).add(t)}removeEventListener(e,t,n=!1){const o=this.getListeners(e,n,!1);o&&(o.delete(t),o.size===0&&(n?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const n=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:o}=this,s=a=>{const l=o?()=>o.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},r=this.getListeners(n,t,!1);if(((r==null?void 0:r.size)??0)>0){const a=new Set(r);for(const l of a)r!=null&&r.has(l)&&s(()=>l(e))}const i=this.getGlobalListeners(t);if(i.size>0){const a=new Set(i);for(const l of a)s(()=>l(n,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}};function Ia(e){return e==null||e===""?null:e}function ft(e){return e!=null&&e!==""}function Gn(e){return!ft(e)}function i_(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Dp(e,t){const n=e?JSON.stringify(e):null,o=t?JSON.stringify(t):null;return n===o}function oce(e,t,n=!1){const o=e==null,s=t==null;if(e!=null&&e.toNumber&&(e=e.toNumber()),t!=null&&t.toNumber&&(t=t.toNumber()),o&&s)return 0;if(o)return-1;if(s)return 1;function r(i,a){return i>a?1:i<a?-1:0}if(typeof e!="string"||!n)return r(e,t);try{return e.localeCompare(t)}catch{return r(e,t)}}var sce=/[&<>"']/g,rce={"&":"&","<":"<",">":">",'"':""","'":"'"};function Vd(e){return(e==null?void 0:e.toString().toString())??null}function Ip(e){var t;return((t=Vd(e))==null?void 0:t.replace(sce,n=>rce[n]))??null}function Ai(e){return e.eRootDiv.getRootNode()}function Kn(e){return Ai(e).activeElement}function $o(e){const{gos:t,eRootDiv:n}=e;let o=null;const s=t.get("getDocument");return s&&ft(s)?o=s():n&&(o=n.ownerDocument),o&&ft(o)?o:document}function cB(e){const t=Kn(e);return t===null||t===$o(e).body}function dB(e){return $o(e).defaultView||window}function a_(e){let t=null,n=null;try{t=$o(e).fullscreenElement}catch{}finally{t||(t=Ai(e));const o=t.querySelector("body");o?n=o:t instanceof ShadowRoot?n=t:t instanceof Document?n=t==null?void 0:t.documentElement:n=t}return n}function ice(e){const t=a_(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function ace(e){const t=a_(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function Qr(e,t,n){n==null||typeof n=="string"&&n==""?hB(e,t):Ir(e,t,n)}function Ir(e,t,n){e.setAttribute(fB(t),n.toString())}function hB(e,t){e.removeAttribute(fB(t))}function fB(e){return`aria-${e}`}function Dl(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function lce(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function uce(e){return e.getAttribute("aria-label")}function Bd(e,t){Qr(e,"label",t)}function xp(e,t){Qr(e,"labelledby",t)}function pB(e,t){Qr(e,"live",t)}function cce(e,t){Qr(e,"atomic",t)}function dce(e,t){Qr(e,"relevant",t)}function hce(e,t){Qr(e,"invalid",t)}function fce(e,t){Qr(e,"disabled",t)}function gB(e,t){Qr(e,"hidden",t)}function l_(e,t){Ir(e,"expanded",t)}function pce(e,t){Ir(e,"setsize",t)}function gce(e,t){Ir(e,"posinset",t)}function mce(e,t){Ir(e,"multiselectable",t)}function vce(e,t){Ir(e,"rowcount",t)}function Ny(e,t){Ir(e,"rowindex",t)}function yce(e,t){Ir(e,"rowspan",t)}function wce(e,t){Ir(e,"colcount",t)}function mB(e,t){Ir(e,"colindex",t)}function Cce(e,t){Ir(e,"colspan",t)}function bce(e,t){Ir(e,"sort",t)}function Sce(e){hB(e,"sort")}function vB(e,t){Qr(e,"selected",t)}function Ece(e,t){Qr(e,"controls",t)}function _ce(e,t){Ece(e,t.id),xp(t,e.id)}function yB(e,t){Qr(e,"owns",t)}function Ly(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Rce="[tabindex], input, select, button, textarea, [href]",wB="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Ap(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(wB)?!1:Pi(e)}function Un(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-hidden",!t),o||gB(e,!t)}function Tce(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-invisible",!t),o||gB(e,!t)}function Pp(e,t){const n="disabled",o=t?r=>r.setAttribute(n,""):r=>r.removeAttribute(n);o(e);const s=e.querySelectorAll("input")??[];for(const r of s)o(r)}function zu(e,t,n){let o=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof n=="number"){if(++o>n)break}else if(e===n)break}return!1}function ju(e){const{height:t,width:n,borderTopWidth:o,borderRightWidth:s,borderBottomWidth:r,borderLeftWidth:i,paddingTop:a,paddingRight:l,paddingBottom:u,paddingLeft:c,marginTop:d,marginRight:h,marginBottom:f,marginLeft:p,boxSizing:g}=window.getComputedStyle(e),v=Number.parseFloat;return{height:v(t||"0"),width:v(n||"0"),borderTopWidth:v(o||"0"),borderRightWidth:v(s||"0"),borderBottomWidth:v(r||"0"),borderLeftWidth:v(i||"0"),paddingTop:v(a||"0"),paddingRight:v(l||"0"),paddingBottom:v(u||"0"),paddingLeft:v(c||"0"),marginTop:v(d||"0"),marginRight:v(h||"0"),marginBottom:v(f||"0"),marginLeft:v(p||"0"),boxSizing:g}}function u_(e){const t=ju(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function kp(e){const t=ju(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function CB(e){const{height:t,marginBottom:n,marginTop:o}=ju(e);return Math.floor(t+n+o)}function Vy(e){const{width:t,marginLeft:n,marginRight:o}=ju(e);return Math.floor(t+n+o)}function bB(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:o,borderRightWidth:s,borderBottomWidth:r}=ju(e);return{top:t.top+(n||0),left:t.left+(o||0),right:t.right+(s||0),bottom:t.bottom+(r||0)}}function By(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function $y(e,t,n){n&&(t*=-1),e.scrollLeft=t}function qo(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function ei(e){e!=null&&e.parentNode&&e.remove()}function SB(e){return!!e.offsetParent}function Pi(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!SB(e)||window.getComputedStyle(e).visibility!=="visible")}function c_(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function EB(e,t,n){n&&n.nextSibling===t||(e.firstChild?n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function _B(e,t){for(let n=0;n<t.length;n++){const o=t[n],s=e.children[n];s!==o&&e.insertBefore(o,s)}}function Dce(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Fp(e,t){if(t)for(const n of Object.keys(t)){const o=t[n];if(!(n!=null&&n.length)||o==null)continue;const s=Dce(n),r=o.toString(),i=r.replace(/\s*!important/g,""),a=i.length!=r.length?"important":void 0;e.style.setProperty(s,i,a)}}function Hy(e){return()=>{const t=e();return t?d_(t)||RB(t):!0}}function d_(e){return e.clientWidth<e.scrollWidth}function RB(e){return e.clientHeight<e.scrollHeight}function Gy(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):ki(e,t)}function ki(e,t){t=h_(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Op(e,t){t=h_(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function h_(e){return typeof e=="number"?`${e}px`:e}function f_(e){return e instanceof Node||e instanceof HTMLElement}function Js(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function Il(e,t,n){const s=dB(e).ResizeObserver,r=s?new s(n):null;return r==null||r.observe(t),()=>r==null?void 0:r.disconnect()}function xa(e,t){const n=dB(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var TB="data-ref",p_;function DB(){return p_??(p_=document.createTextNode(" ")),p_.cloneNode()}function Mp(e){const{attrs:t,children:n,cls:o,ref:s,role:r,tag:i}=e,a=document.createElement(i);if(o&&(a.className=o),s&&a.setAttribute(TB,s),r&&a.setAttribute("role",r),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(n)if(typeof n=="string")a.textContent=n;else{let l=!0;for(const u of n)u&&(typeof u=="string"?(a.appendChild(document.createTextNode(u)),l=!1):typeof u=="function"?a.appendChild(u()):(l&&(a.appendChild(DB()),l=!1),a.append(Mp(u)),a.appendChild(DB())))}return a}var Ice=["touchstart","touchend","touchmove","touchcancel","scroll"],xce=["wheel"],g_={},IB=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof g_[n]=="boolean")return g_[n];const o=document.createElement(e[n]||"div");return n="on"+n,g_[n]=n in o}})();function Ace(e,t){return!t||!e?!1:kce(t).indexOf(e)>=0}function Pce(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function kce(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Pce(t)}function Fce(e,t,n){const o=Oce(t);let s;o!=null&&(s={passive:o}),e.addEventListener(t,n,s)}var Oce=e=>{const t=Ice.includes(e),n=xce.includes(e);if(t)return!0;if(n)return!1};function xB(e,t,n){if(n===0)return!1;const o=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(o,s)<=n}var Np=(e,t)=>{const n=e.identifier;for(let o=0,s=t.length;o<s;++o){const r=t[o];if(r.identifier===n)return r}return null};function Lp(e,t){return e.gos.isElementInThisInstance(t.target)}function Mce(e,t,n){const s=e.getBoundingClientRect().height,r=ice(n)-2,i=ace(n)-2;if(!e.offsetParent)return;const l=bB(e.offsetParent),{clientY:u,clientX:c}=t;let d=u-l.top-s/2,h=c-l.left-10;const f=$o(n),p=f.defaultView||window,g=p.pageYOffset||f.documentElement.scrollTop,v=p.pageXOffset||f.documentElement.scrollLeft;r>0&&h+e.clientWidth>r+v&&(h=r+v-e.clientWidth),h<0&&(h=0),i>0&&d+e.clientHeight>i+g&&(d=i+g-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}var Uy=(e,...t)=>{for(const n of t){const[o,s,r,i]=n;o.addEventListener(s,r,i),e.push(n)}},m_=e=>{if(e){for(const[t,n,o,s]of e)t.removeEventListener(n,o,s);e.length=0}},xl=e=>{e.cancelable&&e.preventDefault()};function Nce(e,t){return t}function AB(e){return(e==null?void 0:e.getLocaleTextFunc())??Nce}function Lce(e,t,n,o){const s=t[n];return e.getLocaleTextFunc()(n,typeof s=="function"?s(o):s,o)}function Vce(e){return(t,n,o)=>e({key:t,defaultValue:n,variableValues:o})}function Bce(e){return(t,n,o)=>{let s=e==null?void 0:e[t];if(s&&(o!=null&&o.length)){let r=0;for(;!(r>=o.length||s.indexOf("${variable}")===-1);)s=s.replace("${variable}",o[r++])}return s??n}}var Fi=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,n){this.localEventService||(this.localEventService=new Wu),this.localEventService.addEventListener(e,t,n)}removeEventListener(e,t,n){var o;(o=this.localEventService)==null||o.removeEventListener(e,t,n)}dispatchLocalEvent(e){var t;(t=this.localEventService)==null||t.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const n=[];for(const o of Object.keys(t)){const s=t[o];s&&n.push(this._setupListener(e,o,s))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let o;if($ce(e))e.__addEventListener(t,n),o=()=>(e.__removeEventListener(t,n),null);else{const s=Hce(e);e instanceof HTMLElement?Fce(e,t,n):s?e.addListener(t,n):e.addEventListener(t,n),o=s?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}setupPropertyListener(e,t){const{gos:n}=this;n.addPropertyEventListener(e,t);const o=()=>(n.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const n=e.join("-")+this.propertyListenerId++,o=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=s.changeSet.id}const r={type:"propertyChanged",changeSet:s.changeSet,source:s.source};t(r)};for(const s of e)this.setupPropertyListener(s,o)}getLocaleTextFunc(){return AB(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const n=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),n}createBean(e,t,n){return(t||this.stubContext).createBean(e,n)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function $ce(e){return e.__addEventListener!==void 0}function Hce(e){return e.eventServiceType==="global"}var qe=class extends Fi{},PB={};function v_(e,t){PB[t]||(e(),PB[t]=!0)}var Gce={pending:!1,funcs:[]},Uce={pending:!1,funcs:[]};function y_(e,t="setTimeout",n){const o=t==="raf"?Uce:Gce;if(o.funcs.push(e),o.pending)return;o.pending=!0;const s=()=>{const r=o.funcs.slice();o.funcs.length=0,o.pending=!1;for(const i of r)i()};t==="raf"?xa(n,s):window.setTimeout(s,0)}function Yo(e,t,n){let o;return function(...s){const r=this;window.clearTimeout(o),o=window.setTimeout(function(){e.isAlive()&&t.apply(r,s)},n)}}function kB(e,t){let n=0;return function(...o){const s=this,r=Date.now();r-n<t||(n=r,e.apply(s,o))}}function Wce(e,t,n,o=100){const s=Date.now();let r=null,i=!1;const a=()=>{r!=null&&(window.clearInterval(r),r=null)};e.addDestroyFunc(a);const l=()=>{const u=Date.now()-s>o;(t()||u)&&(n(),i=!0,a())};l(),i||(r=window.setInterval(l,10))}var FB=new Set(["__proto__","constructor","prototype"]);function zce(e,t){if(e!=null){if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(n.toString(),e[n]);return}for(const n of Object.keys(e).filter(o=>!FB.has(o)))t(n,e[n])}}function vs(e,t,n=!0,o=!1){ft(t)&&zce(t,(s,r)=>{let i=e[s];i!==r&&(o&&i==null&&r!=null&&typeof r=="object"&&r.constructor===Object&&(i={},e[s]=i),OB(r)&&OB(i)&&!Array.isArray(i)?vs(i,r,n,o):(n||r!==void 0)&&(e[s]=r))})}function OB(e){return typeof e=="object"&&e!==null}var w_=class Ga{static applyGlobalGridOptions(t){if(!Ga.gridOptions)return{...t};let n={};return vs(n,Ga.gridOptions,!0,!0),Ga.mergeStrategy==="deep"?vs(n,t,!0,!0):n={...n,...t},Ga.gridOptions.context&&(n.context=Ga.gridOptions.context),t.context&&(Ga.mergeStrategy==="deep"&&n.context&&vs(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(Ga.mergeStrategy==="deep"){const o=jce(t);if(o&&typeof o=="object"&&typeof n=="object")return Ga.applyGlobalGridOptions({[t]:n})[t]}return n}};w_.gridOptions=void 0,w_.mergeStrategy="shallow";var C_=w_;function jce(e){var t;return(t=C_.gridOptions)==null?void 0:t[e]}var Kce={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1},MB="https://www.ag-grid.com";function Al(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function Vp(e,...t){v_(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function $d(e,...t){v_(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var NB=new Set,Wy={},Hd={},zy,LB=!1,VB=!1,qce=!1;function Yce(e){const[t,n]=e.version.split(".")||[],[o,s]=zy.split(".")||[];return t===o&&n===s}function Xce(e){var o;zy||(zy=e.version);const t=s=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${s} Please update all modules to the same version.`;e.version?Yce(e)||$d(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${zy}.`)):$d(t(`'${e.moduleName}' is incompatible.`));const n=(o=e.validate)==null?void 0:o.call(e);n&&!n.isValid&&$d(`${n.message}`)}function Bp(e,t,n=!1){n||(LB=!0),Xce(e);const o=e.rowModels??["all"];NB.add(e);let s;t!==void 0?(VB=!0,Hd[t]===void 0&&(Hd[t]={}),s=Hd[t]):s=Wy;for(const r of o)s[r]===void 0&&(s[r]={}),s[r][e.moduleName]=e;if(e.dependsOn)for(const r of e.dependsOn)Bp(r,t,n)}function Zce(e){delete Hd[e]}function b_(e,t,n){const o=s=>{var r,i,a;return!!((r=Wy[s])!=null&&r[e])||!!((a=(i=Hd[t])==null?void 0:i[s])!=null&&a[e])};return o(n)||o("all")}function S_(){return VB}function Jce(e,t){const n=Hd[e]??{};return[...Object.values(Wy.all??{}),...Object.values(n.all??{}),...Object.values(Wy[t]??{}),...Object.values(n[t]??{})]}function Qce(){return new Set(NB)}function ede(){return LB}function BB(){return qce}var tde=class{static register(e){Bp(e,void 0)}static registerModules(e){for(const t of e)Bp(t,void 0)}},ct="34.3.1",$B=2e3,HB=100,GB="_version_",jy=null,Gd=`${MB}/javascript-data-grid`;function nde(e){jy=e}function ode(e){Gd=e}function UB(e,t,n){return(jy==null?void 0:jy(e,t))??[ade(e,t,n)]}function E_(e,t,n,o,s){e(`${o?"warning":"error"} #${t}`,...UB(t,n,s))}function sde(e){if(!e)return String(e);const t={};for(const n of Object.keys(e))typeof e[n]!="object"&&typeof e[n]!="function"&&(t[n]=e[n]);return JSON.stringify(t)}function rde(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=sde(e)),t}function Ky(e){return e===void 0?"undefined":e===null?"null":e}function __(e,t){return`${e}?${t.toString()}`}function ide(e,t,n){const o=Array.from(t.entries()).sort((r,i)=>i[1].length-r[1].length);let s=__(e,t);for(const[r,i]of o){if(r===GB)continue;const a=s.length-n;if(a<=0)break;const l="...",u=a+l.length,c=i.length-u>HB?i.slice(0,i.length-u)+l:i.slice(0,HB)+l;t.set(r,c),s=__(e,t)}return s}function WB(e,t){const n=new URLSearchParams;if(n.append(GB,ct),t)for(const r of Object.keys(t))n.append(r,rde(t[r]));const o=`${Gd}/errors/${e}`,s=__(o,n);return s.length<=$B?s:ide(o,n,$B)}var ade=(e,t,n)=>{const o=WB(e,t),s=`${n?n+`
|
|
193
|
+
*/const kle="9.14.5";function Fle(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Ra().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Ra().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Ra().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Ra().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Ra().__INTLIFY_PROD_DEVTOOLS__=!1)}const AV=ms.__EXTEND_POINT__,Da=Ry(AV),jn={FALLBACK_TO_ROOT:AV,NOT_SUPPORTED_PRESERVE:Da(),NOT_SUPPORTED_FORMATTER:Da(),NOT_SUPPORTED_PRESERVE_DIRECTIVE:Da(),NOT_SUPPORTED_GET_CHOICE_INDEX:Da(),COMPONENT_NAME_LEGACY_COMPATIBLE:Da(),NOT_FOUND_PARENT_SCOPE:Da(),IGNORE_OBJ_FLATTEN:Da(),NOTICE_DROP_ALLOW_COMPOSITION:Da(),NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG:Da()},Ole={[jn.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[jn.NOT_SUPPORTED_PRESERVE]:"Not supported 'preserve'.",[jn.NOT_SUPPORTED_FORMATTER]:"Not supported 'formatter'.",[jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE]:"Not supported 'preserveDirectiveContent'.",[jn.NOT_SUPPORTED_GET_CHOICE_INDEX]:"Not supported 'getChoiceIndex'.",[jn.COMPONENT_NAME_LEGACY_COMPATIBLE]:"Component name legacy compatible: '{name}' -> 'i18n'",[jn.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[jn.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[jn.NOTICE_DROP_ALLOW_COMPOSITION]:"'allowComposition' option will be dropped in the next major version. For more information, please see 👉 https://tinyurl.com/2p97mcze",[jn.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG]:"'translateExistCompatible' option will be dropped in the next major version."};function Is(e,...t){return P0(Ole[e],...t)}const PV=Bo.__EXTEND_POINT__,xs=Ry(PV),fn={UNEXPECTED_RETURN_TYPE:PV,INVALID_ARGUMENT:xs(),MUST_BE_CALL_SETUP_TOP:xs(),NOT_INSTALLED:xs(),NOT_AVAILABLE_IN_LEGACY_MODE:xs(),REQUIRED_VALUE:xs(),INVALID_VALUE:xs(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:xs(),NOT_INSTALLED_WITH_PROVIDE:xs(),UNEXPECTED_ERROR:xs(),NOT_COMPATIBLE_LEGACY_VUE_I18N:xs(),BRIDGE_SUPPORT_VUE_2_ONLY:xs(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:xs(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:xs(),__EXTEND_POINT__:xs()};function ko(e,...t){return Pd(e,null,ee.env.NODE_ENV!=="production"?{messages:Mle,args:t}:void 0)}const Mle={[fn.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[fn.INVALID_ARGUMENT]:"Invalid argument",[fn.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[fn.NOT_INSTALLED]:"Need to install with `app.use` function",[fn.UNEXPECTED_ERROR]:"Unexpected error",[fn.NOT_AVAILABLE_IN_LEGACY_MODE]:"Not available in legacy mode",[fn.REQUIRED_VALUE]:"Required in value: {0}",[fn.INVALID_VALUE]:"Invalid value",[fn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[fn.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[fn.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[fn.BRIDGE_SUPPORT_VUE_2_ONLY]:"vue-i18n-bridge support Vue 2.x only",[fn.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]:"Must define ‘i18n’ option or custom block in Composition API with using local scope in Legacy API mode",[fn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},z0=Ii("__translateVNode"),j0=Ii("__datetimeParts"),K0=Ii("__numberParts"),Uu=Ii("__enableEmitter"),bp=Ii("__disableEmitter"),kV=Ii("__setPluralRules"),FV=Ii("__injectWithOption"),q0=Ii("__dispose");function Sp(e){if(!dn(e)||Tr(e))return e;for(const t in e)if(Zr(e,t))if(!t.includes("."))dn(e[t])&&Sp(e[t]);else{const n=t.split("."),o=n.length-1;let s=e,r=!1;for(let i=0;i<o;i++){if(n[i]==="__proto__")throw new Error(`unsafe key: ${n[i]}`);if(n[i]in s||(s[n[i]]=An()),!dn(s[n[i]])){ee.env.NODE_ENV!=="production"&&Co(Is(jn.IGNORE_OBJ_FLATTEN,{key:n[i]})),r=!0;break}s=s[n[i]]}if(r||(Tr(s)?KL.includes(n[o])||delete e[t]:(s[n[o]]=e[t],delete e[t])),!Tr(s)){const i=s[n[o]];dn(i)&&Sp(i)}}return e}function Oy(e,t){const{messages:n,__i18n:o,messageResolver:s,flatJson:r}=t,i=zt(n)?n:Mn(o)?An():{[e]:An()};if(Mn(o)&&o.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:l,resource:u}=a;l?(i[l]=i[l]||An(),Dy(u,i[l])):Dy(u,i)}else Ct(a)&&Dy(JSON.parse(a),i)}),s==null&&r)for(const a in i)Zr(i,a)&&Sp(i[a]);return i}function OV(e){return e.type}function MV(e,t,n){let o=dn(t.messages)?t.messages:An();"__i18nGlobal"in n&&(o=Oy(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const s=Object.keys(o);s.length&&s.forEach(r=>{e.mergeLocaleMessage(r,o[r])});{if(dn(t.datetimeFormats)){const r=Object.keys(t.datetimeFormats);r.length&&r.forEach(i=>{e.mergeDateTimeFormat(i,t.datetimeFormats[i])})}if(dn(t.numberFormats)){const r=Object.keys(t.numberFormats);r.length&&r.forEach(i=>{e.mergeNumberFormat(i,t.numberFormats[i])})}}}function NV(e){return ye(Ka,null,e,0)}const LV="__INTLIFY_META__",VV=()=>[],Nle=()=>!1;let BV=0;function $V(e){return(t,n,o,s)=>e(n,o,oo()||void 0,s)}const Lle=()=>{const e=oo();let t=null;return e&&(t=OV(e)[LV])?{[LV]:t}:null};function Y0(e={},t){const{__root:n,__injectWithOption:o}=e,s=n===void 0,r=e.flatJson,i=Xr?$:xh,a=!!e.translateExistCompatible;ee.env.NODE_ENV!=="production"&&a&&RL(Is(jn.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG));let l=on(e.inheritLocale)?e.inheritLocale:!0;const u=i(n&&l?n.locale.value:Ct(e.locale)?e.locale:Od),c=i(n&&l?n.fallbackLocale.value:Ct(e.fallbackLocale)||Mn(e.fallbackLocale)||zt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:u.value),d=i(Oy(u.value,e)),h=i(zt(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),f=i(zt(e.numberFormats)?e.numberFormats:{[u.value]:{}});let p=n?n.missingWarn:on(e.missingWarn)||El(e.missingWarn)?e.missingWarn:!0,g=n?n.fallbackWarn:on(e.fallbackWarn)||El(e.fallbackWarn)?e.fallbackWarn:!0,v=n?n.fallbackRoot:on(e.fallbackRoot)?e.fallbackRoot:!0,w=!!e.fallbackFormat,S=Pn(e.missing)?e.missing:null,b=Pn(e.missing)?$V(e.missing):null,y=Pn(e.postTranslation)?e.postTranslation:null,E=n?n.warnHtmlMessage:on(e.warnHtmlMessage)?e.warnHtmlMessage:!0,_=!!e.escapeParameter;const I=n?n.modifiers:zt(e.modifiers)?e.modifiers:{};let T=e.pluralRules||n&&n.pluralRules,F;F=(()=>{s&&lV(null);const ve={version:kle,locale:u.value,fallbackLocale:c.value,messages:d.value,modifiers:I,pluralRules:T,missing:b===null?void 0:b,missingWarn:p,fallbackWarn:g,fallbackFormat:w,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:E,escapeParameter:_,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};ve.datetimeFormats=h.value,ve.numberFormats=f.value,ve.__datetimeFormatters=zt(F)?F.__datetimeFormatters:void 0,ve.__numberFormatters=zt(F)?F.__numberFormatters:void 0,ee.env.NODE_ENV!=="production"&&(ve.__v_emitter=zt(F)?F.__v_emitter:void 0);const Be=fle(ve);return s&&lV(Be),Be})(),Cp(F,u.value,c.value);function x(){return[u.value,c.value,d.value,h.value,f.value]}const P=X({get:()=>u.value,set:ve=>{u.value=ve,F.locale=u.value}}),k=X({get:()=>c.value,set:ve=>{c.value=ve,F.fallbackLocale=c.value,Cp(F,u.value,ve)}}),M=X(()=>d.value),N=X(()=>h.value),B=X(()=>f.value);function z(){return Pn(y)?y:null}function oe(ve){y=ve,F.postTranslation=ve}function ie(){return S}function te(ve){ve!==null&&(b=$V(ve)),S=ve,F.missing=b}function se(ve,Be){return ve!=="translate"||!Be.resolvedMessage}const Z=(ve,Be,wt,Dt,tn,en)=>{x();let bn;try{ee.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,s||(F.fallbackContext=n?hle():void 0),bn=ve(F)}finally{ee.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,s||(F.fallbackContext=void 0)}if(wt!=="translate exists"&&ro(bn)&&bn===Py||wt==="translate exists"&&!bn){const[Le,Ge]=Be();if(ee.env.NODE_ENV!=="production"&&n&&Ct(Le)&&se(wt,Ge)&&(v&&(Fy(g,Le)||cV(p,Le))&&Co(Is(jn.FALLBACK_TO_ROOT,{key:Le,type:wt})),ee.env.NODE_ENV!=="production")){const{__v_emitter:Rt}=F;Rt&&v&&Rt.emit("fallback",{type:wt,key:Le,to:"global",groupId:`${wt}:${Le}`})}return n&&v?Dt(n):tn(Le)}else{if(en(bn))return bn;throw ko(fn.UNEXPECTED_RETURN_TYPE)}};function A(...ve){return Z(Be=>Reflect.apply(yV,null,[Be,...ve]),()=>H0(...ve),"translate",Be=>Reflect.apply(Be.t,Be,[...ve]),Be=>Be,Be=>Ct(Be))}function j(...ve){const[Be,wt,Dt]=ve;if(Dt&&!dn(Dt))throw ko(fn.INVALID_ARGUMENT);return A(Be,wt,Ko({resolvedMessage:!0},Dt||{}))}function ne(...ve){return Z(Be=>Reflect.apply(EV,null,[Be,...ve]),()=>G0(...ve),"datetime format",Be=>Reflect.apply(Be.d,Be,[...ve]),()=>ky,Be=>Ct(Be))}function ge(...ve){return Z(Be=>Reflect.apply(TV,null,[Be,...ve]),()=>U0(...ve),"number format",Be=>Reflect.apply(Be.n,Be,[...ve]),()=>ky,Be=>Ct(Be))}function xe(ve){return ve.map(Be=>Ct(Be)||ro(Be)||on(Be)?NV(String(Be)):Be)}const K={normalize:xe,interpolate:ve=>ve,type:"vnode"};function Y(...ve){return Z(Be=>{let wt;const Dt=Be;try{Dt.processor=K,wt=Reflect.apply(yV,null,[Dt,...ve])}finally{Dt.processor=null}return wt},()=>H0(...ve),"translate",Be=>Be[z0](...ve),Be=>[NV(Be)],Be=>Mn(Be))}function re(...ve){return Z(Be=>Reflect.apply(TV,null,[Be,...ve]),()=>U0(...ve),"number format",Be=>Be[K0](...ve),VV,Be=>Ct(Be)||Mn(Be))}function R(...ve){return Z(Be=>Reflect.apply(EV,null,[Be,...ve]),()=>G0(...ve),"datetime format",Be=>Be[j0](...ve),VV,Be=>Ct(Be)||Mn(Be))}function G(ve){T=ve,F.pluralRules=T}function J(ve,Be){return Z(()=>{if(!ve)return!1;const wt=Ct(Be)?Be:u.value,Dt=Ce(wt),tn=F.messageResolver(Dt,ve);return a?tn!=null:Tr(tn)||Dr(tn)||Ct(tn)},()=>[ve],"translate exists",wt=>Reflect.apply(wt.te,wt,[ve,Be]),Nle,wt=>on(wt))}function ce(ve){let Be=null;const wt=QL(F,c.value,u.value);for(let Dt=0;Dt<wt.length;Dt++){const tn=d.value[wt[Dt]]||{},en=F.messageResolver(tn,ve);if(en!=null){Be=en;break}}return Be}function Ee(ve){const Be=ce(ve);return Be??(n?n.tm(ve)||{}:{})}function Ce(ve){return d.value[ve]||{}}function Ne(ve,Be){if(r){const wt={[ve]:Be};for(const Dt in wt)Zr(wt,Dt)&&Sp(wt[Dt]);Be=wt[ve]}d.value[ve]=Be,F.messages=d.value}function pe(ve,Be){d.value[ve]=d.value[ve]||{};const wt={[ve]:Be};if(r)for(const Dt in wt)Zr(wt,Dt)&&Sp(wt[Dt]);Be=wt[ve],Dy(Be,d.value[ve]),F.messages=d.value}function H(ve){return h.value[ve]||{}}function W(ve,Be){h.value[ve]=Be,F.datetimeFormats=h.value,RV(F,ve,Be)}function be(ve,Be){h.value[ve]=Ko(h.value[ve]||{},Be),F.datetimeFormats=h.value,RV(F,ve,Be)}function Ae(ve){return f.value[ve]||{}}function He(ve,Be){f.value[ve]=Be,F.numberFormats=f.value,IV(F,ve,Be)}function Te(ve,Be){f.value[ve]=Ko(f.value[ve]||{},Be),F.numberFormats=f.value,IV(F,ve,Be)}BV++,n&&Xr&&(Qe(n.locale,ve=>{l&&(u.value=ve,F.locale=ve,Cp(F,u.value,c.value))}),Qe(n.fallbackLocale,ve=>{l&&(c.value=ve,F.fallbackLocale=ve,Cp(F,u.value,c.value))}));const Xe={id:BV,locale:P,fallbackLocale:k,get inheritLocale(){return l},set inheritLocale(ve){l=ve,ve&&n&&(u.value=n.locale.value,c.value=n.fallbackLocale.value,Cp(F,u.value,c.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:M,get modifiers(){return I},get pluralRules(){return T||{}},get isGlobal(){return s},get missingWarn(){return p},set missingWarn(ve){p=ve,F.missingWarn=p},get fallbackWarn(){return g},set fallbackWarn(ve){g=ve,F.fallbackWarn=g},get fallbackRoot(){return v},set fallbackRoot(ve){v=ve},get fallbackFormat(){return w},set fallbackFormat(ve){w=ve,F.fallbackFormat=w},get warnHtmlMessage(){return E},set warnHtmlMessage(ve){E=ve,F.warnHtmlMessage=ve},get escapeParameter(){return _},set escapeParameter(ve){_=ve,F.escapeParameter=ve},t:A,getLocaleMessage:Ce,setLocaleMessage:Ne,mergeLocaleMessage:pe,getPostTranslationHandler:z,setPostTranslationHandler:oe,getMissingHandler:ie,setMissingHandler:te,[kV]:G};return Xe.datetimeFormats=N,Xe.numberFormats=B,Xe.rt=j,Xe.te=J,Xe.tm=Ee,Xe.d=ne,Xe.n=ge,Xe.getDateTimeFormat=H,Xe.setDateTimeFormat=W,Xe.mergeDateTimeFormat=be,Xe.getNumberFormat=Ae,Xe.setNumberFormat=He,Xe.mergeNumberFormat=Te,Xe[FV]=o,Xe[z0]=Y,Xe[j0]=R,Xe[K0]=re,ee.env.NODE_ENV!=="production"&&(Xe[Uu]=ve=>{F.__v_emitter=ve},Xe[bp]=()=>{F.__v_emitter=void 0}),Xe}function Vle(e){const t=Ct(e.locale)?e.locale:Od,n=Ct(e.fallbackLocale)||Mn(e.fallbackLocale)||zt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=Pn(e.missing)?e.missing:void 0,s=on(e.silentTranslationWarn)||El(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,r=on(e.silentFallbackWarn)||El(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,i=on(e.fallbackRoot)?e.fallbackRoot:!0,a=!!e.formatFallbackMessages,l=zt(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=Pn(e.postTranslation)?e.postTranslation:void 0,d=Ct(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,h=!!e.escapeParameterHtml,f=on(e.sync)?e.sync:!0;ee.env.NODE_ENV!=="production"&&e.formatter&&Co(Is(jn.NOT_SUPPORTED_FORMATTER)),ee.env.NODE_ENV!=="production"&&e.preserveDirectiveContent&&Co(Is(jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE));let p=e.messages;if(zt(e.sharedMessages)){const _=e.sharedMessages;p=Object.keys(_).reduce((T,F)=>{const L=T[F]||(T[F]={});return Ko(L,_[F]),T},p||{})}const{__i18n:g,__root:v,__injectWithOption:w}=e,S=e.datetimeFormats,b=e.numberFormats,y=e.flatJson,E=e.translateExistCompatible;return{locale:t,fallbackLocale:n,messages:p,flatJson:y,datetimeFormats:S,numberFormats:b,missing:o,missingWarn:s,fallbackWarn:r,fallbackRoot:i,fallbackFormat:a,modifiers:l,pluralRules:u,postTranslation:c,warnHtmlMessage:d,escapeParameter:h,messageResolver:e.messageResolver,inheritLocale:f,translateExistCompatible:E,__i18n:g,__root:v,__injectWithOption:w}}function X0(e={},t){{const n=Y0(Vle(e)),{__extender:o}=e,s={id:n.id,get locale(){return n.locale.value},set locale(r){n.locale.value=r},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(r){n.fallbackLocale.value=r},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_FORMATTER)),{interpolate(){return[]}}},set formatter(r){ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_FORMATTER))},get missing(){return n.getMissingHandler()},set missing(r){n.setMissingHandler(r)},get silentTranslationWarn(){return on(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(r){n.missingWarn=on(r)?!r:r},get silentFallbackWarn(){return on(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(r){n.fallbackWarn=on(r)?!r:r},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(r){n.fallbackFormat=r},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(r){n.setPostTranslationHandler(r)},get sync(){return n.inheritLocale},set sync(r){n.inheritLocale=r},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(r){n.warnHtmlMessage=r!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(r){n.escapeParameter=r},get preserveDirectiveContent(){return ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE)),!0},set preserveDirectiveContent(r){ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_PRESERVE_DIRECTIVE))},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...r){const[i,a,l]=r,u={};let c=null,d=null;if(!Ct(i))throw ko(fn.INVALID_ARGUMENT);const h=i;return Ct(a)?u.locale=a:Mn(a)?c=a:zt(a)&&(d=a),Mn(l)?c=l:zt(l)&&(d=l),Reflect.apply(n.t,n,[h,c||d||{},u])},rt(...r){return Reflect.apply(n.rt,n,[...r])},tc(...r){const[i,a,l]=r,u={plural:1};let c=null,d=null;if(!Ct(i))throw ko(fn.INVALID_ARGUMENT);const h=i;return Ct(a)?u.locale=a:ro(a)?u.plural=a:Mn(a)?c=a:zt(a)&&(d=a),Ct(l)?u.locale=l:Mn(l)?c=l:zt(l)&&(d=l),Reflect.apply(n.t,n,[h,c||d||{},u])},te(r,i){return n.te(r,i)},tm(r){return n.tm(r)},getLocaleMessage(r){return n.getLocaleMessage(r)},setLocaleMessage(r,i){n.setLocaleMessage(r,i)},mergeLocaleMessage(r,i){n.mergeLocaleMessage(r,i)},d(...r){return Reflect.apply(n.d,n,[...r])},getDateTimeFormat(r){return n.getDateTimeFormat(r)},setDateTimeFormat(r,i){n.setDateTimeFormat(r,i)},mergeDateTimeFormat(r,i){n.mergeDateTimeFormat(r,i)},n(...r){return Reflect.apply(n.n,n,[...r])},getNumberFormat(r){return n.getNumberFormat(r)},setNumberFormat(r,i){n.setNumberFormat(r,i)},mergeNumberFormat(r,i){n.mergeNumberFormat(r,i)},getChoiceIndex(r,i){return ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_SUPPORTED_GET_CHOICE_INDEX)),-1}};return s.__extender=o,ee.env.NODE_ENV!=="production"&&(s.__enableEmitter=r=>{const i=n;i[Uu]&&i[Uu](r)},s.__disableEmitter=()=>{const r=n;r[bp]&&r[bp]()}),s}}const Z0={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function Ble({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,s)=>[...o,...s.type===Pt?s.children:[s]],[]):t.reduce((n,o)=>{const s=e[o];return s&&(n[o]=s()),n},An())}function HV(e){return Pt}const J0=ot({name:"i18n-t",props:Ko({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>ro(e)||!isNaN(e)}},Z0),setup(e,t){const{slots:n,attrs:o}=t,s=e.i18n||n_({useScope:e.scope,__useComponent:!0});return()=>{const r=Object.keys(n).filter(d=>d!=="_"),i=An();e.locale&&(i.locale=e.locale),e.plural!==void 0&&(i.plural=Ct(e.plural)?+e.plural:e.plural);const a=Ble(t,r),l=s[z0](e.keypath,a,i),u=Ko(An(),o),c=Ct(e.tag)||dn(e.tag)?e.tag:HV();return Tc(c,u,l)}}});function $le(e){return Mn(e)&&!Ct(e[0])}function GV(e,t,n,o){const{slots:s,attrs:r}=t;return()=>{const i={part:!0};let a=An();e.locale&&(i.locale=e.locale),Ct(e.format)?i.key=e.format:dn(e.format)&&(Ct(e.format.key)&&(i.key=e.format.key),a=Object.keys(e.format).reduce((h,f)=>n.includes(f)?Ko(An(),h,{[f]:e.format[f]}):h,An()));const l=o(e.value,i,a);let u=[i.key];Mn(l)?u=l.map((h,f)=>{const p=s[h.type],g=p?p({[h.type]:h.value,index:f,parts:l}):[h.value];return $le(g)&&(g[0].key=`${h.type}-${f}`),g}):Ct(l)&&(u=[l]);const c=Ko(An(),r),d=Ct(e.tag)||dn(e.tag)?e.tag:HV();return Tc(d,c,u)}}const UV=ot({name:"i18n-n",props:Ko({value:{type:Number,required:!0},format:{type:[String,Object]}},Z0),setup(e,t){const n=e.i18n||n_({useScope:e.scope,__useComponent:!0});return GV(e,t,DV,(...o)=>n[K0](...o))}}),WV=ot({name:"i18n-d",props:Ko({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Z0),setup(e,t){const n=e.i18n||n_({useScope:e.scope,__useComponent:!0});return GV(e,t,_V,(...o)=>n[j0](...o))}});function Hle(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function Gle(e){const t=i=>{const{instance:a,modifiers:l,value:u}=i;if(!a||!a.$)throw ko(fn.UNEXPECTED_ERROR);const c=Hle(e,a.$);ee.env.NODE_ENV!=="production"&&l.preserve&&Co(Is(jn.NOT_SUPPORTED_PRESERVE));const d=zV(u);return[Reflect.apply(c.t,c,[...jV(d)]),c]};return{created:(i,a)=>{const[l,u]=t(a);Xr&&e.global===u&&(i.__i18nWatcher=Qe(u.locale,()=>{a.instance&&a.instance.$forceUpdate()})),i.__composer=u,i.textContent=l},unmounted:i=>{Xr&&i.__i18nWatcher&&(i.__i18nWatcher(),i.__i18nWatcher=void 0,delete i.__i18nWatcher),i.__composer&&(i.__composer=void 0,delete i.__composer)},beforeUpdate:(i,{value:a})=>{if(i.__composer){const l=i.__composer,u=zV(a);i.textContent=Reflect.apply(l.t,l,[...jV(u)])}},getSSRProps:i=>{const[a]=t(i);return{textContent:a}}}}function zV(e){if(Ct(e))return{path:e};if(zt(e)){if(!("path"in e))throw ko(fn.REQUIRED_VALUE,"path");return e}else throw ko(fn.INVALID_VALUE)}function jV(e){const{path:t,locale:n,args:o,choice:s,plural:r}=e,i={},a=o||{};return Ct(n)&&(i.locale=n),ro(s)&&(i.plural=s),ro(r)&&(i.plural=r),[t,a,i]}function Ule(e,t,...n){const o=zt(n[0])?n[0]:{},s=!!o.useI18nComponentName,r=on(o.globalInstall)?o.globalInstall:!0;ee.env.NODE_ENV!=="production"&&r&&s&&Co(Is(jn.COMPONENT_NAME_LEGACY_COMPATIBLE,{name:J0.name})),r&&([s?"i18n":J0.name,"I18nT"].forEach(i=>e.component(i,J0)),[UV.name,"I18nN"].forEach(i=>e.component(i,UV)),[WV.name,"I18nD"].forEach(i=>e.component(i,WV))),e.directive("t",Gle(t))}const Q0={"vue-devtools-plugin-vue-i18n":"Vue I18n devtools","vue-i18n-resource-inspector":"I18n Resources","vue-i18n-timeline":"Vue I18n"},Wle={"vue-i18n-resource-inspector":"Search for scopes ..."},zle={"vue-i18n-timeline":16764185},KV="vue-i18n: composer properties";let e_;async function jle(e,t){return new Promise((n,o)=>{try{Ple({id:"vue-devtools-plugin-vue-i18n",label:Q0["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[KV],app:e},s=>{e_=s,s.on.visitComponentTree(({componentInstance:i,treeNode:a})=>{Kle(i,a,t)}),s.on.inspectComponent(({componentInstance:i,instanceData:a})=>{i.vnode.el&&i.vnode.el.__VUE_I18N__&&a&&(t.mode==="legacy"?i.vnode.el.__VUE_I18N__!==t.global.__composer&&YV(a,i.vnode.el.__VUE_I18N__):YV(a,i.vnode.el.__VUE_I18N__))}),s.addInspector({id:"vue-i18n-resource-inspector",label:Q0["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:Wle["vue-i18n-resource-inspector"]}),s.on.getInspectorTree(i=>{i.app===e&&i.inspectorId==="vue-i18n-resource-inspector"&&Jle(i,t)});const r=new Map;s.on.getInspectorState(async i=>{if(i.app===e&&i.inspectorId==="vue-i18n-resource-inspector")if(s.unhighlightElement(),eue(i,t),i.nodeId==="global"){if(!r.has(i.app)){const[a]=await s.getComponentInstances(i.app);r.set(i.app,a)}s.highlightElement(r.get(i.app))}else{const a=Qle(i.nodeId,t);a&&s.highlightElement(a)}}),s.on.editInspectorState(i=>{i.app===e&&i.inspectorId==="vue-i18n-resource-inspector"&&nue(i,t)}),s.addTimelineLayer({id:"vue-i18n-timeline",label:Q0["vue-i18n-timeline"],color:zle["vue-i18n-timeline"]}),n(!0)})}catch(s){console.error(s),o(!1)}})}function qV(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function Kle(e,t,n){const o=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&e.vnode.el.__VUE_I18N__!==o){const s={label:`i18n (${qV(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(s)}}function YV(e,t){const n=KV;e.state.push({type:n,key:"locale",editable:!0,value:t.locale.value}),e.state.push({type:n,key:"availableLocales",editable:!1,value:t.availableLocales}),e.state.push({type:n,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value}),e.state.push({type:n,key:"inheritLocale",editable:!0,value:t.inheritLocale}),e.state.push({type:n,key:"messages",editable:!1,value:t_(t.messages.value)}),e.state.push({type:n,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}),e.state.push({type:n,key:"numberFormats",editable:!1,value:t.numberFormats.value})}function t_(e){const t={};return Object.keys(e).forEach(n=>{const o=e[n];Pn(o)&&"source"in o?t[n]=Zle(o):Tr(o)&&o.loc&&o.loc.source?t[n]=o.loc.source:dn(o)?t[n]=t_(o):t[n]=o}),t}const qle={"<":"<",">":">",'"':""","&":"&"};function Yle(e){return e.replace(/[<>"&]/g,Xle)}function Xle(e){return qle[e]||e}function Zle(e){return{_custom:{type:"function",display:`<span>ƒ</span> ${e.source?`("${Yle(e.source)}")`:"(?)"}`}}}function Jle(e,t){e.rootNodes.push({id:"global",label:"Global Scope"});const n=t.mode==="composition"?t.global:t.global.__composer;for(const[o,s]of t.__instances){const r=t.mode==="composition"?s:s.__composer;n!==r&&e.rootNodes.push({id:r.id.toString(),label:`${qV(o)} Scope`})}}function Qle(e,t){let n=null;if(e!=="global"){for(const[o,s]of t.__instances.entries())if(s.id.toString()===e){n=o;break}}return n}function XV(e,t){if(e==="global")return t.mode==="composition"?t.global:t.global.__composer;{const n=Array.from(t.__instances.values()).find(o=>o.id.toString()===e);return n?t.mode==="composition"?n:n.__composer:null}}function eue(e,t){const n=XV(e.nodeId,t);return n&&(e.state=tue(n)),null}function tue(e){const t={},n="Locale related info",o=[{type:n,key:"locale",editable:!0,value:e.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:e.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}];t[n]=o;const s="Locale messages info",r=[{type:s,key:"messages",editable:!1,value:t_(e.messages.value)}];t[s]=r;{const i="Datetime formats info",a=[{type:i,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];t[i]=a;const l="Datetime formats info",u=[{type:l,key:"numberFormats",editable:!1,value:e.numberFormats.value}];t[l]=u}return t}function Ep(e,t){if(e_){let n;t&&"groupId"in t&&(n=t.groupId,delete t.groupId),e_.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:e,groupId:n,time:Date.now(),meta:{},data:t||{},logType:e==="compile-error"?"error":e==="fallback"||e==="missing"?"warning":"default"}})}}function nue(e,t){const n=XV(e.nodeId,t);if(n){const[o]=e.path;o==="locale"&&Ct(e.state.value)?n.locale.value=e.state.value:o==="fallbackLocale"&&(Ct(e.state.value)||Mn(e.state.value)||dn(e.state.value))?n.fallbackLocale.value=e.state.value:o==="inheritLocale"&&on(e.state.value)&&(n.inheritLocale=e.state.value)}}function oue(e,t,n){return{beforeCreate(){const o=oo();if(!o)throw ko(fn.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const r=s.i18n;if(s.__i18n&&(r.__i18n=s.__i18n),r.__root=t,this===this.$root)this.$i18n=ZV(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=X0(r);const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=ZV(e,s);else{this.$i18n=X0({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}else this.$i18n=e;s.__i18nGlobal&&MV(t,s,s),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...r),this.$tc=(...r)=>this.$i18n.tc(...r),this.$te=(r,i)=>this.$i18n.te(r,i),this.$d=(...r)=>this.$i18n.d(...r),this.$n=(...r)=>this.$i18n.n(...r),this.$tm=r=>this.$i18n.tm(r),n.__setInstance(o,this.$i18n)},mounted(){if(ee.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const o=this.$i18n;this.$el.__VUE_I18N__=o.__composer;const s=this.__v_emitter=k0();o.__enableEmitter&&o.__enableEmitter(s),s.on("*",Ep)}},unmounted(){const o=oo();if(!o)throw ko(fn.UNEXPECTED_ERROR);const s=this.$i18n;ee.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Ep),delete this.__v_emitter),this.$i18n&&(s.__disableEmitter&&s.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(o),delete this.$i18n}}}function ZV(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[kV](t.pluralizationRules||e.pluralizationRules);const n=Oy(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o])),t.numberFormats&&Object.keys(t.numberFormats).forEach(o=>e.mergeNumberFormat(o,t.numberFormats[o])),e}const sue=Ii("global-vue-i18n");function rue(e={},t){const n=__VUE_I18N_LEGACY_API__&&on(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,o=on(e.globalInjection)?e.globalInjection:!0,s=__VUE_I18N_LEGACY_API__&&n?!!e.allowComposition:!0,r=new Map,[i,a]=iue(e,n),l=Ii(ee.env.NODE_ENV!=="production"?"vue-i18n":"");ee.env.NODE_ENV!=="production"&&n&&s&&Co(Is(jn.NOTICE_DROP_ALLOW_COMPOSITION));function u(h){return r.get(h)||null}function c(h,f){r.set(h,f)}function d(h){r.delete(h)}{const h={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},get allowComposition(){return s},async install(f,...p){if(ee.env.NODE_ENV!=="production"&&(f.__VUE_I18N__=h),f.__VUE_I18N_SYMBOL__=l,f.provide(f.__VUE_I18N_SYMBOL__,h),zt(p[0])){const w=p[0];h.__composerExtend=w.__composerExtend,h.__vueI18nExtend=w.__vueI18nExtend}let g=null;!n&&o&&(g=gue(f,h.global)),__VUE_I18N_FULL_INSTALL__&&Ule(f,h,...p),__VUE_I18N_LEGACY_API__&&n&&f.mixin(oue(a,a.__composer,h));const v=f.unmount;if(f.unmount=()=>{g&&g(),h.dispose(),v()},ee.env.NODE_ENV!=="production"){if(!await jle(f,h))throw ko(fn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const S=k0();if(n){const b=a;b.__enableEmitter&&b.__enableEmitter(S)}else{const b=a;b[Uu]&&b[Uu](S)}S.on("*",Ep)}},get global(){return a},dispose(){i.stop()},__instances:r,__getInstance:u,__setInstance:c,__deleteInstance:d};return h}}function n_(e={}){const t=oo();if(t==null)throw ko(fn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw ko(fn.NOT_INSTALLED);const n=aue(t),o=uue(n),s=OV(t),r=lue(e,s);if(__VUE_I18N_LEGACY_API__&&n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw ko(fn.NOT_AVAILABLE_IN_LEGACY_MODE);return fue(t,r,o,e)}if(r==="global")return MV(o,e,s),o;if(r==="parent"){let l=cue(n,t,e.__useComponent);return l==null&&(ee.env.NODE_ENV!=="production"&&Co(Is(jn.NOT_FOUND_PARENT_SCOPE)),l=o),l}const i=n;let a=i.__getInstance(t);if(a==null){const l=Ko({},e);"__i18n"in s&&(l.__i18n=s.__i18n),o&&(l.__root=o),a=Y0(l),i.__composerExtend&&(a[q0]=i.__composerExtend(a)),hue(i,t,a),i.__setInstance(t,a)}return a}function iue(e,t,n){const o=cC();{const s=__VUE_I18N_LEGACY_API__&&t?o.run(()=>X0(e)):o.run(()=>Y0(e));if(s==null)throw ko(fn.UNEXPECTED_ERROR);return[o,s]}}function aue(e){{const t=Dn(e.isCE?sue:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw ko(e.isCE?fn.NOT_INSTALLED_WITH_PROVIDE:fn.UNEXPECTED_ERROR);return t}}function lue(e,t){return _y(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function uue(e){return e.mode==="composition"?e.global:e.global.__composer}function cue(e,t,n=!1){let o=null;const s=t.root;let r=due(t,n);for(;r!=null;){const i=e;if(e.mode==="composition")o=i.__getInstance(r);else if(__VUE_I18N_LEGACY_API__){const a=i.__getInstance(r);a!=null&&(o=a.__composer,n&&o&&!o[FV]&&(o=null))}if(o!=null||s===r)break;r=r.parent}return o}function due(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function hue(e,t,n){let o=null;Xt(()=>{if(ee.env.NODE_ENV!=="production"&&t.vnode.el){t.vnode.el.__VUE_I18N__=n,o=k0();const s=n;s[Uu]&&s[Uu](o),o.on("*",Ep)}},t),nu(()=>{const s=n;ee.env.NODE_ENV!=="production"&&t.vnode.el&&t.vnode.el.__VUE_I18N__&&(o&&o.off("*",Ep),s[bp]&&s[bp](),delete t.vnode.el.__VUE_I18N__),e.__deleteInstance(t);const r=s[q0];r&&(r(),delete s[q0])},t)}function fue(e,t,n,o={}){const s=t==="local",r=xh(null);if(s&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw ko(fn.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const i=on(o.inheritLocale)?o.inheritLocale:!Ct(o.locale),a=$(!s||i?n.locale.value:Ct(o.locale)?o.locale:Od),l=$(!s||i?n.fallbackLocale.value:Ct(o.fallbackLocale)||Mn(o.fallbackLocale)||zt(o.fallbackLocale)||o.fallbackLocale===!1?o.fallbackLocale:a.value),u=$(Oy(a.value,o)),c=$(zt(o.datetimeFormats)?o.datetimeFormats:{[a.value]:{}}),d=$(zt(o.numberFormats)?o.numberFormats:{[a.value]:{}}),h=s?n.missingWarn:on(o.missingWarn)||El(o.missingWarn)?o.missingWarn:!0,f=s?n.fallbackWarn:on(o.fallbackWarn)||El(o.fallbackWarn)?o.fallbackWarn:!0,p=s?n.fallbackRoot:on(o.fallbackRoot)?o.fallbackRoot:!0,g=!!o.fallbackFormat,v=Pn(o.missing)?o.missing:null,w=Pn(o.postTranslation)?o.postTranslation:null,S=s?n.warnHtmlMessage:on(o.warnHtmlMessage)?o.warnHtmlMessage:!0,b=!!o.escapeParameter,y=s?n.modifiers:zt(o.modifiers)?o.modifiers:{},E=o.pluralRules||s&&n.pluralRules;function _(){return[a.value,l.value,u.value,c.value,d.value]}const I=X({get:()=>r.value?r.value.locale.value:a.value,set:J=>{r.value&&(r.value.locale.value=J),a.value=J}}),T=X({get:()=>r.value?r.value.fallbackLocale.value:l.value,set:J=>{r.value&&(r.value.fallbackLocale.value=J),l.value=J}}),F=X(()=>r.value?r.value.messages.value:u.value),L=X(()=>c.value),x=X(()=>d.value);function P(){return r.value?r.value.getPostTranslationHandler():w}function k(J){r.value&&r.value.setPostTranslationHandler(J)}function M(){return r.value?r.value.getMissingHandler():v}function N(J){r.value&&r.value.setMissingHandler(J)}function B(J){return _(),J()}function z(...J){return r.value?B(()=>Reflect.apply(r.value.t,null,[...J])):B(()=>"")}function oe(...J){return r.value?Reflect.apply(r.value.rt,null,[...J]):""}function ie(...J){return r.value?B(()=>Reflect.apply(r.value.d,null,[...J])):B(()=>"")}function te(...J){return r.value?B(()=>Reflect.apply(r.value.n,null,[...J])):B(()=>"")}function se(J){return r.value?r.value.tm(J):{}}function Z(J,ce){return r.value?r.value.te(J,ce):!1}function A(J){return r.value?r.value.getLocaleMessage(J):{}}function j(J,ce){r.value&&(r.value.setLocaleMessage(J,ce),u.value[J]=ce)}function ne(J,ce){r.value&&r.value.mergeLocaleMessage(J,ce)}function ge(J){return r.value?r.value.getDateTimeFormat(J):{}}function xe(J,ce){r.value&&(r.value.setDateTimeFormat(J,ce),c.value[J]=ce)}function ue(J,ce){r.value&&r.value.mergeDateTimeFormat(J,ce)}function K(J){return r.value?r.value.getNumberFormat(J):{}}function Y(J,ce){r.value&&(r.value.setNumberFormat(J,ce),d.value[J]=ce)}function re(J,ce){r.value&&r.value.mergeNumberFormat(J,ce)}const R={get id(){return r.value?r.value.id:-1},locale:I,fallbackLocale:T,messages:F,datetimeFormats:L,numberFormats:x,get inheritLocale(){return r.value?r.value.inheritLocale:i},set inheritLocale(J){r.value&&(r.value.inheritLocale=J)},get availableLocales(){return r.value?r.value.availableLocales:Object.keys(u.value)},get modifiers(){return r.value?r.value.modifiers:y},get pluralRules(){return r.value?r.value.pluralRules:E},get isGlobal(){return r.value?r.value.isGlobal:!1},get missingWarn(){return r.value?r.value.missingWarn:h},set missingWarn(J){r.value&&(r.value.missingWarn=J)},get fallbackWarn(){return r.value?r.value.fallbackWarn:f},set fallbackWarn(J){r.value&&(r.value.missingWarn=J)},get fallbackRoot(){return r.value?r.value.fallbackRoot:p},set fallbackRoot(J){r.value&&(r.value.fallbackRoot=J)},get fallbackFormat(){return r.value?r.value.fallbackFormat:g},set fallbackFormat(J){r.value&&(r.value.fallbackFormat=J)},get warnHtmlMessage(){return r.value?r.value.warnHtmlMessage:S},set warnHtmlMessage(J){r.value&&(r.value.warnHtmlMessage=J)},get escapeParameter(){return r.value?r.value.escapeParameter:b},set escapeParameter(J){r.value&&(r.value.escapeParameter=J)},t:z,getPostTranslationHandler:P,setPostTranslationHandler:k,getMissingHandler:M,setMissingHandler:N,rt:oe,d:ie,n:te,tm:se,te:Z,getLocaleMessage:A,setLocaleMessage:j,mergeLocaleMessage:ne,getDateTimeFormat:ge,setDateTimeFormat:xe,mergeDateTimeFormat:ue,getNumberFormat:K,setNumberFormat:Y,mergeNumberFormat:re};function G(J){J.locale.value=a.value,J.fallbackLocale.value=l.value,Object.keys(u.value).forEach(ce=>{J.mergeLocaleMessage(ce,u.value[ce])}),Object.keys(c.value).forEach(ce=>{J.mergeDateTimeFormat(ce,c.value[ce])}),Object.keys(d.value).forEach(ce=>{J.mergeNumberFormat(ce,d.value[ce])}),J.escapeParameter=b,J.fallbackFormat=g,J.fallbackRoot=p,J.fallbackWarn=f,J.missingWarn=h,J.warnHtmlMessage=S}return Bh(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw ko(fn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const J=r.value=e.proxy.$i18n.__composer;t==="global"?(a.value=J.locale.value,l.value=J.fallbackLocale.value,u.value=J.messages.value,c.value=J.datetimeFormats.value,d.value=J.numberFormats.value):s&&G(J)}),R}const pue=["locale","fallbackLocale","availableLocales"],JV=["t","rt","d","n","tm","te"];function gue(e,t){const n=Object.create(null);return pue.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r)throw ko(fn.UNEXPECTED_ERROR);const i=mn(r.value)?{get(){return r.value.value},set(a){r.value.value=a}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,s,i)}),e.config.globalProperties.$i18n=n,JV.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r||!r.value)throw ko(fn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,r)}),()=>{delete e.config.globalProperties.$i18n,JV.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}if(Fle(),__INTLIFY_JIT_COMPILATION__?oV(yle):oV(vle),lle(Gae),ule(QL),ee.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=Ra();e.__INTLIFY__=!0,Zae(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}ee.env.NODE_ENV;const QV={en:{}};function mue(e){const t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):null}async function vue(e,t=10,n=300){for(let o=0;o<t;o++){const s=mue(e);if(s)return s;await new Promise(r=>setTimeout(r,n))}return null}async function yue(){const e=await vue("account.tessr_i18n_file_version_url");if(!e)return{};const t=await fetch(e);if(!t.ok)throw new Error("Failed to load en-error.json");return await t.json()}async function wue(){const e=await yue();return{...QV,en:{...QV.en,errorMessages:e}}}async function Cue(){return rue({legacy:!1,locale:"en",fallbackLocale:"en",messages:await wue(),formatFallbackMessages:!0})}const bue=async()=>{const e=await Cue();return oQ(e.global),e},eB=32,Sue=Math.round(eB*16/9),Eue="arbo-thumbnails",_p="thumbnails";let Rp=null;const o_=new Map,s_=new Map;function tB(){return Rp||(Rp=new Promise((e,t)=>{const n=indexedDB.open(Eue,1);n.onupgradeneeded=()=>n.result.createObjectStore(_p),n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)}),Rp.catch(()=>Rp=null)),Rp}async function _ue(e,t){try{const n=await tB();return await new Promise((o,s)=>{const r=n.transaction(_p,"readonly").objectStore(_p).get(e);r.onsuccess=()=>{const i=r.result;o((i==null?void 0:i.url)===t&&i.blob instanceof Blob?i.blob:null)},r.onerror=()=>s(r.error)})}catch{return null}}async function Rue(e,t,n){try{const o=await tB();if(s_.get(e)!==t)return;await new Promise((s,r)=>{const i=o.transaction(_p,"readwrite");i.objectStore(_p).put({url:t,blob:n},e),i.oncomplete=()=>s(),i.onerror=()=>r(i.error)})}catch{}}function Tue(e){return new Promise(t=>{new xP(e,{width:Sue,height:eB,resize:"cover",quality:.8,success:t,error:()=>t(e)})})}function Due(e,t){s_.set(e,t);let n=o_.get(e);n||(n=new Map,o_.set(e,n));const o=n.get(t);if(o)return o;const s=(async()=>{const r=await _ue(e,t);if(r)return r;const i=await fetch(t);if(!i.ok)throw new Error(`Thumbnail request failed: ${i.status}`);const a=await Tue(await i.blob());return await Rue(e,t,a),a})().finally(()=>{n.delete(t),n.size===0&&(o_.delete(e),s_.delete(e))});return n.set(t,s),s}const Iue="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAPoAgMAAAAwzTx3AAAACVBMVEXz9fjX19fo6etc+oS8AAAINUlEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGD24EAAAAAAAMj/tRFUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVXYOWPjuGEgii45w4DKWQIDu4orAcEtB3Z0iWdUBpuAY4W2qnRACTgLiwVS/MUbJ7YV6AnEx1+Sp8FgMBgMBoPBYNDGy3sB+kD+3zfqnu9c4E4XM8v8oc554RKOLiYu0Pu6By7xoIuFCxzUNSsXOeliV344PRO4SP1L7tQxM9e9uMxJ/bJwEZ9STknCfglc5PGUBoBBN3OZW0w5yCt+bbDamBkw4/eGa5k1PPVKYG6osYibPWrpNRZxsyctvcaqYdgnK7fVWMCTfeeWGguZc1tzjYWr8aGpxiJG/MxNNVaHuqSxxiKebhOXeYoDxNNtba2xeC1eHdbTnkA82HdNKF0YiAf7Xt/BC6j6xhc/fv3++ufrsH5kXxO67jRbvZWEcpiFntVDPaOV0/tbz3UuVEvJpHS2uWf1ehVdtQ3ds3qofu+7FuOh4xJfP502rbds0OpqUd+R1ecY8ObUpzjMmFNf+OIOqu7qAe9A1X1DjbWnHlPOnHqqsaDqjkrMdlc9NRp76pvdmIvTC6i6oyIreKVpKLJsT53sji+pzmGqO2oo8ZjqnhpGN3vqcWC3p56qLKS6o8RfPk65ykKq+/8fqBzyLVlw9evyfhWrLLj65XJIVfaAVHdf/s4PqcpCqnttWEk5B62+8wdilYVWD3GFpSqLqO6yl6WcVGUR1X32stRdqrLI6jtHxCoLrL5x5BRy7gao7qJj5CZVWUB1H69sNec8rvrECS9VWRvqUsQzoLp7Wl21yuKp+/xF4EOssrDqOz8hjuz21GOVxVN3wodcTinn8NS9pC5WWVT1wE/cxJyzpx6rLJy6E9WlKgunLq+6VGXtqcecs6eeqiyaurjX5Rep0NSlVT9JrLKg6lu+6tmzCQvqp/wiFZq6q6pT/GcwdWVyy6osvvpR+swXpvqiqMeRHUxduTeXVVkwdeVmdD6yQ6pnjyDEKgupTpx4UCnnsNSVZ255lcVSVx4y5zmHqb5kZ5tQZTHVpyzgpYiHUo/RlVLO2qrTli1tPraCqi9pqxtLeJozv/wWFZa6E35PjbE297mjf1I54DHHl7jsb0Rka3L7XN1X5YNPHkzdUWJ+v9bc1l2ahJJy5tRn8DuyESXlQO/D/yPnjG0ch4EoahlQ4AJcgvpQCRNohLlMyfXBJpRfcslWuYGBAaRPcybl548WhpMHmp+PErmNzORvXxp5k79za+Qkf9N6zVDv179nYj9Vcc1QZ2m+Z2E/QXXNUOfmEi1Hh14d9aHOyMYtR3sy+pKxzsPHLceHbpHGDov+VPq7L981lrfmJGq5YRe3RYdVmrcqrcha+CXa7YuEBT/opvWlqoM+qphVlfYBlcUtx/pYUmKNHfJh9KflhnwF8dFY1gsgFrcc6+tGSWgs9wWQZsuRnqqwhMaSXgC5ov/8q7Uc6QkqueGUisZyXwDxj6zWcpynJe02yntNYzkvgMAol0rLcZ6MlvsoHxWN5b4A4p9YpeA5b0HYfbOyocZ6Vlb01+1XvQC6UKELbFYKaKxno0I3WMtW/wJkZ0U/r7+DSTGFFF1j9JUJXWAt27zwMcKEbt+PjpwKMU705T6h3wrZOdGddEWl8TChC25WxGcAZiVCN9ysWKPnDkb0CSe0YowRfVbPo9FzROjiKDihF8UQoVtlFT9aPUeIrp6myh586NV/EK8Y40GHRTxQ2Y0H3WrqVho9x4fuC1mksoUO/dRsz9GgC0hrtGWnQTcY30BlNzb0WT3Bll3Z0D8gKZUtLOgCwxtt2Q8WdKtOamtUvHChP1XzPceFDj/shsruLOgCBR+qbCFBt/oidjRUdqVCP9UTq6xQoasnobJGgi4wtuGWfSdBNyj4WGULEfqikLXVc0ToPrQ5lRUOdPE/8yprHOgGNR6r7M6DDiMbvH1SHnSosmjLvlKgC9LFKntQoBtoS6bnaNAVEqjsxoIO4xpu2ZUCXcBaMiq7MqAbFFmq50jQYVhjlTUS9FOrsVbPMaALoqHKYhjQDQo+pbKFAh1qLKOyBwU6kGUOUgkButQLPlLZjQDdoMVSB6l2BnQo+JzKFgJ0mMk5lT36Rxco+JzKSv/oBkOaU9mNAP1USEZldwJ0haRWN/3fPfofhaScRv92j+4JTBZDje77l+HQd//mcOhe8OOh47KO2R895sy23Ew36o4eKvxwo+5UJx06DGbmzRN+qce8ky038aGDo8VbVow9esyS1Vg+9DlAT9WhPHrMK1nwwazoMVNOY6dgVvSYZ1JjA+3pMlmNpfNY769QY+lkLgt18hmNL9iRxvIt6z6LA40lXNt+2bNjHARCIAqgExMLucfeyVh5qe0tzZ5SVxMaI2zomLxX0xDg8wl1Vp0am/BuezuSckvGgG8nWB2TMeAjlgPRnTLlmkXtmjrlmhfXPXON3a39x3rOox5x7v855Xusf52665l1v9dFHauxt5jZpVdjc+b7x9qpsUlDblfGa+wjJldGa+wzple2X3Va219TpzsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8GIPDgQAAAAAgPxfG0FVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVdqDQwIAAAAAQf9f+8IEAAAAAAAAwCmRg3Unf/8l+AAAAABJRU5ErkJggg==",xue="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAPoAgMAAAAwzTx3AAAACVBMVEXz9fjX19fk5OUH9i6SAAAGd0lEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGD24EAAAAAAAMj/tRFUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVXYuXvcCGEgDMODJQrScwSK3GKP4GI/ZKWiSZRjcAn326TZU0YRsOwPkcCuPN88Nxi9wRjwxhhjjDHGGLOPuyYZpXhvSHSRwjkkK737D5L1UrQGGQYpWYsMZymYwy4ar/YaWbyUK2IvbQudw27a/uIb7Kdsje+QKUipIsB6sSObFKpCtpOUqcFBeta5DgfpWedaHKVmGx9xlJolHodpWeIdEujYylZIoeLu1iCFirtbjRQqHtmJR++QQsWepsWk/0rwWfSeps3alUQFow+SpCl5OxezNiVOweiSqOTRMy/WtuBNfObdqbPRS0Q/updENe/o5VcPVt2qW3WK6sQrvN3XrbpVt+pWXWt14vu67easulXnqO5l9Y6Pkah6uJ8c6CmrO/wZGKtPGXvG6pgMNNX989GaQFM9rKPM+KpHzE5s1R0Wnq16g8WZpbpfI856lurh9YT4SFY94uZEVh2rgat6hZUnqb4x+pmkeng9IX7mql5j1XNV73CHq/rD6CTV/cZv3kaO6mFrdKvOUT3izomq+uPoHNU9b/Vg1a06e3W7r2uvbrs5xie3QP/kVmPVk1SfR29439IQv5ursApc1R3ve3jiry/S8n5z63Bj39dpqldYBLbqgsXAUt3L8zo3slQPTxXR852bc5h4vtOSt/9Tw1d9foIJjCejp+wj43l4cRH4pvwVhIi7XmTDdVRf/d+8H/qrb3IABpXV/Z7lLKis/sveHdtGDgNRGJYEbKACVIKSq4IlzAF8xIRKrg8mVwL7PSwM35jiCiC5kR73y+hs/Nvy2AZErXnDWBizOp7iiNVnPB0jVl/xJIzVpWpz8YzVteo9imHE6vgSx6u+4Isbr/qKL0JYXepeJ+4Jq2vlO7XHq45vcbTqC7650aqv+CZ81aXy0gTlq66VdyGF0aon/DdY9QXGjVV9hjnoqkvt1TBKV11rb3zzY1VPgBmq+oKf3EjVZ/x0sFWX6guwlK26Vl+A5UeqnpAZqTpycZzqM3IHWXWpv9xRyKpr/TV/nrr6r1iusYa5+gMh2glnkbh6dp5xdnBVl9MjPRRPOSNc1fUcMtrpzPNW3wDgsNNZ4K2efy5QiqzVFzx5OxUcVXU5b2/BTgWhqq5Fx2inM2Wtvmdf1RtKgbV6yhYXvMJaPfuqXvCKY6peLq7ennIFYaqu5eJqkxWUs/qeLS4bXgmc1bfsF7SElzirJ8A+tOA1R1Rdyv8yqT3zCgdRdS3/MhGsaUEZq9uwsKYFz1h9z76hEy4wVk/ZNzSuOJ7q8v9odJpx5eCpbpefGD89cEX5qufv39pxxfNVzzrHhEt81TfAOFyLNNXFHvDmN64dNNXtzWOVhK36jFqerfqKWoGt+o5qkaW6vT24lmOprnaoJFzVF9TzXNVX1Atc1R9oEEmqiyWs5Uiqq62xtYSqOlooU/UZLQJT9RVNSKqLjVHNcVRXW2OrCVH1hCbKU31Bm8BTfUYjjupiU9RzFNXVpqh30FRPaKQ01dHKs1Rf0Iyiutga2yAyVNfnEM0OkuobmglJ9YRmnqP6gg4M1WWa0SESVNdpRYeDovqODkJRfUMHT1EdPQJBdVnQJd6/uq7o4giqP9BFCKrv6OIJqid0CQTV0env7Uf/jU5/bj96v8/od/QZ/TN6pzDdUfqM/hm9j5/uaPuMPuDoO/A+ne7oAbxPpjsaePQVeN8x3dEMvM9Nd7QA74vTLaEHw28vfescxR7bt9NQbDR9Ow3FRtP3043iZ9s/9uvYCkAQCKKgj9D+TKzO2Cp9lsAasc60AHzuot+t429LEt8S+CDxLYEPOtdSufnO1VQuGGVLxtjgsbcMNMnKXrGsz974tvs+McZ39X2q8V19/xq6c1vb+OlLf+1H6NqWN+7I8mcOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADzswYEAAAAAAJD/ayOoqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkp7cEgAAAAAIOj/a1+YAAAAAAAAALgEoKO2OvzgJtMAAAAASUVORK5CYII=",Aue=["src"],Pue=["src"],kue=["src"],Fue=_t(ot({__name:"ThumbnailRender",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean}},setup(e){const t=e,n=X(()=>t.value),o=X(()=>t.id),s=X(()=>t.disabled),r=X(()=>t.readOnly),i=$("");let a=null;const l=$(!1),u=X(()=>n.value==null||n.value===""),c=X(()=>!u.value&&l.value),d=()=>{l.value=!0},h=()=>{a&&URL.revokeObjectURL(a),a=null},f=()=>{i.value="",h()},p=fd(),{openSceneHub:g}=p,v=X(()=>{const b=un.getInstance().getItem("ws.code"),y=un.getInstance().getItem("BASE_URL"),E=b||t.workspaceId;return es({type:"scene_hub",config:{baseDomain:y,ws_code:E,scene_id:String(t.id)}}).url}),w=b=>{try{if(b.ctrlKey||b.metaKey){window.open(v.value,"_blank");return}g(String(t.id))}catch{window.open(v.value,"_blank")}finally{S()}},S=()=>{var E,_,I,T,F,L;(E=t.params)==null||E.api.clearFocusedCell();const b=((I=(_=t.params)==null?void 0:_.column)==null?void 0:I.getColId())||"",y=((F=(T=t.params)==null?void 0:T.node)==null?void 0:F.rowIndex)||0;(L=t.params)==null||L.api.setFocusedCell(y,b)};return Qe(()=>[o.value,n.value],async([b,y],E,_)=>{let I=!0;if(_(()=>{I=!1,h()}),l.value=!1,i.value="",!(b==null||b===""||!y))try{const T=await Due(String(b),y);if(!I||b!==o.value||y!==n.value)return;a=URL.createObjectURL(T),i.value=a}catch(T){I&&b===o.value&&y===n.value&&(console.warn("Failed to load cached thumbnail; using the original URL.",T),i.value=y)}},{immediate:!0}),Vn(f),(b,y)=>(q(),de("div",{class:le(["thumbnail-wrapper",{disabled:s.value,"read-only":r.value}]),onClick:w},[u.value?(q(),de("img",{key:0,src:V(xue),alt:"No thumbnail"},null,8,Aue)):c.value?(q(),de("img",{key:1,src:V(Iue),alt:"Broken thumbnail"},null,8,Pue)):i.value?(q(),de("img",{key:2,src:i.value,alt:"Thumbnail",onError:d},null,40,kue)):Ye("",!0)],2))}}),[["__scopeId","data-v-1fd3dd73"]]),Oue={class:"left-section"},Mue={class:"create-count"},Nue={class:"modified-template-options"},Lue=["onClick"],Vue={class:"setting-count"},Bue={class:"field-label"},$ue={class:"field-label"},Hue={class:"status-selection"},Gue={class:"preview-section"},Uue={key:0,class:"preview-list"},Wue={key:0,class:"preview-more"},zue={key:1,style:{color:"var(--tessr-text-secondary, #6b6b6b)","align-items":"center",width:"100%","text-align":"center",display:"flex",flex:"1 1 0%"}},nB=1e3,oB=8,sB=7,jue=_t(ot({__name:"BulkCreateCount",props:{item:{},takeName:{},options:{default:()=>[{id:"number_up",name:"Number",icon:"ArrowLeft",description:{active:"Remove from the name",inactive:"Add a number that counts up",switch:"Switch to a number that counts up"}},{id:"number_down",name:"Number",icon:"ArrowRight",description:{active:"Remove from the name",inactive:"Add a number that counts down",switch:"Switch to a number that counts down"}},{id:"letter_up",name:"Letter",icon:"ArrowLeft",description:{active:"Remove from the name",inactive:"Add a letter that counts up",switch:"Switch to a letter that counts up"}},{id:"letter_down",name:"Letter",icon:"ArrowRight",description:{active:"Remove from the name",inactive:"Add a letter that counts down",switch:"Switch to a letter that counts down"}}]},getStatusFunc:{},workspaceId:{},entityId:{}},emits:["cancel","changed"],setup(e,{expose:t,emit:n}){const o=Kt,s=Io,r=$(null),i=$(null),a=["number","letter","name"],l={number_up:"1→9",number_down:"9→1",letter_up:"A→Z",letter_down:"Z→A",name:"Name"},u=$(null),c=$({}),d=(Y,re)=>{c.value[Y]=re instanceof HTMLElement?re:null},h=$(null),f=$("1"),p=e,g=$([p.takeName,{id:"number",text:"1→9",direction:"up"}," "]),v=X(()=>{const Y=w.value;let re=1;const R="9999.",G={createCount:`${R}0`,input:`${R}1`,firstField:`${R}5`,stepField:`${R}6`,number_up:`${R}1`,number_down:`${R}2`,letter_up:`${R}3`,letter_down:`${R}4`,statusSelect:`${R}7`};return["number_up","number_down","letter_up","letter_down"].forEach((ce,Ee)=>{re++,G[ce]=`${R}${re}`}),Y?(re++,G.statusSelect=`${R}${re}`,re++,G.firstField=`${R}${re}`,re++,G.stepField=`${R}${re}`):(delete G.firstField,delete G.stepField),G}),w=X(()=>g.value.find(Y=>typeof Y!="string"&&(Y.id==="number"||Y.id==="letter"))),S=$("number"),b=$("up"),y=Fo({...Ei.number}),E=Fo({...Ei.number}),_=()=>{Object.assign(y,Ei[S.value]),Object.assign(E,Ei[S.value])};Qe(w,Y=>{if(!Y)return;const re=Y.id;re!==S.value&&(S.value=re,_()),b.value=Y.direction==="down"?"down":"up"},{immediate:!0,flush:"sync"});const I=X(()=>YO[b.value]),T=X(()=>{const Y=Number(f.value);return Number.isFinite(Y)?Math.min(nB,Math.max(0,Math.floor(Y))):0}),F=(Y,re)=>{const R=JO(S.value,Y,re);y[Y]=R,Mv(Y,R)&&(E[Y]=R)},L=$(null),x=$(null),P=$(null),k=(Y,re)=>{var G,J,ce,Ee;if(re.key==="Enter"||re.key==="Escape")return;if(re.key==="Tab"){re.preventDefault(),re.stopPropagation(),re.stopImmediatePropagation();const Ce=re.shiftKey;Y=="first"&&(Ce?(G=c.value.letter_down)==null||G.focus():(J=L.value)==null||J.focus()),Y=="step"&&(Ce?(ce=L.value)==null||ce.focus():(Ee=i.value)==null||Ee.focus());return}re.key.length===1&&!re.ctrlKey&&!re.metaKey&&!re.altKey&&!ZO(S.value,Y,re.key)&&re.preventDefault()},M=(Y,re)=>{var Ee;re.preventDefault();const R=re.target,G=((Ee=re.clipboardData)==null?void 0:Ee.getData("text/plain"))??"",J=R.selectionStart??R.value.length,ce=R.selectionEnd??R.value.length;R.value=R.value.slice(0,J)+G+R.value.slice(ce),F(Y,R.value),R.value=y[Y]},N=Y=>{if(Mv(Y,y[Y]))return;const re=Ei[S.value][Y];y[Y]=re,E[Y]=re},B=X(()=>w.value?CE({type:S.value,direction:b.value,first:E.first,step:E.step,count:T.value}):[]),z=X(()=>g.value.every(Y=>typeof Y=="string"&&!Y)),oe=X(()=>T.value===0||z.value?[]:Array.from({length:T.value}).map((Y,re)=>g.value.map(R=>typeof R=="string"?R:R.id==="name"?p.takeName:B.value[re]??"").join(""))),ie=X(()=>oe.value.length>oB?oe.value.length-sB:0),te=X(()=>oe.value.length>oB?oe.value.slice(0,sB):oe.value),se=Y=>{A.value=[Y];const re=Y.id.split("_")[0],R=Y.id.split("_")[1],G=l[Y.id],J=r.value;if(!J)return;const ce=Ce=>g.value.find(Ne=>typeof Ne!="string"&&Ce.includes(Ne.id));if(re==="name"){ce(["name"])?J.deleteTag("name"):J.insertTag({id:re,text:G,direction:void 0});return}const Ee=ce(["number","letter"]);if(Ee){const Ce=Ee.id===re,Ne=Ee.direction===R;if(Ce&&Ne){J.deleteTag(Ee.id);return}J.deleteTag(Ee.id),J.insertTag({id:re,text:G,direction:R})}else J.insertTag({id:re,text:G,direction:R})},Z=Y=>j(Y.id)?Y.description.active:!!w.value&&Y.description.switch?Y.description.switch:Y.description.inactive,A=$(null),j=Y=>{const[re,R]=Y.split("_");return g.value.some(G=>typeof G!="string"&&G.id===re&&G.direction===R)},ne=n,ge=X(()=>{const[Y]=g.value;return g.value.length===1&&typeof Y!="string"&&Y.id==="name"});X(()=>g.value.length===0||ge.value);const xe=()=>{const Y=g.value.map(re=>typeof re=="string"?{type:"text",value:re}:re.id==="name"?{type:"current_name"}:{type:"counter",value:y.first,direction:re.direction=="up"?"asc":"desc",format:re.id==="number"?"number":"letter",step:y.step});ne("changed",{data:Y,count:T.value,template_flow_status_id:u.value||void 0})};Qe([g,f,y,u],()=>{xe()},{deep:!0,immediate:!0}),t({reset:()=>{A.value=null,g.value=[]},focus:()=>{var Y;(Y=i.value)==null||Y.focus()}}),Xt(()=>{var Y;(Y=i.value)==null||Y.focus()});const K=Y=>{var re,R;Y.preventDefault(),Y.stopPropagation(),(re=i.value)==null||re.blur(),(R=h.value)==null||R.focus()};return(Y,re)=>(q(),de("div",{class:"bulk-rename-core",ref_key:"popupRef",ref:h,tabindex:"-1"},[Se("div",Oue,[Se("div",Mue,[re[11]||(re[11]=Se("span",null,"How many to create?",-1)),ze(ye(V(hl),{modelValue:f.value,"onUpdate:modelValue":re[0]||(re[0]=R=>f.value=R),type:"number","max-value":nB,"max-decimal-char":0,"show-clear":!1,ref_key:"counterRef",ref:i,placeholder:""},null,8,["modelValue"]),[[V(s),v.value.createCount]])]),ze(ye(VN,{modelValue:g.value,"onUpdate:modelValue":re[1]||(re[1]=R=>g.value=R),"allowed-tags":a,ref_key:"templateInputRef",ref:r,placeholder:"Enter name",onEscape:K},null,8,["modelValue"]),[[V(s),v.value.input]]),Se("div",Nue,[(q(!0),de(Pt,null,xn(e.options,R=>ze((q(),de("button",{onClick:G=>se(R),ref_for:!0,ref:G=>d(R.id,G),key:R.id,class:le([{active:j(R.id)},"template-option"])},[tt(at(R.name)+" ",1),R.icon?(q(),je(V(gt),{key:0,src:R.icon,style:{transform:"rotate(90deg)"}},null,8,["src"])):Ye("",!0)],10,Lue)),[[V(o),{content:Z(R),bypassOverflowCheck:!0,delay:[300,0],interactive:!1,hideOnClick:!1,appendTo:"parent"}],[V(s),`${v.value[R.id]}`]])),128))]),Se("div",Vue,[Se("span",Bue,at(I.value.first),1),ze((q(),je(V(hl),{ref_key:"firstFieldRef",ref:x,"model-value":y.first,disabled:!w.value,"max-length":V(yE),onInput:re[2]||(re[2]=R=>F("first",R)),onKeydown:re[3]||(re[3]=R=>k("first",R)),onPaste:re[4]||(re[4]=R=>M("first",R)),onBlur:re[5]||(re[5]=R=>N("first")),"show-clear":!1},{clear:we(()=>[...re[12]||(re[12]=[Se("div",null,null,-1)])]),_:1},8,["model-value","disabled","max-length"])),[[V(s),v.value.firstField]]),Se("span",$ue,at(I.value.step),1),ze(ye(V(hl),{"model-value":y.step,disabled:!w.value,"max-length":V(wE),onInput:re[6]||(re[6]=R=>F("step",R)),onKeydown:re[7]||(re[7]=R=>k("step",R)),onPaste:re[8]||(re[8]=R=>M("step",R)),onBlur:re[9]||(re[9]=R=>N("step")),"show-clear":!1,ref_key:"fieldStepRef",ref:L},null,8,["model-value","disabled","max-length"]),[[V(s),v.value.stepField]])]),Se("div",Hue,[re[13]||(re[13]=Se("span",null,"Status",-1)),ye(V(wL),{modelValue:u.value,"onUpdate:modelValue":re[10]||(re[10]=R=>u.value=R),"get-status-func":p.getStatusFunc,"workspace-id":p.workspaceId,id:p.entityId,style:{width:"100%"},"max-width":"372px",ref_key:"selectStatusRef",ref:P,"focus-index":v.value.statusSelect},null,8,["modelValue","get-status-func","workspace-id","id","focus-index"])])]),Se("div",Gue,[re[14]||(re[14]=Se("span",{class:"preview-title"},"Preview",-1)),te.value.length>0?(q(),de("ul",Uue,[(q(!0),de(Pt,null,xn(te.value,(R,G)=>(q(),de("li",{key:G},[ye($N,{text:R},null,8,["text"])]))),128)),ie.value>0?(q(),de("li",Wue," … "+at(ie.value)+" more ",1)):Ye("",!0)])):(q(),de("div",zue," Add a name or a counter to see a preview. "))])],512))}}),[["__scopeId","data-v-2591552a"]]),rB={text:yl,id:void 0,assignees:Mse,status:KN,dateRange:Nse,isStarted:yl,isCompleted:yl,lastUpdated:yl,completedOn:yl,isDeleted:yl,isArchived:yl,isProcessing:yl,name:GN,options:CQ,metric:zN,__checkboxSelection:void 0,description:Vie,thumbnail:Fue},Kue={text:!1,id:!1,assignees:!0,status:!0,dateRange:!0,isStarted:!1,isCompleted:!1,lastUpdated:!1,completedOn:!1,isDeleted:!1,isArchived:!1,isProcessing:!1,name:!1,options:!0,metric:!1,__checkboxSelection:!1,description:!1,thumbnail:!1},que={text:null,id:void 0,assignees:oM,status:NN,dateRange:Lse,isStarted:void 0,isCompleted:void 0,lastUpdated:void 0,completedOn:void 0,isDeleted:void 0,isArchived:void 0,isProcessing:void 0,name:GN,options:UN,metric:void 0,__checkboxSelection:void 0,description:void 0,thumbnail:void 0},Yue={id:[100,100],assignees:[200,200],status:[200,200],dateRange:[255,255],isStarted:[150,150],isCompleted:[150,150],lastUpdated:[180,180],completedOn:[180,180],isDeleted:[void 0,void 0],isArchived:[void 0,void 0],isProcessing:[void 0,void 0],name:[350,500],options:[50,50],metric:[200,300],__checkboxSelection:[50,50],text:[200,300],description:[200,300],thumbnail:[82,82]},Xue={dateRange:{cellEditorPopupPosition:"under",cellEditorPopup:!1},name:{cellEditorPopupPosition:"over",cellEditor:!1,cellEditorPopup:!1},metric:{suppressKeyboardEvent:void 0,suppressNavigable:!1,suppressMovable:!1,cellClass:"ag-cell-optimized",editable:!0}},Zue=e=>{var t,n,o;if(e){if(Number((t=e.metric_type)==null?void 0:t.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number((n=e.metric_type)==null?void 0:n.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number((o=e.metric_type)==null?void 0:o.id)==3)return}},Ld=e=>{if(e)return Zue(e)};function iB(e,t){var s,r,i,a;const n=(s=t==null?void 0:t.data)==null?void 0:s.permissions;let o={disabled:!1,readOnly:!1,type:void 0};if(!t||!e)o={disabled:!1,readOnly:!0,type:void 0};else if(e==="options")o={disabled:!1,readOnly:!1,type:void 0};else if(e!=null&&e.includes("metric")){const l=`metric_permission_${e==null?void 0:e.replace("metric_","")}`;o={disabled:!1,readOnly:!((t==null?void 0:t.data)&&t.data[l]&&((r=t.data[l])==null?void 0:r.permission)==2&&!((i=t.colDef)!=null&&i.context.formula)&&!t.data.isLocked&&!t.data.isDeleted),type:Ld((a=t.colDef)==null?void 0:a.context)}}else{const u={assignees:(n==null?void 0:n.has_update_assignee_permission)??0,completedOn:0,name:(n==null?void 0:n.has_edit_permission)??0,permissions:0,status:(n==null?void 0:n.has_edit_template_flow_status_permission)??0,dateRange:(n==null?void 0:n.has_edit_date_permission)??0,isStarted:0,isDeleted:0,isArchived:0,isLocked:0,isProcessing:0,lastUpdated:0,id:0,isCompleted:0,options:1,disabled:0,description:(n==null?void 0:n.has_edit_permission)??0,thumbnail:1}[e]??0;o={disabled:u===-1,readOnly:u!==1,type:void 0}}return o}class r_{constructor(){Rn(this,"eGui");Rn(this,"params")}init(t){this.params=t}getGui(){var n,o,s,r,i;const t=document.createElement("div");return(n=this.params)!=null&&n.height&&t.style.setProperty("--height",(o=this.params)==null?void 0:o.height),(s=this.params)!=null&&s.width?t.style.setProperty("--width",(r=this.params)==null?void 0:r.width):(i=this.params)!=null&&i.fullwidth?t.style.setProperty("--width","100%"):t.style.setProperty("--width",`${Math.floor(Math.random()*50)+50}%`),t.className="ag-cell-skeleton",t.addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation()}),this.eGui=t,t}refresh(t){return!1}getValue(){var t;return(t=this.params)==null?void 0:t.value}isPopup(t){return!1}getPopupPosition(){}destroy(){}}const aB=new Map;class Tp{static initialize(t){this.wrappers=t}static getWrappers(){if(!this.wrappers)throw new Error("CellRendererFactory: Not initialized. Please call CellRendererFactory.initialize() first.");return this.wrappers}static buildCommonCellParams(t,n){var u,c,d;const o=t.data||((u=t.node)==null?void 0:u.data),s=(c=t.colDef)==null?void 0:c.field,r=s&&o?o[s]:void 0,i=iB((d=t.colDef)==null?void 0:d.field,t),a=typeof n=="function"?n(t):n??{};return{...t,value:r,disabled:i==null?void 0:i.disabled,readOnly:i==null?void 0:i.readOnly,type:Ld(t.context),...a}}static resolveRendererComponent(t,n){let o;return t.includes("metric")&&rB.metric?Ld(n)==="rating"?o=kie:o=zN:o=rB[t]??void 0,o}static resolveEditorComponent(t,n){const o=t.includes("metric");let s;const r=Ld(n);return o&&["number","dropdown"].includes(r)?s=Wre:s=que[t],s}static canEditField(t,n){var r;if(n.data===void 0)return!1;const o=iB((r=n.colDef)==null?void 0:r.field,n),s=Kue[t]??!0;return!(o!=null&&o.disabled)&&!(o!=null&&o.readOnly)&&s&&(o==null?void 0:o.type)!=="rating"}static resolveSize(t){const[n=250,o=300]=Yue[t]??[];return{minWidth:n,maxWidth:o}}static buildHeaderComponentParams(t){return n=>typeof t=="function"?t(n):t??{}}static fromType(t){const{wrapVueCellEditor:n}=this.getWrappers(),o=String(t.field??""),s=this.resolveSize(o),r=Xue[o]??{},i=Ld(t.context),a=i==="number"||i==="rating",l=i=="rating"?t.context.range*24+20:s.minWidth;return{...t,headerName:t.headerName,...s,...t,cellEditorSelector:c=>{const d=this.resolveEditorComponent(o,t.context);return{component:n(d),params:this.buildCommonCellParams(c,t.cellRendererParams),popup:!a}},singleClickEdit:!0,cellEditorPopup:!a,cellEditorPopupPosition:a?void 0:"under",editable:c=>{let d;return c.data===void 0||c.data.isDeleted||c.node.data===void 0?d=!1:d=this.canEditField(o,c),d},minWidth:l,cellRendererSelector:c=>Jue(c,{component:n(this.resolveRendererComponent(o,t.context)),params:this.buildCommonCellParams(c,t.cellRendererParams)}),headerComponentParams:this.buildHeaderComponentParams(t.headerComponentParams),...r,cellClass:c=>`${i}--${c.colDef.field}`}}}Rn(Tp,"wrappers",null);const Jue=(e,t)=>{var s;const n=(s=e.colDef)==null?void 0:s.field,o=`${n}-${e.node.rowIndex}`;return aB.set(o,(aB.get(o)??0)+1),n!=null&&n.includes("metric")?e.value===void 0?{component:r_,params:{fullwidth:!1}}:t:e.data&&(n!=null&&n.includes("thumbnail"))||e.data&&e.value!==void 0?t:!n||n==="options"||n==="__checkboxSelection"?e.data?t:{component:r_,params:{fullwidth:!0,width:"24px",height:"24px"}}:!e.data||e.value===void 0?{component:r_,params:{fullwidth:!1}}:t},Que=_t(ot({__name:"Vue3Wrapper",props:{component:{},params:{},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!0},value:{},data:{},id:{},tooltip:{},isNoData:{type:Boolean,default:!1},workspaceId:{},entityId:{},axiosService:{},isSearching:{type:Boolean,default:!1},isFiltering:{type:Boolean,default:!1},sortType:{default:"default"},maxRating:{default:5},config:{}},setup(e,{expose:t}){const n=e,o=$(null),s=X(()=>{var a;return((a=n.component)==null?void 0:a.name)||"UnknownComponent"}),r=X(()=>{var a;return((a=n.component)==null?void 0:a.default)||n.component}),i=X(()=>({params:n.params,disabled:n.disabled,readOnly:n.readOnly,value:n.value,maxRating:n.maxRating,data:n.data,id:n.id,workspaceId:n.workspaceId,entityId:n.entityId,axiosService:n.axiosService,tooltip:n.tooltip,isSearching:n.isSearching,isFiltering:n.isFiltering,isNoData:n.isNoData,config:n.config}));return t({focus:()=>{var a;return(a=o.value)!=null&&a.focus?o.value.focus():console.warn(`Component ${s.value} does not have a focus method.`),!0},blur:()=>{var a,l;return(l=(a=o.value)==null?void 0:a.blur)==null||l.call(a),!0},trigger:(a,l)=>{var u;return(u=o.value)==null||u.$emit(a,l),!0}}),(a,l)=>(q(),je(OC(r.value),jt(i.value,{ref_key:"componentRef",ref:o}),null,16))}}),[["__cssModules",{$style:{skeleton:"_skeleton_7xde7_1",shimmer:"_shimmer_7xde7_16","skeleton-loading":"_skeleton-loading_7xde7_1"}}]]);function ece(e){return"stopEditing"in e}const tce=8,nce=e=>{if(!e)return;const t=e.__vueParentComponent,n=t==null?void 0:t.exposed;n&&typeof n.triggerFocus=="function"?n.triggerFocus():e.focus()};function lB(e){return class{constructor(){Rn(this,"container");Rn(this,"vNode",null);Rn(this,"componentInstance",null);Rn(this,"componsenExposed",null);Rn(this,"params");Rn(this,"isEditor",!1);Rn(this,"_destroyed",!1)}init(n){var l,u,c,d;if(!n){console.error("[Vue3CellWrapper] Missing params");return}const o=performance.now();this.params=n,this.isEditor=ece(n),this.container=document.createElement("div"),this.container.classList.add("ag-vue3-cell-wrapper"),this.container.style.width="100%",this.container.style.height="100%";const s=n.context.apiClass,r=n,i={component:e,params:Object.freeze(n),disabled:!1,readOnly:r.readOnly??!1,value:n.value,maxRating:r.maxRating??void 0,data:n.data,id:(l=n==null?void 0:n.data)==null?void 0:l.id,workspaceId:n.context.workspaceId,entityId:n.context.entityId,axiosService:s,tooltip:r.tooltip??void 0,isSearching:r.isSearching??!1,isFiltering:r.isFiltering??!1,isNoData:r.isNoData??!1,config:r.config,sceneId:(r==null?void 0:r.sceneId)||void 0};this.vNode=ye(Que,i),rb(this.vNode,this.container);const a=performance.now()-o;a>tce&&console.warn(`[Vue3CellWrapper] Slow render (${a.toFixed(1)}ms) for "${(u=n.colDef)==null?void 0:u.field}"`),this.componentInstance=(c=this.vNode.component)==null?void 0:c.proxy,this.componsenExposed=(d=this.vNode.component)==null?void 0:d.exposed}getGui(){return this.container}refresh(n){return!1}focusUi(){var n;(n=this.componsenExposed)!=null&&n.focus?this.componsenExposed.focus():nce(this.container)}getValue(){var n,o,s;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((s=(o=this.componentInstance).getValue)==null?void 0:s.call(o))??this.componentInstance.value:(console.warn("[Vue3CellWrapper] getValue() called but component instance not available"),(n=this.params)==null?void 0:n.value)}isPopup(n){var i,a,l,u,c;const o=(l=(a=(i=this.params)==null?void 0:i.colDef)==null?void 0:a.field)==null?void 0:l.includes("metric"),s=((u=this.params)==null?void 0:u.context)&&Ld(this.params.context);return o||(s==="number"||s==="rating")||!this.isEditor?!1:(c=this.componentInstance)!=null&&c.isPopup?this.componentInstance.isPopup():!0}getPopupPosition(){var o,s,r;return this.isEditor?(o=this.componentInstance)!=null&&o.getPopupPosition?this.componentInstance.getPopupPosition():((r=(s=this.params)==null?void 0:s.colDef)==null?void 0:r.cellEditorPopupPosition)??"under":void 0}afterGuiAttached(){!this.isEditor||this.componentInstance}destroy(){if(!this._destroyed&&(this._destroyed=!0,!!this.container))try{const n=this.componentInstance;if(n){try{typeof n.$destroy=="function"&&n.$destroy()}catch(s){console.warn("[Vue3CellWrapper] Error during $destroy:",s)}try{typeof n.destroy=="function"&&n.destroy()}catch(s){console.warn("[Vue3CellWrapper] Error during destroy():",s)}}(typeof queueMicrotask=="function"?queueMicrotask:s=>Promise.resolve().then(s))(()=>{try{rb(null,this.container)}catch(s){console.warn("[Vue3CellWrapper] Error during unmount:",s)}finally{this.container.textContent=""}})}catch(n){console.error("[Vue3CellWrapper] Error during cleanup:",n)}finally{this.vNode=null,this.componentInstance=null}}}}function My(e){return lB(e)}function uB(e){return lB(e)}var Wu=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,n){const o=t?this.allAsyncListeners:this.allSyncListeners;let s=o.get(e);return!s&&n&&(s=new Set,o.set(e,s)),s}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,n=!1){this.getListeners(e,n,!0).add(t)}removeEventListener(e,t,n=!1){const o=this.getListeners(e,n,!1);o&&(o.delete(t),o.size===0&&(n?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const n=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:o}=this,s=a=>{const l=o?()=>o.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},r=this.getListeners(n,t,!1);if(((r==null?void 0:r.size)??0)>0){const a=new Set(r);for(const l of a)r!=null&&r.has(l)&&s(()=>l(e))}const i=this.getGlobalListeners(t);if(i.size>0){const a=new Set(i);for(const l of a)s(()=>l(n,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}};function Ia(e){return e==null||e===""?null:e}function ft(e){return e!=null&&e!==""}function Gn(e){return!ft(e)}function i_(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Dp(e,t){const n=e?JSON.stringify(e):null,o=t?JSON.stringify(t):null;return n===o}function oce(e,t,n=!1){const o=e==null,s=t==null;if(e!=null&&e.toNumber&&(e=e.toNumber()),t!=null&&t.toNumber&&(t=t.toNumber()),o&&s)return 0;if(o)return-1;if(s)return 1;function r(i,a){return i>a?1:i<a?-1:0}if(typeof e!="string"||!n)return r(e,t);try{return e.localeCompare(t)}catch{return r(e,t)}}var sce=/[&<>"']/g,rce={"&":"&","<":"<",">":">",'"':""","'":"'"};function Vd(e){return(e==null?void 0:e.toString().toString())??null}function Ip(e){var t;return((t=Vd(e))==null?void 0:t.replace(sce,n=>rce[n]))??null}function Ai(e){return e.eRootDiv.getRootNode()}function Kn(e){return Ai(e).activeElement}function $o(e){const{gos:t,eRootDiv:n}=e;let o=null;const s=t.get("getDocument");return s&&ft(s)?o=s():n&&(o=n.ownerDocument),o&&ft(o)?o:document}function cB(e){const t=Kn(e);return t===null||t===$o(e).body}function dB(e){return $o(e).defaultView||window}function a_(e){let t=null,n=null;try{t=$o(e).fullscreenElement}catch{}finally{t||(t=Ai(e));const o=t.querySelector("body");o?n=o:t instanceof ShadowRoot?n=t:t instanceof Document?n=t==null?void 0:t.documentElement:n=t}return n}function ice(e){const t=a_(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function ace(e){const t=a_(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function Qr(e,t,n){n==null||typeof n=="string"&&n==""?hB(e,t):Ir(e,t,n)}function Ir(e,t,n){e.setAttribute(fB(t),n.toString())}function hB(e,t){e.removeAttribute(fB(t))}function fB(e){return`aria-${e}`}function Dl(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function lce(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function uce(e){return e.getAttribute("aria-label")}function Bd(e,t){Qr(e,"label",t)}function xp(e,t){Qr(e,"labelledby",t)}function pB(e,t){Qr(e,"live",t)}function cce(e,t){Qr(e,"atomic",t)}function dce(e,t){Qr(e,"relevant",t)}function hce(e,t){Qr(e,"invalid",t)}function fce(e,t){Qr(e,"disabled",t)}function gB(e,t){Qr(e,"hidden",t)}function l_(e,t){Ir(e,"expanded",t)}function pce(e,t){Ir(e,"setsize",t)}function gce(e,t){Ir(e,"posinset",t)}function mce(e,t){Ir(e,"multiselectable",t)}function vce(e,t){Ir(e,"rowcount",t)}function Ny(e,t){Ir(e,"rowindex",t)}function yce(e,t){Ir(e,"rowspan",t)}function wce(e,t){Ir(e,"colcount",t)}function mB(e,t){Ir(e,"colindex",t)}function Cce(e,t){Ir(e,"colspan",t)}function bce(e,t){Ir(e,"sort",t)}function Sce(e){hB(e,"sort")}function vB(e,t){Qr(e,"selected",t)}function Ece(e,t){Qr(e,"controls",t)}function _ce(e,t){Ece(e,t.id),xp(t,e.id)}function yB(e,t){Qr(e,"owns",t)}function Ly(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Rce="[tabindex], input, select, button, textarea, [href]",wB="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Ap(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(wB)?!1:Pi(e)}function Un(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-hidden",!t),o||gB(e,!t)}function Tce(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-invisible",!t),o||gB(e,!t)}function Pp(e,t){const n="disabled",o=t?r=>r.setAttribute(n,""):r=>r.removeAttribute(n);o(e);const s=e.querySelectorAll("input")??[];for(const r of s)o(r)}function zu(e,t,n){let o=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof n=="number"){if(++o>n)break}else if(e===n)break}return!1}function ju(e){const{height:t,width:n,borderTopWidth:o,borderRightWidth:s,borderBottomWidth:r,borderLeftWidth:i,paddingTop:a,paddingRight:l,paddingBottom:u,paddingLeft:c,marginTop:d,marginRight:h,marginBottom:f,marginLeft:p,boxSizing:g}=window.getComputedStyle(e),v=Number.parseFloat;return{height:v(t||"0"),width:v(n||"0"),borderTopWidth:v(o||"0"),borderRightWidth:v(s||"0"),borderBottomWidth:v(r||"0"),borderLeftWidth:v(i||"0"),paddingTop:v(a||"0"),paddingRight:v(l||"0"),paddingBottom:v(u||"0"),paddingLeft:v(c||"0"),marginTop:v(d||"0"),marginRight:v(h||"0"),marginBottom:v(f||"0"),marginLeft:v(p||"0"),boxSizing:g}}function u_(e){const t=ju(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function kp(e){const t=ju(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function CB(e){const{height:t,marginBottom:n,marginTop:o}=ju(e);return Math.floor(t+n+o)}function Vy(e){const{width:t,marginLeft:n,marginRight:o}=ju(e);return Math.floor(t+n+o)}function bB(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:o,borderRightWidth:s,borderBottomWidth:r}=ju(e);return{top:t.top+(n||0),left:t.left+(o||0),right:t.right+(s||0),bottom:t.bottom+(r||0)}}function By(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function $y(e,t,n){n&&(t*=-1),e.scrollLeft=t}function qo(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function ei(e){e!=null&&e.parentNode&&e.remove()}function SB(e){return!!e.offsetParent}function Pi(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!SB(e)||window.getComputedStyle(e).visibility!=="visible")}function c_(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function EB(e,t,n){n&&n.nextSibling===t||(e.firstChild?n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function _B(e,t){for(let n=0;n<t.length;n++){const o=t[n],s=e.children[n];s!==o&&e.insertBefore(o,s)}}function Dce(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Fp(e,t){if(t)for(const n of Object.keys(t)){const o=t[n];if(!(n!=null&&n.length)||o==null)continue;const s=Dce(n),r=o.toString(),i=r.replace(/\s*!important/g,""),a=i.length!=r.length?"important":void 0;e.style.setProperty(s,i,a)}}function Hy(e){return()=>{const t=e();return t?d_(t)||RB(t):!0}}function d_(e){return e.clientWidth<e.scrollWidth}function RB(e){return e.clientHeight<e.scrollHeight}function Gy(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):ki(e,t)}function ki(e,t){t=h_(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Op(e,t){t=h_(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function h_(e){return typeof e=="number"?`${e}px`:e}function f_(e){return e instanceof Node||e instanceof HTMLElement}function Js(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function Il(e,t,n){const s=dB(e).ResizeObserver,r=s?new s(n):null;return r==null||r.observe(t),()=>r==null?void 0:r.disconnect()}function xa(e,t){const n=dB(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var TB="data-ref",p_;function DB(){return p_??(p_=document.createTextNode(" ")),p_.cloneNode()}function Mp(e){const{attrs:t,children:n,cls:o,ref:s,role:r,tag:i}=e,a=document.createElement(i);if(o&&(a.className=o),s&&a.setAttribute(TB,s),r&&a.setAttribute("role",r),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(n)if(typeof n=="string")a.textContent=n;else{let l=!0;for(const u of n)u&&(typeof u=="string"?(a.appendChild(document.createTextNode(u)),l=!1):typeof u=="function"?a.appendChild(u()):(l&&(a.appendChild(DB()),l=!1),a.append(Mp(u)),a.appendChild(DB())))}return a}var Ice=["touchstart","touchend","touchmove","touchcancel","scroll"],xce=["wheel"],g_={},IB=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof g_[n]=="boolean")return g_[n];const o=document.createElement(e[n]||"div");return n="on"+n,g_[n]=n in o}})();function Ace(e,t){return!t||!e?!1:kce(t).indexOf(e)>=0}function Pce(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function kce(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Pce(t)}function Fce(e,t,n){const o=Oce(t);let s;o!=null&&(s={passive:o}),e.addEventListener(t,n,s)}var Oce=e=>{const t=Ice.includes(e),n=xce.includes(e);if(t)return!0;if(n)return!1};function xB(e,t,n){if(n===0)return!1;const o=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(o,s)<=n}var Np=(e,t)=>{const n=e.identifier;for(let o=0,s=t.length;o<s;++o){const r=t[o];if(r.identifier===n)return r}return null};function Lp(e,t){return e.gos.isElementInThisInstance(t.target)}function Mce(e,t,n){const s=e.getBoundingClientRect().height,r=ice(n)-2,i=ace(n)-2;if(!e.offsetParent)return;const l=bB(e.offsetParent),{clientY:u,clientX:c}=t;let d=u-l.top-s/2,h=c-l.left-10;const f=$o(n),p=f.defaultView||window,g=p.pageYOffset||f.documentElement.scrollTop,v=p.pageXOffset||f.documentElement.scrollLeft;r>0&&h+e.clientWidth>r+v&&(h=r+v-e.clientWidth),h<0&&(h=0),i>0&&d+e.clientHeight>i+g&&(d=i+g-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}var Uy=(e,...t)=>{for(const n of t){const[o,s,r,i]=n;o.addEventListener(s,r,i),e.push(n)}},m_=e=>{if(e){for(const[t,n,o,s]of e)t.removeEventListener(n,o,s);e.length=0}},xl=e=>{e.cancelable&&e.preventDefault()};function Nce(e,t){return t}function AB(e){return(e==null?void 0:e.getLocaleTextFunc())??Nce}function Lce(e,t,n,o){const s=t[n];return e.getLocaleTextFunc()(n,typeof s=="function"?s(o):s,o)}function Vce(e){return(t,n,o)=>e({key:t,defaultValue:n,variableValues:o})}function Bce(e){return(t,n,o)=>{let s=e==null?void 0:e[t];if(s&&(o!=null&&o.length)){let r=0;for(;!(r>=o.length||s.indexOf("${variable}")===-1);)s=s.replace("${variable}",o[r++])}return s??n}}var Fi=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,n){this.localEventService||(this.localEventService=new Wu),this.localEventService.addEventListener(e,t,n)}removeEventListener(e,t,n){var o;(o=this.localEventService)==null||o.removeEventListener(e,t,n)}dispatchLocalEvent(e){var t;(t=this.localEventService)==null||t.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const n=[];for(const o of Object.keys(t)){const s=t[o];s&&n.push(this._setupListener(e,o,s))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let o;if($ce(e))e.__addEventListener(t,n),o=()=>(e.__removeEventListener(t,n),null);else{const s=Hce(e);e instanceof HTMLElement?Fce(e,t,n):s?e.addListener(t,n):e.addEventListener(t,n),o=s?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}setupPropertyListener(e,t){const{gos:n}=this;n.addPropertyEventListener(e,t);const o=()=>(n.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const n=e.join("-")+this.propertyListenerId++,o=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=s.changeSet.id}const r={type:"propertyChanged",changeSet:s.changeSet,source:s.source};t(r)};for(const s of e)this.setupPropertyListener(s,o)}getLocaleTextFunc(){return AB(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const n=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),n}createBean(e,t,n){return(t||this.stubContext).createBean(e,n)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function $ce(e){return e.__addEventListener!==void 0}function Hce(e){return e.eventServiceType==="global"}var qe=class extends Fi{},PB={};function v_(e,t){PB[t]||(e(),PB[t]=!0)}var Gce={pending:!1,funcs:[]},Uce={pending:!1,funcs:[]};function y_(e,t="setTimeout",n){const o=t==="raf"?Uce:Gce;if(o.funcs.push(e),o.pending)return;o.pending=!0;const s=()=>{const r=o.funcs.slice();o.funcs.length=0,o.pending=!1;for(const i of r)i()};t==="raf"?xa(n,s):window.setTimeout(s,0)}function Yo(e,t,n){let o;return function(...s){const r=this;window.clearTimeout(o),o=window.setTimeout(function(){e.isAlive()&&t.apply(r,s)},n)}}function kB(e,t){let n=0;return function(...o){const s=this,r=Date.now();r-n<t||(n=r,e.apply(s,o))}}function Wce(e,t,n,o=100){const s=Date.now();let r=null,i=!1;const a=()=>{r!=null&&(window.clearInterval(r),r=null)};e.addDestroyFunc(a);const l=()=>{const u=Date.now()-s>o;(t()||u)&&(n(),i=!0,a())};l(),i||(r=window.setInterval(l,10))}var FB=new Set(["__proto__","constructor","prototype"]);function zce(e,t){if(e!=null){if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(n.toString(),e[n]);return}for(const n of Object.keys(e).filter(o=>!FB.has(o)))t(n,e[n])}}function vs(e,t,n=!0,o=!1){ft(t)&&zce(t,(s,r)=>{let i=e[s];i!==r&&(o&&i==null&&r!=null&&typeof r=="object"&&r.constructor===Object&&(i={},e[s]=i),OB(r)&&OB(i)&&!Array.isArray(i)?vs(i,r,n,o):(n||r!==void 0)&&(e[s]=r))})}function OB(e){return typeof e=="object"&&e!==null}var w_=class Ga{static applyGlobalGridOptions(t){if(!Ga.gridOptions)return{...t};let n={};return vs(n,Ga.gridOptions,!0,!0),Ga.mergeStrategy==="deep"?vs(n,t,!0,!0):n={...n,...t},Ga.gridOptions.context&&(n.context=Ga.gridOptions.context),t.context&&(Ga.mergeStrategy==="deep"&&n.context&&vs(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(Ga.mergeStrategy==="deep"){const o=jce(t);if(o&&typeof o=="object"&&typeof n=="object")return Ga.applyGlobalGridOptions({[t]:n})[t]}return n}};w_.gridOptions=void 0,w_.mergeStrategy="shallow";var C_=w_;function jce(e){var t;return(t=C_.gridOptions)==null?void 0:t[e]}var Kce={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1},MB="https://www.ag-grid.com";function Al(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function Vp(e,...t){v_(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function $d(e,...t){v_(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var NB=new Set,Wy={},Hd={},zy,LB=!1,VB=!1,qce=!1;function Yce(e){const[t,n]=e.version.split(".")||[],[o,s]=zy.split(".")||[];return t===o&&n===s}function Xce(e){var o;zy||(zy=e.version);const t=s=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${s} Please update all modules to the same version.`;e.version?Yce(e)||$d(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${zy}.`)):$d(t(`'${e.moduleName}' is incompatible.`));const n=(o=e.validate)==null?void 0:o.call(e);n&&!n.isValid&&$d(`${n.message}`)}function Bp(e,t,n=!1){n||(LB=!0),Xce(e);const o=e.rowModels??["all"];NB.add(e);let s;t!==void 0?(VB=!0,Hd[t]===void 0&&(Hd[t]={}),s=Hd[t]):s=Wy;for(const r of o)s[r]===void 0&&(s[r]={}),s[r][e.moduleName]=e;if(e.dependsOn)for(const r of e.dependsOn)Bp(r,t,n)}function Zce(e){delete Hd[e]}function b_(e,t,n){const o=s=>{var r,i,a;return!!((r=Wy[s])!=null&&r[e])||!!((a=(i=Hd[t])==null?void 0:i[s])!=null&&a[e])};return o(n)||o("all")}function S_(){return VB}function Jce(e,t){const n=Hd[e]??{};return[...Object.values(Wy.all??{}),...Object.values(n.all??{}),...Object.values(Wy[t]??{}),...Object.values(n[t]??{})]}function Qce(){return new Set(NB)}function ede(){return LB}function BB(){return qce}var tde=class{static register(e){Bp(e,void 0)}static registerModules(e){for(const t of e)Bp(t,void 0)}},ct="34.3.1",$B=2e3,HB=100,GB="_version_",jy=null,Gd=`${MB}/javascript-data-grid`;function nde(e){jy=e}function ode(e){Gd=e}function UB(e,t,n){return(jy==null?void 0:jy(e,t))??[ade(e,t,n)]}function E_(e,t,n,o,s){e(`${o?"warning":"error"} #${t}`,...UB(t,n,s))}function sde(e){if(!e)return String(e);const t={};for(const n of Object.keys(e))typeof e[n]!="object"&&typeof e[n]!="function"&&(t[n]=e[n]);return JSON.stringify(t)}function rde(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=sde(e)),t}function Ky(e){return e===void 0?"undefined":e===null?"null":e}function __(e,t){return`${e}?${t.toString()}`}function ide(e,t,n){const o=Array.from(t.entries()).sort((r,i)=>i[1].length-r[1].length);let s=__(e,t);for(const[r,i]of o){if(r===GB)continue;const a=s.length-n;if(a<=0)break;const l="...",u=a+l.length,c=i.length-u>HB?i.slice(0,i.length-u)+l:i.slice(0,HB)+l;t.set(r,c),s=__(e,t)}return s}function WB(e,t){const n=new URLSearchParams;if(n.append(GB,ct),t)for(const r of Object.keys(t))n.append(r,rde(t[r]));const o=`${Gd}/errors/${e}`,s=__(o,n);return s.length<=$B?s:ide(o,n,$B)}var ade=(e,t,n)=>{const o=WB(e,t),s=`${n?n+`
|
|
194
194
|
`:""}Visit ${o}`;return BB()?s:`${s}${n?"":`
|
|
195
195
|
Alternatively register the ValidationModule to see the full message in the console.`}`};function Je(...e){E_(Vp,e[0],e[1],!0)}function _n(...e){E_($d,e[0],e[1],!1)}function $p(e,t,n){E_($d,e,t,!1,n)}function lde(e,t){const n=t[0];return`error #${n} `+UB(n,t[1],e).join(" ")}function Oi(...e){return lde(void 0,e)}function zB(e,t){return e.get("rowModelType")===t}function io(e,t){return zB(e,"clientSide")}function Ud(e,t){return zB(e,"serverSide")}function Xo(e,t){return e.get("domLayout")===t}function Ku(e){return Xy(e)!==void 0}function jB(e){return typeof e.get("getRowHeight")=="function"}function ude(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function Pl(e,t,n=!1,o){const{gos:s,environment:r}=e;if(o==null&&(o=r.getDefaultRowHeight()),jB(s)){if(n)return{height:o,estimated:!0};const l={node:t,data:t.data},u=s.getCallback("getRowHeight")(l);if(R_(u))return u===0&&Je(23),{height:Math.max(1,u),estimated:!1}}if(t.detail&&s.get("masterDetail"))return cde(s);const i=s.get("rowHeight");return{height:i&&R_(i)?i:o,estimated:!1}}function cde(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return R_(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function qu(e){const{environment:t,gos:n}=e,o=n.get("rowHeight");if(!o||Gn(o))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(Je(24),t.getDefaultRowHeight())}function R_(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function KB(e,t,n){const o=t[e.getDomDataKey()];return o?o[n]:void 0}function Yu(e,t,n,o){const s=e.getDomDataKey();let r=t[s];Gn(r)&&(r={},t[s]=r),r[n]=o}function Wd(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function qB(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Xo(e,"print"))}function Mi(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function T_(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function YB(e){return e.get("grandTotalRow")}function XB(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function ZB(e,t,n){return!!t.group&&!t.footer&&XB(e,n)}function zd(e){const t=e.getCallback("getRowId");return t===void 0?t:n=>{let o=t(n);return typeof o!="string"&&(v_(()=>Je(25,{id:o}),"getRowIdString"),o=String(o)),o}}function dde(e,t){const n=e.get("groupHideParentOfSingleChild");return!!(n===!0||n==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function hde(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function jd(e){return(e==null?void 0:e.checkboxes)??!0}function qy(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function Yy(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function D_(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function fde(e){return typeof e.get("rowSelection")!="string"}function Aa(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function JB(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const n=e.get("suppressRowClickSelection"),o=e.get("suppressRowDeselection");return n&&o?!1:n?"enableDeselection":o?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function pde(e){const t=JB(e);return t===!0||t==="enableSelection"}function gde(e){const t=JB(e);return t===!0||t==="enableDeselection"}function I_(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function Xy(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t==null?void 0:t.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function Hp(e){return Xy(e)==="multiRow"}function mde(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function Zy(e){const t=e.get("rowSelection");if(typeof t=="string"){const n=e.get("groupSelectsChildren"),o=e.get("groupSelectsFiltered");return n&&o?"filteredDescendants":n?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function QB(e,t=!0){const n=e.get("rowSelection");return typeof n!="object"?t?"all":void 0:n.mode==="multiRow"?n.selectAll:"all"}function vde(e){const t=e.get("rowSelection");return typeof t=="string"?!1:(t==null?void 0:t.mode)==="multiRow"?t.ctrlASelectsRows??!1:!1}function Gp(e){const t=Zy(e);return t==="descendants"||t==="filteredDescendants"}function e2(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function yde(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function Qs(e){return e.get("columnMenu")==="legacy"}function wde(e){return!Qs(e)}function Cde(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function Ot(e,t){return e.addCommon(t)}function t2({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var bde={resizable:!0,sortable:!0},Sde=0;function n2(){return Sde++}function kl(e){return e instanceof Xu}var Xu=class extends qe{constructor(e,t,n,o){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=n,this.primary=o,this.isColumn=!0,this.instanceId=n2(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new Wu,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Ip(n)}destroy(){var e;super.destroy(),(e=this.beans.rowSpanSvc)==null||e.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:n,colFlex:o}}=this;t==null||t.initCol(this);const s=e.hide;s!==void 0?this.visible=!s:this.visible=!e.initialHide,n==null||n.initCol(this),o==null||o.initCol(this)}setColDef(e,t,n){var s;const o=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),o&&((s=this.beans.rowSpanSvc)==null||s.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",n)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.setState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:n}}=this,o=e.get("suppressFieldDotNotation");this.fieldContainsDots=ft(t)&&t.includes(".")&&!o,this.tooltipFieldContainsDots=ft(n)&&n.includes(".")&&!o}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){var e;(e=this.beans.tooltipSvc)==null||e.initCol(this)}initRowSpan(){var e;this.colDef.spanRows&&((e=this.beans.rowSpanSvc)==null||e.register(this))}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:n=>{const o=e.recreateColDef(this.colDef);this.setColDef(o,o,n.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const n=e.width,o=e.initialWidth;return n!=null?t=n:o!=null?t=o:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){var t;return((t=this.beans.showRowGroupCols)==null?void 0:t.isRowGroupDisplayed(this,e))??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){var o,s,r;this.frameworkEventListenerService=(s=(o=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:s.call(o,this.frameworkEventListenerService,this.colEventSvc);const n=((r=this.frameworkEventListenerService)==null?void 0:r.wrap(e,t))??t;this.colEventSvc.addEventListener(e,n)}removeEventListener(e,t){var o;const n=((o=this.frameworkEventListenerService)==null?void 0:o.unwrap(e,t))??t;this.colEventSvc.removeEventListener(e,n)}createColumnFunctionCallbackParams(e){return Ot(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){var t;return((t=this.beans.cellNavigation)==null?void 0:t.isSuppressNavigable(this,e))??!1}isCellEditable(e){var t;return((t=this.beans.editSvc)==null?void 0:t.isCellEditable({rowNode:e,column:this}))??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){var t;return((t=this.beans.selectionSvc)==null?void 0:t.isCellCheckboxSelection(this,e))??!1}isSuppressPaste(e){var t;return this.isColumnFunc(e,((t=this.colDef)==null?void 0:t.suppressPaste)??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??bde[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const n=this.createColumnFunctionCallbackParams(e);return t(n)}return!1}createColumnEvent(e,t){return Ot(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return Gn(this.sort)}isSorting(){return ft(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){var e;return Je(261),!!((e=this.beans.colHover)!=null&&e.isHovered(this))}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const n=e===!0;this.visible!==n&&(this.visible=n,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e!=null&&e.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!(e!=null&&e.isPadding()))return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let n=!0;for(;e;){if(!e.isPadding()){n=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:n}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return Ot(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(Gn(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.colSpan(t);return Math.max(n,1)}getRowSpan(e){if(Gn(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.rowSpan(t);return Math.max(n,1)}setActualWidth(e,t,n=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),n||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchColEvent(e,t,n){const o=this.createColumnEvent(e,t);n&&vs(o,n),this.colEventSvc.dispatchEvent(o)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function ss(e){return e instanceof Jy}var Jy=class extends qe{constructor(e,t,n,o){super(),this.colGroupDef=e,this.groupId=t,this.padding=n,this.level=o,this.isColumn=!1,this.expandable=!1,this.instanceId=n2(),this.expandableListenerRemoveCallback=null,this.expanded=!!(e!=null&&e.openByDefault)}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(const t of this.children)kl(t)?e(t):ss(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)kl(t)?e.push(t):ss(t)&&t.addLeafColumns(e)}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);for(const t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(const t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,n=!1;const o=this.findChildrenRemovingPadding();for(let r=0,i=o.length;r<i;r++){const a=o[r];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,n=!0):l==="closed"?(t=!0,n=!0):(e=!0,t=!0)}const s=e&&t&&n;this.expandable!==s&&(this.expandable=s,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=n=>{for(const o of n)ss(o)&&o.isPadding()?t(o.children):e.push(o)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},Ede={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function o2(e,t,n){const o={},s=e.gos;return Object.assign(o,s.get("defaultColGroupDef")),Object.assign(o,t),s.validateColDef(o,n),o}var _de=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=i_(e);let n=0;for(;;){let o=e??t;if(o?n!==0&&(o+="_"+n):o=n,!this.existingKeys[o]){const s=String(o);return e&&n>0&&Je(273,{providedId:e,usedId:s}),this.existingKeys[s]=!0,s}n++}}};function kn(e){if(e!=null&&e.length)return e[e.length-1]}function Fl(e,t,n){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const o=e.length;if(o!==t.length)return!1;for(let s=0;s<o;s++)if(e[s]!==t[s]&&!(n!=null&&n(e[s],t[s])))return!1;return!0}function Up(e,t){if(e)for(const n of e)t(n)}function ti(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}function s2(e,t,n){for(let o=0;o<t.length;o++)ti(e,t[o]);for(let o=t.length-1;o>=0;o--)e.splice(n,0,t[o])}var Qy="ag-Grid-AutoColumn",r2="ag-Grid-SelectionColumn",i2="ag-Grid-RowNumbersColumn";function a2(e){const t=[],n=o=>{for(let s=0;s<o.length;s++){const r=o[s];kl(r)?t.push(r):ss(r)&&n(r.getChildren())}};return n(e),t}function Pa(e){return e.reduce((t,n)=>t+n.getActualWidth(),0)}function ew(e,t,n){const o={};if(!t)return;Oa(null,t,r=>{o[r.getInstanceId()]=r}),n&&Oa(null,n,r=>{o[r.getInstanceId()]=null});const s=Object.values(o).filter(r=>r!=null);e.context.destroyBeans(s)}function x_(e){return e.getId().startsWith(Qy)}function ka(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(r2))??!1}function Fa(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(i2))??!1}function Rde(e){return ka(e)||Fa(e)}function tw(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function Tde(e,t){return Fl(e,t,(n,o)=>n.getColId()===o.getColId())}function Dde(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function Kd(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function Wp(e,t){const n=e===t,o=e.getColDef()===t,s=e.getColId()==t;return n||o||s}var Ide=(e,t)=>(n,o)=>{const s={value1:void 0,value2:void 0};let r=!1;return e&&(e[n]!==void 0&&(s.value1=e[n],r=!0),ft(o)&&e[o]!==void 0&&(s.value2=e[o],r=!0)),!r&&t&&(t[n]!==void 0&&(s.value1=t[n]),ft(o)&&t[o]!==void 0&&(s.value2=t[o])),s},xde=(e,t)=>{ss(e)&&e.setupExpandable(),e.originalParent=t};function Ade(e,t=null,n,o,s){const r=new _de,{existingCols:i,existingGroups:a,existingColKeys:l}=Pde(o);r.addExistingKeys(l);const u=l2(e,t,0,n,i,r,a,s),{colGroupSvc:c}=e,d=(c==null?void 0:c.findMaxDepth(u,0))??0,h=c?c.balanceColumnTree(u,0,d,r):u;return Oa(null,h,xde),{columnTree:h,treeDepth:d}}function Pde(e){const t=[],n=[],o=[];return e&&Oa(null,e,s=>{if(ss(s)){const r=s;n.push(r)}else{const r=s;o.push(r.getId()),t.push(r)}}),{existingCols:t,existingGroups:n,existingColKeys:o}}function l2(e,t,n,o,s,r,i,a){if(!t)return[];const{colGroupSvc:l}=e,u=new Array(t.length);for(let c=0;c<u.length;c++){const d=t[c];l&&Lde(d)?u[c]=l.createProvidedColumnGroup(o,d,n,s,r,i,a):u[c]=kde(e,o,d,s,r,a)}return u}function kde(e,t,n,o,s,r){var l;const i=Ode(n,o);i&&(o==null||o.splice(i.idx,1));let a=i==null?void 0:i.column;if(a){const u=A_(e,n,a.getColId());a.setColDef(u,n,r),Fde(e,a,u,r)}else{const u=s.getUniqueKey(n.colId,n.field),c=A_(e,n,u);a=new Xu(c,n,u,t),e.context.createBean(a)}return(l=e.dataTypeSvc)==null||l.addColumnListeners(a),a}function u2(e,t,n,o,s,r,i,a){const{sortSvc:l,pinnedCols:u,colFlex:c}=e;n!==void 0&&t.setVisible(!n,a),l&&(l.updateColSort(t,o,a),s!==void 0&&l.setColSortIndex(t,s)),r!==void 0&&(u==null||u.setColPinned(t,r)),i!==void 0&&(c==null||c.setColFlex(t,i))}function Fde(e,t,n,o){u2(e,t,n.hide,n.sort,n.sortIndex,n.pinned,n.flex,o);const s=t.getFlex();if(!(s!=null&&s>0))if(n.width!=null)t.setActualWidth(n.width,o);else{const r=t.getActualWidth();t.setActualWidth(r,o)}}function Ode(e,t){if(t)for(let n=0;n<t.length;n++){const o=t[n].getUserProvidedColDef();if(!o)continue;if(e.colId!=null){if(t[n].getId()===e.colId)return{idx:n,column:t[n]};continue}if(e.field!=null){if(o.field===e.field)return{idx:n,column:t[n]};continue}if(o===e)return{idx:n,column:t[n]}}}function A_(e,t,n,o){const{gos:s,dataTypeSvc:r}=e,i={},a=s.get("defaultColDef");vs(i,a,!1,!0);const l=Mde(e,i,t,n);l&&Nde(e,l,i);const u=i.cellDataType;vs(i,t,!1,!0),u!==void 0&&(i.cellDataType=u);const c=s.get("autoGroupColumnDef"),d=Mi(s);return t.rowGroup&&c&&d&&vs(i,{sort:c.sort,initialSort:c.initialSort},!1,!0),r&&(r.postProcess(i),r.validateColDef(i)),s.validateColDef(i,n,o),i}function Mde(e,t,n,o){var i;const s=(i=e.dataTypeSvc)==null?void 0:i.updateColDefAndGetColumnType(t,n,o),r=n.type??s??t.type;return t.type=r,r?tw(r):void 0}function Nde(e,t,n){if(!t.length)return;const o=Object.assign({},Ede),s=e.gos.get("columnTypes")||{};for(const r of Object.keys(s)){const i=s[r];r in o?Je(34,{key:r}):(i.type&&Je(35),o[r]=i)}for(const r of t){const i=o[r.trim()];i?vs(n,i,!1,!0):Je(36,{t:r})}}function Lde(e){return e.children!==void 0}function Oa(e,t,n){if(t)for(let o=0;o<t.length;o++){const s=t[o];ss(s)&&Oa(s,s.getChildren(),n),n(s,e)}}function c2(e,t){const n=[],o=[],s=[];return e.forEach(i=>{const a=i.getColDef().lockPosition;a==="right"?s.push(i):a==="left"||a===!0?n.push(i):o.push(i)}),t.get("enableRtl")?[...s,...o,...n]:[...n,...o,...s]}function d2(e,t){let n=!0;return Oa(null,t,o=>{if(!ss(o))return;const s=o,r=s.getColGroupDef();if(!(r==null?void 0:r.marryChildren))return;const a=[];for(const h of s.getLeafColumns()){const f=e.indexOf(h);a.push(f)}const l=Math.max.apply(Math,a),u=Math.min.apply(Math,a),c=l-u,d=s.getLeafColumns().length-1;c>d&&(n=!1)}),n}function h2(e,t){if(!e||e.length==0)return;const n=t(e[0]);for(let o=1;o<e.length;o++)if(n!==t(e[o]))return;return n}function f2(e,t,n){if(!t.length)return;const o=t.length===1?t[0]:null,s=h2(t,r=>r.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:o,source:n})}function Vde(e,t,n){if(!t.length)return;const o=t.length===1?t[0]:null,s=h2(t,r=>r.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:o,source:n})}function Bde(e,t,n,o){e.dispatchEvent({type:t,columns:n,column:n&&n.length==1?n[0]:null,source:o})}function qd(e,t,n,o,s=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:s,finished:n,source:o})}function ni(e,t,n){var E;const{colModel:o,rowGroupColsSvc:s,pivotColsSvc:r,autoColSvc:i,selectionColSvc:a,colAnimation:l,visibleCols:u,pivotResultCols:c,environment:d,valueColsSvc:h,eventSvc:f,gos:p}=e,g=o.getColDefCols()??[],v=a==null?void 0:a.getColumns();if(!g.length&&!(v!=null&&v.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return Je(32),!1;const w=(_,I,T,F,L)=>{if(!_)return;const x=Ide(I,t.defaultState),P=x("flex").value1;if(u2(e,_,x("hide").value1,x("sort").value1,x("sortIndex").value1,x("pinned").value1,P,n),P==null){const k=x("width").value1;if(k!=null){const M=_.getColDef().minWidth??d.getDefaultColumnMinWidth();M!=null&&k>=M&&_.setActualWidth(k,n)}}L||!_.isPrimary()||(h==null||h.syncColumnWithState(_,n,x),s==null||s.syncColumnWithState(_,n,x,T),r==null||r.syncColumnWithState(_,n,x,F))},S=(_,I,T)=>{var se,Z;const F=p2(e,n),L=I.slice(),x={},P={},k=[],M=[],N=[];let B=0;const z=(s==null?void 0:s.columns.slice())??[],oe=(r==null?void 0:r.columns.slice())??[];for(const A of _){const j=A.colId;if(j.startsWith(Qy)){k.push(A),N.push(A);continue}if(ka(j)){M.push(A),N.push(A);continue}const ge=T(j);ge?(w(ge,A,x,P,!1),ti(L,ge)):(N.push(A),B+=1)}const ie=A=>w(A,null,x,P,!1);L.forEach(ie),s==null||s.sortColumns(m2.bind(s,x,z)),r==null||r.sortColumns(m2.bind(r,P,oe)),o.refreshCols(!1,n);const te=(A,j,ne=[])=>{for(const ge of j){const xe=A(ge.colId);ti(ne,xe),w(xe,ge,null,null,!0)}ne.forEach(ie)};return te(A=>(i==null?void 0:i.getColumn(A))??null,k,(se=i==null?void 0:i.getColumns())==null?void 0:se.slice()),te(A=>(a==null?void 0:a.getColumn(A))??null,M,(Z=a==null?void 0:a.getColumns())==null?void 0:Z.slice()),Hde(t,o,p),u.refresh(n),f.dispatchEvent({type:"columnEverythingChanged",source:n}),F(),{unmatchedAndAutoStates:N,unmatchedCount:B}};l==null||l.start();let{unmatchedAndAutoStates:b,unmatchedCount:y}=S(t.state||[],g,_=>o.getColDefCol(_));if(b.length>0||ft(t.defaultState)){const _=((E=c==null?void 0:c.getPivotResultCols())==null?void 0:E.list)??[];y=S(b,_,I=>(c==null?void 0:c.getPivotResultCol(I))??null).unmatchedCount}return l==null||l.finish(),y===0}function $de(e,t){var S,b;const{colModel:n,autoColSvc:o,selectionColSvc:s,eventSvc:r,gos:i}=e,a=n.getColDefCols();if(!(a!=null&&a.length))return;const l=n.getColDefColTree(),u=a2(l),c=[];let d=1e3,h=1e3;const f=y=>{const E=g2(y);Gn(E.rowGroupIndex)&&E.rowGroup&&(E.rowGroupIndex=d++),Gn(E.pivotIndex)&&E.pivot&&(E.pivotIndex=h++),c.push(E)};(S=o==null?void 0:o.getColumns())==null||S.forEach(f),(b=s==null?void 0:s.getColumns())==null||b.forEach(f),u==null||u.forEach(f),ni(e,{state:c},t);const p=(o==null?void 0:o.getColumns())??[],w=[...(s==null?void 0:s.getColumns())??[],...p,...a].map(y=>({colId:y.colId}));ni(e,{state:w,applyOrder:!0},t),r.dispatchEvent(Ot(i,{type:"columnsReset",source:t}))}function p2(e,t){const{rowGroupColsSvc:n,pivotColsSvc:o,valueColsSvc:s,colModel:r,sortSvc:i,eventSvc:a}=e,l={rowGroupColumns:(n==null?void 0:n.columns.slice())??[],pivotColumns:(o==null?void 0:o.columns.slice())??[],valueColumns:(s==null?void 0:s.columns.slice())??[]},u=nw(e),c={};for(const d of u)c[d.colId]=d;return()=>{const d=(_,I,T,F)=>{const L=I.map(F),x=T.map(F);if(Fl(L,x))return;const k=new Set(I);for(const N of T)k.delete(N)||k.add(N);const M=[...k];a.dispatchEvent({type:_,columns:M,column:M.length===1?M[0]:null,source:t})},h=_=>{const I=[];return r.forAllCols(T=>{const F=c[T.getColId()];F&&_(F,T)&&I.push(T)}),I},f=_=>_.getColId();d("columnRowGroupChanged",l.rowGroupColumns,(n==null?void 0:n.columns)??[],f),d("columnPivotChanged",l.pivotColumns,(o==null?void 0:o.columns)??[],f);const g=h((_,I)=>{const T=_.aggFunc!=null,F=T!=I.isValueActive(),L=T&&_.aggFunc!=I.getAggFunc();return F||L});g.length>0&&Bde(a,"columnValueChanged",g,t),qd(a,h((_,I)=>_.width!=I.getActualWidth()),!0,t),f2(a,h((_,I)=>_.pinned!=I.getPinned()),t),Vde(a,h((_,I)=>_.hide==I.isVisible()),t);const y=h((_,I)=>_.sort!=I.getSort()||_.sortIndex!=I.getSortIndex());y.length>0&&(i==null||i.dispatchSortChangedEvents(t,y));const E=nw(e);Ude(u,E,t,r,a)}}function nw(e){const{colModel:t,rowGroupColsSvc:n,pivotColsSvc:o}=e,s=t.getColDefCols();if(Gn(s)||!t.isAlive())return[];const r=n==null?void 0:n.columns,i=o==null?void 0:o.columns,a=[],l=c=>{const d=c.isRowGroupActive()&&r?r.indexOf(c):null,h=c.isPivotActive()&&i?i.indexOf(c):null,f=c.isValueActive()?c.getAggFunc():null,p=c.getSort()!=null?c.getSort():null,g=c.getSortIndex()!=null?c.getSortIndex():null;a.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:p,sortIndex:g,aggFunc:f,rowGroup:c.isRowGroupActive(),rowGroupIndex:d,pivot:c.isPivotActive(),pivotIndex:h,flex:c.getFlex()??null})};t.forAllCols(c=>l(c));const u=new Map(t.getCols().map((c,d)=>[c.getColId(),d]));return a.sort((c,d)=>{const h=u.has(c.colId)?u.get(c.colId):-1,f=u.has(d.colId)?u.get(d.colId):-1;return h-f}),a}function g2(e){const t=(p,g)=>p??g??null,n=e.getColDef(),o=t(n.sort,n.initialSort),s=t(n.sortIndex,n.initialSortIndex),r=t(n.hide,n.initialHide),i=t(n.pinned,n.initialPinned),a=t(n.width,n.initialWidth),l=t(n.flex,n.initialFlex);let u=t(n.rowGroupIndex,n.initialRowGroupIndex),c=t(n.rowGroup,n.initialRowGroup);u==null&&!c&&(u=null,c=null);let d=t(n.pivotIndex,n.initialPivotIndex),h=t(n.pivot,n.initialPivot);d==null&&!h&&(d=null,h=null);const f=t(n.aggFunc,n.initialAggFunc);return{colId:e.getColId(),sort:o,sortIndex:s,hide:r,pinned:i,width:a,flex:l,rowGroup:c,rowGroupIndex:u,pivot:h,pivotIndex:d,aggFunc:f}}function Hde(e,t,n){if(!e.applyOrder||!e.state)return;const o=[];for(const s of e.state)s.colId!=null&&o.push(s.colId);Gde(t.cols,o,t,n)}function Gde(e,t,n,o){if(e==null)return;let s=[];const r={};for(const a of t){if(r[a])continue;const l=e.map[a];l&&(s.push(l),r[a]=!0)}let i=0;for(const a of e.list){const l=a.getColId();if(r[l]!=null)continue;l.startsWith(Qy)?s.splice(i++,0,a):s.push(a)}if(s=c2(s,o),!d2(s,n.getColTree())){Je(39);return}e.list=s}function Ude(e,t,n,o,s){const r={};for(const c of t)r[c.colId]=c;const i={};for(const c of e)r[c.colId]&&(i[c.colId]=!0);const a=e.filter(c=>i[c.colId]),l=t.filter(c=>i[c.colId]),u=[];l.forEach((c,d)=>{const h=a==null?void 0:a[d];if(h&&h.colId!==c.colId){const f=o.getCol(h.colId);f&&u.push(f)}}),u.length&&s.dispatchEvent({type:"columnMoved",columns:u,column:u.length===1?u[0]:null,finished:!0,source:n})}var m2=(e,t,n,o)=>{const s=e[n.getId()],r=e[o.getId()],i=s!=null,a=r!=null;if(i&&a)return s-r;if(i)return-1;if(a)return 1;const l=t.indexOf(n),u=t.indexOf(o),c=l>=0,d=u>=0;return c&&d?l-u:c?-1:1},Wde=class extends qe{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(Kd(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),Kd(e.source)))}createColsFromColDefs(e){var S,b,y;const{beans:t}=this,{valueCache:n,colAutosize:o,rowGroupColsSvc:s,pivotColsSvc:r,valueColsSvc:i,visibleCols:a,eventSvc:l,groupHierarchyColSvc:u}=t,c=this.colDefs?p2(t,e):void 0;n==null||n.expire();const d=(S=this.colDefCols)==null?void 0:S.list,h=(b=this.colDefCols)==null?void 0:b.tree,f=Ade(t,this.colDefs,!0,h,e);ew(t,(y=this.colDefCols)==null?void 0:y.tree,f.columnTree);const p=f.columnTree,g=f.treeDepth,v=a2(p),w={};for(const E of v)w[E.getId()]=E;this.colDefCols={tree:p,treeDepth:g,list:v,map:w},this.createColumnsForService([u],this.colDefCols,e),s==null||s.extractCols(e,d),r==null||r.extractCols(e,d),i==null||i.extractCols(e,d),this.ready=!0,this.refreshCols(!0,e),a.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),c&&(this.changeEventsDispatching=!0,c(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&(o==null||o.applyAutosizeStrategy())}refreshCols(e,t){var v;if(!this.colDefCols)return;const n=(v=this.cols)==null?void 0:v.tree;this.saveColOrder();const{autoColSvc:o,selectionColSvc:s,rowNumbersSvc:r,quickFilter:i,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:u,visibleCols:c,colViewport:d,eventSvc:h}=this.beans,f=this.selectCols(a,this.colDefCols);this.createColumnsForService([o,s,r],f,t);const p=ude(this.gos,this.showingPivotResult);(!e||p)&&this.restoreColOrder(f),this.positionLockedCols(f),l==null||l.refresh(),i==null||i.refreshCols(),this.setColSpanActive(),u==null||u.setAutoHeightActive(f),c.clear(),d.clear(),!Fl(n,this.cols.tree)&&h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,n){for(const o of e)o&&(o.createColumns(t,s=>{this.lastOrder=s(this.lastOrder),this.lastPivotOrder=s(this.lastPivotOrder)},n),o.addColumns(t))}selectCols(e,t){const n=(e==null?void 0:e.getPivotResultCols())??null;this.showingPivotResult=n!=null;const{map:o,list:s,tree:r,treeDepth:i}=n??t;return this.cols={list:s.slice(),map:{...o},tree:r.slice(),treeDepth:i},n&&(n.list.some(l=>{var u;return((u=this.cols)==null?void 0:u.map[l.getColId()])!==void 0})||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{valueColsSvc:e,selectionColSvc:t,gos:n}=this.beans,o=this.isPivotMode()&&!this.showingPivotResult,s=t==null?void 0:t.isSelectionColumnEnabled(),r=n.get("rowNumbers"),i=e==null?void 0:e.columns;return this.cols.list.filter(l=>{const u=x_(l);if(o){const c=i==null?void 0:i.includes(l);return u||c||s&&ka(l)||r&&Fa(l)}else return u||l.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,n){ni(this.beans,{state:e.map(o=>({colId:typeof o=="string"?o:o.getColId(),hide:!t}))},n)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const n=t.filter(d=>e.map[d.getId()]!=null);if(n.length===0)return;if(n.length===e.list.length){e.list=n;return}const o=d=>{const h=d.getOriginalParent();return h?h.getChildren().length>1?!0:o(h):!1};if(!n.some(d=>o(d))){const d=new Set(n);for(const h of e.list)d.has(h)||n.push(h);e.list=n;return}const s=new Map;for(let d=0;d<n.length;d++){const h=n[d];s.set(h,d)}const r=e.list.filter(d=>!s.has(d));if(r.length===0){e.list=n;return}const i=(d,h)=>{const f=h?h.getOriginalParent():d.getOriginalParent();if(!f)return null;let p=null,g=null;for(const v of f.getChildren())if(!(v===h||v===d)){if(v instanceof Xu){const w=s.get(v);if(w==null)continue;(p==null||p<w)&&(p=w,g=v);continue}v.forEachLeafColumn(w=>{const S=s.get(w);S!=null&&(p==null||p<S)&&(p=S,g=w)})}return g??i(d,f)},a=[],l=new Map;for(const d of r){const h=i(d,null);if(h==null){a.push(d);continue}const f=l.get(h);f===void 0?l.set(h,d):Array.isArray(f)?f.push(d):l.set(h,[f,d])}const u=new Array(e.list.length);let c=u.length-1;for(let d=a.length-1;d>=0;d--)u[c--]=a[d];for(let d=n.length-1;d>=0;d--){const h=n[d],f=l.get(h);if(f)if(Array.isArray(f))for(let p=f.length-1;p>=0;p--){const g=f[p];u[c--]=g}else u[c--]=f;u[c--]=h}e.list=u}positionLockedCols(e){e.list=c2(e.list,this.gos)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=((e=this.cols)==null?void 0:e.list)??null:this.lastOrder=((t=this.cols)==null?void 0:t.list)??null}getColumnDefs(e){var t,n;return this.colDefCols&&((n=this.beans.colDefFactory)==null?void 0:n.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,((t=this.cols)==null?void 0:t.list)??[],e))}setColSpanActive(){var e;this.colSpanActive=!!((e=this.cols)!=null&&e.list.some(t=>t.getColDef().colSpan!=null))}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);const{visibleCols:n,eventSvc:o}=this.beans;n.refresh(t),o.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){var t;const e=(t=this.beans.pivotColsSvc)==null?void 0:t.columns;return this.pivotMode&&!!(e!=null&&e.length)}recreateColumnDefs(e){var n;if(!this.cols)return;(n=this.beans.autoColSvc)==null||n.updateColumns(e);const t=Kd(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;ew(this.beans,(e=this.colDefCols)==null?void 0:e.tree),super.destroy()}getColTree(){var e;return((e=this.cols)==null?void 0:e.tree)??[]}getColDefColTree(){var e;return((e=this.colDefCols)==null?void 0:e.tree)??[]}getColDefCols(){var e;return((e=this.colDefCols)==null?void 0:e.list)??null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}forAllCols(e){var r,i,a,l,u;const{pivotResultCols:t,autoColSvc:n,selectionColSvc:o,groupHierarchyColSvc:s}=this.beans;Up((r=this.colDefCols)==null?void 0:r.list,e),Up((i=n==null?void 0:n.columns)==null?void 0:i.list,e),Up((a=o==null?void 0:o.columns)==null?void 0:a.list,e),Up((l=s==null?void 0:s.columns)==null?void 0:l.list,e),Up((u=t==null?void 0:t.getPivotResultCols())==null?void 0:u.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){var t;return((t=this.cols)==null?void 0:t.map[e])??null}getColFromCollection(e,t){if(t==null)return null;const{map:n,list:o}=t;if(typeof e=="string"&&n[e])return n[e];for(let a=0;a<o.length;a++)if(Wp(o[a],e))return o[a];const{autoColSvc:s,selectionColSvc:r,groupHierarchyColSvc:i}=this.beans;return(s==null?void 0:s.getColumn(e))??(r==null?void 0:r.getColumn(e))??(i==null?void 0:i.getColumn(e))??null}},v2=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let n;return typeof t!="number"?n=0:n=t+1,this.existingIds[e]=n,n}};function zp(e,t,n){return n&&e.addDestroyFunc(()=>t.destroyBean(n)),n??e}var dt=null;function y2(e){return typeof(e==null?void 0:e.getGui)=="function"}var w2=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){var o;if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){for(const r of s)this.toggleCss(r,t);return}}this.cssClassStates[e]!==t&&e.length&&((o=this.getGui())==null||o.classList.toggle(e,t),this.cssClassStates[e]=t)}},zde=0,jp=class extends Fi{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=zde++,this.cssManager=new w2(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(n=>[n.selector,n])),e&&this.setTemplate(e)}preConstruct(){var t,n;this.wireTemplate(this.getGui());const e="component-"+((n=(t=Object.getPrototypeOf(this))==null?void 0:t.constructor)==null?void 0:n.name);for(const o of this.css??[])this.beans.environment.addGlobalCSS(o,e)}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(TB):null}applyElementsToComponent(e,t,n,o=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===dt)this[t]=o??e;else{const r=n==null?void 0:n[t];if(!this.suppressDataRefValidation&&!r)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${s}`)}}}createChildComponentsFromTags(e,t){const n=[];for(const o of e.childNodes??[])n.push(o);for(const o of n){if(!(o instanceof HTMLElement))continue;const s=this.createComponentFromElement(o,r=>{const i=r.getGui();if(i)for(const a of o.attributes??[])i.setAttribute(a.name,a.value)},t);if(s){if(s.addItems&&o.children.length){this.createChildComponentsFromTags(o,t);const r=Array.prototype.slice.call(o.children);s.addItems(r)}this.swapComponentForNode(s,e,o)}else o.childNodes&&this.createChildComponentsFromTags(o,t)}}createComponentFromElement(e,t,n){const o=e.nodeName,s=this.getDataRefAttribute(e),r=o.indexOf("AG-")===0,i=r?this.componentSelectors.get(o):null;let a=null;if(i){const l=n&&s?n[s]:void 0;a=new i.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(r)throw new Error(`selector: ${o}`);return this.applyElementsToComponent(e,s,n,a),a}swapComponentForNode(e,t,n){const o=e.getGui();t.replaceChild(o,n),t.insertBefore(document.createComment(n.nodeName),o),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(const n of e)n.setAttribute("tabindex",t.toString())}setTemplate(e,t,n){let o;typeof e=="string"||e==null?o=c_(e):o=Mp(e),this.setTemplateFromElement(o,t,n)}setTemplateFromElement(e,t,n,o=!1){if(this.eGui=e,this.suppressDataRefValidation=o,t)for(let s=0;s<t.length;s++){const r=t[s];this.componentSelectors.set(r.selector,r)}this.wireTemplate(e,n)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let n=t;return e==null?null:(n||(n=this.eGui),f_(e)?{element:e,parent:n}:{element:e.getGui(),parent:n})}prependChild(e,t){const{element:n,parent:o}=this.getContainerAndElement(e,t)||{};!n||!o||o.insertAdjacentElement("afterbegin",n)}appendChild(e,t){const{element:n,parent:o}=this.getContainerAndElement(e,t)||{};!n||!o||o.appendChild(n)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:n}=t;Tce(this.eGui,e,{skipAriaHidden:n})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:n}=t;Un(this.eGui,e,{skipAriaHidden:n});const o={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(o)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,n){this.eGui.addEventListener(e,t,n),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}},Cn=class extends jp{};function C2(e){return typeof e=="object"&&!!e.component}function jde(e,t){return new Yn(n=>{n(window.setInterval(e,t))})}var Yn=class Sg{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(n=>this.onDone(n),n=>this.onReject(n))}static all(t){return t.length?new Sg(n=>{let o=t.length;const s=new Array(o);t.forEach((r,i)=>{r.then(a=>{s[i]=a,o--,o===0&&n(s)})})}):Sg.resolve()}static resolve(t=null){return new Sg(n=>n(t))}then(t){return new Sg(n=>{this.status===1?n(t(this.resolution)):this.waiters.push(o=>n(t(o)))})}onDone(t){this.status=1,this.resolution=t;for(const n of this.waiters)n(t)}onReject(t){}};function Kde(e){return e?e.prototype&&"getGui"in e.prototype:!1}function b2(e,t,n,o){const{name:s}=n;let r,i,a,l,u,c;if(t){const d=t,h=d[s+"Selector"],f=h?h(o):null,p=g=>{typeof g=="string"?r=g:g!=null&&g!==!0&&(e.isFrameworkComponent(g)?a=g:i=g)};f?(p(f.component),l=f.params,u=f.popup,c=f.popupPosition):p(d[s])}return{compName:r,jsComp:i,fwComp:a,paramsFromSelector:l,popupFromSelector:u,popupPositionFromSelector:c}}var qde=class extends qe{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,n,o=!1){return this.getCompDetails(this.gridOptions,e,t,n,o)}getCompDetails(e,t,n,o,s=!1){var b;const{name:r,cellRenderer:i}=t;let{compName:a,jsComp:l,fwComp:u,paramsFromSelector:c,popupFromSelector:d,popupPositionFromSelector:h}=b2(this.beans.frameworkOverrides,e,t,o),f,p;const g=y=>{const E=this.registry.getUserComponent(r,y);E&&(l=E.componentFromFramework?void 0:E.component,u=E.componentFromFramework?E.component:void 0,f=E.params,p=E.processParams)};if(a!=null&&g(a),l==null&&u==null&&n!=null&&g(n),l&&i&&!Kde(l)&&(l=(b=this.agCompUtils)==null?void 0:b.adaptFunction(t,l)),!l&&!u){const{validation:y}=this.beans;s&&(a!==n||!n)?a?y!=null&&y.isProvidedUserComp(a)||_n(50,{compName:a}):n?y||_n(260,{...this.gos.getModuleErrorParams(),propName:r,compName:n}):_n(216,{name:r}):n&&!y&&_n(146,{comp:n});return}const v=this.mergeParams(e,t,o,c,f,p),w=l==null,S=l??u;return{componentFromFramework:w,componentClass:S,params:v,type:t,popupFromSelector:d,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(S,w,v,t)}}newAgStackInstance(e,t,n,o){var a;const s=!t;let r;s?r=new e:r=this.frameworkCompWrapper.wrap(e,o.mandatoryMethods,o.optionalMethods,o),this.createBean(r);const i=(a=r.init)==null?void 0:a.call(r,n);return i==null?Yn.resolve(r):i.then(()=>r)}mergeParams(e,t,n,o=null,s,r){const i={...n,...s},a=e,l=a==null?void 0:a[t.name+"Params"];if(typeof l=="function"){const u=l(n);vs(i,u)}else typeof l=="object"&&vs(i,l);return vs(i,o),r?r(i):i}},Yde={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},Xde={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},Zde={name:"headerComponent",optionalMethods:["refresh"]},Jde={name:"innerHeaderComponent"},Qde={name:"innerHeaderGroupComponent"},ehe={name:"headerGroupComponent"},the={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},nhe={name:"loadingCellRenderer",cellRenderer:!0},ohe={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},she={name:"loadingOverlayComponent",optionalMethods:["refresh"]},rhe={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},ihe={name:"tooltipComponent"},P_={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},ahe={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},lhe={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},uhe={name:"loadingCellRenderer",cellRenderer:!0},che={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},dhe={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function hhe(e,t){return e.getCompDetailsFromGridOptions(Xde,"agDragAndDropImage",t,!0)}function fhe(e,t,n){return e.getCompDetails(t,Zde,"agColumnHeader",n)}function phe(e,t,n){return e.getCompDetails(t,Jde,void 0,n)}function ghe(e,t){const n=t.columnGroup.getColGroupDef();return e.getCompDetails(n,ehe,"agColumnGroupHeader",t)}function mhe(e,t,n){return e.getCompDetails(t,Qde,void 0,n)}function vhe(e,t){return e.getCompDetailsFromGridOptions(lhe,void 0,t,!0)}function yhe(e,t){return e.getCompDetailsFromGridOptions(uhe,"agLoadingCellRenderer",t,!0)}function whe(e,t){return e.getCompDetailsFromGridOptions(che,"agGroupRowRenderer",t,!0)}function Che(e,t){return e.getCompDetailsFromGridOptions(dhe,"agDetailCellRenderer",t,!0)}function S2(e,t,n){return e.getCompDetails(t,the,void 0,n)}function E2(e,t,n){return e.getCompDetails(t,nhe,"agSkeletonCellRenderer",n,!0)}function _2(e,t,n){return e.getCompDetails(t,ohe,"agCellEditor",n,!0)}function bhe(e,t,n,o){const s=t.filter;return C2(s)&&(t={filter:s.component,filterParams:t.filterParams}),e.getCompDetails(t,P_,o,n,!0)}function She(e,t,n){return e.getCompDetails(t,Yde,"agDateInput",n,!0)}function Ehe(e,t){return e.getCompDetailsFromGridOptions(she,"agLoadingOverlay",t,!0)}function _he(e,t){return e.getCompDetailsFromGridOptions(rhe,"agNoRowsOverlay",t,!0)}function Rhe(e,t){return e.getCompDetails(t.colDef,ihe,"agTooltipComponent",t,!0)}function The(e,t,n,o){return e.getCompDetails(t,ahe,o,n)}function R2(e,t){return b2(e,t,P_)}function k_(e,t,n){return e.mergeParams(t,P_,n)}function Kp(e){const t=e;return(t==null?void 0:t.getFrameworkComponentInstance)!=null?t.getFrameworkComponentInstance():e}function Dhe(e){return typeof e=="object"&&!!e.getComp}var Ve={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},F_=class extends jp{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;(e==null?void 0:e.isAlive())&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},O_,M_,N_,L_,V_,B_,$_;function Ol(){return O_===void 0&&(O_=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),O_}function T2(){return M_===void 0&&(M_=/(firefox)/i.test(navigator.userAgent)),M_}function D2(){return N_===void 0&&(N_=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),N_}function Zu(){return L_===void 0&&(L_=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),L_}function H_(e){if(!e)return null;const t=e.tabIndex,n=e.getAttribute("tabIndex");return t===-1&&(n===null||n===""&&!T2())?null:t.toString()}function Ihe(){if($_!==void 0)return $_;if(!document.body)return-1;let e=1e6;const t=T2()?6e6:1e9,n=document.createElement("div");for(document.body.appendChild(n);;){const o=e*2;if(n.style.height=o+"px",o>t||n.clientHeight!==o)break;e=o}return n.remove(),$_=e,e}function xhe(){return B_==null&&I2(),B_}function I2(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let n=t.offsetWidth-t.clientWidth;n===0&&t.clientWidth===0&&(n=null),t.parentNode&&t.remove(),n!=null&&(B_=n,V_=n===0)}function x2(){return V_==null&&I2(),V_}var G_="T",Ahe=new RegExp(`[${G_} ]`),Phe=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${G_}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function Ni(e,t){return e.toString().padStart(t,"0")}function er(e,t=!0,n=G_){if(!e)return null;let o=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>Ni(s,2)).join("-");return t&&(o+=n+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>Ni(s,2)).join(":")),o}function ow(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),Ni(e.getDate(),2),Ni(e.getHours(),2),`:${Ni(e.getMinutes(),2)}`,`:${Ni(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,Ni(e.getDate(),2)].map(String):null}var U_=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"},A2=["January","February","March","April","May","June","July","August","September","October","November","December"],W_=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function z_(e,t){if(t==null)return er(e,!1);const n=Ni(e.getFullYear(),4),o={YYYY:()=>n.slice(n.length-4,n.length),YY:()=>n.slice(n.length-2,n.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>A2[e.getMonth()],MMM:()=>A2[e.getMonth()].slice(0,3),MM:()=>Ni(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${U_(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${U_(e.getDate())}`,DD:()=>Ni(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>W_[e.getDay()],ddd:()=>W_[e.getDay()].slice(0,3),dd:()=>W_[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${U_(e.getDay())}`,d:()=>`${e.getDay()}`},s=new RegExp(Object.keys(o).join("|"),"g");return t.replace(s,r=>r in o?o[r]():r)}function sw(e,t=!1){return!!As(e,t)}function khe(e){return sw(e,!0)}function As(e,t=!1,n){if(!e||!n&&!Phe.test(e))return null;const[o,s]=e.split(Ahe);if(!o)return null;const r=o.split("-").map(f=>Number.parseInt(f,10));if(r.filter(f=>!isNaN(f)).length!==3)return null;const[i,a,l]=r,u=new Date(i,a-1,l);if(u.getFullYear()!==i||u.getMonth()!==a-1||u.getDate()!==l||!s&&t)return null;if(!s||s==="00:00:00")return u;const[c,d,h]=s.split(":").map(f=>Number.parseInt(f,10));if(c>=0&&c<24)u.setHours(c);else if(t)return null;if(d>=0&&d<60)u.setMinutes(d);else if(t)return null;if(h>=0&&h<60)u.setSeconds(h);else if(t)return null;return u}function j_(e){const{inputValue:t,allSuggestions:n,hideIrrelevant:o,filterByPercentageOfBestMatch:s}=e;let r=(n??[]).map((l,u)=>({value:l,relevance:Fhe(t,l),idx:u}));if(r.sort((l,u)=>l.relevance-u.relevance),o&&(r=r.filter(l=>l.relevance<Math.max(l.value.length,t.length))),r.length>0&&s&&s>0){const u=r[0].relevance*s;r=r.filter(c=>u-c.relevance<0)}const i=[],a=[];for(const l of r)i.push(l.value),a.push(l.idx);return{values:i,indices:a}}function Fhe(e,t){e.length<t.length&&([e,t]=[t,e]);let n=[],o=[];const s=e.length,r=t.length;for(let a=0;a<=r;a++)n[a]=a;let i=0;for(let a=1;a<=s;a++){o[0]=a;for(let l=1;l<=r;l++){const u=e[a-1],c=t[l-1];if(u.toLocaleLowerCase()===c.toLocaleLowerCase())++i,u===c&&++i,a>1&&l>1&&e[a-2].toLocaleLowerCase()===t[l-2].toLocaleLowerCase()&&(++i,e[a-2]===t[l-2]&&++i),a<s/2-10&&++i,o[l]=n[l-1];else{const d=o[l-1],h=n[l],f=n[l-1];o[l]=1+Math.min(d,h,f)}}[n,o]=[o,n]}return n[r]/(i+1)}function P2(e){var n;return e.altKey||e.ctrlKey||e.metaKey?!1:((n=e.key)==null?void 0:n.length)===1}var K_=!1,rw=0;function Ohe(e){rw>0||(e.addEventListener("keydown",iw),e.addEventListener("mousedown",iw))}function Mhe(e){rw>0||(e.removeEventListener("keydown",iw),e.removeEventListener("mousedown",iw))}function iw(e){const t=K_,n=e.type==="keydown";n&&(e.ctrlKey||e.metaKey||e.altKey)||t!==n&&(K_=n)}function Nhe(e){const t=$o(e);return Ohe(t),rw++,()=>{rw--,Mhe(t)}}function Lhe(){return K_}function Yd(e,t,n=!1){const o=Rce;let s=wB;t&&(s+=", "+t),n&&(s+=', [tabindex="-1"]');const r=Array.prototype.slice.apply(e.querySelectorAll(o)).filter(l=>Pi(l)),i=Array.prototype.slice.apply(e.querySelectorAll(s));return i.length?((l,u)=>l.filter(c=>u.indexOf(c)===-1))(r,i):r}function Ju(e,t=!1,n=!1,o=!1){const s=Yd(e,o?".ag-tab-guard":null,n),r=t?kn(s):s[0];return r?(r.focus({preventScroll:!0}),!0):!1}function Qu(e,t,n,o){const s=Yd(t,n?':not([tabindex="-1"])':null),r=Kn(e);let i;n?i=s.findIndex(l=>l.contains(r)):i=s.indexOf(r);const a=i+(o?-1:1);return a<0||a>=s.length?null:s[a]}function k2(e,t=5){let n=0;for(;e&&H_(e)===null&&++n<=t;)e=e.parentElement;return H_(e)===null?null:e}var Vhe=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",Bhe=class extends jp{constructor(e,t,n){super(t,n),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(Vhe)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:n,labelAlignment:o,disabled:s}=this.config;s!=null&&this.setDisabled(s),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),n!=null&&this.setLabelWidth(n),this.setLabelAlignment(o||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;qo(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(Un(t,!1),Dl(t,"presentation")):(Un(t,!0),Dl(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const n=this.getGui().classList;return n.toggle("ag-label-align-left",e==="left"),n.toggle("ag-label-align-right",e==="right"),n.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(Gy(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return Pp(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},F2=class extends Bhe{constructor(e,t,n,o){super(e,t,n),this.className=o}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:n}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),n!=null&&this.onValueChange(n),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),n=this.getLabel();n==null||n==""||uce(e)!==null?xp(e,""):xp(e,t??"")}setAriaLabel(e){return Bd(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return ki(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function $he(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var ec=class extends F2{constructor(e,t,n="text",o="input"){super(e,(e==null?void 0:e.template)??$he(o),[],t),this.inputType=n,this.displayFieldTag=o,this.eLabel=dt,this.eWrapper=dt,this.eInput=dt}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:n,className:o}=this;e.classList.add(`${o}-label`),t.classList.add(`${o}-input-wrapper`),n.classList.add(`${o}-input`),this.addCss("ag-input-field"),n.id=n.id||`ag-${this.getCompId()}-input`;const{inputName:s,inputWidth:r}=this.config;s!=null&&this.setInputName(s),r!=null&&this.setInputWidth(r),this.addInputListeners(),this.activateTabIndex([n])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,Js(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return Gy(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return Js(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Bd(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Pp(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Js(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Js(this.eInput,"autocomplete",t)}return this}},q_=class extends ec{constructor(e,t="ag-checkbox",n="checkbox"){super(e,t,n),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const n=this.eInput;n.checked=e,n.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,n){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:n});const o=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:o.id,name:o.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),n=this.selected=e.target.checked;this.refreshSelectedClass(n),this.dispatchChange(n,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},Y_={selector:"AG-CHECKBOX",component:q_},Hhe=class extends q_{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},tc=class extends ec{constructor(e,t="ag-text-field",n="text"){super(e,t,n)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const n=this.eInput;return n.value!==e&&(n.value=ft(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=n=>{P2(n)&&n.key&&!e.test(n.key)&&n.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:n=>{var s;const o=(s=n.clipboardData)==null?void 0:s.getData("text");o!=null&&o.split("").some(r=>!e.test(r))&&n.preventDefault()}})}},aw={selector:"AG-INPUT-TEXT-FIELD",component:tc},Ghe=class extends ec{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const n=super.setValue(e,t);return this.eInput.value=e,n}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},Uhe={selector:"AG-INPUT-TEXT-AREA",component:Ghe},X_=class extends tc{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const r=Number.parseFloat(e.value),i=isNaN(r)?"":this.normalizeValue(r.toString());this.value!==i&&this.setValue(i)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:n,max:o,step:s}=this.config;typeof t=="number"&&this.setPrecision(t),typeof n=="number"&&this.setMin(n),typeof o=="number"&&this.setMax(o),typeof s=="number"&&this.setStep(s)}onWheel(e){Kn(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const n=this.precision;if(n==null)return e;if(t){const s=Number.parseFloat(e).toFixed(n);return Number.parseFloat(s).toString()}const o=String(e).split(".");if(o.length>1){if(o[1].length<=n)return e;if(n>0)return`${o[0]}.${o[1].slice(0,n)}`}return o[0]}setMin(e){return this.min===e?this:(this.min=e,Js(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Js(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Js(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(n=>super.setValue(n,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,n){if(ft(n)){let o=this.isScientificNotation(n);if(o&&this.eInput.validity.valid)return e(n);if(!o){n=this.adjustPrecision(n);const s=this.normalizeValue(n);o=n!=s}if(o)return t(n)}return e(n)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},Whe={selector:"AG-INPUT-NUMBER-FIELD",component:X_},zhe=class extends tc{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=Ol();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){Kn(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?er(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,Js(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?er(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,Js(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Js(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return As(this.getValue())??void 0}setDate(e,t){this.setValue(er(e??null,this.includeTime),t)}},O2={selector:"AG-INPUT-DATE-FIELD",component:zhe},jhe=".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}",Khe="ag-active-item",qhe=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",ref:"eText",children:t}]}),Yhe=class extends jp{constructor(e,t,n){super(qhe(e,t)),this.label=t,this.value=n,this.eText=dt}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(Khe,e),vB(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const n=this.getGui();gce(n,e),pce(n,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>d_(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},Xhe=class extends jp{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(jhe)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case Ve.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const n=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(n)}break;case Ve.DOWN:case Ve.UP:e.preventDefault(),this.navigate(t);break;case Ve.PAGE_DOWN:case Ve.PAGE_UP:case Ve.PAGE_HOME:case Ve.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:n}=e,o=n??t;return this.options.push({value:t,text:o}),this.renderOption(t,o),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();qo(this.getGui()),this.listItems=[],this.refreshAriaRole()}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const n=this.options.findIndex(o=>o.value===e);if(n!==-1){const o=this.options[n];this.value=o.value,this.displayValue=o.text,this.highlightItem(this.listItems[n]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!Pi(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const n=this.getGui(),{scrollTop:o,clientHeight:s}=n,{offsetTop:r,offsetHeight:i}=t;(r+i>o+s||r<o)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){var e,t;(t=(e=this.highlightedItem)==null?void 0:e.tooltipFeature)==null||t.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){var e;(e=this.highlightedItem)==null||e.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const n=new Yhe(this.cssIdentifier,t,e);n.setParentComponent(this);const o=this.createManagedBean(n);this.listItems.push(o),this.getGui().appendChild(o.getGui())}navigate(e){const t=e===Ve.DOWN;let n;const{listItems:o,highlightedItem:s}=this;if(!s)n=t?o[0]:kn(o);else{let i=o.indexOf(s)+(t?1:-1);i=Math.min(Math.max(i,0),o.length-1),n=o[i]}this.highlightItem(n)}navigateToPage(e){const{listItems:t,highlightedItem:n}=this;if(!n||t.length===0)return;const o=t.indexOf(n),s=this.options.length-1,r=t[0].getHeight(),i=Math.floor(this.getGui().clientHeight/r);let a=-1;e===Ve.PAGE_HOME?a=0:e===Ve.PAGE_END?a=s:e===Ve.PAGE_DOWN?a=Math.min(o+i,s):e===Ve.PAGE_UP&&(a=Math.max(o-i,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){Dl(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((n,o)=>{n.setIndex(o+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},Zhe=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.ag-picker-has-focus),&:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:disabled{opacity:.5}}",Jhe={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},Qhe=class extends F2{constructor(e){if(super(e,(e==null?void 0:e.template)||Jhe,(e==null?void 0:e.agComponents)||[],e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=dt,this.eWrapper=dt,this.eDisplayField=dt,this.eIcon=dt,this.registerCSS(Zhe),this.ariaRole=e==null?void 0:e.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:n,variableWidth:o,minPickerWidth:s,maxPickerWidth:r}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!o,n!=null&&this.setPickerMaxHeight(n),s!=null&&this.setPickerMinWidth(s),r!=null&&this.setPickerMaxWidth(r)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:n,inputWidth:o}=this.config;if(n){const s=this.beans.iconSvc.createIconNoSpan(n);s&&this.eIcon.appendChild(s)}o!=null&&this.setInputWidth(o)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),l_(e,!1),this.ariaRole&&Dl(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&(e==null?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case Ve.UP:case Ve.DOWN:case Ve.ENTER:case Ve.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case Ve.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:n,pickerAriaLabelValue:o,modalPicker:s=!0},maxPickerHeight:r,minPickerWidth:i,maxPickerWidth:a,variableWidth:l,beans:u,eWrapper:c}=this,d={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const g=cB(u);this.beforeHidePicker(),g&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(n,o),anchorToElement:c};e.style.position="absolute";const h=u.popupSvc,f=h.addPopup(d);l?(i&&(e.style.minWidth=i),e.style.width=h_(Vy(c)),a&&(e.style.maxWidth=a)):Gy(e,a??Vy(c));const p=r??`${u_(h.getPopupParent())}px`;return e.style.setProperty("max-height",p),this.alignPickerToComponent(),f.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:n,gos:o},eWrapper:s,pickerComponent:r}=this,i=o.get("enableRtl")?"right":"left";n.positionPopupByComponent({type:t,eventSource:s,ePopup:r.getGui(),position:"under",alignSide:i,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();l_(t,e);const n=this.eWrapper.classList;n.toggle("ag-picker-expanded",e),n.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var t;(t=this.pickerComponent)!=null&&t.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return Gy(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},efe=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}",Z_=class extends Qhe{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(efe)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Hy(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:n}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),n&&t==null&&(this.eDisplayField.textContent=n),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new Xhe("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",n),_ce(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:o=>{o==null||o.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){var e;(e=this.listComponent)==null||e.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){var n;const{key:t}=e;switch(t===Ve.TAB&&this.hidePicker(),t){case Ve.ENTER:case Ve.UP:case Ve.DOWN:case Ve.PAGE_UP:case Ve.PAGE_DOWN:case Ve.PAGE_HOME:case Ve.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(n=this.listComponent)==null||n.handleKeyDown(e):super.onKeyDown(e);break;case Ve.ESCAPE:super.onKeyDown(e);break;case Ve.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){var e;return(e=this.listComponent)==null||e.clearOptions(),this.setValue(void 0,!0),this}setValue(e,t,n){const{listComponent:o,config:{placeholder:s},eDisplayField:r,tooltipFeature:i}=this;if(this.value===e||!o)return this;if(n||o.setValue(e,!0),o.getValue()===this.getValue())return this;let l=o.getDisplayValue();return l==null&&s&&(l=s),r.textContent=l,i==null||i.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},tfe={selector:"AG-SELECT",component:Z_},nfe=':where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}&:where(button){color:inherit}}:where(.ag-root-wrapper,ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',J_=typeof window!="object"||!((GG=(HG=window==null?void 0:window.document)==null?void 0:HG.fonts)!=null&&GG.forEach),Xd=(e,t,n,o,s,r)=>{if(J_)return;o&&(e=`@layer ${CSS.escape(o)} { ${e} }`);let i=Zd.map.get(t);if(i||(i=[],Zd.map.set(t,i)),i.some(c=>c.css===e))return;const a=document.createElement("style");r&&a.setAttribute("nonce",r),a.dataset.agGlobalCss=n,a.textContent=e;const l={css:e,el:a,priority:s};let u;for(const c of i){if(c.priority>s)break;u=c}if(u){u.el.insertAdjacentElement("afterend",a);const c=i.indexOf(u);i.splice(c+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),i.push(l)},M2=(e,t,n,o)=>{Xd(nfe,e,"shared",t,0,n),o==null||o.forEach((s,r)=>s.forEach(i=>Xd(i,e,r,t,0,n)))},ofe=e=>{Zd.grids.add(e)},sfe=e=>{if(Zd.grids.delete(e),Zd.grids.size===0){Zd.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},N2,Zd=(N2=typeof window=="object"?window:{}).agStyleInjectionState??(N2.agStyleInjectionState={map:new WeakMap,grids:new Set}),Li=e=>new L2(e),Ml="$default",rfe=0,L2=class{constructor({feature:e,params:t,modeParams:n={},css:o,cssImports:s}){this.feature=e,this.css=o,this.cssImports=s,this.modeParams={[Ml]:{...n[Ml]??{},...t??{}},...n}}use(e,t,n){let o=this._inject;if(o==null){let{css:s}=this;if(s){const r=`ag-theme-${this.feature??"part"}-${++rfe}`;typeof s=="function"&&(s=s()),s=`:where(.${r}) {
|
|
196
196
|
${s}
|
|
@@ -250,7 +250,7 @@ See ${WB(e,t)}`;return Array.isArray(o)?o.concat(r):[o,r]}var Abe={1:"Charting A
|
|
|
250
250
|
`)}checkProperties(e,t,n,o,s){const r=["__ob__","__v_skip","__metadata__"],i=Zbe(Object.getOwnPropertyNames(e),[...r,...t,...n],n),a=Object.keys(i);for(const l of a){const u=i[l];let c=`invalid ${o} property '${l}' did you mean any of these: ${u.slice(0,8).join(", ")}.`;n.includes("context")&&(c+=`
|
|
251
251
|
If you are trying to annotate ${o} with application data, use the '${o}.context' property instead.`),Vp(c)}if(a.length>0&&s){const l=this.beans.frameworkOverrides.getDocLink(s);Vp(`to see all the valid ${o} properties please check: ${l}`)}}};function Zbe(e,t,n){const o={},s=e.filter(r=>!t.some(i=>i===r));if(s.length>0)for(const r of s)o[r]=j_({inputValue:r,allSuggestions:n}).values;return o}var Jbe=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),Qbe={moduleName:"Validation",version:ct,beans:[Xbe]};function UH(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var eSe=class extends qe{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=["excludeChildrenWhenTreeDataFiltering"]}wireBeans(e){this.filterManager=e.filterManager}execute(e){const{changedPath:t}=e;this.filter(t)}filter(e){var n;const t=!!((n=this.filterManager)!=null&&n.isChildFilterPresent());this.filterNodes(t,e)}filterNodes(e,t){const n=(o,s)=>{o.hasChildren()&&e&&!s?o.childrenAfterFilter=o.childrenAfterGroup.filter(r=>{const i=r.childrenAfterFilter&&r.childrenAfterFilter.length>0,a=r.data&&this.filterManager.doesRowPassFilter({rowNode:r});return i||a}):o.childrenAfterFilter=o.childrenAfterGroup,UH(o)};if(this.doingTreeDataFiltering()){const o=(r,i)=>{if(r.childrenAfterGroup)for(let a=0;a<r.childrenAfterGroup.length;a++){const l=r.childrenAfterGroup[a],u=i||this.filterManager.doesRowPassFilter({rowNode:l});l.childrenAfterGroup?o(r.childrenAfterGroup[a],u):n(l,u)}n(r,i)},s=r=>o(r,!1);t.executeFromRootNode(s)}else{const o=s=>n(s,!1);t.forEachChangedNodeDepthFirst(o,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},tSe=class extends SR{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,n,o,s){this.comp=e;const r=zp(this,this.beans.context,s);this.eButtonShowMainFilter=n,this.eFloatingFilterBody=o,this.setGui(t,r),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(r),this.setupLeft(r),this.setupHover(r),this.setupFocus(r),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(r),this.setupUi(),r.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(r);const i=()=>this.onColDefChanged(r);r.addManagedListeners(this.column,{colDefChanged:i}),r.addManagedEventListeners({filterSwitched:({column:a})=>{a===this.column&&i()}}),r.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,n=e.colDef;return Ot(t.gos,{colDef:n,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,n=!!e.floatingFilter;this.active=t&&n}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=kr("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new eh(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.getLocaleTextFunc();Bd(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){var i;const{beans:t}=this;if(Kn(t)===this.eGui)return;const s=Qu(t,this.eGui,null,e.shiftKey);if(s){(i=t.headerNavigation)==null||i.scrollToColumn(this.column),e.preventDefault(),s.focus();return}const r=this.findNextColumnWithFloatingFilter(e.shiftKey);r&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:r},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let n=this.column;do if(n=e?t.getColBefore(n):t.getColAfter(n),!n)break;while(!n.getColDef().filter||!n.getColDef().floatingFilter);return n}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case Ve.UP:case Ve.DOWN:case Ve.LEFT:case Ve.RIGHT:if(t)return;nc(e);case Ve.ENTER:t&&Ju(this.eGui)&&e.preventDefault();break;case Ve.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const n=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),o=!!e.relatedTarget&&zu(e.relatedTarget,"ag-floating-filter");if(n&&o&&e.target===this.eGui){const s=this.lastFocusEvent,r=!!(s&&s.key===Ve.TAB);if(s&&r){const i=s.shiftKey;Ju(this.eGui,i)}}this.focusThis()}setupHover(e){var t;(t=this.beans.colHover)==null||t.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new bR(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){var e;this.suppressFilterButton=!((e=this.beans.menuSvc)!=null&&e.isFloatingFilterButtonEnabled(this.column)),this.highlightFilterButtonWhenActive=!Qs(this.gos)}setupUserComp(){var t;if(!this.active)return;const e=(t=this.beans.colFilter)==null?void 0:t.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){var t;const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;(t=this.beans.menuSvc)==null||t.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{beans:{colFilter:t},column:n,gos:o}=this,s=r=>{if((r==null?void 0:r.source)==="filterDestroyed"&&(!this.isAlive()||!(t!=null&&t.isAlive())))return;const i=this.comp.getFloatingFilterComp();i&&i.then(a=>{if(a){if(o.get("enableFilterHandlers")){const c=r;let d="filter";c!=null&&c.afterFloatingFilter?d="ui":c!=null&&c.afterDataChange?d="dataChanged":(r==null?void 0:r.source)==="api"&&(d="api"),this.updateFloatingFilterParams(this.userCompDetails,d);return}const l=t==null?void 0:t.getCurrentFloatingFilterParentModel(n),u=r?{...r,columns:r.columns??[],source:r.source==="api"?"api":"columnFilter"}:null;a.onParentModelChanged(l,u)}})};[this.destroySyncListener]=e.addManagedListeners(n,{filterChanged:s}),t!=null&&t.isFilterActive(n)&&s(null)}setupWidth(e){const t=()=>{const n=`${this.column.getActualWidth()}px`;this.comp.setWidth(n)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){var e;if(!this.suppressFilterButton&&this.comp){const t=!!((e=this.beans.filterManager)!=null&&e.isFilterAllowed(this.column));this.comp.setButtonWrapperDisplayed(t),this.highlightFilterButtonWhenActive&&t&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const n=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const o=this.beans.colFilter,s=this.active?o==null?void 0:o.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,r=this.comp.getFloatingFilterComp();!r||!s?this.updateCompDetails(e,s,n):r.then(i=>{!i||o!=null&&o.areFilterCompsDifferent(this.userCompDetails??null,s)?this.updateCompDetails(e,s,n):this.updateFloatingFilterParams(s,"colDef")})}updateCompDetails(e,t,n){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),n&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){var o;if(!e)return;let n=e.params;(o=this.comp.getFloatingFilterComp())==null||o.then(s=>{var r;typeof(s==null?void 0:s.refresh)=="function"&&(this.gos.get("enableFilterHandlers")&&(n={...n,model:Ho(((r=this.beans.colFilter)==null?void 0:r.model)??{},this.column.getColId()),source:t}),s.refresh(n))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function nSe(e,t){var o;const n=e.colModel.getCol(t);if(!n){_n(12,{colKey:t});return}(o=e.menuSvc)==null||o.showColumnMenu({column:n,positionBy:"auto"})}function oSe(e){var t;(t=e.menuSvc)==null||t.hidePopupMenu()}var sSe={moduleName:"SharedMenu",version:ct,beans:[gge],apiFunctions:{showColumnMenu:nSe,hidePopupMenu:oSe}},rSe=class extends Nfe{postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getDefaultPopupParent(){return this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:n,event:o}=e,s=t.getBoundingClientRect(),r=this.getParentRect();this.setAlignedTo(t,n);let i=!1;const a=()=>{const l=this.keepXYWithinBounds(n,s.top-r.top,0),u=n.clientWidth>0?n.clientWidth:200;i||(n.style.minWidth=`${u}px`,i=!0);const d=r.right-r.left-u;let h;return this.gos.get("enableRtl")?(h=p(),h<0&&(h=f(),this.setAlignedStyles(n,"left")),h>d&&(h=0,this.setAlignedStyles(n,"right"))):(h=f(),h>d&&(h=p(),this.setAlignedStyles(n,"right")),h<0&&(h=0,this.setAlignedStyles(n,"left"))),{x:h,y:l};function f(){return s.right-r.left-2}function p(){return s.left-r.left-u}};this.positionPopup({ePopup:n,keepWithinBounds:!0,updatePosition:a,postProcessCallback:()=>this.callPostProcessPopup(e,"subMenu",n,t,o instanceof MouseEvent?o:void 0)})}callPostProcessPopup(e,t,n,o,s){const r=this.gos.getCallback("postProcessPopup");if(r){const{column:i,rowNode:a}=e;r({column:i,rowNode:a,ePopup:n,type:t,eventSource:o,mouseEvent:s})}}getActivePopups(){return this.popupList.map(e=>e.element)}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const n of this.popupList)t.applyThemeClasses(n.wrapper)}}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return La(e)}},Ow={moduleName:"Popup",version:ct,beans:[rSe]},iSe=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper,:where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}:where(.ag-floating-filter-full-body)>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function aSe(e){const t=e.filterManager;return!!(t!=null&&t.isColumnFilterPresent())||!!(t!=null&&t.isAggregateFilterPresent())}function lSe(e,t){var n;return((n=e.filterManager)==null?void 0:n.getColumnFilterInstance(t))??Promise.resolve(void 0)}function uSe(e,t){var o;const n=e.colModel.getColDefCol(t);if(n)return(o=e.colFilter)==null?void 0:o.destroyFilter(n,"api")}function cSe(e,t){e.frameworkOverrides.wrapIncoming(()=>{var n;return(n=e.filterManager)==null?void 0:n.setFilterModel(t)})}function dSe(e){var t;return((t=e.filterManager)==null?void 0:t.getFilterModel())??{}}function hSe(e,t,n){const{gos:o,colModel:s,colFilter:r}=e;n&&!o.get("enableFilterHandlers")&&(Je(288),n=!1);const i=s.getColDefCol(t);return i?(r==null?void 0:r.getModelForColumn(i,n))??null:null}function fSe(e,t,n){var o;return((o=e.filterManager)==null?void 0:o.setColumnFilterModel(t,n))??Promise.resolve()}function pSe(e,t){var o;const n=e.colModel.getCol(t);if(!n){_n(12,{colKey:t});return}(o=e.menuSvc)==null||o.showFilterMenu({column:n,containerType:"columnFilter",positionBy:"auto"})}function gSe(e){var t;(t=e.menuSvc)==null||t.hideFilterMenu()}function mSe(e,t){var o;const n=e.colModel.getCol(t);if(!n){_n(12,{colKey:t});return}return(o=e.colFilter)==null?void 0:o.getHandler(n,!0)}function vSe(e,t){const{colModel:n,colFilter:o,gos:s}=e;if(!s.get("enableFilterHandlers")){Je(287);return}const{colId:r,action:i}=t;if(r){const a=n.getColById(r);a&&(o==null||o.updateModel(a,i))}else o==null||o.updateAllModels(i)}var ySe={filterHandler:()=>({doesFilterPass:()=>!0})},wSe=class extends qe{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...e$},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){var n,o;this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)});const e=this.gos,t={...((o=(n=e.get("initialState"))==null?void 0:n.filter)==null?void 0:o.filterModel)??{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",n){const{colModel:o,dataTypeSvc:s,filterManager:r}=this.beans;if(s!=null&&s.isPendingInference){this.modelUpdates.push({model:e,source:t});return}const i=[],a=this.getModel(!0);if(e){const l=new Set(Object.keys(e));this.allColumnFilters.forEach((u,c)=>{const d=e[c];i.push(this.setModelOnFilterWrapper(u,d)),l.delete(c)}),l.forEach(u=>{const c=o.getColDefCol(u)||o.getCol(u);if(!c){Je(62,{colId:u});return}if(!c.isFilterAllowed()){Je(63,{colId:u});return}const d=this.getOrCreateFilterWrapper(c,!0);if(!d){Je(64,{colId:u});return}i.push(this.setModelOnFilterWrapper(d,e[u],!0))})}else this.model={},this.allColumnFilters.forEach(l=>{i.push(this.setModelOnFilterWrapper(l,null))});Yn.all(i).then(()=>{const l=this.getModel(!0),u=[];this.allColumnFilters.forEach((c,d)=>{const h=a?a[d]:null,f=l?l[d]:null;Dp(h,f)||u.push(c.column)}),u.length>0?r==null||r.onFilterChanged({columns:u,source:t}):n&&this.updateActive("filterChanged")})}getModel(e){var r;const t={},{allColumnFilters:n,initialModel:o,beans:{colModel:s}}=this;if(n.forEach((i,a)=>{const l=this.getModelFromFilterWrapper(i);ft(l)&&(t[a]=l)}),!e)for(const i of Object.keys(o)){const a=o[i];ft(a)&&!n.has(i)&&((r=s.getCol(i))!=null&&r.isFilterAllowed())&&(t[i]=a)}return t}setState(e,t,n="api"){if(this.state.clear(),t)for(const o of Object.keys(t)){const s=t[o];this.state.set(o,{model:Ho(this.model,o),state:s})}this.setModel(e,n,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let n=!1;return e.forEach((o,s)=>{const r=o.state;r!=null&&(n=!0,t[s]=r)}),n?t:void 0}getModelFromFilterWrapper(e){const n=e.column.getColId();if(e.isHandler)return Ho(this.model,n);const o=e.filter;return o?typeof o.getModel!="function"?(Je(66),null):o.getModel():Ho(this.initialModel,n)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){const e=u=>u?u.isFilterActive?u.isFilterActive():(Je(67),!1):!1,{colModel:t,gos:n}=this.beans,o=!!T_(n),s=u=>{if(!u.isPrimary())return!0;const d=!t.isPivotActive();return!u.isValueActive()||!d?!1:t.isPivotMode()?!0:o},r=[],i=[],a=(u,c,d)=>{c&&(s(u)?r.push(d):i.push(d))},l=[];return this.allColumnFilters.forEach(u=>{const c=u.column,d=c.getColId();if(u.isHandler)l.push(Yn.resolve().then(()=>{a(c,this.isHandlerActive(c),{colId:d,isHandler:!0,handler:u.handler,handlerParams:u.handlerParams})}));else{const h=Ll(u);h&&l.push(h.then(f=>{a(c,e(f),{colId:d,isHandler:!1,comp:f})}))}}),Yn.all(l).then(()=>{this.activeAggregateFilters=r,this.activeColumnFilters=i})}updateFilterFlagInColumns(e,t){var o;const n=[];return this.allColumnFilters.forEach(s=>{const r=s.column;if(s.isHandler)n.push(Yn.resolve().then(()=>{this.setColFilterActive(r,this.isHandlerActive(r),e,t)}));else{const i=Ll(s);i&&n.push(i.then(a=>{this.setColFilterActive(r,a.isFilterActive(),e,t)}))}}),(o=this.beans.groupFilter)==null||o.updateFilterFlags(e,t),Yn.all(n)}doFiltersPass(e,t,n){const{data:o,aggData:s}=e,r=n?this.activeAggregateFilters:this.activeColumnFilters,i=n?s:o,a=this.model;for(let l=0;l<r.length;l++){const u=r[l],{colId:c,isHandler:d}=u;if(c!==t)if(d){const{handler:h,handlerParams:f}=u;if(!h.doesFilterPass({node:e,data:i,model:Ho(a,c),handlerParams:f}))return!1}else{const h=u.comp;if(typeof h.doesFilterPass!="function"){_n(91);continue}if(!h.doesFilterPass({node:e,data:i}))return!1}}return!0}getHandlerParams(e){const t=this.allColumnFilters.get(e.getColId());return t!=null&&t.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:n}=this.beans,o=()=>{this.isAlive()&&(n==null||n.onFilterChanged(e))};t.isRefreshInProgress()?setTimeout(o,0):o()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:n}=e,o=t==null?void 0:t.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",n).then(()=>{this.allColumnFilters.forEach(s=>{var a,l,u;const{column:r,isHandler:i}=s;o!==r.getColId()&&(i&&((l=(a=s.handler).onAnyFilterChanged)==null||l.call(a)),(u=Ll(s,i))==null||u.then(c=>{typeof(c==null?void 0:c.onAnyFilterChanged)=="function"&&c.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(n=>{var r,i;const o=n.isHandler;o&&((i=(r=n.handler).onNewRowsLoaded)==null||i.call(r));const s=Ll(n,o);s&&t.push(s.then(a=>{var l;(l=a.onNewRowsLoaded)==null||l.call(a)}))}),Yn.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:n,colModel:o}=this.beans;return(s,r)=>{const i=r?o.getCol(r):e;return i?n.getValue(i,s,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t!=null&&t.isHandler)return this.isHandlerActive(e);const n=t==null?void 0:t.filter;return n?n.isFilterActive():Ho(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=ft(Ho(this.model,e.getColId()));if(t)return t;const n=this.beans.groupFilter;return n!=null&&n.isGroupFilter(e)?n.isFilterActive(e):!1}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?Ll(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const n=Ll(t);return n?n.then(o=>({comp:o,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const n=this.getOrCreateFilterWrapper(e,t);return n!=null&&n.isHandler?n.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let n=this.cachedFilter(e);return!n&&t&&(n=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,n)),n}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>{var n;return(n=this.beans.dataTypeSvc)==null?void 0:n.getBaseDataType(e)},t)}getDefaultFilterFromDataType(e,t=!1){return yde(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":ipe(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,n,o,s,r){const i=()=>{const u=this.createFilterCompParams(e,s,r),c=o(u,s);return bhe(this.beans.userCompFactory,t,c,n)},a=i();return a?{compDetails:a,createFilterUi:u=>(u?i():a).newAgStackInstance()}:null}createFilterInstance(e,t,n,o){var d,h;const s=this.beans.selectableFilter;s!=null&&s.isSelectable(t)&&(t=s.getFilterDef(e,t));const{handler:r,handlerParams:i,handlerGenerator:a}=this.createHandler(e,t,n)??{},l=this.createFilterComp(e,t,n,o,!!r,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:r,handlerGenerator:a,handlerParams:i};const{compDetails:u,createFilterUi:c}=l;return this.isGlobalButtons&&((h=(d=u.params)==null?void 0:d.buttons)!=null&&h.length||Je(281,{colId:e.getColId()})),{compDetails:u,handler:r,handlerGenerator:a,handlerParams:i,createFilterUi:c}}createBaseFilterParams(e,t){const{filterManager:n,rowModel:o}=this.beans;return Ot(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:s=>(n==null?void 0:n.doesRowPassOtherFilters(e.getColId(),s))??!0,rowModel:o})}createFilterCompParams(e,t,n,o){const s=this.filterChangedCallbackFactory(e),r=this.createBaseFilterParams(e,o);if(r.filterChangedCallback=s,r.filterModifiedCallback=o?()=>{}:i=>this.filterModified(e,i),t){const i=r,a=e.getColId(),l=Ho(this.model,a);i.model=l,i.state=this.state.get(a)??{model:l},i.onModelChange=(u,c)=>{this.updateStoredModel(a,u),this.refreshHandlerAndUi(e,u,"ui",!1,c).then(()=>{s({...c,source:"columnFilter"})})},i.onStateChange=u=>{this.updateState(e,u),this.updateOrRefreshFilterUi(e)},i.onAction=(u,c,d)=>{this.updateModel(e,u,c),this.dispatchLocalEvent({type:"filterAction",column:e,action:u,event:d})},i.getHandler=()=>this.getHandler(e,!0),i.onUiChange=u=>this.filterUiChanged(e,u),i.source=n}return r}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,n){const o=t(),s={created:!0,create:t,filterParams:e.params,compDetails:e,promise:o};return o.then(n),s}createFilterWrapper(e){var a;const{compDetails:t,handler:n,handlerGenerator:o,handlerParams:s,createFilterUi:r}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),l=>l),i=e.getColId();if(n)return delete this.initialModel[i],(a=n.init)==null||a.call(n,{...s,source:"init",model:Ho(this.model,i)}),{column:e,isHandler:!0,handler:n,handlerGenerator:o,handlerParams:s,filterUi:this.createFilterUiForHandler(t,r)};if(r){const l={column:e,filterUi:null,isHandler:!1};return l.filterUi=this.createFilterUiLegacy(t,r,u=>{l.filter=u??void 0}),l}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,n){var f;const{gos:o,frameworkOverrides:s,registry:r}=this.beans;let i;const a=p=>{const g=p.filter;if(C2(g)){const v=g.handler;return v||(i=g.doesFilterPass,i?()=>({doesFilterPass:i}):void 0)}return typeof g=="string"?g:void 0},l=o.get("enableFilterHandlers"),u=l?a(t):void 0,c=p=>()=>this.createBean(r.createDynamicBean(p,!0));let d,h;if(typeof u=="string"){const p=(f=o.get("filterHandlers"))==null?void 0:f[u];p!=null?d=p:qfe.has(u)&&(d=c(u),h=u)}else d=u;if(!d){let p;const{compName:g,jsComp:v,fwComp:w}=R2(s,t);g?p=g:v==null&&w==null&&t.filter===!0&&(p=n),h=this.handlerMap[p],h&&(d=c(h))}return d?{filterHandler:d,handlerNameOrCallback:i??h}:l?(io(o)&&Je(277,{colId:e.getColId()}),ySe):void 0}createHandler(e,t,n){const o=this.createHandlerFunc(e,t,n);if(!o)return;const s=k_(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:r,filterHandler:i}=o,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,i,s);return{handler:a,handlerParams:l,handlerGenerator:r??i}}createHandlerFromFunc(e,t,n){const o=e.getColDef(),s=t(Ot(this.gos,{column:e,colDef:o})),r=this.createHandlerParams(e,n);return{handler:s,handlerParams:r}}createHandlerParams(e,t){const n=e.getColDef(),o=e.getColId(),s=this.filterChangedCallbackFactory(e);return Ot(this.gos,{colDef:n,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:r=>{var i;return((i=this.beans.filterManager)==null?void 0:i.doesRowPassOtherFilters(o,r))??!0},onModelChange:(r,i)=>{this.updateStoredModel(o,r),this.refreshHandlerAndUi(e,r,"handler",!1,i).then(()=>{s({...i,source:"columnFilter"})})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:n,groupFilter:o}=this.beans;this.allColumnFilters.forEach((r,i)=>{let a;r.column.isPrimary()?a=t.getColDefCol(i):a=t.getCol(i),!(a&&a===r.column)&&(e.push(r.column),this.disposeFilterWrapper(r,"columnChanged"),this.disposeColumnListener(i))});const s=o&&e.every(r=>o.isGroupFilter(r));e.length>0&&!s&&(n==null||n.onFilterChanged({columns:e,source:"api"}))}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const n=this.beans.groupFilter;return n!=null&&n.isGroupFilter(e)?n.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){const{userCompFactory:n,frameworkOverrides:o,selectableFilter:s}=this.beans,r=h=>{const f=this.getOrCreateFilterUi(e);f!=null&&f.then(p=>{h(Kp(p))})},i=e.getColDef(),a=s!=null&&s.isSelectable(i)?s.getFilterDef(e,i):i,l=dpe(o,a,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",u=this.gos.get("enableFilterHandlers"),c=k_(n,a,this.createFilterCompParams(e,u,"init",!0)),d=Ot(this.gos,{column:e,filterParams:c,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:r,showParentFilter:t});if(u){const h=d,f=e.getColId(),p=this.filterChangedCallbackFactory(e);h.onUiChange=g=>this.floatingFilterUiChanged(e,g),h.model=Ho(this.model,f),h.onModelChange=(g,v)=>{this.updateStoredModel(f,g),this.refreshHandlerAndUi(e,g,"floating",!0,v).then(()=>{p({...v,source:"columnFilter"})})},h.getHandler=()=>this.getHandler(e,!0),h.source="init"}return The(n,i,d,l)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,n,o){const s="paramsUpdated";if(e.isHandler){const r=t.getColId();delete this.initialModel[r],this.state.delete(r);const i=e.filterUi,a=this.createFilterUiForHandler(n,o);e.filterUi=a;const l=this.eventSvc;i!=null&&i.created?i.promise.then(u=>{this.destroyBean(u),l.dispatchEvent({type:"filterDestroyed",source:s,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:s,column:t})}else this.destroyFilter(t,s)}destroyFilter(e,t="api"){const n=e.getColId(),o=this.allColumnFilters.get(n);this.disposeColumnListener(n),delete this.initialModel[n],o&&this.disposeFilterWrapper(o,t).then(s=>{var r;s&&this.isAlive()&&((r=this.beans.filterManager)==null||r.onFilterChanged({columns:[e],source:"api"}))})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let n=!1;const{column:o,isHandler:s,filterUi:r}=e,i=o.getColId();s&&(n=this.isHandlerActive(o),this.destroyBean(e.handler),delete this.model[i],this.state.delete(i));const a=()=>{this.setColFilterActive(o,!1,"filterDestroyed"),this.allColumnFilters.delete(i),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:o})};if(r){if(r.created)return r.promise.then(l=>(n=s?n:!!(l!=null&&l.isFilterActive()),this.destroyBean(l),a(),n));a()}return Yn.resolve(n)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:(t==null?void 0:t.source)??"columnFilter"})}}filterParamsChanged(e,t="api"){var v,w,S,b,y,E;const n=this.allColumnFilters.get(e);if(!n)return;const o=this.beans,s=n.column,r=s.getColDef(),i=s.isFilterAllowed(),a=this.getDefaultFilter(s),l=o.selectableFilter,u=l!=null&&l.isSelectable(r)?l.getFilterDef(s,r):r,c=i?this.createHandlerFunc(s,u,this.getDefaultFilter(s)):void 0,d=!!c,h=n.isHandler;if(h!=d){this.destroyFilter(s,"paramsUpdated");return}const{compDetails:f,createFilterUi:p}=(i?this.createFilterComp(s,u,a,_=>_,d,"colDef"):null)??{compDetails:null,createFilterUi:null},g=(f==null?void 0:f.params)??k_(o.userCompFactory,u,this.createFilterCompParams(s,d,"colDef"));if(h){const _=(c==null?void 0:c.handlerNameOrCallback)??(c==null?void 0:c.filterHandler),I=Ho(this.model,e);if(n.handlerGenerator!=_){const T=n.handler,{handler:F,handlerParams:L}=this.createHandlerFromFunc(s,c.filterHandler,g);n.handler=F,n.handlerParams=L,n.handlerGenerator=_,delete this.model[e],(v=F.init)==null||v.call(F,{...L,source:"init",model:null}),this.destroyBean(T),I!=null&&((w=this.beans.filterManager)==null||w.onFilterChanged({columns:[s],source:t}))}else{const T=this.createHandlerParams(s,f==null?void 0:f.params);n.handlerParams=T,(b=(S=n.handler).refresh)==null||b.call(S,{...T,source:"colDef",model:I})}}if(this.areFilterCompsDifferent(((y=n.filterUi)==null?void 0:y.compDetails)??null,f)||!n.filterUi||!f){this.destroyFilterUi(n,s,f,p);return}n.filterUi.filterParams=g,(E=Ll(n,h))==null||E.then(_=>{(_!=null&&_.refresh?_.refresh(g):!0)===!1?this.destroyFilterUi(n,s,f,p):this.dispatchLocalEvent({type:"filterParamsChanged",column:s,params:g})})}refreshHandlerAndUi(e,t,n,o,s){const r=this.cachedFilter(e);if(!r)return o&&this.getOrCreateFilterWrapper(e,!0),Yn.resolve();if(!r.isHandler)return Yn.resolve();const{filterUi:i,handler:a,handlerParams:l}=r;return Yfe(()=>{if(i){const{created:u,filterParams:c}=i;if(u)return i.promise.then(d=>d?{filter:d,filterParams:c}:void 0);i.refreshed=!0}return Yn.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},n,s)}setColumnFilterWrapper(e,t){const n=e.getColId();this.allColumnFilters.set(n,t),this.allColumnListeners.set(n,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(n)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:n}=e,{componentClass:o}=t;return!(n===o||(n==null?void 0:n.render)&&(o==null?void 0:o.render)&&n.render===o.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){const t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);const n=this.getOrCreateFilterUi(t);return n?new Promise(o=>{n.then(s=>{o(Kp(s))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:n})=>{this.setModelForColumn(e,t).then(()=>n())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:o,model:s}=this,r=e.getColId(),i=o.get(r);return i?i.model??null:Ho(s,r)}const n=this.cachedFilter(e);return n?this.getModelFromFilterWrapper(n):null}setModelForColumn(e,t){var n;if((n=this.beans.dataTypeSvc)!=null&&n.isPendingInference){let o=()=>{};const s=new Promise(r=>{o=r});return this.columnModelUpdates.push({key:e,model:t,resolve:o}),s}return new Promise(o=>{this.setModelForColumnLegacy(e,t).then(s=>o(s))})}getStateForColumn(e){return this.state.get(e)??{model:Ho(this.model,e)}}setModelForColumnLegacy(e,t){const n=this.beans.colModel.getColDefCol(e),o=n?this.getOrCreateFilterWrapper(n,!0):null;return o?this.setModelOnFilterWrapper(o,t):Yn.resolve()}setColDefPropsForDataType(e,t,n){var c;const o=e.filter,s=o===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):o;if(typeof s!="string")return;let r,i;const a=this.beans,{filterParams:l,filterValueGetter:u}=e;s==="agMultiColumnFilter"?{filterParams:r,filterValueGetter:i}=((c=a.multiFilter)==null?void 0:c.getParamsForDataType(l,u,t,n))??{}:{filterParams:r,filterValueGetter:i}=ope(s,l,u,t,n,a,this.getLocaleTextFunc()),e.filterParams=r,i&&(e.filterValueGetter=i)}setColFilterActive(e,t,n,o){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",n)),e.dispatchColEvent("filterChanged",n,o)}setModelOnFilterWrapper(e,t,n){return new Yn(o=>{if(e.isHandler){const r=e.column,i=r.getColId(),a=this.model[i];if(this.updateStoredModel(i,t),n&&t===a){o();return}this.refreshHandlerAndUi(r,t,"api").then(()=>o());return}const s=Ll(e);if(s){s.then(r=>{if(typeof(r==null?void 0:r.setModel)!="function"){Je(65),o();return}(r.setModel(t)||Yn.resolve()).then(()=>o())});return}o()})}updateStoredModel(e,t){ft(t)?this.model[e]=t:delete this.model[e];const n=this.state.get(e),o={model:t,state:n==null?void 0:n.state};this.state.set(e,o)}filterModified(e,t){var n;(n=this.getOrCreateFilterUi(e))==null||n.then(o=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:o,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,n){var i;const o=e.getColId(),s=this.cachedFilter(e),r=()=>s==null?void 0:s.filterUi;o$(t,r,()=>Ho(this.model,o),()=>this.state.get(o),a=>this.updateState(e,a),a=>{var l,u;return(u=(l=r())==null?void 0:l.filterParams)==null?void 0:u.onModelChange(a,n)},s!=null&&s.isHandler?(i=s.handler.processModelToApply)==null?void 0:i.bind(s.handler):void 0)}updateAllModels(e,t){const n=[];this.allColumnFilters.forEach((o,s)=>{var i;const r=this.beans.colModel.getColDefCol(s);r&&o$(e,()=>o.filterUi,()=>Ho(this.model,s),()=>this.state.get(s),a=>this.updateState(r,a),a=>{this.updateStoredModel(s,a),this.dispatchLocalEvent({type:"filterAction",column:r,action:e}),n.push(this.refreshHandlerAndUi(r,a,"ui"))},o!=null&&o.isHandler?(i=o.handler.processModelToApply)==null?void 0:i.bind(o.handler):void 0)}),n.length&&Yn.all(n).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();n$(()=>{var n;return(n=this.cachedFilter(e))==null?void 0:n.filterUi},()=>Ho(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:n}=this;for(const s of n)if(s.source==="COLUMN_MENU")return!1;let o=!1;for(const s of e.keys()){const r=e.get(s);if(r.valid===!1)return!1;(r.model??null)!==Ho(t,s)&&(o=!0)}return o}hasUnappliedModel(e){var o;const{model:t,state:n}=this;return(((o=n.get(e))==null?void 0:o.model)??null)!==Ho(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;const n=this.beans.filterPanelSvc;return n!=null&&n.isActive?!!n.getState(e.getColId()):!1}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function CSe(e){var t;return!!((t=e.filterManager)!=null&&t.isAnyFilterPresent())}function bSe(e,t="api"){var n;(n=e.filterManager)==null||n.onFilterChanged({source:t})}var SSe=class extends qe{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:o})=>this.onAdvFilterEnabledChanged(o),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:n}=this;this.alwaysPassFilter=n.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=n.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,n="api"){var o;this.isAdvFilterEnabled()||(o=this.colFilter)==null||o.setState(e,t,n)}setFilterModel(e,t="api",n){var o;if(this.isAdvFilterEnabled()){n||this.warnAdvFilters();return}(o=this.colFilter)==null||o.setModel(e,t)}getFilterModel(){var e;return((e=this.colFilter)==null?void 0:e.getModel())??{}}getFilterState(){var e;return(e=this.colFilter)==null?void 0:e.getState()}isColumnFilterPresent(){var e;return!!((e=this.colFilter)!=null&&e.isFilterPresent())}isAggregateFilterPresent(){var e;return!!((e=this.colFilter)!=null&&e.isAggFilterPresent())}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){var t,n;e?(t=this.colFilter)!=null&&t.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):(n=this.advancedFilter)!=null&&n.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){var e;return!!((e=this.advancedFilter)!=null&&e.isEnabled())}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){T_(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:n,columns:o=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):Yn.resolve()).then(()=>{var r;const s={source:t,type:"filterChanged",columns:o};n&&vs(s,n),this.eventSvc.dispatchEvent(s),(r=this.colFilter)==null||r.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){var e;return!!((e=this.colFilter)!=null&&e.isSuppressFlashingCellsBecauseFiltering())}isQuickFilterPresent(){var e;return!!((e=this.quickFilter)!=null&&e.isFilterPresent())}updateAggFiltering(){this.aggFiltering=!!T_(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,colIdToSkip:e})}doesRowPassAggregateFilters(e){var n;const{rowNode:t}=e;return(n=this.alwaysPassFilter)!=null&&n.call(this,t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){var n;const{rowNode:t}=e;return(n=this.alwaysPassFilter)!=null&&n.call(this,t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterAllowed(e){var t;return this.isAdvFilterEnabled()?!1:!!((t=this.colFilter)!=null&&t.isFilterAllowed(e))}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){var n;if(this.isAdvFilterEnabled()){if((n=this.beans.dataTypeSvc)!=null&&n.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){var e;return this.isAdvFilterEnabled()?!1:!!((e=this.colFilter)!=null&&e.hasFloatingFilters())}getColumnFilterInstance(e){var t;return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):((t=this.colFilter)==null?void 0:t.getFilterInstance(e))??Promise.resolve(void 0)}warnAdvFilters(){Je(68)}setupAdvFilterHeaderComp(e){var t;(t=this.advancedFilter)==null||t.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(const e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){var n;return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):((n=this.colFilter)==null?void 0:n.setModelForColumn(e,t))??Promise.resolve()}},ESe=class extends qe{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){var e;(e=this.hidePopup)==null||e.call(this)}showMenuAfterMouseEvent(e,t,n,o){e&&!e.isColumn||this.showPopup(e,s=>{var r;(r=this.popupSvc)==null||r.positionPopupUnderMouseEvent({column:e,type:n,mouseEvent:t,ePopup:s})},n,t.target,Qs(this.gos),o)}showMenuAfterButtonClick(e,t,n,o){if(e&&!e.isColumn)return;let s=-1,r="left";const i=Qs(this.gos);!i&&this.gos.get("enableRtl")&&(s=1,r="right");const a=i?void 0:4*s,l=i?void 0:4;this.showPopup(e,u=>{var c;(c=this.popupSvc)==null||c.positionPopupByComponent({type:n,eventSource:t,ePopup:u,nudgeX:a,nudgeY:l,alignSide:r,keepWithinBounds:!0,position:"under",column:e})},n,t,i,o)}showPopup(e,t,n,o,s,r){var g;const i=e?this.createBean(new tpe(e,"COLUMN_MENU")):void 0;if(this.activeMenu=i,!(i!=null&&i.hasFilter())||!e){_n(57);return}const a=lo({tag:"div",cls:`ag-menu${s?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:v=>this.trapFocusWithin(v,a)}),a.appendChild(i==null?void 0:i.getGui());let l;const u=()=>i==null?void 0:i.afterGuiDetached(),c=wde(this.gos)?o??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,d=v=>{D$(e,!1,"contextMenu");const w=v instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),w&&o&&Pi(o)){const S=k2(o);S==null||S.focus({preventScroll:!0})}u(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,n,e),r==null||r()},h=this.getLocaleTextFunc(),f=s&&n!=="columnFilter"?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),p=(g=this.popupSvc)==null?void 0:g.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:d,positionCallback:()=>t(a),anchorToElement:c,ariaLabel:f});p&&(this.hidePopup=l=p.hideFunc),i.afterInit().then(()=>{t(a),i.afterGuiAttached({container:n,hidePopup:l})}),D$(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,n,e)}trapFocusWithin(e,t){e.key!==Ve.TAB||e.defaultPrevented||Qu(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),Ju(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,n){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:n??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},_Se=class extends qe{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,n){if(!t)return;const o=e.getColDef(),{selectableFilter:s,valueSvc:r}=this.beans,i=n??(s==null?void 0:s.getFilterValueGetter(e.getColId()))??o.filterValueGetter;return i?this.executeFilterValueGetter(i,t.data,e,t,o):r.getValue(e,t)}executeFilterValueGetter(e,t,n,o,s){const{expressionSvc:r,valueSvc:i}=this.beans,a=Ot(this.gos,{data:t,node:o,column:n,colDef:s,getValue:i.getValueCallback.bind(i,o)});return typeof e=="function"?e(a):r==null?void 0:r.evaluate(e,a)}},RSe={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},TSe=class extends Cn{constructor(){super(RSe,[aw]),this.eFloatingFilterText=dt}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const n=e,o=n.getHandler();if(o.getModelAsString){const s=o.getModelAsString(n.model);this.eFloatingFilterText.setValue(s)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const n=t.getModelAsString(e);this.eFloatingFilterText.setValue(n)}})}refresh(e){this.init(e)}},QR=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const n=e.filterOptions??t;this.filterOptions!==n&&(this.filterOptions=n,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e){if(typeof t=="string")continue;const n=[["displayKey"],["displayName"],["predicate","test"]],o=s=>s.some(r=>t[r]!=null)?!0:(Je(72,{keys:s}),!1);if(!n.every(o)){this.filterOptions=e.filter(s=>s===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const n=t[0];if(typeof n=="string")return n;if(n.displayKey)return n.displayKey;Je(73)}else Je(74)}getCustomOption(e){return this.customFilterOptions[e]}};function ig(e,t,n){return n==null?e.splice(t):e.splice(t,n)}function Mw(e){return e==null||typeof e=="string"&&e.trim().length===0}function DSe(e){return e==="AND"||e==="OR"?e:"AND"}function ISe(e,t,n){if(e==null)return;const{predicate:o}=e;if(o!=null&&!t.some(s=>s==null))return o(t,n)}function xSe(e,t){let n=e.length;return n>t&&(e.splice(t),Je(78),n=t),n}function ag(e,t){const n=t.getCustomOption(e);if(n){const{numberOfInputs:s}=n;return s??1}return e&&["empty","notBlank","blank"].indexOf(e)>=0?0:e==="inRange"?2:1}var eT=class extends cpe{constructor(e,t,n){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=n,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(e){super.setParams(e);const t=new QR;this.optionsFactory=t,t.init(e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e)}commonUpdateSimpleParams(e){this.setNumConditions(e),this.defaultJoinOperator=DSe(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions();const t=this.getGui();this.isReadOnly()?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,n)=>{const o=n===0?e:this.optionsFactory.defaultOption;t.setValue(o,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const n=!e.operator,o=!t.operator;if(!n&&o||n&&!o)return!1;let r;if(n){const i=e,a=t;r=this.areSimpleModelsEqual(i,a)}else{const i=e,a=t;r=i.operator===a.operator&&Fl(i.conditions,a.conditions,(l,u)=>this.areSimpleModelsEqual(l,u))}return r}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),Yn.resolve();if(e.operator){const o=e;let s=o.conditions;s==null&&(s=[],Je(77));const r=xSe(s,this.maxNumConditions),i=this.getNumConditions();if(r<i)this.removeConditionsAndOperators(r);else if(r>i)for(let l=i;l<r;l++)this.createJoinOperatorPanel(),this.createOption();const a=o.operator==="OR";this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),s.forEach((l,u)=>{this.eTypes[u].setValue(l.type,!0),this.setConditionIntoUi(l,u)})}else{const o=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(o.type,!0),this.setConditionIntoUi(o,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),Yn.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(Je(79),t=1),this.maxNumConditions=t;let n=e.numAlwaysVisibleConditions??1;n<1&&(Je(80),n=1),n>t&&(Je(81),n=t),this.numAlwaysVisibleConditions=n}createOption(){const e=this.getGui(),t=this.createManagedBean(new Z_);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const n=this.createEValue();this.eConditionBodies.push(n),e.appendChild(n),this.putOptionsIntoDropdown(t),this.resetType(t);const o=this.getNumConditions()-1;this.forEachPositionInput(o,s=>this.resetInput(s)),this.addChangedListeners(t,o)}createJoinOperatorPanel(){const e=lo({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),n=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const o=this.eJoinPanels.length-1,s=this.joinOperatorId++;this.resetJoinOperatorAnd(t,o,s),this.resetJoinOperatorOr(n,o,s),this.isReadOnly()||(t.onValueChange(this.listener),n.onValueChange(this.listener))}createJoinOperator(e,t,n){const o=this.createManagedBean(new Hhe);e.push(o);const s="ag-filter-condition-operator";return o.addCss(s),o.addCss(`${s}-${n}`),t.appendChild(o.getGui()),o}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const n of t)e.addOption(n);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,n=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:n?this.getLocaleTextFunc()(n.displayKey,n.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let n=0;n<this.getNumConditions();n++)this.isConditionUiComplete(n)?e=n:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const n=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<n){this.removeConditionsAndOperators(n+1);const o=e+1,s=n-o;s>0&&this.removeConditionsAndOperators(o,s),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((o,s)=>{const r=this.isConditionDisabled(s,e);o.setDisabled(r||this.filterListOptions.length<=1),s===1&&(Pp(this.eJoinPanels[0],r),this.eJoinAnds[0].setDisabled(r),this.eJoinOrs[0].setDisabled(r))}),this.eConditionBodies.forEach((o,s)=>{Un(o,this.isConditionBodyVisible(s))});const n=(t??this.getJoinOperator())==="OR";for(const o of this.eJoinAnds)o.setValue(!n,!0);for(const o of this.eJoinOrs)o.setValue(n,!0);this.forEachInput((o,s,r,i)=>{this.setElementDisplayed(o,s<i),this.setElementDisabled(o,this.isConditionDisabled(r,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:n,eConditionBodies:o,eJoinPanels:s,eJoinAnds:r,eJoinOrs:i}=this;this.removeComponents(n,e,t),this.removeElements(o,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(s,a,t),this.removeComponents(r,a,t),this.removeComponents(i,a,t)}removeElements(e,t,n){const o=ig(e,t,n);for(const s of o)ei(s)}removeComponents(e,t,n){const o=ig(e,t,n);for(const s of o)ei(s.getGui()),this.destroyBean(s)}afterGuiAttached(e){var t;if(super.afterGuiAttached(e),this.resetPlaceholder(),!(e!=null&&e.suppressFocus)){let n;if(!this.isReadOnly()){const o=this.getInputs(0)[0];o instanceof ec&&this.isConditionBodyVisible(0)?n=o.getInputElement():n=(t=this.eTypes[0])==null?void 0:t.getFocusableElement()}(n??this.getGui()).focus({preventScroll:!0})}}afterGuiDetached(){var i;super.afterGuiDetached();const e=this.params;if((i=this.beans.colFilter)!=null&&i.shouldKeepStateOnDetach(e.column))return;e.onStateChange({model:e.model});let t=-1,n=-1,o=!1;const s=this.getJoinOperator();for(let a=this.getNumConditions()-1;a>=0;a--)if(this.isConditionUiComplete(a))t===-1&&(t=a,n=a);else{const l=a>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(a-1),u=a<t;(l||u)&&(this.removeConditionsAndOperators(a,1),o=!0,u&&n--)}let r=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),r=!0),this.shouldAddNewConditionAtEnd(n===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),r=!0),r&&this.updateConditionStatusesAndValues(n,s),o&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=n}getModelAsString(e){var t,n;return((n=(t=this.params.getHandler())==null?void 0:t.getModelAsString)==null?void 0:n.call(t,e))??""}getPlaceholderText(e,t){let n=this.translate(e);if(typeof this.filterPlaceholder=="function"){const o=this.eTypes[t].getValue(),s=this.translate(o);n=this.filterPlaceholder({filterOptionKey:o,filterOption:s,placeholder:n})}else typeof this.filterPlaceholder=="string"&&(n=this.filterPlaceholder);return n}resetPlaceholder(){const e=this.getLocaleTextFunc();this.forEachInput((t,n,o,s)=>{if(!(t instanceof ec))return;const r=n===0&&s>1?"inRangeStart":n===0?"filterOoo":"inRangeEnd",i=n===0&&s>1?e("ariaFilterFromValue","Filter from value"):n===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(r,o)),t.setInputAriaLabel(i)})}setElementValue(e,t,n){e instanceof ec&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){y2(e)&&Un(e.getGui(),t)}setElementDisabled(e,t){y2(e)&&Pp(e.getGui(),t)}attachElementOnChange(e,t){e instanceof ec&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,n)=>{this.forEachPositionTypeInput(n,t,e)})}forEachPositionInput(e,t){const n=this.getConditionType(e);this.forEachPositionTypeInput(e,n,t)}forEachPositionTypeInput(e,t,n){const o=ag(t,this.optionsFactory),s=this.getInputs(e);for(let r=0;r<s.length;r++){const i=s[r];i!=null&&n(i,r,e,o)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return ag(t,this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(n=>n==null))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinAnds.forEach((t,n)=>this.resetJoinOperatorAnd(t,n,this.joinOperatorId+n)),this.eJoinOrs.forEach((t,n)=>this.resetJoinOperatorOr(t,n,this.joinOperatorId+n)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const n=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(n).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,n){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),n)}resetJoinOperatorOr(e,t,n){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),n)}resetJoinOperator(e,t,n,o,s){this.updateJoinOperatorDisabled(e.setValue(n,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${s}`).setLabel(o),t)}updateJoinOperatorsDisabled(){const e=(t,n)=>this.updateJoinOperatorDisabled(t,n);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const n=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((o,s,r)=>{r===t&&this.setElementValue(o,n[s]!=null?n[s]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,n,o)=>{this.setElementValue(t,n===0&&o===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,n=>{this.attachElementOnChange(n,this.listener)}))}hasInvalidInputs(){return!1}isReadOnly(){return!!this.params.readOnly}},WH=class{constructor(e,t,n,o,s,r){this.alive=!0,this.context=e,this.eParent=s;const i=She(t,n,o);i&&i.newAgStackInstance().then(a=>{var c,d;if(!this.alive){e.destroyBean(a);return}if(this.dateComp=a,!a)return;s.appendChild(a.getGui()),(c=a==null?void 0:a.afterGuiAttached)==null||c.call(a);const{tempValue:l,disabled:u}=this;l&&a.setDate(l),u!=null&&((d=a.setDisabled)==null||d.call(a,u)),r==null||r(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){var n;const t=this.dateComp;t?(n=t.setDisabled)==null||n.call(t,e):this.disabled=e}setDisplayed(e){Un(this.eParent,e)}setInputPlaceholder(e){var t,n;(n=(t=this.dateComp)==null?void 0:t.setInputPlaceholder)==null||n.call(t,e)}setInputAriaLabel(e){var t,n;(n=(t=this.dateComp)==null?void 0:t.setInputAriaLabel)==null||n.call(t,e)}afterGuiAttached(e){var t,n;(n=(t=this.dateComp)==null?void 0:t.afterGuiAttached)==null||n.call(t,e)}updateParams(e){var t,n;(n=(t=this.dateComp)==null?void 0:t.refresh)==null||n.call(t,e)}},tT=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function zH(e,t){const{dateFrom:n,dateTo:o,type:s}=e||{};return[n&&As(n,void 0,!0)||null,o&&As(o,void 0,!0)||null].slice(0,ag(s,t))}var jH=1e3,KH=1/0,ASe=class extends eT{constructor(){super("dateFilter",zH,tT),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=jH,this.maxValidYear=KH,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(l,u)=>{const c=e[l];if(c!=null)if(isNaN(c))Je(82,{param:l});else return c==null?u:Number(c);return u},n=t("minValidYear",jH),o=t("maxValidYear",KH);this.minValidYear=n,this.maxValidYear=o,n>o&&Je(83);const{minValidDate:s,maxValidDate:r}=e,i=s instanceof Date?s:As(s);this.minValidDate=i;const a=r instanceof Date?r:As(r);this.maxValidDate=a,i&&a&&i>a&&Je(84)}createDateCompWrapper(e){const{beans:{userCompFactory:t,context:n,gos:o},params:s}=this,r=new WH(n,t,s.colDef,Ot(o,{onDateChanged:()=>this.onUiChanged(),filterParams:s,location:"filter"}),e);return this.addDestroyFunc(()=>r.destroy()),r}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=lo({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,n,o){const s=lo({tag:"div",cls:`ag-filter-${o} ag-filter-date-${o}`});t.push(s),e.appendChild(s),n.push(this.createDateCompWrapper(s))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),ig(this.eConditionPanelsFrom,e,t),ig(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,n){const o=ig(e,t,n);for(const s of o)s.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:n,minValidYear:o,maxValidYear:s}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<o)return!1;if(n){if(e>n)return!1}else if(e.getUTCFullYear()>s)return!1;return!0}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachInput((n,o,s,r)=>{s!==e||!t||o>=r||(t=t&&this.isValidDateValue(n.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),n={},o=this.getValues(e),s=this.params.useIsoSeparator?"T":" ";return o.length>0&&(n.dateFrom=er(o[0],!0,s)),o.length>1&&(n.dateTo=er(o[1],!0,s)),{dateFrom:null,dateTo:null,filterType:this.filterType,type:t,...n}}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),n=e("ariaFilterValue","Filter Value");this.forEachInput(o=>{o.setInputPlaceholder(t),o.setInputAriaLabel(n)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(n,o,s,r)=>{o<r&&t.push(n.getDate())}),t}translate(e){return e==="lessThan"?super.translate("before"):e==="greaterThan"?super.translate("after"):super.translate(e)}},qH=class extends qe{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,n=new QR;this.optionsFactory=n,n.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(n,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source==="colDef"){const t=e.filterParams,n=this.optionsFactory;n.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:n,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(t==null)return!0;const{operator:n}=t,o=[];if(n){const i=t;o.push(...i.conditions??[])}else o.push(t);const s=n&&n==="OR"?"some":"every",r=this.params.getValue(e.node);return o[s](i=>this.individualConditionPasses(e,i,r))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:n,maxNumConditions:o}}=e;if(t==null)return;let r=u$(t)?t.conditions:[t];const i=(n==null?void 0:n.map(c=>typeof c=="string"?c:c.displayKey))??this.defaultOptions;if(!(!r||r.every(c=>i.find(d=>d===c.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let l=!1;const u=this.filterType;if((r&&!r.every(c=>c.filterType===u)||t.filterType!==u)&&(r=r.map(c=>({...c,filterType:u})),l=!0),typeof o=="number"&&r&&r.length>o&&(r=r.slice(0,o),l=!0),l){const c=r.length>1?{...t,filterType:u,conditions:r}:{...r[0],filterType:u};this.params={...e,model:c},e.onModelChange(c)}}individualConditionPasses(e,t,n){const o=this.optionsFactory,s=this.mapValuesFromModel(t,o),r=o.getCustomOption(t.type),i=ISe(r,s,n);return i??(n==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(s,n,t,e))}},YH=class extends qH{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:n,includeBlanksInGreaterThan:o,includeBlanksInLessThan:s,includeBlanksInRange:r}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(n)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(o)return!0;break;case"lessThan":case"lessThanOrEqual":if(s)return!0;break;case"inRange":if(r)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,n){const o=n.type;if(!this.isValid(t))return o==="notEqual"||o==="notBlank";const s=this.comparator(),r=e[0]!=null?s(e[0],t):0;switch(o){case"equals":return r===0;case"notEqual":return r!==0;case"greaterThan":return r>0;case"greaterThanOrEqual":return r>=0;case"lessThan":return r<0;case"lessThanOrEqual":return r<=0;case"inRange":{const i=s(e[1],t);return this.params.filterParams.inRangeInclusive?r>=0&&i<=0:r>0&&i<0}case"blank":return Mw(t);case"notBlank":return!Mw(t);default:return Je(76,{filterModelType:o}),!0}}},XH={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},PSe={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},nT=class extends qe{constructor(e,t,n){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=n}getModelAsString(e,t){const n=this.getLocaleTextFunc(),o=t==="filterToolPanel";if(!e)return o?Vl(this,"filterSummaryInactive"):null;if(e.operator!=null){const r=e,a=(r.conditions??[]).map(u=>this.getModelAsString(u,t)),l=r.operator==="AND"?"andCondition":"orCondition";return a.join(` ${Vl(this,l)} `)}else{if(e.type==="blank"||e.type==="notBlank")return o?Vl(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):n(e.type,e.type);{const r=e,i=this.optionsFactory.getCustomOption(r.type),{displayKey:a,displayName:l,numberOfInputs:u}=i||{};return a&&l&&u===0?n(a,l):this.conditionToString(r,o,r.type==="inRange"||u===2,a,l)}}}updateParams(e){const{optionsFactory:t,filterParams:n}=e;this.optionsFactory=t,this.filterParams=n}conditionForToolPanel(e,t,n,o,s,r){let i;const a=this.getTypeKey(e);return a&&(i=Vl(this,a)),s&&r&&(i=this.getLocaleTextFunc()(s,r)),i!=null?t?`${i} ${Vl(this,"filterSummaryInRangeValues",[n(),o()])}`:`${i} ${n()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},ZH=class extends nT{constructor(e,t){super(e,t,n=>{const{dataTypeSvc:o,valueSvc:s}=this.beans,r=t.column,i=o==null?void 0:o.getDateFormatterFunction(r),a=i?i(n??void 0):n;return s.formatValue(r,null,a)}),this.filterTypeKeys=XH}conditionToString(e,t,n,o,s){const{type:r}=e,i=As(e.dateFrom),a=As(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,u=t?this.formatValue.bind(this):h=>z_(h,l),c=()=>i!==null?u(i):"null",d=()=>a!==null?u(a):"null";if(t){const h=this.conditionForToolPanel(r,n,c,d,o,s);if(h!=null)return h}return n?`${c()}-${d()}`:i!=null?u(i):`${r}`}};function kSe(e,t){const n=t;return n<e?-1:n>e?1:0}var FSe=class extends YH{constructor(){super(zH,tT),this.filterType="date",this.FilterModelFormatterClass=ZH}comparator(){return this.params.filterParams.comparator??kSe}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}},JH=class extends Cn{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let n;t?n=e.conditions[0]:n=e,this.lastType=n.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const n=e;return this.isTypeEditable(n.type)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){const n=e;this.onModelUpdated(n.model)}}setParams(e){const t=new QR;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const n=this.optionsFactory.defaultOption;t||(this.lastType=n),this.readOnly=!!e.filterParams.readOnly;const o=this.isTypeEditable(n);this.setEditable(o)}refresh(e){this.params=e;const t=e,n=this.reactive;if((!n||t.source==="colDef")&&this.updateParams(e),n){const{source:o,model:s}=t;if(o==="dataChanged"||o==="ui")return;this.onModelUpdated(s)}}updateParams(e){const t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t!=null&&t.afterFloatingFilter||t!=null&&t.afterDataChange||this.onModelUpdated(e)}hasSingleInput(e){var n;const t=(n=this.optionsFactory.getCustomOption(e))==null?void 0:n.numberOfInputs;return t==null||t==1}isTypeEditable(e){const t=["inRange","empty","blank","notBlank"];return!!e&&!this.readOnly&&this.hasSingleInput(e)&&t.indexOf(e)<0}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},OSe={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},MSe=class extends JH{constructor(){super(OSe,[aw]),this.eReadOnlyText=dt,this.eDateWrapper=dt,this.FilterModelFormatterClass=ZH,this.filterType="date",this.defaultOptions=tT}setParams(e){super.setParams(e),this.createDateComponent();const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const n=e?As(e.dateFrom):null;this.dateComp.setDate(n),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){Un(this.eDateWrapper,e),Un(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const n=t.model,o=er(e),s=o==null?null:{...n??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:o};t.onModelChange(s,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t==null||t.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=iR(e,this.defaultDebounceMs);return Ot(this.gos,{onDateChanged:Yo(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:n,params:o}=this;this.dateComp=new WH(e,t,o.column.getColDef(),this.getDateComponentParams(),n,s=>{s.setInputAriaLabel(this.getAriaLabel(o))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},NSe={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},LSe=class extends Cn{constructor(){super(NSe,[aw]),this.eDateInput=dt,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}setParams(e){var h;const t=this.eDateInput.getInputElement(),n=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=n&&Ol();const{minValidYear:o,maxValidYear:s,minValidDate:r,maxValidDate:i,buttons:a,includeTime:l,colDef:u}=e.filterParams||{},c=this.beans.dataTypeSvc,d=l??((h=c==null?void 0:c.getDateIncludesTimeFlag)==null?void 0:h.call(c,u.cellDataType))??!1;if(n?d?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text",r&&o&&Je(85),i&&s&&Je(86),r&&i){const[f,p]=[r,i].map(g=>g instanceof Date?g:As(g));f&&p&&f.getTime()>p.getTime()&&Je(87)}r?r instanceof Date?t.min=z_(r):t.min=r:o&&(t.min=`${o}-01-01`),i?i instanceof Date?t.max=z_(i):t.max=i:s&&(t.max=`${s}-12-31`),this.isApply=e.location==="floatingFilter"&&!!(a!=null&&a.includes("apply"))}refresh(e){this.params=e,this.setParams(e)}getDate(){return As(this.eDateInput.getValue())}setDate(e){var o;const t=this.params.filterParams.colDef.cellDataType,n=((o=this.beans.dataTypeSvc)==null?void 0:o.getDateIncludesTimeFlag(t))??!1;this.eDateInput.setValue(er(e,n))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e!=null&&e.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){var t;return((t=e==null?void 0:e.filterParams)==null?void 0:t.browserDatePicker)??!0}},oT=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function sT(e){const{allowedCharPattern:t}=e??{};return t??null}function rT(e){return e==null||isNaN(e)?null:e}function QH(e,t){const{filter:n,filterTo:o,type:s}=e||{};return[rT(n),rT(o)].slice(0,ag(s,t))}var VSe=class extends eT{constructor(){super("numberFilter",QH,oT),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}setElementValue(e,t,n){const{numberFormatter:o}=this.params,s=!n&&o?o(t??null):t;super.setElementValue(e,s)}createEValue(){const e=sT(this.params),t=lo({tag:"div",cls:"ag-filter-body",role:"presentation"});return this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,n,o){const s=this.createManagedBean(o?new tc({allowedCharPattern:o}):new X_);s.addCss(`ag-filter-${n}`),s.addCss("ag-filter-filter"),t.push(s),e.appendChild(s.getGui())}removeEValues(e,t){const n=o=>this.removeComponents(o,e,t);n(this.eValuesFrom),n(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(n,o,s,r)=>{o<r&&t.push(rT(this.stringToFloat(n.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}stringToFloat(e){if(typeof e=="number")return e;let t=Ia(e);t!=null&&t.trim()===""&&(t=null);const n=this.params.numberParser;return n?n(t):t==null||t.trim()==="-"?null:Number.parseFloat(t)}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(n.filter=o[0]),o.length>1&&(n.filterTo=o[1]),n}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{t.getInputElement().validity.valid||(e=!0)}),e}},eG=class extends nT{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=XH}conditionToString(e,t,n,o,s){const{filter:r,filterTo:i,type:a}=e,l=this.formatValue.bind(this);if(t){const u=this.conditionForToolPanel(a,n,()=>l(r),()=>l(i),o,s);if(u!=null)return u}return n?`${l(r)}-${l(i)}`:r!=null?l(r):`${a}`}},BSe=class extends YH{constructor(){super(QH,oT),this.filterType="number",this.FilterModelFormatterClass=eG}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},tG=class extends qe{constructor(e){super(),this.params=e,this.eInput=dt,this.onValueChanged=()=>{}}setupGui(e){var o;this.eInput=this.createManagedBean(new tc((o=this.params)==null?void 0:o.config));const t=this.eInput.getGui();e.appendChild(t);const n=s=>this.onValueChanged(s);this.addManagedListeners(t,{input:n,keydown:n})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t}){const{eInput:n}=this;n.setInputAriaLabel(e),t!==void 0&&n.setAutoComplete(t)}};function iT(e){const t=e==null?void 0:e.trim();return t===""?e:t}function nG(e,t){const{filter:n,filterTo:o,type:s}=e||{};return[n||null,o||null].slice(0,ag(s,t))}var $Se={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},oG=class extends JH{constructor(){super(...arguments),this.eFloatingFilterInputContainer=dt,this.defaultDebounceMs=500}postConstruct(){this.setTemplate($Se)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){const t=e.browserAutoComplete??!1,{inputSvc:n,defaultDebounceMs:o,readOnly:s}=this;if(n.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:t}),this.applyActive=hw(e.filterParams),!s){const r=iR(e.filterParams,o),i=Yo(this,this.syncUpWithParentFilter.bind(this),r);n.setValueChangedListener(i)}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,n=t.getValue();qo(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(n,!0)}syncUpWithParentFilter(e){const t=e.key===Ve.ENTER,n=this.reactive;if(n&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:o,params:s,lastType:r}=this;let i=o.getValue();if(s.filterParams.trimInput&&(i=iT(i),o.setValue(i,!0)),n){const a=s,l=a.model,u=this.convertValue(i),c=u==null?null:{...l??{filterType:this.filterType,type:r??this.optionsFactory.defaultOption},filter:u};a.onModelChange(c,{afterFloatingFilter:!0})}else s.parentFilterInstance(a=>{a==null||a.onFloatingFilterChanged(r||null,i||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},HSe=class extends qe{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new X_),this.eTextInput=this.createManagedBean(new tc),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),n=this.eTextInput.getGui();e.appendChild(t),e.appendChild(n),this.setupListeners(t,o=>this.onValueChanged(o)),this.setupListeners(n,o=>this.onValueChanged(o))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams(e){this.setAriaLabel(e.ariaLabel),e.autoComplete!==void 0&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},GSe=class extends oG{constructor(){super(...arguments),this.FilterModelFormatterClass=eG,this.filterType="number",this.defaultOptions=oT}updateParams(e){sT(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=sT(e.filterParams),this.allowedCharPattern?this.createManagedBean(new tG({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new HSe)}convertValue(e){return e?Number(e):null}},aT=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],USe=class extends eT{constructor(){super("textFilter",nG,aT),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(n.filter=o[0]),o.length>1&&(n.filterTo=o[1]),n}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(n,o,s,r)=>{o<r&&t.push(Ia(n.getValue()))}),t}createEValue(){const e=lo({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:n}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,n,"to"),e}createFromToElement(e,t,n){const o=this.createManagedBean(new tc);o.addCss(`ag-filter-${n}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui())}removeEValues(e,t){const n=r=>this.removeComponents(r,e,t),{eValuesFrom:o,eValuesTo:s}=this;n(o),n(s)}},sG=class extends nT{constructor(){super(...arguments),this.filterTypeKeys=PSe}conditionToString(e,t,n,o,s){const{filter:r,filterTo:i,type:a}=e;if(t){const l=c=>()=>Vl(this,"filterSummaryTextQuote",[c]),u=this.conditionForToolPanel(a,n,l(r),l(i),o,s);if(u!=null)return u}return n?`${r}-${i}`:r!=null?`${r}`:`${a}`}},WSe=({filterOption:e,value:t,filterText:n})=>{if(n==null)return!1;switch(e){case"contains":return t.includes(n);case"notContains":return!t.includes(n);case"equals":return t===n;case"notEqual":return t!=n;case"startsWith":return t.indexOf(n)===0;case"endsWith":{const o=t.lastIndexOf(n);return o>=0&&o===t.length-n.length}default:return!1}},zSe=e=>e,jSe=e=>e==null?null:e.toString().toLowerCase(),KSe=class extends qH{constructor(){super(nG,aT),this.filterType="text",this.FilterModelFormatterClass=sG}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??WSe,this.formatter=t.textFormatter??(t.caseSensitive?zSe:jSe)}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,n,o){const s=e.map(h=>this.formatter(h))||[],r=this.formatter(t),{api:i,colDef:a,column:l,context:u,filterParams:{textFormatter:c}}=this.params;if(n.type==="blank")return Mw(t);if(n.type==="notBlank")return!Mw(t);const d={api:i,colDef:a,column:l,context:u,node:o.node,data:o.data,filterOption:n.type,value:r,textFormatter:c};return s.some(h=>this.matcher({...d,filterText:h}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=n=>{const o={...n},{filter:s,filterTo:r}=n;return s&&(o.filter=iT(s)??null),r&&(o.filterTo=iT(r)??null),o};return u$(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},qSe=class extends oG{constructor(){super(...arguments),this.FilterModelFormatterClass=sG,this.filterType="text",this.defaultOptions=aT}createFloatingFilterInputService(){return this.createManagedBean(new tG)}};function YSe(e){var t;return!!((t=e.quickFilter)!=null&&t.isFilterPresent())}function XSe(e){var t;return(t=e.quickFilter)==null?void 0:t.getText()}function ZSe(e){var t;(t=e.quickFilter)==null||t.resetCache()}var JSe=class extends qe{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",n=>this.setFilter(n.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){var l;const{autoColSvc:e,colModel:t,gos:n,pivotResultCols:o}=this.beans,s=t.isPivotMode(),r=e==null?void 0:e.getColumns(),i=t.getColDefCols();let a=(s&&!n.get("applyQuickFilterBeforePivotOrAgg")?(l=o==null?void 0:o.getPivotResultCols())==null?void 0:l.list:i)??[];r&&(a=a.concat(r)),this.colsToUse=n.get("includeHiddenColumnsInQuickFilter")?a:a.filter(u=>u.isVisible()||u.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(n=>t?this.doesRowPassCache(e,n):this.doesRowPassNoCache(e,n))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return ft(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){Je(70,{newFilter:e});return}const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),n=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,n&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(n=>{const o=this.getTextForColumn(n,e);return ft(o)&&o.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let n;e?(this.checkGenerateAggText(t),n=t.quickFilterAggregateText):n=this.getAggText(t);const{quickFilterParts:o,matcher:s}=this;return s(o,n)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let n=this.beans.filterValueSvc.getValue(e,t);const o=e.getColDef();if(o.getQuickFilterText){const s=Ot(this.gos,{value:n,node:t,data:t.data,column:e,colDef:o});n=o.getQuickFilterText(s)}return ft(n)?n.toString().toUpperCase():null}getAggText(e){const t=[];for(const n of this.colsToUse){const o=this.getTextForColumn(n,e);ft(o)&&t.push(o)}return t.join(`
|
|
252
252
|
`)}},QSe={moduleName:"ClientSideRowModelFilter",version:ct,rowModels:["clientSide"],beans:[eSe]},lT={moduleName:"FilterCore",version:ct,beans:[SSe],apiFunctions:{isAnyFilterPresent:CSe,onFilterChanged:bSe},css:[iSe],dependsOn:[QSe]},rG={moduleName:"FilterValue",version:ct,beans:[_Se]},Nw={moduleName:"ColumnFilter",version:ct,beans:[wSe,ESe],dynamicBeans:{headerFilterCellCtrl:tSe},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:aSe,getColumnFilterInstance:lSe,destroyFilter:uSe,setFilterModel:cSe,getFilterModel:dSe,getColumnFilterModel:hSe,setColumnFilterModel:fSe,showColumnFilter:pSe,hideColumnFilter:gSe,getColumnFilterHandler:mSe,doFilterAction:vSe},dependsOn:[lT,Ow,rG,sSe]},eEe={moduleName:"CustomFilter",version:ct,userComponents:{agReadOnlyFloatingFilter:TSe},dependsOn:[Nw]},tEe={moduleName:"TextFilter",version:ct,dependsOn:[Nw],userComponents:{agTextColumnFilter:{classImp:USe,params:{useForm:!0}},agTextColumnFloatingFilter:qSe},dynamicBeans:{agTextColumnFilterHandler:KSe}},nEe={moduleName:"NumberFilter",version:ct,dependsOn:[Nw],userComponents:{agNumberColumnFilter:{classImp:VSe,params:{useForm:!0}},agNumberColumnFloatingFilter:GSe},dynamicBeans:{agNumberColumnFilterHandler:BSe}},oEe={moduleName:"DateFilter",version:ct,dependsOn:[Nw],userComponents:{agDateColumnFilter:{classImp:ASe,params:{useForm:!0}},agDateInput:LSe,agDateColumnFloatingFilter:MSe},dynamicBeans:{agDateColumnFilterHandler:FSe}},sEe={moduleName:"QuickFilterCore",version:ct,rowModels:["clientSide"],beans:[JSe],dependsOn:[lT,rG]},rEe={moduleName:"QuickFilter",version:ct,apiFunctions:{isQuickFilterPresent:YSe,getQuickFilter:XSe,resetQuickFilter:ZSe},dependsOn:[sEe]},iEe={moduleName:"ExternalFilter",version:ct,dependsOn:[lT]},aEe=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",uT=(e,t,n)=>{var a,l,u;const{editModelSvc:o}=e,s=(l=(a=o==null?void 0:o.getCellValidationModel())==null?void 0:a.getCellValidation(t))==null?void 0:l.errorMessages,r=(u=o==null?void 0:o.getRowValidationModel().getRowValidation(t))==null?void 0:u.errorMessages,i=s||r;return i!=null&&i.length?i.join(n("tooltipValidationErrorSeparator",". ")):void 0},lEe=class extends qe{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,n,o){e&&t.destroyBean(e);const s=this.gos,r=JR(s),{column:i,eGui:a}=t,l=i.getColDef();!o&&r&&!l.headerComponent&&(o=Hy(()=>a.querySelector(".ag-header-cell-text")));const u="header",d=this.beans.colNames.getDisplayNameForColumn(i,"header",!0),h=n??d,f={getGui:()=>a,getLocation:()=>u,getTooltipValue:()=>{var g;return n??((g=l==null?void 0:l.headerTooltipValueGetter)==null?void 0:g.call(l,Ot(s,{location:u,colDef:l,column:i,value:h,valueFormatted:d})))??(l==null?void 0:l.headerTooltip)},shouldDisplayTooltip:o,getAdditionalParams:()=>({column:i,colDef:i.getColDef()})};let p=this.createTooltipFeature(f);return p&&(p=t.createBean(p),t.setRefreshFunction("tooltip",()=>p.refreshTooltip())),p}setupHeaderGroupTooltip(e,t,n,o){e&&t.destroyBean(e);const s=this.gos,r=JR(s),{column:i,eGui:a}=t,l=i.getColGroupDef();!o&&r&&!(l!=null&&l.headerGroupComponent)&&(o=Hy(()=>a.querySelector(".ag-header-group-text")));const u="headerGroup",d=this.beans.colNames.getDisplayNameForColumnGroup(i,"header"),h=n??d,f={getGui:()=>a,getLocation:()=>u,getTooltipValue:()=>{var g;return n??((g=l==null?void 0:l.headerTooltipValueGetter)==null?void 0:g.call(l,Ot(s,{location:u,colDef:l,column:i,value:h,valueFormatted:d})))??(l==null?void 0:l.headerTooltip)},shouldDisplayTooltip:o,getAdditionalParams:()=>{const g={column:i};return l&&(g.colDef=l),g}},p=this.createTooltipFeature(f);return p&&t.createBean(p)}enableCellTooltipFeature(e,t,n){const{beans:o}=this,{gos:s,editSvc:r}=o,{column:i,rowNode:a}=e;let l="cell";const u=()=>{const f=!!!(r!=null&&r.isEditing(e))&&uT(o,e,this.getLocaleTextFunc());if(f)return l="cellEditor",f;l="cell";const p=i.getColDef(),g=a.data;if(p.tooltipField&&ft(g))return ng(g,p.tooltipField,i.isTooltipFieldContainsDots());const v=p.tooltipValueGetter;return v?v(Ot(s,{location:"cell",colDef:i.getColDef(),column:i,rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,value:e.value,valueFormatted:e.valueFormatted})):null},c=JR(s);n||(c&&!e.isCellRenderer()?n=()=>{const h=!!(r!=null&&r.isEditing(e));if(!h&&uT(o,e,this.getLocaleTextFunc()))return!0;if(!i.isTooltipEnabled())return!1;const g=Hy(()=>{const v=e.eGui;return v.children.length===0?v:v.querySelector(".ag-cell-value")});return!h&&g()}:n=()=>!(r!=null&&r.isEditing(e)));const d={getGui:()=>e.eGui,getLocation:()=>l,getTooltipValue:t!=null?()=>t:u,shouldDisplayTooltip:n,getAdditionalParams:()=>({column:i,colDef:i.getColDef(),rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(d,o)}setupFullWidthRowTooltip(e,t,n,o){const s={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>n,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:o},r=this.beans,i=r.context;e&&t.destroyBean(e,i);const a=this.createTooltipFeature(s,r);if(a)return t.createBean(a,i)}setupCellEditorTooltip(e,t){var a,l;const{beans:n}=this,{context:o}=n,s=((a=t.getValidationElement)==null?void 0:a.call(t,!0))||!((l=t.isPopup)!=null&&l.call(t))&&e.eGui;if(!s)return;const r={getGui:()=>s,getTooltipValue:()=>uT(n,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{var p,g;const{editModelSvc:u}=n,c=(p=u==null?void 0:u.getRowValidationModel())==null?void 0:p.getRowValidationMap(),d=(g=u==null?void 0:u.getCellValidationModel())==null?void 0:g.getCellValidationMap(),h=!!c&&c.size>0,f=!!d&&d.size>0;return h||f}},i=this.createTooltipFeature(r,n);if(i)return e.createBean(i,o)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=ft(t.tooltipField)||ft(t.tooltipValueGetter)||ft(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},uEe=class extends Ffe{createTooltipComp(e,t){const n=Rhe(this.beans.userCompFactory,e);n==null||n.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){var e;(e=this.onColumnMovedEventCallback)==null||e.call(this),this.onColumnMovedEventCallback=void 0}},iG={moduleName:"Tooltip",version:ct,beans:[lEe],dynamicBeans:{tooltipFeature:j2,highlightTooltipFeature:Ofe,tooltipStateManager:uEe},userComponents:{agTooltipComponent:Lfe},dependsOn:[Ow],css:[aEe]},lh=class{constructor(e){this.cellValueChanges=e}},cT=class extends lh{constructor(e,t,n,o){super(e),this.initialRange=t,this.finalRange=n,this.ranges=o}},cEe=10,aG=class{constructor(e){this.actionStack=[],this.maxStackSize=e||cEe,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},dEe=class extends qe{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},n=this.activeCellEdit!==null&&U$(this.activeCellEdit,t),o=this.activeRowEdit!==null&&Ome(this.activeRowEdit,t);if(!(n||o||this.isPasting||this.isRangeInAction))return;const{rowPinned:r,rowIndex:i,column:a,oldValue:l,value:u}=e,c={rowPinned:r,rowIndex:i,columnId:a.getColId(),newValue:u,oldValue:l};this.cellValueChanges.push(c)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const n=e.get("undoRedoCellEditingLimit");if(n<=0)return;this.undoStack=new aG(n),this.redoStack=new aG(n),this.addListeners();const o=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:s=>{s.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:o,newColumnsLoaded:o,columnGroupOpened:o,columnRowGroupChanged:o,columnMoved:o,columnPinned:o,columnVisible:o,rowDragEnd:o}),t.whenReady(this,s=>{this.gridBodyCtrl=s.gridBodyCtrl})}getCurrentUndoStackSize(){var e;return((e=this.undoStack)==null?void 0:e.getCurrentStackSize())??0}getCurrentRedoStackSize(){var e;return((e=this.redoStack)==null?void 0:e.getCurrentStackSize())??0}undo(e){const{eventSvc:t,undoStack:n,redoStack:o}=this;t.dispatchEvent({type:"undoStarted",source:e});const s=this.undoRedo(n,o,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:s})}redo(e){const{eventSvc:t,undoStack:n,redoStack:o}=this;t.dispatchEvent({type:"redoStarted",source:e});const s=this.undoRedo(o,n,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:s})}undoRedo(e,t,n,o,s){if(!e)return!1;const r=e.pop();return r!=null&&r.cellValueChanges?(this.processAction(r,i=>i[o],s),r instanceof cT?this.processRange(r.ranges||[r[n]]):this.processCell(r.cellValueChanges),t.push(r),!0):!1}processAction(e,t,n){for(const o of e.cellValueChanges){const{rowIndex:s,rowPinned:r,columnId:i}=o,a={rowIndex:s,rowPinned:r},l=Va(this.beans,a);l.displayed&&l.setDataValue(i,t(o),n)}}processRange(e){let t;const n=this.beans.rangeSvc;n.removeAllCellRanges(!0),e.forEach((o,s)=>{if(!o)return;const r=o.startRow,i=o.endRow;s===e.length-1&&(t={rowPinned:r.rowPinned,rowIndex:r.rowIndex,columnId:o.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:i.rowIndex,rowEndPinned:i.rowPinned,columnStart:o.startColumn,columns:o.columns};n.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:n,rowPinned:o}=t,s={rowIndex:n,rowPinned:o},r=Va(this.beans,s),i={rowPinned:t.rowPinned,rowIndex:r.rowIndex,columnId:t.columnId};this.setLastFocusedCell(i)}setLastFocusedCell(e){const{rowIndex:t,columnId:n,rowPinned:o}=e,{colModel:s,focusSvc:r,rangeSvc:i}=this.beans,a=s.getCol(n);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const u={rowIndex:t,column:a,rowPinned:o};r.setFocusedCell({...u,forceBrowserFocus:!0}),i==null||i.setRangeToCell(u)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new lh(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const n=new lh(this.cellValueChanges);this.pushActionsToUndoStack(n)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new lh(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new cT(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:n}=this.beans;t&&Aa(n)?e=new cT(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new lh(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:e})=>this.stopBigChange("batchEditing",e),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:e})=>this.stopBigChange("bulkEditing",e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){e==="bulkEditing"?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if(e==="bulkEditing"&&!this.bulkEditing||e==="batchEditing"&&!this.batchEditing||(this.updateBigChange(e,!1),(t==null?void 0:t.length)===0))return;const n=new lh(t??[]);this.pushActionsToUndoStack(n),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},hEe=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}",fEe={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},pEe=class extends Ew{constructor(){super(fEe,[Y_]),this.eEditor=dt}initialiseEditor(e){const t=e.value??void 0,n=this.eEditor;n.setValue(t),n.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(n,{fieldValueChanged:s=>this.setAriaLabel(s.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),n=Ly(t,e),o=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${o} (${n})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,n=this.getValue();return t?t({value:n,internalErrors:null,cellEditorParams:e}):null}},Lw=class extends Ew{constructor(e){super(),this.cellEditorInput=e,this.eEditor=dt}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:n}=this,{cellStartedEdit:o,eventKey:s,suppressPreventDefault:r}=e;n.getInputElement().setAttribute("title",""),t.init(n,e);let i,a=!0;o?(this.focusAfterAttached=!0,s===Ve.BACKSPACE||s===Ve.DELETE?i="":s&&s.length===1?r?a=!1:i=s:(i=t.getStartValue(),s!==Ve.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,i=t.getStartValue()),a&&i!=null&&n.setStartValue(i),this.addGuiEventListener("keydown",l=>{const{key:u}=l;(u===Ve.PAGE_UP||u===Ve.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){var o,s;const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;Ol()||t.getFocusableElement().focus();const n=t.getInputElement();this.highlightAllOnFocus?n.select():(s=(o=this.cellEditorInput).setCaret)==null||s.call(o)}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),n=e.getInputElement();t.focus(),n.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},gEe={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},mEe=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return gEe}getAgComponents(){return[O2]}init(e,t){var i,a;this.eEditor=e,this.params=t;const{min:n,max:o,step:s,colDef:r}=t;n!=null&&e.setMin(n),o!=null&&e.setMax(o),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((a=(i=this.getDataTypeService())==null?void 0:i.getDateIncludesTimeFlag)==null?void 0:a.call(i,r.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:n}=this,{min:o,max:s,getValidationErrors:r}=n;let i=[];const a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(o){const l=o instanceof Date?o:new Date(o);if(t<l){const u=l.toLocaleDateString();i.push(a("minDateValidation",`Date must be after ${u}`,[u]))}}if(s){const l=s instanceof Date?s:new Date(s);if(t>l){const u=l.toLocaleDateString();i.push(a("maxDateValidation",`Date must be before ${u}`,[u]))}}}return i.length||(i=null),r?r({value:t,cellEditorParams:n,internalErrors:i}):i}getValue(){const{eEditor:e,params:t}=this,n=e.getDate();return!ft(n)&&!ft(t.value)?t.value:n??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return er(e,this.includeTime??!1)}},vEe=class extends Lw{constructor(){super(new mEe(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},yEe={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},wEe=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return yEe}getAgComponents(){return[O2]}init(e,t){var i,a;this.eEditor=e,this.params=t;const{min:n,max:o,step:s,colDef:r}=t;n!=null&&e.setMin(n),o!=null&&e.setMax(o),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((a=(i=this.getDataTypeService())==null?void 0:i.getDateIncludesTimeFlag)==null?void 0:a.call(i,r.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,n=e.getInputElement().value,o=this.formatDate(this.parseDate(n??void 0)),{min:s,max:r,getValidationErrors:i}=t;let a=[];if(o){const l=new Date(o),u=this.getLocaleTextFunc();if(s){const c=new Date(s);if(l<c){const d=c.toLocaleDateString();a.push(u("minDateValidation",`Date must be after ${d}`,[d]))}}if(r){const c=new Date(r);if(l>c){const d=c.toLocaleDateString();a.push(u("maxDateValidation",`Date must be before ${d}`,[d]))}}}return a.length||(a=null),i?i({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,n=this.formatDate(t.getDate());return!ft(n)&&!ft(e.value)?e.value:e.parseValue(n??"")}getStartValue(){return er(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):As(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):er(e??null,this.includeTime??!1)??void 0}},CEe=class extends Lw{constructor(){super(new wEe(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},bEe={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},SEe=class extends Ew{constructor(){super(bEe,[Uhe]),this.eEditor=dt}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:n,eventKey:o,maxLength:s,cols:r,rows:i}=e;this.focusAfterAttached=n,t.getInputElement().setAttribute("title",""),t.setMaxLength(s||200).setCols(r||60).setRows(i||10);let a;n?(this.focusAfterAttached=!0,o===Ve.BACKSPACE||o===Ve.DELETE?a="":o&&o.length===1?a=o:(a=this.getStartValue(e),o!==Ve.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=this.getStartValue(e)),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return(t==null?void 0:t.toString())??t}onKeyDown(e){const t=e.key;(t===Ve.LEFT||t===Ve.UP||t===Ve.RIGHT||t===Ve.DOWN||e.shiftKey&&t===Ve.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:n}=this,o=this.getLocaleTextFunc();e.setInputAriaLabel(o("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),n&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:n}=t,o=e.getValue();return!ft(o)&&!ft(n)?n:t.parseValue(o)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:n}=e,o=this.getLocaleTextFunc(),s=this.getValue();let r=[];return typeof s=="string"&&t!=null&&s.length>t&&r.push(o("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),r.length||(r=null),n?n({value:s,internalErrors:r,cellEditorParams:e}):r}},EEe={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},_Ee=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return EEe}getAgComponents(){return[Whe]}init(e,t){this.eEditor=e,this.params=t;const{max:n,min:o,precision:s,step:r}=t;n!=null&&e.setMax(n),o!=null&&e.setMin(o),s!=null&&e.setPrecision(s),r!=null&&e.setStep(r);const i=e.getInputElement();t.preventStepping?e.addManagedElementListeners(i,{keydown:this.preventStepping}):t.showStepperButtons&&i.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:n,getValidationErrors:o}=e,r=this.eEditor.getInputElement().valueAsNumber,i=this.getLocaleTextFunc();let a=[];return typeof r=="number"&&(t!=null&&r<t&&a.push(i("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),n!=null&&r>n&&a.push(i("maxValueValidation",`Must be less than or equal to ${n}.`,[String(n)]))),a.length||(a=null),o?o({value:r,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===Ve.UP||e.key===Ve.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,n=e.getValue();if(!ft(n)&&!ft(t.value))return t.value;let o=t.parseValue(n);if(o==null)return o;if(typeof o=="string"){if(o==="")return null;o=Number(o)}return isNaN(o)?null:o}getStartValue(){return this.params.value}setCaret(){Ol()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},REe=class extends Lw{constructor(){super(new _Ee(()=>this.getLocaleTextFunc()))}},TEe={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},DEe=class extends Ew{constructor(){super(TEe,[tfe]),this.eEditor=dt,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:n,gos:o}=this,{values:s,value:r,eventKey:i}=e;if(Gn(s)){Je(58);return}this.startedByEnter=i!=null?i===Ve.ENTER:!1;let a=!1;s.forEach(d=>{const h={value:d},f=n.formatValue(e.column,null,d),p=f!=null;h.text=p?f:d,t.addOption(h),a=a||r===d}),a?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:u,valueListMaxHeight:c}=e;l!=null&&t.setPickerGap(l),c!=null&&t.setPickerMaxHeight(c),u!=null&&t.setPickerMaxWidth(u),o.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:n}=e,o=this.getValue();let s=[];if(t&&!t.includes(o)){const r=this.getLocaleTextFunc();s.push(r("invalidSelectionValidation","Invalid selection."))}else s=null;return n?n({value:o,internalErrors:s,cellEditorParams:e}):s}},IEe={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},xEe=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return IEe}getAgComponents(){return[aw]}init(e,t){this.eEditor=e,this.params=t;const n=t.maxLength;n!=null&&e.setMaxLength(n)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:n}=e,o=this.getValue(),s=this.getLocaleTextFunc();let r=[];return t!=null&&typeof o=="string"&&o.length>t&&r.push(s("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),r.length||(r=null),n?n({value:o,cellEditorParams:e,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,n=e.getValue();return!ft(n)&&!ft(t.value)?t.value:t.parseValue(n)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){Ol()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),n=ft(t)&&t.length||0;n&&e.getInputElement().setSelectionRange(n,n)}},lG=class extends Lw{constructor(){super(new xEe(()=>this.getLocaleTextFunc()))}};function AEe(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function PEe(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function uG(e,t,n="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,n),"ensureVisible")}function cG(e,t,n){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,n),"ensureVisible")}function kEe(e,t,n=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,n),"ensureVisible")}function FEe(e){var t;(t=e.undoRedo)==null||t.undo("api")}function OEe(e){var t;(t=e.undoRedo)==null||t.redo("api")}function MEe(e,t){var n;return(n=e.editModelSvc)==null?void 0:n.getEditRowDataValue(t,{checkSiblings:!0})}function NEe(e){var o;const t=(o=e.editModelSvc)==null?void 0:o.getEditMap(),n=[];return t==null||t.forEach((s,r)=>{const{rowIndex:i,rowPinned:a}=r;s.forEach((l,u)=>{const{editorValue:c,pendingValue:d,sourceValue:h,state:f}=l,p=Ba(l);let g=c??d;g===Or&&(g=void 0);const v={newValue:g,oldValue:h,state:f,column:u,colId:u.getColId(),colKey:u.getColId(),rowIndex:i,rowPinned:a};(f==="editing"||f==="changed"&&p)&&n.push(v)})}),n}function LEe(e,t=!1){var o;const{editSvc:n}=e;if(n!=null&&n.isBatchEditing()){if(t)for(const s of((o=e.editModelSvc)==null?void 0:o.getEditPositions())??[])s.state==="editing"&&n.revertSingleCellEdit(s);else ic(e,{persist:!0});rh(e,void 0,{cancel:t})}else n==null||n.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function VEe(e,t){var o;const n=qn(e,t);return((o=e.editSvc)==null?void 0:o.isEditing(n))??!1}function BEe(e,t){const{key:n,colKey:o,rowIndex:s,rowPinned:r}=t,{editSvc:i,colModel:a}=e,l=a.getCol(o);if(!l){Je(12,{colKey:o});return}const c=Va(e,{rowIndex:s,rowPinned:r||null});if(!c){Je(290,{rowIndex:s,rowPinned:r});return}if(!l.isCellEditable(c))return;r==null&&cG(e,s),uG(e,o),i==null||i.startEditing({rowNode:c,column:l},{event:n?new KeyboardEvent("keydown",{key:n}):void 0,source:"api"})}function $Ee(e){var t;return((t=e.editSvc)==null?void 0:t.validateEdit())||null}function HEe(e){var t;return((t=e.undoRedo)==null?void 0:t.getCurrentUndoStackSize())??0}function GEe(e){var t;return((t=e.undoRedo)==null?void 0:t.getCurrentRedoStackSize())??0}var UEe={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},WEe=class extends F_{constructor(e){super(UEe),this.params=e}postConstruct(){Yu(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,n=o=>{pR(this.gos,o,t.node,t.column,!0)||t.onKeyDown(o)};this.addManagedElementListeners(e,{keydown:n})}};function zEe(e,{column:t},n,o,s="ui"){var u;if(n instanceof KeyboardEvent&&(n.key===Ve.TAB||n.key===Ve.ENTER||n.key===Ve.F2||n.key===Ve.BACKSPACE&&o))return!0;if((n==null?void 0:n.shiftKey)&&((u=e.rangeSvc)==null?void 0:u.getCellRanges().length)!=0)return!1;const i=t==null?void 0:t.getColDef(),a=jEe(e.gos,i),l=n==null?void 0:n.type;return l==="click"&&(n==null?void 0:n.detail)===1&&a===1||l==="dblclick"&&(n==null?void 0:n.detail)===2&&a===2?!0:s==="api"?o??!1:!1}function jEe(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t!=null&&t.singleClickEdit?1:2}function dT(e,{rowNode:t,column:n},o="ui"){const s=n.getColDef().editable,r=e.editModelSvc;return n.isColumnFunc(t,s)||!!r&&r.hasEdits({rowNode:t,column:n},{withOpenEditor:!0})}function KEe(e,t,n="ui"){const o=dT(e,t,n);return o===!0||n==="ui"?o:e.colModel.getCols().some(r=>dT(e,{rowNode:t.rowNode,column:r},n))}var Vw=(e,t=!1)=>{if(e!==void 0)return Ba(e)||t&&e.state==="editing"};function dG(e,t,n=!1){var o;return Vw((o=e.editModelSvc)==null?void 0:o.getEdit(t),n)}var hG=(e,t,n)=>{if(e)for(let o=0,s=e.length;o<s;++o){const r=e[o];if(r.data&&(Vw(t==null?void 0:t.getEdit({rowNode:r,column:n}))||Vw(t==null?void 0:t.getEdit({rowNode:r.pinnedSibling,column:n})))||hG(r.childrenAfterGroup,t,n))return!0}};function fG(e,t){const{column:n,rowNode:o}=t;return e.gos.get("groupTotalRow")&&!(o!=null&&o.footer)?!1:hG(o==null?void 0:o.childrenAfterGroup,e.editModelSvc,n)}function pG(e,{rowNode:t,column:n}){var o;if(t=t.pinnedSibling,!!t)return Vw((o=e.editModelSvc)==null?void 0:o.getEdit({rowNode:t,column:n}))}var qEe=class extends qe{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){var s;const{cellCtrl:e,editSvc:t,beans:n}=this;if(t!=null&&t.isBatchEditing()&&t.isEditing()){const r=dG(n,e)||fG(n,e)||pG(n,e);this.applyBatchingStyle(r)}else this.applyBatchingStyle(!1);const o=!!((s=this.editModelSvc)!=null&&s.getCellValidationModel().hasCellValidation(this.cellCtrl));this.cellComp.toggleCss("ag-cell-editing-error",o)}applyBatchingStyle(e){var t;this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&((t=this.editSvc)==null?void 0:t.isBatchEditing()))??!1)}},YEe=class extends qe{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){var i;const{rowCtrl:e,editModelSvc:t,beans:n}=this;let o=e.rowNode,s=t==null?void 0:t.getEditRow(o);const r=(i=this.editModelSvc)==null?void 0:i.getRowValidationModel().hasRowValidation({rowNode:o});if(!s&&o.pinnedSibling&&(o=o.pinnedSibling,s=t==null?void 0:t.getEditRow(o)),s){const a=Array.from(s.keys()).some(l=>{const u={rowNode:o,column:l};return dG(n,u,!0)||fG(n,u)||pG(n,u)});this.applyStyle(r,a);return}this.applyStyle(r)}applyStyle(e=!1,t=!1){var s,r;const n=((s=this.editSvc)==null?void 0:s.isBatchEditing())??!1,o=this.gos.get("editType")==="fullRow";(r=this.rowCtrl)==null||r.forEachGui(void 0,({rowComp:i})=>{i.toggleCss("ag-row-editing",o&&t),i.toggleCss("ag-row-batch-edit",o&&t&&n),i.toggleCss("ag-row-inline-editing",t),i.toggleCss("ag-row-not-inline-editing",!t),i.toggleCss("ag-row-editing-invalid",o&&t&&e)})}},XEe=({rowModel:e,pinnedRowModel:t,editModelSvc:n},o)=>{const s=new Set;e.forEachNode(r=>o.has(r)&&s.add(r)),t==null||t.forEachPinnedRow("top",r=>o.has(r)&&s.add(r)),t==null||t.forEachPinnedRow("bottom",r=>o.has(r)&&s.add(r));for(const r of o)s.has(r)||n.removeEdits({rowNode:r});return s},ZEe=({editModelSvc:e},t,n)=>{var o;for(const s of t)(o=e==null?void 0:e.getEditRow(s))==null||o.forEach((r,i)=>!n.has(i)&&e.removeEdits({rowNode:s,column:i}))},JEe=e=>()=>{const t=new Set(e.colModel.getCols()),n=e.editModelSvc.getEditMap(!0),o=new Set(n.keys());ZEe(e,XEe(e,o),t)},QEe=new Set(["undo","redo","paste","bulk","rangeSvc"]),e0e=new Set(["ui","api"]),gG={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},t0e=new Set(Object.keys(gG)),n0e=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),Bw={cancel:!0,source:"api"},o0e={cancel:!1,source:"api"},uh={checkSiblings:!0},lg={force:!0,suppressFlash:!0},s0e=class extends qe{constructor(){super(...arguments),this.beanName="editSvc",this.batch=!1,this.stopping=!1,this.committing=!1}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:o})=>{this.stopEditing(void 0,Bw),this.createStrategy(o)});const t=JEe(e),n=()=>{const o=this.model.getCellValidationModel().getCellValidationMap().size>0,s=this.model.getRowValidationModel().getRowValidationMap().size>0;return o||s?this.stopEditing(void 0,Bw):this.isEditing()&&(this.isBatchEditing()?rh(e,this.model.getEditPositions()):this.stopEditing(void 0,o0e)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:n,filterChanged:n,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}setBatchEditing(e){e?(this.batch=!0,this.stopEditing(void 0,Bw)):(this.stopEditing(void 0,Bw),this.batch=!1)}createStrategy(e){const{beans:t,gos:n,strategy:o}=this,s=mG(n,e);if(o){if(o.beanName===s)return o;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(s,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,n,o="ui"){const s=zEe(this.beans,e,t,n,o);return s&&(this.strategy??(this.strategy=this.createStrategy())),s}shouldStopEditing(e,t,n="ui"){var o;return((o=this.strategy)==null?void 0:o.shouldStop(e,t,n))??null}shouldCancelEditing(e,t,n="ui"){var o;return((o=this.strategy)==null?void 0:o.shouldCancel(e,t,n))??null}validateEdit(){return wCe(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??uh)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){const{startedEdit:n=!0,event:o=null,source:s="ui",ignoreEventKey:r=!1,silent:i}=t;if(this.strategy??(this.strategy=this.createStrategy()),!this.isCellEditable(e,"api"))return;const a=qn(this.beans,e);if(a&&!a.comp){a.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const l=this.shouldStartEditing(e,o,n,s);if(l===!1&&s!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,s)&&!t.continueEditing&&this.stopEditing(void 0,{source:s}),l&&this.isBatchEditing()&&this.dispatchBatchEvent("batchEditingStarted",new Map),this.strategy.start({position:e,event:o,source:s,ignoreEventKey:r,startedEdit:n,silent:i})}stopEditing(e,t){var v,w,S;const{event:n,cancel:o,source:s="ui",forceCancel:r,forceStop:i}=t||{},{beans:a,model:l}=this;if(t0e.has(s)&&this.isBatchEditing())return this.bulkRefresh(e),!1;const u=this.committing?gG[s]:s;if(!(this.committing||this.isEditing(e)||this.isBatchEditing()&&l.hasEdits(e,uh))||!this.strategy||this.stopping)return!1;this.stopping=!0;const d=qn(a,e);d&&(d.onEditorAttachedFuncs=[]);let h=l.getEditMap(!0),f=!1;const p=!o&&(!!this.shouldStopEditing(e,n,u)||this.committing&&!this.batch)||(i??!1),g=o&&!!this.shouldCancelEditing(e,n,u)||(r??!1);if(p||g){ic(a,{persist:!0,isCancelling:g||o,isStopping:p});const b=l.getEditMap(),y=this.processEdits(b,o,s);(v=this.strategy)==null||v.stop(o,n);for(const E of y)l.clearEditValue(E);this.bulkRefresh(void 0,h);for(const E of l.getEditPositions(b)){const _=qn(a,E),I=Ba(E);_==null||_.refreshCell({force:!0,suppressFlash:!I})}h=b,f||(f=p)}else if(n instanceof KeyboardEvent&&this.batch&&((w=this.strategy)!=null&&w.midBatchInputsAllowed(e))&&this.isEditing(e,{withOpenEditor:!0})){const{key:b}=n,y=b===Ve.ENTER,E=b===Ve.ESCAPE,_=b===Ve.TAB;(y||_||E)&&(y||_?ic(a,{persist:!0}):E&&this.revertSingleCellEdit(d),this.isBatchEditing()?(S=this.strategy)==null||S.cleanupEditors():rh(a,l.getEditPositions(),{event:n,cancel:E}),n.preventDefault(),this.bulkRefresh(e,h,{suppressFlash:!0}),h=l.getEditMap())}else ic(a,{persist:!0}),h=l.getEditMap();return f&&e&&this.model.removeEdits(e),this.navigateAfterEdit(t,d==null?void 0:d.cellPosition),WR(a),this.model.hasEdits()||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap()),this.bulkRefresh(),g&&this.beans.rowRenderer.refreshRows({rowNodes:Array.from(h.keys())}),this.isBatchEditing()&&(this.beans.rowRenderer.refreshRows({suppressFlash:!0,force:!0}),f&&p&&this.dispatchBatchEvent("batchEditingStopped",h)),this.stopping=!1,f}navigateAfterEdit(e,t){var u;if(!e||!t)return;const{event:n,suppressNavigateAfterEdit:o}=e;if(!(n instanceof KeyboardEvent)||o)return;const{key:r,shiftKey:i}=n,a=this.gos.get("enterNavigatesVerticallyAfterEdit");if(r!==Ve.ENTER||!a)return;const l=i?Ve.UP:Ve.DOWN;(u=this.beans.navigation)==null||u.navigateToNextCell(null,l,t,!1)}processEdits(e,t=!1,n){const o=Array.from(e.keys()),s=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,r=[];for(const i of o){const a=e.get(i);for(const l of a.keys()){const u=a.get(l),c={rowNode:i,column:l},d=Ba(u);!t&&d&&!s&&(this.setNodeDataValue(i,l,u.pendingValue,void 0,n)||r.push(c))}}return r}setNodeDataValue(e,t,n,o,s="edit"){const{beans:r}=this,i=qn(r,{rowNode:e,column:t}),a=e0e.has(s)?"edit":s;i&&(i.suppressRefreshCell=!0),this.commitNextEdit();const l=e.setDataValue(t,n,a);return i&&(i.suppressRefreshCell=!1),o&&(i==null||i.refreshCell(lg)),l}setEditMap(e,t){var o;this.strategy??(this.strategy=this.createStrategy()),(o=this.strategy)==null||o.setEditMap(e,t),this.bulkRefresh();let n=lg;t!=null&&t.forceRefreshOfEditCellsOnly&&(n={...r0e(e),...lg}),this.beans.rowRenderer.refreshCells(n)}dispatchEditValuesChanged({rowNode:e,column:t},n={}){if(!e||!t||!n)return;const{pendingValue:o,sourceValue:s}=n,{rowIndex:r,rowPinned:i,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:r,rowPinned:i,column:t,source:"api",data:a,newValue:o,oldValue:s,value:o,colDef:t.getColDef()})}bulkRefresh(e={},t,n={}){var a;const{beans:o,gos:s}=this,{editModelSvc:r,rowModel:i}=o;io(s)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),n):t&&((a=r==null?void 0:r.getEditMap(!1))==null||a.forEach((l,u)=>{for(const c of l.keys())this.refCell({rowNode:u,column:c},l.get(c),n)})))}refCell({rowNode:e,column:t},n,o={}){var d,h,f;const{beans:s,gos:r}=this,i=new Set([e]),a=new Set,l=e.pinnedSibling;l&&i.add(l);const u=e.sibling;u&&a.add(u);let c=e.parent;for(;c;)(d=c.sibling)!=null&&d.footer&&r.get("groupTotalRow")||!c.parent&&c.sibling&&r.get("grandTotalRow")?a.add(c.sibling):a.add(c),c=c.parent;for(const p of i)this.dispatchEditValuesChanged({rowNode:p,column:t},n);for(const p of i)(h=qn(s,{rowNode:p,column:t}))==null||h.refreshCell(o);for(const p of a)(f=qn(s,{rowNode:p,column:t}))==null||f.refreshCell(o)}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{rowNode:n}=e,{gos:o,beans:s}=this;if(n.group){if(o.get("treeData")){if(!n.data&&!o.get("enableGroupEdit"))return!1}else if(!o.get("enableGroupEdit"))return!1}const r=mG(o)==="fullRow"?KEe(s,e,t):dT(s,e,t);return r&&(this.strategy??(this.strategy=this.createStrategy())),r}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,n=!0){var o,s,r,i;if(this.hasValidationErrors(e)){const a=qn(this.beans,e);return this.cellEditingInvalidCommitBlocks()?((o=t==null?void 0:t.preventDefault)==null||o.call(t),n&&(!(a!=null&&a.hasBrowserFocus())&&(a==null||a.focusCell()),(i=(r=(s=a==null?void 0:a.comp)==null?void 0:s.getCellEditor())==null?void 0:r.focusIn)==null||i.call(r)),"block-stop"):(a&&this.revertSingleCellEdit(a),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){var o,s,r,i;const n=qn(this.beans,e);(o=n==null?void 0:n.comp)!=null&&o.getCellEditor()&&(rh(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),sh(this.beans,e,{silent:!0}),ac(this.beans),n==null||n.refreshCell(lg),t&&(n==null||n.focusCell(),(i=(r=(s=n==null?void 0:n.comp)==null?void 0:s.getCellEditor())==null?void 0:r.focusIn)==null||i.call(r)))}hasValidationErrors(e){var o;ac(this.beans);const t=qn(this.beans,e);t&&(t.refreshCell(lg),(o=t.rowCtrl.rowEditStyleFeature)==null||o.applyRowStyles());let n=!1;return e!=null&&e.rowNode?(n||(n=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(n||(n=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(n||(n=this.model.getCellValidationModel().getCellValidationMap().size>0),n||(n=this.model.getRowValidationModel().getRowValidationMap().size>0)),n}moveToNextCell(e,t,n,o="ui"){var a;let s;const r=this.isEditing(),i=r&&this.checkNavWithValidation(void 0,n)==="block-stop";return e instanceof ih&&r&&(s=(a=this.strategy)==null?void 0:a.moveToNextEditingCell(e,t,n,o,i)),s===null||(s=s||!!this.beans.focusSvc.focusedHeader,s===!1&&!i&&this.stopEditing()),s}getCellDataValue({rowNode:e,column:t},n=!0){if(!e||!t)return;let o=this.model.getEdit({rowNode:e,column:t});const s=e.pinnedSibling;if(s){const i=this.model.getEdit({rowNode:s,column:t});i&&(o=i)}const r=n?(o==null?void 0:o.editorValue)??(o==null?void 0:o.pendingValue):o==null?void 0:o.pendingValue;return r===Or||!o?(o==null?void 0:o.sourceValue)??this.valueSvc.getValue(t,e,!1,"api"):r}addStopEditingWhenGridLosesFocus(e){fCe(this,this.beans,e)}createPopupEditorWrapper(e){return new WEe(e)}commitNextEdit(){this.committing=!0}setDataValue(e,t,n){var o;try{if((!this.isEditing()||this.committing)&&!n0e.has(n))return;const{beans:s}=this;this.strategy??(this.strategy=this.createStrategy());const r=this.isBatchEditing()?"ui":this.committing?n??"api":"api";if(!n||QEe.has(n))return Aw(s,e,t,n,void 0,{persist:!0}),this.setNodeDataValue(e.rowNode,e.column,t,!0,n);const i=this.model.getEdit(e);if(i){if(i.pendingValue===t)return!1;if(i.sourceValue!==t)return Aw(s,e,t,n,void 0,{persist:!0}),this.stopEditing(e,{source:r,suppressNavigateAfterEdit:!0}),!0;if(i.sourceValue===t)return(o=s.editModelSvc)==null||o.removeEdits(e),this.dispatchEditValuesChanged(e,{...i,pendingValue:t}),!0}return Aw(s,e,t,n,void 0,{persist:!0}),this.stopEditing(e,{source:r,suppressNavigateAfterEdit:!0}),!0}finally{this.committing=!1}}handleColDefChanged(e){mCe(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,uh))return;const{rowNode:o,column:s}=e,{compDetails:r,valueToDisplay:i}=t;if(r){const{params:l}=r;return l.data=this.model.getEditRowDataValue(o,uh),{compDetails:r}}const a=this.model.getEditRow(e.rowNode,uh);if(i!==void 0&&(a!=null&&a.has(s)))return{valueToDisplay:this.valueSvc.getValue(s,o)}}cleanupEditors(){var e;(e=this.strategy)==null||e.cleanupEditors()}dispatchCellEvent(e,t,n,o){var s;(s=this.strategy)==null||s.dispatchCellEvent(e,t,n,o)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return Ot(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},n){var u,c;if(!n||n.length===0)return;const{beans:o,rangeSvc:s,valueSvc:r}=this;ic(o,{persist:!0});const i=this.model.getEditMap(!0),a=(c=(u=i.get(e))==null?void 0:u.get(t))==null?void 0:c.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),n.forEach(d=>{if(s==null||s.forEachRowInRange(d,h=>{const f=Va(o,h);if(f===void 0)return;const p=i.get(f)??new Map;for(const g of d.columns)if(g&&this.isCellEditable({rowNode:f,column:g},"api")){const v=r.getValue(g,f,!0,"api");let w=r.parseValue(g,f??null,a,v);Number.isNaN(w)&&(w=null),p.set(g,{editorValue:void 0,pendingValue:w,sourceValue:v,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}p.size>0&&i.set(f,p)}),this.setEditMap(i),this.batch){this.cleanupEditors(),WR(o),this.bulkRefresh();return}this.commitNextEdit(),this.stopEditing(void 0,{source:"bulk"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(i)})}),this.bulkRefresh();const l=qn(o,{rowNode:e,column:t});l&&l.focusCell(!0)}createCellStyleFeature(e,t){return new qEe(e,t)}createRowStyleFeature(e,t){return new YEe(e,t)}setEditingCells(e,t){const{beans:n}=this,{colModel:o,valueSvc:s}=n,r=new Map;for(let{colId:i,column:a,colKey:l,rowIndex:u,rowPinned:c,newValue:d,state:h}of e){const f=i?o.getCol(i):l?o.getCol(l):a;if(!f)continue;const p=Va(n,{rowIndex:u,rowPinned:c});if(!p)continue;const g=s.getValue(f,p,!0,"api");if(!(t!=null&&t.forceRefreshOfEditCellsOnly)&&!Ba({pendingValue:d,sourceValue:g})&&h!=="editing")continue;let v=r.get(p);v||(v=new Map,r.set(p,v)),d===void 0&&(d=Or),v.set(f,{editorValue:void 0,pendingValue:d,sourceValue:g,state:h??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(r,t)}onCellFocused(e){var r;const t=qn(this.beans,e);if(!t||!this.isEditing(t,uh))return;const n=this.model.getEdit(t);if(!n||!Ba(n))return;const s=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");(r=this.beans.ariaAnnounce)==null||r.announceValue(s,"pendingChange")}allowedFocusTargetOnValidation(e){return qn(this.beans,e)}};function r0e(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap(t=>Array.from(t.keys())))]:void 0}}function mG(e,t){return t??e.get("editType")??"singleCell"}var vG=class extends qe{postConstruct(){var e,t;this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:(e=this.onCellFocusChanged)==null?void 0:e.bind(this),cellFocusCleared:(t=this.onCellFocusChanged)==null?void 0:t.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const n=e.previousParams,{editSvc:o,beans:s}=this,r=e.type==="cellFocused"?e.sourceEvent:null;n&&(t=qn(s,n));const{gos:i,editModelSvc:a}=s,l=e.type==="cellFocusCleared";if(o.isEditing(void 0,{withOpenEditor:!0})){const{column:u,rowIndex:c,rowPinned:d}=e,h={column:u,rowNode:Va(s,{rowIndex:c,rowPinned:d})},f=i.get("invalidEditValueMode")==="block";if(f)return;const p=!f,g=!!(a!=null&&a.getCellValidationModel().hasCellValidation(h)),v=p&&g;(n||l?o.stopEditing(void 0,{cancel:v,source:l&&p?"api":void 0,event:r}):!0)||(o.isBatchEditing()?o.cleanupEditors():o.stopEditing(void 0,{source:"api"}))}t==null||t.refreshCell({suppressFlash:!0,force:!0})}stop(e,t){var s,r;const n=this.model.getEditPositions(),o={all:[],pass:[],fail:[]};for(const i of n){o.all.push(i);const a=this.model.getCellValidationModel().getCellValidation(i);if((((s=a==null?void 0:a.errorMessages)==null?void 0:s.length)??0)>0){o.fail.push(i);continue}o.pass.push(i)}if(e)for(const i of n)Pw(this.beans,i,{cancel:e}),this.model.stop(i);else{const i=this.processValidationResults(o);if(i.destroy.length>0)for(const a of i.destroy)Pw(this.beans,a,{event:t,cancel:e}),this.model.stop(a);if(i.keep.length>0)for(const a of i.keep){const l=qn(this.beans,a);(r=this.editSvc)!=null&&r.cellEditingInvalidCommitBlocks()||l&&this.editSvc.revertSingleCellEdit(l)}}return!0}cleanupEditors({rowNode:e}={},t){ic(this.beans,{persist:!1});const n=this.model.getEditPositions(),o=[];if(e)for(const s of n)s.rowNode!==e&&o.push(s);else for(const s of n)o.push(s);rh(this.beans,o),WR(this.beans,t)}setFocusOutOnEditor(e){var t,n,o;(o=(n=(t=e.comp)==null?void 0:t.getCellEditor())==null?void 0:n.focusOut)==null||o.call(n)}setFocusInOnEditor(e){const t=e.comp,n=t==null?void 0:t.getCellEditor();if(n!=null&&n.focusIn)n.focusIn();else{const o=this.beans.gos.get("editType")==="fullRow";e.focusCell(o),e.onEditorAttachedFuncs.push(()=>{var s,r;return(r=(s=t==null?void 0:t.getCellEditor())==null?void 0:s.focusIn)==null?void 0:r.call(s)})}}setupEditors(e){const{event:t,ignoreEventKey:n=!1,startedEdit:o,position:s,cells:r=this.model.getEditPositions()}=e,i=t instanceof KeyboardEvent&&!n&&t.key||void 0;gCe(this.beans,r,s,i,t,o)}dispatchCellEvent(e,t,n,o){const s=qn(this.beans,e);s&&this.eventSvc.dispatchEvent({...s.createEvent(t??null,n),...o})}dispatchRowEvent(e,t,n){if(n)return;const o=GR(this.beans,e);o&&this.eventSvc.dispatchEvent(o.createRowEvent(t))}shouldStop(e,t,n="ui"){const o=this.editSvc.isBatchEditing();return o&&n==="api"?!0:o&&(n==="ui"||n==="edit")?!1:n==="api"?!0:t instanceof KeyboardEvent&&!o?t.key===Ve.ENTER:null}shouldCancel(e,t,n="ui"){const o=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!o&&t.key===Ve.ESCAPE||o&&n==="api"||n==="api")}setEditMap(e,t){var o;t!=null&&t.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const n=[];if(e.forEach((s,r)=>{s.forEach((i,a)=>{i.state==="editing"&&n.push({...i,rowNode:r,column:a})})}),t!=null&&t.update&&(e=new Map([...this.model.getEditMap(),...e])),(o=this.model)==null||o.setEditMap(e),n.length>0){const s=n.at(-1),r=s.pendingValue===Or?void 0:s.pendingValue;this.start({position:s,event:new KeyboardEvent("keydown",{key:r}),source:"api"});const i=qn(this.beans,s);i&&this.setFocusInOnEditor(i)}}destroy(){this.cleanupEditors(),super.destroy()}},i0e=class extends vG{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}shouldStop(e,t,n="ui"){const{rowNode:o}=e||{};if(!GR(this.beans,{rowNode:this.rowNode}))return!0;const r=super.shouldStop({rowNode:this.rowNode},t,n);return r!==null?r:this.rowNode?o!==this.rowNode:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:n,startedEdit:o,event:s,ignoreEventKey:r}=e,{rowNode:i}=t;this.rowNode!==i&&super.cleanupEditors(t);const a=this.beans.visibleCols.allCols,l=[],u=[];for(const c of a)c.isCellEditable(i)&&u.push(c);if(u.length!=0){this.dispatchRowEvent({rowNode:i},"rowEditingStarted",n),this.startedRows.push(i);for(const c of u){const d={rowNode:i,column:c};l.push(d),this.model.hasEdits(d)||this.model.start(d)}this.rowNode=i,this.setupEditors({cells:l,position:t,startedEdit:o,event:s,ignoreEventKey:r})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){var s;const{rowNode:n}=this;if(n&&!this.model.hasRowEdits(n))return!1;const o=[];if(e||this.model.getEditMap().forEach((r,i)=>{if(!(!r||r.size===0)){for(const a of r.values())if(Ba(a)){o.push(i);break}}}),ac(this.beans),!e&&((s=this.editSvc)==null?void 0:s.checkNavWithValidation({rowNode:n}))==="block-stop")return!1;super.stop(e,t);for(const r of o)this.dispatchRowEvent({rowNode:r},"rowValueChanged");return this.cleanupEditors({rowNode:n},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,n=e.previousParams;if((n==null?void 0:n.rowIndex)===t||e.sourceEvent instanceof KeyboardEvent)return;const o=qn(this.beans,n);this.gos.get("invalidEditValueMode")==="block"&&o&&(this.model.getCellValidationModel().getCellValidation(o)||this.model.getRowValidationModel().getRowValidation(o))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);for(const n of this.startedRows)this.dispatchRowEvent({rowNode:n},"rowEditingStopped");this.startedRows.length=0}moveToNextEditingCell(e,t,n,o="ui",s=!1){var h,f,p,g;const r=e.cellPosition;let i;this.model.suspend(!0);try{i=(h=this.beans.navigation)==null?void 0:h.findNextCellToFocusOn(r,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(i===!1)return null;if(i==null)return!1;const a=i.cellPosition,l=e.isCellEditable(),u=i.isCellEditable(),c=a&&r.rowIndex===a.rowIndex&&r.rowPinned===a.rowPinned;l&&this.setFocusOutOnEditor(e),this.restoreEditors();const d=this.gos.get("suppressStartEditOnTab");return u&&!s?d?i.focusCell(!0,n):((f=i.comp)!=null&&f.getCellEditor()||sh(this.beans,i,{event:n,cellStartedEdit:!0}),this.setFocusInOnEditor(i),i.focusCell(!1,n)):(u&&s&&this.setFocusInOnEditor(i),i.focusCell(!0,n)),!c&&!s&&((p=this.editSvc)==null||p.stopEditing({rowNode:e.rowNode},{event:n}),this.cleanupEditors(i,!0),d?i.focusCell(!0,n):this.editSvc.startEditing(i,{startedEdit:!0,event:n,source:o,ignoreEventKey:!0})),(g=e.rowCtrl)==null||g.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach((e,t)=>e.forEach(({state:n},o)=>{var r;if(n!=="editing")return;const s=qn(this.beans,{rowNode:t,column:o});s&&!((r=s.comp)!=null&&r.getCellEditor())&&sh(this.beans,s,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},a0e=class extends vG{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,n="ui"){const o=super.shouldStop(e,t,n);if(o!==null)return o;const{rowNode:s,column:r}=e||{};return(!this.rowNode||!this.column)&&s&&r?null:this.rowNode!==s||this.column!==r}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:n,event:o,ignoreEventKey:s}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:n,event:o,ignoreEventKey:s})}dispatchRowEvent(e,t,n){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){return super.stop(e,t),this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:n}=this.beans,{rowIndex:o,column:s,rowPinned:r}=e,i=Va(this.beans,{rowIndex:o,rowPinned:r}),a=UR(s),l=t.getCol(a),u=e.previousParams;if(u){const c=UR(u.column);if((u==null?void 0:u.rowIndex)===o&&c===a&&(u==null?void 0:u.rowPinned)===r)return}n!=null&&n.isEditing({rowNode:i,column:l},{withOpenEditor:!0})&&e.type==="cellFocused"||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,n,o="ui",s=!1){var p,g,v,w,S,b;const r=this.beans.focusSvc.getFocusedCell();r&&(e=nh(this.beans,r)??e);const i=e.cellPosition;let a;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),s||(e.eGui.focus(),(g=this.editSvc)==null||g.stopEditing(e,{source:(p=this.editSvc)!=null&&p.isBatchEditing()?"ui":"api",event:n}));try{a=(v=this.beans.navigation)==null?void 0:v.findNextCellToFocusOn(i,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(a===!1)return null;if(a==null)return!1;const u=a.cellPosition,c=e.isCellEditable(),d=a.isCellEditable(),h=u&&i.rowIndex===u.rowIndex&&i.rowPinned===u.rowPinned;c&&!s&&this.setFocusOutOnEditor(e);const f=this.gos.get("suppressStartEditOnTab");if(!h&&!s&&(super.cleanupEditors(a,!0),f?a.focusCell(!0,n):this.editSvc.startEditing(a,{startedEdit:!0,event:n,source:o,ignoreEventKey:!0})),d&&!s){if(a.focusCell(!1,n),f)a.focusCell(!0,n);else if(!((w=a.comp)!=null&&w.getCellEditor())){const y=(S=this.editSvc)==null?void 0:S.isEditing(a,{withOpenEditor:!0});sh(this.beans,a,{event:n,cellStartedEdit:!0,silent:y}),this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else d&&s&&this.setFocusInOnEditor(a),a.focusCell(!0,n);return(b=e.rowCtrl)==null||b.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},Gl={moduleName:"EditCore",version:ct,beans:[hCe,s0e],apiFunctions:{getEditingCells:NEe,getEditRowValues:MEe,getCellEditorInstances:pCe,startEditingCell:BEe,stopEditing:LEe,isEditing:VEe,validateEdit:$Ee},dynamicBeans:{singleCell:a0e,fullRow:i0e},dependsOn:[Ow,iG],css:[hEe]},l0e={moduleName:"UndoRedoEdit",version:ct,beans:[dEe],apiFunctions:{undoCellEditing:FEe,redoCellEditing:OEe,getCurrentUndoSize:HEe,getCurrentRedoSize:GEe},dependsOn:[Gl]},u0e={moduleName:"TextEditor",version:ct,userComponents:{agCellEditor:lG,agTextCellEditor:lG},dependsOn:[Gl]},c0e={moduleName:"NumberEditor",version:ct,userComponents:{agNumberCellEditor:{classImp:REe}},dependsOn:[Gl]},d0e={moduleName:"DateEditor",version:ct,userComponents:{agDateCellEditor:vEe,agDateStringCellEditor:CEe},dependsOn:[Gl]},h0e={moduleName:"CheckboxEditor",version:ct,userComponents:{agCheckboxCellEditor:pEe},dependsOn:[Gl]},f0e={moduleName:"SelectEditor",version:ct,userComponents:{agSelectCellEditor:DEe},dependsOn:[Gl]},p0e={moduleName:"LargeTextEditor",version:ct,userComponents:{agLargeTextCellEditor:SEe},dependsOn:[Gl]},g0e={moduleName:"CustomEditor",version:ct,dependsOn:[Gl]},m0e=class extends qe{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,Kd(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),Dde(e))}createColumns(e,t){var h,f;const n=()=>{var p;ew(this.beans,(p=this.columns)==null?void 0:p.tree),this.columns=null},o=e.treeDepth,r=(((h=this.columns)==null?void 0:h.treeDepth)??-1)==o,i=this.generateSelectionCols();if(Tde(i,((f=this.columns)==null?void 0:f.list)??[])&&r)return;n();const{colGroupSvc:l}=this.beans,u=(l==null?void 0:l.findDepth(e.tree))??0,c=(l==null?void 0:l.balanceTreeForAutoCols(i,u))??[];this.columns={list:i,tree:c,treeDepth:u,map:{}},t(p=>{if(!p)return null;const g=p.filter(v=>!ka(v));return[...i,...g]})}updateColumns(e){var n;const t=Kd(e.source);for(const o of((n=this.columns)==null?void 0:n.list)??[]){const s=this.createSelectionColDef(e.currentValue);o.setColDef(s,null,t),ni(this.beans,{state:[{...s,colId:o.getColId()}]},t)}}getColumn(e){var t;return((t=this.columns)==null?void 0:t.list.find(n=>Wp(n,e)))??null}getColumns(){var e;return((e=this.columns)==null?void 0:e.list)??null}isSelectionColumnEnabled(){var i,a;const{gos:e,beans:t}=this,n=e.get("rowSelection");if(typeof n!="object"||!Ku(e))return!1;const o=(((a=(i=t.autoColSvc)==null?void 0:i.getColumns())==null?void 0:a.length)??0)>0;if(n.checkboxLocation==="autoGroupColumn"&&o)return!1;const s=!!jd(n),r=qy(n);return s||r}createSelectionColDef(e){const{gos:t}=this,n=e??t.get("selectionColumnDef"),o=t.get("enableRtl"),{rowSpan:s,spanRows:r,...i}=n??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:o?"right":"left",comparator(a,l,u,c){const d=u.isSelected(),h=c.isSelected();return d===h?0:d?1:-1},editable:!1,suppressFillHandle:!0,pinned:null,...i,colId:r2,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const n=new Xu(e,null,t,!1);return this.createBean(n),[n]}onSelectionOptionsChanged(e,t,n){const o=t&&typeof t!="string"?jd(t):void 0,s=e&&typeof e!="string"?jd(e):void 0,r=o!==s,i=t&&typeof t!="string"?qy(t):void 0,a=e&&typeof e!="string"?qy(e):void 0,l=i!==a,u=Yy(e),c=Yy(t);(r||l||u!==c)&&this.beans.colModel.refreshAll(n)}destroy(){var e;ew(this.beans,(e=this.columns)==null?void 0:e.tree),super.destroy()}refreshVisibility(e,t,n){var l,u;if(!((l=this.columns)!=null&&l.list.length))return;const o=e.length+t.length+n.length;if(o===0)return;const s=this.columns.list[0];if(!s.isVisible())return;const r=()=>{let c;switch(s.pinned){case"left":case!0:c=e;break;case"right":c=n;break;default:c=t}c&&ti(c,s)};(((u=this.beans.rowNumbersSvc)==null?void 0:u.getColumn(i2))?2:1)===o&&r()}};function v0e(e,t){var i;if(!t.nodes.every(a=>a.rowPinned&&!Qp(a)?(Je(59),!1):a.id===void 0?(Je(60),!1):!0))return;const{nodes:o,source:s,newValue:r}=t;(i=e.selectionSvc)==null||i.setNodesSelected({nodes:o,source:s??"api",newValue:r})}function y0e(e,t,n="apiSelectAll"){var o;(o=e.selectionSvc)==null||o.selectAllRowNodes({source:n,selectAll:t})}function w0e(e,t,n="apiSelectAll"){var o;(o=e.selectionSvc)==null||o.deselectAllRowNodes({source:n,selectAll:t})}function C0e(e,t="apiSelectAllFiltered"){var n;(n=e.selectionSvc)==null||n.selectAllRowNodes({source:t,selectAll:"filtered"})}function b0e(e,t="apiSelectAllFiltered"){var n;(n=e.selectionSvc)==null||n.deselectAllRowNodes({source:t,selectAll:"filtered"})}function S0e(e,t="apiSelectAllCurrentPage"){var n;(n=e.selectionSvc)==null||n.selectAllRowNodes({source:t,selectAll:"currentPage"})}function E0e(e,t="apiSelectAllCurrentPage"){var n;(n=e.selectionSvc)==null||n.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function _0e(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedNodes())??[]}function R0e(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedRows())??[]}var T0e=class extends Bge{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();const{gos:e}=this;this.mode=Xy(e),this.groupSelectsDescendants=Gp(e),this.groupSelectsFiltered=Zy(e)==="filteredDescendants",this.masterSelectsDetail=e2(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=Gp(e),n=Xy(e),o=Zy(e)==="filteredDescendants";this.masterSelectsDetail=e2(e)==="detail",(t!==this.groupSelectsDescendants||o!==this.groupSelectsFiltered||n!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=o,this.mode=n)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,n){if(this.isRowSelectionBlocked(t))return 0;const o=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,n);if(o==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in o)return o.reset?this.resetNodes():this.selectRange(o.deselect,!1,n),this.selectRange(o.select,!0,n);{const s=o.checkFilteredNodes?wG(o.node):o.newValue;return this.setNodesSelected({nodes:[o.node],newValue:s,clearSelection:o.clearSelection,keepDescendants:o.keepDescendants,event:e,source:n})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:n,nodes:o,event:s,source:r,keepDescendants:i=!1}){var u;if(o.length===0)return 0;const{gos:a}=this;if(!Ku(a)&&e)return Je(132),0;if(o.length>1&&!this.isMultiSelect())return Je(130),0;let l=0;for(let c=0;c<o.length;c++){const d=o[c],h=ch(d);if(h.rowPinned&&!Qp(h)){Je(59);continue}if(h.id===void 0){Je(60);continue}this.groupSelectsFiltered&&h.group&&!a.get("treeData")||this.selectRowNode(h,e,s,r)&&(this.detailSelection.delete(h.id),l++),this.groupSelectsDescendants&&((u=h.childrenAfterGroup)!=null&&u.length)&&(l+=this.selectChildren(h,e,r))}return n||(o.length===1&&r==="api"&&this.selectionCtx.setRoot(ch(o[0])),e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(ch(o[0]),i,r)),l>0&&(this.updateGroupsFromChildrenSelections(r),this.dispatchSelectionChanged(r))),l}selectRange(e,t,n){let o=0;return e.forEach(s=>{const r=ch(s);if(r.group&&this.groupSelectsDescendants)return;this.selectRowNode(r,t,void 0,n)&&o++}),o>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n)),o}selectChildren(e,t,n){const o=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return o?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:n,nodes:o}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((n,o)=>{e(n)&&t.set(o,n)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:n,rowModel:o}=this.beans;if(!io(n))return!1;const s=o.rootNode;if(!s)return!1;t||(t=new tg(!0,s),t.active=!1);let r=!1;return t.forEachChangedNodeDepthFirst(i=>{if(i!==s){const a=this.calculateSelectedFromChildren(i);r=this.selectRowNode(i,a===null?!1:a,void 0,e)||r}}),r}clearOtherNodes(e,t,n){const o=new Map;let s=0;return this.selectedNodes.forEach(r=>{const i=r.id==e.id;if((t?!I0e(e,r):!0)&&!i){const l=this.selectedNodes.get(r.id);s+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:n}),this.groupSelectsDescendants&&r.parent&&o.set(r.parent.id,r.parent)}}),o.forEach(r=>{const i=this.calculateSelectedFromChildren(r);this.selectRowNode(r,i===null?!1:i,void 0,n)}),s}onRowSelected(e){const t=e.node;this.groupSelectsDescendants&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}createDaemonNode(e){if(!e.id)return;const t=new Nl(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:e,rowModel:t}=this.beans;if(!io(e))return;const n=t.getTopLevelNodes();if(n===null)return;const o=[];function s(r){for(let i=0,a=r.length;i<a;i++){const l=r[i];l.isSelected()?o.push(l):l.group&&l.childrenAfterGroup&&s(l.childrenAfterGroup)}}return s(n),o}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){const n=io(this.gos);let o=!1;const s=r=>{const i=this.selectRowNode(ch(r),!1,void 0,e);o||(o=i)};if(t==="currentPage"||t==="filtered"){if(!n){_n(102);return}this.getNodesToSelect(t).forEach(s)}else this.selectedNodes.forEach(s),this.reset(e);if(this.selectionCtx.selectAll=!1,n&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(e);o||(o=r)}o&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,n=0;return this.getNodesToSelect(e).forEach(o=>{this.groupSelectsDescendants&&o.group||(o.isSelected()?t++:o.selectable&&n++)}),{selectedCount:t,notSelectedCount:n}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:n}=this.getSelectedCounts(e);return yG(t,n)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],n=s=>t.push(s);if(e==="currentPage")return this.forEachNodeOnPage(s=>{if(!s.group){n(s);return}if(!s.expanded&&!s.footer){const r=i=>{var a;n(i),(a=i.childrenAfterFilter)==null||a.forEach(r)};r(s);return}this.groupSelectsDescendants||n(s)}),t;const o=this.beans.rowModel;return e==="filtered"?(o.forEachNodeAfterFilter(n),t):(o.forEachNode(n),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:n}=this.beans,o=t.getFirstRow(),s=t.getLastRow();for(let r=o;r<=s;r++){const i=n.getRow(r);i&&e(i)}}selectAllRowNodes(e){const{gos:t,selectionCtx:n}=this;if(!Ku(t)){Je(132);return}if(fde(t)&&!Hp(t)){Je(130);return}if(!this.canSelectAll())return;const{source:o,selectAll:s}=e;let r=!1;if(this.getNodesToSelect(s).forEach(i=>{const a=this.selectRowNode(ch(i),!0,void 0,o);r||(r=a)}),n.selectAll=!0,io(t)&&this.groupSelectsDescendants){const i=this.updateGroupsFromChildrenSelections(o);r||(r=i)}r&&this.dispatchSelectionChanged(o)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,n){if(e||(e=[]),!Array.isArray(e)){_n(103);return}const o=new Set(e),s=[];this.beans.rowModel.forEachNode(r=>{o.has(r.id)&&s.push(r)}),n&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:s,source:t})}canSelectAll(){return io(this.beans.gos)}updateSelectable(e){var l;const{gos:t,rowModel:n}=this.beans;if(!Ku(t))return;const o="selectableChanged",s=e!==void 0,r=io(t)&&this.groupSelectsDescendants,i=[],a=u=>{var d;if(s&&!u.group)return;if(r&&u.group){const h=((d=u.childrenAfterGroup)==null?void 0:d.some(f=>f.selectable))??!1;this.setRowSelectable(u,h,!0);return}!this.updateRowSelectable(u,!0)&&u.isSelected()&&i.push(u)};if(r){if(e===void 0){const u=n.rootNode;e=u?new tg(!1,u):void 0}e==null||e.forEachChangedNodeDepthFirst(a,!s,!s)}else n.forEachNode(a);i.length&&this.setNodesSelected({nodes:i,newValue:!1,source:o}),!s&&r&&((l=this.updateGroupsFromChildrenSelections)==null||l.call(this,o))}updateSelectableAfterGrouping(e){var t;this.updateSelectable(e),this.groupSelectsDescendants&&((t=this.updateGroupsFromChildrenSelections)!=null&&t.call(this,"rowGroupChanged",e))&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){var r,i;if(!this.masterSelectsDetail)return;const n=(i=(r=e.detailNode)==null?void 0:r.detailGridInfo)==null?void 0:i.api;if(!n)return;const o=D0e(n);if(e.isSelected()!==o&&this.selectRowNode(e,o,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!o){const a=this.detailSelection.get(e.id)??new Set;for(const l of n.getSelectedNodes())a.add(l.id);this.detailSelection.set(e.id,a)}}setDetailSelectionState(e,t,n){if(this.masterSelectsDetail){if(!Hp(t)){Je(269);return}switch(e.isSelected()){case!0:{n.selectAll();break}case!1:{n.deselectAll();break}case void 0:{const o=this.detailSelection.get(e.id);if(o){const s=[];for(const r of o){const i=n.getRowNode(r);i&&s.push(i)}n.setNodesSelected({nodes:s,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function ch(e){return Qp(e)?e.pinnedSibling:e.footer?e.sibling:e}function D0e(e){let t=0,n=0;return e.forEachNode(o=>{o.isSelected()?t++:o.selectable&&n++}),yG(t,n)}function yG(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function I0e(e,t){let n=t.parent;for(;n;){if(n===e)return!0;n=n.parent}return!1}function wG(e){var o;const t=e.isSelected()===!1,n=((o=e.childrenAfterFilter)==null?void 0:o.some(wG))??!1;return t||n}var x0e={moduleName:"SharedRowSelection",version:ct,beans:[m0e],apiFunctions:{setNodesSelected:v0e,selectAll:y0e,deselectAll:w0e,selectAllFiltered:C0e,deselectAllFiltered:b0e,selectAllOnCurrentPage:S0e,deselectAllOnCurrentPage:E0e,getSelectedNodes:_0e,getSelectedRows:R0e}},A0e={moduleName:"RowSelection",version:ct,rowModels:["clientSide","infinite","viewport"],beans:[T0e],dependsOn:[x0e]};function P0e(e){var t;(t=e.expansionSvc)==null||t.expandAll(!0)}function k0e(e){var t;(t=e.expansionSvc)==null||t.expandAll(!1)}function CG(e){var t;(t=e.rowModel)==null||t.onRowHeightChanged()}function bG(e){var t,n;if((t=e.rowAutoHeight)!=null&&t.active){Je(3);return}(n=e.rowModel)==null||n.resetRowHeights()}function F0e(e,t,n){var s,r;const o=Obe(e);if(o){if(((s=e.rowGroupColsSvc)==null?void 0:s.columns.length)===0){if(t<0){_n(238);return}o.setRowCount(t,n);return}_n(28);return}(r=Fw(e))==null||r.setRowCount(t,n)}function O0e(e){var t;return Ud(e.gos)?e.rowModel.getBlockStates():((t=e.rowNodeBlockLoader)==null?void 0:t.getBlockState())??{}}function M0e(e){return e.rowModel.isLastRowIndexKnown()}var N0e={moduleName:"CsrmSsrmSharedApi",version:ct,apiFunctions:{expandAll:P0e,collapseAll:k0e}},L0e={moduleName:"RowModelSharedApi",version:ct,apiFunctions:{onRowHeightChanged:CG,resetRowHeights:bG}},V0e={moduleName:"SsrmInfiniteSharedApi",version:ct,apiFunctions:{setRowCount:F0e,getCacheBlockState:O0e,isLastRowIndexKnown:M0e}},B0e=class extends qe{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(o=>{var r;if(!o){_n(18),t||_n(20);return}if(this.isGridApi(o))return o;const s=o;return"current"in s?(r=s.current)==null?void 0:r.api:(s.api||_n(19),s.api)}).filter(o=>!!o&&!o.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){if(!this.consuming)for(const t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const n=[];return e.columns?e.columns.forEach(o=>{n.push(t(o))}):e.column&&n.push(t(e.column)),n}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":Je(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;if(t)for(const n of e.columnGroups){let o=null;n&&(o=t.getProvidedColGroup(n.getGroupId())),!(n&&!o)&&t.setColumnGroupOpened(o,n.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let n=null;const o=this.beans,{colResize:s,ctrlsSvc:r,colModel:i}=o;if(t&&(n=i.getColDefCol(t.getColId())),t&&!n)return;const a=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const d=e.api.getColumnState().map(h=>({colId:h.colId}));ni(o,{state:d,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const d=e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}));ni(o,{state:d},"alignedGridChanged")}break;case"columnPinned":{const d=e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}));ni(o,{state:d},"alignedGridChanged")}break;case"columnResized":{const c=e,d={};for(const h of a)d[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()};for(const h of c.flexColumns??[])d[h.getId()]&&delete d[h.getId()];s==null||s.setColumnWidths(Object.values(d),!1,c.finished,"alignedGridChanged");break}}const u=r.getGridBodyCtrl().isVerticalScrollShowing();for(const c of this.getAlignedGridApis())c.setGridOption("alwaysShowVerticalScroll",u)}},$0e={moduleName:"AlignedGrids",version:ct,beans:[B0e],dependsOn:[rH]},H0e=class extends qe{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},SG(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){const{selectionSvc:t,pinnedRowModel:n,groupStage:o}=this.beans;t==null||t.reset("rowDataChanged"),n!=null&&n.isManual()&&n.reset(),this.dispatchRowDataUpdateStarted(e),this.allNodesMap=Object.create(null),this.nextId=0;const s=SG(this.rootNode),r=new Array(e.length);s._leafs=r;let i=0;const a=o==null?void 0:o.getNestedDataGetter(),l=a?new Set:null,u=(c,d)=>{const h=c.level+1;for(let f=0,p=d.length;f<p;++f){const g=d[f];if(!g)continue;const v=this.createRowNode(g,h);if(v.sourceRowIndex=i,r[i++]=v,l&&!l.has(g)){l.add(g),v.treeParent=c;const w=a(g);w&&u(v,w)}}};u(s,e),r.length=i}setImmutableRowData(e,t){var w;const{rootNode:n,gos:o}=this;this.dispatchRowDataUpdateStarted(t);const s=zd(o),r=e.changedRowNodes,{adds:i,updates:a}=r,l=new Set,u=[],c=(w=this.beans.groupStage)==null?void 0:w.getNestedDataGetter();let d=o.get("suppressMaintainUnsortedOrder")?void 0:!1,h=-1,f=!1;const p=(S,b)=>{if(!d&&d!==void 0){const y=S.sourceRowIndex;d=y<=h,h=y}S.data!==b&&(S.updateData(b),i.has(S)||a.add(S),!S.selectable&&S.isSelected()&&u.push(S))},g=(S,b,y)=>{for(let E=0,_=b.length;E<_;++E){const I=b[E];if(!I)continue;let T=this.getRowNode(s({data:I,level:y}));if(T?(p(T,I),f||(f=!!c&&T.treeParent!==S)):(T=this.createRowNode(I,y),i.add(T)),!c||l.has(T)){l.add(T);continue}l.add(T),T.treeParent=S;const F=c(I);F&&g(T,F,y+1)}};g(n,t,0);const v=this.deleteUnusedNodes(l,r,u)||d||i.size>0;if(v){const S=n._leafs??(n._leafs=[]);d===void 0?j0e(S,l,r):z0e(S,l)&&(r.reordered=!0)}(v||f||a.size)&&(e.rowDataUpdated=!0,this.deselect(u))}deleteUnusedNodes(e,{removals:t},n){const o=this.rootNode._leafs;for(let s=0,r=o.length;s<r;s++){const i=o[s];e.has(i)||(t.add(i),i.isSelected()&&n.push(i),this.deleteNode(i))}return t.size>0}updateRowData(e,t){var a;if(this.dispatchRowDataUpdateStarted(e.add),(a=this.beans.groupStage)!=null&&a.getNestedDataGetter())return Je(268),{remove:[],update:[],add:[]};const n=[],o=zd(this.gos),s=this.executeRemove(o,e,t,n),r=this.executeUpdate(o,e,t,n),i=this.executeAdd(e,t);return this.deselect(n),{remove:s,update:r,add:i}}executeRemove(e,{remove:t},{adds:n,updates:o,removals:s},r){const i=this.rootNode._leafs,a=i==null?void 0:i.length,l=t==null?void 0:t.length;if(!l||!a)return[];let u=0,c=a,d=0,h;const f=new Array(l);for(let p=0;p<l;++p){const g=this.lookupNode(e,t[p]);if(!g)continue;const v=g.sourceRowIndex;v<c&&(c=v),v>d&&(d=v),g.isSelected()&&r.push(g),this.deleteNode(g),n.delete(g)?(h??(h=new Set),h.add(g)):(o.delete(g),s.add(g)),f[u++]=g}return f.length=u,u&&W0e(i,c,d,s,h),f}executeUpdate(e,{update:t},{adds:n,updates:o},s){const r=t==null?void 0:t.length;if(!r)return[];const i=new Array(r);let a=0;for(let l=0;l<r;l++){const u=t[l],c=this.lookupNode(e,u);c&&(c.updateData(u),!c.selectable&&c.isSelected()&&s.push(c),i[a++]=c,n.has(c)||o.add(c))}return i.length=a,i}executeAdd(e,t){var n;const o=(n=this.rootNode)._leafs??(n._leafs=[]),s=o.length,r=e.add,i=r==null?void 0:r.length;if(!i)return[];const a=s+i;let l=this.sanitizeAddIndex(o,e.addIndex);if(l<s){for(let d=s-1,h=a-1;d>=l;--d){const f=o[d];f.sourceRowIndex=h,o[h--]=f}t.reordered=!0}o.length=a;const u=new Array(i),c=t.adds;for(let d=0;d<i;d++){const h=this.createRowNode(r[d],0);c.add(h),h.sourceRowIndex=l,o[l]=h,u[d]=h,l++}return u}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e!=null&&e.length?e[0]:null})}deselect(e){var o;const t="rowDataChanged",n=this.beans.selectionSvc;e.length&&(n==null||n.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t})),(o=n==null?void 0:n.updateGroupsFromChildrenSelections)==null||o.call(n,t),e.length&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:(n==null?void 0:n.getSelectedNodes())??null,serverSideState:null})}createRowNode(e,t){const n=new Nl(this.beans);n.parent=this.rootNode,n.level=t,n.group=!1,n.expanded=!1,n.setDataAndId(e,String(this.nextId++));const o=n.id,s=this.allNodesMap;return s[o]&&Je(2,{nodeId:o}),s[o]=n,n}deleteNode(e){var s;e.clearRowTopAndRowIndex();const t=e.id,n=this.allNodesMap;n[t]===e&&delete n[t];const o=e.pinnedSibling;o&&((s=this.beans.pinnedRowModel)==null||s.pinRow(o,null))}lookupNode(e,t){if(!e)return U0e(this.rootNode._leafs,t);const n=e({data:t,level:0}),o=this.allNodesMap[n];return o||(_n(4,{id:n}),null)}sanitizeAddIndex(e,t){const n=e.length;if(typeof t!="number"||t<0||t>=n||Number.isNaN(t))return n;t=Math.ceil(t);const o=this.gos;return t>0&&o.get("treeData")&&o.get("getDataPath")&&(t=G0e(e,t)),t}},G0e=(e,t)=>{for(let n=0,o=e.length;n<o;n++){const s=e[n];if((s==null?void 0:s.rowIndex)==t-1)return n+1}return t},SG=e=>{var i;e.group=!0,e.level=-1,e.id="ROOT_NODE_ID",((i=e._leafs)==null?void 0:i.length)!==0&&(e._leafs=[]);const t=[],n=[],o=[],s=[];e.childrenAfterGroup=t,e.childrenAfterSort=n,e.childrenAfterAggFilter=o,e.childrenAfterFilter=s;const r=e.sibling;return r&&(r.childrenAfterGroup=t,r.childrenAfterSort=n,r.childrenAfterAggFilter=o,r.childrenAfterFilter=s,r.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},U0e=(e,t)=>{if(e)for(let n=0,o=e.length;n<o;n++){const s=e[n];if(s.data===t)return s}return _n(5,{data:t}),null},W0e=(e,t,n,o,s)=>{t=Math.max(0,t);for(let r=t,i=e.length;r<i;++r){const a=e[r];r<=n&&(o.has(a)||s!=null&&s.has(a))||(a.sourceRowIndex=t,e[t++]=a)}e.length=t},z0e=(e,t)=>{const n=t.size;e.length=n;let o=0,s=!1,r=!1;for(const i of t){const a=i.sourceRowIndex;a===o?r||(r=s):(a>=0?r=!0:s=!0,i.sourceRowIndex=o,e[o]=i),++o}return r},j0e=(e,t,{removals:n,adds:o})=>{const s=e.length;e.length=t.size;let r=0;for(let i=0;i<s;++i){const a=e[i];n.has(a)||(r!==i&&(a.sourceRowIndex=r,e[r]=a),++r)}for(const i of o)i.sourceRowIndex<0&&(i.sourceRowIndex=r,e[r++]=i);e.length=r},EG=e=>{const t=e.childrenAfterSort,n=e.sibling;if(n&&(n.childrenAfterSort=t),!!t)for(let o=0,s=t.length-1;o<=s;o++){const r=t[o],i=o===0,a=o===s;r.firstChild!==i&&(r.firstChild=i,r.dispatchRowEvent("firstChildChanged")),r.lastChild!==a&&(r.lastChild=a,r.dispatchRowEvent("lastChildChanged")),r.childIndex!==o&&(r.childIndex=o,r.dispatchRowEvent("childIndexChanged"))}},K0e=class extends qe{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e){const t=this.beans.sortSvc.getSortOptions(),n=t.length>0&&!!e.changedRowNodes&&this.gos.get("deltaSort");this.sort(t,n,e.changedRowNodes,e.changedPath)}sort(e,t,n,o){const{gos:s,colModel:r,rowGroupColsSvc:i,rowNodeSorter:a,rowRenderer:l,showRowGroupCols:u}=this.beans,c=s.get("groupMaintainOrder"),d=r.getCols().some(S=>S.isRowGroupActive()),h=i==null?void 0:i.columns,f=r.isPivotMode(),p=s.getCallback("postSortRows");let g=!1,v;const w=S=>{var _,I;const b=f&&S.leafGroup;let y=c&&d&&!S.leafGroup;y&&(v??(v=this.shouldSortContainsGroupCols(e)),y&&(y=!v));let E=null;if(y){let T=!1;if(h){const F=S.level+1;F<h.length&&(T=h[F].getSort()===null)}T||(E=X0e(S))}else!e.length||b||(t&&n?E=q0e(a,S,n,o,e):E=a.doFullSort(S.childrenAfterAggFilter,e));if(E||(E=((_=S.childrenAfterAggFilter)==null?void 0:_.slice(0))??[]),g||(g=((I=S.childrenAfterSort)==null?void 0:I[0])!==E[0]),S.childrenAfterSort=E,EG(S),p){const T={nodes:S.childrenAfterSort};p(T)}};if(o==null||o.forEachChangedNodeDepthFirst(w),g&&s.get("groupHideOpenParents")){const S=u==null?void 0:u.getShowRowGroupCols();S!=null&&S.length&&l.refreshCells({columns:S,force:!0})}}shouldSortContainsGroupCols(e){const t=e.length;if(!t)return!1;if(Mi(this.gos)){for(let n=0;n<t;++n){const o=e[n].column;if(o.isPrimary()&&o.isRowGroupActive())return!0}return!1}for(let n=0;n<t;++n)if(e[n].column.getColDef().showRowGroup)return!0;return!1}},q0e=(e,t,n,o,s)=>{const r=t.childrenAfterAggFilter,i=t.childrenAfterSort;if(!i)return e.doFullSort(r,s);const a=new Set,l=[],{updates:u,adds:c}=n;for(let h=0,f=r.length;h<f;++h){const p=r[h];u.has(p)||c.has(p)||o&&!o.canSkip(p)?l.push({currentPos:l.length,rowNode:p}):a.add(p)}const d=i.filter(h=>a.has(h)).map((h,f)=>({currentPos:f,rowNode:h}));return l.sort((h,f)=>e.compareRowNodes(s,h,f)),Y0e(e,s,l,d)},Y0e=(e,t,n,o)=>{let s=0,r=0;const i=n.length,a=o.length,l=new Array(i+a);let u=0;for(;s<i&&r<a;){const c=n[s],d=o[r];e.compareRowNodes(t,c,d)<0?(l[u++]=c.rowNode,++s):(l[u++]=d.rowNode,++r)}for(;s<i;)l[u++]=n[s++].rowNode;for(;r<a;)l[u++]=o[r++].rowNode;return l},X0e=e=>{const t=e.childrenAfterSort,n=e.childrenAfterAggFilter,o=t==null?void 0:t.length,s=n==null?void 0:n.length;if(!o||!s)return null;const r=new Array(s),i=new Set;for(let l=0;l<s;++l)i.add(n[l]);let a=0;for(let l=0;l<o;++l){const u=t[l];i.delete(u)&&(r[a++]=u)}if(i.size===0&&a===o)return t;for(const l of i)r[a++]=l;return r.length=a,r},Z0e=class extends qe{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.rowDataUpdatedPending=!1,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingModel=!1,this.rowNodesCountReady=!1,this.stages=[],this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=Yo(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const e=this.beans,t=new Nl(e);this.rootNode=t,this.nodeManager=this.createBean(new H0e(t));const n=this.refreshModel.bind(this,{step:"group"}),o=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:o,columnRowGroupChanged:n,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:n,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,n=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(o=>!!o);this.stages=n;for(let o=n.length-1;o>=0;--o)for(const s of n[o].refreshProps)t.set(s,o);this.addManagedPropertyListeners([...t.keys()],o=>{var r;const s=(r=o.changeSet)==null?void 0:r.properties;s&&this.onPropChange(s)}),this.addManagedPropertyListener("rowData",()=>this.onPropChange(["rowData"])),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,n,o){let s,r=!1;do{s=!1;const i=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(i,n),u=Math.min(a,o);for(let c=l;c<=u;c++){const d=this.getRow(c);if(d.rowHeightEstimated){const h=Pl(this.beans,d);d.setRowHeight(h.height),s=!0,r=!0}}s&&this.setRowTopAndRowIndex()}while(s);return r}onPropChange(e){const{nodeManager:t,gos:n,beans:o}=this,s=o.groupStage;if(!t)return;const r=new Set(e),i=s==null?void 0:s.onPropChange(r);let a;r.has("rowData")?a=n.get("rowData"):i&&(a=s==null?void 0:s.extractData()),a&&!Array.isArray(a)&&(a=null,Je(1));const l={step:"nothing",changedProps:r};a&&(!i&&!this.isEmpty()&&a.length>0&&n.exists("getRowId")&&!n.get("resetRowDataOnUpdate")?(l.keepRenderedRows=!0,l.animate=!n.get("suppressAnimationFrame"),l.changedRowNodes=new Rw,t.setImmutableRowData(l,a)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(a),this.rowNodesCountReady=!0));const u=l.rowDataUpdated?"group":this.getRefreshedStage(e);u&&(l.step=u,this.refreshModel(l))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:n}=this,o=t.length;let s=o;for(let r=0,i=e.length;r<i&&s;++r)s=Math.min(s,n.get(e[r])??s);return s<o?t[s].step:null}setRowTopAndRowIndex(e){const{beans:t,rowsToDisplay:n}=this,o=t.environment.getDefaultRowHeight();let s=0;const r=Xo(this.gos,"normal");for(let i=0,a=n.length;i<a;++i){const l=n[i],u=l.id;if(u!=null&&(e==null||e.add(u)),l.rowHeight==null){const c=Pl(t,l,r,o);l.setRowHeight(c.height,c.estimated)}l.setRowTop(s),l.setRowIndex(i),s+=l.rowHeight}}clearRowTopAndRowIndex(e,t){const n=e.active,o=i=>{(i==null?void 0:i.id)!=null&&!t.has(i.id)&&i.clearRowTopAndRowIndex()},s=i=>{o(i),o(i.detailNode),o(i.sibling);const a=i.childrenAfterGroup;if(!i.hasChildren()||!a)return;const l=i.level==-1;if(!(n&&!l&&!i.expanded))for(let c=0,d=a.length;c<d;++c)s(a[c])},r=this.rootNode;r&&s(r)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){var s,r;const{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;const o=(s=e.sibling)!=null&&s.displayed?1:0;return(((r=e.childrenAfterSort)==null?void 0:r.length)??0)+o}getTopLevelRowDisplayedIndex(e){const{beans:t,rootNode:n,rowsToDisplay:o}=this;if(!n||!o.length||o[0]===n)return e;const r=n.childrenAfterSort,i=l=>{let u=r[l];if(this.gos.get("groupHideOpenParents"))for(;u.expanded&&u.childrenAfterSort&&u.childrenAfterSort.length>0;)u=u.childrenAfterSort[0];return u.rowIndex},a=t.footerSvc;return a?a==null?void 0:a.getTopDisplayIndex(o,e,r,i):i(e)}getTopLevelIndexFromDisplayedIndex(e){var a;const{rootNode:t,rowsToDisplay:n}=this;if(!t||!n.length||n[0]===t)return e;let s=this.getRow(e);s.footer&&(s=s.sibling);let r=s.parent;for(;r&&r!==t;)s=r,r=s.parent;const i=((a=t.childrenAfterSort)==null?void 0:a.indexOf(s))??-1;return i>=0?i:e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:Wd(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const o=t.length===0||t.some(s=>s.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:o,keepRenderedRows:!0,animate:Wd(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:Wd(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){const t=new tg(!1,this.rootNode);return t.active=e,t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:n,rowDataUpdated:o}=e;return!(!t||n||!o||t.removals.size||t.adds.size)}refreshModel(e){var u,c;const{nodeManager:t,beans:n,eventSvc:o,started:s,refreshingModel:r}=this;if(!t)return;const i=!!e.rowDataUpdated,a=e.changedPath??(e.changedPath=this.createChangePath(!e.newData&&i));if(s&&i&&o.dispatchEvent({type:"rowDataUpdated"}),!s||r||n.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(e)){this.rowDataUpdatedPending||(this.rowDataUpdatedPending=i);return}switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.refreshingModel=!0,(u=n.masterDetailSvc)==null||u.refreshModel(e),i&&e.step!=="group"&&((c=n.colFilter)==null||c.refreshModel()),e.step){case"group":this.doGrouping(e);case"filter":this.doFilter(a);case"pivot":this.doPivot(a);case"aggregate":this.doAggregate(a);case"filter_aggregates":this.doFilterAggregates(a);case"sort":this.doSort(e.changedRowNodes,a);case"map":this.doRowsToDisplay()}const l=new Set;this.setRowTopAndRowIndex(l),this.clearRowTopAndRowIndex(a,l),this.refreshingModel=!1,o.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}isEmpty(){var e,t,n;return!((t=(e=this.rootNode)==null?void 0:e._leafs)!=null&&t.length)||!((n=this.beans.colModel)!=null&&n.ready)}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let n=!1,o=!1;const s=[],r=Gp(this.gos);return this.forEachNodeAfterFilterAndSort(i=>{if(o)return;if(n&&(i===t||i===e)&&(o=!0,r&&i.group)){_G(s,i);return}if(!n){if(i!==t&&i!==e)return;n=!0,t===e&&(o=!0)}(!i.group||!r)&&s.push(i)}),s}getTopLevelNodes(){var e;return((e=this.rootNode)==null?void 0:e.childrenAfterGroup)??null}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay,n=t.length;if(this.isEmpty()||n===0)return-1;let o=0,s=n-1;if(e<=0)return 0;if(t[s].rowTop<=e)return s;let i=-1,a=-1;for(;;){const l=Math.floor((o+s)/2),u=t[l];if(this.isRowInPixel(u,e)||(u.rowTop<e?o=l+1:u.rowTop>e&&(s=l-1),i===o&&a===s))return l;i=o,a=s}}isRowInPixel(e,t){const n=e.rowTop,o=n+e.rowHeight;return n<=t&&o>t}forEachLeafNode(e){var n;const t=(n=this.rootNode)==null?void 0:n._leafs;if(t)for(let o=0,s=t.length;o<s;++o)e(t[o],o)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){const t=this.rowsToDisplay;for(let n=0,o=t.length;n<o;++n)e(t[n],n)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,n=>n.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,n=>n.childrenAfterSort)}forEachPivotNode(e,t,n){const{colModel:o,rowGroupColsSvc:s}=this.beans;if(!o.isPivotMode())return;if(!(s!=null&&s.columns.length)){e(this.rootNode,0);return}const r=n?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,i=>i.leafGroup?null:i[r])}depthFirstSearchRowNodes(e,t=!1,n=r=>r.childrenAfterGroup,o=this.rootNode,s=0){let r=s;if(!o)return r;const i=o===this.rootNode;if(i||e(o,r++),o.hasChildren()&&!o.footer){const a=n(o);if(a){const l=this.beans.footerSvc;r=(l==null?void 0:l.addTotalRows(r,o,e,t,i,"top"))??r;for(const u of a)r=this.depthFirstSearchRowNodes(e,t,n,u,r);return(l==null?void 0:l.addTotalRows(r,o,e,t,i,"bottom"))??r}}return r}doAggregate(e){var n;const t=this.rootNode;t&&((n=this.beans.aggStage)==null||n.execute({rowNode:t,changedPath:e}))}doFilterAggregates(e){const t=this.rootNode,n=this.beans.filterAggStage;if(n){n.execute({rowNode:t,changedPath:e});return}t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){const n=this.beans.sortStage;if(n){n.execute({rowNode:this.rootNode,changedRowNodes:e,changedPath:t});return}t.forEachChangedNodeDepthFirst(o=>{o.childrenAfterSort=o.childrenAfterAggFilter.slice(0),EG(o)})}doGrouping(e){var s;const t=this.rootNode,n=this.beans.groupStage,o=n==null?void 0:n.execute({rowNode:t,changedRowNodes:e.changedRowNodes,changedPath:e.changedPath,afterColumnsChanged:!!e.afterColumnsChanged});if(o===void 0){const r=t._leafs;t.childrenAfterGroup=r,t.updateHasChildren();const i=t.sibling;i&&(i.childrenAfterGroup=r)}(o||e.rowDataUpdated)&&((s=this.beans.colFilter)==null||s.refreshModel()),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){const t=this.beans.filterStage;if(t){t.execute({rowNode:this.rootNode,changedPath:e});return}e.forEachChangedNodeDepthFirst(n=>{n.childrenAfterFilter=n.childrenAfterGroup,UH(n)},!0)}doPivot(e){var t;(t=this.beans.pivotStage)==null||t.execute({rowNode:this.rootNode,changedPath:e})}getRowNode(e){var o,s;const t=(o=this.nodeManager)==null?void 0:o.getRowNode(e);return typeof t=="object"?t:typeof e=="string"&&e.indexOf(oR)===0?(s=this.beans.groupStage)==null?void 0:s.getNode(e):void 0}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const n=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),n)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){var a;const{nodeManager:e,beans:t,eventSvc:n,asyncTransactions:o}=this;if(!e)return;(a=t.valueCache)==null||a.onDataChanged();const s=[],r=[],i=new Rw;for(const{rowDataTransaction:l,callback:u}of o??[]){this.rowNodesCountReady=!0;const c=e.updateRowData(l,i);s.push(c),u&&r.push(u.bind(null,c))}this.commitTransactions(i),r.length>0&&setTimeout(()=>{for(let l=0,u=r.length;l<u;l++)r[l]()},0),s.length>0&&n.dispatchEvent({type:"asyncTransactionsFlushed",results:s}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){var s;const t=this.nodeManager;if(!t)return null;(s=this.beans.valueCache)==null||s.onDataChanged(),this.rowNodesCountReady=!0;const n=new Rw,o=t.updateRowData(e,n);return this.commitTransactions(n),o}commitTransactions(e){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:e,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{beans:e,rootNode:t}=this,n=e.flattenStage;if(n){this.rowsToDisplay=n.execute({rowNode:t});return}const o=this.rootNode.childrenAfterSort??[];for(const s of o)s.setUiLevel(0);this.rowsToDisplay=o}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);const n=e.sibling;n==null||n.setRowHeight(n.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const n=t.detailNode;n==null||n.setRowHeight(n.rowHeight,!0);const o=t.sibling;o==null||o.setRowHeight(o.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){var t;e.rowHeightChanged&&!((t=this.beans.rowAutoHeight)!=null&&t.active)&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},_G=(e,t)=>{const n=t.childrenAfterGroup;if(n)for(let o=0,s=n.length;o<s;++o){const r=n[o];r.data&&e.push(r),r.group&&_G(e,r)}};function J0e(e){var t;(t=e.expansionSvc)==null||t.onGroupExpandedOrCollapsed()}function Q0e(e,t){const n=Hl(e);n&&((!t||t==="everything")&&(t="group"),n.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function e_e(e){var t;return((t=Hl(e))==null?void 0:t.isEmpty())??!0}function t_e(e,t){var n;(n=Hl(e))==null||n.forEachLeafNode(t)}function n_e(e,t){var n;(n=Hl(e))==null||n.forEachNodeAfterFilter(t)}function o_e(e,t){var n;(n=Hl(e))==null||n.forEachNodeAfterFilterAndSort(t)}function s_e(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var n;return(n=Hl(e))==null?void 0:n.updateRowData(t)})}function r_e(e,t,n){e.frameworkOverrides.wrapIncoming(()=>{var o;return(o=Hl(e))==null?void 0:o.batchUpdateRowData(t,n)})}function i_e(e){e.frameworkOverrides.wrapIncoming(()=>{var t;return(t=Hl(e))==null?void 0:t.flushAsyncTransactions()})}function a_e(e){var t;return(t=e.selectionSvc)==null?void 0:t.getBestCostNodeSelection()}var RG={moduleName:"ClientSideRowModel",version:ct,rowModels:["clientSide"],beans:[Z0e,K0e],dependsOn:[OH]},l_e={moduleName:"ClientSideRowModelApi",version:ct,apiFunctions:{onGroupExpandedOrCollapsed:J0e,refreshClientSideRowModel:Q0e,isRowDataEmpty:e_e,forEachLeafNode:t_e,forEachNodeAfterFilter:n_e,forEachNodeAfterFilterAndSort:o_e,applyTransaction:s_e,applyTransactionAsync:r_e,flushAsyncTransactions:i_e,getBestCostNodeSelection:a_e,resetRowHeights:bG,onRowHeightChanged:CG},dependsOn:[N0e,L0e]},u_e=class extends qe{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:n,columnKeys:o,skipRowGroups:s,exportRowNumbers:r}=t,i=this.getColumnsToExport({allColumns:n,skipRowGroups:s,columnKeys:o,exportRowNumbers:r});return[this.prepareSession(i),this.prependContent(t),this.exportColumnGroups(t,i),this.exportHeaders(t,i),this.processPinnedTopRows(t,i),this.processRows(t,i),this.processPinnedBottomRows(t,i),this.appendContent(t)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,n,o){var p;const s=t.shouldRowBeSkipped||(()=>!1),i=t.rowPositions!=null||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!i,l=this.colModel.isPivotMode()?o.leafGroup:!o.group,u=!!o.footer,c=o.allChildrenCount===1&&((p=o.childrenAfterGroup)==null?void 0:p.length)===1&&dde(this.gos,o);if(!l&&!u&&(t.skipRowGroups||c||a)||t.onlySelected&&!o.isSelected()||t.skipPinnedTop&&o.rowPinned==="top"||t.skipPinnedBottom&&o.rowPinned==="bottom"||o.stub||o.level===-1&&!l&&!u||s(Ot(this.gos,{node:o})))return;const f=e.onNewBodyRow(o);if(n.forEach((g,v)=>{f.onColumn(g,v,o)}),t.getCustomContentBelowRow){const g=t.getCustomContentBelowRow(Ot(this.gos,{node:o}));g&&e.addCustomContent(g)}}appendContent(e){return t=>{const n=e.appendContent;return n&&t.addCustomContent(n),t}}prependContent(e){return t=>{const n=e.prependContent;return n&&t.addCustomContent(n),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return n=>{if(!e.skipColumnGroupHeaders){const o=new v2,{colGroupSvc:s}=this.beans,r=s?s.createColumnGroups({columns:t,idCreator:o,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(r,n,e.processGroupHeaderCallback)}return n}}exportHeaders(e,t){return n=>{if(!e.skipColumnHeaders){const o=n.onNewHeaderRow();t.forEach((s,r)=>{o.onColumn(s,r,void 0)})}return n}}processPinnedTopRows(e,t){return n=>{var s,r;const o=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(i=>i.rowPinned==="top").sort((i,a)=>i.rowIndex-a.rowIndex).map(i=>{var a;return(a=this.pinnedRowModel)==null?void 0:a.getPinnedTopRow(i.rowIndex)}).forEach(o):(s=this.pinnedRowModel)!=null&&s.isManual()||(r=this.pinnedRowModel)==null||r.forEachPinnedRow("top",o),n}}processRows(e,t){return n=>{var u;const o=this.rowModel,s=io(this.gos),r=Ud(this.gos),i=!s&&e.onlySelected,a=this.processRow.bind(this,n,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(c=>c.rowPinned==null).sort((c,d)=>c.rowIndex-d.rowIndex).map(c=>o.getRow(c.rowIndex)).forEach(a);else if(this.colModel.isPivotMode())s?o.forEachPivotNode(a,!0,l==="filteredAndSorted"):r?o.forEachNodeAfterFilterAndSort(a,!0):o.forEachNode(a);else if(e.onlySelectedAllPages||i){const c=((u=this.beans.selectionSvc)==null?void 0:u.getSelectedNodes())??[];this.replicateSortedOrder(c),c.forEach(a)}else l==="all"?o.forEachNode(a):s||r?o.forEachNodeAfterFilterAndSort(a,!0):o.forEachNode(a);return n}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:n}=this.beans;if(!t||!n)return;const o=t.getSortOptions(),s=(r,i)=>{var a,l;return r.rowIndex!=null&&i.rowIndex!=null?r.rowIndex-i.rowIndex:r.level===i.level?((a=r.parent)==null?void 0:a.id)===((l=i.parent)==null?void 0:l.id)?n.compareRowNodes(o,{rowNode:r,currentPos:r.rowIndex??-1},{rowNode:i,currentPos:i.rowIndex??-1}):s(r.parent,i.parent):r.level>i.level?s(r.parent,i):s(r,i.parent)};e.sort(s)}processPinnedBottomRows(e,t){return n=>{var s,r;const o=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(i=>i.rowPinned==="bottom").sort((i,a)=>i.rowIndex-a.rowIndex).map(i=>{var a;return(a=this.pinnedRowModel)==null?void 0:a.getPinnedBottomRow(i.rowIndex)}).forEach(o):(s=this.pinnedRowModel)!=null&&s.isManual()||(r=this.pinnedRowModel)==null||r.forEachPinnedRow("bottom",o),n}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:n=!1,exportRowNumbers:o=!1,columnKeys:s}=e,{colModel:r,gos:i,visibleCols:a}=this,l=r.isPivotMode(),u=h=>ka(h)?!1:!Fa(h)||o;if(s!=null&&s.length)return r.getColsForKeys(s).filter(u);const c=i.get("treeData");let d=[];return t&&!l?d=r.getCols():d=a.allCols,d=d.filter(h=>u(h)&&(n&&!c?!x_(h):!0)),d}recursivelyAddHeaderGroups(e,t,n){const o=[];for(const s of e){const r=s;if(r.getChildren)for(const i of r.getChildren()??[])o.push(i)}e.length>0&&ao(e[0])&&this.doAddHeaderHeader(t,e,n),o&&o.length>0&&this.recursivelyAddHeaderGroups(o,t,n)}doAddHeaderHeader(e,t,n){const o=e.onNewHeaderGroupingRow();let s=0;for(const r of t){const i=r;let a;n?a=n(Ot(this.gos,{columnGroup:i})):a=this.beans.colNames.getDisplayNameForColumnGroup(i,"header");const u=(i.isExpandable()?i.getLeafColumns():[]).reduce((c,d,h,f)=>{let p=kn(c);return d.getColumnGroupShow()==="open"?(!p||p[1]!=null)&&(p=[h],c.push(p)):p&&p[1]==null&&(p[1]=h-1),h===f.length-1&&p&&p[1]==null&&(p[1]=h),c},[]);o.onColumn(i,a||"",s++,i.getLeafColumns().length-1,u)}}},c_e={moduleName:"SharedExport",version:ct,beans:[u_e]},TG=`\r
|
|
253
|
-
`,d_e=class extends $be{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:n}=e;this.suppressQuotes=t,this.columnSeparator=n}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,TG),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((n,o)=>{o!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(n.data.value||""),n.mergeAcross&&this.appendEmptyCells(n.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,n,o){n!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(o)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,n){t!=0&&(this.result+=this.columnSeparator);const o=this.extractRowCellValue(e,t,t,"csv",n);this.result+=this.putInQuotes(o.valueFormatted??o.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(Je(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=TG),this.isFirstLine=!1}},h_e=class extends Bbe{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){Je(51);return}const t=this.getMergedParams(e),n=this.getData(t),o=new Blob(["\uFEFF",n],{type:"text/plain"}),s=typeof t.fileName=="function"?t.fileName(Ot(this.gos,{})):t.fileName;Hbe(this.getFileName(s),o)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const n=t?Object.assign({},e):this.getMergedParams(e);return this.getData(n)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:n,rowGroupColsSvc:o,valueSvc:s,gos:r}=this,{processCellCallback:i,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:u,suppressQuotes:c,columnSeparator:d}=e;return new d_e({colModel:t,colNames:n,valueSvc:s,gos:r,processCellCallback:i||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:u||void 0,suppressQuotes:c||!1,columnSeparator:d||",",rowGroupColsSvc:o})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function f_e(e,t){var n;return(n=e.csvCreator)==null?void 0:n.getDataAsCsv(t)}function p_e(e,t){var n;(n=e.csvCreator)==null||n.exportDataAsCsv(t)}var g_e={moduleName:"CsvExport",version:ct,beans:[h_e],apiFunctions:{getDataAsCsv:f_e,exportDataAsCsv:p_e},dependsOn:[c_e]},m_e=class extends qe{constructor(e,t,n){super(),this.id=e,this.parentCache=t,this.params=n,this.state="needsLoading",this.version=0,this.startRow=e*n.blockSize,this.endRow=this.startRow+n.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,n){this.successCommon(e,{rowData:t,rowCount:n})}isRequestMostRecentAndLive(e){const t=e===this.version,n=this.isAlive();return t&&n}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:n,beans:o,rowNodes:s}=this;for(let r=0;r<e;r++){const i=n+r,a=new Nl(o);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(i),a.setRowTop(t*i),s.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:n,state:o}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:n,pageStatus:o}}}setDataAndId(e,t,n){ft(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(Gn(this.params.datasource.getRows)){Je(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:n,params:{sortModel:o,filterModel:s},gos:r}=this;return{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,n),failCallback:this.pageLoadFailed.bind(this,n),sortModel:o,filterModel:s,context:Ot(r,{}).context}}forEachNode(e,t,n){this.rowNodes.forEach((o,s)=>{this.startRow+s<n&&e(o,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const n=e-this.startRow;return this.rowNodes[n]}processServerResult(e){const{rowNodes:t,beans:n}=this;t.forEach((s,r)=>{const i=e.rowData?e.rowData[r]:void 0;!s.id&&s.alreadyRendered&&i&&(t[r]=new Nl(n),t[r].setRowIndex(s.rowIndex),t[r].setRowTop(s.rowTop),t[r].setRowHeight(s.rowHeight),s.clearRowTopAndRowIndex()),this.setDataAndId(t[r],i,this.startRow+r)});const o=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,o)}destroy(){for(const e of this.rowNodes)e.clearRowTopAndRowIndex();super.destroy()}},v_e=2,y_e=class extends qe{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const n=Math.floor(e/this.params.blockSize);let o=this.blocks[n];if(!o){if(t)return;o=this.createBlock(n)}return o.getRow(e)}createBlock(e){const t=this.params,n=this.createBean(new m_e(e,this,t));return this.blocks[n.id]=n,this.blockCount++,this.purgeBlocksIfNeeded(n),t.rowNodeBlockLoader.addBlock(n),n}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(Al(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(i=>i!=e),n=(i,a)=>a.lastAccessed-i.lastAccessed;t.sort(n);const o=this.params.maxBlocksInCache>0,s=o?this.params.maxBlocksInCache-1:null,r=v_e-1;t.forEach((i,a)=>{const l=i.state==="needsLoading"&&a>=r,u=o?a>=s:!1;if(l||u){if(this.isBlockCurrentlyDisplayed(i)||this.isBlockFocused(i))return;this.removeBlockFromCache(i)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:n,endRow:o}=e;return t.rowIndex>=n&&t.rowIndex<o}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:n}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,n-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:n,overflowSize:o}=this.params,r=(e.id+1)*n+o;this.rowCount<r&&(this.rowCount=r)}}setRowCount(e,t){this.rowCount=e,ft(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const n of this.getBlocksInOrder())n.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(n,o)=>n.id-o.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const n=[];let o=-1,s=!1;const r={value:0};let i=!1;for(const l of this.getBlocksInOrder())if(!i){if(s&&o+1!==l.id){i=!0;continue}o=l.id,l.forEachNode(u=>{const c=u===e||u===t;(s||c)&&n.push(u),c&&(s=!s)},r,this.rowCount)}return i||s?[]:n}},w_e=class extends qe{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new Nl(e);this.rootNode=t,t.level=-1,this.rowHeight=qu(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=qu(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){var t;let e;this.cacheParams?e=!Dp(this.cacheParams.sortModel,((t=this.beans.sortSvc)==null?void 0:t.getSortModel())??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){var n;return((n=this.infiniteCache)==null?void 0:n.getRowNodesInRange(e,t))??[]}reset(){var n;if(!this.datasource)return;zd(this.gos)!=null||(n=this.beans.selectionSvc)==null||n.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:n,rowNodeBlockLoader:o,eventSvc:s,gos:r}=e;this.cacheParams={datasource:this.datasource,filterModel:(t==null?void 0:t.getFilterModel())??{},sortModel:(n==null?void 0:n.getSortModel())??[],rowNodeBlockLoader:o,initialRowCount:r.get("infiniteInitialRowCount"),maxBlocksInCache:r.get("maxBlocksInCache"),rowHeight:qu(e),overflowSize:r.get("cacheOverflowSize"),blockSize:r.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new y_e(this.cacheParams)),s.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(n=>{n.id===e&&(t=n)}),t}forEachNode(e){var t;(t=this.infiniteCache)==null||t.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),n=this.getRowCount()-1;return t>n?n:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){var e;(e=this.infiniteCache)==null||e.refreshCache()}purgeCache(){var e;(e=this.infiniteCache)==null||e.purgeCache()}isLastRowIndexKnown(){var e;return((e=this.infiniteCache)==null?void 0:e.isLastRowIndexKnown())??!1}setRowCount(e,t){var n;(n=this.infiniteCache)==null||n.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function C_e(e){var t;(t=Fw(e))==null||t.refreshCache()}function b_e(e){var t;(t=Fw(e))==null||t.purgeCache()}function S_e(e){var t;return(t=Fw(e))==null?void 0:t.getRowCount()}var E_e=class extends qe{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=hde(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=Yo(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){ti(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){Al(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(n=>n.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const n of t)n.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:n,state:o}=t.getBlockStateJson();e[n]=o}),e}printCacheStatus(){Al(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},__e={moduleName:"InfiniteRowModelCore",version:ct,rowModels:["infinite"],beans:[w_e,E_e]},R_e={moduleName:"InfiniteRowModel",version:ct,apiFunctions:{refreshInfiniteCache:C_e,purgeInfiniteCache:b_e,getInfiniteRowCount:S_e},dependsOn:[__e,V0e]},T_e="↑",D_e="↓",I_e={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},x_e=class extends Cn{constructor(){super(I_e),this.eValue=dt,this.eDelta=dt,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const n=Math.abs(t),o=e.formatValue(n),s=ft(o)?o:n,r=t>=0,i=this.eDelta;r?i.textContent=T_e+s:i.textContent=D_e+s,i.classList.toggle("ag-value-change-delta-up",r),i.classList.toggle("ag-value-change-delta-down",!r)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),qo(this.eDelta)}refresh(e,t=!1){var u;const{value:n,valueFormatted:o}=e,{eValue:s,lastValue:r,beans:i}=this;if(n===r||(ft(o)?s.textContent=o:ft(n)?s.textContent=n:qo(s),(u=i.filterManager)!=null&&u.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n,l=r&&typeof r=="object"&&"toNumber"in r?r.toNumber():r;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return r&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=n,!0}},A_e=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",P_e={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},k_e=class extends Cn{constructor(){super(P_e),this.eCurrent=dt,this.refreshCount=0,this.registerCSS(A_e)}init(e){this.refresh(e,!0)}addSlideAnimation(){var s;this.refreshCount++;const e=this.refreshCount;(s=this.ePrevious)==null||s.remove();const{beans:t,eCurrent:n}=this,o=lo({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=o,o.textContent=n.textContent,this.getGui().insertBefore(o,n),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{var r;e===this.refreshCount&&((r=this.ePrevious)==null||r.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var s;let n=e.value;if(Gn(n)&&(n=""),n===this.lastValue||(s=this.beans.filterManager)!=null&&s.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=n;const o=this.eCurrent;return ft(e.valueFormatted)?o.textContent=e.valueFormatted:ft(e.value)?o.textContent=n:qo(o),!0}},F_e=class extends qe{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,n=this.beans.gos.get("cellFlashDuration"),o=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const r=Date.now(),i=r+n,a=r+n+o,l={phase:"flash",flashEndTime:i,fadeEndTime:a};s.set(e,l);const u=`ag-cell-${t}`,c=`${u}-animation`,{comp:d,eGui:{style:h}}=e;d.toggleCss(u,!0),d.toggleCss(c,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&i+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),n)}),this.nextAnimationTime=i)}advanceAnimations(){const e=Date.now();let t=null;for(const n of Object.keys(this.animations)){const o=this.animations[n],s=`ag-cell-${n}`,r=`${s}-animation`;for(const[i,a]of o){if(!i.isAlive()||!i.comp){o.delete(i);continue}const{phase:l,flashEndTime:u,fadeEndTime:c}=a,d=l==="flash"?u:c;if(!(e+15>=d)){t=Math.min(d,t??1/0);continue}const{comp:f,eGui:{style:p}}=i;switch(l){case"flash":f.toggleCss(s,!1),f.toggleCss(r,!0),p.transition=`background-color ${c-u}ms`,p.transitionDelay=`${u-e}ms`,t=Math.min(c,t??1/0),a.phase="fade";break;case"fade":f.toggleCss(s,!1),f.toggleCss(r,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),o.delete(i);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const n=kme(e.cellPosition);t.cells[n]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t==null?void 0:t.flashDuration,t==null?void 0:t.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function O_e(e,t={}){const{cellFlashSvc:n}=e;n&&e.frameworkOverrides.wrapIncoming(()=>{for(const o of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))n.flashCell(o,t)})}var M_e={moduleName:"HighlightChanges",version:ct,beans:[F_e],userComponents:{agAnimateShowChangeCellRenderer:x_e,agAnimateSlideCellRenderer:k_e},apiFunctions:{flashCells:O_e}};function N_e(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function L_e(e,t,n){var o;return(o=e.stateSvc)==null?void 0:o.setState(t,n)}function DG(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=V_e(e)),e.version=ct,e}function V_e(e){return e.cellSelection=B_e(e,"rangeSelection"),e}function B_e(e,t){if(e&&typeof e=="object")return e[t]}var $_e=class extends qe{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=Yo(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=Yo(this,()=>{this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(this.updateCachedState("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowGroupExpansion",void 0)):(this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("ssrmRowGroupExpansion",void 0))},0),this.onRowSelectedDebounced=Yo(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:n}=this.beans;this.isClientSideRowModel=io(e);const o=DG(e.get("initialState")??{}),s=o.partialColumnState;delete o.partialColumnState,this.cachedState=o;const r=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>r(()=>this.setupStateOnGridReady(o))),(o.columnOrder||o.columnVisibility||o.columnSizing||o.columnPinning||o.columnGroup)&&(n==null||n.hideColumns("columnState"));const[i,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:u})=>{u==="gridInitializing"&&(i(),r(()=>{this.setupStateOnColumnsInitialised(o,!!s),n==null||n.revealColumns("columnState")}))},rowCountReady:()=>{a==null||a(),r(()=>this.setupStateOnRowCountReady(o))},firstDataRendered:()=>{l==null||l(),r(()=>this.setupStateOnFirstDataRendered(o))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const n=DG(e);delete n.partialColumnState,this.cachedState=n,this.startSuppressEvents();const o="api",s=t?new Set(t):void 0;this.setGridReadyState(n,o,s),this.setColumnsInitialisedState(n,o,!!s,s),this.setRowCountState(n,o,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(n,o,s),this.stopSuppressEvents(o)})}setGridReadyState(e,t,n){var o,s;t==="api"&&!(n!=null&&n.has("sideBar"))&&((s=(o=this.beans.sideBar)==null?void 0:o.comp)==null||s.setState(e.sideBar)),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,n,o){this.setColumnState(e,t,n,o),this.setColumnGroupState(e,t,o),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const n=o=>()=>this.updateColumnState([o]);this.addManagedEventListeners({columnValueChanged:n("aggregation"),columnMoved:n("columnOrder"),columnPinned:n("columnPinning"),columnResized:n("columnSizing"),columnVisible:n("columnVisibility"),columnPivotChanged:n("pivot"),columnPivotModeChanged:n("pivot"),columnRowGroupChanged:n("rowGroup"),sortChanged:n("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,n){const{filter:o,rowGroupExpansion:s,ssrmRowGroupExpansion:r,rowSelection:i,pagination:a}=e,l=(c,d)=>!(n!=null&&n.has(c))&&(d||t==="api");l("filter",o)&&this.setFilterState(o),l("rowGroupExpansion",s)&&this.setRowGroupExpansionState(r,s,t),l("rowSelection",i)&&this.setRowSelectionState(i,t),l("pagination",a)&&this.setPaginationState(a,t);const u=this.updateCachedState.bind(this);u("filter",this.getFilterState()),this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(u("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),u("rowGroupExpansion",void 0)):(u("rowGroupExpansion",this.getRowGroupExpansionState()),u("ssrmRowGroupExpansion",void 0)),u("rowSelection",this.getRowSelectionState()),u("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(t("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),t("rowGroupExpansion",void 0)):(t("rowGroupExpansion",this.getRowGroupExpansionState()),t("ssrmRowGroupExpansion",void 0))},o=()=>t("filter",this.getFilterState()),{gos:s,colFilter:r}=this.beans;this.addManagedEventListeners({filterChanged:o,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{(s.get("groupDefaultExpanded")!==0||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(n)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:i=>{(i.newPage||i.newPageSize)&&t("pagination",this.getPaginationState())}}),r&&this.addManagedListeners(r,{filterStateChanged:o})}setFirstDataRenderedState(e,t,n){const{scroll:o,cellSelection:s,focusedCell:r,columnOrder:i,rowPinning:a}=e,l=(d,h)=>!(n!=null&&n.has(d))&&(h||t==="api");l("focusedCell",r)&&this.setFocusedCellState(r),l("cellSelection",s)&&this.setCellSelectionState(s),l("scroll",o)&&this.setScrollState(o),l("rowPinning",a)&&this.setRowPinningState(a),this.setColumnPivotState(!!(i!=null&&i.orderedColIds),t);const u=this.updateCachedState.bind(this);u("sideBar",this.getSideBarState()),u("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();u("rangeSelection",c),u("cellSelection",c),u("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:n,cellFocusCleared:n,cellSelectionChanged:o=>{if(o.finished){const s=this.getRangeSelectionState();t("rangeSelection",s),t("cellSelection",s)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return Nbe(nw(e),e.colModel.isPivotMode())}setColumnState(e,t,n,o){const{sort:s,rowGroup:r,aggregation:i,pivot:a,columnPinning:l,columnVisibility:u,columnSizing:c,columnOrder:d}=e;let h=!1;const f=(x,P)=>{const k=!(o!=null&&o.has(x))&&!!(P||t==="api");return h||(h=k),k},p={},g=x=>{let P=p[x];return P||(P={colId:x},p[x]=P,P)},v={},w=f("sort",s);w&&(s==null||s.sortModel.forEach(({colId:x,sort:P},k)=>{const M=g(x);M.sort=P,M.sortIndex=k})),(w||!n)&&(v.sort=null,v.sortIndex=null);const S=f("rowGroup",r);S&&(r==null||r.groupColIds.forEach((x,P)=>{const k=g(x);k.rowGroup=!0,k.rowGroupIndex=P})),(S||!n)&&(v.rowGroup=null,v.rowGroupIndex=null);const b=f("aggregation",i);b&&(i==null||i.aggregationModel.forEach(({colId:x,aggFunc:P})=>{g(x).aggFunc=P})),(b||!n)&&(v.aggFunc=null);const y=f("pivot",a);y&&(a==null||a.pivotColIds.forEach((x,P)=>{const k=g(x);k.pivot=!0,k.pivotIndex=P}),this.gos.updateGridOptions({options:{pivotMode:!!(a!=null&&a.pivotMode)},source:t})),(y||!n)&&(v.pivot=null,v.pivotIndex=null);const E=f("columnPinning",l);if(E){for(const x of(l==null?void 0:l.leftColIds)??[])g(x).pinned="left";for(const x of(l==null?void 0:l.rightColIds)??[])g(x).pinned="right"}(E||!n)&&(v.pinned=null);const _=f("columnVisibility",u);if(_)for(const x of(u==null?void 0:u.hiddenColIds)??[])g(x).hide=!0;(_||!n)&&(v.hide=null);const I=f("columnSizing",c);if(I)for(const{colId:x,flex:P,width:k}of(c==null?void 0:c.columnSizingModel)??[]){const M=g(x);M.flex=P??null,M.width=k}(I||!n)&&(v.flex=null);const T=d==null?void 0:d.orderedColIds,F=!!(T!=null&&T.length)&&!(o!=null&&o.has("columnOrder")),L=F?T.map(x=>g(x)):Object.values(p);(L.length||h)&&(this.columnStates=L,ni(this.beans,{state:L,applyOrder:F,defaultState:v},t))}setColumnPivotState(e,t){const n=this.columnStates;this.columnStates=void 0;const o=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:r,colGroupSvc:i}=s;if(r!=null&&r.isPivotResultColsPresent()){if(n){const a=[];for(const l of n)r.getPivotResultCol(l.colId)&&a.push(l);ni(s,{state:a,applyOrder:e},t)}o&&(i==null||i.setColumnGroupState(o,t))}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return Lbe(t)}setColumnGroupState(e,t,n){var a;const o=this.beans.colGroupSvc;if(!o||n!=null&&n.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set((a=e.columnGroup)==null?void 0:a.openColumnGroupIds),i=o.getColumnGroupState().map(({groupId:l})=>{const u=s.has(l);return u&&s.delete(l),{groupId:l,open:u}});for(const l of s)i.push({groupId:l,open:!0});i.length&&(this.columnGroupStates=i),o.setColumnGroupState(i,t)}getFilterState(){const e=this.beans.filterManager;let t=e==null?void 0:e.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const n=e==null?void 0:e.getFilterState(),o=(e==null?void 0:e.getAdvFilterModel())??void 0;return t||o||n?{filterModel:t,columnFilterState:n,advancedFilterModel:o}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:n,columnFilterState:o,advancedFilterModel:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(n!==void 0||o!==void 0)&&(t==null||t.setFilterState(n??null,o??null,"columnFilter")),s!==void 0&&(t==null||t.setAdvFilterModel(s??null,"advancedFilter"))}getRangeSelectionState(){var t;const e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(n=>{const{id:o,type:s,startRow:r,endRow:i,columns:a,startColumn:l}=n;return{id:o,type:s,startRow:r,endRow:i,colIds:a.map(u=>u.getColId()),startColId:l.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:n,colModel:o,visibleCols:s}=this.beans;if(!Aa(t)||!n)return;const r=[];for(const i of(e==null?void 0:e.cellRanges)??[]){const a=[];for(const u of i.colIds){const c=o.getCol(u);c&&a.push(c)}if(!a.length)continue;let l=o.getCol(i.startColId);if(!l){const u=s.allCols,c=new Set(a);l=u.find(d=>c.has(d))}r.push({...i,columns:a,startColumn:l})}n.setCellRanges(r)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(e==null?void 0:e.getHScrollPosition())??{left:0},{top:n}=(e==null?void 0:e.getVScrollPosition())??{top:0};return n||t?{top:n,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:n}=e??{top:0,left:0},{frameworkOverrides:o,rowRenderer:s,animationFrameSvc:r,ctrlsSvc:i}=this.beans;o.wrapIncoming(()=>{var a;i.get("center").setCenterViewportScrollLeft(n),(a=i.getScrollFeature())==null||a.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),r==null||r.flushAllFrames()})}getSideBarState(){var e,t;return(t=(e=this.beans.sideBar)==null?void 0:e.comp)==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:n,rowPinned:o}=e;return{colId:t.getColId(),rowIndex:n,rowPinned:o}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:n}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:o,rowIndex:s,rowPinned:r}=e;t.setFocusedCell({column:n.getCol(o),rowIndex:s,rowPinned:r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const n=e.getCurrentPage(),o=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!n&&!o))return{page:n,pageSize:o}}setPaginationState(e,t){const{pagination:n,gos:o}=this.beans;if(!n)return;const{pageSize:s,page:r}=e??{page:0,pageSize:o.get("paginationPageSize")},i=t==="gridInitializing";s&&!o.get("paginationAutoPageSize")&&n.setPageSize(s,i?"initialState":"pageSizeSelector"),typeof r=="number"&&(i?n.setPage(r):n.goToPage(r))}getRowSelectionState(){var o;const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((o=t==null?void 0:t.toggledNodes)!=null&&o.length)?void 0:t}setRowSelectionState(e,t){var n;(n=this.beans.selectionSvc)==null||n.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e}=this.beans;if(e)return e.getExpansionState()}getRowPinningState(){var e;return(e=this.beans.pinnedRowModel)==null?void 0:e.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t==null||t.setPinnedState(e):t==null||t.reset()}setRowGroupExpansionState(e,t,n){const o=this.beans.expansionSvc;if(!o)return;const s=t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};o.setExpansionState(s,n)}updateColumnState(e){const t=this.getColumnState();let n=!1;const o=this.cachedState;for(const s of Object.keys(t)){const r=t[s];Dp(r,o[s])||(n=!0)}this.cachedState={...o,...t},n&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const n=this.cachedState[e];this.setCachedStateValue(e,t),Dp(t,n)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){var e;this.suppressEvents=!0,(e=this.beans.colAnimation)==null||e.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{var t;this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&((t=this.beans.colAnimation)==null||t.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},H_e={moduleName:"GridState",version:ct,beans:[$_e],apiFunctions:{getState:N_e,setState:L_e}};function G_e(e){return e.rowModel.isLastRowIndexKnown()}function U_e(e){var t;return((t=e.pagination)==null?void 0:t.getPageSize())??100}function W_e(e){var t;return((t=e.pagination)==null?void 0:t.getCurrentPage())??0}function z_e(e){var t;return((t=e.pagination)==null?void 0:t.getTotalPages())??1}function j_e(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function K_e(e){var t;(t=e.pagination)==null||t.goToNextPage()}function q_e(e){var t;(t=e.pagination)==null||t.goToPreviousPage()}function Y_e(e){var t;(t=e.pagination)==null||t.goToFirstPage()}function X_e(e){var t;(t=e.pagination)==null||t.goToLastPage()}function Z_e(e,t){var n;(n=e.pagination)==null||n.goToPage(t)}var J_e=class extends qe{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,n=()=>{const o=Math.max(qu(t),1),s=Math.floor(e/o);t.pagination.setPageSize(s,"autoCalculated")};this.isBodyRendered?Yo(this,n,50)():(n(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},ug="paginationPageSizeSelector",Q_e={tag:"span",cls:"ag-paging-page-size"},eRe=class extends Cn{constructor(){super(Q_e),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(ug,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!(e!=null&&e.newPageSize))return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){qo(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(ug)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),n=!t||!e.includes(t);if(n){const s=this.gos.exists("paginationPageSize"),r=this.gos.get(ug)!==!0;Je(94,{pageSizeSet:s,pageSizesSet:r,pageSizeOptions:e,paginationPageSizeOption:t}),r||Je(95,{paginationPageSizeOption:t,paginationPageSizeSelector:ug}),e.unshift("")}const o=String(n?"":t);this.selectPageSizeComp?(Fl(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(o,!0)):this.createPageSizeSelectorComp(e,o),this.hasEmptyOption=n}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const n=this.getLocaleTextFunc(),o=n("pageSizeSelectorLabel","Page Size:"),s=n("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Z_).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(s).setLabel(o).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(ug);return!Array.isArray(t)||!(t!=null&&t.length)?e:[...t].sort((n,o)=>n-o)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},tRe={selector:"AG-PAGE-SIZE-SELECTOR",component:eRe},nRe=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:var(--ag-pagination-panel-height);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}",oRe=class extends V${constructor(){super(),this.btFirst=dt,this.btPrevious=dt,this.btNext=dt,this.btLast=dt,this.lbRecordCount=dt,this.lbFirstRowOnPage=dt,this.lbLastRowOnPage=dt,this.lbCurrent=dt,this.lbTotal=dt,this.pageSizeComp=dt,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(nRe)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[tRe]);const{btFirst:t,btPrevious:n,btNext:o,btLast:s}=this;this.activateTabIndex([t,n,o,s]),t.insertAdjacentElement("afterbegin",kr(e?"last":"first",this.beans)),n.insertAdjacentElement("afterbegin",kr(e?"next":"previous",this.beans)),o.insertAdjacentElement("afterbegin",kr(e?"previous":"next",this.beans)),s.insertAdjacentElement("afterbegin",kr(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:r=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(r):Jpe(this.beans,r),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){const{el:t,fn:n}=e;this.addManagedListeners(t,{click:n,keydown:o=>{(o.key===Ve.ENTER||o.key===Ve.SPACE)&&(o.preventDefault(),n())}})}Zpe(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):Vbe(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),n=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const o=this.isZeroPagesToDisplay(),s=e===n-1;this.nextButtonDisabled=s||o,this.lastButtonDisabled=!t||o||e===n-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){fce(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),n=this.pagination.getMasterRowCount(),o=e?n:null,s=this.pagination.getCurrentPage(),r=this.pagination.getPageSize();let i,a;this.isZeroPagesToDisplay()?i=a=0:(i=r*s+1,a=i+r-1,e&&a>o&&(a=o));const l=i+r-1,u=!e&&n<l,c=this.formatNumber(i);this.lbFirstRowOnPage.textContent=c;let d;const h=this.getLocaleTextFunc();u?d=h("pageLastRowUnknown","?"):d=this.formatNumber(a),this.lbLastRowOnPage.textContent=d;const p=t>0?s+1:0,g=this.formatNumber(p);this.lbCurrent.textContent=g;let v,w;if(e)v=this.formatNumber(t),w=this.formatNumber(o);else{const S=h("more","more");v=S,w=S}this.lbTotal.textContent=v,this.lbRecordCount.textContent=w,this.announceAriaStatus(c,d,w,g,v)}announceAriaStatus(e,t,n,o,s){var d,h;const r=this.getLocaleTextFunc(),i=r("page","Page"),a=r("to","to"),l=r("of","of"),u=`${e} ${a} ${t} ${l} ${n}`,c=`${i} ${o} ${l} ${s}`;u!==this.ariaRowStatus&&(this.ariaRowStatus=u,(d=this.ariaAnnounce)==null||d.announceValue(u,"paginationRow")),c!==this.ariaPageStatus&&(this.ariaPageStatus=c,(h=this.ariaAnnounce)==null||h.announceValue(c,"paginationPage"))}},sRe={selector:"AG-PAGINATION",component:oRe},rRe=class extends qe{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return sRe}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:n}=this.beans;n!=null&&n.isEditing()&&(n.isBatchEditing()?n.cleanupEditors():n.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){var n,o;if(!this.active)return;let t=e;this.paginateChildRows||(t=((o=(n=this.beans.rowModel).getTopLevelIndexFromDisplayedIndex)==null?void 0:o.call(n,e))??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return ft(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:ft(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:ft(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:ft(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const n=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}n!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const n=this.pageSize,o=t-1;this.totalPages=Math.floor(o/n)+1,this.adjustCurrentPageIfInvalid();const s=this.currentPage,r=n*s;let i=n*(s+1)-1;if(i>o&&(i=o),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(r),i===o)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(i+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:n}=this,o=e-1;this.totalPages=Math.floor(o/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*n,this.bottomDisplayedRowIndex=t*(n+1)-1,this.bottomDisplayedRowIndex>o&&(this.bottomDisplayedRowIndex=o)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:n=!1,newPageSize:o=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:n,newPageSize:o,keepRenderedRows:t})}},iRe={moduleName:"Pagination",version:ct,beans:[rRe,J_e],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:G_e,paginationGetPageSize:U_e,paginationGetCurrentPage:W_e,paginationGetTotalPages:z_e,paginationGetRowCount:j_e,paginationGoToNextPage:K_e,paginationGoToPreviousPage:q_e,paginationGoToFirstPage:Y_e,paginationGoToLastPage:X_e,paginationGoToPage:Z_e},dependsOn:[Ow]};function aRe(e,t={}){const n=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(n))}function IG(e,t,n,o,s){t&&(o&&t.parent&&t.parent.level!==-1&&IG(e,t.parent,n,o,s),t.setExpanded(n,void 0,s))}function lRe(e,t){return e.rowModel.getRowNode(t)}function uRe(e,t,n,o){e.rowRenderer.addRenderedRowListener(t,n,o)}function cRe(e){return e.rowRenderer.getRenderedNodes()}function dRe(e,t,n){e.rowModel.forEachNode(t,n)}function hRe(e){return e.rowRenderer.firstRenderedRow}function fRe(e){return e.rowRenderer.lastRenderedRow}function pRe(e,t){return e.rowModel.getRow(t)}function gRe(e){return e.rowModel.getRowCount()}var mRe={moduleName:"RowApi",version:ct,apiFunctions:{redrawRows:aRe,setRowNodeExpanded:IG,getRowNode:lRe,addRenderedRowListener:uRe,getRenderedNodes:cRe,forEachNode:dRe,getFirstDisplayedRowIndex:hRe,getLastDisplayedRowIndex:fRe,getDisplayedRowAtIndex:pRe,getDisplayedRowCount:gRe}},vRe={moduleName:"ScrollApi",version:ct,apiFunctions:{getVerticalPixelRange:AEe,getHorizontalPixelRange:PEe,ensureColumnVisible:uG,ensureIndexVisible:cG,ensureNodeVisible:kEe}};function yRe(e,t,n){if(!t)return;const o=e.ctrlsSvc.getGridBodyCtrl().eGridBody,s=`aria-${t}`;n===null?o.removeAttribute(s):o.setAttribute(s,n)}function wRe(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function CRe(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function bRe(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function SRe(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function ERe(e){return{rowHeight:qu(e),headerHeight:Xp(e)}}function _Re(e,t={}){var r;const n=[];for(const i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const a=i.getCellRenderer();a!=null&&n.push(Kp(a))}if((r=t.columns)!=null&&r.length)return n;const o=[],s=qR(t.rowNodes);for(const i of e.rowRenderer.getAllRowCtrls()){if(s&&!YR(i.rowNode,s)||!i.isFullWidth())continue;const a=i.getFullWidthCellRenderers();for(let l=0;l<a.length;l++){const u=a[l];u!=null&&o.push(Kp(u))}}return[...o,...n]}var RRe={moduleName:"RenderApi",version:ct,apiFunctions:{setGridAriaProperty:yRe,refreshCells:wRe,refreshHeader:CRe,isAnimationFrameQueueEmpty:bRe,flushAllAnimationFrames:SRe,getSizesForCurrentTheme:ERe,getCellRendererInstances:_Re}};function TRe(e,t){var n,o;typeof t=="number"?(n=e.colAutosize)==null||n.sizeColumnsToFit(t,"api"):(o=e.colAutosize)==null||o.sizeColumnsToFitGridBody(t)}function xG({colAutosize:e,visibleCols:t},n,o){Array.isArray(n)?e==null||e.autoSizeCols({colKeys:n,skipHeader:o,source:"api"}):e==null||e.autoSizeCols({...n,colKeys:n.colIds??t.allCols,source:"api"})}function DRe(e,t){var n;t&&typeof t=="object"?xG(e,t):(n=e.colAutosize)==null||n.autoSizeAllColumns({source:"api",skipHeader:t})}var IRe=class extends qe{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){var n;const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let o=!1;const s=t.type;if(s==="fitGridWidth"||s==="fitProvidedWidth")o=!0;else if(s==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const r=e.get("rowData");o=r!=null&&r.length>0&&io(e)}o&&((n=this.beans.colDelayRenderSvc)==null||n.hideColumns(s))}}autoSizeCols(e){const{eventSvc:t,visibleCols:n}=this.beans;this.innerAutoSizeCols(e).then(o=>{var u;const s=c=>qd(t,Array.from(c),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return s(o);const r=AG(this.beans),i=c=>n.leftCols.some(d=>Wp(d,c)),a=c=>n.rightCols.some(d=>Wp(d,c)),l=e.colKeys.filter(c=>!ka(c)&&!Fa(c)&&!i(c)&&!a(c));this.sizeColumnsToFit(r,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:(u=e.columnLimits)==null?void 0:u.map(c=>({...c,key:c.colId})),colKeys:l,onlyScaleUp:!0}),s(o)})}innerAutoSizeCols(e){return new Promise((t,n)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,n));const{colKeys:o,skipHeader:s,skipHeaderGroups:r,stopAtGroup:i,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:u=[],source:c="api"}=e,{animationFrameSvc:d,renderStatus:h,colModel:f,autoWidthCalc:p,visibleCols:g}=this.beans;if(d==null||d.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,n)});return}this.timesDelayed=0;const v=new Set;let w=-1;const S=Object.fromEntries(u.map(({colId:E,..._})=>[E,_])),b=s??this.gos.get("skipHeaderOnAutoSize"),y=r??b;for(;w!==0;){w=0;const E=[];for(const _ of o){if(!_||Rde(_))continue;const I=f.getCol(_);if(!I||v.has(I))continue;const T=p.getPreferredWidthForColumn(I,b);if(T>0){const F=S[I.colId]??{};F.minWidth??(F.minWidth=l),F.maxWidth??(F.maxWidth=a);const L=xRe(I,T,F);I.setActualWidth(L,c),v.add(I),w++}E.push(I)}E.length&&g.refresh(c)}y||this.autoSizeColumnGroupsByColumns(o,c,i),t(v)})}autoSizeColumn(e,t,n){this.autoSizeCols({colKeys:[e],skipHeader:n,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,n){const{colModel:o,ctrlsSvc:s}=this.beans,r=new Set,i=o.getColsForKeys(e);for(const l of i){let u=l.getParent();for(;u&&u!=n;)u.isPadding()||r.add(u),u=u.getParent()}let a;for(const l of r){for(const u of s.getHeaderRowContainerCtrls())if(a=u.getHeaderCtrlForColumn(l),a)break;a==null||a.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const n=this.gos.get("skipHeaderOnAutoSize"),o=()=>{this.autoSizeColumn(t,"uiColumnResized",n)};e.addEventListener("dblclick",o);const s=new sc(e);return s.addEventListener("doubleTap",o),()=>{e.removeEventListener("dblclick",o),s.destroy()}}addColumnGroupResize(e,t,n){const o=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const r=[],i=t.getDisplayedLeafColumns();for(const a of i)a.getColDef().suppressAutoSize||r.push(a.getColId());r.length>0&&this.autoSizeCols({colKeys:r,skipHeader:o,stopAtGroup:t,source:"uiColumnResized"}),n()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const n=AG(this.beans);if(n>0){this.sizeColumnsToFit(n,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):Je(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",n,o){var p,g;if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,n,o));return}const s={};for(const{key:v,...w}of(o==null?void 0:o.columnLimits)??[])s[typeof v=="string"?v:v.getColId()]=w;const r=this.beans.visibleCols.allCols;if(e<=0||!r.length)return;const i=Pa(r);if(o!=null&&o.onlyScaleUp&&i>e||e===i&&r.every(w=>{if(w.colDef.suppressSizeToFit)return!0;const S=s==null?void 0:s[w.getId()],b=(S==null?void 0:S.minWidth)??(o==null?void 0:o.defaultMinWidth),y=(S==null?void 0:S.maxWidth)??(o==null?void 0:o.defaultMaxWidth),E=w.getActualWidth();return(b==null||E>=b)&&(y==null||E<=y)}))return;const l=[],u=[];for(const v of r){const w=((p=o==null?void 0:o.colKeys)==null?void 0:p.some(S=>Wp(v,S)))??!0;v.getColDef().suppressSizeToFit||!w?u.push(v):l.push(v)}const c=l.slice(0);let d=!1;const h=v=>{ti(l,v),u.push(v)};for(const v of l){v.resetActualWidth(t);const w=s==null?void 0:s[v.getId()],S=(w==null?void 0:w.minWidth)??(o==null?void 0:o.defaultMinWidth),b=(w==null?void 0:w.maxWidth)??(o==null?void 0:o.defaultMaxWidth),y=v.getActualWidth();typeof S=="number"&&y<S?v.setActualWidth(S,t,!0):typeof b=="number"&&y>b&&v.setActualWidth(b,t,!0)}for(;!d;){d=!0;const v=e-Pa(u);if(v<=0)for(const w of l){const S=((g=s==null?void 0:s[w.getId()])==null?void 0:g.minWidth)??(o==null?void 0:o.defaultMinWidth)??w.minWidth;w.setActualWidth(S,t,!0)}else{const w=v/Pa(l);let S=v;for(let b=l.length-1;b>=0;b--){const y=l[b],E=s==null?void 0:s[y.getId()],_=(E==null?void 0:E.minWidth)??(o==null?void 0:o.defaultMinWidth),I=(E==null?void 0:E.maxWidth)??(o==null?void 0:o.defaultMaxWidth),T=y.getMinWidth(),F=y.getMaxWidth(),L=typeof _=="number"&&_>T?_:T,x=typeof I=="number"&&I<F?I:F;let P=Math.round(y.getActualWidth()*w);P<L?(P=L,h(y),d=!1):P>x?(P=x,h(y),d=!1):b===0&&(P=S),y.setActualWidth(P,t,!0),S-=P}}}for(const v of c)v.fireColumnWidthChangedEvent(t);const f=this.beans.visibleCols;f.setLeftValues(t),f.updateBodyWidths(),!n&&qd(this.eventSvc,c,!0,t)}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,n=e.get("autoSizeStrategy");(n==null?void 0:n.type)!=="fitGridWidth"&&(n==null?void 0:n.type)!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const o=n.type;if(o==="fitGridWidth"){const{columnLimits:s,defaultMinWidth:r,defaultMaxWidth:i}=n,a=s==null?void 0:s.map(({colId:l,minWidth:u,maxWidth:c})=>({key:l,minWidth:u,maxWidth:c}));this.sizeColumnsToFitGridBody({defaultMinWidth:r,defaultMaxWidth:i,columnLimits:a})}else o==="fitProvidedWidth"&&this.sizeColumnsToFit(n.width,"sizeColumnsToFit");t==null||t.revealColumns(o)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{var o;if(!this.isAlive())return;const n="autosizeColumns";e?this.autoSizeCols({...t,source:n,colKeys:e}):this.autoSizeAllColumns({...t,source:n}),(o=this.beans.colDelayRenderSvc)==null||o.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function xRe(e,t,n={}){const o=n.minWidth??e.getMinWidth();t<o&&(t=o);const s=n.maxWidth??e.getMaxWidth();return t>s&&(t=s),t}function AG({ctrlsSvc:e,scrollVisibleSvc:t}){const n=e.getGridBodyCtrl(),s=n.isVerticalScrollShowing()?t.getScrollbarWidth():0;return kp(n.eGridBody)-s}var ARe={moduleName:"ColumnAutoSize",version:ct,beans:[IRe],apiFunctions:{sizeColumnsToFit:TRe,autoSizeColumns:xG,autoSizeAllColumns:DRe},dependsOn:[tH]},PRe=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function kRe(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function FRe(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function ORe(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedTopRow(t)}function MRe(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedBottomRow(t)}function NRe(e,t,n){var o;return(o=e.pinnedRowModel)==null?void 0:o.forEachPinnedRow(t,n)}var LRe={moduleName:"PinnedRow",version:ct,beans:[Oge],css:[PRe],apiFunctions:{getPinnedTopRowCount:kRe,getPinnedBottomRowCount:FRe,getPinnedTopRow:ORe,getPinnedBottomRow:MRe,forEachPinnedRow:NRe},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},VRe=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){var n;const e=(n=this.firstNode.__autoHeights)==null?void 0:n[this.col.getColId()];if(e==null)return;let t=0;for(const o of this.spannedNodes)o!==this.lastNode&&(t+=o.rowHeight);return e-t}},BRe=class extends qe{constructor(e){super(),this.column=e}buildCache(e){var b;const{column:t,beans:{gos:n,pinnedRowModel:o,rowModel:s,valueSvc:r,pagination:i}}=this,{colDef:a}=t,l=this.getNodeMap(e),u=new Map,c=n.getCallback("isFullWidthRow"),d=a.equals,h=a.spanRows,f=typeof h=="function";let p=null,g=null,v;const w=(y,E)=>{p=y,g=null,v=E},S=y=>{const E=!y.isExpandable()&&!y.group&&!y.detail&&(c?!c({rowNode:y}):!0);if(y.rowIndex==null||!E){w(null,null);return}if(p==null||y.level!==p.level||y.footer||g&&y.rowIndex-1!==(g==null?void 0:g.getLastNode().rowIndex)){w(y,r.getValue(t,y));return}const _=r.getValue(t,y);if(f){const I=Ot(n,{valueA:v,nodeA:p,valueB:_,nodeB:y,column:t,colDef:a});if(!h(I)){w(y,_);return}}else if(d?!d(v,_):v!==_){w(y,_);return}if(!g){const I=l==null?void 0:l.get(p);(I==null?void 0:I.firstNode)===p?(I.reset(),g=I):g=new VRe(t,p),u.set(p,g)}g.addSpannedNode(y),u.set(y,g)};switch(e){case"center":(b=s.forEachDisplayedNode)==null||b.call(s,y=>{(!i||i.isRowInPage(y.rowIndex))&&S(y)}),this.centerValueNodeMap=u;break;case"top":o==null||o.forEachPinnedRow("top",S),this.topValueNodeMap=u;break;case"bottom":o==null||o.forEachPinnedRow("bottom",S),this.bottomValueNodeMap=u;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},$Re=class extends qe{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=Yo(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=Yo(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const n=this.createManagedBean(new BRe(e));this.spanningColumns.set(e,n),n.buildCache("top"),n.buildCache("bottom"),n.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t==null||t.createCtrls("top"),t==null||t.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t==null||t.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const n=this.spanningColumns.get(e);return n?n.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:n}=this.beans,o=e.column,s=e.rowIndex,r=this.spanningColumns.get(o);if(!r)return;let i;switch(e.rowPinned){case"top":i=t==null?void 0:t.getPinnedTopRow(s);break;case"bottom":i=t==null?void 0:t.getPinnedBottomRow(s);break;default:i=n.getRow(s)}if(i)return r.getCellSpan(i)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const n=this.spanningColumns.get(e);if(n)return n.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[n,o]of this.spanningColumns)if(o.isCellSpanning(e)){const s=o.getCellSpan(e);t(n,s)}}destroy(){super.destroy(),this.spanningColumns.clear()}},HRe=class extends ih{constructor(e,t,n){super(e.col,e.firstNode,n,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,n,o,s,r,i){this.eWrapper=n,super.setComp(e,t,n,o,s,r,i),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||Ny(e,t.rowIndex)}setAriaRowSpan(){yce(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(Sw(t)){this.focusedCellPosition=void 0;return}const n=this.isCellFocused();n||(this.focusedCellPosition=void 0),e&&n&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},GRe=class extends kw{onRowIndexChanged(){super.onRowIndexChanged();for(const e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){var o;const t=(o=this.beans.rowSpanSvc)==null?void 0:o.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new HRe(t,this,this.beans)}isCorrectCtrlForSpan(e){var o;const t=(o=this.beans.rowSpanSvc)==null?void 0:o.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},URe=class extends qe{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,n=this.getCtrlsMap(e),o=n.size,s=this.getAllRelevantRowControls(e),r=new Map;let i=!1;for(const l of s)l.isAlive()&&(t==null||t.forEachSpannedColumn(l.rowNode,(u,c)=>{if(r.has(c.firstNode))return;const d=n.get(c.firstNode);if(d){r.set(c.firstNode,d),n.delete(c.firstNode);return}i=!0;const h=new GRe(c.firstNode,this.beans,!1,!1,!1);r.set(c.firstNode,h)}));this.setCtrlsMap(e,r);const a=r.size===o;if(!(!i&&a)){for(const l of n.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,n=t==null?void 0:t.getCellSpanByPosition(e);if(!n)return;const o=this.getCtrlsMap(e.rowPinned).get(n.firstNode);if(o)return o.getAllCellCtrls().find(s=>s.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},WRe={moduleName:"CellSpan",version:ct,beans:[$Re,URe]},zRe=class extends qe{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,n=e.colDef,o=n.cellClassRules,s=this.getCellClassParams(e,n);jR(this.beans.expressionSvc,o===this.cellClassRules?void 0:this.cellClassRules,o,s,r=>t.toggleCss(r,!0),r=>t.toggleCss(r,!1)),this.cellClassRules=o}applyUserStyles(){const e=this.column,t=e.colDef,n=t.cellStyle;if(!n)return;let o;if(typeof n=="function"){const s=this.getCellClassParams(e,t);o=n(s)}else o=n;o&&this.cellComp.setUserStyles(o)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,n=e.colDef,o=this.getCellClassParams(e,n);for(const r of this.staticClasses)t.toggleCss(r,!1);const s=this.beans.cellStyles.getStaticCellClasses(n,o);this.staticClasses=s;for(const r of s)t.toggleCss(r,!0)}getCellClassParams(e,t){const{value:n,rowNode:o}=this.cellCtrl;return Ot(this.beans.gos,{value:n,data:o.data,node:o,colDef:t,column:e,rowIndex:o.rowIndex})}},jRe=class extends qe{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,n,o){jR(this.beans.expressionSvc,void 0,e.cellClassRules,t,n,o),this.processStaticCellClasses(e,t,n)}getStaticCellClasses(e,t){const{cellClass:n}=e;if(!n)return[];let o;return typeof n=="function"?o=n(t):o=n,typeof o=="string"&&(o=[o]),o||[]}createCellCustomStyleFeature(e,t){return new zRe(e,t)}processStaticCellClasses(e,t,n){this.getStaticCellClasses(e,t).forEach(s=>{n(s)})}},KRe={moduleName:"CellStyle",version:ct,beans:[jRe]},qRe={moduleName:"RowStyle",version:ct,beans:[OCe]};function YRe(e,t){var n;return!!((n=e.colHover)!=null&&n.isHovered(t))}var XRe=class extends qe{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=n=>{const{beans:o,gos:s,element:r,columns:i}=this,a=o.colHover;if(n??!!s.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(r,{mouseover:a.setMouseOver.bind(a,i),mouseout:a.clearMouseOver.bind(a)});else{for(const u of this.destroyManagedListeners)u();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},ZRe="ag-column-hover",JRe=class extends qe{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,n){const o=()=>{const s=this.isHovered(n);t.toggleCss("ag-column-hover",s)};e.addManagedEventListeners({columnHoverChanged:o}),o()}onCellColumnHover(e,t){if(!t)return;const n=this.isHovered(e);t.toggleCss(ZRe,n)}addHeaderFilterColumnHoverListener(e,t,n,o){this.createHoverFeature(e,[n],o);const s=()=>{const r=this.isHovered(n);t.toggleCss("ag-column-hover",r)};e.addManagedEventListeners({columnHoverChanged:s}),s()}createHoverFeature(e,t,n){e.createManagedBean(new XRe(t,n))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},QRe={moduleName:"ColumnHover",version:ct,beans:[JRe],apiFunctions:{isColumnHovered:YRe}},eTe=class extends qe{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){var e,t;this.wrapSvc=(t=(e=this.beans.frameworkOverrides).createGlobalEventListenerWrapper)==null?void 0:t.call(e)}addListener(e,t){var r;const n=((r=this.wrapSvc)==null?void 0:r.wrap(e,t))??t,o=!xw.has(e),s=o?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(n),this.eventSvc.addListener(e,n,o)}removeListener(e,t){var r,i;const n=((r=this.wrapSvc)==null?void 0:r.unwrap(e,t))??t,o=this.asyncListeners.get(e),s=!!(o!=null&&o.delete(n));s||(i=this.syncListeners.get(e))==null||i.delete(n),this.eventSvc.removeListener(e,n,s)}addGlobalListener(e){var r;const t=((r=this.wrapSvc)==null?void 0:r.wrapGlobal(e))??e,n=(i,a)=>{xw.has(i)&&t(i,a)},o=(i,a)=>{xw.has(i)||t(i,a)};this.globalListenerPairs.set(e,{syncListener:n,asyncListener:o});const s=this.eventSvc;s.addGlobalListener(n,!1),s.addGlobalListener(o,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:n,globalListenerPairs:o}=this,s=(n==null?void 0:n.unwrapGlobal(e))??e;if(o.has(s)){const{syncListener:i,asyncListener:a}=o.get(s);t.removeGlobalListener(i,!1),t.removeGlobalListener(a,!0),o.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((n,o)=>{n.forEach(s=>this.eventSvc.removeListener(o,s,t)),n.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const n of e)this.eventSvc.removeGlobalListener(n,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:n,asyncListener:o})=>{t.removeGlobalListener(n,!1),t.removeGlobalListener(o,!0)}),e.clear()}};function tTe(e,t,n){var o;(o=e.apiEventSvc)==null||o.addListener(t,n)}function nTe(e,t,n){var o;(o=e.apiEventSvc)==null||o.removeListener(t,n)}function oTe(e,t){var n;(n=e.apiEventSvc)==null||n.addGlobalListener(t)}function sTe(e,t){var n;(n=e.apiEventSvc)==null||n.removeGlobalListener(t)}var rTe={moduleName:"EventApi",version:ct,apiFunctions:{addEventListener:tTe,addGlobalListener:oTe,removeEventListener:nTe,removeGlobalListener:sTe},beans:[eTe]},iTe={moduleName:"Locale",version:ct,beans:[Mbe]},aTe=class extends qe{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=Yo(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){var a,l,u,c;const{visibleCols:e,rowModel:t,rowSpanSvc:n,pinnedRowModel:o}=this.beans,s=e.autoHeightCols;let r=!1;const i=d=>{var p;const h=d.__autoHeights;let f=Pl(this.beans,d).height;for(const g of s){let v=h==null?void 0:h[g.getColId()];const w=n==null?void 0:n.getCellSpan(g,d);if(w){if(w.getLastNode()!==d)continue;if(v=(p=n==null?void 0:n.getCellSpan(g,d))==null?void 0:p.getLastNodeAutoHeight(),!v)return}if(v==null){if(this.colSpanSkipCell(g,d))continue;return}f=Math.max(v,f)}f!==d.rowHeight&&(d.setRowHeight(f),r=!0)};(a=o==null?void 0:o.forEachPinnedRow)==null||a.call(o,"top",i),(l=o==null?void 0:o.forEachPinnedRow)==null||l.call(o,"bottom",i),(u=t.forEachDisplayedNode)==null||u.call(t,i),r&&((c=t.onRowHeightChanged)==null||c.call(t))}setRowAutoHeight(e,t,n){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[n.getId()];return}const o=e.__autoHeights[n.getId()];e.__autoHeights[n.getId()]=t,o!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:n,colViewport:o,visibleCols:s}=this.beans;if(!n.colSpanActive)return!1;let r=[];switch(e.getPinned()){case"left":r=s.getLeftColsForRow(t);break;case"right":r=s.getRightColsForRow(t);break;case null:r=o.getColsWithinViewport(t);break}return!r.includes(e)}setupCellAutoHeight(e,t,n){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const o=t.parentElement,{rowNode:s,column:r}=e,i=this.beans,a=c=>{var S;if((S=this.beans.editSvc)!=null&&S.isEditing(e)||!e.isAlive()||!n.isAlive())return;const{paddingTop:d,paddingBottom:h,borderBottomWidth:f,borderTopWidth:p}=ju(o),g=d+h+f+p,w=t.offsetHeight+g;if(c<5){const b=$o(i),y=!(b!=null&&b.contains(t)),E=w==0;if(y||E){window.setTimeout(()=>a(c+1),0);return}}this.setRowAutoHeight(s,w,r)},l=()=>a(0);l();const u=Il(i,t,l);return n.addDestroyFunc(()=>{u(),this.setRowAutoHeight(s,void 0,r)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:n}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(n).filter(s=>s.isAutoHeight())),t.length!==0){if(!n.__autoHeights)return!1;for(const o of t){const s=n.__autoHeights[o.getColId()];if(!s||n.rowHeight<s)return!1}}return!0}},lTe={moduleName:"RowAutoHeight",version:ct,beans:[aTe]},uTe={moduleName:"AllCommunity",version:ct,dependsOn:[RG,g_e,R_e,Qbe,u0e,c0e,d0e,h0e,f0e,p0e,g0e,l0e,tEe,nEe,oEe,eEe,rEe,iEe,H_e,$0e,iRe,rH,mRe,vRe,RRe,ARe,qme,LRe,A0e,mbe,KRe,QRe,qRe,rTe,wbe,M_e,iG,iTe,lTe,Kme,l_e,WRe]};let PG=!1;PG||(tde.registerModules([uTe,RG]),PG=!0);class cTe{constructor(t,n){Rn(this,"gridApi",null);Rn(this,"container");Rn(this,"config");Rn(this,"eventListeners",new Map);this.container=t,this.config=n}init(){if(this.gridApi)throw new Error("Grid already initialized");const{onGridReady:t,onCellClicked:n,onCellFocused:o,onRowSelected:s,...r}=this.config,i={...r,onGridReady:a=>{this.gridApi=a.api,t&&t(a)},onCellClicked:a=>{n&&n(a)},onCellFocused:a=>{o&&o(a)},onRowSelected:a=>{s&&s(a)}};return this.gridApi=Pbe(this.container,i),this.gridApi}updateRowData(t){this.gridApi&&this.gridApi.setGridOption("rowData",t)}updateColumnDefs(t){this.gridApi&&this.gridApi.setGridOption("columnDefs",t)}setColumnWidth(t){var n;this.gridApi&&((n=this.gridApi)==null||n.applyColumnState({state:t,applyOrder:!1}))}updateDatasource(t){this.gridApi&&this.gridApi.setGridOption("datasource",t)}refreshInfiniteCache(){this.gridApi&&this.gridApi.refreshInfiniteCache()}sizeColumnsToFit(){this.gridApi}deselectAll(){this.gridApi&&this.gridApi.deselectAll()}getSelectedRows(){var t;return((t=this.gridApi)==null?void 0:t.getSelectedRows())||[]}setQuickFilterText(t){this.gridApi&&this.gridApi.setGridOption("quickFilterText",t)}getColumnState(){var t;return(t=this.gridApi)==null?void 0:t.getColumnState()}addEventListener(t,n){if(!this.gridApi)throw new Error("Grid not initialized");this.eventListeners.has(t)||this.eventListeners.set(t,new Set),this.eventListeners.get(t).add(n),this.gridApi.addEventListener(t,n)}addRow(t,n="bottom"){if(this.gridApi){const o={add:[t],addIndex:n==="bottom"?void 0:0};if(this.gridApi.applyTransaction(o),n==="bottom"){const s=this.gridApi.getDisplayedRowCount();s>0&&this.gridApi.ensureIndexVisible(s-1,"bottom")}}}addRows(t,n="bottom"){if(this.gridApi&&t.length>0){const o={add:t,addIndex:n==="bottom"?void 0:0};if(this.gridApi.applyTransaction(o),n==="bottom"){const s=this.gridApi.getDisplayedRowCount();s>0&&this.gridApi.ensureIndexVisible(s-1,"bottom")}}}destroy(){this.gridApi&&(this.eventListeners.forEach((t,n)=>{t.forEach(o=>{var s;(s=this.gridApi)==null||s.removeEventListener(n,o)})}),this.eventListeners.clear(),this.gridApi.destroy(),this.gridApi=null)}getApi(){return this.gridApi}switchTheme(t){document.body.dataset.agThemeMode=t==="dark"?"dark":"light"}}const dTe=dH.withParams({accentColor:"var(--primary-color)",backgroundColor:"#ffffff",borderColor:"#e5e7eb",borderRadius:4,browserColorScheme:"light",chromeBackgroundColor:"#f9fafb",columnBorder:!0,fontFamily:"inherit",fontSize:14,foregroundColor:"#111827",headerBackgroundColor:"#fff",headerFontSize:14,headerFontWeight:600,headerTextColor:"#374151",iconSize:16,rowBorder:!0,spacing:8,headerHeight:40,rowHeight:32,wrapperBorder:!0,wrapperBorderRadius:4},"light").withParams({accentColor:"var(--primary-color)",backgroundColor:"#1f2937",borderColor:"#374151",borderRadius:4,browserColorScheme:"dark",chromeBackgroundColor:"#111827",columnBorder:!0,fontFamily:"inherit",fontSize:14,foregroundColor:"#f9fafb",headerBackgroundColor:"#374151",headerFontSize:14,headerFontWeight:600,headerTextColor:"#f9fafb",iconSize:16,rowBorder:!0,spacing:8,headerHeight:40,rowHeight:32,wrapperBorder:!0,wrapperBorderRadius:4},"dark"),hTe=ot({__name:"AgTable",props:{statusBar:{},sideBar:{type:[Object,String,Array,Boolean,null]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:{},suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:{},tooltipShowDelay:{},tooltipHideDelay:{},tooltipMouseTrack:{type:Boolean},tooltipShowMode:{},tooltipInteraction:{type:Boolean},popupParent:{},copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:{},suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:{},defaultColDef:{},defaultColGroupDef:{},columnTypes:{},dataTypeDefinitions:{},maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:{},groupHeaderHeight:{},floatingFiltersHeight:{},pivotHeaderHeight:{},pivotGroupHeaderHeight:{},hidePaddedHeaderRows:{type:Boolean},allowDragFromColumnsToolPanel:{type:Boolean},suppressMovableColumns:{type:Boolean},suppressColumnMoveAnimation:{type:Boolean},suppressMoveWhenColumnDragging:{type:Boolean},suppressDragLeaveHidesColumns:{type:Boolean},suppressGroupChangesColumnVisibility:{type:[Boolean,String]},suppressMakeColumnVisibleAfterUnGroup:{type:Boolean},suppressRowGroupHidesColumns:{type:Boolean},colResizeDefault:{},suppressAutoSize:{type:Boolean},autoSizePadding:{},skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:{},components:{},editType:{},suppressStartEditOnTab:{type:Boolean},getFullRowEditValidationErrors:{type:Function},invalidEditValueMode:{},singleClickEdit:{type:Boolean},suppressClickEdit:{type:Boolean},readOnlyEdit:{type:Boolean},stopEditingWhenCellsLoseFocus:{type:Boolean},enterNavigatesVertically:{type:Boolean},enterNavigatesVerticallyAfterEdit:{type:Boolean},enableCellEditingOnBackspace:{type:Boolean},undoRedoCellEditing:{type:Boolean},undoRedoCellEditingLimit:{},defaultCsvExportParams:{},suppressCsvExport:{type:Boolean},defaultExcelExportParams:{},suppressExcelExport:{type:Boolean},excelStyles:{},findSearchValue:{},findOptions:{},quickFilterText:{},cacheQuickFilter:{type:Boolean},includeHiddenColumnsInQuickFilter:{type:Boolean},quickFilterParser:{type:Function},quickFilterMatcher:{type:Function},applyQuickFilterBeforePivotOrAgg:{type:Boolean},excludeChildrenWhenTreeDataFiltering:{type:Boolean},enableAdvancedFilter:{type:Boolean},alwaysPassFilter:{type:Function},includeHiddenColumnsInAdvancedFilter:{type:Boolean},advancedFilterParent:{},advancedFilterBuilderParams:{},advancedFilterParams:{},suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableFilterHandlers:{type:Boolean},filterHandlers:{},enableCharts:{type:Boolean},chartThemes:{},customChartThemes:{},chartThemeOverrides:{},chartToolPanelsDef:{},chartMenuItems:{type:[Array,Function]},loadingCellRenderer:{},loadingCellRendererParams:{},loadingCellRendererSelector:{type:Function},localeText:{},masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:{},detailCellRenderer:{},detailCellRendererParams:{},detailRowHeight:{},detailRowAutoHeight:{type:Boolean},context:{},alignedGrids:{type:[Array,Function]},tabIndex:{},rowBuffer:{},valueCache:{type:Boolean},valueCacheNeverExpires:{type:Boolean},enableCellExpressions:{type:Boolean},suppressTouch:{type:Boolean},suppressFocusAfterRefresh:{type:Boolean},suppressBrowserResizeObserver:{type:Boolean},suppressPropertyNamesCheck:{type:Boolean},suppressChangeDetection:{type:Boolean},debug:{type:Boolean},loading:{type:Boolean},overlayLoadingTemplate:{},loadingOverlayComponent:{},loadingOverlayComponentParams:{},suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:{},noRowsOverlayComponent:{},noRowsOverlayComponentParams:{},suppressNoRowsOverlay:{type:Boolean},pagination:{type:Boolean},paginationPageSize:{},paginationPageSizeSelector:{type:[Array,Boolean]},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:{},pivotMaxGeneratedColumns:{},pivotDefaultExpanded:{},pivotColumnGroupTotals:{},pivotRowTotals:{},pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:{},suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:{},cellFadeDuration:{},allowShowChangeAfterFilter:{type:Boolean},domLayout:{},ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},rowDragInsertDelay:{},suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},dragAndDropImageComponent:{},dragAndDropImageComponentParams:{},fullWidthCellRenderer:{},fullWidthCellRendererParams:{},embedFullWidthRows:{type:Boolean},groupDisplayType:{},groupDefaultExpanded:{},autoGroupColumnDef:{},groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:{},groupAggFiltering:{type:[Boolean,Function]},groupTotalRow:{type:[String,Function]},grandTotalRow:{},suppressStickyTotalRow:{type:[Boolean,String]},groupSuppressBlankHeader:{type:Boolean},groupSelectsFiltered:{type:Boolean},showOpenedGroup:{type:Boolean},groupHideParentOfSingleChild:{type:[Boolean,String]},groupRemoveSingleChildren:{type:Boolean},groupRemoveLowestSingleChildren:{type:Boolean},groupHideOpenParents:{type:Boolean},groupAllowUnbalanced:{type:Boolean},rowGroupPanelShow:{},groupRowRenderer:{},groupRowRendererParams:{},treeData:{type:Boolean},treeDataChildrenField:{},treeDataParentIdField:{},rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},groupHierarchyConfig:{},pinnedTopRowData:{},pinnedBottomRowData:{},enableRowPinning:{type:[Boolean,String]},isRowPinnable:{type:Function},isRowPinned:{type:Function},rowModelType:{},rowData:{},asyncTransactionWaitMillis:{},suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:{},cacheOverflowSize:{},infiniteInitialRowCount:{},serverSideInitialRowCount:{},suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:{},maxBlocksInCache:{},maxConcurrentDatasourceRequests:{},blockLoadDebounceMillis:{},purgeClosedRowNodes:{type:Boolean},serverSideDatasource:{},serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:{},viewportDatasource:{},viewportRowModelPageSize:{},viewportRowModelBufferSize:{},alwaysShowHorizontalScroll:{type:Boolean},alwaysShowVerticalScroll:{type:Boolean},debounceVerticalScrollbar:{type:Boolean},suppressHorizontalScroll:{type:Boolean},suppressScrollOnNewData:{type:Boolean},suppressScrollWhenPopupsAreOpen:{type:Boolean},suppressAnimationFrame:{type:Boolean},suppressMiddleClickScrolls:{type:Boolean},suppressPreventDefaultOnMouseWheel:{type:Boolean},scrollbarWidth:{},rowSelection:{},cellSelection:{type:[Boolean,Object]},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:{},rowNumbers:{type:[Boolean,Object]},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:{},suppressClearOnFillReduction:{type:Boolean},sortingOrder:{},accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:{},suppressMaintainUnsortedOrder:{type:Boolean},icons:{},rowHeight:{},rowStyle:{},rowClass:{},rowClassRules:{},suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:{},deltaSort:{type:Boolean},treeDataDisplayType:{},enableGroupEdit:{type:Boolean},initialState:{},reactiveCustomComponents:{type:Boolean},renderingMode:{},theme:{},loadThemeGoogleFonts:{type:Boolean},themeCssLayer:{},styleNonce:{},themeStyleContainer:{},getContextMenuItems:{type:Function},getMainMenuItems:{type:Function},postProcessPopup:{type:Function},processUnpinnedColumns:{type:Function},processCellForClipboard:{type:Function},processHeaderForClipboard:{type:Function},processGroupHeaderForClipboard:{type:Function},processCellFromClipboard:{type:Function},sendToClipboard:{type:Function},processDataFromClipboard:{type:Function},isExternalFilterPresent:{type:Function},doesExternalFilterPass:{type:Function},getChartToolbarItems:{type:Function},createChartContainer:{type:Function},focusGridInnerElement:{type:Function},navigateToNextHeader:{type:Function},tabToNextHeader:{type:Function},navigateToNextCell:{type:Function},tabToNextCell:{type:Function},getLocaleText:{type:Function},getDocument:{type:Function},paginationNumberFormatter:{type:Function},getGroupRowAgg:{type:Function},isGroupOpenByDefault:{type:Function},ssrmExpandAllAffectsAllRows:{type:Boolean},initialGroupOrderComparator:{type:Function},processPivotResultColDef:{type:Function},processPivotResultColGroupDef:{type:Function},getDataPath:{type:Function},getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:{type:Function},isServerSideGroup:{type:Function},getServerSideGroupKey:{type:Function},getBusinessKeyForNode:{type:Function},getRowId:{type:Function},resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:{type:Function},isRowMaster:{type:Function},fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},onToolPanelVisibleChanged:{type:Function},onToolPanelSizeChanged:{type:Function},onColumnMenuVisibleChanged:{type:Function},onContextMenuVisibleChanged:{type:Function},onCutStart:{type:Function},onCutEnd:{type:Function},onPasteStart:{type:Function},onPasteEnd:{type:Function},onColumnVisible:{type:Function},onColumnPinned:{type:Function},onColumnResized:{type:Function},onColumnMoved:{type:Function},onColumnValueChanged:{type:Function},onColumnPivotModeChanged:{type:Function},onColumnPivotChanged:{type:Function},onColumnGroupOpened:{type:Function},onNewColumnsLoaded:{type:Function},onGridColumnsChanged:{type:Function},onDisplayedColumnsChanged:{type:Function},onVirtualColumnsChanged:{type:Function},onColumnEverythingChanged:{type:Function},onColumnsReset:{type:Function},onColumnHeaderMouseOver:{type:Function},onColumnHeaderMouseLeave:{type:Function},onColumnHeaderClicked:{type:Function},onColumnHeaderContextMenu:{type:Function},onComponentStateChanged:{type:Function},onCellValueChanged:{type:Function},onCellEditRequest:{type:Function},onRowValueChanged:{type:Function},onCellEditingStarted:{type:Function},onCellEditingStopped:{type:Function},onRowEditingStarted:{type:Function},onRowEditingStopped:{type:Function},onBulkEditingStarted:{type:Function},onBulkEditingStopped:{type:Function},onBatchEditingStarted:{type:Function},onBatchEditingStopped:{type:Function},onUndoStarted:{type:Function},onUndoEnded:{type:Function},onRedoStarted:{type:Function},onRedoEnded:{type:Function},onCellSelectionDeleteStart:{type:Function},onCellSelectionDeleteEnd:{type:Function},onRangeDeleteStart:{type:Function},onRangeDeleteEnd:{type:Function},onFillStart:{type:Function},onFillEnd:{type:Function},onFilterOpened:{type:Function},onFilterChanged:{type:Function},onFilterModified:{type:Function},onFilterUiChanged:{type:Function},onFloatingFilterUiChanged:{type:Function},onAdvancedFilterBuilderVisibleChanged:{type:Function},onFindChanged:{type:Function},onChartCreated:{type:Function},onChartRangeSelectionChanged:{type:Function},onChartOptionsChanged:{type:Function},onChartDestroyed:{type:Function},onCellKeyDown:{type:Function},onGridReady:{type:Function},onGridPreDestroyed:{type:Function},onFirstDataRendered:{type:Function},onGridSizeChanged:{type:Function},onModelUpdated:{type:Function},onVirtualRowRemoved:{type:Function},onViewportChanged:{type:Function},onBodyScroll:{type:Function},onBodyScrollEnd:{type:Function},onDragStarted:{type:Function},onDragStopped:{type:Function},onDragCancelled:{type:Function},onStateUpdated:{type:Function},onPaginationChanged:{type:Function},onRowDragEnter:{type:Function},onRowDragMove:{type:Function},onRowDragLeave:{type:Function},onRowDragEnd:{type:Function},onRowDragCancel:{type:Function},isRowValidDropPosition:{type:Function},onRowResizeStarted:{type:Function},onRowResizeEnded:{type:Function},onColumnRowGroupChanged:{type:Function},onRowGroupOpened:{type:Function},onExpandOrCollapseAll:{type:Function},onPivotMaxColumnsExceeded:{type:Function},onPinnedRowDataChanged:{type:Function},onPinnedRowsChanged:{type:Function},onRowDataUpdated:{type:Function},onAsyncTransactionsFlushed:{type:Function},onStoreRefreshed:{type:Function},onHeaderFocused:{type:Function},onCellClicked:{type:Function},onCellDoubleClicked:{type:Function},onCellFocused:{type:Function},onCellMouseOver:{type:Function},onCellMouseOut:{type:Function},onCellMouseDown:{type:Function},onRowClicked:{type:Function},onRowDoubleClicked:{type:Function},onRowSelected:{type:Function},onSelectionChanged:{type:Function},onCellContextMenu:{type:Function},onRangeSelectionChanged:{type:Function},onCellSelectionChanged:{type:Function},onTooltipShow:{type:Function},onTooltipHide:{type:Function},onSortChanged:{type:Function},height:{},isSorting:{type:Boolean}},emits:["onGridReady","row-clicked","cell-clicked","cell-focused","row-selected","on-scroll"],setup(e,{expose:t,emit:n}){const o=e,s=n,r=$(null);_E(r,()=>{var v;const g=(v=i.value)==null?void 0:v.getApi();g==null||g.clearFocusedCell()});const i=$(null),a=X(()=>({width:"100%",height:o.height||"500px"})),l=X(()=>({...o,theme:dTe}));function u(){var v;if(!r.value){console.warn("Grid container element not found");return}const g={...l.value,height:o.height};i.value=new cTe(r.value,g),i.value.init(),(v=i.value.getApi())==null||v.addEventListener("bodyScroll",()=>{s("on-scroll",new Event("scroll"))}),c()}function c(){var v;const g=((v=i.value)==null?void 0:v.getApi())??null;s("onGridReady",g)}function d(g){var w,S;if(!g)return;(w=i.value)==null||w.updateColumnDefs(g);const v=g.map(b=>b.field&&b.width&&!b.hide?{colId:b.field,width:b.width,flex:null}:null).filter(b=>b!==null);(S=i.value)==null||S.setColumnWidth(v)}function h(){var g;(g=i.value)==null||g.destroy(),i.value=null}function f(){var g;return((g=i.value)==null?void 0:g.getApi())||void 0}function p(){return i.value||null}return Qe(()=>o.columnDefs,(g,v)=>{const w=g==null?void 0:g.filter(b=>!b.hide).map(b=>b.field).join(","),S=v==null?void 0:v.filter(b=>!b.hide).map(b=>b.field).join(",");w!==S&&d(g)},{deep:!0}),Vn(()=>{h()}),t({gridApi:f,gridManager:p,syncColumnDefs:d}),Xt(()=>{u()}),Vn(()=>{h()}),(g,v)=>(q(),de("div",{ref_key:"gridContainerRef",ref:r,style:hn(a.value),class:le(["ag-theme-quartz",["ag-table-container",o.isSorting?"is-sorting":""]])},null,6))}});function lc(e){return uB(e)}const fTe=()=>[...[{headerName:"Thumbnail",field:"thumbnail",sortable:!1,filter:!1,pinned:"left",lockPinned:!0,suppressMovable:!0,headerComponent:lc(Sl),width:86,resizable:!1},{headerName:"Name",field:"name",sortable:!1,filter:!1,pinned:"left",lockPinned:!0,headerComponent:lc(Sl),suppressMovable:!0},{headerName:"Notes",field:"description",sortable:!1,filter:!1,suppressMovable:!1},{headerName:"Assignee",field:"assignees",sortable:!1,filter:!1,headerComponent:lc(Sl)},{headerName:"Status",field:"status",sortable:!1,filter:!1,headerComponent:lc(Sl)},{headerName:"Date Range",field:"dateRange",sortable:!1,filter:!1,headerComponent:lc(Sl)},{headerName:"Last Updated",field:"lastUpdated",sortable:!1,filter:!1,headerComponent:lc(Sl),cellRendererParams:n=>{var o,s,r;return{...n,value:(o=n==null?void 0:n.data)==null?void 0:o.lastUpdated.value,tooltip:((r=(s=n==null?void 0:n.data)==null?void 0:s.lastUpdated)==null?void 0:r.tooltip)||void 0,readOnly:!0}}},{headerName:"Completed On",field:"completedOn",sortable:!1,filter:!1,headerComponent:lc(Sl),cellRendererParams:n=>{var o,s,r;return{...n,value:(o=n==null?void 0:n.data)==null?void 0:o.completedOn.value,tooltip:((r=(s=n==null?void 0:n.data)==null?void 0:s.completedOn)==null?void 0:r.tooltip)||void 0,readOnly:!0}}}].map(n=>Tp.fromType(n))],$w={WIDTH:60,HEADER_CLASS:"ag-checkbox-header"},pTe=()=>({field:"__checkboxSelection",checkboxSelection:!0,headerCheckboxSelection:!0,pinned:"left",width:$w.WIDTH,minWidth:$w.WIDTH,maxWidth:$w.WIDTH,cellClass:"ag-checkbox-cell",headerClass:$w.HEADER_CLASS,headerComponent:My(zse),suppressMovable:!0}),kG="blank",gTe=[kG,"__checkboxSelection","options"],mTe=["uiColumnResized","uiColumnMoved","api"],vTe={headerName:"",field:"options",sortable:!1,filter:!1,editable:!0,pinned:"right",lockPosition:!0,suppressMovable:!0,resizable:!1},FG=(e,t)=>t!=null&&t.width?{...e,width:t.width,flex:void 0}:e,yTe=(e,t,n)=>{const{getCachedValue:o,setCachedValue:s}=bf({dbName:"item_table_column_configs",storeName:"column_configs"}),r=async()=>{const d=await o(t);if(!d||typeof d!="string")return null;try{const h=JSON.parse(d);return Array.isArray(h)?h:null}catch(h){return console.error("Failed to parse cached column config:",h),null}},i=$([]),a=pTe();let l=0;const u=async d=>{const h=++l,f=await r();if(h!==l)return;const p=new Map(f==null?void 0:f.map(k=>[k.field,k])),g=fTe(),v=Tp.fromType(vTe),w=!!f,b=((d==null?void 0:d.map(k=>{var M;return{headerName:k.name,field:`metric_${k.id}`,editable:((M=k==null?void 0:k.auth_permission)==null?void 0:M.permission)==2,sortable:!0,filter:!1,flex:1,context:{...k},hide:w?!p.has(`metric_${k.id}`):!(k.is_primary||k.is_point_metric),cellClass:"ag-cell-optimized",headerComponent:My(Sl),headerComponentParams:()=>({headerType:k.metric_type.code=="number"||k.metric_type.code=="formula"?"number":"default"})}}))||[]).map(k=>Tp.fromType(k)),y=[a,...g,...b,v],E=[],_=[],I=[];for(const k of y)k.pinned==="left"?E.push(k):k.pinned==="right"||k.field===kG?_.push(k):I.push(k);if(!f||f.length===0){i.value=y;return}const T=new Map(I.map(k=>[k.field,k])),F=[];for(const k of f)if(k.field&&T.has(k.field)){const M=T.get(k.field);F.push({...FG(M,k),hide:k.hide}),T.delete(k.field)}const L=Array.from(T.values()),x=[...F,...L].map(k=>({...k,lockPinned:!0})),P=k=>{const M=p.get(k.field),N=FG(k,M);return M&&M.hide!==void 0?{...N,hide:M.hide}:N};i.value=[...E.map(P),...x,..._.map(P)]};Qe(e,d=>u(d),{immediate:!0});const c=Cr((d,h)=>{if((d==null?void 0:d.source)!==void 0&&!mTe.includes(d.source))return;const f=n.value,p=f==null?void 0:f.getColumnDefs(),g=new Map;if(f==null||f.getColumnState().forEach(w=>{w.width&&g.set(w.colId,Number(w.width))}),i.value=p||i.value,!h)return;const v=(p??[]).filter(w=>w.field&&!gTe.includes(w.field)).map(w=>({field:w.field,hide:w.hide,width:g.get(w.field)||w.width,pinned:w.pinned}));s(t,JSON.stringify(v))},Si);return nD(()=>c.cancel()),{columnDefs:i,checkboxColumn:a,saveColumnConfig:c}},wTe=()=>{const e=un.getInstance().getItem("API_BASE_URL");return e!=null&&e.includes("v1")?e.slice(0,e.lastIndexOf("/v1")):String(e)},CTe=e=>{var P,k,M;const{showMessage:t,showErrorNetMessage:n}=Rs(),o=oo(),s={domainApi:wTe(),wsCode:un.getInstance().getItem("ws.code"),entityId:e.value.entityId},r=(M=(k=(P=o==null?void 0:o.appContext)==null?void 0:P.config)==null?void 0:k.globalProperties)==null?void 0:M.apiConfig;if(!r||s.domainApi===""||s.wsCode==="")throw new Error("API configuration is missing in useItems");const i=new ON(r,s);i.on("call-api",N=>{N.success?t(N.apiCode,"success"):n(N)});const a=Fo({}),l=$([]),u=$(!1),c=$(null),d=$(null),h=$(1),f=$(20);let p=Promise.resolve();const{setCachedUsers:g}=RJ(),v=N=>({workspaceId:e.value.workspaceId,entityIds:[e.value.entityId],orderBy:"id-asc",include_permission:"{include_permission}",include_permission_names:!0,q:N}),w=50,S=async(N,B,z)=>{if(!N.length)return[];const oe=B9(N,B);return(await Promise.all(oe.map(z))).flat()},b=async N=>{try{return(await i.getPermissionForItems({workspaceId:e.value.workspaceId,itemIds:N})).data.map(z=>[z==null?void 0:z.id,z.permission])}catch(B){return console.error("Failed to fetch item permissions chunk:",B),[]}},y=async(N,B)=>{try{const z=await i.getMetricValues({workspaceId:e.value.workspaceId,item_ids:N,per_page:N.length*B.length,metric_ids:B}),oe=z.data.map(te=>{const se=new Map(te.item_metrics.map(A=>[A.metric_id,{value:A.value,auth_permission:A==null?void 0:A.auth_permission}])),Z=Object.fromEntries(B.map(A=>[A,se.get(A)??null]));return[te==null?void 0:te.id,Z]}),ie=new Set(z.data.map(te=>te==null?void 0:te.id));for(const te of N)if(!ie.has(te)){const se=Object.fromEntries(B.map(Z=>[Z,{value:null,auth_permission:void 0}]));oe.push([te,se])}return oe}catch(z){return console.error("Failed to fetch a chunk of metric values:",z),N.map(ie=>[ie,Object.fromEntries(B.map(te=>[te,void 0]))])}},E=async N=>{try{const B=await i.getAssignedUser({workspaceId:e.value.workspaceId,item_ids:N,per_page:N.length}),z=B.data.flatMap(oe=>oe.assignees);return g(z),B.data.map(oe=>[oe==null?void 0:oe.id,oe==null?void 0:oe.assignees])}catch(B){return console.error("Failed to fetch a chunk of assigned users:",B),[]}},_=async N=>{if(!N.length)return console.warn("getPermissionForItems: Empty itemIds"),{};try{const B=await S(N,w,b);return Object.fromEntries(B)}catch(B){return console.error("Failed to fetch item permissions:",B),{}}},I=async(N,B)=>!N.length||!B.length?{}:(p=p.then(async()=>{try{const ie=[];let te=0;for(let Z=0;Z<B.length;Z+=5){te++;const A=B.slice(Z,Z+5),j=[];for(let ge=0;ge<A.length;ge++){const xe=A[ge],ue=await S(N,w,K=>y(K,[xe]));j.push(ue),await new Promise(K=>setTimeout(K,500))}ie.push(...j);const ne=Z+5>=B.length}const se={};for(const Z of ie.flat()){const[A,j]=Z;se[A]||(se[A]={}),Object.assign(se[A],j)}return se}catch(z){return console.error("Failed to fetch metric values:",z),{}}}),p),T=async N=>{if(!N.length)return console.warn("getAssignedUsers: Empty itemIds"),{};try{const B=await S(N,w,E);return Object.fromEntries(B)}catch(B){return console.error("Failed to fetch assigned users:",B),{}}};return{items:l,loading:u,error:c,pagination:d,currentPage:h,pageSize:f,cusorMap:a,fetchItems:async N=>{const{cursor:B,offset:z,size:oe,searchQuery:ie}=N;let te=[];u.value=!0,c.value=null;try{const se=await i.getAllItem_cursor({...N,cursor:B||void 0,offset:z||void 0,pageSize:oe||f.value,...v(ie),sortBy:N.sort_by});return l.value=se.data,d.value=se.meta,h.value=se.meta.current_page||0,te=se.data.map(Z=>Z==null?void 0:Z.id),se}catch(se){throw c.value=se,console.error("Failed to fetch items (cursor):",se),se}finally{const se=async()=>{try{const[Z,A]=await Promise.all([T(te),_(te)]);e.value.updateItemData({assignees:Z,permission:A},te);const j=await I(te,e.value.metricIds);e.value.setMetricValues(j,new Set(te),e.value.metricIds)}catch(Z){console.error("Post-fetch processing failed:",Z)}};u.value=!1,setTimeout(se)}},getAssignableStatus:async N=>{try{return await i.getAssignableStatus({workspaceId:e.value.workspaceId,itemIds:N})}catch(B){throw console.error("Failed to fetch assignable status:",B),B}},getMetricList:async N=>{try{return await i.getMetricList({workspaceId:e.value.workspaceId,entityId:N})}catch(B){throw console.error("Failed to fetch metric list:",B),B}},getMetricValues:I,getAssignedUsers:T}};function bTe(e){return{updateRowData:(o,s)=>{if(!e.value)return;const r=[],i=new Set,a=e.value.getColumnDefs();if(!a)return;const l=a.map(u=>{if(u.field&&u.field.startsWith("metric_")&&(u.hide===!1||u.hide===void 0))return u.field}).filter(Boolean);s.forEach(u=>{var d;const c=(d=e.value)==null?void 0:d.getRowNode(u);if(c){if(r.push(c),o.assignees){const h=hJ((o.assignees[u]||[]).map(bO));c.data.assignees=h,i.add("assignees")}o.permission&&(c.data.permissions=o.permission[u]),l.forEach(h=>{c.data[h]=c.data[h]??null})}}),i.add("assignees"),i.add("status"),i.add("dateRange"),i.add("moreActions"),i.add("name"),i.add("description"),e.value.refreshCells({rowNodes:r,columns:Array.from(i),force:!0})},setMetricValues:(o,s,r)=>{const i=e.value;if(!i)return;const a=new Map(Array.from(s).map(u=>[u,new Map(r.map(c=>[c,{value:null,auth_permission:void 0}]))]));Object.entries(o).forEach(([u,c])=>{Object.entries(c).forEach(([d,h])=>{var f;(f=a.get(u))==null||f.set(d,{value:h==null?void 0:h.value,auth_permission:h==null?void 0:h.auth_permission})})});const l=Array.from(a.entries()).map(([u,c])=>{const d=i.getRowNode(u);return d!=null&&d.data?(c.forEach((h,f)=>{const p=`metric_${f}`;d.data[p]=(h==null?void 0:h.value)||null;const g=`metric_permission_${f}`;d.data[p]=(h==null?void 0:h.value)||null,d.data[g]=(h==null?void 0:h.auth_permission)||null}),d):null});l.length>0&&i.refreshCells({rowNodes:l,columns:Array.from(r).map(u=>`metric_${u}`),force:!0})}}}function STe(e,t,n,o,s){let r=!0;return{async getRows(i){try{o(!0),r&&(s(!0),r=!1);const a=Math.floor(i.startRow/t)+1,{rows:l,total:u}=await e({page:a,pageSize:t,filterText:n(),sort_by:i.sortModel});let c=-1;Number.isFinite(u)?c=u:l.length<t&&(c=i.startRow+l.length),i.context={pageSize:t,text:n()},i.successCallback(l,c),o(!1),s(!1)}catch(a){console.error("Datasource fetch error:",a),i.failCallback(),o(!1),s(!1)}}}}function ETe(e){const{selectRowData:t,isSidebarOpen:n,quickFilterText:o,gridApi:s,fetcher:r}=e,i=$(!0),a=$(!0),l=$(!1),u=()=>{n.value=!n.value},c=v=>{if(i.value=!1,s.value=v,!v)return null;const{addEventListener:w,setGridOption:S}=v;if(!r)return console.error("Fetcher function is undefined"),null;const b=STe(r,e.perPage,()=>o.value,y=>{i.value=y},y=>{a.value=y});return S==null||S("datasource",b),w==null||w("selectionChanged",()=>{t.value=v.getSelectedRows()}),v||null},d=v=>{var w,S;if((w=s.value)==null||w.hideOverlay(),v!==void 0&&(o.value=v),(S=s.value)==null||S.deselectAll(),t.value=[],i.value=!0,!s.value||!r){console.error("Grid API or fetcher is not available"),i.value=!1;return}l.value=!0,a.value=!0,s.value.purgeInfiniteCache(),s.value.ensureIndexVisible(0,"top"),setTimeout(()=>{i.value=!1,setTimeout(()=>{l.value=!1},100)},300)},h=()=>{var v;(v=s.value)==null||v.deselectAll(),t.value=[]},f=Cr(v=>{d(v)},Si);return{isLoading:i,toggleSidebar:u,onGridReady:c,onSearch:f,handleUnSelect:h,firstLoad:a,cacheCleared:l,handleSelectAll:()=>{s.value},isSelectAll:$(!1)}}const _Te={changelog:{"1.0.1":{date:"2024-06-20",changes:["Fixed styling issues for archived and deleted rows."]},"1.0.0":{date:"2024-06-15",changes:["Initial release of the Item Table package."]},"0.0.1-alpha.8":{date:"2024-06-10",changes:["Improved performance of row updates.","Added support for custom cell renderers.","Add row hover effect for better UX.","Add loading skeleton for filter","Beta release with core functionalities implemented."]},"0.0.1-alpha.9":{date:"2024-06-05",changes:["Add row selection feature.","Fix bug with column resizing.","Optimize rendering for large datasets.","Implement getLog function to retrieve changelog entries based on version.","Display app version and changelog in the Item Table component tooltip.","Clean up unused autocomplete and memoized config composables.","Update styles for better consistency and readability."]},"0.0.1-alpha.11":{date:"2024-06-18",changes:["Add bulk process status display: items now show an hourglass icon and tooltip when being processed.","Update data model: added isProcessing and bulk_process properties to track item status.","Improve row focus: focused rows now flash for better visibility.","Set 'Last Updated' and 'Completed On' columns as read-only.","Fix: resolve visual fetching issue in useRemoteFiles composable.","Fix: use correct upload icon in PopupCreateScenes component.","Enhance data conversion to include processing status in item rows."]},"0.0.1-alpha.12":{date:"2024-06-12",changes:["feat: enhance Snackbar component and notification handling","Refactor Snackbar.vue for improved readability and styling, including color adjustments for icons and text.","Add showMessage function in notifications store to display messages based on API keys, improving notification management.","Introduce notificationMessage constant to centralize notification messages for various API actions, enhancing maintainability.","Remove unnecessary console logs from useRemoteFiles and improve logging in notification store for better debugging."]},"0.0.1-alpha.16":{date:"2024-06-20",changes:["Add onboarding tour feature and enhance UI components with new dependencies","Refactor UI components for improved styling and functionality","Updated RatingComponent.vue to streamline class bindings and improve accessibility attributes.","Enhanced SearchBox.vue by adding a clear event handler and simplifying icon rendering.","Modified AssigneeGroupEditor.vue and AssigneeGroupRenderer.vue to remove unnecessary size attributes from icons.","Adjusted DateRangeRenderer.vue to remove size attributes from icons for consistency.","Updated HeaderCheckbox.vue to set dropdown placement to 'bottom-start'.","Refined HeaderSorting.vue to simplify sort option labels and improve sorting logic.","Enhanced HeaderWrapper.vue to utilize reactive properties for sorting state.","Improved HyperLinkEditor.vue and HyperLinkInlineEditor.vue by removing size attributes from icons.","Updated PopupLayout.vue to use a CSS variable for box-shadow styling.","Refined Snackbar.vue to standardize icon colors and improve styling consistency.","Adjusted useTippy.ts to set default placement and arrow visibility for tooltips.","Modified notificationMessage.ts to remove error messages for list fetching.","Cleaned up notifications.ts by removing console logs for a cleaner codebase.","Updated sortStore.ts to comment out unnecessary console logs for better performance.","Enhanced styles.scss by defining new icon size variables and standardizing box-shadow styles."]},"0.0.99":{date:"2024-06-24",changes:["Fix: resolve issue with incorrect version display in Item Table component.","Update changelog retrieval logic to ensure accurate version matching.","Enhance tooltip display for app version and changelog in Item Table component."]}}},RTe=e=>{var t;return(t=Object.entries(_Te.changelog).find(([n,o])=>n===e))==null?void 0:t[1].changes},TTe={class:"visual-btn-visual"},DTe={class:"visual-btn--label"},ITe={key:0,class:"visual-btn--description"},xTe={key:1,class:"visual-btn--description"},Hw=_t(ot({__name:"VisualButton",props:{label:{},description:{},disabled:{type:Boolean}},emits:["onClick"],setup(e,{emit:t}){const n=e,o=()=>{n.disabled||s("onClick")},s=t;return(r,i)=>(q(),de("div",{class:le(["visual-btn",{"visual-btn--disabled":e.disabled}]),onClick:o},[Se("div",TTe,[kt(r.$slots,"visual",{},()=>[i[0]||(i[0]=Mz('<svg width="42" height="36" viewBox="0 0 42 36" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-c2003bd7><g clip-path="url(#clip0_4824_13082)" data-v-c2003bd7><path d="M5.14286 18V10.2857H18V18H5.14286ZM5.14286 23.1 429H18V30.8571H5.14286V23.1429ZM23.1429 30.8571V23.1429H36V30.8571H23.1429ZM36 18H23.1429V10.2857H36V18ZM5.14286 0C2.30625 0 0 2.30625 0 5.14286V30.8571C0 33.6937 2.30625 36 5.14286 36H36C38.8366 36 41.1429 33.6937 41.1429 30.8571V5.14286C41.1429 2.30625 38.8366 0 36 0H5.14286Z" fill="#D7D7D7" data-v-c2003bd7></path><path d="M0 5.14286C0 2.30625 2.30625 0 5.14286 0H36C38.8366 0 41.1429 2.30625 41.1429 5.14286V10.318H0V5.14286Z" fill="#A6A6A6" data-v-c2003bd7></path></g><defs data-v-c2003bd7><clipPath id="clip0_4824_13082" data-v-c2003bd7><rect width="41.1429" height="36" fill="white" data-v-c2003bd7></rect></clipPath></defs></svg>',1))],!0)]),Se("div",DTe,at(n.label),1),n.disabled?(q(),de("div",ITe," Coming soon ")):(q(),de("div",xTe,at(n.description),1))],2))}}),[["__scopeId","data-v-c2003bd7"]]),OG="xlsx_toolbox",MG="feedback_lockup_toolbox",ATe="TOOLBOX_EXPORT_DATA",PTe="https://app.arbocollab.com",kTe=1e3,NG=()=>sessionStorage.getItem("BASE_URL"),LG=(e,t="xlsx-mapping")=>{const n=Dn("switchInstance",void 0),o=`${t}:load`,s=`${t}:edit`,r=new Set;let i;const a=()=>{const h=t==="xlsx-mapping"?OG:MG,f={showLoad:!1};n?n(h,"",f):window.appManager.switchInstance(h,"",f)},l=(h,f)=>{const p=setTimeout(()=>{r.delete(p),window.postMessage({type:h,payload:f},`${NG()}`)},kTe);r.add(p)},u=h=>{if(!h)throw new Error("Payload is missing");a(),l(o,h)},c=(h,f)=>{if(!h)throw new Error("Error file is missing");a(),l(s,{file:h})},d=h=>{if((h==null?void 0:h.type)!==ATe)return;const{file:f,fileName:p}=h.payload;e({channel:t,file:new File([f],p,{type:f.type}),fileName:p});const g=t==="xlsx-mapping"?OG:MG;g=="xlsx_toolbox"&&window.appManager.hide(g)};return Xt(()=>{i=zne({target:window,allowedOrigins:[NG()||PTe],onMessage:d,onInvalidMessage:(h,f,p)=>{console.warn("Rejected postMessage:",f,p.origin)}})}),Vn(()=>{i==null||i(),r.forEach(clearTimeout),r.clear()}),{openToolbox:u,sendBackErrorFile:c}},FTe={class:"header-name"},OTe={class:"description"},MTe={key:0,class:"error-message"},NTe={class:"dynamic"},LTe={key:1,class:"choose-method-container"},VTe={key:3,class:"select-status-container"},BTe={key:4,class:"result-container"},$Te={key:5,class:"result-container"},HTe={key:0},GTe={key:3},VG="text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel",UTe=20,WTe=_t(ot({__name:"PopupToolboxUploader",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const o=Kt,s=X(()=>[1,2,6].includes(b.value)),r=X(()=>Sv()),i=X(()=>({1:{title:`Create ${r.value} in bulk`,description:""},2:{title:"Select status",description:"Choose the starting status for the new work."},3:{title:"Import successful",description:"Work will be created in background. Refresh to see updates."},4:{title:"Import failed",description:"Some data doesn't meet the requirements. Review it and try again."},6:{title:`Create ${r.value} by count`,description:""},7:{title:"Creation in progress",description:"Work will be created in the background. Refresh to see updates."},8:{title:"Create failed",description:""}})),a=["csv","xlsx","xls"],l=$({segments:[],count:0}),u=({data:R,count:G,template_flow_status_id:J})=>{console.log("handleChangeCreateWithCount called with data:",R,"count:",G,"template_flow_status_id:",J),l.value={segments:R,count:G,template_flow_status_id:J}},c=$(!1),d=async()=>{var R;if(!((R=v.value)!=null&&R.bulkCreate)){console.error("API services not available");return}c.value=!0;try{(await v.value.bulkCreate({workspaceId:f.workspaceId,entityId:f.entityId,payload:{...l.value,entity_id:f.entityId},filter:{}})).status===fs.ACCEPTED&&(b.value=7,g("import-success"))}catch(G){B(G),b.value=8}finally{c.value=!1}},h={"--popup-pt":"20px","--popup-pb":"20px","--popup-pl":"24px","--popup-pr":"24px"},f=e,p=X(()=>Sv()),g=n,{apiServices:v}=so(!1,f),w=1,S=$(),b=$(w),y=$(null),E=$(null),_=$(null),I=$(void 0),T=$(null),F=X(()=>i.value[b.value]),L=$(),x=()=>{var R;y.value=null,b.value=w,E.value=null,_.value=null,M.value=null,T.value=null,(R=L.value)==null||R.clear(),I.value=void 0,l.value={segments:[],count:0}},P=()=>{b.value=6},k=()=>{var R;x(),(R=S.value)==null||R.hide()};Qe([E,_],([R,G])=>{b.value===1&&R&&G&&(b.value=2)});const M=$(null),N=R=>Rs().getErrorMessageFromResponse(R),B=R=>{if(console.error(R),typeof R=="string"){M.value=R;return}const G=R.response,J=G==null?void 0:G.data,ce=N(J);M.value=ce??R.message},z=async(R,G)=>{var ce;if(!v.value||!f.workspaceId||!f.entityId){console.error("API services not available");return}K.value=!0;const J=new FormData;J.append("file",R),J.append("format",((ce=G??R.name)==null?void 0:ce.split(".").pop())??R.name.split(".").pop()??""),J.append("entity_id",f.entityId),J.append("template_flow_status_id",y.value??"");try{await v.value.addNewSceneViaImportFile(f.workspaceId,f.entityId,J),b.value=3,g("import-success")}catch(Ee){console.error("Error uploading file:",Ee),B(Ee||"An unknown error occurred during file upload."),b.value=4}finally{K.value=!1}},{openToolbox:oe,sendBackErrorFile:ie}=LG(({file:R,fileName:G,channel:J})=>{J==="xlsx-mapping"&&(_.value=R,I.value=G??R.name,b.value=2)}),te=$(null),se=async()=>{var R,G;b.value=6,await ht(),(G=(R=te.value)==null?void 0:R.focus)==null||G.call(R)},Z=async()=>{try{const R=await j();oe({template:R})}catch(R){console.error("Error opening toolbox:",R),Rs().showErrorNetMessage("Failed to open toolbox.")}},A=$(!1),j=async()=>{A.value=!0;const R=f.workspaceId,G=f.entityId;if(!R||!G||!v.value)return A.value=!1,Promise.reject(new Error("Workspace ID or Entity ID is missing"));try{const J=await v.value.downloadTemplate(R,G,!1);if(!J)throw new Error("No response from downloadTemplate API");return J}catch(J){return console.error("Error downloading template:",J),Promise.reject(J)}finally{A.value=!1}},ne=R=>{var ce;const G=((ce=R.name.split(".").pop())==null?void 0:ce.toLowerCase())??"",J=VG.split(",").map(Ee=>Ee.trim()).includes(R.type)||a.includes(G);return J||(console.error("Invalid file type:",R.type),Rs().addNotification({id:"invalid-file-type",message:"Invalid file type. Please upload a xlsx, xls, csv file.",type:"error"})),J},ge=async()=>{const R=document.createElement("input");R.type="file",R.accept=`${VG}, ${a.map(G=>`.${G}`).join(", ")}`,R.onchange=async()=>{var J;const G=(J=R.files)==null?void 0:J[0];if(G){if(!ne(G)){x();return}E.value=nv(G);try{const ce=await j();if(!ce){Rs().addNotification({id:"failed-download-template",message:"Failed to download template file.",type:"error"});return}oe({source:G,template:ce})}catch(ce){console.error("Error opening toolbox:",ce),Rs().addNotification({id:"failed-open-toolbox",message:"Failed to open toolbox.",type:"error"})}}},R.click()},xe=async R=>{var G;if(!((G=v.value)!=null&&G.getAssignableStatuses)){console.error("API services not available");return}return v.value.getAssignableStatuses(f.workspaceId,{entity_id:f.entityId,name_like:R.name_like,page:R.page,per_page:UTe})},ue=X(()=>{var R;return l.value.count==0||!((R=l.value.segments)!=null&&R.length)}),K=$(!1),Y=()=>{y.value=null,_.value&&I.value&&ie(_.value,I.value)},re=()=>{y.value&&_.value&&z(_.value,I.value)};return t({open:()=>{var R;return(R=S.value)==null?void 0:R.show()},close:()=>{var R;return(R=S.value)==null?void 0:R.hide()}}),(R,G)=>(q(),je(V(qN),jt({ref_key:"popupRef",ref:S,style:h,onHidden:x},{popupIndex:10,popupName:F.value.title,minWidth:"420px",showOverlay:!0,overlayOpacity:.5,closeOnOverlayClick:!1,closeOnEscape:!0,showCloseBtn:s.value}),Hh({header:we(()=>[Se("span",FTe,at(F.value.title),1)]),default:we(()=>[Se("div",{class:le(["modal-body",{"bulk-count":b.value===6,"choose-method":b.value===1}])},[Se("div",OTe,at(F.value.description),1),M.value&&b.value===4?(q(),de("div",MTe,[G[1]||(G[1]=tt(" Error code ",-1)),Se("span",NTe,at(M.value),1)])):Ye("",!0),b.value===1?(q(),de("div",LTe,[ye(Hw,{disabled:!1,label:"Create by count",description:"Enter how many to create.",onOnClick:se},{visual:we(()=>[ye(V(va),{src:"CreateByCount",size:65})]),_:1}),ye(Hw,{disabled:!1,label:"Start with a blank sheet",description:`Type or paste ${r.value} details
|
|
253
|
+
`,d_e=class extends $be{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:n}=e;this.suppressQuotes=t,this.columnSeparator=n}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,TG),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((n,o)=>{o!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(n.data.value||""),n.mergeAcross&&this.appendEmptyCells(n.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,n,o){n!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(o)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,n){t!=0&&(this.result+=this.columnSeparator);const o=this.extractRowCellValue(e,t,t,"csv",n);this.result+=this.putInQuotes(o.valueFormatted??o.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(Je(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=TG),this.isFirstLine=!1}},h_e=class extends Bbe{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){Je(51);return}const t=this.getMergedParams(e),n=this.getData(t),o=new Blob(["\uFEFF",n],{type:"text/plain"}),s=typeof t.fileName=="function"?t.fileName(Ot(this.gos,{})):t.fileName;Hbe(this.getFileName(s),o)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const n=t?Object.assign({},e):this.getMergedParams(e);return this.getData(n)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:n,rowGroupColsSvc:o,valueSvc:s,gos:r}=this,{processCellCallback:i,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:u,suppressQuotes:c,columnSeparator:d}=e;return new d_e({colModel:t,colNames:n,valueSvc:s,gos:r,processCellCallback:i||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:u||void 0,suppressQuotes:c||!1,columnSeparator:d||",",rowGroupColsSvc:o})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function f_e(e,t){var n;return(n=e.csvCreator)==null?void 0:n.getDataAsCsv(t)}function p_e(e,t){var n;(n=e.csvCreator)==null||n.exportDataAsCsv(t)}var g_e={moduleName:"CsvExport",version:ct,beans:[h_e],apiFunctions:{getDataAsCsv:f_e,exportDataAsCsv:p_e},dependsOn:[c_e]},m_e=class extends qe{constructor(e,t,n){super(),this.id=e,this.parentCache=t,this.params=n,this.state="needsLoading",this.version=0,this.startRow=e*n.blockSize,this.endRow=this.startRow+n.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,n){this.successCommon(e,{rowData:t,rowCount:n})}isRequestMostRecentAndLive(e){const t=e===this.version,n=this.isAlive();return t&&n}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:n,beans:o,rowNodes:s}=this;for(let r=0;r<e;r++){const i=n+r,a=new Nl(o);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(i),a.setRowTop(t*i),s.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:n,state:o}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:n,pageStatus:o}}}setDataAndId(e,t,n){ft(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(Gn(this.params.datasource.getRows)){Je(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:n,params:{sortModel:o,filterModel:s},gos:r}=this;return{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,n),failCallback:this.pageLoadFailed.bind(this,n),sortModel:o,filterModel:s,context:Ot(r,{}).context}}forEachNode(e,t,n){this.rowNodes.forEach((o,s)=>{this.startRow+s<n&&e(o,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const n=e-this.startRow;return this.rowNodes[n]}processServerResult(e){const{rowNodes:t,beans:n}=this;t.forEach((s,r)=>{const i=e.rowData?e.rowData[r]:void 0;!s.id&&s.alreadyRendered&&i&&(t[r]=new Nl(n),t[r].setRowIndex(s.rowIndex),t[r].setRowTop(s.rowTop),t[r].setRowHeight(s.rowHeight),s.clearRowTopAndRowIndex()),this.setDataAndId(t[r],i,this.startRow+r)});const o=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,o)}destroy(){for(const e of this.rowNodes)e.clearRowTopAndRowIndex();super.destroy()}},v_e=2,y_e=class extends qe{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const n=Math.floor(e/this.params.blockSize);let o=this.blocks[n];if(!o){if(t)return;o=this.createBlock(n)}return o.getRow(e)}createBlock(e){const t=this.params,n=this.createBean(new m_e(e,this,t));return this.blocks[n.id]=n,this.blockCount++,this.purgeBlocksIfNeeded(n),t.rowNodeBlockLoader.addBlock(n),n}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(Al(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(i=>i!=e),n=(i,a)=>a.lastAccessed-i.lastAccessed;t.sort(n);const o=this.params.maxBlocksInCache>0,s=o?this.params.maxBlocksInCache-1:null,r=v_e-1;t.forEach((i,a)=>{const l=i.state==="needsLoading"&&a>=r,u=o?a>=s:!1;if(l||u){if(this.isBlockCurrentlyDisplayed(i)||this.isBlockFocused(i))return;this.removeBlockFromCache(i)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:n,endRow:o}=e;return t.rowIndex>=n&&t.rowIndex<o}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:n}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,n-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:n,overflowSize:o}=this.params,r=(e.id+1)*n+o;this.rowCount<r&&(this.rowCount=r)}}setRowCount(e,t){this.rowCount=e,ft(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const n of this.getBlocksInOrder())n.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(n,o)=>n.id-o.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const n=[];let o=-1,s=!1;const r={value:0};let i=!1;for(const l of this.getBlocksInOrder())if(!i){if(s&&o+1!==l.id){i=!0;continue}o=l.id,l.forEachNode(u=>{const c=u===e||u===t;(s||c)&&n.push(u),c&&(s=!s)},r,this.rowCount)}return i||s?[]:n}},w_e=class extends qe{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new Nl(e);this.rootNode=t,t.level=-1,this.rowHeight=qu(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=qu(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){var t;let e;this.cacheParams?e=!Dp(this.cacheParams.sortModel,((t=this.beans.sortSvc)==null?void 0:t.getSortModel())??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){var n;return((n=this.infiniteCache)==null?void 0:n.getRowNodesInRange(e,t))??[]}reset(){var n;if(!this.datasource)return;zd(this.gos)!=null||(n=this.beans.selectionSvc)==null||n.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:n,rowNodeBlockLoader:o,eventSvc:s,gos:r}=e;this.cacheParams={datasource:this.datasource,filterModel:(t==null?void 0:t.getFilterModel())??{},sortModel:(n==null?void 0:n.getSortModel())??[],rowNodeBlockLoader:o,initialRowCount:r.get("infiniteInitialRowCount"),maxBlocksInCache:r.get("maxBlocksInCache"),rowHeight:qu(e),overflowSize:r.get("cacheOverflowSize"),blockSize:r.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new y_e(this.cacheParams)),s.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(n=>{n.id===e&&(t=n)}),t}forEachNode(e){var t;(t=this.infiniteCache)==null||t.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),n=this.getRowCount()-1;return t>n?n:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){var e;(e=this.infiniteCache)==null||e.refreshCache()}purgeCache(){var e;(e=this.infiniteCache)==null||e.purgeCache()}isLastRowIndexKnown(){var e;return((e=this.infiniteCache)==null?void 0:e.isLastRowIndexKnown())??!1}setRowCount(e,t){var n;(n=this.infiniteCache)==null||n.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function C_e(e){var t;(t=Fw(e))==null||t.refreshCache()}function b_e(e){var t;(t=Fw(e))==null||t.purgeCache()}function S_e(e){var t;return(t=Fw(e))==null?void 0:t.getRowCount()}var E_e=class extends qe{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=hde(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=Yo(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){ti(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){Al(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(n=>n.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const n of t)n.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:n,state:o}=t.getBlockStateJson();e[n]=o}),e}printCacheStatus(){Al(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},__e={moduleName:"InfiniteRowModelCore",version:ct,rowModels:["infinite"],beans:[w_e,E_e]},R_e={moduleName:"InfiniteRowModel",version:ct,apiFunctions:{refreshInfiniteCache:C_e,purgeInfiniteCache:b_e,getInfiniteRowCount:S_e},dependsOn:[__e,V0e]},T_e="↑",D_e="↓",I_e={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},x_e=class extends Cn{constructor(){super(I_e),this.eValue=dt,this.eDelta=dt,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const n=Math.abs(t),o=e.formatValue(n),s=ft(o)?o:n,r=t>=0,i=this.eDelta;r?i.textContent=T_e+s:i.textContent=D_e+s,i.classList.toggle("ag-value-change-delta-up",r),i.classList.toggle("ag-value-change-delta-down",!r)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),qo(this.eDelta)}refresh(e,t=!1){var u;const{value:n,valueFormatted:o}=e,{eValue:s,lastValue:r,beans:i}=this;if(n===r||(ft(o)?s.textContent=o:ft(n)?s.textContent=n:qo(s),(u=i.filterManager)!=null&&u.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n,l=r&&typeof r=="object"&&"toNumber"in r?r.toNumber():r;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return r&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=n,!0}},A_e=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",P_e={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},k_e=class extends Cn{constructor(){super(P_e),this.eCurrent=dt,this.refreshCount=0,this.registerCSS(A_e)}init(e){this.refresh(e,!0)}addSlideAnimation(){var s;this.refreshCount++;const e=this.refreshCount;(s=this.ePrevious)==null||s.remove();const{beans:t,eCurrent:n}=this,o=lo({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=o,o.textContent=n.textContent,this.getGui().insertBefore(o,n),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{var r;e===this.refreshCount&&((r=this.ePrevious)==null||r.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var s;let n=e.value;if(Gn(n)&&(n=""),n===this.lastValue||(s=this.beans.filterManager)!=null&&s.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=n;const o=this.eCurrent;return ft(e.valueFormatted)?o.textContent=e.valueFormatted:ft(e.value)?o.textContent=n:qo(o),!0}},F_e=class extends qe{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,n=this.beans.gos.get("cellFlashDuration"),o=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const r=Date.now(),i=r+n,a=r+n+o,l={phase:"flash",flashEndTime:i,fadeEndTime:a};s.set(e,l);const u=`ag-cell-${t}`,c=`${u}-animation`,{comp:d,eGui:{style:h}}=e;d.toggleCss(u,!0),d.toggleCss(c,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&i+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),n)}),this.nextAnimationTime=i)}advanceAnimations(){const e=Date.now();let t=null;for(const n of Object.keys(this.animations)){const o=this.animations[n],s=`ag-cell-${n}`,r=`${s}-animation`;for(const[i,a]of o){if(!i.isAlive()||!i.comp){o.delete(i);continue}const{phase:l,flashEndTime:u,fadeEndTime:c}=a,d=l==="flash"?u:c;if(!(e+15>=d)){t=Math.min(d,t??1/0);continue}const{comp:f,eGui:{style:p}}=i;switch(l){case"flash":f.toggleCss(s,!1),f.toggleCss(r,!0),p.transition=`background-color ${c-u}ms`,p.transitionDelay=`${u-e}ms`,t=Math.min(c,t??1/0),a.phase="fade";break;case"fade":f.toggleCss(s,!1),f.toggleCss(r,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),o.delete(i);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const n=kme(e.cellPosition);t.cells[n]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t==null?void 0:t.flashDuration,t==null?void 0:t.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function O_e(e,t={}){const{cellFlashSvc:n}=e;n&&e.frameworkOverrides.wrapIncoming(()=>{for(const o of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))n.flashCell(o,t)})}var M_e={moduleName:"HighlightChanges",version:ct,beans:[F_e],userComponents:{agAnimateShowChangeCellRenderer:x_e,agAnimateSlideCellRenderer:k_e},apiFunctions:{flashCells:O_e}};function N_e(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function L_e(e,t,n){var o;return(o=e.stateSvc)==null?void 0:o.setState(t,n)}function DG(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=V_e(e)),e.version=ct,e}function V_e(e){return e.cellSelection=B_e(e,"rangeSelection"),e}function B_e(e,t){if(e&&typeof e=="object")return e[t]}var $_e=class extends qe{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=Yo(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=Yo(this,()=>{this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(this.updateCachedState("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowGroupExpansion",void 0)):(this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("ssrmRowGroupExpansion",void 0))},0),this.onRowSelectedDebounced=Yo(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:n}=this.beans;this.isClientSideRowModel=io(e);const o=DG(e.get("initialState")??{}),s=o.partialColumnState;delete o.partialColumnState,this.cachedState=o;const r=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>r(()=>this.setupStateOnGridReady(o))),(o.columnOrder||o.columnVisibility||o.columnSizing||o.columnPinning||o.columnGroup)&&(n==null||n.hideColumns("columnState"));const[i,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:u})=>{u==="gridInitializing"&&(i(),r(()=>{this.setupStateOnColumnsInitialised(o,!!s),n==null||n.revealColumns("columnState")}))},rowCountReady:()=>{a==null||a(),r(()=>this.setupStateOnRowCountReady(o))},firstDataRendered:()=>{l==null||l(),r(()=>this.setupStateOnFirstDataRendered(o))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const n=DG(e);delete n.partialColumnState,this.cachedState=n,this.startSuppressEvents();const o="api",s=t?new Set(t):void 0;this.setGridReadyState(n,o,s),this.setColumnsInitialisedState(n,o,!!s,s),this.setRowCountState(n,o,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(n,o,s),this.stopSuppressEvents(o)})}setGridReadyState(e,t,n){var o,s;t==="api"&&!(n!=null&&n.has("sideBar"))&&((s=(o=this.beans.sideBar)==null?void 0:o.comp)==null||s.setState(e.sideBar)),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,n,o){this.setColumnState(e,t,n,o),this.setColumnGroupState(e,t,o),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const n=o=>()=>this.updateColumnState([o]);this.addManagedEventListeners({columnValueChanged:n("aggregation"),columnMoved:n("columnOrder"),columnPinned:n("columnPinning"),columnResized:n("columnSizing"),columnVisible:n("columnVisibility"),columnPivotChanged:n("pivot"),columnPivotModeChanged:n("pivot"),columnRowGroupChanged:n("rowGroup"),sortChanged:n("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,n){const{filter:o,rowGroupExpansion:s,ssrmRowGroupExpansion:r,rowSelection:i,pagination:a}=e,l=(c,d)=>!(n!=null&&n.has(c))&&(d||t==="api");l("filter",o)&&this.setFilterState(o),l("rowGroupExpansion",s)&&this.setRowGroupExpansionState(r,s,t),l("rowSelection",i)&&this.setRowSelectionState(i,t),l("pagination",a)&&this.setPaginationState(a,t);const u=this.updateCachedState.bind(this);u("filter",this.getFilterState()),this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(u("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),u("rowGroupExpansion",void 0)):(u("rowGroupExpansion",this.getRowGroupExpansionState()),u("ssrmRowGroupExpansion",void 0)),u("rowSelection",this.getRowSelectionState()),u("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(t("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),t("rowGroupExpansion",void 0)):(t("rowGroupExpansion",this.getRowGroupExpansionState()),t("ssrmRowGroupExpansion",void 0))},o=()=>t("filter",this.getFilterState()),{gos:s,colFilter:r}=this.beans;this.addManagedEventListeners({filterChanged:o,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{(s.get("groupDefaultExpanded")!==0||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(n)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:i=>{(i.newPage||i.newPageSize)&&t("pagination",this.getPaginationState())}}),r&&this.addManagedListeners(r,{filterStateChanged:o})}setFirstDataRenderedState(e,t,n){const{scroll:o,cellSelection:s,focusedCell:r,columnOrder:i,rowPinning:a}=e,l=(d,h)=>!(n!=null&&n.has(d))&&(h||t==="api");l("focusedCell",r)&&this.setFocusedCellState(r),l("cellSelection",s)&&this.setCellSelectionState(s),l("scroll",o)&&this.setScrollState(o),l("rowPinning",a)&&this.setRowPinningState(a),this.setColumnPivotState(!!(i!=null&&i.orderedColIds),t);const u=this.updateCachedState.bind(this);u("sideBar",this.getSideBarState()),u("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();u("rangeSelection",c),u("cellSelection",c),u("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:n,cellFocusCleared:n,cellSelectionChanged:o=>{if(o.finished){const s=this.getRangeSelectionState();t("rangeSelection",s),t("cellSelection",s)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return Nbe(nw(e),e.colModel.isPivotMode())}setColumnState(e,t,n,o){const{sort:s,rowGroup:r,aggregation:i,pivot:a,columnPinning:l,columnVisibility:u,columnSizing:c,columnOrder:d}=e;let h=!1;const f=(x,P)=>{const k=!(o!=null&&o.has(x))&&!!(P||t==="api");return h||(h=k),k},p={},g=x=>{let P=p[x];return P||(P={colId:x},p[x]=P,P)},v={},w=f("sort",s);w&&(s==null||s.sortModel.forEach(({colId:x,sort:P},k)=>{const M=g(x);M.sort=P,M.sortIndex=k})),(w||!n)&&(v.sort=null,v.sortIndex=null);const S=f("rowGroup",r);S&&(r==null||r.groupColIds.forEach((x,P)=>{const k=g(x);k.rowGroup=!0,k.rowGroupIndex=P})),(S||!n)&&(v.rowGroup=null,v.rowGroupIndex=null);const b=f("aggregation",i);b&&(i==null||i.aggregationModel.forEach(({colId:x,aggFunc:P})=>{g(x).aggFunc=P})),(b||!n)&&(v.aggFunc=null);const y=f("pivot",a);y&&(a==null||a.pivotColIds.forEach((x,P)=>{const k=g(x);k.pivot=!0,k.pivotIndex=P}),this.gos.updateGridOptions({options:{pivotMode:!!(a!=null&&a.pivotMode)},source:t})),(y||!n)&&(v.pivot=null,v.pivotIndex=null);const E=f("columnPinning",l);if(E){for(const x of(l==null?void 0:l.leftColIds)??[])g(x).pinned="left";for(const x of(l==null?void 0:l.rightColIds)??[])g(x).pinned="right"}(E||!n)&&(v.pinned=null);const _=f("columnVisibility",u);if(_)for(const x of(u==null?void 0:u.hiddenColIds)??[])g(x).hide=!0;(_||!n)&&(v.hide=null);const I=f("columnSizing",c);if(I)for(const{colId:x,flex:P,width:k}of(c==null?void 0:c.columnSizingModel)??[]){const M=g(x);M.flex=P??null,M.width=k}(I||!n)&&(v.flex=null);const T=d==null?void 0:d.orderedColIds,F=!!(T!=null&&T.length)&&!(o!=null&&o.has("columnOrder")),L=F?T.map(x=>g(x)):Object.values(p);(L.length||h)&&(this.columnStates=L,ni(this.beans,{state:L,applyOrder:F,defaultState:v},t))}setColumnPivotState(e,t){const n=this.columnStates;this.columnStates=void 0;const o=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:r,colGroupSvc:i}=s;if(r!=null&&r.isPivotResultColsPresent()){if(n){const a=[];for(const l of n)r.getPivotResultCol(l.colId)&&a.push(l);ni(s,{state:a,applyOrder:e},t)}o&&(i==null||i.setColumnGroupState(o,t))}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return Lbe(t)}setColumnGroupState(e,t,n){var a;const o=this.beans.colGroupSvc;if(!o||n!=null&&n.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set((a=e.columnGroup)==null?void 0:a.openColumnGroupIds),i=o.getColumnGroupState().map(({groupId:l})=>{const u=s.has(l);return u&&s.delete(l),{groupId:l,open:u}});for(const l of s)i.push({groupId:l,open:!0});i.length&&(this.columnGroupStates=i),o.setColumnGroupState(i,t)}getFilterState(){const e=this.beans.filterManager;let t=e==null?void 0:e.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const n=e==null?void 0:e.getFilterState(),o=(e==null?void 0:e.getAdvFilterModel())??void 0;return t||o||n?{filterModel:t,columnFilterState:n,advancedFilterModel:o}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:n,columnFilterState:o,advancedFilterModel:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(n!==void 0||o!==void 0)&&(t==null||t.setFilterState(n??null,o??null,"columnFilter")),s!==void 0&&(t==null||t.setAdvFilterModel(s??null,"advancedFilter"))}getRangeSelectionState(){var t;const e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(n=>{const{id:o,type:s,startRow:r,endRow:i,columns:a,startColumn:l}=n;return{id:o,type:s,startRow:r,endRow:i,colIds:a.map(u=>u.getColId()),startColId:l.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:n,colModel:o,visibleCols:s}=this.beans;if(!Aa(t)||!n)return;const r=[];for(const i of(e==null?void 0:e.cellRanges)??[]){const a=[];for(const u of i.colIds){const c=o.getCol(u);c&&a.push(c)}if(!a.length)continue;let l=o.getCol(i.startColId);if(!l){const u=s.allCols,c=new Set(a);l=u.find(d=>c.has(d))}r.push({...i,columns:a,startColumn:l})}n.setCellRanges(r)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(e==null?void 0:e.getHScrollPosition())??{left:0},{top:n}=(e==null?void 0:e.getVScrollPosition())??{top:0};return n||t?{top:n,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:n}=e??{top:0,left:0},{frameworkOverrides:o,rowRenderer:s,animationFrameSvc:r,ctrlsSvc:i}=this.beans;o.wrapIncoming(()=>{var a;i.get("center").setCenterViewportScrollLeft(n),(a=i.getScrollFeature())==null||a.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),r==null||r.flushAllFrames()})}getSideBarState(){var e,t;return(t=(e=this.beans.sideBar)==null?void 0:e.comp)==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:n,rowPinned:o}=e;return{colId:t.getColId(),rowIndex:n,rowPinned:o}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:n}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:o,rowIndex:s,rowPinned:r}=e;t.setFocusedCell({column:n.getCol(o),rowIndex:s,rowPinned:r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const n=e.getCurrentPage(),o=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!n&&!o))return{page:n,pageSize:o}}setPaginationState(e,t){const{pagination:n,gos:o}=this.beans;if(!n)return;const{pageSize:s,page:r}=e??{page:0,pageSize:o.get("paginationPageSize")},i=t==="gridInitializing";s&&!o.get("paginationAutoPageSize")&&n.setPageSize(s,i?"initialState":"pageSizeSelector"),typeof r=="number"&&(i?n.setPage(r):n.goToPage(r))}getRowSelectionState(){var o;const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((o=t==null?void 0:t.toggledNodes)!=null&&o.length)?void 0:t}setRowSelectionState(e,t){var n;(n=this.beans.selectionSvc)==null||n.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e}=this.beans;if(e)return e.getExpansionState()}getRowPinningState(){var e;return(e=this.beans.pinnedRowModel)==null?void 0:e.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t==null||t.setPinnedState(e):t==null||t.reset()}setRowGroupExpansionState(e,t,n){const o=this.beans.expansionSvc;if(!o)return;const s=t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};o.setExpansionState(s,n)}updateColumnState(e){const t=this.getColumnState();let n=!1;const o=this.cachedState;for(const s of Object.keys(t)){const r=t[s];Dp(r,o[s])||(n=!0)}this.cachedState={...o,...t},n&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const n=this.cachedState[e];this.setCachedStateValue(e,t),Dp(t,n)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){var e;this.suppressEvents=!0,(e=this.beans.colAnimation)==null||e.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{var t;this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&((t=this.beans.colAnimation)==null||t.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},H_e={moduleName:"GridState",version:ct,beans:[$_e],apiFunctions:{getState:N_e,setState:L_e}};function G_e(e){return e.rowModel.isLastRowIndexKnown()}function U_e(e){var t;return((t=e.pagination)==null?void 0:t.getPageSize())??100}function W_e(e){var t;return((t=e.pagination)==null?void 0:t.getCurrentPage())??0}function z_e(e){var t;return((t=e.pagination)==null?void 0:t.getTotalPages())??1}function j_e(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function K_e(e){var t;(t=e.pagination)==null||t.goToNextPage()}function q_e(e){var t;(t=e.pagination)==null||t.goToPreviousPage()}function Y_e(e){var t;(t=e.pagination)==null||t.goToFirstPage()}function X_e(e){var t;(t=e.pagination)==null||t.goToLastPage()}function Z_e(e,t){var n;(n=e.pagination)==null||n.goToPage(t)}var J_e=class extends qe{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,n=()=>{const o=Math.max(qu(t),1),s=Math.floor(e/o);t.pagination.setPageSize(s,"autoCalculated")};this.isBodyRendered?Yo(this,n,50)():(n(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},ug="paginationPageSizeSelector",Q_e={tag:"span",cls:"ag-paging-page-size"},eRe=class extends Cn{constructor(){super(Q_e),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(ug,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!(e!=null&&e.newPageSize))return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){qo(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(ug)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),n=!t||!e.includes(t);if(n){const s=this.gos.exists("paginationPageSize"),r=this.gos.get(ug)!==!0;Je(94,{pageSizeSet:s,pageSizesSet:r,pageSizeOptions:e,paginationPageSizeOption:t}),r||Je(95,{paginationPageSizeOption:t,paginationPageSizeSelector:ug}),e.unshift("")}const o=String(n?"":t);this.selectPageSizeComp?(Fl(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(o,!0)):this.createPageSizeSelectorComp(e,o),this.hasEmptyOption=n}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const n=this.getLocaleTextFunc(),o=n("pageSizeSelectorLabel","Page Size:"),s=n("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Z_).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(s).setLabel(o).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(ug);return!Array.isArray(t)||!(t!=null&&t.length)?e:[...t].sort((n,o)=>n-o)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},tRe={selector:"AG-PAGE-SIZE-SELECTOR",component:eRe},nRe=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:var(--ag-pagination-panel-height);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}",oRe=class extends V${constructor(){super(),this.btFirst=dt,this.btPrevious=dt,this.btNext=dt,this.btLast=dt,this.lbRecordCount=dt,this.lbFirstRowOnPage=dt,this.lbLastRowOnPage=dt,this.lbCurrent=dt,this.lbTotal=dt,this.pageSizeComp=dt,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(nRe)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[tRe]);const{btFirst:t,btPrevious:n,btNext:o,btLast:s}=this;this.activateTabIndex([t,n,o,s]),t.insertAdjacentElement("afterbegin",kr(e?"last":"first",this.beans)),n.insertAdjacentElement("afterbegin",kr(e?"next":"previous",this.beans)),o.insertAdjacentElement("afterbegin",kr(e?"previous":"next",this.beans)),s.insertAdjacentElement("afterbegin",kr(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:r=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(r):Jpe(this.beans,r),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){const{el:t,fn:n}=e;this.addManagedListeners(t,{click:n,keydown:o=>{(o.key===Ve.ENTER||o.key===Ve.SPACE)&&(o.preventDefault(),n())}})}Zpe(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):Vbe(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),n=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const o=this.isZeroPagesToDisplay(),s=e===n-1;this.nextButtonDisabled=s||o,this.lastButtonDisabled=!t||o||e===n-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){fce(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),n=this.pagination.getMasterRowCount(),o=e?n:null,s=this.pagination.getCurrentPage(),r=this.pagination.getPageSize();let i,a;this.isZeroPagesToDisplay()?i=a=0:(i=r*s+1,a=i+r-1,e&&a>o&&(a=o));const l=i+r-1,u=!e&&n<l,c=this.formatNumber(i);this.lbFirstRowOnPage.textContent=c;let d;const h=this.getLocaleTextFunc();u?d=h("pageLastRowUnknown","?"):d=this.formatNumber(a),this.lbLastRowOnPage.textContent=d;const p=t>0?s+1:0,g=this.formatNumber(p);this.lbCurrent.textContent=g;let v,w;if(e)v=this.formatNumber(t),w=this.formatNumber(o);else{const S=h("more","more");v=S,w=S}this.lbTotal.textContent=v,this.lbRecordCount.textContent=w,this.announceAriaStatus(c,d,w,g,v)}announceAriaStatus(e,t,n,o,s){var d,h;const r=this.getLocaleTextFunc(),i=r("page","Page"),a=r("to","to"),l=r("of","of"),u=`${e} ${a} ${t} ${l} ${n}`,c=`${i} ${o} ${l} ${s}`;u!==this.ariaRowStatus&&(this.ariaRowStatus=u,(d=this.ariaAnnounce)==null||d.announceValue(u,"paginationRow")),c!==this.ariaPageStatus&&(this.ariaPageStatus=c,(h=this.ariaAnnounce)==null||h.announceValue(c,"paginationPage"))}},sRe={selector:"AG-PAGINATION",component:oRe},rRe=class extends qe{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return sRe}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:n}=this.beans;n!=null&&n.isEditing()&&(n.isBatchEditing()?n.cleanupEditors():n.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){var n,o;if(!this.active)return;let t=e;this.paginateChildRows||(t=((o=(n=this.beans.rowModel).getTopLevelIndexFromDisplayedIndex)==null?void 0:o.call(n,e))??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return ft(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:ft(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:ft(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:ft(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const n=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}n!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const n=this.pageSize,o=t-1;this.totalPages=Math.floor(o/n)+1,this.adjustCurrentPageIfInvalid();const s=this.currentPage,r=n*s;let i=n*(s+1)-1;if(i>o&&(i=o),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(r),i===o)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(i+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:n}=this,o=e-1;this.totalPages=Math.floor(o/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*n,this.bottomDisplayedRowIndex=t*(n+1)-1,this.bottomDisplayedRowIndex>o&&(this.bottomDisplayedRowIndex=o)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:n=!1,newPageSize:o=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:n,newPageSize:o,keepRenderedRows:t})}},iRe={moduleName:"Pagination",version:ct,beans:[rRe,J_e],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:G_e,paginationGetPageSize:U_e,paginationGetCurrentPage:W_e,paginationGetTotalPages:z_e,paginationGetRowCount:j_e,paginationGoToNextPage:K_e,paginationGoToPreviousPage:q_e,paginationGoToFirstPage:Y_e,paginationGoToLastPage:X_e,paginationGoToPage:Z_e},dependsOn:[Ow]};function aRe(e,t={}){const n=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(n))}function IG(e,t,n,o,s){t&&(o&&t.parent&&t.parent.level!==-1&&IG(e,t.parent,n,o,s),t.setExpanded(n,void 0,s))}function lRe(e,t){return e.rowModel.getRowNode(t)}function uRe(e,t,n,o){e.rowRenderer.addRenderedRowListener(t,n,o)}function cRe(e){return e.rowRenderer.getRenderedNodes()}function dRe(e,t,n){e.rowModel.forEachNode(t,n)}function hRe(e){return e.rowRenderer.firstRenderedRow}function fRe(e){return e.rowRenderer.lastRenderedRow}function pRe(e,t){return e.rowModel.getRow(t)}function gRe(e){return e.rowModel.getRowCount()}var mRe={moduleName:"RowApi",version:ct,apiFunctions:{redrawRows:aRe,setRowNodeExpanded:IG,getRowNode:lRe,addRenderedRowListener:uRe,getRenderedNodes:cRe,forEachNode:dRe,getFirstDisplayedRowIndex:hRe,getLastDisplayedRowIndex:fRe,getDisplayedRowAtIndex:pRe,getDisplayedRowCount:gRe}},vRe={moduleName:"ScrollApi",version:ct,apiFunctions:{getVerticalPixelRange:AEe,getHorizontalPixelRange:PEe,ensureColumnVisible:uG,ensureIndexVisible:cG,ensureNodeVisible:kEe}};function yRe(e,t,n){if(!t)return;const o=e.ctrlsSvc.getGridBodyCtrl().eGridBody,s=`aria-${t}`;n===null?o.removeAttribute(s):o.setAttribute(s,n)}function wRe(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function CRe(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function bRe(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function SRe(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function ERe(e){return{rowHeight:qu(e),headerHeight:Xp(e)}}function _Re(e,t={}){var r;const n=[];for(const i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const a=i.getCellRenderer();a!=null&&n.push(Kp(a))}if((r=t.columns)!=null&&r.length)return n;const o=[],s=qR(t.rowNodes);for(const i of e.rowRenderer.getAllRowCtrls()){if(s&&!YR(i.rowNode,s)||!i.isFullWidth())continue;const a=i.getFullWidthCellRenderers();for(let l=0;l<a.length;l++){const u=a[l];u!=null&&o.push(Kp(u))}}return[...o,...n]}var RRe={moduleName:"RenderApi",version:ct,apiFunctions:{setGridAriaProperty:yRe,refreshCells:wRe,refreshHeader:CRe,isAnimationFrameQueueEmpty:bRe,flushAllAnimationFrames:SRe,getSizesForCurrentTheme:ERe,getCellRendererInstances:_Re}};function TRe(e,t){var n,o;typeof t=="number"?(n=e.colAutosize)==null||n.sizeColumnsToFit(t,"api"):(o=e.colAutosize)==null||o.sizeColumnsToFitGridBody(t)}function xG({colAutosize:e,visibleCols:t},n,o){Array.isArray(n)?e==null||e.autoSizeCols({colKeys:n,skipHeader:o,source:"api"}):e==null||e.autoSizeCols({...n,colKeys:n.colIds??t.allCols,source:"api"})}function DRe(e,t){var n;t&&typeof t=="object"?xG(e,t):(n=e.colAutosize)==null||n.autoSizeAllColumns({source:"api",skipHeader:t})}var IRe=class extends qe{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){var n;const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let o=!1;const s=t.type;if(s==="fitGridWidth"||s==="fitProvidedWidth")o=!0;else if(s==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const r=e.get("rowData");o=r!=null&&r.length>0&&io(e)}o&&((n=this.beans.colDelayRenderSvc)==null||n.hideColumns(s))}}autoSizeCols(e){const{eventSvc:t,visibleCols:n}=this.beans;this.innerAutoSizeCols(e).then(o=>{var u;const s=c=>qd(t,Array.from(c),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return s(o);const r=AG(this.beans),i=c=>n.leftCols.some(d=>Wp(d,c)),a=c=>n.rightCols.some(d=>Wp(d,c)),l=e.colKeys.filter(c=>!ka(c)&&!Fa(c)&&!i(c)&&!a(c));this.sizeColumnsToFit(r,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:(u=e.columnLimits)==null?void 0:u.map(c=>({...c,key:c.colId})),colKeys:l,onlyScaleUp:!0}),s(o)})}innerAutoSizeCols(e){return new Promise((t,n)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,n));const{colKeys:o,skipHeader:s,skipHeaderGroups:r,stopAtGroup:i,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:u=[],source:c="api"}=e,{animationFrameSvc:d,renderStatus:h,colModel:f,autoWidthCalc:p,visibleCols:g}=this.beans;if(d==null||d.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,n)});return}this.timesDelayed=0;const v=new Set;let w=-1;const S=Object.fromEntries(u.map(({colId:E,..._})=>[E,_])),b=s??this.gos.get("skipHeaderOnAutoSize"),y=r??b;for(;w!==0;){w=0;const E=[];for(const _ of o){if(!_||Rde(_))continue;const I=f.getCol(_);if(!I||v.has(I))continue;const T=p.getPreferredWidthForColumn(I,b);if(T>0){const F=S[I.colId]??{};F.minWidth??(F.minWidth=l),F.maxWidth??(F.maxWidth=a);const L=xRe(I,T,F);I.setActualWidth(L,c),v.add(I),w++}E.push(I)}E.length&&g.refresh(c)}y||this.autoSizeColumnGroupsByColumns(o,c,i),t(v)})}autoSizeColumn(e,t,n){this.autoSizeCols({colKeys:[e],skipHeader:n,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,n){const{colModel:o,ctrlsSvc:s}=this.beans,r=new Set,i=o.getColsForKeys(e);for(const l of i){let u=l.getParent();for(;u&&u!=n;)u.isPadding()||r.add(u),u=u.getParent()}let a;for(const l of r){for(const u of s.getHeaderRowContainerCtrls())if(a=u.getHeaderCtrlForColumn(l),a)break;a==null||a.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const n=this.gos.get("skipHeaderOnAutoSize"),o=()=>{this.autoSizeColumn(t,"uiColumnResized",n)};e.addEventListener("dblclick",o);const s=new sc(e);return s.addEventListener("doubleTap",o),()=>{e.removeEventListener("dblclick",o),s.destroy()}}addColumnGroupResize(e,t,n){const o=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const r=[],i=t.getDisplayedLeafColumns();for(const a of i)a.getColDef().suppressAutoSize||r.push(a.getColId());r.length>0&&this.autoSizeCols({colKeys:r,skipHeader:o,stopAtGroup:t,source:"uiColumnResized"}),n()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const n=AG(this.beans);if(n>0){this.sizeColumnsToFit(n,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):Je(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",n,o){var p,g;if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,n,o));return}const s={};for(const{key:v,...w}of(o==null?void 0:o.columnLimits)??[])s[typeof v=="string"?v:v.getColId()]=w;const r=this.beans.visibleCols.allCols;if(e<=0||!r.length)return;const i=Pa(r);if(o!=null&&o.onlyScaleUp&&i>e||e===i&&r.every(w=>{if(w.colDef.suppressSizeToFit)return!0;const S=s==null?void 0:s[w.getId()],b=(S==null?void 0:S.minWidth)??(o==null?void 0:o.defaultMinWidth),y=(S==null?void 0:S.maxWidth)??(o==null?void 0:o.defaultMaxWidth),E=w.getActualWidth();return(b==null||E>=b)&&(y==null||E<=y)}))return;const l=[],u=[];for(const v of r){const w=((p=o==null?void 0:o.colKeys)==null?void 0:p.some(S=>Wp(v,S)))??!0;v.getColDef().suppressSizeToFit||!w?u.push(v):l.push(v)}const c=l.slice(0);let d=!1;const h=v=>{ti(l,v),u.push(v)};for(const v of l){v.resetActualWidth(t);const w=s==null?void 0:s[v.getId()],S=(w==null?void 0:w.minWidth)??(o==null?void 0:o.defaultMinWidth),b=(w==null?void 0:w.maxWidth)??(o==null?void 0:o.defaultMaxWidth),y=v.getActualWidth();typeof S=="number"&&y<S?v.setActualWidth(S,t,!0):typeof b=="number"&&y>b&&v.setActualWidth(b,t,!0)}for(;!d;){d=!0;const v=e-Pa(u);if(v<=0)for(const w of l){const S=((g=s==null?void 0:s[w.getId()])==null?void 0:g.minWidth)??(o==null?void 0:o.defaultMinWidth)??w.minWidth;w.setActualWidth(S,t,!0)}else{const w=v/Pa(l);let S=v;for(let b=l.length-1;b>=0;b--){const y=l[b],E=s==null?void 0:s[y.getId()],_=(E==null?void 0:E.minWidth)??(o==null?void 0:o.defaultMinWidth),I=(E==null?void 0:E.maxWidth)??(o==null?void 0:o.defaultMaxWidth),T=y.getMinWidth(),F=y.getMaxWidth(),L=typeof _=="number"&&_>T?_:T,x=typeof I=="number"&&I<F?I:F;let P=Math.round(y.getActualWidth()*w);P<L?(P=L,h(y),d=!1):P>x?(P=x,h(y),d=!1):b===0&&(P=S),y.setActualWidth(P,t,!0),S-=P}}}for(const v of c)v.fireColumnWidthChangedEvent(t);const f=this.beans.visibleCols;f.setLeftValues(t),f.updateBodyWidths(),!n&&qd(this.eventSvc,c,!0,t)}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,n=e.get("autoSizeStrategy");(n==null?void 0:n.type)!=="fitGridWidth"&&(n==null?void 0:n.type)!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const o=n.type;if(o==="fitGridWidth"){const{columnLimits:s,defaultMinWidth:r,defaultMaxWidth:i}=n,a=s==null?void 0:s.map(({colId:l,minWidth:u,maxWidth:c})=>({key:l,minWidth:u,maxWidth:c}));this.sizeColumnsToFitGridBody({defaultMinWidth:r,defaultMaxWidth:i,columnLimits:a})}else o==="fitProvidedWidth"&&this.sizeColumnsToFit(n.width,"sizeColumnsToFit");t==null||t.revealColumns(o)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{var o;if(!this.isAlive())return;const n="autosizeColumns";e?this.autoSizeCols({...t,source:n,colKeys:e}):this.autoSizeAllColumns({...t,source:n}),(o=this.beans.colDelayRenderSvc)==null||o.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function xRe(e,t,n={}){const o=n.minWidth??e.getMinWidth();t<o&&(t=o);const s=n.maxWidth??e.getMaxWidth();return t>s&&(t=s),t}function AG({ctrlsSvc:e,scrollVisibleSvc:t}){const n=e.getGridBodyCtrl(),s=n.isVerticalScrollShowing()?t.getScrollbarWidth():0;return kp(n.eGridBody)-s}var ARe={moduleName:"ColumnAutoSize",version:ct,beans:[IRe],apiFunctions:{sizeColumnsToFit:TRe,autoSizeColumns:xG,autoSizeAllColumns:DRe},dependsOn:[tH]},PRe=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function kRe(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function FRe(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function ORe(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedTopRow(t)}function MRe(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedBottomRow(t)}function NRe(e,t,n){var o;return(o=e.pinnedRowModel)==null?void 0:o.forEachPinnedRow(t,n)}var LRe={moduleName:"PinnedRow",version:ct,beans:[Oge],css:[PRe],apiFunctions:{getPinnedTopRowCount:kRe,getPinnedBottomRowCount:FRe,getPinnedTopRow:ORe,getPinnedBottomRow:MRe,forEachPinnedRow:NRe},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},VRe=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){var n;const e=(n=this.firstNode.__autoHeights)==null?void 0:n[this.col.getColId()];if(e==null)return;let t=0;for(const o of this.spannedNodes)o!==this.lastNode&&(t+=o.rowHeight);return e-t}},BRe=class extends qe{constructor(e){super(),this.column=e}buildCache(e){var b;const{column:t,beans:{gos:n,pinnedRowModel:o,rowModel:s,valueSvc:r,pagination:i}}=this,{colDef:a}=t,l=this.getNodeMap(e),u=new Map,c=n.getCallback("isFullWidthRow"),d=a.equals,h=a.spanRows,f=typeof h=="function";let p=null,g=null,v;const w=(y,E)=>{p=y,g=null,v=E},S=y=>{const E=!y.isExpandable()&&!y.group&&!y.detail&&(c?!c({rowNode:y}):!0);if(y.rowIndex==null||!E){w(null,null);return}if(p==null||y.level!==p.level||y.footer||g&&y.rowIndex-1!==(g==null?void 0:g.getLastNode().rowIndex)){w(y,r.getValue(t,y));return}const _=r.getValue(t,y);if(f){const I=Ot(n,{valueA:v,nodeA:p,valueB:_,nodeB:y,column:t,colDef:a});if(!h(I)){w(y,_);return}}else if(d?!d(v,_):v!==_){w(y,_);return}if(!g){const I=l==null?void 0:l.get(p);(I==null?void 0:I.firstNode)===p?(I.reset(),g=I):g=new VRe(t,p),u.set(p,g)}g.addSpannedNode(y),u.set(y,g)};switch(e){case"center":(b=s.forEachDisplayedNode)==null||b.call(s,y=>{(!i||i.isRowInPage(y.rowIndex))&&S(y)}),this.centerValueNodeMap=u;break;case"top":o==null||o.forEachPinnedRow("top",S),this.topValueNodeMap=u;break;case"bottom":o==null||o.forEachPinnedRow("bottom",S),this.bottomValueNodeMap=u;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},$Re=class extends qe{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=Yo(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=Yo(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const n=this.createManagedBean(new BRe(e));this.spanningColumns.set(e,n),n.buildCache("top"),n.buildCache("bottom"),n.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t==null||t.createCtrls("top"),t==null||t.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t==null||t.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const n=this.spanningColumns.get(e);return n?n.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:n}=this.beans,o=e.column,s=e.rowIndex,r=this.spanningColumns.get(o);if(!r)return;let i;switch(e.rowPinned){case"top":i=t==null?void 0:t.getPinnedTopRow(s);break;case"bottom":i=t==null?void 0:t.getPinnedBottomRow(s);break;default:i=n.getRow(s)}if(i)return r.getCellSpan(i)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const n=this.spanningColumns.get(e);if(n)return n.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[n,o]of this.spanningColumns)if(o.isCellSpanning(e)){const s=o.getCellSpan(e);t(n,s)}}destroy(){super.destroy(),this.spanningColumns.clear()}},HRe=class extends ih{constructor(e,t,n){super(e.col,e.firstNode,n,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,n,o,s,r,i){this.eWrapper=n,super.setComp(e,t,n,o,s,r,i),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||Ny(e,t.rowIndex)}setAriaRowSpan(){yce(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(Sw(t)){this.focusedCellPosition=void 0;return}const n=this.isCellFocused();n||(this.focusedCellPosition=void 0),e&&n&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},GRe=class extends kw{onRowIndexChanged(){super.onRowIndexChanged();for(const e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){var o;const t=(o=this.beans.rowSpanSvc)==null?void 0:o.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new HRe(t,this,this.beans)}isCorrectCtrlForSpan(e){var o;const t=(o=this.beans.rowSpanSvc)==null?void 0:o.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},URe=class extends qe{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,n=this.getCtrlsMap(e),o=n.size,s=this.getAllRelevantRowControls(e),r=new Map;let i=!1;for(const l of s)l.isAlive()&&(t==null||t.forEachSpannedColumn(l.rowNode,(u,c)=>{if(r.has(c.firstNode))return;const d=n.get(c.firstNode);if(d){r.set(c.firstNode,d),n.delete(c.firstNode);return}i=!0;const h=new GRe(c.firstNode,this.beans,!1,!1,!1);r.set(c.firstNode,h)}));this.setCtrlsMap(e,r);const a=r.size===o;if(!(!i&&a)){for(const l of n.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,n=t==null?void 0:t.getCellSpanByPosition(e);if(!n)return;const o=this.getCtrlsMap(e.rowPinned).get(n.firstNode);if(o)return o.getAllCellCtrls().find(s=>s.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},WRe={moduleName:"CellSpan",version:ct,beans:[$Re,URe]},zRe=class extends qe{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,n=e.colDef,o=n.cellClassRules,s=this.getCellClassParams(e,n);jR(this.beans.expressionSvc,o===this.cellClassRules?void 0:this.cellClassRules,o,s,r=>t.toggleCss(r,!0),r=>t.toggleCss(r,!1)),this.cellClassRules=o}applyUserStyles(){const e=this.column,t=e.colDef,n=t.cellStyle;if(!n)return;let o;if(typeof n=="function"){const s=this.getCellClassParams(e,t);o=n(s)}else o=n;o&&this.cellComp.setUserStyles(o)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,n=e.colDef,o=this.getCellClassParams(e,n);for(const r of this.staticClasses)t.toggleCss(r,!1);const s=this.beans.cellStyles.getStaticCellClasses(n,o);this.staticClasses=s;for(const r of s)t.toggleCss(r,!0)}getCellClassParams(e,t){const{value:n,rowNode:o}=this.cellCtrl;return Ot(this.beans.gos,{value:n,data:o.data,node:o,colDef:t,column:e,rowIndex:o.rowIndex})}},jRe=class extends qe{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,n,o){jR(this.beans.expressionSvc,void 0,e.cellClassRules,t,n,o),this.processStaticCellClasses(e,t,n)}getStaticCellClasses(e,t){const{cellClass:n}=e;if(!n)return[];let o;return typeof n=="function"?o=n(t):o=n,typeof o=="string"&&(o=[o]),o||[]}createCellCustomStyleFeature(e,t){return new zRe(e,t)}processStaticCellClasses(e,t,n){this.getStaticCellClasses(e,t).forEach(s=>{n(s)})}},KRe={moduleName:"CellStyle",version:ct,beans:[jRe]},qRe={moduleName:"RowStyle",version:ct,beans:[OCe]};function YRe(e,t){var n;return!!((n=e.colHover)!=null&&n.isHovered(t))}var XRe=class extends qe{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=n=>{const{beans:o,gos:s,element:r,columns:i}=this,a=o.colHover;if(n??!!s.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(r,{mouseover:a.setMouseOver.bind(a,i),mouseout:a.clearMouseOver.bind(a)});else{for(const u of this.destroyManagedListeners)u();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},ZRe="ag-column-hover",JRe=class extends qe{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,n){const o=()=>{const s=this.isHovered(n);t.toggleCss("ag-column-hover",s)};e.addManagedEventListeners({columnHoverChanged:o}),o()}onCellColumnHover(e,t){if(!t)return;const n=this.isHovered(e);t.toggleCss(ZRe,n)}addHeaderFilterColumnHoverListener(e,t,n,o){this.createHoverFeature(e,[n],o);const s=()=>{const r=this.isHovered(n);t.toggleCss("ag-column-hover",r)};e.addManagedEventListeners({columnHoverChanged:s}),s()}createHoverFeature(e,t,n){e.createManagedBean(new XRe(t,n))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},QRe={moduleName:"ColumnHover",version:ct,beans:[JRe],apiFunctions:{isColumnHovered:YRe}},eTe=class extends qe{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){var e,t;this.wrapSvc=(t=(e=this.beans.frameworkOverrides).createGlobalEventListenerWrapper)==null?void 0:t.call(e)}addListener(e,t){var r;const n=((r=this.wrapSvc)==null?void 0:r.wrap(e,t))??t,o=!xw.has(e),s=o?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(n),this.eventSvc.addListener(e,n,o)}removeListener(e,t){var r,i;const n=((r=this.wrapSvc)==null?void 0:r.unwrap(e,t))??t,o=this.asyncListeners.get(e),s=!!(o!=null&&o.delete(n));s||(i=this.syncListeners.get(e))==null||i.delete(n),this.eventSvc.removeListener(e,n,s)}addGlobalListener(e){var r;const t=((r=this.wrapSvc)==null?void 0:r.wrapGlobal(e))??e,n=(i,a)=>{xw.has(i)&&t(i,a)},o=(i,a)=>{xw.has(i)||t(i,a)};this.globalListenerPairs.set(e,{syncListener:n,asyncListener:o});const s=this.eventSvc;s.addGlobalListener(n,!1),s.addGlobalListener(o,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:n,globalListenerPairs:o}=this,s=(n==null?void 0:n.unwrapGlobal(e))??e;if(o.has(s)){const{syncListener:i,asyncListener:a}=o.get(s);t.removeGlobalListener(i,!1),t.removeGlobalListener(a,!0),o.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((n,o)=>{n.forEach(s=>this.eventSvc.removeListener(o,s,t)),n.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const n of e)this.eventSvc.removeGlobalListener(n,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:n,asyncListener:o})=>{t.removeGlobalListener(n,!1),t.removeGlobalListener(o,!0)}),e.clear()}};function tTe(e,t,n){var o;(o=e.apiEventSvc)==null||o.addListener(t,n)}function nTe(e,t,n){var o;(o=e.apiEventSvc)==null||o.removeListener(t,n)}function oTe(e,t){var n;(n=e.apiEventSvc)==null||n.addGlobalListener(t)}function sTe(e,t){var n;(n=e.apiEventSvc)==null||n.removeGlobalListener(t)}var rTe={moduleName:"EventApi",version:ct,apiFunctions:{addEventListener:tTe,addGlobalListener:oTe,removeEventListener:nTe,removeGlobalListener:sTe},beans:[eTe]},iTe={moduleName:"Locale",version:ct,beans:[Mbe]},aTe=class extends qe{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=Yo(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){var a,l,u,c;const{visibleCols:e,rowModel:t,rowSpanSvc:n,pinnedRowModel:o}=this.beans,s=e.autoHeightCols;let r=!1;const i=d=>{var p;const h=d.__autoHeights;let f=Pl(this.beans,d).height;for(const g of s){let v=h==null?void 0:h[g.getColId()];const w=n==null?void 0:n.getCellSpan(g,d);if(w){if(w.getLastNode()!==d)continue;if(v=(p=n==null?void 0:n.getCellSpan(g,d))==null?void 0:p.getLastNodeAutoHeight(),!v)return}if(v==null){if(this.colSpanSkipCell(g,d))continue;return}f=Math.max(v,f)}f!==d.rowHeight&&(d.setRowHeight(f),r=!0)};(a=o==null?void 0:o.forEachPinnedRow)==null||a.call(o,"top",i),(l=o==null?void 0:o.forEachPinnedRow)==null||l.call(o,"bottom",i),(u=t.forEachDisplayedNode)==null||u.call(t,i),r&&((c=t.onRowHeightChanged)==null||c.call(t))}setRowAutoHeight(e,t,n){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[n.getId()];return}const o=e.__autoHeights[n.getId()];e.__autoHeights[n.getId()]=t,o!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:n,colViewport:o,visibleCols:s}=this.beans;if(!n.colSpanActive)return!1;let r=[];switch(e.getPinned()){case"left":r=s.getLeftColsForRow(t);break;case"right":r=s.getRightColsForRow(t);break;case null:r=o.getColsWithinViewport(t);break}return!r.includes(e)}setupCellAutoHeight(e,t,n){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const o=t.parentElement,{rowNode:s,column:r}=e,i=this.beans,a=c=>{var S;if((S=this.beans.editSvc)!=null&&S.isEditing(e)||!e.isAlive()||!n.isAlive())return;const{paddingTop:d,paddingBottom:h,borderBottomWidth:f,borderTopWidth:p}=ju(o),g=d+h+f+p,w=t.offsetHeight+g;if(c<5){const b=$o(i),y=!(b!=null&&b.contains(t)),E=w==0;if(y||E){window.setTimeout(()=>a(c+1),0);return}}this.setRowAutoHeight(s,w,r)},l=()=>a(0);l();const u=Il(i,t,l);return n.addDestroyFunc(()=>{u(),this.setRowAutoHeight(s,void 0,r)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:n}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(n).filter(s=>s.isAutoHeight())),t.length!==0){if(!n.__autoHeights)return!1;for(const o of t){const s=n.__autoHeights[o.getColId()];if(!s||n.rowHeight<s)return!1}}return!0}},lTe={moduleName:"RowAutoHeight",version:ct,beans:[aTe]},uTe={moduleName:"AllCommunity",version:ct,dependsOn:[RG,g_e,R_e,Qbe,u0e,c0e,d0e,h0e,f0e,p0e,g0e,l0e,tEe,nEe,oEe,eEe,rEe,iEe,H_e,$0e,iRe,rH,mRe,vRe,RRe,ARe,qme,LRe,A0e,mbe,KRe,QRe,qRe,rTe,wbe,M_e,iG,iTe,lTe,Kme,l_e,WRe]};let PG=!1;PG||(tde.registerModules([uTe,RG]),PG=!0);class cTe{constructor(t,n){Rn(this,"gridApi",null);Rn(this,"container");Rn(this,"config");Rn(this,"eventListeners",new Map);this.container=t,this.config=n}init(){if(this.gridApi)throw new Error("Grid already initialized");const{onGridReady:t,onCellClicked:n,onCellFocused:o,onRowSelected:s,...r}=this.config,i={...r,onGridReady:a=>{this.gridApi=a.api,t&&t(a)},onCellClicked:a=>{n&&n(a)},onCellFocused:a=>{o&&o(a)},onRowSelected:a=>{s&&s(a)}};return this.gridApi=Pbe(this.container,i),this.gridApi}updateRowData(t){this.gridApi&&this.gridApi.setGridOption("rowData",t)}updateColumnDefs(t){this.gridApi&&this.gridApi.setGridOption("columnDefs",t)}setColumnWidth(t){var n;this.gridApi&&((n=this.gridApi)==null||n.applyColumnState({state:t,applyOrder:!1}))}updateDatasource(t){this.gridApi&&this.gridApi.setGridOption("datasource",t)}refreshInfiniteCache(){this.gridApi&&this.gridApi.refreshInfiniteCache()}sizeColumnsToFit(){this.gridApi}deselectAll(){this.gridApi&&this.gridApi.deselectAll()}getSelectedRows(){var t;return((t=this.gridApi)==null?void 0:t.getSelectedRows())||[]}setQuickFilterText(t){this.gridApi&&this.gridApi.setGridOption("quickFilterText",t)}getColumnState(){var t;return(t=this.gridApi)==null?void 0:t.getColumnState()}addEventListener(t,n){if(!this.gridApi)throw new Error("Grid not initialized");this.eventListeners.has(t)||this.eventListeners.set(t,new Set),this.eventListeners.get(t).add(n),this.gridApi.addEventListener(t,n)}addRow(t,n="bottom"){if(this.gridApi){const o={add:[t],addIndex:n==="bottom"?void 0:0};if(this.gridApi.applyTransaction(o),n==="bottom"){const s=this.gridApi.getDisplayedRowCount();s>0&&this.gridApi.ensureIndexVisible(s-1,"bottom")}}}addRows(t,n="bottom"){if(this.gridApi&&t.length>0){const o={add:t,addIndex:n==="bottom"?void 0:0};if(this.gridApi.applyTransaction(o),n==="bottom"){const s=this.gridApi.getDisplayedRowCount();s>0&&this.gridApi.ensureIndexVisible(s-1,"bottom")}}}destroy(){this.gridApi&&(this.eventListeners.forEach((t,n)=>{t.forEach(o=>{var s;(s=this.gridApi)==null||s.removeEventListener(n,o)})}),this.eventListeners.clear(),this.gridApi.destroy(),this.gridApi=null)}getApi(){return this.gridApi}switchTheme(t){document.body.dataset.agThemeMode=t==="dark"?"dark":"light"}}const dTe=dH.withParams({accentColor:"var(--primary-color)",backgroundColor:"#ffffff",borderColor:"#e5e7eb",borderRadius:4,browserColorScheme:"light",chromeBackgroundColor:"#f9fafb",columnBorder:!0,fontFamily:"inherit",fontSize:14,foregroundColor:"#111827",headerBackgroundColor:"#fff",headerFontSize:14,headerFontWeight:600,headerTextColor:"#374151",iconSize:16,rowBorder:!0,spacing:8,headerHeight:40,rowHeight:32,wrapperBorder:!0,wrapperBorderRadius:4},"light").withParams({accentColor:"var(--primary-color)",backgroundColor:"#1f2937",borderColor:"#374151",borderRadius:4,browserColorScheme:"dark",chromeBackgroundColor:"#111827",columnBorder:!0,fontFamily:"inherit",fontSize:14,foregroundColor:"#f9fafb",headerBackgroundColor:"#374151",headerFontSize:14,headerFontWeight:600,headerTextColor:"#f9fafb",iconSize:16,rowBorder:!0,spacing:8,headerHeight:40,rowHeight:32,wrapperBorder:!0,wrapperBorderRadius:4},"dark"),hTe=ot({__name:"AgTable",props:{statusBar:{},sideBar:{type:[Object,String,Array,Boolean,null]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:{},suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:{},tooltipShowDelay:{},tooltipHideDelay:{},tooltipMouseTrack:{type:Boolean},tooltipShowMode:{},tooltipInteraction:{type:Boolean},popupParent:{},copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:{},suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:{},defaultColDef:{},defaultColGroupDef:{},columnTypes:{},dataTypeDefinitions:{},maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:{},groupHeaderHeight:{},floatingFiltersHeight:{},pivotHeaderHeight:{},pivotGroupHeaderHeight:{},hidePaddedHeaderRows:{type:Boolean},allowDragFromColumnsToolPanel:{type:Boolean},suppressMovableColumns:{type:Boolean},suppressColumnMoveAnimation:{type:Boolean},suppressMoveWhenColumnDragging:{type:Boolean},suppressDragLeaveHidesColumns:{type:Boolean},suppressGroupChangesColumnVisibility:{type:[Boolean,String]},suppressMakeColumnVisibleAfterUnGroup:{type:Boolean},suppressRowGroupHidesColumns:{type:Boolean},colResizeDefault:{},suppressAutoSize:{type:Boolean},autoSizePadding:{},skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:{},components:{},editType:{},suppressStartEditOnTab:{type:Boolean},getFullRowEditValidationErrors:{type:Function},invalidEditValueMode:{},singleClickEdit:{type:Boolean},suppressClickEdit:{type:Boolean},readOnlyEdit:{type:Boolean},stopEditingWhenCellsLoseFocus:{type:Boolean},enterNavigatesVertically:{type:Boolean},enterNavigatesVerticallyAfterEdit:{type:Boolean},enableCellEditingOnBackspace:{type:Boolean},undoRedoCellEditing:{type:Boolean},undoRedoCellEditingLimit:{},defaultCsvExportParams:{},suppressCsvExport:{type:Boolean},defaultExcelExportParams:{},suppressExcelExport:{type:Boolean},excelStyles:{},findSearchValue:{},findOptions:{},quickFilterText:{},cacheQuickFilter:{type:Boolean},includeHiddenColumnsInQuickFilter:{type:Boolean},quickFilterParser:{type:Function},quickFilterMatcher:{type:Function},applyQuickFilterBeforePivotOrAgg:{type:Boolean},excludeChildrenWhenTreeDataFiltering:{type:Boolean},enableAdvancedFilter:{type:Boolean},alwaysPassFilter:{type:Function},includeHiddenColumnsInAdvancedFilter:{type:Boolean},advancedFilterParent:{},advancedFilterBuilderParams:{},advancedFilterParams:{},suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableFilterHandlers:{type:Boolean},filterHandlers:{},enableCharts:{type:Boolean},chartThemes:{},customChartThemes:{},chartThemeOverrides:{},chartToolPanelsDef:{},chartMenuItems:{type:[Array,Function]},loadingCellRenderer:{},loadingCellRendererParams:{},loadingCellRendererSelector:{type:Function},localeText:{},masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:{},detailCellRenderer:{},detailCellRendererParams:{},detailRowHeight:{},detailRowAutoHeight:{type:Boolean},context:{},alignedGrids:{type:[Array,Function]},tabIndex:{},rowBuffer:{},valueCache:{type:Boolean},valueCacheNeverExpires:{type:Boolean},enableCellExpressions:{type:Boolean},suppressTouch:{type:Boolean},suppressFocusAfterRefresh:{type:Boolean},suppressBrowserResizeObserver:{type:Boolean},suppressPropertyNamesCheck:{type:Boolean},suppressChangeDetection:{type:Boolean},debug:{type:Boolean},loading:{type:Boolean},overlayLoadingTemplate:{},loadingOverlayComponent:{},loadingOverlayComponentParams:{},suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:{},noRowsOverlayComponent:{},noRowsOverlayComponentParams:{},suppressNoRowsOverlay:{type:Boolean},pagination:{type:Boolean},paginationPageSize:{},paginationPageSizeSelector:{type:[Array,Boolean]},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:{},pivotMaxGeneratedColumns:{},pivotDefaultExpanded:{},pivotColumnGroupTotals:{},pivotRowTotals:{},pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:{},suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:{},cellFadeDuration:{},allowShowChangeAfterFilter:{type:Boolean},domLayout:{},ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},rowDragInsertDelay:{},suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},dragAndDropImageComponent:{},dragAndDropImageComponentParams:{},fullWidthCellRenderer:{},fullWidthCellRendererParams:{},embedFullWidthRows:{type:Boolean},groupDisplayType:{},groupDefaultExpanded:{},autoGroupColumnDef:{},groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:{},groupAggFiltering:{type:[Boolean,Function]},groupTotalRow:{type:[String,Function]},grandTotalRow:{},suppressStickyTotalRow:{type:[Boolean,String]},groupSuppressBlankHeader:{type:Boolean},groupSelectsFiltered:{type:Boolean},showOpenedGroup:{type:Boolean},groupHideParentOfSingleChild:{type:[Boolean,String]},groupRemoveSingleChildren:{type:Boolean},groupRemoveLowestSingleChildren:{type:Boolean},groupHideOpenParents:{type:Boolean},groupAllowUnbalanced:{type:Boolean},rowGroupPanelShow:{},groupRowRenderer:{},groupRowRendererParams:{},treeData:{type:Boolean},treeDataChildrenField:{},treeDataParentIdField:{},rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},groupHierarchyConfig:{},pinnedTopRowData:{},pinnedBottomRowData:{},enableRowPinning:{type:[Boolean,String]},isRowPinnable:{type:Function},isRowPinned:{type:Function},rowModelType:{},rowData:{},asyncTransactionWaitMillis:{},suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:{},cacheOverflowSize:{},infiniteInitialRowCount:{},serverSideInitialRowCount:{},suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:{},maxBlocksInCache:{},maxConcurrentDatasourceRequests:{},blockLoadDebounceMillis:{},purgeClosedRowNodes:{type:Boolean},serverSideDatasource:{},serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:{},viewportDatasource:{},viewportRowModelPageSize:{},viewportRowModelBufferSize:{},alwaysShowHorizontalScroll:{type:Boolean},alwaysShowVerticalScroll:{type:Boolean},debounceVerticalScrollbar:{type:Boolean},suppressHorizontalScroll:{type:Boolean},suppressScrollOnNewData:{type:Boolean},suppressScrollWhenPopupsAreOpen:{type:Boolean},suppressAnimationFrame:{type:Boolean},suppressMiddleClickScrolls:{type:Boolean},suppressPreventDefaultOnMouseWheel:{type:Boolean},scrollbarWidth:{},rowSelection:{},cellSelection:{type:[Boolean,Object]},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:{},rowNumbers:{type:[Boolean,Object]},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:{},suppressClearOnFillReduction:{type:Boolean},sortingOrder:{},accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:{},suppressMaintainUnsortedOrder:{type:Boolean},icons:{},rowHeight:{},rowStyle:{},rowClass:{},rowClassRules:{},suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:{},deltaSort:{type:Boolean},treeDataDisplayType:{},enableGroupEdit:{type:Boolean},initialState:{},reactiveCustomComponents:{type:Boolean},renderingMode:{},theme:{},loadThemeGoogleFonts:{type:Boolean},themeCssLayer:{},styleNonce:{},themeStyleContainer:{},getContextMenuItems:{type:Function},getMainMenuItems:{type:Function},postProcessPopup:{type:Function},processUnpinnedColumns:{type:Function},processCellForClipboard:{type:Function},processHeaderForClipboard:{type:Function},processGroupHeaderForClipboard:{type:Function},processCellFromClipboard:{type:Function},sendToClipboard:{type:Function},processDataFromClipboard:{type:Function},isExternalFilterPresent:{type:Function},doesExternalFilterPass:{type:Function},getChartToolbarItems:{type:Function},createChartContainer:{type:Function},focusGridInnerElement:{type:Function},navigateToNextHeader:{type:Function},tabToNextHeader:{type:Function},navigateToNextCell:{type:Function},tabToNextCell:{type:Function},getLocaleText:{type:Function},getDocument:{type:Function},paginationNumberFormatter:{type:Function},getGroupRowAgg:{type:Function},isGroupOpenByDefault:{type:Function},ssrmExpandAllAffectsAllRows:{type:Boolean},initialGroupOrderComparator:{type:Function},processPivotResultColDef:{type:Function},processPivotResultColGroupDef:{type:Function},getDataPath:{type:Function},getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:{type:Function},isServerSideGroup:{type:Function},getServerSideGroupKey:{type:Function},getBusinessKeyForNode:{type:Function},getRowId:{type:Function},resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:{type:Function},isRowMaster:{type:Function},fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},onToolPanelVisibleChanged:{type:Function},onToolPanelSizeChanged:{type:Function},onColumnMenuVisibleChanged:{type:Function},onContextMenuVisibleChanged:{type:Function},onCutStart:{type:Function},onCutEnd:{type:Function},onPasteStart:{type:Function},onPasteEnd:{type:Function},onColumnVisible:{type:Function},onColumnPinned:{type:Function},onColumnResized:{type:Function},onColumnMoved:{type:Function},onColumnValueChanged:{type:Function},onColumnPivotModeChanged:{type:Function},onColumnPivotChanged:{type:Function},onColumnGroupOpened:{type:Function},onNewColumnsLoaded:{type:Function},onGridColumnsChanged:{type:Function},onDisplayedColumnsChanged:{type:Function},onVirtualColumnsChanged:{type:Function},onColumnEverythingChanged:{type:Function},onColumnsReset:{type:Function},onColumnHeaderMouseOver:{type:Function},onColumnHeaderMouseLeave:{type:Function},onColumnHeaderClicked:{type:Function},onColumnHeaderContextMenu:{type:Function},onComponentStateChanged:{type:Function},onCellValueChanged:{type:Function},onCellEditRequest:{type:Function},onRowValueChanged:{type:Function},onCellEditingStarted:{type:Function},onCellEditingStopped:{type:Function},onRowEditingStarted:{type:Function},onRowEditingStopped:{type:Function},onBulkEditingStarted:{type:Function},onBulkEditingStopped:{type:Function},onBatchEditingStarted:{type:Function},onBatchEditingStopped:{type:Function},onUndoStarted:{type:Function},onUndoEnded:{type:Function},onRedoStarted:{type:Function},onRedoEnded:{type:Function},onCellSelectionDeleteStart:{type:Function},onCellSelectionDeleteEnd:{type:Function},onRangeDeleteStart:{type:Function},onRangeDeleteEnd:{type:Function},onFillStart:{type:Function},onFillEnd:{type:Function},onFilterOpened:{type:Function},onFilterChanged:{type:Function},onFilterModified:{type:Function},onFilterUiChanged:{type:Function},onFloatingFilterUiChanged:{type:Function},onAdvancedFilterBuilderVisibleChanged:{type:Function},onFindChanged:{type:Function},onChartCreated:{type:Function},onChartRangeSelectionChanged:{type:Function},onChartOptionsChanged:{type:Function},onChartDestroyed:{type:Function},onCellKeyDown:{type:Function},onGridReady:{type:Function},onGridPreDestroyed:{type:Function},onFirstDataRendered:{type:Function},onGridSizeChanged:{type:Function},onModelUpdated:{type:Function},onVirtualRowRemoved:{type:Function},onViewportChanged:{type:Function},onBodyScroll:{type:Function},onBodyScrollEnd:{type:Function},onDragStarted:{type:Function},onDragStopped:{type:Function},onDragCancelled:{type:Function},onStateUpdated:{type:Function},onPaginationChanged:{type:Function},onRowDragEnter:{type:Function},onRowDragMove:{type:Function},onRowDragLeave:{type:Function},onRowDragEnd:{type:Function},onRowDragCancel:{type:Function},isRowValidDropPosition:{type:Function},onRowResizeStarted:{type:Function},onRowResizeEnded:{type:Function},onColumnRowGroupChanged:{type:Function},onRowGroupOpened:{type:Function},onExpandOrCollapseAll:{type:Function},onPivotMaxColumnsExceeded:{type:Function},onPinnedRowDataChanged:{type:Function},onPinnedRowsChanged:{type:Function},onRowDataUpdated:{type:Function},onAsyncTransactionsFlushed:{type:Function},onStoreRefreshed:{type:Function},onHeaderFocused:{type:Function},onCellClicked:{type:Function},onCellDoubleClicked:{type:Function},onCellFocused:{type:Function},onCellMouseOver:{type:Function},onCellMouseOut:{type:Function},onCellMouseDown:{type:Function},onRowClicked:{type:Function},onRowDoubleClicked:{type:Function},onRowSelected:{type:Function},onSelectionChanged:{type:Function},onCellContextMenu:{type:Function},onRangeSelectionChanged:{type:Function},onCellSelectionChanged:{type:Function},onTooltipShow:{type:Function},onTooltipHide:{type:Function},onSortChanged:{type:Function},height:{},isSorting:{type:Boolean}},emits:["onGridReady","row-clicked","cell-clicked","cell-focused","row-selected","on-scroll"],setup(e,{expose:t,emit:n}){const o=e,s=n,r=$(null);_E(r,()=>{var v;const g=(v=i.value)==null?void 0:v.getApi();g==null||g.clearFocusedCell()});const i=$(null),a=X(()=>({width:"100%",height:o.height||"500px"})),l=X(()=>({...o,theme:dTe}));function u(){var v;if(!r.value){console.warn("Grid container element not found");return}const g={...l.value,height:o.height};i.value=new cTe(r.value,g),i.value.init(),(v=i.value.getApi())==null||v.addEventListener("bodyScroll",()=>{s("on-scroll",new Event("scroll"))}),c()}function c(){var v;const g=((v=i.value)==null?void 0:v.getApi())??null;s("onGridReady",g)}function d(g){var w,S;if(!g)return;(w=i.value)==null||w.updateColumnDefs(g);const v=g.map(b=>b.field&&b.width&&!b.hide?{colId:b.field,width:b.width,flex:null}:null).filter(b=>b!==null);(S=i.value)==null||S.setColumnWidth(v)}function h(){var g;(g=i.value)==null||g.destroy(),i.value=null}function f(){var g;return((g=i.value)==null?void 0:g.getApi())||void 0}function p(){return i.value||null}return Qe(()=>o.columnDefs,(g,v)=>{const w=g==null?void 0:g.filter(b=>!b.hide).map(b=>b.field).join(","),S=v==null?void 0:v.filter(b=>!b.hide).map(b=>b.field).join(",");w!==S&&d(g)},{deep:!0}),Vn(()=>{h()}),t({gridApi:f,gridManager:p,syncColumnDefs:d}),Xt(()=>{u()}),Vn(()=>{h()}),(g,v)=>(q(),de("div",{ref_key:"gridContainerRef",ref:r,style:hn(a.value),class:le(["ag-theme-quartz",["ag-table-container",o.isSorting?"is-sorting":""]])},null,6))}});function lc(e){return uB(e)}const fTe=()=>[...[{headerName:"Thumbnail",field:"thumbnail",sortable:!1,filter:!1,pinned:"left",lockPinned:!0,suppressMovable:!0,headerComponent:lc(Sl),width:86,resizable:!1},{headerName:"Name",field:"name",sortable:!1,filter:!1,pinned:"left",lockPinned:!0,headerComponent:lc(Sl),suppressMovable:!0},{headerName:"Notes",field:"description",sortable:!1,filter:!1,suppressMovable:!1},{headerName:"Assignee",field:"assignees",sortable:!1,filter:!1,headerComponent:lc(Sl)},{headerName:"Status",field:"status",sortable:!1,filter:!1,headerComponent:lc(Sl)},{headerName:"Date Range",field:"dateRange",sortable:!1,filter:!1,headerComponent:lc(Sl)},{headerName:"Last Updated",field:"lastUpdated",sortable:!1,filter:!1,headerComponent:lc(Sl),cellRendererParams:n=>{var o,s,r;return{...n,value:(o=n==null?void 0:n.data)==null?void 0:o.lastUpdated.value,tooltip:((r=(s=n==null?void 0:n.data)==null?void 0:s.lastUpdated)==null?void 0:r.tooltip)||void 0,readOnly:!0}}},{headerName:"Completed On",field:"completedOn",sortable:!1,filter:!1,headerComponent:lc(Sl),cellRendererParams:n=>{var o,s,r;return{...n,value:(o=n==null?void 0:n.data)==null?void 0:o.completedOn.value,tooltip:((r=(s=n==null?void 0:n.data)==null?void 0:s.completedOn)==null?void 0:r.tooltip)||void 0,readOnly:!0}}}].map(n=>Tp.fromType(n))],$w={WIDTH:60,HEADER_CLASS:"ag-checkbox-header"},pTe=()=>({field:"__checkboxSelection",checkboxSelection:!0,headerCheckboxSelection:!0,pinned:"left",width:$w.WIDTH,minWidth:$w.WIDTH,maxWidth:$w.WIDTH,cellClass:"ag-checkbox-cell",headerClass:$w.HEADER_CLASS,headerComponent:My(zse),suppressMovable:!0}),kG="blank",gTe=[kG,"__checkboxSelection","options"],mTe=["uiColumnResized","uiColumnMoved","api"],vTe={headerName:"",field:"options",sortable:!1,filter:!1,editable:!0,pinned:"right",lockPosition:!0,suppressMovable:!0,resizable:!1},FG=(e,t)=>t!=null&&t.width?{...e,width:t.width,flex:void 0}:e,yTe=(e,t,n)=>{const{getCachedValue:o,setCachedValue:s}=bf({dbName:"item_table_column_configs",storeName:"column_configs"}),r=async()=>{const d=await o(t);if(!d||typeof d!="string")return null;try{const h=JSON.parse(d);return Array.isArray(h)?h:null}catch(h){return console.error("Failed to parse cached column config:",h),null}},i=$([]),a=pTe();let l=0;const u=async d=>{const h=++l,f=await r();if(h!==l)return;const p=new Map(f==null?void 0:f.map(k=>[k.field,k])),g=fTe(),v=Tp.fromType(vTe),w=!!f,b=((d==null?void 0:d.map(k=>{var M;return{headerName:k.name,field:`metric_${k.id}`,editable:((M=k==null?void 0:k.auth_permission)==null?void 0:M.permission)==2,sortable:!0,filter:!1,flex:1,context:{...k},hide:w?!p.has(`metric_${k.id}`):!(k.is_primary||k.is_point_metric),cellClass:"ag-cell-optimized",headerComponent:My(Sl),headerComponentParams:()=>({headerType:k.metric_type.code=="number"||k.metric_type.code=="formula"?"number":"default"})}}))||[]).map(k=>Tp.fromType(k)),y=[a,...g,...b,v],E=[],_=[],I=[];for(const k of y)k.pinned==="left"?E.push(k):k.pinned==="right"||k.field===kG?_.push(k):I.push(k);if(!f||f.length===0){i.value=y;return}const T=new Map(I.map(k=>[k.field,k])),F=[];for(const k of f)if(k.field&&T.has(k.field)){const M=T.get(k.field);F.push({...FG(M,k),hide:k.hide}),T.delete(k.field)}const L=Array.from(T.values()),x=[...F,...L].map(k=>({...k,lockPinned:!0})),P=k=>{const M=p.get(k.field),N=FG(k,M);return M&&M.hide!==void 0?{...N,hide:M.hide}:N};i.value=[...E.map(P),...x,..._.map(P)]};Qe(e,d=>u(d),{immediate:!0});const c=Cr((d,h)=>{if((d==null?void 0:d.source)!==void 0&&!mTe.includes(d.source))return;const f=n.value,p=f==null?void 0:f.getColumnDefs(),g=new Map;if(f==null||f.getColumnState().forEach(w=>{w.width&&g.set(w.colId,Number(w.width))}),i.value=p||i.value,!h)return;const v=(p??[]).filter(w=>w.field&&!gTe.includes(w.field)).map(w=>({field:w.field,hide:w.hide,width:g.get(w.field)||w.width,pinned:w.pinned}));s(t,JSON.stringify(v))},Si);return nD(()=>c.cancel()),{columnDefs:i,checkboxColumn:a,saveColumnConfig:c}},wTe=()=>{const e=un.getInstance().getItem("API_BASE_URL");return e!=null&&e.includes("v1")?e.slice(0,e.lastIndexOf("/v1")):String(e)},CTe=e=>{var P,k,M;const{showMessage:t,showErrorNetMessage:n}=Rs(),o=oo(),s={domainApi:wTe(),wsCode:un.getInstance().getItem("ws.code"),entityId:e.value.entityId},r=(M=(k=(P=o==null?void 0:o.appContext)==null?void 0:P.config)==null?void 0:k.globalProperties)==null?void 0:M.apiConfig;if(!r||s.domainApi===""||s.wsCode==="")throw new Error("API configuration is missing in useItems");const i=new ON(r,s);i.on("call-api",N=>{N.success?t(N.apiCode,"success"):n(N)});const a=Fo({}),l=$([]),u=$(!1),c=$(null),d=$(null),h=$(1),f=$(20);let p=Promise.resolve();const{setCachedUsers:g}=RJ(),v=N=>({workspaceId:e.value.workspaceId,entityIds:[e.value.entityId],orderBy:"id-asc",include_permission:"{include_permission}",include_permission_names:!0,q:N}),w=50,S=async(N,B,z)=>{if(!N.length)return[];const oe=B9(N,B);return(await Promise.all(oe.map(z))).flat()},b=async N=>{try{return(await i.getPermissionForItems({workspaceId:e.value.workspaceId,itemIds:N})).data.map(z=>[z==null?void 0:z.id,z.permission])}catch(B){return console.error("Failed to fetch item permissions chunk:",B),[]}},y=async(N,B)=>{try{const z=await i.getMetricValues({workspaceId:e.value.workspaceId,item_ids:N,per_page:N.length*B.length,metric_ids:B}),oe=z.data.map(te=>{const se=new Map(te.item_metrics.map(A=>[A.metric_id,{value:A.value,auth_permission:A==null?void 0:A.auth_permission}])),Z=Object.fromEntries(B.map(A=>[A,se.get(A)??null]));return[te==null?void 0:te.id,Z]}),ie=new Set(z.data.map(te=>te==null?void 0:te.id));for(const te of N)if(!ie.has(te)){const se=Object.fromEntries(B.map(Z=>[Z,{value:null,auth_permission:void 0}]));oe.push([te,se])}return oe}catch(z){return console.error("Failed to fetch a chunk of metric values:",z),N.map(ie=>[ie,Object.fromEntries(B.map(te=>[te,void 0]))])}},E=async N=>{try{const B=await i.getAssignedUser({workspaceId:e.value.workspaceId,item_ids:N,per_page:N.length}),z=B.data.flatMap(oe=>oe.assignees);return g(z),B.data.map(oe=>[oe==null?void 0:oe.id,oe==null?void 0:oe.assignees])}catch(B){return console.error("Failed to fetch a chunk of assigned users:",B),[]}},_=async N=>{if(!N.length)return console.warn("getPermissionForItems: Empty itemIds"),{};try{const B=await S(N,w,b);return Object.fromEntries(B)}catch(B){return console.error("Failed to fetch item permissions:",B),{}}},I=async(N,B)=>!N.length||!B.length?{}:(p=p.then(async()=>{try{const ie=[];let te=0;for(let Z=0;Z<B.length;Z+=5){te++;const A=B.slice(Z,Z+5),j=[];for(let ge=0;ge<A.length;ge++){const xe=A[ge],ue=await S(N,w,K=>y(K,[xe]));j.push(ue),await new Promise(K=>setTimeout(K,500))}ie.push(...j);const ne=Z+5>=B.length}const se={};for(const Z of ie.flat()){const[A,j]=Z;se[A]||(se[A]={}),Object.assign(se[A],j)}return se}catch(z){return console.error("Failed to fetch metric values:",z),{}}}),p),T=async N=>{if(!N.length)return console.warn("getAssignedUsers: Empty itemIds"),{};try{const B=await S(N,w,E);return Object.fromEntries(B)}catch(B){return console.error("Failed to fetch assigned users:",B),{}}};return{items:l,loading:u,error:c,pagination:d,currentPage:h,pageSize:f,cusorMap:a,fetchItems:async N=>{const{cursor:B,offset:z,size:oe,searchQuery:ie}=N;let te=[];u.value=!0,c.value=null;try{const se=await i.getAllItem_cursor({...N,cursor:B||void 0,offset:z||void 0,pageSize:oe||f.value,...v(ie),sortBy:N.sort_by});return l.value=se.data,d.value=se.meta,h.value=se.meta.current_page||0,te=se.data.map(Z=>Z==null?void 0:Z.id),se}catch(se){throw c.value=se,console.error("Failed to fetch items (cursor):",se),se}finally{const se=async()=>{try{const[Z,A]=await Promise.all([T(te),_(te)]);e.value.updateItemData({assignees:Z,permission:A},te);const j=await I(te,e.value.metricIds);e.value.setMetricValues(j,new Set(te),e.value.metricIds)}catch(Z){console.error("Post-fetch processing failed:",Z)}};u.value=!1,setTimeout(se)}},getAssignableStatus:async N=>{try{return await i.getAssignableStatus({workspaceId:e.value.workspaceId,itemIds:N})}catch(B){throw console.error("Failed to fetch assignable status:",B),B}},getMetricList:async N=>{try{return await i.getMetricList({workspaceId:e.value.workspaceId,entityId:N})}catch(B){throw console.error("Failed to fetch metric list:",B),B}},getMetricValues:I,getAssignedUsers:T}};function bTe(e){return{updateRowData:(o,s)=>{if(!e.value)return;const r=[],i=new Set,a=e.value.getColumnDefs();if(!a)return;const l=a.map(u=>{if(u.field&&u.field.startsWith("metric_")&&(u.hide===!1||u.hide===void 0))return u.field}).filter(Boolean);s.forEach(u=>{var d;const c=(d=e.value)==null?void 0:d.getRowNode(u);if(c){if(r.push(c),o.assignees){const h=hJ((o.assignees[u]||[]).map(bO));c.data.assignees=h,i.add("assignees")}o.permission&&(c.data.permissions=o.permission[u]),l.forEach(h=>{c.data[h]=c.data[h]??null})}}),i.add("assignees"),i.add("status"),i.add("dateRange"),i.add("moreActions"),i.add("name"),i.add("description"),e.value.refreshCells({rowNodes:r,columns:Array.from(i),force:!0})},setMetricValues:(o,s,r)=>{const i=e.value;if(!i)return;const a=new Map(Array.from(s).map(u=>[u,new Map(r.map(c=>[c,{value:null,auth_permission:void 0}]))]));Object.entries(o).forEach(([u,c])=>{Object.entries(c).forEach(([d,h])=>{var f;(f=a.get(u))==null||f.set(d,{value:h==null?void 0:h.value,auth_permission:h==null?void 0:h.auth_permission})})});const l=Array.from(a.entries()).map(([u,c])=>{const d=i.getRowNode(u);return d!=null&&d.data?(c.forEach((h,f)=>{const p=`metric_${f}`;d.data[p]=(h==null?void 0:h.value)||null;const g=`metric_permission_${f}`;d.data[p]=(h==null?void 0:h.value)||null,d.data[g]=(h==null?void 0:h.auth_permission)||null}),d):null});l.length>0&&i.refreshCells({rowNodes:l,columns:Array.from(r).map(u=>`metric_${u}`),force:!0})}}}function STe(e,t,n,o,s){let r=!0;return{async getRows(i){try{o(!0),r&&(s(!0),r=!1);const a=Math.floor(i.startRow/t)+1,{rows:l,total:u}=await e({page:a,pageSize:t,filterText:n(),sort_by:i.sortModel});let c=-1;Number.isFinite(u)?c=u:l.length<t&&(c=i.startRow+l.length),i.context={pageSize:t,text:n()},i.successCallback(l,c),o(!1),s(!1)}catch(a){console.error("Datasource fetch error:",a),i.failCallback(),o(!1),s(!1)}}}}function ETe(e){const{selectRowData:t,isSidebarOpen:n,quickFilterText:o,gridApi:s,fetcher:r}=e,i=$(!0),a=$(!0),l=$(!1),u=()=>{n.value=!n.value},c=v=>{if(i.value=!1,s.value=v,!v)return null;const{addEventListener:w,setGridOption:S}=v;if(!r)return console.error("Fetcher function is undefined"),null;const b=STe(r,e.perPage,()=>o.value,y=>{i.value=y},y=>{a.value=y});return S==null||S("datasource",b),w==null||w("selectionChanged",()=>{t.value=v.getSelectedRows()}),v||null},d=v=>{var w,S;if((w=s.value)==null||w.hideOverlay(),v!==void 0&&(o.value=v),(S=s.value)==null||S.deselectAll(),t.value=[],i.value=!0,!s.value||!r){console.error("Grid API or fetcher is not available"),i.value=!1;return}l.value=!0,a.value=!0,s.value.purgeInfiniteCache(),s.value.ensureIndexVisible(0,"top"),setTimeout(()=>{i.value=!1,setTimeout(()=>{l.value=!1},100)},300)},h=()=>{var v;(v=s.value)==null||v.deselectAll(),t.value=[]},f=Cr(v=>{d(v)},Si);return{isLoading:i,toggleSidebar:u,onGridReady:c,onSearch:f,handleUnSelect:h,firstLoad:a,cacheCleared:l,handleSelectAll:()=>{s.value},isSelectAll:$(!1)}}const _Te={changelog:{"1.0.1":{date:"2024-06-20",changes:["Fixed styling issues for archived and deleted rows."]},"1.0.0":{date:"2024-06-15",changes:["Initial release of the Item Table package."]},"0.0.1-alpha.8":{date:"2024-06-10",changes:["Improved performance of row updates.","Added support for custom cell renderers.","Add row hover effect for better UX.","Add loading skeleton for filter","Beta release with core functionalities implemented."]},"0.0.1-alpha.9":{date:"2024-06-05",changes:["Add row selection feature.","Fix bug with column resizing.","Optimize rendering for large datasets.","Implement getLog function to retrieve changelog entries based on version.","Display app version and changelog in the Item Table component tooltip.","Clean up unused autocomplete and memoized config composables.","Update styles for better consistency and readability."]},"0.0.1-alpha.11":{date:"2024-06-18",changes:["Add bulk process status display: items now show an hourglass icon and tooltip when being processed.","Update data model: added isProcessing and bulk_process properties to track item status.","Improve row focus: focused rows now flash for better visibility.","Set 'Last Updated' and 'Completed On' columns as read-only.","Fix: resolve visual fetching issue in useRemoteFiles composable.","Fix: use correct upload icon in PopupCreateScenes component.","Enhance data conversion to include processing status in item rows."]},"0.0.1-alpha.12":{date:"2024-06-12",changes:["feat: enhance Snackbar component and notification handling","Refactor Snackbar.vue for improved readability and styling, including color adjustments for icons and text.","Add showMessage function in notifications store to display messages based on API keys, improving notification management.","Introduce notificationMessage constant to centralize notification messages for various API actions, enhancing maintainability.","Remove unnecessary console logs from useRemoteFiles and improve logging in notification store for better debugging."]},"0.0.1-alpha.16":{date:"2024-06-20",changes:["Add onboarding tour feature and enhance UI components with new dependencies","Refactor UI components for improved styling and functionality","Updated RatingComponent.vue to streamline class bindings and improve accessibility attributes.","Enhanced SearchBox.vue by adding a clear event handler and simplifying icon rendering.","Modified AssigneeGroupEditor.vue and AssigneeGroupRenderer.vue to remove unnecessary size attributes from icons.","Adjusted DateRangeRenderer.vue to remove size attributes from icons for consistency.","Updated HeaderCheckbox.vue to set dropdown placement to 'bottom-start'.","Refined HeaderSorting.vue to simplify sort option labels and improve sorting logic.","Enhanced HeaderWrapper.vue to utilize reactive properties for sorting state.","Improved HyperLinkEditor.vue and HyperLinkInlineEditor.vue by removing size attributes from icons.","Updated PopupLayout.vue to use a CSS variable for box-shadow styling.","Refined Snackbar.vue to standardize icon colors and improve styling consistency.","Adjusted useTippy.ts to set default placement and arrow visibility for tooltips.","Modified notificationMessage.ts to remove error messages for list fetching.","Cleaned up notifications.ts by removing console logs for a cleaner codebase.","Updated sortStore.ts to comment out unnecessary console logs for better performance.","Enhanced styles.scss by defining new icon size variables and standardizing box-shadow styles."]},"0.0.99":{date:"2024-06-24",changes:["Fix: resolve issue with incorrect version display in Item Table component.","Update changelog retrieval logic to ensure accurate version matching.","Enhance tooltip display for app version and changelog in Item Table component."]}}},RTe=e=>{var t;return(t=Object.entries(_Te.changelog).find(([n,o])=>n===e))==null?void 0:t[1].changes},TTe={class:"visual-btn-visual"},DTe={class:"visual-btn--label"},ITe={key:0,class:"visual-btn--description"},xTe={key:1,class:"visual-btn--description"},Hw=_t(ot({__name:"VisualButton",props:{label:{},description:{},disabled:{type:Boolean}},emits:["onClick"],setup(e,{emit:t}){const n=e,o=()=>{n.disabled||s("onClick")},s=t;return(r,i)=>(q(),de("div",{class:le(["visual-btn",{"visual-btn--disabled":e.disabled}]),onClick:o},[Se("div",TTe,[kt(r.$slots,"visual",{},()=>[i[0]||(i[0]=Mz('<svg width="42" height="36" viewBox="0 0 42 36" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-c2003bd7><g clip-path="url(#clip0_4824_13082)" data-v-c2003bd7><path d="M5.14286 18V10.2857H18V18H5.14286ZM5.14286 23.1 429H18V30.8571H5.14286V23.1429ZM23.1429 30.8571V23.1429H36V30.8571H23.1429ZM36 18H23.1429V10.2857H36V18ZM5.14286 0C2.30625 0 0 2.30625 0 5.14286V30.8571C0 33.6937 2.30625 36 5.14286 36H36C38.8366 36 41.1429 33.6937 41.1429 30.8571V5.14286C41.1429 2.30625 38.8366 0 36 0H5.14286Z" fill="#D7D7D7" data-v-c2003bd7></path><path d="M0 5.14286C0 2.30625 2.30625 0 5.14286 0H36C38.8366 0 41.1429 2.30625 41.1429 5.14286V10.318H0V5.14286Z" fill="#A6A6A6" data-v-c2003bd7></path></g><defs data-v-c2003bd7><clipPath id="clip0_4824_13082" data-v-c2003bd7><rect width="41.1429" height="36" fill="white" data-v-c2003bd7></rect></clipPath></defs></svg>',1))],!0)]),Se("div",DTe,at(n.label),1),n.disabled?(q(),de("div",ITe," Coming soon ")):(q(),de("div",xTe,at(n.description),1))],2))}}),[["__scopeId","data-v-c2003bd7"]]),OG="xlsx_toolbox",MG="feedback_lockup_toolbox",ATe="TOOLBOX_EXPORT_DATA",PTe="https://app.arbocollab.com",kTe=1e3,NG=()=>sessionStorage.getItem("BASE_URL"),LG=(e,t="xlsx-mapping")=>{const n=Dn("switchInstance",void 0),o=`${t}:load`,s=`${t}:edit`,r=new Set;let i;const a=()=>{const h=t==="xlsx-mapping"?OG:MG,f={showLoad:!1};n?n(h,"",f):window.appManager.switchInstance(h,"",f)},l=(h,f)=>{const p=setTimeout(()=>{r.delete(p),window.postMessage({type:h,payload:f},`${NG()}`)},kTe);r.add(p)},u=h=>{if(!h)throw new Error("Payload is missing");a(),l(o,h)},c=(h,f)=>{if(!h)throw new Error("Error file is missing");a(),l(s,{file:h})},d=h=>{if((h==null?void 0:h.type)!==ATe)return;const{file:f,fileName:p}=h.payload;e({channel:t,file:new File([f],p,{type:f.type}),fileName:p});const g=t==="xlsx-mapping"?OG:MG;g=="xlsx_toolbox"&&window.appManager.hide(g)};return Xt(()=>{i=zne({target:window,allowedOrigins:[NG()||PTe],onMessage:d,onInvalidMessage:(h,f,p)=>{console.warn("Rejected postMessage:",f,p.origin)}})}),Vn(()=>{i==null||i(),r.forEach(clearTimeout),r.clear()}),{openToolbox:u,sendBackErrorFile:c}},FTe={class:"header-name"},OTe={class:"description"},MTe={key:0,class:"error-message"},NTe={class:"dynamic"},LTe={key:1,class:"choose-method-container"},VTe={key:3,class:"select-status-container"},BTe={key:4,class:"result-container"},$Te={key:5,class:"result-container"},HTe={key:0},GTe={key:3},VG="text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel",UTe=20,WTe=_t(ot({__name:"PopupToolboxUploader",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const o=Kt,s=X(()=>[1,2,6].includes(b.value)),r=X(()=>Sv()),i=X(()=>({1:{title:`Create ${r.value} in bulk`,description:""},2:{title:"Select status",description:"Choose the starting status for the new work."},3:{title:"Import successful",description:"Work will be created in background. Refresh to see updates."},4:{title:"Import failed",description:"Some data doesn't meet the requirements. Review it and try again."},6:{title:`Create ${r.value} by count`,description:""},7:{title:"Creation in progress",description:"Work will be created in the background. Refresh to see updates."},8:{title:"Creation failed",description:""}})),a=["csv","xlsx","xls"],l=$({segments:[],count:0}),u=({data:R,count:G,template_flow_status_id:J})=>{console.log("handleChangeCreateWithCount called with data:",R,"count:",G,"template_flow_status_id:",J),l.value={segments:R,count:G,template_flow_status_id:J}},c=$(!1),d=async()=>{var R;if(!((R=v.value)!=null&&R.bulkCreate)){console.error("API services not available");return}c.value=!0;try{(await v.value.bulkCreate({workspaceId:f.workspaceId,entityId:f.entityId,payload:{...l.value,entity_id:f.entityId},filter:{}})).status===fs.ACCEPTED&&(b.value=7,g("import-success"))}catch(G){B(G),b.value=8}finally{c.value=!1}},h={"--popup-pt":"20px","--popup-pb":"20px","--popup-pl":"24px","--popup-pr":"24px"},f=e,p=X(()=>Sv()),g=n,{apiServices:v}=so(!1,f),w=1,S=$(),b=$(w),y=$(null),E=$(null),_=$(null),I=$(void 0),T=$(null),F=X(()=>i.value[b.value]),L=$(),x=()=>{var R;y.value=null,b.value=w,E.value=null,_.value=null,M.value=null,T.value=null,(R=L.value)==null||R.clear(),I.value=void 0,l.value={segments:[],count:0}},P=()=>{b.value=6},k=()=>{var R;x(),(R=S.value)==null||R.hide()};Qe([E,_],([R,G])=>{b.value===1&&R&&G&&(b.value=2)});const M=$(null),N=R=>Rs().getErrorMessageFromResponse(R),B=R=>{if(console.error(R),typeof R=="string"){M.value=R;return}const G=R.response,J=G==null?void 0:G.data,ce=N(J);M.value=ce??R.message},z=async(R,G)=>{var ce;if(!v.value||!f.workspaceId||!f.entityId){console.error("API services not available");return}K.value=!0;const J=new FormData;J.append("file",R),J.append("format",((ce=G??R.name)==null?void 0:ce.split(".").pop())??R.name.split(".").pop()??""),J.append("entity_id",f.entityId),J.append("template_flow_status_id",y.value??"");try{await v.value.addNewSceneViaImportFile(f.workspaceId,f.entityId,J),b.value=3,g("import-success")}catch(Ee){console.error("Error uploading file:",Ee),B(Ee||"An unknown error occurred during file upload."),b.value=4}finally{K.value=!1}},{openToolbox:oe,sendBackErrorFile:ie}=LG(({file:R,fileName:G,channel:J})=>{J==="xlsx-mapping"&&(_.value=R,I.value=G??R.name,b.value=2)}),te=$(null),se=async()=>{var R,G;b.value=6,await ht(),(G=(R=te.value)==null?void 0:R.focus)==null||G.call(R)},Z=async()=>{try{const R=await j();oe({template:R})}catch(R){console.error("Error opening toolbox:",R),Rs().showErrorNetMessage("Failed to open toolbox.")}},A=$(!1),j=async()=>{A.value=!0;const R=f.workspaceId,G=f.entityId;if(!R||!G||!v.value)return A.value=!1,Promise.reject(new Error("Workspace ID or Entity ID is missing"));try{const J=await v.value.downloadTemplate(R,G,!1);if(!J)throw new Error("No response from downloadTemplate API");return J}catch(J){return console.error("Error downloading template:",J),Promise.reject(J)}finally{A.value=!1}},ne=R=>{var ce;const G=((ce=R.name.split(".").pop())==null?void 0:ce.toLowerCase())??"",J=VG.split(",").map(Ee=>Ee.trim()).includes(R.type)||a.includes(G);return J||(console.error("Invalid file type:",R.type),Rs().addNotification({id:"invalid-file-type",message:"Invalid file type. Please upload a xlsx, xls, csv file.",type:"error"})),J},ge=async()=>{const R=document.createElement("input");R.type="file",R.accept=`${VG}, ${a.map(G=>`.${G}`).join(", ")}`,R.onchange=async()=>{var J;const G=(J=R.files)==null?void 0:J[0];if(G){if(!ne(G)){x();return}E.value=nv(G);try{const ce=await j();if(!ce){Rs().addNotification({id:"failed-download-template",message:"Failed to download template file.",type:"error"});return}oe({source:G,template:ce})}catch(ce){console.error("Error opening toolbox:",ce),Rs().addNotification({id:"failed-open-toolbox",message:"Failed to open toolbox.",type:"error"})}}},R.click()},xe=async R=>{var G;if(!((G=v.value)!=null&&G.getAssignableStatuses)){console.error("API services not available");return}return v.value.getAssignableStatuses(f.workspaceId,{entity_id:f.entityId,name_like:R.name_like,page:R.page,per_page:UTe})},ue=X(()=>{var R;return l.value.count==0||!((R=l.value.segments)!=null&&R.length)}),K=$(!1),Y=()=>{y.value=null,_.value&&I.value&&ie(_.value,I.value)},re=()=>{y.value&&_.value&&z(_.value,I.value)};return t({open:()=>{var R;return(R=S.value)==null?void 0:R.show()},close:()=>{var R;return(R=S.value)==null?void 0:R.hide()}}),(R,G)=>(q(),je(V(qN),jt({ref_key:"popupRef",ref:S,style:h,onHidden:x},{popupIndex:10,popupName:F.value.title,minWidth:"420px",showOverlay:!0,overlayOpacity:.5,closeOnOverlayClick:!1,closeOnEscape:!0,showCloseBtn:s.value}),Hh({header:we(()=>[Se("span",FTe,at(F.value.title),1)]),default:we(()=>[Se("div",{class:le(["modal-body",{"bulk-count":b.value===6,"choose-method":b.value===1}])},[Se("div",OTe,at(F.value.description),1),M.value&&b.value===4?(q(),de("div",MTe,[G[1]||(G[1]=tt(" Error code ",-1)),Se("span",NTe,at(M.value),1)])):Ye("",!0),b.value===1?(q(),de("div",LTe,[ye(Hw,{disabled:!1,label:"Create by count",description:"Enter how many to create.",onOnClick:se},{visual:we(()=>[ye(V(va),{src:"CreateByCount",size:65})]),_:1}),ye(Hw,{disabled:!1,label:"Start with a blank sheet",description:`Type or paste ${r.value} details
|
|
254
254
|
into a table.`,onOnClick:Z},{visual:we(()=>[ye(V(va),{src:"BlankSheet",size:65})]),_:1},8,["description"]),ye(Hw,{label:"Import from file",description:`Create ${r.value} from a CSV or
|
|
255
|
-
Excel file.`,onOnClick:ge},{visual:we(()=>[ye(V(va),{src:"UploadFile",size:65,"max-width":"65"})]),_:1},8,["description"])])):Ye("",!0),b.value===6?(q(),je(V(jue),{key:2,ref_key:"bulkCreateCountRef",ref:te,"get-status-func":xe,"workspace-id":f.workspaceId,"take-name":p.value,onChanged:u,"entity-id":f.entityId},null,8,["workspace-id","take-name","entity-id"])):b.value===2?(q(),de("div",VTe,[ye(V(wL),{modelValue:y.value,"onUpdate:modelValue":G[0]||(G[0]=J=>y.value=J),"get-status-func":xe,"workspace-id":f.workspaceId,id:f.entityId,style:{width:"100%"},"max-width":"372px",ref_key:"selectStatusRef",ref:L},null,8,["modelValue","workspace-id","id"])])):b.value===3||b.value===7?(q(),de("div",BTe,[ye(V(va),{src:"Success",width:240,height:180,ratio:"unset"})])):b.value===4||b.value===8?(q(),de("div",$Te,[ye(V(va),{src:"Failed",width:240,height:180,ratio:"unset"})])):Ye("",!0)],2)]),_:2},[b.value===2||b.value===4||b.value===3||b.value===6||b.value===7||b.value===8?{name:"footer",fn:we(()=>[b.value==6?ze((q(),de("div",HTe,[ye(V(St),{variant:"primary",loading:c.value,disabled:ue.value||c.value,onClick:d},{default:we(()=>[...G[2]||(G[2]=[tt(" Create ",-1)])]),_:1},8,["loading","disabled"])])),[[V(o),{content:ue.value?"Add a name or a counter first.":void 0,bypassOverflowCheck:!0}]]):Ye("",!0),b.value===4||b.value===8?(q(),je(V(St),{key:1,variant:"secondary",onClick:k},{default:we(()=>[...G[3]||(G[3]=[tt(" Close ",-1)])]),_:1})):b.value===3?(q(),je(V(St),{key:2,variant:"secondary",onClick:k},{default:we(()=>[...G[4]||(G[4]=[tt(" Got it ",-1)])]),_:1})):Ye("",!0),b.value===2?ze((q(),de("div",GTe,[ye(V(St),{loading:K.value,disabled:K.value||!y.value,onClick:re},{default:we(()=>[...G[5]||(G[5]=[tt(" Import ",-1)])]),_:1},8,["loading","disabled"])])),[[V(o),{content:K.value||!y.value?"Select a status first":void 0,bypassOverflowCheck:!0}]]):Ye("",!0),b.value===4?(q(),je(V(St),{key:4,onClick:Y},{default:we(()=>[...G[6]||(G[6]=[tt(" Try Again ",-1)])]),_:1})):Ye("",!0),b.value===8?(q(),je(V(St),{key:5,onClick:P},{default:we(()=>[...G[7]||(G[7]=[tt("Try Again",-1)])]),_:1})):Ye("",!0),b.value===7?(q(),je(V(St),{key:6,onClick:k,variant:"secondary"},{default:we(()=>[...G[8]||(G[8]=[tt(" Got it ",-1)])]),_:1})):Ye("",!0)]),key:"0"}:void 0]),1040))}}),[["__scopeId","data-v-81f75cd1"]]),zTe={class:"header-name"},jTe={class:"modal-body"},KTe={class:"description"},qTe={key:0,class:"error-message"},YTe={class:"dynamic"},XTe={key:1,class:"choose-method-container"},ZTe={key:2,class:"result-container"},JTe={key:3,class:"result-container"},QTe={key:2},BG="text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel",eDe=_t(ot({__name:"PopupBulkUpdate",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const o=Kt,s=X(()=>[1,2].includes(f.value)),r=X(()=>Sv()),i=X(()=>({1:{title:`Update ${r.value} in bulk`,description:""},2:{title:`Update ${r.value} in bulk`,description:""},3:{title:"Import successful",description:"Work will be created in background. Refresh to see updates."},4:{title:"Import failed",description:"Some data doesn't meet the requirements. Review it and try again."},5:{title:"Waiting for Toolbox",description:"Waiting for Toolbox"}})),a={"--popup-pt":"20px","--popup-pb":"20px","--popup-pl":"24px","--popup-pr":"24px"},l=e,u=n,{apiServices:c}=so(!1,l),d=1,h=$(),f=$(d),p=$(null),g=$(null),v=$(null),w=$(void 0),S=$(null),b=X(()=>i.value[f.value]),y=$(),E=()=>{var ie;p.value=null,f.value=d,g.value=null,v.value=null,_.value=null,S.value=null,(ie=y.value)==null||ie.clear(),w.value=void 0};Qe([g,v],([ie,te])=>{f.value===1&&ie&&te&&(f.value=2)});const _=$(null),I=ie=>Rs().getErrorMessageFromResponse(ie),T=ie=>{if(typeof ie=="string"){_.value=ie;return}const te=ie.response,se=te==null?void 0:te.data,Z=I(se);_.value=Z??ie.message,console.log("Error message set to:",{errorMsg:Z,message:ie})},F=async(ie,te)=>{var A;B.value=!0;const se=new FormData,Z=((A=ie.name.split(".").pop())==null?void 0:A.toString())||"";if(se.append("file",ie),se.append("format",Z),se.append("entity_id",l.entityId||""),!c.value){console.error("API services not available");return}try{await c.value.overwriteScenesViaImportFile(l.workspaceId,l.entityId,se),f.value=3,u("import-success")}catch(j){console.error("Error uploading file:",j),T(j),f.value=4}finally{B.value=!1,window.appManager.hide("feedback_lockup_toolbox")}},{openToolbox:L,sendBackErrorFile:x}=LG(({file:ie,fileName:te,channel:se})=>{se==="feedback-merge"&&(v.value=ie,w.value=te??ie.name,F(ie))},"feedback-merge"),P=$(!1),k=async()=>{P.value=!0;const ie=l.workspaceId,te=l.entityId;if(!ie||!te||!c.value)return console.error("Workspace ID or Entity ID is missing"),Promise.reject(new Error("Workspace ID or Entity ID is missing"));try{const se=await c.value.downloadExportedItemsFile(ie,te,!1);if(!se)throw new Error("No response from downloadTemplate API");return se}catch(se){return console.error("Error downloading template:",se),Promise.reject(se)}finally{P.value=!1}},M=ie=>{const te=BG.includes(ie.type);return te||(console.error("Invalid file type:",ie.type),Rs().addNotification({id:"invalid-file-type",message:"Invalid file type. Please upload a xlsx, xls, csv file.",type:"error"})),te},N=async()=>{const ie=document.createElement("input");ie.type="file",ie.accept=BG,ie.onchange=async()=>{var se;const te=(se=ie.files)==null?void 0:se[0];if(te){if(!M(te)){E();return}g.value=nv(te);try{const Z=await k();if(!Z){Rs().addNotification({id:"failed-download-template",message:"Failed to download file.",type:"error"});return}L({exportFile:Z,feedbackFile:te})}catch(Z){console.error("Error opening toolbox:",Z),Rs().addNotification({id:"failed-open-toolbox",message:"Failed to open toolbox.",type:"error"})}}},ie.click()},B=$(!1),z=()=>{p.value=null,v.value&&w.value&&x(v.value,w.value)},oe=()=>{p.value&&v.value&&(B.value=!0,F(v.value,w.value).finally(()=>{B.value=!1}))};return t({open:()=>{var ie;return(ie=h.value)==null?void 0:ie.show()},close:()=>{var ie;return(ie=h.value)==null?void 0:ie.hide()}}),(ie,te)=>(q(),je(V(qN),jt({ref_key:"popupRef",ref:h,style:a,onHidden:E},{popupIndex:10,popupName:b.value.title,minWidth:"420px",showOverlay:!0,overlayOpacity:.5,closeOnOverlayClick:!1,closeOnEscape:!0,showCloseBtn:s.value}),Hh({header:we(()=>[Se("span",zTe,at(b.value.title),1)]),default:we(()=>[Se("div",jTe,[Se("div",KTe,at(b.value.description),1),_.value&&f.value===4?(q(),de("div",qTe,[te[2]||(te[2]=tt(" Error code ",-1)),Se("span",YTe,at(_.value),1)])):Ye("",!0),f.value===1?(q(),de("div",XTe,[ye(Hw,{disabled:!1,label:"Import from file",description:`Update ${r.value} from a CSV or Excel file.`,onOnClick:N,style:{width:"100%"}},{visual:we(()=>[ye(V(va),{src:"UploadFile",size:65})]),_:1},8,["description"])])):f.value===3?(q(),de("div",ZTe,[ye(V(va),{src:"Success",width:240,height:180,ratio:"unset"})])):f.value===4?(q(),de("div",JTe,[ye(V(va),{src:"Failed",width:240,height:180,ratio:"unset"})])):Ye("",!0)])]),_:2},[f.value===4||f.value===3?{name:"footer",fn:we(()=>[f.value===4?(q(),je(V(St),{key:0,variant:"secondary",onClick:te[0]||(te[0]=()=>{var se;E(),(se=h.value)==null||se.hide()})},{default:we(()=>[...te[3]||(te[3]=[tt(" Close ",-1)])]),_:1})):f.value===3?(q(),je(V(St),{key:1,variant:"secondary",onClick:te[1]||(te[1]=()=>{var se;E(),(se=h.value)==null||se.hide()})},{default:we(()=>[...te[4]||(te[4]=[tt(" Got it ",-1)])]),_:1})):Ye("",!0),f.value===2?ze((q(),de("div",QTe,[ye(V(St),{loading:B.value,disabled:B.value||!p.value,onClick:oe},{default:we(()=>[...te[5]||(te[5]=[tt(" Import ",-1)])]),_:1},8,["loading","disabled"])])),[[V(o),{content:B.value||!p.value?"Select a status first":void 0,bypassOverflowCheck:!0}]]):Ye("",!0),f.value===4?(q(),je(V(St),{key:3,onClick:z},{default:we(()=>[...te[6]||(te[6]=[tt(" Try Again ",-1)])]),_:1})):Ye("",!0)]),key:"0"}:void 0]),1040))}}),[["__scopeId","data-v-9a73e40c"]]),tDe=_t(ot({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const n=$s,o=cE(),{setUserPermissions:s,setEntityPermissions:r}=o,{entityPermissions:i}=go(o),a=Kt,l=Io,u=Lv(),{entityData:c}=go(u),d={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},h=$(""),f=X(()=>{var Ke;const Pe=((Ke=i.value)==null?void 0:Ke.has_create_item_permission)==1||!1;return[{label:"Create in bulk",value:"import_scenes",type:"text",id:"import_scenes_option",hide:!Pe},{label:"Update in bulk",value:"bulk_update",type:"text",hide:!Pe,id:"bulk_update_option"}]}),p=e;Tp.initialize({wrapVueCellRenderer:My,wrapVueCellEditor:uB});const g=fd(),{switchInstanceFunc:v}=go(g);Xt(()=>{const Pe=oo();v.value=Pe==null?void 0:Pe.appContext.config.globalProperties.switchInstance;const Ke=new BroadcastChannel("focusable_channel");ht(()=>{setTimeout(()=>{Ke.postMessage("Focusable elements updated")},7e3)})});const w=$(null),S=$([]),b=Gf(),{rowCount:y}=go(b),E=$(!1),_=$(""),I=$(),T=iM(),{metricList:F}=go(T),L=$(""),x=$(!1),P=$(new Set),k=$(new Map),{apiServices:M}=so(!1,p),{columnDefs:N,checkboxColumn:B,saveColumnConfig:z}=yTe(F,p.entityId,w),oe=$();Qe(()=>N,()=>{var Pe;(Pe=oe.value)==null||Pe.updateColumnDefs(N.value)},{deep:!0});const ie=(Pe,Ke)=>{z(Pe,Ke)},{updateRowData:te,setMetricValues:se}=bTe(w),Z=X(()=>({isSearching:_.value.length>0,isFiltering:!(Object.keys(pe.value||{}).length==1&&Object.keys(pe.value)[0]=="preflight_status")&&Object.keys(pe.value||{}).length>0})),A=X(Cv),j=X(()=>N.value.filter(Pe=>{var Ke;return((Ke=Pe.field)==null?void 0:Ke.startsWith("metric_"))&&!Pe.hide}).map(Pe=>{var Ke;return((Ke=Pe.field)==null?void 0:Ke.replace("metric_",""))||""}));ci("timezone",A);const ne=X(()=>({autoFetch:!1,workspaceId:p.workspaceId,entityId:p.entityId,metricIds:j.value,updateItemData:te,setMetricValues:se})),{fetchItems:ge,getMetricList:xe,cusorMap:ue,getMetricValues:K}=CTe(ne),Y=X(()=>{if(!w.value)return!1;const Pe=w.value.getSelectedRows().length;return Pe>0&&Pe>=y.value.total}),re=X(()=>{var Pe;return((Pe=c.value)==null?void 0:Pe.name)||"Items"}),R=Pe=>{setTimeout(()=>{ht(()=>{var Ke,Mt;w.value&&(Pe?(Ke=w.value)==null||Ke.showNoRowsOverlay():(Mt=w.value)==null||Mt.hideOverlay())})},500)},G=(Pe,Ke)=>{var Mt;y.value.total=Pe.meta.total??0,(Mt=Pe.meta.next)!=null&&Mt.cursor&&(ue[Ke+1]=Pe.meta.next.cursor),L.value=Pe.meta["X-Tsr-signature"]||"",Pe.meta.total===0?R(!0):R(!1)},J=vE(),{setDefaultSort:ce}=J,Ee=$(null),{sortingAPIConfiguration:Ce,isSortingRunning:Ne}=go(J),pe=$({preflight_status:"1"}),H=X(()=>({...pe.value,search:_.value}));ci("filterParams",H);const W=$([]),be=X(()=>{var Pe;return((Pe=c.value)==null?void 0:Pe.name)||"Items"}),Ae=async({page:Pe,pageSize:Ke,filterText:Mt})=>{var uo,Zo,Os;(uo=w.value)==null||uo.hideOverlay();const Lt=ue[Pe],So=!Lt&&Pe>1?(Pe-1)*Ke:void 0,Xn=Ce.value;Xn.length>0&&(Ne.value=!0);try{const dc={cursor:Lt,size:Ke,searchQuery:Mt,offset:So,sort_by:Xn,...pe.value},Wl=await ge(dc);if(!Wl)return{rows:[],total:0};const Xi=(Os=(Zo=Wl.meta)==null?void 0:Zo.extra)==null?void 0:Os.default_sort;Xi&&ce(Xi);const gh=(Gw=>{const sn=Gw.data.map(hc=>EO(hc,A.value,be.value));return sn.forEach(hc=>{P.value.add(String(hc.id)),k.value.set(String(hc.id),{})}),sn})(Wl);return G(Wl,Pe),{rows:gh,total:y.value.total}}catch(dc){return console.error("Failed to fetch items:",dc),{rows:[],total:0}}finally{Ne.value=!1}},{isLoading:He,toggleSidebar:Te,onGridReady:Xe,handleUnSelect:ve,handleSelectAll:Be,onSearch:wt,firstLoad:Dt}=ETe({selectRowData:$([]),isSidebarOpen:E,quickFilterText:_,gridApi:w,perPage:d.ROWS_PER_PAGE,fetcher:Ae}),tn=$([]),en=Cr(()=>{var Xn;const Pe=((Xn=w.value)==null?void 0:Xn.getSelectedRows())||[],Ke=new Map(Pe.map(uo=>[uo.id,uo])),So=Pe.map(uo=>uo.id).map(uo=>{var Zo,Os;return[uo,(Os=(Zo=w.value)==null?void 0:Zo.getRowNode(uo))==null?void 0:Os.rowIndex]}).sort((uo,Zo)=>(uo[1]??0)-(Zo[1]??0)).map(([uo])=>Ke.get(uo));tn.value=So.filter(uo=>uo!==void 0)}),bn=Fo({columnsDisplay:[],rowsDisplay:{fromIndex:0,toIndex:0}}),Le=X(()=>({blockLoadDebounceMillis:1e3,columnDefs:N.value,rowModelType:"infinite",cacheBlockSize:d.ROWS_PER_PAGE,infiniteInitialRowCount:20,popupParent:document.getElementById("item-table-layout-id")||void 0,rowSelection:{mode:"multiRow",checkboxes:!1,enableClickSelection:!1,enableSelectionWithoutKeys:!1},pagination:!1,rowHeight:d.ROW_HEIGHT,suppressHorizontalScroll:!1,suppressColumnVirtualisation:!1,debounceVerticalScrollbar:!1,animateRows:!1,suppressAnimationFrame:!1,suppressScrollOnNewData:!0,suppressScrollWhenPopupsAreOpen:!1,rowBuffer:20,enableCellTextSelection:!1,suppressDragLeaveHidesColumns:!0,suppressMaxRenderedRowRestriction:!1,height:d.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:Ge,noRowsOverlayComponent:My(zre),noRowsOverlayComponentParams:()=>Z.value,defaultColDef:{editable:!1,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:Pe=>Pe.data.id,rowClassRules:{"row-deleted":Pe=>{var Ke;return(Ke=Pe.data)==null?void 0:Ke.isDeleted},"row-locked":Pe=>{var Ke;return(Ke=Pe.data)==null?void 0:Ke.isLocked},"row-archived":Pe=>{var Ke;return(Ke=Pe.data)==null?void 0:Ke.isArchived},"row-process-locked":Pe=>{var Ke,Mt;return((Mt=(Ke=Pe.data)==null?void 0:Ke.isProcessing)==null?void 0:Mt.state)==0},"row-inactive":Pe=>{var Ke;return!((Ke=Pe.data)!=null&&Ke.id)},"row-empty":Pe=>!Pe.data},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:p.workspaceId,entityId:p.entityId,apiServices:M.value,sorting:Ne.value},onCellKeyDown:Pe=>{var Ke,Mt,Lt;if(Pe.data.isDeleted)return!1;if(((Ke=Pe==null?void 0:Pe.event)==null?void 0:Ke.key)==="Enter"){const{api:So,node:Xn,column:uo}=Pe,Zo=So.getCellRendererInstances({rowNodes:[Xn],columns:[uo]});if(Zo.length>0){const Os=Zo[0];Os&&typeof((Mt=Os.componsenExposed)==null?void 0:Mt.focus)=="function"&&((Lt=Os.componsenExposed)==null||Lt.focus())}}},isRowSelectable:Pe=>{var Ke,Mt;return!Pe.group&&((Mt=(Ke=Pe.data)==null?void 0:Ke.isProcessing)==null?void 0:Mt.state)!=0},suppressKeyboardEvent:Pe=>{var Lt;if((Lt=Pe.data)!=null&&Lt.isDeleted)return!0;const Ke=Pe.event.key,Mt=Pe.editing;return Mt&&Ke==="Tab"?!0:Mt&&Ke==="Enter"?!1:Ke==="Enter"?(Pe.event.preventDefault(),Pe.event.stopPropagation(),!0):Ke==="ArrowUp"||Ke==="ArrowDown"||Ke==="ArrowLeft"||Ke==="ArrowRight"||Ke==="Tab"||Ke==="Enter"},navigateToNextCell:()=>null,onBodyScroll:Pe=>{const Ke=Pe.api.getFirstDisplayedRowIndex(),Mt=Pe.api.getLastDisplayedRowIndex();bn.rowsDisplay.fromIndex=Ke,bn.rowsDisplay.toIndex=Mt,bn.columnsDisplay=Pe.api.getAllDisplayedVirtualColumns().map(Lt=>Lt.getColId())},onViewportChanged:Pe=>{bn.columnsDisplay=Pe.api.getAllDisplayedVirtualColumns().map(Ke=>Ke.getColId())},suppressHeaderFocus:!0,onCellEditingStarted(Pe){if(Pe.data.isDeleted&&Pe.api.stopEditing(),Pe.colDef.field=="options"){const Ke=Pe.api.getCellRendererInstances({rowNodes:[Pe.node],columns:[Pe.column]});Ke.length>0&&Ke[0].focusUi()}},tabToNextCell:Pe=>{let Ke=Pe.nextCellPosition;if(Ke&&Ke.column.getColId()==="ag-Grid-SelectionColumn"){const Mt=Pe.api.getAllDisplayedColumns(),Lt=Mt.indexOf(Ke.column),So=Pe.backwards?-1:1,Xn=Mt[Lt+So];if(Xn)return{rowIndex:Ke.rowIndex,column:Xn,rowPinned:Ke.rowPinned}}return Ke}}));function Ge(){if(!w.value)return;let Pe=0;w.value.forEachNode(Ke=>{Ke.data&&Pe++}),y.value.loaded=Math.min(Pe,y.value.total)}Qe(()=>Ce,()=>{w.value&&(L.value="",P.value.clear(),w.value.deselectAll(),Object.keys(ue).forEach(Pe=>delete ue[Number(Pe)]),w.value.purgeInfiniteCache(),w.value.ensureIndexVisible(0))},{deep:!0});const Rt=$(),Jt=$(),qt=()=>{is.showPopupOverwriteScenes=!0,ht(()=>{var Pe;(Pe=Jt.value)==null||Pe.open()})},nt=$(),Go=()=>{is.showPopupBulkUpdate=!0,ht(()=>{var Pe;(Pe=nt.value)==null||Pe.open()})},si=()=>{is.showPopupToolboxUploader=!0,ht(()=>{var Pe;(Pe=Rt.value)==null||Pe.open()})},tr=async()=>{Dt.value=!0,w.value&&(L.value="",P.value.clear(),Object.keys(ue).forEach(Pe=>delete ue[Number(Pe)]),await w.value.deselectAll(),await w.value.ensureIndexVisible(0,"top"),await w.value.purgeInfiniteCache(),await w.value.refreshInfiniteCache())},Mr=X(()=>un.getInstance().getItem("ITEM_TABLE_APP_VERSION")||""),Ui=$();X(()=>{var Pe;return(Pe=RTe(Mr.value))==null?void 0:Pe.map(Ke=>`<div>• ${Ke}</div>`).join(`
|
|
256
|
-
`)});function Wi(Pe){var Ke;Pe==="new_scene"?(Ke=Ui.value)==null||Ke.show():Pe==="import_scenes"?si():Pe==="overwrite_scenes"?qt():Pe==="bulk_update"&&Go()}const zi=Pe=>{S.value=Pe.api.getSelectedRows().map(Ke=>Ke.id)},ji=Pe=>{const Ke=Xe(Pe);return Ke&&(Ke.addEventListener("modelUpdated",Ge),Ke.addEventListener("bodyScroll",()=>Ke.stopEditing()),Ke.addEventListener("selectionChanged",en),Ke.addEventListener("columnMoved",Lt=>ie(Lt,!0)),Ke.addEventListener("columnResized",Lt=>ie(Lt,!0)),Ke.addEventListener("firstDataRendered",()=>{Dt.value=!1}),!document.querySelector(".ag-body-viewport"))||Pe==null||Pe.setColumnsVisible(["ag-Grid-SelectionColumn"],!1),Ke},Fs=()=>{var Pe;h.value=(((Pe=document.getElementById("item-table-layout-id"))==null?void 0:Pe.clientHeight)??0)-78+"px"};Xt(()=>{ht(()=>{Fs()}),window.addEventListener("resize",Fs);function Pe(){requestAnimationFrame(Pe)}Pe()}),Vn(()=>{window.removeEventListener("resize",Fs)});const Ki=async({code:Pe,name:Ke})=>{await wt(Pe),setTimeout(()=>{var Mt;(Mt=I.value)==null||Mt.setValue(Ke)},300)},dh=Pe=>{if(!w.value)return;const Ke=w.value.getRowNode(Pe);Ke?(w.value.ensureIndexVisible(Number(Ke.rowIndex),"middle"),w.value.flashCells({rowNodes:[Ke],flashDuration:3e3,fadeDuration:1e3})):w.value.ensureIndexVisible(y.value.total-1,"bottom")},Nn=Pe=>Pe.metric_type.code==="number"?"number":"default",bo=async()=>{if(p.entityId)try{const Pe=await xe(p.entityId);F.value=Pe.data.map(Ke=>({...Ke,sortType:Nn(Ke)}))}catch(Pe){console.error("Failed to initialize metric list:",Pe),F.value=[]}},fT=async()=>{if(M.value)try{const Pe=await M.value.getUserPermission(p.workspaceId);s(Pe)}catch(Pe){console.error("Failed to fetch user permissions:",Pe)}},hh=async()=>{if(M.value)try{const Pe=await M.value.getEntityDetail(p.workspaceId,p.entityId);r(Pe.permission),c.value=Pe}catch(Pe){console.error("Failed to fetch entity details:",Pe)}},cc=Ey(),{setUser:fh}=cc,pT=async()=>{if(M.value)try{const Pe=await M.value.getMe();return fh(Pe),Pe}catch(Pe){console.error("Failed to fetch user details:",Pe)}},qi=async()=>{var Pe;if(M.value)try{const Ke=await M.value.getWorkspaces(p.workspaceId),Mt=(Pe=Ke.data[0])==null?void 0:Pe.ws_user_role_id;return Mt&&cc.setUserRoleId(Mt),Ke}catch(Ke){console.error("Failed to fetch workspace details:",Ke)}};Qe(()=>[p.entityId,p.workspaceId],async([Pe,Ke])=>{!Pe||!Ke||(pT(),qi(),bo(),fT(),hh())},{immediate:!0,deep:!0}),Qe(j,(Pe,Ke)=>{const Mt=Pe.filter(Lt=>!(Ke!=null&&Ke.includes(Lt)));Mt.length>0&&K(Array.from(P.value),Mt).then(Lt=>{se(Lt,P.value,Mt)})},{immediate:!0,deep:!0}),Qe(L,(Pe,Ke)=>{x.value=!!(Ke&&Pe&&Ke!==Pe)}),t({refreshTable:tr});const Ul=Pe=>{pe.value=Pe,tr()},Yi=Pe=>{W.value=Pe,tr()},ph=Pe=>{N.value=Pe||[],ie({},!0)},gT=X(()=>{var Lt;const Pe=un.getInstance().getItem("ws.terminology"),Ke=Pe?JSON.parse(Pe):null;return`New ${((Lt=Ke==null?void 0:Ke.find(So=>So.code==="scene"))==null?void 0:Lt.name)||"Scene"}`}),is=Fo({showPopupBulkUpdate:!1,showPopupToolboxUploader:!1,showPopupSceneCreator:!1,showPopupItemDetails:!1,showPopupOverwriteScenes:!1}),cg=Pe=>{var So,Xn;const Ke=Pe.data,{action:Mt,type:Lt}=Ke;console.log("App loader close event received:",Ke),Mt=="APP_LOADER:HIDE"&&(Lt==="xlsx_toolbox"||Lt==="feedback_lockup_toolbox")&&((So=Rt.value)==null||So.close(),(Xn=nt.value)==null||Xn.close())};return Xt(()=>{window.addEventListener("message",cg)}),Vn(()=>{window.removeEventListener("message",cg)}),(Pe,Ke)=>(q(),je(V(Vse),{"is-sidebar-open":E.value,onCloseSidebar:V(Te),onSidebarClear:V(Te),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:V(Te)},{"header-left":we(()=>{var Mt;return[((Mt=V(i))==null?void 0:Mt.has_create_item_permission)==1?(q(),je(V(u0),{key:0,variant:["primary"],options:f.value,onSelect:Wi,onHandleClick:Ke[1]||(Ke[1]=Lt=>Wi("new_scene")),id:"create_scene_dropdown",tabIndex:2},{prefix:we(()=>[ze(ye(V(St),{"data-focus-index":"1",id:"create_new_scene",variant:["primary"],onClick:Ke[0]||(Ke[0]=Lt=>Wi("new_scene")),label:gT.value},null,8,["label"]),[[V(l),1]])]),_:1},8,["options"])):Ye("",!0)]}),"header-actions":we(()=>[ye(V(Pie),{"onUpdate:assignees":Yi,onApplyFilter:Ul,loading:V(Dt),entityId:p.entityId},null,8,["loading","entityId"]),ze(ye(V(RE),{focusIndex:"4",modelValue:_.value,"onUpdate:modelValue":Ke[2]||(Ke[2]=Mt=>_.value=Mt),onSearch:V(wt),class:le(Pe.$style.itemSearchBox),onClear:Ke[3]||(Ke[3]=Mt=>V(wt)("")),id:"item_search_box",ref_key:"searchBoxRef",ref:I},null,8,["modelValue","onSearch","class"]),[[V(n),{isLoading:V(Dt),fullwidth:!0}]]),ze((q(),je(V(eM),{status:V(He)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":x.value},{default:we(()=>[ze((q(),je(V(St),{variant:["secondary","icon"],disabled:V(He),onClick:tr},{default:we(()=>[ye(V(gt),{src:"ArrowsRotate"})]),_:1},8,["disabled"])),[[V(l),5],[V(a),"Refresh"]])]),_:1},8,["status","show-badge"])),[[V(n),{isLoading:V(Dt),fullwidth:!0}]]),ze(ye(V(Gre),{"model-value":V(N),onChange:Ke[4]||(Ke[4]=Mt=>ph(Mt)),id:"table_customization",gridApi:w.value,ref_key:"tableCustomizationRef",ref:oe,"checkbox-column":V(B),tableHeight:h.value},null,8,["model-value","gridApi","checkbox-column","tableHeight"]),[[V(n),{isLoading:V(Dt),fullwidth:!0}]])]),grid:we(({availableHeight:Mt})=>[ye(V(hTe),jt({id:"item_table_main",ref_key:"agGrid",ref:Ee},Le.value,{height:Mt+"px",isSorting:V(Ne),onOnGridReady:ji,onSelectionChanged:zi}),null,16,["height","isSorting"])]),footer:we(()=>[Se("div",{class:le(Pe.$style.tableFooter),id:"table_footer"},[Se("span",null,[Ke[7]||(Ke[7]=tt(" Showing ",-1)),Se("b",null,at(V(y).loaded)+" of "+at(V(y).total),1)])],2)]),"new-row":we(()=>[ye(V(uie),{ref_key:"createNewSceneRef",ref:Ui,onSearchForCode:Ki,onFocusOnId:dh},null,512)]),"bulk-update-actions":we(()=>[!E.value&&S.value.length>0?ze((q(),je(V(Ase),{key:0,selectRowData:tn.value,"workspace-id":p.workspaceId,"entity-id":p.entityId,"grid-api":w.value,onUnselect:V(ve),onSelectAll:V(Be),"take-name":re.value,"selected-all":Y.value,"total-rows":V(y).total,"visible-rows":V(y).loaded,onUpdated:V(en),loading:V(He),onRefreshSelectedRow:V(en)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","onSelectAll","take-name","selected-all","total-rows","visible-rows","onUpdated","loading","onRefreshSelectedRow"])),[[dr,!E.value&&S.value.length>0]]):Ye("",!0)]),snackbar:we(()=>[ye(V(Zse))]),popup:we(()=>[is.showPopupToolboxUploader?(q(),je(WTe,{key:0,ref_key:"popupToolboxUploaderRef",ref:Rt,"workspace-id":p.workspaceId,"entity-id":p.entityId,onImportSuccess:tr,onHide:Ke[5]||(Ke[5]=Mt=>is.showPopupToolboxUploader=!1)},null,8,["workspace-id","entity-id"])):Ye("",!0),is.showPopupBulkUpdate?(q(),je(eDe,{key:1,ref_key:"popupBulkUpdateRef",ref:nt,"workspace-id":p.workspaceId,"entity-id":p.entityId,onImportSuccess:tr,onHide:Ke[6]||(Ke[6]=Mt=>is.showPopupBulkUpdate=!1)},null,8,["workspace-id","entity-id"])):Ye("",!0)]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1sow5_1",tableFooter:"_tableFooter_1sow5_7",footerStart:"_footerStart_1sow5_17",newRow:"_newRow_1sow5_25","warning-text":"_warning-text_1sow5_43","has-error":"_has-error_1sow5_48",itemSearchBox:"_itemSearchBox_1sow5_52","beta-tag":"_beta-tag_1sow5_56"}}]]),$G="0.1.241",nDe={key:0},oDe=_t(ot({__name:"app",setup(e){const t=X(()=>n.id.length===0||n.workspaceId.length===0),n=Fo({id:"",workspaceId:"",apiConfig:{}}),o=Rs(),{showMessage:s,showErrorNetMessage:r}=o,i=["basicInfor","importItems"],a=h=>{h.success?s(h.apiCode,"success"):i.includes(h.apiCode)||r(h)},l=$(null),u=()=>{const h=un.getInstance().getItem("API_BASE_URL");return h!=null&&h.includes("v1")?h.slice(0,h.lastIndexOf("/v1")):String(h)};Bh(()=>{var h,f,p;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",$G);try{if(l.value=oo(),!l.value)throw new Error("Current instance is null");n.id=((h=l.value)==null?void 0:h.appContext.config.globalProperties.id)||"",n.workspaceId=((f=l.value)==null?void 0:f.appContext.config.globalProperties.workspaceId)||un.getInstance().getItem("ws.code");const g={domainApi:u(),wsCode:un.getInstance().getItem("ws.code"),entityId:n.id};if(n.apiConfig=(p=l.value)==null?void 0:p.appContext.config.globalProperties.apiConfig,!g.entityId||!g.wsCode||!g.domainApi)throw new Error("API configuration is missing in dashboardConfig");const v=new ON(n.apiConfig,g);v.on("call-api",a),l.value.appContext.config.globalProperties.apiServices=v}catch(g){console.error("Error getting current instance:",g)}}),Vn(()=>{l.value.appContext.config.globalProperties.apiServices.off("call-api",a)});const c=X(()=>n.id),d=X(()=>n.workspaceId);return ci("workspaceId",d),ci("entityId",c),(h,f)=>(q(),de("div",{class:le(h.$style.dashboardPluginWrapper)},[t.value?(q(),de("span",nDe," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):c.value?(q(),je(V(tDe),{key:1,entityId:c.value,workspaceId:d.value},null,8,["entityId","workspaceId"])):Ye("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),hT=async(e={},t={})=>{const n=gI(oDe),o=n5();n.use(o);const s=["apiConfig","workspaceId","id"],r={};Object.entries(e).forEach(([a,l])=>{l!==void 0&&(n.config.globalProperties[a]=l,r[a]=l,s.includes(a)&&typeof l=="string"?sessionStorage.setItem(a,l):console.error(`[Config Error] Key "${a}" has an invalid value and will not be persisted.`))}),n.config.globalProperties.$arboConfig=r,Object.values(t).forEach(a=>{a&&typeof a.install=="function"&&n.use(a)}),n.config.errorHandler=(a,l,u)=>{console.error("[Vue Error]",a),u&&console.error("[Info]",u)},console.log(`%cArbo Dashboard Plugin v${$G}`,"color: #4CAF50; font-weight: bold;"),console.log(n.config.globalProperties),globalThis.window.$switchInstance=n.config.globalProperties.switchInstance,n.provide("switchInstance",n.config.globalProperties.switchInstance),n.directive("tooltip",Kt),n.directive("focusable",Io);const i=await bue();return n.use(i),n};globalThis.window!==void 0&&(globalThis.window.arboDashboard=hT),Ln.default=hT,Ln.initDashboard=hT,Object.defineProperties(Ln,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
255
|
+
Excel file.`,onOnClick:ge},{visual:we(()=>[ye(V(va),{src:"UploadFile",size:65,"max-width":"65"})]),_:1},8,["description"])])):Ye("",!0),b.value===6?(q(),je(V(jue),{key:2,ref_key:"bulkCreateCountRef",ref:te,"get-status-func":xe,"workspace-id":f.workspaceId,"take-name":p.value,onChanged:u,"entity-id":f.entityId},null,8,["workspace-id","take-name","entity-id"])):b.value===2?(q(),de("div",VTe,[ye(V(wL),{modelValue:y.value,"onUpdate:modelValue":G[0]||(G[0]=J=>y.value=J),"get-status-func":xe,"workspace-id":f.workspaceId,id:f.entityId,style:{width:"100%"},"max-width":"372px",ref_key:"selectStatusRef",ref:L},null,8,["modelValue","workspace-id","id"])])):b.value===3||b.value===7?(q(),de("div",BTe,[ye(V(va),{src:"Success",width:240,height:180,ratio:"unset"})])):b.value===4||b.value===8?(q(),de("div",$Te,[ye(V(va),{src:"Failed",width:240,height:180,ratio:"unset"})])):Ye("",!0)],2)]),_:2},[b.value===2||b.value===4||b.value===3||b.value===6||b.value===7||b.value===8?{name:"footer",fn:we(()=>[b.value==6?ze((q(),de("div",HTe,[ye(V(St),{variant:"primary",loading:c.value,disabled:ue.value||c.value,onClick:d},{default:we(()=>[...G[2]||(G[2]=[tt(" Create ",-1)])]),_:1},8,["loading","disabled"])])),[[V(o),{content:ue.value?"Add a name or a counter first.":void 0,bypassOverflowCheck:!0}]]):Ye("",!0),b.value===4||b.value===8?(q(),je(V(St),{key:1,variant:"secondary",onClick:k},{default:we(()=>[...G[3]||(G[3]=[tt(" Close ",-1)])]),_:1})):b.value===3?(q(),je(V(St),{key:2,variant:"secondary",onClick:k},{default:we(()=>[...G[4]||(G[4]=[tt(" Got it ",-1)])]),_:1})):Ye("",!0),b.value===2?ze((q(),de("div",GTe,[ye(V(St),{loading:K.value,disabled:K.value||!y.value,onClick:re},{default:we(()=>[...G[5]||(G[5]=[tt(" Import ",-1)])]),_:1},8,["loading","disabled"])])),[[V(o),{content:K.value||!y.value?"Select a status first":void 0,bypassOverflowCheck:!0}]]):Ye("",!0),b.value===4?(q(),je(V(St),{key:4,onClick:Y},{default:we(()=>[...G[6]||(G[6]=[tt(" Try Again ",-1)])]),_:1})):Ye("",!0),b.value===8?(q(),je(V(St),{key:5,onClick:P},{default:we(()=>[...G[7]||(G[7]=[tt("Try Again",-1)])]),_:1})):Ye("",!0),b.value===7?(q(),je(V(St),{key:6,onClick:k,variant:"secondary"},{default:we(()=>[...G[8]||(G[8]=[tt(" Got it ",-1)])]),_:1})):Ye("",!0)]),key:"0"}:void 0]),1040))}}),[["__scopeId","data-v-c89ed86e"]]),zTe={class:"header-name"},jTe={class:"modal-body"},KTe={class:"description"},qTe={key:0,class:"error-message"},YTe={class:"dynamic"},XTe={key:1,class:"choose-method-container"},ZTe={key:2,class:"result-container"},JTe={key:3,class:"result-container"},QTe={key:2},BG="text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel",eDe=_t(ot({__name:"PopupBulkUpdate",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const o=Kt,s=X(()=>[1,2].includes(f.value)),r=X(()=>Sv()),i=X(()=>({1:{title:`Update ${r.value} in bulk`,description:""},2:{title:`Update ${r.value} in bulk`,description:""},3:{title:"Import successful",description:"Work will be created in background. Refresh to see updates."},4:{title:"Import failed",description:"Some data doesn't meet the requirements. Review it and try again."},5:{title:"Waiting for Toolbox",description:"Waiting for Toolbox"}})),a={"--popup-pt":"20px","--popup-pb":"20px","--popup-pl":"24px","--popup-pr":"24px"},l=e,u=n,{apiServices:c}=so(!1,l),d=1,h=$(),f=$(d),p=$(null),g=$(null),v=$(null),w=$(void 0),S=$(null),b=X(()=>i.value[f.value]),y=$(),E=()=>{var ie;p.value=null,f.value=d,g.value=null,v.value=null,_.value=null,S.value=null,(ie=y.value)==null||ie.clear(),w.value=void 0};Qe([g,v],([ie,te])=>{f.value===1&&ie&&te&&(f.value=2)});const _=$(null),I=ie=>Rs().getErrorMessageFromResponse(ie),T=ie=>{if(typeof ie=="string"){_.value=ie;return}const te=ie.response,se=te==null?void 0:te.data,Z=I(se);_.value=Z??ie.message,console.log("Error message set to:",{errorMsg:Z,message:ie})},F=async(ie,te)=>{var A;B.value=!0;const se=new FormData,Z=((A=ie.name.split(".").pop())==null?void 0:A.toString())||"";if(se.append("file",ie),se.append("format",Z),se.append("entity_id",l.entityId||""),!c.value){console.error("API services not available");return}try{await c.value.overwriteScenesViaImportFile(l.workspaceId,l.entityId,se),f.value=3,u("import-success")}catch(j){console.error("Error uploading file:",j),T(j),f.value=4}finally{B.value=!1,window.appManager.hide("feedback_lockup_toolbox")}},{openToolbox:L,sendBackErrorFile:x}=LG(({file:ie,fileName:te,channel:se})=>{se==="feedback-merge"&&(v.value=ie,w.value=te??ie.name,F(ie))},"feedback-merge"),P=$(!1),k=async()=>{P.value=!0;const ie=l.workspaceId,te=l.entityId;if(!ie||!te||!c.value)return console.error("Workspace ID or Entity ID is missing"),Promise.reject(new Error("Workspace ID or Entity ID is missing"));try{const se=await c.value.downloadExportedItemsFile(ie,te,!1);if(!se)throw new Error("No response from downloadTemplate API");return se}catch(se){return console.error("Error downloading template:",se),Promise.reject(se)}finally{P.value=!1}},M=ie=>{const te=BG.includes(ie.type);return te||(console.error("Invalid file type:",ie.type),Rs().addNotification({id:"invalid-file-type",message:"Invalid file type. Please upload a xlsx, xls, csv file.",type:"error"})),te},N=async()=>{const ie=document.createElement("input");ie.type="file",ie.accept=BG,ie.onchange=async()=>{var se;const te=(se=ie.files)==null?void 0:se[0];if(te){if(!M(te)){E();return}g.value=nv(te);try{const Z=await k();if(!Z){Rs().addNotification({id:"failed-download-template",message:"Failed to download file.",type:"error"});return}L({exportFile:Z,feedbackFile:te})}catch(Z){console.error("Error opening toolbox:",Z),Rs().addNotification({id:"failed-open-toolbox",message:"Failed to open toolbox.",type:"error"})}}},ie.click()},B=$(!1),z=()=>{p.value=null,v.value&&w.value&&x(v.value,w.value)},oe=()=>{p.value&&v.value&&(B.value=!0,F(v.value,w.value).finally(()=>{B.value=!1}))};return t({open:()=>{var ie;return(ie=h.value)==null?void 0:ie.show()},close:()=>{var ie;return(ie=h.value)==null?void 0:ie.hide()}}),(ie,te)=>(q(),je(V(qN),jt({ref_key:"popupRef",ref:h,style:a,onHidden:E},{popupIndex:10,popupName:b.value.title,minWidth:"420px",showOverlay:!0,overlayOpacity:.5,closeOnOverlayClick:!1,closeOnEscape:!0,showCloseBtn:s.value}),Hh({header:we(()=>[Se("span",zTe,at(b.value.title),1)]),default:we(()=>[Se("div",jTe,[Se("div",KTe,at(b.value.description),1),_.value&&f.value===4?(q(),de("div",qTe,[te[2]||(te[2]=tt(" Error code ",-1)),Se("span",YTe,at(_.value),1)])):Ye("",!0),f.value===1?(q(),de("div",XTe,[ye(Hw,{disabled:!1,label:"Import from file",description:`Update ${r.value} from a CSV or Excel file.`,onOnClick:N,style:{width:"100%"}},{visual:we(()=>[ye(V(va),{src:"UploadFile",size:65})]),_:1},8,["description"])])):f.value===3?(q(),de("div",ZTe,[ye(V(va),{src:"Success",width:240,height:180,ratio:"unset"})])):f.value===4?(q(),de("div",JTe,[ye(V(va),{src:"Failed",width:240,height:180,ratio:"unset"})])):Ye("",!0)])]),_:2},[f.value===4||f.value===3?{name:"footer",fn:we(()=>[f.value===4?(q(),je(V(St),{key:0,variant:"secondary",onClick:te[0]||(te[0]=()=>{var se;E(),(se=h.value)==null||se.hide()})},{default:we(()=>[...te[3]||(te[3]=[tt(" Close ",-1)])]),_:1})):f.value===3?(q(),je(V(St),{key:1,variant:"secondary",onClick:te[1]||(te[1]=()=>{var se;E(),(se=h.value)==null||se.hide()})},{default:we(()=>[...te[4]||(te[4]=[tt(" Got it ",-1)])]),_:1})):Ye("",!0),f.value===2?ze((q(),de("div",QTe,[ye(V(St),{loading:B.value,disabled:B.value||!p.value,onClick:oe},{default:we(()=>[...te[5]||(te[5]=[tt(" Import ",-1)])]),_:1},8,["loading","disabled"])])),[[V(o),{content:B.value||!p.value?"Select a status first":void 0,bypassOverflowCheck:!0}]]):Ye("",!0),f.value===4?(q(),je(V(St),{key:3,onClick:z},{default:we(()=>[...te[6]||(te[6]=[tt(" Try Again ",-1)])]),_:1})):Ye("",!0)]),key:"0"}:void 0]),1040))}}),[["__scopeId","data-v-9a73e40c"]]),tDe=_t(ot({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const n=$s,o=cE(),{setUserPermissions:s,setEntityPermissions:r}=o,{entityPermissions:i}=go(o),a=Kt,l=Io,u=Lv(),{entityData:c}=go(u),d={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},h=$(""),f=X(()=>{var Ke;const Pe=((Ke=i.value)==null?void 0:Ke.has_create_item_permission)==1||!1;return[{label:"Create in bulk",value:"import_scenes",type:"text",id:"import_scenes_option",hide:!Pe},{label:"Update in bulk",value:"bulk_update",type:"text",hide:!Pe,id:"bulk_update_option"}]}),p=e;Tp.initialize({wrapVueCellRenderer:My,wrapVueCellEditor:uB});const g=fd(),{switchInstanceFunc:v}=go(g);Xt(()=>{const Pe=oo();v.value=Pe==null?void 0:Pe.appContext.config.globalProperties.switchInstance;const Ke=new BroadcastChannel("focusable_channel");ht(()=>{setTimeout(()=>{Ke.postMessage("Focusable elements updated")},7e3)})});const w=$(null),S=$([]),b=Gf(),{rowCount:y}=go(b),E=$(!1),_=$(""),I=$(),T=iM(),{metricList:F}=go(T),L=$(""),x=$(!1),P=$(new Set),k=$(new Map),{apiServices:M}=so(!1,p),{columnDefs:N,checkboxColumn:B,saveColumnConfig:z}=yTe(F,p.entityId,w),oe=$();Qe(()=>N,()=>{var Pe;(Pe=oe.value)==null||Pe.updateColumnDefs(N.value)},{deep:!0});const ie=(Pe,Ke)=>{z(Pe,Ke)},{updateRowData:te,setMetricValues:se}=bTe(w),Z=X(()=>({isSearching:_.value.length>0,isFiltering:!(Object.keys(pe.value||{}).length==1&&Object.keys(pe.value)[0]=="preflight_status")&&Object.keys(pe.value||{}).length>0})),A=X(Cv),j=X(()=>N.value.filter(Pe=>{var Ke;return((Ke=Pe.field)==null?void 0:Ke.startsWith("metric_"))&&!Pe.hide}).map(Pe=>{var Ke;return((Ke=Pe.field)==null?void 0:Ke.replace("metric_",""))||""}));ci("timezone",A);const ne=X(()=>({autoFetch:!1,workspaceId:p.workspaceId,entityId:p.entityId,metricIds:j.value,updateItemData:te,setMetricValues:se})),{fetchItems:ge,getMetricList:xe,cusorMap:ue,getMetricValues:K}=CTe(ne),Y=X(()=>{if(!w.value)return!1;const Pe=w.value.getSelectedRows().length;return Pe>0&&Pe>=y.value.total}),re=X(()=>{var Pe;return((Pe=c.value)==null?void 0:Pe.name)||"Items"}),R=Pe=>{setTimeout(()=>{ht(()=>{var Ke,Mt;w.value&&(Pe?(Ke=w.value)==null||Ke.showNoRowsOverlay():(Mt=w.value)==null||Mt.hideOverlay())})},500)},G=(Pe,Ke)=>{var Mt;y.value.total=Pe.meta.total??0,(Mt=Pe.meta.next)!=null&&Mt.cursor&&(ue[Ke+1]=Pe.meta.next.cursor),L.value=Pe.meta["X-Tsr-signature"]||"",Pe.meta.total===0?R(!0):R(!1)},J=vE(),{setDefaultSort:ce}=J,Ee=$(null),{sortingAPIConfiguration:Ce,isSortingRunning:Ne}=go(J),pe=$({preflight_status:"1"}),H=X(()=>({...pe.value,search:_.value}));ci("filterParams",H);const W=$([]),be=X(()=>{var Pe;return((Pe=c.value)==null?void 0:Pe.name)||"Items"}),Ae=async({page:Pe,pageSize:Ke,filterText:Mt})=>{var uo,Zo,Os;(uo=w.value)==null||uo.hideOverlay();const Lt=ue[Pe],So=!Lt&&Pe>1?(Pe-1)*Ke:void 0,Xn=Ce.value;Xn.length>0&&(Ne.value=!0);try{const dc={cursor:Lt,size:Ke,searchQuery:Mt,offset:So,sort_by:Xn,...pe.value},Wl=await ge(dc);if(!Wl)return{rows:[],total:0};const Xi=(Os=(Zo=Wl.meta)==null?void 0:Zo.extra)==null?void 0:Os.default_sort;Xi&&ce(Xi);const gh=(Gw=>{const sn=Gw.data.map(hc=>EO(hc,A.value,be.value));return sn.forEach(hc=>{P.value.add(String(hc.id)),k.value.set(String(hc.id),{})}),sn})(Wl);return G(Wl,Pe),{rows:gh,total:y.value.total}}catch(dc){return console.error("Failed to fetch items:",dc),{rows:[],total:0}}finally{Ne.value=!1}},{isLoading:He,toggleSidebar:Te,onGridReady:Xe,handleUnSelect:ve,handleSelectAll:Be,onSearch:wt,firstLoad:Dt}=ETe({selectRowData:$([]),isSidebarOpen:E,quickFilterText:_,gridApi:w,perPage:d.ROWS_PER_PAGE,fetcher:Ae}),tn=$([]),en=Cr(()=>{var Xn;const Pe=((Xn=w.value)==null?void 0:Xn.getSelectedRows())||[],Ke=new Map(Pe.map(uo=>[uo.id,uo])),So=Pe.map(uo=>uo.id).map(uo=>{var Zo,Os;return[uo,(Os=(Zo=w.value)==null?void 0:Zo.getRowNode(uo))==null?void 0:Os.rowIndex]}).sort((uo,Zo)=>(uo[1]??0)-(Zo[1]??0)).map(([uo])=>Ke.get(uo));tn.value=So.filter(uo=>uo!==void 0)}),bn=Fo({columnsDisplay:[],rowsDisplay:{fromIndex:0,toIndex:0}}),Le=X(()=>({blockLoadDebounceMillis:1e3,columnDefs:N.value,rowModelType:"infinite",cacheBlockSize:d.ROWS_PER_PAGE,infiniteInitialRowCount:20,popupParent:document.getElementById("item-table-layout-id")||void 0,rowSelection:{mode:"multiRow",checkboxes:!1,enableClickSelection:!1,enableSelectionWithoutKeys:!1},pagination:!1,rowHeight:d.ROW_HEIGHT,suppressHorizontalScroll:!1,suppressColumnVirtualisation:!1,debounceVerticalScrollbar:!1,animateRows:!1,suppressAnimationFrame:!1,suppressScrollOnNewData:!0,suppressScrollWhenPopupsAreOpen:!1,rowBuffer:20,enableCellTextSelection:!1,suppressDragLeaveHidesColumns:!0,suppressMaxRenderedRowRestriction:!1,height:d.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:Ge,noRowsOverlayComponent:My(zre),noRowsOverlayComponentParams:()=>Z.value,defaultColDef:{editable:!1,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:Pe=>Pe.data.id,rowClassRules:{"row-deleted":Pe=>{var Ke;return(Ke=Pe.data)==null?void 0:Ke.isDeleted},"row-locked":Pe=>{var Ke;return(Ke=Pe.data)==null?void 0:Ke.isLocked},"row-archived":Pe=>{var Ke;return(Ke=Pe.data)==null?void 0:Ke.isArchived},"row-process-locked":Pe=>{var Ke,Mt;return((Mt=(Ke=Pe.data)==null?void 0:Ke.isProcessing)==null?void 0:Mt.state)==0},"row-inactive":Pe=>{var Ke;return!((Ke=Pe.data)!=null&&Ke.id)},"row-empty":Pe=>!Pe.data},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:p.workspaceId,entityId:p.entityId,apiServices:M.value,sorting:Ne.value},onCellKeyDown:Pe=>{var Ke,Mt,Lt;if(Pe.data.isDeleted)return!1;if(((Ke=Pe==null?void 0:Pe.event)==null?void 0:Ke.key)==="Enter"){const{api:So,node:Xn,column:uo}=Pe,Zo=So.getCellRendererInstances({rowNodes:[Xn],columns:[uo]});if(Zo.length>0){const Os=Zo[0];Os&&typeof((Mt=Os.componsenExposed)==null?void 0:Mt.focus)=="function"&&((Lt=Os.componsenExposed)==null||Lt.focus())}}},isRowSelectable:Pe=>{var Ke,Mt;return!Pe.group&&((Mt=(Ke=Pe.data)==null?void 0:Ke.isProcessing)==null?void 0:Mt.state)!=0},suppressKeyboardEvent:Pe=>{var Lt;if((Lt=Pe.data)!=null&&Lt.isDeleted)return!0;const Ke=Pe.event.key,Mt=Pe.editing;return Mt&&Ke==="Tab"?!0:Mt&&Ke==="Enter"?!1:Ke==="Enter"?(Pe.event.preventDefault(),Pe.event.stopPropagation(),!0):Ke==="ArrowUp"||Ke==="ArrowDown"||Ke==="ArrowLeft"||Ke==="ArrowRight"||Ke==="Tab"||Ke==="Enter"},navigateToNextCell:()=>null,onBodyScroll:Pe=>{const Ke=Pe.api.getFirstDisplayedRowIndex(),Mt=Pe.api.getLastDisplayedRowIndex();bn.rowsDisplay.fromIndex=Ke,bn.rowsDisplay.toIndex=Mt,bn.columnsDisplay=Pe.api.getAllDisplayedVirtualColumns().map(Lt=>Lt.getColId())},onViewportChanged:Pe=>{bn.columnsDisplay=Pe.api.getAllDisplayedVirtualColumns().map(Ke=>Ke.getColId())},suppressHeaderFocus:!0,onCellEditingStarted(Pe){if(Pe.data.isDeleted&&Pe.api.stopEditing(),Pe.colDef.field=="options"){const Ke=Pe.api.getCellRendererInstances({rowNodes:[Pe.node],columns:[Pe.column]});Ke.length>0&&Ke[0].focusUi()}},tabToNextCell:Pe=>{let Ke=Pe.nextCellPosition;if(Ke&&Ke.column.getColId()==="ag-Grid-SelectionColumn"){const Mt=Pe.api.getAllDisplayedColumns(),Lt=Mt.indexOf(Ke.column),So=Pe.backwards?-1:1,Xn=Mt[Lt+So];if(Xn)return{rowIndex:Ke.rowIndex,column:Xn,rowPinned:Ke.rowPinned}}return Ke}}));function Ge(){if(!w.value)return;let Pe=0;w.value.forEachNode(Ke=>{Ke.data&&Pe++}),y.value.loaded=Math.min(Pe,y.value.total)}Qe(()=>Ce,()=>{w.value&&(L.value="",P.value.clear(),w.value.deselectAll(),Object.keys(ue).forEach(Pe=>delete ue[Number(Pe)]),w.value.purgeInfiniteCache(),w.value.ensureIndexVisible(0))},{deep:!0});const Rt=$(),Jt=$(),qt=()=>{is.showPopupOverwriteScenes=!0,ht(()=>{var Pe;(Pe=Jt.value)==null||Pe.open()})},nt=$(),Go=()=>{is.showPopupBulkUpdate=!0,ht(()=>{var Pe;(Pe=nt.value)==null||Pe.open()})},si=()=>{is.showPopupToolboxUploader=!0,ht(()=>{var Pe;(Pe=Rt.value)==null||Pe.open()})},tr=async()=>{Dt.value=!0,w.value&&(L.value="",P.value.clear(),Object.keys(ue).forEach(Pe=>delete ue[Number(Pe)]),await w.value.deselectAll(),await w.value.ensureIndexVisible(0,"top"),await w.value.purgeInfiniteCache(),await w.value.refreshInfiniteCache())},Mr=X(()=>un.getInstance().getItem("ITEM_TABLE_APP_VERSION")||""),Ui=$();X(()=>{var Pe;return(Pe=RTe(Mr.value))==null?void 0:Pe.map(Ke=>`<div>• ${Ke}</div>`).join(`
|
|
256
|
+
`)});function Wi(Pe){var Ke;Pe==="new_scene"?(Ke=Ui.value)==null||Ke.show():Pe==="import_scenes"?si():Pe==="overwrite_scenes"?qt():Pe==="bulk_update"&&Go()}const zi=Pe=>{S.value=Pe.api.getSelectedRows().map(Ke=>Ke.id)},ji=Pe=>{const Ke=Xe(Pe);return Ke&&(Ke.addEventListener("modelUpdated",Ge),Ke.addEventListener("bodyScroll",()=>Ke.stopEditing()),Ke.addEventListener("selectionChanged",en),Ke.addEventListener("columnMoved",Lt=>ie(Lt,!0)),Ke.addEventListener("columnResized",Lt=>ie(Lt,!0)),Ke.addEventListener("firstDataRendered",()=>{Dt.value=!1}),!document.querySelector(".ag-body-viewport"))||Pe==null||Pe.setColumnsVisible(["ag-Grid-SelectionColumn"],!1),Ke},Fs=()=>{var Pe;h.value=(((Pe=document.getElementById("item-table-layout-id"))==null?void 0:Pe.clientHeight)??0)-78+"px"};Xt(()=>{ht(()=>{Fs()}),window.addEventListener("resize",Fs);function Pe(){requestAnimationFrame(Pe)}Pe()}),Vn(()=>{window.removeEventListener("resize",Fs)});const Ki=async({code:Pe,name:Ke})=>{await wt(Pe),setTimeout(()=>{var Mt;(Mt=I.value)==null||Mt.setValue(Ke)},300)},dh=Pe=>{if(!w.value)return;const Ke=w.value.getRowNode(Pe);Ke?(w.value.ensureIndexVisible(Number(Ke.rowIndex),"middle"),w.value.flashCells({rowNodes:[Ke],flashDuration:3e3,fadeDuration:1e3})):w.value.ensureIndexVisible(y.value.total-1,"bottom")},Nn=Pe=>Pe.metric_type.code==="number"?"number":"default",bo=async()=>{if(p.entityId)try{const Pe=await xe(p.entityId);F.value=Pe.data.map(Ke=>({...Ke,sortType:Nn(Ke)}))}catch(Pe){console.error("Failed to initialize metric list:",Pe),F.value=[]}},fT=async()=>{if(M.value)try{const Pe=await M.value.getUserPermission(p.workspaceId);s(Pe)}catch(Pe){console.error("Failed to fetch user permissions:",Pe)}},hh=async()=>{if(M.value)try{const Pe=await M.value.getEntityDetail(p.workspaceId,p.entityId);r(Pe.permission),c.value=Pe}catch(Pe){console.error("Failed to fetch entity details:",Pe)}},cc=Ey(),{setUser:fh}=cc,pT=async()=>{if(M.value)try{const Pe=await M.value.getMe();return fh(Pe),Pe}catch(Pe){console.error("Failed to fetch user details:",Pe)}},qi=async()=>{var Pe;if(M.value)try{const Ke=await M.value.getWorkspaces(p.workspaceId),Mt=(Pe=Ke.data[0])==null?void 0:Pe.ws_user_role_id;return Mt&&cc.setUserRoleId(Mt),Ke}catch(Ke){console.error("Failed to fetch workspace details:",Ke)}};Qe(()=>[p.entityId,p.workspaceId],async([Pe,Ke])=>{!Pe||!Ke||(pT(),qi(),bo(),fT(),hh())},{immediate:!0,deep:!0}),Qe(j,(Pe,Ke)=>{const Mt=Pe.filter(Lt=>!(Ke!=null&&Ke.includes(Lt)));Mt.length>0&&K(Array.from(P.value),Mt).then(Lt=>{se(Lt,P.value,Mt)})},{immediate:!0,deep:!0}),Qe(L,(Pe,Ke)=>{x.value=!!(Ke&&Pe&&Ke!==Pe)}),t({refreshTable:tr});const Ul=Pe=>{pe.value=Pe,tr()},Yi=Pe=>{W.value=Pe,tr()},ph=Pe=>{N.value=Pe||[],ie({},!0)},gT=X(()=>{var Lt;const Pe=un.getInstance().getItem("ws.terminology"),Ke=Pe?JSON.parse(Pe):null;return`New ${((Lt=Ke==null?void 0:Ke.find(So=>So.code==="scene"))==null?void 0:Lt.name)||"Scene"}`}),is=Fo({showPopupBulkUpdate:!1,showPopupToolboxUploader:!1,showPopupSceneCreator:!1,showPopupItemDetails:!1,showPopupOverwriteScenes:!1}),cg=Pe=>{var So,Xn;const Ke=Pe.data,{action:Mt,type:Lt}=Ke;console.log("App loader close event received:",Ke),Mt=="APP_LOADER:HIDE"&&(Lt==="xlsx_toolbox"||Lt==="feedback_lockup_toolbox")&&((So=Rt.value)==null||So.close(),(Xn=nt.value)==null||Xn.close())};return Xt(()=>{window.addEventListener("message",cg)}),Vn(()=>{window.removeEventListener("message",cg)}),(Pe,Ke)=>(q(),je(V(Vse),{"is-sidebar-open":E.value,onCloseSidebar:V(Te),onSidebarClear:V(Te),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:V(Te)},{"header-left":we(()=>{var Mt;return[((Mt=V(i))==null?void 0:Mt.has_create_item_permission)==1?(q(),je(V(u0),{key:0,variant:["primary"],options:f.value,onSelect:Wi,onHandleClick:Ke[1]||(Ke[1]=Lt=>Wi("new_scene")),id:"create_scene_dropdown",tabIndex:2},{prefix:we(()=>[ze(ye(V(St),{"data-focus-index":"1",id:"create_new_scene",variant:["primary"],onClick:Ke[0]||(Ke[0]=Lt=>Wi("new_scene")),label:gT.value},null,8,["label"]),[[V(l),1]])]),_:1},8,["options"])):Ye("",!0)]}),"header-actions":we(()=>[ye(V(Pie),{"onUpdate:assignees":Yi,onApplyFilter:Ul,loading:V(Dt),entityId:p.entityId},null,8,["loading","entityId"]),ze(ye(V(RE),{focusIndex:"4",modelValue:_.value,"onUpdate:modelValue":Ke[2]||(Ke[2]=Mt=>_.value=Mt),onSearch:V(wt),class:le(Pe.$style.itemSearchBox),onClear:Ke[3]||(Ke[3]=Mt=>V(wt)("")),id:"item_search_box",ref_key:"searchBoxRef",ref:I},null,8,["modelValue","onSearch","class"]),[[V(n),{isLoading:V(Dt),fullwidth:!0}]]),ze((q(),je(V(eM),{status:V(He)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":x.value},{default:we(()=>[ze((q(),je(V(St),{variant:["secondary","icon"],disabled:V(He),onClick:tr},{default:we(()=>[ye(V(gt),{src:"ArrowsRotate"})]),_:1},8,["disabled"])),[[V(l),5],[V(a),"Refresh"]])]),_:1},8,["status","show-badge"])),[[V(n),{isLoading:V(Dt),fullwidth:!0}]]),ze(ye(V(Gre),{"model-value":V(N),onChange:Ke[4]||(Ke[4]=Mt=>ph(Mt)),id:"table_customization",gridApi:w.value,ref_key:"tableCustomizationRef",ref:oe,"checkbox-column":V(B),tableHeight:h.value},null,8,["model-value","gridApi","checkbox-column","tableHeight"]),[[V(n),{isLoading:V(Dt),fullwidth:!0}]])]),grid:we(({availableHeight:Mt})=>[ye(V(hTe),jt({id:"item_table_main",ref_key:"agGrid",ref:Ee},Le.value,{height:Mt+"px",isSorting:V(Ne),onOnGridReady:ji,onSelectionChanged:zi}),null,16,["height","isSorting"])]),footer:we(()=>[Se("div",{class:le(Pe.$style.tableFooter),id:"table_footer"},[Se("span",null,[Ke[7]||(Ke[7]=tt(" Showing ",-1)),Se("b",null,at(V(y).loaded)+" of "+at(V(y).total),1)])],2)]),"new-row":we(()=>[ye(V(uie),{ref_key:"createNewSceneRef",ref:Ui,onSearchForCode:Ki,onFocusOnId:dh},null,512)]),"bulk-update-actions":we(()=>[!E.value&&S.value.length>0?ze((q(),je(V(Ase),{key:0,selectRowData:tn.value,"workspace-id":p.workspaceId,"entity-id":p.entityId,"grid-api":w.value,onUnselect:V(ve),onSelectAll:V(Be),"take-name":re.value,"selected-all":Y.value,"total-rows":V(y).total,"visible-rows":V(y).loaded,onUpdated:V(en),loading:V(He),onRefreshSelectedRow:V(en)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","onSelectAll","take-name","selected-all","total-rows","visible-rows","onUpdated","loading","onRefreshSelectedRow"])),[[dr,!E.value&&S.value.length>0]]):Ye("",!0)]),snackbar:we(()=>[ye(V(Zse))]),popup:we(()=>[is.showPopupToolboxUploader?(q(),je(WTe,{key:0,ref_key:"popupToolboxUploaderRef",ref:Rt,"workspace-id":p.workspaceId,"entity-id":p.entityId,onImportSuccess:tr,onHide:Ke[5]||(Ke[5]=Mt=>is.showPopupToolboxUploader=!1)},null,8,["workspace-id","entity-id"])):Ye("",!0),is.showPopupBulkUpdate?(q(),je(eDe,{key:1,ref_key:"popupBulkUpdateRef",ref:nt,"workspace-id":p.workspaceId,"entity-id":p.entityId,onImportSuccess:tr,onHide:Ke[6]||(Ke[6]=Mt=>is.showPopupBulkUpdate=!1)},null,8,["workspace-id","entity-id"])):Ye("",!0)]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1sow5_1",tableFooter:"_tableFooter_1sow5_7",footerStart:"_footerStart_1sow5_17",newRow:"_newRow_1sow5_25","warning-text":"_warning-text_1sow5_43","has-error":"_has-error_1sow5_48",itemSearchBox:"_itemSearchBox_1sow5_52","beta-tag":"_beta-tag_1sow5_56"}}]]),$G="0.1.243",nDe={key:0},oDe=_t(ot({__name:"app",setup(e){const t=X(()=>n.id.length===0||n.workspaceId.length===0),n=Fo({id:"",workspaceId:"",apiConfig:{}}),o=Rs(),{showMessage:s,showErrorNetMessage:r}=o,i=["basicInfor","importItems"],a=h=>{h.success?s(h.apiCode,"success"):i.includes(h.apiCode)||r(h)},l=$(null),u=()=>{const h=un.getInstance().getItem("API_BASE_URL");return h!=null&&h.includes("v1")?h.slice(0,h.lastIndexOf("/v1")):String(h)};Bh(()=>{var h,f,p;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",$G);try{if(l.value=oo(),!l.value)throw new Error("Current instance is null");n.id=((h=l.value)==null?void 0:h.appContext.config.globalProperties.id)||"",n.workspaceId=((f=l.value)==null?void 0:f.appContext.config.globalProperties.workspaceId)||un.getInstance().getItem("ws.code");const g={domainApi:u(),wsCode:un.getInstance().getItem("ws.code"),entityId:n.id};if(n.apiConfig=(p=l.value)==null?void 0:p.appContext.config.globalProperties.apiConfig,!g.entityId||!g.wsCode||!g.domainApi)throw new Error("API configuration is missing in dashboardConfig");const v=new ON(n.apiConfig,g);v.on("call-api",a),l.value.appContext.config.globalProperties.apiServices=v}catch(g){console.error("Error getting current instance:",g)}}),Vn(()=>{l.value.appContext.config.globalProperties.apiServices.off("call-api",a)});const c=X(()=>n.id),d=X(()=>n.workspaceId);return ci("workspaceId",d),ci("entityId",c),(h,f)=>(q(),de("div",{class:le(h.$style.dashboardPluginWrapper)},[t.value?(q(),de("span",nDe," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):c.value?(q(),je(V(tDe),{key:1,entityId:c.value,workspaceId:d.value},null,8,["entityId","workspaceId"])):Ye("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),hT=async(e={},t={})=>{const n=gI(oDe),o=n5();n.use(o);const s=["apiConfig","workspaceId","id"],r={};Object.entries(e).forEach(([a,l])=>{l!==void 0&&(n.config.globalProperties[a]=l,r[a]=l,s.includes(a)&&typeof l=="string"?sessionStorage.setItem(a,l):console.error(`[Config Error] Key "${a}" has an invalid value and will not be persisted.`))}),n.config.globalProperties.$arboConfig=r,Object.values(t).forEach(a=>{a&&typeof a.install=="function"&&n.use(a)}),n.config.errorHandler=(a,l,u)=>{console.error("[Vue Error]",a),u&&console.error("[Info]",u)},console.log(`%cArbo Dashboard Plugin v${$G}`,"color: #4CAF50; font-weight: bold;"),console.log(n.config.globalProperties),globalThis.window.$switchInstance=n.config.globalProperties.switchInstance,n.provide("switchInstance",n.config.globalProperties.switchInstance),n.directive("tooltip",Kt),n.directive("focusable",Io);const i=await bue();return n.use(i),n};globalThis.window!==void 0&&(globalThis.window.arboDashboard=hT),Ln.default=hT,Ln.initDashboard=hT,Object.defineProperties(Ln,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|