@arbocollab/arbo-plugin-item-table 0.1.254 → 0.1.255

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.
@@ -156,7 +156,7 @@ Caused by: `,DE=Symbol("causeStack");function vte(e,t){const n=fe.hasOwnProp(e,D
156
156
  `);i=a===-1?"":r.slice(a+1)}if(!o.stack)o.stack=i;else if(i){const a=i.indexOf(`
157
157
  `),l=a===-1?-1:i.indexOf(`
158
158
  `,a+1),u=l===-1?i:i.slice(l+1),c=String(o.stack),d=vte(o,c),h=d===-1?c:c.slice(0,d),f=d===-1?"":c.slice(d);h.endsWith(u)||(o.stack=h+`
159
- `+i+f)}}catch{}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Fu(this.defaults,n);const{transitional:o,paramsSerializer:s,headers:r}=n;o!==void 0&&Kv.assertOptions(o,{silentJSONParsing:Mo.transitional(Mo.boolean),forcedJSONParsing:Mo.transitional(Mo.boolean),clarifyTimeoutError:Mo.transitional(Mo.boolean),legacyInterceptorReqResOrdering:Mo.transitional(Mo.boolean),advertiseZstdAcceptEncoding:Mo.transitional(Mo.boolean),validateStatusUndefinedResolves:Mo.transitional(Mo.boolean),encodeBasicAuthUsername:Mo.transitional(Mo.boolean)},!1),s!=null&&(fe.isFunction(s)?n.paramsSerializer={serialize:s}:Kv.assertOptions(s,{encode:Mo.function,serialize:Mo.function},!0)),n.allowAbsoluteUrls!==void 0||(fe.hasOwnProp(this.defaults,"allowAbsoluteUrls")&&this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Kv.assertOptions(n,{baseUrl:Mo.spelling("baseURL"),withXsrfToken:Mo.spelling("withXSRFToken")},!0),n.method=(fe.getSafeProp(n,"method")||fe.getSafeProp(this.defaults,"method")||"get").toLowerCase();const i=fe.getSafeProp(r,"common"),a=fe.getSafeProp(r,n.method),l=r&&fe.merge(UE(i)?i:void 0,UE(a)?a:void 0);r&&fe.forEach(xM.concat("common"),v=>{UE(fe.getSafeProp(r,v))&&delete r[v]}),n.headers=Ao.concat(l,r);const u=[];let c=!0;this.interceptors.request.forEach(function(y){if(typeof y.runWhen=="function"&&y.runWhen(n)===!1)return;c=c&&y.synchronous;const b=n.transitional||PE;b&&b.legacyInterceptorReqResOrdering?u.unshift(y.fulfilled,y.rejected):u.push(y.fulfilled,y.rejected)});const d=[];this.interceptors.response.forEach(function(y){d.push(y.fulfilled,y.rejected)});let h,f=0,p;if(!c){const v=[GE.bind(this),void 0];for(v.unshift(...u),v.push(...d),p=v.length,h=Promise.resolve(n);f<p;)h=h.then(v[f++],v[f++]);return h}p=u.length;let g=n;for(;f<p;){const v=u[f++],y=u[f++];try{g=v?v(g):g}catch(b){if(!y){h=Promise.reject(b);break}try{const S=y.call(this,b);fe.isThenable(S)&&(h=Promise.resolve(S).then(()=>GE.call(this,g)))}catch(S){h=Promise.reject(S)}break}}if(!h)try{h=GE.call(this,g)}catch(v){h=Promise.reject(v)}for(f=0,p=d.length;f<p;)h=h.then(d[f++],d[f++]);return h}getUri(t){t=Fu(this.defaults,t);const n=LM(t.baseURL,t.url,t.allowAbsoluteUrls,t);return wM(n,t.params,t.paramsSerializer)}};fe.forEach(["delete","get","head","options"],function(t){Ou.prototype[t]=async function(n,o){return this.request(Fu(o||{},{method:t,url:n,data:o&&fe.hasOwnProp(o,"data")?o.data:void 0}))}}),fe.forEach(["post","put","patch","query"],function(t){function n(o){return async function(r,i,a){return this.request(Fu(a||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}Ou.prototype[t]=n(),t!=="query"&&(Ou.prototype[t+"Form"]=n(!0))});let mne=class NG{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(r){n=r});const o=this;this.promise.then(s=>{if(!o._listeners)return;let r=o._listeners.length;for(;r-- >0;)o._listeners[r](s);o._listeners=null}),this.promise.then=s=>{let r;const i=new Promise(a=>{o.subscribe(a),r=a}).then(s);return i.cancel=function(){o.unsubscribe(r)},i},t(function(r,i,a){o.reason||(o.reason=new Zf(r,i,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new NG(function(s){t=s}),cancel:t}}};function vne(e){return function(n){return e.apply(null,n)}}function yne(e){return fe.isObject(e)&&e.isAxiosError===!0}const qv={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(qv).forEach(([e,t])=>{qv[t]===void 0&&(qv[t]=e)});function oN(e){const t=new Ou(e),n=tM(Ou.prototype.request,t);return fe.extend(n,Ou.prototype,t,{allOwnKeys:!0}),fe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return oN(Fu(e,s))},n}const Jn=oN(Xf);Jn.Axios=Ou,Jn.CanceledError=Zf,Jn.CancelToken=mne,Jn.isCancel=AM,Jn.VERSION=BE,Jn.toFormData=Hv,Jn.AxiosError=lt,Jn.Cancel=Jn.CanceledError,Jn.all=function(t){return Promise.all(t)},Jn.spread=vne,Jn.isAxiosError=yne,Jn.mergeConfig=Fu,Jn.AxiosHeaders=Ao,Jn.formToJSON=e=>DM(fe.isHTMLForm(e)?new FormData(e):e),Jn.getAdapter=eN.getAdapter,Jn.HttpStatusCode=qv,Jn.default=Jn;const{Axios:lxe,AxiosError:uxe,CanceledError:cxe,isCancel:dxe,CancelToken:hxe,VERSION:fxe,all:pxe,Cancel:gxe,isAxiosError:wne,spread:mxe,toFormData:vxe,AxiosHeaders:yxe,HttpStatusCode:wxe,formToJSON:Cxe,getAdapter:bxe,mergeConfig:Sxe,create:Exe}=Jn;class Qf extends Error{constructor(t,n,o,s,r){super(t),this.name="ApiError",this.statusCode=n,this.code=o,this.details=s,this.type=r,Object.setPrototypeOf(this,Qf.prototype)}}const Cne=e=>{var t,n;if(wne(e)){const o=(t=e.response)==null?void 0:t.status,s=(n=e.response)==null?void 0:n.data,r=(s==null?void 0:s.message)||e.message||"An unexpected error occurred",i=(s==null?void 0:s.code)||e.code,a=(s==null?void 0:s.details)||s;let l="UNKNOWN";return!o||e.code==="ERR_NETWORK"||e.code==="ECONNABORTED"?l=e.code==="ECONNABORTED"?"TIMEOUT":"NETWORK":o>=500?l="SERVER":o===br.UNAUTHORIZED||o===br.FORBIDDEN?l="AUTH":o===br.UNPROCESSABLE_ENTITY||o===br.BAD_REQUEST?l="VALIDATION":o>=br.BAD_REQUEST&&(l="CLIENT"),new Qf(r,o,i,a,l)}return e instanceof Error?new Qf(e.message,void 0,void 0,void 0,"UNKNOWN"):new Qf("An unknown error occurred",void 0,void 0,void 0,"UNKNOWN")},sN={accessToken:"account.token",refreshToken:"account.refresh_token"},bne={baseUrl:"BASE_URL"},rN="/refresh-token",Sne=3e5,Ene="*",iN={Accept:"application/json","Content-Type":"application/json"},_ne="undefined",Rne="No access token found",Mu={badRequest:400,unauthorized:401,tooEarly:425},Tne=[Mu.unauthorized,Mu.tooEarly,Mu.badRequest],Dne="unauthenticated",xne="invalid_token",Ane="refresh_token_expired",Ine={type:"TOKEN_EXPIRED",message:"Authentication token has expired"},Pne="Session refreshed successfully",kne="Session expired. Please log in again.",Fne=e=>{const{error:t}=e??{};return typeof t=="string"?t:t==null?void 0:t.key},One=e=>{var t,n;return((t=e==null?void 0:e.response)==null?void 0:t.status)!==Mu.badRequest?!1:Fne((n=e.response)==null?void 0:n.data)===xne},Mne=()=>{},Nne=e=>sessionStorage.getItem(e)||"",WE=()=>{const e=yv.get(sN.accessToken);return e&&e!==_ne?e:null},Lne=()=>!!yv.get(sN.refreshToken),Vne=()=>{const e=window.location.origin,t=Nne(bne.baseUrl);if(!t)return e;try{return new URL(t,e).origin}catch{return e}};class zE{constructor(t,n=Mne,o){this.client=t,this.showMessage=n,this.onAuthExpired=o}attach(){const t=zJ({refreshTokenFn:n=>this.refresh(n),onRefreshSuccess:n=>{this.showMessage(Pne,"success"),this.client.defaults.headers.common.Authorization=`Bearer ${n.access_token}`},onRefreshFailure:()=>{this.showMessage(kne,"error")},useStandardizedConfig:!0});this.handler=t,WJ(this.client,t,{retryStatusCodes:[...Tne],tokenExpiredDetection:zE.isTokenExpired})}refreshAccessToken(){return!this.handler||!Lne()?Promise.resolve(!1):(this.pendingRefresh??(this.pendingRefresh=this.handler.handleTokenRefresh().catch(()=>!1).finally(()=>{this.pendingRefresh=void 0})),this.pendingRefresh)}static isTokenExpired(t){var i,a;const n=(i=t==null?void 0:t.response)==null?void 0:i.status;if(n===Mu.tooEarly)return!0;const{error:o,details:s={}}=((a=t==null?void 0:t.response)==null?void 0:a.data)??{},r=typeof o=="string"?o:o==null?void 0:o.key;return n===Mu.badRequest||n!==Mu.unauthorized||typeof o=="string"||r!==Dne?!1:Object.keys(s).length===0||s.reason===Ane}async refresh(t){const n=await this.client.post(rN,{refresh_token:t}),o="data"in n&&n.data?n.data:n;return{access_token:o.access_token,refresh_token:o.refresh_token,expires_in:o.expires_in}}handleAuthExpired(){var t;if(window.self===window.top){(t=this.onAuthExpired)==null||t.call(this);return}window.parent.postMessage(Ine,Vne())}}class Bne{constructor(t={}){this.options={unwrapResponse:!0,withRefreshToken:!0,requireToken:!0,...t},this.client=Jn.create({baseURL:typeof t.baseURL=="string"?t.baseURL:"",timeout:t.timeout??Sne,headers:{...iN,...t.headers}}),this.setupRequestInterceptor(),this.setupResponseInterceptor(),this.setupErrorHandling()}get(t,n){return this.request({...n,method:"GET",url:t})}post(t,n,o){return this.request({...o,method:"POST",url:t,data:n})}put(t,n,o){return this.request({...o,method:"PUT",url:t,data:n})}patch(t,n,o){return this.request({...o,method:"PATCH",url:t,data:n})}delete(t,n){return this.request({...n,method:"DELETE",url:t})}request(t){return this.client.request(t)}setupRequestInterceptor(){this.client.interceptors.request.use(async t=>{const{baseURL:n,dynamicHeaders:o,requireToken:s}=this.options;typeof n=="function"&&(t.baseURL=n());const r=t.url===rN,i=r?WE():await this.resolveAccessToken();if(!i&&s&&!r)throw new Error(Rne);t.headers.set("Accept-Language",Ene),t.headers.has("Content-Type")||t.headers.set("Content-Type",iN["Content-Type"]),t.headers.has("Content-Type")&&t.headers.get("Content-Type")==="multipart/form-data"&&t.headers.delete("Content-Type"),i&&t.headers.set("Authorization",`Bearer ${i}`);for(const[a,l]of Object.entries((o==null?void 0:o(t))??{}))t.headers.set(a,l);return t})}async resolveAccessToken(){const t=WE();return t||!this.tokenRefresher?t:(await this.tokenRefresher.refreshAccessToken(),WE())}setupResponseInterceptor(){this.client.interceptors.response.use(t=>this.options.unwrapResponse?t.data:t)}setupErrorHandling(){const{withRefreshToken:t,showMessage:n,onAuthExpired:o,onError:s}=this.options;t&&(this.tokenRefresher=new zE(this.client,n,o),this.tokenRefresher.attach()),this.client.interceptors.response.use(void 0,r=>(One(r)&&(o==null||o("/sw?redirect=1")),Promise.reject(r))),s&&this.client.interceptors.response.use(void 0,s)}}const $ne=5,Hne=1e3,Gne=3,Une="default",Wne=e=>new URL(e,"http://localhost").pathname;class zne{constructor(t={}){this.groups=new Map,this.defaultLimit=t.defaultLimit??$ne,this.rules=t.rules??[],this.releaseDelayMs=t.releaseDelayMs??Hne}async run(t,n){const o=this.resolveGroup(t);await this.acquire(o);try{return await n()}finally{this.release(o)}}resolveGroup(t){const n=Wne(t),o=this.rules.find(i=>i.pattern.test(n)),s=o?o.pattern.source:Une;let r=this.groups.get(s);return r||(r={limit:(o==null?void 0:o.limit)??this.defaultLimit,ongoing:0,queue:[]},this.groups.set(s,r)),r}acquire(t){return new Promise(n=>{const o=()=>{t.ongoing++,n()};t.ongoing<t.limit?o():t.queue.push(o)})}release(t){t.ongoing--;const n=t.queue.shift();n&&setTimeout(n,this.releaseDelayMs)}}const jne=(e,t)=>{const n=new zne(t),o=Jn.getAdapter(e.defaults.adapter);return e.defaults.adapter=s=>n.run(s.url??"",()=>o(s)),n},Kne=(e,{maxRetries:t=Gne}={})=>{e.interceptors.response.use(void 0,async n=>{var a,l;const o=n.config;if(((a=n.response)==null?void 0:a.status)!==429||!o)return Promise.reject(n);const s=(o._retryCount??0)+1;if(s>t)return Promise.reject(n);o._retryCount=s;const r=Number.parseInt(String(((l=n.response.headers)==null?void 0:l["retry-after"])??""),10),i=Number.isNaN(r)?2**s*1e3:r*1e3;return await new Promise(u=>setTimeout(u,i)),e.request(o)})},qne=6e4,Yne="/start",Xne=(e=Yne)=>{const n=`${sessionStorage.getItem("BASE_URL")||""}${e}`;window.location.replace(n)};function Zne(e,t){const n=sessionStorage.getItem(e)||"";return(n==null?void 0:n.length)>0?n:t}class Jne{constructor(t,n={}){const{concurrency:o,rateLimitRetry:s,...r}=n,i=()=>Zne("API_BASE_URL","");this.callbackFunc=t,this.api=new Bne({baseURL:i,timeout:qne,requireToken:!0,onAuthExpired:Xne,...r,unwrapResponse:!1,showMessage:t}),this.axios=this.api.client,o!==!1&&jne(this.axios,o),s!==!1&&Kne(this.axios,s)}buildUrl(t=""){const n=t.replace(/^\//,"");return!n.startsWith("http://")&&!n.startsWith("https://")?`/${n}`:n}buildQueryParams(t){const n=new URLSearchParams;Object.entries(t).forEach(([s,r])=>{r!=null&&r!==""&&(Array.isArray(r)?r.forEach(i=>n.append(s,String(i))):typeof r=="object"?n.append(s,JSON.stringify(r)):n.append(s,String(r)))});const o=n.toString();return o?`?${o}`:""}async send(t,n,{params:o,data:s,options:r}={}){try{const i=o?this.buildQueryParams(o):"",a={...r,method:t,url:`${this.buildUrl(n)}${i}`};return s!==void 0&&(a.data=s),(await this.axios.request(a)).data}catch(i){throw Cne(i)}}get(t="",n,o){return this.send("GET",t,{params:n,options:o})}post(t="",n,o,s){return this.send("POST",t,{params:n,data:o,options:s})}put(t="",n,o){return this.send("PUT",t,{data:n,options:o})}patch(t="",n,o){return this.send("PATCH",t,{data:n,options:o})}delete(t="",n,o){return this.send("DELETE",t,{data:n,options:o})}}const Qne=({domainApi:e,wsCode:t,entityId:n})=>({list_cursor:{url:`${e}/v1/workspace/${t}/item/2`,method:"post",code:"list_cursor"},assignedUser:{url:`${e}/v1/workspace/${t}/item/2/assigned-users`,method:"post",code:"assignedUser"},metricValues:{url:`${e}/v1/workspace/${t}/item/2/metrics`,method:"post",code:"metricValues"},multipleAssignableUser:{url:`${e}/v1/workspace/${t}/item/2/assignable-users`,method:"post",code:"multipleAssignableUser"},assignableUser:{url:`${e}/v1/workspace/${t}/item/2/assignable-users`,method:"post",code:"assignableUser"},assignableStatus:{url:`${e}/v1/workspace/${t}/item/2/assignable-statuses`,method:"post",code:"assignableStatus"},delete_rendition:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-rendition`,method:"delete",code:"delete_rendition"},delete_thumbnail:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-thumbnail`,method:"delete",code:"delete_thumbnail"},archive_item:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"archive_item"},unarchive_item:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"unarchive_item"},removeAssignee:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-assignee`,method:"delete",code:"removeAssignee"},basicInfor:{url:`${e}/v1/workspace/${t}/tile/people/ws-user-roles/{userId}/basic-info`,method:"get",code:"basicInfor"},bulkDelete:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete`,method:"delete",code:"bulkDelete"},bulkArchive:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"bulkArchive"},bulkDateUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-date-update`,method:"put",code:"bulkDateUpdate"},bulkAssignUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-assignee-update`,method:"put",code:"bulkAssignUpdate"},bulkStatusUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-status-update`,method:"put",code:"bulkStatusUpdate"},bulkMetricUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-metric-update`,method:"put",code:"bulkMetricUpdate"},getPermission:{url:`${e}/v1/workspace/${t}/item/2/permissions`,method:"post",code:"getPermission"},getUserPermission:{url:`${e}/v1/workspace/${t}/permissions`,method:"get",code:"getUserPermission"},bulkUnarchive:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"bulkUnarchive"},downloadTemplate:{url:`${e}/v1/workspace/${t}/item/2/download-sample`,method:"get",code:"downloadTemplate"},importItems:{url:`${e}/v1/workspace/${t}/item/2/import-from-file`,method:"post",code:"importItems"},exportItems:{url:`${e}/v1/workspace/${t}/item/2/export`,method:"get",code:"exportItems"},updateFromFile:{url:`${e}/v1/workspace/${t}/item/2/update-from-file`,method:"post",code:"updateFromFile"},metricList:{url:`${e}/v1/workspace/${t}/entity/2/metrics`,method:"get",code:"metricList"},getEntityDetail:{url:`${e}/workspace/${t}/entities/${n}?include_permission=1`,method:"get",code:"getEntityDetail"},item:{url:`${e}/v1/workspace/${t}/item/2/update`,method:"put",code:"item"},me:{url:`${e}/v1/me`,method:"get",code:"me"},workspaces:{url:`${e}/v1/workspaces`,method:"get",code:"workspaces"},entityUserRoles:{url:`${e}/v1/workspace/${t}/entity/2/users`,method:"get",code:"entityUserRoles"},templateFlowStatuses:{url:`${e}/workspace/${t}/entities/${n}/template_flow_statuses`,method:"get",code:"templateFlowStatuses"},createNewItem:{url:`${e}/v1/workspace/${t}/item/2/new?entity_id=${n}`,method:"post",code:"createNewItem"},getAssignableStatuses:{url:`${e}/v1/workspace/${t}/entity/2/assignable-statuses`,method:"get",code:"getAssignableStatuses"},getAssignableAssignees:{url:`${e}/v1/workspace/${t}/entity/2/users`,method:"get",code:"getAssignableAssignees"},getFilterStatuses:{url:`${e}/v1/workspace/${t}/entity/2/statuses`,method:"get",code:"getFilterStatuses"},bulkRename:{url:`${e}/v1/workspace/${t}/item/2/bulk-rename`,method:"put",code:"bulkRename"},bulkCreate:{url:`${e}/v1/workspace/${t}/item/2/bulk-create`,method:"post",code:"bulkCreate"}}),eoe=(e,t)=>{const n=new Blob([e]),o=globalThis.URL.createObjectURL(n),s=document.createElement("a");s.href=o,s.download=t,document.body.appendChild(s),s.click(),s.remove(),globalThis.URL.revokeObjectURL(o)},toe=15e3,noe=new Set(["bulkDelete","bulkArchive","bulkUnarchive","bulkDateUpdate","bulkAssignUpdate","bulkStatusUpdate","bulkMetricUpdate","bulkRename","removeAssignee","delete_thumbnail","delete_rendition"]);class aN extends Jne{constructor(t,n,o){const s=n==null?void 0:n.domainApi,r=n==null?void 0:n.wsCode,i=(n==null?void 0:n.entityId)||"";super(o,{concurrency:{rules:[{pattern:/^\/api\/v1\/workspace\/[^/]+\/item\/2$/,limit:1},{pattern:/^\/api\/v1\/workspace\/[^/]+\/item\/2\/metrics$/,limit:5}]}}),this.events=Object.create(null);const a=Qne({domainApi:s,wsCode:r,entityId:i}),l={};Object.entries(a).forEach(([u,c])=>{const d=u;t[d]?l[d]=t[d]:(console.warn(`API config for ${d} is missing, using base config.`),l[d]=c)}),this.apiConfig=l}on(t,n){var o;((o=this.events)[t]??(o[t]=[])).push(n)}off(t,n){const o=this.events[t];o&&(this.events[t]=o.filter(s=>s!==n))}emit(t,...n){const o=this.events[t];o!=null&&o.length&&o.forEach(s=>{try{s(...n)}catch(r){console.error(`Error in event listener for ${t}:`,r)}})}buildHeaders(t){return typeof FormData<"u"&&t instanceof FormData?{"Content-Type":"multipart/form-data"}:{}}async _requestHandler({method:t,path:n,params:o,payload:s,code:r,responseType:i,autoDownload:a=!0,unwrapResponse:l=!0,timeout:u}){var h,f;const c=this.buildHeaders(s);let d;try{if(d=await this.axios.request({method:t,url:n,params:o,data:s,headers:c,responseType:i,timeout:u}),(((h=d.headers)==null?void 0:h["content-type"])||"").includes("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")){const g=((f=d.headers)==null?void 0:f["content-disposition"])||"",v=g.includes("filename=")?g.split("filename=")[1]:"exported_items.xlsx";a&&eoe(d.data,v)}if(d.status>=400&&d.status<=500)throw new Error(`Client error (${d.status}): ${d.statusText}`);return this.emit("call-api",{apiCode:r,path:n,params:o,payload:s,res:d,success:!0}),l?d.data:d}catch(p){throw console.error("API Request Error:",p),p.code==="ERR_NETWORK"||!navigator.onLine?this.emit("call-api",{path:n,params:o,payload:s,error:new Error("You are currently offline. Please check your network connection."),success:!1,apiCode:"offline"}):this.emit("call-api",{path:n,params:o,payload:s,error:p,success:!1,apiCode:r,res:p==null?void 0:p.response}),p}}generateUrl(t,n){let o=t;return Object.entries(n).forEach(([s,r])=>{o=o.replace(`{${s}}`,String(r))}),o}async request(t,n,o={}){const{url:s,code:r,method:i}=this.apiConfig[t],a=this.generateUrl(s,n);return this._requestHandler({method:i,path:a,params:o.params,payload:o.payload,code:r,responseType:o.responseType,autoDownload:o.autoDownload,unwrapResponse:o.unwrapResponse,timeout:noe.has(t)?toe:void 0})}async getAllItem_cursor(t){var r;const n=t.workspaceId,o={entity_ids:((r=t.entityIds)==null?void 0:r.join(","))||"",cursor:t.cursor||void 0,per_page:t.pageSize||t.perPage||20,offset:t.offset||void 0,search:t.search||t.q||void 0,include_signature:1,include:"last_updated_by,property,last_completed_by",include_permission:"{include_permission}",assignee_any_ina:(t==null?void 0:t.assignee_any_ina)||"",assignee_all_ina:(t==null?void 0:t.assignee_all_ina)||void 0,with_not_assigned:t.with_not_assigned||void 0,status_ina:t.status_ina||void 0,status_eq:t.status_eq||void 0,start_date_gte:t.start_date_gte||void 0,start_date_lte:t.start_date_lte||void 0,start_date_btw:t.start_date_btw||void 0,due_date_gte:t.due_date_gte||void 0,due_date_lte:t.due_date_lte||void 0,due_date_btw:t.due_date_btw||void 0,condition_combine_type:t.condition_combine_type||"or",preflight_status:t.preflight_status||void 0},s=t.sortBy;return this.request("list_cursor",{workspaceId:n},{params:o,payload:{sort_by:s}})}async getAssignedUser(t){const n={item_ids:t.item_ids||[],metric_ids:t.metric_ids||[]},o={per_page:t.per_page};return this.request("assignedUser",{workspaceId:t.workspaceId},{params:o,payload:n})}async getMetricList({workspaceId:t,entityId:n,page:o,query:s,per_page:r}){return this.request("metricList",{workspaceId:t,entityId:n},{params:{status_ed:1,include:"metric_type",entity_id:n,include_permission:1,per_page:r||100,page:o||1,name_like:s||void 0,permission:"1,2"}})}async getMetricValues({workspaceId:t,item_ids:n,per_page:o,metric_ids:s}){const r={item_ids:n,metric_ids:s};return this.request("metricValues",{workspaceId:t},{params:{per_page:o,include_permission:1},payload:r})}async multipleAssignableUser(t){const n=t.workspaceId,o=t.itemIds,s={page:t.page||1,per_page:t.perPage,display_name_like:t.q||"",item_ids:o||[]};return o.length||(delete s.item_ids,s.entity_id=t.entityId),this.request("multipleAssignableUser",{workspaceId:n},{payload:s})}async getAssignableStatus(t){var s;const n=t.workspaceId,o={item_ids:t.itemIds||[],page:t.page||1,per_page:t.perPage||10,name_like:t.name_like||""};return((s=t.itemIds)==null?void 0:s.length)==0&&(o.entity_id=t.entityId,delete o.item_ids),this.request("assignableStatus",{workspaceId:n||""},{payload:o})}async updateSceneName({workspaceId:t,entityId:n,itemId:o,name:s}){const r={item_id:o,entity_id:n,name:s,include:"item_user_roles"};return this.request("item",{workspaceId:t,itemId:o},{payload:r})}async deleteScene(t,n,o){const s={item_ids:[o]};return this.request("bulkDelete",{workspaceId:t,entityId:n},{payload:s})}async deleteThumbnail({workspaceId:t,itemIds:n,entityId:o,filterParams:s}){const r={item_ids:n,entity_id:o};return!n||n.length===0?r.item_ids=void 0:r.entity_id=void 0,this.request("delete_thumbnail",{workspaceId:t},{payload:r,params:s})}async deleteRendition({workspaceId:t,itemIds:n,deleteAll:o=!1,entityId:s,filterParams:r}){const i={item_ids:n,delete_all:o?1:void 0,entity_id:s};return!n||n.length===0?i.item_ids=void 0:i.entity_id=void 0,this.request("delete_rendition",{workspaceId:t},{payload:i,params:r,unwrapResponse:!1})}async archiveScene(t,n,o){const s={item_ids:o,status:0};return this.request("archive_item",{workspaceId:t,entityId:n},{payload:s})}async changeDate({workspaceId:t,itemIds:n,startDate:o,dueDate:s,entityId:r,filterParams:i}){const a={item_ids:n,start_date:o,due_date:s,entity_id:r};return this.request("bulkDateUpdate",{workspaceId:t},{payload:a,params:i,unwrapResponse:!1})}async updateAssignee(t){const{workspaceId:n,itemIds:o,userIds:s,entityId:r}=t,i={item_ids:o,ws_user_role_ids:s,entity_id:r};return this.request("bulkAssignUpdate",{workspaceId:n},{payload:i,params:t.filterParams})}createUpdateEntityPayload(t){const{itemIds:n,userIds:o,entityId:s}=t,r={item_ids:n,ws_user_role_ids:o,entity_id:s};return!n||n.length===0?(r.item_ids=void 0,r.entity_id=s):(r.item_ids=n,r.entity_id=void 0),r}async removeAssignee(t){const n=this.createUpdateEntityPayload(t);return this.request("removeAssignee",{workspaceId:t.workspaceId},{payload:n,params:t.filterParams})}async replaceAssignee(t){const{workspaceId:n,itemIds:o,userIds:s,entityId:r}=t,i={item_ids:o,ws_user_role_ids:s,entity_id:r};return this.request("bulkAssignUpdate",{workspaceId:n},{params:{replace:1,...t.filterParams},payload:i})}async addAssignee({workspaceId:t,itemIds:n,userIds:o,entityId:s,filterParams:r}){const i={item_ids:n,ws_user_role_ids:o,entity_id:s};return this.request("bulkAssignUpdate",{workspaceId:t},{payload:i,params:r})}async unAssignAll(t){const{workspaceId:n,entityId:o,itemIds:s,filterParams:r}=t,i={item_ids:s,entity_id:o,ws_user_role_ids:[]};return!s||s.length===0?i.item_ids=void 0:i.entity_id=void 0,this.request("removeAssignee",{workspaceId:n,entityId:String(o)},{payload:i,params:r})}async updateItemStatus(t){const{workspaceId:n,itemIds:o=[],statusId:s,entityId:r}=t,i={item_ids:o,template_flow_status_id:s};return o.length||(i.item_ids=void 0,i.entity_id=r),this.request("bulkStatusUpdate",{workspaceId:n},{payload:i,params:t.filterParams,unwrapResponse:!1})}async getUserInformation(t,n){return this.request("basicInfor",{workspaceId:t,userId:n})}async bulkDeleteItems({workspaceId:t,itemIds:n,entityId:o,filterParams:s}){const r={item_ids:n,entity_id:o};return!n||n.length===0?r.item_ids=void 0:r.entity_id=void 0,this.request("bulkDelete",{workspaceId:t},{payload:r,params:s})}async bulkUnarchiveItems({workspaceId:t,itemIds:n,entityId:o,filterParams:s}){const r={item_ids:n,status:1,entity_id:o};return!n||n.length===0?r.item_ids=void 0:r.entity_id=void 0,this.request("bulkUnarchive",{workspaceId:t},{payload:r,params:s,unwrapResponse:!1})}async bulkArchiveItems({workspaceId:t,itemIds:n,entityId:o,filterParams:s}){const r={item_ids:n,status:0,entity_id:o};return!n||n.length===0?r.item_ids=void 0:r.entity_id=void 0,this.request("bulkArchive",{workspaceId:t},{payload:r,params:s,unwrapResponse:!1})}async bulkUpdateMetric(t){const{workspaceId:n,itemIds:o,metricId:s,value:r,clear:i}=t,a={item_ids:o,metric_id:s,metric_value:r,clear:i??(r==null?1:0),entity_id:t.entityId};return t.itemIds===void 0?(delete a.item_ids,a.entity_id=String(t.entityId)):(a.item_ids=o,a.entity_id=void 0),this.request("bulkMetricUpdate",{workspaceId:n},{payload:a,params:t.filterParams,unwrapResponse:!1})}async getPermissionForItems({workspaceId:t,itemIds:n}){const o={item_ids:n};return this.request("getPermission",{workspaceId:t},{payload:o,params:{per_page:50}})}async unarchiveScene(t,n,o){const s={item_ids:o,status:1};return this.request("unarchive_item",{workspaceId:t,entityId:n},{payload:s})}async getUserPermission(t){return this.request("getUserPermission",{workspaceId:t})}async getEntityDetail(t,n){return this.request("getEntityDetail",{workspaceId:t,entityId:n})}async downloadTemplate(t,n,o=!0){return this.request("downloadTemplate",{workspaceId:t,entityId:n},{responseType:"blob",params:{format:"xlsx",entity_id:n},autoDownload:o})}async downloadExportedItemsFile(t,n,o=!0){return this.request("exportItems",{workspaceId:t,exportId:n},{responseType:"blob",params:{format:"xlsx",entity_id:n},autoDownload:o})}async addNewSceneViaImportFile(t,n,o){return this.request("importItems",{workspaceId:t,entityId:n},{payload:o})}async overwriteScenesViaImportFile(t,n,o){return this.request("updateFromFile",{workspaceId:t,entityId:n},{payload:o})}async getMe(){return this.request("me",{})}async getWorkspaces(t){const n={page:1,per_page:1,"ws_user_role>status_eq":1,include:"owner",include_ws:t};return this.request("workspaces",{},{params:n})}async getEntityUserRoles(t){const{workspaceId:n,page:o,per_page:s,display_name_like:r,entity_ids:i}=t;return this.request("entityUserRoles",{workspaceId:n},{params:{page:o,per_page:s,display_name_like:r,entity_ids:i}})}async getTemplateFlowStatuses(t){const{workspaceId:n,entityId:o}=t;return this.request("templateFlowStatuses",{workspaceId:n,entityId:o},{params:{per_page:100,page:t.page??1,all:1,name_like:t.name_like}})}async addNewItem(t,n,o){return this.request("createNewItem",{workspaceId:t,entityId:n},{payload:o})}async getFilterStatuses(t,n,o){return this.request("getFilterStatuses",{workspaceId:t,entityId:n},{params:o})}async getAssignableStatuses(t,n){return this.request("getAssignableStatuses",{workspaceId:t},{params:n})}async getAssignableAssignees(t,n){return this.request("getAssignableAssignees",{workspaceId:t},{params:n})}async bulkRename(t){return this.request("bulkRename",{workspaceId:t.workspaceId,entityId:t.entityId},{payload:t.payload,params:t.filter,unwrapResponse:!1})}async bulkCreate(t){return this.request("bulkCreate",{workspaceId:t.workspaceId,entityId:t.entityId},{payload:t.payload,params:t.filter,unwrapResponse:!1})}}const ooe=(e,t,n,o,s,r,i)=>{const a=B(!1),{apiServices:l}=no(n,o),u=Y(()=>!!(s!=null&&s.value&&(r!=null&&r.value))),c=En("filterParams",null);return{isUpdating:a,handleUpdate:async h=>{var p;const f=h.value;try{const g={itemIds:e.value.itemIds,metricId:h.id,workspaceId:String(e.value.workspaceId),filterParams:c!=null&&c.value?c.value:void 0};h.value==null?g.clear=1:g.value=f,u.value?(delete g.itemIds,g.entityId=String(o.entityId)):g.itemIds=e.value.itemIds,a.value=!0;const v=await((p=l.value)==null?void 0:p.bulkUpdateMetric(g));return console.log("Bulk update response:",v),t(h,v),v}catch(g){console.error("Error during bulk metric update:",g)}finally{a.value=!1}}}},soe=Et(ot({__name:"MetricUpdateButton",props:{workspaceId:{},entityId:{},variant:{},rowSelected:{},selectedIds:{},disabled:{type:Boolean},selectedAll:{type:Boolean}},emits:["update","update-start","update-completed","update-failed"],setup(e,{emit:t}){const n=ZO(),o=B([]),s=e,r=t,i=B([]),a=B(null),l=W=>{var ee,se,X;const oe=o.value.findIndex(I=>I.id===W.id);a.value=oe;const ie=(ee=i.value[oe])==null?void 0:ee.$el;(se=E.value)==null||se.scrollTo(oe*30),ie&&ie.scrollIntoView({behavior:"smooth",block:"center"}),u(oe),(X=i.value[oe])==null||X.show()},u=W=>{a.value=W,i.value.forEach((oe,ie)=>{ie!==W&&oe&&oe.hide()})},c=B(""),d=()=>{c.value="",i.value.forEach(W=>{W==null||W.hide()}),a.value=null},h=Y(()=>s.selectedIds||[]),f=Y(()=>({itemIds:h.value,workspaceId:String(s.workspaceId)})),p=En("isSelectAll",B(!1)),g=En("bulkUpdate",B(!1)),v=B(null),{handleUpdate:y,isUpdating:b}=ooe(f,(W,oe)=>{console.log("Update callback received:",W,oe),r("update",W)},!1,s,g,p),S=async W=>{var oe;r("update-start");try{const ie=await y(W);(ie==null?void 0:ie.status)!==br.ACCEPTED&&(ie==null?void 0:ie.status)!==br.OK?r("update-failed"):(r("update-completed",ie),setTimeout(()=>{var ee;d(),(ee=v.value)==null||ee.hide()},500))}catch(ie){console.error("Failed to update metric:",ie),r("update-failed"),(oe=v.value)==null||oe.open()}},w=W=>{d(),ft(()=>{var oe;(oe=E.value)==null||oe.focus()})},E=B(null),_=(W,oe)=>{var ie;W?(ie=E.value)==null||ie.focus():d(),W&&oe!==W&&$("")},D=B(!0),x=B(!0),{apiServices:M}=no(!1,s),V=async(W,oe,ie)=>{var ee;try{return ie?x.value=!0:D.value=!0,await((ee=M.value)==null?void 0:ee.getMetricList({workspaceId:s.workspaceId||"",entityId:s.entityId||"",page:W,query:oe,per_page:10}))}catch(se){throw console.error("Failed to fetch metric list:",se),se}finally{D.value=!1,x.value=!1}},A=B(0),P=B(!0),k=W=>({id:String(W.id),label:String(W.name),value:String(W.id),description:W.morpheme_value?`${String(W.morpheme_value)}`:"",type:n.checkEditType(W),metricConfig:W}),O=W=>W.filter(oe=>!oe.formula).filter(oe=>{var ie;return((ie=oe==null?void 0:oe.auth_permission)==null?void 0:ie.permission)==2}).map(k),N=async()=>{A.value+=1;const W=await V(A.value,c.value,!0);if(W&&W.data){const oe=O(W.data);o.value=[...o.value,...oe],P.value=W.meta.last_page!=W.meta.current_page}else P.value=!1},$=async W=>{c.value=W,A.value=1;try{const oe=await V(A.value,c.value);oe&&oe.data?(o.value=O(oe.data),P.value=oe.meta.last_page!=oe.meta.current_page):o.value=[]}catch{o.value=[]}};return(W,oe)=>(K(),ze(Uf,{ref_key:"wrapperRef",ref:v,isUpdating:L(b),disabled:s.disabled,onOnVisibleChange:_},{trigger:we(({hide:ie,disabled:ee})=>[ye(bt,{variant:s.variant,loading:L(b),disabled:ee,onEscape:ie},{default:we(()=>[ye(gt,{src:"SquareRootVariable",class:"icon"}),oe[1]||(oe[1]=tt(" Metric ",-1))]),_:1},8,["variant","loading","disabled","onEscape"])]),popup:we(({isVisible:ie,popupRef:ee,hide:se})=>[Ue(ye(ga,{ref_key:"searchListRef",ref:E,style:{width:"320px"},options:o.value,loading:D.value,"loading-more":x.value,"selected-id":void 0,"has-more":P.value,onSearch:$,onSelect:l,onLoadMore:oe[0]||(oe[0]=()=>N()),onCancel:se},{item:we(({item:X,index:I,selectedIndex:z})=>[ye(oee,{ref:ne=>i.value[I]=ne,label:X.label,type:X.type,morpheme:X.description||"",onFocusOnSearch:w,onOpen:ne=>u(I),attachTo:ee,config:X.metricConfig,onHandleUpdate:S,class:ce(["metric-update-item",{selected:a.value===I||z===I}])},null,8,["label","type","morpheme","onOpen","attachTo","config","class"])]),"extra-item":we(()=>[...oe[2]||(oe[2]=[be("div",{style:{width:"250px"}},null,-1)])]),"empty-list":we(()=>[...oe[3]||(oe[3]=[tt("No options available.",-1)])]),_:2},1032,["options","loading","loading-more","has-more","onCancel"]),[[lr,ie]])]),default:we(()=>[oe[4]||(oe[4]=tt(" > ",-1))]),_:1},8,["isUpdating","disabled"]))}}),[["__scopeId","data-v-989820f7"]]),roe={class:"status-label"},lN=Et(ot({__name:"StatusItem",props:{status:{},selected:{type:Boolean},focused:{type:Boolean},hovered:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=qt,o=e,s=t,r=a=>{s("select",a)},i=a=>new Bn(a).isLight()?"#f3f5f8":"#d7d7d7";return(a,l)=>(K(),he("div",{class:ce(["status-option",{selected:o.selected,focused:o.focused,hovered:o.hovered}]),onClick:l[0]||(l[0]=u=>r(e.status.id))},[be("div",{class:"status-color",style:cn({backgroundColor:e.status.color,borderColor:i(e.status.color)})},null,4),Ue((K(),he("div",roe,[kt(a.$slots,"label",{},()=>[tt(at(e.status.name),1)],!0)])),[[L(n),{content:e.status.name,delay:[1e3,0]}]])],2))}}),[["__scopeId","data-v-aeaa75a4"]]),ioe=["innerHTML"],uN=Et(ot({__name:"StatusEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},ids:{},callback:{type:Function}},emits:["updated","error","cancel","start-update","finish-update"],setup(e,{expose:t,emit:n}){const o={PER_PAGE:50,INITIAL_PAGE:1},s=e,r=n,i=B([]),a=B(!1),l=B(!1),u=B(null),c=B(o.INITIAL_PAGE),d=B(!0),h=B(0),f=B(""),p=Y(()=>{var k;return(k=s.value)==null?void 0:k.id});Y(()=>!!(s.id||s.ids&&s.ids.length>0));const g=k=>({label:k.name,value:k.id,selected:p.value===k.id,hover:!1,type:"status",disabled:!1,clickable:!0,danger:!1,data:k,id:k.id,color:k.color}),v=Y(()=>{const k=new Set;return s.id&&k.add(String(s.id)),s.ids&&s.ids.forEach(O=>{O&&k.add(String(O))}),Array.from(k)}),y=En("bulkUpdate",!1),{apiServices:b}=no(!y,s),S=Vf(),{selectionStatus:w}=go(S),E=En("filterParams",null),_=async(k=o.INITIAL_PAGE,O="",N=!1)=>{var $,W,oe,ie;N?l.value=!0:a.value=!0,u.value=null;try{const ee={workspaceId:String(s.workspaceId),itemIds:v.value,page:k,perPage:o.PER_PAGE,name_like:O.trim(),...E||{},entityId:String(s.entityId)};if((($=b.value)==null?void 0:$.getAssignableStatus)===void 0)throw new Error("API service getAssignableStatus is undefined");const se=await((W=b.value)==null?void 0:W.getAssignableStatus(ee));if(!(se!=null&&se.data)){N||(i.value=[]),d.value=!1;return}const X=se.data.map(g);i.value=N?[...i.value,...X]:X,h.value=((oe=se.meta)==null?void 0:oe.total)??se.data.length,d.value=!((ie=se.meta)!=null&&ie.on_last_page),c.value=k}catch(ee){console.error("Error fetching statuses:",ee),u.value="Failed to load statuses",N||(i.value=[]),d.value=!1,r("error",u.value)}finally{a.value=!1,l.value=!1}},D=vr(async k=>{f.value=k,c.value=o.INITIAL_PAGE,await _(o.INITIAL_PAGE,k,!1)},vi),x=async()=>{!d.value||l.value||await _(c.value+1,f.value,!0)},M=()=>{var k;r("cancel"),(k=s.params)==null||k.api.stopEditing()},V=async k=>{var O,N,$;try{const W={workspaceId:String(s.workspaceId),itemIds:v.value,statusId:String(k.value),entityId:String(s.entityId),filterParams:E!=null&&E.value?E==null?void 0:E.value:void 0};w.value==Ot.CHECKED&&y&&(W.itemIds=void 0,W.entityId=String(s.entityId)),r("start-update");const oe=await b.value.updateItemStatus(W);if(!oe)throw new Error("Status update failed: empty response");r("updated",{workspaceId:String(s.workspaceId),itemIds:v.value,isUpdateAll:w.value==Ot.CHECKED&&y,data:{id:k.id,name:k.label,color:k.color}}),s.params&&((N=s.params)==null||N.node.setData({...(O=s.params)==null?void 0:O.node.data,status:{id:k.id,name:k.label,color:k.color}}),($=s.params)==null||$.api.stopEditing()),r("finish-update",oe)}catch(W){console.error("Error updating status:",W),u.value="Failed to update status",r("error",u.value)}},A=Y(()=>i.value.map(k=>({...k})));Je([()=>s.id,()=>s.workspaceId,()=>s.ids],()=>{_()},{deep:!0,immediate:!0});const P=B(null);return Jt(()=>{ft(()=>{var k;(k=P.value)==null||k.focus()})}),t({refresh:()=>_(o.INITIAL_PAGE,f.value,!1),loadMore:x,focus:()=>{var k;return(k=P.value)==null?void 0:k.focus()}}),(k,O)=>{var N;return K(),ze(ga,Kt({ref_key:"popupRef",ref:P},s,{"selected-id":(N=s.value)==null?void 0:N.id,options:A.value,loading:a.value,"loading-more":l.value,"has-more":d.value,error:u.value,onSearch:L(D),onSelect:V,onLoadMore:x,onCancel:M,onClose:M}),{item:we(({item:$,selectedIndex:W,isSelected:oe,handleItemHover:ie,getHighlightedLabel:ee,query:se,idx:X})=>[(K(),ze(lN,{key:$.value,status:$.data,selected:oe($),onMouseover:I=>ie(X),onSelect:I=>V($),hovered:X===W},{label:we(()=>[se?(K(),he("span",{key:0,class:ce([k.$style["item-label"],k.$style.match]),style:{flex:"1"},innerHTML:ee($.label)},null,10,ioe)):(K(),he("span",{key:1,class:ce(k.$style["item-label"]),style:{flex:"1"}},at($.label),3))]),_:2},1032,["status","selected","onMouseover","onSelect","hovered"]))]),_:1},16,["selected-id","options","loading","loading-more","has-more","error","onSearch"])}}}),[["__cssModules",{$style:{"item-label":"_item-label_7ir12_1"}}]]),aoe=ot({__name:"StatusUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{},disabled:{type:Boolean},selectedAll:{type:Boolean}},emits:["updated","update-start","update-completed","update-failed"],setup(e,{emit:t}){const n=e,o=Y(()=>{const f=Go();return f==null?void 0:f.appContext.config.globalProperties.apiServices}),s=t,r=B(!1),i=B(null),a=f=>{try{r.value=!1,s("updated",f)}catch(p){console.error("Error handling status update:",p)}},l=Y(()=>({apiServices:o.value,ids:n.ids,workspaceId:n.workspaceId,entityId:n.entityId,selectedAll:n.selectedAll}));ri("bulkUpdate",!0);const u=(f,p)=>{var g,v;r.value=!1,f?(s("update-completed",p),(g=i.value)==null||g.destroy()):(s("update-failed"),(v=i.value)==null||v.open())},c=B(null),d=(f,p)=>{var g;f&&((g=c.value)==null||g.focus())},h=()=>{r.value=!0,s("update-start")};return Je(()=>n.ids,()=>{}),(f,p)=>(K(),ze(Uf,{ref_key:"wrapperRef",ref:i,isUpdating:r.value,disabled:n.disabled||r.value,onOnVisibleChange:d},{trigger:we(({hide:g,disabled:v})=>[ye(bt,{variant:n.variant,loading:r.value,disabled:v,onEscape:g},{default:we(()=>[ye(gt,{src:"Square",class:"icon"}),p[2]||(p[2]=tt(" Status ",-1))]),_:1},8,["variant","loading","disabled","onEscape"])]),popup:we(({hide:g})=>[ye(uN,Kt({disabled:r.value,ref_key:"statusRef",ref:c},l.value,{onUpdated:a,onCancel:g,onStartUpdate:h,onFinishUpdate:p[0]||(p[0]=v=>u(!0,v)),onError:p[1]||(p[1]=v=>u(!1)),callback:()=>{}}),null,16,["disabled","onCancel"])]),default:we(()=>[p[3]||(p[3]=tt(" > ",-1))]),_:1},8,["isUpdating","disabled"]))}}),Er=" ",jE=e=>e.replace(/[\r\n]+/g," "),ep=e=>e instanceof HTMLElement&&e.classList.contains("locked-tag"),_s=e=>(e==null?void 0:e.nodeType)===Node.TEXT_NODE,KE=e=>{var t;return((t=e instanceof Element?e:e.parentElement)==null?void 0:t.closest(".locked-tag"))??null},Ci=e=>{let t=0,n=e.length;return ep(e.previousSibling)&&e.data.startsWith(Er)&&(t=1),ep(e.nextSibling)&&n>t&&e.data.endsWith(Er)&&(n-=1),{start:t,end:n}},loe=e=>{if(!_s(e))return!1;const{start:t,end:n}=Ci(e);return n<=t},cN=e=>{const t=KE(e.startContainer),n=KE(e.endContainer);return t&&e.setStartAfter(t),n&&e.setEndAfter(n),e},uoe=(e,t)=>e.length===t.length&&e.every((n,o)=>{const s=t[o];return typeof n=="string"||typeof s=="string"?n===s:n.id===s.id&&n.text===s.text&&n.direction===s.direction});class coe{constructor(t){bn(this,"editor",null);bn(this,"handleInput",()=>{this.editor&&(this.sanitize(),this.ensureTagPadding(),this.normalizeCaret(),this.options.onChange(this.parse()))});bn(this,"handlePaste",t=>{var n;t.preventDefault(),this.insertPlainText(((n=t.clipboardData)==null?void 0:n.getData("text/plain"))??"")});bn(this,"handleDrop",t=>{var o,s;t.preventDefault();const n=((o=t.dataTransfer)==null?void 0:o.getData("text/plain"))??"";n&&this.insertPlainText(n,(s=document.caretRangeFromPoint)==null?void 0:s.call(document,t.clientX,t.clientY))});bn(this,"handleBeforeInput",t=>{const n=t.inputType;(n.startsWith("format")||n==="insertParagraph"||n==="insertLineBreak"||n==="insertFromDrop"||n==="insertFromYank")&&t.preventDefault()});bn(this,"handleClick",t=>{const n=this.editor,o=window.getSelection();if(!n||!(o!=null&&o.isCollapsed)||t.target!==n)return;const s=document.createRange();if(s.selectNodeContents(n),t.clientX<=s.getBoundingClientRect().right)return;const[r,i]=this.getBoundaryPoint("end");o.collapse(r,i),n.scrollLeft=n.scrollWidth});bn(this,"handleKeydown",t=>{var s,r,i;const n=this.editor;if(!n)return;if(t.key==="Escape"){(r=(s=this.options).onEscape)==null||r.call(s,t);return}if(t.key==="Enter"){t.preventDefault();return}const o=t.ctrlKey||t.metaKey;if(o&&!t.altKey&&t.key.toLowerCase()==="a"){t.preventDefault(),(i=window.getSelection())==null||i.selectAllChildren(n);return}if(t.key==="Home"||t.key==="End"){t.preventDefault(),t.stopPropagation(),this.moveToEdge(t.key==="Home"?"start":"end",t.shiftKey);return}if((t.key==="ArrowLeft"||t.key==="ArrowRight")&&!t.shiftKey&&!o&&!t.altKey){this.moveAcrossTag(t.key)&&t.preventDefault();return}if(t.key==="Backspace"||t.key==="Delete"){if(!o&&!t.altKey&&!t.shiftKey&&this.deleteCharacter(t.key)){t.preventDefault();return}const a=this.findAdjacentTag(t.key);a&&(t.preventDefault(),this.removeTag(a,t.key==="Backspace"?"after":"before"))}});bn(this,"normalizeCaret",()=>{const t=this.editor,n=window.getSelection();if(!t||!(n!=null&&n.rangeCount)||!n.isCollapsed)return;const{startContainer:o,startOffset:s}=n.getRangeAt(0);if(!t.contains(o))return;const r=KE(o);if(!r&&o!==t)return;const i=r??t.childNodes[s-1]??null,a=r?r.nextSibling:t.childNodes[s]??null;if(this.ensureTagPadding(),_s(i))n.collapse(i,Ci(i).end);else if(_s(a))n.collapse(a,Ci(a).start);else if(_s((i==null?void 0:i.nextSibling)??null)){const l=i.nextSibling;n.collapse(l,Ci(l).start)}else if(_s((a==null?void 0:a.previousSibling)??null)){const l=a.previousSibling;n.collapse(l,Ci(l).end)}});this.options=t}mount(t,n=[]){this.editor=t,this.render(n),document.addEventListener("selectionchange",this.normalizeCaret)}destroy(){document.removeEventListener("selectionchange",this.normalizeCaret),this.editor=null}sync(t){this.editor&&(uoe(t,this.parse())||this.render(t))}render(t){const n=this.editor;n&&(n.innerHTML="",t.forEach(o=>{typeof o=="string"?n.appendChild(document.createTextNode(jE(o))):this.options.isTagAllowed(o.id)&&n.appendChild(this.createTagNode(o))}),this.ensureTagPadding())}parse(){var o;const t=[];let n="";return(o=this.editor)==null||o.childNodes.forEach(s=>{if(_s(s)){const{start:r,end:i}=Ci(s);n+=s.data.slice(r,i).replace(/\u00A0/g," ")}else this.isAllowedTagNode(s)&&(n&&(t.push(n),n=""),t.push({id:s.dataset.id||"unknown",text:s.innerText||"Tag",direction:s.dataset.direction??void 0}))}),n&&t.push(n),t}insertTag(t){const n=this.editor;if(!n||!this.options.isTagAllowed(t.id))return;const o=n.querySelector(`.locked-tag[data-id="${t.id}"]`);if(o instanceof HTMLElement){this.applyTagData(o,t),this.handleInput();return}const s=this.createTagNode(t),r=document.createTextNode(Er),i=this.getEditorRange();i?(i.deleteContents(),i.insertNode(r),i.insertNode(s)):n.append(s,r),n.normalize(),this.handleInput(),this.placeCaretAfterTag(r)}updateTag(t,n){var s;const o=(s=this.editor)==null?void 0:s.querySelector(`.locked-tag[data-id="${t}"]`);o instanceof HTMLElement&&(o.innerText=n,this.handleInput())}replaceTag(t,n){if(!this.editor||!this.options.isTagAllowed(n.id))return;const o=this.createTagNode({id:n.id,text:n.label,direction:n.direction}),s=this.editor.querySelector(`.locked-tag[data-id="${t.id}"]`);s instanceof HTMLElement&&(s.replaceWith(o),this.handleInput())}deleteTag(t){const n=this.editor;if(!n)return;const o=n.querySelector(`.locked-tag[data-id="${t}"]`);o instanceof HTMLElement&&this.removeTag(o,"after");const s=this.parse(),r=s[0];s.length===1&&typeof r=="string"&&r.trim()===""&&(n.innerHTML="",this.options.onChange(this.parse()))}isAllowedTagNode(t){return ep(t)&&this.options.isTagAllowed(t.getAttribute("data-id")??"")}applyTagData(t,{text:n,direction:o}){t.innerText=n,o?t.dataset.direction=o:delete t.dataset.direction}createTagNode({id:t,text:n,direction:o}){const s=document.createElement("span");return s.contentEditable="false",s.className="locked-tag",s.dataset.id=t,this.applyTagData(s,{text:n,direction:o}),s}getEditorRange(){const t=window.getSelection();if(!this.editor||!(t!=null&&t.rangeCount))return null;const n=t.getRangeAt(0).cloneRange();return this.editor.contains(n.commonAncestorContainer)?cN(n):null}insertPlainText(t,n){const o=this.editor;if(!o)return;const s=window.getSelection();let r=n?cN(n):this.getEditorRange();(!r||!o.contains(r.commonAncestorContainer))&&(r=document.createRange(),r.selectNodeContents(o),r.collapse(!1)),r.deleteContents();const i=document.createTextNode(jE(t));r.insertNode(i),r.setStartAfter(i),r.collapse(!0),s==null||s.removeAllRanges(),s==null||s.addRange(r),this.handleInput()}sanitize(){const t=this.editor;if(!t)return;t.querySelectorAll(".locked-tag .locked-tag").forEach(o=>o.remove());let n=!1;if(Array.from(t.childNodes).forEach(o=>{if(_s(o)||this.isAllowedTagNode(o))return;n=!0;const s=ep(o)?"":jE(o.textContent??"");o.replaceWith(document.createTextNode(s))}),n){const o=window.getSelection(),s=document.createRange();s.selectNodeContents(t),s.collapse(!1),o==null||o.removeAllRanges(),o==null||o.addRange(s)}}ensureTagPadding(){var t;(t=this.editor)==null||t.querySelectorAll(".locked-tag").forEach(n=>{const o=n.previousSibling,s=n.nextSibling;_s(o)?o.data.endsWith(Er)||o.appendData(Er):n.before(document.createTextNode(Er)),_s(s)?s.data.startsWith(Er)||s.insertData(0,Er):n.after(document.createTextNode(Er));const r=n.nextSibling;_s(r)&&ep(r.nextSibling)&&r.length<2&&r.appendData(Er)})}async placeCaretAfterTag(t){var s;(s=this.editor)==null||s.focus(),await Promise.resolve();const n=document.createRange();n.setStart(t,Ci(t).start),n.collapse(!0);const o=window.getSelection();o==null||o.removeAllRanges(),o==null||o.addRange(n)}findAdjacentTag(t){const n=this.editor,o=window.getSelection();if(!n||!o||!o.isCollapsed||!o.rangeCount)return null;const{startContainer:s,startOffset:r}=o.getRangeAt(0);if(!n.contains(s))return null;const i=t==="Backspace";let a;if(s===n)a=i?n.childNodes[r-1]??null:n.childNodes[r]??null;else if(_s(s)&&s.parentNode===n){const{start:l,end:u}=Ci(s);if(i?Math.min(r,u)>l:Math.max(r,l)<u)return null;a=i?s.previousSibling:s.nextSibling}else return null;for(;loe(a);)a=i?a.previousSibling:a.nextSibling;return a&&this.isAllowedTagNode(a)?a:null}getBoundaryPoint(t){const n=this.editor,o=t==="start"?n.firstChild:n.lastChild;return _s(o)?[o,t==="start"?0:o.length]:[n,t==="start"?0:n.childNodes.length]}moveToEdge(t,n){const o=this.editor,s=window.getSelection();if(!o||!s)return;const[r,i]=this.getBoundaryPoint(t),a=n&&s.anchorNode&&o.contains(s.anchorNode)?{node:s.anchorNode,offset:s.anchorOffset}:{node:r,offset:i};s.setBaseAndExtent(a.node,a.offset,r,i),o.scrollLeft=t==="start"?0:o.scrollWidth}moveAcrossTag(t){const n=t==="ArrowLeft",o=this.findAdjacentTag(n?"Backspace":"Delete"),s=window.getSelection();if(!o||!s)return!1;const r=n?o.previousSibling:o.nextSibling;if(!_s(r))return!1;const i=Ci(r);return s.collapse(r,n?i.end:i.start),!0}deleteCharacter(t){const n=window.getSelection();if(!this.editor||!(n!=null&&n.isCollapsed)||!n.rangeCount)return!1;const{startContainer:o,startOffset:s}=n.getRangeAt(0);if(!_s(o)||o.parentNode!==this.editor)return!1;const{start:r,end:i}=Ci(o);let a,l=1,u=s;if(t==="Backspace"){if(a=Math.min(s,i)-1,a<r)return!1;/[\uDC00-\uDFFF]/.test(o.data[a])&&a>r&&(a--,l=2),u=s-l}else{if(a=Math.max(s,r),a>=i)return!1;/[\uD800-\uDBFF]/.test(o.data[a])&&a+1<i&&(l=2)}return o.deleteData(a,l),n.collapse(o,u),this.handleInput(),!0}removeTag(t,n){var r;const o=t.previousSibling,s=t.nextSibling;t.remove(),o instanceof Text&&s instanceof Text&&o.data.endsWith(Er)&&s.data.startsWith(Er)&&(n==="after"?o.deleteData(o.length-1,1):s.deleteData(0,1)),(r=this.editor)==null||r.normalize(),this.handleInput()}focus(){var o;(o=this.editor)==null||o.focus();const t=document.createRange();t.selectNodeContents(this.editor),t.collapse(!1);const n=window.getSelection();n==null||n.removeAllRanges(),n==null||n.addRange(t)}blur(){var t;(t=this.editor)==null||t.blur()}insertText(t){this.insertPlainText(t)}}const doe={class:"input-wrapper"},hoe=["data-placeholder"],dN=Et(ot({__name:"DynamicInput",props:{modelValue:{type:Array,default:()=>[]},placeholder:{type:String,default:"Rename to"},allowedTags:{type:Array,default:void 0}},emits:["update:modelValue","escape"],setup(e,{expose:t,emit:n}){const o=e,s=n,r=B(null),i=new coe({isTagAllowed:a=>!o.allowedTags||o.allowedTags.includes(a),onChange:a=>s("update:modelValue",a),onEscape:a=>s("escape",a)});return Jt(()=>{r.value&&i.mount(r.value,o.modelValue)}),Vn(()=>i.destroy()),Je(()=>o.modelValue,a=>{console.log("props.modelValue changed",a),i.sync(a)},{deep:!0}),t({insertTag:a=>i.insertTag(a),insertText:a=>i.insertText(a),updateTag:(a,l)=>i.updateTag(a,l),replaceTag:(a,l)=>i.replaceTag(a,l),deleteTag:a=>i.deleteTag(a),focus:()=>{i.focus()},triggerFocus:()=>{ft(()=>{var a;(a=r.value)==null||a.focus()})},blur:()=>{i.blur()}}),(a,l)=>(K(),he("div",doe,[be("div",{ref_key:"editorRef",ref:r,class:"custom-input single-line",contenteditable:"true","data-placeholder":e.placeholder,onPaste:l[0]||(l[0]=(...u)=>L(i).handlePaste&&L(i).handlePaste(...u)),onDrop:l[1]||(l[1]=(...u)=>L(i).handleDrop&&L(i).handleDrop(...u)),onBeforeinput:l[2]||(l[2]=(...u)=>L(i).handleBeforeInput&&L(i).handleBeforeInput(...u)),onInput:l[3]||(l[3]=(...u)=>L(i).handleInput&&L(i).handleInput(...u)),onKeydown:l[4]||(l[4]=(...u)=>L(i).handleKeydown&&L(i).handleKeydown(...u)),onClick:l[5]||(l[5]=Ht((...u)=>L(i).handleClick&&L(i).handleClick(...u),["stop","prevent"]))},null,40,hoe)]))}}),[["__scopeId","data-v-d5e78967"]]),foe={key:0},poe={key:1},hN=8,fN=Et(ot({__name:"PreviewName",props:{text:{}},setup(e){const t=qt,n=e,o=B(null),s=B(null),r=B(n.text),i=B(!1),a=d=>{const h=s.value;return h.textContent=d,h.offsetWidth},l=(d,h)=>{const f=d.slice(-hN),p=d.length-hN-1;if(p<1||a(d)<=h)return d;let g=0,v=p;for(;g<v;){const y=Math.ceil((g+v)/2);a(`${d.slice(0,y)}…${f}`)<=h?g=y:v=y-1}return`${d.slice(0,g)}…${f}`},u=()=>{!o.value||!s.value||(r.value=l(n.text,o.value.clientWidth),i.value=r.value!==n.text)};let c;return Jt(()=>{u(),c=new ResizeObserver(u),c.observe(o.value)}),Vn(()=>c==null?void 0:c.disconnect()),Je(()=>n.text,()=>ft(u)),(d,h)=>(K(),he("div",{ref_key:"rootRef",ref:o,class:"preview-name"},[i.value?Ue((K(),he("span",foe,[tt(at(r.value),1)])),[[L(t),{content:e.text,delay:[1e3,0],bypassOverflowCheck:!0}]]):(K(),he("span",poe,at(e.text),1)),be("span",{ref_key:"measureRef",ref:s,class:"measure","aria-hidden":"true"},null,512)],512))}}),[["__scopeId","data-v-f1310bab"]]),goe={class:"left-section"},moe={class:"modified-template-options"},voe=["onClick"],yoe={class:"setting-count"},woe={class:"field-label"},Coe={class:"field-label"},boe={class:"confirmation"},Soe={class:"preview-section"},Eoe={class:"preview-list"},_oe={key:0,class:"preview-more"},pN=8,qE=7,Roe=Et(ot({__name:"BulkRenamePopup",props:{item:{},selectAll:{type:Boolean},selectedItemsCount:{}},emits:["cancel","rename"],setup(e,{expose:t,emit:n}){const o=qt,s=Do,r=B(null),i=["number","letter","name"],a={number_up:"1→9",number_down:"9→1",letter_up:"A→Z",letter_down:"Z→A",name:"Name"},l=B({}),u=B(null),c=e,d=B([]),h=Y(()=>{const j=f.value;let q=0;const re="9999.",R={input:`${re}0`,bulkRenameButton:`${re}13`,cancelButton:`${re}12`,firstField:`${re}10`,stepField:`${re}11`,name:`${re}1`,number_up:`${re}2`,number_down:`${re}3`,letter_up:`${re}4`,letter_down:`${re}5`};return["name","number_up","number_down","letter_up","letter_down"].forEach((ae,pe)=>{q++,R[ae]=`${re}${q}`}),j?(q++,R.firstField=`${re}${q}`,q++,R.stepField=`${re}${q}`):(delete R.firstField,delete R.stepField),q++,R.cancelButton=`${re}${q}`,I.value?delete R.bulkRenameButton:(q++,R.bulkRenameButton=`${re}${q}`),console.log(R),R}),f=Y(()=>d.value.find(j=>typeof j!="string"&&(j.id==="number"||j.id==="letter"))),p=B("number"),g=B("up"),v=Po({...yi.number}),y=Po({...yi.number}),b=()=>{Object.assign(v,yi[p.value]),Object.assign(y,yi[p.value])};Je(f,j=>{if(!j)return;const q=j.id;q!==p.value&&(p.value=q,b()),g.value=j.direction==="down"?"down":"up"},{immediate:!0,flush:"sync"});const S=Y(()=>$O[g.value]),w=(j,q)=>{const re=UO(p.value,j,q);v[j]=re,Fv(j,re)&&(y[j]=re)},E=B(null),_=B(null),D=B(null),x=(j,q)=>{var R,H,ae,pe;if(q.key==="Enter"||q.key==="Escape")return;if(q.key==="Tab"){q.preventDefault(),q.stopPropagation(),q.stopImmediatePropagation();const Se=q.shiftKey;j=="first"&&(Se?(R=l.value.letter_down)==null||R.focus():(H=E.value)==null||H.focus()),j=="step"&&(Se?(ae=_.value)==null||ae.focus():(pe=D.value)==null||pe.focus());return}q.key.length===1&&!q.ctrlKey&&!q.metaKey&&!q.altKey&&!GO(p.value,j,q.key)&&q.preventDefault()},M=(j,q)=>{var pe;q.preventDefault();const re=q.target,R=((pe=q.clipboardData)==null?void 0:pe.getData("text/plain"))??"",H=re.selectionStart??re.value.length,ae=re.selectionEnd??re.value.length;re.value=re.value.slice(0,H)+R+re.value.slice(ae),w(j,re.value),re.value=v[j]},V=j=>{if(Fv(j,v[j]))return;const q=yi[p.value][j];v[j]=q,y[j]=q},A=Y(()=>f.value?pE({type:p.value,direction:g.value,first:y.first,step:y.step,count:c.item.length}):[]),P=Y(()=>d.value.every(j=>typeof j=="string"&&!j)),k=Y(()=>P.value||d.value.length==0&&d.value[0]===" "?c.item.map(j=>j.name):c.item.map((j,q)=>d.value.map(re=>typeof re=="string"?re:re.id==="name"?j.name:A.value[q]??"").join(""))),O=Y(()=>c.selectAll?c.selectedItemsCount-qE:k.value.length>pN?k.value.length-qE:0),N=Y(()=>k.value.length>pN?k.value.slice(0,qE):k.value),$=[{id:"name",name:"Current name",icon:null,description:{active:"Remove from the name",inactive:"Add the current name"}},{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"}}],W=j=>{ie.value=[j];const q=j.id.split("_")[0],re=j.id.split("_")[1],R=a[j.id],H=r.value;if(!H)return;const ae=Se=>d.value.find(Ce=>typeof Ce!="string"&&Se.includes(Ce.id));if(q==="name"){ae(["name"])?H.deleteTag("name"):H.insertTag({id:q,text:R,direction:void 0});return}const pe=ae(["number","letter"]);if(pe){const Se=pe.id===q,Ce=pe.direction===re;if(Se&&Ce){H.deleteTag(pe.id);return}H.deleteTag(pe.id),H.insertTag({id:q,text:R,direction:re})}else H.insertTag({id:q,text:R,direction:re})},oe=j=>ee(j.id)?j.description.active:!!f.value&&j.description.switch?j.description.switch:j.description.inactive,ie=B(null),ee=j=>{const[q,re]=j.split("_");return d.value.some(R=>typeof R!="string"&&R.id===q&&R.direction===re)},se=n,X=Y(()=>d.value.length===1&&typeof d.value.at(0)!="string"&&d.value[0].id==="name"),I=Y(()=>d.value.length===0||X.value),z=()=>{ie.value=null,d.value=[],se("cancel")},ne=()=>{const j=d.value.map(q=>typeof q=="string"?{type:"text",value:q}:q.id==="name"?{type:"current_name"}:{type:"counter",value:v.first,direction:q.direction=="up"?"asc":"desc",format:q.id==="number"?"number":"letter",step:v.step});se("rename",j)};t({reset:()=>{ie.value=null,d.value=[]},focus:()=>{var j;(j=r.value)==null||j.focus()}}),Jt(()=>{console.log("Focusing template input"),setTimeout(()=>{var j;(j=r.value)==null||j.focus()},500)});const xe=j=>{var q,re;console.log("Focusing popup"),j.preventDefault(),j.stopPropagation(),(q=r.value)==null||q.blur(),(re=u.value)==null||re.focus()},de=j=>{var q;(j.key==="Enter"||j.key==="Tab")&&((q=r.value)==null||q.focus()),j.key==="Escape"&&z()};return(j,q)=>(K(),he("div",{class:"bulk-rename-popup",id:"bulk-rename-el",ref_key:"popupRef",ref:u,onKeydown:de},[be("div",goe,[Ue(ye(dN,{modelValue:d.value,"onUpdate:modelValue":q[0]||(q[0]=re=>d.value=re),"allowed-tags":i,ref_key:"templateInputRef",ref:r,onEscape:xe},null,8,["modelValue"]),[[L(s),h.value.input]]),be("div",moe,[(K(),he(Pt,null,Dn($,re=>Ue((K(),he("button",{onClick:R=>W(re),ref_for:!0,ref:R=>l.value[re.id]=R,key:re.id,class:ce([{active:ee(re.id)},"template-option"])},[tt(at(re.name)+" ",1),re.icon?(K(),ze(L(gt),{key:0,src:re.icon,style:{transform:"rotate(90deg)"}},null,8,["src"])):qe("",!0)],10,voe)),[[L(o),{content:oe(re),bypassOverflowCheck:!0,delay:[300,0],interactive:!1,hideOnClick:!1,appendTo:"parent"}],[L(s),`${h.value[re.id]}`]])),64))]),be("div",yoe,[be("span",woe,at(S.value.first),1),Ue((K(),ze(L(dl),{ref_key:"firstFieldRef",ref:_,"model-value":v.first,disabled:!f.value,"max-length":L(hE),onInput:q[1]||(q[1]=re=>w("first",re)),onKeydown:q[2]||(q[2]=re=>x("first",re)),onPaste:q[3]||(q[3]=re=>M("first",re)),onBlur:q[4]||(q[4]=re=>V("first")),"show-clear":!1},{clear:we(()=>[...q[10]||(q[10]=[be("div",null,null,-1)])]),_:1},8,["model-value","disabled","max-length"])),[[L(s),h.value.firstField]]),be("span",Coe,at(S.value.step),1),Ue(ye(L(dl),{"model-value":v.step,disabled:!f.value,"max-length":L(fE),onInput:q[5]||(q[5]=re=>w("step",re)),onKeydown:q[6]||(q[6]=re=>x("step",re)),onPaste:q[7]||(q[7]=re=>M("step",re)),onBlur:q[8]||(q[8]=re=>V("step")),"show-clear":!1,ref_key:"fieldStepRef",ref:E},null,8,["model-value","disabled","max-length"]),[[L(s),h.value.stepField]])]),be("div",boe,[Ue((K(),ze(L(bt),{variant:"secondary",onClick:z,ref_key:"cancelBtnRef",ref:D},{default:we(()=>[...q[11]||(q[11]=[tt(" Cancel ",-1)])]),_:1})),[[L(s),h.value.cancelButton]]),Ue((K(),ze(L(bt),{onClick:ne,disabled:I.value,onKeydown:q[9]||(q[9]=po(re=>{re.stopPropagation(),re.preventDefault(),ne()},["enter"]))},{default:we(()=>[...q[12]||(q[12]=[tt(" Rename ",-1)])]),_:1},8,["disabled"])),[[L(s),h.value.bulkRenameButton]])])]),be("div",Soe,[q[13]||(q[13]=be("span",{class:"preview-title"},"Preview",-1)),be("ul",Eoe,[(K(!0),he(Pt,null,Dn(N.value,(re,R)=>(K(),he("li",{key:R},[ye(fN,{text:re},null,8,["text"])]))),128)),O.value>0?(K(),he("li",_oe," … "+at(O.value)+" more items ",1)):qe("",!0)])])],544))}}),[["__scopeId","data-v-9264bb9d"]]),Toe=ot({__name:"BulkRenameButton",props:{item:{},totalItem:{},selectAll:{}},emits:["cancel","rename"],setup(e,{expose:t,emit:n}){const{popupRef:o,show:s,hide:r,triggerRef:i}=vo({interactive:!0,trigger:"manually",placement:"top-end",showArrow:!1,offset:[-350,25],hideOnClick:!0,toggleOnClick:!0,onHide:()=>{h()},onShow:()=>{ft(()=>{var f;(f=d.value)==null||f.focus()})}}),a=e,l=()=>{r()},u=f=>{c("rename",f),r()},c=n,d=B(null),h=()=>{d.value&&d.value.reset()};return t({popupRef:o,hide:r,show:s,triggerRef:i}),(f,p)=>(K(),he(Pt,null,[be("div",{class:"trigger-el",ref_key:"triggerRef",ref:i},null,512),be("div",{class:"popup-el",ref_key:"popupRef",ref:o},[ye(Roe,{item:a.item,"select-all":a.selectAll==L(Ot).CHECKED,"selected-items-count":a.totalItem,ref_key:"bulkRenameRef",ref:d,onCancel:l,onRename:u},null,8,["item","select-all","selected-items-count"])],512)],64))}}),Doe={style:{"max-width":"225px","line-height":"14px"}},xoe={style:{"max-width":"100px","line-height":"14px"}},Aoe=Et(ot({__name:"BulkUpdate",props:{selectRowData:{},workspaceId:{},entityId:{},gridApi:{},selectedAll:{type:Boolean},takeName:{},totalRows:{},visibleRows:{},loading:{type:Boolean}},emits:["close","assignStatus","assignAssignee","assignDate","assignMetric","moreActions","deleteSelected","unselect","updated","selectAll","refreshSelectedRow"],setup(e,{emit:t}){const n=qt,o=Do,s=e,r=t,{handelSelectAll:i}=Vf(),a=B(null),{selectionStatus:l,isSelectAll:u,selectedIds:c,isBulkUpdate:d,isUpdating:h,isLoading:f,handleUpdateStart:p,handleUpdatePostUpdate:g,handleUpdateFailed:v,handleUpdateBulkStatus:y,handleUpdateBulkDate:b,handleBulkUpdateMetric:S,handleUpdateNewAssignee:w,handleDelete:E,handleArchive:_,handleUnarchive:D,deleteThumbnail:x,deleteRendition:M,handleBulkUpdateName:V}=iQ(s,a,{onUpdated:()=>r("updated"),onRefreshSelectedRow:()=>r("refreshSelectedRow")});ri("bulkUpdate",d),ri("isSelectAll",u);const A=["primary"],P=[{label:"Rename",icon:"Pen",id:"bulk-rename",type:"icon",value:"bulk-rename"},{label:"Delete Thumbnail",icon:"Image",id:"delete-thumbnail",type:"icon",value:"delete-thumbnail"},{label:"Delete Rendition",icon:"Film",id:"delete-rendition",type:"icon",value:"delete-rendition"},{label:"Unarchive",value:"UnBoxArchive",type:"icon",icon:"BoxArchive",id:"unarchive",clickable:!0},{label:"Archive",value:"BoxArchive",type:"icon",icon:"BoxArchive",id:"archive",clickable:!0},{label:"Delete",value:"delete",type:"icon",icon:"TrashCan",id:"delete",danger:!0,clickable:!0}],k=()=>{r("unselect")},O=eE(),{userPermissions:N}=go(O),$=Y(()=>N.value.includes(tE)),W=Y(()=>{if(!$.value){console.error("User does not have permission to open review.");return}return l.value==Ot.CHECKED?Zo({type:"review_take",config:{reviewDomain:ln.getInstance().getItem("BASE_REVIEW_URL"),ws_code:s.workspaceId,take_id:s.entityId}}).url:Zo({type:"review_multiple_scenes",config:{reviewDomain:ln.getInstance().getItem("BASE_REVIEW_URL"),ws_code:s.workspaceId,scene_ids:c.value.join(",")}}).url}),oe=B(null),ie=async ne=>{var me,xe,de;try{switch(h.value=!0,f.value=!0,ne.id){case"unarchive":await D();break;case"delete":await E();break;case"archive":await _();break;case"delete-thumbnail":await x();break;case"delete-rendition":await M();break;case"bulk-rename":I(),(me=a.value)==null||me.hide();break;default:console.error("Unknown action:",ne.id),f.value=!1;break}}catch(j){console.error("Error performing action:",j),(xe=a.value)==null||xe.open()}finally{(de=oe.value)==null||de.focus(),ft(()=>{h.value=!1,f.value=!1})}},ee=(ne,me)=>{var xe;!ne&&me&&((xe=oe.value)==null||xe.focus())},se=Y(()=>({workspaceId:s.workspaceId,entityId:s.entityId,variant:A,disabled:h.value,ids:l.value==Ot.CHECKED?[]:c.value})),X=B(null),I=()=>{var ne;(ne=X.value)==null||ne.show()},z=Y(()=>s.selectRowData.map((ne,me)=>({name:ne.name,index:me})));return(ne,me)=>Ue((K(),he("div",{class:ce(ne.$style["bulk-update-action"])},[be("div",{class:ce(ne.$style["left-actions"])},[be("div",{class:ce(ne.$style["selection-track"])},[ye(bt,{class:ce(ne.$style["btn-close"]),variant:["tertiary","icon"],onClick:k,style:{background:"transparent"}},{prefix:we(()=>[ye(gt,{src:"XMarkSolid",source:"remote"})]),_:1},8,["class"]),L(l)==L(Ot).INDETERMINATE?(K(),he("span",{key:0,class:ce(ne.$style["selected-count"])},at(e.selectRowData.length)+" selected ",3)):qe("",!0),L(l)==L(Ot).CHECKED?(K(),he("span",{key:1,class:ce(ne.$style["selected-count"]),style:{"line-height":"14px"}},[me[0]||(me[0]=tt(' All in  " ',-1)),Ue((K(),he("span",Doe,[tt(at(e.takeName),1)])),[[L(n),{content:e.takeName}]]),me[1]||(me[1]=tt(' " ',-1))],2)):qe("",!0),!e.loading&&L(l)==L(Ot).INDETERMINATE&&e.totalRows>e.selectRowData.length&&e.selectRowData.length==e.visibleRows?(K(),ze(bt,{key:2,variant:"secondary",onHandleClick:L(i)},{default:we(()=>[be("span",{class:ce(ne.$style["selected-count"]),style:{"line-height":"14px"}},[me[2]||(me[2]=tt(' Select all in  " ',-1)),Ue((K(),he("span",xoe,[tt(at(e.takeName),1)])),[[L(n),{content:e.takeName}]]),me[3]||(me[3]=tt(' " ',-1))],2)]),_:1},8,["onHandleClick"])):qe("",!0),be("span",{class:ce(ne.$style.divider)},null,2)],2),ye(aoe,Kt(se.value,{onUpdated:L(y),onUpdateStart:L(p),onUpdateCompleted:L(g),onUpdateFailed:L(v),"selected-all":L(l)==L(Ot).CHECKED}),null,16,["onUpdated","onUpdateStart","onUpdateCompleted","onUpdateFailed","selected-all"]),ye(IQ,Kt({onUpdate:L(w),onUpdateStart:L(p),onUpdateCompleted:L(g),onUpdateFailed:L(v),"selected-all":L(l)==L(Ot).CHECKED},se.value),null,16,["onUpdate","onUpdateStart","onUpdateCompleted","onUpdateFailed","selected-all"]),ye(UQ,Kt({"row-selected":e.selectRowData,"selected-all":L(l)==L(Ot).CHECKED},se.value,{onUpdated:L(b),onUpdateStart:L(p),onUpdateCompleted:L(g),onUpdateFailed:L(v)}),null,16,["row-selected","selected-all","onUpdated","onUpdateStart","onUpdateCompleted","onUpdateFailed"]),ye(soe,{disabled:L(h),onUpdate:L(S),onUpdateStart:L(p),onUpdateCompleted:L(g),onUpdateFailed:L(v),selectedIds:L(c),"workspace-id":e.workspaceId,variant:A,"entity-id":e.entityId,"selected-all":L(l)==L(Ot).CHECKED},null,8,["disabled","onUpdate","onUpdateStart","onUpdateCompleted","onUpdateFailed","selectedIds","workspace-id","entity-id","selected-all"]),be("span",{class:ce(ne.$style.divider)},null,2),Ue((K(),he("div",null,[$.value?(K(),ze(bt,{key:0,class:ce(ne.$style["action-button"]),variant:[...A,"icon"],href:W.value,disabled:L(h)||s.selectRowData.length>40&&L(l)!=L(Ot).CHECKED},{default:we(()=>[ye(gt,{src:"PenRuler",class:ce(ne.$style["icon-btn"])},null,8,["class"])]),_:1},8,["class","variant","href","disabled"])):qe("",!0)])),[[L(n),s.selectRowData.length<=40||L(l)==L(Ot).CHECKED?"Open in Review":"Select fewer than 40 items to open in Review"]]),be("span",{class:ce(ne.$style.divider)},null,2),ye(Uf,{ref_key:"wrapperRef",ref:a,isUpdating:L(h),disabled:L(h),onOnVisibleChange:ee},{trigger:we(({hide:xe,toggle:de,isVisible:j,disabled:q})=>[Ue((K(),ze(bt,{onEscape:xe,actived:j,ref_key:"moreActionRef",ref:oe,class:ce(ne.$style["action-button"]),variant:["secondary","icon"],loading:L(f),disabled:q||L(h),onClick:Ht(de,["stop"])},{default:we(()=>[ye(gt,{src:"EllipsisVertical",class:ce(ne.$style.icon),source:"remote"},null,8,["class"])]),_:1},8,["onEscape","actived","class","loading","disabled","onClick"])),[[L(o),"99999"],[L(n),{content:"More actions"}]])]),popup:we(({isVisible:xe,hide:de})=>[(K(),he(Pt,null,Dn(P,(j,q)=>ye(hl,Kt({clickable:!0,key:j.id},{ref_for:!0},j,{show:xe,style:{borderLeft:0},"focus-index":"99999."+q,onClick:()=>{ie(j)},onEscape:de}),null,16,["show","focus-index","onClick","onEscape"])),64))]),_:1},8,["isUpdating","disabled"])],2),ye(Toe,{item:z.value,totalItem:L(u)?s.totalRows:z.value.length,"select-all":L(l),onRename:L(V),ref_key:"bulkRenameButtonRef",ref:X},null,8,["item","totalItem","select-all","onRename"])],2)),[[lr,e.selectRowData.length>0]])}}),[["__cssModules",{$style:{"bulk-update-action":"_bulk-update-action_1odua_1","left-actions":"_left-actions_1odua_20","right-actions":"_right-actions_1odua_21","selection-track":"_selection-track_1odua_26","btn-close":"_btn-close_1odua_32","close-icon":"_close-icon_1odua_38","selected-count":"_selected-count_1odua_42",divider:"_divider_1odua_48","more-button":"_more-button_1odua_53",dropdown:"_dropdown_1odua_57","dropdown-content":"_dropdown-content_1odua_60",delete:"_delete_1odua_83","icon-btn":"_icon-btn_1odua_90","selected-list":"_selected-list_1odua_94"}}]]),ml=Et(ot({name:"LabelRenderer",__name:"LabelRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean}},setup(e){const t=Vs,n=qt,o=e,s=Y(()=>({disabled:o.disabled,error:!1,readOnly:o.readOnly,isEmpty:o.value===void 0||o.value===null||o.value==="",clickable:!0})),{argsMain:r}=xo(s),i=Y(()=>{var u,c,d;return!!((u=o.params)!=null&&u.api||(c=o.params)!=null&&c.node||(d=o.params)!=null&&d.context)}),a=Y(()=>{if(o.tooltip){if(typeof o.tooltip=="string")return{content:o.tooltip};if(typeof o.tooltip=="object"&&"display_name"in o.tooltip){const u=o.tooltip,c=document.createElement("div");c.classList.add("tooltip-user-info"),c.style.display="flex",c.style.alignItems="center",c.style.gap="4px";const d=document.createElement("div"),h=ye(wf,{id:u.id,name:u.display_name,profile_image:u.profile_image,size:20,initial:u.initial,color:u.color});YC(h,d);const f=document.createElement("span");f.innerText=u.display_name,f.classList.add("tooltip-user-name");const p=document.createElement("span");p.style.whiteSpace="nowrap",p.innerText="By",c.appendChild(p),c.appendChild(d),c.appendChild(f);const g=document.getElementById("item-table-layout-id");return{content:c,allowHtml:!0,appendTo:g||document.body,bypassOverflowCheck:!0}}}return{content:void 0}}),l=Y(()=>o.value===void 0);return(u,c)=>Ue((K(),ze(Oo,Kt(L(r),{ref:"displayWrapperRef"}),{default:we(()=>[be("span",{class:ce(u.$style["item-table-label-renderer"])},at(o.value||"-"),3)]),_:1},16)),[[L(t),{isLoading:l.value||!i.value}],[L(n),a.value]])}}),[["__cssModules",{$style:{"item-table-label-renderer":"_item-table-label-renderer_s1gdy_1"}}]]),Ioe=["placeholder","maxlength"],Poe={key:0,class:"wrapper-suffix"},koe=Et(ot({name:"LabelEditor",__name:"LabelEditor",props:{value:{},placeholder:{default:"Enter name"},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{},saveOnBlur:{type:Boolean,default:!0},bordered:{type:Boolean},keyboardFocusing:{type:Boolean}},emits:["update:value","enter","blur"],setup(e,{expose:t,emit:n}){const o=Vs,s=qt,r=e,i=n,a=B(r.value),l=B(null),u=B(null),c=B(r.value||""),d=B(!1),h=B(!1),f=Y(()=>{var A;return{disabled:r.disabled,error:!1,readOnly:r.readOnly,isEmpty:((A=r.value)==null?void 0:A.length)===0,inputRef:l,wrapperRef:u,clickable:!0,focused:d.value||r.keyboardFocusing}}),{argsMain:p,isHover:g}=xo(f),v=()=>c.value!==a.value,y=()=>{h.value=!0,d.value=!1,c.value=a.value,i("update:value",a.value),setTimeout(()=>{h.value=!1},100)},b=()=>{if(!d.value||!l.value)return;const A=l.value.value;if(!v()){d.value=!1;return}a.value=A,i("update:value",A),i("enter",A),d.value=!1},S=()=>{h.value||(r.saveOnBlur?b():y(),i("blur",c.value))},w=A=>{var P;if(A.key==="ArrowLeft"||A.key==="ArrowRight"){A.stopPropagation();return}A.ctrlKey&&(A.key=="a"||A.key=="A")?(A.stopPropagation(),(P=l.value)==null||P.select()):A.key==="Enter"?(A.preventDefault(),A.stopPropagation(),b()):A.key==="Escape"&&(A.preventDefault(),A.stopPropagation(),y())},E=()=>{a.value=r.value,c.value=r.value,d.value=!0,ft(()=>{var A,P;(A=l.value)==null||A.click(),(P=l.value)==null||P.focus()})},_=()=>{var A;d.value?y():(A=l.value)==null||A.blur(),i("blur",c.value)},D={focus:()=>{E()}};Jt(()=>{var P;const A=(P=u.value)==null?void 0:P.$el;A&&(A.__sceneNameEditor=D)}),Vn(()=>{const A=u.value;A&&delete A.__sceneNameEditor});const x=B(null),M=B(null);t({focus:E,blur:()=>{var A;return(A=l.value)==null?void 0:A.blur()},save:b,cancel:y,focusEditButton:()=>{ft(()=>{var A;(A=x.value)==null||A.focus()})},focusCancelButton:()=>{ft(()=>{var A;(A=M.value)==null||A.focus()})},startEdit:E});const V=Y(()=>r.value===void 0);return yE(u,()=>{d.value&&S()}),(A,P)=>Ue((K(),ze(L(Oo),Kt(L(p),{ref_key:"wrapperRef",ref:u,bordered:r.bordered,style:{paddingTop:"0px",paddingBottom:"0px"}}),Lh({default:we(()=>[d.value?qe("",!0):kt(A.$slots,"default",{isEditting:d.value,isHover:L(g)},()=>[Ue((K(),he("span",{class:ce(A.$style["label-renderer"])},[tt(at(c.value),1)],2)),[[L(s),{content:c.value||void 0}]])],void 0,0),Ue(be("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":P[0]||(P[0]=k=>c.value=k),class:ce(A.$style["label-editor"]),placeholder:e.placeholder,maxlength:e.maxLength,onKeydown:w,onBlur:S},null,42,Ioe),[[lr,d.value],[J1,c.value]])]),_:2},[!e.disabled&&!e.readOnly?{name:"suffix",fn:we(({hovered:k,focused:O})=>[k?(K(),he("div",Poe,[k&&!O?Ue((K(),ze(bt,{key:0,variant:["icon","secondary"],size:24,onClick:Ht(E,["prevent","stop"]),tabindex:"0",ref_key:"editButtonRef",ref:x,onKeydown:[po(Ht(E,["prevent","stop"]),["enter"]),po(Ht(_,["prevent","stop"]),["escape"])]},{default:we(()=>[ye(L(gt),{src:"Pen",source:"remote"})]),_:1},8,["onKeydown"])),[[L(s),"Edit"]]):qe("",!0)])):qe("",!0)]),key:"0"}:void 0]),1040,["bordered"])),[[L(o),{isLoading:V.value}]])}}),[["__cssModules",{$style:{"label-renderer":"_label-renderer_cyzth_1","label-editor":"_label-editor_cyzth_10"}}]]),Foe=["tabindex"],gN=Et(ot({name:"SceneNameEditor",__name:"SceneNameEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},placeholder:{default:"Enter name"}},emits:["update:value","enter","blur"],setup(e,{expose:t,emit:n}){const o=qt,s=Vs,r=e,i=n,a=B(r.value),l=B(r.value),u=B(null),c=B(null),d=En("bulkUpdate",!1),{apiServices:h}=no(!d,r),f=Y(()=>{var ee;return{componentType:void 0,disabled:r.disabled,error:!1,readOnly:r.readOnly,isEmpty:((ee=a==null?void 0:a.value)==null?void 0:ee.length)===0,inputRef:u,wrapperRef:c,clickable:!0}}),{isFocus:p}=xo(f),g=Y(()=>{const ee=ln.getInstance().getItem("ws.code"),se=ln.getInstance().getItem("BASE_URL"),X=ee||r.workspaceId;return Zo({type:"scene_hub",config:{baseDomain:se,ws_code:X,scene_id:String(r.id)}}).url}),v=Y(()=>{var ee,se,X;return((se=(ee=r.data)==null?void 0:ee.isProcessing)==null?void 0:se.state)==0||((X=r.data)==null?void 0:X.isDeleted)==!0}),y=Y(()=>r.readOnly||_.value),b=Y(()=>{var ee,se,X,I,z;return((ee=r.data)==null?void 0:ee.isDeleted)==!0||((X=(se=r.data)==null?void 0:se.isProcessing)==null?void 0:X.state)==0||((z=(I=r.data)==null?void 0:I.isProcessing)==null?void 0:z.state)==1}),S=Y(()=>{var ee,se;return(se=(ee=r.data)==null?void 0:ee.isProcessing)==null?void 0:se.message}),w=Y(()=>{var ee;return((ee=r.data)==null?void 0:ee.isArchived)==1}),E=Y(()=>{var ee;return((ee=r.data)==null?void 0:ee.isLocked)==1}),_=Y(()=>r.value===void 0),D=Y(()=>{var ee,se;return((se=(ee=r.data)==null?void 0:ee.permissions)==null?void 0:se.has_edit_permission)==1}),x=async ee=>{var se,X,I,z,ne,me,xe,de,j,q;a.value=ee,p.value=!1;try{const re=await((X=(se=h.value)==null?void 0:se.updateSceneName)==null?void 0:X.call(se,{workspaceId:r.workspaceId,entityId:r.entityId,itemId:r.id,name:a.value})),R=yv.get(rO)||"UTC";if(re){const H=uO(re,R),ae={...r.data,...H};(I=r.params)==null||I.api.clearFocusedCell();const pe=((ne=(z=r.params)==null?void 0:z.column)==null?void 0:ne.getColId())||"",Se=((xe=(me=r.params)==null?void 0:me.node)==null?void 0:xe.rowIndex)||0;(de=r.params)==null||de.api.setFocusedCell(Se,pe),(q=(j=r.params)==null?void 0:j.node)==null||q.setData(ae),l.value=a.value,i("enter")}else a.value=l.value}catch(re){console.error("Failed to update scene name:",re),a.value=l.value}},M={focus:()=>{p.value=!0,ft(()=>{var ee;return(ee=c.value)==null?void 0:ee.focus()})},startEdit:()=>{var ee;(ee=c.value)==null||ee.startEdit()}},V=()=>c.value?"$el"in c.value?c.value.$el:c.value:null;Je(()=>r.value,ee=>{a.value=ee,l.value=ee}),Jt(()=>{const ee=V();ee&&(ee.__sceneNameEditor=M)}),Vn(()=>{const ee=c.value,se=ee&&"$el"in ee?ee.$el:ee;se&&delete se.__sceneNameEditor});const A=md(),{openSceneHub:P}=A,k=ee=>{try{if(ee.ctrlKey||ee.metaKey){window.open(g.value,"_blank");return}P(String(r.id))}catch{window.open(g.value,"_blank")}finally{oe()}},O=()=>{setTimeout(()=>{ie.value=!0,N.value=0,ft(()=>{var ee;(ee=$.value)==null||ee.focus()})},300)},N=B(-1),$=B(null);t({focus:O,trigerFocus:O,startEdit:()=>{var ee;(ee=c.value)==null||ee.startEdit()}});const W=ee=>{if(ee.key==="Enter"){ee.preventDefault(),k(ee);return}if(ee.key==="Escape"){ee.preventDefault(),oe();return}ee.key==="Tab"&&(ee.preventDefault(),ee.stopPropagation(),ee.stopImmediatePropagation(),ft(()=>{var se;(se=c.value)==null||se.focusEditButton()}))},oe=()=>{var X,I,z,ne,me,xe;ie.value=!1,N.value=-1,(X=r.params)==null||X.api.clearFocusedCell();const ee=((z=(I=r.params)==null?void 0:I.column)==null?void 0:z.getColId())||"",se=((me=(ne=r.params)==null?void 0:ne.node)==null?void 0:me.rowIndex)||0;(xe=r.params)==null||xe.api.setFocusedCell(se,ee)},ie=B(!1);return(ee,se)=>Ue((K(),ze(koe,{"save-on-blur":!0,ref_key:"wrapperRef",ref:c,disabled:r.disabled,"read-only":y.value,placeholder:r.placeholder,value:a.value,"onUpdate:value":se[0]||(se[0]=X=>a.value=X),id:`scene-name-${r.id}`,onEnter:x,"max-length":255,bordered:!0,keyboardFocusing:ie.value,onBlur:oe},{default:we(({isHover:X,isEditting:I})=>[Ue(be("div",{class:ce(ee.$style["scene-name-display"])},[Ue((K(),he("a",{tabindex:N.value,ref_key:"nameRef",ref:$,onClick:Ht(k,["prevent"]),onKeydown:W,target:"_blank",class:ce(ee.$style["scene-name-text"]),style:{lineHeight:"28px"}},[tt(at(a.value),1)],42,Foe)),[[L(o),{content:a.value,delay:[1e3,0]}]]),y.value||!X&&!I&&!y.value?(K(),he(Pt,{key:0},[E.value?Ue((K(),he("div",{key:0,class:ce([ee.$style["icon-processing"],ee.$style.isLocked])},[ye(gt,{src:"Lock",color:D.value?"#a6a6a6":"#232323"},null,8,["color"])],2)),[[L(o),{content:D.value?"Locked — You can still edit, or unlock by changing the status from completed":"Locked",delay:[1e3,0]}]]):qe("",!0),w.value?Ue((K(),he("div",{key:1,class:ce([ee.$style["icon-processing"],ee.$style.archived])},[ye(gt,{src:"BoxArchive"})],2)),[[L(o),{content:"Archived",delay:[1e3,0]}]]):qe("",!0),b.value?Ue((K(),he("div",{key:2,class:ce([ee.$style["icon-processing"],ee.$style.processing,v.value&&ee.$style["icon-red"]])},[ye(gt,{src:"AnimatedHourglass",color:"inherit"})],2)),[[L(o),S.value]]):qe("",!0)],64)):qe("",!0)],2),[[lr,!L(p)]])]),_:1},8,["disabled","read-only","placeholder","value","id","keyboardFocusing"])),[[L(s),{isLoading:_.value}]])}}),[["__cssModules",{$style:{"scene-name-editor":"_scene-name-editor_nare0_1","scene-name-display":"_scene-name-display_nare0_11","icon-processing":"_icon-processing_nare0_18",archived:"_archived_nare0_28",locked:"_locked_nare0_31",processing:"_processing_nare0_34","icon-red":"_icon-red_nare0_38","scene-name-text":"_scene-name-text_nare0_43"}}]]),YE=Et(ot({__name:"ButtonDropdown",props:{label:{},value:{},variant:{},options:{default:()=>[]},size:{},placement:{default:"bottom"},disabled:{type:Boolean},readOnly:{type:Boolean},tabIndex:{}},emits:["select","handleClick","open"],setup(e,{expose:t,emit:n}){const o=Do,s=B([]),r=e,i=B(null),a=Y(()=>typeof r.size=="number"?`${r.size}px`:{small:"24px",medium:"32px",large:"48px"}[r.size]??"32px"),l=Y(()=>{let y=[];return typeof r.variant=="string"?y.push(r.variant):Array.isArray(r.variant)&&(y=[...r.variant]),[...y,"icon"]}),u=n,{hide:c,isVisible:d,show:h,triggerRef:f,popupRef:p,instance:g}=vo({toggleOnClick:!0,offset:[0,0],onShow:()=>u("open")});function v(y){u("select",y),c()}return Nh(()=>{g.value&&g.value.setProps({placement:r.placement})}),t({show:h,hide:c,hideDropdown:()=>{c()},popupRef:p}),Je(d,y=>{var b;y&&((b=p.value)==null||b.focus())}),(y,b)=>(K(),he("div",{class:ce(y.$style["button-dropdown-wrapper"]),style:cn({"--button-size":a.value})},[be("div",{class:ce(y.$style["button-group"])},[kt(y.$slots,"prefix"),be("div",{ref_key:"triggerRef",ref:f,class:ce(L(d)?y.$style.open:"")},[kt(y.$slots,"triggerDropdown",{open:L(d)},()=>[r.readOnly?qe("",!0):Ue((K(),ze(bt,{key:0,onEscape:L(c),ref_key:"mainButton",ref:i,actived:L(d),class:ce(y.$style["button-dropdown-trigger"]),variant:l.value,size:e.size,disabled:r.disabled},{default:we(()=>[kt(y.$slots,"iconDropdown",{},()=>[ye(gt,{class:ce(y.$style["icon-dropdown"]),src:"ChevronDown",source:"remote"},null,8,["class"])])]),_:3},8,["onEscape","actived","class","variant","size","disabled"])),[[L(o),e.tabIndex]])])],2)],2),be("div",{ref_key:"popupRef",ref:p,tabindex:"0",class:ce(y.$style["button-dropdown-list"]),style:{borderRadius:"var(--radius-lg)",overflow:"hidden"}},[(K(!0),he(Pt,null,Dn(e.options,(S,w)=>Ue((K(),ze(hl,Kt({ref_for:!0,ref:E=>s.value[w]=E,key:S.value},{ref_for:!0},{...S},{"icon-name":S.icon,onClick:Ht(E=>v(S.value||""),["stop","prevent"]),style:{borderLeft:0}}),{label:we(()=>[tt(at(S.label),1)]),_:2},1040,["icon-name","onClick"])),[[L(o),`${e.tabIndex}.${w}`]])),128))],2)],6))}}),[["__cssModules",{$style:{"button-dropdown-wrapper":"_button-dropdown-wrapper_1g99p_1","button-group":"_button-group_1g99p_7","overflow-elipsis":"_overflow-elipsis_1g99p_26","button-dropdown-list":"_button-dropdown-list_1g99p_33",show:"_show_1g99p_38","button-dropdown-item":"_button-dropdown-item_1g99p_41","icon-dropdown":"_icon-dropdown_1g99p_48",open:"_open_1g99p_51"}}]]),tp=Et(ot({__name:"CloseBadgeWrapper",props:{disableRemove:{type:Boolean,default:!0},tooltip:{default:"Unassign"}},emits:["clear"],setup(e,{emit:t}){const n=qt,o=e,s=t,r=a=>{a.preventDefault(),a.stopImmediatePropagation(),a.stopPropagation(),s("clear")},i=Y(()=>({content:o.tooltip,contentClass:"extra-padding",appendTo:()=>globalThis.document.body}));return(a,l)=>(K(),he("div",{class:ce(a.$style["close-wrapper"])},[e.disableRemove?qe("",!0):(K(),he("div",{key:0,class:ce(a.$style["close-button"])},[Ue((K(),ze(bt,{variant:["icon","tertiary"],style:{background:"white"},"aria-label":"remove",onClick:r,size:16,rounded:!0},{default:we(()=>[ye(gt,{src:"CircleXMark",size:"16",color:"var(--primary-color)"})]),_:1})),[[L(n),i.value]])],2)),kt(a.$slots,"default")],2))}}),[["__cssModules",{$style:{"close-wrapper":"_close-wrapper_15u1e_1","close-button":"_close-button_15u1e_5"}}]]),Ooe=Et(ot({name:"AssigneeGroupRenderer",__name:"AssigneeGroupRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean,default:!0},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},error:{type:Boolean},maxVisible:{default:4}},setup(e){const t=qt,n=Vs,o=e,{isEditing:s}=ld(o),r=B(o.value),i=B(null),a=B(null),{apiServices:l}=no(!0,o),u=B(!0),c=()=>{u.value=o.value===void 0};Ug(()=>{c()}),Jt(()=>{c()}),Je(()=>o.value,x=>{c()});const d=Y(()=>({disabled:o.disabled,readOnly:o.readOnly,error:o.error,inputRef:i,wrapperRef:a,clickable:!(o.readOnly||u.value),active:s})),{argsMain:h,isHover:f}=xo(d),p=Y(()=>{var x;return((x=r.value)==null?void 0:x.slice(0,o.maxVisible))||[]}),g=Y(()=>{var x;return Math.max(0,(((x=r.value)==null?void 0:x.length)||0)-o.maxVisible)}),v=Y(()=>{var x;return g.value<=0?"":((x=r.value)==null?void 0:x.slice(o.maxVisible).map(M=>M.name).join(", "))||""}),y=Y(()=>p.value.map(x=>({id:x.id,name:x.name,initial:x.initial,avatarId:x.id,profile_image:x.profile_image,color:x.color,size:24,user:x}))),b=Y(()=>({color:f.value?"var(--primary-color)":"var(--grey-300)",display:"flex",alignItems:"center",marginLeft:"4px"}));Je(()=>o.value,x=>{r.value=x},{immediate:!0,deep:!0});const S=async x=>{var V,A,P;await D(x)&&(r.value=(V=r.value)==null?void 0:V.filter(k=>k.id!==x),(P=o.params)==null||P.node.setData({...(A=o.params)==null?void 0:A.node.data,assignees:r.value}))},w=x=>{var V;const M=ln.getInstance().getItem("ws.code");return((V=l.value)==null?void 0:V.getUserInformation(M,x))||Promise.resolve(null)},{id:E}=Ag(o),_=x=>{var V,A;const M=(A=(V=o.params)==null?void 0:V.api)==null?void 0:A.getRowNode(String(E.value));M==null||M.setDataValue("assignees",Xm(x.assignees))},{removeAssignee:D}=Sv({...o,entityId:o.entityId,updateRowData:_,value:o.value,errorCallback:()=>{}});return(x,M)=>Ue((K(),ze(Oo,Kt(L(h),{ref_key:"wrapperRef",ref:a,bordered:!0}),{default:we(()=>{var V;return[be("div",{class:ce(x.$style.assigneeGroupRenderer)},[((V=r.value)==null?void 0:V.length)===0?(K(),ze(gt,{key:0,src:"UserPlus",source:"remote",color:"#6B6B6B",style:cn(b.value)},null,8,["style"])):qe("",!0),(K(!0),he(Pt,null,Dn(y.value,A=>(K(),ze(tp,{key:A.id,"disable-remove":o.readOnly||o.disabled,onClear:P=>S(A.id),style:{marginLeft:"0"}},{default:we(()=>[ye(Au,{user:A.user,"show-profile":!0,apiUpdateFunction:w,class:ce(x.$style["ib-assignee-avatar"])},null,8,["user","class"])]),_:2},1032,["disable-remove","onClear"]))),128)),g.value>0?Ue((K(),he("div",{key:1,class:ce(x.$style["extra-avatars"])},[tt(" +"+at(g.value),1)],2)),[[L(t),v.value]]):qe("",!0)],2)]}),_:1},16)),[[L(n),{isLoading:u.value}]])}}),[["__cssModules",{$style:{assigneeGroupRenderer:"_assigneeGroupRenderer_14fiu_1","ib-assignee-group-renderer":"_ib-assignee-group-renderer_14fiu_7","ib-assignee-avatar":"_ib-assignee-avatar_14fiu_16","assignee-wrapper":"_assignee-wrapper_14fiu_20","extra-avatars":"_extra-avatars_14fiu_27"}}]]),Moe=Et(ot({name:"DateRangeRenderer",__name:"DateRangeRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean,default:!1},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},isStarted:{type:Boolean},isCompleted:{type:Boolean},timezone:{}},setup(e){var _,D;const t=qt,n=Vs,o=JS(),s=e,r=B(null),i=B(null),{isEditing:a}=ld(s),l=x=>{if(x){if(typeof x=="string")return x;if(x instanceof Date)return x.toISOString()}},u=Y(()=>s.value===void 0),c=Y(()=>{var x;return(x=s.data)==null?void 0:x.isStarted}),d=Y(()=>{var x;return(x=s.data)==null?void 0:x.isCompleted}),h=Y(()=>!!(s.value&&(s.value[0]||s.value[1]))),f=Y(()=>h.value?s.disabled&&!s.readOnly?"var(--disabled-color)":"var(--primary-color)":"var(--grey-300)"),p=Y(()=>({disabled:s.disabled,error:!1,readOnly:s.readOnly,inputRef:r,wrapperRef:i,clickable:!0,active:a})),{argsMain:g}=xo(p),{startDate:v,endDate:y,startClasses:b,endClasses:S,fullStartDate:w,fullEndDate:E}=zZ({start:l((_=s.value)==null?void 0:_[0]),end:l((D=s.value)==null?void 0:D[1]),isStarted:c.value,isEnded:d.value,timezone:s.timezone||o});return(x,M)=>Ue((K(),ze(Oo,Kt(L(g),{ref_key:"wrapperRef",ref:i,bordered:!0}),{default:we(()=>[u.value?qe("",!0):(K(),he("div",{key:0,class:ce(x.$style.dateRangeRenderer)},[h.value?qe("",!0):(K(),ze(gt,{key:0,src:"Calendar",class:ce(x.$style.calendarIcon),color:f.value},null,8,["class","color"])),h.value?(K(),he(Pt,{key:1},[Ue((K(),he("span",{class:ce([x.$style.dateLabelDisplay,...L(b).map(V=>x.$style[V])])},[tt(at(L(v)),1)],2)),[[L(t),L(w)]]),M[0]||(M[0]=be("span",null,"→",-1)),Ue((K(),he("span",{class:ce([x.$style.dateLabelDisplay,...L(S).map(V=>x.$style[V])])},[tt(at(L(y)),1)],2)),[[L(t),L(E)]])],64)):qe("",!0)],2))]),_:1},16)),[[L(n),{isLoading:u.value}]])}}),[["__cssModules",{$style:{dateRangeRenderer:"_dateRangeRenderer_rsfrm_1",calendarIcon:"_calendarIcon_rsfrm_8",dateSection:"_dateSection_rsfrm_12",dateLabelDisplay:"_dateLabelDisplay_rsfrm_19",empty:"_empty_rsfrm_29","end-today":"_end-today_rsfrm_35",actual:"_actual_rsfrm_38","end-tomorrow":"_end-tomorrow_rsfrm_41","end-yesterday":"_end-yesterday_rsfrm_47","end-past":"_end-past_rsfrm_53","end-future":"_end-future_rsfrm_59","start-today":"_start-today_rsfrm_62","start-tomorrow":"_start-tomorrow_rsfrm_68","start-yesterday":"_start-yesterday_rsfrm_74","start-past":"_start-past_rsfrm_80","start-future":"_start-future_rsfrm_86"}}]]),Noe=ot({__name:"DateRangeEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{default:void 0},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},isStarted:{type:Boolean},isCompleted:{type:Boolean},timezone:{default:JS()}},emits:["closed"],setup(e,{expose:t,emit:n}){const o=B(null);Jt(()=>{ft(()=>{o.value&&o.value.focus()})});const s=e,r=n,i=()=>{var b;(b=s.params)==null||b.api.stopEditing(),r("closed")},a=b=>`${ut.fromJSDate(b,{zone:"utc"}).toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")}999Z`,l=async b=>{await y({startDate:b[0]?a(b[0]):null,dueDate:b[1]?a(b[1]):null})},u=async()=>{await y({startDate:null})},c=async()=>{await y({dueDate:null})},d=async b=>{await y({startDate:b?a(b):null})},h=async b=>{await y({dueDate:b?a(b):null})},f=async()=>{await y({startDate:null,dueDate:null})},p=En("bulkUpdate",!1),{apiServices:g}=no(!p,s),v=Y(()=>{var b,S,w,E,_,D,x,M,V;return{parentName:((w=(S=(b=s.params)==null?void 0:b.node.data)==null?void 0:S.parentConfig)==null?void 0:w.parentName)||null,parentStartDate:((D=(_=(E=s.params)==null?void 0:E.node.data)==null?void 0:_.parentConfig)==null?void 0:D.parentStartDate)||null,parentDueDate:((V=(M=(x=s.params)==null?void 0:x.node.data)==null?void 0:M.parentConfig)==null?void 0:V.parentDueDate)||null}}),y=async b=>{var S,w,E,_,D;try{const x=(S=o.value)==null?void 0:S.getValues(),M=await((E=(w=g.value)==null?void 0:w.changeDate)==null?void 0:E.call(w,{workspaceId:s.workspaceId,itemIds:[s.id],startDate:b.startDate,dueDate:b.dueDate}));console.log("Update response:",M),(M==null?void 0:M.status)==br.OK&&((D=s.params)==null||D.node.setData({...(_=s.params)==null?void 0:_.node.data,dateRange:x==null?void 0:x.dateRange}))}catch(x){console.error("Failed to update scene name:",x)}};return t({focus:()=>{ft(()=>{var b;(b=o.value)==null||b.focus()})}}),(b,S)=>(K(),ze(Ov,Kt({...s,parentConfig:v.value},{onUpdate:l,"onUpdate:end":h,"onUpdate:start":d,onClearAll:f,onClearDue:c,onClearStart:u,onClosed:i,ref_key:"calendarRef",ref:o}),null,16))}}),Loe=Et(ot({__name:"item-table-layout",props:{isSidebarOpen:{type:Boolean,default:!1}},emits:["close-sidebar","sidebar-clear","sidebar-apply"],setup(e,{emit:t}){const n=B(null),o=B(0);let s=null;Jt(()=>{n.value&&(s=new ResizeObserver(i=>{for(const a of i)o.value=a.contentRect.height}),s.observe(n.value))}),ou(()=>{s&&n.value&&s.unobserve(n.value)});const r=Y(()=>{const i=o.value;return i>120?i-42-36:0});return(i,a)=>(K(),he("div",{class:ce(i.$style["item-table-wrapper"]),ref_key:"itemTableWrapperRef",ref:n},[be("div",{class:ce(i.$style["item-header"])},[be("div",{class:ce(i.$style["item-header__left"])},[kt(i.$slots,"header-left",{},()=>[be("h1",{class:ce(i.$style["item-header__title"])},[kt(i.$slots,"title",{},()=>[a[0]||(a[0]=tt("Items",-1))])],2)])],2),be("div",{class:ce(i.$style["item-header__spacer"])},null,2),be("div",{class:ce(i.$style["item-header__actions"])},[kt(i.$slots,"header-actions")],2)],2),kt(i.$slots,"grid",{availableHeight:r.value}),be("div",{class:ce(i.$style.footer)},[kt(i.$slots,"footer")],2),kt(i.$slots,"new-row"),kt(i.$slots,"bulk-update-actions"),kt(i.$slots,"snackbar"),kt(i.$slots,"popup")],2))}}),[["__cssModules",{$style:{"item-table-wrapper":"_item-table-wrapper_1uqb9_1","item-header":"_item-header_1uqb9_14","item-header__left":"_item-header__left_1uqb9_22","item-header__title":"_item-header__title_1uqb9_27","item-header__spacer":"_item-header__spacer_1uqb9_32","item-header__actions":"_item-header__actions_1uqb9_35","main-content":"_main-content_1uqb9_41",sidebar:"_sidebar_1uqb9_48","is-open":"_is-open_1uqb9_64","sidebar-header":"_sidebar-header_1uqb9_68","sidebar-footer":"_sidebar-footer_1uqb9_69","sidebar-content":"_sidebar-content_1uqb9_89",footer:"_footer_1uqb9_94"}}]]),mN=Et(ot({name:"MoreOptionEditor",__name:"MoreOptionEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},optionBlock:{},isSubmenu:{type:Boolean,default:!1},layer:{default:0},focusableIndex:{}},emits:["actionExecuted"],setup(e,{expose:t,emit:n}){const o=Do,s=e,r=Y(()=>(s==null?void 0:s.workspaceId)||""),i=Y(()=>(s==null?void 0:s.entityId)||""),a=()=>{var O,N,$;return($=(O=s.params)==null?void 0:O.api)==null?void 0:$.getCellRendererInstances({columns:["options"],rowNodes:(N=s.params)!=null&&N.node?[s.params.node]:[]})[0]},l=()=>{var N,$,W,oe;const O=a();($=(N=O==null?void 0:O.componsenExposed)==null?void 0:N.blur)==null||$.call(N),(oe=(W=O==null?void 0:O.container)==null?void 0:W.parentElement)==null||oe.classList.remove("ag-cell-focus")},u=()=>{var $,W,oe;(W=($=s.params)==null?void 0:$.api)==null||W.stopEditing(),l();const O=`scene-name-${s.id}`,N=document.getElementById(O);(oe=N==null?void 0:N.__sceneNameEditor)==null||oe.startEdit()},{apiServices:c}=no(!0,s),d=Y(()=>{var O;return{ws_code:r.value,entity_id:i.value,scene_id:s.id,axiosService:c,optionBlock:s.optionBlock,permissions:(O=s.data)==null?void 0:O.permissions}}),h=O=>{var $,W,oe,ie,ee,se;let N=(W=($=s.params)==null?void 0:$.api)==null?void 0:W.getRowNode(String(s.id));if(N){const X={...N.data,isDeleted:O==="deleted",isArchived:O==="archived"?!0:N.data.isArchived,isLocked:O==="locked"?!0:N.data.isLocked,disabled:!1};O=="deleted"&&(X.isLocked=!1,X.disabled=!0),O=="unarchived"&&(X.isArchived=!1),(ie=(oe=s.params)==null?void 0:oe.api)==null||ie.redrawRows({rowNodes:[N]}),N.setData(X),(se=(ee=s.params)==null?void 0:ee.api)==null||se.redrawRows({rowNodes:[N]})}},f=md(),{openSceneHub:p}=f,g=()=>{ft(()=>{var $,W,oe,ie,ee,se;const O=((W=($=s.params)==null?void 0:$.node)==null?void 0:W.rowIndex)||0,N=((ie=(oe=s.params)==null?void 0:oe.column)==null?void 0:ie.getColId())||"";(se=(ee=s.params)==null?void 0:ee.api)==null||se.setFocusedCell(O,N)})};Y(()=>{var N,$;const O=($=(N=s.params)==null?void 0:N.api)==null?void 0:$.getRowNode(String(s.id));return O==null?void 0:O.data});const{options:v}=eJ(d,h,u,p,g),y=n,b=()=>{var O,N,$,W,oe,ie;console.trace("Focusing current cell for row:",s.id),(ie=(O=s.params)==null?void 0:O.api)==null||ie.setFocusedCell((($=(N=s.params)==null?void 0:N.node)==null?void 0:$.rowIndex)||0,((oe=(W=s.params)==null?void 0:W.column)==null?void 0:oe.getColId())||"")},S=Y(()=>{var O;return(O=s.params)==null?void 0:O.api}),w=(O,N)=>{var $,W,oe,ie,ee,se,X,I;if(y("actionExecuted",O),O.id=="copy-link"){(ee=S.value)==null||ee.startEditingCell({rowIndex:(W=($=s.params)==null?void 0:$.node)==null?void 0:W.rowIndex,colKey:(ie=(oe=s.params)==null?void 0:oe.column)==null?void 0:ie.getColId()});return}else{if(O.id!=="copy-link"&&((se=S.value)==null||se.stopEditing()),O.id==="rename")(X=S.value)==null||X.stopEditing(),(I=S.value)==null||I.clearFocusedCell(),l();else if(O.id==="copy-link"){const z=document.getElementById(N);setTimeout(()=>{var ne,me,xe;(xe=(me=(ne=z==null?void 0:z.__vueParentComponent)==null?void 0:ne.exposed)==null?void 0:me.focus)==null||xe.call(me)},300)}else if(["delete-rendition","delete-thumbnail"].includes(O.id)){setTimeout(()=>{b()},300);return}setTimeout(()=>{var z,ne;(ne=(z=s.params)==null?void 0:z.api)==null||ne.clearFocusedCell()},300)}},E=()=>{var O,N;(N=(O=s.params)==null?void 0:O.api)==null||N.stopEditing()},_=O=>{var N,$,W,oe;return O==="archive"?!(($=(N=s.params)==null?void 0:N.data)!=null&&$.isArchived):O==="unarchive"?(oe=(W=s.params)==null?void 0:W.data)==null?void 0:oe.isArchived:!0},D=Y(()=>v.value.map(O=>({...O,options:O.options.filter(N=>!N.hide&&_(N.id))})).filter(O=>O.options.length>0)),x=B({}),M=B(null),V=Y(()=>{var N,$;if(s.focusableIndex)return s.focusableIndex;const O=($=(N=s.params)==null?void 0:N.api)==null?void 0:$.getRowNode(String(s.id));return`${((O==null?void 0:O.rowIndex)??0)+10}`}),A=(O,N)=>`${V.value}.${O*10+N}`,P=(O,N)=>{if(N&&"focus"in N){x.value[O]=N;return}delete x.value[O]},k=O=>{O.preventDefault(),O.stopPropagation(),O.stopImmediatePropagation()};return Jt(()=>{var O;(O=M.value)==null||O.focus()}),t({focus(){var $;const O=`${V.value}.0`,N=x.value[O];N&&N.focus?N.focus():($=M.value)==null||$.focus()}}),(O,N)=>Ue((K(),he("div",{onKeydown:k,class:ce([O.$style["more-option-section"],{[O.$style.submenu]:e.isSubmenu}]),ref_key:"wrapperRef",ref:M,tabindex:"0",role:"menu"},[(K(!0),he(Pt,null,Dn(D.value,($,W)=>(K(),he("div",{key:$.id,style:cn({"--g-number":Math.min($.options.length,4),"--g-size":$.type==="column"?"36px":"auto"}),class:ce([O.$style["option-block"],O.$style[$.type]])},[(K(!0),he(Pt,null,Dn($.options,(oe,ie)=>(K(),he("div",{key:oe.id,class:ce(O.$style["option-item"])},[ye(Boe,{layer:s.layer,"scene-id":String(s.id),option:oe,type:$.type,onActionExecuted:ee=>w(ee,`more-action-${ee.id}-${s.id}`),focusableIndex:A(W,ie),ref_for:!0,ref:ee=>P(A(W,ie),ee),onHandleHide:E,id:`more-action-${oe.id}-${s.id}`,label:oe.label},null,8,["layer","scene-id","option","type","onActionExecuted","focusableIndex","id","label"])],2))),128))],6))),128))],34)),[[L(o),V.value]])}}),[["__cssModules",{$style:{"more-option-section":"_more-option-section_1jg4p_1","option-block":"_option-block_1jg4p_8","option-item":"_option-item_1jg4p_15",row:"_row_1jg4p_19",column:"_column_1jg4p_25",block:"_block_1jg4p_29"}}]]),Voe={key:0,style:{height:"20px",width:"20px",display:"flex","align-items":"center","justify-content":"center"}},Boe=Et(ot({__name:"MoreOptionItem",props:{option:{},sceneId:{},type:{},layer:{},focusableIndex:{}},emits:["actionExecuted","handleHide"],setup(e,{expose:t,emit:n}){const o=Do,s=qt,r=e,i=B(!1),a=B(!1),l=(x,M)=>{if(!M){p();return}const V=M.target;V.closest(".tippy-content")||V.closest(".tippy-box")||V.closest("[data-tippy-root]")||V.closest(".option-item")||p()},u=B(null),{triggerRef:c,popupRef:d,show:h,isVisible:f,hide:p}=vo({toggleOnClick:!0,interactive:!0,trigger:"click",placement:"left",showArrow:!1,offset:[0,4],hideOnClick:!1,allowHTML:!0,onClickOutside:l,appendTo:u.value||void 0}),g=n,v=async x=>{var M,V;if(!a.value){a.value=!0;try{await((V=(M=r.option).action)==null?void 0:V.call(M,x)),g("actionExecuted",r.option)}catch(A){console.error("Action execution failed:",A)}finally{a.value=!1,i.value=!1}}},y=async x=>{var M,V;if(x.preventDefault(),x.stopPropagation(),!a.value){if(r.option.isDanger){i.value=!i.value;return}if(r.option.subMenu)h();else{a.value=!0;try{await((V=(M=r.option).action)==null?void 0:V.call(M,x)),g("actionExecuted",r.option)}catch(A){console.error("Action execution failed:",A)}finally{a.value=!1}return}}},b=x=>{g("actionExecuted",x),p()},S=x=>{x.key==="Escape"&&p()},w=x=>({row:"small",column:"medium",block:"small"})[x]||"medium",E=x=>{const M=r.option.isDanger?["danger","tertiary"]:[];return{row:["secondary","icon",...M],column:["menu-item",...M],block:["secondary",...M]}[x]||[]},_=()=>{i.value?i.value=!1:f.value?p():g("handleHide")};t({focus:()=>{ft(()=>{c.value instanceof HTMLElement?c.value.focus():c.value&&"$el"in c.value?c.value.$el.focus():console.warn("Trigger ref is not an HTMLElement:",c.value)})},escape:()=>{p()},select:()=>{y(new MouseEvent("click"))}});const D=x=>{var M;x.stopPropagation(),x.preventDefault(),i.value=!1,(M=c.value)==null||M.focus()};return(x,M)=>{var V;return Ue((K(),he("div",{ref_key:"wrapperRef",ref:u,class:ce(x.$style["option-item-wrapper"]),style:{width:"100%",overflow:"visible"},onClick:Ht(y,["stop","prevent"])},[Ue((K(),ze(bt,{ref_key:"triggerRef",ref:c,class:ce(x.$style["option-item"]),disabled:e.option.disabled||a.value,actived:L(f)||i.value,size:w(e.type),variant:E(e.type),onClick:Ht(y,["stop","prevent"]),onKeydown:S,onEscape:_,label:e.option.label},{prefix:we(()=>[e.option.icon?(K(),he("div",Voe,[ye(gt,{size:"14",src:e.option.icon,color:e.option.isDanger?void 0:"#a6a6a6",source:"remote"},null,8,["src","color"])])):qe("",!0)]),suffix:we(()=>[e.option.subMenu?(K(),ze(gt,{key:0,src:"Play",source:"remote"})):qe("",!0),e.option.isDanger&&i.value?(K(),he("div",{key:1,class:ce(x.$style["confirm-action"])},[Ue((K(),ze(bt,{variant:["tertiary","icon","danger"],size:"small",onHandleClick:D},{default:we(()=>[ye(gt,{src:"XMarkSolid",source:"remote"})]),_:1})),[[L(o),`${r.focusableIndex}.0`],[L(s),{content:"Cancel ",delay:[300,0],contentClass:["extra-padding"]}]]),Ue((K(),ze(bt,{variant:["danger","primary","icon"],size:"small",onClick:Ht(v,["stop","prevent"]),onEscape:M[0]||(M[0]=A=>i.value=!1)},{default:we(()=>[ye(gt,{src:"Check",source:"remote"})]),_:1})),[[L(o),`${r.focusableIndex}.1`],[L(s),{delay:[300,0],contentClass:["extra-padding"],content:"Confirm ",theme:"warning"}]])],2)):qe("",!0)]),_:1},8,["class","disabled","actived","size","variant","label"])),[[L(o),r.focusableIndex]]),e.option.subMenu?(K(),he("div",{key:0,ref_key:"popupRef",ref:d,class:ce(x.$style["submenu-container"])},[ye(mN,{focusableIndex:r.focusableIndex,layer:r.layer+1,ref:"submenuRef","option-block":[((V=e.option)==null?void 0:V.subMenu)||[]],"is-submenu":!1,onActionExecuted:b},null,8,["focusableIndex","layer","option-block"])],2)):qe("",!0)],2)),[[L(s),{content:e.option.description,contentClass:["extra-padding"],theme:e.option.isDanger?"warning":"arbo",hideOnClick:!1,delay:[300,0]}]])}}}),[["__cssModules",{$style:{"option-item":"_option-item_8a5qn_1","icon-wrapper":"_icon-wrapper_8a5qn_11","confirm-action":"_confirm-action_8a5qn_19"}}]]),vN=(e,t)=>{const n=B(Number(e.value.value)),o=Y(()=>e.value.metricConfig),s=Y(()=>{var g,v;const l=o.value,u=t.value,c=e.value.value=="N/A"||e.value.value===null||e.value.value===void 0||String(e.value.value).length===0,d=!!e.value.error,h=(l==null?void 0:l.format_type)==="icon",{disabled:f}=e.value;return{pendingCalculation:e.value.value=="N/A"||c&&((g=l==null?void 0:l.metric_type)==null?void 0:g.code)==="formula",isEmpty:c,isError:d,hasPrefix:!c&&!d&&(l==null?void 0:l.morpheme_type)==="prefix",hasSuffix:!c&&!d&&(l==null?void 0:l.morpheme_type)==="suffix",isDropdown:(l==null?void 0:l.format_type)==="dropdown",isFormula:((v=l==null?void 0:l.metric_type)==null?void 0:v.code)==="formula",isLoading:e.value.value===void 0,isRating:h,showActions:u&&!c&&!f}}),r=17,i=Y(()=>{var l;return{maxRating:((l=o.value)==null?void 0:l.range)||5,readOnly:e.value.readOnly,disabled:e.value.disabled,size:r}});return{componentState:s,metricConfig:o,ICON_SIZE:r,ratingParams:i,standardNameforIcon:()=>{var u;return(((u=o.value)==null?void 0:u.format_symbol)||"BoltSolid").split(/[\s-_]+/).map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join("").replace(/Outline|Solid/g,"")},internalValue:n}},$oe=["aria-label"],yN=Et(ot({name:"MetricRenderer",__name:"MetricRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean,default:!0},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},error:{type:Boolean},config:{}},emits:["update:value","clear","copy"],setup(e,{emit:t}){const n=Vs,o=qt,s=e,r=xg(!1),i=B(null),a=B(null),{isEditing:l}=ld(s),u=Y(()=>{var N,$;return{value:s.value,metricConfig:(($=(N=s.params)==null?void 0:N.colDef)==null?void 0:$.context)||s.config,error:s.error,hovered:r.value,readOnly:s.readOnly,disabled:s.disabled,active:l}}),{componentState:c,metricConfig:d,internalValue:h}=vN(u,r),f=Y(()=>{var $,W;let N=!1;if(["number","formula"].includes(d.value.metric_type.code)){const oe=Number(s.value),ie=Number(($=d.value)==null?void 0:$.format_value);Number.isFinite(ie)&&ie>=0&&(N=(((W=oe.toString().split(".")[1])==null?void 0:W.length)||0)>ie)}return N}),p=Y(()=>{var N;return!!((N=d.value)!=null&&N.morpheme_value)||c.value.isEmpty||f.value}),g=Y(()=>{var W,oe,ie;if(c.value.isError)return"Something went wrong. Review formula, inputs and retry.";if(c.value.pendingCalculation)return"Can’t calculate yet. Complete required fields.";if(c.value.isEmpty)return;const N=M.value,$=(W=d.value)==null?void 0:W.morpheme_type;return $==="prefix"?`${((oe=d.value)==null?void 0:oe.morpheme_value)||""} ${N}`.trim():$==="suffix"?`${N} ${((ie=d.value)==null?void 0:ie.morpheme_value)||""}`.trim():N}),v=Y(()=>{const{format_type:N,format_value:$}=d.value;if(N==="dropdown"&&typeof $=="string"&&$.startsWith("["))try{return JSON.parse($)}catch{return[]}return[]}),y=Y(()=>({disabled:s.disabled,error:c.value.isError,inputRef:i,wrapperRef:a,clickable:!x.value,readOnly:s.readOnly||x.value,isEmpty:c.value.isEmpty})),{argsMain:b,isHover:S}=xo(y),w=(N,$,W="en-US")=>new Intl.NumberFormat(W,{minimumFractionDigits:$,maximumFractionDigits:$}).format(N),E=Y(()=>{if(c.value.isEmpty)return"";if(c.value.pendingCalculation)return"pending";const N=s.value,{format_type:$,format_value:W,mapping:oe}=d.value;if(oe&&typeof oe=="object"&&!Array.isArray(oe)){const ie=oe[`!${N}`];if(ie)return ie}if($==="dropdown"){const ie=v.value.find(ee=>String(ee.name)===String(N));if(ie)return ie.name}if(typeof N=="string"){const ie=Number(N);return Number.isNaN(ie)?N:N.replace(/[.-]/g,"").length>16?_(N,W):_(ie,W)}return typeof N=="number"?_(N,W):String(N)}),_=(N,$)=>{const W=Number.parseInt(String($)||"2",10),oe=Number.isFinite(W)&&W>=0?W:2;try{if(typeof N=="string"){const ie=N.split("."),ee=ie[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),se=ie[1]?ie[1].substring(0,oe).padEnd(oe,"0"):"0".repeat(oe);return oe>0?`${ee}.${se}`:ee}return w(N,oe)}catch(ie){return console.error("Error formatting metric value:",ie,{num:N,decimals:oe}),String(N)}},D=(N,$)=>{const W=Number.parseInt(String($)||"2",10),oe=Number.isFinite(W)&&W>=0?W:2;try{if(typeof N=="string"){const ie=N.split("."),ee=ie[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),se=ie[1]?ie[1].length:0,X=Math.max(oe,se),I=ie[1]?ie[1].padEnd(X,"0"):"0".repeat(X);return X>0?`${ee}.${I}`:ee}return new Intl.NumberFormat("en-US",{minimumFractionDigits:oe,maximumFractionDigits:20}).format(N)}catch(ie){return console.error("Error formatting exact metric value:",ie,{num:N,decimals:oe}),String(N)}},x=Y(()=>{var N;return((N=d.value)==null?void 0:N.metric_type.code)==="formula"}),M=Y(()=>{if(c.value.isEmpty)return"";if(c.value.pendingCalculation)return"pending";const N=s.value,{format_type:$,format_value:W,mapping:oe}=d.value;if(oe&&typeof oe=="object"&&!Array.isArray(oe)){const ie=oe[`!${N}`];if(ie)return ie}if($==="dropdown"){const ie=v.value.find(ee=>String(ee.name)===String(N));if(ie)return ie.name}if(typeof N=="string"){const ie=Number(N);return Number.isNaN(ie)?N:N.replace(/[.-]/g,"").length>16?D(N,W):D(ie,W)}return typeof N=="number"?D(N,W):String(N)}),{tooltip:V}=pO(""),A=async N=>{N.stopPropagation(),N.preventDefault(),N.stopImmediatePropagation();try{await navigator.clipboard.writeText(M.value),V.value="Copied",setTimeout(()=>{V.value="Copy"},3e3)}catch($){console.error("Failed to copy text:",$),V.value="Copy failed",setTimeout(()=>{V.value="Copy"},3e3)}};Je(()=>s.value,(N,$)=>{const W=Number(N);Number.isFinite(W)&&W!==h.value?h.value=W:N==null&&h.value!==0&&(h.value=0)},{immediate:!0,deep:!0});const k=()=>{r.value=!0},O=()=>{r.value=!1};return(N,$)=>Ue((K(),ze(Oo,Kt(L(b),{onMouseenter:k,style:{"--icon-size":"24px"},onMouseleave:O,ref_key:"wrapperRef",ref:a,actived:L(l),bordered:!0}),{suffix:we(()=>[s.disabled?qe("",!0):(K(),he("div",{key:0,class:ce([N.$style.suffix,"wrapper-suffix"])},[r.value&&!L(c).isEmpty&&!L(c).isError?Ue((K(),ze(bt,{key:0,variant:["icon","secondary"],size:24,onClick:Ht(A,["prevent","stop"])},{default:we(()=>[ye(gt,{src:"Copy",source:"remote",size:12})]),_:1})),[[L(o),{content:L(V),hideOnClick:!1,contentClass:"extra-padding"}]]):qe("",!0)],2))]),default:we(()=>[be("div",{class:ce(N.$style["metric-wrapper"]),"aria-label":L(d).format_value||void 0},[be("div",{class:ce([N.$style["metric-content"],s.disabled?N.$style.disabled:""])},[!L(c).isError&&L(c).isEmpty?(K(),he(Pt,{key:0},[L(c).pendingCalculation?Ue((K(),he("span",{key:0,class:ce(N.$style["metric-empty"])},[...$[0]||($[0]=[tt(" - ",-1)])],2)),[[L(o),"Can’t calculate yet. Complete required fields."]]):L(c).isEmpty?(K(),he("span",{key:1,class:ce(N.$style["metric-empty"])}," - ",2)):qe("",!0)],64)):qe("",!0),L(c).isError?Ue((K(),he("div",{key:1,class:ce(N.$style["metric-error"])},[...$[1]||($[1]=[tt(" Error ",-1)])],2)),[[L(o),"Something went wrong. Review formula, inputs and retry."]]):qe("",!0),!L(c).isEmpty&&!L(c).isError?Ue((K(),he("span",{key:2,class:ce([N.$style["metric-value"],L(S)?N.$style.hovered:"",{[N.$style.disabled]:s.disabled}])},[tt(at(E.value),1)],2)),[[L(o),{content:g.value,bypassOverflowCheck:p.value}]]):qe("",!0)],2)],10,$oe)]),_:1},16,["actived"])),[[L(n),{isLoading:L(c).isLoading}]])}}),[["__cssModules",{$style:{"metric-wrapper":"_metric-wrapper_lu0ag_1","metric-content":"_metric-content_lu0ag_5",disabled:"_disabled_lu0ag_15","metric-value":"_metric-value_lu0ag_19",hovered:"_hovered_lu0ag_19","metric-error":"_metric-error_lu0ag_23","with-morpheme":"_with-morpheme_lu0ag_38","with-formula-icon":"_with-formula-icon_lu0ag_41","metric-value--number":"_metric-value--number_lu0ag_47","metric-value--currency":"_metric-value--currency_lu0ag_47","metric-value--percentage":"_metric-value--percentage_lu0ag_47","metric-morpheme":"_metric-morpheme_lu0ag_51","metric-empty":"_metric-empty_lu0ag_64","metric-icon":"_metric-icon_lu0ag_71"}}]]),Hoe={key:0,style:{color:"#6b6b6b"}},Goe=Et(ot({__name:"HeaderSorting",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean},modelValue:{}},emits:["sort-changed","update:modelValue","open"],setup(e,{expose:t,emit:n}){const o=qt,s={START_ASC:{value:"start_asc",label:"Soonest to furthest start",id:"start_asc"},START_DESC:{value:"start_desc",label:"Furthest to soonest start",id:"start_desc"},DUE_ASC:{value:"due_asc",label:"Soonest to furthest due",id:"due_asc"},DUE_DESC:{value:"due_desc",label:"Furthest to soonest due",id:"due_desc"}},r={desc:{value:"desc",label:"Newest to oldest",id:"desc"},asc:{value:"asc",label:"Oldest to newest",id:"asc"}},i={asc:{value:"asc",label:"Smallest to largest",id:"asc"},desc:{value:"desc",label:"Largest to smallest",id:"desc"}},a={asc:{value:"asc",label:"Ascending",id:"asc"},desc:{value:"desc",label:"Descending",id:"desc"}},l=e,u={assignees:"default",completedOn:"date",dateRange:"dateRange",id:"number",isArchived:"default",isCompleted:"default",isDeleted:"default",isProcessing:"default",isStarted:"default",lastUpdated:"date",name:"default",status:"default",permissions:"default",options:"default",disabled:"number"},c=Y(()=>{var O,N;if(l.headerType)return l.headerType;if(((N=(O=l.params)==null?void 0:O.column)==null?void 0:N.getColId()).includes("metric"))return"default";const k=l.headerType??l.params.column.getColId();return u[k]||"default"}),d=B(),h=()=>{var k,O,N;const P=(O=(k=l.params)==null?void 0:k.column)==null?void 0:O.getColDef();if((N=P.colId)!=null&&N.includes("metric")){if(P.context.is_primary==1)return"primary";if(P.context.is_point_metric==1)return"secondary"}};Nh(()=>{d.value=h()}),Jt(()=>{d.value=h()});const f=Y(()=>{var P,k;return((k=(P=l.params)==null?void 0:P.column.getColDef().context)==null?void 0:k.morpheme_value)||void 0}),p=Y(()=>{var P;return(P=l.params)==null?void 0:P.displayName}),g=Y(()=>{let P=[];switch(c.value){case"dateRange":P=Object.values(s).map(k=>({...k,selected:y.value===k.value,type:"text",hover:x.value===k.value}));break;case"date":P=Object.values(r).map(k=>({...k,selected:y.value===k.value,type:"text",hover:x.value===k.value}));break;case"number":P=Object.values(i).map(k=>({...k,selected:y.value===k.value,type:"text",hover:x.value===k.value}));break;default:P=Object.values(a).map(k=>({...k,selected:y.value===k.value,type:"text",hover:x.value===k.value}));break}return y.value!=="none"&&P.push({id:"clear",label:"Clear",value:"none",selected:!1,type:"text",icon:"XMark",hover:x.value=="none"}),P}),v=Y(()=>String(y.value).endsWith("asc")?"SortUp":String(y.value).endsWith("desc")?"SortDown":"Sort"),y=B(l.modelValue??"none"),b=P=>{if(A.value){A.value=!1;return}_("update:modelValue",P),_("sort-changed",P)},S=P=>{y.value=P},w=vr(()=>{if(c.value==="date"||c.value==="default"||c.value==="number"){let P;y.value==="none"?P="asc":y.value==="asc"?P="desc":P="none",y.value=P}else{const P=[s.START_ASC.value,s.START_DESC.value,s.DUE_ASC.value,s.DUE_DESC.value,"none"],O=(P.indexOf(y.value)+1)%P.length;y.value=P[O]}},vi),E=Y(()=>{if(y.value==="none")return"No sorting applied";const P=g.value.find(k=>k.value===y.value);return(P==null?void 0:P.label)||""}),_=n,D=Y(()=>{if(l.disabled&&!l.readOnly)return"var(--disabled-color)";if(y.value!=="none")return"var(--primary-color-hover)"});Je(()=>l.modelValue,P=>{P!=y.value&&(y.value=P)}),Je(y,P=>{P!==l.modelValue&&b(P)});const x=B(y.value);Je(()=>y.value,P=>{x.value=P});const M=P=>{var $,W;if(l.readOnly||l.disabled)return;let k=0;P.key==="ArrowDown"?k=1:P.key==="ArrowUp"&&(k=-1);const O=g.value.findIndex(oe=>oe.value===x.value),N=g.value.length;if(P.key==="Enter"||P.key===" ")P.preventDefault(),y.value=x.value,($=V.value)==null||$.hide();else if(k!==0){P.preventDefault();let oe=(O+k+N)%N;x.value=g.value[oe].value}else P.key==="Escape"&&((W=V.value)==null||W.hide())},V=B(null);Jt(()=>{var P,k;(k=(P=V.value)==null?void 0:P.$el)==null||k.addEventListener("keydown",M)}),ou(()=>{var P,k;(k=(P=V.value)==null?void 0:P.$el)==null||k.removeEventListener("keydown",M)});const A=B(!1);return t({setDefaultSort:P=>{y.value=P?P.direction:"none",A.value=!0},clear:()=>{y.value="none"}}),(P,k)=>(K(),ze(YE,{ref_key:"dropdownRef",ref:V,options:g.value,label:p.value,readOnly:l.readOnly,onOpen:k[0]||(k[0]=O=>P.$emit("open")),disabled:l.disabled,variant:["icon","tertiary"],size:"small",onHandleClick:L(w),onSelect:k[1]||(k[1]=O=>S(O))},{prefix:we(()=>[ye(bt,{variant:["text"],onClick:L(w),size:"small"},{default:we(()=>[Ue((K(),he("b",null,[tt(at(p.value),1)])),[[L(o),{content:p.value}]]),f.value?(K(),he("small",Hoe," ("+at(f.value)+") ",1)):qe("",!0),d.value=="primary"?Ue((K(),he("div",{key:1,class:ce(P.$style["icon-metric"])},[ye(gt,{src:"ChartPie",color:"#A6A6A6",size:"14"})],2)),[[L(o),"Woohoo metric"]]):qe("",!0),d.value=="secondary"?Ue((K(),he("div",{key:2,class:ce(P.$style["icon-metric"])},[ye(gt,{src:"Bullseye",color:"#A6A6A6",size:"14"})],2)),[[L(o),"Point Metric"]]):qe("",!0)]),_:1},8,["onClick"])]),iconDropdown:we(()=>[Ue(ye(gt,{src:v.value,source:"remote",color:D.value},null,8,["src","color"]),[[L(o),E.value]])]),_:1},8,["options","label","readOnly","disabled","onHandleClick"]))}}),[["__cssModules",{$style:{"icon-metric":"_icon-metric_nh30n_1",iconSorting:"_iconSorting_nh30n_9","button-group":"_button-group_nh30n_15","ab-table-button":"_ab-table-button_nh30n_26","button-main":"_button-main_nh30n_32","button-dropdown-trigger":"_button-dropdown-trigger_nh30n_37",headerSorting:"_headerSorting_nh30n_47"}}]]),Uoe=["disabled","readonly","checked","indeterminate"],wN=Et(ot({__name:"Checkbox",props:{modelValue:{},disabled:{type:Boolean},readOnly:{type:Boolean},focusIndex:{},tooltipText:{},allowIndeterminate:{type:Boolean},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=qt,o=Do,s=e,r=t,i=Y(()=>{if(typeof s.size=="string"){if(["small","medium","large"].includes(s.size))switch(s.size){case"small":return"14px";case"large":return"24px";case"medium":default:return"20px"}if(s.size.endsWith("px"))return s.size}return typeof s.size=="number"?`${s.size}px`:"20px"}),a=Y(()=>s.allowIndeterminate?[Ot.UNCHECK,Ot.INDETERMINATE,Ot.CHECKED]:[Ot.UNCHECK,Ot.CHECKED]),l=Y(()=>{if(typeof s.tooltipText=="string"||!s.tooltipText)return s.tooltipText||"";switch(c.value){case Ot.UNCHECK:return s.tooltipText.unchecked;case Ot.INDETERMINATE:return s.tooltipText.indeterminate;case Ot.CHECKED:return s.tooltipText.checked;default:return""}}),u=()=>{if(h.value)return;const p=(a.value.indexOf(c.value)+1)%a.value.length;c.value=a.value[p]},c=B(typeof s.modelValue=="boolean"?s.modelValue?Ot.CHECKED:Ot.UNCHECK:s.modelValue),d=Y(()=>({checked:c.value===Ot.CHECKED,indeterminate:c.value===Ot.INDETERMINATE,none:c.value===Ot.UNCHECK})),h=Y(()=>s.disabled||s.readOnly);return Je(()=>c.value,f=>{r("update:modelValue",f===Ot.CHECKED)}),(f,p)=>Ue((K(),he("input",{disabled:s.disabled,key:c.value,readonly:s.readOnly,type:"checkbox",class:ce([f.$style["input-checkbox"]]),checked:d.value.checked,indeterminate:d.value.indeterminate,onChange:u,"aria-label":"Select All Items",style:cn({"--input-size":i.value})},null,46,Uoe)),[[L(n),{content:l.value,hideOnClick:!1,contentClass:"extra-padding"}],[L(o),s.focusIndex]])}}),[["__cssModules",{$style:{small:"_small_1kz1e_84",large:"_large_1kz1e_87",medium:"_medium_1kz1e_90"}}]]),Woe=Et(ot({name:"HeaderCheckbox",__name:"HeaderCheckbox",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=qt,o=Vf(),{setSelectionStatus:s}=o,{rowCount:r,selectionStatus:i}=go(o),a=B(new Set);Je(i,w=>{s(w)},{immediate:!0});const l=Y(()=>i.value!==Ot.UNCHECK),u=Y(()=>({checked:i.value===Ot.CHECKED,indeterminate:i.value===Ot.INDETERMINATE,UNCHECK:i.value===Ot.UNCHECK})),c=Y(()=>({[Ot.UNCHECK]:"Click to select all",[Ot.INDETERMINATE]:"Click to clear selection",[Ot.CHECKED]:"Click to clear selection"})[i.value]||"Select items"),d=Y(()=>{const w=[{label:"Select all",value:"INDETERMINATE",type:"text",clickable:!0,id:"indeterminate"}];return l.value&&w.push({label:"None",value:"UNCHECK",type:"text",clickable:!0,id:"uncheck"}),w}),h=w=>({selected:w.getSelectedRows().length,total:r.value.total,loaded:r.value.loaded}),f=({api:w,state:E})=>{if(w)if(E===Ot.UNCHECK)w.deselectAll(),a.value.clear(),i.value=E;else if(E===Ot.CHECKED){const _=new Set;w.forEachNode(D=>{D.isSelected()&&_.add(D.id||"")}),a.value=_,w.forEachNode(D=>D.setSelected(!0)),i.value=E}else w.forEachNode(_=>_.setSelected(!0)),i.value=E},p=()=>{var _;const w=(_=t.params)==null?void 0:_.api;if(!w){console.error("[HeaderCheckbox] There is no API available");return}const E={[Ot.UNCHECK]:Ot.INDETERMINATE,[Ot.INDETERMINATE]:Ot.UNCHECK,[Ot.CHECKED]:Ot.UNCHECK};f({api:w,state:E[i.value]})},g=w=>{var D;const E=(D=t.params)==null?void 0:D.api;if(!E){console.error("no api");return}const _={INDETERMINATE:Ot.INDETERMINATE,GLOBAL:Ot.CHECKED,UNCHECK:Ot.UNCHECK};f({api:E,state:_[w]})},v=vr(w=>{const{selected:E,total:_}=h(w);if(_==0){i.value=Ot.UNCHECK;return}E===_?i.value=Ot.CHECKED:E===0?i.value=Ot.UNCHECK:i.value=Ot.INDETERMINATE},300);let y=[];const b=w=>{v(w)};Jt(()=>{var x;const w=(x=t.params)==null?void 0:x.api;if(!w)return;const E=M=>v(M.api),_=()=>b(w),D=()=>b(w);w.addEventListener("selectionChanged",E),w.addEventListener("rowDataUpdated",_),w.addEventListener("modelUpdated",_),y=[()=>w.removeEventListener("selectionChanged",E),()=>w.removeEventListener("rowDataUpdated",_),()=>w.removeEventListener("modelUpdated",D)]}),Vn(()=>{y.forEach(w=>w())});const S=`header-checkbox-${Math.random().toString(36).substr(2,9)}`;return(w,E)=>(K(),ze(YE,{tabIndex:"9",options:d.value,size:24,disabled:t.disabled,readOnly:t.readOnly,variant:["icon","tertiary"],placement:"bottom-start",onSelect:g},{prefix:we(()=>[Ue((K(),ze(wN,{"tab-index":"8",id:S,disabled:t.disabled,key:L(i),readonly:t.readOnly,type:"checkbox",checked:u.value.checked,indeterminate:u.value.indeterminate,modelValue:L(i),"onUpdate:modelValue":E[0]||(E[0]=_=>fn(i)?i.value=_:null),onChange:p,"aria-label":L(i)===L(Ot).CHECKED?"All items selected":"Select visible items",class:ce(w.$style["ag-checkbox-input"])},null,8,["disabled","readonly","checked","indeterminate","modelValue","aria-label","class"])),[[L(n),{content:c.value,hideOnClick:!1,contentClass:"extra-padding"}]])]),_:1},8,["options","disabled","readOnly"]))}}),[["__cssModules",{$style:{"ag-checkbox-input":"_ag-checkbox-input_4qktt_1","button-group":"_button-group_4qktt_62","button-main":"_button-main_4qktt_62",headerCheckbox:"_headerCheckbox_4qktt_66"}}]]),zoe={style:{color:"#a6a6a6"}},CN=Et(ot({name:"StatusRenderer",__name:"StatusRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean,default:!0},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},focusIndex:{},placeholder:{default:"No status"}},setup(e,{expose:t}){const n=Vs,o=qt,s=e,{isEditing:r}=ld(s),i=B(null),a=B(null),l=Y(()=>s.value),u=Y(()=>l.value===void 0),c=Y(()=>{var v,y;return((v=l.value)==null?void 0:v.name)||((y=l.value)==null?void 0:y.label)||"No status"}),d=Y(()=>{var v;return{disabled:s.disabled,error:!1,readOnly:s.readOnly,isEmpty:kY((v=l.value)==null?void 0:v.label),inputRef:i,wrapperRef:a,clickable:!s.disabled&&!s.readOnly,active:r}}),{argsMain:h,isHover:f}=xo(d),p=Y(()=>{var v;return((v=l.value)==null?void 0:v.color)||"#fff"}),g=Y(()=>new Bn(p.value).isLight()?"#000":"#fff");return t({focus:()=>{var v;(v=a.value)==null||v.focus()}}),(v,y)=>{const b=Ec("focusable");return Ue((K(),ze(L(Oo),Kt(L(h),{ref_key:"wrapperRef",ref:a,bordered:!0,style:{background:`${p.value} !important`,color:g.value,"--border-color":!L(r)&&!L(f)||!l.value?"#f3f5f8":void 0}}),{default:we(()=>[u.value?qe("",!0):(K(),he("div",{key:0,class:ce({[v.$style["status-renderer"]]:!0,[v.$style["has-status"]]:l.value,[v.$style["has-suffix"]]:!!v.$slots.suffix})},[l.value?(K(),he(Pt,{key:0},[Ue((K(),he("div",{class:ce(v.$style["status-renderer__status-name"])},[tt(at(c.value),1)],2)),[[L(o),{content:c.value,delay:[1e3,0]}]]),kt(v.$slots,"suffix")],64)):(K(),he(Pt,{key:1},[be("div",{class:ce(v.$style["status-renderer__color-code"])},null,2),be("span",zoe,at(s.placeholder),1),kt(v.$slots,"suffix")],64))],2))]),_:3},16,["style"])),[[b,s.focusIndex],[L(n),{isLoading:u.value}]])}}}),[["__cssModules",{$style:{"status-renderer":"_status-renderer_k5c36_1","has-status":"_has-status_k5c36_9","has-suffix":"_has-suffix_k5c36_12","status-renderer__color-code":"_status-renderer__color-code_k5c36_22","status-renderer__status-name":"_status-renderer__status-name_k5c36_33"}}]]),bN=Et(ot({__name:"PopupLayout",props:{popupName:{},showOverlay:{type:Boolean,default:!0},overlayOpacity:{default:.5},closeOnOverlayClick:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},minWidth:{default:"300px"},popupIndex:{default:109},showCloseBtn:{type:Boolean,default:!0}},emits:["shown","hidden"],setup(e,{expose:t,emit:n}){const o=e,s=Y(()=>Number(o.popupIndex)),{popupRef:r,show:i,hide:a,isVisible:l}=ZZ({useTrigger:!1,arrow:!1,centered:!0,showOverlay:o.showOverlay,overlayOpacity:o.overlayOpacity,closeOnOverlayClick:o.closeOnOverlayClick,appendTo(d){return document.body},zIndex:s.value}),u=d=>{o.closeOnEscape&&d.key==="Escape"&&l.value&&a()};Jt(()=>{document.addEventListener("keydown",u)}),Vn(()=>{document.removeEventListener("keydown",u)}),t({show:i,hide:a,isVisible:l});const c=n;return Je(()=>l.value,d=>{c(d?"shown":"hidden")}),(d,h)=>{const f=Ec("tooltip");return K(),he("div",{ref_key:"popupRef",ref:r,class:ce(d.$style.popupContainer)},[be("div",{class:ce(d.$style.popupWrapper)},[be("div",{class:ce(d.$style.header)},[kt(d.$slots,"header",{},()=>[be("span",{class:ce(d.$style["header-title"])},at(e.popupName),3)]),o.showCloseBtn?Ue((K(),ze(bt,{key:0,variant:["icon","text"],onClick:L(a),"aria-label":"Close popup",size:"small"},{default:we(()=>[ye(gt,{src:"Xmark",size:8})]),_:1},8,["onClick"])),[[f,"Close"]]):qe("",!0)],2),be("div",{class:ce(d.$style.body)},[kt(d.$slots,"default")],2),d.$slots.footer?(K(),he("div",{key:0,class:ce(d.$style.footer)},[kt(d.$slots,"footer")],2)):qe("",!0)],2)],2)}}}),[["__cssModules",{$style:{popupContainer:"_popupContainer_1qqwg_1",popupWrapper:"_popupWrapper_1qqwg_9",popupFadeIn:"_popupFadeIn_1qqwg_1",header:"_header_1qqwg_24","header-title":"_header-title_1qqwg_34",body:"_body_1qqwg_43",footer:"_footer_1qqwg_48"}}]]),joe=["onMouseenter","onMouseleave"],Koe=["innerHTML"],qoe=["innerHTML"],Yoe=["data-tooltip"],Xoe={key:2,style:{"min-width":"24px","min-height":"24px",position:"absolute",top:"0",right:"0",display:"flex","align-items":"center","justify-content":"center"}},Zoe=Et(ot({__name:"Snackbar",setup(e){const t=qt,n=P6,o=Ss(),{removeNotification:s}=o,{notifications:r}=go(o),i=f=>f.trim().startsWith("<svg"),a=B("Copy"),l=()=>{setTimeout(()=>{a.value="Copy"},3e3)},u=f=>{navigator.clipboard.writeText(f).then(()=>{a.value="Copied",l()},()=>{a.value="Copy failed",l()})},c=B(new Set),d=f=>{var p;c.value.add(f),(p=o.pauseAutoDismiss)==null||p.call(o,f)},h=f=>{var p;c.value.delete(f),(p=o.resumeAutoDismiss)==null||p.call(o,f)};return(f,p)=>(K(),ze($z,{name:"list",tag:"div",class:ce(["notification-center",f.$style["notification-wrapper"]])},{default:we(()=>[(K(!0),he(Pt,null,Dn(L(r),g=>{var v;return Ue((K(),he("div",{key:g.id,class:ce([f.$style["notification-item"],f.$style[`notification--${g.type||"info"}`],!(g!=null&&g.actions)||((v=g==null?void 0:g.actions)==null?void 0:v.length)==0?f.$style["snackbar-type"]:""]),onMouseenter:y=>d(g.id),onMouseleave:y=>h(g.id)},[be("p",{class:ce(f.$style.snackbar__message)},[g.type!="white"?(K(),he("span",{key:0,class:ce(f.$style.snackbar__icon)},[!g.icon&&g.type=="success"?(K(),ze(gt,{key:0,src:"CircleCheck",source:"remote"})):qe("",!0),!g.icon&&g.type=="interactive"?(K(),ze(gt,{key:1,src:"CircleCheck",source:"remote"})):!g.icon&&g.type=="error"?(K(),ze(gt,{key:2,src:"CircleXMark",source:"remote"})):g.icon&&i(g.icon)?(K(),he("i",{key:3,class:ce(f.$style["icon-draw"]),innerHTML:g.icon},null,10,Koe)):g.icon&&!i(g.icon)?(K(),ze(gt,{key:4,src:g.icon,source:"remote",color:"var(--primary-color)"},null,8,["src"])):qe("",!0)],2)):qe("",!0),be("span",{class:ce(f.$style["error-message"])},[be("span",{class:ce(f.$style.message),innerHTML:g.message},null,10,qoe)],2)],2),g.actions?(K(),he("div",{key:0,class:ce(f.$style["actions-notification"]),"data-notification":"true"},[(K(!0),he(Pt,null,Dn(g.actions,y=>(K(),ze(bt,Kt({key:y.label},{ref_for:!0},y,{onClick:Ht(y.action,["prevent","stop"]),variant:"secondary",size:"small"}),{prefix:we(()=>[y.btnIcon?(K(),ze(gt,{key:0,src:y.btnIcon,source:"remote",color:"var(--primary-color)"},null,8,["src"])):qe("",!0)]),_:2},1040,["onClick"]))),128))],2)):qe("",!0),g.type!=="interactive"&&g.type!=="white"?Ue((K(),he("div",{key:1,"data-tooltip":a.value,style:{"min-width":"24px"}},[ye(bt,{variant:"secondary",onClick:y=>u(g.message),class:ce(f.$style["copy-btn"])},{prefix:we(()=>[ye(gt,{src:"Copy",source:"remote",color:"var(--primary-color)",size:"11"})]),_:1},8,["onClick","class"])],8,Yoe)),[[L(t),a.value]]):qe("",!0),g.type=="interactive"?Ue((K(),he("div",Xoe,[ye(bt,{variant:"tertiary",onClick:y=>L(s)(g.id),class:ce(f.$style["close-btn"]),size:18},{default:we(()=>[ye(gt,{src:"XMarkSolid",size:"9"})]),_:1},8,["onClick","class"])])),[[L(t),"Close"]]):qe("",!0)],42,joe)),[[L(n)]])}),128))]),_:1},8,["class"]))}}),[["__cssModules",{$style:{"notification-wrapper":"_notification-wrapper_1gnza_1","notification-item":"_notification-item_1gnza_15","notification--success":"_notification--success_1gnza_30","notification--error":"_notification--error_1gnza_36","close-btn":"_close-btn_1gnza_42","notification--info":"_notification--info_1gnza_45","notification--warning":"_notification--warning_1gnza_52","notification--interactive":"_notification--interactive_1gnza_59","notification--white":"_notification--white_1gnza_67","snackbar-type":"_snackbar-type_1gnza_75",snackbar__message:"_snackbar__message_1gnza_84",message:"_message_1gnza_97","error-message":"_error-message_1gnza_105",snackbar__icon:"_snackbar__icon_1gnza_111","actions-notification":"_actions-notification_1gnza_120","icon-draw":"_icon-draw_1gnza_128","copy-btn":"_copy-btn_1gnza_136"}}]]);/*!
159
+ `+i+f)}}catch{}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Fu(this.defaults,n);const{transitional:o,paramsSerializer:s,headers:r}=n;o!==void 0&&Kv.assertOptions(o,{silentJSONParsing:Mo.transitional(Mo.boolean),forcedJSONParsing:Mo.transitional(Mo.boolean),clarifyTimeoutError:Mo.transitional(Mo.boolean),legacyInterceptorReqResOrdering:Mo.transitional(Mo.boolean),advertiseZstdAcceptEncoding:Mo.transitional(Mo.boolean),validateStatusUndefinedResolves:Mo.transitional(Mo.boolean),encodeBasicAuthUsername:Mo.transitional(Mo.boolean)},!1),s!=null&&(fe.isFunction(s)?n.paramsSerializer={serialize:s}:Kv.assertOptions(s,{encode:Mo.function,serialize:Mo.function},!0)),n.allowAbsoluteUrls!==void 0||(fe.hasOwnProp(this.defaults,"allowAbsoluteUrls")&&this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Kv.assertOptions(n,{baseUrl:Mo.spelling("baseURL"),withXsrfToken:Mo.spelling("withXSRFToken")},!0),n.method=(fe.getSafeProp(n,"method")||fe.getSafeProp(this.defaults,"method")||"get").toLowerCase();const i=fe.getSafeProp(r,"common"),a=fe.getSafeProp(r,n.method),l=r&&fe.merge(UE(i)?i:void 0,UE(a)?a:void 0);r&&fe.forEach(xM.concat("common"),v=>{UE(fe.getSafeProp(r,v))&&delete r[v]}),n.headers=Ao.concat(l,r);const u=[];let c=!0;this.interceptors.request.forEach(function(y){if(typeof y.runWhen=="function"&&y.runWhen(n)===!1)return;c=c&&y.synchronous;const b=n.transitional||PE;b&&b.legacyInterceptorReqResOrdering?u.unshift(y.fulfilled,y.rejected):u.push(y.fulfilled,y.rejected)});const d=[];this.interceptors.response.forEach(function(y){d.push(y.fulfilled,y.rejected)});let h,f=0,p;if(!c){const v=[GE.bind(this),void 0];for(v.unshift(...u),v.push(...d),p=v.length,h=Promise.resolve(n);f<p;)h=h.then(v[f++],v[f++]);return h}p=u.length;let g=n;for(;f<p;){const v=u[f++],y=u[f++];try{g=v?v(g):g}catch(b){if(!y){h=Promise.reject(b);break}try{const S=y.call(this,b);fe.isThenable(S)&&(h=Promise.resolve(S).then(()=>GE.call(this,g)))}catch(S){h=Promise.reject(S)}break}}if(!h)try{h=GE.call(this,g)}catch(v){h=Promise.reject(v)}for(f=0,p=d.length;f<p;)h=h.then(d[f++],d[f++]);return h}getUri(t){t=Fu(this.defaults,t);const n=LM(t.baseURL,t.url,t.allowAbsoluteUrls,t);return wM(n,t.params,t.paramsSerializer)}};fe.forEach(["delete","get","head","options"],function(t){Ou.prototype[t]=async function(n,o){return this.request(Fu(o||{},{method:t,url:n,data:o&&fe.hasOwnProp(o,"data")?o.data:void 0}))}}),fe.forEach(["post","put","patch","query"],function(t){function n(o){return async function(r,i,a){return this.request(Fu(a||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}Ou.prototype[t]=n(),t!=="query"&&(Ou.prototype[t+"Form"]=n(!0))});let mne=class NG{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(r){n=r});const o=this;this.promise.then(s=>{if(!o._listeners)return;let r=o._listeners.length;for(;r-- >0;)o._listeners[r](s);o._listeners=null}),this.promise.then=s=>{let r;const i=new Promise(a=>{o.subscribe(a),r=a}).then(s);return i.cancel=function(){o.unsubscribe(r)},i},t(function(r,i,a){o.reason||(o.reason=new Zf(r,i,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new NG(function(s){t=s}),cancel:t}}};function vne(e){return function(n){return e.apply(null,n)}}function yne(e){return fe.isObject(e)&&e.isAxiosError===!0}const qv={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(qv).forEach(([e,t])=>{qv[t]===void 0&&(qv[t]=e)});function oN(e){const t=new Ou(e),n=tM(Ou.prototype.request,t);return fe.extend(n,Ou.prototype,t,{allOwnKeys:!0}),fe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return oN(Fu(e,s))},n}const Jn=oN(Xf);Jn.Axios=Ou,Jn.CanceledError=Zf,Jn.CancelToken=mne,Jn.isCancel=AM,Jn.VERSION=BE,Jn.toFormData=Hv,Jn.AxiosError=lt,Jn.Cancel=Jn.CanceledError,Jn.all=function(t){return Promise.all(t)},Jn.spread=vne,Jn.isAxiosError=yne,Jn.mergeConfig=Fu,Jn.AxiosHeaders=Ao,Jn.formToJSON=e=>DM(fe.isHTMLForm(e)?new FormData(e):e),Jn.getAdapter=eN.getAdapter,Jn.HttpStatusCode=qv,Jn.default=Jn;const{Axios:lxe,AxiosError:uxe,CanceledError:cxe,isCancel:dxe,CancelToken:hxe,VERSION:fxe,all:pxe,Cancel:gxe,isAxiosError:wne,spread:mxe,toFormData:vxe,AxiosHeaders:yxe,HttpStatusCode:wxe,formToJSON:Cxe,getAdapter:bxe,mergeConfig:Sxe,create:Exe}=Jn;class Qf extends Error{constructor(t,n,o,s,r){super(t),this.name="ApiError",this.statusCode=n,this.code=o,this.details=s,this.type=r,Object.setPrototypeOf(this,Qf.prototype)}}const Cne=e=>{var t,n;if(wne(e)){const o=(t=e.response)==null?void 0:t.status,s=(n=e.response)==null?void 0:n.data,r=(s==null?void 0:s.message)||e.message||"An unexpected error occurred",i=(s==null?void 0:s.code)||e.code,a=(s==null?void 0:s.details)||s;let l="UNKNOWN";return!o||e.code==="ERR_NETWORK"||e.code==="ECONNABORTED"?l=e.code==="ECONNABORTED"?"TIMEOUT":"NETWORK":o>=500?l="SERVER":o===br.UNAUTHORIZED||o===br.FORBIDDEN?l="AUTH":o===br.UNPROCESSABLE_ENTITY||o===br.BAD_REQUEST?l="VALIDATION":o>=br.BAD_REQUEST&&(l="CLIENT"),new Qf(r,o,i,a,l)}return e instanceof Error?new Qf(e.message,void 0,void 0,void 0,"UNKNOWN"):new Qf("An unknown error occurred",void 0,void 0,void 0,"UNKNOWN")},sN={accessToken:"account.token",refreshToken:"account.refresh_token"},bne={baseUrl:"BASE_URL"},rN="/refresh-token",Sne=3e5,Ene="*",iN={Accept:"application/json","Content-Type":"application/json"},_ne="undefined",Rne="No access token found",Mu={badRequest:400,unauthorized:401,tooEarly:425},Tne=[Mu.unauthorized,Mu.tooEarly,Mu.badRequest],Dne="unauthenticated",xne="invalid_token",Ane="refresh_token_expired",Ine={type:"TOKEN_EXPIRED",message:"Authentication token has expired"},Pne="Session refreshed successfully",kne="Session expired. Please log in again.",Fne=e=>{const{error:t}=e??{};return typeof t=="string"?t:t==null?void 0:t.key},One=e=>{var t,n;return((t=e==null?void 0:e.response)==null?void 0:t.status)!==Mu.badRequest?!1:Fne((n=e.response)==null?void 0:n.data)===xne},Mne=()=>{},Nne=e=>sessionStorage.getItem(e)||"",WE=()=>{const e=yv.get(sN.accessToken);return e&&e!==_ne?e:null},Lne=()=>!!yv.get(sN.refreshToken),Vne=()=>{const e=window.location.origin,t=Nne(bne.baseUrl);if(!t)return e;try{return new URL(t,e).origin}catch{return e}};class zE{constructor(t,n=Mne,o){this.client=t,this.showMessage=n,this.onAuthExpired=o}attach(){const t=zJ({refreshTokenFn:n=>this.refresh(n),onRefreshSuccess:n=>{this.showMessage(Pne,"success"),this.client.defaults.headers.common.Authorization=`Bearer ${n.access_token}`},onRefreshFailure:()=>{this.showMessage(kne,"error")},useStandardizedConfig:!0});this.handler=t,WJ(this.client,t,{retryStatusCodes:[...Tne],tokenExpiredDetection:zE.isTokenExpired})}refreshAccessToken(){return!this.handler||!Lne()?Promise.resolve(!1):(this.pendingRefresh??(this.pendingRefresh=this.handler.handleTokenRefresh().catch(()=>!1).finally(()=>{this.pendingRefresh=void 0})),this.pendingRefresh)}static isTokenExpired(t){var i,a;const n=(i=t==null?void 0:t.response)==null?void 0:i.status;if(n===Mu.tooEarly)return!0;const{error:o,details:s={}}=((a=t==null?void 0:t.response)==null?void 0:a.data)??{},r=typeof o=="string"?o:o==null?void 0:o.key;return n===Mu.badRequest||n!==Mu.unauthorized||typeof o=="string"||r!==Dne?!1:Object.keys(s).length===0||s.reason===Ane}async refresh(t){const n=await this.client.post(rN,{refresh_token:t}),o="data"in n&&n.data?n.data:n;return{access_token:o.access_token,refresh_token:o.refresh_token,expires_in:o.expires_in}}handleAuthExpired(){var t;if(window.self===window.top){(t=this.onAuthExpired)==null||t.call(this);return}window.parent.postMessage(Ine,Vne())}}class Bne{constructor(t={}){this.options={unwrapResponse:!0,withRefreshToken:!0,requireToken:!0,...t},this.client=Jn.create({baseURL:typeof t.baseURL=="string"?t.baseURL:"",timeout:t.timeout??Sne,headers:{...iN,...t.headers}}),this.setupRequestInterceptor(),this.setupResponseInterceptor(),this.setupErrorHandling()}get(t,n){return this.request({...n,method:"GET",url:t})}post(t,n,o){return this.request({...o,method:"POST",url:t,data:n})}put(t,n,o){return this.request({...o,method:"PUT",url:t,data:n})}patch(t,n,o){return this.request({...o,method:"PATCH",url:t,data:n})}delete(t,n){return this.request({...n,method:"DELETE",url:t})}request(t){return this.client.request(t)}setupRequestInterceptor(){this.client.interceptors.request.use(async t=>{const{baseURL:n,dynamicHeaders:o,requireToken:s}=this.options;typeof n=="function"&&(t.baseURL=n());const r=t.url===rN,i=r?WE():await this.resolveAccessToken();if(!i&&s&&!r)throw new Error(Rne);t.headers.set("Accept-Language",Ene),t.headers.has("Content-Type")||t.headers.set("Content-Type",iN["Content-Type"]),t.headers.has("Content-Type")&&t.headers.get("Content-Type")==="multipart/form-data"&&t.headers.delete("Content-Type"),i&&t.headers.set("Authorization",`Bearer ${i}`);for(const[a,l]of Object.entries((o==null?void 0:o(t))??{}))t.headers.set(a,l);return t})}async resolveAccessToken(){const t=WE();return t||!this.tokenRefresher?t:(await this.tokenRefresher.refreshAccessToken(),WE())}setupResponseInterceptor(){this.client.interceptors.response.use(t=>this.options.unwrapResponse?t.data:t)}setupErrorHandling(){const{withRefreshToken:t,showMessage:n,onAuthExpired:o,onError:s}=this.options;t&&(this.tokenRefresher=new zE(this.client,n,o),this.tokenRefresher.attach()),this.client.interceptors.response.use(void 0,r=>(One(r)&&(o==null||o("/sw?redirect=1")),Promise.reject(r))),s&&this.client.interceptors.response.use(void 0,s)}}const $ne=5,Hne=1e3,Gne=3,Une="default",Wne=e=>new URL(e,"http://localhost").pathname;class zne{constructor(t={}){this.groups=new Map,this.defaultLimit=t.defaultLimit??$ne,this.rules=t.rules??[],this.releaseDelayMs=t.releaseDelayMs??Hne}async run(t,n){const o=this.resolveGroup(t);await this.acquire(o);try{return await n()}finally{this.release(o)}}resolveGroup(t){const n=Wne(t),o=this.rules.find(i=>i.pattern.test(n)),s=o?o.pattern.source:Une;let r=this.groups.get(s);return r||(r={limit:(o==null?void 0:o.limit)??this.defaultLimit,ongoing:0,queue:[]},this.groups.set(s,r)),r}acquire(t){return new Promise(n=>{const o=()=>{t.ongoing++,n()};t.ongoing<t.limit?o():t.queue.push(o)})}release(t){t.ongoing--;const n=t.queue.shift();n&&setTimeout(n,this.releaseDelayMs)}}const jne=(e,t)=>{const n=new zne(t),o=Jn.getAdapter(e.defaults.adapter);return e.defaults.adapter=s=>n.run(s.url??"",()=>o(s)),n},Kne=(e,{maxRetries:t=Gne}={})=>{e.interceptors.response.use(void 0,async n=>{var a,l;const o=n.config;if(((a=n.response)==null?void 0:a.status)!==429||!o)return Promise.reject(n);const s=(o._retryCount??0)+1;if(s>t)return Promise.reject(n);o._retryCount=s;const r=Number.parseInt(String(((l=n.response.headers)==null?void 0:l["retry-after"])??""),10),i=Number.isNaN(r)?2**s*1e3:r*1e3;return await new Promise(u=>setTimeout(u,i)),e.request(o)})},qne=6e4,Yne="/start",Xne=(e=Yne)=>{const n=`${sessionStorage.getItem("BASE_URL")||""}${e}`;window.location.replace(n)};function Zne(e,t){const n=sessionStorage.getItem(e)||"";return(n==null?void 0:n.length)>0?n:t}class Jne{constructor(t,n={}){const{concurrency:o,rateLimitRetry:s,...r}=n,i=()=>Zne("API_BASE_URL","");this.callbackFunc=t,this.api=new Bne({baseURL:i,timeout:qne,requireToken:!0,onAuthExpired:Xne,...r,unwrapResponse:!1,showMessage:t}),this.axios=this.api.client,o!==!1&&jne(this.axios,o),s!==!1&&Kne(this.axios,s)}buildUrl(t=""){const n=t.replace(/^\//,"");return!n.startsWith("http://")&&!n.startsWith("https://")?`/${n}`:n}buildQueryParams(t){const n=new URLSearchParams;Object.entries(t).forEach(([s,r])=>{r!=null&&r!==""&&(Array.isArray(r)?r.forEach(i=>n.append(s,String(i))):typeof r=="object"?n.append(s,JSON.stringify(r)):n.append(s,String(r)))});const o=n.toString();return o?`?${o}`:""}async send(t,n,{params:o,data:s,options:r}={}){try{const i=o?this.buildQueryParams(o):"",a={...r,method:t,url:`${this.buildUrl(n)}${i}`};return s!==void 0&&(a.data=s),(await this.axios.request(a)).data}catch(i){throw Cne(i)}}get(t="",n,o){return this.send("GET",t,{params:n,options:o})}post(t="",n,o,s){return this.send("POST",t,{params:n,data:o,options:s})}put(t="",n,o){return this.send("PUT",t,{data:n,options:o})}patch(t="",n,o){return this.send("PATCH",t,{data:n,options:o})}delete(t="",n,o){return this.send("DELETE",t,{data:n,options:o})}}const Qne=({domainApi:e,wsCode:t,entityId:n})=>({list_cursor:{url:`${e}/v1/workspace/${t}/item/2`,method:"post",code:"list_cursor"},assignedUser:{url:`${e}/v1/workspace/${t}/item/2/assigned-users`,method:"post",code:"assignedUser"},metricValues:{url:`${e}/v1/workspace/${t}/item/2/metrics`,method:"post",code:"metricValues"},multipleAssignableUser:{url:`${e}/v1/workspace/${t}/item/2/assignable-users`,method:"post",code:"multipleAssignableUser"},assignableUser:{url:`${e}/v1/workspace/${t}/item/2/assignable-users`,method:"post",code:"assignableUser"},assignableStatus:{url:`${e}/v1/workspace/${t}/item/2/assignable-statuses`,method:"post",code:"assignableStatus"},delete_rendition:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-rendition`,method:"delete",code:"delete_rendition"},delete_thumbnail:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-thumbnail`,method:"delete",code:"delete_thumbnail"},archive_item:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"archive_item"},unarchive_item:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"unarchive_item"},removeAssignee:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-assignee`,method:"delete",code:"removeAssignee"},basicInfor:{url:`${e}/v1/workspace/${t}/tile/people/ws-user-roles/{userId}/basic-info`,method:"get",code:"basicInfor"},bulkDelete:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete`,method:"delete",code:"bulkDelete"},bulkArchive:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"bulkArchive"},bulkDateUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-date-update`,method:"put",code:"bulkDateUpdate"},bulkAssignUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-assignee-update`,method:"put",code:"bulkAssignUpdate"},bulkStatusUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-status-update`,method:"put",code:"bulkStatusUpdate"},bulkMetricUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-metric-update`,method:"put",code:"bulkMetricUpdate"},getPermission:{url:`${e}/v1/workspace/${t}/item/2/permissions`,method:"post",code:"getPermission"},getUserPermission:{url:`${e}/v1/workspace/${t}/permissions`,method:"get",code:"getUserPermission"},bulkUnarchive:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"bulkUnarchive"},downloadTemplate:{url:`${e}/v1/workspace/${t}/item/2/download-sample`,method:"get",code:"downloadTemplate"},importItems:{url:`${e}/v1/workspace/${t}/item/2/import-from-file`,method:"post",code:"importItems"},exportItems:{url:`${e}/v1/workspace/${t}/item/2/export`,method:"get",code:"exportItems"},updateFromFile:{url:`${e}/v1/workspace/${t}/item/2/update-from-file`,method:"post",code:"updateFromFile"},metricList:{url:`${e}/v1/workspace/${t}/entity/2/metrics`,method:"get",code:"metricList"},getEntityDetail:{url:`${e}/workspace/${t}/entities/${n}?include_permission=1`,method:"get",code:"getEntityDetail"},item:{url:`${e}/v1/workspace/${t}/item/2/update`,method:"put",code:"item"},me:{url:`${e}/v1/me`,method:"get",code:"me"},workspaces:{url:`${e}/v1/workspaces`,method:"get",code:"workspaces"},entityUserRoles:{url:`${e}/v1/workspace/${t}/entity/2/users`,method:"get",code:"entityUserRoles"},templateFlowStatuses:{url:`${e}/workspace/${t}/entities/${n}/template_flow_statuses`,method:"get",code:"templateFlowStatuses"},createNewItem:{url:`${e}/v1/workspace/${t}/item/2/new?entity_id=${n}`,method:"post",code:"createNewItem"},getAssignableStatuses:{url:`${e}/v1/workspace/${t}/entity/2/assignable-statuses`,method:"get",code:"getAssignableStatuses"},getAssignableAssignees:{url:`${e}/v1/workspace/${t}/entity/2/users`,method:"get",code:"getAssignableAssignees"},getFilterStatuses:{url:`${e}/v1/workspace/${t}/entity/2/statuses`,method:"get",code:"getFilterStatuses"},bulkRename:{url:`${e}/v1/workspace/${t}/item/2/bulk-rename`,method:"put",code:"bulkRename"},bulkCreate:{url:`${e}/v1/workspace/${t}/item/2/bulk-create`,method:"post",code:"bulkCreate"}}),eoe=(e,t)=>{const n=new Blob([e]),o=globalThis.URL.createObjectURL(n),s=document.createElement("a");s.href=o,s.download=t,document.body.appendChild(s),s.click(),s.remove(),globalThis.URL.revokeObjectURL(o)},toe=15e3,noe=new Set(["bulkDelete","bulkArchive","bulkUnarchive","bulkDateUpdate","bulkAssignUpdate","bulkStatusUpdate","bulkMetricUpdate","bulkRename","removeAssignee","delete_thumbnail","delete_rendition"]);class aN extends Jne{constructor(t,n,o){const s=n==null?void 0:n.domainApi,r=n==null?void 0:n.wsCode,i=(n==null?void 0:n.entityId)||"";super(o,{concurrency:{rules:[{pattern:/^\/api\/v1\/workspace\/[^/]+\/item\/2$/,limit:1},{pattern:/^\/api\/v1\/workspace\/[^/]+\/item\/2\/metrics$/,limit:5}]}}),this.events=Object.create(null);const a=Qne({domainApi:s,wsCode:r,entityId:i}),l={};Object.entries(a).forEach(([u,c])=>{const d=u;t[d]?l[d]=t[d]:(console.warn(`API config for ${d} is missing, using base config.`),l[d]=c)}),this.apiConfig=l}on(t,n){var o;((o=this.events)[t]??(o[t]=[])).push(n)}off(t,n){const o=this.events[t];o&&(this.events[t]=o.filter(s=>s!==n))}emit(t,...n){const o=this.events[t];o!=null&&o.length&&o.forEach(s=>{try{s(...n)}catch(r){console.error(`Error in event listener for ${t}:`,r)}})}buildHeaders(t){return typeof FormData<"u"&&t instanceof FormData?{"Content-Type":"multipart/form-data"}:{}}async _requestHandler({method:t,path:n,params:o,payload:s,code:r,responseType:i,autoDownload:a=!0,unwrapResponse:l=!0,timeout:u}){var h,f;const c=this.buildHeaders(s);let d;try{if(d=await this.axios.request({method:t,url:n,params:o,data:s,headers:c,responseType:i,timeout:u}),(((h=d.headers)==null?void 0:h["content-type"])||"").includes("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")){const g=((f=d.headers)==null?void 0:f["content-disposition"])||"",v=g.includes("filename=")?g.split("filename=")[1]:"exported_items.xlsx";a&&eoe(d.data,v)}if(d.status>=400&&d.status<=500)throw new Error(`Client error (${d.status}): ${d.statusText}`);return this.emit("call-api",{apiCode:r,path:n,params:o,payload:s,res:d,success:!0}),l?d.data:d}catch(p){throw console.error("API Request Error:",p),p.code==="ERR_NETWORK"||!navigator.onLine?this.emit("call-api",{path:n,params:o,payload:s,error:new Error("You are currently offline. Please check your network connection."),success:!1,apiCode:"offline"}):this.emit("call-api",{path:n,params:o,payload:s,error:p,success:!1,apiCode:r,res:p==null?void 0:p.response}),p}}generateUrl(t,n){let o=t;return Object.entries(n).forEach(([s,r])=>{o=o.replace(`{${s}}`,String(r))}),o}async request(t,n,o={}){const{url:s,code:r,method:i}=this.apiConfig[t],a=this.generateUrl(s,n);return this._requestHandler({method:i,path:a,params:o.params,payload:o.payload,code:r,responseType:o.responseType,autoDownload:o.autoDownload,unwrapResponse:o.unwrapResponse,timeout:noe.has(t)?toe:void 0})}async getAllItem_cursor(t){var r;const n=t.workspaceId,o={entity_ids:((r=t.entityIds)==null?void 0:r.join(","))||"",cursor:t.cursor||void 0,per_page:t.pageSize||t.perPage||20,offset:t.offset||void 0,search:t.search||t.q||void 0,include_signature:1,include:"last_updated_by,property,last_completed_by",include_permission:"{include_permission}",assignee_any_ina:(t==null?void 0:t.assignee_any_ina)||"",assignee_all_ina:(t==null?void 0:t.assignee_all_ina)||void 0,with_not_assigned:t.with_not_assigned||void 0,status_ina:t.status_ina||void 0,status_eq:t.status_eq||void 0,start_date_gte:t.start_date_gte||void 0,start_date_lte:t.start_date_lte||void 0,start_date_btw:t.start_date_btw||void 0,due_date_gte:t.due_date_gte||void 0,due_date_lte:t.due_date_lte||void 0,due_date_btw:t.due_date_btw||void 0,condition_combine_type:t.condition_combine_type||"or",preflight_status:t.preflight_status||void 0},s=t.sortBy;return this.request("list_cursor",{workspaceId:n},{params:o,payload:{sort_by:s}})}async getAssignedUser(t){const n={item_ids:t.item_ids||[],metric_ids:t.metric_ids||[]},o={per_page:t.per_page};return this.request("assignedUser",{workspaceId:t.workspaceId},{params:o,payload:n})}async getMetricList({workspaceId:t,entityId:n,page:o,query:s,per_page:r}){return this.request("metricList",{workspaceId:t,entityId:n},{params:{status_ed:1,include:"metric_type",entity_id:n,include_permission:1,per_page:r||100,page:o||1,name_like:s||void 0,permission:"1,2"}})}async getMetricValues({workspaceId:t,item_ids:n,per_page:o,metric_ids:s}){const r={item_ids:n,metric_ids:s};return this.request("metricValues",{workspaceId:t},{params:{per_page:o,include_permission:1},payload:r})}async multipleAssignableUser(t){const n=t.workspaceId,o=t.itemIds,s={page:t.page||1,per_page:t.perPage,display_name_like:t.q||"",item_ids:o||[]};return o.length||(delete s.item_ids,s.entity_id=t.entityId),this.request("multipleAssignableUser",{workspaceId:n},{payload:s})}async getAssignableStatus(t){var s;const n=t.workspaceId,o={item_ids:t.itemIds||[],page:t.page||1,per_page:t.perPage||10,name_like:t.name_like||""};return((s=t.itemIds)==null?void 0:s.length)==0&&(o.entity_id=t.entityId,delete o.item_ids),this.request("assignableStatus",{workspaceId:n||""},{payload:o})}async updateSceneName({workspaceId:t,entityId:n,itemId:o,name:s}){const r={item_id:o,entity_id:n,name:s,include:"item_user_roles"};return this.request("item",{workspaceId:t,itemId:o},{payload:r})}async deleteScene(t,n,o){const s={item_ids:[o]};return this.request("bulkDelete",{workspaceId:t,entityId:n},{payload:s})}async deleteThumbnail({workspaceId:t,itemIds:n,entityId:o,filterParams:s}){const r={item_ids:n,entity_id:o};return!n||n.length===0?r.item_ids=void 0:r.entity_id=void 0,this.request("delete_thumbnail",{workspaceId:t},{payload:r,params:s})}async deleteRendition({workspaceId:t,itemIds:n,deleteAll:o=!1,entityId:s,filterParams:r}){const i={item_ids:n,delete_all:o?1:void 0,entity_id:s};return!n||n.length===0?i.item_ids=void 0:i.entity_id=void 0,this.request("delete_rendition",{workspaceId:t},{payload:i,params:r,unwrapResponse:!1})}async archiveScene(t,n,o){const s={item_ids:o,status:0};return this.request("archive_item",{workspaceId:t,entityId:n},{payload:s})}async changeDate({workspaceId:t,itemIds:n,startDate:o,dueDate:s,entityId:r,filterParams:i}){const a={item_ids:n,start_date:o,due_date:s,entity_id:r};return this.request("bulkDateUpdate",{workspaceId:t},{payload:a,params:i,unwrapResponse:!1})}async updateAssignee(t){const{workspaceId:n,itemIds:o,userIds:s,entityId:r}=t,i={item_ids:o,ws_user_role_ids:s,entity_id:r};return this.request("bulkAssignUpdate",{workspaceId:n},{payload:i,params:t.filterParams})}createUpdateEntityPayload(t){const{itemIds:n,userIds:o,entityId:s}=t,r={item_ids:n,ws_user_role_ids:o,entity_id:s};return!n||n.length===0?(r.item_ids=void 0,r.entity_id=s):(r.item_ids=n,r.entity_id=void 0),r}async removeAssignee(t){const n=this.createUpdateEntityPayload(t);return this.request("removeAssignee",{workspaceId:t.workspaceId},{payload:n,params:t.filterParams})}async replaceAssignee(t){const{workspaceId:n,itemIds:o,userIds:s,entityId:r}=t,i={item_ids:o,ws_user_role_ids:s,entity_id:r};return this.request("bulkAssignUpdate",{workspaceId:n},{params:{replace:1,...t.filterParams},payload:i})}async addAssignee({workspaceId:t,itemIds:n,userIds:o,entityId:s,filterParams:r}){const i={item_ids:n,ws_user_role_ids:o,entity_id:s};return this.request("bulkAssignUpdate",{workspaceId:t},{payload:i,params:r})}async unAssignAll(t){const{workspaceId:n,entityId:o,itemIds:s,filterParams:r}=t,i={item_ids:s,entity_id:o,ws_user_role_ids:[]};return!s||s.length===0?i.item_ids=void 0:i.entity_id=void 0,this.request("removeAssignee",{workspaceId:n,entityId:String(o)},{payload:i,params:r})}async updateItemStatus(t){const{workspaceId:n,itemIds:o=[],statusId:s,entityId:r}=t,i={item_ids:o,template_flow_status_id:s};return o.length||(i.item_ids=void 0,i.entity_id=r),this.request("bulkStatusUpdate",{workspaceId:n},{payload:i,params:t.filterParams,unwrapResponse:!1})}async getUserInformation(t,n){return this.request("basicInfor",{workspaceId:t,userId:n})}async bulkDeleteItems({workspaceId:t,itemIds:n,entityId:o,filterParams:s}){const r={item_ids:n,entity_id:o};return!n||n.length===0?r.item_ids=void 0:r.entity_id=void 0,this.request("bulkDelete",{workspaceId:t},{payload:r,params:s})}async bulkUnarchiveItems({workspaceId:t,itemIds:n,entityId:o,filterParams:s}){const r={item_ids:n,status:1,entity_id:o};return!n||n.length===0?r.item_ids=void 0:r.entity_id=void 0,this.request("bulkUnarchive",{workspaceId:t},{payload:r,params:s,unwrapResponse:!1})}async bulkArchiveItems({workspaceId:t,itemIds:n,entityId:o,filterParams:s}){const r={item_ids:n,status:0,entity_id:o};return!n||n.length===0?r.item_ids=void 0:r.entity_id=void 0,this.request("bulkArchive",{workspaceId:t},{payload:r,params:s,unwrapResponse:!1})}async bulkUpdateMetric(t){const{workspaceId:n,itemIds:o,metricId:s,value:r,clear:i}=t,a={item_ids:o,metric_id:s,metric_value:r,clear:i??(r==null?1:0),entity_id:t.entityId};return t.itemIds===void 0?(delete a.item_ids,a.entity_id=String(t.entityId)):(a.item_ids=o,a.entity_id=void 0),this.request("bulkMetricUpdate",{workspaceId:n},{payload:a,params:t.filterParams,unwrapResponse:!1})}async getPermissionForItems({workspaceId:t,itemIds:n}){const o={item_ids:n};return this.request("getPermission",{workspaceId:t},{payload:o,params:{per_page:50}})}async unarchiveScene(t,n,o){const s={item_ids:o,status:1};return this.request("unarchive_item",{workspaceId:t,entityId:n},{payload:s})}async getUserPermission(t){return this.request("getUserPermission",{workspaceId:t})}async getEntityDetail(t,n){return this.request("getEntityDetail",{workspaceId:t,entityId:n})}async downloadTemplate(t,n,o=!0){return this.request("downloadTemplate",{workspaceId:t,entityId:n},{responseType:"blob",params:{format:"xlsx",entity_id:n},autoDownload:o})}async downloadExportedItemsFile(t,n,o=!0){return this.request("exportItems",{workspaceId:t,exportId:n},{responseType:"blob",params:{format:"xlsx",entity_id:n},autoDownload:o})}async addNewSceneViaImportFile(t,n,o){return this.request("importItems",{workspaceId:t,entityId:n},{payload:o})}async overwriteScenesViaImportFile(t,n,o){return this.request("updateFromFile",{workspaceId:t,entityId:n},{payload:o})}async getMe(){return this.request("me",{})}async getWorkspaces(t){const n={page:1,per_page:1,"ws_user_role>status_eq":1,include:"owner",include_ws:t};return this.request("workspaces",{},{params:n})}async getEntityUserRoles(t){const{workspaceId:n,page:o,per_page:s,display_name_like:r,entity_ids:i}=t;return this.request("entityUserRoles",{workspaceId:n},{params:{page:o,per_page:s,display_name_like:r,entity_ids:i}})}async getTemplateFlowStatuses(t){const{workspaceId:n,entityId:o}=t;return this.request("templateFlowStatuses",{workspaceId:n,entityId:o},{params:{per_page:100,page:t.page??1,all:1,name_like:t.name_like}})}async addNewItem(t,n,o){return this.request("createNewItem",{workspaceId:t,entityId:n},{payload:o})}async getFilterStatuses(t,n,o){return this.request("getFilterStatuses",{workspaceId:t,entityId:n},{params:o})}async getAssignableStatuses(t,n){return this.request("getAssignableStatuses",{workspaceId:t},{params:n})}async getAssignableAssignees(t,n){return this.request("getAssignableAssignees",{workspaceId:t},{params:n})}async bulkRename(t){return this.request("bulkRename",{workspaceId:t.workspaceId,entityId:t.entityId},{payload:t.payload,params:t.filter,unwrapResponse:!1})}async bulkCreate(t){return this.request("bulkCreate",{workspaceId:t.workspaceId,entityId:t.entityId},{payload:t.payload,params:t.filter,unwrapResponse:!1})}}const ooe=(e,t,n,o,s,r,i)=>{const a=B(!1),{apiServices:l}=no(n,o),u=Y(()=>!!(s!=null&&s.value&&(r!=null&&r.value))),c=En("filterParams",null);return{isUpdating:a,handleUpdate:async h=>{var p;const f=h.value;try{const g={itemIds:e.value.itemIds,metricId:h.id,workspaceId:String(e.value.workspaceId),filterParams:c!=null&&c.value?c.value:void 0};h.value==null?g.clear=1:g.value=f,u.value?(delete g.itemIds,g.entityId=String(o.entityId)):g.itemIds=e.value.itemIds,a.value=!0;const v=await((p=l.value)==null?void 0:p.bulkUpdateMetric(g));return console.log("Bulk update response:",v),t(h,v),v}catch(g){console.error("Error during bulk metric update:",g)}finally{a.value=!1}}}},soe=Et(ot({__name:"MetricUpdateButton",props:{workspaceId:{},entityId:{},variant:{},rowSelected:{},selectedIds:{},disabled:{type:Boolean},selectedAll:{type:Boolean}},emits:["update","update-start","update-completed","update-failed"],setup(e,{emit:t}){const n=ZO(),o=B([]),s=e,r=t,i=B([]),a=B(null),l=W=>{var ee,se,X;const oe=o.value.findIndex(I=>I.id===W.id);a.value=oe;const ie=(ee=i.value[oe])==null?void 0:ee.$el;(se=E.value)==null||se.scrollTo(oe*30),ie&&ie.scrollIntoView({behavior:"smooth",block:"center"}),u(oe),(X=i.value[oe])==null||X.show()},u=W=>{a.value=W,i.value.forEach((oe,ie)=>{ie!==W&&oe&&oe.hide()})},c=B(""),d=()=>{c.value="",i.value.forEach(W=>{W==null||W.hide()}),a.value=null},h=Y(()=>s.selectedIds||[]),f=Y(()=>({itemIds:h.value,workspaceId:String(s.workspaceId)})),p=En("isSelectAll",B(!1)),g=En("bulkUpdate",B(!1)),v=B(null),{handleUpdate:y,isUpdating:b}=ooe(f,(W,oe)=>{console.log("Update callback received:",W,oe),r("update",W)},!1,s,g,p),S=async W=>{var oe;r("update-start");try{const ie=await y(W);(ie==null?void 0:ie.status)!==br.ACCEPTED&&(ie==null?void 0:ie.status)!==br.OK?r("update-failed"):(r("update-completed",ie),setTimeout(()=>{var ee;d(),(ee=v.value)==null||ee.hide()},500))}catch(ie){console.error("Failed to update metric:",ie),r("update-failed"),(oe=v.value)==null||oe.open()}},w=W=>{d(),ft(()=>{var oe;(oe=E.value)==null||oe.focus()})},E=B(null),_=(W,oe)=>{var ie;W?(ie=E.value)==null||ie.focus():d(),W&&oe!==W&&$("")},D=B(!0),x=B(!0),{apiServices:M}=no(!1,s),V=async(W,oe,ie)=>{var ee;try{return ie?x.value=!0:D.value=!0,await((ee=M.value)==null?void 0:ee.getMetricList({workspaceId:s.workspaceId||"",entityId:s.entityId||"",page:W,query:oe,per_page:10}))}catch(se){throw console.error("Failed to fetch metric list:",se),se}finally{D.value=!1,x.value=!1}},A=B(0),P=B(!0),k=W=>({id:String(W.id),label:String(W.name),value:String(W.id),description:W.morpheme_value?`${String(W.morpheme_value)}`:"",type:n.checkEditType(W),metricConfig:W}),O=W=>W.filter(oe=>!oe.formula).filter(oe=>{var ie;return((ie=oe==null?void 0:oe.auth_permission)==null?void 0:ie.permission)==2}).map(k),N=async()=>{A.value+=1;const W=await V(A.value,c.value,!0);if(W&&W.data){const oe=O(W.data);o.value=[...o.value,...oe],P.value=W.meta.last_page!=W.meta.current_page}else P.value=!1},$=async W=>{c.value=W,A.value=1;try{const oe=await V(A.value,c.value);oe&&oe.data?(o.value=O(oe.data),P.value=oe.meta.last_page!=oe.meta.current_page):o.value=[]}catch{o.value=[]}};return(W,oe)=>(K(),ze(Uf,{ref_key:"wrapperRef",ref:v,isUpdating:L(b),disabled:s.disabled,onOnVisibleChange:_},{trigger:we(({hide:ie,disabled:ee})=>[ye(bt,{variant:s.variant,loading:L(b),disabled:ee,onEscape:ie},{default:we(()=>[ye(gt,{src:"SquareRootVariable",class:"icon"}),oe[1]||(oe[1]=tt(" Metric ",-1))]),_:1},8,["variant","loading","disabled","onEscape"])]),popup:we(({isVisible:ie,popupRef:ee,hide:se})=>[Ue(ye(ga,{ref_key:"searchListRef",ref:E,style:{width:"320px"},options:o.value,loading:D.value,"loading-more":x.value,"selected-id":void 0,"has-more":P.value,onSearch:$,onSelect:l,onLoadMore:oe[0]||(oe[0]=()=>N()),onCancel:se},{item:we(({item:X,index:I,selectedIndex:z})=>[ye(oee,{ref:ne=>i.value[I]=ne,label:X.label,type:X.type,morpheme:X.description||"",onFocusOnSearch:w,onOpen:ne=>u(I),attachTo:ee,config:X.metricConfig,onHandleUpdate:S,class:ce(["metric-update-item",{selected:a.value===I||z===I}])},null,8,["label","type","morpheme","onOpen","attachTo","config","class"])]),"extra-item":we(()=>[...oe[2]||(oe[2]=[be("div",{style:{width:"250px"}},null,-1)])]),"empty-list":we(()=>[...oe[3]||(oe[3]=[tt("No options available.",-1)])]),_:2},1032,["options","loading","loading-more","has-more","onCancel"]),[[lr,ie]])]),default:we(()=>[oe[4]||(oe[4]=tt(" > ",-1))]),_:1},8,["isUpdating","disabled"]))}}),[["__scopeId","data-v-989820f7"]]),roe={class:"status-label"},lN=Et(ot({__name:"StatusItem",props:{status:{},selected:{type:Boolean},focused:{type:Boolean},hovered:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=qt,o=e,s=t,r=a=>{s("select",a)},i=a=>new Bn(a).isLight()?"#f3f5f8":"#d7d7d7";return(a,l)=>(K(),he("div",{class:ce(["status-option",{selected:o.selected,focused:o.focused,hovered:o.hovered}]),onClick:l[0]||(l[0]=u=>r(e.status.id))},[be("div",{class:"status-color",style:cn({backgroundColor:e.status.color,borderColor:i(e.status.color)})},null,4),Ue((K(),he("div",roe,[kt(a.$slots,"label",{},()=>[tt(at(e.status.name),1)],!0)])),[[L(n),{content:e.status.name,delay:[1e3,0]}]])],2))}}),[["__scopeId","data-v-aeaa75a4"]]),ioe=["innerHTML"],uN=Et(ot({__name:"StatusEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},ids:{},callback:{type:Function}},emits:["updated","error","cancel","start-update","finish-update"],setup(e,{expose:t,emit:n}){const o={PER_PAGE:50,INITIAL_PAGE:1},s=e,r=n,i=B([]),a=B(!1),l=B(!1),u=B(null),c=B(o.INITIAL_PAGE),d=B(!0),h=B(0),f=B(""),p=Y(()=>{var k;return(k=s.value)==null?void 0:k.id});Y(()=>!!(s.id||s.ids&&s.ids.length>0));const g=k=>({label:k.name,value:k.id,selected:p.value===k.id,hover:!1,type:"status",disabled:!1,clickable:!0,danger:!1,data:k,id:k.id,color:k.color}),v=Y(()=>{const k=new Set;return s.id&&k.add(String(s.id)),s.ids&&s.ids.forEach(O=>{O&&k.add(String(O))}),Array.from(k)}),y=En("bulkUpdate",!1),{apiServices:b}=no(!y,s),S=Vf(),{selectionStatus:w}=go(S),E=En("filterParams",null),_=async(k=o.INITIAL_PAGE,O="",N=!1)=>{var $,W,oe,ie;N?l.value=!0:a.value=!0,u.value=null;try{const ee={workspaceId:String(s.workspaceId),itemIds:v.value,page:k,perPage:o.PER_PAGE,name_like:O.trim(),...E||{},entityId:String(s.entityId)};if((($=b.value)==null?void 0:$.getAssignableStatus)===void 0)throw new Error("API service getAssignableStatus is undefined");const se=await((W=b.value)==null?void 0:W.getAssignableStatus(ee));if(!(se!=null&&se.data)){N||(i.value=[]),d.value=!1;return}const X=se.data.map(g);i.value=N?[...i.value,...X]:X,h.value=((oe=se.meta)==null?void 0:oe.total)??se.data.length,d.value=!((ie=se.meta)!=null&&ie.on_last_page),c.value=k}catch(ee){console.error("Error fetching statuses:",ee),u.value="Failed to load statuses",N||(i.value=[]),d.value=!1,r("error",u.value)}finally{a.value=!1,l.value=!1}},D=vr(async k=>{f.value=k,c.value=o.INITIAL_PAGE,await _(o.INITIAL_PAGE,k,!1)},vi),x=async()=>{!d.value||l.value||await _(c.value+1,f.value,!0)},M=()=>{var k;r("cancel"),(k=s.params)==null||k.api.stopEditing()},V=async k=>{var O,N,$;try{const W={workspaceId:String(s.workspaceId),itemIds:v.value,statusId:String(k.value),entityId:String(s.entityId),filterParams:E!=null&&E.value?E==null?void 0:E.value:void 0};w.value==Ot.CHECKED&&y&&(W.itemIds=void 0,W.entityId=String(s.entityId)),r("start-update");const oe=await b.value.updateItemStatus(W);if(!oe)throw new Error("Status update failed: empty response");r("updated",{workspaceId:String(s.workspaceId),itemIds:v.value,isUpdateAll:w.value==Ot.CHECKED&&y,data:{id:k.id,name:k.label,color:k.color}}),s.params&&((N=s.params)==null||N.node.setData({...(O=s.params)==null?void 0:O.node.data,status:{id:k.id,name:k.label,color:k.color}}),($=s.params)==null||$.api.stopEditing()),r("finish-update",oe)}catch(W){console.error("Error updating status:",W),u.value="Failed to update status",r("error",u.value)}},A=Y(()=>i.value.map(k=>({...k})));Je([()=>s.id,()=>s.workspaceId,()=>s.ids],()=>{_()},{deep:!0,immediate:!0});const P=B(null);return Jt(()=>{ft(()=>{var k;(k=P.value)==null||k.focus()})}),t({refresh:()=>_(o.INITIAL_PAGE,f.value,!1),loadMore:x,focus:()=>{var k;return(k=P.value)==null?void 0:k.focus()}}),(k,O)=>{var N;return K(),ze(ga,Kt({ref_key:"popupRef",ref:P},s,{"selected-id":(N=s.value)==null?void 0:N.id,options:A.value,loading:a.value,"loading-more":l.value,"has-more":d.value,error:u.value,onSearch:L(D),onSelect:V,onLoadMore:x,onCancel:M,onClose:M}),{item:we(({item:$,selectedIndex:W,isSelected:oe,handleItemHover:ie,getHighlightedLabel:ee,query:se,idx:X})=>[(K(),ze(lN,{key:$.value,status:$.data,selected:oe($),onMouseover:I=>ie(X),onSelect:I=>V($),hovered:X===W},{label:we(()=>[se?(K(),he("span",{key:0,class:ce([k.$style["item-label"],k.$style.match]),style:{flex:"1"},innerHTML:ee($.label)},null,10,ioe)):(K(),he("span",{key:1,class:ce(k.$style["item-label"]),style:{flex:"1"}},at($.label),3))]),_:2},1032,["status","selected","onMouseover","onSelect","hovered"]))]),_:1},16,["selected-id","options","loading","loading-more","has-more","error","onSearch"])}}}),[["__cssModules",{$style:{"item-label":"_item-label_7ir12_1"}}]]),aoe=ot({__name:"StatusUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{},disabled:{type:Boolean},selectedAll:{type:Boolean}},emits:["updated","update-start","update-completed","update-failed"],setup(e,{emit:t}){const n=e,o=Y(()=>{const f=Go();return f==null?void 0:f.appContext.config.globalProperties.apiServices}),s=t,r=B(!1),i=B(null),a=f=>{try{r.value=!1,s("updated",f)}catch(p){console.error("Error handling status update:",p)}},l=Y(()=>({apiServices:o.value,ids:n.ids,workspaceId:n.workspaceId,entityId:n.entityId,selectedAll:n.selectedAll}));ri("bulkUpdate",!0);const u=(f,p)=>{var g,v;r.value=!1,f?(s("update-completed",p),(g=i.value)==null||g.destroy()):(s("update-failed"),(v=i.value)==null||v.open())},c=B(null),d=(f,p)=>{var g;f&&((g=c.value)==null||g.focus())},h=()=>{r.value=!0,s("update-start")};return Je(()=>n.ids,()=>{}),(f,p)=>(K(),ze(Uf,{ref_key:"wrapperRef",ref:i,isUpdating:r.value,disabled:n.disabled||r.value,onOnVisibleChange:d},{trigger:we(({hide:g,disabled:v})=>[ye(bt,{variant:n.variant,loading:r.value,disabled:v,onEscape:g},{default:we(()=>[ye(gt,{src:"Square",class:"icon"}),p[2]||(p[2]=tt(" Status ",-1))]),_:1},8,["variant","loading","disabled","onEscape"])]),popup:we(({hide:g})=>[ye(uN,Kt({disabled:r.value,ref_key:"statusRef",ref:c},l.value,{onUpdated:a,onCancel:g,onStartUpdate:h,onFinishUpdate:p[0]||(p[0]=v=>u(!0,v)),onError:p[1]||(p[1]=v=>u(!1)),callback:()=>{}}),null,16,["disabled","onCancel"])]),default:we(()=>[p[3]||(p[3]=tt(" > ",-1))]),_:1},8,["isUpdating","disabled"]))}}),Er=" ",jE=e=>e.replace(/[\r\n]+/g," "),ep=e=>e instanceof HTMLElement&&e.classList.contains("locked-tag"),_s=e=>(e==null?void 0:e.nodeType)===Node.TEXT_NODE,KE=e=>{var t;return((t=e instanceof Element?e:e.parentElement)==null?void 0:t.closest(".locked-tag"))??null},Ci=e=>{let t=0,n=e.length;return ep(e.previousSibling)&&e.data.startsWith(Er)&&(t=1),ep(e.nextSibling)&&n>t&&e.data.endsWith(Er)&&(n-=1),{start:t,end:n}},loe=e=>{if(!_s(e))return!1;const{start:t,end:n}=Ci(e);return n<=t},cN=e=>{const t=KE(e.startContainer),n=KE(e.endContainer);return t&&e.setStartAfter(t),n&&e.setEndAfter(n),e},uoe=(e,t)=>e.length===t.length&&e.every((n,o)=>{const s=t[o];return typeof n=="string"||typeof s=="string"?n===s:n.id===s.id&&n.text===s.text&&n.direction===s.direction});class coe{constructor(t){bn(this,"editor",null);bn(this,"handleInput",()=>{this.editor&&(this.sanitize(),this.ensureTagPadding(),this.normalizeCaret(),this.options.onChange(this.parse()))});bn(this,"handlePaste",t=>{var n;t.preventDefault(),this.insertPlainText(((n=t.clipboardData)==null?void 0:n.getData("text/plain"))??"")});bn(this,"handleDrop",t=>{var o,s;t.preventDefault();const n=((o=t.dataTransfer)==null?void 0:o.getData("text/plain"))??"";n&&this.insertPlainText(n,(s=document.caretRangeFromPoint)==null?void 0:s.call(document,t.clientX,t.clientY))});bn(this,"handleBeforeInput",t=>{const n=t.inputType;(n.startsWith("format")||n==="insertParagraph"||n==="insertLineBreak"||n==="insertFromDrop"||n==="insertFromYank")&&t.preventDefault()});bn(this,"handleClick",t=>{const n=this.editor,o=window.getSelection();if(!n||!(o!=null&&o.isCollapsed)||t.target!==n)return;const s=document.createRange();if(s.selectNodeContents(n),t.clientX<=s.getBoundingClientRect().right)return;const[r,i]=this.getBoundaryPoint("end");o.collapse(r,i),n.scrollLeft=n.scrollWidth});bn(this,"handleKeydown",t=>{var s,r,i;const n=this.editor;if(!n)return;if(t.key==="Escape"){(r=(s=this.options).onEscape)==null||r.call(s,t);return}if(t.key==="Enter"){t.preventDefault();return}const o=t.ctrlKey||t.metaKey;if(o&&!t.altKey&&t.key.toLowerCase()==="a"){t.preventDefault(),(i=window.getSelection())==null||i.selectAllChildren(n);return}if(t.key==="Home"||t.key==="End"){t.preventDefault(),t.stopPropagation(),this.moveToEdge(t.key==="Home"?"start":"end",t.shiftKey);return}if((t.key==="ArrowLeft"||t.key==="ArrowRight")&&!t.shiftKey&&!o&&!t.altKey){this.moveAcrossTag(t.key)&&t.preventDefault();return}if(t.key==="Backspace"||t.key==="Delete"){if(!o&&!t.altKey&&!t.shiftKey&&this.deleteCharacter(t.key)){t.preventDefault();return}const a=this.findAdjacentTag(t.key);a&&(t.preventDefault(),this.removeTag(a,t.key==="Backspace"?"after":"before"))}});bn(this,"normalizeCaret",()=>{const t=this.editor,n=window.getSelection();if(!t||!(n!=null&&n.rangeCount)||!n.isCollapsed)return;const{startContainer:o,startOffset:s}=n.getRangeAt(0);if(!t.contains(o))return;const r=KE(o);if(!r&&o!==t)return;const i=r??t.childNodes[s-1]??null,a=r?r.nextSibling:t.childNodes[s]??null;if(this.ensureTagPadding(),_s(i))n.collapse(i,Ci(i).end);else if(_s(a))n.collapse(a,Ci(a).start);else if(_s((i==null?void 0:i.nextSibling)??null)){const l=i.nextSibling;n.collapse(l,Ci(l).start)}else if(_s((a==null?void 0:a.previousSibling)??null)){const l=a.previousSibling;n.collapse(l,Ci(l).end)}});this.options=t}mount(t,n=[]){this.editor=t,this.render(n),document.addEventListener("selectionchange",this.normalizeCaret)}destroy(){document.removeEventListener("selectionchange",this.normalizeCaret),this.editor=null}sync(t){this.editor&&(uoe(t,this.parse())||this.render(t))}render(t){const n=this.editor;n&&(n.innerHTML="",t.forEach(o=>{typeof o=="string"?n.appendChild(document.createTextNode(jE(o))):this.options.isTagAllowed(o.id)&&n.appendChild(this.createTagNode(o))}),this.ensureTagPadding())}parse(){var o;const t=[];let n="";return(o=this.editor)==null||o.childNodes.forEach(s=>{if(_s(s)){const{start:r,end:i}=Ci(s);n+=s.data.slice(r,i).replace(/\u00A0/g," ")}else this.isAllowedTagNode(s)&&(n&&(t.push(n),n=""),t.push({id:s.dataset.id||"unknown",text:s.innerText||"Tag",direction:s.dataset.direction??void 0}))}),n&&t.push(n),t}insertTag(t){const n=this.editor;if(!n||!this.options.isTagAllowed(t.id))return;const o=n.querySelector(`.locked-tag[data-id="${t.id}"]`);if(o instanceof HTMLElement){this.applyTagData(o,t),this.handleInput();return}const s=this.createTagNode(t),r=document.createTextNode(Er),i=this.getEditorRange();i?(i.deleteContents(),i.insertNode(r),i.insertNode(s)):n.append(s,r),n.normalize(),this.handleInput(),this.placeCaretAfterTag(r)}updateTag(t,n){var s;const o=(s=this.editor)==null?void 0:s.querySelector(`.locked-tag[data-id="${t}"]`);o instanceof HTMLElement&&(o.innerText=n,this.handleInput())}replaceTag(t,n){if(!this.editor||!this.options.isTagAllowed(n.id))return;const o=this.createTagNode({id:n.id,text:n.label,direction:n.direction}),s=this.editor.querySelector(`.locked-tag[data-id="${t.id}"]`);s instanceof HTMLElement&&(s.replaceWith(o),this.handleInput())}deleteTag(t){const n=this.editor;if(!n)return;const o=n.querySelector(`.locked-tag[data-id="${t}"]`);o instanceof HTMLElement&&this.removeTag(o,"after");const s=this.parse(),r=s[0];s.length===1&&typeof r=="string"&&r.trim()===""&&(n.innerHTML="",this.options.onChange(this.parse()))}isAllowedTagNode(t){return ep(t)&&this.options.isTagAllowed(t.getAttribute("data-id")??"")}applyTagData(t,{text:n,direction:o}){t.innerText=n,o?t.dataset.direction=o:delete t.dataset.direction}createTagNode({id:t,text:n,direction:o}){const s=document.createElement("span");return s.contentEditable="false",s.className="locked-tag",s.dataset.id=t,this.applyTagData(s,{text:n,direction:o}),s}getEditorRange(){const t=window.getSelection();if(!this.editor||!(t!=null&&t.rangeCount))return null;const n=t.getRangeAt(0).cloneRange();return this.editor.contains(n.commonAncestorContainer)?cN(n):null}insertPlainText(t,n){const o=this.editor;if(!o)return;const s=window.getSelection();let r=n?cN(n):this.getEditorRange();(!r||!o.contains(r.commonAncestorContainer))&&(r=document.createRange(),r.selectNodeContents(o),r.collapse(!1)),r.deleteContents();const i=document.createTextNode(jE(t));r.insertNode(i),r.setStartAfter(i),r.collapse(!0),s==null||s.removeAllRanges(),s==null||s.addRange(r),this.handleInput()}sanitize(){const t=this.editor;if(!t)return;t.querySelectorAll(".locked-tag .locked-tag").forEach(o=>o.remove());let n=!1;if(Array.from(t.childNodes).forEach(o=>{if(_s(o)||this.isAllowedTagNode(o))return;n=!0;const s=ep(o)?"":jE(o.textContent??"");o.replaceWith(document.createTextNode(s))}),n){const o=window.getSelection(),s=document.createRange();s.selectNodeContents(t),s.collapse(!1),o==null||o.removeAllRanges(),o==null||o.addRange(s)}}ensureTagPadding(){var t;(t=this.editor)==null||t.querySelectorAll(".locked-tag").forEach(n=>{const o=n.previousSibling,s=n.nextSibling;_s(o)?o.data.endsWith(Er)||o.appendData(Er):n.before(document.createTextNode(Er)),_s(s)?s.data.startsWith(Er)||s.insertData(0,Er):n.after(document.createTextNode(Er));const r=n.nextSibling;_s(r)&&ep(r.nextSibling)&&r.length<2&&r.appendData(Er)})}async placeCaretAfterTag(t){var s;(s=this.editor)==null||s.focus(),await Promise.resolve();const n=document.createRange();n.setStart(t,Ci(t).start),n.collapse(!0);const o=window.getSelection();o==null||o.removeAllRanges(),o==null||o.addRange(n)}findAdjacentTag(t){const n=this.editor,o=window.getSelection();if(!n||!o||!o.isCollapsed||!o.rangeCount)return null;const{startContainer:s,startOffset:r}=o.getRangeAt(0);if(!n.contains(s))return null;const i=t==="Backspace";let a;if(s===n)a=i?n.childNodes[r-1]??null:n.childNodes[r]??null;else if(_s(s)&&s.parentNode===n){const{start:l,end:u}=Ci(s);if(i?Math.min(r,u)>l:Math.max(r,l)<u)return null;a=i?s.previousSibling:s.nextSibling}else return null;for(;loe(a);)a=i?a.previousSibling:a.nextSibling;return a&&this.isAllowedTagNode(a)?a:null}getBoundaryPoint(t){const n=this.editor,o=t==="start"?n.firstChild:n.lastChild;return _s(o)?[o,t==="start"?0:o.length]:[n,t==="start"?0:n.childNodes.length]}moveToEdge(t,n){const o=this.editor,s=window.getSelection();if(!o||!s)return;const[r,i]=this.getBoundaryPoint(t),a=n&&s.anchorNode&&o.contains(s.anchorNode)?{node:s.anchorNode,offset:s.anchorOffset}:{node:r,offset:i};s.setBaseAndExtent(a.node,a.offset,r,i),o.scrollLeft=t==="start"?0:o.scrollWidth}moveAcrossTag(t){const n=t==="ArrowLeft",o=this.findAdjacentTag(n?"Backspace":"Delete"),s=window.getSelection();if(!o||!s)return!1;const r=n?o.previousSibling:o.nextSibling;if(!_s(r))return!1;const i=Ci(r);return s.collapse(r,n?i.end:i.start),!0}deleteCharacter(t){const n=window.getSelection();if(!this.editor||!(n!=null&&n.isCollapsed)||!n.rangeCount)return!1;const{startContainer:o,startOffset:s}=n.getRangeAt(0);if(!_s(o)||o.parentNode!==this.editor)return!1;const{start:r,end:i}=Ci(o);let a,l=1,u=s;if(t==="Backspace"){if(a=Math.min(s,i)-1,a<r)return!1;/[\uDC00-\uDFFF]/.test(o.data[a])&&a>r&&(a--,l=2),u=s-l}else{if(a=Math.max(s,r),a>=i)return!1;/[\uD800-\uDBFF]/.test(o.data[a])&&a+1<i&&(l=2)}return o.deleteData(a,l),n.collapse(o,u),this.handleInput(),!0}removeTag(t,n){var r;const o=t.previousSibling,s=t.nextSibling;t.remove(),o instanceof Text&&s instanceof Text&&o.data.endsWith(Er)&&s.data.startsWith(Er)&&(n==="after"?o.deleteData(o.length-1,1):s.deleteData(0,1)),(r=this.editor)==null||r.normalize(),this.handleInput()}focus(){var o;(o=this.editor)==null||o.focus();const t=document.createRange();t.selectNodeContents(this.editor),t.collapse(!1);const n=window.getSelection();n==null||n.removeAllRanges(),n==null||n.addRange(t)}blur(){var t;(t=this.editor)==null||t.blur()}insertText(t){this.insertPlainText(t)}}const doe={class:"input-wrapper"},hoe=["data-placeholder"],dN=Et(ot({__name:"DynamicInput",props:{modelValue:{type:Array,default:()=>[]},placeholder:{type:String,default:"Rename to"},allowedTags:{type:Array,default:void 0}},emits:["update:modelValue","escape"],setup(e,{expose:t,emit:n}){const o=e,s=n,r=B(null),i=new coe({isTagAllowed:a=>!o.allowedTags||o.allowedTags.includes(a),onChange:a=>s("update:modelValue",a),onEscape:a=>s("escape",a)});return Jt(()=>{r.value&&i.mount(r.value,o.modelValue)}),Vn(()=>i.destroy()),Je(()=>o.modelValue,a=>{console.log("props.modelValue changed",a),i.sync(a)},{deep:!0}),t({insertTag:a=>i.insertTag(a),insertText:a=>i.insertText(a),updateTag:(a,l)=>i.updateTag(a,l),replaceTag:(a,l)=>i.replaceTag(a,l),deleteTag:a=>i.deleteTag(a),focus:()=>{i.focus()},triggerFocus:()=>{ft(()=>{var a;(a=r.value)==null||a.focus()})},blur:()=>{i.blur()}}),(a,l)=>(K(),he("div",doe,[be("div",{ref_key:"editorRef",ref:r,class:"custom-input single-line",contenteditable:"true","data-placeholder":e.placeholder,onPaste:l[0]||(l[0]=(...u)=>L(i).handlePaste&&L(i).handlePaste(...u)),onDrop:l[1]||(l[1]=(...u)=>L(i).handleDrop&&L(i).handleDrop(...u)),onBeforeinput:l[2]||(l[2]=(...u)=>L(i).handleBeforeInput&&L(i).handleBeforeInput(...u)),onInput:l[3]||(l[3]=(...u)=>L(i).handleInput&&L(i).handleInput(...u)),onKeydown:l[4]||(l[4]=(...u)=>L(i).handleKeydown&&L(i).handleKeydown(...u)),onClick:l[5]||(l[5]=Ht((...u)=>L(i).handleClick&&L(i).handleClick(...u),["stop","prevent"]))},null,40,hoe)]))}}),[["__scopeId","data-v-a945c1e5"]]),foe={key:0},poe={key:1},hN=8,fN=Et(ot({__name:"PreviewName",props:{text:{}},setup(e){const t=qt,n=e,o=B(null),s=B(null),r=B(n.text),i=B(!1),a=d=>{const h=s.value;return h.textContent=d,h.offsetWidth},l=(d,h)=>{const f=d.slice(-hN),p=d.length-hN-1;if(p<1||a(d)<=h)return d;let g=0,v=p;for(;g<v;){const y=Math.ceil((g+v)/2);a(`${d.slice(0,y)}…${f}`)<=h?g=y:v=y-1}return`${d.slice(0,g)}…${f}`},u=()=>{!o.value||!s.value||(r.value=l(n.text,o.value.clientWidth),i.value=r.value!==n.text)};let c;return Jt(()=>{u(),c=new ResizeObserver(u),c.observe(o.value)}),Vn(()=>c==null?void 0:c.disconnect()),Je(()=>n.text,()=>ft(u)),(d,h)=>(K(),he("div",{ref_key:"rootRef",ref:o,class:"preview-name"},[i.value?Ue((K(),he("span",foe,[tt(at(r.value),1)])),[[L(t),{content:e.text,delay:[1e3,0],bypassOverflowCheck:!0}]]):(K(),he("span",poe,at(e.text),1)),be("span",{ref_key:"measureRef",ref:s,class:"measure","aria-hidden":"true"},null,512)],512))}}),[["__scopeId","data-v-f1310bab"]]),goe={class:"left-section"},moe={class:"modified-template-options"},voe=["onClick"],yoe={class:"setting-count"},woe={class:"field-label"},Coe={class:"field-label"},boe={class:"confirmation"},Soe={class:"preview-section"},Eoe={class:"preview-list"},_oe={key:0,class:"preview-more"},pN=8,qE=7,Roe=Et(ot({__name:"BulkRenamePopup",props:{item:{},selectAll:{type:Boolean},selectedItemsCount:{}},emits:["cancel","rename"],setup(e,{expose:t,emit:n}){const o=qt,s=Do,r=B(null),i=["number","letter","name"],a={number_up:"1→9",number_down:"9→1",letter_up:"A→Z",letter_down:"Z→A",name:"Name"},l=B({}),u=B(null),c=e,d=B([]),h=Y(()=>{const j=f.value;let q=0;const re="9999.",R={input:`${re}0`,bulkRenameButton:`${re}13`,cancelButton:`${re}12`,firstField:`${re}10`,stepField:`${re}11`,name:`${re}1`,number_up:`${re}2`,number_down:`${re}3`,letter_up:`${re}4`,letter_down:`${re}5`};return["name","number_up","number_down","letter_up","letter_down"].forEach((ae,pe)=>{q++,R[ae]=`${re}${q}`}),j?(q++,R.firstField=`${re}${q}`,q++,R.stepField=`${re}${q}`):(delete R.firstField,delete R.stepField),q++,R.cancelButton=`${re}${q}`,I.value?delete R.bulkRenameButton:(q++,R.bulkRenameButton=`${re}${q}`),console.log(R),R}),f=Y(()=>d.value.find(j=>typeof j!="string"&&(j.id==="number"||j.id==="letter"))),p=B("number"),g=B("up"),v=Po({...yi.number}),y=Po({...yi.number}),b=()=>{Object.assign(v,yi[p.value]),Object.assign(y,yi[p.value])};Je(f,j=>{if(!j)return;const q=j.id;q!==p.value&&(p.value=q,b()),g.value=j.direction==="down"?"down":"up"},{immediate:!0,flush:"sync"});const S=Y(()=>$O[g.value]),w=(j,q)=>{const re=UO(p.value,j,q);v[j]=re,Fv(j,re)&&(y[j]=re)},E=B(null),_=B(null),D=B(null),x=(j,q)=>{var R,H,ae,pe;if(q.key==="Enter"||q.key==="Escape")return;if(q.key==="Tab"){q.preventDefault(),q.stopPropagation(),q.stopImmediatePropagation();const Se=q.shiftKey;j=="first"&&(Se?(R=l.value.letter_down)==null||R.focus():(H=E.value)==null||H.focus()),j=="step"&&(Se?(ae=_.value)==null||ae.focus():(pe=D.value)==null||pe.focus());return}q.key.length===1&&!q.ctrlKey&&!q.metaKey&&!q.altKey&&!GO(p.value,j,q.key)&&q.preventDefault()},M=(j,q)=>{var pe;q.preventDefault();const re=q.target,R=((pe=q.clipboardData)==null?void 0:pe.getData("text/plain"))??"",H=re.selectionStart??re.value.length,ae=re.selectionEnd??re.value.length;re.value=re.value.slice(0,H)+R+re.value.slice(ae),w(j,re.value),re.value=v[j]},V=j=>{if(Fv(j,v[j]))return;const q=yi[p.value][j];v[j]=q,y[j]=q},A=Y(()=>f.value?pE({type:p.value,direction:g.value,first:y.first,step:y.step,count:c.item.length}):[]),P=Y(()=>d.value.every(j=>typeof j=="string"&&!j)),k=Y(()=>P.value||d.value.length==0&&d.value[0]===" "?c.item.map(j=>j.name):c.item.map((j,q)=>d.value.map(re=>typeof re=="string"?re:re.id==="name"?j.name:A.value[q]??"").join(""))),O=Y(()=>c.selectAll?c.selectedItemsCount-qE:k.value.length>pN?k.value.length-qE:0),N=Y(()=>k.value.length>pN?k.value.slice(0,qE):k.value),$=[{id:"name",name:"Current name",icon:null,description:{active:"Remove from the name",inactive:"Add the current name"}},{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"}}],W=j=>{ie.value=[j];const q=j.id.split("_")[0],re=j.id.split("_")[1],R=a[j.id],H=r.value;if(!H)return;const ae=Se=>d.value.find(Ce=>typeof Ce!="string"&&Se.includes(Ce.id));if(q==="name"){ae(["name"])?H.deleteTag("name"):H.insertTag({id:q,text:R,direction:void 0});return}const pe=ae(["number","letter"]);if(pe){const Se=pe.id===q,Ce=pe.direction===re;if(Se&&Ce){H.deleteTag(pe.id);return}H.deleteTag(pe.id),H.insertTag({id:q,text:R,direction:re})}else H.insertTag({id:q,text:R,direction:re})},oe=j=>ee(j.id)?j.description.active:!!f.value&&j.description.switch?j.description.switch:j.description.inactive,ie=B(null),ee=j=>{const[q,re]=j.split("_");return d.value.some(R=>typeof R!="string"&&R.id===q&&R.direction===re)},se=n,X=Y(()=>d.value.length===1&&typeof d.value.at(0)!="string"&&d.value[0].id==="name"),I=Y(()=>d.value.length===0||X.value),z=()=>{ie.value=null,d.value=[],se("cancel")},ne=()=>{const j=d.value.map(q=>typeof q=="string"?{type:"text",value:q}:q.id==="name"?{type:"current_name"}:{type:"counter",value:v.first,direction:q.direction=="up"?"asc":"desc",format:q.id==="number"?"number":"letter",step:v.step});se("rename",j)};t({reset:()=>{ie.value=null,d.value=[]},focus:()=>{var j;(j=r.value)==null||j.focus()}}),Jt(()=>{console.log("Focusing template input"),setTimeout(()=>{var j;(j=r.value)==null||j.focus()},500)});const xe=j=>{var q,re;console.log("Focusing popup"),j.preventDefault(),j.stopPropagation(),(q=r.value)==null||q.blur(),(re=u.value)==null||re.focus()},de=j=>{var q;(j.key==="Enter"||j.key==="Tab")&&((q=r.value)==null||q.focus()),j.key==="Escape"&&z()};return(j,q)=>(K(),he("div",{class:"bulk-rename-popup",id:"bulk-rename-el",ref_key:"popupRef",ref:u,onKeydown:de},[be("div",goe,[Ue(ye(dN,{modelValue:d.value,"onUpdate:modelValue":q[0]||(q[0]=re=>d.value=re),"allowed-tags":i,ref_key:"templateInputRef",ref:r,onEscape:xe},null,8,["modelValue"]),[[L(s),h.value.input]]),be("div",moe,[(K(),he(Pt,null,Dn($,re=>Ue((K(),he("button",{onClick:R=>W(re),ref_for:!0,ref:R=>l.value[re.id]=R,key:re.id,class:ce([{active:ee(re.id)},"template-option"])},[tt(at(re.name)+" ",1),re.icon?(K(),ze(L(gt),{key:0,src:re.icon,style:{transform:"rotate(90deg)"}},null,8,["src"])):qe("",!0)],10,voe)),[[L(o),{content:oe(re),bypassOverflowCheck:!0,delay:[300,0],interactive:!1,hideOnClick:!1,appendTo:"parent"}],[L(s),`${h.value[re.id]}`]])),64))]),be("div",yoe,[be("span",woe,at(S.value.first),1),Ue((K(),ze(L(dl),{ref_key:"firstFieldRef",ref:_,"model-value":v.first,disabled:!f.value,"max-length":L(hE),onInput:q[1]||(q[1]=re=>w("first",re)),onKeydown:q[2]||(q[2]=re=>x("first",re)),onPaste:q[3]||(q[3]=re=>M("first",re)),onBlur:q[4]||(q[4]=re=>V("first")),"show-clear":!1},{clear:we(()=>[...q[10]||(q[10]=[be("div",null,null,-1)])]),_:1},8,["model-value","disabled","max-length"])),[[L(s),h.value.firstField]]),be("span",Coe,at(S.value.step),1),Ue(ye(L(dl),{"model-value":v.step,disabled:!f.value,"max-length":L(fE),onInput:q[5]||(q[5]=re=>w("step",re)),onKeydown:q[6]||(q[6]=re=>x("step",re)),onPaste:q[7]||(q[7]=re=>M("step",re)),onBlur:q[8]||(q[8]=re=>V("step")),"show-clear":!1,ref_key:"fieldStepRef",ref:E},null,8,["model-value","disabled","max-length"]),[[L(s),h.value.stepField]])]),be("div",boe,[Ue((K(),ze(L(bt),{variant:"secondary",onClick:z,ref_key:"cancelBtnRef",ref:D},{default:we(()=>[...q[11]||(q[11]=[tt(" Cancel ",-1)])]),_:1})),[[L(s),h.value.cancelButton]]),Ue((K(),ze(L(bt),{onClick:ne,disabled:I.value,onKeydown:q[9]||(q[9]=po(re=>{re.stopPropagation(),re.preventDefault(),ne()},["enter"]))},{default:we(()=>[...q[12]||(q[12]=[tt(" Rename ",-1)])]),_:1},8,["disabled"])),[[L(s),h.value.bulkRenameButton]])])]),be("div",Soe,[q[13]||(q[13]=be("span",{class:"preview-title"},"Preview",-1)),be("ul",Eoe,[(K(!0),he(Pt,null,Dn(N.value,(re,R)=>(K(),he("li",{key:R},[ye(fN,{text:re},null,8,["text"])]))),128)),O.value>0?(K(),he("li",_oe," … "+at(O.value)+" more items ",1)):qe("",!0)])])],544))}}),[["__scopeId","data-v-9264bb9d"]]),Toe=ot({__name:"BulkRenameButton",props:{item:{},totalItem:{},selectAll:{}},emits:["cancel","rename"],setup(e,{expose:t,emit:n}){const{popupRef:o,show:s,hide:r,triggerRef:i}=vo({interactive:!0,trigger:"manually",placement:"top-end",showArrow:!1,offset:[-350,25],hideOnClick:!0,toggleOnClick:!0,onHide:()=>{h()},onShow:()=>{ft(()=>{var f;(f=d.value)==null||f.focus()})}}),a=e,l=()=>{r()},u=f=>{c("rename",f),r()},c=n,d=B(null),h=()=>{d.value&&d.value.reset()};return t({popupRef:o,hide:r,show:s,triggerRef:i}),(f,p)=>(K(),he(Pt,null,[be("div",{class:"trigger-el",ref_key:"triggerRef",ref:i},null,512),be("div",{class:"popup-el",ref_key:"popupRef",ref:o},[ye(Roe,{item:a.item,"select-all":a.selectAll==L(Ot).CHECKED,"selected-items-count":a.totalItem,ref_key:"bulkRenameRef",ref:d,onCancel:l,onRename:u},null,8,["item","select-all","selected-items-count"])],512)],64))}}),Doe={style:{"max-width":"225px","line-height":"14px"}},xoe={style:{"max-width":"100px","line-height":"14px"}},Aoe=Et(ot({__name:"BulkUpdate",props:{selectRowData:{},workspaceId:{},entityId:{},gridApi:{},selectedAll:{type:Boolean},takeName:{},totalRows:{},visibleRows:{},loading:{type:Boolean}},emits:["close","assignStatus","assignAssignee","assignDate","assignMetric","moreActions","deleteSelected","unselect","updated","selectAll","refreshSelectedRow"],setup(e,{emit:t}){const n=qt,o=Do,s=e,r=t,{handelSelectAll:i}=Vf(),a=B(null),{selectionStatus:l,isSelectAll:u,selectedIds:c,isBulkUpdate:d,isUpdating:h,isLoading:f,handleUpdateStart:p,handleUpdatePostUpdate:g,handleUpdateFailed:v,handleUpdateBulkStatus:y,handleUpdateBulkDate:b,handleBulkUpdateMetric:S,handleUpdateNewAssignee:w,handleDelete:E,handleArchive:_,handleUnarchive:D,deleteThumbnail:x,deleteRendition:M,handleBulkUpdateName:V}=iQ(s,a,{onUpdated:()=>r("updated"),onRefreshSelectedRow:()=>r("refreshSelectedRow")});ri("bulkUpdate",d),ri("isSelectAll",u);const A=["primary"],P=[{label:"Rename",icon:"Pen",id:"bulk-rename",type:"icon",value:"bulk-rename"},{label:"Delete Thumbnail",icon:"Image",id:"delete-thumbnail",type:"icon",value:"delete-thumbnail"},{label:"Delete Rendition",icon:"Film",id:"delete-rendition",type:"icon",value:"delete-rendition"},{label:"Unarchive",value:"UnBoxArchive",type:"icon",icon:"BoxArchive",id:"unarchive",clickable:!0},{label:"Archive",value:"BoxArchive",type:"icon",icon:"BoxArchive",id:"archive",clickable:!0},{label:"Delete",value:"delete",type:"icon",icon:"TrashCan",id:"delete",danger:!0,clickable:!0}],k=()=>{r("unselect")},O=eE(),{userPermissions:N}=go(O),$=Y(()=>N.value.includes(tE)),W=Y(()=>{if(!$.value){console.error("User does not have permission to open review.");return}return l.value==Ot.CHECKED?Zo({type:"review_take",config:{reviewDomain:ln.getInstance().getItem("BASE_REVIEW_URL"),ws_code:s.workspaceId,take_id:s.entityId}}).url:Zo({type:"review_multiple_scenes",config:{reviewDomain:ln.getInstance().getItem("BASE_REVIEW_URL"),ws_code:s.workspaceId,scene_ids:c.value.join(",")}}).url}),oe=B(null),ie=async ne=>{var me,xe,de;try{switch(h.value=!0,f.value=!0,ne.id){case"unarchive":await D();break;case"delete":await E();break;case"archive":await _();break;case"delete-thumbnail":await x();break;case"delete-rendition":await M();break;case"bulk-rename":I(),(me=a.value)==null||me.hide();break;default:console.error("Unknown action:",ne.id),f.value=!1;break}}catch(j){console.error("Error performing action:",j),(xe=a.value)==null||xe.open()}finally{(de=oe.value)==null||de.focus(),ft(()=>{h.value=!1,f.value=!1})}},ee=(ne,me)=>{var xe;!ne&&me&&((xe=oe.value)==null||xe.focus())},se=Y(()=>({workspaceId:s.workspaceId,entityId:s.entityId,variant:A,disabled:h.value,ids:l.value==Ot.CHECKED?[]:c.value})),X=B(null),I=()=>{var ne;(ne=X.value)==null||ne.show()},z=Y(()=>s.selectRowData.map((ne,me)=>({name:ne.name,index:me})));return(ne,me)=>Ue((K(),he("div",{class:ce(ne.$style["bulk-update-action"])},[be("div",{class:ce(ne.$style["left-actions"])},[be("div",{class:ce(ne.$style["selection-track"])},[ye(bt,{class:ce(ne.$style["btn-close"]),variant:["tertiary","icon"],onClick:k,style:{background:"transparent"}},{prefix:we(()=>[ye(gt,{src:"XMarkSolid",source:"remote"})]),_:1},8,["class"]),L(l)==L(Ot).INDETERMINATE?(K(),he("span",{key:0,class:ce(ne.$style["selected-count"])},at(e.selectRowData.length)+" selected ",3)):qe("",!0),L(l)==L(Ot).CHECKED?(K(),he("span",{key:1,class:ce(ne.$style["selected-count"]),style:{"line-height":"14px"}},[me[0]||(me[0]=tt(' All in  " ',-1)),Ue((K(),he("span",Doe,[tt(at(e.takeName),1)])),[[L(n),{content:e.takeName}]]),me[1]||(me[1]=tt(' " ',-1))],2)):qe("",!0),!e.loading&&L(l)==L(Ot).INDETERMINATE&&e.totalRows>e.selectRowData.length&&e.selectRowData.length==e.visibleRows?(K(),ze(bt,{key:2,variant:"secondary",onHandleClick:L(i)},{default:we(()=>[be("span",{class:ce(ne.$style["selected-count"]),style:{"line-height":"14px"}},[me[2]||(me[2]=tt(' Select all in  " ',-1)),Ue((K(),he("span",xoe,[tt(at(e.takeName),1)])),[[L(n),{content:e.takeName}]]),me[3]||(me[3]=tt(' " ',-1))],2)]),_:1},8,["onHandleClick"])):qe("",!0),be("span",{class:ce(ne.$style.divider)},null,2)],2),ye(aoe,Kt(se.value,{onUpdated:L(y),onUpdateStart:L(p),onUpdateCompleted:L(g),onUpdateFailed:L(v),"selected-all":L(l)==L(Ot).CHECKED}),null,16,["onUpdated","onUpdateStart","onUpdateCompleted","onUpdateFailed","selected-all"]),ye(IQ,Kt({onUpdate:L(w),onUpdateStart:L(p),onUpdateCompleted:L(g),onUpdateFailed:L(v),"selected-all":L(l)==L(Ot).CHECKED},se.value),null,16,["onUpdate","onUpdateStart","onUpdateCompleted","onUpdateFailed","selected-all"]),ye(UQ,Kt({"row-selected":e.selectRowData,"selected-all":L(l)==L(Ot).CHECKED},se.value,{onUpdated:L(b),onUpdateStart:L(p),onUpdateCompleted:L(g),onUpdateFailed:L(v)}),null,16,["row-selected","selected-all","onUpdated","onUpdateStart","onUpdateCompleted","onUpdateFailed"]),ye(soe,{disabled:L(h),onUpdate:L(S),onUpdateStart:L(p),onUpdateCompleted:L(g),onUpdateFailed:L(v),selectedIds:L(c),"workspace-id":e.workspaceId,variant:A,"entity-id":e.entityId,"selected-all":L(l)==L(Ot).CHECKED},null,8,["disabled","onUpdate","onUpdateStart","onUpdateCompleted","onUpdateFailed","selectedIds","workspace-id","entity-id","selected-all"]),be("span",{class:ce(ne.$style.divider)},null,2),Ue((K(),he("div",null,[$.value?(K(),ze(bt,{key:0,class:ce(ne.$style["action-button"]),variant:[...A,"icon"],href:W.value,disabled:L(h)||s.selectRowData.length>40&&L(l)!=L(Ot).CHECKED},{default:we(()=>[ye(gt,{src:"PenRuler",class:ce(ne.$style["icon-btn"])},null,8,["class"])]),_:1},8,["class","variant","href","disabled"])):qe("",!0)])),[[L(n),s.selectRowData.length<=40||L(l)==L(Ot).CHECKED?"Open in Review":"Select fewer than 40 items to open in Review"]]),be("span",{class:ce(ne.$style.divider)},null,2),ye(Uf,{ref_key:"wrapperRef",ref:a,isUpdating:L(h),disabled:L(h),onOnVisibleChange:ee},{trigger:we(({hide:xe,toggle:de,isVisible:j,disabled:q})=>[Ue((K(),ze(bt,{onEscape:xe,actived:j,ref_key:"moreActionRef",ref:oe,class:ce(ne.$style["action-button"]),variant:["secondary","icon"],loading:L(f),disabled:q||L(h),onClick:Ht(de,["stop"])},{default:we(()=>[ye(gt,{src:"EllipsisVertical",class:ce(ne.$style.icon),source:"remote"},null,8,["class"])]),_:1},8,["onEscape","actived","class","loading","disabled","onClick"])),[[L(o),"99999"],[L(n),{content:"More actions"}]])]),popup:we(({isVisible:xe,hide:de})=>[(K(),he(Pt,null,Dn(P,(j,q)=>ye(hl,Kt({clickable:!0,key:j.id},{ref_for:!0},j,{show:xe,style:{borderLeft:0},"focus-index":"99999."+q,onClick:()=>{ie(j)},onEscape:de}),null,16,["show","focus-index","onClick","onEscape"])),64))]),_:1},8,["isUpdating","disabled"])],2),ye(Toe,{item:z.value,totalItem:L(u)?s.totalRows:z.value.length,"select-all":L(l),onRename:L(V),ref_key:"bulkRenameButtonRef",ref:X},null,8,["item","totalItem","select-all","onRename"])],2)),[[lr,e.selectRowData.length>0]])}}),[["__cssModules",{$style:{"bulk-update-action":"_bulk-update-action_1odua_1","left-actions":"_left-actions_1odua_20","right-actions":"_right-actions_1odua_21","selection-track":"_selection-track_1odua_26","btn-close":"_btn-close_1odua_32","close-icon":"_close-icon_1odua_38","selected-count":"_selected-count_1odua_42",divider:"_divider_1odua_48","more-button":"_more-button_1odua_53",dropdown:"_dropdown_1odua_57","dropdown-content":"_dropdown-content_1odua_60",delete:"_delete_1odua_83","icon-btn":"_icon-btn_1odua_90","selected-list":"_selected-list_1odua_94"}}]]),ml=Et(ot({name:"LabelRenderer",__name:"LabelRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean}},setup(e){const t=Vs,n=qt,o=e,s=Y(()=>({disabled:o.disabled,error:!1,readOnly:o.readOnly,isEmpty:o.value===void 0||o.value===null||o.value==="",clickable:!0})),{argsMain:r}=xo(s),i=Y(()=>{var u,c,d;return!!((u=o.params)!=null&&u.api||(c=o.params)!=null&&c.node||(d=o.params)!=null&&d.context)}),a=Y(()=>{if(o.tooltip){if(typeof o.tooltip=="string")return{content:o.tooltip};if(typeof o.tooltip=="object"&&"display_name"in o.tooltip){const u=o.tooltip,c=document.createElement("div");c.classList.add("tooltip-user-info"),c.style.display="flex",c.style.alignItems="center",c.style.gap="4px";const d=document.createElement("div"),h=ye(wf,{id:u.id,name:u.display_name,profile_image:u.profile_image,size:20,initial:u.initial,color:u.color});YC(h,d);const f=document.createElement("span");f.innerText=u.display_name,f.classList.add("tooltip-user-name");const p=document.createElement("span");p.style.whiteSpace="nowrap",p.innerText="By",c.appendChild(p),c.appendChild(d),c.appendChild(f);const g=document.getElementById("item-table-layout-id");return{content:c,allowHtml:!0,appendTo:g||document.body,bypassOverflowCheck:!0}}}return{content:void 0}}),l=Y(()=>o.value===void 0);return(u,c)=>Ue((K(),ze(Oo,Kt(L(r),{ref:"displayWrapperRef"}),{default:we(()=>[be("span",{class:ce(u.$style["item-table-label-renderer"])},at(o.value||"-"),3)]),_:1},16)),[[L(t),{isLoading:l.value||!i.value}],[L(n),a.value]])}}),[["__cssModules",{$style:{"item-table-label-renderer":"_item-table-label-renderer_s1gdy_1"}}]]),Ioe=["placeholder","maxlength"],Poe={key:0,class:"wrapper-suffix"},koe=Et(ot({name:"LabelEditor",__name:"LabelEditor",props:{value:{},placeholder:{default:"Enter name"},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{},saveOnBlur:{type:Boolean,default:!0},bordered:{type:Boolean},keyboardFocusing:{type:Boolean}},emits:["update:value","enter","blur"],setup(e,{expose:t,emit:n}){const o=Vs,s=qt,r=e,i=n,a=B(r.value),l=B(null),u=B(null),c=B(r.value||""),d=B(!1),h=B(!1),f=Y(()=>{var A;return{disabled:r.disabled,error:!1,readOnly:r.readOnly,isEmpty:((A=r.value)==null?void 0:A.length)===0,inputRef:l,wrapperRef:u,clickable:!0,focused:d.value||r.keyboardFocusing}}),{argsMain:p,isHover:g}=xo(f),v=()=>c.value!==a.value,y=()=>{h.value=!0,d.value=!1,c.value=a.value,i("update:value",a.value),setTimeout(()=>{h.value=!1},100)},b=()=>{if(!d.value||!l.value)return;const A=l.value.value;if(!v()){d.value=!1;return}a.value=A,i("update:value",A),i("enter",A),d.value=!1},S=()=>{h.value||(r.saveOnBlur?b():y(),i("blur",c.value))},w=A=>{var P;if(A.key==="ArrowLeft"||A.key==="ArrowRight"){A.stopPropagation();return}A.ctrlKey&&(A.key=="a"||A.key=="A")?(A.stopPropagation(),(P=l.value)==null||P.select()):A.key==="Enter"?(A.preventDefault(),A.stopPropagation(),b()):A.key==="Escape"&&(A.preventDefault(),A.stopPropagation(),y())},E=()=>{a.value=r.value,c.value=r.value,d.value=!0,ft(()=>{var A,P;(A=l.value)==null||A.click(),(P=l.value)==null||P.focus()})},_=()=>{var A;d.value?y():(A=l.value)==null||A.blur(),i("blur",c.value)},D={focus:()=>{E()}};Jt(()=>{var P;const A=(P=u.value)==null?void 0:P.$el;A&&(A.__sceneNameEditor=D)}),Vn(()=>{const A=u.value;A&&delete A.__sceneNameEditor});const x=B(null),M=B(null);t({focus:E,blur:()=>{var A;return(A=l.value)==null?void 0:A.blur()},save:b,cancel:y,focusEditButton:()=>{ft(()=>{var A;(A=x.value)==null||A.focus()})},focusCancelButton:()=>{ft(()=>{var A;(A=M.value)==null||A.focus()})},startEdit:E});const V=Y(()=>r.value===void 0);return yE(u,()=>{d.value&&S()}),(A,P)=>Ue((K(),ze(L(Oo),Kt(L(p),{ref_key:"wrapperRef",ref:u,bordered:r.bordered,style:{paddingTop:"0px",paddingBottom:"0px"}}),Lh({default:we(()=>[d.value?qe("",!0):kt(A.$slots,"default",{isEditting:d.value,isHover:L(g)},()=>[Ue((K(),he("span",{class:ce(A.$style["label-renderer"])},[tt(at(c.value),1)],2)),[[L(s),{content:c.value||void 0}]])],void 0,0),Ue(be("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":P[0]||(P[0]=k=>c.value=k),class:ce(A.$style["label-editor"]),placeholder:e.placeholder,maxlength:e.maxLength,onKeydown:w,onBlur:S},null,42,Ioe),[[lr,d.value],[J1,c.value]])]),_:2},[!e.disabled&&!e.readOnly?{name:"suffix",fn:we(({hovered:k,focused:O})=>[k?(K(),he("div",Poe,[k&&!O?Ue((K(),ze(bt,{key:0,variant:["icon","secondary"],size:24,onClick:Ht(E,["prevent","stop"]),tabindex:"0",ref_key:"editButtonRef",ref:x,onKeydown:[po(Ht(E,["prevent","stop"]),["enter"]),po(Ht(_,["prevent","stop"]),["escape"])]},{default:we(()=>[ye(L(gt),{src:"Pen",source:"remote"})]),_:1},8,["onKeydown"])),[[L(s),"Edit"]]):qe("",!0)])):qe("",!0)]),key:"0"}:void 0]),1040,["bordered"])),[[L(o),{isLoading:V.value}]])}}),[["__cssModules",{$style:{"label-renderer":"_label-renderer_cyzth_1","label-editor":"_label-editor_cyzth_10"}}]]),Foe=["tabindex"],gN=Et(ot({name:"SceneNameEditor",__name:"SceneNameEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},placeholder:{default:"Enter name"}},emits:["update:value","enter","blur"],setup(e,{expose:t,emit:n}){const o=qt,s=Vs,r=e,i=n,a=B(r.value),l=B(r.value),u=B(null),c=B(null),d=En("bulkUpdate",!1),{apiServices:h}=no(!d,r),f=Y(()=>{var ee;return{componentType:void 0,disabled:r.disabled,error:!1,readOnly:r.readOnly,isEmpty:((ee=a==null?void 0:a.value)==null?void 0:ee.length)===0,inputRef:u,wrapperRef:c,clickable:!0}}),{isFocus:p}=xo(f),g=Y(()=>{const ee=ln.getInstance().getItem("ws.code"),se=ln.getInstance().getItem("BASE_URL"),X=ee||r.workspaceId;return Zo({type:"scene_hub",config:{baseDomain:se,ws_code:X,scene_id:String(r.id)}}).url}),v=Y(()=>{var ee,se,X;return((se=(ee=r.data)==null?void 0:ee.isProcessing)==null?void 0:se.state)==0||((X=r.data)==null?void 0:X.isDeleted)==!0}),y=Y(()=>r.readOnly||_.value),b=Y(()=>{var ee,se,X,I,z;return((ee=r.data)==null?void 0:ee.isDeleted)==!0||((X=(se=r.data)==null?void 0:se.isProcessing)==null?void 0:X.state)==0||((z=(I=r.data)==null?void 0:I.isProcessing)==null?void 0:z.state)==1}),S=Y(()=>{var ee,se;return(se=(ee=r.data)==null?void 0:ee.isProcessing)==null?void 0:se.message}),w=Y(()=>{var ee;return((ee=r.data)==null?void 0:ee.isArchived)==1}),E=Y(()=>{var ee;return((ee=r.data)==null?void 0:ee.isLocked)==1}),_=Y(()=>r.value===void 0),D=Y(()=>{var ee,se;return((se=(ee=r.data)==null?void 0:ee.permissions)==null?void 0:se.has_edit_permission)==1}),x=async ee=>{var se,X,I,z,ne,me,xe,de,j,q;a.value=ee,p.value=!1;try{const re=await((X=(se=h.value)==null?void 0:se.updateSceneName)==null?void 0:X.call(se,{workspaceId:r.workspaceId,entityId:r.entityId,itemId:r.id,name:a.value})),R=yv.get(rO)||"UTC";if(re){const H=uO(re,R),ae={...r.data,...H};(I=r.params)==null||I.api.clearFocusedCell();const pe=((ne=(z=r.params)==null?void 0:z.column)==null?void 0:ne.getColId())||"",Se=((xe=(me=r.params)==null?void 0:me.node)==null?void 0:xe.rowIndex)||0;(de=r.params)==null||de.api.setFocusedCell(Se,pe),(q=(j=r.params)==null?void 0:j.node)==null||q.setData(ae),l.value=a.value,i("enter")}else a.value=l.value}catch(re){console.error("Failed to update scene name:",re),a.value=l.value}},M={focus:()=>{p.value=!0,ft(()=>{var ee;return(ee=c.value)==null?void 0:ee.focus()})},startEdit:()=>{var ee;(ee=c.value)==null||ee.startEdit()}},V=()=>c.value?"$el"in c.value?c.value.$el:c.value:null;Je(()=>r.value,ee=>{a.value=ee,l.value=ee}),Jt(()=>{const ee=V();ee&&(ee.__sceneNameEditor=M)}),Vn(()=>{const ee=c.value,se=ee&&"$el"in ee?ee.$el:ee;se&&delete se.__sceneNameEditor});const A=md(),{openSceneHub:P}=A,k=ee=>{try{if(ee.ctrlKey||ee.metaKey){window.open(g.value,"_blank");return}P(String(r.id))}catch{window.open(g.value,"_blank")}finally{oe()}},O=()=>{setTimeout(()=>{ie.value=!0,N.value=0,ft(()=>{var ee;(ee=$.value)==null||ee.focus()})},300)},N=B(-1),$=B(null);t({focus:O,trigerFocus:O,startEdit:()=>{var ee;(ee=c.value)==null||ee.startEdit()}});const W=ee=>{if(ee.key==="Enter"){ee.preventDefault(),k(ee);return}if(ee.key==="Escape"){ee.preventDefault(),oe();return}ee.key==="Tab"&&(ee.preventDefault(),ee.stopPropagation(),ee.stopImmediatePropagation(),ft(()=>{var se;(se=c.value)==null||se.focusEditButton()}))},oe=()=>{var X,I,z,ne,me,xe;ie.value=!1,N.value=-1,(X=r.params)==null||X.api.clearFocusedCell();const ee=((z=(I=r.params)==null?void 0:I.column)==null?void 0:z.getColId())||"",se=((me=(ne=r.params)==null?void 0:ne.node)==null?void 0:me.rowIndex)||0;(xe=r.params)==null||xe.api.setFocusedCell(se,ee)},ie=B(!1);return(ee,se)=>Ue((K(),ze(koe,{"save-on-blur":!0,ref_key:"wrapperRef",ref:c,disabled:r.disabled,"read-only":y.value,placeholder:r.placeholder,value:a.value,"onUpdate:value":se[0]||(se[0]=X=>a.value=X),id:`scene-name-${r.id}`,onEnter:x,"max-length":255,bordered:!0,keyboardFocusing:ie.value,onBlur:oe},{default:we(({isHover:X,isEditting:I})=>[Ue(be("div",{class:ce(ee.$style["scene-name-display"])},[Ue((K(),he("a",{tabindex:N.value,ref_key:"nameRef",ref:$,onClick:Ht(k,["prevent"]),onKeydown:W,target:"_blank",class:ce(ee.$style["scene-name-text"]),style:{lineHeight:"28px"}},[tt(at(a.value),1)],42,Foe)),[[L(o),{content:a.value,delay:[1e3,0]}]]),y.value||!X&&!I&&!y.value?(K(),he(Pt,{key:0},[E.value?Ue((K(),he("div",{key:0,class:ce([ee.$style["icon-processing"],ee.$style.isLocked])},[ye(gt,{src:"Lock",color:D.value?"#a6a6a6":"#232323"},null,8,["color"])],2)),[[L(o),{content:D.value?"Locked — You can still edit, or unlock by changing the status from completed":"Locked",delay:[1e3,0]}]]):qe("",!0),w.value?Ue((K(),he("div",{key:1,class:ce([ee.$style["icon-processing"],ee.$style.archived])},[ye(gt,{src:"BoxArchive"})],2)),[[L(o),{content:"Archived",delay:[1e3,0]}]]):qe("",!0),b.value?Ue((K(),he("div",{key:2,class:ce([ee.$style["icon-processing"],ee.$style.processing,v.value&&ee.$style["icon-red"]])},[ye(gt,{src:"AnimatedHourglass",color:"inherit"})],2)),[[L(o),S.value]]):qe("",!0)],64)):qe("",!0)],2),[[lr,!L(p)]])]),_:1},8,["disabled","read-only","placeholder","value","id","keyboardFocusing"])),[[L(s),{isLoading:_.value}]])}}),[["__cssModules",{$style:{"scene-name-editor":"_scene-name-editor_nare0_1","scene-name-display":"_scene-name-display_nare0_11","icon-processing":"_icon-processing_nare0_18",archived:"_archived_nare0_28",locked:"_locked_nare0_31",processing:"_processing_nare0_34","icon-red":"_icon-red_nare0_38","scene-name-text":"_scene-name-text_nare0_43"}}]]),YE=Et(ot({__name:"ButtonDropdown",props:{label:{},value:{},variant:{},options:{default:()=>[]},size:{},placement:{default:"bottom"},disabled:{type:Boolean},readOnly:{type:Boolean},tabIndex:{}},emits:["select","handleClick","open"],setup(e,{expose:t,emit:n}){const o=Do,s=B([]),r=e,i=B(null),a=Y(()=>typeof r.size=="number"?`${r.size}px`:{small:"24px",medium:"32px",large:"48px"}[r.size]??"32px"),l=Y(()=>{let y=[];return typeof r.variant=="string"?y.push(r.variant):Array.isArray(r.variant)&&(y=[...r.variant]),[...y,"icon"]}),u=n,{hide:c,isVisible:d,show:h,triggerRef:f,popupRef:p,instance:g}=vo({toggleOnClick:!0,offset:[0,0],onShow:()=>u("open")});function v(y){u("select",y),c()}return Nh(()=>{g.value&&g.value.setProps({placement:r.placement})}),t({show:h,hide:c,hideDropdown:()=>{c()},popupRef:p}),Je(d,y=>{var b;y&&((b=p.value)==null||b.focus())}),(y,b)=>(K(),he("div",{class:ce(y.$style["button-dropdown-wrapper"]),style:cn({"--button-size":a.value})},[be("div",{class:ce(y.$style["button-group"])},[kt(y.$slots,"prefix"),be("div",{ref_key:"triggerRef",ref:f,class:ce(L(d)?y.$style.open:"")},[kt(y.$slots,"triggerDropdown",{open:L(d)},()=>[r.readOnly?qe("",!0):Ue((K(),ze(bt,{key:0,onEscape:L(c),ref_key:"mainButton",ref:i,actived:L(d),class:ce(y.$style["button-dropdown-trigger"]),variant:l.value,size:e.size,disabled:r.disabled},{default:we(()=>[kt(y.$slots,"iconDropdown",{},()=>[ye(gt,{class:ce(y.$style["icon-dropdown"]),src:"ChevronDown",source:"remote"},null,8,["class"])])]),_:3},8,["onEscape","actived","class","variant","size","disabled"])),[[L(o),e.tabIndex]])])],2)],2),be("div",{ref_key:"popupRef",ref:p,tabindex:"0",class:ce(y.$style["button-dropdown-list"]),style:{borderRadius:"var(--radius-lg)",overflow:"hidden"}},[(K(!0),he(Pt,null,Dn(e.options,(S,w)=>Ue((K(),ze(hl,Kt({ref_for:!0,ref:E=>s.value[w]=E,key:S.value},{ref_for:!0},{...S},{"icon-name":S.icon,onClick:Ht(E=>v(S.value||""),["stop","prevent"]),style:{borderLeft:0}}),{label:we(()=>[tt(at(S.label),1)]),_:2},1040,["icon-name","onClick"])),[[L(o),`${e.tabIndex}.${w}`]])),128))],2)],6))}}),[["__cssModules",{$style:{"button-dropdown-wrapper":"_button-dropdown-wrapper_1g99p_1","button-group":"_button-group_1g99p_7","overflow-elipsis":"_overflow-elipsis_1g99p_26","button-dropdown-list":"_button-dropdown-list_1g99p_33",show:"_show_1g99p_38","button-dropdown-item":"_button-dropdown-item_1g99p_41","icon-dropdown":"_icon-dropdown_1g99p_48",open:"_open_1g99p_51"}}]]),tp=Et(ot({__name:"CloseBadgeWrapper",props:{disableRemove:{type:Boolean,default:!0},tooltip:{default:"Unassign"}},emits:["clear"],setup(e,{emit:t}){const n=qt,o=e,s=t,r=a=>{a.preventDefault(),a.stopImmediatePropagation(),a.stopPropagation(),s("clear")},i=Y(()=>({content:o.tooltip,contentClass:"extra-padding",appendTo:()=>globalThis.document.body}));return(a,l)=>(K(),he("div",{class:ce(a.$style["close-wrapper"])},[e.disableRemove?qe("",!0):(K(),he("div",{key:0,class:ce(a.$style["close-button"])},[Ue((K(),ze(bt,{variant:["icon","tertiary"],style:{background:"white"},"aria-label":"remove",onClick:r,size:16,rounded:!0},{default:we(()=>[ye(gt,{src:"CircleXMark",size:"16",color:"var(--primary-color)"})]),_:1})),[[L(n),i.value]])],2)),kt(a.$slots,"default")],2))}}),[["__cssModules",{$style:{"close-wrapper":"_close-wrapper_15u1e_1","close-button":"_close-button_15u1e_5"}}]]),Ooe=Et(ot({name:"AssigneeGroupRenderer",__name:"AssigneeGroupRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean,default:!0},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},error:{type:Boolean},maxVisible:{default:4}},setup(e){const t=qt,n=Vs,o=e,{isEditing:s}=ld(o),r=B(o.value),i=B(null),a=B(null),{apiServices:l}=no(!0,o),u=B(!0),c=()=>{u.value=o.value===void 0};Ug(()=>{c()}),Jt(()=>{c()}),Je(()=>o.value,x=>{c()});const d=Y(()=>({disabled:o.disabled,readOnly:o.readOnly,error:o.error,inputRef:i,wrapperRef:a,clickable:!(o.readOnly||u.value),active:s})),{argsMain:h,isHover:f}=xo(d),p=Y(()=>{var x;return((x=r.value)==null?void 0:x.slice(0,o.maxVisible))||[]}),g=Y(()=>{var x;return Math.max(0,(((x=r.value)==null?void 0:x.length)||0)-o.maxVisible)}),v=Y(()=>{var x;return g.value<=0?"":((x=r.value)==null?void 0:x.slice(o.maxVisible).map(M=>M.name).join(", "))||""}),y=Y(()=>p.value.map(x=>({id:x.id,name:x.name,initial:x.initial,avatarId:x.id,profile_image:x.profile_image,color:x.color,size:24,user:x}))),b=Y(()=>({color:f.value?"var(--primary-color)":"var(--grey-300)",display:"flex",alignItems:"center",marginLeft:"4px"}));Je(()=>o.value,x=>{r.value=x},{immediate:!0,deep:!0});const S=async x=>{var V,A,P;await D(x)&&(r.value=(V=r.value)==null?void 0:V.filter(k=>k.id!==x),(P=o.params)==null||P.node.setData({...(A=o.params)==null?void 0:A.node.data,assignees:r.value}))},w=x=>{var V;const M=ln.getInstance().getItem("ws.code");return((V=l.value)==null?void 0:V.getUserInformation(M,x))||Promise.resolve(null)},{id:E}=Ag(o),_=x=>{var V,A;const M=(A=(V=o.params)==null?void 0:V.api)==null?void 0:A.getRowNode(String(E.value));M==null||M.setDataValue("assignees",Xm(x.assignees))},{removeAssignee:D}=Sv({...o,entityId:o.entityId,updateRowData:_,value:o.value,errorCallback:()=>{}});return(x,M)=>Ue((K(),ze(Oo,Kt(L(h),{ref_key:"wrapperRef",ref:a,bordered:!0}),{default:we(()=>{var V;return[be("div",{class:ce(x.$style.assigneeGroupRenderer)},[((V=r.value)==null?void 0:V.length)===0?(K(),ze(gt,{key:0,src:"UserPlus",source:"remote",color:"#6B6B6B",style:cn(b.value)},null,8,["style"])):qe("",!0),(K(!0),he(Pt,null,Dn(y.value,A=>(K(),ze(tp,{key:A.id,"disable-remove":o.readOnly||o.disabled,onClear:P=>S(A.id),style:{marginLeft:"0"}},{default:we(()=>[ye(Au,{user:A.user,"show-profile":!0,apiUpdateFunction:w,class:ce(x.$style["ib-assignee-avatar"])},null,8,["user","class"])]),_:2},1032,["disable-remove","onClear"]))),128)),g.value>0?Ue((K(),he("div",{key:1,class:ce(x.$style["extra-avatars"])},[tt(" +"+at(g.value),1)],2)),[[L(t),v.value]]):qe("",!0)],2)]}),_:1},16)),[[L(n),{isLoading:u.value}]])}}),[["__cssModules",{$style:{assigneeGroupRenderer:"_assigneeGroupRenderer_14fiu_1","ib-assignee-group-renderer":"_ib-assignee-group-renderer_14fiu_7","ib-assignee-avatar":"_ib-assignee-avatar_14fiu_16","assignee-wrapper":"_assignee-wrapper_14fiu_20","extra-avatars":"_extra-avatars_14fiu_27"}}]]),Moe=Et(ot({name:"DateRangeRenderer",__name:"DateRangeRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean,default:!1},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},isStarted:{type:Boolean},isCompleted:{type:Boolean},timezone:{}},setup(e){var _,D;const t=qt,n=Vs,o=JS(),s=e,r=B(null),i=B(null),{isEditing:a}=ld(s),l=x=>{if(x){if(typeof x=="string")return x;if(x instanceof Date)return x.toISOString()}},u=Y(()=>s.value===void 0),c=Y(()=>{var x;return(x=s.data)==null?void 0:x.isStarted}),d=Y(()=>{var x;return(x=s.data)==null?void 0:x.isCompleted}),h=Y(()=>!!(s.value&&(s.value[0]||s.value[1]))),f=Y(()=>h.value?s.disabled&&!s.readOnly?"var(--disabled-color)":"var(--primary-color)":"var(--grey-300)"),p=Y(()=>({disabled:s.disabled,error:!1,readOnly:s.readOnly,inputRef:r,wrapperRef:i,clickable:!0,active:a})),{argsMain:g}=xo(p),{startDate:v,endDate:y,startClasses:b,endClasses:S,fullStartDate:w,fullEndDate:E}=zZ({start:l((_=s.value)==null?void 0:_[0]),end:l((D=s.value)==null?void 0:D[1]),isStarted:c.value,isEnded:d.value,timezone:s.timezone||o});return(x,M)=>Ue((K(),ze(Oo,Kt(L(g),{ref_key:"wrapperRef",ref:i,bordered:!0}),{default:we(()=>[u.value?qe("",!0):(K(),he("div",{key:0,class:ce(x.$style.dateRangeRenderer)},[h.value?qe("",!0):(K(),ze(gt,{key:0,src:"Calendar",class:ce(x.$style.calendarIcon),color:f.value},null,8,["class","color"])),h.value?(K(),he(Pt,{key:1},[Ue((K(),he("span",{class:ce([x.$style.dateLabelDisplay,...L(b).map(V=>x.$style[V])])},[tt(at(L(v)),1)],2)),[[L(t),L(w)]]),M[0]||(M[0]=be("span",null,"→",-1)),Ue((K(),he("span",{class:ce([x.$style.dateLabelDisplay,...L(S).map(V=>x.$style[V])])},[tt(at(L(y)),1)],2)),[[L(t),L(E)]])],64)):qe("",!0)],2))]),_:1},16)),[[L(n),{isLoading:u.value}]])}}),[["__cssModules",{$style:{dateRangeRenderer:"_dateRangeRenderer_rsfrm_1",calendarIcon:"_calendarIcon_rsfrm_8",dateSection:"_dateSection_rsfrm_12",dateLabelDisplay:"_dateLabelDisplay_rsfrm_19",empty:"_empty_rsfrm_29","end-today":"_end-today_rsfrm_35",actual:"_actual_rsfrm_38","end-tomorrow":"_end-tomorrow_rsfrm_41","end-yesterday":"_end-yesterday_rsfrm_47","end-past":"_end-past_rsfrm_53","end-future":"_end-future_rsfrm_59","start-today":"_start-today_rsfrm_62","start-tomorrow":"_start-tomorrow_rsfrm_68","start-yesterday":"_start-yesterday_rsfrm_74","start-past":"_start-past_rsfrm_80","start-future":"_start-future_rsfrm_86"}}]]),Noe=ot({__name:"DateRangeEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{default:void 0},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},isStarted:{type:Boolean},isCompleted:{type:Boolean},timezone:{default:JS()}},emits:["closed"],setup(e,{expose:t,emit:n}){const o=B(null);Jt(()=>{ft(()=>{o.value&&o.value.focus()})});const s=e,r=n,i=()=>{var b;(b=s.params)==null||b.api.stopEditing(),r("closed")},a=b=>`${ut.fromJSDate(b,{zone:"utc"}).toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")}999Z`,l=async b=>{await y({startDate:b[0]?a(b[0]):null,dueDate:b[1]?a(b[1]):null})},u=async()=>{await y({startDate:null})},c=async()=>{await y({dueDate:null})},d=async b=>{await y({startDate:b?a(b):null})},h=async b=>{await y({dueDate:b?a(b):null})},f=async()=>{await y({startDate:null,dueDate:null})},p=En("bulkUpdate",!1),{apiServices:g}=no(!p,s),v=Y(()=>{var b,S,w,E,_,D,x,M,V;return{parentName:((w=(S=(b=s.params)==null?void 0:b.node.data)==null?void 0:S.parentConfig)==null?void 0:w.parentName)||null,parentStartDate:((D=(_=(E=s.params)==null?void 0:E.node.data)==null?void 0:_.parentConfig)==null?void 0:D.parentStartDate)||null,parentDueDate:((V=(M=(x=s.params)==null?void 0:x.node.data)==null?void 0:M.parentConfig)==null?void 0:V.parentDueDate)||null}}),y=async b=>{var S,w,E,_,D;try{const x=(S=o.value)==null?void 0:S.getValues(),M=await((E=(w=g.value)==null?void 0:w.changeDate)==null?void 0:E.call(w,{workspaceId:s.workspaceId,itemIds:[s.id],startDate:b.startDate,dueDate:b.dueDate}));console.log("Update response:",M),(M==null?void 0:M.status)==br.OK&&((D=s.params)==null||D.node.setData({...(_=s.params)==null?void 0:_.node.data,dateRange:x==null?void 0:x.dateRange}))}catch(x){console.error("Failed to update scene name:",x)}};return t({focus:()=>{ft(()=>{var b;(b=o.value)==null||b.focus()})}}),(b,S)=>(K(),ze(Ov,Kt({...s,parentConfig:v.value},{onUpdate:l,"onUpdate:end":h,"onUpdate:start":d,onClearAll:f,onClearDue:c,onClearStart:u,onClosed:i,ref_key:"calendarRef",ref:o}),null,16))}}),Loe=Et(ot({__name:"item-table-layout",props:{isSidebarOpen:{type:Boolean,default:!1}},emits:["close-sidebar","sidebar-clear","sidebar-apply"],setup(e,{emit:t}){const n=B(null),o=B(0);let s=null;Jt(()=>{n.value&&(s=new ResizeObserver(i=>{for(const a of i)o.value=a.contentRect.height}),s.observe(n.value))}),ou(()=>{s&&n.value&&s.unobserve(n.value)});const r=Y(()=>{const i=o.value;return i>120?i-42-36:0});return(i,a)=>(K(),he("div",{class:ce(i.$style["item-table-wrapper"]),ref_key:"itemTableWrapperRef",ref:n},[be("div",{class:ce(i.$style["item-header"])},[be("div",{class:ce(i.$style["item-header__left"])},[kt(i.$slots,"header-left",{},()=>[be("h1",{class:ce(i.$style["item-header__title"])},[kt(i.$slots,"title",{},()=>[a[0]||(a[0]=tt("Items",-1))])],2)])],2),be("div",{class:ce(i.$style["item-header__spacer"])},null,2),be("div",{class:ce(i.$style["item-header__actions"])},[kt(i.$slots,"header-actions")],2)],2),kt(i.$slots,"grid",{availableHeight:r.value}),be("div",{class:ce(i.$style.footer)},[kt(i.$slots,"footer")],2),kt(i.$slots,"new-row"),kt(i.$slots,"bulk-update-actions"),kt(i.$slots,"snackbar"),kt(i.$slots,"popup")],2))}}),[["__cssModules",{$style:{"item-table-wrapper":"_item-table-wrapper_1uqb9_1","item-header":"_item-header_1uqb9_14","item-header__left":"_item-header__left_1uqb9_22","item-header__title":"_item-header__title_1uqb9_27","item-header__spacer":"_item-header__spacer_1uqb9_32","item-header__actions":"_item-header__actions_1uqb9_35","main-content":"_main-content_1uqb9_41",sidebar:"_sidebar_1uqb9_48","is-open":"_is-open_1uqb9_64","sidebar-header":"_sidebar-header_1uqb9_68","sidebar-footer":"_sidebar-footer_1uqb9_69","sidebar-content":"_sidebar-content_1uqb9_89",footer:"_footer_1uqb9_94"}}]]),mN=Et(ot({name:"MoreOptionEditor",__name:"MoreOptionEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},optionBlock:{},isSubmenu:{type:Boolean,default:!1},layer:{default:0},focusableIndex:{}},emits:["actionExecuted"],setup(e,{expose:t,emit:n}){const o=Do,s=e,r=Y(()=>(s==null?void 0:s.workspaceId)||""),i=Y(()=>(s==null?void 0:s.entityId)||""),a=()=>{var O,N,$;return($=(O=s.params)==null?void 0:O.api)==null?void 0:$.getCellRendererInstances({columns:["options"],rowNodes:(N=s.params)!=null&&N.node?[s.params.node]:[]})[0]},l=()=>{var N,$,W,oe;const O=a();($=(N=O==null?void 0:O.componsenExposed)==null?void 0:N.blur)==null||$.call(N),(oe=(W=O==null?void 0:O.container)==null?void 0:W.parentElement)==null||oe.classList.remove("ag-cell-focus")},u=()=>{var $,W,oe;(W=($=s.params)==null?void 0:$.api)==null||W.stopEditing(),l();const O=`scene-name-${s.id}`,N=document.getElementById(O);(oe=N==null?void 0:N.__sceneNameEditor)==null||oe.startEdit()},{apiServices:c}=no(!0,s),d=Y(()=>{var O;return{ws_code:r.value,entity_id:i.value,scene_id:s.id,axiosService:c,optionBlock:s.optionBlock,permissions:(O=s.data)==null?void 0:O.permissions}}),h=O=>{var $,W,oe,ie,ee,se;let N=(W=($=s.params)==null?void 0:$.api)==null?void 0:W.getRowNode(String(s.id));if(N){const X={...N.data,isDeleted:O==="deleted",isArchived:O==="archived"?!0:N.data.isArchived,isLocked:O==="locked"?!0:N.data.isLocked,disabled:!1};O=="deleted"&&(X.isLocked=!1,X.disabled=!0),O=="unarchived"&&(X.isArchived=!1),(ie=(oe=s.params)==null?void 0:oe.api)==null||ie.redrawRows({rowNodes:[N]}),N.setData(X),(se=(ee=s.params)==null?void 0:ee.api)==null||se.redrawRows({rowNodes:[N]})}},f=md(),{openSceneHub:p}=f,g=()=>{ft(()=>{var $,W,oe,ie,ee,se;const O=((W=($=s.params)==null?void 0:$.node)==null?void 0:W.rowIndex)||0,N=((ie=(oe=s.params)==null?void 0:oe.column)==null?void 0:ie.getColId())||"";(se=(ee=s.params)==null?void 0:ee.api)==null||se.setFocusedCell(O,N)})};Y(()=>{var N,$;const O=($=(N=s.params)==null?void 0:N.api)==null?void 0:$.getRowNode(String(s.id));return O==null?void 0:O.data});const{options:v}=eJ(d,h,u,p,g),y=n,b=()=>{var O,N,$,W,oe,ie;console.trace("Focusing current cell for row:",s.id),(ie=(O=s.params)==null?void 0:O.api)==null||ie.setFocusedCell((($=(N=s.params)==null?void 0:N.node)==null?void 0:$.rowIndex)||0,((oe=(W=s.params)==null?void 0:W.column)==null?void 0:oe.getColId())||"")},S=Y(()=>{var O;return(O=s.params)==null?void 0:O.api}),w=(O,N)=>{var $,W,oe,ie,ee,se,X,I;if(y("actionExecuted",O),O.id=="copy-link"){(ee=S.value)==null||ee.startEditingCell({rowIndex:(W=($=s.params)==null?void 0:$.node)==null?void 0:W.rowIndex,colKey:(ie=(oe=s.params)==null?void 0:oe.column)==null?void 0:ie.getColId()});return}else{if(O.id!=="copy-link"&&((se=S.value)==null||se.stopEditing()),O.id==="rename")(X=S.value)==null||X.stopEditing(),(I=S.value)==null||I.clearFocusedCell(),l();else if(O.id==="copy-link"){const z=document.getElementById(N);setTimeout(()=>{var ne,me,xe;(xe=(me=(ne=z==null?void 0:z.__vueParentComponent)==null?void 0:ne.exposed)==null?void 0:me.focus)==null||xe.call(me)},300)}else if(["delete-rendition","delete-thumbnail"].includes(O.id)){setTimeout(()=>{b()},300);return}setTimeout(()=>{var z,ne;(ne=(z=s.params)==null?void 0:z.api)==null||ne.clearFocusedCell()},300)}},E=()=>{var O,N;(N=(O=s.params)==null?void 0:O.api)==null||N.stopEditing()},_=O=>{var N,$,W,oe;return O==="archive"?!(($=(N=s.params)==null?void 0:N.data)!=null&&$.isArchived):O==="unarchive"?(oe=(W=s.params)==null?void 0:W.data)==null?void 0:oe.isArchived:!0},D=Y(()=>v.value.map(O=>({...O,options:O.options.filter(N=>!N.hide&&_(N.id))})).filter(O=>O.options.length>0)),x=B({}),M=B(null),V=Y(()=>{var N,$;if(s.focusableIndex)return s.focusableIndex;const O=($=(N=s.params)==null?void 0:N.api)==null?void 0:$.getRowNode(String(s.id));return`${((O==null?void 0:O.rowIndex)??0)+10}`}),A=(O,N)=>`${V.value}.${O*10+N}`,P=(O,N)=>{if(N&&"focus"in N){x.value[O]=N;return}delete x.value[O]},k=O=>{O.preventDefault(),O.stopPropagation(),O.stopImmediatePropagation()};return Jt(()=>{var O;(O=M.value)==null||O.focus()}),t({focus(){var $;const O=`${V.value}.0`,N=x.value[O];N&&N.focus?N.focus():($=M.value)==null||$.focus()}}),(O,N)=>Ue((K(),he("div",{onKeydown:k,class:ce([O.$style["more-option-section"],{[O.$style.submenu]:e.isSubmenu}]),ref_key:"wrapperRef",ref:M,tabindex:"0",role:"menu"},[(K(!0),he(Pt,null,Dn(D.value,($,W)=>(K(),he("div",{key:$.id,style:cn({"--g-number":Math.min($.options.length,4),"--g-size":$.type==="column"?"36px":"auto"}),class:ce([O.$style["option-block"],O.$style[$.type]])},[(K(!0),he(Pt,null,Dn($.options,(oe,ie)=>(K(),he("div",{key:oe.id,class:ce(O.$style["option-item"])},[ye(Boe,{layer:s.layer,"scene-id":String(s.id),option:oe,type:$.type,onActionExecuted:ee=>w(ee,`more-action-${ee.id}-${s.id}`),focusableIndex:A(W,ie),ref_for:!0,ref:ee=>P(A(W,ie),ee),onHandleHide:E,id:`more-action-${oe.id}-${s.id}`,label:oe.label},null,8,["layer","scene-id","option","type","onActionExecuted","focusableIndex","id","label"])],2))),128))],6))),128))],34)),[[L(o),V.value]])}}),[["__cssModules",{$style:{"more-option-section":"_more-option-section_1jg4p_1","option-block":"_option-block_1jg4p_8","option-item":"_option-item_1jg4p_15",row:"_row_1jg4p_19",column:"_column_1jg4p_25",block:"_block_1jg4p_29"}}]]),Voe={key:0,style:{height:"20px",width:"20px",display:"flex","align-items":"center","justify-content":"center"}},Boe=Et(ot({__name:"MoreOptionItem",props:{option:{},sceneId:{},type:{},layer:{},focusableIndex:{}},emits:["actionExecuted","handleHide"],setup(e,{expose:t,emit:n}){const o=Do,s=qt,r=e,i=B(!1),a=B(!1),l=(x,M)=>{if(!M){p();return}const V=M.target;V.closest(".tippy-content")||V.closest(".tippy-box")||V.closest("[data-tippy-root]")||V.closest(".option-item")||p()},u=B(null),{triggerRef:c,popupRef:d,show:h,isVisible:f,hide:p}=vo({toggleOnClick:!0,interactive:!0,trigger:"click",placement:"left",showArrow:!1,offset:[0,4],hideOnClick:!1,allowHTML:!0,onClickOutside:l,appendTo:u.value||void 0}),g=n,v=async x=>{var M,V;if(!a.value){a.value=!0;try{await((V=(M=r.option).action)==null?void 0:V.call(M,x)),g("actionExecuted",r.option)}catch(A){console.error("Action execution failed:",A)}finally{a.value=!1,i.value=!1}}},y=async x=>{var M,V;if(x.preventDefault(),x.stopPropagation(),!a.value){if(r.option.isDanger){i.value=!i.value;return}if(r.option.subMenu)h();else{a.value=!0;try{await((V=(M=r.option).action)==null?void 0:V.call(M,x)),g("actionExecuted",r.option)}catch(A){console.error("Action execution failed:",A)}finally{a.value=!1}return}}},b=x=>{g("actionExecuted",x),p()},S=x=>{x.key==="Escape"&&p()},w=x=>({row:"small",column:"medium",block:"small"})[x]||"medium",E=x=>{const M=r.option.isDanger?["danger","tertiary"]:[];return{row:["secondary","icon",...M],column:["menu-item",...M],block:["secondary",...M]}[x]||[]},_=()=>{i.value?i.value=!1:f.value?p():g("handleHide")};t({focus:()=>{ft(()=>{c.value instanceof HTMLElement?c.value.focus():c.value&&"$el"in c.value?c.value.$el.focus():console.warn("Trigger ref is not an HTMLElement:",c.value)})},escape:()=>{p()},select:()=>{y(new MouseEvent("click"))}});const D=x=>{var M;x.stopPropagation(),x.preventDefault(),i.value=!1,(M=c.value)==null||M.focus()};return(x,M)=>{var V;return Ue((K(),he("div",{ref_key:"wrapperRef",ref:u,class:ce(x.$style["option-item-wrapper"]),style:{width:"100%",overflow:"visible"},onClick:Ht(y,["stop","prevent"])},[Ue((K(),ze(bt,{ref_key:"triggerRef",ref:c,class:ce(x.$style["option-item"]),disabled:e.option.disabled||a.value,actived:L(f)||i.value,size:w(e.type),variant:E(e.type),onClick:Ht(y,["stop","prevent"]),onKeydown:S,onEscape:_,label:e.option.label},{prefix:we(()=>[e.option.icon?(K(),he("div",Voe,[ye(gt,{size:"14",src:e.option.icon,color:e.option.isDanger?void 0:"#a6a6a6",source:"remote"},null,8,["src","color"])])):qe("",!0)]),suffix:we(()=>[e.option.subMenu?(K(),ze(gt,{key:0,src:"Play",source:"remote"})):qe("",!0),e.option.isDanger&&i.value?(K(),he("div",{key:1,class:ce(x.$style["confirm-action"])},[Ue((K(),ze(bt,{variant:["tertiary","icon","danger"],size:"small",onHandleClick:D},{default:we(()=>[ye(gt,{src:"XMarkSolid",source:"remote"})]),_:1})),[[L(o),`${r.focusableIndex}.0`],[L(s),{content:"Cancel ",delay:[300,0],contentClass:["extra-padding"]}]]),Ue((K(),ze(bt,{variant:["danger","primary","icon"],size:"small",onClick:Ht(v,["stop","prevent"]),onEscape:M[0]||(M[0]=A=>i.value=!1)},{default:we(()=>[ye(gt,{src:"Check",source:"remote"})]),_:1})),[[L(o),`${r.focusableIndex}.1`],[L(s),{delay:[300,0],contentClass:["extra-padding"],content:"Confirm ",theme:"warning"}]])],2)):qe("",!0)]),_:1},8,["class","disabled","actived","size","variant","label"])),[[L(o),r.focusableIndex]]),e.option.subMenu?(K(),he("div",{key:0,ref_key:"popupRef",ref:d,class:ce(x.$style["submenu-container"])},[ye(mN,{focusableIndex:r.focusableIndex,layer:r.layer+1,ref:"submenuRef","option-block":[((V=e.option)==null?void 0:V.subMenu)||[]],"is-submenu":!1,onActionExecuted:b},null,8,["focusableIndex","layer","option-block"])],2)):qe("",!0)],2)),[[L(s),{content:e.option.description,contentClass:["extra-padding"],theme:e.option.isDanger?"warning":"arbo",hideOnClick:!1,delay:[300,0]}]])}}}),[["__cssModules",{$style:{"option-item":"_option-item_8a5qn_1","icon-wrapper":"_icon-wrapper_8a5qn_11","confirm-action":"_confirm-action_8a5qn_19"}}]]),vN=(e,t)=>{const n=B(Number(e.value.value)),o=Y(()=>e.value.metricConfig),s=Y(()=>{var g,v;const l=o.value,u=t.value,c=e.value.value=="N/A"||e.value.value===null||e.value.value===void 0||String(e.value.value).length===0,d=!!e.value.error,h=(l==null?void 0:l.format_type)==="icon",{disabled:f}=e.value;return{pendingCalculation:e.value.value=="N/A"||c&&((g=l==null?void 0:l.metric_type)==null?void 0:g.code)==="formula",isEmpty:c,isError:d,hasPrefix:!c&&!d&&(l==null?void 0:l.morpheme_type)==="prefix",hasSuffix:!c&&!d&&(l==null?void 0:l.morpheme_type)==="suffix",isDropdown:(l==null?void 0:l.format_type)==="dropdown",isFormula:((v=l==null?void 0:l.metric_type)==null?void 0:v.code)==="formula",isLoading:e.value.value===void 0,isRating:h,showActions:u&&!c&&!f}}),r=17,i=Y(()=>{var l;return{maxRating:((l=o.value)==null?void 0:l.range)||5,readOnly:e.value.readOnly,disabled:e.value.disabled,size:r}});return{componentState:s,metricConfig:o,ICON_SIZE:r,ratingParams:i,standardNameforIcon:()=>{var u;return(((u=o.value)==null?void 0:u.format_symbol)||"BoltSolid").split(/[\s-_]+/).map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join("").replace(/Outline|Solid/g,"")},internalValue:n}},$oe=["aria-label"],yN=Et(ot({name:"MetricRenderer",__name:"MetricRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean,default:!0},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},error:{type:Boolean},config:{}},emits:["update:value","clear","copy"],setup(e,{emit:t}){const n=Vs,o=qt,s=e,r=xg(!1),i=B(null),a=B(null),{isEditing:l}=ld(s),u=Y(()=>{var N,$;return{value:s.value,metricConfig:(($=(N=s.params)==null?void 0:N.colDef)==null?void 0:$.context)||s.config,error:s.error,hovered:r.value,readOnly:s.readOnly,disabled:s.disabled,active:l}}),{componentState:c,metricConfig:d,internalValue:h}=vN(u,r),f=Y(()=>{var $,W;let N=!1;if(["number","formula"].includes(d.value.metric_type.code)){const oe=Number(s.value),ie=Number(($=d.value)==null?void 0:$.format_value);Number.isFinite(ie)&&ie>=0&&(N=(((W=oe.toString().split(".")[1])==null?void 0:W.length)||0)>ie)}return N}),p=Y(()=>{var N;return!!((N=d.value)!=null&&N.morpheme_value)||c.value.isEmpty||f.value}),g=Y(()=>{var W,oe,ie;if(c.value.isError)return"Something went wrong. Review formula, inputs and retry.";if(c.value.pendingCalculation)return"Can’t calculate yet. Complete required fields.";if(c.value.isEmpty)return;const N=M.value,$=(W=d.value)==null?void 0:W.morpheme_type;return $==="prefix"?`${((oe=d.value)==null?void 0:oe.morpheme_value)||""} ${N}`.trim():$==="suffix"?`${N} ${((ie=d.value)==null?void 0:ie.morpheme_value)||""}`.trim():N}),v=Y(()=>{const{format_type:N,format_value:$}=d.value;if(N==="dropdown"&&typeof $=="string"&&$.startsWith("["))try{return JSON.parse($)}catch{return[]}return[]}),y=Y(()=>({disabled:s.disabled,error:c.value.isError,inputRef:i,wrapperRef:a,clickable:!x.value,readOnly:s.readOnly||x.value,isEmpty:c.value.isEmpty})),{argsMain:b,isHover:S}=xo(y),w=(N,$,W="en-US")=>new Intl.NumberFormat(W,{minimumFractionDigits:$,maximumFractionDigits:$}).format(N),E=Y(()=>{if(c.value.isEmpty)return"";if(c.value.pendingCalculation)return"pending";const N=s.value,{format_type:$,format_value:W,mapping:oe}=d.value;if(oe&&typeof oe=="object"&&!Array.isArray(oe)){const ie=oe[`!${N}`];if(ie)return ie}if($==="dropdown"){const ie=v.value.find(ee=>String(ee.name)===String(N));if(ie)return ie.name}if(typeof N=="string"){const ie=Number(N);return Number.isNaN(ie)?N:N.replace(/[.-]/g,"").length>16?_(N,W):_(ie,W)}return typeof N=="number"?_(N,W):String(N)}),_=(N,$)=>{const W=Number.parseInt(String($)||"2",10),oe=Number.isFinite(W)&&W>=0?W:2;try{if(typeof N=="string"){const ie=N.split("."),ee=ie[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),se=ie[1]?ie[1].substring(0,oe).padEnd(oe,"0"):"0".repeat(oe);return oe>0?`${ee}.${se}`:ee}return w(N,oe)}catch(ie){return console.error("Error formatting metric value:",ie,{num:N,decimals:oe}),String(N)}},D=(N,$)=>{const W=Number.parseInt(String($)||"2",10),oe=Number.isFinite(W)&&W>=0?W:2;try{if(typeof N=="string"){const ie=N.split("."),ee=ie[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),se=ie[1]?ie[1].length:0,X=Math.max(oe,se),I=ie[1]?ie[1].padEnd(X,"0"):"0".repeat(X);return X>0?`${ee}.${I}`:ee}return new Intl.NumberFormat("en-US",{minimumFractionDigits:oe,maximumFractionDigits:20}).format(N)}catch(ie){return console.error("Error formatting exact metric value:",ie,{num:N,decimals:oe}),String(N)}},x=Y(()=>{var N;return((N=d.value)==null?void 0:N.metric_type.code)==="formula"}),M=Y(()=>{if(c.value.isEmpty)return"";if(c.value.pendingCalculation)return"pending";const N=s.value,{format_type:$,format_value:W,mapping:oe}=d.value;if(oe&&typeof oe=="object"&&!Array.isArray(oe)){const ie=oe[`!${N}`];if(ie)return ie}if($==="dropdown"){const ie=v.value.find(ee=>String(ee.name)===String(N));if(ie)return ie.name}if(typeof N=="string"){const ie=Number(N);return Number.isNaN(ie)?N:N.replace(/[.-]/g,"").length>16?D(N,W):D(ie,W)}return typeof N=="number"?D(N,W):String(N)}),{tooltip:V}=pO(""),A=async N=>{N.stopPropagation(),N.preventDefault(),N.stopImmediatePropagation();try{await navigator.clipboard.writeText(M.value),V.value="Copied",setTimeout(()=>{V.value="Copy"},3e3)}catch($){console.error("Failed to copy text:",$),V.value="Copy failed",setTimeout(()=>{V.value="Copy"},3e3)}};Je(()=>s.value,(N,$)=>{const W=Number(N);Number.isFinite(W)&&W!==h.value?h.value=W:N==null&&h.value!==0&&(h.value=0)},{immediate:!0,deep:!0});const k=()=>{r.value=!0},O=()=>{r.value=!1};return(N,$)=>Ue((K(),ze(Oo,Kt(L(b),{onMouseenter:k,style:{"--icon-size":"24px"},onMouseleave:O,ref_key:"wrapperRef",ref:a,actived:L(l),bordered:!0}),{suffix:we(()=>[s.disabled?qe("",!0):(K(),he("div",{key:0,class:ce([N.$style.suffix,"wrapper-suffix"])},[r.value&&!L(c).isEmpty&&!L(c).isError?Ue((K(),ze(bt,{key:0,variant:["icon","secondary"],size:24,onClick:Ht(A,["prevent","stop"])},{default:we(()=>[ye(gt,{src:"Copy",source:"remote",size:12})]),_:1})),[[L(o),{content:L(V),hideOnClick:!1,contentClass:"extra-padding"}]]):qe("",!0)],2))]),default:we(()=>[be("div",{class:ce(N.$style["metric-wrapper"]),"aria-label":L(d).format_value||void 0},[be("div",{class:ce([N.$style["metric-content"],s.disabled?N.$style.disabled:""])},[!L(c).isError&&L(c).isEmpty?(K(),he(Pt,{key:0},[L(c).pendingCalculation?Ue((K(),he("span",{key:0,class:ce(N.$style["metric-empty"])},[...$[0]||($[0]=[tt(" - ",-1)])],2)),[[L(o),"Can’t calculate yet. Complete required fields."]]):L(c).isEmpty?(K(),he("span",{key:1,class:ce(N.$style["metric-empty"])}," - ",2)):qe("",!0)],64)):qe("",!0),L(c).isError?Ue((K(),he("div",{key:1,class:ce(N.$style["metric-error"])},[...$[1]||($[1]=[tt(" Error ",-1)])],2)),[[L(o),"Something went wrong. Review formula, inputs and retry."]]):qe("",!0),!L(c).isEmpty&&!L(c).isError?Ue((K(),he("span",{key:2,class:ce([N.$style["metric-value"],L(S)?N.$style.hovered:"",{[N.$style.disabled]:s.disabled}])},[tt(at(E.value),1)],2)),[[L(o),{content:g.value,bypassOverflowCheck:p.value}]]):qe("",!0)],2)],10,$oe)]),_:1},16,["actived"])),[[L(n),{isLoading:L(c).isLoading}]])}}),[["__cssModules",{$style:{"metric-wrapper":"_metric-wrapper_lu0ag_1","metric-content":"_metric-content_lu0ag_5",disabled:"_disabled_lu0ag_15","metric-value":"_metric-value_lu0ag_19",hovered:"_hovered_lu0ag_19","metric-error":"_metric-error_lu0ag_23","with-morpheme":"_with-morpheme_lu0ag_38","with-formula-icon":"_with-formula-icon_lu0ag_41","metric-value--number":"_metric-value--number_lu0ag_47","metric-value--currency":"_metric-value--currency_lu0ag_47","metric-value--percentage":"_metric-value--percentage_lu0ag_47","metric-morpheme":"_metric-morpheme_lu0ag_51","metric-empty":"_metric-empty_lu0ag_64","metric-icon":"_metric-icon_lu0ag_71"}}]]),Hoe={key:0,style:{color:"#6b6b6b"}},Goe=Et(ot({__name:"HeaderSorting",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean},modelValue:{}},emits:["sort-changed","update:modelValue","open"],setup(e,{expose:t,emit:n}){const o=qt,s={START_ASC:{value:"start_asc",label:"Soonest to furthest start",id:"start_asc"},START_DESC:{value:"start_desc",label:"Furthest to soonest start",id:"start_desc"},DUE_ASC:{value:"due_asc",label:"Soonest to furthest due",id:"due_asc"},DUE_DESC:{value:"due_desc",label:"Furthest to soonest due",id:"due_desc"}},r={desc:{value:"desc",label:"Newest to oldest",id:"desc"},asc:{value:"asc",label:"Oldest to newest",id:"asc"}},i={asc:{value:"asc",label:"Smallest to largest",id:"asc"},desc:{value:"desc",label:"Largest to smallest",id:"desc"}},a={asc:{value:"asc",label:"Ascending",id:"asc"},desc:{value:"desc",label:"Descending",id:"desc"}},l=e,u={assignees:"default",completedOn:"date",dateRange:"dateRange",id:"number",isArchived:"default",isCompleted:"default",isDeleted:"default",isProcessing:"default",isStarted:"default",lastUpdated:"date",name:"default",status:"default",permissions:"default",options:"default",disabled:"number"},c=Y(()=>{var O,N;if(l.headerType)return l.headerType;if(((N=(O=l.params)==null?void 0:O.column)==null?void 0:N.getColId()).includes("metric"))return"default";const k=l.headerType??l.params.column.getColId();return u[k]||"default"}),d=B(),h=()=>{var k,O,N;const P=(O=(k=l.params)==null?void 0:k.column)==null?void 0:O.getColDef();if((N=P.colId)!=null&&N.includes("metric")){if(P.context.is_primary==1)return"primary";if(P.context.is_point_metric==1)return"secondary"}};Nh(()=>{d.value=h()}),Jt(()=>{d.value=h()});const f=Y(()=>{var P,k;return((k=(P=l.params)==null?void 0:P.column.getColDef().context)==null?void 0:k.morpheme_value)||void 0}),p=Y(()=>{var P;return(P=l.params)==null?void 0:P.displayName}),g=Y(()=>{let P=[];switch(c.value){case"dateRange":P=Object.values(s).map(k=>({...k,selected:y.value===k.value,type:"text",hover:x.value===k.value}));break;case"date":P=Object.values(r).map(k=>({...k,selected:y.value===k.value,type:"text",hover:x.value===k.value}));break;case"number":P=Object.values(i).map(k=>({...k,selected:y.value===k.value,type:"text",hover:x.value===k.value}));break;default:P=Object.values(a).map(k=>({...k,selected:y.value===k.value,type:"text",hover:x.value===k.value}));break}return y.value!=="none"&&P.push({id:"clear",label:"Clear",value:"none",selected:!1,type:"text",icon:"XMark",hover:x.value=="none"}),P}),v=Y(()=>String(y.value).endsWith("asc")?"SortUp":String(y.value).endsWith("desc")?"SortDown":"Sort"),y=B(l.modelValue??"none"),b=P=>{if(A.value){A.value=!1;return}_("update:modelValue",P),_("sort-changed",P)},S=P=>{y.value=P},w=vr(()=>{if(c.value==="date"||c.value==="default"||c.value==="number"){let P;y.value==="none"?P="asc":y.value==="asc"?P="desc":P="none",y.value=P}else{const P=[s.START_ASC.value,s.START_DESC.value,s.DUE_ASC.value,s.DUE_DESC.value,"none"],O=(P.indexOf(y.value)+1)%P.length;y.value=P[O]}},vi),E=Y(()=>{if(y.value==="none")return"No sorting applied";const P=g.value.find(k=>k.value===y.value);return(P==null?void 0:P.label)||""}),_=n,D=Y(()=>{if(l.disabled&&!l.readOnly)return"var(--disabled-color)";if(y.value!=="none")return"var(--primary-color-hover)"});Je(()=>l.modelValue,P=>{P!=y.value&&(y.value=P)}),Je(y,P=>{P!==l.modelValue&&b(P)});const x=B(y.value);Je(()=>y.value,P=>{x.value=P});const M=P=>{var $,W;if(l.readOnly||l.disabled)return;let k=0;P.key==="ArrowDown"?k=1:P.key==="ArrowUp"&&(k=-1);const O=g.value.findIndex(oe=>oe.value===x.value),N=g.value.length;if(P.key==="Enter"||P.key===" ")P.preventDefault(),y.value=x.value,($=V.value)==null||$.hide();else if(k!==0){P.preventDefault();let oe=(O+k+N)%N;x.value=g.value[oe].value}else P.key==="Escape"&&((W=V.value)==null||W.hide())},V=B(null);Jt(()=>{var P,k;(k=(P=V.value)==null?void 0:P.$el)==null||k.addEventListener("keydown",M)}),ou(()=>{var P,k;(k=(P=V.value)==null?void 0:P.$el)==null||k.removeEventListener("keydown",M)});const A=B(!1);return t({setDefaultSort:P=>{y.value=P?P.direction:"none",A.value=!0},clear:()=>{y.value="none"}}),(P,k)=>(K(),ze(YE,{ref_key:"dropdownRef",ref:V,options:g.value,label:p.value,readOnly:l.readOnly,onOpen:k[0]||(k[0]=O=>P.$emit("open")),disabled:l.disabled,variant:["icon","tertiary"],size:"small",onHandleClick:L(w),onSelect:k[1]||(k[1]=O=>S(O))},{prefix:we(()=>[ye(bt,{variant:["text"],onClick:L(w),size:"small"},{default:we(()=>[Ue((K(),he("b",null,[tt(at(p.value),1)])),[[L(o),{content:p.value}]]),f.value?(K(),he("small",Hoe," ("+at(f.value)+") ",1)):qe("",!0),d.value=="primary"?Ue((K(),he("div",{key:1,class:ce(P.$style["icon-metric"])},[ye(gt,{src:"ChartPie",color:"#A6A6A6",size:"14"})],2)),[[L(o),"Woohoo metric"]]):qe("",!0),d.value=="secondary"?Ue((K(),he("div",{key:2,class:ce(P.$style["icon-metric"])},[ye(gt,{src:"Bullseye",color:"#A6A6A6",size:"14"})],2)),[[L(o),"Point Metric"]]):qe("",!0)]),_:1},8,["onClick"])]),iconDropdown:we(()=>[Ue(ye(gt,{src:v.value,source:"remote",color:D.value},null,8,["src","color"]),[[L(o),E.value]])]),_:1},8,["options","label","readOnly","disabled","onHandleClick"]))}}),[["__cssModules",{$style:{"icon-metric":"_icon-metric_nh30n_1",iconSorting:"_iconSorting_nh30n_9","button-group":"_button-group_nh30n_15","ab-table-button":"_ab-table-button_nh30n_26","button-main":"_button-main_nh30n_32","button-dropdown-trigger":"_button-dropdown-trigger_nh30n_37",headerSorting:"_headerSorting_nh30n_47"}}]]),Uoe=["disabled","readonly","checked","indeterminate"],wN=Et(ot({__name:"Checkbox",props:{modelValue:{},disabled:{type:Boolean},readOnly:{type:Boolean},focusIndex:{},tooltipText:{},allowIndeterminate:{type:Boolean},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=qt,o=Do,s=e,r=t,i=Y(()=>{if(typeof s.size=="string"){if(["small","medium","large"].includes(s.size))switch(s.size){case"small":return"14px";case"large":return"24px";case"medium":default:return"20px"}if(s.size.endsWith("px"))return s.size}return typeof s.size=="number"?`${s.size}px`:"20px"}),a=Y(()=>s.allowIndeterminate?[Ot.UNCHECK,Ot.INDETERMINATE,Ot.CHECKED]:[Ot.UNCHECK,Ot.CHECKED]),l=Y(()=>{if(typeof s.tooltipText=="string"||!s.tooltipText)return s.tooltipText||"";switch(c.value){case Ot.UNCHECK:return s.tooltipText.unchecked;case Ot.INDETERMINATE:return s.tooltipText.indeterminate;case Ot.CHECKED:return s.tooltipText.checked;default:return""}}),u=()=>{if(h.value)return;const p=(a.value.indexOf(c.value)+1)%a.value.length;c.value=a.value[p]},c=B(typeof s.modelValue=="boolean"?s.modelValue?Ot.CHECKED:Ot.UNCHECK:s.modelValue),d=Y(()=>({checked:c.value===Ot.CHECKED,indeterminate:c.value===Ot.INDETERMINATE,none:c.value===Ot.UNCHECK})),h=Y(()=>s.disabled||s.readOnly);return Je(()=>c.value,f=>{r("update:modelValue",f===Ot.CHECKED)}),(f,p)=>Ue((K(),he("input",{disabled:s.disabled,key:c.value,readonly:s.readOnly,type:"checkbox",class:ce([f.$style["input-checkbox"]]),checked:d.value.checked,indeterminate:d.value.indeterminate,onChange:u,"aria-label":"Select All Items",style:cn({"--input-size":i.value})},null,46,Uoe)),[[L(n),{content:l.value,hideOnClick:!1,contentClass:"extra-padding"}],[L(o),s.focusIndex]])}}),[["__cssModules",{$style:{small:"_small_1kz1e_84",large:"_large_1kz1e_87",medium:"_medium_1kz1e_90"}}]]),Woe=Et(ot({name:"HeaderCheckbox",__name:"HeaderCheckbox",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=qt,o=Vf(),{setSelectionStatus:s}=o,{rowCount:r,selectionStatus:i}=go(o),a=B(new Set);Je(i,w=>{s(w)},{immediate:!0});const l=Y(()=>i.value!==Ot.UNCHECK),u=Y(()=>({checked:i.value===Ot.CHECKED,indeterminate:i.value===Ot.INDETERMINATE,UNCHECK:i.value===Ot.UNCHECK})),c=Y(()=>({[Ot.UNCHECK]:"Click to select all",[Ot.INDETERMINATE]:"Click to clear selection",[Ot.CHECKED]:"Click to clear selection"})[i.value]||"Select items"),d=Y(()=>{const w=[{label:"Select all",value:"INDETERMINATE",type:"text",clickable:!0,id:"indeterminate"}];return l.value&&w.push({label:"None",value:"UNCHECK",type:"text",clickable:!0,id:"uncheck"}),w}),h=w=>({selected:w.getSelectedRows().length,total:r.value.total,loaded:r.value.loaded}),f=({api:w,state:E})=>{if(w)if(E===Ot.UNCHECK)w.deselectAll(),a.value.clear(),i.value=E;else if(E===Ot.CHECKED){const _=new Set;w.forEachNode(D=>{D.isSelected()&&_.add(D.id||"")}),a.value=_,w.forEachNode(D=>D.setSelected(!0)),i.value=E}else w.forEachNode(_=>_.setSelected(!0)),i.value=E},p=()=>{var _;const w=(_=t.params)==null?void 0:_.api;if(!w){console.error("[HeaderCheckbox] There is no API available");return}const E={[Ot.UNCHECK]:Ot.INDETERMINATE,[Ot.INDETERMINATE]:Ot.UNCHECK,[Ot.CHECKED]:Ot.UNCHECK};f({api:w,state:E[i.value]})},g=w=>{var D;const E=(D=t.params)==null?void 0:D.api;if(!E){console.error("no api");return}const _={INDETERMINATE:Ot.INDETERMINATE,GLOBAL:Ot.CHECKED,UNCHECK:Ot.UNCHECK};f({api:E,state:_[w]})},v=vr(w=>{const{selected:E,total:_}=h(w);if(_==0){i.value=Ot.UNCHECK;return}E===_?i.value=Ot.CHECKED:E===0?i.value=Ot.UNCHECK:i.value=Ot.INDETERMINATE},300);let y=[];const b=w=>{v(w)};Jt(()=>{var x;const w=(x=t.params)==null?void 0:x.api;if(!w)return;const E=M=>v(M.api),_=()=>b(w),D=()=>b(w);w.addEventListener("selectionChanged",E),w.addEventListener("rowDataUpdated",_),w.addEventListener("modelUpdated",_),y=[()=>w.removeEventListener("selectionChanged",E),()=>w.removeEventListener("rowDataUpdated",_),()=>w.removeEventListener("modelUpdated",D)]}),Vn(()=>{y.forEach(w=>w())});const S=`header-checkbox-${Math.random().toString(36).substr(2,9)}`;return(w,E)=>(K(),ze(YE,{tabIndex:"9",options:d.value,size:24,disabled:t.disabled,readOnly:t.readOnly,variant:["icon","tertiary"],placement:"bottom-start",onSelect:g},{prefix:we(()=>[Ue((K(),ze(wN,{"tab-index":"8",id:S,disabled:t.disabled,key:L(i),readonly:t.readOnly,type:"checkbox",checked:u.value.checked,indeterminate:u.value.indeterminate,modelValue:L(i),"onUpdate:modelValue":E[0]||(E[0]=_=>fn(i)?i.value=_:null),onChange:p,"aria-label":L(i)===L(Ot).CHECKED?"All items selected":"Select visible items",class:ce(w.$style["ag-checkbox-input"])},null,8,["disabled","readonly","checked","indeterminate","modelValue","aria-label","class"])),[[L(n),{content:c.value,hideOnClick:!1,contentClass:"extra-padding"}]])]),_:1},8,["options","disabled","readOnly"]))}}),[["__cssModules",{$style:{"ag-checkbox-input":"_ag-checkbox-input_4qktt_1","button-group":"_button-group_4qktt_62","button-main":"_button-main_4qktt_62",headerCheckbox:"_headerCheckbox_4qktt_66"}}]]),zoe={style:{color:"#a6a6a6"}},CN=Et(ot({name:"StatusRenderer",__name:"StatusRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean,default:!0},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},focusIndex:{},placeholder:{default:"No status"}},setup(e,{expose:t}){const n=Vs,o=qt,s=e,{isEditing:r}=ld(s),i=B(null),a=B(null),l=Y(()=>s.value),u=Y(()=>l.value===void 0),c=Y(()=>{var v,y;return((v=l.value)==null?void 0:v.name)||((y=l.value)==null?void 0:y.label)||"No status"}),d=Y(()=>{var v;return{disabled:s.disabled,error:!1,readOnly:s.readOnly,isEmpty:kY((v=l.value)==null?void 0:v.label),inputRef:i,wrapperRef:a,clickable:!s.disabled&&!s.readOnly,active:r}}),{argsMain:h,isHover:f}=xo(d),p=Y(()=>{var v;return((v=l.value)==null?void 0:v.color)||"#fff"}),g=Y(()=>new Bn(p.value).isLight()?"#000":"#fff");return t({focus:()=>{var v;(v=a.value)==null||v.focus()}}),(v,y)=>{const b=Ec("focusable");return Ue((K(),ze(L(Oo),Kt(L(h),{ref_key:"wrapperRef",ref:a,bordered:!0,style:{background:`${p.value} !important`,color:g.value,"--border-color":!L(r)&&!L(f)||!l.value?"#f3f5f8":void 0}}),{default:we(()=>[u.value?qe("",!0):(K(),he("div",{key:0,class:ce({[v.$style["status-renderer"]]:!0,[v.$style["has-status"]]:l.value,[v.$style["has-suffix"]]:!!v.$slots.suffix})},[l.value?(K(),he(Pt,{key:0},[Ue((K(),he("div",{class:ce(v.$style["status-renderer__status-name"])},[tt(at(c.value),1)],2)),[[L(o),{content:c.value,delay:[1e3,0]}]]),kt(v.$slots,"suffix")],64)):(K(),he(Pt,{key:1},[be("div",{class:ce(v.$style["status-renderer__color-code"])},null,2),be("span",zoe,at(s.placeholder),1),kt(v.$slots,"suffix")],64))],2))]),_:3},16,["style"])),[[b,s.focusIndex],[L(n),{isLoading:u.value}]])}}}),[["__cssModules",{$style:{"status-renderer":"_status-renderer_k5c36_1","has-status":"_has-status_k5c36_9","has-suffix":"_has-suffix_k5c36_12","status-renderer__color-code":"_status-renderer__color-code_k5c36_22","status-renderer__status-name":"_status-renderer__status-name_k5c36_33"}}]]),bN=Et(ot({__name:"PopupLayout",props:{popupName:{},showOverlay:{type:Boolean,default:!0},overlayOpacity:{default:.5},closeOnOverlayClick:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},minWidth:{default:"300px"},popupIndex:{default:109},showCloseBtn:{type:Boolean,default:!0}},emits:["shown","hidden"],setup(e,{expose:t,emit:n}){const o=e,s=Y(()=>Number(o.popupIndex)),{popupRef:r,show:i,hide:a,isVisible:l}=ZZ({useTrigger:!1,arrow:!1,centered:!0,showOverlay:o.showOverlay,overlayOpacity:o.overlayOpacity,closeOnOverlayClick:o.closeOnOverlayClick,appendTo(d){return document.body},zIndex:s.value}),u=d=>{o.closeOnEscape&&d.key==="Escape"&&l.value&&a()};Jt(()=>{document.addEventListener("keydown",u)}),Vn(()=>{document.removeEventListener("keydown",u)}),t({show:i,hide:a,isVisible:l});const c=n;return Je(()=>l.value,d=>{c(d?"shown":"hidden")}),(d,h)=>{const f=Ec("tooltip");return K(),he("div",{ref_key:"popupRef",ref:r,class:ce(d.$style.popupContainer)},[be("div",{class:ce(d.$style.popupWrapper)},[be("div",{class:ce(d.$style.header)},[kt(d.$slots,"header",{},()=>[be("span",{class:ce(d.$style["header-title"])},at(e.popupName),3)]),o.showCloseBtn?Ue((K(),ze(bt,{key:0,variant:["icon","text"],onClick:L(a),"aria-label":"Close popup",size:"small"},{default:we(()=>[ye(gt,{src:"Xmark",size:8})]),_:1},8,["onClick"])),[[f,"Close"]]):qe("",!0)],2),be("div",{class:ce(d.$style.body)},[kt(d.$slots,"default")],2),d.$slots.footer?(K(),he("div",{key:0,class:ce(d.$style.footer)},[kt(d.$slots,"footer")],2)):qe("",!0)],2)],2)}}}),[["__cssModules",{$style:{popupContainer:"_popupContainer_1qqwg_1",popupWrapper:"_popupWrapper_1qqwg_9",popupFadeIn:"_popupFadeIn_1qqwg_1",header:"_header_1qqwg_24","header-title":"_header-title_1qqwg_34",body:"_body_1qqwg_43",footer:"_footer_1qqwg_48"}}]]),joe=["onMouseenter","onMouseleave"],Koe=["innerHTML"],qoe=["innerHTML"],Yoe=["data-tooltip"],Xoe={key:2,style:{"min-width":"24px","min-height":"24px",position:"absolute",top:"0",right:"0",display:"flex","align-items":"center","justify-content":"center"}},Zoe=Et(ot({__name:"Snackbar",setup(e){const t=qt,n=P6,o=Ss(),{removeNotification:s}=o,{notifications:r}=go(o),i=f=>f.trim().startsWith("<svg"),a=B("Copy"),l=()=>{setTimeout(()=>{a.value="Copy"},3e3)},u=f=>{navigator.clipboard.writeText(f).then(()=>{a.value="Copied",l()},()=>{a.value="Copy failed",l()})},c=B(new Set),d=f=>{var p;c.value.add(f),(p=o.pauseAutoDismiss)==null||p.call(o,f)},h=f=>{var p;c.value.delete(f),(p=o.resumeAutoDismiss)==null||p.call(o,f)};return(f,p)=>(K(),ze($z,{name:"list",tag:"div",class:ce(["notification-center",f.$style["notification-wrapper"]])},{default:we(()=>[(K(!0),he(Pt,null,Dn(L(r),g=>{var v;return Ue((K(),he("div",{key:g.id,class:ce([f.$style["notification-item"],f.$style[`notification--${g.type||"info"}`],!(g!=null&&g.actions)||((v=g==null?void 0:g.actions)==null?void 0:v.length)==0?f.$style["snackbar-type"]:""]),onMouseenter:y=>d(g.id),onMouseleave:y=>h(g.id)},[be("p",{class:ce(f.$style.snackbar__message)},[g.type!="white"?(K(),he("span",{key:0,class:ce(f.$style.snackbar__icon)},[!g.icon&&g.type=="success"?(K(),ze(gt,{key:0,src:"CircleCheck",source:"remote"})):qe("",!0),!g.icon&&g.type=="interactive"?(K(),ze(gt,{key:1,src:"CircleCheck",source:"remote"})):!g.icon&&g.type=="error"?(K(),ze(gt,{key:2,src:"CircleXMark",source:"remote"})):g.icon&&i(g.icon)?(K(),he("i",{key:3,class:ce(f.$style["icon-draw"]),innerHTML:g.icon},null,10,Koe)):g.icon&&!i(g.icon)?(K(),ze(gt,{key:4,src:g.icon,source:"remote",color:"var(--primary-color)"},null,8,["src"])):qe("",!0)],2)):qe("",!0),be("span",{class:ce(f.$style["error-message"])},[be("span",{class:ce(f.$style.message),innerHTML:g.message},null,10,qoe)],2)],2),g.actions?(K(),he("div",{key:0,class:ce(f.$style["actions-notification"]),"data-notification":"true"},[(K(!0),he(Pt,null,Dn(g.actions,y=>(K(),ze(bt,Kt({key:y.label},{ref_for:!0},y,{onClick:Ht(y.action,["prevent","stop"]),variant:"secondary",size:"small"}),{prefix:we(()=>[y.btnIcon?(K(),ze(gt,{key:0,src:y.btnIcon,source:"remote",color:"var(--primary-color)"},null,8,["src"])):qe("",!0)]),_:2},1040,["onClick"]))),128))],2)):qe("",!0),g.type!=="interactive"&&g.type!=="white"?Ue((K(),he("div",{key:1,"data-tooltip":a.value,style:{"min-width":"24px"}},[ye(bt,{variant:"secondary",onClick:y=>u(g.message),class:ce(f.$style["copy-btn"])},{prefix:we(()=>[ye(gt,{src:"Copy",source:"remote",color:"var(--primary-color)",size:"11"})]),_:1},8,["onClick","class"])],8,Yoe)),[[L(t),a.value]]):qe("",!0),g.type=="interactive"?Ue((K(),he("div",Xoe,[ye(bt,{variant:"tertiary",onClick:y=>L(s)(g.id),class:ce(f.$style["close-btn"]),size:18},{default:we(()=>[ye(gt,{src:"XMarkSolid",size:"9"})]),_:1},8,["onClick","class"])])),[[L(t),"Close"]]):qe("",!0)],42,joe)),[[L(n)]])}),128))]),_:1},8,["class"]))}}),[["__cssModules",{$style:{"notification-wrapper":"_notification-wrapper_1gnza_1","notification-item":"_notification-item_1gnza_15","notification--success":"_notification--success_1gnza_30","notification--error":"_notification--error_1gnza_36","close-btn":"_close-btn_1gnza_42","notification--info":"_notification--info_1gnza_45","notification--warning":"_notification--warning_1gnza_52","notification--interactive":"_notification--interactive_1gnza_59","notification--white":"_notification--white_1gnza_67","snackbar-type":"_snackbar-type_1gnza_75",snackbar__message:"_snackbar__message_1gnza_84",message:"_message_1gnza_97","error-message":"_error-message_1gnza_105",snackbar__icon:"_snackbar__icon_1gnza_111","actions-notification":"_actions-notification_1gnza_120","icon-draw":"_icon-draw_1gnza_128","copy-btn":"_copy-btn_1gnza_136"}}]]);/*!
160
160
  * vue-draggable-next v2.3.0
161
161
  * (c) 2025 Anish George
162
162
  * @license MIT
@@ -189,7 +189,7 @@ ${l}`:c)}throw i},onCacheKey:i=>$re(t,n,i)}}function Bae(e){if(Tt(e))return e;if
189
189
  * (c) 2026 kazuya kawaguchi
190
190
  * Released under the MIT License.
191
191
  */const Yae="11.4.17";function Xae(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Sl().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Sl().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Sl().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Sl().__INTLIFY_PROD_DEVTOOLS__=!1)}const xn={UNEXPECTED_RETURN_TYPE:sae,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function hs(e,...t){return Dd(e,null,Q.env.NODE_ENV!=="production"?{messages:ZL,args:t}:void 0)}const ZL={[xn.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[xn.INVALID_ARGUMENT]:"Invalid argument",[xn.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[xn.NOT_INSTALLED]:"Need to install with `app.use` function",[xn.UNEXPECTED_ERROR]:"Unexpected error",[xn.REQUIRED_VALUE]:"Required in value: {0}",[xn.INVALID_VALUE]:"Invalid value",[xn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[xn.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[xn.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[xn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},M0=_i("__translateVNode"),N0=_i("__datetimeParts"),L0=_i("__numberParts"),_a=_i("__enableEmitter"),Gu=_i("__disableEmitter"),JL=_i("__setPluralRules"),QL=_i("__injectWithOption"),kd=_i("__dispose"),Ds={FALLBACK_TO_ROOT:Hu,NOT_FOUND_PARENT_SCOPE:Hu+1,IGNORE_OBJ_FLATTEN:Hu+2,DEPRECATE_LEGACY_MODE:Hu+3,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:Hu+4,DUPLICATE_USE_I18N_CALLING:Hu+5,IGNORE_UNSAFE_LOCALE:Hu+6},Zae={[Ds.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Ds.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Ds.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Ds.DEPRECATE_LEGACY_MODE]:`Legacy API mode has been deprecated in v11. Use Composition API mode instead.
192
- About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[Ds.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",[Ds.DUPLICATE_USE_I18N_CALLING]:"Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component.",[Ds.IGNORE_UNSAFE_LOCALE]:"Ignore '{locale}' locale: it is a property name of Object.prototype"};function Uu(e,...t){return fy(Zae[e],...t)}let eV=null;{const e=Sl().__VUE_INSTANCE_SETTERS__;On(e)&&e.push(t=>{eV=t})}function Dl(e){return QN(e)?(Q.env.NODE_ENV!=="production"&&Ts(Uu(Ds.IGNORE_UNSAFE_LOCALE,{locale:e})),!0):!1}function mp(e){if(!rn(e)||El(e))return e;for(const t in e)if(Rr(e,t))if(!t.includes("."))rn(e[t])&&mp(e[t]);else{const n=t.split("."),o=n.length-1;let s=e,r=!1;for(let a=0;a<o;a++){if(n[a]==="__proto__")throw new Error(`unsafe key: ${n[a]}`);if(n[a]in s||(s[n[a]]=_n()),!rn(s[n[a]])){Q.env.NODE_ENV!=="production"&&Ts(Uu(Ds.IGNORE_OBJ_FLATTEN,{key:n[a]})),r=!0;break}if(El(s[n[a]])&&(vL.includes(n[a+1])||n[a+1]==="cacheKey")){r=!0;break}s=s[n[a]]}r||(s[n[o]]=e[t],delete e[t]);const i=s[n[o]];rn(i)&&mp(i)}return e}function V0(e,t){const{messages:n,__i18n:o,messageResolver:s,flatJson:r}=t,i=Pn(n)?n:On(o)?_n():{[e]:_n()};if(On(o)&&o.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:l,resource:u}=a;if(l){if(Dl(l))return;i[l]=No(i,l)||_n(),my(u,i[l])}else my(u,i)}else Tt(a)&&my(JSON.parse(a),i)}),s==null&&r)for(const a in i)Rr(i,a)&&mp(i[a]);return i}function tV(e){return e.type}function nV(e,t,n){let o=rn(t.messages)?t.messages:_n();"__i18nGlobal"in n&&(o=V0(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const s=Object.keys(o);s.length&&s.forEach(r=>{e.mergeLocaleMessage(r,o[r])});{if(rn(t.datetimeFormats)){const r=Object.keys(t.datetimeFormats);r.length&&r.forEach(i=>{e.mergeDateTimeFormat(i,t.datetimeFormats[i])})}if(rn(t.numberFormats)){const r=Object.keys(t.numberFormats);r.length&&r.forEach(i=>{e.mergeNumberFormat(i,t.numberFormats[i])})}}}function oV(e){return ye(Wa,null,e,0)}function Fd(){return eV??Go()}const sV="__INTLIFY_META__",rV=()=>[],Jae=()=>!1;let iV=0;function aV(e){return(t,n,o,s)=>e(n,o,Fd()||void 0,s)}const Qae=()=>{const e=Fd();let t=null;return e&&(t=tV(e)[sV])?{[sV]:t}:null};function Sy(e={}){const{__root:t,__injectWithOption:n}=e,o=t===void 0,s=e.flatJson,r=Kr?B:xg;let i=Rn(e.inheritLocale)?e.inheritLocale:!0;const a=r(t&&i?t.locale.value:Tt(e.locale)?e.locale:gp),l=r(t&&i?t.fallbackLocale.value:Tt(e.fallbackLocale)||On(e.fallbackLocale)||Pn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a.value),u=r(V0(a.value,e)),c=r(Pn(e.datetimeFormats)?e.datetimeFormats:{[a.value]:{}}),d=r(Pn(e.numberFormats)?e.numberFormats:{[a.value]:{}});let h=t?t.missingWarn:Rn(e.missingWarn)||$u(e.missingWarn)?e.missingWarn:!0,f=t?t.fallbackWarn:Rn(e.fallbackWarn)||$u(e.fallbackWarn)?e.fallbackWarn:!0,p=t?t.fallbackRoot:Rn(e.fallbackRoot)?e.fallbackRoot:!0,g=!!e.fallbackFormat,v=In(e.missing)?e.missing:null,y=In(e.missing)?aV(e.missing):null,b=In(e.postTranslation)?e.postTranslation:null,S=t?t.warnHtmlMessage:Rn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,w=!!e.escapeParameter;const E=t?t.modifiers:Pn(e.modifiers)?e.modifiers:{};let _=e.pluralRules||t&&t.pluralRules,D;D=(()=>{o&&xL(null);const Te={version:Yae,locale:a.value,fallbackLocale:l.value,messages:u.value,modifiers:E,pluralRules:_,missing:y===null?void 0:y,missingWarn:h,fallbackWarn:f,fallbackFormat:g,unresolving:!0,postTranslation:b===null?void 0:b,warnHtmlMessage:S,escapeParameter:w,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};Te.datetimeFormats=c.value,Te.numberFormats=d.value;const He=Dae(Te);return o&&xL(He),He})(),Cy(D,a.value,l.value);function M(){return[a.value,l.value,u.value,c.value,d.value]}const V=Y({get:()=>a.value,set:Te=>{D.locale=Te,a.value=Te}});function A(Te){o||(D.fallbackContext=Tae());try{return Te()}finally{o||(D.fallbackContext=void 0)}}function P(Te){A(()=>Cy(D,a.value,Te))}const k=Y({get:()=>l.value,set:Te=>{l.value=Te,D.fallbackLocale=l.value,P(l.value)}}),O=Y(()=>u.value),N=Y(()=>c.value),$=Y(()=>d.value);function W(){return In(b)?b:null}function oe(Te){b=Te,D.postTranslation=Te}function ie(){return v}function ee(Te){Te!==null&&(y=aV(Te)),v=Te,D.missing=y}function se(Te,He){return Te!=="translate"||!He.resolvedMessage}const X=(Te,He,_t,Vt,Yt,Mn)=>{M();let Ne;try{Q.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,Ne=A(()=>Te(D))}finally{Q.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__}if(_t!=="translate exists"&&oo(Ne)&&Ne===wy||_t==="translate exists"&&!Ne){const[Ve,Rt]=He();if(Q.env.NODE_ENV!=="production"&&t&&Tt(Ve)&&se(_t,Rt)&&(p&&(A0(f,Ve)||IL(h,Ve))&&Ts(Uu(Ds.FALLBACK_TO_ROOT,{key:Ve,type:_t})),Q.env.NODE_ENV!=="production")){const{__v_emitter:jt}=D;jt&&p&&jt.emit("fallback",{type:_t,key:Ve,to:"global",groupId:bl(_t,Ve)})}return t&&p?Vt(t):Yt(Ve)}else{if(Mn(Ne))return Ne;throw hs(xn.UNEXPECTED_RETURN_TYPE)}};function I(...Te){return X(He=>Reflect.apply(KL,null,[He,...Te]),()=>F0(...Te),"translate",He=>Reflect.apply(He.t,He,[...Te]),He=>He,He=>Tt(He))}function z(...Te){const[He,_t,Vt]=Te;if(Vt&&!rn(Vt))throw hs(xn.INVALID_ARGUMENT);return I(He,_t,so({resolvedMessage:!0},Vt||{}))}function ne(...Te){return X(He=>Reflect.apply($L,null,[He,...Te]),()=>I0(...Te),"datetime format",He=>Reflect.apply(He.d,He,[...Te]),()=>Id,He=>Tt(He)||On(He))}function me(...Te){return X(He=>Reflect.apply(UL,null,[He,...Te]),()=>P0(...Te),"number format",He=>Reflect.apply(He.n,He,[...Te]),()=>Id,He=>Tt(He)||On(He))}function xe(Te){return Te.map(He=>Tt(He)||oo(He)||Rn(He)?oV(String(He)):He)}const j={normalize:xe,interpolate:Te=>Te,type:"vnode"};function q(...Te){return X(He=>{let _t;const Vt=He;try{Vt.processor=j,_t=Reflect.apply(KL,null,[Vt,...Te])}finally{Vt.processor=null}return _t},()=>F0(...Te),"translate",He=>He[M0](...Te),He=>[oV(He)],He=>On(He))}function re(...Te){return X(He=>Reflect.apply(UL,null,[He,...Te]),()=>P0(...Te),"number format",He=>He[L0](...Te),rV,He=>Tt(He)||On(He))}function R(...Te){return X(He=>Reflect.apply($L,null,[He,...Te]),()=>I0(...Te),"datetime format",He=>He[N0](...Te),rV,He=>Tt(He)||On(He))}function H(Te){_=Te,D.pluralRules=_}function ae(Te,He){const _t=Z(Te),Vt=D.messageResolver(_t,He);return Vt===null?No(_t,He):Vt}function pe(Te,He){return X(()=>{if(!Te)return!1;const _t=Tt(He)?He:a.value,Vt=Tt(He)?[_t]:D.localeFallbacker(D,l.value,_t);for(let Yt=0;Yt<Vt.length;Yt++)if(by(ae(Vt[Yt],Te)))return!0;return!1},()=>[Te],"translate exists",_t=>Reflect.apply(_t.te,_t,[Te,He]),Jae,_t=>Rn(_t))}function Se(Te){let He=null;const _t=D.localeFallbacker(D,l.value,a.value);for(let Vt=0;Vt<_t.length;Vt++){const Yt=ae(_t[Vt],Te);if(Yt!=null){He=Yt;break}}return He}function Ce(Te){const He=Se(Te);return He??(t?t.tm(Te)||{}:{})}function Z(Te){return No(u.value,Te)||{}}function U(Te,He){Dl(Te)||(s&&mp(He),u.value[Te]=He,D.messages=u.value)}function te(Te,He){Dl(Te)||(u.value[Te]=No(u.value,Te)||{},s&&mp(He),my(He,u.value[Te]),D.messages=u.value)}function le(Te){return No(c.value,Te)||{}}function Ye(Te,He){Dl(Te)||(c.value[Te]=He,D.datetimeFormats=c.value,GL(D,Te,He))}function Be(Te,He){Dl(Te)||(c.value[Te]=so(No(c.value,Te)||{},He),D.datetimeFormats=c.value,GL(D,Te,He))}function je(Te){return No(d.value,Te)||{}}function Oe(Te,He){Dl(Te)||(d.value[Te]=He,D.numberFormats=d.value,zL(D,Te,He))}function nt(Te,He){Dl(Te)||(d.value[Te]=so(No(d.value,Te)||{},He),D.numberFormats=d.value,zL(D,Te,He))}iV++,Je(l,()=>P(l.value),{deep:!0,flush:"sync"}),t&&Kr&&(Je(t.locale,Te=>{i&&(a.value=Te,D.locale=Te,Cy(D,a.value,l.value))}),Je(t.fallbackLocale,Te=>{i&&(l.value=Te,D.fallbackLocale=l.value,Cy(D,a.value,l.value))}));const Ze={id:iV,locale:V,fallbackLocale:k,get inheritLocale(){return i},set inheritLocale(Te){i=Te,Te&&t&&(V.value=t.locale.value,k.value=t.fallbackLocale.value)},get availableLocales(){return Object.keys(u.value).sort()},messages:O,get modifiers(){return E},get pluralRules(){return _||{}},get isGlobal(){return o},get missingWarn(){return h},set missingWarn(Te){h=Te,D.missingWarn=h},get fallbackWarn(){return f},set fallbackWarn(Te){f=Te,D.fallbackWarn=f},get fallbackRoot(){return p},set fallbackRoot(Te){p=Te},get fallbackFormat(){return g},set fallbackFormat(Te){g=Te,D.fallbackFormat=g},get warnHtmlMessage(){return S},set warnHtmlMessage(Te){S=Te,D.warnHtmlMessage=Te},get escapeParameter(){return w},set escapeParameter(Te){w=Te,D.escapeParameter=Te},t:I,getLocaleMessage:Z,setLocaleMessage:U,mergeLocaleMessage:te,getPostTranslationHandler:W,setPostTranslationHandler:oe,getMissingHandler:ie,setMissingHandler:ee,[JL]:H};return Ze.datetimeFormats=N,Ze.numberFormats=$,Ze.rt=z,Ze.te=pe,Ze.tm=Ce,Ze.d=ne,Ze.n=me,Ze.getDateTimeFormat=le,Ze.setDateTimeFormat=Ye,Ze.mergeDateTimeFormat=Be,Ze.getNumberFormat=je,Ze.setNumberFormat=Oe,Ze.mergeNumberFormat=nt,Ze[QL]=n,Ze[M0]=q,Ze[N0]=R,Ze[L0]=re,Q.env.NODE_ENV!=="production"&&(Ze[_a]=Te=>{D.__v_emitter=Te},Ze[Gu]=()=>{D.__v_emitter=void 0}),Ze}const lV="vue-i18n: composer properties",B0={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},ele={"vue-i18n-resource-inspector":"Search for scopes ..."},tle={"vue-i18n-timeline":16764185};let $0;async function nle(e,t){return new Promise((n,o)=>{try{qae({id:"vue-devtools-plugin-vue-i18n",label:B0["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:[lV],app:e},s=>{$0=s,s.on.visitComponentTree(({componentInstance:i,treeNode:a})=>{ole(i,a,t)}),s.on.inspectComponent(({componentInstance:i,instanceData:a})=>{i.__VUE_I18N__&&a&&(t.mode==="legacy"?i.__VUE_I18N__!==t.global.__composer&&cV(a,i.__VUE_I18N__):cV(a,i.__VUE_I18N__))}),s.addInspector({id:"vue-i18n-resource-inspector",label:B0["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:ele["vue-i18n-resource-inspector"]}),s.on.getInspectorTree(i=>{i.app===e&&i.inspectorId==="vue-i18n-resource-inspector"&&lle(i,t)});const r=new Map;s.on.getInspectorState(async i=>{if(i.app===e&&i.inspectorId==="vue-i18n-resource-inspector")if(s.unhighlightElement(),cle(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=ule(i.nodeId,t);a&&s.highlightElement(a)}}),s.on.editInspectorState(i=>{i.app===e&&i.inspectorId==="vue-i18n-resource-inspector"&&hle(i,t)}),s.addTimelineLayer({id:"vue-i18n-timeline",label:B0["vue-i18n-timeline"],color:tle["vue-i18n-timeline"]}),n(!0)})}catch(s){console.error(s),o(!1)}})}function uV(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function ole(e,t,n){const o=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.__VUE_I18N__&&e.__VUE_I18N__!==o){const s={label:`i18n (${uV(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(s)}}function cV(e,t){const n=lV;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:H0(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 H0(e){const t={};return Object.keys(e).forEach(n=>{const o=e[n];In(o)&&"source"in o?t[n]=ale(o):El(o)&&o.loc&&o.loc.source?t[n]=o.loc.source:rn(o)?t[n]=H0(o):t[n]=o}),t}const sle={"<":"&lt;",">":"&gt;",'"':"&quot;","&":"&amp;"};function rle(e){return e.replace(/[<>"&]/g,ile)}function ile(e){return sle[e]||e}function ale(e){return{_custom:{type:"function",display:`<span>ƒ</span> ${e.source?`("${rle(e.source)}")`:"(?)"}`}}}function lle(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:`${uV(o)} Scope`})}}function ule(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 dV(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 cle(e,t){const n=dV(e.nodeId,t);return n&&(e.state=dle(n)),null}function dle(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:H0(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 Wu(e,t){if($0){let n;t&&"groupId"in t&&(n=t.groupId,delete t.groupId),$0.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 hle(e,t){const n=dV(e.nodeId,t);if(n){const[o]=e.path;o==="locale"&&Tt(e.state.value)?n.locale.value=e.state.value:o==="fallbackLocale"&&(Tt(e.state.value)||On(e.state.value)||rn(e.state.value))?n.fallbackLocale.value=e.state.value:o==="inheritLocale"&&Rn(e.state.value)&&(n.inheritLocale=e.state.value)}}const G0=new WeakMap;function Od(e){if(!$u(e))return!e;let t=G0.get(e);return t||(t=new RegExp(`^(?![\\s\\S]*(?:${e.source}))`,e.flags.replace(/[gy]/g,"")),G0.set(e,t),G0.set(t,e)),t}function fle(e){const t=Tt(e.locale)?e.locale:gp,n=Tt(e.fallbackLocale)||On(e.fallbackLocale)||Pn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=In(e.missing)?e.missing:void 0,s=Rn(e.silentTranslationWarn)||$u(e.silentTranslationWarn)?Od(e.silentTranslationWarn):!0,r=Rn(e.silentFallbackWarn)||$u(e.silentFallbackWarn)?Od(e.silentFallbackWarn):!0,i=Rn(e.fallbackRoot)?e.fallbackRoot:!0,a=!!e.formatFallbackMessages,l=Pn(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=In(e.postTranslation)?e.postTranslation:void 0,d=Tt(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,h=!!e.escapeParameterHtml,f=Rn(e.sync)?e.sync:!0;let p=e.messages;if(Pn(e.sharedMessages)){const E=e.sharedMessages;p=Object.keys(E).reduce((D,x)=>{if(Dl(x))return D;const M=No(D,x)||(D[x]={});return so(M,E[x]),D},p||{})}const{__i18n:g,__root:v,__injectWithOption:y}=e,b=e.datetimeFormats,S=e.numberFormats,w=e.flatJson;return{locale:t,fallbackLocale:n,messages:p,flatJson:w,datetimeFormats:b,numberFormats:S,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,__i18n:g,__root:v,__injectWithOption:y}}function U0(e={}){const t=Sy(fle(e)),{__extender:n}=e,o={id:t.id,get locale(){return t.locale.value},set locale(s){t.locale.value=s},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(s){t.fallbackLocale.value=s},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(s){t.setMissingHandler(s)},get silentTranslationWarn(){return Od(t.missingWarn)},set silentTranslationWarn(s){t.missingWarn=Od(s)},get silentFallbackWarn(){return Od(t.fallbackWarn)},set silentFallbackWarn(s){t.fallbackWarn=Od(s)},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(s){t.fallbackFormat=s},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(s){t.setPostTranslationHandler(s)},get sync(){return t.inheritLocale},set sync(s){t.inheritLocale=s},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){t.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(s){t.escapeParameter=s},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...s){return Reflect.apply(t.t,t,[...s])},rt(...s){return Reflect.apply(t.rt,t,[...s])},te(s,r){return t.te(s,r)},tm(s){return t.tm(s)},getLocaleMessage(s){return t.getLocaleMessage(s)},setLocaleMessage(s,r){t.setLocaleMessage(s,r)},mergeLocaleMessage(s,r){t.mergeLocaleMessage(s,r)},d(...s){return Reflect.apply(t.d,t,[...s])},getDateTimeFormat(s){return t.getDateTimeFormat(s)},setDateTimeFormat(s,r){t.setDateTimeFormat(s,r)},mergeDateTimeFormat(s,r){t.mergeDateTimeFormat(s,r)},n(...s){return Reflect.apply(t.n,t,[...s])},getNumberFormat(s){return t.getNumberFormat(s)},setNumberFormat(s,r){t.setNumberFormat(s,r)},mergeNumberFormat(s,r){t.mergeNumberFormat(s,r)}};return o.__extender=n,Q.env.NODE_ENV!=="production"&&(o.__enableEmitter=s=>{const r=t;r[_a]&&r[_a](s)},o.__disableEmitter=()=>{const s=t;s[Gu]&&s[Gu]()}),o}function ple(e,t,n){return{beforeCreate(){const o=Fd();if(!o)throw hs(xn.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const r=so({},s.i18n);if(s.__i18n&&(r.__i18n=s.__i18n),r.__root=t,this===this.$root)this.$i18n=hV(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=U0(r);const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=hV(e,s);else{this.$i18n=U0({__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&&nV(t,s,s),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...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(Q.env.NODE_ENV!=="production"&&this.$i18n){const o=Fd();if(!o)return;const s=this.$i18n;o.__VUE_I18N__=s.__composer;const r=this.__v_emitter=gy();s.__enableEmitter&&s.__enableEmitter(r),r.on("*",Wu)}},unmounted(){const o=Fd();if(!o)throw hs(xn.UNEXPECTED_ERROR);const s=this.$i18n;Q.env.NODE_ENV!=="production"&&o.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Wu),delete this.__v_emitter),s&&(s.__disableEmitter&&s.__disableEmitter(),delete o.__VUE_I18N__)),s&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s!=null&&s.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(o),delete this.$i18n)}}}function hV(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[JL](t.pluralizationRules||e.pluralizationRules);const n=V0(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 W0={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function gle({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},_n())}function fV(){return Pt}const pV=ot({name:"i18n-t",props:so({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>oo(e)||!isNaN(e)}},W0),setup(e,t){const{slots:n,attrs:o}=t,s=e.i18n||z0({useScope:e.scope,__useComponent:!0});return()=>{const r=()=>{const l=Object.keys(n).filter(d=>d[0]!=="_"),u=_n();e.locale&&(u.locale=e.locale),e.plural!==void 0&&(u.plural=Tt(e.plural)?+e.plural:e.plural);const c=gle(t,l);return s[M0](e.keypath,c,u)},i=so(_n(),o),a=Tt(e.tag)||rn(e.tag)?e.tag:fV();return rn(a)?za(a,i,{default:r}):za(a,i,r())}}});function mle(e){return On(e)&&!Tt(e[0])}function gV(e,t,n,o){const{slots:s,attrs:r}=t;return()=>{const i=()=>{const u={part:!0};let c=_n();e.locale&&(u.locale=e.locale),Tt(e.format)?u.key=e.format:rn(e.format)&&(Tt(e.format.key)&&(u.key=e.format.key),c=Object.keys(e.format).reduce((f,p)=>n.includes(p)?so(_n(),f,{[p]:e.format[p]}):f,_n()));const d=o(e.value,u,c);let h=[u.key];return On(d)?h=d.map((f,p)=>{const g=s[f.type],v=g?g({[f.type]:f.value,index:p,parts:d}):[f.value];return mle(v)&&(v[0].key=`${f.type}-${p}`),v}):Tt(d)&&(h=[d]),h},a=so(_n(),r),l=Tt(e.tag)||rn(e.tag)?e.tag:fV();return rn(l)?za(l,a,{default:i}):za(l,a,i())}}const mV=ot({name:"i18n-n",props:so({value:{type:Number,required:!0},format:{type:[String,Object]}},W0),setup(e,t){const n=e.i18n||z0({useScope:e.scope,__useComponent:!0});return gV(e,t,WL,(...o)=>n[L0](...o))}});function vle(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 yle(e){const t=i=>{Q.env.NODE_ENV!=="production"&&py(Uu(Ds.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));const{instance:a,value:l}=i;if(!a||!a.$)throw hs(xn.UNEXPECTED_ERROR);const u=vle(e,a.$),c=vV(l);return[Reflect.apply(u.t,u,[...yV(c)]),u]};return{created:(i,a)=>{const[l,u]=t(a);Kr&&(i.__i18nWatcher=Je(u.locale,()=>{a.instance&&a.instance.$forceUpdate()})),i.__composer=u,i.textContent=l},unmounted:i=>{Kr&&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=vV(a);i.textContent=Reflect.apply(l.t,l,[...yV(u)])}},getSSRProps:i=>{const[a]=t(i);return{textContent:a}}}}function vV(e){if(Tt(e))return{path:e};if(Pn(e)){if(!("path"in e))throw hs(xn.REQUIRED_VALUE,"path");return e}else throw hs(xn.INVALID_VALUE)}function yV(e){const{path:t,locale:n,args:o,choice:s,plural:r}=e,i={},a=o||{};return Tt(n)&&(i.locale=n),oo(s)&&(i.plural=s),oo(r)&&(i.plural=r),[t,a,i]}function wle(e,t,...n){const o=Pn(n[0])?n[0]:{};(Rn(o.globalInstall)?o.globalInstall:!0)&&([pV.name,"I18nT"].forEach(r=>e.component(r,pV)),[mV.name,"I18nN"].forEach(r=>e.component(r,mV)),[bV.name,"I18nD"].forEach(r=>e.component(r,bV))),e.directive("t",yle(t))}const Cle=_i("global-vue-i18n");function ble(e={}){const t=__VUE_I18N_LEGACY_API__&&Rn(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__;Q.env.NODE_ENV!=="production"&&t&&py(Uu(Ds.DEPRECATE_LEGACY_MODE));const n=Rn(e.globalInjection)?e.globalInjection:!0,o=new Map,[s,r]=Sle(e,t),i=_i(Q.env.NODE_ENV!=="production"?"vue-i18n":"");function a(d){return o.get(d)||null}function l(d,h){o.set(d,h)}function u(d){o.delete(d)}const c={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},install(d,...h){if(Q.env.NODE_ENV!=="production"&&(d.__VUE_I18N__=c),d.__VUE_I18N_SYMBOL__=i,d.provide(d.__VUE_I18N_SYMBOL__,c),Pn(h[0])){const g=h[0];c.__composerExtend=g.__composerExtend,c.__vueI18nExtend=g.__vueI18nExtend}let f=null;!t&&n&&(f=Ale(d,c.global)),__VUE_I18N_FULL_INSTALL__&&wle(d,c,...h),__VUE_I18N_LEGACY_API__&&t&&d.mixin(ple(r,r.__composer,c));const p=d.unmount;d.unmount=()=>{f&&f(),c.dispose(),p()},Q.env.NODE_ENV!=="production"&&nle(d,c).then(g=>{if(!g)throw hs(xn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const v=gy();if(t){const y=r;y.__enableEmitter&&y.__enableEmitter(v)}else{const y=r;y[_a]&&y[_a](v)}v.on("*",Wu)}).catch(()=>{Q.env.NODE_ENV!=="production"&&Ts(ZL[xn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN])})},get global(){return r},dispose(){s.stop()},__instances:o,__getInstance:a,__setInstance:l,__deleteInstance:u};return c}function z0(e={}){const t=Fd();if(t==null)throw hs(xn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw hs(xn.NOT_INSTALLED);const n=Ele(t),o=Rle(n),s=tV(t),r=_le(e,s);if(r==="global")return nV(o,e,s),o;if(r==="parent"){let l=wV(n,t,e.__useComponent);return l==null&&(Q.env.NODE_ENV!=="production"&&Ts(Uu(Ds.NOT_FOUND_PARENT_SCOPE)),l=o),l}if(r==="isolated"){if(n.mode!=="composition")throw hs(xn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const l=n,u=so({},e),c=wV(n,t);u.__root=c||o;const d=Sy(u);l.__composerExtend&&(d[kd]=l.__composerExtend(d));let h=null;if(Q.env.NODE_ENV!=="production"){h=gy();const p=d;p[_a]&&p[_a](h),h.on("*",Wu)}return Qw()&&eC(()=>{if(Q.env.NODE_ENV!=="production"){h&&h.off("*",Wu);const g=d;g[Gu]&&g[Gu]()}const p=d[kd];p&&(p(),delete d[kd])}),d}const i=n;let a=i.__getInstance(t);if(a==null){const l=so({},e);"__i18n"in s&&(l.__i18n=s.__i18n),o&&(l.__root=o),a=Sy(l),i.__composerExtend&&(a[kd]=i.__composerExtend(a)),Dle(i,t,a),i.__setInstance(t,a)}else Q.env.NODE_ENV!=="production"&&r==="local"&&Ts(Uu(Ds.DUPLICATE_USE_I18N_CALLING));return a}function Sle(e,t){const n=Jw(),o=__VUE_I18N_LEGACY_API__&&t?n.run(()=>U0(e)):n.run(()=>Sy(e));if(o==null)throw hs(xn.UNEXPECTED_ERROR);return[n,o]}function Ele(e){const t=En(e.isCE?Cle:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw hs(e.isCE?xn.NOT_INSTALLED_WITH_PROVIDE:xn.UNEXPECTED_ERROR);return t}function _le(e,t){return v0(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function Rle(e){return e.mode==="composition"?e.global:e.global.__composer}function wV(e,t,n=!1){let o=null;const s=t.root;let r=Tle(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[QL]&&(o=null))}if(o!=null||s===r)break;r=r.parent}return o}function Tle(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function Dle(e,t,n){let o=null;Jt(()=>{if(Q.env.NODE_ENV!=="production"){t.__VUE_I18N__=n,o=gy();const s=n;s[_a]&&s[_a](o),o.on("*",Wu)}},t),ou(()=>{const s=n;Q.env.NODE_ENV!=="production"&&(o&&o.off("*",Wu),s[Gu]&&s[Gu](),delete t.__VUE_I18N__),e.__deleteInstance(t);const r=s[kd];r&&(r(),delete s[kd])},t)}const xle=["locale","fallbackLocale","availableLocales"],CV=["t","rt","d","n","tm","te"];function Ale(e,t){const n=Object.create(null);return xle.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r)throw hs(xn.UNEXPECTED_ERROR);const i=fn(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,CV.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r||!r.value)throw hs(xn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,r)}),()=>{delete e.config.globalProperties.$i18n,CV.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}const bV=ot({name:"i18n-d",props:so({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},W0),setup(e,t){const n=e.i18n||z0({useScope:e.scope,__useComponent:!0});return gV(e,t,HL,(...o)=>n[N0](...o))}});if(Xae(),bae(Qie),Sae(vae),Eae(aae),Q.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=Sl();e.__INTLIFY__=!0,eae(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}Q.env.NODE_ENV;const SV={en:{}};function Ile(e){const t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):null}async function Ple(e,t=10,n=300){for(let o=0;o<t;o++){const s=Ile(e);if(s)return s;await new Promise(r=>setTimeout(r,n))}return null}async function kle(){const e=await Ple("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 Fle(){const e=await kle();return{...SV,en:{...SV.en,errorMessages:e}}}async function Ole(){return ble({legacy:!1,locale:"en",fallbackLocale:"en",messages:await Fle(),formatFallbackMessages:!0})}const Mle=async()=>{const e=await Ole();return jJ(e.global),e},EV=32,Nle=Math.round(EV*16/9),Lle="arbo-thumbnails",vp="thumbnails";let yp=null;const j0=new Map,K0=new Map;function _V(){return yp||(yp=new Promise((e,t)=>{const n=indexedDB.open(Lle,1);n.onupgradeneeded=()=>n.result.createObjectStore(vp),n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)}),yp.catch(()=>yp=null)),yp}async function Vle(e,t){try{const n=await _V();return await new Promise((o,s)=>{const r=n.transaction(vp,"readonly").objectStore(vp).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 Ble(e,t,n){try{const o=await _V();if(K0.get(e)!==t)return;await new Promise((s,r)=>{const i=o.transaction(vp,"readwrite");i.objectStore(vp).put({url:t,blob:n},e),i.oncomplete=()=>s(),i.onerror=()=>r(i.error)})}catch{}}function $le(e){return new Promise(t=>{new gP(e,{width:Nle,height:EV,resize:"cover",quality:.8,success:t,error:()=>t(e)})})}function Hle(e,t){K0.set(e,t);let n=j0.get(e);n||(n=new Map,j0.set(e,n));const o=n.get(t);if(o)return o;const s=(async()=>{const r=await Vle(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 $le(await i.blob());return await Ble(e,t,a),a})().finally(()=>{n.delete(t),n.size===0&&(j0.delete(e),K0.delete(e))});return n.set(t,s),s}const Gle="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==",Ule="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=",Wle=["src"],zle=["src"],jle=["src"],Kle=Et(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=Y(()=>t.value),o=Y(()=>t.id),s=Y(()=>t.disabled),r=Y(()=>t.readOnly),i=B("");let a=null;const l=B(!1),u=Y(()=>n.value==null||n.value===""),c=Y(()=>!u.value&&l.value),d=()=>{l.value=!0},h=()=>{a&&URL.revokeObjectURL(a),a=null},f=()=>{i.value="",h()},p=md(),{openSceneHub:g}=p,v=Y(()=>{const S=ln.getInstance().getItem("ws.code"),w=ln.getInstance().getItem("BASE_URL"),E=S||t.workspaceId;return Zo({type:"scene_hub",config:{baseDomain:w,ws_code:E,scene_id:String(t.id)}}).url}),y=S=>{try{if(S.ctrlKey||S.metaKey){window.open(v.value,"_blank");return}g(String(t.id))}catch{window.open(v.value,"_blank")}finally{b()}},b=()=>{var E,_,D,x,M,V;(E=t.params)==null||E.api.clearFocusedCell();const S=((D=(_=t.params)==null?void 0:_.column)==null?void 0:D.getColId())||"",w=((M=(x=t.params)==null?void 0:x.node)==null?void 0:M.rowIndex)||0;(V=t.params)==null||V.api.setFocusedCell(w,S)};return Je(()=>[o.value,n.value],async([S,w],E,_)=>{let D=!0;if(_(()=>{D=!1,h()}),l.value=!1,i.value="",!(S==null||S===""||!w))try{const x=await Hle(String(S),w);if(!D||S!==o.value||w!==n.value)return;a=URL.createObjectURL(x),i.value=a}catch(x){D&&S===o.value&&w===n.value&&(console.warn("Failed to load cached thumbnail; using the original URL.",x),i.value=w)}},{immediate:!0}),Vn(f),(S,w)=>(K(),he("div",{class:ce(["thumbnail-wrapper",{disabled:s.value,"read-only":r.value}]),onClick:y},[u.value?(K(),he("img",{key:0,src:L(Ule),alt:"No thumbnail"},null,8,Wle)):c.value?(K(),he("img",{key:1,src:L(Gle),alt:"Broken thumbnail"},null,8,zle)):i.value?(K(),he("img",{key:2,src:i.value,alt:"Thumbnail",onError:d},null,40,jle)):qe("",!0)],2))}}),[["__scopeId","data-v-1fd3dd73"]]),qle={class:"left-section"},Yle={class:"create-count"},Xle={class:"modified-template-options"},Zle=["onClick"],Jle={class:"setting-count"},Qle={class:"field-label"},eue={class:"field-label"},tue={class:"status-selection"},nue={class:"preview-section"},oue={key:0,class:"preview-list"},sue={key:0,class:"preview-more"},rue={key:1,style:{color:"var(--tessr-text-secondary, #6b6b6b)","align-items":"center",width:"100%","text-align":"center",display:"flex",flex:"1 1 0%"}},RV=1e3,TV=8,DV=7,iue=Et(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=qt,s=Do,r=B(null),i=B(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=B(null),c=B({}),d=(q,re)=>{c.value[q]=re instanceof HTMLElement?re:null},h=B(null),f=B("1"),p=e,g=B([]),v=Y(()=>{const q=y.value;let re=1;const R="9999.",H={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((pe,Se)=>{re++,H[pe]=`${R}${re}`}),q?(re++,H.statusSelect=`${R}${re}`,re++,H.firstField=`${R}${re}`,re++,H.stepField=`${R}${re}`):(delete H.firstField,delete H.stepField),H}),y=Y(()=>g.value.find(q=>typeof q!="string"&&(q.id==="number"||q.id==="letter"))),b=B("number"),S=B("up"),w=Po({...yi.number}),E=Po({...yi.number}),_=()=>{Object.assign(w,yi[b.value]),Object.assign(E,yi[b.value])};Je(y,q=>{if(!q)return;const re=q.id;re!==b.value&&(b.value=re,_()),S.value=q.direction==="down"?"down":"up"},{immediate:!0,flush:"sync"});const D=Y(()=>$O[S.value]),x=Y(()=>{const q=Number(f.value);return Number.isFinite(q)?Math.min(RV,Math.max(0,Math.floor(q))):0}),M=(q,re)=>{const R=UO(b.value,q,re);w[q]=R,Fv(q,R)&&(E[q]=R)},V=B(null),A=B(null),P=B(null),k=(q,re)=>{var H,ae,pe,Se;if(re.key==="Enter"||re.key==="Escape")return;if(re.key==="Tab"){re.preventDefault(),re.stopPropagation(),re.stopImmediatePropagation();const Ce=re.shiftKey;q=="first"&&(Ce?(H=c.value.letter_down)==null||H.focus():(ae=V.value)==null||ae.focus()),q=="step"&&(Ce?(pe=V.value)==null||pe.focus():(Se=i.value)==null||Se.focus());return}re.key.length===1&&!re.ctrlKey&&!re.metaKey&&!re.altKey&&!GO(b.value,q,re.key)&&re.preventDefault()},O=(q,re)=>{var Se;re.preventDefault();const R=re.target,H=((Se=re.clipboardData)==null?void 0:Se.getData("text/plain"))??"",ae=R.selectionStart??R.value.length,pe=R.selectionEnd??R.value.length;R.value=R.value.slice(0,ae)+H+R.value.slice(pe),M(q,R.value),R.value=w[q]},N=q=>{if(Fv(q,w[q]))return;const re=yi[b.value][q];w[q]=re,E[q]=re},$=Y(()=>y.value?pE({type:b.value,direction:S.value,first:E.first,step:E.step,count:x.value}):[]),W=Y(()=>g.value.every(q=>typeof q=="string"&&!q)),oe=Y(()=>x.value===0||W.value?[]:Array.from({length:x.value}).map((q,re)=>g.value.map(R=>typeof R=="string"?R:$.value[re]??"").join(""))),ie=Y(()=>oe.value.length>TV?oe.value.length-DV:0),ee=Y(()=>oe.value.length>TV?oe.value.slice(0,DV):oe.value),se=q=>{I.value=[q];const re=q.id.split("_")[0],R=q.id.split("_")[1],H=l[q.id],ae=r.value;if(!ae)return;const pe=Ce=>g.value.find(Z=>typeof Z!="string"&&Ce.includes(Z.id));if(re==="name"){pe(["name"])?ae.deleteTag("name"):ae.insertTag({id:re,text:H,direction:void 0});return}const Se=pe(["number","letter"]);if(Se){const Ce=Se.id===re,Z=Se.direction===R;if(Ce&&Z){ae.deleteTag(Se.id);return}ae.deleteTag(Se.id),ae.insertTag({id:re,text:H,direction:R})}else ae.insertTag({id:re,text:H,direction:R})},X=q=>z(q.id)?q.description.active:!!y.value&&q.description.switch?q.description.switch:q.description.inactive,I=B(null),z=q=>{const[re,R]=q.split("_");return g.value.some(H=>typeof H!="string"&&H.id===re&&H.direction===R)},ne=n,me=Y(()=>{const[q]=g.value;return g.value.length===1&&typeof q!="string"&&q.id==="name"});Y(()=>g.value.length===0||me.value);const xe=()=>{const q=g.value.map(re=>typeof re=="string"?{type:"text",value:re}:re.id==="name"?{type:"current_name"}:{type:"counter",value:w.first,direction:re.direction=="up"?"asc":"desc",format:re.id==="number"?"number":"letter",step:w.step});ne("changed",{data:q,count:x.value,template_flow_status_id:u.value||void 0})};Je([g,f,w,u],()=>{xe()},{deep:!0,immediate:!0}),Je(g,()=>{console.log("inputContent changed",g.value)}),t({reset:()=>{I.value=null,g.value=[]},focus:()=>{var q;(q=i.value)==null||q.focus()}}),Jt(()=>{var q,re;(q=r.value)==null||q.insertText(p.takeName),(re=r.value)==null||re.insertTag({id:"number",text:"1→9",direction:"up"}),ft(()=>{var R;(R=i.value)==null||R.focus()})});const j=q=>{var re,R;q.preventDefault(),q.stopPropagation(),(re=i.value)==null||re.blur(),(R=h.value)==null||R.focus()};return(q,re)=>(K(),he("div",{class:"bulk-rename-core",ref_key:"popupRef",ref:h,tabindex:"-1"},[be("div",qle,[be("div",Yle,[re[11]||(re[11]=be("span",null,"How many to create?",-1)),Ue(ye(L(dl),{modelValue:f.value,"onUpdate:modelValue":re[0]||(re[0]=R=>f.value=R),type:"number","max-value":RV,"max-decimal-char":0,"show-clear":!1,ref_key:"counterRef",ref:i,placeholder:"Enter count"},null,8,["modelValue"]),[[L(s),v.value.createCount]])]),Ue(ye(dN,{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:j},null,8,["modelValue"]),[[L(s),v.value.input]]),be("div",Xle,[(K(!0),he(Pt,null,Dn(e.options,R=>Ue((K(),he("button",{onClick:H=>se(R),ref_for:!0,ref:H=>d(R.id,H),key:R.id,class:ce([{active:z(R.id)},"template-option"])},[tt(at(R.name)+" ",1),R.icon?(K(),ze(L(gt),{key:0,src:R.icon,style:{transform:"rotate(90deg)"}},null,8,["src"])):qe("",!0)],10,Zle)),[[L(o),{content:X(R),bypassOverflowCheck:!0,delay:[300,0],interactive:!1,hideOnClick:!1,appendTo:"parent"}],[L(s),`${v.value[R.id]}`]])),128))]),be("div",Jle,[be("span",Qle,at(D.value.first),1),Ue((K(),ze(L(dl),{ref_key:"firstFieldRef",ref:A,"model-value":w.first,disabled:!y.value,"max-length":L(hE),onInput:re[2]||(re[2]=R=>M("first",R)),onKeydown:re[3]||(re[3]=R=>k("first",R)),onPaste:re[4]||(re[4]=R=>O("first",R)),onBlur:re[5]||(re[5]=R=>N("first")),"show-clear":!1},{clear:we(()=>[...re[12]||(re[12]=[be("div",null,null,-1)])]),_:1},8,["model-value","disabled","max-length"])),[[L(s),v.value.firstField]]),be("span",eue,at(D.value.step),1),Ue(ye(L(dl),{"model-value":w.step,disabled:!y.value,"max-length":L(fE),onInput:re[6]||(re[6]=R=>M("step",R)),onKeydown:re[7]||(re[7]=R=>k("step",R)),onPaste:re[8]||(re[8]=R=>O("step",R)),onBlur:re[9]||(re[9]=R=>N("step")),"show-clear":!1,ref_key:"fieldStepRef",ref:V},null,8,["model-value","disabled","max-length"]),[[L(s),v.value.stepField]])]),be("div",tue,[re[13]||(re[13]=be("span",null,"Status",-1)),ye(L(jN),{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,placeholder:"Select status"},null,8,["modelValue","get-status-func","workspace-id","id","focus-index"])])]),be("div",nue,[re[14]||(re[14]=be("span",{class:"preview-title"},"Preview",-1)),ee.value.length>0?(K(),he("ul",oue,[(K(!0),he(Pt,null,Dn(ee.value,(R,H)=>(K(),he("li",{key:H},[ye(fN,{text:R},null,8,["text"])]))),128)),ie.value>0?(K(),he("li",sue," … "+at(ie.value)+" more ",1)):qe("",!0)])):(K(),he("div",rue," Add a name or a counter to see a preview. "))])],512))}}),[["__scopeId","data-v-aaaf6342"]]),xV={text:ml,id:void 0,assignees:Ooe,status:CN,dateRange:Moe,isStarted:ml,isCompleted:ml,lastUpdated:ml,completedOn:ml,isDeleted:ml,isArchived:ml,isProcessing:ml,name:gN,options:uQ,metric:yN,__checkboxSelection:void 0,description:Vre,thumbnail:Kle},aue={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},lue={text:null,id:void 0,assignees:qO,status:uN,dateRange:Noe,isStarted:void 0,isCompleted:void 0,lastUpdated:void 0,completedOn:void 0,isDeleted:void 0,isArchived:void 0,isProcessing:void 0,name:gN,options:mN,metric:void 0,__checkboxSelection:void 0,description:void 0,thumbnail:void 0},uue={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]},cue={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}},due=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}},Md=e=>{if(e)return due(e)};function AV(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:Md((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 q0{constructor(){bn(this,"eGui");bn(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 IV=new Map;class wp{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=AV((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:Md(t.context),...a}}static resolveRendererComponent(t,n){let o;return t.includes("metric")&&xV.metric?Md(n)==="rating"?o=kre:o=yN:o=xV[t]??void 0,o}static resolveEditorComponent(t,n){const o=t.includes("metric");let s;const r=Md(n);return o&&["number","dropdown"].includes(r)?s=Wse:s=lue[t],s}static canEditField(t,n){var r;if(n.data===void 0)return!1;const o=AV((r=n.colDef)==null?void 0:r.field,n),s=aue[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]=uue[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=cue[o]??{},i=Md(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=>hue(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}`}}}bn(wp,"wrappers",null);const hue=(e,t)=>{var s;const n=(s=e.colDef)==null?void 0:s.field,o=`${n}-${e.node.rowIndex}`;return IV.set(o,(IV.get(o)??0)+1),n!=null&&n.includes("metric")?e.value===void 0?{component:q0,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:q0,params:{fullwidth:!0,width:"24px",height:"24px"}}:!e.data||e.value===void 0?{component:q0,params:{fullwidth:!1}}:t},fue=Et(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=B(null),s=Y(()=>{var a;return((a=n.component)==null?void 0:a.name)||"UnknownComponent"}),r=Y(()=>{var a;return((a=n.component)==null?void 0:a.default)||n.component}),i=Y(()=>({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)=>(K(),ze(_C(r.value),Kt(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 pue(e){return"stopEditing"in e}const gue=8,mue=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 PV(e){return class{constructor(){bn(this,"container");bn(this,"vNode",null);bn(this,"componentInstance",null);bn(this,"componsenExposed",null);bn(this,"params");bn(this,"isEditor",!1);bn(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=pue(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(fue,i),YC(this.vNode,this.container);const a=performance.now()-o;a>gue&&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():mue(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)&&Md(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{YC(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 Ey(e){return PV(e)}function kV(e){return PV(e)}var zu=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 Ra(e){return e==null||e===""?null:e}function pt(e){return e!=null&&e!==""}function Gn(e){return!pt(e)}function Y0(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Cp(e,t){const n=e?JSON.stringify(e):null,o=t?JSON.stringify(t):null;return n===o}function vue(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 yue=/[&<>"']/g,wue={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Nd(e){return(e==null?void 0:e.toString().toString())??null}function bp(e){var t;return((t=Nd(e))==null?void 0:t.replace(yue,n=>wue[n]))??null}function Di(e){return e.eRootDiv.getRootNode()}function jn(e){return Di(e).activeElement}function Vo(e){const{gos:t,eRootDiv:n}=e;let o=null;const s=t.get("getDocument");return s&&pt(s)?o=s():n&&(o=n.ownerDocument),o&&pt(o)?o:document}function FV(e){const t=jn(e);return t===null||t===Vo(e).body}function OV(e){return Vo(e).defaultView||window}function X0(e){let t=null,n=null;try{t=Vo(e).fullscreenElement}catch{}finally{t||(t=Di(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 Cue(e){const t=X0(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function bue(e){const t=X0(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function qr(e,t,n){n==null||typeof n=="string"&&n==""?MV(e,t):Tr(e,t,n)}function Tr(e,t,n){e.setAttribute(NV(t),n.toString())}function MV(e,t){e.removeAttribute(NV(t))}function NV(e){return`aria-${e}`}function xl(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Sue(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Eue(e){return e.getAttribute("aria-label")}function Ld(e,t){qr(e,"label",t)}function Sp(e,t){qr(e,"labelledby",t)}function LV(e,t){qr(e,"live",t)}function _ue(e,t){qr(e,"atomic",t)}function Rue(e,t){qr(e,"relevant",t)}function Tue(e,t){qr(e,"invalid",t)}function Due(e,t){qr(e,"disabled",t)}function VV(e,t){qr(e,"hidden",t)}function Z0(e,t){Tr(e,"expanded",t)}function xue(e,t){Tr(e,"setsize",t)}function Aue(e,t){Tr(e,"posinset",t)}function Iue(e,t){Tr(e,"multiselectable",t)}function Pue(e,t){Tr(e,"rowcount",t)}function _y(e,t){Tr(e,"rowindex",t)}function kue(e,t){Tr(e,"rowspan",t)}function Fue(e,t){Tr(e,"colcount",t)}function BV(e,t){Tr(e,"colindex",t)}function Oue(e,t){Tr(e,"colspan",t)}function Mue(e,t){Tr(e,"sort",t)}function Nue(e){MV(e,"sort")}function $V(e,t){qr(e,"selected",t)}function Lue(e,t){qr(e,"controls",t)}function Vue(e,t){Lue(e,t.id),Sp(t,e.id)}function HV(e,t){qr(e,"owns",t)}function Ry(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Bue="[tabindex], input, select, button, textarea, [href]",GV="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Ep(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(GV)?!1:xi(e)}function Un(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-hidden",!t),o||VV(e,!t)}function $ue(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-invisible",!t),o||VV(e,!t)}function _p(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 ju(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 Ku(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 J0(e){const t=Ku(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Rp(e){const t=Ku(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function UV(e){const{height:t,marginBottom:n,marginTop:o}=Ku(e);return Math.floor(t+n+o)}function Ty(e){const{width:t,marginLeft:n,marginRight:o}=Ku(e);return Math.floor(t+n+o)}function WV(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:o,borderRightWidth:s,borderBottomWidth:r}=Ku(e);return{top:t.top+(n||0),left:t.left+(o||0),right:t.right+(s||0),bottom:t.bottom+(r||0)}}function Dy(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function xy(e,t,n){n&&(t*=-1),e.scrollLeft=t}function zo(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function Yr(e){e!=null&&e.parentNode&&e.remove()}function zV(e){return!!e.offsetParent}function xi(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!zV(e)||window.getComputedStyle(e).visibility!=="visible")}function Q0(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function jV(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 KV(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 Hue(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Tp(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=Hue(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 Ay(e){return()=>{const t=e();return t?e_(t)||qV(t):!0}}function e_(e){return e.clientWidth<e.scrollWidth}function qV(e){return e.clientHeight<e.scrollHeight}function Iy(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Ai(e,t)}function Ai(e,t){t=t_(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Dp(e,t){t=t_(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function t_(e){return typeof e=="number"?`${e}px`:e}function n_(e){return e instanceof Node||e instanceof HTMLElement}function Ys(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function Al(e,t,n){const s=OV(e).ResizeObserver,r=s?new s(n):null;return r==null||r.observe(t),()=>r==null?void 0:r.disconnect()}function Ta(e,t){const n=OV(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var YV="data-ref",o_;function XV(){return o_??(o_=document.createTextNode(" ")),o_.cloneNode()}function xp(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(YV,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(XV()),l=!1),a.append(xp(u)),a.appendChild(XV())))}return a}var Gue=["touchstart","touchend","touchmove","touchcancel","scroll"],Uue=["wheel"],s_={},ZV=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof s_[n]=="boolean")return s_[n];const o=document.createElement(e[n]||"div");return n="on"+n,s_[n]=n in o}})();function Wue(e,t){return!t||!e?!1:jue(t).indexOf(e)>=0}function zue(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function jue(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():zue(t)}function Kue(e,t,n){const o=que(t);let s;o!=null&&(s={passive:o}),e.addEventListener(t,n,s)}var que=e=>{const t=Gue.includes(e),n=Uue.includes(e);if(t)return!0;if(n)return!1};function JV(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 Ap=(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 Ip(e,t){return e.gos.isElementInThisInstance(t.target)}function Yue(e,t,n){const s=e.getBoundingClientRect().height,r=Cue(n)-2,i=bue(n)-2;if(!e.offsetParent)return;const l=WV(e.offsetParent),{clientY:u,clientX:c}=t;let d=u-l.top-s/2,h=c-l.left-10;const f=Vo(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 Py=(e,...t)=>{for(const n of t){const[o,s,r,i]=n;o.addEventListener(s,r,i),e.push(n)}},r_=e=>{if(e){for(const[t,n,o,s]of e)t.removeEventListener(n,o,s);e.length=0}},Il=e=>{e.cancelable&&e.preventDefault()};function Xue(e,t){return t}function QV(e){return(e==null?void 0:e.getLocaleTextFunc())??Xue}function Zue(e,t,n,o){const s=t[n];return e.getLocaleTextFunc()(n,typeof s=="function"?s(o):s,o)}function Jue(e){return(t,n,o)=>e({key:t,defaultValue:n,variableValues:o})}function Que(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 Ii=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 zu),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(ece(e))e.__addEventListener(t,n),o=()=>(e.__removeEventListener(t,n),null);else{const s=tce(e);e instanceof HTMLElement?Kue(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 QV(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 ece(e){return e.__addEventListener!==void 0}function tce(e){return e.eventServiceType==="global"}var Ke=class extends Ii{},eB={};function i_(e,t){eB[t]||(e(),eB[t]=!0)}var nce={pending:!1,funcs:[]},oce={pending:!1,funcs:[]};function a_(e,t="setTimeout",n){const o=t==="raf"?oce:nce;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"?Ta(n,s):window.setTimeout(s,0)}function jo(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 tB(e,t){let n=0;return function(...o){const s=this,r=Date.now();r-n<t||(n=r,e.apply(s,o))}}function sce(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 nB=new Set(["__proto__","constructor","prototype"]);function rce(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=>!nB.has(o)))t(n,e[n])}}function fs(e,t,n=!0,o=!1){pt(t)&&rce(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)?fs(i,r,n,o):(n||r!==void 0)&&(e[s]=r))})}function oB(e){return typeof e=="object"&&e!==null}var l_=class Ba{static applyGlobalGridOptions(t){if(!Ba.gridOptions)return{...t};let n={};return fs(n,Ba.gridOptions,!0,!0),Ba.mergeStrategy==="deep"?fs(n,t,!0,!0):n={...n,...t},Ba.gridOptions.context&&(n.context=Ba.gridOptions.context),t.context&&(Ba.mergeStrategy==="deep"&&n.context&&fs(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(Ba.mergeStrategy==="deep"){const o=ice(t);if(o&&typeof o=="object"&&typeof n=="object")return Ba.applyGlobalGridOptions({[t]:n})[t]}return n}};l_.gridOptions=void 0,l_.mergeStrategy="shallow";var u_=l_;function ice(e){var t;return(t=u_.gridOptions)==null?void 0:t[e]}var ace={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},sB="https://www.ag-grid.com";function Pl(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function Pp(e,...t){i_(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Vd(e,...t){i_(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var rB=new Set,ky={},Bd={},Fy,iB=!1,aB=!1,lce=!1;function uce(e){const[t,n]=e.version.split(".")||[],[o,s]=Fy.split(".")||[];return t===o&&n===s}function cce(e){var o;Fy||(Fy=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?uce(e)||Vd(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Fy}.`)):Vd(t(`'${e.moduleName}' is incompatible.`));const n=(o=e.validate)==null?void 0:o.call(e);n&&!n.isValid&&Vd(`${n.message}`)}function kp(e,t,n=!1){n||(iB=!0),cce(e);const o=e.rowModels??["all"];rB.add(e);let s;t!==void 0?(aB=!0,Bd[t]===void 0&&(Bd[t]={}),s=Bd[t]):s=ky;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)kp(r,t,n)}function dce(e){delete Bd[e]}function c_(e,t,n){const o=s=>{var r,i,a;return!!((r=ky[s])!=null&&r[e])||!!((a=(i=Bd[t])==null?void 0:i[s])!=null&&a[e])};return o(n)||o("all")}function d_(){return aB}function hce(e,t){const n=Bd[e]??{};return[...Object.values(ky.all??{}),...Object.values(n.all??{}),...Object.values(ky[t]??{}),...Object.values(n[t]??{})]}function fce(){return new Set(rB)}function pce(){return iB}function lB(){return lce}var gce=class{static register(e){kp(e,void 0)}static registerModules(e){for(const t of e)kp(t,void 0)}},dt="34.3.1",uB=2e3,cB=100,dB="_version_",Oy=null,$d=`${sB}/javascript-data-grid`;function mce(e){Oy=e}function vce(e){$d=e}function hB(e,t,n){return(Oy==null?void 0:Oy(e,t))??[bce(e,t,n)]}function h_(e,t,n,o,s){e(`${o?"warning":"error"} #${t}`,...hB(t,n,s))}function yce(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 wce(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=yce(e)),t}function My(e){return e===void 0?"undefined":e===null?"null":e}function f_(e,t){return`${e}?${t.toString()}`}function Cce(e,t,n){const o=Array.from(t.entries()).sort((r,i)=>i[1].length-r[1].length);let s=f_(e,t);for(const[r,i]of o){if(r===dB)continue;const a=s.length-n;if(a<=0)break;const l="...",u=a+l.length,c=i.length-u>cB?i.slice(0,i.length-u)+l:i.slice(0,cB)+l;t.set(r,c),s=f_(e,t)}return s}function fB(e,t){const n=new URLSearchParams;if(n.append(dB,dt),t)for(const r of Object.keys(t))n.append(r,wce(t[r]));const o=`${$d}/errors/${e}`,s=f_(o,n);return s.length<=uB?s:Cce(o,n,uB)}var bce=(e,t,n)=>{const o=fB(e,t),s=`${n?n+`
192
+ About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[Ds.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",[Ds.DUPLICATE_USE_I18N_CALLING]:"Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component.",[Ds.IGNORE_UNSAFE_LOCALE]:"Ignore '{locale}' locale: it is a property name of Object.prototype"};function Uu(e,...t){return fy(Zae[e],...t)}let eV=null;{const e=Sl().__VUE_INSTANCE_SETTERS__;On(e)&&e.push(t=>{eV=t})}function Dl(e){return QN(e)?(Q.env.NODE_ENV!=="production"&&Ts(Uu(Ds.IGNORE_UNSAFE_LOCALE,{locale:e})),!0):!1}function mp(e){if(!rn(e)||El(e))return e;for(const t in e)if(Rr(e,t))if(!t.includes("."))rn(e[t])&&mp(e[t]);else{const n=t.split("."),o=n.length-1;let s=e,r=!1;for(let a=0;a<o;a++){if(n[a]==="__proto__")throw new Error(`unsafe key: ${n[a]}`);if(n[a]in s||(s[n[a]]=_n()),!rn(s[n[a]])){Q.env.NODE_ENV!=="production"&&Ts(Uu(Ds.IGNORE_OBJ_FLATTEN,{key:n[a]})),r=!0;break}if(El(s[n[a]])&&(vL.includes(n[a+1])||n[a+1]==="cacheKey")){r=!0;break}s=s[n[a]]}r||(s[n[o]]=e[t],delete e[t]);const i=s[n[o]];rn(i)&&mp(i)}return e}function V0(e,t){const{messages:n,__i18n:o,messageResolver:s,flatJson:r}=t,i=Pn(n)?n:On(o)?_n():{[e]:_n()};if(On(o)&&o.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:l,resource:u}=a;if(l){if(Dl(l))return;i[l]=No(i,l)||_n(),my(u,i[l])}else my(u,i)}else Tt(a)&&my(JSON.parse(a),i)}),s==null&&r)for(const a in i)Rr(i,a)&&mp(i[a]);return i}function tV(e){return e.type}function nV(e,t,n){let o=rn(t.messages)?t.messages:_n();"__i18nGlobal"in n&&(o=V0(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const s=Object.keys(o);s.length&&s.forEach(r=>{e.mergeLocaleMessage(r,o[r])});{if(rn(t.datetimeFormats)){const r=Object.keys(t.datetimeFormats);r.length&&r.forEach(i=>{e.mergeDateTimeFormat(i,t.datetimeFormats[i])})}if(rn(t.numberFormats)){const r=Object.keys(t.numberFormats);r.length&&r.forEach(i=>{e.mergeNumberFormat(i,t.numberFormats[i])})}}}function oV(e){return ye(Wa,null,e,0)}function Fd(){return eV??Go()}const sV="__INTLIFY_META__",rV=()=>[],Jae=()=>!1;let iV=0;function aV(e){return(t,n,o,s)=>e(n,o,Fd()||void 0,s)}const Qae=()=>{const e=Fd();let t=null;return e&&(t=tV(e)[sV])?{[sV]:t}:null};function Sy(e={}){const{__root:t,__injectWithOption:n}=e,o=t===void 0,s=e.flatJson,r=Kr?B:xg;let i=Rn(e.inheritLocale)?e.inheritLocale:!0;const a=r(t&&i?t.locale.value:Tt(e.locale)?e.locale:gp),l=r(t&&i?t.fallbackLocale.value:Tt(e.fallbackLocale)||On(e.fallbackLocale)||Pn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a.value),u=r(V0(a.value,e)),c=r(Pn(e.datetimeFormats)?e.datetimeFormats:{[a.value]:{}}),d=r(Pn(e.numberFormats)?e.numberFormats:{[a.value]:{}});let h=t?t.missingWarn:Rn(e.missingWarn)||$u(e.missingWarn)?e.missingWarn:!0,f=t?t.fallbackWarn:Rn(e.fallbackWarn)||$u(e.fallbackWarn)?e.fallbackWarn:!0,p=t?t.fallbackRoot:Rn(e.fallbackRoot)?e.fallbackRoot:!0,g=!!e.fallbackFormat,v=In(e.missing)?e.missing:null,y=In(e.missing)?aV(e.missing):null,b=In(e.postTranslation)?e.postTranslation:null,S=t?t.warnHtmlMessage:Rn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,w=!!e.escapeParameter;const E=t?t.modifiers:Pn(e.modifiers)?e.modifiers:{};let _=e.pluralRules||t&&t.pluralRules,D;D=(()=>{o&&xL(null);const Te={version:Yae,locale:a.value,fallbackLocale:l.value,messages:u.value,modifiers:E,pluralRules:_,missing:y===null?void 0:y,missingWarn:h,fallbackWarn:f,fallbackFormat:g,unresolving:!0,postTranslation:b===null?void 0:b,warnHtmlMessage:S,escapeParameter:w,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};Te.datetimeFormats=c.value,Te.numberFormats=d.value;const He=Dae(Te);return o&&xL(He),He})(),Cy(D,a.value,l.value);function M(){return[a.value,l.value,u.value,c.value,d.value]}const V=Y({get:()=>a.value,set:Te=>{D.locale=Te,a.value=Te}});function A(Te){o||(D.fallbackContext=Tae());try{return Te()}finally{o||(D.fallbackContext=void 0)}}function P(Te){A(()=>Cy(D,a.value,Te))}const k=Y({get:()=>l.value,set:Te=>{l.value=Te,D.fallbackLocale=l.value,P(l.value)}}),O=Y(()=>u.value),N=Y(()=>c.value),$=Y(()=>d.value);function W(){return In(b)?b:null}function oe(Te){b=Te,D.postTranslation=Te}function ie(){return v}function ee(Te){Te!==null&&(y=aV(Te)),v=Te,D.missing=y}function se(Te,He){return Te!=="translate"||!He.resolvedMessage}const X=(Te,He,_t,Vt,Yt,Mn)=>{M();let Ne;try{Q.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,Ne=A(()=>Te(D))}finally{Q.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__}if(_t!=="translate exists"&&oo(Ne)&&Ne===wy||_t==="translate exists"&&!Ne){const[Ve,Rt]=He();if(Q.env.NODE_ENV!=="production"&&t&&Tt(Ve)&&se(_t,Rt)&&(p&&(A0(f,Ve)||IL(h,Ve))&&Ts(Uu(Ds.FALLBACK_TO_ROOT,{key:Ve,type:_t})),Q.env.NODE_ENV!=="production")){const{__v_emitter:jt}=D;jt&&p&&jt.emit("fallback",{type:_t,key:Ve,to:"global",groupId:bl(_t,Ve)})}return t&&p?Vt(t):Yt(Ve)}else{if(Mn(Ne))return Ne;throw hs(xn.UNEXPECTED_RETURN_TYPE)}};function I(...Te){return X(He=>Reflect.apply(KL,null,[He,...Te]),()=>F0(...Te),"translate",He=>Reflect.apply(He.t,He,[...Te]),He=>He,He=>Tt(He))}function z(...Te){const[He,_t,Vt]=Te;if(Vt&&!rn(Vt))throw hs(xn.INVALID_ARGUMENT);return I(He,_t,so({resolvedMessage:!0},Vt||{}))}function ne(...Te){return X(He=>Reflect.apply($L,null,[He,...Te]),()=>I0(...Te),"datetime format",He=>Reflect.apply(He.d,He,[...Te]),()=>Id,He=>Tt(He)||On(He))}function me(...Te){return X(He=>Reflect.apply(UL,null,[He,...Te]),()=>P0(...Te),"number format",He=>Reflect.apply(He.n,He,[...Te]),()=>Id,He=>Tt(He)||On(He))}function xe(Te){return Te.map(He=>Tt(He)||oo(He)||Rn(He)?oV(String(He)):He)}const j={normalize:xe,interpolate:Te=>Te,type:"vnode"};function q(...Te){return X(He=>{let _t;const Vt=He;try{Vt.processor=j,_t=Reflect.apply(KL,null,[Vt,...Te])}finally{Vt.processor=null}return _t},()=>F0(...Te),"translate",He=>He[M0](...Te),He=>[oV(He)],He=>On(He))}function re(...Te){return X(He=>Reflect.apply(UL,null,[He,...Te]),()=>P0(...Te),"number format",He=>He[L0](...Te),rV,He=>Tt(He)||On(He))}function R(...Te){return X(He=>Reflect.apply($L,null,[He,...Te]),()=>I0(...Te),"datetime format",He=>He[N0](...Te),rV,He=>Tt(He)||On(He))}function H(Te){_=Te,D.pluralRules=_}function ae(Te,He){const _t=Z(Te),Vt=D.messageResolver(_t,He);return Vt===null?No(_t,He):Vt}function pe(Te,He){return X(()=>{if(!Te)return!1;const _t=Tt(He)?He:a.value,Vt=Tt(He)?[_t]:D.localeFallbacker(D,l.value,_t);for(let Yt=0;Yt<Vt.length;Yt++)if(by(ae(Vt[Yt],Te)))return!0;return!1},()=>[Te],"translate exists",_t=>Reflect.apply(_t.te,_t,[Te,He]),Jae,_t=>Rn(_t))}function Se(Te){let He=null;const _t=D.localeFallbacker(D,l.value,a.value);for(let Vt=0;Vt<_t.length;Vt++){const Yt=ae(_t[Vt],Te);if(Yt!=null){He=Yt;break}}return He}function Ce(Te){const He=Se(Te);return He??(t?t.tm(Te)||{}:{})}function Z(Te){return No(u.value,Te)||{}}function U(Te,He){Dl(Te)||(s&&mp(He),u.value[Te]=He,D.messages=u.value)}function te(Te,He){Dl(Te)||(u.value[Te]=No(u.value,Te)||{},s&&mp(He),my(He,u.value[Te]),D.messages=u.value)}function le(Te){return No(c.value,Te)||{}}function Ye(Te,He){Dl(Te)||(c.value[Te]=He,D.datetimeFormats=c.value,GL(D,Te,He))}function Be(Te,He){Dl(Te)||(c.value[Te]=so(No(c.value,Te)||{},He),D.datetimeFormats=c.value,GL(D,Te,He))}function je(Te){return No(d.value,Te)||{}}function Oe(Te,He){Dl(Te)||(d.value[Te]=He,D.numberFormats=d.value,zL(D,Te,He))}function nt(Te,He){Dl(Te)||(d.value[Te]=so(No(d.value,Te)||{},He),D.numberFormats=d.value,zL(D,Te,He))}iV++,Je(l,()=>P(l.value),{deep:!0,flush:"sync"}),t&&Kr&&(Je(t.locale,Te=>{i&&(a.value=Te,D.locale=Te,Cy(D,a.value,l.value))}),Je(t.fallbackLocale,Te=>{i&&(l.value=Te,D.fallbackLocale=l.value,Cy(D,a.value,l.value))}));const Ze={id:iV,locale:V,fallbackLocale:k,get inheritLocale(){return i},set inheritLocale(Te){i=Te,Te&&t&&(V.value=t.locale.value,k.value=t.fallbackLocale.value)},get availableLocales(){return Object.keys(u.value).sort()},messages:O,get modifiers(){return E},get pluralRules(){return _||{}},get isGlobal(){return o},get missingWarn(){return h},set missingWarn(Te){h=Te,D.missingWarn=h},get fallbackWarn(){return f},set fallbackWarn(Te){f=Te,D.fallbackWarn=f},get fallbackRoot(){return p},set fallbackRoot(Te){p=Te},get fallbackFormat(){return g},set fallbackFormat(Te){g=Te,D.fallbackFormat=g},get warnHtmlMessage(){return S},set warnHtmlMessage(Te){S=Te,D.warnHtmlMessage=Te},get escapeParameter(){return w},set escapeParameter(Te){w=Te,D.escapeParameter=Te},t:I,getLocaleMessage:Z,setLocaleMessage:U,mergeLocaleMessage:te,getPostTranslationHandler:W,setPostTranslationHandler:oe,getMissingHandler:ie,setMissingHandler:ee,[JL]:H};return Ze.datetimeFormats=N,Ze.numberFormats=$,Ze.rt=z,Ze.te=pe,Ze.tm=Ce,Ze.d=ne,Ze.n=me,Ze.getDateTimeFormat=le,Ze.setDateTimeFormat=Ye,Ze.mergeDateTimeFormat=Be,Ze.getNumberFormat=je,Ze.setNumberFormat=Oe,Ze.mergeNumberFormat=nt,Ze[QL]=n,Ze[M0]=q,Ze[N0]=R,Ze[L0]=re,Q.env.NODE_ENV!=="production"&&(Ze[_a]=Te=>{D.__v_emitter=Te},Ze[Gu]=()=>{D.__v_emitter=void 0}),Ze}const lV="vue-i18n: composer properties",B0={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},ele={"vue-i18n-resource-inspector":"Search for scopes ..."},tle={"vue-i18n-timeline":16764185};let $0;async function nle(e,t){return new Promise((n,o)=>{try{qae({id:"vue-devtools-plugin-vue-i18n",label:B0["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:[lV],app:e},s=>{$0=s,s.on.visitComponentTree(({componentInstance:i,treeNode:a})=>{ole(i,a,t)}),s.on.inspectComponent(({componentInstance:i,instanceData:a})=>{i.__VUE_I18N__&&a&&(t.mode==="legacy"?i.__VUE_I18N__!==t.global.__composer&&cV(a,i.__VUE_I18N__):cV(a,i.__VUE_I18N__))}),s.addInspector({id:"vue-i18n-resource-inspector",label:B0["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:ele["vue-i18n-resource-inspector"]}),s.on.getInspectorTree(i=>{i.app===e&&i.inspectorId==="vue-i18n-resource-inspector"&&lle(i,t)});const r=new Map;s.on.getInspectorState(async i=>{if(i.app===e&&i.inspectorId==="vue-i18n-resource-inspector")if(s.unhighlightElement(),cle(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=ule(i.nodeId,t);a&&s.highlightElement(a)}}),s.on.editInspectorState(i=>{i.app===e&&i.inspectorId==="vue-i18n-resource-inspector"&&hle(i,t)}),s.addTimelineLayer({id:"vue-i18n-timeline",label:B0["vue-i18n-timeline"],color:tle["vue-i18n-timeline"]}),n(!0)})}catch(s){console.error(s),o(!1)}})}function uV(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function ole(e,t,n){const o=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.__VUE_I18N__&&e.__VUE_I18N__!==o){const s={label:`i18n (${uV(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(s)}}function cV(e,t){const n=lV;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:H0(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 H0(e){const t={};return Object.keys(e).forEach(n=>{const o=e[n];In(o)&&"source"in o?t[n]=ale(o):El(o)&&o.loc&&o.loc.source?t[n]=o.loc.source:rn(o)?t[n]=H0(o):t[n]=o}),t}const sle={"<":"&lt;",">":"&gt;",'"':"&quot;","&":"&amp;"};function rle(e){return e.replace(/[<>"&]/g,ile)}function ile(e){return sle[e]||e}function ale(e){return{_custom:{type:"function",display:`<span>ƒ</span> ${e.source?`("${rle(e.source)}")`:"(?)"}`}}}function lle(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:`${uV(o)} Scope`})}}function ule(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 dV(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 cle(e,t){const n=dV(e.nodeId,t);return n&&(e.state=dle(n)),null}function dle(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:H0(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 Wu(e,t){if($0){let n;t&&"groupId"in t&&(n=t.groupId,delete t.groupId),$0.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 hle(e,t){const n=dV(e.nodeId,t);if(n){const[o]=e.path;o==="locale"&&Tt(e.state.value)?n.locale.value=e.state.value:o==="fallbackLocale"&&(Tt(e.state.value)||On(e.state.value)||rn(e.state.value))?n.fallbackLocale.value=e.state.value:o==="inheritLocale"&&Rn(e.state.value)&&(n.inheritLocale=e.state.value)}}const G0=new WeakMap;function Od(e){if(!$u(e))return!e;let t=G0.get(e);return t||(t=new RegExp(`^(?![\\s\\S]*(?:${e.source}))`,e.flags.replace(/[gy]/g,"")),G0.set(e,t),G0.set(t,e)),t}function fle(e){const t=Tt(e.locale)?e.locale:gp,n=Tt(e.fallbackLocale)||On(e.fallbackLocale)||Pn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=In(e.missing)?e.missing:void 0,s=Rn(e.silentTranslationWarn)||$u(e.silentTranslationWarn)?Od(e.silentTranslationWarn):!0,r=Rn(e.silentFallbackWarn)||$u(e.silentFallbackWarn)?Od(e.silentFallbackWarn):!0,i=Rn(e.fallbackRoot)?e.fallbackRoot:!0,a=!!e.formatFallbackMessages,l=Pn(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=In(e.postTranslation)?e.postTranslation:void 0,d=Tt(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,h=!!e.escapeParameterHtml,f=Rn(e.sync)?e.sync:!0;let p=e.messages;if(Pn(e.sharedMessages)){const E=e.sharedMessages;p=Object.keys(E).reduce((D,x)=>{if(Dl(x))return D;const M=No(D,x)||(D[x]={});return so(M,E[x]),D},p||{})}const{__i18n:g,__root:v,__injectWithOption:y}=e,b=e.datetimeFormats,S=e.numberFormats,w=e.flatJson;return{locale:t,fallbackLocale:n,messages:p,flatJson:w,datetimeFormats:b,numberFormats:S,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,__i18n:g,__root:v,__injectWithOption:y}}function U0(e={}){const t=Sy(fle(e)),{__extender:n}=e,o={id:t.id,get locale(){return t.locale.value},set locale(s){t.locale.value=s},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(s){t.fallbackLocale.value=s},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(s){t.setMissingHandler(s)},get silentTranslationWarn(){return Od(t.missingWarn)},set silentTranslationWarn(s){t.missingWarn=Od(s)},get silentFallbackWarn(){return Od(t.fallbackWarn)},set silentFallbackWarn(s){t.fallbackWarn=Od(s)},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(s){t.fallbackFormat=s},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(s){t.setPostTranslationHandler(s)},get sync(){return t.inheritLocale},set sync(s){t.inheritLocale=s},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){t.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(s){t.escapeParameter=s},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...s){return Reflect.apply(t.t,t,[...s])},rt(...s){return Reflect.apply(t.rt,t,[...s])},te(s,r){return t.te(s,r)},tm(s){return t.tm(s)},getLocaleMessage(s){return t.getLocaleMessage(s)},setLocaleMessage(s,r){t.setLocaleMessage(s,r)},mergeLocaleMessage(s,r){t.mergeLocaleMessage(s,r)},d(...s){return Reflect.apply(t.d,t,[...s])},getDateTimeFormat(s){return t.getDateTimeFormat(s)},setDateTimeFormat(s,r){t.setDateTimeFormat(s,r)},mergeDateTimeFormat(s,r){t.mergeDateTimeFormat(s,r)},n(...s){return Reflect.apply(t.n,t,[...s])},getNumberFormat(s){return t.getNumberFormat(s)},setNumberFormat(s,r){t.setNumberFormat(s,r)},mergeNumberFormat(s,r){t.mergeNumberFormat(s,r)}};return o.__extender=n,Q.env.NODE_ENV!=="production"&&(o.__enableEmitter=s=>{const r=t;r[_a]&&r[_a](s)},o.__disableEmitter=()=>{const s=t;s[Gu]&&s[Gu]()}),o}function ple(e,t,n){return{beforeCreate(){const o=Fd();if(!o)throw hs(xn.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const r=so({},s.i18n);if(s.__i18n&&(r.__i18n=s.__i18n),r.__root=t,this===this.$root)this.$i18n=hV(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=U0(r);const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=hV(e,s);else{this.$i18n=U0({__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&&nV(t,s,s),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...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(Q.env.NODE_ENV!=="production"&&this.$i18n){const o=Fd();if(!o)return;const s=this.$i18n;o.__VUE_I18N__=s.__composer;const r=this.__v_emitter=gy();s.__enableEmitter&&s.__enableEmitter(r),r.on("*",Wu)}},unmounted(){const o=Fd();if(!o)throw hs(xn.UNEXPECTED_ERROR);const s=this.$i18n;Q.env.NODE_ENV!=="production"&&o.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Wu),delete this.__v_emitter),s&&(s.__disableEmitter&&s.__disableEmitter(),delete o.__VUE_I18N__)),s&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s!=null&&s.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(o),delete this.$i18n)}}}function hV(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[JL](t.pluralizationRules||e.pluralizationRules);const n=V0(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 W0={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function gle({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},_n())}function fV(){return Pt}const pV=ot({name:"i18n-t",props:so({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>oo(e)||!isNaN(e)}},W0),setup(e,t){const{slots:n,attrs:o}=t,s=e.i18n||z0({useScope:e.scope,__useComponent:!0});return()=>{const r=()=>{const l=Object.keys(n).filter(d=>d[0]!=="_"),u=_n();e.locale&&(u.locale=e.locale),e.plural!==void 0&&(u.plural=Tt(e.plural)?+e.plural:e.plural);const c=gle(t,l);return s[M0](e.keypath,c,u)},i=so(_n(),o),a=Tt(e.tag)||rn(e.tag)?e.tag:fV();return rn(a)?za(a,i,{default:r}):za(a,i,r())}}});function mle(e){return On(e)&&!Tt(e[0])}function gV(e,t,n,o){const{slots:s,attrs:r}=t;return()=>{const i=()=>{const u={part:!0};let c=_n();e.locale&&(u.locale=e.locale),Tt(e.format)?u.key=e.format:rn(e.format)&&(Tt(e.format.key)&&(u.key=e.format.key),c=Object.keys(e.format).reduce((f,p)=>n.includes(p)?so(_n(),f,{[p]:e.format[p]}):f,_n()));const d=o(e.value,u,c);let h=[u.key];return On(d)?h=d.map((f,p)=>{const g=s[f.type],v=g?g({[f.type]:f.value,index:p,parts:d}):[f.value];return mle(v)&&(v[0].key=`${f.type}-${p}`),v}):Tt(d)&&(h=[d]),h},a=so(_n(),r),l=Tt(e.tag)||rn(e.tag)?e.tag:fV();return rn(l)?za(l,a,{default:i}):za(l,a,i())}}const mV=ot({name:"i18n-n",props:so({value:{type:Number,required:!0},format:{type:[String,Object]}},W0),setup(e,t){const n=e.i18n||z0({useScope:e.scope,__useComponent:!0});return gV(e,t,WL,(...o)=>n[L0](...o))}});function vle(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 yle(e){const t=i=>{Q.env.NODE_ENV!=="production"&&py(Uu(Ds.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));const{instance:a,value:l}=i;if(!a||!a.$)throw hs(xn.UNEXPECTED_ERROR);const u=vle(e,a.$),c=vV(l);return[Reflect.apply(u.t,u,[...yV(c)]),u]};return{created:(i,a)=>{const[l,u]=t(a);Kr&&(i.__i18nWatcher=Je(u.locale,()=>{a.instance&&a.instance.$forceUpdate()})),i.__composer=u,i.textContent=l},unmounted:i=>{Kr&&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=vV(a);i.textContent=Reflect.apply(l.t,l,[...yV(u)])}},getSSRProps:i=>{const[a]=t(i);return{textContent:a}}}}function vV(e){if(Tt(e))return{path:e};if(Pn(e)){if(!("path"in e))throw hs(xn.REQUIRED_VALUE,"path");return e}else throw hs(xn.INVALID_VALUE)}function yV(e){const{path:t,locale:n,args:o,choice:s,plural:r}=e,i={},a=o||{};return Tt(n)&&(i.locale=n),oo(s)&&(i.plural=s),oo(r)&&(i.plural=r),[t,a,i]}function wle(e,t,...n){const o=Pn(n[0])?n[0]:{};(Rn(o.globalInstall)?o.globalInstall:!0)&&([pV.name,"I18nT"].forEach(r=>e.component(r,pV)),[mV.name,"I18nN"].forEach(r=>e.component(r,mV)),[bV.name,"I18nD"].forEach(r=>e.component(r,bV))),e.directive("t",yle(t))}const Cle=_i("global-vue-i18n");function ble(e={}){const t=__VUE_I18N_LEGACY_API__&&Rn(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__;Q.env.NODE_ENV!=="production"&&t&&py(Uu(Ds.DEPRECATE_LEGACY_MODE));const n=Rn(e.globalInjection)?e.globalInjection:!0,o=new Map,[s,r]=Sle(e,t),i=_i(Q.env.NODE_ENV!=="production"?"vue-i18n":"");function a(d){return o.get(d)||null}function l(d,h){o.set(d,h)}function u(d){o.delete(d)}const c={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},install(d,...h){if(Q.env.NODE_ENV!=="production"&&(d.__VUE_I18N__=c),d.__VUE_I18N_SYMBOL__=i,d.provide(d.__VUE_I18N_SYMBOL__,c),Pn(h[0])){const g=h[0];c.__composerExtend=g.__composerExtend,c.__vueI18nExtend=g.__vueI18nExtend}let f=null;!t&&n&&(f=Ale(d,c.global)),__VUE_I18N_FULL_INSTALL__&&wle(d,c,...h),__VUE_I18N_LEGACY_API__&&t&&d.mixin(ple(r,r.__composer,c));const p=d.unmount;d.unmount=()=>{f&&f(),c.dispose(),p()},Q.env.NODE_ENV!=="production"&&nle(d,c).then(g=>{if(!g)throw hs(xn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const v=gy();if(t){const y=r;y.__enableEmitter&&y.__enableEmitter(v)}else{const y=r;y[_a]&&y[_a](v)}v.on("*",Wu)}).catch(()=>{Q.env.NODE_ENV!=="production"&&Ts(ZL[xn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN])})},get global(){return r},dispose(){s.stop()},__instances:o,__getInstance:a,__setInstance:l,__deleteInstance:u};return c}function z0(e={}){const t=Fd();if(t==null)throw hs(xn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw hs(xn.NOT_INSTALLED);const n=Ele(t),o=Rle(n),s=tV(t),r=_le(e,s);if(r==="global")return nV(o,e,s),o;if(r==="parent"){let l=wV(n,t,e.__useComponent);return l==null&&(Q.env.NODE_ENV!=="production"&&Ts(Uu(Ds.NOT_FOUND_PARENT_SCOPE)),l=o),l}if(r==="isolated"){if(n.mode!=="composition")throw hs(xn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const l=n,u=so({},e),c=wV(n,t);u.__root=c||o;const d=Sy(u);l.__composerExtend&&(d[kd]=l.__composerExtend(d));let h=null;if(Q.env.NODE_ENV!=="production"){h=gy();const p=d;p[_a]&&p[_a](h),h.on("*",Wu)}return Qw()&&eC(()=>{if(Q.env.NODE_ENV!=="production"){h&&h.off("*",Wu);const g=d;g[Gu]&&g[Gu]()}const p=d[kd];p&&(p(),delete d[kd])}),d}const i=n;let a=i.__getInstance(t);if(a==null){const l=so({},e);"__i18n"in s&&(l.__i18n=s.__i18n),o&&(l.__root=o),a=Sy(l),i.__composerExtend&&(a[kd]=i.__composerExtend(a)),Dle(i,t,a),i.__setInstance(t,a)}else Q.env.NODE_ENV!=="production"&&r==="local"&&Ts(Uu(Ds.DUPLICATE_USE_I18N_CALLING));return a}function Sle(e,t){const n=Jw(),o=__VUE_I18N_LEGACY_API__&&t?n.run(()=>U0(e)):n.run(()=>Sy(e));if(o==null)throw hs(xn.UNEXPECTED_ERROR);return[n,o]}function Ele(e){const t=En(e.isCE?Cle:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw hs(e.isCE?xn.NOT_INSTALLED_WITH_PROVIDE:xn.UNEXPECTED_ERROR);return t}function _le(e,t){return v0(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function Rle(e){return e.mode==="composition"?e.global:e.global.__composer}function wV(e,t,n=!1){let o=null;const s=t.root;let r=Tle(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[QL]&&(o=null))}if(o!=null||s===r)break;r=r.parent}return o}function Tle(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function Dle(e,t,n){let o=null;Jt(()=>{if(Q.env.NODE_ENV!=="production"){t.__VUE_I18N__=n,o=gy();const s=n;s[_a]&&s[_a](o),o.on("*",Wu)}},t),ou(()=>{const s=n;Q.env.NODE_ENV!=="production"&&(o&&o.off("*",Wu),s[Gu]&&s[Gu](),delete t.__VUE_I18N__),e.__deleteInstance(t);const r=s[kd];r&&(r(),delete s[kd])},t)}const xle=["locale","fallbackLocale","availableLocales"],CV=["t","rt","d","n","tm","te"];function Ale(e,t){const n=Object.create(null);return xle.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r)throw hs(xn.UNEXPECTED_ERROR);const i=fn(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,CV.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r||!r.value)throw hs(xn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,r)}),()=>{delete e.config.globalProperties.$i18n,CV.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}const bV=ot({name:"i18n-d",props:so({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},W0),setup(e,t){const n=e.i18n||z0({useScope:e.scope,__useComponent:!0});return gV(e,t,HL,(...o)=>n[N0](...o))}});if(Xae(),bae(Qie),Sae(vae),Eae(aae),Q.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=Sl();e.__INTLIFY__=!0,eae(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}Q.env.NODE_ENV;const SV={en:{}};function Ile(e){const t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):null}async function Ple(e,t=10,n=300){for(let o=0;o<t;o++){const s=Ile(e);if(s)return s;await new Promise(r=>setTimeout(r,n))}return null}async function kle(){const e=await Ple("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 Fle(){const e=await kle();return{...SV,en:{...SV.en,errorMessages:e}}}async function Ole(){return ble({legacy:!1,locale:"en",fallbackLocale:"en",messages:await Fle(),formatFallbackMessages:!0})}const Mle=async()=>{const e=await Ole();return jJ(e.global),e},EV=32,Nle=Math.round(EV*16/9),Lle="arbo-thumbnails",vp="thumbnails";let yp=null;const j0=new Map,K0=new Map;function _V(){return yp||(yp=new Promise((e,t)=>{const n=indexedDB.open(Lle,1);n.onupgradeneeded=()=>n.result.createObjectStore(vp),n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)}),yp.catch(()=>yp=null)),yp}async function Vle(e,t){try{const n=await _V();return await new Promise((o,s)=>{const r=n.transaction(vp,"readonly").objectStore(vp).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 Ble(e,t,n){try{const o=await _V();if(K0.get(e)!==t)return;await new Promise((s,r)=>{const i=o.transaction(vp,"readwrite");i.objectStore(vp).put({url:t,blob:n},e),i.oncomplete=()=>s(),i.onerror=()=>r(i.error)})}catch{}}function $le(e){return new Promise(t=>{new gP(e,{width:Nle,height:EV,resize:"cover",quality:.8,success:t,error:()=>t(e)})})}function Hle(e,t){K0.set(e,t);let n=j0.get(e);n||(n=new Map,j0.set(e,n));const o=n.get(t);if(o)return o;const s=(async()=>{const r=await Vle(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 $le(await i.blob());return await Ble(e,t,a),a})().finally(()=>{n.delete(t),n.size===0&&(j0.delete(e),K0.delete(e))});return n.set(t,s),s}const Gle="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==",Ule="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=",Wle=["src"],zle=["src"],jle=["src"],Kle=Et(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=Y(()=>t.value),o=Y(()=>t.id),s=Y(()=>t.disabled),r=Y(()=>t.readOnly),i=B("");let a=null;const l=B(!1),u=Y(()=>n.value==null||n.value===""),c=Y(()=>!u.value&&l.value),d=()=>{l.value=!0},h=()=>{a&&URL.revokeObjectURL(a),a=null},f=()=>{i.value="",h()},p=md(),{openSceneHub:g}=p,v=Y(()=>{const S=ln.getInstance().getItem("ws.code"),w=ln.getInstance().getItem("BASE_URL"),E=S||t.workspaceId;return Zo({type:"scene_hub",config:{baseDomain:w,ws_code:E,scene_id:String(t.id)}}).url}),y=S=>{try{if(S.ctrlKey||S.metaKey){window.open(v.value,"_blank");return}g(String(t.id))}catch{window.open(v.value,"_blank")}finally{b()}},b=()=>{var E,_,D,x,M,V;(E=t.params)==null||E.api.clearFocusedCell();const S=((D=(_=t.params)==null?void 0:_.column)==null?void 0:D.getColId())||"",w=((M=(x=t.params)==null?void 0:x.node)==null?void 0:M.rowIndex)||0;(V=t.params)==null||V.api.setFocusedCell(w,S)};return Je(()=>[o.value,n.value],async([S,w],E,_)=>{let D=!0;if(_(()=>{D=!1,h()}),l.value=!1,i.value="",!(S==null||S===""||!w))try{const x=await Hle(String(S),w);if(!D||S!==o.value||w!==n.value)return;a=URL.createObjectURL(x),i.value=a}catch(x){D&&S===o.value&&w===n.value&&(console.warn("Failed to load cached thumbnail; using the original URL.",x),i.value=w)}},{immediate:!0}),Vn(f),(S,w)=>(K(),he("div",{class:ce(["thumbnail-wrapper",{disabled:s.value,"read-only":r.value}]),onClick:y},[u.value?(K(),he("img",{key:0,src:L(Ule),alt:"No thumbnail"},null,8,Wle)):c.value?(K(),he("img",{key:1,src:L(Gle),alt:"Broken thumbnail"},null,8,zle)):i.value?(K(),he("img",{key:2,src:i.value,alt:"Thumbnail",onError:d},null,40,jle)):qe("",!0)],2))}}),[["__scopeId","data-v-1fd3dd73"]]),qle={class:"left-section"},Yle={class:"create-count"},Xle={class:"modified-template-options"},Zle=["onClick"],Jle={class:"setting-count"},Qle={class:"field-label"},eue={class:"field-label"},tue={class:"status-selection"},nue={class:"preview-section"},oue={key:0,class:"preview-list"},sue={key:0,class:"preview-more"},rue={key:1,style:{color:"var(--tessr-text-secondary, #6b6b6b)","align-items":"center",width:"100%","text-align":"center",display:"flex",flex:"1 1 0%"}},RV=1e3,TV=8,DV=7,iue=Et(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=qt,s=Do,r=B(null),i=B(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=B(null),c=B({}),d=(q,re)=>{c.value[q]=re instanceof HTMLElement?re:null},h=B(null),f=B("1"),p=e,g=B([]),v=Y(()=>{const q=y.value;let re=1;const R="9999.",H={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((pe,Se)=>{re++,H[pe]=`${R}${re}`}),q?(re++,H.statusSelect=`${R}${re}`,re++,H.firstField=`${R}${re}`,re++,H.stepField=`${R}${re}`):(delete H.firstField,delete H.stepField),H}),y=Y(()=>g.value.find(q=>typeof q!="string"&&(q.id==="number"||q.id==="letter"))),b=B("number"),S=B("up"),w=Po({...yi.number}),E=Po({...yi.number}),_=()=>{Object.assign(w,yi[b.value]),Object.assign(E,yi[b.value])};Je(y,q=>{if(!q)return;const re=q.id;re!==b.value&&(b.value=re,_()),S.value=q.direction==="down"?"down":"up"},{immediate:!0,flush:"sync"});const D=Y(()=>$O[S.value]),x=Y(()=>{const q=Number(f.value);return Number.isFinite(q)?Math.min(RV,Math.max(0,Math.floor(q))):0}),M=(q,re)=>{const R=UO(b.value,q,re);w[q]=R,Fv(q,R)&&(E[q]=R)},V=B(null),A=B(null),P=B(null),k=(q,re)=>{var H,ae,pe,Se;if(re.key==="Enter"||re.key==="Escape")return;if(re.key==="Tab"){re.preventDefault(),re.stopPropagation(),re.stopImmediatePropagation();const Ce=re.shiftKey;q=="first"&&(Ce?(H=c.value.letter_down)==null||H.focus():(ae=V.value)==null||ae.focus()),q=="step"&&(Ce?(pe=V.value)==null||pe.focus():(Se=i.value)==null||Se.focus());return}re.key.length===1&&!re.ctrlKey&&!re.metaKey&&!re.altKey&&!GO(b.value,q,re.key)&&re.preventDefault()},O=(q,re)=>{var Se;re.preventDefault();const R=re.target,H=((Se=re.clipboardData)==null?void 0:Se.getData("text/plain"))??"",ae=R.selectionStart??R.value.length,pe=R.selectionEnd??R.value.length;R.value=R.value.slice(0,ae)+H+R.value.slice(pe),M(q,R.value),R.value=w[q]},N=q=>{if(Fv(q,w[q]))return;const re=yi[b.value][q];w[q]=re,E[q]=re},$=Y(()=>y.value?pE({type:b.value,direction:S.value,first:E.first,step:E.step,count:x.value}):[]),W=Y(()=>g.value.every(q=>typeof q=="string"&&!q)),oe=Y(()=>x.value===0||W.value?[]:Array.from({length:x.value}).map((q,re)=>g.value.map(R=>typeof R=="string"?R:$.value[re]??"").join(""))),ie=Y(()=>oe.value.length>TV?oe.value.length-DV:0),ee=Y(()=>oe.value.length>TV?oe.value.slice(0,DV):oe.value),se=q=>{I.value=[q];const re=q.id.split("_")[0],R=q.id.split("_")[1],H=l[q.id],ae=r.value;if(!ae)return;const pe=Ce=>g.value.find(Z=>typeof Z!="string"&&Ce.includes(Z.id));if(re==="name"){pe(["name"])?ae.deleteTag("name"):ae.insertTag({id:re,text:H,direction:void 0});return}const Se=pe(["number","letter"]);if(Se){const Ce=Se.id===re,Z=Se.direction===R;if(Ce&&Z){ae.deleteTag(Se.id);return}ae.deleteTag(Se.id),ae.insertTag({id:re,text:H,direction:R})}else ae.insertTag({id:re,text:H,direction:R})},X=q=>z(q.id)?q.description.active:!!y.value&&q.description.switch?q.description.switch:q.description.inactive,I=B(null),z=q=>{const[re,R]=q.split("_");return g.value.some(H=>typeof H!="string"&&H.id===re&&H.direction===R)},ne=n,me=Y(()=>{const[q]=g.value;return g.value.length===1&&typeof q!="string"&&q.id==="name"});Y(()=>g.value.length===0||me.value);const xe=()=>{const q=g.value.map(re=>typeof re=="string"?{type:"text",value:re}:re.id==="name"?{type:"current_name"}:{type:"counter",value:w.first,direction:re.direction=="up"?"asc":"desc",format:re.id==="number"?"number":"letter",step:w.step});ne("changed",{data:q,count:x.value,template_flow_status_id:u.value||void 0})};Je([g,f,w,u],()=>{xe()},{deep:!0,immediate:!0}),Je(g,()=>{console.log("inputContent changed",g.value)}),t({reset:()=>{I.value=null,g.value=[]},focus:()=>{var q;(q=i.value)==null||q.focus()}}),Jt(()=>{var q,re;(q=r.value)==null||q.insertText(p.takeName),(re=r.value)==null||re.insertTag({id:"number",text:"1→9",direction:"up"}),ft(()=>{var R;(R=i.value)==null||R.focus()})});const j=q=>{var re,R;q.preventDefault(),q.stopPropagation(),(re=i.value)==null||re.blur(),(R=h.value)==null||R.focus()};return(q,re)=>(K(),he("div",{class:"bulk-rename-core",ref_key:"popupRef",ref:h,tabindex:"-1"},[be("div",qle,[be("div",Yle,[re[11]||(re[11]=be("span",null,"How many to create?",-1)),Ue(ye(L(dl),{modelValue:f.value,"onUpdate:modelValue":re[0]||(re[0]=R=>f.value=R),type:"number","max-value":RV,"max-decimal-char":0,"show-clear":!1,ref_key:"counterRef",ref:i,placeholder:"Enter count"},null,8,["modelValue"]),[[L(s),v.value.createCount]])]),Ue(ye(dN,{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:j},null,8,["modelValue"]),[[L(s),v.value.input]]),be("div",Xle,[(K(!0),he(Pt,null,Dn(e.options,R=>Ue((K(),he("button",{onClick:H=>se(R),ref_for:!0,ref:H=>d(R.id,H),key:R.id,class:ce([{active:z(R.id)},"template-option"])},[tt(at(R.name)+" ",1),R.icon?(K(),ze(L(gt),{key:0,src:R.icon,style:{transform:"rotate(90deg)"}},null,8,["src"])):qe("",!0)],10,Zle)),[[L(o),{content:X(R),bypassOverflowCheck:!0,delay:[300,0],interactive:!1,hideOnClick:!1,appendTo:"parent"}],[L(s),`${v.value[R.id]}`]])),128))]),be("div",Jle,[be("span",Qle,at(D.value.first),1),Ue((K(),ze(L(dl),{ref_key:"firstFieldRef",ref:A,"model-value":w.first,disabled:!y.value,"max-length":L(hE),onInput:re[2]||(re[2]=R=>M("first",R)),onKeydown:re[3]||(re[3]=R=>k("first",R)),onPaste:re[4]||(re[4]=R=>O("first",R)),onBlur:re[5]||(re[5]=R=>N("first")),"show-clear":!1},{clear:we(()=>[...re[12]||(re[12]=[be("div",null,null,-1)])]),_:1},8,["model-value","disabled","max-length"])),[[L(s),v.value.firstField]]),be("span",eue,at(D.value.step),1),Ue(ye(L(dl),{"model-value":w.step,disabled:!y.value,"max-length":L(fE),onInput:re[6]||(re[6]=R=>M("step",R)),onKeydown:re[7]||(re[7]=R=>k("step",R)),onPaste:re[8]||(re[8]=R=>O("step",R)),onBlur:re[9]||(re[9]=R=>N("step")),"show-clear":!1,ref_key:"fieldStepRef",ref:V},null,8,["model-value","disabled","max-length"]),[[L(s),v.value.stepField]])]),be("div",tue,[re[13]||(re[13]=be("span",null,"Status",-1)),ye(L(jN),{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,placeholder:"Select status"},null,8,["modelValue","get-status-func","workspace-id","id","focus-index"])])]),be("div",nue,[re[14]||(re[14]=be("span",{class:"preview-title"},"Preview",-1)),ee.value.length>0?(K(),he("ul",oue,[(K(!0),he(Pt,null,Dn(ee.value,(R,H)=>(K(),he("li",{key:H},[ye(fN,{text:R},null,8,["text"])]))),128)),ie.value>0?(K(),he("li",sue," … "+at(ie.value)+" more ",1)):qe("",!0)])):(K(),he("div",rue," Add a name or a counter to see a preview. "))])],512))}}),[["__scopeId","data-v-6a32b4fc"]]),xV={text:ml,id:void 0,assignees:Ooe,status:CN,dateRange:Moe,isStarted:ml,isCompleted:ml,lastUpdated:ml,completedOn:ml,isDeleted:ml,isArchived:ml,isProcessing:ml,name:gN,options:uQ,metric:yN,__checkboxSelection:void 0,description:Vre,thumbnail:Kle},aue={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},lue={text:null,id:void 0,assignees:qO,status:uN,dateRange:Noe,isStarted:void 0,isCompleted:void 0,lastUpdated:void 0,completedOn:void 0,isDeleted:void 0,isArchived:void 0,isProcessing:void 0,name:gN,options:mN,metric:void 0,__checkboxSelection:void 0,description:void 0,thumbnail:void 0},uue={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]},cue={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}},due=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}},Md=e=>{if(e)return due(e)};function AV(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:Md((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 q0{constructor(){bn(this,"eGui");bn(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 IV=new Map;class wp{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=AV((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:Md(t.context),...a}}static resolveRendererComponent(t,n){let o;return t.includes("metric")&&xV.metric?Md(n)==="rating"?o=kre:o=yN:o=xV[t]??void 0,o}static resolveEditorComponent(t,n){const o=t.includes("metric");let s;const r=Md(n);return o&&["number","dropdown"].includes(r)?s=Wse:s=lue[t],s}static canEditField(t,n){var r;if(n.data===void 0)return!1;const o=AV((r=n.colDef)==null?void 0:r.field,n),s=aue[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]=uue[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=cue[o]??{},i=Md(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=>hue(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}`}}}bn(wp,"wrappers",null);const hue=(e,t)=>{var s;const n=(s=e.colDef)==null?void 0:s.field,o=`${n}-${e.node.rowIndex}`;return IV.set(o,(IV.get(o)??0)+1),n!=null&&n.includes("metric")?e.value===void 0?{component:q0,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:q0,params:{fullwidth:!0,width:"24px",height:"24px"}}:!e.data||e.value===void 0?{component:q0,params:{fullwidth:!1}}:t},fue=Et(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=B(null),s=Y(()=>{var a;return((a=n.component)==null?void 0:a.name)||"UnknownComponent"}),r=Y(()=>{var a;return((a=n.component)==null?void 0:a.default)||n.component}),i=Y(()=>({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)=>(K(),ze(_C(r.value),Kt(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 pue(e){return"stopEditing"in e}const gue=8,mue=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 PV(e){return class{constructor(){bn(this,"container");bn(this,"vNode",null);bn(this,"componentInstance",null);bn(this,"componsenExposed",null);bn(this,"params");bn(this,"isEditor",!1);bn(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=pue(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(fue,i),YC(this.vNode,this.container);const a=performance.now()-o;a>gue&&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():mue(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)&&Md(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{YC(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 Ey(e){return PV(e)}function kV(e){return PV(e)}var zu=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 Ra(e){return e==null||e===""?null:e}function pt(e){return e!=null&&e!==""}function Gn(e){return!pt(e)}function Y0(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Cp(e,t){const n=e?JSON.stringify(e):null,o=t?JSON.stringify(t):null;return n===o}function vue(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 yue=/[&<>"']/g,wue={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Nd(e){return(e==null?void 0:e.toString().toString())??null}function bp(e){var t;return((t=Nd(e))==null?void 0:t.replace(yue,n=>wue[n]))??null}function Di(e){return e.eRootDiv.getRootNode()}function jn(e){return Di(e).activeElement}function Vo(e){const{gos:t,eRootDiv:n}=e;let o=null;const s=t.get("getDocument");return s&&pt(s)?o=s():n&&(o=n.ownerDocument),o&&pt(o)?o:document}function FV(e){const t=jn(e);return t===null||t===Vo(e).body}function OV(e){return Vo(e).defaultView||window}function X0(e){let t=null,n=null;try{t=Vo(e).fullscreenElement}catch{}finally{t||(t=Di(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 Cue(e){const t=X0(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function bue(e){const t=X0(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function qr(e,t,n){n==null||typeof n=="string"&&n==""?MV(e,t):Tr(e,t,n)}function Tr(e,t,n){e.setAttribute(NV(t),n.toString())}function MV(e,t){e.removeAttribute(NV(t))}function NV(e){return`aria-${e}`}function xl(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Sue(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Eue(e){return e.getAttribute("aria-label")}function Ld(e,t){qr(e,"label",t)}function Sp(e,t){qr(e,"labelledby",t)}function LV(e,t){qr(e,"live",t)}function _ue(e,t){qr(e,"atomic",t)}function Rue(e,t){qr(e,"relevant",t)}function Tue(e,t){qr(e,"invalid",t)}function Due(e,t){qr(e,"disabled",t)}function VV(e,t){qr(e,"hidden",t)}function Z0(e,t){Tr(e,"expanded",t)}function xue(e,t){Tr(e,"setsize",t)}function Aue(e,t){Tr(e,"posinset",t)}function Iue(e,t){Tr(e,"multiselectable",t)}function Pue(e,t){Tr(e,"rowcount",t)}function _y(e,t){Tr(e,"rowindex",t)}function kue(e,t){Tr(e,"rowspan",t)}function Fue(e,t){Tr(e,"colcount",t)}function BV(e,t){Tr(e,"colindex",t)}function Oue(e,t){Tr(e,"colspan",t)}function Mue(e,t){Tr(e,"sort",t)}function Nue(e){MV(e,"sort")}function $V(e,t){qr(e,"selected",t)}function Lue(e,t){qr(e,"controls",t)}function Vue(e,t){Lue(e,t.id),Sp(t,e.id)}function HV(e,t){qr(e,"owns",t)}function Ry(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Bue="[tabindex], input, select, button, textarea, [href]",GV="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Ep(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(GV)?!1:xi(e)}function Un(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-hidden",!t),o||VV(e,!t)}function $ue(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-invisible",!t),o||VV(e,!t)}function _p(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 ju(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 Ku(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 J0(e){const t=Ku(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Rp(e){const t=Ku(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function UV(e){const{height:t,marginBottom:n,marginTop:o}=Ku(e);return Math.floor(t+n+o)}function Ty(e){const{width:t,marginLeft:n,marginRight:o}=Ku(e);return Math.floor(t+n+o)}function WV(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:o,borderRightWidth:s,borderBottomWidth:r}=Ku(e);return{top:t.top+(n||0),left:t.left+(o||0),right:t.right+(s||0),bottom:t.bottom+(r||0)}}function Dy(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function xy(e,t,n){n&&(t*=-1),e.scrollLeft=t}function zo(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function Yr(e){e!=null&&e.parentNode&&e.remove()}function zV(e){return!!e.offsetParent}function xi(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!zV(e)||window.getComputedStyle(e).visibility!=="visible")}function Q0(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function jV(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 KV(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 Hue(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Tp(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=Hue(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 Ay(e){return()=>{const t=e();return t?e_(t)||qV(t):!0}}function e_(e){return e.clientWidth<e.scrollWidth}function qV(e){return e.clientHeight<e.scrollHeight}function Iy(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Ai(e,t)}function Ai(e,t){t=t_(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Dp(e,t){t=t_(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function t_(e){return typeof e=="number"?`${e}px`:e}function n_(e){return e instanceof Node||e instanceof HTMLElement}function Ys(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function Al(e,t,n){const s=OV(e).ResizeObserver,r=s?new s(n):null;return r==null||r.observe(t),()=>r==null?void 0:r.disconnect()}function Ta(e,t){const n=OV(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var YV="data-ref",o_;function XV(){return o_??(o_=document.createTextNode(" ")),o_.cloneNode()}function xp(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(YV,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(XV()),l=!1),a.append(xp(u)),a.appendChild(XV())))}return a}var Gue=["touchstart","touchend","touchmove","touchcancel","scroll"],Uue=["wheel"],s_={},ZV=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof s_[n]=="boolean")return s_[n];const o=document.createElement(e[n]||"div");return n="on"+n,s_[n]=n in o}})();function Wue(e,t){return!t||!e?!1:jue(t).indexOf(e)>=0}function zue(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function jue(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():zue(t)}function Kue(e,t,n){const o=que(t);let s;o!=null&&(s={passive:o}),e.addEventListener(t,n,s)}var que=e=>{const t=Gue.includes(e),n=Uue.includes(e);if(t)return!0;if(n)return!1};function JV(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 Ap=(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 Ip(e,t){return e.gos.isElementInThisInstance(t.target)}function Yue(e,t,n){const s=e.getBoundingClientRect().height,r=Cue(n)-2,i=bue(n)-2;if(!e.offsetParent)return;const l=WV(e.offsetParent),{clientY:u,clientX:c}=t;let d=u-l.top-s/2,h=c-l.left-10;const f=Vo(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 Py=(e,...t)=>{for(const n of t){const[o,s,r,i]=n;o.addEventListener(s,r,i),e.push(n)}},r_=e=>{if(e){for(const[t,n,o,s]of e)t.removeEventListener(n,o,s);e.length=0}},Il=e=>{e.cancelable&&e.preventDefault()};function Xue(e,t){return t}function QV(e){return(e==null?void 0:e.getLocaleTextFunc())??Xue}function Zue(e,t,n,o){const s=t[n];return e.getLocaleTextFunc()(n,typeof s=="function"?s(o):s,o)}function Jue(e){return(t,n,o)=>e({key:t,defaultValue:n,variableValues:o})}function Que(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 Ii=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 zu),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(ece(e))e.__addEventListener(t,n),o=()=>(e.__removeEventListener(t,n),null);else{const s=tce(e);e instanceof HTMLElement?Kue(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 QV(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 ece(e){return e.__addEventListener!==void 0}function tce(e){return e.eventServiceType==="global"}var Ke=class extends Ii{},eB={};function i_(e,t){eB[t]||(e(),eB[t]=!0)}var nce={pending:!1,funcs:[]},oce={pending:!1,funcs:[]};function a_(e,t="setTimeout",n){const o=t==="raf"?oce:nce;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"?Ta(n,s):window.setTimeout(s,0)}function jo(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 tB(e,t){let n=0;return function(...o){const s=this,r=Date.now();r-n<t||(n=r,e.apply(s,o))}}function sce(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 nB=new Set(["__proto__","constructor","prototype"]);function rce(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=>!nB.has(o)))t(n,e[n])}}function fs(e,t,n=!0,o=!1){pt(t)&&rce(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)?fs(i,r,n,o):(n||r!==void 0)&&(e[s]=r))})}function oB(e){return typeof e=="object"&&e!==null}var l_=class Ba{static applyGlobalGridOptions(t){if(!Ba.gridOptions)return{...t};let n={};return fs(n,Ba.gridOptions,!0,!0),Ba.mergeStrategy==="deep"?fs(n,t,!0,!0):n={...n,...t},Ba.gridOptions.context&&(n.context=Ba.gridOptions.context),t.context&&(Ba.mergeStrategy==="deep"&&n.context&&fs(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(Ba.mergeStrategy==="deep"){const o=ice(t);if(o&&typeof o=="object"&&typeof n=="object")return Ba.applyGlobalGridOptions({[t]:n})[t]}return n}};l_.gridOptions=void 0,l_.mergeStrategy="shallow";var u_=l_;function ice(e){var t;return(t=u_.gridOptions)==null?void 0:t[e]}var ace={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},sB="https://www.ag-grid.com";function Pl(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function Pp(e,...t){i_(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Vd(e,...t){i_(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var rB=new Set,ky={},Bd={},Fy,iB=!1,aB=!1,lce=!1;function uce(e){const[t,n]=e.version.split(".")||[],[o,s]=Fy.split(".")||[];return t===o&&n===s}function cce(e){var o;Fy||(Fy=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?uce(e)||Vd(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Fy}.`)):Vd(t(`'${e.moduleName}' is incompatible.`));const n=(o=e.validate)==null?void 0:o.call(e);n&&!n.isValid&&Vd(`${n.message}`)}function kp(e,t,n=!1){n||(iB=!0),cce(e);const o=e.rowModels??["all"];rB.add(e);let s;t!==void 0?(aB=!0,Bd[t]===void 0&&(Bd[t]={}),s=Bd[t]):s=ky;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)kp(r,t,n)}function dce(e){delete Bd[e]}function c_(e,t,n){const o=s=>{var r,i,a;return!!((r=ky[s])!=null&&r[e])||!!((a=(i=Bd[t])==null?void 0:i[s])!=null&&a[e])};return o(n)||o("all")}function d_(){return aB}function hce(e,t){const n=Bd[e]??{};return[...Object.values(ky.all??{}),...Object.values(n.all??{}),...Object.values(ky[t]??{}),...Object.values(n[t]??{})]}function fce(){return new Set(rB)}function pce(){return iB}function lB(){return lce}var gce=class{static register(e){kp(e,void 0)}static registerModules(e){for(const t of e)kp(t,void 0)}},dt="34.3.1",uB=2e3,cB=100,dB="_version_",Oy=null,$d=`${sB}/javascript-data-grid`;function mce(e){Oy=e}function vce(e){$d=e}function hB(e,t,n){return(Oy==null?void 0:Oy(e,t))??[bce(e,t,n)]}function h_(e,t,n,o,s){e(`${o?"warning":"error"} #${t}`,...hB(t,n,s))}function yce(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 wce(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=yce(e)),t}function My(e){return e===void 0?"undefined":e===null?"null":e}function f_(e,t){return`${e}?${t.toString()}`}function Cce(e,t,n){const o=Array.from(t.entries()).sort((r,i)=>i[1].length-r[1].length);let s=f_(e,t);for(const[r,i]of o){if(r===dB)continue;const a=s.length-n;if(a<=0)break;const l="...",u=a+l.length,c=i.length-u>cB?i.slice(0,i.length-u)+l:i.slice(0,cB)+l;t.set(r,c),s=f_(e,t)}return s}function fB(e,t){const n=new URLSearchParams;if(n.append(dB,dt),t)for(const r of Object.keys(t))n.append(r,wce(t[r]));const o=`${$d}/errors/${e}`,s=f_(o,n);return s.length<=uB?s:Cce(o,n,uB)}var bce=(e,t,n)=>{const o=fB(e,t),s=`${n?n+`
193
193
  `:""}Visit ${o}`;return lB()?s:`${s}${n?"":`
194
194
  Alternatively register the ValidationModule to see the full message in the console.`}`};function Qe(...e){h_(Pp,e[0],e[1],!0)}function Cn(...e){h_(Vd,e[0],e[1],!1)}function Fp(e,t,n){h_(Vd,e,t,!1,n)}function Sce(e,t){const n=t[0];return`error #${n} `+hB(n,t[1],e).join(" ")}function Pi(...e){return Sce(void 0,e)}function pB(e,t){return e.get("rowModelType")===t}function ro(e,t){return pB(e,"clientSide")}function Hd(e,t){return pB(e,"serverSide")}function Ko(e,t){return e.get("domLayout")===t}function qu(e){return Vy(e)!==void 0}function gB(e){return typeof e.get("getRowHeight")=="function"}function Ece(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function kl(e,t,n=!1,o){const{gos:s,environment:r}=e;if(o==null&&(o=r.getDefaultRowHeight()),gB(s)){if(n)return{height:o,estimated:!0};const l={node:t,data:t.data},u=s.getCallback("getRowHeight")(l);if(p_(u))return u===0&&Qe(23),{height:Math.max(1,u),estimated:!1}}if(t.detail&&s.get("masterDetail"))return _ce(s);const i=s.get("rowHeight");return{height:i&&p_(i)?i:o,estimated:!1}}function _ce(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return p_(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function Yu(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:(Qe(24),t.getDefaultRowHeight())}function p_(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function mB(e,t,n){const o=t[e.getDomDataKey()];return o?o[n]:void 0}function Xu(e,t,n,o){const s=e.getDomDataKey();let r=t[s];Gn(r)&&(r={},t[s]=r),r[n]=o}function Gd(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function vB(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Ko(e,"print"))}function ki(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function g_(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 wB(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function CB(e,t,n){return!!t.group&&!t.footer&&wB(e,n)}function Ud(e){const t=e.getCallback("getRowId");return t===void 0?t:n=>{let o=t(n);return typeof o!="string"&&(i_(()=>Qe(25,{id:o}),"getRowIdString"),o=String(o)),o}}function Rce(e,t){const n=e.get("groupHideParentOfSingleChild");return!!(n===!0||n==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function Tce(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function Wd(e){return(e==null?void 0:e.checkboxes)??!0}function Ny(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function Ly(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function m_(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function Dce(e){return typeof e.get("rowSelection")!="string"}function Da(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function bB(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 xce(e){const t=bB(e);return t===!0||t==="enableSelection"}function Ace(e){const t=bB(e);return t===!0||t==="enableDeselection"}function v_(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function Vy(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 Op(e){return Vy(e)==="multiRow"}function Ice(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function By(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 SB(e,t=!0){const n=e.get("rowSelection");return typeof n!="object"?t?"all":void 0:n.mode==="multiRow"?n.selectAll:"all"}function Pce(e){const t=e.get("rowSelection");return typeof t=="string"?!1:(t==null?void 0:t.mode)==="multiRow"?t.ctrlASelectsRows??!1:!1}function Mp(e){const t=By(e);return t==="descendants"||t==="filteredDescendants"}function EB(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function kce(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function Xs(e){return e.get("columnMenu")==="legacy"}function Fce(e){return!Xs(e)}function Oce(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function Nt(e,t){return e.addCommon(t)}function _B({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var Mce={resizable:!0,sortable:!0},Nce=0;function RB(){return Nce++}function Fl(e){return e instanceof Zu}var Zu=class extends Ke{constructor(e,t,n,o){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=n,this.primary=o,this.isColumn=!0,this.instanceId=RB(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new zu,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=bp(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=pt(t)&&t.includes(".")&&!o,this.tooltipFieldContainsDots=pt(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 Nt(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]??Mce[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 Nt(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 pt(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 Qe(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 Nt(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&&fs(o,n),this.colEventSvc.dispatchEvent(o)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function os(e){return e instanceof $y}var $y=class extends Ke{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=RB(),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)Fl(t)?e(t):os(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)Fl(t)?e.push(t):os(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)os(o)&&o.isPadding()?t(o.children):e.push(o)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},Lce={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function TB(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 Vce=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=Y0(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&&Qe(273,{providedId:e,usedId:s}),this.existingKeys[s]=!0,s}n++}}};function An(e){if(e!=null&&e.length)return e[e.length-1]}function Ol(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 Np(e,t){if(e)for(const n of e)t(n)}function Xr(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}function DB(e,t,n){for(let o=0;o<t.length;o++)Xr(e,t[o]);for(let o=t.length-1;o>=0;o--)e.splice(n,0,t[o])}var Hy="ag-Grid-AutoColumn",xB="ag-Grid-SelectionColumn",AB="ag-Grid-RowNumbersColumn";function IB(e){const t=[],n=o=>{for(let s=0;s<o.length;s++){const r=o[s];Fl(r)?t.push(r):os(r)&&n(r.getChildren())}};return n(e),t}function xa(e){return e.reduce((t,n)=>t+n.getActualWidth(),0)}function Gy(e,t,n){const o={};if(!t)return;Pa(null,t,r=>{o[r.getInstanceId()]=r}),n&&Pa(null,n,r=>{o[r.getInstanceId()]=null});const s=Object.values(o).filter(r=>r!=null);e.context.destroyBeans(s)}function y_(e){return e.getId().startsWith(Hy)}function Aa(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(xB))??!1}function Ia(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(AB))??!1}function Bce(e){return Aa(e)||Ia(e)}function Uy(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function $ce(e,t){return Ol(e,t,(n,o)=>n.getColId()===o.getColId())}function Hce(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function zd(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function Lp(e,t){const n=e===t,o=e.getColDef()===t,s=e.getColId()==t;return n||o||s}var Gce=(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),pt(o)&&e[o]!==void 0&&(s.value2=e[o],r=!0)),!r&&t&&(t[n]!==void 0&&(s.value1=t[n]),pt(o)&&t[o]!==void 0&&(s.value2=t[o])),s},Uce=(e,t)=>{os(e)&&e.setupExpandable(),e.originalParent=t};function Wce(e,t=null,n,o,s){const r=new Vce,{existingCols:i,existingGroups:a,existingColKeys:l}=zce(o);r.addExistingKeys(l);const u=PB(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 Pa(null,h,Uce),{columnTree:h,treeDepth:d}}function zce(e){const t=[],n=[],o=[];return e&&Pa(null,e,s=>{if(os(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 PB(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&&Zce(d)?u[c]=l.createProvidedColumnGroup(o,d,n,s,r,i,a):u[c]=jce(e,o,d,s,r,a)}return u}function jce(e,t,n,o,s,r){var l;const i=qce(n,o);i&&(o==null||o.splice(i.idx,1));let a=i==null?void 0:i.column;if(a){const u=w_(e,n,a.getColId());a.setColDef(u,n,r),Kce(e,a,u,r)}else{const u=s.getUniqueKey(n.colId,n.field),c=w_(e,n,u);a=new Zu(c,n,u,t),e.context.createBean(a)}return(l=e.dataTypeSvc)==null||l.addColumnListeners(a),a}function kB(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 Kce(e,t,n,o){kB(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 qce(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 w_(e,t,n,o){const{gos:s,dataTypeSvc:r}=e,i={},a=s.get("defaultColDef");fs(i,a,!1,!0);const l=Yce(e,i,t,n);l&&Xce(e,l,i);const u=i.cellDataType;fs(i,t,!1,!0),u!==void 0&&(i.cellDataType=u);const c=s.get("autoGroupColumnDef"),d=ki(s);return t.rowGroup&&c&&d&&fs(i,{sort:c.sort,initialSort:c.initialSort},!1,!0),r&&(r.postProcess(i),r.validateColDef(i)),s.validateColDef(i,n,o),i}function Yce(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?Uy(r):void 0}function Xce(e,t,n){if(!t.length)return;const o=Object.assign({},Lce),s=e.gos.get("columnTypes")||{};for(const r of Object.keys(s)){const i=s[r];r in o?Qe(34,{key:r}):(i.type&&Qe(35),o[r]=i)}for(const r of t){const i=o[r.trim()];i?fs(n,i,!1,!0):Qe(36,{t:r})}}function Zce(e){return e.children!==void 0}function Pa(e,t,n){if(t)for(let o=0;o<t.length;o++){const s=t[o];os(s)&&Pa(s,s.getChildren(),n),n(s,e)}}function FB(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 OB(e,t){let n=!0;return Pa(null,t,o=>{if(!os(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 MB(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 NB(e,t,n){if(!t.length)return;const o=t.length===1?t[0]:null,s=MB(t,r=>r.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:o,source:n})}function Jce(e,t,n){if(!t.length)return;const o=t.length===1?t[0]:null,s=MB(t,r=>r.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:o,source:n})}function Qce(e,t,n,o){e.dispatchEvent({type:t,columns:n,column:n&&n.length==1?n[0]:null,source:o})}function jd(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 Zr(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 Qe(32),!1;const y=(_,D,x,M,V)=>{if(!_)return;const A=Gce(D,t.defaultState),P=A("flex").value1;if(kB(e,_,A("hide").value1,A("sort").value1,A("sortIndex").value1,A("pinned").value1,P,n),P==null){const k=A("width").value1;if(k!=null){const O=_.getColDef().minWidth??d.getDefaultColumnMinWidth();O!=null&&k>=O&&_.setActualWidth(k,n)}}V||!_.isPrimary()||(h==null||h.syncColumnWithState(_,n,A),s==null||s.syncColumnWithState(_,n,A,x),r==null||r.syncColumnWithState(_,n,A,M))},b=(_,D,x)=>{var se,X;const M=LB(e,n),V=D.slice(),A={},P={},k=[],O=[],N=[];let $=0;const W=(s==null?void 0:s.columns.slice())??[],oe=(r==null?void 0:r.columns.slice())??[];for(const I of _){const z=I.colId;if(z.startsWith(Hy)){k.push(I),N.push(I);continue}if(Aa(z)){O.push(I),N.push(I);continue}const me=x(z);me?(y(me,I,A,P,!1),Xr(V,me)):(N.push(I),$+=1)}const ie=I=>y(I,null,A,P,!1);V.forEach(ie),s==null||s.sortColumns(BB.bind(s,A,W)),r==null||r.sortColumns(BB.bind(r,P,oe)),o.refreshCols(!1,n);const ee=(I,z,ne=[])=>{for(const me of z){const xe=I(me.colId);Xr(ne,xe),y(xe,me,null,null,!0)}ne.forEach(ie)};return ee(I=>(i==null?void 0:i.getColumn(I))??null,k,(se=i==null?void 0:i.getColumns())==null?void 0:se.slice()),ee(I=>(a==null?void 0:a.getColumn(I))??null,O,(X=a==null?void 0:a.getColumns())==null?void 0:X.slice()),tde(t,o,p),u.refresh(n),f.dispatchEvent({type:"columnEverythingChanged",source:n}),M(),{unmatchedAndAutoStates:N,unmatchedCount:$}};l==null||l.start();let{unmatchedAndAutoStates:S,unmatchedCount:w}=b(t.state||[],g,_=>o.getColDefCol(_));if(S.length>0||pt(t.defaultState)){const _=((E=c==null?void 0:c.getPivotResultCols())==null?void 0:E.list)??[];w=b(S,_,D=>(c==null?void 0:c.getPivotResultCol(D))??null).unmatchedCount}return l==null||l.finish(),w===0}function ede(e,t){var b,S;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=IB(l),c=[];let d=1e3,h=1e3;const f=w=>{const E=VB(w);Gn(E.rowGroupIndex)&&E.rowGroup&&(E.rowGroupIndex=d++),Gn(E.pivotIndex)&&E.pivot&&(E.pivotIndex=h++),c.push(E)};(b=o==null?void 0:o.getColumns())==null||b.forEach(f),(S=s==null?void 0:s.getColumns())==null||S.forEach(f),u==null||u.forEach(f),Zr(e,{state:c},t);const p=(o==null?void 0:o.getColumns())??[],y=[...(s==null?void 0:s.getColumns())??[],...p,...a].map(w=>({colId:w.colId}));Zr(e,{state:y,applyOrder:!0},t),r.dispatchEvent(Nt(i,{type:"columnsReset",source:t}))}function LB(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=Wy(e),c={};for(const d of u)c[d.colId]=d;return()=>{const d=(_,D,x,M)=>{const V=D.map(M),A=x.map(M);if(Ol(V,A))return;const k=new Set(D);for(const N of x)k.delete(N)||k.add(N);const O=[...k];a.dispatchEvent({type:_,columns:O,column:O.length===1?O[0]:null,source:t})},h=_=>{const D=[];return r.forAllCols(x=>{const M=c[x.getColId()];M&&_(M,x)&&D.push(x)}),D},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((_,D)=>{const x=_.aggFunc!=null,M=x!=D.isValueActive(),V=x&&_.aggFunc!=D.getAggFunc();return M||V});g.length>0&&Qce(a,"columnValueChanged",g,t),jd(a,h((_,D)=>_.width!=D.getActualWidth()),!0,t),NB(a,h((_,D)=>_.pinned!=D.getPinned()),t),Jce(a,h((_,D)=>_.hide==D.isVisible()),t);const w=h((_,D)=>_.sort!=D.getSort()||_.sortIndex!=D.getSortIndex());w.length>0&&(i==null||i.dispatchSortChangedEvents(t,w));const E=Wy(e);ode(u,E,t,r,a)}}function Wy(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 VB(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 tde(e,t,n){if(!e.applyOrder||!e.state)return;const o=[];for(const s of e.state)s.colId!=null&&o.push(s.colId);nde(t.cols,o,t,n)}function nde(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(Hy)?s.splice(i++,0,a):s.push(a)}if(s=FB(s,o),!OB(s,n.getColTree())){Qe(39);return}e.list=s}function ode(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 BB=(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},sde=class extends Ke{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(zd(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),zd(e.source)))}createColsFromColDefs(e){var b,S,w;const{beans:t}=this,{valueCache:n,colAutosize:o,rowGroupColsSvc:s,pivotColsSvc:r,valueColsSvc:i,visibleCols:a,eventSvc:l,groupHierarchyColSvc:u}=t,c=this.colDefs?LB(t,e):void 0;n==null||n.expire();const d=(b=this.colDefCols)==null?void 0:b.list,h=(S=this.colDefCols)==null?void 0:S.tree,f=Wce(t,this.colDefs,!0,h,e);Gy(t,(w=this.colDefCols)==null?void 0:w.tree,f.columnTree);const p=f.columnTree,g=f.treeDepth,v=IB(p),y={};for(const E of v)y[E.getId()]=E;this.colDefCols={tree:p,treeDepth:g,list:v,map:y},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=Ece(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(),!Ol(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=y_(l);if(o){const c=i==null?void 0:i.includes(l);return u||c||s&&Aa(l)||r&&Ia(l)}else return u||l.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,n){Zr(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 Zu){const y=s.get(v);if(y==null)continue;(p==null||p<y)&&(p=y,g=v);continue}v.forEachLeafColumn(y=>{const b=s.get(y);b!=null&&(p==null||p<b)&&(p=b,g=y)})}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=FB(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=zd(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;Gy(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;Np((r=this.colDefCols)==null?void 0:r.list,e),Np((i=n==null?void 0:n.columns)==null?void 0:i.list,e),Np((a=o==null?void 0:o.columns)==null?void 0:a.list,e),Np((l=s==null?void 0:s.columns)==null?void 0:l.list,e),Np((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(Lp(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}},$B=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 Vp(e,t,n){return n&&e.addDestroyFunc(()=>t.destroyBean(n)),n??e}var ht=null;function HB(e){return typeof(e==null?void 0:e.getGui)=="function"}var GB=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)}},rde=0,Bp=class extends Ii{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=rde++,this.cssManager=new GB(()=>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(YV):null}applyElementsToComponent(e,t,n,o=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===ht)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=Q0(e):o=xp(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),n_(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;$ue(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)}},vn=class extends Bp{};function UB(e){return typeof e=="object"&&!!e.component}function ide(e,t){return new qn(n=>{n(window.setInterval(e,t))})}var qn=class pg{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 pg(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)})})}):pg.resolve()}static resolve(t=null){return new pg(n=>n(t))}then(t){return new pg(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 ade(e){return e?e.prototype&&"getGui"in e.prototype:!1}function WB(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 lde=class extends Ke{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 S;const{name:r,cellRenderer:i}=t;let{compName:a,jsComp:l,fwComp:u,paramsFromSelector:c,popupFromSelector:d,popupPositionFromSelector:h}=WB(this.beans.frameworkOverrides,e,t,o),f,p;const g=w=>{const E=this.registry.getUserComponent(r,w);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&&!ade(l)&&(l=(S=this.agCompUtils)==null?void 0:S.adaptFunction(t,l)),!l&&!u){const{validation:w}=this.beans;s&&(a!==n||!n)?a?w!=null&&w.isProvidedUserComp(a)||Cn(50,{compName:a}):n?w||Cn(260,{...this.gos.getModuleErrorParams(),propName:r,compName:n}):Cn(216,{name:r}):n&&!w&&Cn(146,{comp:n});return}const v=this.mergeParams(e,t,o,c,f,p),y=l==null,b=l??u;return{componentFromFramework:y,componentClass:b,params:v,type:t,popupFromSelector:d,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(b,y,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?qn.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);fs(i,u)}else typeof l=="object"&&fs(i,l);return fs(i,o),r?r(i):i}},ude={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},cde={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},dde={name:"headerComponent",optionalMethods:["refresh"]},hde={name:"innerHeaderComponent"},fde={name:"innerHeaderGroupComponent"},pde={name:"headerGroupComponent"},gde={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},mde={name:"loadingCellRenderer",cellRenderer:!0},vde={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},yde={name:"loadingOverlayComponent",optionalMethods:["refresh"]},wde={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},Cde={name:"tooltipComponent"},C_={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},bde={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},Sde={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Ede={name:"loadingCellRenderer",cellRenderer:!0},_de={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},Rde={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function Tde(e,t){return e.getCompDetailsFromGridOptions(cde,"agDragAndDropImage",t,!0)}function Dde(e,t,n){return e.getCompDetails(t,dde,"agColumnHeader",n)}function xde(e,t,n){return e.getCompDetails(t,hde,void 0,n)}function Ade(e,t){const n=t.columnGroup.getColGroupDef();return e.getCompDetails(n,pde,"agColumnGroupHeader",t)}function Ide(e,t,n){return e.getCompDetails(t,fde,void 0,n)}function Pde(e,t){return e.getCompDetailsFromGridOptions(Sde,void 0,t,!0)}function kde(e,t){return e.getCompDetailsFromGridOptions(Ede,"agLoadingCellRenderer",t,!0)}function Fde(e,t){return e.getCompDetailsFromGridOptions(_de,"agGroupRowRenderer",t,!0)}function Ode(e,t){return e.getCompDetailsFromGridOptions(Rde,"agDetailCellRenderer",t,!0)}function zB(e,t,n){return e.getCompDetails(t,gde,void 0,n)}function jB(e,t,n){return e.getCompDetails(t,mde,"agSkeletonCellRenderer",n,!0)}function KB(e,t,n){return e.getCompDetails(t,vde,"agCellEditor",n,!0)}function Mde(e,t,n,o){const s=t.filter;return UB(s)&&(t={filter:s.component,filterParams:t.filterParams}),e.getCompDetails(t,C_,o,n,!0)}function Nde(e,t,n){return e.getCompDetails(t,ude,"agDateInput",n,!0)}function Lde(e,t){return e.getCompDetailsFromGridOptions(yde,"agLoadingOverlay",t,!0)}function Vde(e,t){return e.getCompDetailsFromGridOptions(wde,"agNoRowsOverlay",t,!0)}function Bde(e,t){return e.getCompDetails(t.colDef,Cde,"agTooltipComponent",t,!0)}function $de(e,t,n,o){return e.getCompDetails(t,bde,o,n)}function qB(e,t){return WB(e,t,C_)}function b_(e,t,n){return e.mergeParams(t,C_,n)}function $p(e){const t=e;return(t==null?void 0:t.getFrameworkComponentInstance)!=null?t.getFrameworkComponentInstance():e}function Hde(e){return typeof e=="object"&&!!e.getComp}var Me={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"},S_=class extends Bp{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()}},E_,__,R_,T_,D_,x_,A_;function Ml(){return E_===void 0&&(E_=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),E_}function YB(){return __===void 0&&(__=/(firefox)/i.test(navigator.userAgent)),__}function XB(){return R_===void 0&&(R_=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),R_}function Ju(){return T_===void 0&&(T_=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),T_}function I_(e){if(!e)return null;const t=e.tabIndex,n=e.getAttribute("tabIndex");return t===-1&&(n===null||n===""&&!YB())?null:t.toString()}function Gde(){if(A_!==void 0)return A_;if(!document.body)return-1;let e=1e6;const t=YB()?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(),A_=e,e}function Ude(){return x_==null&&ZB(),x_}function ZB(){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&&(x_=n,D_=n===0)}function JB(){return D_==null&&ZB(),D_}var P_="T",Wde=new RegExp(`[${P_} ]`),zde=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${P_}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function Fi(e,t){return e.toString().padStart(t,"0")}function Zs(e,t=!0,n=P_){if(!e)return null;let o=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>Fi(s,2)).join("-");return t&&(o+=n+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>Fi(s,2)).join(":")),o}function zy(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),Fi(e.getDate(),2),Fi(e.getHours(),2),`:${Fi(e.getMinutes(),2)}`,`:${Fi(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,Fi(e.getDate(),2)].map(String):null}var k_=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"},QB=["January","February","March","April","May","June","July","August","September","October","November","December"],F_=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function O_(e,t){if(t==null)return Zs(e,!1);const n=Fi(e.getFullYear(),4),o={YYYY:()=>n.slice(n.length-4,n.length),YY:()=>n.slice(n.length-2,n.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>QB[e.getMonth()],MMM:()=>QB[e.getMonth()].slice(0,3),MM:()=>Fi(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${k_(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${k_(e.getDate())}`,DD:()=>Fi(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>F_[e.getDay()],ddd:()=>F_[e.getDay()].slice(0,3),dd:()=>F_[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${k_(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 jy(e,t=!1){return!!xs(e,t)}function jde(e){return jy(e,!0)}function xs(e,t=!1,n){if(!e||!n&&!zde.test(e))return null;const[o,s]=e.split(Wde);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 M_(e){const{inputValue:t,allSuggestions:n,hideIrrelevant:o,filterByPercentageOfBestMatch:s}=e;let r=(n??[]).map((l,u)=>({value:l,relevance:Kde(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 Kde(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 e2(e){var n;return e.altKey||e.ctrlKey||e.metaKey?!1:((n=e.key)==null?void 0:n.length)===1}var N_=!1,Ky=0;function qde(e){Ky>0||(e.addEventListener("keydown",qy),e.addEventListener("mousedown",qy))}function Yde(e){Ky>0||(e.removeEventListener("keydown",qy),e.removeEventListener("mousedown",qy))}function qy(e){const t=N_,n=e.type==="keydown";n&&(e.ctrlKey||e.metaKey||e.altKey)||t!==n&&(N_=n)}function Xde(e){const t=Vo(e);return qde(t),Ky++,()=>{Ky--,Yde(t)}}function Zde(){return N_}function Kd(e,t,n=!1){const o=Bue;let s=GV;t&&(s+=", "+t),n&&(s+=', [tabindex="-1"]');const r=Array.prototype.slice.apply(e.querySelectorAll(o)).filter(l=>xi(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 Qu(e,t=!1,n=!1,o=!1){const s=Kd(e,o?".ag-tab-guard":null,n),r=t?An(s):s[0];return r?(r.focus({preventScroll:!0}),!0):!1}function ec(e,t,n,o){const s=Kd(t,n?':not([tabindex="-1"])':null),r=jn(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 t2(e,t=5){let n=0;for(;e&&I_(e)===null&&++n<=t;)e=e.parentElement;return I_(e)===null?null:e}var Jde=".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)}",Qde=class extends Bp{constructor(e,t,n){super(t,n),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(Jde)}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;zo(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(Un(t,!1),xl(t,"presentation")):(Un(t,!0),xl(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:(Iy(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return _p(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},n2=class extends Qde{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==""||Eue(e)!==null?Sp(e,""):Sp(e,t??"")}setAriaLabel(e){return Ld(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 Ai(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 ehe(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 tc=class extends n2{constructor(e,t,n="text",o="input"){super(e,(e==null?void 0:e.template)??ehe(o),[],t),this.inputType=n,this.displayFieldTag=o,this.eLabel=ht,this.eWrapper=ht,this.eInput=ht}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,Ys(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return Iy(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 Ys(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Ld(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return _p(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Ys(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Ys(this.eInput,"autocomplete",t)}return this}},L_=class extends tc{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)}},V_={selector:"AG-CHECKBOX",component:L_},the=class extends L_{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)}},nc=class extends tc{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=pt(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=n=>{e2(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()}})}},Yy={selector:"AG-INPUT-TEXT-FIELD",component:nc},nhe=class extends tc{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}},ohe={selector:"AG-INPUT-TEXT-AREA",component:nhe},B_=class extends nc{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){jn(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,Ys(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Ys(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Ys(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(pt(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")}},she={selector:"AG-INPUT-NUMBER-FIELD",component:B_},rhe=class extends nc{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=Ml();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){jn(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?Zs(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,Ys(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?Zs(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,Ys(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Ys(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 xs(this.getValue())??void 0}setDate(e,t){this.setValue(Zs(e??null,this.includeTime),t)}},o2={selector:"AG-INPUT-DATE-FIELD",component:rhe},ihe=".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)}}",ahe="ag-active-item",lhe=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",ref:"eText",children:t}]}),uhe=class extends Bp{constructor(e,t,n){super(lhe(e,t)),this.label=t,this.value=n,this.eText=ht}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(ahe,e),$V(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const n=this.getGui();Aue(n,e),xue(n,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>e_(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)}))}},che=class extends Bp{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(ihe)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case Me.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const n=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(n)}break;case Me.DOWN:case Me.UP:e.preventDefault(),this.navigate(t);break;case Me.PAGE_DOWN:case Me.PAGE_UP:case Me.PAGE_HOME:case Me.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();zo(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(!xi(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 uhe(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===Me.DOWN;let n;const{listItems:o,highlightedItem:s}=this;if(!s)n=t?o[0]:An(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===Me.PAGE_HOME?a=0:e===Me.PAGE_END?a=s:e===Me.PAGE_DOWN?a=Math.min(o+i,s):e===Me.PAGE_UP&&(a=Math.max(o-i,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){xl(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"})}},dhe=".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}}",hhe={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"}}]}]},fhe=class extends n2{constructor(e){if(super(e,(e==null?void 0:e.template)||hhe,(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=ht,this.eWrapper=ht,this.eDisplayField=ht,this.eIcon=ht,this.registerCSS(dhe),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()),Z0(e,!1),this.ariaRole&&xl(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 Me.UP:case Me.DOWN:case Me.ENTER:case Me.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case Me.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=FV(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=t_(Ty(c)),a&&(e.style.maxWidth=a)):Iy(e,a??Ty(c));const p=r??`${J0(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();Z0(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 Iy(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()}},phe=".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)}",$_=class extends fhe{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(phe)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Ay(()=>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 che("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",n),Vue(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===Me.TAB&&this.hidePicker(),t){case Me.ENTER:case Me.UP:case Me.DOWN:case Me.PAGE_UP:case Me.PAGE_DOWN:case Me.PAGE_HOME:case Me.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(n=this.listComponent)==null||n.handleKeyDown(e):super.onKeyDown(e);break;case Me.ESCAPE:super.onKeyDown(e);break;case Me.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()}},ghe={selector:"AG-SELECT",component:$_},mhe=':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}}',H_=typeof window!="object"||!((dG=(cG=window==null?void 0:window.document)==null?void 0:cG.fonts)!=null&&dG.forEach),qd=(e,t,n,o,s,r)=>{if(H_)return;o&&(e=`@layer ${CSS.escape(o)} { ${e} }`);let i=Yd.map.get(t);if(i||(i=[],Yd.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)},s2=(e,t,n,o)=>{qd(mhe,e,"shared",t,0,n),o==null||o.forEach((s,r)=>s.forEach(i=>qd(i,e,r,t,0,n)))},vhe=e=>{Yd.grids.add(e)},yhe=e=>{if(Yd.grids.delete(e),Yd.grids.size===0){Yd.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},r2,Yd=(r2=typeof window=="object"?window:{}).agStyleInjectionState??(r2.agStyleInjectionState={map:new WeakMap,grids:new Set}),Oi=e=>new i2(e),Nl="$default",whe=0,i2=class{constructor({feature:e,params:t,modeParams:n={},css:o,cssImports:s}){this.feature=e,this.css=o,this.cssImports=s,this.modeParams={[Nl]:{...n[Nl]??{},...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"}-${++whe}`;typeof s=="function"&&(s=s()),s=`:where(.${r}) {
195
195
  ${s}
@@ -252,4 +252,4 @@ If you are trying to annotate ${o} with application data, use the '${o}.context'
252
252
  `,R0e=class extends ebe{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,YH),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():(Qe(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=YH),this.isFirstLine=!1}},T0e=class extends QCe{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()){Qe(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(Nt(this.gos,{})):t.fileName;tbe(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 R0e({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 D0e(e,t){var n;return(n=e.csvCreator)==null?void 0:n.getDataAsCsv(t)}function x0e(e,t){var n;(n=e.csvCreator)==null||n.exportDataAsCsv(t)}var A0e={moduleName:"CsvExport",version:dt,beans:[T0e],apiFunctions:{getDataAsCsv:D0e,exportDataAsCsv:x0e},dependsOn:[_0e]},I0e=class extends Ke{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 Ll(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){pt(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(Gn(this.params.datasource.getRows)){Qe(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:Nt(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 Ll(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()}},P0e=2,k0e=class extends Ke{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 I0e(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()&&(Pl(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=P0e-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,pt(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}},F0e=class extends Ke{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 Ll(e);this.rootNode=t,t.level=-1,this.rowHeight=Yu(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=Yu(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){var t;let e;this.cacheParams?e=!Cp(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;Ud(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:Yu(e),overflowSize:r.get("cacheOverflowSize"),blockSize:r.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new k0e(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 O0e(e){var t;(t=bw(e))==null||t.refreshCache()}function M0e(e){var t;(t=bw(e))==null||t.purgeCache()}function N0e(e){var t;return(t=bw(e))==null?void 0:t.getRowCount()}var L0e=class extends Ke{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=Tce(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=jo(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Xr(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){Pl(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(){Pl(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},V0e={moduleName:"InfiniteRowModelCore",version:dt,rowModels:["infinite"],beans:[F0e,L0e]},B0e={moduleName:"InfiniteRowModel",version:dt,apiFunctions:{refreshInfiniteCache:O0e,purgeInfiniteCache:M0e,getInfiniteRowCount:N0e},dependsOn:[V0e,JEe]},$0e="↑",H0e="↓",G0e={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},U0e=class extends vn{constructor(){super(G0e),this.eValue=ht,this.eDelta=ht,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const n=Math.abs(t),o=e.formatValue(n),s=pt(o)?o:n,r=t>=0,i=this.eDelta;r?i.textContent=$0e+s:i.textContent=H0e+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"),zo(this.eDelta)}refresh(e,t=!1){var u;const{value:n,valueFormatted:o}=e,{eValue:s,lastValue:r,beans:i}=this;if(n===r||(pt(o)?s.textContent=o:pt(n)?s.textContent=n:zo(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}},W0e=".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}",z0e={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},j0e=class extends vn{constructor(){super(z0e),this.eCurrent=ht,this.refreshCount=0,this.registerCSS(W0e)}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=ao({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 pt(e.valueFormatted)?o.textContent=e.valueFormatted:pt(e.value)?o.textContent=n:zo(o),!0}},K0e=class extends Ke{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=jge(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 q0e(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 Y0e={moduleName:"HighlightChanges",version:dt,beans:[K0e],userComponents:{agAnimateShowChangeCellRenderer:U0e,agAnimateSlideCellRenderer:j0e},apiFunctions:{flashCells:q0e}};function X0e(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function Z0e(e,t,n){var o;return(o=e.stateSvc)==null?void 0:o.setState(t,n)}function XH(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=J0e(e)),e.version=dt,e}function J0e(e){return e.cellSelection=Q0e(e,"rangeSelection"),e}function Q0e(e,t){if(e&&typeof e=="object")return e[t]}var e_e=class extends Ke{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=jo(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=jo(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=jo(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=ro(e);const o=XH(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=XH(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 XCe(Wy(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=(A,P)=>{const k=!(o!=null&&o.has(A))&&!!(P||t==="api");return h||(h=k),k},p={},g=A=>{let P=p[A];return P||(P={colId:A},p[A]=P,P)},v={},y=f("sort",s);y&&(s==null||s.sortModel.forEach(({colId:A,sort:P},k)=>{const O=g(A);O.sort=P,O.sortIndex=k})),(y||!n)&&(v.sort=null,v.sortIndex=null);const b=f("rowGroup",r);b&&(r==null||r.groupColIds.forEach((A,P)=>{const k=g(A);k.rowGroup=!0,k.rowGroupIndex=P})),(b||!n)&&(v.rowGroup=null,v.rowGroupIndex=null);const S=f("aggregation",i);S&&(i==null||i.aggregationModel.forEach(({colId:A,aggFunc:P})=>{g(A).aggFunc=P})),(S||!n)&&(v.aggFunc=null);const w=f("pivot",a);w&&(a==null||a.pivotColIds.forEach((A,P)=>{const k=g(A);k.pivot=!0,k.pivotIndex=P}),this.gos.updateGridOptions({options:{pivotMode:!!(a!=null&&a.pivotMode)},source:t})),(w||!n)&&(v.pivot=null,v.pivotIndex=null);const E=f("columnPinning",l);if(E){for(const A of(l==null?void 0:l.leftColIds)??[])g(A).pinned="left";for(const A of(l==null?void 0:l.rightColIds)??[])g(A).pinned="right"}(E||!n)&&(v.pinned=null);const _=f("columnVisibility",u);if(_)for(const A of(u==null?void 0:u.hiddenColIds)??[])g(A).hide=!0;(_||!n)&&(v.hide=null);const D=f("columnSizing",c);if(D)for(const{colId:A,flex:P,width:k}of(c==null?void 0:c.columnSizingModel)??[]){const O=g(A);O.flex=P??null,O.width=k}(D||!n)&&(v.flex=null);const x=d==null?void 0:d.orderedColIds,M=!!(x!=null&&x.length)&&!(o!=null&&o.has("columnOrder")),V=M?x.map(A=>g(A)):Object.values(p);(V.length||h)&&(this.columnStates=V,Zr(this.beans,{state:V,applyOrder:M,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);Zr(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 ZCe(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(!Da(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];Cp(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),Cp(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")}},t_e={moduleName:"GridState",version:dt,beans:[e_e],apiFunctions:{getState:X0e,setState:Z0e}};function n_e(e){return e.rowModel.isLastRowIndexKnown()}function o_e(e){var t;return((t=e.pagination)==null?void 0:t.getPageSize())??100}function s_e(e){var t;return((t=e.pagination)==null?void 0:t.getCurrentPage())??0}function r_e(e){var t;return((t=e.pagination)==null?void 0:t.getTotalPages())??1}function i_e(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function a_e(e){var t;(t=e.pagination)==null||t.goToNextPage()}function l_e(e){var t;(t=e.pagination)==null||t.goToPreviousPage()}function u_e(e){var t;(t=e.pagination)==null||t.goToFirstPage()}function c_e(e){var t;(t=e.pagination)==null||t.goToLastPage()}function d_e(e,t){var n;(n=e.pagination)==null||n.goToPage(t)}var h_e=class extends Ke{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(Yu(t),1),s=Math.floor(e/o);t.pagination.setPageSize(s,"autoCalculated")};this.isBodyRendered?jo(this,n,50)():(n(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},ng="paginationPageSizeSelector",f_e={tag:"span",cls:"ag-paging-page-size"},p_e=class extends vn{constructor(){super(f_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(ng,()=>{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(){zo(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(ng)!==!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(ng)!==!0;Qe(94,{pageSizeSet:s,pageSizesSet:r,pageSizeOptions:e,paginationPageSizeOption:t}),r||Qe(95,{paginationPageSizeOption:t,paginationPageSizeSelector:ng}),e.unshift("")}const o=String(n?"":t);this.selectPageSizeComp?(Ol(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 $_).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(ng);return!Array.isArray(t)||!(t!=null&&t.length)?e:[...t].sort((n,o)=>n-o)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},g_e={selector:"AG-PAGE-SIZE-SELECTOR",component:p_e},m_e=".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}",v_e=class extends a${constructor(){super(),this.btFirst=ht,this.btPrevious=ht,this.btNext=ht,this.btLast=ht,this.lbRecordCount=ht,this.lbFirstRowOnPage=ht,this.lbLastRowOnPage=ht,this.lbCurrent=ht,this.lbTotal=ht,this.pageSizeComp=ht,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(m_e)}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(),[g_e]);const{btFirst:t,btPrevious:n,btNext:o,btLast:s}=this;this.activateTabIndex([t,n,o,s]),t.insertAdjacentElement("afterbegin",Ir(e?"last":"first",this.beans)),n.insertAdjacentElement("afterbegin",Ir(e?"next":"previous",this.beans)),o.insertAdjacentElement("afterbegin",Ir(e?"previous":"next",this.beans)),s.insertAdjacentElement("afterbegin",Ir(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):hpe(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===Me.ENTER||o.key===Me.SPACE)&&(o.preventDefault(),n())}})}dpe(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}):JCe(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){Due(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,y;if(e)v=this.formatNumber(t),y=this.formatNumber(o);else{const b=h("more","more");v=b,y=b}this.lbTotal.textContent=v,this.lbRecordCount.textContent=y,this.announceAriaStatus(c,d,y,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"))}},y_e={selector:"AG-PAGINATION",component:v_e},w_e=class extends Ke{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 y_e}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 pt(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:pt(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:pt(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:pt(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})}},C_e={moduleName:"Pagination",version:dt,beans:[w_e,h_e],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:n_e,paginationGetPageSize:o_e,paginationGetCurrentPage:s_e,paginationGetTotalPages:r_e,paginationGetRowCount:i_e,paginationGoToNextPage:a_e,paginationGoToPreviousPage:l_e,paginationGoToFirstPage:u_e,paginationGoToLastPage:c_e,paginationGoToPage:d_e},dependsOn:[Sw]};function b_e(e,t={}){const n=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(n))}function ZH(e,t,n,o,s){t&&(o&&t.parent&&t.parent.level!==-1&&ZH(e,t.parent,n,o,s),t.setExpanded(n,void 0,s))}function S_e(e,t){return e.rowModel.getRowNode(t)}function E_e(e,t,n,o){e.rowRenderer.addRenderedRowListener(t,n,o)}function __e(e){return e.rowRenderer.getRenderedNodes()}function R_e(e,t,n){e.rowModel.forEachNode(t,n)}function T_e(e){return e.rowRenderer.firstRenderedRow}function D_e(e){return e.rowRenderer.lastRenderedRow}function x_e(e,t){return e.rowModel.getRow(t)}function A_e(e){return e.rowModel.getRowCount()}var I_e={moduleName:"RowApi",version:dt,apiFunctions:{redrawRows:b_e,setRowNodeExpanded:ZH,getRowNode:S_e,addRenderedRowListener:E_e,getRenderedNodes:__e,forEachNode:R_e,getFirstDisplayedRowIndex:T_e,getLastDisplayedRowIndex:D_e,getDisplayedRowAtIndex:x_e,getDisplayedRowCount:A_e}},P_e={moduleName:"ScrollApi",version:dt,apiFunctions:{getVerticalPixelRange:WSe,getHorizontalPixelRange:zSe,ensureColumnVisible:kH,ensureIndexVisible:FH,ensureNodeVisible:jSe}};function k_e(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 F_e(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function O_e(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function M_e(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function N_e(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function L_e(e){return{rowHeight:Yu(e),headerHeight:Up(e)}}function V_e(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($p(a))}if((r=t.columns)!=null&&r.length)return n;const o=[],s=LR(t.rowNodes);for(const i of e.rowRenderer.getAllRowCtrls()){if(s&&!VR(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($p(u))}}return[...o,...n]}var B_e={moduleName:"RenderApi",version:dt,apiFunctions:{setGridAriaProperty:k_e,refreshCells:F_e,refreshHeader:O_e,isAnimationFrameQueueEmpty:M_e,flushAllAnimationFrames:N_e,getSizesForCurrentTheme:L_e,getCellRendererInstances:V_e}};function $_e(e,t){var n,o;typeof t=="number"?(n=e.colAutosize)==null||n.sizeColumnsToFit(t,"api"):(o=e.colAutosize)==null||o.sizeColumnsToFitGridBody(t)}function JH({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 H_e(e,t){var n;t&&typeof t=="object"?JH(e,t):(n=e.colAutosize)==null||n.autoSizeAllColumns({source:"api",skipHeader:t})}var G_e=class extends Ke{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&&ro(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=>jd(t,Array.from(c),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return s(o);const r=QH(this.beans),i=c=>n.leftCols.some(d=>Lp(d,c)),a=c=>n.rightCols.some(d=>Lp(d,c)),l=e.colKeys.filter(c=>!Aa(c)&&!Ia(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 y=-1;const b=Object.fromEntries(u.map(({colId:E,..._})=>[E,_])),S=s??this.gos.get("skipHeaderOnAutoSize"),w=r??S;for(;y!==0;){y=0;const E=[];for(const _ of o){if(!_||Bce(_))continue;const D=f.getCol(_);if(!D||v.has(D))continue;const x=p.getPreferredWidthForColumn(D,S);if(x>0){const M=b[D.colId]??{};M.minWidth??(M.minWidth=l),M.maxWidth??(M.maxWidth=a);const V=U_e(D,x,M);D.setActualWidth(V,c),v.add(D),y++}E.push(D)}E.length&&g.refresh(c)}w||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 rc(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=QH(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):Qe(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,...y}of(o==null?void 0:o.columnLimits)??[])s[typeof v=="string"?v:v.getColId()]=y;const r=this.beans.visibleCols.allCols;if(e<=0||!r.length)return;const i=xa(r);if(o!=null&&o.onlyScaleUp&&i>e||e===i&&r.every(y=>{if(y.colDef.suppressSizeToFit)return!0;const b=s==null?void 0:s[y.getId()],S=(b==null?void 0:b.minWidth)??(o==null?void 0:o.defaultMinWidth),w=(b==null?void 0:b.maxWidth)??(o==null?void 0:o.defaultMaxWidth),E=y.getActualWidth();return(S==null||E>=S)&&(w==null||E<=w)}))return;const l=[],u=[];for(const v of r){const y=((p=o==null?void 0:o.colKeys)==null?void 0:p.some(b=>Lp(v,b)))??!0;v.getColDef().suppressSizeToFit||!y?u.push(v):l.push(v)}const c=l.slice(0);let d=!1;const h=v=>{Xr(l,v),u.push(v)};for(const v of l){v.resetActualWidth(t);const y=s==null?void 0:s[v.getId()],b=(y==null?void 0:y.minWidth)??(o==null?void 0:o.defaultMinWidth),S=(y==null?void 0:y.maxWidth)??(o==null?void 0:o.defaultMaxWidth),w=v.getActualWidth();typeof b=="number"&&w<b?v.setActualWidth(b,t,!0):typeof S=="number"&&w>S&&v.setActualWidth(S,t,!0)}for(;!d;){d=!0;const v=e-xa(u);if(v<=0)for(const y of l){const b=((g=s==null?void 0:s[y.getId()])==null?void 0:g.minWidth)??(o==null?void 0:o.defaultMinWidth)??y.minWidth;y.setActualWidth(b,t,!0)}else{const y=v/xa(l);let b=v;for(let S=l.length-1;S>=0;S--){const w=l[S],E=s==null?void 0:s[w.getId()],_=(E==null?void 0:E.minWidth)??(o==null?void 0:o.defaultMinWidth),D=(E==null?void 0:E.maxWidth)??(o==null?void 0:o.defaultMaxWidth),x=w.getMinWidth(),M=w.getMaxWidth(),V=typeof _=="number"&&_>x?_:x,A=typeof D=="number"&&D<M?D:M;let P=Math.round(w.getActualWidth()*y);P<V?(P=V,h(w),d=!1):P>A?(P=A,h(w),d=!1):S===0&&(P=b),w.setActualWidth(P,t,!0),b-=P}}}for(const v of c)v.fireColumnWidthChangedEvent(t);const f=this.beans.visibleCols;f.setLeftValues(t),f.updateBodyWidths(),!n&&jd(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 U_e(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 QH({ctrlsSvc:e,scrollVisibleSvc:t}){const n=e.getGridBodyCtrl(),s=n.isVerticalScrollShowing()?t.getScrollbarWidth():0;return Rp(n.eGridBody)-s}var W_e={moduleName:"ColumnAutoSize",version:dt,beans:[G_e],apiFunctions:{sizeColumnsToFit:$_e,autoSizeColumns:JH,autoSizeAllColumns:H_e},dependsOn:[_$]},z_e=".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 j_e(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function K_e(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function q_e(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedTopRow(t)}function Y_e(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedBottomRow(t)}function X_e(e,t,n){var o;return(o=e.pinnedRowModel)==null?void 0:o.forEachPinnedRow(t,n)}var Z_e={moduleName:"PinnedRow",version:dt,beans:[qpe],css:[z_e],apiFunctions:{getPinnedTopRowCount:j_e,getPinnedBottomRowCount:K_e,getPinnedTopRow:q_e,getPinnedBottomRow:Y_e,forEachPinnedRow:X_e},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},J_e=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}},Q_e=class extends Ke{constructor(e){super(),this.column=e}buildCache(e){var S;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 y=(w,E)=>{p=w,g=null,v=E},b=w=>{const E=!w.isExpandable()&&!w.group&&!w.detail&&(c?!c({rowNode:w}):!0);if(w.rowIndex==null||!E){y(null,null);return}if(p==null||w.level!==p.level||w.footer||g&&w.rowIndex-1!==(g==null?void 0:g.getLastNode().rowIndex)){y(w,r.getValue(t,w));return}const _=r.getValue(t,w);if(f){const D=Nt(n,{valueA:v,nodeA:p,valueB:_,nodeB:w,column:t,colDef:a});if(!h(D)){y(w,_);return}}else if(d?!d(v,_):v!==_){y(w,_);return}if(!g){const D=l==null?void 0:l.get(p);(D==null?void 0:D.firstNode)===p?(D.reset(),g=D):g=new J_e(t,p),u.set(p,g)}g.addSpannedNode(w),u.set(w,g)};switch(e){case"center":(S=s.forEachDisplayedNode)==null||S.call(s,w=>{(!i||i.isRowInPage(w.rowIndex))&&b(w)}),this.centerValueNodeMap=u;break;case"top":o==null||o.forEachPinnedRow("top",b),this.topValueNodeMap=u;break;case"bottom":o==null||o.forEachPinnedRow("bottom",b),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}}},eRe=class extends Ke{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=jo(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=jo(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 Q_e(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()}},tRe=class extends sh{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||_y(e,t.rowIndex)}setAriaRowSpan(){kue(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(cw(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}},nRe=class extends Cw{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 tRe(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(){}},oRe=class extends Ke{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 nRe(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")}},sRe={moduleName:"CellSpan",version:dt,beans:[eRe,oRe]},rRe=class extends Ke{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);MR(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 Nt(this.beans.gos,{value:n,data:o.data,node:o,colDef:t,column:e,rowIndex:o.rowIndex})}},iRe=class extends Ke{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,n,o){MR(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 rRe(e,t)}processStaticCellClasses(e,t,n){this.getStaticCellClasses(e,t).forEach(s=>{n(s)})}},aRe={moduleName:"CellStyle",version:dt,beans:[iRe]},lRe={moduleName:"RowStyle",version:dt,beans:[qwe]};function uRe(e,t){var n;return!!((n=e.colHover)!=null&&n.isHovered(t))}var cRe=class extends Ke{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}},dRe="ag-column-hover",hRe=class extends Ke{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(dRe,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 cRe(t,n))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},fRe={moduleName:"ColumnHover",version:dt,beans:[hRe],apiFunctions:{isColumnHovered:uRe}},pRe=class extends Ke{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=!vw.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)=>{vw.has(i)&&t(i,a)},o=(i,a)=>{vw.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 gRe(e,t,n){var o;(o=e.apiEventSvc)==null||o.addListener(t,n)}function mRe(e,t,n){var o;(o=e.apiEventSvc)==null||o.removeListener(t,n)}function vRe(e,t){var n;(n=e.apiEventSvc)==null||n.addGlobalListener(t)}function yRe(e,t){var n;(n=e.apiEventSvc)==null||n.removeGlobalListener(t)}var wRe={moduleName:"EventApi",version:dt,apiFunctions:{addEventListener:gRe,addGlobalListener:vRe,removeEventListener:mRe,removeGlobalListener:yRe},beans:[pRe]},CRe={moduleName:"Locale",version:dt,beans:[YCe]},bRe=class extends Ke{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=jo(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=kl(this.beans,d).height;for(const g of s){let v=h==null?void 0:h[g.getColId()];const y=n==null?void 0:n.getCellSpan(g,d);if(y){if(y.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 b;if((b=this.beans.editSvc)!=null&&b.isEditing(e)||!e.isAlive()||!n.isAlive())return;const{paddingTop:d,paddingBottom:h,borderBottomWidth:f,borderTopWidth:p}=Ku(o),g=d+h+f+p,y=t.offsetHeight+g;if(c<5){const S=Vo(i),w=!(S!=null&&S.contains(t)),E=y==0;if(w||E){window.setTimeout(()=>a(c+1),0);return}}this.setRowAutoHeight(s,y,r)},l=()=>a(0);l();const u=Al(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}},SRe={moduleName:"RowAutoHeight",version:dt,beans:[bRe]},ERe={moduleName:"AllCommunity",version:dt,dependsOn:[qH,A0e,B0e,fbe,EEe,_Ee,REe,TEe,DEe,xEe,AEe,SEe,gSe,mSe,vSe,pSe,wSe,CSe,t_e,e0e,C_e,x$,I_e,P_e,B_e,W_e,lme,Z_e,WEe,ICe,aRe,fRe,lRe,wRe,FCe,Y0e,AH,CRe,SRe,ame,S0e,sRe]};let eG=!1;eG||(gce.registerModules([ERe,qH]),eG=!0);class _Re{constructor(t,n){bn(this,"gridApi",null);bn(this,"container");bn(this,"config");bn(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=zCe(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 RRe=O$.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"),TRe=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=B(null);yE(r,()=>{var v;const g=(v=i.value)==null?void 0:v.getApi();g==null||g.clearFocusedCell()});const i=B(null),a=Y(()=>({width:"100%",height:o.height||"500px"})),l=Y(()=>({...o,theme:RRe}));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 _Re(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 y,b;if(!g)return;(y=i.value)==null||y.updateColumnDefs(g);const v=g.map(S=>S.field&&S.width&&!S.hide?{colId:S.field,width:S.width,flex:null}:null).filter(S=>S!==null);(b=i.value)==null||b.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 Je(()=>o.columnDefs,(g,v)=>{const y=g==null?void 0:g.filter(S=>!S.hide).map(S=>S.field).join(","),b=v==null?void 0:v.filter(S=>!S.hide).map(S=>S.field).join(",");y!==b&&d(g)},{deep:!0}),Vn(()=>{h()}),t({gridApi:f,gridManager:p,syncColumnDefs:d}),Jt(()=>{u()}),Vn(()=>{h()}),(g,v)=>(K(),he("div",{ref_key:"gridContainerRef",ref:r,style:cn(a.value),class:ce(["ag-theme-quartz",["ag-table-container",o.isSorting?"is-sorting":""]])},null,6))}});function uc(e){return kV(e)}const DRe=()=>[...[{headerName:"Thumbnail",field:"thumbnail",sortable:!1,filter:!1,pinned:"left",lockPinned:!0,suppressMovable:!0,headerComponent:uc(Cl),width:86,resizable:!1},{headerName:"Name",field:"name",sortable:!1,filter:!1,pinned:"left",lockPinned:!0,headerComponent:uc(Cl),suppressMovable:!0},{headerName:"Notes",field:"description",sortable:!1,filter:!1,suppressMovable:!1},{headerName:"Assignee",field:"assignees",sortable:!1,filter:!1,headerComponent:uc(Cl)},{headerName:"Status",field:"status",sortable:!1,filter:!1,headerComponent:uc(Cl)},{headerName:"Date Range",field:"dateRange",sortable:!1,filter:!1,headerComponent:uc(Cl)},{headerName:"Last Updated",field:"lastUpdated",sortable:!1,filter:!1,headerComponent:uc(Cl),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:uc(Cl),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=>wp.fromType(n))],xw={WIDTH:60,HEADER_CLASS:"ag-checkbox-header"},xRe=()=>({field:"__checkboxSelection",checkboxSelection:!0,headerCheckboxSelection:!0,pinned:"left",width:xw.WIDTH,minWidth:xw.WIDTH,maxWidth:xw.WIDTH,cellClass:"ag-checkbox-cell",headerClass:xw.HEADER_CLASS,headerComponent:Ey(Woe),suppressMovable:!0}),tG="blank",ARe=[tG,"__checkboxSelection","options"],IRe=["uiColumnResized","uiColumnMoved","api"],PRe={headerName:"",field:"options",sortable:!1,filter:!1,editable:!0,pinned:"right",lockPosition:!0,suppressMovable:!0,resizable:!1},nG=(e,t)=>t!=null&&t.width?{...e,width:t.width,flex:void 0}:e,kRe=(e,t,n)=>{const{getCachedValue:o,setCachedValue:s}=vf({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=B([]),a=xRe();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=DRe(),v=wp.fromType(PRe),y=!!f,S=((d==null?void 0:d.map(k=>{var O;return{headerName:k.name,field:`metric_${k.id}`,editable:((O=k==null?void 0:k.auth_permission)==null?void 0:O.permission)==2,sortable:!0,filter:!1,flex:1,context:{...k},hide:y?!p.has(`metric_${k.id}`):!(k.is_primary||k.is_point_metric),cellClass:"ag-cell-optimized",headerComponent:Ey(Cl),headerComponentParams:()=>({headerType:k.metric_type.code=="number"||k.metric_type.code=="formula"?"number":"default"})}}))||[]).map(k=>wp.fromType(k)),w=[a,...g,...S,v],E=[],_=[],D=[];for(const k of w)k.pinned==="left"?E.push(k):k.pinned==="right"||k.field===tG?_.push(k):D.push(k);if(!f||f.length===0){i.value=w;return}const x=new Map(D.map(k=>[k.field,k])),M=[];for(const k of f)if(k.field&&x.has(k.field)){const O=x.get(k.field);M.push({...nG(O,k),hide:k.hide}),x.delete(k.field)}const V=Array.from(x.values()),A=[...M,...V].map(k=>({...k,lockPinned:!0})),P=k=>{const O=p.get(k.field),N=nG(k,O);return O&&O.hide!==void 0?{...N,hide:O.hide}:N};i.value=[...E.map(P),...A,..._.map(P)]};Je(e,d=>u(d),{immediate:!0});const c=vr((d,h)=>{if((d==null?void 0:d.source)!==void 0&&!IRe.includes(d.source))return;const f=n.value,p=f==null?void 0:f.getColumnDefs(),g=new Map;if(f==null||f.getColumnState().forEach(y=>{y.width&&g.set(y.colId,Number(y.width))}),i.value=p||i.value,!h)return;const v=(p??[]).filter(y=>y.field&&!ARe.includes(y.field)).map(y=>({field:y.field,hide:y.hide,width:g.get(y.field)||y.width,pinned:y.pinned}));s(t,JSON.stringify(v))},vi);return eC(()=>c.cancel()),{columnDefs:i,checkboxColumn:a,saveColumnConfig:c}},FRe=()=>{const e=ln.getInstance().getItem("API_BASE_URL");return e!=null&&e.includes("v1")?e.slice(0,e.lastIndexOf("/v1")):String(e)},ORe=e=>{var P,k,O;const{showMessage:t,showErrorNetMessage:n}=Ss(),o=Go(),s={domainApi:FRe(),wsCode:ln.getInstance().getItem("ws.code"),entityId:e.value.entityId},r=(O=(k=(P=o==null?void 0:o.appContext)==null?void 0:P.config)==null?void 0:k.globalProperties)==null?void 0:O.apiConfig;if(!r||s.domainApi===""||s.wsCode==="")throw new Error("API configuration is missing in useItems");const i=new aN(r,s);i.on("call-api",N=>{N.success?t(N.apiCode,"success"):n(N)});const a=Po({}),l=B([]),u=B(!1),c=B(null),d=B(null),h=B(1),f=B(20);let p=Promise.resolve();const{setCachedUsers:g}=qZ(),v=N=>({workspaceId:e.value.workspaceId,entityIds:[e.value.entityId],orderBy:"id-asc",include_permission:"{include_permission}",include_permission_names:!0,q:N}),y=50,b=async(N,$,W)=>{if(!N.length)return[];const oe=l9(N,$);return(await Promise.all(oe.map(W))).flat()},S=async N=>{try{return(await i.getPermissionForItems({workspaceId:e.value.workspaceId,itemIds:N})).data.map(W=>[W==null?void 0:W.id,W.permission])}catch($){return console.error("Failed to fetch item permissions chunk:",$),[]}},w=async(N,$)=>{try{const W=await i.getMetricValues({workspaceId:e.value.workspaceId,item_ids:N,per_page:N.length*$.length,metric_ids:$}),oe=W.data.map(ee=>{const se=new Map(ee.item_metrics.map(I=>[I.metric_id,{value:I.value,auth_permission:I==null?void 0:I.auth_permission}])),X=Object.fromEntries($.map(I=>[I,se.get(I)??null]));return[ee==null?void 0:ee.id,X]}),ie=new Set(W.data.map(ee=>ee==null?void 0:ee.id));for(const ee of N)if(!ie.has(ee)){const se=Object.fromEntries($.map(X=>[X,{value:null,auth_permission:void 0}]));oe.push([ee,se])}return oe}catch(W){return console.error("Failed to fetch a chunk of metric values:",W),N.map(ie=>[ie,Object.fromEntries($.map(ee=>[ee,void 0]))])}},E=async N=>{try{const $=await i.getAssignedUser({workspaceId:e.value.workspaceId,item_ids:N,per_page:N.length}),W=$.data.flatMap(oe=>oe.assignees);return g(W),$.data.map(oe=>[oe==null?void 0:oe.id,oe==null?void 0:oe.assignees])}catch($){return console.error("Failed to fetch a chunk of assigned users:",$),[]}},_=async N=>{if(!N.length)return console.warn("getPermissionForItems: Empty itemIds"),{};try{const $=await b(N,y,S);return Object.fromEntries($)}catch($){return console.error("Failed to fetch item permissions:",$),{}}},D=async(N,$)=>!N.length||!$.length?{}:(p=p.then(async()=>{try{const ie=[];let ee=0;for(let X=0;X<$.length;X+=5){ee++;const I=$.slice(X,X+5),z=[];for(let me=0;me<I.length;me++){const xe=I[me],de=await b(N,y,j=>w(j,[xe]));z.push(de),await new Promise(j=>setTimeout(j,500))}ie.push(...z);const ne=X+5>=$.length}const se={};for(const X of ie.flat()){const[I,z]=X;se[I]||(se[I]={}),Object.assign(se[I],z)}return se}catch(W){return console.error("Failed to fetch metric values:",W),{}}}),p),x=async N=>{if(!N.length)return console.warn("getAssignedUsers: Empty itemIds"),{};try{const $=await b(N,y,E);return Object.fromEntries($)}catch($){return console.error("Failed to fetch assigned users:",$),{}}};return{items:l,loading:u,error:c,pagination:d,currentPage:h,pageSize:f,cusorMap:a,fetchItems:async N=>{const{cursor:$,offset:W,size:oe,searchQuery:ie}=N;let ee=[];u.value=!0,c.value=null;try{const se=await i.getAllItem_cursor({...N,cursor:$||void 0,offset:W||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,ee=se.data.map(X=>X==null?void 0:X.id),se}catch(se){throw c.value=se,console.error("Failed to fetch items (cursor):",se),se}finally{const se=async()=>{try{const[X,I]=await Promise.all([x(ee),_(ee)]);e.value.updateItemData({assignees:X,permission:I},ee);const z=await D(ee,e.value.metricIds);e.value.setMetricValues(z,new Set(ee),e.value.metricIds)}catch(X){console.error("Post-fetch processing failed:",X)}};u.value=!1,setTimeout(se)}},getAssignableStatus:async N=>{try{return await i.getAssignableStatus({workspaceId:e.value.workspaceId,itemIds:N})}catch($){throw console.error("Failed to fetch assignable status:",$),$}},getMetricList:async N=>{try{return await i.getMetricList({workspaceId:e.value.workspaceId,entityId:N})}catch($){throw console.error("Failed to fetch metric list:",$),$}},getMetricValues:D,getAssignedUsers:x}};function MRe(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=MZ((o.assignees[u]||[]).map(aO));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 NRe(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 LRe(e){const{selectRowData:t,isSidebarOpen:n,quickFilterText:o,gridApi:s,fetcher:r}=e,i=B(!0),a=B(!0),l=B(!1),u=()=>{n.value=!n.value},c=v=>{if(i.value=!1,s.value=v,!v)return null;const{addEventListener:y,setGridOption:b}=v;if(!r)return console.error("Fetcher function is undefined"),null;const S=NRe(r,e.perPage,()=>o.value,w=>{i.value=w},w=>{a.value=w});return b==null||b("datasource",S),y==null||y("selectionChanged",()=>{t.value=v.getSelectedRows()}),v||null},d=v=>{var y,b;if((y=s.value)==null||y.hideOverlay(),v!==void 0&&(o.value=v),(b=s.value)==null||b.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=vr(v=>{d(v)},vi);return{isLoading:i,toggleSidebar:u,onGridReady:c,onSearch:f,handleUnSelect:h,firstLoad:a,cacheCleared:l,handleSelectAll:()=>{s.value},isSelectAll:B(!1)}}const VRe={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."]}}},BRe=e=>{var t;return(t=Object.entries(VRe.changelog).find(([n,o])=>n===e))==null?void 0:t[1].changes},$Re={class:"visual-btn-visual"},HRe={class:"visual-btn--label"},GRe={key:0,class:"visual-btn--description"},URe={key:1,class:"visual-btn--description"},Aw=Et(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)=>(K(),he("div",{class:ce(["visual-btn",{"visual-btn--disabled":e.disabled}]),onClick:o},[be("div",$Re,[kt(r.$slots,"visual",{},()=>[i[0]||(i[0]=sz('<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)]),be("div",HRe,at(n.label),1),n.disabled?(K(),he("div",GRe," Coming soon ")):(K(),he("div",URe,at(n.description),1))],2))}}),[["__scopeId","data-v-c2003bd7"]]),oG="xlsx_toolbox",sG="feedback_lockup_toolbox",WRe="TOOLBOX_EXPORT_DATA",zRe="https://app.arbocollab.com",jRe=1e3,rG=()=>sessionStorage.getItem("BASE_URL"),iG=(e,t="xlsx-mapping")=>{const n=En("switchInstance",void 0),o=`${t}:load`,s=`${t}:edit`,r=new Set;let i;const a=()=>{const h=t==="xlsx-mapping"?oG:sG,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},`${rG()}`)},jRe);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)!==WRe)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:sG;g=="xlsx_toolbox"&&window.appManager.hide(g)};return Jt(()=>{i=gJ({target:window,allowedOrigins:[rG()||zRe],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}},KRe={class:"header-name"},qRe={class:"description"},YRe={key:0,class:"error-message"},XRe={class:"dynamic"},ZRe={key:1,class:"choose-method-container"},JRe={key:3,class:"select-status-container"},QRe={key:4,class:"result-container"},eTe={key:5,class:"result-container"},tTe={key:0},nTe={key:3},aG="text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel",oTe=20,sTe=Et(ot({__name:"PopupToolboxUploader",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const o=qt,s=Y(()=>[1,2,6].includes(S.value)),r=Y(()=>mv()),i=Y(()=>({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=B({segments:[],count:0}),u=({data:R,count:H,template_flow_status_id:ae})=>{console.log("handleChangeCreateWithCount called with data:",R,"count:",H,"template_flow_status_id:",ae),l.value={segments:R,count:H,template_flow_status_id:ae}},c=B(!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===br.ACCEPTED&&(S.value=7,g("import-success"))}catch(H){$(H),S.value=8}finally{c.value=!1}},h={"--popup-pt":"20px","--popup-pb":"20px","--popup-pl":"24px","--popup-pr":"24px"},f=e,p=Y(()=>mv()),g=n,{apiServices:v}=no(!1,f),y=1,b=B(),S=B(y),w=B(null),E=B(null),_=B(null),D=B(void 0),x=B(null),M=Y(()=>i.value[S.value]),V=B(),A=()=>{var R;w.value=null,S.value=y,E.value=null,_.value=null,O.value=null,x.value=null,(R=V.value)==null||R.clear(),D.value=void 0,l.value={segments:[],count:0}},P=()=>{S.value=6},k=()=>{var R;A(),(R=b.value)==null||R.hide()};Je([E,_],([R,H])=>{S.value===1&&R&&H&&(S.value=2)});const O=B(null),N=R=>Ss().getErrorMessageFromResponse(R),$=R=>{if(console.error(R),typeof R=="string"){O.value=R;return}const H=R.response,ae=H==null?void 0:H.data,pe=N(ae);O.value=pe??R.message},W=async(R,H)=>{var pe;if(!v.value||!f.workspaceId||!f.entityId){console.error("API services not available");return}j.value=!0;const ae=new FormData;ae.append("file",R),ae.append("format",((pe=H??R.name)==null?void 0:pe.split(".").pop())??R.name.split(".").pop()??""),ae.append("entity_id",f.entityId),ae.append("template_flow_status_id",w.value??"");try{await v.value.addNewSceneViaImportFile(f.workspaceId,f.entityId,ae),S.value=3,g("import-success")}catch(Se){console.error("Error uploading file:",Se),$(Se||"An unknown error occurred during file upload."),S.value=4}finally{j.value=!1}},{openToolbox:oe,sendBackErrorFile:ie}=iG(({file:R,fileName:H,channel:ae})=>{ae==="xlsx-mapping"&&(_.value=R,D.value=H??R.name,S.value=2)}),ee=B(null),se=async()=>{var R,H;S.value=6,await ft(),(H=(R=ee.value)==null?void 0:R.focus)==null||H.call(R)},X=async()=>{try{const R=await z();oe({template:R})}catch(R){console.error("Error opening toolbox:",R),Ss().showErrorNetMessage("Failed to open toolbox.")}},I=B(!1),z=async()=>{I.value=!0;const R=f.workspaceId,H=f.entityId;if(!R||!H||!v.value)return I.value=!1,Promise.reject(new Error("Workspace ID or Entity ID is missing"));try{const ae=await v.value.downloadTemplate(R,H,!1);if(!ae)throw new Error("No response from downloadTemplate API");return ae}catch(ae){return console.error("Error downloading template:",ae),Promise.reject(ae)}finally{I.value=!1}},ne=R=>{var pe;const H=((pe=R.name.split(".").pop())==null?void 0:pe.toLowerCase())??"",ae=aG.split(",").map(Se=>Se.trim()).includes(R.type)||a.includes(H);return ae||(console.error("Invalid file type:",R.type),Ss().addNotification({id:"invalid-file-type",message:"Invalid file type. Please upload a xlsx, xls, csv file.",type:"error"})),ae},me=async()=>{const R=document.createElement("input");R.type="file",R.accept=`${aG}, ${a.map(H=>`.${H}`).join(", ")}`,R.onchange=async()=>{var ae;const H=(ae=R.files)==null?void 0:ae[0];if(H){if(!ne(H)){A();return}E.value=Xm(H);try{const pe=await z();if(!pe){Ss().addNotification({id:"failed-download-template",message:"Failed to download template file.",type:"error"});return}oe({source:H,template:pe})}catch(pe){console.error("Error opening toolbox:",pe),Ss().addNotification({id:"failed-open-toolbox",message:"Failed to open toolbox.",type:"error"})}}},R.click()},xe=async R=>{var H;if(!((H=v.value)!=null&&H.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:oTe})},de=Y(()=>{var R;return l.value.count==0||!((R=l.value.segments)!=null&&R.length)}),j=B(!1),q=()=>{w.value=null,_.value&&D.value&&ie(_.value,D.value)},re=()=>{w.value&&_.value&&W(_.value,D.value)};return t({open:()=>{var R;return(R=b.value)==null?void 0:R.show()},close:()=>{var R;return(R=b.value)==null?void 0:R.hide()},hideFirstStep:()=>{var R;S.value===1&&((R=b.value)==null||R.hide())}}),(R,H)=>(K(),ze(L(bN),Kt({ref_key:"popupRef",ref:b,style:h,onHidden:A},{popupIndex:10,popupName:M.value.title,minWidth:"420px",showOverlay:!0,overlayOpacity:.5,closeOnOverlayClick:!1,closeOnEscape:!0,showCloseBtn:s.value}),Lh({header:we(()=>[be("span",KRe,at(M.value.title),1)]),default:we(()=>[be("div",{class:ce(["modal-body",{"bulk-count":S.value===6,"choose-method":S.value===1}])},[be("div",qRe,at(M.value.description),1),O.value&&S.value===4?(K(),he("div",YRe,[H[1]||(H[1]=tt(" Error code ",-1)),be("span",XRe,at(O.value),1)])):qe("",!0),S.value===1?(K(),he("div",ZRe,[ye(Aw,{disabled:!1,label:"Create by count",description:"Enter how many to create.",onOnClick:se},{visual:we(()=>[ye(L(pa),{src:"CreateByCount",size:65})]),_:1}),ye(Aw,{disabled:!1,label:"Start with a blank sheet",description:`Type or paste ${r.value} details
253
253
  into a table.`,onOnClick:X},{visual:we(()=>[ye(L(pa),{src:"BlankSheet",size:65})]),_:1},8,["description"]),ye(Aw,{label:"Import from file",description:`Create ${r.value} from a CSV or
254
254
  Excel file.`,onOnClick:me},{visual:we(()=>[ye(L(pa),{src:"UploadFile",size:65,"max-width":"65"})]),_:1},8,["description"])])):qe("",!0),S.value===6?(K(),ze(L(iue),{key:2,ref_key:"bulkCreateCountRef",ref:ee,"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"])):S.value===2?(K(),he("div",JRe,[ye(L(jN),{modelValue:w.value,"onUpdate:modelValue":H[0]||(H[0]=ae=>w.value=ae),"get-status-func":xe,"workspace-id":f.workspaceId,id:f.entityId,style:{width:"100%"},"max-width":"372px",ref_key:"selectStatusRef",ref:V},null,8,["modelValue","workspace-id","id"])])):S.value===3||S.value===7?(K(),he("div",QRe,[ye(L(pa),{src:"Success",width:240,height:180,ratio:"unset"})])):S.value===4||S.value===8?(K(),he("div",eTe,[ye(L(pa),{src:"Failed",width:240,height:180,ratio:"unset"})])):qe("",!0)],2)]),_:2},[S.value===2||S.value===4||S.value===3||S.value===6||S.value===7||S.value===8?{name:"footer",fn:we(()=>[S.value==6?Ue((K(),he("div",tTe,[ye(L(bt),{variant:"primary",loading:c.value,disabled:de.value||c.value,onClick:d},{default:we(()=>[...H[2]||(H[2]=[tt(" Create ",-1)])]),_:1},8,["loading","disabled"])])),[[L(o),{content:de.value?"Add a name or a counter first.":void 0,bypassOverflowCheck:!0}]]):qe("",!0),S.value===4||S.value===8?(K(),ze(L(bt),{key:1,variant:"secondary",onClick:k},{default:we(()=>[...H[3]||(H[3]=[tt(" Close ",-1)])]),_:1})):S.value===3?(K(),ze(L(bt),{key:2,variant:"secondary",onClick:k},{default:we(()=>[...H[4]||(H[4]=[tt(" Got it ",-1)])]),_:1})):qe("",!0),S.value===2?Ue((K(),he("div",nTe,[ye(L(bt),{loading:j.value,disabled:j.value||!w.value,onClick:re},{default:we(()=>[...H[5]||(H[5]=[tt(" Import ",-1)])]),_:1},8,["loading","disabled"])])),[[L(o),{content:j.value||!w.value?"Select a status first":void 0,bypassOverflowCheck:!0}]]):qe("",!0),S.value===4?(K(),ze(L(bt),{key:4,onClick:q},{default:we(()=>[...H[6]||(H[6]=[tt(" Try Again ",-1)])]),_:1})):qe("",!0),S.value===8?(K(),ze(L(bt),{key:5,onClick:P},{default:we(()=>[...H[7]||(H[7]=[tt("Try Again",-1)])]),_:1})):qe("",!0),S.value===7?(K(),ze(L(bt),{key:6,onClick:k,variant:"secondary"},{default:we(()=>[...H[8]||(H[8]=[tt(" Got it ",-1)])]),_:1})):qe("",!0)]),key:"0"}:void 0]),1040))}}),[["__scopeId","data-v-d3b93ab0"]]),rTe={class:"header-name"},iTe={class:"modal-body"},aTe={class:"description"},lTe={key:0,class:"error-message"},uTe={class:"dynamic"},cTe={key:1,class:"choose-method-container"},dTe={key:2,class:"result-container"},hTe={key:3,class:"result-container"},fTe={key:2},lG="text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel",pTe=Et(ot({__name:"PopupBulkUpdate",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const o=qt,s=Y(()=>[1,2].includes(f.value)),r=Y(()=>mv()),i=Y(()=>({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}=no(!1,l),d=1,h=B(),f=B(d),p=B(null),g=B(null),v=B(null),y=B(void 0),b=B(null),S=Y(()=>i.value[f.value]),w=B(),E=()=>{var ie;p.value=null,f.value=d,g.value=null,v.value=null,_.value=null,b.value=null,(ie=w.value)==null||ie.clear(),y.value=void 0};Je([g,v],([ie,ee])=>{f.value===1&&ie&&ee&&(f.value=2)});const _=B(null),D=ie=>Ss().getErrorMessageFromResponse(ie),x=ie=>{if(typeof ie=="string"){_.value=ie;return}const ee=ie.response,se=ee==null?void 0:ee.data,X=D(se);_.value=X??ie.message,console.log("Error message set to:",{errorMsg:X,message:ie})},M=async(ie,ee)=>{var I;$.value=!0;const se=new FormData,X=((I=ie.name.split(".").pop())==null?void 0:I.toString())||"";if(se.append("file",ie),se.append("format",X),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(z){console.error("Error uploading file:",z),x(z),f.value=4}finally{$.value=!1,window.appManager.hide("feedback_lockup_toolbox")}},{openToolbox:V,sendBackErrorFile:A}=iG(({file:ie,fileName:ee,channel:se})=>{se==="feedback-merge"&&(v.value=ie,y.value=ee??ie.name,M(ie))},"feedback-merge"),P=B(!1),k=async()=>{P.value=!0;const ie=l.workspaceId,ee=l.entityId;if(!ie||!ee||!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,ee,!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}},O=ie=>{const ee=lG.includes(ie.type);return ee||(console.error("Invalid file type:",ie.type),Ss().addNotification({id:"invalid-file-type",message:"Invalid file type. Please upload a xlsx, xls, csv file.",type:"error"})),ee},N=async()=>{const ie=document.createElement("input");ie.type="file",ie.accept=lG,ie.onchange=async()=>{var se;const ee=(se=ie.files)==null?void 0:se[0];if(ee){if(!O(ee)){E();return}g.value=Xm(ee);try{const X=await k();if(!X){Ss().addNotification({id:"failed-download-template",message:"Failed to download file.",type:"error"});return}V({exportFile:X,feedbackFile:ee})}catch(X){console.error("Error opening toolbox:",X),Ss().addNotification({id:"failed-open-toolbox",message:"Failed to open toolbox.",type:"error"})}}},ie.click()},$=B(!1),W=()=>{p.value=null,v.value&&y.value&&A(v.value,y.value)},oe=()=>{p.value&&v.value&&($.value=!0,M(v.value,y.value).finally(()=>{$.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()},hideFirstStep:()=>{var ie;f.value===1&&((ie=h.value)==null||ie.hide())}}),(ie,ee)=>(K(),ze(L(bN),Kt({ref_key:"popupRef",ref:h,style:a,onHidden:E},{popupIndex:10,popupName:S.value.title,minWidth:"420px",showOverlay:!0,overlayOpacity:.5,closeOnOverlayClick:!1,closeOnEscape:!0,showCloseBtn:s.value}),Lh({header:we(()=>[be("span",rTe,at(S.value.title),1)]),default:we(()=>[be("div",iTe,[be("div",aTe,at(S.value.description),1),_.value&&f.value===4?(K(),he("div",lTe,[ee[2]||(ee[2]=tt(" Error code ",-1)),be("span",uTe,at(_.value),1)])):qe("",!0),f.value===1?(K(),he("div",cTe,[ye(Aw,{disabled:!1,label:"Import from file",description:`Update ${r.value} from a CSV or Excel file.`,onOnClick:N,style:{width:"100%"}},{visual:we(()=>[ye(L(pa),{src:"UploadFile",size:65})]),_:1},8,["description"])])):f.value===3?(K(),he("div",dTe,[ye(L(pa),{src:"Success",width:240,height:180,ratio:"unset"})])):f.value===4?(K(),he("div",hTe,[ye(L(pa),{src:"Failed",width:240,height:180,ratio:"unset"})])):qe("",!0)])]),_:2},[f.value===4||f.value===3?{name:"footer",fn:we(()=>[f.value===4?(K(),ze(L(bt),{key:0,variant:"secondary",onClick:ee[0]||(ee[0]=()=>{var se;E(),(se=h.value)==null||se.hide()})},{default:we(()=>[...ee[3]||(ee[3]=[tt(" Close ",-1)])]),_:1})):f.value===3?(K(),ze(L(bt),{key:1,variant:"secondary",onClick:ee[1]||(ee[1]=()=>{var se;E(),(se=h.value)==null||se.hide()})},{default:we(()=>[...ee[4]||(ee[4]=[tt(" Got it ",-1)])]),_:1})):qe("",!0),f.value===2?Ue((K(),he("div",fTe,[ye(L(bt),{loading:$.value,disabled:$.value||!p.value,onClick:oe},{default:we(()=>[...ee[5]||(ee[5]=[tt(" Import ",-1)])]),_:1},8,["loading","disabled"])])),[[L(o),{content:$.value||!p.value?"Select a status first":void 0,bypassOverflowCheck:!0}]]):qe("",!0),f.value===4?(K(),ze(L(bt),{key:3,onClick:W},{default:we(()=>[...ee[6]||(ee[6]=[tt(" Try Again ",-1)])]),_:1})):qe("",!0)]),key:"0"}:void 0]),1040))}}),[["__scopeId","data-v-f3131e7b"]]),gTe=Et(ot({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const n=Vs,o=eE(),{setUserPermissions:s,setEntityPermissions:r}=o,{entityPermissions:i}=go(o),a=qt,l=Do,u=Mv(),{entityData:c}=go(u),d={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},h=B(""),f=Y(()=>{var We;const Ae=((We=i.value)==null?void 0:We.has_create_item_permission)==1||!1;return[{label:"Create in bulk",value:"import_scenes",type:"text",id:"import_scenes_option",hide:!Ae},{label:"Update in bulk",value:"bulk_update",type:"text",hide:!Ae,id:"bulk_update_option"}]}),p=e;wp.initialize({wrapVueCellRenderer:Ey,wrapVueCellEditor:kV});const g=md(),{switchInstanceFunc:v}=go(g);Jt(()=>{const Ae=Go();v.value=Ae==null?void 0:Ae.appContext.config.globalProperties.switchInstance;const We=new BroadcastChannel("focusable_channel");ft(()=>{setTimeout(()=>{We.postMessage("Focusable elements updated")},7e3)})});const y=B(null),b=B([]),S=Vf(),{rowCount:w}=go(S),E=B(!1),_=B(""),D=B(),x=ZO(),{metricList:M}=go(x),V=B(""),A=B(!1),P=B(new Set),k=B(new Map),{apiServices:O}=no(!1,p),{columnDefs:N,checkboxColumn:$,saveColumnConfig:W}=kRe(M,p.entityId,y),oe=B();Je(()=>N,()=>{var Ae;(Ae=oe.value)==null||Ae.updateColumnDefs(N.value)},{deep:!0});const ie=(Ae,We)=>{W(Ae,We)},{updateRowData:ee,setMetricValues:se}=MRe(y),X=Y(()=>({isSearching:_.value.length>0,isFiltering:!(Object.keys(U.value||{}).length==1&&Object.keys(U.value)[0]=="preflight_status")&&Object.keys(U.value||{}).length>0})),I=Y(pv),z=Y(()=>N.value.filter(Ae=>{var We;return((We=Ae.field)==null?void 0:We.startsWith("metric_"))&&!Ae.hide}).map(Ae=>{var We;return((We=Ae.field)==null?void 0:We.replace("metric_",""))||""}));ri("timezone",I);const ne=Y(()=>({autoFetch:!1,workspaceId:p.workspaceId,entityId:p.entityId,metricIds:z.value,updateItemData:ee,setMetricValues:se})),{fetchItems:me,getMetricList:xe,cusorMap:de,getMetricValues:j}=ORe(ne),q=Y(()=>{if(!y.value)return!1;const Ae=y.value.getSelectedRows().length;return Ae>0&&Ae>=w.value.total}),re=Y(()=>{var Ae;return((Ae=c.value)==null?void 0:Ae.name)||"Items"}),R=Ae=>{setTimeout(()=>{ft(()=>{var We,Ft;y.value&&(Ae?(We=y.value)==null||We.showNoRowsOverlay():(Ft=y.value)==null||Ft.hideOverlay())})},500)},H=(Ae,We)=>{var Ft;w.value.total=Ae.meta.total??0,(Ft=Ae.meta.next)!=null&&Ft.cursor&&(de[We+1]=Ae.meta.next.cursor),V.value=Ae.meta["X-Tsr-signature"]||"",Ae.meta.total===0?R(!0):R(!1)},ae=dE(),{setDefaultSort:pe}=ae,Se=B(null),{sortingAPIConfiguration:Ce,isSortingRunning:Z}=go(ae),U=B({preflight_status:"1"}),te=Y(()=>({...U.value,search:_.value}));ri("filterParams",te);const le=B([]),Ye=Y(()=>{var Ae;return((Ae=c.value)==null?void 0:Ae.name)||"Items"}),Be=async({page:Ae,pageSize:We,filterText:Ft})=>{var uo,qo,ks;(uo=y.value)==null||uo.hideOverlay();const Mt=de[Ae],bo=!Mt&&Ae>1?(Ae-1)*We:void 0,Yn=Ce.value;Yn.length>0&&(Z.value=!0);try{const hc={cursor:Mt,size:We,searchQuery:Ft,offset:bo,sort_by:Yn,...U.value},zl=await me(hc);if(!zl)return{rows:[],total:0};const Ki=(ks=(qo=zl.meta)==null?void 0:qo.extra)==null?void 0:ks.default_sort;Ki&&pe(Ki);const fh=(Iw=>{const nn=Iw.data.map(fc=>uO(fc,I.value,Ye.value));return nn.forEach(fc=>{P.value.add(String(fc.id)),k.value.set(String(fc.id),{})}),nn})(zl);return H(zl,Ae),{rows:fh,total:w.value.total}}catch(hc){return console.error("Failed to fetch items:",hc),{rows:[],total:0}}finally{Z.value=!1}},{isLoading:je,toggleSidebar:Oe,onGridReady:nt,handleUnSelect:Ze,handleSelectAll:Te,onSearch:He,firstLoad:_t}=LRe({selectRowData:B([]),isSidebarOpen:E,quickFilterText:_,gridApi:y,perPage:d.ROWS_PER_PAGE,fetcher:Be}),Vt=B([]),Yt=vr(()=>{var Yn;const Ae=((Yn=y.value)==null?void 0:Yn.getSelectedRows())||[],We=new Map(Ae.map(uo=>[uo.id,uo])),bo=Ae.map(uo=>uo.id).map(uo=>{var qo,ks;return[uo,(ks=(qo=y.value)==null?void 0:qo.getRowNode(uo))==null?void 0:ks.rowIndex]}).sort((uo,qo)=>(uo[1]??0)-(qo[1]??0)).map(([uo])=>We.get(uo));Vt.value=bo.filter(uo=>uo!==void 0)}),Mn=Po({columnsDisplay:[],rowsDisplay:{fromIndex:0,toIndex:0}}),Ne=Y(()=>({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:Ve,noRowsOverlayComponent:Ey(zse),noRowsOverlayComponentParams:()=>X.value,defaultColDef:{editable:!1,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:Ae=>Ae.data.id,rowClassRules:{"row-deleted":Ae=>{var We;return(We=Ae.data)==null?void 0:We.isDeleted},"row-locked":Ae=>{var We;return(We=Ae.data)==null?void 0:We.isLocked},"row-archived":Ae=>{var We;return(We=Ae.data)==null?void 0:We.isArchived},"row-process-locked":Ae=>{var We,Ft;return((Ft=(We=Ae.data)==null?void 0:We.isProcessing)==null?void 0:Ft.state)==0},"row-inactive":Ae=>{var We;return!((We=Ae.data)!=null&&We.id)},"row-empty":Ae=>!Ae.data},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:p.workspaceId,entityId:p.entityId,apiServices:O.value,sorting:Z.value},onCellKeyDown:Ae=>{var We,Ft,Mt;if(Ae.data.isDeleted)return!1;if(((We=Ae==null?void 0:Ae.event)==null?void 0:We.key)==="Enter"){const{api:bo,node:Yn,column:uo}=Ae,qo=bo.getCellRendererInstances({rowNodes:[Yn],columns:[uo]});if(qo.length>0){const ks=qo[0];ks&&typeof((Ft=ks.componsenExposed)==null?void 0:Ft.focus)=="function"&&((Mt=ks.componsenExposed)==null||Mt.focus())}}},isRowSelectable:Ae=>{var We,Ft;return!Ae.group&&((Ft=(We=Ae.data)==null?void 0:We.isProcessing)==null?void 0:Ft.state)!=0},suppressKeyboardEvent:Ae=>{var Mt;if((Mt=Ae.data)!=null&&Mt.isDeleted)return!0;const We=Ae.event.key,Ft=Ae.editing;return Ft&&We==="Tab"?!0:Ft&&We==="Enter"?!1:We==="Enter"?(Ae.event.preventDefault(),Ae.event.stopPropagation(),!0):We==="ArrowUp"||We==="ArrowDown"||We==="ArrowLeft"||We==="ArrowRight"||We==="Tab"||We==="Enter"},navigateToNextCell:()=>null,onBodyScroll:Ae=>{const We=Ae.api.getFirstDisplayedRowIndex(),Ft=Ae.api.getLastDisplayedRowIndex();Mn.rowsDisplay.fromIndex=We,Mn.rowsDisplay.toIndex=Ft,Mn.columnsDisplay=Ae.api.getAllDisplayedVirtualColumns().map(Mt=>Mt.getColId())},onViewportChanged:Ae=>{Mn.columnsDisplay=Ae.api.getAllDisplayedVirtualColumns().map(We=>We.getColId())},suppressHeaderFocus:!0,onCellEditingStarted(Ae){if(Ae.data.isDeleted&&Ae.api.stopEditing(),Ae.colDef.field=="options"){const We=Ae.api.getCellRendererInstances({rowNodes:[Ae.node],columns:[Ae.column]});We.length>0&&We[0].focusUi()}},tabToNextCell:Ae=>{let We=Ae.nextCellPosition;if(We&&We.column.getColId()==="ag-Grid-SelectionColumn"){const Ft=Ae.api.getAllDisplayedColumns(),Mt=Ft.indexOf(We.column),bo=Ae.backwards?-1:1,Yn=Ft[Mt+bo];if(Yn)return{rowIndex:We.rowIndex,column:Yn,rowPinned:We.rowPinned}}return We}}));function Ve(){if(!y.value)return;let Ae=0;y.value.forEachNode(We=>{We.data&&Ae++}),w.value.loaded=Math.min(Ae,w.value.total)}Je(()=>Ce,()=>{y.value&&(V.value="",P.value.clear(),y.value.deselectAll(),Object.keys(de).forEach(Ae=>delete de[Number(Ae)]),y.value.purgeInfiniteCache(),y.value.ensureIndexVisible(0))},{deep:!0});const Rt=B(),jt=B(),Xt=()=>{ps.showPopupBulkUpdate=!0,ft(()=>{var Ae;(Ae=jt.value)==null||Ae.open()})},st=()=>{ps.showPopupToolboxUploader=!0,ft(()=>{var Ae;(Ae=Rt.value)==null||Ae.open()})},lo=B(!1),Qr=async()=>{if(O.value)try{lo.value=!0;const Ae=await O.value.downloadExportedItemsFile(p.workspaceId,p.entityId),We=new Blob([Ae],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),Ft=URL.createObjectURL(We),Mt=document.createElement("a");Mt.href=Ft,Mt.download=`exported_items_${new Date().toISOString()}.xlsx`,document.body.appendChild(Mt),Mt.click(),document.body.removeChild(Mt),URL.revokeObjectURL(Ft)}catch(Ae){console.error("Failed to download exported items file:",Ae)}finally{lo.value=!1}},Js=async()=>{_t.value=!0,y.value&&(V.value="",P.value.clear(),Object.keys(de).forEach(Ae=>delete de[Number(Ae)]),await y.value.deselectAll(),await y.value.ensureIndexVisible(0,"top"),await y.value.purgeInfiniteCache(),await y.value.refreshInfiniteCache())},Fr=Y(()=>ln.getInstance().getItem("ITEM_TABLE_APP_VERSION")||""),$i=B();Y(()=>{var Ae;return(Ae=BRe(Fr.value))==null?void 0:Ae.map(We=>`<div>• ${We}</div>`).join(`
255
- `)});function Hi(Ae){var We;Ae==="new_scene"?(We=$i.value)==null||We.show():Ae==="import_scenes"?st():Ae==="overwrite_scenes"?openPopupOverwriteScenes():Ae==="bulk_update"&&Xt()}const Gi=Ae=>{b.value=Ae.api.getSelectedRows().map(We=>We.id)},Ui=Ae=>{const We=nt(Ae);return We&&(We.addEventListener("modelUpdated",Ve),We.addEventListener("bodyScroll",()=>We.stopEditing()),We.addEventListener("selectionChanged",Yt),We.addEventListener("columnMoved",Mt=>ie(Mt,!0)),We.addEventListener("columnResized",Mt=>ie(Mt,!0)),We.addEventListener("firstDataRendered",()=>{_t.value=!1}),!document.querySelector(".ag-body-viewport"))||Ae==null||Ae.setColumnsVisible(["ag-Grid-SelectionColumn"],!1),We},Ps=()=>{var Ae;h.value=(((Ae=document.getElementById("item-table-layout-id"))==null?void 0:Ae.clientHeight)??0)-78+"px"};Jt(()=>{ft(()=>{Ps()}),window.addEventListener("resize",Ps);function Ae(){requestAnimationFrame(Ae)}Ae()}),Vn(()=>{window.removeEventListener("resize",Ps)});const Wi=async({code:Ae,name:We})=>{await He(Ae),setTimeout(()=>{var Ft;(Ft=D.value)==null||Ft.setValue(We)},300)},uh=Ae=>{if(!y.value)return;const We=y.value.getRowNode(Ae);We?(y.value.ensureIndexVisible(Number(We.rowIndex),"middle"),y.value.flashCells({rowNodes:[We],flashDuration:3e3,fadeDuration:1e3})):y.value.ensureIndexVisible(w.value.total-1,"bottom")},Nn=Ae=>Ae.metric_type.code==="number"?"number":"default",Co=async()=>{if(p.entityId)try{const Ae=await xe(p.entityId);M.value=Ae.data.map(We=>({...We,sortType:Nn(We)}))}catch(Ae){console.error("Failed to initialize metric list:",Ae),M.value=[]}},nT=async()=>{if(O.value)try{const Ae=await O.value.getUserPermission(p.workspaceId);s(Ae)}catch(Ae){console.error("Failed to fetch user permissions:",Ae)}},ch=async()=>{if(O.value)try{const Ae=await O.value.getEntityDetail(p.workspaceId,p.entityId);r(Ae.permission),c.value=Ae}catch(Ae){console.error("Failed to fetch entity details:",Ae)}},dc=hy(),{setUser:dh}=dc,oT=async()=>{if(O.value)try{const Ae=await O.value.getMe();return dh(Ae),Ae}catch(Ae){console.error("Failed to fetch user details:",Ae)}},zi=async()=>{var Ae;if(O.value)try{const We=await O.value.getWorkspaces(p.workspaceId),Ft=(Ae=We.data[0])==null?void 0:Ae.ws_user_role_id;return Ft&&dc.setUserRoleId(Ft),We}catch(We){console.error("Failed to fetch workspace details:",We)}};Je(()=>[p.entityId,p.workspaceId],async([Ae,We])=>{!Ae||!We||(oT(),zi(),Co(),nT(),ch())},{immediate:!0,deep:!0}),Je(z,(Ae,We)=>{const Ft=Ae.filter(Mt=>!(We!=null&&We.includes(Mt)));Ft.length>0&&j(Array.from(P.value),Ft).then(Mt=>{se(Mt,P.value,Ft)})},{immediate:!0,deep:!0}),Je(V,(Ae,We)=>{A.value=!!(We&&Ae&&We!==Ae)}),t({refreshTable:Js});const Wl=Ae=>{U.value=Ae,Js()},ji=Ae=>{le.value=Ae,Js()},hh=Ae=>{N.value=Ae||[],ie({},!0)},sT=Y(()=>{var Mt;const Ae=ln.getInstance().getItem("ws.terminology"),We=Ae?JSON.parse(Ae):null;return`New ${((Mt=We==null?void 0:We.find(bo=>bo.code==="scene"))==null?void 0:Mt.name)||"Scene"}`}),ps=Po({showPopupBulkUpdate:!1,showPopupToolboxUploader:!1,showPopupSceneCreator:!1,showPopupItemDetails:!1,showPopupOverwriteScenes:!1}),og=Ae=>{var bo,Yn;const We=Ae.data,{action:Ft,type:Mt}=We;console.log("App loader close event received:",We),Ft=="APP_LOADER:HIDE"&&(Mt==="xlsx_toolbox"||Mt==="feedback_lockup_toolbox")&&((bo=Rt.value)==null||bo.hideFirstStep(),(Yn=jt.value)==null||Yn.hideFirstStep())};return Jt(()=>{window.addEventListener("message",og)}),Vn(()=>{window.removeEventListener("message",og)}),(Ae,We)=>(K(),ze(L(Loe),{"is-sidebar-open":E.value,onCloseSidebar:L(Oe),onSidebarClear:L(Oe),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:L(Oe)},{"header-left":we(()=>{var Ft;return[((Ft=L(i))==null?void 0:Ft.has_create_item_permission)==1?(K(),ze(L(YE),{key:0,variant:["primary"],options:f.value,onSelect:Hi,onHandleClick:We[1]||(We[1]=Mt=>Hi("new_scene")),id:"create_scene_dropdown",tabIndex:2},{prefix:we(()=>[Ue(ye(L(bt),{"data-focus-index":"1",id:"create_new_scene",variant:["primary"],onClick:We[0]||(We[0]=Mt=>Hi("new_scene")),label:sT.value},null,8,["label"]),[[L(l),1]])]),_:1},8,["options"])):qe("",!0)]}),"header-actions":we(()=>[ye(L(Pre),{"onUpdate:assignees":ji,onApplyFilter:Wl,loading:L(_t),entityId:p.entityId},null,8,["loading","entityId"]),Ue(ye(L(wE),{focusIndex:"4",modelValue:_.value,"onUpdate:modelValue":We[2]||(We[2]=Ft=>_.value=Ft),onSearch:L(He),class:ce(Ae.$style.itemSearchBox),onClear:We[3]||(We[3]=Ft=>L(He)("")),id:"item_search_box",ref_key:"searchBoxRef",ref:D},null,8,["modelValue","onSearch","class"]),[[L(n),{isLoading:L(_t),fullwidth:!0}]]),Ue((K(),ze(L(zO),{status:L(je)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":A.value},{default:we(()=>[Ue((K(),ze(L(bt),{variant:["secondary","icon"],disabled:L(je),onClick:Js},{default:we(()=>[ye(L(gt),{src:"ArrowsRotate"})]),_:1},8,["disabled"])),[[L(l),5],[L(a),"Refresh"]])]),_:1},8,["status","show-badge"])),[[L(n),{isLoading:L(_t),fullwidth:!0}]]),Ue((K(),ze(L(bt),{variant:["secondary","icon"],onClick:Qr,disabled:lo.value,loading:lo.value},{default:we(()=>[ye(L(gt),{src:"Download"})]),_:1},8,["disabled","loading"])),[[L(a),"Download"],[L(n),{isLoading:L(_t),fullwidth:!0}]]),Ue(ye(L(Gse),{"model-value":L(N),onChange:We[4]||(We[4]=Ft=>hh(Ft)),id:"table_customization",gridApi:y.value,ref_key:"tableCustomizationRef",ref:oe,"checkbox-column":L($),tableHeight:h.value},null,8,["model-value","gridApi","checkbox-column","tableHeight"]),[[L(n),{isLoading:L(_t),fullwidth:!0}]])]),grid:we(({availableHeight:Ft})=>[ye(L(TRe),Kt({id:"item_table_main",ref_key:"agGrid",ref:Se},Ne.value,{height:Ft+"px",isSorting:L(Z),onOnGridReady:Ui,onSelectionChanged:Gi}),null,16,["height","isSorting"])]),footer:we(()=>[be("div",{class:ce(Ae.$style.tableFooter),id:"table_footer"},[be("span",null,[We[7]||(We[7]=tt(" Showing ",-1)),be("b",null,at(L(w).loaded)+" of "+at(L(w).total),1)])],2)]),"new-row":we(()=>[ye(L(ure),{ref_key:"createNewSceneRef",ref:$i,onSearchForCode:Wi,onFocusOnId:uh},null,512)]),"bulk-update-actions":we(()=>[!E.value&&b.value.length>0?Ue((K(),ze(L(Aoe),{key:0,selectRowData:Vt.value,"workspace-id":p.workspaceId,"entity-id":p.entityId,"grid-api":y.value,onUnselect:L(Ze),onSelectAll:L(Te),"take-name":re.value,"selected-all":q.value,"total-rows":L(w).total,"visible-rows":L(w).loaded,onUpdated:L(Yt),loading:L(je),onRefreshSelectedRow:L(Yt)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","onSelectAll","take-name","selected-all","total-rows","visible-rows","onUpdated","loading","onRefreshSelectedRow"])),[[lr,!E.value&&b.value.length>0]]):qe("",!0)]),snackbar:we(()=>[ye(L(Zoe))]),popup:we(()=>[ps.showPopupToolboxUploader?(K(),ze(sTe,{key:0,ref_key:"popupToolboxUploaderRef",ref:Rt,"workspace-id":p.workspaceId,"entity-id":p.entityId,onImportSuccess:Js,onHide:We[5]||(We[5]=Ft=>ps.showPopupToolboxUploader=!1)},null,8,["workspace-id","entity-id"])):qe("",!0),ps.showPopupBulkUpdate?(K(),ze(pTe,{key:1,ref_key:"popupBulkUpdateRef",ref:jt,"workspace-id":p.workspaceId,"entity-id":p.entityId,onImportSuccess:Js,onHide:We[6]||(We[6]=Ft=>ps.showPopupBulkUpdate=!1)},null,8,["workspace-id","entity-id"])):qe("",!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"}}]]),uG="0.1.254",mTe={key:0},vTe=Et(ot({__name:"app",setup(e){const t=Y(()=>n.id.length===0||n.workspaceId.length===0),n=Po({id:"",workspaceId:"",apiConfig:{}}),o=Ss(),{showMessage:s,showErrorNetMessage:r}=o,i=["basicInfor","importItems"],a=h=>{h.success?s(h.apiCode,"success"):i.includes(h.apiCode)||r(h)},l=B(null),u=()=>{const h=ln.getInstance().getItem("API_BASE_URL");return h!=null&&h.includes("v1")?h.slice(0,h.lastIndexOf("/v1")):String(h)};Ug(()=>{var h,f,p;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",uG);try{if(l.value=Go(),!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)||ln.getInstance().getItem("ws.code");const g={domainApi:u(),wsCode:ln.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 aN(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=Y(()=>n.id),d=Y(()=>n.workspaceId);return ri("workspaceId",d),ri("entityId",c),(h,f)=>(K(),he("div",{class:ce(h.$style.dashboardPluginWrapper)},[t.value?(K(),he("span",mTe," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):c.value?(K(),ze(L(gTe),{key:1,entityId:c.value,workspaceId:d.value},null,8,["entityId","workspaceId"])):qe("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),tT=async(e={},t={})=>{const n=tx(vTe),o=R6();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${uG}`,"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",qt),n.directive("focusable",Do);const i=await Mle();return n.use(i),n};globalThis.window!==void 0&&(globalThis.window.arboDashboard=tT),Ln.default=tT,Ln.initDashboard=tT,Object.defineProperties(Ln,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
255
+ `)});function Hi(Ae){var We;Ae==="new_scene"?(We=$i.value)==null||We.show():Ae==="import_scenes"?st():Ae==="overwrite_scenes"?openPopupOverwriteScenes():Ae==="bulk_update"&&Xt()}const Gi=Ae=>{b.value=Ae.api.getSelectedRows().map(We=>We.id)},Ui=Ae=>{const We=nt(Ae);return We&&(We.addEventListener("modelUpdated",Ve),We.addEventListener("bodyScroll",()=>We.stopEditing()),We.addEventListener("selectionChanged",Yt),We.addEventListener("columnMoved",Mt=>ie(Mt,!0)),We.addEventListener("columnResized",Mt=>ie(Mt,!0)),We.addEventListener("firstDataRendered",()=>{_t.value=!1}),!document.querySelector(".ag-body-viewport"))||Ae==null||Ae.setColumnsVisible(["ag-Grid-SelectionColumn"],!1),We},Ps=()=>{var Ae;h.value=(((Ae=document.getElementById("item-table-layout-id"))==null?void 0:Ae.clientHeight)??0)-78+"px"};Jt(()=>{ft(()=>{Ps()}),window.addEventListener("resize",Ps);function Ae(){requestAnimationFrame(Ae)}Ae()}),Vn(()=>{window.removeEventListener("resize",Ps)});const Wi=async({code:Ae,name:We})=>{await He(Ae),setTimeout(()=>{var Ft;(Ft=D.value)==null||Ft.setValue(We)},300)},uh=Ae=>{if(!y.value)return;const We=y.value.getRowNode(Ae);We?(y.value.ensureIndexVisible(Number(We.rowIndex),"middle"),y.value.flashCells({rowNodes:[We],flashDuration:3e3,fadeDuration:1e3})):y.value.ensureIndexVisible(w.value.total-1,"bottom")},Nn=Ae=>Ae.metric_type.code==="number"?"number":"default",Co=async()=>{if(p.entityId)try{const Ae=await xe(p.entityId);M.value=Ae.data.map(We=>({...We,sortType:Nn(We)}))}catch(Ae){console.error("Failed to initialize metric list:",Ae),M.value=[]}},nT=async()=>{if(O.value)try{const Ae=await O.value.getUserPermission(p.workspaceId);s(Ae)}catch(Ae){console.error("Failed to fetch user permissions:",Ae)}},ch=async()=>{if(O.value)try{const Ae=await O.value.getEntityDetail(p.workspaceId,p.entityId);r(Ae.permission),c.value=Ae}catch(Ae){console.error("Failed to fetch entity details:",Ae)}},dc=hy(),{setUser:dh}=dc,oT=async()=>{if(O.value)try{const Ae=await O.value.getMe();return dh(Ae),Ae}catch(Ae){console.error("Failed to fetch user details:",Ae)}},zi=async()=>{var Ae;if(O.value)try{const We=await O.value.getWorkspaces(p.workspaceId),Ft=(Ae=We.data[0])==null?void 0:Ae.ws_user_role_id;return Ft&&dc.setUserRoleId(Ft),We}catch(We){console.error("Failed to fetch workspace details:",We)}};Je(()=>[p.entityId,p.workspaceId],async([Ae,We])=>{!Ae||!We||(oT(),zi(),Co(),nT(),ch())},{immediate:!0,deep:!0}),Je(z,(Ae,We)=>{const Ft=Ae.filter(Mt=>!(We!=null&&We.includes(Mt)));Ft.length>0&&j(Array.from(P.value),Ft).then(Mt=>{se(Mt,P.value,Ft)})},{immediate:!0,deep:!0}),Je(V,(Ae,We)=>{A.value=!!(We&&Ae&&We!==Ae)}),t({refreshTable:Js});const Wl=Ae=>{U.value=Ae,Js()},ji=Ae=>{le.value=Ae,Js()},hh=Ae=>{N.value=Ae||[],ie({},!0)},sT=Y(()=>{var Mt;const Ae=ln.getInstance().getItem("ws.terminology"),We=Ae?JSON.parse(Ae):null;return`New ${((Mt=We==null?void 0:We.find(bo=>bo.code==="scene"))==null?void 0:Mt.name)||"Scene"}`}),ps=Po({showPopupBulkUpdate:!1,showPopupToolboxUploader:!1,showPopupSceneCreator:!1,showPopupItemDetails:!1,showPopupOverwriteScenes:!1}),og=Ae=>{var bo,Yn;const We=Ae.data,{action:Ft,type:Mt}=We;console.log("App loader close event received:",We),Ft=="APP_LOADER:HIDE"&&(Mt==="xlsx_toolbox"||Mt==="feedback_lockup_toolbox")&&((bo=Rt.value)==null||bo.hideFirstStep(),(Yn=jt.value)==null||Yn.hideFirstStep())};return Jt(()=>{window.addEventListener("message",og)}),Vn(()=>{window.removeEventListener("message",og)}),(Ae,We)=>(K(),ze(L(Loe),{"is-sidebar-open":E.value,onCloseSidebar:L(Oe),onSidebarClear:L(Oe),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:L(Oe)},{"header-left":we(()=>{var Ft;return[((Ft=L(i))==null?void 0:Ft.has_create_item_permission)==1?(K(),ze(L(YE),{key:0,variant:["primary"],options:f.value,onSelect:Hi,onHandleClick:We[1]||(We[1]=Mt=>Hi("new_scene")),id:"create_scene_dropdown",tabIndex:2},{prefix:we(()=>[Ue(ye(L(bt),{"data-focus-index":"1",id:"create_new_scene",variant:["primary"],onClick:We[0]||(We[0]=Mt=>Hi("new_scene")),label:sT.value},null,8,["label"]),[[L(l),1]])]),_:1},8,["options"])):qe("",!0)]}),"header-actions":we(()=>[ye(L(Pre),{"onUpdate:assignees":ji,onApplyFilter:Wl,loading:L(_t),entityId:p.entityId},null,8,["loading","entityId"]),Ue(ye(L(wE),{focusIndex:"4",modelValue:_.value,"onUpdate:modelValue":We[2]||(We[2]=Ft=>_.value=Ft),onSearch:L(He),class:ce(Ae.$style.itemSearchBox),onClear:We[3]||(We[3]=Ft=>L(He)("")),id:"item_search_box",ref_key:"searchBoxRef",ref:D},null,8,["modelValue","onSearch","class"]),[[L(n),{isLoading:L(_t),fullwidth:!0}]]),Ue((K(),ze(L(zO),{status:L(je)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":A.value},{default:we(()=>[Ue((K(),ze(L(bt),{variant:["secondary","icon"],disabled:L(je),onClick:Js},{default:we(()=>[ye(L(gt),{src:"ArrowsRotate"})]),_:1},8,["disabled"])),[[L(l),5],[L(a),"Refresh"]])]),_:1},8,["status","show-badge"])),[[L(n),{isLoading:L(_t),fullwidth:!0}]]),Ue((K(),ze(L(bt),{variant:["secondary","icon"],onClick:Qr,disabled:lo.value,loading:lo.value},{default:we(()=>[ye(L(gt),{src:"Download"})]),_:1},8,["disabled","loading"])),[[L(a),"Download"],[L(n),{isLoading:L(_t),fullwidth:!0}]]),Ue(ye(L(Gse),{"model-value":L(N),onChange:We[4]||(We[4]=Ft=>hh(Ft)),id:"table_customization",gridApi:y.value,ref_key:"tableCustomizationRef",ref:oe,"checkbox-column":L($),tableHeight:h.value},null,8,["model-value","gridApi","checkbox-column","tableHeight"]),[[L(n),{isLoading:L(_t),fullwidth:!0}]])]),grid:we(({availableHeight:Ft})=>[ye(L(TRe),Kt({id:"item_table_main",ref_key:"agGrid",ref:Se},Ne.value,{height:Ft+"px",isSorting:L(Z),onOnGridReady:Ui,onSelectionChanged:Gi}),null,16,["height","isSorting"])]),footer:we(()=>[be("div",{class:ce(Ae.$style.tableFooter),id:"table_footer"},[be("span",null,[We[7]||(We[7]=tt(" Showing ",-1)),be("b",null,at(L(w).loaded)+" of "+at(L(w).total),1)])],2)]),"new-row":we(()=>[ye(L(ure),{ref_key:"createNewSceneRef",ref:$i,onSearchForCode:Wi,onFocusOnId:uh},null,512)]),"bulk-update-actions":we(()=>[!E.value&&b.value.length>0?Ue((K(),ze(L(Aoe),{key:0,selectRowData:Vt.value,"workspace-id":p.workspaceId,"entity-id":p.entityId,"grid-api":y.value,onUnselect:L(Ze),onSelectAll:L(Te),"take-name":re.value,"selected-all":q.value,"total-rows":L(w).total,"visible-rows":L(w).loaded,onUpdated:L(Yt),loading:L(je),onRefreshSelectedRow:L(Yt)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","onSelectAll","take-name","selected-all","total-rows","visible-rows","onUpdated","loading","onRefreshSelectedRow"])),[[lr,!E.value&&b.value.length>0]]):qe("",!0)]),snackbar:we(()=>[ye(L(Zoe))]),popup:we(()=>[ps.showPopupToolboxUploader?(K(),ze(sTe,{key:0,ref_key:"popupToolboxUploaderRef",ref:Rt,"workspace-id":p.workspaceId,"entity-id":p.entityId,onImportSuccess:Js,onHide:We[5]||(We[5]=Ft=>ps.showPopupToolboxUploader=!1)},null,8,["workspace-id","entity-id"])):qe("",!0),ps.showPopupBulkUpdate?(K(),ze(pTe,{key:1,ref_key:"popupBulkUpdateRef",ref:jt,"workspace-id":p.workspaceId,"entity-id":p.entityId,onImportSuccess:Js,onHide:We[6]||(We[6]=Ft=>ps.showPopupBulkUpdate=!1)},null,8,["workspace-id","entity-id"])):qe("",!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"}}]]),uG="0.1.255",mTe={key:0},vTe=Et(ot({__name:"app",setup(e){const t=Y(()=>n.id.length===0||n.workspaceId.length===0),n=Po({id:"",workspaceId:"",apiConfig:{}}),o=Ss(),{showMessage:s,showErrorNetMessage:r}=o,i=["basicInfor","importItems"],a=h=>{h.success?s(h.apiCode,"success"):i.includes(h.apiCode)||r(h)},l=B(null),u=()=>{const h=ln.getInstance().getItem("API_BASE_URL");return h!=null&&h.includes("v1")?h.slice(0,h.lastIndexOf("/v1")):String(h)};Ug(()=>{var h,f,p;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",uG);try{if(l.value=Go(),!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)||ln.getInstance().getItem("ws.code");const g={domainApi:u(),wsCode:ln.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 aN(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=Y(()=>n.id),d=Y(()=>n.workspaceId);return ri("workspaceId",d),ri("entityId",c),(h,f)=>(K(),he("div",{class:ce(h.$style.dashboardPluginWrapper)},[t.value?(K(),he("span",mTe," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):c.value?(K(),ze(L(gTe),{key:1,entityId:c.value,workspaceId:d.value},null,8,["entityId","workspaceId"])):qe("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),tT=async(e={},t={})=>{const n=tx(vTe),o=R6();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${uG}`,"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",qt),n.directive("focusable",Do);const i=await Mle();return n.use(i),n};globalThis.window!==void 0&&(globalThis.window.arboDashboard=tT),Ln.default=tT,Ln.initDashboard=tT,Object.defineProperties(Ln,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});