@arbocollab/arbo-plugin-item-table 0.1.93 → 0.1.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/es/index.es.js +2001 -2001
- package/lib/style.css +1 -1
- package/lib/umd/index.umd.js +8 -8
- package/package.json +1 -1
package/lib/umd/index.umd.js
CHANGED
|
@@ -110,7 +110,7 @@ Expected function or array of functions, received type ${typeof e}.`),ls)}functi
|
|
|
110
110
|
* Date: 2023-02-28T14:09:41.732Z
|
|
111
111
|
*/function x1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,s)}return n}function xg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x1(Object(n),!0).forEach(function(s){bz(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x1(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function wz(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F1(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,P1(s.key),s)}}function Cz(e,t,n){return t&&F1(e.prototype,t),n&&F1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function bz(e,t,n){return t=P1(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fg(){return Fg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Fg.apply(this,arguments)}function Sz(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function P1(e){var t=Sz(e,"string");return typeof t=="symbol"?t:String(t)}var A1={exports:{}};(function(e){typeof window>"u"||function(t){var n=t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype,s=t.Blob&&function(){try{return!!new Blob}catch{return!1}}(),o=s&&t.Uint8Array&&function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}}(),i=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,r=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,a=(s||i)&&t.atob&&t.ArrayBuffer&&t.Uint8Array&&function(l){var u,c,d,h,f,p,g,v,C;if(u=l.match(r),!u)throw new Error("invalid data URI");for(c=u[2]?u[1]:"text/plain"+(u[3]||";charset=US-ASCII"),d=!!u[4],h=l.slice(u[0].length),d?f=atob(h):f=decodeURIComponent(h),p=new ArrayBuffer(f.length),g=new Uint8Array(p),v=0;v<f.length;v+=1)g[v]=f.charCodeAt(v);return s?new Blob([o?g:p],{type:c}):(C=new i,C.append(p),C.getBlob(c))};t.HTMLCanvasElement&&!n.toBlob&&(n.mozGetAsFile?n.toBlob=function(l,u,c){var d=this;setTimeout(function(){c&&n.toDataURL&&a?l(a(d.toDataURL(u,c))):l(d.mozGetAsFile("blob",u))})}:n.toDataURL&&a&&(n.msToBlob?n.toBlob=function(l,u,c){var d=this;setTimeout(function(){(u&&u!=="image/png"||c)&&n.toDataURL&&a?l(a(d.toDataURL(u,c))):l(d.msToBlob(u))})}:n.toBlob=function(l,u,c){var d=this;setTimeout(function(){l(a(d.toDataURL(u,c)))})})),e.exports?e.exports=a:t.dataURLtoBlob=a}(window)})(A1);var k1=A1.exports,Ez=function(t){return typeof Blob>"u"?!1:t instanceof Blob||Object.prototype.toString.call(t)==="[object Blob]"},O1={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},_z=typeof window<"u"&&typeof window.document<"u",Aa=_z?window:{},Pg=function(t){return t>0&&t<1/0},Rz=Array.prototype.slice;function yC(e){return Array.from?Array.from(e):Rz.call(e)}var Dz=/^image\/.+$/;function wC(e){return Dz.test(e)}function Tz(e){var t=wC(e)?e.substr(6):"";return t==="jpeg"&&(t="jpg"),".".concat(t)}var M1=String.fromCharCode;function Iz(e,t,n){var s="",o;for(n+=t,o=t;o<n;o+=1)s+=M1(e.getUint8(o));return s}var xz=Aa.btoa;function N1(e,t){for(var n=[],s=8192,o=new Uint8Array(e);o.length>0;)n.push(M1.apply(null,yC(o.subarray(0,s)))),o=o.subarray(s);return"data:".concat(t,";base64,").concat(xz(n.join("")))}function Fz(e){var t=new DataView(e),n;try{var s,o,i;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var r=t.byteLength,a=2;a+1<r;){if(t.getUint8(a)===255&&t.getUint8(a+1)===225){o=a;break}a+=1}if(o){var l=o+4,u=o+10;if(Iz(t,l,4)==="Exif"){var c=t.getUint16(u);if(s=c===18761,(s||c===19789)&&t.getUint16(u+2,s)===42){var d=t.getUint32(u+4,s);d>=8&&(i=u+d)}}}if(i){var h=t.getUint16(i,s),f,p;for(p=0;p<h;p+=1)if(f=i+p*12+2,t.getUint16(f,s)===274){f+=8,n=t.getUint16(f,s),t.setUint16(f,1,s);break}}}catch{n=1}return n}function Pz(e){var t=0,n=1,s=1;switch(e){case 2:n=-1;break;case 3:t=-180;break;case 4:s=-1;break;case 5:t=90,s=-1;break;case 6:t=90;break;case 7:t=90,n=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:n,scaleY:s}}var Az=/\.\d*(?:0|9){12}\d*$/;function L1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Az.test(e)?Math.round(e*t)/t:e}function _h(e){var t=e.aspectRatio,n=e.height,s=e.width,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",i=Pg(s),r=Pg(n);if(i&&r){var a=n*t;(o==="contain"||o==="none")&&a>s||o==="cover"&&a<s?n=s/t:s=n*t}else i?n=s/t:r&&(s=n*t);return{width:s,height:n}}function kz(e){for(var t=yC(new Uint8Array(e)),n=t.length,s=[],o=0;o+3<n;){var i=t[o],r=t[o+1];if(i===255&&r===218)break;if(i===255&&r===216)o+=2;else{var a=t[o+2]*256+t[o+3],l=o+a+2,u=t.slice(o,l);s.push(u),o=l}}return s.reduce(function(c,d){return d[0]===255&&d[1]===225?c.concat(d):c},[])}function Oz(e,t){var n=yC(new Uint8Array(e));if(n[2]!==255||n[3]!==224)return e;var s=n[4]*256+n[5],o=[255,216].concat(t,n.slice(4+s));return new Uint8Array(o)}var Mz=Aa.ArrayBuffer,CC=Aa.FileReader,Vl=Aa.URL||Aa.webkitURL,Nz=/\.\w+$/,Lz=Aa.Compressor,Vz=function(){function e(t,n){wz(this,e),this.file=t,this.exif=[],this.image=new Image,this.options=xg(xg({},O1),n),this.aborted=!1,this.result=null,this.init()}return Cz(e,[{key:"init",value:function(){var n=this,s=this.file,o=this.options;if(!Ez(s)){this.fail(new Error("The first argument must be a File or Blob object."));return}var i=s.type;if(!wC(i)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!Vl||!CC){this.fail(new Error("The current browser does not support image compression."));return}Mz||(o.checkOrientation=!1,o.retainExif=!1);var r=i==="image/jpeg",a=r&&o.checkOrientation,l=r&&o.retainExif;if(Vl&&!a&&!l)this.load({url:Vl.createObjectURL(s)});else{var u=new CC;this.reader=u,u.onload=function(c){var d=c.target,h=d.result,f={},p=1;a&&(p=Fz(h),p>1&&Fg(f,Pz(p))),l&&(n.exif=kz(h)),a||l?!Vl||p>1?f.url=N1(h,i):f.url=Vl.createObjectURL(s):f.url=h,n.load(f)},u.onabort=function(){n.fail(new Error("Aborted to read the image with FileReader."))},u.onerror=function(){n.fail(new Error("Failed to read the image with FileReader."))},u.onloadend=function(){n.reader=null},a||l?u.readAsArrayBuffer(s):u.readAsDataURL(s)}}},{key:"load",value:function(n){var s=this,o=this.file,i=this.image;i.onload=function(){s.draw(xg(xg({},n),{},{naturalWidth:i.naturalWidth,naturalHeight:i.naturalHeight}))},i.onabort=function(){s.fail(new Error("Aborted to load the image."))},i.onerror=function(){s.fail(new Error("Failed to load the image."))},Aa.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(Aa.navigator.userAgent)&&(i.crossOrigin="anonymous"),i.alt=o.name,i.src=n.url}},{key:"draw",value:function(n){var s=this,o=n.naturalWidth,i=n.naturalHeight,r=n.rotate,a=r===void 0?0:r,l=n.scaleX,u=l===void 0?1:l,c=n.scaleY,d=c===void 0?1:c,h=this.file,f=this.image,p=this.options,g=document.createElement("canvas"),v=g.getContext("2d"),C=Math.abs(a)%180===90,S=(p.resize==="contain"||p.resize==="cover")&&Pg(p.width)&&Pg(p.height),b=Math.max(p.maxWidth,0)||1/0,w=Math.max(p.maxHeight,0)||1/0,_=Math.max(p.minWidth,0)||0,R=Math.max(p.minHeight,0)||0,T=o/i,I=p.width,x=p.height;if(C){var P=[w,b];b=P[0],w=P[1];var D=[R,_];_=D[0],R=D[1];var F=[x,I];I=F[0],x=F[1]}S&&(T=I/x);var k=_h({aspectRatio:T,width:b,height:w},"contain");b=k.width,w=k.height;var O=_h({aspectRatio:T,width:_,height:R},"cover");if(_=O.width,R=O.height,S){var $=_h({aspectRatio:T,width:I,height:x},p.resize);I=$.width,x=$.height}else{var q=_h({aspectRatio:T,width:I,height:x}),J=q.width;I=J===void 0?o:J;var ee=q.height;x=ee===void 0?i:ee}I=Math.floor(L1(Math.min(Math.max(I,_),b))),x=Math.floor(L1(Math.min(Math.max(x,R),w)));var X=-I/2,ve=-x/2,te=I,N=x,V=[];if(S){var ne=0,ie=0,pe=o,ae=i,re=_h({aspectRatio:T,width:o,height:i},{contain:"cover",cover:"contain"}[p.resize]);pe=re.width,ae=re.height,ne=(o-pe)/2,ie=(i-ae)/2,V.push(ne,ie,pe,ae)}if(V.push(X,ve,te,N),C){var W=[x,I];I=W[0],x=W[1]}g.width=I,g.height=x,wC(p.mimeType)||(p.mimeType=h.type);var fe="transparent";h.size>p.convertSize&&p.convertTypes.indexOf(p.mimeType)>=0&&(p.mimeType="image/jpeg");var oe=p.mimeType==="image/jpeg";if(oe&&(fe="#fff"),v.fillStyle=fe,v.fillRect(0,0,I,x),p.beforeDraw&&p.beforeDraw.call(this,v,g),!this.aborted&&(v.save(),v.translate(I/2,x/2),v.rotate(a*Math.PI/180),v.scale(u,d),v.drawImage.apply(v,[f].concat(V)),v.restore(),p.drew&&p.drew.call(this,v,g),!this.aborted)){var Ie=function(Z){if(!s.aborted){var de=function(ye){return s.done({naturalWidth:o,naturalHeight:i,result:ye})};if(Z&&oe&&p.retainExif&&s.exif&&s.exif.length>0){var ke=function(ye){return de(k1(N1(Oz(ye,s.exif),p.mimeType)))};if(Z.arrayBuffer)Z.arrayBuffer().then(ke).catch(function(){s.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var Pe=new CC;s.reader=Pe,Pe.onload=function(Le){var ye=Le.target;ke(ye.result)},Pe.onabort=function(){s.fail(new Error("Aborted to read the compressed image with FileReader."))},Pe.onerror=function(){s.fail(new Error("Failed to read the compressed image with FileReader."))},Pe.onloadend=function(){s.reader=null},Pe.readAsArrayBuffer(Z)}}else de(Z)}};g.toBlob?g.toBlob(Ie,p.mimeType,p.quality):Ie(k1(g.toDataURL(p.mimeType,p.quality)))}}},{key:"done",value:function(n){var s=n.naturalWidth,o=n.naturalHeight,i=n.result,r=this.file,a=this.image,l=this.options;if(Vl&&a.src.indexOf("blob:")===0&&Vl.revokeObjectURL(a.src),i)if(l.strict&&!l.retainExif&&i.size>r.size&&l.mimeType===r.type&&!(l.width>s||l.height>o||l.minWidth>s||l.minHeight>o||l.maxWidth<s||l.maxHeight<o))i=r;else{var u=new Date;i.lastModified=u.getTime(),i.lastModifiedDate=u,i.name=r.name,i.name&&i.type!==r.type&&(i.name=i.name.replace(Nz,Tz(i.type)))}else i=r;this.result=i,l.success&&l.success.call(this,i)}},{key:"fail",value:function(n){var s=this.options;if(s.error)s.error.call(this,n);else throw n}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}],[{key:"noConflict",value:function(){return window.Compressor=Lz,e}},{key:"setDefaults",value:function(n){Fg(O1,n)}}]),e}(),V1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bz(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var B1={exports:{}};(function(e,t){(function(n,s){e.exports=s()})(V1,function(){var n=function(m,y){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,A){E.__proto__=A}||function(E,A){for(var L in A)Object.prototype.hasOwnProperty.call(A,L)&&(E[L]=A[L])})(m,y)},s=function(){return(s=Object.assign||function(m){for(var y,E=1,A=arguments.length;E<A;E++)for(var L in y=arguments[E])Object.prototype.hasOwnProperty.call(y,L)&&(m[L]=y[L]);return m}).apply(this,arguments)};function o(m,y,E){for(var A,L=0,z=y.length;L<z;L++)!A&&L in y||((A=A||Array.prototype.slice.call(y,0,L))[L]=y[L]);return m.concat(A||Array.prototype.slice.call(y))}var i=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:V1,r=Object.keys,a=Array.isArray;function l(m,y){return typeof y!="object"||r(y).forEach(function(E){m[E]=y[E]}),m}typeof Promise>"u"||i.Promise||(i.Promise=Promise);var u=Object.getPrototypeOf,c={}.hasOwnProperty;function d(m,y){return c.call(m,y)}function h(m,y){typeof y=="function"&&(y=y(u(m))),(typeof Reflect>"u"?r:Reflect.ownKeys)(y).forEach(function(E){p(m,E,y[E])})}var f=Object.defineProperty;function p(m,y,E,A){f(m,y,l(E&&d(E,"get")&&typeof E.get=="function"?{get:E.get,set:E.set,configurable:!0}:{value:E,configurable:!0,writable:!0},A))}function g(m){return{from:function(y){return m.prototype=Object.create(y.prototype),p(m.prototype,"constructor",m),{extend:h.bind(null,m.prototype)}}}}var v=Object.getOwnPropertyDescriptor,C=[].slice;function S(m,y,E){return C.call(m,y,E)}function b(m,y){return y(m)}function w(m){if(!m)throw new Error("Assertion Failed")}function _(m){i.setImmediate?setImmediate(m):setTimeout(m,0)}function R(m,y){if(typeof y=="string"&&d(m,y))return m[y];if(!y)return m;if(typeof y!="string"){for(var E=[],A=0,L=y.length;A<L;++A){var z=R(m,y[A]);E.push(z)}return E}var se=y.indexOf(".");if(se!==-1){var ue=m[y.substr(0,se)];return ue==null?void 0:R(ue,y.substr(se+1))}}function T(m,y,E){if(m&&y!==void 0&&!("isFrozen"in Object&&Object.isFrozen(m)))if(typeof y!="string"&&"length"in y){w(typeof E!="string"&&"length"in E);for(var A=0,L=y.length;A<L;++A)T(m,y[A],E[A])}else{var z,se,ue=y.indexOf(".");ue!==-1?(z=y.substr(0,ue),(se=y.substr(ue+1))===""?E===void 0?a(m)&&!isNaN(parseInt(z))?m.splice(z,1):delete m[z]:m[z]=E:T(ue=!(ue=m[z])||!d(m,z)?m[z]={}:ue,se,E)):E===void 0?a(m)&&!isNaN(parseInt(y))?m.splice(y,1):delete m[y]:m[y]=E}}function I(m){var y,E={};for(y in m)d(m,y)&&(E[y]=m[y]);return E}var x=[].concat;function P(m){return x.apply([],m)}var wa="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(P([8,16,32,64].map(function(m){return["Int","Uint","Float"].map(function(y){return y+m+"Array"})}))).filter(function(m){return i[m]}),D=new Set(wa.map(function(m){return i[m]})),F=null;function k(m){return F=new WeakMap,m=function y(E){if(!E||typeof E!="object")return E;var A=F.get(E);if(A)return A;if(a(E)){A=[],F.set(E,A);for(var L=0,z=E.length;L<z;++L)A.push(y(E[L]))}else if(D.has(E.constructor))A=E;else{var se,ue=u(E);for(se in A=ue===Object.prototype?{}:Object.create(ue),F.set(E,A),E)d(E,se)&&(A[se]=y(E[se]))}return A}(m),F=null,m}var O={}.toString;function $(m){return O.call(m).slice(8,-1)}var q=typeof Symbol<"u"?Symbol.iterator:"@@iterator",J=typeof q=="symbol"?function(m){var y;return m!=null&&(y=m[q])&&y.apply(m)}:function(){return null};function ee(m,y){return y=m.indexOf(y),0<=y&&m.splice(y,1),0<=y}var X={};function ve(m){var y,E,A,L;if(arguments.length===1){if(a(m))return m.slice();if(this===X&&typeof m=="string")return[m];if(L=J(m)){for(E=[];!(A=L.next()).done;)E.push(A.value);return E}if(m==null)return[m];if(typeof(y=m.length)!="number")return[m];for(E=new Array(y);y--;)E[y]=m[y];return E}for(y=arguments.length,E=new Array(y);y--;)E[y]=arguments[y];return E}var te=typeof Symbol<"u"?function(m){return m[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},ze=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],mi=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(ze),N={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function V(m,y){this.name=m,this.message=y}function ne(m,y){return m+". Errors: "+Object.keys(y).map(function(E){return y[E].toString()}).filter(function(E,A,L){return L.indexOf(E)===A}).join(`
|
|
112
112
|
`)}function ie(m,y,E,A){this.failures=y,this.failedKeys=A,this.successCount=E,this.message=ne(m,y)}function pe(m,y){this.name="BulkError",this.failures=Object.keys(y).map(function(E){return y[E]}),this.failuresByPos=y,this.message=ne(m,this.failures)}g(V).from(Error).extend({toString:function(){return this.name+": "+this.message}}),g(ie).from(V),g(pe).from(V);var ae=mi.reduce(function(m,y){return m[y]=y+"Error",m},{}),re=V,W=mi.reduce(function(m,y){var E=y+"Error";function A(L,z){this.name=E,L?typeof L=="string"?(this.message="".concat(L).concat(z?`
|
|
113
|
-
`+z:""),this.inner=z||null):typeof L=="object"&&(this.message="".concat(L.name," ").concat(L.message),this.inner=L):(this.message=N[y]||E,this.inner=null)}return g(A).from(re),m[y]=A,m},{});W.Syntax=SyntaxError,W.Type=TypeError,W.Range=RangeError;var fe=ze.reduce(function(m,y){return m[y+"Error"]=W[y],m},{}),oe=mi.reduce(function(m,y){return["Syntax","Type","Range"].indexOf(y)===-1&&(m[y+"Error"]=W[y]),m},{});function Ie(){}function G(m){return m}function Z(m,y){return m==null||m===G?y:function(E){return y(m(E))}}function de(m,y){return function(){m.apply(this,arguments),y.apply(this,arguments)}}function ke(m,y){return m===Ie?y:function(){var E=m.apply(this,arguments);E!==void 0&&(arguments[0]=E);var A=this.onsuccess,L=this.onerror;this.onsuccess=null,this.onerror=null;var z=y.apply(this,arguments);return A&&(this.onsuccess=this.onsuccess?de(A,this.onsuccess):A),L&&(this.onerror=this.onerror?de(L,this.onerror):L),z!==void 0?z:E}}function Pe(m,y){return m===Ie?y:function(){m.apply(this,arguments);var E=this.onsuccess,A=this.onerror;this.onsuccess=this.onerror=null,y.apply(this,arguments),E&&(this.onsuccess=this.onsuccess?de(E,this.onsuccess):E),A&&(this.onerror=this.onerror?de(A,this.onerror):A)}}function Le(m,y){return m===Ie?y:function(E){var A=m.apply(this,arguments);l(E,A);var L=this.onsuccess,z=this.onerror;return this.onsuccess=null,this.onerror=null,E=y.apply(this,arguments),L&&(this.onsuccess=this.onsuccess?de(L,this.onsuccess):L),z&&(this.onerror=this.onerror?de(z,this.onerror):z),A===void 0?E===void 0?void 0:E:l(A,E)}}function ye(m,y){return m===Ie?y:function(){return y.apply(this,arguments)!==!1&&m.apply(this,arguments)}}function M(m,y){return m===Ie?y:function(){var E=m.apply(this,arguments);if(E&&typeof E.then=="function"){for(var A=this,L=arguments.length,z=new Array(L);L--;)z[L]=arguments[L];return E.then(function(){return y.apply(A,z)})}return y.apply(this,arguments)}}oe.ModifyError=ie,oe.DexieError=V,oe.BulkError=pe;var H=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function le(m){H=m}var Ge={},we=100,wa=typeof Promise>"u"?[]:function(){var m=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[m,u(m),m];var y=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[y,u(y),m]}(),ze=wa[0],mi=wa[1],wa=wa[2],mi=mi&&mi.then,Ue=ze&&ze.constructor,Se=!!wa,Ve=function(m,y){yt.push([m,y]),At&&(queueMicrotask(Ir),At=!1)},pt=!0,At=!0,Ut=[],Jt=[],zt=G,Ne={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ie,pgp:!1,env:{},finalize:Ie},je=Ne,yt=[],Ot=0,Wt=[];function st(m){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var y=this._PSD=je;if(typeof m!="function"){if(m!==Ge)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&pl(this,this._value))}this._state=null,this._value=null,++y.ref,function E(A,L){try{L(function(z){if(A._state===null){if(z===A)throw new TypeError("A promise cannot be resolved with itself.");var se=A._lib&&xr();z&&typeof z.then=="function"?E(A,function(ue,Ce){z instanceof st?z._then(ue,Ce):z.then(ue,Ce)}):(A._state=!0,A._value=z,wo(A)),se&&pi()}},pl.bind(null,A))}catch(z){pl(A,z)}}(this,m)}var ps={get:function(){var m=je,y=Od;function E(A,L){var z=this,se=!m.global&&(m!==je||y!==Od),ue=se&&!jt(),Ce=new st(function(_e,Te){va(z,new Ui(Pr(A,m,se,ue),Pr(L,m,se,ue),_e,Te,m))});return this._consoleTask&&(Ce._consoleTask=this._consoleTask),Ce}return E.prototype=Ge,E},set:function(m){p(this,"then",m&&m.prototype===Ge?ps:{get:function(){return m},set:ps.set})}};function Ui(m,y,E,A,L){this.onFulfilled=typeof m=="function"?m:null,this.onRejected=typeof y=="function"?y:null,this.resolve=E,this.reject=A,this.psd=L}function pl(m,y){var E,A;Jt.push(y),m._state===null&&(E=m._lib&&xr(),y=zt(y),m._state=!1,m._value=y,A=m,Ut.some(function(L){return L._value===A._value})||Ut.push(A),wo(m),E&&pi())}function wo(m){var y=m._listeners;m._listeners=[];for(var E=0,A=y.length;E<A;++E)va(m,y[E]);var L=m._PSD;--L.ref||L.finalize(),Ot===0&&(++Ot,Ve(function(){--Ot==0&&Fr()},[]))}function va(m,y){if(m._state!==null){var E=m._state?y.onFulfilled:y.onRejected;if(E===null)return(m._state?y.resolve:y.reject)(m._value);++y.psd.ref,++Ot,Ve(gl,[E,m,y])}else m._listeners.push(y)}function gl(m,y,E){try{var A,L=y._value;!y._state&&Jt.length&&(Jt=[]),A=H&&y._consoleTask?y._consoleTask.run(function(){return m(L)}):m(L),y._state||Jt.indexOf(L)!==-1||function(z){for(var se=Ut.length;se;)if(Ut[--se]._value===z._value)return Ut.splice(se,1)}(y),E.resolve(A)}catch(z){E.reject(z)}finally{--Ot==0&&Fr(),--E.psd.ref||E.psd.finalize()}}function Ir(){Co(Ne,function(){xr()&&pi()})}function xr(){var m=pt;return At=pt=!1,m}function pi(){var m,y,E;do for(;0<yt.length;)for(m=yt,yt=[],E=m.length,y=0;y<E;++y){var A=m[y];A[0].apply(null,A[1])}while(0<yt.length);At=pt=!0}function Fr(){var m=Ut;Ut=[],m.forEach(function(A){A._PSD.onunhandled.call(null,A._value,A)});for(var y=Wt.slice(0),E=y.length;E;)y[--E]()}function Au(m){return new st(Ge,!1,m)}function kn(m,y){var E=je;return function(){var A=xr(),L=je;try{return js(E,!0),m.apply(this,arguments)}catch(z){y&&y(z)}finally{js(L,!1),A&&pi()}}}h(st.prototype,{then:ps,_then:function(m,y){va(this,new Ui(null,null,m,y,je))},catch:function(m){if(arguments.length===1)return this.then(null,m);var y=m,E=arguments[1];return typeof y=="function"?this.then(null,function(A){return(A instanceof y?E:Au)(A)}):this.then(null,function(A){return(A&&A.name===y?E:Au)(A)})},finally:function(m){return this.then(function(y){return st.resolve(m()).then(function(){return y})},function(y){return st.resolve(m()).then(function(){return Au(y)})})},timeout:function(m,y){var E=this;return m<1/0?new st(function(A,L){var z=setTimeout(function(){return L(new W.Timeout(y))},m);E.then(A,L).finally(clearTimeout.bind(null,z))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&p(st.prototype,Symbol.toStringTag,"Dexie.Promise"),Ne.env=ku(),h(st,{all:function(){var m=ve.apply(null,arguments).map(sn);return new st(function(y,E){m.length===0&&y([]);var A=m.length;m.forEach(function(L,z){return st.resolve(L).then(function(se){m[z]=se,--A||y(m)},E)})})},resolve:function(m){return m instanceof st?m:m&&typeof m.then=="function"?new st(function(y,E){m.then(y,E)}):new st(Ge,!0,m)},reject:Au,race:function(){var m=ve.apply(null,arguments).map(sn);return new st(function(y,E){m.map(function(A){return st.resolve(A).then(y,E)})})},PSD:{get:function(){return je},set:function(m){return je=m}},totalEchoes:{get:function(){return Od}},newPSD:Ae,usePSD:Co,scheduler:{get:function(){return Ve},set:function(m){Ve=m}},rejectionMapper:{get:function(){return zt},set:function(m){zt=m}},follow:function(m,y){return new st(function(E,A){return Ae(function(L,z){var se=je;se.unhandleds=[],se.onunhandled=z,se.finalize=de(function(){var ue,Ce=this;ue=function(){Ce.unhandleds.length===0?L():z(Ce.unhandleds[0])},Wt.push(function _e(){ue(),Wt.splice(Wt.indexOf(_e),1)}),++Ot,Ve(function(){--Ot==0&&Fr()},[])},se.finalize),m()},y,E,A)})}}),Ue&&(Ue.allSettled&&p(st,"allSettled",function(){var m=ve.apply(null,arguments).map(sn);return new st(function(y){m.length===0&&y([]);var E=m.length,A=new Array(E);m.forEach(function(L,z){return st.resolve(L).then(function(se){return A[z]={status:"fulfilled",value:se}},function(se){return A[z]={status:"rejected",reason:se}}).then(function(){return--E||y(A)})})})}),Ue.any&&typeof AggregateError<"u"&&p(st,"any",function(){var m=ve.apply(null,arguments).map(sn);return new st(function(y,E){m.length===0&&E(new AggregateError([]));var A=m.length,L=new Array(A);m.forEach(function(z,se){return st.resolve(z).then(function(ue){return y(ue)},function(ue){L[se]=ue,--A||E(new AggregateError(L))})})})}),Ue.withResolvers&&(st.withResolvers=Ue.withResolvers));var gs={awaits:0,echoes:0,id:0},__=0,Ad=[],kd=0,Od=0,R_=0;function Ae(m,y,E,A){var L=je,z=Object.create(L);return z.parent=L,z.ref=0,z.global=!1,z.id=++R_,Ne.env,z.env=Se?{Promise:st,PromiseProp:{value:st,configurable:!0,writable:!0},all:st.all,race:st.race,allSettled:st.allSettled,any:st.any,resolve:st.resolve,reject:st.reject}:{},y&&l(z,y),++L.ref,z.finalize=function(){--this.parent.ref||this.parent.finalize()},A=Co(z,m,E,A),z.ref===0&&z.finalize(),A}function Ye(){return gs.id||(gs.id=++__),++gs.awaits,gs.echoes+=we,gs.id}function jt(){return!!gs.awaits&&(--gs.awaits==0&&(gs.id=0),gs.echoes=gs.awaits*we,!0)}function sn(m){return gs.echoes&&m&&m.constructor===Ue?(Ye(),m.then(function(y){return jt(),y},function(y){return jt(),Kn(y)})):m}function Wi(){var m=Ad[Ad.length-1];Ad.pop(),js(m,!1)}function js(m,y){var E,A=je;(y?!gs.echoes||kd++&&m===je:!kd||--kd&&m===je)||queueMicrotask(y?(function(L){++Od,gs.echoes&&--gs.echoes!=0||(gs.echoes=gs.awaits=gs.id=0),Ad.push(je),js(L,!0)}).bind(null,m):Wi),m!==je&&(je=m,A===Ne&&(Ne.env=ku()),Se&&(E=Ne.env.Promise,y=m.env,(A.global||m.global)&&(Object.defineProperty(i,"Promise",y.PromiseProp),E.all=y.all,E.race=y.race,E.resolve=y.resolve,E.reject=y.reject,y.allSettled&&(E.allSettled=y.allSettled),y.any&&(E.any=y.any))))}function ku(){var m=i.Promise;return Se?{Promise:m,PromiseProp:Object.getOwnPropertyDescriptor(i,"Promise"),all:m.all,race:m.race,allSettled:m.allSettled,any:m.any,resolve:m.resolve,reject:m.reject}:{}}function Co(m,y,E,A,L){var z=je;try{return js(m,!0),y(E,A,L)}finally{js(z,!1)}}function Pr(m,y,E,A){return typeof m!="function"?m:function(){var L=je;E&&Ye(),js(y,!0);try{return m.apply(this,arguments)}finally{js(L,!1),A&&queueMicrotask(jt)}}}function Fy(m){Promise===Ue&&gs.echoes===0?kd===0?m():enqueueNativeMicroTask(m):setTimeout(m,0)}(""+mi).indexOf("[native code]")===-1&&(Ye=jt=Ie);var Kn=st.reject,ya="",gi="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Ou="String expected.",Md=[],Py="__dbnames",D_="readonly",T_="readwrite";function Mu(m,y){return m?y?function(){return m.apply(this,arguments)&&y.apply(this,arguments)}:m:y}var VB={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Ay(m){return typeof m!="string"||/\./.test(m)?function(y){return y}:function(y){return y[m]===void 0&&m in y&&delete(y=k(y))[m],y}}function BB(){throw W.Type()}function ln(m,y){try{var E=$B(m),A=$B(y);if(E!==A)return E==="Array"?1:A==="Array"?-1:E==="binary"?1:A==="binary"?-1:E==="string"?1:A==="string"?-1:E==="Date"?1:A!=="Date"?NaN:-1;switch(E){case"number":case"Date":case"string":return y<m?1:m<y?-1:0;case"binary":return function(L,z){for(var se=L.length,ue=z.length,Ce=se<ue?se:ue,_e=0;_e<Ce;++_e)if(L[_e]!==z[_e])return L[_e]<z[_e]?-1:1;return se===ue?0:se<ue?-1:1}(HB(m),HB(y));case"Array":return function(L,z){for(var se=L.length,ue=z.length,Ce=se<ue?se:ue,_e=0;_e<Ce;++_e){var Te=ln(L[_e],z[_e]);if(Te!==0)return Te}return se===ue?0:se<ue?-1:1}(m,y)}}catch{}return NaN}function $B(m){var y=typeof m;return y!="object"?y:ArrayBuffer.isView(m)?"binary":(m=$(m),m==="ArrayBuffer"?"binary":m)}function HB(m){return m instanceof Uint8Array?m:ArrayBuffer.isView(m)?new Uint8Array(m.buffer,m.byteOffset,m.byteLength):new Uint8Array(m)}var GB=($n.prototype._trans=function(m,y,E){var A=this._tx||je.trans,L=this.name,z=H&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(m==="readonly"?"read":"write"," ").concat(this.name));function se(_e,Te,he){if(!he.schema[L])throw new W.NotFound("Table "+L+" not part of transaction");return y(he.idbtrans,he)}var ue=xr();try{var Ce=A&&A.db._novip===this.db._novip?A===je.trans?A._promise(m,se,E):Ae(function(){return A._promise(m,se,E)},{trans:A,transless:je.transless||je}):function _e(Te,he,Fe,be){if(Te.idbdb&&(Te._state.openComplete||je.letThrough||Te._vip)){var De=Te._createTransaction(he,Fe,Te._dbSchema);try{De.create(),Te._state.PR1398_maxLoop=3}catch(xe){return xe.name===ae.InvalidState&&Te.isOpen()&&0<--Te._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),Te.close({disableAutoOpen:!1}),Te.open().then(function(){return _e(Te,he,Fe,be)})):Kn(xe)}return De._promise(he,function(xe,Re){return Ae(function(){return je.trans=De,be(xe,Re,De)})}).then(function(xe){if(he==="readwrite")try{De.idbtrans.commit()}catch{}return he==="readonly"?xe:De._completion.then(function(){return xe})})}if(Te._state.openComplete)return Kn(new W.DatabaseClosed(Te._state.dbOpenError));if(!Te._state.isBeingOpened){if(!Te._state.autoOpen)return Kn(new W.DatabaseClosed);Te.open().catch(Ie)}return Te._state.dbReadyPromise.then(function(){return _e(Te,he,Fe,be)})}(this.db,m,[this.name],se);return z&&(Ce._consoleTask=z,Ce=Ce.catch(function(_e){return console.trace(_e),Kn(_e)})),Ce}finally{ue&&pi()}},$n.prototype.get=function(m,y){var E=this;return m&&m.constructor===Object?this.where(m).first(y):m==null?Kn(new W.Type("Invalid argument to Table.get()")):this._trans("readonly",function(A){return E.core.get({trans:A,key:m}).then(function(L){return E.hook.reading.fire(L)})}).then(y)},$n.prototype.where=function(m){if(typeof m=="string")return new this.db.WhereClause(this,m);if(a(m))return new this.db.WhereClause(this,"[".concat(m.join("+"),"]"));var y=r(m);if(y.length===1)return this.where(y[0]).equals(m[y[0]]);var E=this.schema.indexes.concat(this.schema.primKey).filter(function(ue){if(ue.compound&&y.every(function(_e){return 0<=ue.keyPath.indexOf(_e)})){for(var Ce=0;Ce<y.length;++Ce)if(y.indexOf(ue.keyPath[Ce])===-1)return!1;return!0}return!1}).sort(function(ue,Ce){return ue.keyPath.length-Ce.keyPath.length})[0];if(E&&this.db._maxKey!==ya){var z=E.keyPath.slice(0,y.length);return this.where(z).equals(z.map(function(Ce){return m[Ce]}))}!E&&H&&console.warn("The query ".concat(JSON.stringify(m)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(y.join("+"),"]"));var A=this.schema.idxByName;function L(ue,Ce){return ln(ue,Ce)===0}var se=y.reduce(function(he,Ce){var _e=he[0],Te=he[1],he=A[Ce],Fe=m[Ce];return[_e||he,_e||!he?Mu(Te,he&&he.multi?function(be){return be=R(be,Ce),a(be)&&be.some(function(De){return L(Fe,De)})}:function(be){return L(Fe,R(be,Ce))}):Te]},[null,null]),z=se[0],se=se[1];return z?this.where(z.name).equals(m[z.keyPath]).filter(se):E?this.filter(se):this.where(y).equals("")},$n.prototype.filter=function(m){return this.toCollection().and(m)},$n.prototype.count=function(m){return this.toCollection().count(m)},$n.prototype.offset=function(m){return this.toCollection().offset(m)},$n.prototype.limit=function(m){return this.toCollection().limit(m)},$n.prototype.each=function(m){return this.toCollection().each(m)},$n.prototype.toArray=function(m){return this.toCollection().toArray(m)},$n.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},$n.prototype.orderBy=function(m){return new this.db.Collection(new this.db.WhereClause(this,a(m)?"[".concat(m.join("+"),"]"):m))},$n.prototype.reverse=function(){return this.toCollection().reverse()},$n.prototype.mapToClass=function(m){var y,E=this.db,A=this.name;function L(){return y!==null&&y.apply(this,arguments)||this}(this.schema.mappedClass=m).prototype instanceof BB&&(function(Ce,_e){if(typeof _e!="function"&&_e!==null)throw new TypeError("Class extends value "+String(_e)+" is not a constructor or null");function Te(){this.constructor=Ce}n(Ce,_e),Ce.prototype=_e===null?Object.create(_e):(Te.prototype=_e.prototype,new Te)}(L,y=m),Object.defineProperty(L.prototype,"db",{get:function(){return E},enumerable:!1,configurable:!0}),L.prototype.table=function(){return A},m=L);for(var z=new Set,se=m.prototype;se;se=u(se))Object.getOwnPropertyNames(se).forEach(function(Ce){return z.add(Ce)});function ue(Ce){if(!Ce)return Ce;var _e,Te=Object.create(m.prototype);for(_e in Ce)if(!z.has(_e))try{Te[_e]=Ce[_e]}catch{}return Te}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=ue,this.hook("reading",ue),m},$n.prototype.defineClass=function(){return this.mapToClass(function(m){l(this,m)})},$n.prototype.add=function(m,y){var E=this,A=this.schema.primKey,L=A.auto,z=A.keyPath,se=m;return z&&L&&(se=Ay(z)(m)),this._trans("readwrite",function(ue){return E.core.mutate({trans:ue,type:"add",keys:y!=null?[y]:null,values:[se]})}).then(function(ue){return ue.numFailures?st.reject(ue.failures[0]):ue.lastResult}).then(function(ue){if(z)try{T(m,z,ue)}catch{}return ue})},$n.prototype.update=function(m,y){return typeof m!="object"||a(m)?this.where(":id").equals(m).modify(y):(m=R(m,this.schema.primKey.keyPath),m===void 0?Kn(new W.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(m).modify(y))},$n.prototype.put=function(m,y){var E=this,A=this.schema.primKey,L=A.auto,z=A.keyPath,se=m;return z&&L&&(se=Ay(z)(m)),this._trans("readwrite",function(ue){return E.core.mutate({trans:ue,type:"put",values:[se],keys:y!=null?[y]:null})}).then(function(ue){return ue.numFailures?st.reject(ue.failures[0]):ue.lastResult}).then(function(ue){if(z)try{T(m,z,ue)}catch{}return ue})},$n.prototype.delete=function(m){var y=this;return this._trans("readwrite",function(E){return y.core.mutate({trans:E,type:"delete",keys:[m]})}).then(function(E){return E.numFailures?st.reject(E.failures[0]):void 0})},$n.prototype.clear=function(){var m=this;return this._trans("readwrite",function(y){return m.core.mutate({trans:y,type:"deleteRange",range:VB})}).then(function(y){return y.numFailures?st.reject(y.failures[0]):void 0})},$n.prototype.bulkGet=function(m){var y=this;return this._trans("readonly",function(E){return y.core.getMany({keys:m,trans:E}).then(function(A){return A.map(function(L){return y.hook.reading.fire(L)})})})},$n.prototype.bulkAdd=function(m,y,E){var A=this,L=Array.isArray(y)?y:void 0,z=(E=E||(L?void 0:y))?E.allKeys:void 0;return this._trans("readwrite",function(se){var _e=A.schema.primKey,ue=_e.auto,_e=_e.keyPath;if(_e&&L)throw new W.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(L&&L.length!==m.length)throw new W.InvalidArgument("Arguments objects and keys must have the same length");var Ce=m.length,_e=_e&&ue?m.map(Ay(_e)):m;return A.core.mutate({trans:se,type:"add",keys:L,values:_e,wantResults:z}).then(function(De){var he=De.numFailures,Fe=De.results,be=De.lastResult,De=De.failures;if(he===0)return z?Fe:be;throw new pe("".concat(A.name,".bulkAdd(): ").concat(he," of ").concat(Ce," operations failed"),De)})})},$n.prototype.bulkPut=function(m,y,E){var A=this,L=Array.isArray(y)?y:void 0,z=(E=E||(L?void 0:y))?E.allKeys:void 0;return this._trans("readwrite",function(se){var _e=A.schema.primKey,ue=_e.auto,_e=_e.keyPath;if(_e&&L)throw new W.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(L&&L.length!==m.length)throw new W.InvalidArgument("Arguments objects and keys must have the same length");var Ce=m.length,_e=_e&&ue?m.map(Ay(_e)):m;return A.core.mutate({trans:se,type:"put",keys:L,values:_e,wantResults:z}).then(function(De){var he=De.numFailures,Fe=De.results,be=De.lastResult,De=De.failures;if(he===0)return z?Fe:be;throw new pe("".concat(A.name,".bulkPut(): ").concat(he," of ").concat(Ce," operations failed"),De)})})},$n.prototype.bulkUpdate=function(m){var y=this,E=this.core,A=m.map(function(se){return se.key}),L=m.map(function(se){return se.changes}),z=[];return this._trans("readwrite",function(se){return E.getMany({trans:se,keys:A,cache:"clone"}).then(function(ue){var Ce=[],_e=[];m.forEach(function(he,Fe){var be=he.key,De=he.changes,xe=ue[Fe];if(xe){for(var Re=0,Me=Object.keys(De);Re<Me.length;Re++){var $e=Me[Re],He=De[$e];if($e===y.schema.primKey.keyPath){if(ln(He,be)!==0)throw new W.Constraint("Cannot update primary key in bulkUpdate()")}else T(xe,$e,He)}z.push(Fe),Ce.push(be),_e.push(xe)}});var Te=Ce.length;return E.mutate({trans:se,type:"put",keys:Ce,values:_e,updates:{keys:A,changeSpecs:L}}).then(function(he){var Fe=he.numFailures,be=he.failures;if(Fe===0)return Te;for(var De=0,xe=Object.keys(be);De<xe.length;De++){var Re,Me=xe[De],$e=z[Number(Me)];$e!=null&&(Re=be[Me],delete be[Me],be[$e]=Re)}throw new pe("".concat(y.name,".bulkUpdate(): ").concat(Fe," of ").concat(Te," operations failed"),be)})})})},$n.prototype.bulkDelete=function(m){var y=this,E=m.length;return this._trans("readwrite",function(A){return y.core.mutate({trans:A,type:"delete",keys:m})}).then(function(se){var L=se.numFailures,z=se.lastResult,se=se.failures;if(L===0)return z;throw new pe("".concat(y.name,".bulkDelete(): ").concat(L," of ").concat(E," operations failed"),se)})},$n);function $n(){}function yp(m){function y(se,ue){if(ue){for(var Ce=arguments.length,_e=new Array(Ce-1);--Ce;)_e[Ce-1]=arguments[Ce];return E[se].subscribe.apply(null,_e),m}if(typeof se=="string")return E[se]}var E={};y.addEventType=z;for(var A=1,L=arguments.length;A<L;++A)z(arguments[A]);return y;function z(se,ue,Ce){if(typeof se!="object"){var _e;ue=ue||ye;var Te={subscribers:[],fire:Ce=Ce||Ie,subscribe:function(he){Te.subscribers.indexOf(he)===-1&&(Te.subscribers.push(he),Te.fire=ue(Te.fire,he))},unsubscribe:function(he){Te.subscribers=Te.subscribers.filter(function(Fe){return Fe!==he}),Te.fire=Te.subscribers.reduce(ue,Ce)}};return E[se]=y[se]=Te}r(_e=se).forEach(function(he){var Fe=_e[he];if(a(Fe))z(he,_e[he][0],_e[he][1]);else{if(Fe!=="asap")throw new W.InvalidArgument("Invalid event config");var be=z(he,G,function(){for(var De=arguments.length,xe=new Array(De);De--;)xe[De]=arguments[De];be.subscribers.forEach(function(Re){_(function(){Re.apply(null,xe)})})})}})}}function wp(m,y){return g(y).from({prototype:m}),y}function Nd(m,y){return!(m.filter||m.algorithm||m.or)&&(y?m.justLimit:!m.replayFilter)}function I_(m,y){m.filter=Mu(m.filter,y)}function x_(m,y,E){var A=m.replayFilter;m.replayFilter=A?function(){return Mu(A(),y())}:y,m.justLimit=E&&!A}function ky(m,y){if(m.isPrimKey)return y.primaryKey;var E=y.getIndexByKeyPath(m.index);if(!E)throw new W.Schema("KeyPath "+m.index+" on object store "+y.name+" is not indexed");return E}function UB(m,y,E){var A=ky(m,y.schema);return y.openCursor({trans:E,values:!m.keysOnly,reverse:m.dir==="prev",unique:!!m.unique,query:{index:A,range:m.range}})}function Oy(m,y,E,A){var L=m.replayFilter?Mu(m.filter,m.replayFilter()):m.filter;if(m.or){var z={},se=function(ue,Ce,_e){var Te,he;L&&!L(Ce,_e,function(Fe){return Ce.stop(Fe)},function(Fe){return Ce.fail(Fe)})||((he=""+(Te=Ce.primaryKey))=="[object ArrayBuffer]"&&(he=""+new Uint8Array(Te)),d(z,he)||(z[he]=!0,y(ue,Ce,_e)))};return Promise.all([m.or._iterate(se,E),WB(UB(m,A,E),m.algorithm,se,!m.keysOnly&&m.valueMapper)])}return WB(UB(m,A,E),Mu(m.algorithm,L),y,!m.keysOnly&&m.valueMapper)}function WB(m,y,E,A){var L=kn(A?function(z,se,ue){return E(A(z),se,ue)}:E);return m.then(function(z){if(z)return z.start(function(){var se=function(){return z.continue()};y&&!y(z,function(ue){return se=ue},function(ue){z.stop(ue),se=Ie},function(ue){z.fail(ue),se=Ie})||L(z.value,z,function(ue){return se=ue}),se()})})}var wa=Symbol(),Cp=(zB.prototype.execute=function(m){if(this.add!==void 0){var y=this.add;if(a(y))return o(o([],a(m)?m:[],!0),y).sort();if(typeof y=="number")return(Number(m)||0)+y;if(typeof y=="bigint")try{return BigInt(m)+y}catch{return BigInt(0)+y}throw new TypeError("Invalid term ".concat(y))}if(this.remove!==void 0){var E=this.remove;if(a(E))return a(m)?m.filter(function(A){return!E.includes(A)}).sort():[];if(typeof E=="number")return Number(m)-E;if(typeof E=="bigint")try{return BigInt(m)-E}catch{return BigInt(0)-E}throw new TypeError("Invalid subtrahend ".concat(E))}return y=(y=this.replacePrefix)===null||y===void 0?void 0:y[0],y&&typeof m=="string"&&m.startsWith(y)?this.replacePrefix[1]+m.substring(y.length):m},zB);function zB(m){Object.assign(this,m)}var sbe=(mn.prototype._read=function(m,y){var E=this._ctx;return E.error?E.table._trans(null,Kn.bind(null,E.error)):E.table._trans("readonly",m).then(y)},mn.prototype._write=function(m){var y=this._ctx;return y.error?y.table._trans(null,Kn.bind(null,y.error)):y.table._trans("readwrite",m,"locked")},mn.prototype._addAlgorithm=function(m){var y=this._ctx;y.algorithm=Mu(y.algorithm,m)},mn.prototype._iterate=function(m,y){return Oy(this._ctx,m,y,this._ctx.table.core)},mn.prototype.clone=function(m){var y=Object.create(this.constructor.prototype),E=Object.create(this._ctx);return m&&l(E,m),y._ctx=E,y},mn.prototype.raw=function(){return this._ctx.valueMapper=null,this},mn.prototype.each=function(m){var y=this._ctx;return this._read(function(E){return Oy(y,m,E,y.table.core)})},mn.prototype.count=function(m){var y=this;return this._read(function(E){var A=y._ctx,L=A.table.core;if(Nd(A,!0))return L.count({trans:E,query:{index:ky(A,L.schema),range:A.range}}).then(function(se){return Math.min(se,A.limit)});var z=0;return Oy(A,function(){return++z,!1},E,L).then(function(){return z})}).then(m)},mn.prototype.sortBy=function(m,y){var E=m.split(".").reverse(),A=E[0],L=E.length-1;function z(Ce,_e){return _e?z(Ce[E[_e]],_e-1):Ce[A]}var se=this._ctx.dir==="next"?1:-1;function ue(Ce,_e){return ln(z(Ce,L),z(_e,L))*se}return this.toArray(function(Ce){return Ce.sort(ue)}).then(y)},mn.prototype.toArray=function(m){var y=this;return this._read(function(E){var A=y._ctx;if(A.dir==="next"&&Nd(A,!0)&&0<A.limit){var L=A.valueMapper,z=ky(A,A.table.core.schema);return A.table.core.query({trans:E,limit:A.limit,values:!0,query:{index:z,range:A.range}}).then(function(ue){return ue=ue.result,L?ue.map(L):ue})}var se=[];return Oy(A,function(ue){return se.push(ue)},E,A.table.core).then(function(){return se})},m)},mn.prototype.offset=function(m){var y=this._ctx;return m<=0||(y.offset+=m,Nd(y)?x_(y,function(){var E=m;return function(A,L){return E===0||(E===1?--E:L(function(){A.advance(E),E=0}),!1)}}):x_(y,function(){var E=m;return function(){return--E<0}})),this},mn.prototype.limit=function(m){return this._ctx.limit=Math.min(this._ctx.limit,m),x_(this._ctx,function(){var y=m;return function(E,A,L){return--y<=0&&A(L),0<=y}},!0),this},mn.prototype.until=function(m,y){return I_(this._ctx,function(E,A,L){return!m(E.value)||(A(L),y)}),this},mn.prototype.first=function(m){return this.limit(1).toArray(function(y){return y[0]}).then(m)},mn.prototype.last=function(m){return this.reverse().first(m)},mn.prototype.filter=function(m){var y;return I_(this._ctx,function(E){return m(E.value)}),(y=this._ctx).isMatch=Mu(y.isMatch,m),this},mn.prototype.and=function(m){return this.filter(m)},mn.prototype.or=function(m){return new this.db.WhereClause(this._ctx.table,m,this)},mn.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},mn.prototype.desc=function(){return this.reverse()},mn.prototype.eachKey=function(m){var y=this._ctx;return y.keysOnly=!y.isMatch,this.each(function(E,A){m(A.key,A)})},mn.prototype.eachUniqueKey=function(m){return this._ctx.unique="unique",this.eachKey(m)},mn.prototype.eachPrimaryKey=function(m){var y=this._ctx;return y.keysOnly=!y.isMatch,this.each(function(E,A){m(A.primaryKey,A)})},mn.prototype.keys=function(m){var y=this._ctx;y.keysOnly=!y.isMatch;var E=[];return this.each(function(A,L){E.push(L.key)}).then(function(){return E}).then(m)},mn.prototype.primaryKeys=function(m){var y=this._ctx;if(y.dir==="next"&&Nd(y,!0)&&0<y.limit)return this._read(function(A){var L=ky(y,y.table.core.schema);return y.table.core.query({trans:A,values:!1,limit:y.limit,query:{index:L,range:y.range}})}).then(function(A){return A.result}).then(m);y.keysOnly=!y.isMatch;var E=[];return this.each(function(A,L){E.push(L.primaryKey)}).then(function(){return E}).then(m)},mn.prototype.uniqueKeys=function(m){return this._ctx.unique="unique",this.keys(m)},mn.prototype.firstKey=function(m){return this.limit(1).keys(function(y){return y[0]}).then(m)},mn.prototype.lastKey=function(m){return this.reverse().firstKey(m)},mn.prototype.distinct=function(){var m=this._ctx,m=m.index&&m.table.schema.idxByName[m.index];if(!m||!m.multi)return this;var y={};return I_(this._ctx,function(L){var A=L.primaryKey.toString(),L=d(y,A);return y[A]=!0,!L}),this},mn.prototype.modify=function(m){var y=this,E=this._ctx;return this._write(function(A){var L,z,se;se=typeof m=="function"?m:(L=r(m),z=L.length,function(Re){for(var Me=!1,$e=0;$e<z;++$e){var He=L[$e],Ze=m[He],ot=R(Re,He);Ze instanceof Cp?(T(Re,He,Ze.execute(ot)),Me=!0):ot!==Ze&&(T(Re,He,Ze),Me=!0)}return Me});var ue=E.table.core,he=ue.schema.primaryKey,Ce=he.outbound,_e=he.extractKey,Te=200,he=y.db._options.modifyChunkSize;he&&(Te=typeof he=="object"?he[ue.name]||he["*"]||200:he);function Fe(Re,He){var $e=He.failures,He=He.numFailures;De+=Re-He;for(var Ze=0,ot=r($e);Ze<ot.length;Ze++){var gt=ot[Ze];be.push($e[gt])}}var be=[],De=0,xe=[];return y.clone().primaryKeys().then(function(Re){function Me(He){var Ze=Math.min(Te,Re.length-He);return ue.getMany({trans:A,keys:Re.slice(He,He+Ze),cache:"immutable"}).then(function(ot){for(var gt=[],it=[],at=Ce?[]:null,St=[],ht=0;ht<Ze;++ht){var Rt=ot[ht],Zt={value:k(Rt),primKey:Re[He+ht]};se.call(Zt,Zt.value,Zt)!==!1&&(Zt.value==null?St.push(Re[He+ht]):Ce||ln(_e(Rt),_e(Zt.value))===0?(it.push(Zt.value),Ce&&at.push(Re[He+ht])):(St.push(Re[He+ht]),gt.push(Zt.value)))}return Promise.resolve(0<gt.length&&ue.mutate({trans:A,type:"add",values:gt}).then(function(on){for(var rn in on.failures)St.splice(parseInt(rn),1);Fe(gt.length,on)})).then(function(){return(0<it.length||$e&&typeof m=="object")&&ue.mutate({trans:A,type:"put",keys:at,values:it,criteria:$e,changeSpec:typeof m!="function"&&m,isAdditionalChunk:0<He}).then(function(on){return Fe(it.length,on)})}).then(function(){return(0<St.length||$e&&m===F_)&&ue.mutate({trans:A,type:"delete",keys:St,criteria:$e,isAdditionalChunk:0<He}).then(function(on){return Fe(St.length,on)})}).then(function(){return Re.length>He+Ze&&Me(He+Te)})})}var $e=Nd(E)&&E.limit===1/0&&(typeof m!="function"||m===F_)&&{index:E.index,range:E.range};return Me(0).then(function(){if(0<be.length)throw new ie("Error modifying one or more objects",be,De,xe);return Re.length})})})},mn.prototype.delete=function(){var m=this._ctx,y=m.range;return Nd(m)&&(m.isPrimKey||y.type===3)?this._write(function(E){var A=m.table.core.schema.primaryKey,L=y;return m.table.core.count({trans:E,query:{index:A,range:L}}).then(function(z){return m.table.core.mutate({trans:E,type:"deleteRange",range:L}).then(function(se){var ue=se.failures;if(se.lastResult,se.results,se=se.numFailures,se)throw new ie("Could not delete some values",Object.keys(ue).map(function(Ce){return ue[Ce]}),z-se);return z-se})})}):this.modify(F_)},mn);function mn(){}var F_=function(m,y){return y.value=null};function obe(m,y){return m<y?-1:m===y?0:1}function ibe(m,y){return y<m?-1:m===y?0:1}function Uo(m,y,E){return m=m instanceof KB?new m.Collection(m):m,m._ctx.error=new(E||TypeError)(y),m}function Ld(m){return new m.Collection(m,function(){return jB("")}).limit(0)}function My(m,y,E,A){var L,z,se,ue,Ce,_e,Te,he=E.length;if(!E.every(function(De){return typeof De=="string"}))return Uo(m,Ou);function Fe(De){L=De==="next"?function(Re){return Re.toUpperCase()}:function(Re){return Re.toLowerCase()},z=De==="next"?function(Re){return Re.toLowerCase()}:function(Re){return Re.toUpperCase()},se=De==="next"?obe:ibe;var xe=E.map(function(Re){return{lower:z(Re),upper:L(Re)}}).sort(function(Re,Me){return se(Re.lower,Me.lower)});ue=xe.map(function(Re){return Re.upper}),Ce=xe.map(function(Re){return Re.lower}),Te=(_e=De)==="next"?"":A}Fe("next"),m=new m.Collection(m,function(){return ml(ue[0],Ce[he-1]+A)}),m._ondirectionchange=function(De){Fe(De)};var be=0;return m._addAlgorithm(function(De,xe,Re){var Me=De.key;if(typeof Me!="string")return!1;var $e=z(Me);if(y($e,Ce,be))return!0;for(var He=null,Ze=be;Ze<he;++Ze){var ot=function(gt,it,at,St,ht,Rt){for(var Zt=Math.min(gt.length,St.length),on=-1,rn=0;rn<Zt;++rn){var Wo=it[rn];if(Wo!==St[rn])return ht(gt[rn],at[rn])<0?gt.substr(0,rn)+at[rn]+at.substr(rn+1):ht(gt[rn],St[rn])<0?gt.substr(0,rn)+St[rn]+at.substr(rn+1):0<=on?gt.substr(0,on)+it[on]+at.substr(on+1):null;ht(gt[rn],Wo)<0&&(on=rn)}return Zt<St.length&&Rt==="next"?gt+at.substr(gt.length):Zt<gt.length&&Rt==="prev"?gt.substr(0,at.length):on<0?null:gt.substr(0,on)+St[on]+at.substr(on+1)}(Me,$e,ue[Ze],Ce[Ze],se,_e);ot===null&&He===null?be=Ze+1:(He===null||0<se(He,ot))&&(He=ot)}return xe(He!==null?function(){De.continue(He+Te)}:Re),!1}),m}function ml(m,y,E,A){return{type:2,lower:m,upper:y,lowerOpen:E,upperOpen:A}}function jB(m){return{type:1,lower:m,upper:m}}var KB=(Object.defineProperty(Is.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),Is.prototype.between=function(m,y,E,A){E=E!==!1,A=A===!0;try{return 0<this._cmp(m,y)||this._cmp(m,y)===0&&(E||A)&&(!E||!A)?Ld(this):new this.Collection(this,function(){return ml(m,y,!E,!A)})}catch{return Uo(this,gi)}},Is.prototype.equals=function(m){return m==null?Uo(this,gi):new this.Collection(this,function(){return jB(m)})},Is.prototype.above=function(m){return m==null?Uo(this,gi):new this.Collection(this,function(){return ml(m,void 0,!0)})},Is.prototype.aboveOrEqual=function(m){return m==null?Uo(this,gi):new this.Collection(this,function(){return ml(m,void 0,!1)})},Is.prototype.below=function(m){return m==null?Uo(this,gi):new this.Collection(this,function(){return ml(void 0,m,!1,!0)})},Is.prototype.belowOrEqual=function(m){return m==null?Uo(this,gi):new this.Collection(this,function(){return ml(void 0,m)})},Is.prototype.startsWith=function(m){return typeof m!="string"?Uo(this,Ou):this.between(m,m+ya,!0,!0)},Is.prototype.startsWithIgnoreCase=function(m){return m===""?this.startsWith(m):My(this,function(y,E){return y.indexOf(E[0])===0},[m],ya)},Is.prototype.equalsIgnoreCase=function(m){return My(this,function(y,E){return y===E[0]},[m],"")},Is.prototype.anyOfIgnoreCase=function(){var m=ve.apply(X,arguments);return m.length===0?Ld(this):My(this,function(y,E){return E.indexOf(y)!==-1},m,"")},Is.prototype.startsWithAnyOfIgnoreCase=function(){var m=ve.apply(X,arguments);return m.length===0?Ld(this):My(this,function(y,E){return E.some(function(A){return y.indexOf(A)===0})},m,ya)},Is.prototype.anyOf=function(){var m=this,y=ve.apply(X,arguments),E=this._cmp;try{y.sort(E)}catch{return Uo(this,gi)}if(y.length===0)return Ld(this);var A=new this.Collection(this,function(){return ml(y[0],y[y.length-1])});A._ondirectionchange=function(z){E=z==="next"?m._ascending:m._descending,y.sort(E)};var L=0;return A._addAlgorithm(function(z,se,ue){for(var Ce=z.key;0<E(Ce,y[L]);)if(++L===y.length)return se(ue),!1;return E(Ce,y[L])===0||(se(function(){z.continue(y[L])}),!1)}),A},Is.prototype.notEqual=function(m){return this.inAnyRange([[-1/0,m],[m,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},Is.prototype.noneOf=function(){var m=ve.apply(X,arguments);if(m.length===0)return new this.Collection(this);try{m.sort(this._ascending)}catch{return Uo(this,gi)}var y=m.reduce(function(E,A){return E?E.concat([[E[E.length-1][1],A]]):[[-1/0,A]]},null);return y.push([m[m.length-1],this.db._maxKey]),this.inAnyRange(y,{includeLowers:!1,includeUppers:!1})},Is.prototype.inAnyRange=function(Me,y){var E=this,A=this._cmp,L=this._ascending,z=this._descending,se=this._min,ue=this._max;if(Me.length===0)return Ld(this);if(!Me.every(function($e){return $e[0]!==void 0&&$e[1]!==void 0&&L($e[0],$e[1])<=0}))return Uo(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",W.InvalidArgument);var Ce=!y||y.includeLowers!==!1,_e=y&&y.includeUppers===!0,Te,he=L;function Fe($e,He){return he($e[0],He[0])}try{(Te=Me.reduce(function($e,He){for(var Ze=0,ot=$e.length;Ze<ot;++Ze){var gt=$e[Ze];if(A(He[0],gt[1])<0&&0<A(He[1],gt[0])){gt[0]=se(gt[0],He[0]),gt[1]=ue(gt[1],He[1]);break}}return Ze===ot&&$e.push(He),$e},[])).sort(Fe)}catch{return Uo(this,gi)}var be=0,De=_e?function($e){return 0<L($e,Te[be][1])}:function($e){return 0<=L($e,Te[be][1])},xe=Ce?function($e){return 0<z($e,Te[be][0])}:function($e){return 0<=z($e,Te[be][0])},Re=De,Me=new this.Collection(this,function(){return ml(Te[0][0],Te[Te.length-1][1],!Ce,!_e)});return Me._ondirectionchange=function($e){he=$e==="next"?(Re=De,L):(Re=xe,z),Te.sort(Fe)},Me._addAlgorithm(function($e,He,Ze){for(var ot,gt=$e.key;Re(gt);)if(++be===Te.length)return He(Ze),!1;return!De(ot=gt)&&!xe(ot)||(E._cmp(gt,Te[be][1])===0||E._cmp(gt,Te[be][0])===0||He(function(){he===L?$e.continue(Te[be][0]):$e.continue(Te[be][1])}),!1)}),Me},Is.prototype.startsWithAnyOf=function(){var m=ve.apply(X,arguments);return m.every(function(y){return typeof y=="string"})?m.length===0?Ld(this):this.inAnyRange(m.map(function(y){return[y,y+ya]})):Uo(this,"startsWithAnyOf() only works with strings")},Is);function Is(){}function Ar(m){return kn(function(y){return bp(y),m(y.target.error),!1})}function bp(m){m.stopPropagation&&m.stopPropagation(),m.preventDefault&&m.preventDefault()}var Sp="storagemutated",P_="x-storagemutated-1",vl=yp(null,Sp),rbe=(kr.prototype._lock=function(){return w(!je.global),++this._reculock,this._reculock!==1||je.global||(je.lockOwnerFor=this),this},kr.prototype._unlock=function(){if(w(!je.global),--this._reculock==0)for(je.global||(je.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var m=this._blockedFuncs.shift();try{Co(m[1],m[0])}catch{}}return this},kr.prototype._locked=function(){return this._reculock&&je.lockOwnerFor!==this},kr.prototype.create=function(m){var y=this;if(!this.mode)return this;var E=this.db.idbdb,A=this.db._state.dbOpenError;if(w(!this.idbtrans),!m&&!E)switch(A&&A.name){case"DatabaseClosedError":throw new W.DatabaseClosed(A);case"MissingAPIError":throw new W.MissingAPI(A.message,A);default:throw new W.OpenFailed(A)}if(!this.active)throw new W.TransactionInactive;return w(this._completion._state===null),(m=this.idbtrans=m||(this.db.core||E).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=kn(function(L){bp(L),y._reject(m.error)}),m.onabort=kn(function(L){bp(L),y.active&&y._reject(new W.Abort(m.error)),y.active=!1,y.on("abort").fire(L)}),m.oncomplete=kn(function(){y.active=!1,y._resolve(),"mutatedParts"in m&&vl.storagemutated.fire(m.mutatedParts)}),this},kr.prototype._promise=function(m,y,E){var A=this;if(m==="readwrite"&&this.mode!=="readwrite")return Kn(new W.ReadOnly("Transaction is readonly"));if(!this.active)return Kn(new W.TransactionInactive);if(this._locked())return new st(function(z,se){A._blockedFuncs.push([function(){A._promise(m,y,E).then(z,se)},je])});if(E)return Ae(function(){var z=new st(function(se,ue){A._lock();var Ce=y(se,ue,A);Ce&&Ce.then&&Ce.then(se,ue)});return z.finally(function(){return A._unlock()}),z._lib=!0,z});var L=new st(function(z,se){var ue=y(z,se,A);ue&&ue.then&&ue.then(z,se)});return L._lib=!0,L},kr.prototype._root=function(){return this.parent?this.parent._root():this},kr.prototype.waitFor=function(m){var y,E=this._root(),A=st.resolve(m);E._waitingFor?E._waitingFor=E._waitingFor.then(function(){return A}):(E._waitingFor=A,E._waitingQueue=[],y=E.idbtrans.objectStore(E.storeNames[0]),function z(){for(++E._spinCount;E._waitingQueue.length;)E._waitingQueue.shift()();E._waitingFor&&(y.get(-1/0).onsuccess=z)}());var L=E._waitingFor;return new st(function(z,se){A.then(function(ue){return E._waitingQueue.push(kn(z.bind(null,ue)))},function(ue){return E._waitingQueue.push(kn(se.bind(null,ue)))}).finally(function(){E._waitingFor===L&&(E._waitingFor=null)})})},kr.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new W.Abort))},kr.prototype.table=function(m){var y=this._memoizedTables||(this._memoizedTables={});if(d(y,m))return y[m];var E=this.schema[m];if(!E)throw new W.NotFound("Table "+m+" not part of transaction");return E=new this.db.Table(m,E,this),E.core=this.db.core.table(m),y[m]=E},kr);function kr(){}function A_(m,y,E,A,L,z,se){return{name:m,keyPath:y,unique:E,multi:A,auto:L,compound:z,src:(E&&!se?"&":"")+(A?"*":"")+(L?"++":"")+qB(y)}}function qB(m){return typeof m=="string"?m:m?"["+[].join.call(m,"+")+"]":""}function k_(m,y,E){return{name:m,primKey:y,indexes:E,mappedClass:null,idxByName:(A=function(L){return[L.name,L]},E.reduce(function(L,z,se){return se=A(z,se),se&&(L[se[0]]=se[1]),L},{}))};var A}var Ep=function(m){try{return m.only([[]]),Ep=function(){return[[]]},[[]]}catch{return Ep=function(){return ya},ya}};function O_(m){return m==null?function(){}:typeof m=="string"?(y=m).split(".").length===1?function(E){return E[y]}:function(E){return R(E,y)}:function(E){return R(E,m)};var y}function YB(m){return[].slice.call(m)}var abe=0;function _p(m){return m==null?":id":typeof m=="string"?m:"[".concat(m.join("+"),"]")}function lbe(m,y,Ce){function A(Re){if(Re.type===3)return null;if(Re.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var be=Re.lower,De=Re.upper,xe=Re.lowerOpen,Re=Re.upperOpen;return be===void 0?De===void 0?null:y.upperBound(De,!!Re):De===void 0?y.lowerBound(be,!!xe):y.bound(be,De,!!xe,!!Re)}function L(Fe){var be,De=Fe.name;return{name:De,schema:Fe,mutate:function(xe){var Re=xe.trans,Me=xe.type,$e=xe.keys,He=xe.values,Ze=xe.range;return new Promise(function(ot,gt){ot=kn(ot);var it=Re.objectStore(De),at=it.keyPath==null,St=Me==="put"||Me==="add";if(!St&&Me!=="delete"&&Me!=="deleteRange")throw new Error("Invalid operation type: "+Me);var ht,Rt=($e||He||{length:1}).length;if($e&&He&&$e.length!==He.length)throw new Error("Given keys array must have same length as given values array.");if(Rt===0)return ot({numFailures:0,failures:{},results:[],lastResult:void 0});function Zt(oo){++Wo,bp(oo)}var on=[],rn=[],Wo=0;if(Me==="deleteRange"){if(Ze.type===4)return ot({numFailures:Wo,failures:rn,results:[],lastResult:void 0});Ze.type===3?on.push(ht=it.clear()):on.push(ht=it.delete(A(Ze)))}else{var at=St?at?[He,$e]:[He,null]:[$e,null],Kt=at[0],qs=at[1];if(St)for(var Ys=0;Ys<Rt;++Ys)on.push(ht=qs&&qs[Ys]!==void 0?it[Me](Kt[Ys],qs[Ys]):it[Me](Kt[Ys])),ht.onerror=Zt;else for(Ys=0;Ys<Rt;++Ys)on.push(ht=it[Me](Kt[Ys])),ht.onerror=Zt}function qy(oo){oo=oo.target.result,on.forEach(function(Vu,J_){return Vu.error!=null&&(rn[J_]=Vu.error)}),ot({numFailures:Wo,failures:rn,results:Me==="delete"?$e:on.map(function(Vu){return Vu.result}),lastResult:oo})}ht.onerror=function(oo){Zt(oo),qy(oo)},ht.onsuccess=qy})},getMany:function(xe){var Re=xe.trans,Me=xe.keys;return new Promise(function($e,He){$e=kn($e);for(var Ze,ot=Re.objectStore(De),gt=Me.length,it=new Array(gt),at=0,St=0,ht=function(on){on=on.target,it[on._pos]=on.result,++St===at&&$e(it)},Rt=Ar(He),Zt=0;Zt<gt;++Zt)Me[Zt]!=null&&((Ze=ot.get(Me[Zt]))._pos=Zt,Ze.onsuccess=ht,Ze.onerror=Rt,++at);at===0&&$e(it)})},get:function(xe){var Re=xe.trans,Me=xe.key;return new Promise(function($e,He){$e=kn($e);var Ze=Re.objectStore(De).get(Me);Ze.onsuccess=function(ot){return $e(ot.target.result)},Ze.onerror=Ar(He)})},query:(be=_e,function(xe){return new Promise(function(Re,Me){Re=kn(Re);var $e,He,Ze,at=xe.trans,ot=xe.values,gt=xe.limit,ht=xe.query,it=gt===1/0?void 0:gt,St=ht.index,ht=ht.range,at=at.objectStore(De),St=St.isPrimaryKey?at:at.index(St.name),ht=A(ht);if(gt===0)return Re({result:[]});be?((it=ot?St.getAll(ht,it):St.getAllKeys(ht,it)).onsuccess=function(Rt){return Re({result:Rt.target.result})},it.onerror=Ar(Me)):($e=0,He=!ot&&"openKeyCursor"in St?St.openKeyCursor(ht):St.openCursor(ht),Ze=[],He.onsuccess=function(Rt){var Zt=He.result;return Zt?(Ze.push(ot?Zt.value:Zt.primaryKey),++$e===gt?Re({result:Ze}):void Zt.continue()):Re({result:Ze})},He.onerror=Ar(Me))})}),openCursor:function(xe){var Re=xe.trans,Me=xe.values,$e=xe.query,He=xe.reverse,Ze=xe.unique;return new Promise(function(ot,gt){ot=kn(ot);var St=$e.index,it=$e.range,at=Re.objectStore(De),at=St.isPrimaryKey?at:at.index(St.name),St=He?Ze?"prevunique":"prev":Ze?"nextunique":"next",ht=!Me&&"openKeyCursor"in at?at.openKeyCursor(A(it),St):at.openCursor(A(it),St);ht.onerror=Ar(gt),ht.onsuccess=kn(function(Rt){var Zt,on,rn,Wo,Kt=ht.result;Kt?(Kt.___id=++abe,Kt.done=!1,Zt=Kt.continue.bind(Kt),on=(on=Kt.continuePrimaryKey)&&on.bind(Kt),rn=Kt.advance.bind(Kt),Wo=function(){throw new Error("Cursor not stopped")},Kt.trans=Re,Kt.stop=Kt.continue=Kt.continuePrimaryKey=Kt.advance=function(){throw new Error("Cursor not started")},Kt.fail=kn(gt),Kt.next=function(){var qs=this,Ys=1;return this.start(function(){return Ys--?qs.continue():qs.stop()}).then(function(){return qs})},Kt.start=function(qs){function Ys(){if(ht.result)try{qs()}catch(oo){Kt.fail(oo)}else Kt.done=!0,Kt.start=function(){throw new Error("Cursor behind last entry")},Kt.stop()}var qy=new Promise(function(oo,Vu){oo=kn(oo),ht.onerror=Ar(Vu),Kt.fail=Vu,Kt.stop=function(J_){Kt.stop=Kt.continue=Kt.continuePrimaryKey=Kt.advance=Wo,oo(J_)}});return ht.onsuccess=kn(function(oo){ht.onsuccess=Ys,Ys()}),Kt.continue=Zt,Kt.continuePrimaryKey=on,Kt.advance=rn,Ys(),qy},ot(Kt)):ot(null)},gt)})},count:function(xe){var Re=xe.query,Me=xe.trans,$e=Re.index,He=Re.range;return new Promise(function(Ze,ot){var gt=Me.objectStore(De),it=$e.isPrimaryKey?gt:gt.index($e.name),gt=A(He),it=gt?it.count(gt):it.count();it.onsuccess=kn(function(at){return Ze(at.target.result)}),it.onerror=Ar(ot)})}}}var z,se,ue,Te=(se=Ce,ue=YB((z=m).objectStoreNames),{schema:{name:z.name,tables:ue.map(function(Fe){return se.objectStore(Fe)}).map(function(Fe){var be=Fe.keyPath,Re=Fe.autoIncrement,De=a(be),xe={},Re={name:Fe.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:be==null,compound:De,keyPath:be,autoIncrement:Re,unique:!0,extractKey:O_(be)},indexes:YB(Fe.indexNames).map(function(Me){return Fe.index(Me)}).map(function(Ze){var $e=Ze.name,He=Ze.unique,ot=Ze.multiEntry,Ze=Ze.keyPath,ot={name:$e,compound:a(Ze),keyPath:Ze,unique:He,multiEntry:ot,extractKey:O_(Ze)};return xe[_p(Ze)]=ot}),getIndexByKeyPath:function(Me){return xe[_p(Me)]}};return xe[":id"]=Re.primaryKey,be!=null&&(xe[_p(be)]=Re.primaryKey),Re})},hasGetAll:0<ue.length&&"getAll"in se.objectStore(ue[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),Ce=Te.schema,_e=Te.hasGetAll,Te=Ce.tables.map(L),he={};return Te.forEach(function(Fe){return he[Fe.name]=Fe}),{stack:"dbcore",transaction:m.transaction.bind(m),table:function(Fe){if(!he[Fe])throw new Error("Table '".concat(Fe,"' not found"));return he[Fe]},MIN_KEY:-1/0,MAX_KEY:Ep(y),schema:Ce}}function ube(m,y,E,A){var L=E.IDBKeyRange;return E.indexedDB,{dbcore:(A=lbe(y,L,A),m.dbcore.reduce(function(z,se){return se=se.create,s(s({},z),se(z))},A))}}function Ny(m,A){var E=A.db,A=ube(m._middlewares,E,m._deps,A);m.core=A.dbcore,m.tables.forEach(function(L){var z=L.name;m.core.schema.tables.some(function(se){return se.name===z})&&(L.core=m.core.table(z),m[z]instanceof m.Table&&(m[z].core=L.core))})}function Ly(m,y,E,A){E.forEach(function(L){var z=A[L];y.forEach(function(se){var ue=function Ce(_e,Te){return v(_e,Te)||(_e=u(_e))&&Ce(_e,Te)}(se,L);(!ue||"value"in ue&&ue.value===void 0)&&(se===m.Transaction.prototype||se instanceof m.Transaction?p(se,L,{get:function(){return this.table(L)},set:function(Ce){f(this,L,{value:Ce,writable:!0,configurable:!0,enumerable:!0})}}):se[L]=new m.Table(L,z))})})}function M_(m,y){y.forEach(function(E){for(var A in E)E[A]instanceof m.Table&&delete E[A]})}function cbe(m,y){return m._cfg.version-y._cfg.version}function dbe(m,y,E,A){var L=m._dbSchema;E.objectStoreNames.contains("$meta")&&!L.$meta&&(L.$meta=k_("$meta",XB("")[0],[]),m._storeNames.push("$meta"));var z=m._createTransaction("readwrite",m._storeNames,L);z.create(E),z._completion.catch(A);var se=z._reject.bind(z),ue=je.transless||je;Ae(function(){return je.trans=z,je.transless=ue,y!==0?(Ny(m,E),_e=y,((Ce=z).storeNames.includes("$meta")?Ce.table("$meta").get("version").then(function(Te){return Te??_e}):st.resolve(_e)).then(function(Te){return Fe=Te,be=z,De=E,xe=[],Te=(he=m)._versions,Re=he._dbSchema=By(0,he.idbdb,De),(Te=Te.filter(function(Me){return Me._cfg.version>=Fe})).length!==0?(Te.forEach(function(Me){xe.push(function(){var $e=Re,He=Me._cfg.dbschema;$y(he,$e,De),$y(he,He,De),Re=he._dbSchema=He;var Ze=N_($e,He);Ze.add.forEach(function(St){L_(De,St[0],St[1].primKey,St[1].indexes)}),Ze.change.forEach(function(St){if(St.recreate)throw new W.Upgrade("Not yet support for changing primary key");var ht=De.objectStore(St.name);St.add.forEach(function(Rt){return Vy(ht,Rt)}),St.change.forEach(function(Rt){ht.deleteIndex(Rt.name),Vy(ht,Rt)}),St.del.forEach(function(Rt){return ht.deleteIndex(Rt)})});var ot=Me._cfg.contentUpgrade;if(ot&&Me._cfg.version>Fe){Ny(he,De),be._memoizedTables={};var gt=I(He);Ze.del.forEach(function(St){gt[St]=$e[St]}),M_(he,[he.Transaction.prototype]),Ly(he,[he.Transaction.prototype],r(gt),gt),be.schema=gt;var it,at=te(ot);return at&&Ye(),Ze=st.follow(function(){var St;(it=ot(be))&&at&&(St=jt.bind(null,null),it.then(St,St))}),it&&typeof it.then=="function"?st.resolve(it):Ze.then(function(){return it})}}),xe.push(function($e){var He,Ze,ot=Me._cfg.dbschema;He=ot,Ze=$e,[].slice.call(Ze.db.objectStoreNames).forEach(function(gt){return He[gt]==null&&Ze.db.deleteObjectStore(gt)}),M_(he,[he.Transaction.prototype]),Ly(he,[he.Transaction.prototype],he._storeNames,he._dbSchema),be.schema=he._dbSchema}),xe.push(function($e){he.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(he.idbdb.version/10)===Me._cfg.version?(he.idbdb.deleteObjectStore("$meta"),delete he._dbSchema.$meta,he._storeNames=he._storeNames.filter(function(He){return He!=="$meta"})):$e.objectStore("$meta").put(Me._cfg.version,"version"))})}),function Me(){return xe.length?st.resolve(xe.shift()(be.idbtrans)).then(Me):st.resolve()}().then(function(){ZB(Re,De)})):st.resolve();var he,Fe,be,De,xe,Re}).catch(se)):(r(L).forEach(function(Te){L_(E,Te,L[Te].primKey,L[Te].indexes)}),Ny(m,E),void st.follow(function(){return m.on.populate.fire(z)}).catch(se));var Ce,_e})}function hbe(m,y){ZB(m._dbSchema,y),y.db.version%10!=0||y.objectStoreNames.contains("$meta")||y.db.createObjectStore("$meta").add(Math.ceil(y.db.version/10-1),"version");var E=By(0,m.idbdb,y);$y(m,m._dbSchema,y);for(var A=0,L=N_(E,m._dbSchema).change;A<L.length;A++){var z=function(se){if(se.change.length||se.recreate)return console.warn("Unable to patch indexes of table ".concat(se.name," because it has changes on the type of index or primary key.")),{value:void 0};var ue=y.objectStore(se.name);se.add.forEach(function(Ce){H&&console.debug("Dexie upgrade patch: Creating missing index ".concat(se.name,".").concat(Ce.src)),Vy(ue,Ce)})}(L[A]);if(typeof z=="object")return z.value}}function N_(m,y){var E,A={del:[],add:[],change:[]};for(E in m)y[E]||A.del.push(E);for(E in y){var L=m[E],z=y[E];if(L){var se={name:E,def:z,recreate:!1,del:[],add:[],change:[]};if(""+(L.primKey.keyPath||"")!=""+(z.primKey.keyPath||"")||L.primKey.auto!==z.primKey.auto)se.recreate=!0,A.change.push(se);else{var ue=L.idxByName,Ce=z.idxByName,_e=void 0;for(_e in ue)Ce[_e]||se.del.push(_e);for(_e in Ce){var Te=ue[_e],he=Ce[_e];Te?Te.src!==he.src&&se.change.push(he):se.add.push(he)}(0<se.del.length||0<se.add.length||0<se.change.length)&&A.change.push(se)}}else A.add.push([E,z])}return A}function L_(m,y,E,A){var L=m.db.createObjectStore(y,E.keyPath?{keyPath:E.keyPath,autoIncrement:E.auto}:{autoIncrement:E.auto});return A.forEach(function(z){return Vy(L,z)}),L}function ZB(m,y){r(m).forEach(function(E){y.db.objectStoreNames.contains(E)||(H&&console.debug("Dexie: Creating missing table",E),L_(y,E,m[E].primKey,m[E].indexes))})}function Vy(m,y){m.createIndex(y.name,y.keyPath,{unique:y.unique,multiEntry:y.multi})}function By(m,y,E){var A={};return S(y.objectStoreNames,0).forEach(function(L){for(var z=E.objectStore(L),se=A_(qB(_e=z.keyPath),_e||"",!0,!1,!!z.autoIncrement,_e&&typeof _e!="string",!0),ue=[],Ce=0;Ce<z.indexNames.length;++Ce){var Te=z.index(z.indexNames[Ce]),_e=Te.keyPath,Te=A_(Te.name,_e,!!Te.unique,!!Te.multiEntry,!1,_e&&typeof _e!="string",!1);ue.push(Te)}A[L]=k_(L,se,ue)}),A}function $y(m,y,E){for(var A=E.db.objectStoreNames,L=0;L<A.length;++L){var z=A[L],se=E.objectStore(z);m._hasGetAll="getAll"in se;for(var ue=0;ue<se.indexNames.length;++ue){var Ce=se.indexNames[ue],_e=se.index(Ce).keyPath,Te=typeof _e=="string"?_e:"["+S(_e).join("+")+"]";!y[z]||(_e=y[z].idxByName[Te])&&(_e.name=Ce,delete y[z].idxByName[Te],y[z].idxByName[Ce]=_e)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&i.WorkerGlobalScope&&i instanceof i.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(m._hasGetAll=!1)}function XB(m){return m.split(",").map(function(y,E){var A=(y=y.trim()).replace(/([&*]|\+\+)/g,""),L=/^\[/.test(A)?A.match(/^\[(.*)\]$/)[1].split("+"):A;return A_(A,L||null,/\&/.test(y),/\*/.test(y),/\+\+/.test(y),a(L),E===0)})}var fbe=(Hy.prototype._parseStoresSpec=function(m,y){r(m).forEach(function(E){if(m[E]!==null){var A=XB(m[E]),L=A.shift();if(L.unique=!0,L.multi)throw new W.Schema("Primary key cannot be multi-valued");A.forEach(function(z){if(z.auto)throw new W.Schema("Only primary key can be marked as autoIncrement (++)");if(!z.keyPath)throw new W.Schema("Index must have a name and cannot be an empty string")}),y[E]=k_(E,L,A)}})},Hy.prototype.stores=function(E){var y=this.db;this._cfg.storesSource=this._cfg.storesSource?l(this._cfg.storesSource,E):E;var E=y._versions,A={},L={};return E.forEach(function(z){l(A,z._cfg.storesSource),L=z._cfg.dbschema={},z._parseStoresSpec(A,L)}),y._dbSchema=L,M_(y,[y._allTables,y,y.Transaction.prototype]),Ly(y,[y._allTables,y,y.Transaction.prototype,this._cfg.tables],r(L),L),y._storeNames=r(L),this},Hy.prototype.upgrade=function(m){return this._cfg.contentUpgrade=M(this._cfg.contentUpgrade||Ie,m),this},Hy);function Hy(){}function V_(m,y){var E=m._dbNamesDB;return E||(E=m._dbNamesDB=new Ca(Py,{addons:[],indexedDB:m,IDBKeyRange:y})).version(1).stores({dbnames:"name"}),E.table("dbnames")}function B_(m){return m&&typeof m.databases=="function"}function $_(m){return Ae(function(){return je.letThrough=!0,m()})}function H_(m){return!("from"in m)}var Ks=function(m,y){if(!this){var E=new Ks;return m&&"d"in m&&l(E,m),E}l(this,arguments.length?{d:1,from:m,to:1<arguments.length?y:m}:{d:0})};function Rp(m,y,E){var A=ln(y,E);if(!isNaN(A)){if(0<A)throw RangeError();if(H_(m))return l(m,{from:y,to:E,d:1});var L=m.l,A=m.r;if(ln(E,m.from)<0)return L?Rp(L,y,E):m.l={from:y,to:E,d:1,l:null,r:null},QB(m);if(0<ln(y,m.to))return A?Rp(A,y,E):m.r={from:y,to:E,d:1,l:null,r:null},QB(m);ln(y,m.from)<0&&(m.from=y,m.l=null,m.d=A?A.d+1:1),0<ln(E,m.to)&&(m.to=E,m.r=null,m.d=m.l?m.l.d+1:1),E=!m.r,L&&!m.l&&Dp(m,L),A&&E&&Dp(m,A)}}function Dp(m,y){H_(y)||function E(A,Ce){var z=Ce.from,se=Ce.to,ue=Ce.l,Ce=Ce.r;Rp(A,z,se),ue&&E(A,ue),Ce&&E(A,Ce)}(m,y)}function JB(m,y){var E=Gy(y),A=E.next();if(A.done)return!1;for(var L=A.value,z=Gy(m),se=z.next(L.from),ue=se.value;!A.done&&!se.done;){if(ln(ue.from,L.to)<=0&&0<=ln(ue.to,L.from))return!0;ln(L.from,ue.from)<0?L=(A=E.next(ue.from)).value:ue=(se=z.next(L.from)).value}return!1}function Gy(m){var y=H_(m)?null:{s:0,n:m};return{next:function(E){for(var A=0<arguments.length;y;)switch(y.s){case 0:if(y.s=1,A)for(;y.n.l&&ln(E,y.n.from)<0;)y={up:y,n:y.n.l,s:1};else for(;y.n.l;)y={up:y,n:y.n.l,s:1};case 1:if(y.s=2,!A||ln(E,y.n.to)<=0)return{value:y.n,done:!1};case 2:if(y.n.r){y.s=3,y={up:y,n:y.n.r,s:0};continue}case 3:y=y.up}return{done:!0}}}}function QB(m){var y,E,A=(((y=m.r)===null||y===void 0?void 0:y.d)||0)-(((E=m.l)===null||E===void 0?void 0:E.d)||0),L=1<A?"r":A<-1?"l":"";L&&(y=L=="r"?"l":"r",E=s({},m),A=m[L],m.from=A.from,m.to=A.to,m[L]=A[L],E[L]=A[y],(m[y]=E).d=e$(E)),m.d=e$(m)}function e$(E){var y=E.r,E=E.l;return(y?E?Math.max(y.d,E.d):y.d:E?E.d:0)+1}function Uy(m,y){return r(y).forEach(function(E){m[E]?Dp(m[E],y[E]):m[E]=function A(L){var z,se,ue={};for(z in L)d(L,z)&&(se=L[z],ue[z]=!se||typeof se!="object"||D.has(se.constructor)?se:A(se));return ue}(y[E])}),m}function G_(m,y){return m.all||y.all||Object.keys(m).some(function(E){return y[E]&&JB(y[E],m[E])})}h(Ks.prototype,((mi={add:function(m){return Dp(this,m),this},addKey:function(m){return Rp(this,m,m),this},addKeys:function(m){var y=this;return m.forEach(function(E){return Rp(y,E,E)}),this},hasKey:function(m){var y=Gy(this).next(m).value;return y&&ln(y.from,m)<=0&&0<=ln(y.to,m)}})[q]=function(){return Gy(this)},mi));var Nu={},U_={},W_=!1;function Wy(m){Uy(U_,m),W_||(W_=!0,setTimeout(function(){W_=!1,z_(U_,!(U_={}))},0))}function z_(m,y){y===void 0&&(y=!1);var E=new Set;if(m.all)for(var A=0,L=Object.values(Nu);A<L.length;A++)t$(se=L[A],m,E,y);else for(var z in m){var se,ue=/^idb\:\/\/(.*)\/(.*)\//.exec(z);ue&&(z=ue[1],ue=ue[2],(se=Nu["idb://".concat(z,"/").concat(ue)])&&t$(se,m,E,y))}E.forEach(function(Ce){return Ce()})}function t$(m,y,E,A){for(var L=[],z=0,se=Object.entries(m.queries.query);z<se.length;z++){for(var ue=se[z],Ce=ue[0],_e=[],Te=0,he=ue[1];Te<he.length;Te++){var Fe=he[Te];G_(y,Fe.obsSet)?Fe.subscribers.forEach(function(Re){return E.add(Re)}):A&&_e.push(Fe)}A&&L.push([Ce,_e])}if(A)for(var be=0,De=L;be<De.length;be++){var xe=De[be],Ce=xe[0],_e=xe[1];m.queries.query[Ce]=_e}}function pbe(m){var y=m._state,E=m._deps.indexedDB;if(y.isBeingOpened||m.idbdb)return y.dbReadyPromise.then(function(){return y.dbOpenError?Kn(y.dbOpenError):m});y.isBeingOpened=!0,y.dbOpenError=null,y.openComplete=!1;var A=y.openCanceller,L=Math.round(10*m.verno),z=!1;function se(){if(y.openCanceller!==A)throw new W.DatabaseClosed("db.open() was cancelled")}function ue(){return new st(function(Fe,be){if(se(),!E)throw new W.MissingAPI;var De=m.name,xe=y.autoSchema||!L?E.open(De):E.open(De,L);if(!xe)throw new W.MissingAPI;xe.onerror=Ar(be),xe.onblocked=kn(m._fireOnBlocked),xe.onupgradeneeded=kn(function(Re){var Me;Te=xe.transaction,y.autoSchema&&!m._options.allowEmptyDB?(xe.onerror=bp,Te.abort(),xe.result.close(),(Me=E.deleteDatabase(De)).onsuccess=Me.onerror=kn(function(){be(new W.NoSuchDatabase("Database ".concat(De," doesnt exist")))})):(Te.onerror=Ar(be),Re=Re.oldVersion>Math.pow(2,62)?0:Re.oldVersion,he=Re<1,m.idbdb=xe.result,z&&hbe(m,Te),dbe(m,Re/10,Te,be))},be),xe.onsuccess=kn(function(){Te=null;var Re,Me,$e,He,Ze,ot=m.idbdb=xe.result,gt=S(ot.objectStoreNames);if(0<gt.length)try{var it=ot.transaction((He=gt).length===1?He[0]:He,"readonly");if(y.autoSchema)Me=ot,$e=it,(Re=m).verno=Me.version/10,$e=Re._dbSchema=By(0,Me,$e),Re._storeNames=S(Me.objectStoreNames,0),Ly(Re,[Re._allTables],r($e),$e);else if($y(m,m._dbSchema,it),((Ze=N_(By(0,(Ze=m).idbdb,it),Ze._dbSchema)).add.length||Ze.change.some(function(at){return at.add.length||at.change.length}))&&!z)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),ot.close(),L=ot.version+1,z=!0,Fe(ue());Ny(m,it)}catch{}Md.push(m),ot.onversionchange=kn(function(at){y.vcFired=!0,m.on("versionchange").fire(at)}),ot.onclose=kn(function(at){m.on("close").fire(at)}),he&&(Ze=m._deps,it=De,ot=Ze.indexedDB,Ze=Ze.IDBKeyRange,B_(ot)||it===Py||V_(ot,Ze).put({name:it}).catch(Ie)),Fe()},be)}).catch(function(Fe){switch(Fe==null?void 0:Fe.name){case"UnknownError":if(0<y.PR1398_maxLoop)return y.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),ue();break;case"VersionError":if(0<L)return L=0,ue()}return st.reject(Fe)})}var Ce,_e=y.dbReadyResolve,Te=null,he=!1;return st.race([A,(typeof navigator>"u"?st.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(Fe){function be(){return indexedDB.databases().finally(Fe)}Ce=setInterval(be,100),be()}).finally(function(){return clearInterval(Ce)}):Promise.resolve()).then(ue)]).then(function(){return se(),y.onReadyBeingFired=[],st.resolve($_(function(){return m.on.ready.fire(m.vip)})).then(function Fe(){if(0<y.onReadyBeingFired.length){var be=y.onReadyBeingFired.reduce(M,Ie);return y.onReadyBeingFired=[],st.resolve($_(function(){return be(m.vip)})).then(Fe)}})}).finally(function(){y.openCanceller===A&&(y.onReadyBeingFired=null,y.isBeingOpened=!1)}).catch(function(Fe){y.dbOpenError=Fe;try{Te&&Te.abort()}catch{}return A===y.openCanceller&&m._close(),Kn(Fe)}).finally(function(){y.openComplete=!0,_e()}).then(function(){var Fe;return he&&(Fe={},m.tables.forEach(function(be){be.schema.indexes.forEach(function(De){De.name&&(Fe["idb://".concat(m.name,"/").concat(be.name,"/").concat(De.name)]=new Ks(-1/0,[[[]]]))}),Fe["idb://".concat(m.name,"/").concat(be.name,"/")]=Fe["idb://".concat(m.name,"/").concat(be.name,"/:dels")]=new Ks(-1/0,[[[]]])}),vl(Sp).fire(Fe),z_(Fe,!0)),m})}function j_(m){function y(z){return m.next(z)}var E=L(y),A=L(function(z){return m.throw(z)});function L(z){return function(Ce){var ue=z(Ce),Ce=ue.value;return ue.done?Ce:Ce&&typeof Ce.then=="function"?Ce.then(E,A):a(Ce)?Promise.all(Ce).then(E,A):E(Ce)}}return L(y)()}function zy(m,y,E){for(var A=a(m)?m.slice():[m],L=0;L<E;++L)A.push(y);return A}var gbe={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(m){return s(s({},m),{table:function(y){var E=m.table(y),A=E.schema,L={},z=[];function se(he,Fe,be){var De=_p(he),xe=L[De]=L[De]||[],Re=he==null?0:typeof he=="string"?1:he.length,Me=0<Fe,Me=s(s({},be),{name:Me?"".concat(De,"(virtual-from:").concat(be.name,")"):be.name,lowLevelIndex:be,isVirtual:Me,keyTail:Fe,keyLength:Re,extractKey:O_(he),unique:!Me&&be.unique});return xe.push(Me),Me.isPrimaryKey||z.push(Me),1<Re&&se(Re===2?he[0]:he.slice(0,Re-1),Fe+1,be),xe.sort(function($e,He){return $e.keyTail-He.keyTail}),Me}y=se(A.primaryKey.keyPath,0,A.primaryKey),L[":id"]=[y];for(var ue=0,Ce=A.indexes;ue<Ce.length;ue++){var _e=Ce[ue];se(_e.keyPath,0,_e)}function Te(he){var Fe,be=he.query.index;return be.isVirtual?s(s({},he),{query:{index:be.lowLevelIndex,range:(Fe=he.query.range,be=be.keyTail,{type:Fe.type===1?2:Fe.type,lower:zy(Fe.lower,Fe.lowerOpen?m.MAX_KEY:m.MIN_KEY,be),lowerOpen:!0,upper:zy(Fe.upper,Fe.upperOpen?m.MIN_KEY:m.MAX_KEY,be),upperOpen:!0})}}):he}return s(s({},E),{schema:s(s({},A),{primaryKey:y,indexes:z,getIndexByKeyPath:function(he){return(he=L[_p(he)])&&he[0]}}),count:function(he){return E.count(Te(he))},query:function(he){return E.query(Te(he))},openCursor:function(he){var Fe=he.query.index,be=Fe.keyTail,De=Fe.isVirtual,xe=Fe.keyLength;return De?E.openCursor(Te(he)).then(function(Me){return Me&&Re(Me)}):E.openCursor(he);function Re(Me){return Object.create(Me,{continue:{value:function($e){$e!=null?Me.continue(zy($e,he.reverse?m.MAX_KEY:m.MIN_KEY,be)):he.unique?Me.continue(Me.key.slice(0,xe).concat(he.reverse?m.MIN_KEY:m.MAX_KEY,be)):Me.continue()}},continuePrimaryKey:{value:function($e,He){Me.continuePrimaryKey(zy($e,m.MAX_KEY,be),He)}},primaryKey:{get:function(){return Me.primaryKey}},key:{get:function(){var $e=Me.key;return xe===1?$e[0]:$e.slice(0,xe)}},value:{get:function(){return Me.value}}})}}})}})}};function K_(m,y,E,A){return E=E||{},A=A||"",r(m).forEach(function(L){var z,se,ue;d(y,L)?(z=m[L],se=y[L],typeof z=="object"&&typeof se=="object"&&z&&se?(ue=$(z))!==$(se)?E[A+L]=y[L]:ue==="Object"?K_(z,se,E,A+L+"."):z!==se&&(E[A+L]=y[L]):z!==se&&(E[A+L]=y[L])):E[A+L]=void 0}),r(y).forEach(function(L){d(m,L)||(E[A+L]=y[L])}),E}function q_(m,y){return y.type==="delete"?y.keys:y.keys||y.values.map(m.extractKey)}var mbe={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(m){return s(s({},m),{table:function(y){var E=m.table(y),A=E.schema.primaryKey;return s(s({},E),{mutate:function(L){var z=je.trans,se=z.table(y).hook,ue=se.deleting,Ce=se.creating,_e=se.updating;switch(L.type){case"add":if(Ce.fire===Ie)break;return z._promise("readwrite",function(){return Te(L)},!0);case"put":if(Ce.fire===Ie&&_e.fire===Ie)break;return z._promise("readwrite",function(){return Te(L)},!0);case"delete":if(ue.fire===Ie)break;return z._promise("readwrite",function(){return Te(L)},!0);case"deleteRange":if(ue.fire===Ie)break;return z._promise("readwrite",function(){return function he(Fe,be,De){return E.query({trans:Fe,values:!1,query:{index:A,range:be},limit:De}).then(function(xe){var Re=xe.result;return Te({type:"delete",keys:Re,trans:Fe}).then(function(Me){return 0<Me.numFailures?Promise.reject(Me.failures[0]):Re.length<De?{failures:[],numFailures:0,lastResult:void 0}:he(Fe,s(s({},be),{lower:Re[Re.length-1],lowerOpen:!0}),De)})})}(L.trans,L.range,1e4)},!0)}return E.mutate(L);function Te(he){var Fe,be,De,xe=je.trans,Re=he.keys||q_(A,he);if(!Re)throw new Error("Keys missing");return(he=he.type==="add"||he.type==="put"?s(s({},he),{keys:Re}):s({},he)).type!=="delete"&&(he.values=o([],he.values)),he.keys&&(he.keys=o([],he.keys)),Fe=E,De=Re,((be=he).type==="add"?Promise.resolve([]):Fe.getMany({trans:be.trans,keys:De,cache:"immutable"})).then(function(Me){var $e=Re.map(function(He,Ze){var ot,gt,it,at=Me[Ze],St={onerror:null,onsuccess:null};return he.type==="delete"?ue.fire.call(St,He,at,xe):he.type==="add"||at===void 0?(ot=Ce.fire.call(St,He,he.values[Ze],xe),He==null&&ot!=null&&(he.keys[Ze]=He=ot,A.outbound||T(he.values[Ze],A.keyPath,He))):(ot=K_(at,he.values[Ze]),(gt=_e.fire.call(St,ot,He,at,xe))&&(it=he.values[Ze],Object.keys(gt).forEach(function(ht){d(it,ht)?it[ht]=gt[ht]:T(it,ht,gt[ht])}))),St});return E.mutate(he).then(function(He){for(var Ze=He.failures,ot=He.results,gt=He.numFailures,He=He.lastResult,it=0;it<Re.length;++it){var at=(ot||Re)[it],St=$e[it];at==null?St.onerror&&St.onerror(Ze[it]):St.onsuccess&&St.onsuccess(he.type==="put"&&Me[it]?he.values[it]:at)}return{failures:Ze,results:ot,numFailures:gt,lastResult:He}}).catch(function(He){return $e.forEach(function(Ze){return Ze.onerror&&Ze.onerror(He)}),Promise.reject(He)})})}}})}})}};function n$(m,y,E){try{if(!y||y.keys.length<m.length)return null;for(var A=[],L=0,z=0;L<y.keys.length&&z<m.length;++L)ln(y.keys[L],m[z])===0&&(A.push(E?k(y.values[L]):y.values[L]),++z);return A.length===m.length?A:null}catch{return null}}var vbe={stack:"dbcore",level:-1,create:function(m){return{table:function(y){var E=m.table(y);return s(s({},E),{getMany:function(A){if(!A.cache)return E.getMany(A);var L=n$(A.keys,A.trans._cache,A.cache==="clone");return L?st.resolve(L):E.getMany(A).then(function(z){return A.trans._cache={keys:A.keys,values:A.cache==="clone"?k(z):z},z})},mutate:function(A){return A.type!=="add"&&(A.trans._cache=null),E.mutate(A)}})}}}};function s$(m,y){return m.trans.mode==="readonly"&&!!m.subscr&&!m.trans.explicit&&m.trans.db._options.cache!=="disabled"&&!y.schema.primaryKey.outbound}function o$(m,y){switch(m){case"query":return y.values&&!y.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var ybe={stack:"dbcore",level:0,name:"Observability",create:function(m){var y=m.schema.name,E=new Ks(m.MIN_KEY,m.MAX_KEY);return s(s({},m),{transaction:function(A,L,z){if(je.subscr&&L!=="readonly")throw new W.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(je.querier));return m.transaction(A,L,z)},table:function(A){var L=m.table(A),z=L.schema,se=z.primaryKey,he=z.indexes,ue=se.extractKey,Ce=se.outbound,_e=se.autoIncrement&&he.filter(function(be){return be.compound&&be.keyPath.includes(se.keyPath)}),Te=s(s({},L),{mutate:function(be){function De(ht){return ht="idb://".concat(y,"/").concat(A,"/").concat(ht),He[ht]||(He[ht]=new Ks)}var xe,Re,Me,$e=be.trans,He=be.mutatedParts||(be.mutatedParts={}),Ze=De(""),ot=De(":dels"),gt=be.type,St=be.type==="deleteRange"?[be.range]:be.type==="delete"?[be.keys]:be.values.length<50?[q_(se,be).filter(function(ht){return ht}),be.values]:[],it=St[0],at=St[1],St=be.trans._cache;return a(it)?(Ze.addKeys(it),(St=gt==="delete"||it.length===at.length?n$(it,St):null)||ot.addKeys(it),(St||at)&&(xe=De,Re=St,Me=at,z.indexes.forEach(function(ht){var Rt=xe(ht.name||"");function Zt(rn){return rn!=null?ht.extractKey(rn):null}function on(rn){return ht.multiEntry&&a(rn)?rn.forEach(function(Wo){return Rt.addKey(Wo)}):Rt.addKey(rn)}(Re||Me).forEach(function(rn,qs){var Kt=Re&&Zt(Re[qs]),qs=Me&&Zt(Me[qs]);ln(Kt,qs)!==0&&(Kt!=null&&on(Kt),qs!=null&&on(qs))})}))):it?(at={from:(at=it.lower)!==null&&at!==void 0?at:m.MIN_KEY,to:(at=it.upper)!==null&&at!==void 0?at:m.MAX_KEY},ot.add(at),Ze.add(at)):(Ze.add(E),ot.add(E),z.indexes.forEach(function(ht){return De(ht.name).add(E)})),L.mutate(be).then(function(ht){return!it||be.type!=="add"&&be.type!=="put"||(Ze.addKeys(ht.results),_e&&_e.forEach(function(Rt){for(var Zt=be.values.map(function(Kt){return Rt.extractKey(Kt)}),on=Rt.keyPath.findIndex(function(Kt){return Kt===se.keyPath}),rn=0,Wo=ht.results.length;rn<Wo;++rn)Zt[rn][on]=ht.results[rn];De(Rt.name).addKeys(Zt)})),$e.mutatedParts=Uy($e.mutatedParts||{},He),ht})}}),he=function(De){var xe=De.query,De=xe.index,xe=xe.range;return[De,new Ks((De=xe.lower)!==null&&De!==void 0?De:m.MIN_KEY,(xe=xe.upper)!==null&&xe!==void 0?xe:m.MAX_KEY)]},Fe={get:function(be){return[se,new Ks(be.key)]},getMany:function(be){return[se,new Ks().addKeys(be.keys)]},count:he,query:he,openCursor:he};return r(Fe).forEach(function(be){Te[be]=function(De){var xe=je.subscr,Re=!!xe,Me=s$(je,L)&&o$(be,De)?De.obsSet={}:xe;if(Re){var $e=function(at){return at="idb://".concat(y,"/").concat(A,"/").concat(at),Me[at]||(Me[at]=new Ks)},He=$e(""),Ze=$e(":dels"),xe=Fe[be](De),Re=xe[0],xe=xe[1];if((be==="query"&&Re.isPrimaryKey&&!De.values?Ze:$e(Re.name||"")).add(xe),!Re.isPrimaryKey){if(be!=="count"){var ot=be==="query"&&Ce&&De.values&&L.query(s(s({},De),{values:!1}));return L[be].apply(this,arguments).then(function(at){if(be==="query"){if(Ce&&De.values)return ot.then(function(Zt){return Zt=Zt.result,He.addKeys(Zt),at});var St=De.values?at.result.map(ue):at.result;(De.values?He:Ze).addKeys(St)}else if(be==="openCursor"){var ht=at,Rt=De.values;return ht&&Object.create(ht,{key:{get:function(){return Ze.addKey(ht.primaryKey),ht.key}},primaryKey:{get:function(){var Zt=ht.primaryKey;return Ze.addKey(Zt),Zt}},value:{get:function(){return Rt&&He.addKey(ht.primaryKey),ht.value}}})}return at})}Ze.add(E)}}return L[be].apply(this,arguments)}}),Te}})}};function i$(m,y,E){if(E.numFailures===0)return y;if(y.type==="deleteRange")return null;var A=y.keys?y.keys.length:"values"in y&&y.values?y.values.length:1;return E.numFailures===A?null:(y=s({},y),a(y.keys)&&(y.keys=y.keys.filter(function(L,z){return!(z in E.failures)})),"values"in y&&a(y.values)&&(y.values=y.values.filter(function(L,z){return!(z in E.failures)})),y)}function Y_(m,y){return E=m,((A=y).lower===void 0||(A.lowerOpen?0<ln(E,A.lower):0<=ln(E,A.lower)))&&(m=m,(y=y).upper===void 0||(y.upperOpen?ln(m,y.upper)<0:ln(m,y.upper)<=0));var E,A}function r$(m,y,Fe,A,L,z){if(!Fe||Fe.length===0)return m;var se=y.query.index,ue=se.multiEntry,Ce=y.query.range,_e=A.schema.primaryKey.extractKey,Te=se.extractKey,he=(se.lowLevelIndex||se).extractKey,Fe=Fe.reduce(function(be,De){var xe=be,Re=[];if(De.type==="add"||De.type==="put")for(var Me=new Ks,$e=De.values.length-1;0<=$e;--$e){var He,Ze=De.values[$e],ot=_e(Ze);Me.hasKey(ot)||(He=Te(Ze),(ue&&a(He)?He.some(function(ht){return Y_(ht,Ce)}):Y_(He,Ce))&&(Me.addKey(ot),Re.push(Ze)))}switch(De.type){case"add":var gt=new Ks().addKeys(y.values?be.map(function(Rt){return _e(Rt)}):be),xe=be.concat(y.values?Re.filter(function(Rt){return Rt=_e(Rt),!gt.hasKey(Rt)&&(gt.addKey(Rt),!0)}):Re.map(function(Rt){return _e(Rt)}).filter(function(Rt){return!gt.hasKey(Rt)&&(gt.addKey(Rt),!0)}));break;case"put":var it=new Ks().addKeys(De.values.map(function(Rt){return _e(Rt)}));xe=be.filter(function(Rt){return!it.hasKey(y.values?_e(Rt):Rt)}).concat(y.values?Re:Re.map(function(Rt){return _e(Rt)}));break;case"delete":var at=new Ks().addKeys(De.keys);xe=be.filter(function(Rt){return!at.hasKey(y.values?_e(Rt):Rt)});break;case"deleteRange":var St=De.range;xe=be.filter(function(Rt){return!Y_(_e(Rt),St)})}return xe},m);return Fe===m?m:(Fe.sort(function(be,De){return ln(he(be),he(De))||ln(_e(be),_e(De))}),y.limit&&y.limit<1/0&&(Fe.length>y.limit?Fe.length=y.limit:m.length===y.limit&&Fe.length<y.limit&&(L.dirty=!0)),z?Object.freeze(Fe):Fe)}function a$(m,y){return ln(m.lower,y.lower)===0&&ln(m.upper,y.upper)===0&&!!m.lowerOpen==!!y.lowerOpen&&!!m.upperOpen==!!y.upperOpen}function wbe(m,y){return function(E,A,L,z){if(E===void 0)return A!==void 0?-1:0;if(A===void 0)return 1;if((A=ln(E,A))===0){if(L&&z)return 0;if(L)return 1;if(z)return-1}return A}(m.lower,y.lower,m.lowerOpen,y.lowerOpen)<=0&&0<=function(E,A,L,z){if(E===void 0)return A!==void 0?1:0;if(A===void 0)return-1;if((A=ln(E,A))===0){if(L&&z)return 0;if(L)return-1;if(z)return 1}return A}(m.upper,y.upper,m.upperOpen,y.upperOpen)}function Cbe(m,y,E,A){m.subscribers.add(E),A.addEventListener("abort",function(){var L,z;m.subscribers.delete(E),m.subscribers.size===0&&(L=m,z=y,setTimeout(function(){L.subscribers.size===0&&ee(z,L)},3e3))})}var bbe={stack:"dbcore",level:0,name:"Cache",create:function(m){var y=m.schema.name;return s(s({},m),{transaction:function(E,A,L){var z,se,ue=m.transaction(E,A,L);return A==="readwrite"&&(se=(z=new AbortController).signal,L=function(Ce){return function(){if(z.abort(),A==="readwrite"){for(var _e=new Set,Te=0,he=E;Te<he.length;Te++){var Fe=he[Te],be=Nu["idb://".concat(y,"/").concat(Fe)];if(be){var De=m.table(Fe),xe=be.optimisticOps.filter(function(Rt){return Rt.trans===ue});if(ue._explicit&&Ce&&ue.mutatedParts)for(var Re=0,Me=Object.values(be.queries.query);Re<Me.length;Re++)for(var $e=0,He=(gt=Me[Re]).slice();$e<He.length;$e++)G_((it=He[$e]).obsSet,ue.mutatedParts)&&(ee(gt,it),it.subscribers.forEach(function(Rt){return _e.add(Rt)}));else if(0<xe.length){be.optimisticOps=be.optimisticOps.filter(function(Rt){return Rt.trans!==ue});for(var Ze=0,ot=Object.values(be.queries.query);Ze<ot.length;Ze++)for(var gt,it,at,St=0,ht=(gt=ot[Ze]).slice();St<ht.length;St++)(it=ht[St]).res!=null&&ue.mutatedParts&&(Ce&&!it.dirty?(at=Object.isFrozen(it.res),at=r$(it.res,it.req,xe,De,it,at),it.dirty?(ee(gt,it),it.subscribers.forEach(function(Rt){return _e.add(Rt)})):at!==it.res&&(it.res=at,it.promise=st.resolve({result:at}))):(it.dirty&&ee(gt,it),it.subscribers.forEach(function(Rt){return _e.add(Rt)})))}}}_e.forEach(function(Rt){return Rt()})}}},ue.addEventListener("abort",L(!1),{signal:se}),ue.addEventListener("error",L(!1),{signal:se}),ue.addEventListener("complete",L(!0),{signal:se})),ue},table:function(E){var A=m.table(E),L=A.schema.primaryKey;return s(s({},A),{mutate:function(z){var se=je.trans;if(L.outbound||se.db._options.cache==="disabled"||se.explicit||se.idbtrans.mode!=="readwrite")return A.mutate(z);var ue=Nu["idb://".concat(y,"/").concat(E)];return ue?(se=A.mutate(z),z.type!=="add"&&z.type!=="put"||!(50<=z.values.length||q_(L,z).some(function(Ce){return Ce==null}))?(ue.optimisticOps.push(z),z.mutatedParts&&Wy(z.mutatedParts),se.then(function(Ce){0<Ce.numFailures&&(ee(ue.optimisticOps,z),(Ce=i$(0,z,Ce))&&ue.optimisticOps.push(Ce),z.mutatedParts&&Wy(z.mutatedParts))}),se.catch(function(){ee(ue.optimisticOps,z),z.mutatedParts&&Wy(z.mutatedParts)})):se.then(function(Ce){var _e=i$(0,s(s({},z),{values:z.values.map(function(Te,he){var Fe;return Ce.failures[he]?Te:(Te=(Fe=L.keyPath)!==null&&Fe!==void 0&&Fe.includes(".")?k(Te):s({},Te),T(Te,L.keyPath,Ce.results[he]),Te)})}),Ce);ue.optimisticOps.push(_e),queueMicrotask(function(){return z.mutatedParts&&Wy(z.mutatedParts)})}),se):A.mutate(z)},query:function(z){if(!s$(je,A)||!o$("query",z))return A.query(z);var se=((_e=je.trans)===null||_e===void 0?void 0:_e.db._options.cache)==="immutable",he=je,ue=he.requery,Ce=he.signal,_e=function(De,xe,Re,Me){var $e=Nu["idb://".concat(De,"/").concat(xe)];if(!$e)return[];if(!(xe=$e.queries[Re]))return[null,!1,$e,null];var He=xe[(Me.query?Me.query.index.name:null)||""];if(!He)return[null,!1,$e,null];switch(Re){case"query":var Ze=He.find(function(ot){return ot.req.limit===Me.limit&&ot.req.values===Me.values&&a$(ot.req.query.range,Me.query.range)});return Ze?[Ze,!0,$e,He]:[He.find(function(ot){return("limit"in ot.req?ot.req.limit:1/0)>=Me.limit&&(!Me.values||ot.req.values)&&wbe(ot.req.query.range,Me.query.range)}),!1,$e,He];case"count":return Ze=He.find(function(ot){return a$(ot.req.query.range,Me.query.range)}),[Ze,!!Ze,$e,He]}}(y,E,"query",z),Te=_e[0],he=_e[1],Fe=_e[2],be=_e[3];return Te&&he?Te.obsSet=z.obsSet:(he=A.query(z).then(function(De){var xe=De.result;if(Te&&(Te.res=xe),se){for(var Re=0,Me=xe.length;Re<Me;++Re)Object.freeze(xe[Re]);Object.freeze(xe)}else De.result=k(xe);return De}).catch(function(De){return be&&Te&&ee(be,Te),Promise.reject(De)}),Te={obsSet:z.obsSet,promise:he,subscribers:new Set,type:"query",req:z,dirty:!1},be?be.push(Te):(be=[Te],(Fe=Fe||(Nu["idb://".concat(y,"/").concat(E)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[z.query.index.name||""]=be)),Cbe(Te,be,ue,Ce),Te.promise.then(function(De){return{result:r$(De.result,z,Fe==null?void 0:Fe.optimisticOps,A,Te,se)}})}})}})}};function jy(m,y){return new Proxy(m,{get:function(E,A,L){return A==="db"?y:Reflect.get(E,A,L)}})}var Ca=(as.prototype.version=function(m){if(isNaN(m)||m<.1)throw new W.Type("Given version is not a positive number");if(m=Math.round(10*m)/10,this.idbdb||this._state.isBeingOpened)throw new W.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,m);var y=this._versions,E=y.filter(function(A){return A._cfg.version===m})[0];return E||(E=new this.Version(m),y.push(E),y.sort(cbe),E.stores({}),this._state.autoSchema=!1,E)},as.prototype._whenReady=function(m){var y=this;return this.idbdb&&(this._state.openComplete||je.letThrough||this._vip)?m():new st(function(E,A){if(y._state.openComplete)return A(new W.DatabaseClosed(y._state.dbOpenError));if(!y._state.isBeingOpened){if(!y._state.autoOpen)return void A(new W.DatabaseClosed);y.open().catch(Ie)}y._state.dbReadyPromise.then(E,A)}).then(m)},as.prototype.use=function(m){var y=m.stack,E=m.create,A=m.level,L=m.name;return L&&this.unuse({stack:y,name:L}),m=this._middlewares[y]||(this._middlewares[y]=[]),m.push({stack:y,create:E,level:A??10,name:L}),m.sort(function(z,se){return z.level-se.level}),this},as.prototype.unuse=function(m){var y=m.stack,E=m.name,A=m.create;return y&&this._middlewares[y]&&(this._middlewares[y]=this._middlewares[y].filter(function(L){return A?L.create!==A:!!E&&L.name!==E})),this},as.prototype.open=function(){var m=this;return Co(Ne,function(){return pbe(m)})},as.prototype._close=function(){var m=this._state,y=Md.indexOf(this);if(0<=y&&Md.splice(y,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}m.isBeingOpened||(m.dbReadyPromise=new st(function(E){m.dbReadyResolve=E}),m.openCanceller=new st(function(E,A){m.cancelOpen=A}))},as.prototype.close=function(E){var y=(E===void 0?{disableAutoOpen:!0}:E).disableAutoOpen,E=this._state;y?(E.isBeingOpened&&E.cancelOpen(new W.DatabaseClosed),this._close(),E.autoOpen=!1,E.dbOpenError=new W.DatabaseClosed):(this._close(),E.autoOpen=this._options.autoOpen||E.isBeingOpened,E.openComplete=!1,E.dbOpenError=null)},as.prototype.delete=function(m){var y=this;m===void 0&&(m={disableAutoOpen:!0});var E=0<arguments.length&&typeof arguments[0]!="object",A=this._state;return new st(function(L,z){function se(){y.close(m);var ue=y._deps.indexedDB.deleteDatabase(y.name);ue.onsuccess=kn(function(){var Ce,_e,Te;Ce=y._deps,_e=y.name,Te=Ce.indexedDB,Ce=Ce.IDBKeyRange,B_(Te)||_e===Py||V_(Te,Ce).delete(_e).catch(Ie),L()}),ue.onerror=Ar(z),ue.onblocked=y._fireOnBlocked}if(E)throw new W.InvalidArgument("Invalid closeOptions argument to db.delete()");A.isBeingOpened?A.dbReadyPromise.then(se):se()})},as.prototype.backendDB=function(){return this.idbdb},as.prototype.isOpen=function(){return this.idbdb!==null},as.prototype.hasBeenClosed=function(){var m=this._state.dbOpenError;return m&&m.name==="DatabaseClosed"},as.prototype.hasFailed=function(){return this._state.dbOpenError!==null},as.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(as.prototype,"tables",{get:function(){var m=this;return r(this._allTables).map(function(y){return m._allTables[y]})},enumerable:!1,configurable:!0}),as.prototype.transaction=function(){var m=(function(y,E,A){var L=arguments.length;if(L<2)throw new W.InvalidArgument("Too few arguments");for(var z=new Array(L-1);--L;)z[L-1]=arguments[L];return A=z.pop(),[y,P(z),A]}).apply(this,arguments);return this._transaction.apply(this,m)},as.prototype._transaction=function(m,y,E){var A=this,L=je.trans;L&&L.db===this&&m.indexOf("!")===-1||(L=null);var z,se,ue=m.indexOf("?")!==-1;m=m.replace("!","").replace("?","");try{if(se=y.map(function(_e){if(_e=_e instanceof A.Table?_e.name:_e,typeof _e!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return _e}),m=="r"||m===D_)z=D_;else{if(m!="rw"&&m!=T_)throw new W.InvalidArgument("Invalid transaction mode: "+m);z=T_}if(L){if(L.mode===D_&&z===T_){if(!ue)throw new W.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");L=null}L&&se.forEach(function(_e){if(L&&L.storeNames.indexOf(_e)===-1){if(!ue)throw new W.SubTransaction("Table "+_e+" not included in parent transaction.");L=null}}),ue&&L&&!L.active&&(L=null)}}catch(_e){return L?L._promise(null,function(Te,he){he(_e)}):Kn(_e)}var Ce=(function _e(Te,he,Fe,be,De){return st.resolve().then(function(){var xe=je.transless||je,Re=Te._createTransaction(he,Fe,Te._dbSchema,be);if(Re.explicit=!0,xe={trans:Re,transless:xe},be)Re.idbtrans=be.idbtrans;else try{Re.create(),Re.idbtrans._explicit=!0,Te._state.PR1398_maxLoop=3}catch(He){return He.name===ae.InvalidState&&Te.isOpen()&&0<--Te._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),Te.close({disableAutoOpen:!1}),Te.open().then(function(){return _e(Te,he,Fe,null,De)})):Kn(He)}var Me,$e=te(De);return $e&&Ye(),xe=st.follow(function(){var He;(Me=De.call(Re,Re))&&($e?(He=jt.bind(null,null),Me.then(He,He)):typeof Me.next=="function"&&typeof Me.throw=="function"&&(Me=j_(Me)))},xe),(Me&&typeof Me.then=="function"?st.resolve(Me).then(function(He){return Re.active?He:Kn(new W.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):xe.then(function(){return Me})).then(function(He){return be&&Re._resolve(),Re._completion.then(function(){return He})}).catch(function(He){return Re._reject(He),Kn(He)})})}).bind(null,this,z,se,L,E);return L?L._promise(z,Ce,"lock"):je.trans?Co(je.transless,function(){return A._whenReady(Ce)}):this._whenReady(Ce)},as.prototype.table=function(m){if(!d(this._allTables,m))throw new W.InvalidTable("Table ".concat(m," does not exist"));return this._allTables[m]},as);function as(m,y){var E=this;this._middlewares={},this.verno=0;var A=as.dependencies;this._options=y=s({addons:as.addons,autoOpen:!0,indexedDB:A.indexedDB,IDBKeyRange:A.IDBKeyRange,cache:"cloned"},y),this._deps={indexedDB:y.indexedDB,IDBKeyRange:y.IDBKeyRange},A=y.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var L,z,se,ue,Ce,_e={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Ie,dbReadyPromise:null,cancelOpen:Ie,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:y.autoOpen};_e.dbReadyPromise=new st(function(he){_e.dbReadyResolve=he}),_e.openCanceller=new st(function(he,Fe){_e.cancelOpen=Fe}),this._state=_e,this.name=m,this.on=yp(this,"populate","blocked","versionchange","close",{ready:[M,Ie]}),this.on.ready.subscribe=b(this.on.ready.subscribe,function(he){return function(Fe,be){as.vip(function(){var De,xe=E._state;xe.openComplete?(xe.dbOpenError||st.resolve().then(Fe),be&&he(Fe)):xe.onReadyBeingFired?(xe.onReadyBeingFired.push(Fe),be&&he(Fe)):(he(Fe),De=E,be||he(function Re(){De.on.ready.unsubscribe(Fe),De.on.ready.unsubscribe(Re)}))})}}),this.Collection=(L=this,wp(sbe.prototype,function(Me,Re){this.db=L;var be=VB,De=null;if(Re)try{be=Re()}catch($e){De=$e}var xe=Me._ctx,Re=xe.table,Me=Re.hook.reading.fire;this._ctx={table:Re,index:xe.index,isPrimKey:!xe.index||Re.schema.primKey.keyPath&&xe.index===Re.schema.primKey.name,range:be,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:De,or:xe.or,valueMapper:Me!==G?Me:null}})),this.Table=(z=this,wp(GB.prototype,function(he,Fe,be){this.db=z,this._tx=be,this.name=he,this.schema=Fe,this.hook=z._allTables[he]?z._allTables[he].hook:yp(null,{creating:[ke,Ie],reading:[Z,G],updating:[Le,Ie],deleting:[Pe,Ie]})})),this.Transaction=(se=this,wp(rbe.prototype,function(he,Fe,be,De,xe){var Re=this;this.db=se,this.mode=he,this.storeNames=Fe,this.schema=be,this.chromeTransactionDurability=De,this.idbtrans=null,this.on=yp(this,"complete","error","abort"),this.parent=xe||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new st(function(Me,$e){Re._resolve=Me,Re._reject=$e}),this._completion.then(function(){Re.active=!1,Re.on.complete.fire()},function(Me){var $e=Re.active;return Re.active=!1,Re.on.error.fire(Me),Re.parent?Re.parent._reject(Me):$e&&Re.idbtrans&&Re.idbtrans.abort(),Kn(Me)})})),this.Version=(ue=this,wp(fbe.prototype,function(he){this.db=ue,this._cfg={version:he,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(Ce=this,wp(KB.prototype,function(he,Fe,be){if(this.db=Ce,this._ctx={table:he,index:Fe===":id"?null:Fe,or:be},this._cmp=this._ascending=ln,this._descending=function(De,xe){return ln(xe,De)},this._max=function(De,xe){return 0<ln(De,xe)?De:xe},this._min=function(De,xe){return ln(De,xe)<0?De:xe},this._IDBKeyRange=Ce._deps.IDBKeyRange,!this._IDBKeyRange)throw new W.MissingAPI})),this.on("versionchange",function(he){0<he.newVersion?console.warn("Another connection wants to upgrade database '".concat(E.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(E.name,"'. Closing db now to resume the delete request.")),E.close({disableAutoOpen:!1})}),this.on("blocked",function(he){!he.newVersion||he.newVersion<he.oldVersion?console.warn("Dexie.delete('".concat(E.name,"') was blocked")):console.warn("Upgrade '".concat(E.name,"' blocked by other connection holding version ").concat(he.oldVersion/10))}),this._maxKey=Ep(y.IDBKeyRange),this._createTransaction=function(he,Fe,be,De){return new E.Transaction(he,Fe,be,E._options.chromeTransactionDurability,De)},this._fireOnBlocked=function(he){E.on("blocked").fire(he),Md.filter(function(Fe){return Fe.name===E.name&&Fe!==E&&!Fe._state.vcFired}).map(function(Fe){return Fe.on("versionchange").fire(he)})},this.use(vbe),this.use(bbe),this.use(ybe),this.use(gbe),this.use(mbe);var Te=new Proxy(this,{get:function(he,Fe,be){if(Fe==="_vip")return!0;if(Fe==="table")return function(xe){return jy(E.table(xe),Te)};var De=Reflect.get(he,Fe,be);return De instanceof GB?jy(De,Te):Fe==="tables"?De.map(function(xe){return jy(xe,Te)}):Fe==="_createTransaction"?function(){return jy(De.apply(this,arguments),Te)}:De}});this.vip=Te,A.forEach(function(he){return he(E)})}var Ky,mi=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",Sbe=(Z_.prototype.subscribe=function(m,y,E){return this._subscribe(m&&typeof m!="function"?m:{next:m,error:y,complete:E})},Z_.prototype[mi]=function(){return this},Z_);function Z_(m){this._subscribe=m}try{Ky={indexedDB:i.indexedDB||i.mozIndexedDB||i.webkitIndexedDB||i.msIndexedDB,IDBKeyRange:i.IDBKeyRange||i.webkitIDBKeyRange}}catch{Ky={indexedDB:null,IDBKeyRange:null}}function l$(m){var y,E=!1,A=new Sbe(function(L){var z=te(m),se,ue=!1,Ce={},_e={},Te={get closed(){return ue},unsubscribe:function(){ue||(ue=!0,se&&se.abort(),he&&vl.storagemutated.unsubscribe(be))}};L.start&&L.start(Te);var he=!1,Fe=function(){return Fy(De)},be=function(xe){Uy(Ce,xe),G_(_e,Ce)&&Fe()},De=function(){var xe,Re,Me;!ue&&Ky.indexedDB&&(Ce={},xe={},se&&se.abort(),se=new AbortController,Me=function($e){var He=xr();try{z&&Ye();var Ze=Ae(m,$e);return Ze=z?Ze.finally(jt):Ze}finally{He&&pi()}}(Re={subscr:xe,signal:se.signal,requery:Fe,querier:m,trans:null}),Promise.resolve(Me).then(function($e){E=!0,y=$e,ue||Re.signal.aborted||(Ce={},function(He){for(var Ze in He)if(d(He,Ze))return;return 1}(_e=xe)||he||(vl(Sp,be),he=!0),Fy(function(){return!ue&&L.next&&L.next($e)}))},function($e){E=!1,["DatabaseClosedError","AbortError"].includes($e==null?void 0:$e.name)||ue||Fy(function(){ue||L.error&&L.error($e)})}))};return setTimeout(Fe,0),Te});return A.hasValue=function(){return E},A.getValue=function(){return y},A}var Lu=Ca;function X_(m){var y=yl;try{yl=!0,vl.storagemutated.fire(m),z_(m,!0)}finally{yl=y}}h(Lu,s(s({},oe),{delete:function(m){return new Lu(m,{addons:[]}).delete()},exists:function(m){return new Lu(m,{addons:[]}).open().then(function(y){return y.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(m){try{return y=Lu.dependencies,E=y.indexedDB,y=y.IDBKeyRange,(B_(E)?Promise.resolve(E.databases()).then(function(A){return A.map(function(L){return L.name}).filter(function(L){return L!==Py})}):V_(E,y).toCollection().primaryKeys()).then(m)}catch{return Kn(new W.MissingAPI)}var y,E},defineClass:function(){return function(m){l(this,m)}},ignoreTransaction:function(m){return je.trans?Co(je.transless,m):m()},vip:$_,async:function(m){return function(){try{var y=j_(m.apply(this,arguments));return y&&typeof y.then=="function"?y:st.resolve(y)}catch(E){return Kn(E)}}},spawn:function(m,y,E){try{var A=j_(m.apply(E,y||[]));return A&&typeof A.then=="function"?A:st.resolve(A)}catch(L){return Kn(L)}},currentTransaction:{get:function(){return je.trans||null}},waitFor:function(m,y){return y=st.resolve(typeof m=="function"?Lu.ignoreTransaction(m):m).timeout(y||6e4),je.trans?je.trans.waitFor(y):y},Promise:st,debug:{get:function(){return H},set:function(m){le(m)}},derive:g,extend:l,props:h,override:b,Events:yp,on:vl,liveQuery:l$,extendObservabilitySet:Uy,getByKeyPath:R,setByKeyPath:T,delByKeyPath:function(m,y){typeof y=="string"?T(m,y,void 0):"length"in y&&[].map.call(y,function(E){T(m,E,void 0)})},shallowClone:I,deepClone:k,getObjectDiff:K_,cmp:ln,asap:_,minKey:-1/0,addons:[],connections:Md,errnames:ae,dependencies:Ky,cache:Nu,semVer:"4.0.10",version:"4.0.10".split(".").map(function(m){return parseInt(m)}).reduce(function(m,y,E){return m+y/Math.pow(10,2*E)})})),Lu.maxKey=Ep(Lu.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(vl(Sp,function(m){yl||(m=new CustomEvent(P_,{detail:m}),yl=!0,dispatchEvent(m),yl=!1)}),addEventListener(P_,function(m){m=m.detail,yl||X_(m)}));var Vd,yl=!1,u$=function(){};return typeof BroadcastChannel<"u"&&((u$=function(){(Vd=new BroadcastChannel(P_)).onmessage=function(m){return m.data&&X_(m.data)}})(),typeof Vd.unref=="function"&&Vd.unref(),vl(Sp,function(m){yl||Vd.postMessage(m)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(m){if(!Ca.disableBfCache&&m.persisted){H&&console.debug("Dexie: handling persisted pagehide"),Vd!=null&&Vd.close();for(var y=0,E=Md;y<E.length;y++)E[y].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(m){!Ca.disableBfCache&&m.persisted&&(H&&console.debug("Dexie: handling persisted pageshow"),u$(),X_({all:new Ks(-1/0,[[]])}))})),st.rejectionMapper=function(m,y){return!m||m instanceof V||m instanceof TypeError||m instanceof SyntaxError||!m.name||!fe[m.name]?m:(y=new fe[m.name](y||m.message,m),"stack"in m&&p(y,"stack",{get:function(){return this.inner.stack}}),y)},le(H),s(Ca,Object.freeze({__proto__:null,Dexie:Ca,liveQuery:l$,Entity:BB,cmp:ln,PropModSymbol:wa,PropModification:Cp,replacePrefix:function(m,y){return new Cp({replacePrefix:[m,y]})},add:function(m){return new Cp({add:m})},remove:function(m){return new Cp({remove:m})},default:Ca,RangeSet:Ks,mergeRanges:Dp,rangesOverlap:JB}),{default:Ca}),Ca})})(B1);var $z=B1.exports;const bC=Bz($z),$1=Symbol.for("Dexie"),Rh=globalThis[$1]||(globalThis[$1]=bC);if(bC.semVer!==Rh.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${bC.semVer} and ${Rh.semVer}`);const{liveQuery:Lbe,mergeRanges:Vbe,rangesOverlap:Bbe,RangeSet:$be,cmp:Hbe,Entity:Gbe,PropModSymbol:Ube,PropModification:Wbe,replacePrefix:zbe,add:jbe,remove:Kbe}=Rh;class H1 extends Rh{constructor(n){super(n);es(this,"icons");es(this,"visuals");es(this,"users");es(this,"columns");es(this,"general");this.version(1).stores({icons:"key",visuals:"key",users:"key",columns:"key",general:"key"})}getTable(n){return this[n]?this[n]:this.general}}const Ag=new Map,Hz=async e=>{if(!Ag.has(e)){const t=new H1(e);try{await t.open(),Ag.set(e,t)}catch(n){console.error("Failed to open database, attempting to delete and recreate:",n);try{await Rh.delete(e);const s=new H1(e);await s.open(),Ag.set(e,s)}catch(s){throw console.error("Failed to delete and recreate database:",s),s}}}return Ag.get(e)},Dh=({dbName:e,storeName:t})=>{const n=async()=>(await Hz(e)).getTable(t);return{getCachedValue:async u=>{try{const c=await n();if(!c){console.error(`Store is undefined for key: ${u}`);return}const d=await c.get(u);return d==null?void 0:d.value}catch(c){console.error("Failed to get cached value:",c);return}},setCachedValue:async(u,c)=>{try{const d=await n();if(!d){console.error(`Store is undefined, cannot cache key: ${u}`);return}await d.put({key:u,value:c,timestamp:Date.now()})}catch(d){console.error("Failed to cache value:",d)}},deleteCachedValue:async u=>{try{const c=await n();if(!c){console.error(`Store is undefined, cannot delete key: ${u}`);return}await c.delete(u)}catch(c){console.error("Failed to delete cached value:",c)}},clearCache:async()=>{try{const u=await n();if(!u){console.error("Store is undefined, cannot clear cache");return}await u.clear()}catch(u){console.error("Failed to clear cache:",u)}},getAllKeys:async()=>{try{const u=await n();return u?(await u.toArray()).map(d=>d.key):(console.error("Store is undefined, cannot get all keys"),[])}catch(u){return console.error("Failed to get all keys:",u),[]}},getCachedValueWithTimestamp:async u=>{try{const c=await n();if(!c){console.error(`Store is undefined for key: ${u}`);return}return await c.get(u)}catch(c){console.error("Failed to get cached value with timestamp:",c);return}}}},Gz="AvatarCache",Uz="images",Bl={},kg={},Wz=()=>{const{getCachedValue:e,setCachedValue:t}=Dh({dbName:Gz,storeName:Uz}),n=a=>new Promise((l,u)=>{const c=new FileReader;c.onloadend=()=>l(c.result),c.onerror=u,c.readAsDataURL(a)}),s=async a=>{try{if(Bl[a])return Bl[a];if(kg[a])return await kg[a];const l=(async()=>{try{const u=await e(a);if(!u||!(u instanceof Blob))return null;const c=await n(u);return Bl[a]=c,c}catch(u){return console.warn(`Failed to get cached image for key: ${a}`,u),null}})();return kg[a]=l,l.finally(()=>{delete kg[a]}),await l}catch(l){return console.error(`Error in getCachedImage for key: ${a}`,l),null}},o=a=>new Promise((l,u)=>{new Vz(a,{width:96,height:96,quality:1,success(c){l(c)},error(c){console.error("Image compression failed:",c.message),u(c)}})});return{getCachedImage:s,setCachedImage:async(a,l)=>{try{const u=await o(l);await t(a,u);const c=await n(u);Bl[a]=c}catch(u){throw console.error(`Failed to cache image for key: ${a}`,u),u}},clearMemoryCache:a=>{try{a?delete Bl[a]:Object.keys(Bl).forEach(l=>delete Bl[l])}catch(l){console.error("Error clearing memory cache:",l)}}}},Th=new Map,sr=new Map,ic=new Map,zz=5*60*1e3,G1=100;function jz(){const e=Date.now(),t=[];ic.forEach((n,s)=>{e-n>zz&&t.push(s)}),t.forEach(n=>{Th.delete(n),ic.delete(n),sr.delete(n)})}function Kz(){if(ic.size<=G1)return;const e=Array.from(ic.entries()).sort((n,s)=>n[1]-s[1]);e.slice(0,e.length-G1).forEach(([n])=>{Th.delete(n),ic.delete(n),sr.delete(n)})}const qz=(e,t)=>{const n=sr.get(e);return n==null||n.forEach(s=>s(t)),sr.delete(e),t};async function Yz({userId:e,avatarUrl:t,cacheInterface:n,onLoadingChange:s}){let o=e;if(t)try{const d=new URL(t,"http://localhost").pathname.split("/").pop();d?o=`${e}_${d}`:o=t}catch{o=t||e}const i=await n.getCachedImage(o),r=Th.has(o),a=sr.has(o);if(i)return qz(o,i);if(jz(),r)return new Promise(c=>{a||sr.set(o,[]),sr.get(o).push(c)});const l=(async()=>{let c=null,d=null;try{const h=Math.random()*300;await new Promise(p=>setTimeout(p,h)),s==null||s(!0);const f=await fetch(t,{cache:"no-cache"});if(!f.ok)throw new Error("Failed to fetch image");return c=await f.blob(),await n.setCachedImage(o,c),d=URL.createObjectURL(c),d}catch(h){throw console.error("Error loading avatar image:",h),h}finally{c=null,s==null||s(!1),ic.set(o,Date.now()),setTimeout(()=>{Th.delete(o),Kz()},100)}})();Th.set(o,l);const u=await l;return sr.has(o)&&(sr.get(o).forEach(d=>d(u)),sr.delete(o)),u}const Zz=(e,t=3,n=1e3)=>{const s=B(0),o=B(!1),i=B(!1),r=async()=>{try{await e()}catch(a){if(s.value<t)return s.value++,i.value=!0,await new Promise(l=>setTimeout(l,n)),r();throw o.value=!0,a}};return{retry:r,currentAttempt:s,errorRetry:o,isRetrying:i}};function xs(e,t){Xz(e)&&(e="100%");const n=Jz(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Og(e){return Math.min(1,Math.max(0,e))}function Xz(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Jz(e){return typeof e=="string"&&e.indexOf("%")!==-1}function U1(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Mg(e){return Number(e)<=1?`${Number(e)*100}%`:e}function $l(e){return e.length===1?"0"+e:String(e)}function Qz(e,t,n){return{r:xs(e,255)*255,g:xs(t,255)*255,b:xs(n,255)*255}}function W1(e,t,n){e=xs(e,255),t=xs(t,255),n=xs(n,255);const s=Math.max(e,t,n),o=Math.min(e,t,n);let i=0,r=0;const a=(s+o)/2;if(s===o)r=0,i=0;else{const l=s-o;switch(r=a>.5?l/(2-s-o):l/(s+o),s){case e:i=(t-n)/l+(t<n?6:0);break;case t:i=(n-e)/l+2;break;case n:i=(e-t)/l+4;break}i/=6}return{h:i,s:r,l:a}}function SC(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function e3(e,t,n){let s,o,i;if(e=xs(e,360),t=xs(t,100),n=xs(n,100),t===0)o=n,i=n,s=n;else{const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;s=SC(a,r,e+1/3),o=SC(a,r,e),i=SC(a,r,e-1/3)}return{r:s*255,g:o*255,b:i*255}}function z1(e,t,n){e=xs(e,255),t=xs(t,255),n=xs(n,255);const s=Math.max(e,t,n),o=Math.min(e,t,n);let i=0;const r=s,a=s-o,l=s===0?0:a/s;if(s===o)i=0;else{switch(s){case e:i=(t-n)/a+(t<n?6:0);break;case t:i=(n-e)/a+2;break;case n:i=(e-t)/a+4;break}i/=6}return{h:i,s:l,v:r}}function t3(e,t,n){e=xs(e,360)*6,t=xs(t,100),n=xs(n,100);const s=Math.floor(e),o=e-s,i=n*(1-t),r=n*(1-o*t),a=n*(1-(1-o)*t),l=s%6,u=[n,r,i,i,a,n][l],c=[a,n,n,r,i,i][l],d=[i,i,a,n,n,r][l];return{r:u*255,g:c*255,b:d*255}}function j1(e,t,n,s){const o=[$l(Math.round(e).toString(16)),$l(Math.round(t).toString(16)),$l(Math.round(n).toString(16))];return s&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function n3(e,t,n,s,o){const i=[$l(Math.round(e).toString(16)),$l(Math.round(t).toString(16)),$l(Math.round(n).toString(16)),$l(o3(s))];return o&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function s3(e,t,n,s){const o=e/100,i=t/100,r=n/100,a=s/100,l=255*(1-o)*(1-a),u=255*(1-i)*(1-a),c=255*(1-r)*(1-a);return{r:l,g:u,b:c}}function K1(e,t,n){let s=1-e/255,o=1-t/255,i=1-n/255,r=Math.min(s,o,i);return r===1?(s=0,o=0,i=0):(s=(s-r)/(1-r)*100,o=(o-r)/(1-r)*100,i=(i-r)/(1-r)*100),r*=100,{c:Math.round(s),m:Math.round(o),y:Math.round(i),k:Math.round(r)}}function o3(e){return Math.round(parseFloat(e)*255).toString(16)}function q1(e){return Fo(e)/255}function Fo(e){return parseInt(e,16)}function i3(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}const EC={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function r3(e){let t={r:0,g:0,b:0},n=1,s=null,o=null,i=null,r=!1,a=!1;return typeof e=="string"&&(e=a3(e)),typeof e=="object"&&(Po(e.r)&&Po(e.g)&&Po(e.b)?(t=Qz(e.r,e.g,e.b),r=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Po(e.h)&&Po(e.s)&&Po(e.v)?(s=Mg(e.s),o=Mg(e.v),t=t3(e.h,s,o),r=!0,a="hsv"):Po(e.h)&&Po(e.s)&&Po(e.l)?(s=Mg(e.s),i=Mg(e.l),t=e3(e.h,s,i),r=!0,a="hsl"):Po(e.c)&&Po(e.m)&&Po(e.y)&&Po(e.k)&&(t=s3(e.c,e.m,e.y,e.k),r=!0,a="cmyk"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=U1(n),{ok:r,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}const ka="(?:"+"[-\\+]?\\d*\\.\\d+%?"+")|(?:"+"[-\\+]?\\d+%?"+")",_C="[\\s|\\(]+("+ka+")[,|\\s]+("+ka+")[,|\\s]+("+ka+")\\s*\\)?",Ng="[\\s|\\(]+("+ka+")[,|\\s]+("+ka+")[,|\\s]+("+ka+")[,|\\s]+("+ka+")\\s*\\)?",Zo={CSS_UNIT:new RegExp(ka),rgb:new RegExp("rgb"+_C),rgba:new RegExp("rgba"+Ng),hsl:new RegExp("hsl"+_C),hsla:new RegExp("hsla"+Ng),hsv:new RegExp("hsv"+_C),hsva:new RegExp("hsva"+Ng),cmyk:new RegExp("cmyk"+Ng),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function a3(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;let t=!1;if(EC[e])e=EC[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let n=Zo.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Zo.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Zo.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Zo.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Zo.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Zo.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Zo.cmyk.exec(e),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:(n=Zo.hex8.exec(e),n?{r:Fo(n[1]),g:Fo(n[2]),b:Fo(n[3]),a:q1(n[4]),format:t?"name":"hex8"}:(n=Zo.hex6.exec(e),n?{r:Fo(n[1]),g:Fo(n[2]),b:Fo(n[3]),format:t?"name":"hex"}:(n=Zo.hex4.exec(e),n?{r:Fo(n[1]+n[1]),g:Fo(n[2]+n[2]),b:Fo(n[3]+n[3]),a:q1(n[4]+n[4]),format:t?"name":"hex8"}:(n=Zo.hex3.exec(e),n?{r:Fo(n[1]+n[1]),g:Fo(n[2]+n[2]),b:Fo(n[3]+n[3]),format:t?"name":"hex"}:!1))))))))))}function Po(e){return typeof e=="number"?!Number.isNaN(e):Zo.CSS_UNIT.test(e)}class Nn{constructor(t="",n={}){if(t instanceof Nn)return t;typeof t=="number"&&(t=i3(t)),this.originalInput=t;const s=r3(t);this.originalInput=t,this.r=s.r,this.g=s.g,this.b=s.b,this.a=s.a,this.roundA=Math.round(100*this.a)/100,this.format=n.format??s.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=s.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){const t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3}getLuminance(){const t=this.toRgb();let n,s,o;const i=t.r/255,r=t.g/255,a=t.b/255;return i<=.03928?n=i/12.92:n=Math.pow((i+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),a<=.03928?o=a/12.92:o=Math.pow((a+.055)/1.055,2.4),.2126*n+.7152*s+.0722*o}getAlpha(){return this.a}setAlpha(t){return this.a=U1(t),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:t}=this.toHsl();return t===0}toHsv(){const t=z1(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}}toHsvString(){const t=z1(this.r,this.g,this.b),n=Math.round(t.h*360),s=Math.round(t.s*100),o=Math.round(t.v*100);return this.a===1?`hsv(${n}, ${s}%, ${o}%)`:`hsva(${n}, ${s}%, ${o}%, ${this.roundA})`}toHsl(){const t=W1(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}}toHslString(){const t=W1(this.r,this.g,this.b),n=Math.round(t.h*360),s=Math.round(t.s*100),o=Math.round(t.l*100);return this.a===1?`hsl(${n}, ${s}%, ${o}%)`:`hsla(${n}, ${s}%, ${o}%, ${this.roundA})`}toHex(t=!1){return j1(this.r,this.g,this.b,t)}toHexString(t=!1){return"#"+this.toHex(t)}toHex8(t=!1){return n3(this.r,this.g,this.b,this.a,t)}toHex8String(t=!1){return"#"+this.toHex8(t)}toHexShortString(t=!1){return this.a===1?this.toHexString(t):this.toHex8String(t)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){const t=Math.round(this.r),n=Math.round(this.g),s=Math.round(this.b);return this.a===1?`rgb(${t}, ${n}, ${s})`:`rgba(${t}, ${n}, ${s}, ${this.roundA})`}toPercentageRgb(){const t=n=>`${Math.round(xs(n,255)*100)}%`;return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}}toPercentageRgbString(){const t=n=>Math.round(xs(n,255)*100);return this.a===1?`rgb(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%)`:`rgba(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%, ${this.roundA})`}toCmyk(){return{...K1(this.r,this.g,this.b)}}toCmykString(){const{c:t,m:n,y:s,k:o}=K1(this.r,this.g,this.b);return`cmyk(${t}, ${n}, ${s}, ${o})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;const t="#"+j1(this.r,this.g,this.b,!1);for(const[n,s]of Object.entries(EC))if(t===s)return n;return!1}toString(t){const n=!!t;t=t??this.format;let s=!1;const o=this.a<1&&this.a>=0;return!n&&o&&(t.startsWith("hex")||t==="name")?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(s=this.toRgbString()),t==="prgb"&&(s=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(s=this.toHexString()),t==="hex3"&&(s=this.toHexString(!0)),t==="hex4"&&(s=this.toHex8String(!0)),t==="hex8"&&(s=this.toHex8String()),t==="name"&&(s=this.toName()),t==="hsl"&&(s=this.toHslString()),t==="hsv"&&(s=this.toHsvString()),t==="cmyk"&&(s=this.toCmykString()),s||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new Nn(this.toString())}lighten(t=10){const n=this.toHsl();return n.l+=t/100,n.l=Og(n.l),new Nn(n)}brighten(t=10){const n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new Nn(n)}darken(t=10){const n=this.toHsl();return n.l-=t/100,n.l=Og(n.l),new Nn(n)}tint(t=10){return this.mix("white",t)}shade(t=10){return this.mix("black",t)}desaturate(t=10){const n=this.toHsl();return n.s-=t/100,n.s=Og(n.s),new Nn(n)}saturate(t=10){const n=this.toHsl();return n.s+=t/100,n.s=Og(n.s),new Nn(n)}greyscale(){return this.desaturate(100)}spin(t){const n=this.toHsl(),s=(n.h+t)%360;return n.h=s<0?360+s:s,new Nn(n)}mix(t,n=50){const s=this.toRgb(),o=new Nn(t).toRgb(),i=n/100,r={r:(o.r-s.r)*i+s.r,g:(o.g-s.g)*i+s.g,b:(o.b-s.b)*i+s.b,a:(o.a-s.a)*i+s.a};return new Nn(r)}analogous(t=6,n=30){const s=this.toHsl(),o=360/n,i=[this];for(s.h=(s.h-(o*t>>1)+720)%360;--t;)s.h=(s.h+o)%360,i.push(new Nn(s));return i}complement(){const t=this.toHsl();return t.h=(t.h+180)%360,new Nn(t)}monochromatic(t=6){const n=this.toHsv(),{h:s}=n,{s:o}=n;let{v:i}=n;const r=[],a=1/t;for(;t--;)r.push(new Nn({h:s,s:o,v:i})),i=(i+a)%1;return r}splitcomplement(){const t=this.toHsl(),{h:n}=t;return[this,new Nn({h:(n+72)%360,s:t.s,l:t.l}),new Nn({h:(n+216)%360,s:t.s,l:t.l})]}onBackground(t){const n=this.toRgb(),s=new Nn(t).toRgb(),o=n.a+s.a*(1-n.a);return new Nn({r:(n.r*n.a+s.r*s.a*(1-n.a))/o,g:(n.g*n.a+s.g*s.a*(1-n.a))/o,b:(n.b*n.a+s.b*s.a*(1-n.a))/o,a:o})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(t){const n=this.toHsl(),{h:s}=n,o=[this],i=360/t;for(let r=1;r<t;r++)o.push(new Nn({h:(s+r*i)%360,s:n.s,l:n.l}));return o}equals(t){const n=new Nn(t);return this.format==="cmyk"||n.format==="cmyk"?this.toCmykString()===n.toCmykString():this.toRgbString()===n.toRgbString()}}function Y1(e){return new Nn(e||"").isValid}function Lg(e,t){const{c1:n,c2:s}={c1:new Nn(e),c2:new Nn(t)};return n.equals(s)}const l3=["src","alt"],Ih=_t(rt({__name:"Avatar",props:{name:{},id:{},profile_image:{},color:{},initial:{},isMe:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},size:{default:24},isUseShortLabel:{type:Boolean,default:!0},borderRadius:{default:void 0}},setup(e){const t=e,n=B(""),s=B(!1),o=B(null),i=B(!1),r=Y(()=>({name:t.name||"",id:t.id||"",profile_image:t.profile_image||null,color:t.color||{bgColor:"#CCCCCC",textColor:"var(--background-color)"},initial:t.initial})),a=Y(()=>{var _;const w=((_=r.value.color)==null?void 0:_.bgColor)||"#CCCCCC";return Y1(w)?w:"#CCCCCC"}),l=Y(()=>{var _;const w=((_=r.value.color)==null?void 0:_.textColor)||"var(--background-color)";return Y1(w)?w:"var(--background-color)"}),u=Y(()=>{if(!t.isUseShortLabel)return"";const{initial:w,name:_}=r.value;if(typeof w=="string"&&w.trim())return w.trim();if(!(_!=null&&_.trim()))return"";const R=_.trim().split(/\s+/).filter(Boolean);return R.length===1?R[0].slice(0,2).toUpperCase():(R[0][0]+R[1][0]).toUpperCase()}),c=Y(()=>r.value.profile_image?"image":"text"),d=Y(()=>({"--avatar-size":`${t.size}px`,"--avatar-bg":a.value,"--avatar-border":t.isMe?"var(--primary-color)":"#f3f5f8","--text-color":l.value,"--font-size":`${Math.floor(t.size/2)}px`,"--border-radius":t.borderRadius?typeof t.borderRadius=="number"?`${t.borderRadius}px`:t.borderRadius:"4px"})),h=()=>{n.value="",i.value=!0},{getCachedImage:f,setCachedImage:p}=Wz(),g=async()=>{if(o.value&&o.value.abort(),n.value.startsWith("blob:")&&URL.revokeObjectURL(n.value),!r.value.id||!r.value.profile_image){n.value="";return}o.value=new AbortController;const w=o.value;try{const _=await Yz({userId:r.value.id,avatarUrl:r.value.profile_image,cacheInterface:{getCachedImage:f,setCachedImage:p},onLoadingChange:R=>{w.signal.aborted||(s.value=R)}});if(!w.signal.aborted&&(n.value=_,_.length===0))throw console.warn("Loaded avatar image is empty, displaying initials instead."),h(),new Error("Empty image source")}catch(_){w.signal.aborted||(console.error("Failed to load avatar:",_),n.value="")}},{retry:v,errorRetry:C,isRetrying:S}=Zz(g,3,2e3),b=nt(()=>[r.value.id,r.value.profile_image],v,{immediate:!0});return vs(()=>{b(),o.value&&(o.value.abort(),o.value=null),n.value.startsWith("blob:")&&URL.revokeObjectURL(n.value),n.value="",s.value=!1}),(w,_)=>(j(),ce("div",{class:Q([w.$style["avatar-wrapper"],{[w.$style.me]:e.isMe,[w.$style.loading]:s.value,[w.$style.disabled]:e.disabled,[w.$style.readOnly]:t.readOnly}]),style:dn(d.value)},[s.value||U(S)?(j(),ce("div",{key:0,class:Q(w.$style["skeleton-loader"])},null,2)):(j(),ce(xt,{key:1},[c.value==="text"||U(C)||i.value?(j(),ce("div",{key:0,class:Q(w.$style["short-label"])},wt(u.value),3)):n.value.length>0||r.value.profile_image?(j(),ce("img",{key:1,src:n.value||r.value.profile_image||"",alt:r.value.name||"Avatar",loading:"lazy"},null,8,l3)):Je("",!0)],64))],6))}}),[["__cssModules",{$style:{"avatar-wrapper":"_avatar-wrapper_1pd1f_1",me:"_me_1pd1f_17","short-label":"_short-label_1pd1f_20",action:"_action_1pd1f_38",loading:"_loading_1pd1f_56",disabled:"_disabled_1pd1f_59",readOnly:"_readOnly_1pd1f_62"}}]]),u3=["404","ClickChart","ClickToCreate","NoAccess1","NoActivity","NoAssignedComment","NoAssignedScene","NoComment","NoData","NoData2","NoRendition1","NoRendition2","PrivateComment","PrivateScene","ReportAchievement","ReportCompletedScenes","ReportInvolvement","ReportMetric","ReportOverdueScenes","ReportProfessionalName","ReportSceneAssignment","ReportSceneStatus","ReportSceneStatusType","Successful1","Unsuccessful1","ConfirmDeletion","Waiting1","DefaultThumbnail","UploadReviewFile","ClickToSearch","NoDataSearchFilter"],c3=["UploadInProgress"],Pu=class Pu{constructor(){es(this,"KEY_PAIR",{workspaceCode:"ws.code",apiBaseUrl:"API_BASE_URL",assetUrl:"ASSET_URL",baseUrl:"BASE_URL",baseReviewUrl:"BASE_REVIEW_URL"});Object.values(this.KEY_PAIR).every(n=>{const s=sessionStorage.getItem(n);return(s==null||s==="")&&console.error(`[SessionStorageHelper] Key "${n}" is not set in sessionStorage.`),!0})||console.error("[SessionStorageHelper] Some expected keys are missing in sessionStorage. Please ensure all required keys are set.")}static getInstance(){return Pu.instance||(Pu.instance=new Pu),Pu.instance}setItem(t,n){try{sessionStorage.setItem(t,n)}catch(s){console.error("Error setting sessionStorage item:",s)}}getItem(t){try{const n=sessionStorage.getItem(t);return n===null?"":n}catch(n){throw console.error("Error getting sessionStorage item:",n),n}}};es(Pu,"instance");let _n=Pu;const Vg={},Oa={},Z1=(e,t,n,s,o="base64")=>{const i=B(""),r=B(""),a=B(!0),l=Y(()=>`${t}:${e.value.name}`),u=g=>new Promise((v,C)=>{const S=new FileReader;S.onload=()=>v(S.result),S.onerror=C,S.readAsDataURL(g)}),c=g=>`data:image/svg+xml;charset=utf-8,${encodeURIComponent(g)}`,d=async(g,v)=>{if(Oa[v])return Oa[v];if(v in Vg){const b=await Vg[v];return b&&(Oa[v]=b),b}const C=await s(l.value);if(C&&typeof C=="string")return Oa[v]=C,C;const S=(async()=>{try{const b=await fetch(g,{cache:"no-cache"});if(!b.ok)throw new Error("Failed to fetch visual");const w=b.headers.get("Content-Type")||"";let _;if(w.includes("svg")||w.includes("xml")){const R=await b.text();if(!R.trim())throw new Error("Empty SVG content");_=o==="svg"?R:c(R),Oa[v]=_}else if(w.match(/image\/(jpeg|jpg|png|gif|webp)/)){const R=await b.blob();if(!R.size)throw new Error("Empty image blob");_=await u(R),Oa[v]=_}else throw new Error(`Unsupported content type: ${w}`);return await n(l.value,_),_}catch(b){return console.error("Error fetching visual:",b),""}})();return Vg[v]=S,S.finally(()=>{delete Vg[v]}),await S},h=async g=>{a.value=!0;try{if(Oa[l.value]){const _=Oa[l.value];i.value=_,_.startsWith("data:image/svg+xml")?r.value=decodeURIComponent(_.split(",")[1]):(_.startsWith("<svg")||_.includes("<svg"))&&(r.value=_),a.value=!1;return}const v=_n.getInstance().getItem("ASSET_URL")||"",C={icon:`${v}/icon/tess/TESSRAPP_Icon_${g}`,visual:`${v}/icon/visual/TESSRAPP_Visual_${g}`,ratting:`${v}/icon/tess/rating/TESSRAPP_Icon_${g}_Outline`,flag:`${v}/icon/flags/4x3/${g}`},S=u3.includes(g)?"png":c3.includes(g)?"gif":"svg",b=`${C[t]}.${S}`,w=await d(b,l.value);w&&(i.value=w,w.startsWith("data:image/svg+xml")?r.value=decodeURIComponent(w.split(",")[1]):(w.startsWith("<svg")||w.includes("<svg"))&&(r.value=w))}catch(v){console.error("Error fetching remote visual:",v)}finally{a.value=!1}},f=async()=>{i.value="",r.value="",e.value.name&&(a.value=!0,await h(e.value.name),a.value=!1)},p=Y(()=>r.value?r.value:"");return nt(()=>e,()=>{f()},{deep:!0,immediate:!0}),{svgContent:p,url:i,loading:a}},d3=["innerHTML","about"],h3="IconCache",f3="icons",lt=_t(rt({__name:"Icon",props:{src:{},source:{default:"remote"},size:{default:14},color:{default:"currentColor"}},setup(e){jG(h=>({v1555daee:h.size+"px"}));const t=e,n=h=>{if(typeof h=="number")return h;switch(h){case"small":return 14;case"medium":return 14;case"large":return 20;default:return typeof h=="string"?Number.parseInt(h,10):14}},s=Y(()=>n(t.size)),o=Y(()=>({width:s.value+"px",height:s.value+"px",color:t.color})),{getCachedValue:i,setCachedValue:r}=Dh({dbName:h3,storeName:f3}),a=async h=>{const f=await i(h);if(typeof f=="string")return f},l=async(h,f)=>{await r(h,f)},u=Y(()=>t.source==="rating"?"ratting":"icon"),c=Y(()=>({name:t.src,size:s.value,color:t.color||"currentColor"})),{svgContent:d}=Z1(c,u.value,l,a,"svg");return(h,f)=>(j(),ce("div",{class:Q(h.$style.iconWrapper),innerHTML:U(d),style:dn(o.value),about:t.src,"data-icon":"true"},null,14,d3))}}),[["__cssModules",{$style:{iconWrapper:"_iconWrapper_1n0y9_1"}}]]),p3={review:"{reviewDomain}/{ws_code}",review_take:"{reviewDomain}/{ws_code}?id={take_id}",review_scene:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&tab=iteration",review_rendition:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}",review_frame:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}&tab=comment&refresh_marker=true#type=frame&data={frame}",review_rendition_comment:"{reviewDomain}/{ws_code}?scene_id={scene_id}&rendition_id={rendition_id}&comment_id={comment_id}",review_comment:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&comment_id={comment_id}",review_multiple_scenes:"{reviewDomain}/{ws_code}?scene_ids={scene_ids}",scene_hub:"{baseDomain}/{ws_code}/{scene_id}?o=st",hub_rendition:"{baseDomain}/{ws_code}/{scene_id}?o=st&renditionId={rendition_id}",hub_comment:"{baseDomain}/{ws_code}/{scene_id}?o=st&comment_id={comment_id}",people_insight:"{baseDomain}/{ws_code}/{user_id}?o=pt",people_detail:"{baseDomain}/{ws_code}/ws/ppl/{display_name}-${user_id}",project:"{baseDomain}/{ws_code}/pl/dir/{entity_id}",woohoo:"{baseDomain}/{ws_code}/pl/woo/rpt/{woohoo_id}",update:"{baseDomain}/{ws_code}/pl/au?id={entity_id}",core:"{baseDomain}/{ws_code}",project_focusMode:"{baseDomain}/{ws_code}/pl/dir/{parent_id}?f={entity_id}",access_setting:"{baseDomain}/{ws_code}/pl/dir?f={entity_id}&o=as"},Ao=({type:e,config:t})=>{const n=[];try{const s=p3[e];if(!s)throw new Error(`Link template for link type "${e}" not found`);const o=s.replace(/{(.*?)}/g,(i,r)=>{const a=t[String(r)];if(a!==void 0)return a;n.push(r)});return n.length>0?{url:o,hasError:!0,error:`Missing required keys: ${n.join(", ")}`,missingKeys:n}:{url:o,hasError:!1,error:void 0}}catch(s){return console.error("Link Creator ERROR at:",s),{url:"",hasError:!0,error:s instanceof Error?s.message:`Missing required keys: ${n.join(", ")}`}}};var X1=typeof global=="object"&&global&&global.Object===Object&&global,g3=typeof self=="object"&&self&&self.Object===Object&&self,Di=X1||g3||Function("return this")(),Xo=Di.Symbol,J1=Object.prototype,m3=J1.hasOwnProperty,v3=J1.toString,xh=Xo?Xo.toStringTag:void 0;function y3(e){var t=m3.call(e,xh),n=e[xh];try{e[xh]=void 0;var s=!0}catch{}var o=v3.call(e);return s&&(t?e[xh]=n:delete e[xh]),o}var w3=Object.prototype,C3=w3.toString;function b3(e){return C3.call(e)}var S3="[object Null]",E3="[object Undefined]",Q1=Xo?Xo.toStringTag:void 0;function rc(e){return e==null?e===void 0?E3:S3:Q1&&Q1 in Object(e)?y3(e):b3(e)}function jr(e){return e!=null&&typeof e=="object"}var _3="[object Symbol]";function Bg(e){return typeof e=="symbol"||jr(e)&&rc(e)==_3}function R3(e,t){for(var n=-1,s=e==null?0:e.length,o=Array(s);++n<s;)o[n]=t(e[n],n,e);return o}var Jo=Array.isArray,eI=Xo?Xo.prototype:void 0,tI=eI?eI.toString:void 0;function nI(e){if(typeof e=="string")return e;if(Jo(e))return R3(e,nI)+"";if(Bg(e))return tI?tI.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var D3=/\s/;function T3(e){for(var t=e.length;t--&&D3.test(e.charAt(t)););return t}var I3=/^\s+/;function x3(e){return e&&e.slice(0,T3(e)+1).replace(I3,"")}function Ma(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var sI=NaN,F3=/^[-+]0x[0-9a-f]+$/i,P3=/^0b[01]+$/i,A3=/^0o[0-7]+$/i,k3=parseInt;function RC(e){if(typeof e=="number")return e;if(Bg(e))return sI;if(Ma(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ma(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=x3(e);var n=P3.test(e);return n||A3.test(e)?k3(e.slice(2),n?2:8):F3.test(e)?sI:+e}var oI=1/0,O3=17976931348623157e292;function M3(e){if(!e)return e===0?e:0;if(e=RC(e),e===oI||e===-oI){var t=e<0?-1:1;return t*O3}return e===e?e:0}function N3(e){var t=M3(e),n=t%1;return t===t?n?t-n:t:0}function DC(e){return e}var L3="[object AsyncFunction]",V3="[object Function]",B3="[object GeneratorFunction]",$3="[object Proxy]";function iI(e){if(!Ma(e))return!1;var t=rc(e);return t==V3||t==B3||t==L3||t==$3}var TC=Di["__core-js_shared__"],rI=function(){var e=/[^.]+$/.exec(TC&&TC.keys&&TC.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function H3(e){return!!rI&&rI in e}var G3=Function.prototype,U3=G3.toString;function Hl(e){if(e!=null){try{return U3.call(e)}catch{}try{return e+""}catch{}}return""}var W3=/[\\^$.*+?()[\]{}|]/g,z3=/^\[object .+?Constructor\]$/,j3=Function.prototype,K3=Object.prototype,q3=j3.toString,Y3=K3.hasOwnProperty,Z3=RegExp("^"+q3.call(Y3).replace(W3,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function X3(e){if(!Ma(e)||H3(e))return!1;var t=iI(e)?Z3:z3;return t.test(Hl(e))}function J3(e,t){return e==null?void 0:e[t]}function Gl(e,t){var n=J3(e,t);return X3(n)?n:void 0}var IC=Gl(Di,"WeakMap"),aI=Object.create,Q3=function(){function e(){}return function(t){if(!Ma(t))return{};if(aI)return aI(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function e6(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function t6(){}var n6=800,s6=16,o6=Date.now;function i6(e){var t=0,n=0;return function(){var s=o6(),o=s6-(s-n);if(n=s,o>0){if(++t>=n6)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function r6(e){return function(){return e}}var $g=function(){try{var e=Gl(Object,"defineProperty");return e({},"",{}),e}catch{}}(),a6=$g?function(e,t){return $g(e,"toString",{configurable:!0,enumerable:!1,value:r6(t),writable:!0})}:DC,l6=i6(a6);function u6(e,t){for(var n=-1,s=e==null?0:e.length;++n<s&&t(e[n],n,e)!==!1;);return e}function c6(e,t,n,s){for(var o=e.length,i=n+-1;++i<o;)if(t(e[i],i,e))return i;return-1}function d6(e){return e!==e}function h6(e,t,n){for(var s=n-1,o=e.length;++s<o;)if(e[s]===t)return s;return-1}function f6(e,t,n){return t===t?h6(e,t,n):c6(e,d6,n)}function p6(e,t){var n=e==null?0:e.length;return!!n&&f6(e,t,0)>-1}var g6=9007199254740991,m6=/^(?:0|[1-9]\d*)$/;function lI(e,t){var n=typeof e;return t=t??g6,!!t&&(n=="number"||n!="symbol"&&m6.test(e))&&e>-1&&e%1==0&&e<t}function v6(e,t,n){t=="__proto__"&&$g?$g(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function xC(e,t){return e===t||e!==e&&t!==t}var y6=Object.prototype,w6=y6.hasOwnProperty;function C6(e,t,n){var s=e[t];(!(w6.call(e,t)&&xC(s,n))||n===void 0&&!(t in e))&&v6(e,t,n)}var uI=Math.max;function b6(e,t,n){return t=uI(t===void 0?e.length-1:t,0),function(){for(var s=arguments,o=-1,i=uI(s.length-t,0),r=Array(i);++o<i;)r[o]=s[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=s[o];return a[t]=n(r),e6(e,this,a)}}function S6(e,t){return l6(b6(e,t,DC),e+"")}var E6=9007199254740991;function FC(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=E6}function PC(e){return e!=null&&FC(e.length)&&!iI(e)}var _6=Object.prototype;function AC(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||_6;return e===n}function R6(e,t){for(var n=-1,s=Array(e);++n<e;)s[n]=t(n);return s}var D6="[object Arguments]";function cI(e){return jr(e)&&rc(e)==D6}var dI=Object.prototype,T6=dI.hasOwnProperty,I6=dI.propertyIsEnumerable,Hg=cI(function(){return arguments}())?cI:function(e){return jr(e)&&T6.call(e,"callee")&&!I6.call(e,"callee")};function x6(){return!1}var hI=typeof On=="object"&&On&&!On.nodeType&&On,fI=hI&&typeof module=="object"&&module&&!module.nodeType&&module,F6=fI&&fI.exports===hI,pI=F6?Di.Buffer:void 0,P6=pI?pI.isBuffer:void 0,Fh=P6||x6,A6="[object Arguments]",k6="[object Array]",O6="[object Boolean]",M6="[object Date]",N6="[object Error]",L6="[object Function]",V6="[object Map]",B6="[object Number]",$6="[object Object]",H6="[object RegExp]",G6="[object Set]",U6="[object String]",W6="[object WeakMap]",z6="[object ArrayBuffer]",j6="[object DataView]",K6="[object Float32Array]",q6="[object Float64Array]",Y6="[object Int8Array]",Z6="[object Int16Array]",X6="[object Int32Array]",J6="[object Uint8Array]",Q6="[object Uint8ClampedArray]",e4="[object Uint16Array]",t4="[object Uint32Array]",Ln={};Ln[K6]=Ln[q6]=Ln[Y6]=Ln[Z6]=Ln[X6]=Ln[J6]=Ln[Q6]=Ln[e4]=Ln[t4]=!0,Ln[A6]=Ln[k6]=Ln[z6]=Ln[O6]=Ln[j6]=Ln[M6]=Ln[N6]=Ln[L6]=Ln[V6]=Ln[B6]=Ln[$6]=Ln[H6]=Ln[G6]=Ln[U6]=Ln[W6]=!1;function n4(e){return jr(e)&&FC(e.length)&&!!Ln[rc(e)]}function kC(e){return function(t){return e(t)}}var gI=typeof On=="object"&&On&&!On.nodeType&&On,Ph=gI&&typeof module=="object"&&module&&!module.nodeType&&module,s4=Ph&&Ph.exports===gI,OC=s4&&X1.process,ac=function(){try{var e=Ph&&Ph.require&&Ph.require("util").types;return e||OC&&OC.binding&&OC.binding("util")}catch{}}(),mI=ac&&ac.isTypedArray,MC=mI?kC(mI):n4,o4=Object.prototype,i4=o4.hasOwnProperty;function r4(e,t){var n=Jo(e),s=!n&&Hg(e),o=!n&&!s&&Fh(e),i=!n&&!s&&!o&&MC(e),r=n||s||o||i,a=r?R6(e.length,String):[],l=a.length;for(var u in e)i4.call(e,u)&&!(r&&(u=="length"||o&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||lI(u,l)))&&a.push(u);return a}function vI(e,t){return function(n){return e(t(n))}}var a4=vI(Object.keys,Object),l4=Object.prototype,u4=l4.hasOwnProperty;function yI(e){if(!AC(e))return a4(e);var t=[];for(var n in Object(e))u4.call(e,n)&&n!="constructor"&&t.push(n);return t}function wI(e){return PC(e)?r4(e):yI(e)}var c4=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d4=/^\w*$/;function NC(e,t){if(Jo(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Bg(e)?!0:d4.test(e)||!c4.test(e)||t!=null&&e in Object(t)}var Ah=Gl(Object,"create");function h4(){this.__data__=Ah?Ah(null):{},this.size=0}function f4(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var p4="__lodash_hash_undefined__",g4=Object.prototype,m4=g4.hasOwnProperty;function v4(e){var t=this.__data__;if(Ah){var n=t[e];return n===p4?void 0:n}return m4.call(t,e)?t[e]:void 0}var y4=Object.prototype,w4=y4.hasOwnProperty;function C4(e){var t=this.__data__;return Ah?t[e]!==void 0:w4.call(t,e)}var b4="__lodash_hash_undefined__";function S4(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ah&&t===void 0?b4:t,this}function Ul(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}Ul.prototype.clear=h4,Ul.prototype.delete=f4,Ul.prototype.get=v4,Ul.prototype.has=C4,Ul.prototype.set=S4;function E4(){this.__data__=[],this.size=0}function Gg(e,t){for(var n=e.length;n--;)if(xC(e[n][0],t))return n;return-1}var _4=Array.prototype,R4=_4.splice;function D4(e){var t=this.__data__,n=Gg(t,e);if(n<0)return!1;var s=t.length-1;return n==s?t.pop():R4.call(t,n,1),--this.size,!0}function T4(e){var t=this.__data__,n=Gg(t,e);return n<0?void 0:t[n][1]}function I4(e){return Gg(this.__data__,e)>-1}function x4(e,t){var n=this.__data__,s=Gg(n,e);return s<0?(++this.size,n.push([e,t])):n[s][1]=t,this}function Kr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}Kr.prototype.clear=E4,Kr.prototype.delete=D4,Kr.prototype.get=T4,Kr.prototype.has=I4,Kr.prototype.set=x4;var kh=Gl(Di,"Map");function F4(){this.size=0,this.__data__={hash:new Ul,map:new(kh||Kr),string:new Ul}}function P4(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ug(e,t){var n=e.__data__;return P4(t)?n[typeof t=="string"?"string":"hash"]:n.map}function A4(e){var t=Ug(this,e).delete(e);return this.size-=t?1:0,t}function k4(e){return Ug(this,e).get(e)}function O4(e){return Ug(this,e).has(e)}function M4(e,t){var n=Ug(this,e),s=n.size;return n.set(e,t),this.size+=n.size==s?0:1,this}function qr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}qr.prototype.clear=F4,qr.prototype.delete=A4,qr.prototype.get=k4,qr.prototype.has=O4,qr.prototype.set=M4;var N4="Expected a function";function LC(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(N4);var n=function(){var s=arguments,o=t?t.apply(this,s):s[0],i=n.cache;if(i.has(o))return i.get(o);var r=e.apply(this,s);return n.cache=i.set(o,r)||i,r};return n.cache=new(LC.Cache||qr),n}LC.Cache=qr;var L4=500;function V4(e){var t=LC(e,function(s){return n.size===L4&&n.clear(),s}),n=t.cache;return t}var B4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$4=/\\(\\)?/g,H4=V4(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(B4,function(n,s,o,i){t.push(o?i.replace($4,"$1"):s||n)}),t});function G4(e){return e==null?"":nI(e)}function CI(e,t){return Jo(e)?e:NC(e,t)?[e]:H4(G4(e))}function Wg(e){if(typeof e=="string"||Bg(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function bI(e,t){t=CI(t,e);for(var n=0,s=t.length;e!=null&&n<s;)e=e[Wg(t[n++])];return n&&n==s?e:void 0}function U4(e,t,n){var s=e==null?void 0:bI(e,t);return s===void 0?n:s}function SI(e,t){for(var n=-1,s=t.length,o=e.length;++n<s;)e[o+n]=t[n];return e}var EI=Xo?Xo.isConcatSpreadable:void 0;function W4(e){return Jo(e)||Hg(e)||!!(EI&&e&&e[EI])}function z4(e,t,n,s,o){var i=-1,r=e.length;for(n||(n=W4),o||(o=[]);++i<r;){var a=e[i];n(a)&&SI(o,a)}return o}var j4=vI(Object.getPrototypeOf,Object);function K4(e,t,n){var s=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++s<o;)i[s]=e[s+t];return i}var q4=Math.ceil,Y4=Math.max;function Z4(e,t,n){t===void 0?t=1:t=Y4(N3(t),0);var s=e==null?0:e.length;if(!s||t<1)return[];for(var o=0,i=0,r=Array(q4(s/t));o<s;)r[i++]=K4(e,o,o+=t);return r}function X4(){this.__data__=new Kr,this.size=0}function J4(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Q4(e){return this.__data__.get(e)}function e5(e){return this.__data__.has(e)}var t5=200;function n5(e,t){var n=this.__data__;if(n instanceof Kr){var s=n.__data__;if(!kh||s.length<t5-1)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new qr(s)}return n.set(e,t),this.size=n.size,this}function or(e){var t=this.__data__=new Kr(e);this.size=t.size}or.prototype.clear=X4,or.prototype.delete=J4,or.prototype.get=Q4,or.prototype.has=e5,or.prototype.set=n5;var _I=typeof On=="object"&&On&&!On.nodeType&&On,RI=_I&&typeof module=="object"&&module&&!module.nodeType&&module,s5=RI&&RI.exports===_I,DI=s5?Di.Buffer:void 0;DI&&DI.allocUnsafe;function o5(e,t){return e.slice()}function i5(e,t){for(var n=-1,s=e==null?0:e.length,o=0,i=[];++n<s;){var r=e[n];t(r,n,e)&&(i[o++]=r)}return i}function r5(){return[]}var a5=Object.prototype,l5=a5.propertyIsEnumerable,TI=Object.getOwnPropertySymbols,u5=TI?function(e){return e==null?[]:(e=Object(e),i5(TI(e),function(t){return l5.call(e,t)}))}:r5;function c5(e,t,n){var s=t(e);return Jo(e)?s:SI(s,n(e))}function VC(e){return c5(e,wI,u5)}var BC=Gl(Di,"DataView"),$C=Gl(Di,"Promise"),lc=Gl(Di,"Set"),II="[object Map]",d5="[object Object]",xI="[object Promise]",FI="[object Set]",PI="[object WeakMap]",AI="[object DataView]",h5=Hl(BC),f5=Hl(kh),p5=Hl($C),g5=Hl(lc),m5=Hl(IC),Qo=rc;(BC&&Qo(new BC(new ArrayBuffer(1)))!=AI||kh&&Qo(new kh)!=II||$C&&Qo($C.resolve())!=xI||lc&&Qo(new lc)!=FI||IC&&Qo(new IC)!=PI)&&(Qo=function(e){var t=rc(e),n=t==d5?e.constructor:void 0,s=n?Hl(n):"";if(s)switch(s){case h5:return AI;case f5:return II;case p5:return xI;case g5:return FI;case m5:return PI}return t});var v5=Object.prototype,y5=v5.hasOwnProperty;function w5(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&y5.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var zg=Di.Uint8Array;function HC(e){var t=new e.constructor(e.byteLength);return new zg(t).set(new zg(e)),t}function C5(e,t){var n=HC(e.buffer);return new e.constructor(n,e.byteOffset,e.byteLength)}var b5=/\w*$/;function S5(e){var t=new e.constructor(e.source,b5.exec(e));return t.lastIndex=e.lastIndex,t}var kI=Xo?Xo.prototype:void 0,OI=kI?kI.valueOf:void 0;function E5(e){return OI?Object(OI.call(e)):{}}function _5(e,t){var n=HC(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}var R5="[object Boolean]",D5="[object Date]",T5="[object Map]",I5="[object Number]",x5="[object RegExp]",F5="[object Set]",P5="[object String]",A5="[object Symbol]",k5="[object ArrayBuffer]",O5="[object DataView]",M5="[object Float32Array]",N5="[object Float64Array]",L5="[object Int8Array]",V5="[object Int16Array]",B5="[object Int32Array]",$5="[object Uint8Array]",H5="[object Uint8ClampedArray]",G5="[object Uint16Array]",U5="[object Uint32Array]";function W5(e,t,n){var s=e.constructor;switch(t){case k5:return HC(e);case R5:case D5:return new s(+e);case O5:return C5(e);case M5:case N5:case L5:case V5:case B5:case $5:case H5:case G5:case U5:return _5(e);case T5:return new s;case I5:case P5:return new s(e);case x5:return S5(e);case F5:return new s;case A5:return E5(e)}}function z5(e){return typeof e.constructor=="function"&&!AC(e)?Q3(j4(e)):{}}var j5="[object Map]";function K5(e){return jr(e)&&Qo(e)==j5}var MI=ac&&ac.isMap,q5=MI?kC(MI):K5,Y5="[object Set]";function Z5(e){return jr(e)&&Qo(e)==Y5}var NI=ac&&ac.isSet,X5=NI?kC(NI):Z5,LI="[object Arguments]",J5="[object Array]",Q5="[object Boolean]",e8="[object Date]",t8="[object Error]",VI="[object Function]",n8="[object GeneratorFunction]",s8="[object Map]",o8="[object Number]",BI="[object Object]",i8="[object RegExp]",r8="[object Set]",a8="[object String]",l8="[object Symbol]",u8="[object WeakMap]",c8="[object ArrayBuffer]",d8="[object DataView]",h8="[object Float32Array]",f8="[object Float64Array]",p8="[object Int8Array]",g8="[object Int16Array]",m8="[object Int32Array]",v8="[object Uint8Array]",y8="[object Uint8ClampedArray]",w8="[object Uint16Array]",C8="[object Uint32Array]",Fn={};Fn[LI]=Fn[J5]=Fn[c8]=Fn[d8]=Fn[Q5]=Fn[e8]=Fn[h8]=Fn[f8]=Fn[p8]=Fn[g8]=Fn[m8]=Fn[s8]=Fn[o8]=Fn[BI]=Fn[i8]=Fn[r8]=Fn[a8]=Fn[l8]=Fn[v8]=Fn[y8]=Fn[w8]=Fn[C8]=!0,Fn[t8]=Fn[VI]=Fn[u8]=!1;function jg(e,t,n,s,o,i){var r;if(r!==void 0)return r;if(!Ma(e))return e;var a=Jo(e);if(a)r=w5(e);else{var l=Qo(e),u=l==VI||l==n8;if(Fh(e))return o5(e);if(l==BI||l==LI||u&&!o)r=u?{}:z5(e);else{if(!Fn[l])return o?e:{};r=W5(e,l)}}i||(i=new or);var c=i.get(e);if(c)return c;i.set(e,r),X5(e)?e.forEach(function(f){r.add(jg(f,t,n,f,e,i))}):q5(e)&&e.forEach(function(f,p){r.set(p,jg(f,t,n,p,e,i))});var d=VC,h=a?void 0:d(e);return u6(h||e,function(f,p){h&&(p=f,f=e[p]),C6(r,p,jg(f,t,n,p,e,i))}),r}var b8=1,S8=4;function $I(e){return jg(e,b8|S8)}var E8="__lodash_hash_undefined__";function _8(e){return this.__data__.set(e,E8),this}function R8(e){return this.__data__.has(e)}function Oh(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new qr;++t<n;)this.add(e[t])}Oh.prototype.add=Oh.prototype.push=_8,Oh.prototype.has=R8;function D8(e,t){for(var n=-1,s=e==null?0:e.length;++n<s;)if(t(e[n],n,e))return!0;return!1}function HI(e,t){return e.has(t)}var T8=1,I8=2;function GI(e,t,n,s,o,i){var r=n&T8,a=e.length,l=t.length;if(a!=l&&!(r&&l>a))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,h=!0,f=n&I8?new Oh:void 0;for(i.set(e,t),i.set(t,e);++d<a;){var p=e[d],g=t[d];if(s)var v=r?s(g,p,d,t,e,i):s(p,g,d,e,t,i);if(v!==void 0){if(v)continue;h=!1;break}if(f){if(!D8(t,function(C,S){if(!HI(f,S)&&(p===C||o(p,C,n,s,i)))return f.push(S)})){h=!1;break}}else if(!(p===g||o(p,g,n,s,i))){h=!1;break}}return i.delete(e),i.delete(t),h}function x8(e){var t=-1,n=Array(e.size);return e.forEach(function(s,o){n[++t]=[o,s]}),n}function GC(e){var t=-1,n=Array(e.size);return e.forEach(function(s){n[++t]=s}),n}var F8=1,P8=2,A8="[object Boolean]",k8="[object Date]",O8="[object Error]",M8="[object Map]",N8="[object Number]",L8="[object RegExp]",V8="[object Set]",B8="[object String]",$8="[object Symbol]",H8="[object ArrayBuffer]",G8="[object DataView]",UI=Xo?Xo.prototype:void 0,UC=UI?UI.valueOf:void 0;function U8(e,t,n,s,o,i,r){switch(n){case G8:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case H8:return!(e.byteLength!=t.byteLength||!i(new zg(e),new zg(t)));case A8:case k8:case N8:return xC(+e,+t);case O8:return e.name==t.name&&e.message==t.message;case L8:case B8:return e==t+"";case M8:var a=x8;case V8:var l=s&F8;if(a||(a=GC),e.size!=t.size&&!l)return!1;var u=r.get(e);if(u)return u==t;s|=P8,r.set(e,t);var c=GI(a(e),a(t),s,o,i,r);return r.delete(e),c;case $8:if(UC)return UC.call(e)==UC.call(t)}return!1}var W8=1,z8=Object.prototype,j8=z8.hasOwnProperty;function K8(e,t,n,s,o,i){var r=n&W8,a=VC(e),l=a.length,u=VC(t),c=u.length;if(l!=c&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in t:j8.call(t,h)))return!1}var f=i.get(e),p=i.get(t);if(f&&p)return f==t&&p==e;var g=!0;i.set(e,t),i.set(t,e);for(var v=r;++d<l;){h=a[d];var C=e[h],S=t[h];if(s)var b=r?s(S,C,h,t,e,i):s(C,S,h,e,t,i);if(!(b===void 0?C===S||o(C,S,n,s,i):b)){g=!1;break}v||(v=h=="constructor")}if(g&&!v){var w=e.constructor,_=t.constructor;w!=_&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof _=="function"&&_ instanceof _)&&(g=!1)}return i.delete(e),i.delete(t),g}var q8=1,WI="[object Arguments]",zI="[object Array]",Kg="[object Object]",Y8=Object.prototype,jI=Y8.hasOwnProperty;function Z8(e,t,n,s,o,i){var r=Jo(e),a=Jo(t),l=r?zI:Qo(e),u=a?zI:Qo(t);l=l==WI?Kg:l,u=u==WI?Kg:u;var c=l==Kg,d=u==Kg,h=l==u;if(h&&Fh(e)){if(!Fh(t))return!1;r=!0,c=!1}if(h&&!c)return i||(i=new or),r||MC(e)?GI(e,t,n,s,o,i):U8(e,t,l,n,s,o,i);if(!(n&q8)){var f=c&&jI.call(e,"__wrapped__"),p=d&&jI.call(t,"__wrapped__");if(f||p){var g=f?e.value():e,v=p?t.value():t;return i||(i=new or),o(g,v,n,s,i)}}return h?(i||(i=new or),K8(e,t,n,s,o,i)):!1}function WC(e,t,n,s,o){return e===t?!0:e==null||t==null||!jr(e)&&!jr(t)?e!==e&&t!==t:Z8(e,t,n,s,WC,o)}var X8=1,J8=2;function Q8(e,t,n,s){var o=n.length,i=o;if(e==null)return!i;for(e=Object(e);o--;){var r=n[o];if(r[2]?r[1]!==e[r[0]]:!(r[0]in e))return!1}for(;++o<i;){r=n[o];var a=r[0],l=e[a],u=r[1];if(r[2]){if(l===void 0&&!(a in e))return!1}else{var c=new or,d;if(!(d===void 0?WC(u,l,X8|J8,s,c):d))return!1}}return!0}function KI(e){return e===e&&!Ma(e)}function ej(e){for(var t=wI(e),n=t.length;n--;){var s=t[n],o=e[s];t[n]=[s,o,KI(o)]}return t}function qI(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function tj(e){var t=ej(e);return t.length==1&&t[0][2]?qI(t[0][0],t[0][1]):function(n){return n===e||Q8(n,e,t)}}function nj(e,t){return e!=null&&t in Object(e)}function sj(e,t,n){t=CI(t,e);for(var s=-1,o=t.length,i=!1;++s<o;){var r=Wg(t[s]);if(!(i=e!=null&&n(e,r)))break;e=e[r]}return i||++s!=o?i:(o=e==null?0:e.length,!!o&&FC(o)&&lI(r,o)&&(Jo(e)||Hg(e)))}function oj(e,t){return e!=null&&sj(e,t,nj)}var ij=1,rj=2;function aj(e,t){return NC(e)&&KI(t)?qI(Wg(e),t):function(n){var s=U4(n,e);return s===void 0&&s===t?oj(n,e):WC(t,s,ij|rj)}}function lj(e){return function(t){return t==null?void 0:t[e]}}function uj(e){return function(t){return bI(t,e)}}function cj(e){return NC(e)?lj(Wg(e)):uj(e)}function dj(e){return typeof e=="function"?e:e==null?DC:typeof e=="object"?Jo(e)?aj(e[0],e[1]):tj(e):cj(e)}var zC=function(){return Di.Date.now()},hj="Expected a function",fj=Math.max,pj=Math.min;function Ti(e,t,n){var s,o,i,r,a,l,u=0,c=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(hj);t=RC(t)||0,Ma(n)&&(c=!!n.leading,d="maxWait"in n,i=d?fj(RC(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function f(R){var T=s,I=o;return s=o=void 0,u=R,r=e.apply(I,T),r}function p(R){return u=R,a=setTimeout(C,t),c?f(R):r}function g(R){var T=R-l,I=R-u,x=t-T;return d?pj(x,i-I):x}function v(R){var T=R-l,I=R-u;return l===void 0||T>=t||T<0||d&&I>=i}function C(){var R=zC();if(v(R))return S(R);a=setTimeout(C,g(R))}function S(R){return a=void 0,h&&s?f(R):(s=o=void 0,r)}function b(){a!==void 0&&clearTimeout(a),u=0,s=l=o=a=void 0}function w(){return a===void 0?r:S(zC())}function _(){var R=zC(),T=v(R);if(s=arguments,o=this,l=R,T){if(a===void 0)return p(l);if(d)return clearTimeout(a),a=setTimeout(C,t),f(l)}return a===void 0&&(a=setTimeout(C,t)),r}return _.cancel=b,_.flush=w,_}function YI(e){return jr(e)&&PC(e)}function gj(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var mj="[object Map]",vj="[object Set]",yj=Object.prototype,wj=yj.hasOwnProperty;function Cj(e){if(e==null)return!0;if(PC(e)&&(Jo(e)||typeof e=="string"||typeof e.splice=="function"||Fh(e)||MC(e)||Hg(e)))return!e.length;var t=Qo(e);if(t==mj||t==vj)return!e.size;if(AC(e))return!yI(e).length;for(var n in e)if(wj.call(e,n))return!1;return!0}var bj=1/0,Sj=lc&&1/GC(new lc([,-0]))[1]==bj?function(e){return new lc(e)}:t6,Ej=200;function _j(e,t,n){var s=-1,o=p6,i=e.length,r=!0,a=[],l=a;if(i>=Ej){var u=t?null:Sj(e);if(u)return GC(u);r=!1,o=HI,l=new Oh}else l=t?[]:a;e:for(;++s<i;){var c=e[s],d=t?t(c):c;if(c=c!==0?c:0,r&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),a.push(c)}else o(l,d,n)||(l!==a&&l.push(d),a.push(c))}return a}var uc=S6(function(e){var t=gj(e);return YI(t)&&(t=void 0),_j(z4(e,1,YI),dj(t))});const ts=(e,t)=>{const n=Yn();return{apiServices:Y(()=>{var r;const o=n==null?void 0:n.appContext.config.globalProperties,i=(r=t.params)==null?void 0:r.context;if(o!=null&&o.apiServices)return o.apiServices;if(e&&(i!=null&&i.apiServices))return i.apiServices})}},Rj=e=>{const t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return t?decodeURIComponent(t[2]):null};let Wl=class extends Error{};class Dj extends Wl{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class Tj extends Wl{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class Ij extends Wl{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class cc extends Wl{}class ZI extends Wl{constructor(t){super(`Invalid unit ${t}`)}}class Bs extends Wl{}let Na=class extends Wl{constructor(){super("Zone is an abstract class")}};const Et="numeric",Ii="short",ko="long",qg={year:Et,month:Et,day:Et},XI={year:Et,month:Ii,day:Et},xj={year:Et,month:Ii,day:Et,weekday:Ii},JI={year:Et,month:ko,day:Et},QI={year:Et,month:ko,day:Et,weekday:ko},ex={hour:Et,minute:Et},tx={hour:Et,minute:Et,second:Et},nx={hour:Et,minute:Et,second:Et,timeZoneName:Ii},sx={hour:Et,minute:Et,second:Et,timeZoneName:ko},ox={hour:Et,minute:Et,hourCycle:"h23"},ix={hour:Et,minute:Et,second:Et,hourCycle:"h23"},rx={hour:Et,minute:Et,second:Et,hourCycle:"h23",timeZoneName:Ii},ax={hour:Et,minute:Et,second:Et,hourCycle:"h23",timeZoneName:ko},lx={year:Et,month:Et,day:Et,hour:Et,minute:Et},ux={year:Et,month:Et,day:Et,hour:Et,minute:Et,second:Et},cx={year:Et,month:Ii,day:Et,hour:Et,minute:Et},dx={year:Et,month:Ii,day:Et,hour:Et,minute:Et,second:Et},Fj={year:Et,month:Ii,day:Et,weekday:Ii,hour:Et,minute:Et},hx={year:Et,month:ko,day:Et,hour:Et,minute:Et,timeZoneName:Ii},fx={year:Et,month:ko,day:Et,hour:Et,minute:Et,second:Et,timeZoneName:Ii},px={year:Et,month:ko,day:Et,weekday:ko,hour:Et,minute:Et,timeZoneName:ko},gx={year:Et,month:ko,day:Et,weekday:ko,hour:Et,minute:Et,second:Et,timeZoneName:ko};let Mh=class{get type(){throw new Na}get name(){throw new Na}get ianaName(){return this.name}get isUniversal(){throw new Na}offsetName(t,n){throw new Na}formatOffset(t,n){throw new Na}offset(t){throw new Na}equals(t){throw new Na}get isValid(){throw new Na}},jC=null;class Yg extends Mh{static get instance(){return jC===null&&(jC=new Yg),jC}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:s}){return Hx(t,n,s)}formatOffset(t,n){return Bh(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}const KC=new Map;function Pj(e){let t=KC.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),KC.set(e,t)),t}const Aj={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function kj(e,t){const n=e.format(t).replace(/\u200E/g,""),s=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,r,a,l,u,c]=s;return[r,o,i,a,l,u,c]}function Oj(e,t){const n=e.formatToParts(t),s=[];for(let o=0;o<n.length;o++){const{type:i,value:r}=n[o],a=Aj[i];i==="era"?s[a]=r:$t(a)||(s[a]=parseInt(r,10))}return s}const qC=new Map;let dc=class Q_ extends Mh{static create(t){let n=qC.get(t);return n===void 0&&qC.set(t,n=new Q_(t)),n}static resetCache(){qC.clear(),KC.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=Q_.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:s}){return Hx(t,n,s,this.name)}formatOffset(t,n){return Bh(this.offset(t),n)}offset(t){if(!this.valid)return NaN;const n=new Date(t);if(isNaN(n))return NaN;const s=Pj(this.name);let[o,i,r,a,l,u,c]=s.formatToParts?Oj(s,n):kj(s,n);a==="BC"&&(o=-Math.abs(o)+1);const h=em({year:o,month:i,day:r,hour:l===24?0:l,minute:u,second:c,millisecond:0});let f=+n;const p=f%1e3;return f-=p>=0?p:1e3+p,(h-f)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}},mx={};function Mj(e,t={}){const n=JSON.stringify([e,t]);let s=mx[n];return s||(s=new Intl.ListFormat(e,t),mx[n]=s),s}const YC=new Map;function ZC(e,t={}){const n=JSON.stringify([e,t]);let s=YC.get(n);return s===void 0&&(s=new Intl.DateTimeFormat(e,t),YC.set(n,s)),s}const XC=new Map;function Nj(e,t={}){const n=JSON.stringify([e,t]);let s=XC.get(n);return s===void 0&&(s=new Intl.NumberFormat(e,t),XC.set(n,s)),s}const JC=new Map;function Lj(e,t={}){const{base:n,...s}=t,o=JSON.stringify([e,s]);let i=JC.get(o);return i===void 0&&(i=new Intl.RelativeTimeFormat(e,t),JC.set(o,i)),i}let Nh=null;function Vj(){return Nh||(Nh=new Intl.DateTimeFormat().resolvedOptions().locale,Nh)}const QC=new Map;function vx(e){let t=QC.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),QC.set(e,t)),t}const eb=new Map;function Bj(e){let t=eb.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...yx,...t}),eb.set(e,t)}return t}function $j(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let s,o;try{s=ZC(e).resolvedOptions(),o=e}catch{const l=e.substring(0,n);s=ZC(l).resolvedOptions(),o=l}const{numberingSystem:i,calendar:r}=s;return[o,i,r]}}function Hj(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function Gj(e){const t=[];for(let n=1;n<=12;n++){const s=bt.utc(2009,n,1);t.push(e(s))}return t}function Uj(e){const t=[];for(let n=1;n<=7;n++){const s=bt.utc(2016,11,13+n);t.push(e(s))}return t}function Zg(e,t,n,s){const o=e.listingMode();return o==="error"?null:o==="en"?n(t):s(t)}function Wj(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||vx(e.locale).numberingSystem==="latn"}class zj{constructor(t,n,s){this.padTo=s.padTo||0,this.floor=s.floor||!1;const{padTo:o,floor:i,...r}=s;if(!n||Object.keys(r).length>0){const a={useGrouping:!1,...s};s.padTo>0&&(a.minimumIntegerDigits=s.padTo),this.inf=Nj(t,a)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):ub(t,3);return ds(n,this.padTo)}}}class jj{constructor(t,n,s){this.opts=s,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const r=-1*(t.offset/60),a=r>=0?`Etc/GMT+${r}`:`Etc/GMT${r}`;t.offset!==0&&dc.create(a).valid?(o=a,this.dt=t):(o="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,o=t.zone.name):(o="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const i={...this.opts};i.timeZone=i.timeZone||o,this.dtf=ZC(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const s=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:s}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class Kj{constructor(t,n,s){this.opts={style:"long",...s},!n&&Lx()&&(this.rtf=Lj(t,s))}format(t,n){return this.rtf?this.rtf.format(t,n):gK(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const yx={firstDay:1,minimalDays:4,weekend:[6,7]};class bn{static fromOpts(t){return bn.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,s,o,i=!1){const r=t||Zn.defaultLocale,a=r||(i?"en-US":Vj()),l=n||Zn.defaultNumberingSystem,u=s||Zn.defaultOutputCalendar,c=ab(o)||Zn.defaultWeekSettings;return new bn(a,l,u,c,r)}static resetCache(){Nh=null,YC.clear(),XC.clear(),JC.clear(),QC.clear(),eb.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:s,weekSettings:o}={}){return bn.create(t,n,s,o)}constructor(t,n,s,o,i){const[r,a,l]=$j(t);this.locale=r,this.numberingSystem=n||a||null,this.outputCalendar=s||l||null,this.weekSettings=o,this.intl=Hj(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Wj(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:bn.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,ab(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return Zg(this,t,Wx,()=>{const s=this.intl==="ja"||this.intl.startsWith("ja-");n&=!s;const o=n?{month:t,day:"numeric"}:{month:t},i=n?"format":"standalone";if(!this.monthsCache[i][t]){const r=s?a=>this.dtFormatter(a,o).format():a=>this.extract(a,o,"month");this.monthsCache[i][t]=Gj(r)}return this.monthsCache[i][t]})}weekdays(t,n=!1){return Zg(this,t,Kx,()=>{const s=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=Uj(i=>this.extract(i,s,"weekday"))),this.weekdaysCache[o][t]})}meridiems(){return Zg(this,void 0,()=>qx,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[bt.utc(2016,11,13,9),bt.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return Zg(this,t,Yx,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[bt.utc(-40,1,1),bt.utc(2017,1,1)].map(s=>this.extract(s,n,"era"))),this.eraCache[t]})}extract(t,n,s){const o=this.dtFormatter(t,n),i=o.formatToParts(),r=i.find(a=>a.type.toLowerCase()===s);return r?r.value:null}numberFormatter(t={}){return new zj(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new jj(t,this.intl,n)}relFormatter(t={}){return new Kj(this.intl,this.isEnglish(),t)}listFormatter(t={}){return Mj(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||vx(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Vx()?Bj(this.locale):yx}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let tb=null,ir=class Tp extends Mh{static get utcInstance(){return tb===null&&(tb=new Tp(0)),tb}static instance(t){return t===0?Tp.utcInstance:new Tp(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Tp(tm(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Bh(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Bh(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Bh(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}};class qj extends Mh{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function La(e,t){if($t(e)||e===null)return t;if(e instanceof Mh)return e;if(eK(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?Yg.instance:n==="utc"||n==="gmt"?ir.utcInstance:ir.parseSpecifier(n)||dc.create(e)}else return Va(e)?ir.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new qj(e)}const nb={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},wx={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Yj=nb.hanidec.replace(/[\[|\]]/g,"").split("");function Zj(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const s=e.charCodeAt(n);if(e[n].search(nb.hanidec)!==-1)t+=Yj.indexOf(e[n]);else for(const o in wx){const[i,r]=wx[o];s>=i&&s<=r&&(t+=s-i)}}return parseInt(t,10)}else return t}const sb=new Map;function Xj(){sb.clear()}function xi({numberingSystem:e},t=""){const n=e||"latn";let s=sb.get(n);s===void 0&&(s=new Map,sb.set(n,s));let o=s.get(t);return o===void 0&&(o=new RegExp(`${nb[n]}${t}`),s.set(t,o)),o}let Cx=()=>Date.now(),bx="system",Sx=null,Ex=null,_x=null,Rx=60,Dx,Tx=null;class Zn{static get now(){return Cx}static set now(t){Cx=t}static set defaultZone(t){bx=t}static get defaultZone(){return La(bx,Yg.instance)}static get defaultLocale(){return Sx}static set defaultLocale(t){Sx=t}static get defaultNumberingSystem(){return Ex}static set defaultNumberingSystem(t){Ex=t}static get defaultOutputCalendar(){return _x}static set defaultOutputCalendar(t){_x=t}static get defaultWeekSettings(){return Tx}static set defaultWeekSettings(t){Tx=ab(t)}static get twoDigitCutoffYear(){return Rx}static set twoDigitCutoffYear(t){Rx=t%100}static get throwOnInvalid(){return Dx}static set throwOnInvalid(t){Dx=t}static resetCaches(){bn.resetCache(),dc.resetCache(),bt.resetCache(),Xj()}}class Fi{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Ix=[0,31,59,90,120,151,181,212,243,273,304,334],xx=[0,31,60,91,121,152,182,213,244,274,305,335];function ei(e,t){return new Fi("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function ob(e,t,n){const s=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&s.setUTCFullYear(s.getUTCFullYear()-1900);const o=s.getUTCDay();return o===0?7:o}function Fx(e,t,n){return n+(Lh(e)?xx:Ix)[t-1]}function Px(e,t){const n=Lh(e)?xx:Ix,s=n.findIndex(i=>i<t),o=t-n[s];return{month:s+1,day:o}}function ib(e,t){return(e-t+7)%7+1}function Xg(e,t=4,n=1){const{year:s,month:o,day:i}=e,r=Fx(s,o,i),a=ib(ob(s,o,i),n);let l=Math.floor((r-a+14-t)/7),u;return l<1?(u=s-1,l=Vh(u,t,n)):l>Vh(s,t,n)?(u=s+1,l=1):u=s,{weekYear:u,weekNumber:l,weekday:a,...sm(e)}}function Ax(e,t=4,n=1){const{weekYear:s,weekNumber:o,weekday:i}=e,r=ib(ob(s,1,t),n),a=fc(s);let l=o*7+i-r-7+t,u;l<1?(u=s-1,l+=fc(u)):l>a?(u=s+1,l-=fc(s)):u=s;const{month:c,day:d}=Px(u,l);return{year:u,month:c,day:d,...sm(e)}}function rb(e){const{year:t,month:n,day:s}=e,o=Fx(t,n,s);return{year:t,ordinal:o,...sm(e)}}function kx(e){const{year:t,ordinal:n}=e,{month:s,day:o}=Px(t,n);return{year:t,month:s,day:o,...sm(e)}}function Ox(e,t){if(!$t(e.localWeekday)||!$t(e.localWeekNumber)||!$t(e.localWeekYear)){if(!$t(e.weekday)||!$t(e.weekNumber)||!$t(e.weekYear))throw new cc("Cannot mix locale-based week fields with ISO-based week fields");return $t(e.localWeekday)||(e.weekday=e.localWeekday),$t(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),$t(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Jj(e,t=4,n=1){const s=Jg(e.weekYear),o=ti(e.weekNumber,1,Vh(e.weekYear,t,n)),i=ti(e.weekday,1,7);return s?o?i?!1:ei("weekday",e.weekday):ei("week",e.weekNumber):ei("weekYear",e.weekYear)}function Qj(e){const t=Jg(e.year),n=ti(e.ordinal,1,fc(e.year));return t?n?!1:ei("ordinal",e.ordinal):ei("year",e.year)}function Mx(e){const t=Jg(e.year),n=ti(e.month,1,12),s=ti(e.day,1,Qg(e.year,e.month));return t?n?s?!1:ei("day",e.day):ei("month",e.month):ei("year",e.year)}function Nx(e){const{hour:t,minute:n,second:s,millisecond:o}=e,i=ti(t,0,23)||t===24&&n===0&&s===0&&o===0,r=ti(n,0,59),a=ti(s,0,59),l=ti(o,0,999);return i?r?a?l?!1:ei("millisecond",o):ei("second",s):ei("minute",n):ei("hour",t)}function $t(e){return typeof e>"u"}function Va(e){return typeof e=="number"}function Jg(e){return typeof e=="number"&&e%1===0}function eK(e){return typeof e=="string"}function tK(e){return Object.prototype.toString.call(e)==="[object Date]"}function Lx(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Vx(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function nK(e){return Array.isArray(e)?e:[e]}function Bx(e,t,n){if(e.length!==0)return e.reduce((s,o)=>{const i=[t(o),o];return s&&n(s[0],i[0])===s[0]?s:i},null)[1]}function sK(e,t){return t.reduce((n,s)=>(n[s]=e[s],n),{})}function hc(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ab(e){if(e==null)return null;if(typeof e!="object")throw new Bs("Week settings must be an object");if(!ti(e.firstDay,1,7)||!ti(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!ti(t,1,7)))throw new Bs("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function ti(e,t,n){return Jg(e)&&e>=t&&e<=n}function oK(e,t){return e-t*Math.floor(e/t)}function ds(e,t=2){const n=e<0;let s;return n?s="-"+(""+-e).padStart(t,"0"):s=(""+e).padStart(t,"0"),s}function Ba(e){if(!($t(e)||e===null||e===""))return parseInt(e,10)}function zl(e){if(!($t(e)||e===null||e===""))return parseFloat(e)}function lb(e){if(!($t(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function ub(e,t,n="round"){const s=10**t;switch(n){case"expand":return e>0?Math.ceil(e*s)/s:Math.floor(e*s)/s;case"trunc":return Math.trunc(e*s)/s;case"round":return Math.round(e*s)/s;case"floor":return Math.floor(e*s)/s;case"ceil":return Math.ceil(e*s)/s;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function Lh(e){return e%4===0&&(e%100!==0||e%400===0)}function fc(e){return Lh(e)?366:365}function Qg(e,t){const n=oK(t-1,12)+1,s=e+(t-n)/12;return n===2?Lh(s)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function em(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function $x(e,t,n){return-ib(ob(e,1,t),n)+t-1}function Vh(e,t=4,n=1){const s=$x(e,t,n),o=$x(e+1,t,n);return(fc(e)-s+o)/7}function cb(e){return e>99?e:e>Zn.twoDigitCutoffYear?1900+e:2e3+e}function Hx(e,t,n,s=null){const o=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};s&&(i.timeZone=s);const r={timeZoneName:t,...i},a=new Intl.DateTimeFormat(n,r).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function tm(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const s=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-s:s;return n*60+o}function Gx(e){const t=Number(e);if(typeof e=="boolean"||e===""||!Number.isFinite(t))throw new Bs(`Invalid unit value ${e}`);return t}function nm(e,t){const n={};for(const s in e)if(hc(e,s)){const o=e[s];if(o==null)continue;n[t(s)]=Gx(o)}return n}function Bh(e,t){const n=Math.trunc(Math.abs(e/60)),s=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${ds(n,2)}:${ds(s,2)}`;case"narrow":return`${o}${n}${s>0?`:${s}`:""}`;case"techie":return`${o}${ds(n,2)}${ds(s,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function sm(e){return sK(e,["hour","minute","second","millisecond"])}const iK=["January","February","March","April","May","June","July","August","September","October","November","December"],Ux=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],rK=["J","F","M","A","M","J","J","A","S","O","N","D"];function Wx(e){switch(e){case"narrow":return[...rK];case"short":return[...Ux];case"long":return[...iK];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const zx=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],jx=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],aK=["M","T","W","T","F","S","S"];function Kx(e){switch(e){case"narrow":return[...aK];case"short":return[...jx];case"long":return[...zx];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const qx=["AM","PM"],lK=["Before Christ","Anno Domini"],uK=["BC","AD"],cK=["B","A"];function Yx(e){switch(e){case"narrow":return[...cK];case"short":return[...uK];case"long":return[...lK];default:return null}}function dK(e){return qx[e.hour<12?0:1]}function hK(e,t){return Kx(t)[e.weekday-1]}function fK(e,t){return Wx(t)[e.month-1]}function pK(e,t){return Yx(t)[e.year<0?0:1]}function gK(e,t,n="always",s=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&i){const d=e==="days";switch(t){case 1:return d?"tomorrow":`next ${o[e][0]}`;case-1:return d?"yesterday":`last ${o[e][0]}`;case 0:return d?"today":`this ${o[e][0]}`}}const r=Object.is(t,-0)||t<0,a=Math.abs(t),l=a===1,u=o[e],c=s?l?u[1]:u[2]||u[1]:l?o[e][0]:e;return r?`${a} ${c} ago`:`in ${a} ${c}`}function Zx(e,t){let n="";for(const s of e)s.literal?n+=s.val:n+=t(s.val);return n}const mK={D:qg,DD:XI,DDD:JI,DDDD:QI,t:ex,tt:tx,ttt:nx,tttt:sx,T:ox,TT:ix,TTT:rx,TTTT:ax,f:lx,ff:cx,fff:hx,ffff:px,F:ux,FF:dx,FFF:fx,FFFF:gx};class $s{static create(t,n={}){return new $s(t,n)}static parseFormat(t){let n=null,s="",o=!1;const i=[];for(let r=0;r<t.length;r++){const a=t.charAt(r);a==="'"?((s.length>0||o)&&i.push({literal:o||/^\s+$/.test(s),val:s===""?"'":s}),n=null,s="",o=!o):o||a===n?s+=a:(s.length>0&&i.push({literal:/^\s+$/.test(s),val:s}),s=a,n=a)}return s.length>0&&i.push({literal:o||/^\s+$/.test(s),val:s}),i}static macroTokenToFormatOpts(t){return mK[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0,s=void 0){if(this.opts.forceSimple)return ds(t,n);const o={...this.opts};return n>0&&(o.padTo=n),s&&(o.signDisplay=s),this.loc.numberFormatter(o).format(t)}formatDateTimeFromString(t,n){const s=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(f,p)=>this.loc.extract(t,f,p),r=f=>t.isOffsetFixed&&t.offset===0&&f.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,f.format):"",a=()=>s?dK(t):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(f,p)=>s?fK(t,f):i(p?{month:f}:{month:f,day:"numeric"},"month"),u=(f,p)=>s?hK(t,f):i(p?{weekday:f}:{weekday:f,month:"long",day:"numeric"},"weekday"),c=f=>{const p=$s.macroTokenToFormatOpts(f);return p?this.formatWithSystemDefault(t,p):f},d=f=>s?pK(t,f):i({era:f},"era"),h=f=>{switch(f){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return r({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return r({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return r({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return a();case"d":return o?i({day:"numeric"},"day"):this.num(t.day);case"dd":return o?i({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return o?i({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?i({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?i({month:"numeric"},"month"):this.num(t.month);case"MM":return o?i({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?i({year:"numeric"},"year"):this.num(t.year);case"yy":return o?i({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?i({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?i({year:"numeric"},"year"):this.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return c(f)}};return Zx($s.parseFormat(n),h)}formatDurationFromString(t,n){const s=this.opts.signMode==="negativeLargestOnly"?-1:1,o=c=>{switch(c[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},i=(c,d)=>h=>{const f=o(h);if(f){const p=d.isNegativeDuration&&f!==d.largestUnit?s:1;let g;return this.opts.signMode==="negativeLargestOnly"&&f!==d.largestUnit?g="never":this.opts.signMode==="all"?g="always":g="auto",this.num(c.get(f)*p,h.length,g)}else return h},r=$s.parseFormat(n),a=r.reduce((c,{literal:d,val:h})=>d?c:c.concat(h),[]),l=t.shiftTo(...a.map(o).filter(c=>c)),u={isNegativeDuration:l<0,largestUnit:Object.keys(l.values)[0]};return Zx(r,i(l,u))}}const Xx=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function pc(...e){const t=e.reduce((n,s)=>n+s.source,"");return RegExp(`^${t}$`)}function gc(...e){return t=>e.reduce(([n,s,o],i)=>{const[r,a,l]=i(t,o);return[{...n,...r},a||s,l]},[{},null,1]).slice(0,2)}function mc(e,...t){if(e==null)return[null,null];for(const[n,s]of t){const o=n.exec(e);if(o)return s(o)}return[null,null]}function Jx(...e){return(t,n)=>{const s={};let o;for(o=0;o<e.length;o++)s[e[o]]=Ba(t[n+o]);return[s,null,n+o]}}const Qx=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,vK=`(?:${Qx.source}?(?:\\[(${Xx.source})\\])?)?`,db=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,eF=RegExp(`${db.source}${vK}`),hb=RegExp(`(?:[Tt]${eF.source})?`),yK=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,wK=/(\d{4})-?W(\d\d)(?:-?(\d))?/,CK=/(\d{4})-?(\d{3})/,bK=Jx("weekYear","weekNumber","weekDay"),SK=Jx("year","ordinal"),EK=/(\d{4})-(\d\d)-(\d\d)/,tF=RegExp(`${db.source} ?(?:${Qx.source}|(${Xx.source}))?`),_K=RegExp(`(?: ${tF.source})?`);function vc(e,t,n){const s=e[t];return $t(s)?n:Ba(s)}function RK(e,t){return[{year:vc(e,t),month:vc(e,t+1,1),day:vc(e,t+2,1)},null,t+3]}function yc(e,t){return[{hours:vc(e,t,0),minutes:vc(e,t+1,0),seconds:vc(e,t+2,0),milliseconds:lb(e[t+3])},null,t+4]}function $h(e,t){const n=!e[t]&&!e[t+1],s=tm(e[t+1],e[t+2]),o=n?null:ir.instance(s);return[{},o,t+3]}function Hh(e,t){const n=e[t]?dc.create(e[t]):null;return[{},n,t+1]}const DK=RegExp(`^T?${db.source}$`),TK=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function IK(e){const[t,n,s,o,i,r,a,l,u]=e,c=t[0]==="-",d=l&&l[0]==="-",h=(f,p=!1)=>f!==void 0&&(p||f&&c)?-f:f;return[{years:h(zl(n)),months:h(zl(s)),weeks:h(zl(o)),days:h(zl(i)),hours:h(zl(r)),minutes:h(zl(a)),seconds:h(zl(l),l==="-0"),milliseconds:h(lb(u),d)}]}const xK={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function fb(e,t,n,s,o,i,r){const a={year:t.length===2?cb(Ba(t)):Ba(t),month:Ux.indexOf(n)+1,day:Ba(s),hour:Ba(o),minute:Ba(i)};return r&&(a.second=Ba(r)),e&&(a.weekday=e.length>3?zx.indexOf(e)+1:jx.indexOf(e)+1),a}const FK=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function PK(e){const[,t,n,s,o,i,r,a,l,u,c,d]=e,h=fb(t,o,s,n,i,r,a);let f;return l?f=xK[l]:u?f=0:f=tm(c,d),[h,new ir(f)]}function AK(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const kK=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,OK=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,MK=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function nF(e){const[,t,n,s,o,i,r,a]=e;return[fb(t,o,s,n,i,r,a),ir.utcInstance]}function NK(e){const[,t,n,s,o,i,r,a]=e;return[fb(t,a,n,s,o,i,r),ir.utcInstance]}const LK=pc(yK,hb),VK=pc(wK,hb),BK=pc(CK,hb),$K=pc(eF),sF=gc(RK,yc,$h,Hh),HK=gc(bK,yc,$h,Hh),GK=gc(SK,yc,$h,Hh),UK=gc(yc,$h,Hh);function WK(e){return mc(e,[LK,sF],[VK,HK],[BK,GK],[$K,UK])}function zK(e){return mc(AK(e),[FK,PK])}function jK(e){return mc(e,[kK,nF],[OK,nF],[MK,NK])}function KK(e){return mc(e,[TK,IK])}const qK=gc(yc);function YK(e){return mc(e,[DK,qK])}const ZK=pc(EK,_K),XK=pc(tF),JK=gc(yc,$h,Hh);function QK(e){return mc(e,[ZK,sF],[XK,JK])}const oF="Invalid Duration",iF={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},e7={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...iF},ni=146097/400,wc=146097/4800,t7={years:{quarters:4,months:12,weeks:ni/7,days:ni,hours:ni*24,minutes:ni*24*60,seconds:ni*24*60*60,milliseconds:ni*24*60*60*1e3},quarters:{months:3,weeks:ni/28,days:ni/4,hours:ni*24/4,minutes:ni*24*60/4,seconds:ni*24*60*60/4,milliseconds:ni*24*60*60*1e3/4},months:{weeks:wc/7,days:wc,hours:wc*24,minutes:wc*24*60,seconds:wc*24*60*60,milliseconds:wc*24*60*60*1e3},...iF},jl=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],n7=jl.slice(0).reverse();function Yr(e,t,n=!1){const s={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new hn(s)}function rF(e,t){let n=t.milliseconds??0;for(const s of n7.slice(1))t[s]&&(n+=t[s]*e[s].milliseconds);return n}function aF(e,t){const n=rF(e,t)<0?-1:1;jl.reduceRight((s,o)=>{if($t(t[o]))return s;if(s){const i=t[s]*n,r=e[o][s],a=Math.floor(i/r);t[o]+=a*n,t[s]-=a*r*n}return o},null),jl.reduce((s,o)=>{if($t(t[o]))return s;if(s){const i=t[s]%1;t[s]-=i,t[o]+=i*e[s][o]}return o},null)}function lF(e){const t={};for(const[n,s]of Object.entries(e))s!==0&&(t[n]=s);return t}class hn{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let s=n?t7:e7;t.matrix&&(s=t.matrix),this.values=t.values,this.loc=t.loc||bn.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=s,this.isLuxonDuration=!0}static fromMillis(t,n){return hn.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new Bs(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new hn({values:nm(t,hn.normalizeUnit),loc:bn.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(Va(t))return hn.fromMillis(t);if(hn.isDuration(t))return t;if(typeof t=="object")return hn.fromObject(t);throw new Bs(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[s]=KK(t);return s?hn.fromObject(s,n):hn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[s]=YK(t);return s?hn.fromObject(s,n):hn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new Bs("need to specify a reason the Duration is invalid");const s=t instanceof Fi?t:new Fi(t,n);if(Zn.throwOnInvalid)throw new Ij(s);return new hn({invalid:s})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new ZI(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const s={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?$s.create(this.loc,s).formatDurationFromString(this,t):oF}toHuman(t={}){if(!this.isValid)return oF;const n=t.showZeros!==!1,s=jl.map(o=>{const i=this.values[o];return $t(i)||i===0&&!n?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:o.slice(0,-1)}).format(i)}).filter(o=>o);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(s)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=ub(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},bt.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?rF(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=hn.fromDurationLike(t),s={};for(const o of jl)(hc(n.values,o)||hc(this.values,o))&&(s[o]=n.get(o)+this.get(o));return Yr(this,{values:s},!0)}minus(t){if(!this.isValid)return this;const n=hn.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const s of Object.keys(this.values))n[s]=Gx(t(this.values[s],s));return Yr(this,{values:n},!0)}get(t){return this[hn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...nm(t,hn.normalizeUnit)};return Yr(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:s,matrix:o}={}){const r={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:s};return Yr(this,r)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return aF(this.matrix,t),Yr(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=lF(this.normalize().shiftToAll().toObject());return Yr(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(r=>hn.normalizeUnit(r));const n={},s={},o=this.toObject();let i;for(const r of jl)if(t.indexOf(r)>=0){i=r;let a=0;for(const u in s)a+=this.matrix[u][r]*s[u],s[u]=0;Va(o[r])&&(a+=o[r]);const l=Math.trunc(a);n[r]=l,s[r]=(a*1e3-l*1e3)/1e3}else Va(o[r])&&(s[r]=o[r]);for(const r in s)s[r]!==0&&(n[i]+=r===i?s[r]:s[r]/this.matrix[i][r]);return aF(this.matrix,n),Yr(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return Yr(this,{values:t},!0)}removeZeros(){if(!this.isValid)return this;const t=lF(this.values);return Yr(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(s,o){return s===void 0||s===0?o===void 0||o===0:s===o}for(const s of jl)if(!n(this.values[s],t.values[s]))return!1;return!0}}const Cc="Invalid Interval";function s7(e,t){return!e||!e.isValid?Xn.invalid("missing or invalid start"):!t||!t.isValid?Xn.invalid("missing or invalid end"):t<e?Xn.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class Xn{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new Bs("need to specify a reason the Interval is invalid");const s=t instanceof Fi?t:new Fi(t,n);if(Zn.throwOnInvalid)throw new Tj(s);return new Xn({invalid:s})}static fromDateTimes(t,n){const s=Wh(t),o=Wh(n),i=s7(s,o);return i??new Xn({start:s,end:o})}static after(t,n){const s=hn.fromDurationLike(n),o=Wh(t);return Xn.fromDateTimes(o,o.plus(s))}static before(t,n){const s=hn.fromDurationLike(n),o=Wh(t);return Xn.fromDateTimes(o.minus(s),o)}static fromISO(t,n){const[s,o]=(t||"").split("/",2);if(s&&o){let i,r;try{i=bt.fromISO(s,n),r=i.isValid}catch{r=!1}let a,l;try{a=bt.fromISO(o,n),l=a.isValid}catch{l=!1}if(r&&l)return Xn.fromDateTimes(i,a);if(r){const u=hn.fromISO(o,n);if(u.isValid)return Xn.after(i,u)}else if(l){const u=hn.fromISO(s,n);if(u.isValid)return Xn.before(a,u)}}return Xn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const s=this.start.startOf(t,n);let o;return n!=null&&n.useLocaleWeeks?o=this.end.reconfigure({locale:s.locale}):o=this.end,o=o.startOf(t,n),Math.floor(o.diff(s,t).get(t))+(o.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Xn.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(Wh).filter(r=>this.contains(r)).sort((r,a)=>r.toMillis()-a.toMillis()),s=[];let{s:o}=this,i=0;for(;o<this.e;){const r=n[i]||this.e,a=+r>+this.e?this.e:r;s.push(Xn.fromDateTimes(o,a)),o=a,i+=1}return s}splitBy(t){const n=hn.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s}=this,o=1,i;const r=[];for(;s<this.e;){const a=this.start.plus(n.mapUnits(l=>l*o));i=+a>+this.e?this.e:a,r.push(Xn.fromDateTimes(s,i)),s=i,o+=1}return r}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,s=this.e<t.e?this.e:t.e;return n>=s?null:Xn.fromDateTimes(n,s)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,s=this.e>t.e?this.e:t.e;return Xn.fromDateTimes(n,s)}static merge(t){const[n,s]=t.sort((o,i)=>o.s-i.s).reduce(([o,i],r)=>i?i.overlaps(r)||i.abutsStart(r)?[o,i.union(r)]:[o.concat([i]),r]:[o,r],[[],null]);return s&&n.push(s),n}static xor(t){let n=null,s=0;const o=[],i=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),r=Array.prototype.concat(...i),a=r.sort((l,u)=>l.time-u.time);for(const l of a)s+=l.type==="s"?1:-1,s===1?n=l.time:(n&&+n!=+l.time&&o.push(Xn.fromDateTimes(n,l.time)),n=null);return Xn.merge(o)}difference(...t){return Xn.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Cc}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=qg,n={}){return this.isValid?$s.create(this.s.loc.clone(n),t).formatInterval(this):Cc}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Cc}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Cc}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Cc}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Cc}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):hn.invalid(this.invalidReason)}mapEndpoints(t){return Xn.fromDateTimes(t(this.s),t(this.e))}}class bc{static hasDST(t=Zn.defaultZone){const n=bt.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return dc.isValidZone(t)}static normalizeZone(t){return La(t,Zn.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||bn.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||bn.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||bn.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:s=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||bn.create(n,s,i)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:s=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||bn.create(n,s,i)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:s=null,locObj:o=null}={}){return(o||bn.create(n,s,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:s=null,locObj:o=null}={}){return(o||bn.create(n,s,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return bn.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return bn.create(n,null,"gregory").eras(t)}static features(){return{relative:Lx(),localeWeek:Vx()}}}function uF(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),s=n(t)-n(e);return Math.floor(hn.fromMillis(s).as("days"))}function o7(e,t,n){const s=[["years",(l,u)=>u.year-l.year],["quarters",(l,u)=>u.quarter-l.quarter+(u.year-l.year)*4],["months",(l,u)=>u.month-l.month+(u.year-l.year)*12],["weeks",(l,u)=>{const c=uF(l,u);return(c-c%7)/7}],["days",uF]],o={},i=e;let r,a;for(const[l,u]of s)n.indexOf(l)>=0&&(r=l,o[l]=u(e,t),a=i.plus(o),a>t?(o[l]--,e=i.plus(o),e>t&&(a=e,o[l]--,e=i.plus(o))):e=a);return[e,o,a,r]}function i7(e,t,n,s){let[o,i,r,a]=o7(e,t,n);const l=t-o,u=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);u.length===0&&(r<t&&(r=o.plus({[a]:1})),r!==o&&(i[a]=(i[a]||0)+l/(r-o)));const c=hn.fromObject(i,s);return u.length>0?hn.fromMillis(l,s).shiftTo(...u).plus(c):c}const r7="missing Intl.DateTimeFormat.formatToParts support";function vn(e,t=n=>n){return{regex:e,deser:([n])=>t(Zj(n))}}const cF="[ ]",dF=new RegExp(cF,"g");function a7(e){return e.replace(/\./g,"\\.?").replace(dF,cF)}function hF(e){return e.replace(/\./g,"").replace(dF," ").toLowerCase()}function Pi(e,t){return e===null?null:{regex:RegExp(e.map(a7).join("|")),deser:([n])=>e.findIndex(s=>hF(n)===hF(s))+t}}function fF(e,t){return{regex:e,deser:([,n,s])=>tm(n,s),groups:t}}function om(e){return{regex:e,deser:([t])=>t}}function l7(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function u7(e,t){const n=xi(t),s=xi(t,"{2}"),o=xi(t,"{3}"),i=xi(t,"{4}"),r=xi(t,"{6}"),a=xi(t,"{1,2}"),l=xi(t,"{1,3}"),u=xi(t,"{1,6}"),c=xi(t,"{1,9}"),d=xi(t,"{2,4}"),h=xi(t,"{4,6}"),f=v=>({regex:RegExp(l7(v.val)),deser:([C])=>C,literal:!0}),g=(v=>{if(e.literal)return f(v);switch(v.val){case"G":return Pi(t.eras("short"),0);case"GG":return Pi(t.eras("long"),0);case"y":return vn(u);case"yy":return vn(d,cb);case"yyyy":return vn(i);case"yyyyy":return vn(h);case"yyyyyy":return vn(r);case"M":return vn(a);case"MM":return vn(s);case"MMM":return Pi(t.months("short",!0),1);case"MMMM":return Pi(t.months("long",!0),1);case"L":return vn(a);case"LL":return vn(s);case"LLL":return Pi(t.months("short",!1),1);case"LLLL":return Pi(t.months("long",!1),1);case"d":return vn(a);case"dd":return vn(s);case"o":return vn(l);case"ooo":return vn(o);case"HH":return vn(s);case"H":return vn(a);case"hh":return vn(s);case"h":return vn(a);case"mm":return vn(s);case"m":return vn(a);case"q":return vn(a);case"qq":return vn(s);case"s":return vn(a);case"ss":return vn(s);case"S":return vn(l);case"SSS":return vn(o);case"u":return om(c);case"uu":return om(a);case"uuu":return vn(n);case"a":return Pi(t.meridiems(),0);case"kkkk":return vn(i);case"kk":return vn(d,cb);case"W":return vn(a);case"WW":return vn(s);case"E":case"c":return vn(n);case"EEE":return Pi(t.weekdays("short",!1),1);case"EEEE":return Pi(t.weekdays("long",!1),1);case"ccc":return Pi(t.weekdays("short",!0),1);case"cccc":return Pi(t.weekdays("long",!0),1);case"Z":case"ZZ":return fF(new RegExp(`([+-]${a.source})(?::(${s.source}))?`),2);case"ZZZ":return fF(new RegExp(`([+-]${a.source})(${s.source})?`),2);case"z":return om(/[a-z_+-/]{1,256}?/i);case" ":return om(/[^\S\n\r]/);default:return f(v)}})(e)||{invalidReason:r7};return g.token=e,g}const c7={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function d7(e,t,n){const{type:s,value:o}=e;if(s==="literal"){const l=/^\s+$/.test(o);return{literal:!l,val:l?" ":o}}const i=t[s];let r=s;s==="hour"&&(t.hour12!=null?r=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?r="hour12":r="hour24":r=n.hour12?"hour12":"hour24");let a=c7[r];if(typeof a=="object"&&(a=a[i]),a)return{literal:!1,val:a}}function h7(e){return[`^${e.map(n=>n.regex).reduce((n,s)=>`${n}(${s.source})`,"")}$`,e]}function f7(e,t,n){const s=e.match(t);if(s){const o={};let i=1;for(const r in n)if(hc(n,r)){const a=n[r],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(o[a.token.val[0]]=a.deser(s.slice(i,i+l))),i+=l}return[s,o]}else return[s,{}]}function p7(e){const t=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,s;return $t(e.z)||(n=dc.create(e.z)),$t(e.Z)||(n||(n=new ir(e.Z)),s=e.Z),$t(e.q)||(e.M=(e.q-1)*3+1),$t(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),$t(e.u)||(e.S=lb(e.u)),[Object.keys(e).reduce((i,r)=>{const a=t(r);return a&&(i[a]=e[r]),i},{}),n,s]}let pb=null;function g7(){return pb||(pb=bt.fromMillis(1555555555555)),pb}function m7(e,t){if(e.literal)return e;const n=$s.macroTokenToFormatOpts(e.val),s=vF(n,t);return s==null||s.includes(void 0)?e:s}function pF(e,t){return Array.prototype.concat(...e.map(n=>m7(n,t)))}class gF{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=pF($s.parseFormat(n),t),this.units=this.tokens.map(s=>u7(s,t)),this.disqualifyingUnit=this.units.find(s=>s.invalidReason),!this.disqualifyingUnit){const[s,o]=h7(this.units);this.regex=RegExp(s,"i"),this.handlers=o}}explainFromTokens(t){if(this.isValid){const[n,s]=f7(t,this.regex,this.handlers),[o,i,r]=s?p7(s):[null,null,void 0];if(hc(s,"a")&&hc(s,"H"))throw new cc("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:s,result:o,zone:i,specificOffset:r}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function mF(e,t,n){return new gF(e,n).explainFromTokens(t)}function v7(e,t,n){const{result:s,zone:o,specificOffset:i,invalidReason:r}=mF(e,t,n);return[s,o,i,r]}function vF(e,t){if(!e)return null;const s=$s.create(t,e).dtFormatter(g7()),o=s.formatToParts(),i=s.resolvedOptions();return o.map(r=>d7(r,e,i))}const gb="Invalid DateTime",yF=864e13;function Gh(e){return new Fi("unsupported zone",`the zone "${e.name}" is not supported`)}function mb(e){return e.weekData===null&&(e.weekData=Xg(e.c)),e.weekData}function vb(e){return e.localWeekData===null&&(e.localWeekData=Xg(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Kl(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new bt({...n,...t,old:n})}function wF(e,t,n){let s=e-t*60*1e3;const o=n.offset(s);if(t===o)return[s,t];s-=(o-t)*60*1e3;const i=n.offset(s);return o===i?[s,o]:[e-Math.min(o,i)*60*1e3,Math.max(o,i)]}function im(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function rm(e,t,n){return wF(em(e),t,n)}function CF(e,t){const n=e.o,s=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,i={...e.c,year:s,month:o,day:Math.min(e.c.day,Qg(s,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},r=hn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=em(i);let[l,u]=wF(a,n,e.zone);return r!==0&&(l+=r,u=e.zone.offset(l)),{ts:l,o:u}}function Sc(e,t,n,s,o,i){const{setZone:r,zone:a}=n;if(e&&Object.keys(e).length!==0||t){const l=t||a,u=bt.fromObject(e,{...n,zone:l,specificOffset:i});return r?u:u.setZone(a)}else return bt.invalid(new Fi("unparsable",`the input "${o}" can't be parsed as ${s}`))}function am(e,t,n=!0){return e.isValid?$s.create(bn.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function yb(e,t,n){const s=e.c.year>9999||e.c.year<0;let o="";if(s&&e.c.year>=0&&(o+="+"),o+=ds(e.c.year,s?6:4),n==="year")return o;if(t){if(o+="-",o+=ds(e.c.month),n==="month")return o;o+="-"}else if(o+=ds(e.c.month),n==="month")return o;return o+=ds(e.c.day),o}function bF(e,t,n,s,o,i,r){let a=!n||e.c.millisecond!==0||e.c.second!==0,l="";switch(r){case"day":case"month":case"year":break;default:if(l+=ds(e.c.hour),r==="hour")break;if(t){if(l+=":",l+=ds(e.c.minute),r==="minute")break;a&&(l+=":",l+=ds(e.c.second))}else{if(l+=ds(e.c.minute),r==="minute")break;a&&(l+=ds(e.c.second))}if(r==="second")break;a&&(!s||e.c.millisecond!==0)&&(l+=".",l+=ds(e.c.millisecond,3))}return o&&(e.isOffsetFixed&&e.offset===0&&!i?l+="Z":e.o<0?(l+="-",l+=ds(Math.trunc(-e.o/60)),l+=":",l+=ds(Math.trunc(-e.o%60))):(l+="+",l+=ds(Math.trunc(e.o/60)),l+=":",l+=ds(Math.trunc(e.o%60)))),i&&(l+="["+e.zone.ianaName+"]"),l}const SF={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},y7={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},w7={ordinal:1,hour:0,minute:0,second:0,millisecond:0},lm=["year","month","day","hour","minute","second","millisecond"],C7=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],b7=["year","ordinal","hour","minute","second","millisecond"];function um(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new ZI(e);return t}function EF(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return um(e)}}function S7(e){if(Uh===void 0&&(Uh=Zn.now()),e.type!=="iana")return e.offset(Uh);const t=e.name;let n=wb.get(t);return n===void 0&&(n=e.offset(Uh),wb.set(t,n)),n}function _F(e,t){const n=La(t.zone,Zn.defaultZone);if(!n.isValid)return bt.invalid(Gh(n));const s=bn.fromObject(t);let o,i;if($t(e.year))o=Zn.now();else{for(const l of lm)$t(e[l])&&(e[l]=SF[l]);const r=Mx(e)||Nx(e);if(r)return bt.invalid(r);const a=S7(n);[o,i]=rm(e,a,n)}return new bt({ts:o,zone:n,loc:s,o:i})}function RF(e,t,n){const s=$t(n.round)?!0:n.round,o=$t(n.rounding)?"trunc":n.rounding,i=(a,l)=>(a=ub(a,s||n.calendary?0:2,n.calendary?"round":o),t.loc.clone(n).relFormatter(n).format(a,l)),r=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return i(r(n.unit),n.unit);for(const a of n.units){const l=r(a);if(Math.abs(l)>=1)return i(l,a)}return i(e>t?-0:0,n.units[n.units.length-1])}function DF(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let Uh;const wb=new Map;class bt{constructor(t){const n=t.zone||Zn.defaultZone;let s=t.invalid||(Number.isNaN(t.ts)?new Fi("invalid input"):null)||(n.isValid?null:Gh(n));this.ts=$t(t.ts)?Zn.now():t.ts;let o=null,i=null;if(!s)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,i]=[t.old.c,t.old.o];else{const a=Va(t.o)&&!t.old?t.o:n.offset(this.ts);o=im(this.ts,a),s=Number.isNaN(o.year)?new Fi("invalid input"):null,o=s?null:o,i=s?null:a}this._zone=n,this.loc=t.loc||bn.create(),this.invalid=s,this.weekData=null,this.localWeekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}static now(){return new bt({})}static local(){const[t,n]=DF(arguments),[s,o,i,r,a,l,u]=n;return _F({year:s,month:o,day:i,hour:r,minute:a,second:l,millisecond:u},t)}static utc(){const[t,n]=DF(arguments),[s,o,i,r,a,l,u]=n;return t.zone=ir.utcInstance,_F({year:s,month:o,day:i,hour:r,minute:a,second:l,millisecond:u},t)}static fromJSDate(t,n={}){const s=tK(t)?t.valueOf():NaN;if(Number.isNaN(s))return bt.invalid("invalid input");const o=La(n.zone,Zn.defaultZone);return o.isValid?new bt({ts:s,zone:o,loc:bn.fromObject(n)}):bt.invalid(Gh(o))}static fromMillis(t,n={}){if(Va(t))return t<-yF||t>yF?bt.invalid("Timestamp out of range"):new bt({ts:t,zone:La(n.zone,Zn.defaultZone),loc:bn.fromObject(n)});throw new Bs(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(Va(t))return new bt({ts:t*1e3,zone:La(n.zone,Zn.defaultZone),loc:bn.fromObject(n)});throw new Bs("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const s=La(n.zone,Zn.defaultZone);if(!s.isValid)return bt.invalid(Gh(s));const o=bn.fromObject(n),i=nm(t,EF),{minDaysInFirstWeek:r,startOfWeek:a}=Ox(i,o),l=Zn.now(),u=$t(n.specificOffset)?s.offset(l):n.specificOffset,c=!$t(i.ordinal),d=!$t(i.year),h=!$t(i.month)||!$t(i.day),f=d||h,p=i.weekYear||i.weekNumber;if((f||c)&&p)throw new cc("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&c)throw new cc("Can't mix ordinal dates with month/day");const g=p||i.weekday&&!f;let v,C,S=im(l,u);g?(v=C7,C=y7,S=Xg(S,r,a)):c?(v=b7,C=w7,S=rb(S)):(v=lm,C=SF);let b=!1;for(const P of v){const D=i[P];$t(D)?b?i[P]=C[P]:i[P]=S[P]:b=!0}const w=g?Jj(i,r,a):c?Qj(i):Mx(i),_=w||Nx(i);if(_)return bt.invalid(_);const R=g?Ax(i,r,a):c?kx(i):i,[T,I]=rm(R,u,s),x=new bt({ts:T,zone:s,o:I,loc:o});return i.weekday&&f&&t.weekday!==x.weekday?bt.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${x.toISO()}`):x.isValid?x:bt.invalid(x.invalid)}static fromISO(t,n={}){const[s,o]=WK(t);return Sc(s,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[s,o]=zK(t);return Sc(s,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[s,o]=jK(t);return Sc(s,o,n,"HTTP",n)}static fromFormat(t,n,s={}){if($t(t)||$t(n))throw new Bs("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:i=null}=s,r=bn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0}),[a,l,u,c]=v7(r,t,n);return c?bt.invalid(c):Sc(a,l,s,`format ${n}`,t,u)}static fromString(t,n,s={}){return bt.fromFormat(t,n,s)}static fromSQL(t,n={}){const[s,o]=QK(t);return Sc(s,o,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new Bs("need to specify a reason the DateTime is invalid");const s=t instanceof Fi?t:new Fi(t,n);if(Zn.throwOnInvalid)throw new Dj(s);return new bt({invalid:s})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const s=vF(t,bn.fromObject(n));return s?s.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return pF($s.parseFormat(t),bn.fromObject(n)).map(o=>o.val).join("")}static resetCache(){Uh=void 0,wb.clear()}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?mb(this).weekYear:NaN}get weekNumber(){return this.isValid?mb(this).weekNumber:NaN}get weekday(){return this.isValid?mb(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?vb(this).weekday:NaN}get localWeekNumber(){return this.isValid?vb(this).weekNumber:NaN}get localWeekYear(){return this.isValid?vb(this).weekYear:NaN}get ordinal(){return this.isValid?rb(this.c).ordinal:NaN}get monthShort(){return this.isValid?bc.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?bc.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?bc.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?bc.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,s=em(this.c),o=this.zone.offset(s-t),i=this.zone.offset(s+t),r=this.zone.offset(s-o*n),a=this.zone.offset(s-i*n);if(r===a)return[this];const l=s-r*n,u=s-a*n,c=im(l,r),d=im(u,a);return c.hour===d.hour&&c.minute===d.minute&&c.second===d.second&&c.millisecond===d.millisecond?[Kl(this,{ts:l}),Kl(this,{ts:u})]:[this]}get isInLeapYear(){return Lh(this.year)}get daysInMonth(){return Qg(this.year,this.month)}get daysInYear(){return this.isValid?fc(this.year):NaN}get weeksInWeekYear(){return this.isValid?Vh(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Vh(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:s,calendar:o}=$s.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:s,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(ir.instance(t),n)}toLocal(){return this.setZone(Zn.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:s=!1}={}){if(t=La(t,Zn.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||s){const i=t.offset(this.ts),r=this.toObject();[o]=rm(r,i,t)}return Kl(this,{ts:o,zone:t})}else return bt.invalid(Gh(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:s}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:s});return Kl(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=nm(t,EF),{minDaysInFirstWeek:s,startOfWeek:o}=Ox(n,this.loc),i=!$t(n.weekYear)||!$t(n.weekNumber)||!$t(n.weekday),r=!$t(n.ordinal),a=!$t(n.year),l=!$t(n.month)||!$t(n.day),u=a||l,c=n.weekYear||n.weekNumber;if((u||r)&&c)throw new cc("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new cc("Can't mix ordinal dates with month/day");let d;i?d=Ax({...Xg(this.c,s,o),...n},s,o):$t(n.ordinal)?(d={...this.toObject(),...n},$t(n.day)&&(d.day=Math.min(Qg(d.year,d.month),d.day))):d=kx({...rb(this.c),...n});const[h,f]=rm(d,this.o,this.zone);return Kl(this,{ts:h,o:f})}plus(t){if(!this.isValid)return this;const n=hn.fromDurationLike(t);return Kl(this,CF(this,n))}minus(t){if(!this.isValid)return this;const n=hn.fromDurationLike(t).negate();return Kl(this,CF(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const s={},o=hn.normalizeUnit(t);switch(o){case"years":s.month=1;case"quarters":case"months":s.day=1;case"weeks":case"days":s.hour=0;case"hours":s.minute=0;case"minutes":s.second=0;case"seconds":s.millisecond=0;break}if(o==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:r}=this;r<i&&(s.weekNumber=this.weekNumber-1),s.weekday=i}else s.weekday=1;if(o==="quarters"){const i=Math.ceil(this.month/3);s.month=(i-1)*3+1}return this.set(s)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?$s.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):gb}toLocaleString(t=qg,n={}){return this.isValid?$s.create(this.loc.clone(n),t).formatDateTime(this):gb}toLocaleParts(t={}){return this.isValid?$s.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:s=!1,includeOffset:o=!0,extendedZone:i=!1,precision:r="milliseconds"}={}){if(!this.isValid)return null;r=um(r);const a=t==="extended";let l=yb(this,a,r);return lm.indexOf(r)>=3&&(l+="T"),l+=bF(this,a,n,s,o,i,r),l}toISODate({format:t="extended",precision:n="day"}={}){return this.isValid?yb(this,t==="extended",um(n)):null}toISOWeekDate(){return am(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:s=!0,includePrefix:o=!1,extendedZone:i=!1,format:r="extended",precision:a="milliseconds"}={}){return this.isValid?(a=um(a),(o&&lm.indexOf(a)>=3?"T":"")+bF(this,r==="extended",n,t,s,i,a)):null}toRFC2822(){return am(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return am(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?yb(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:s=!0}={}){let o="HH:mm:ss.SSS";return(n||t)&&(s&&(o+=" "),n?o+="z":t&&(o+="ZZ")),am(this,o,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():gb}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",s={}){if(!this.isValid||!t.isValid)return hn.invalid("created by diffing an invalid DateTime");const o={locale:this.locale,numberingSystem:this.numberingSystem,...s},i=nK(n).map(hn.normalizeUnit),r=t.valueOf()>this.valueOf(),a=r?this:t,l=r?t:this,u=i7(a,l,i,o);return r?u.negate():u}diffNow(t="milliseconds",n={}){return this.diff(bt.now(),t,n)}until(t){return this.isValid?Xn.fromDateTimes(this,t):this}hasSame(t,n,s){if(!this.isValid)return!1;const o=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(n,s)<=o&&o<=i.endOf(n,s)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||bt.fromObject({},{zone:this.zone}),s=t.padding?this<n?-t.padding:t.padding:0;let o=["years","months","days","hours","minutes","seconds"],i=t.unit;return Array.isArray(t.unit)&&(o=t.unit,i=void 0),RF(n,this.plus(s),{...t,numeric:"always",units:o,unit:i})}toRelativeCalendar(t={}){return this.isValid?RF(t.base||bt.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(bt.isDateTime))throw new Bs("min requires all arguments be DateTimes");return Bx(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(bt.isDateTime))throw new Bs("max requires all arguments be DateTimes");return Bx(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,s={}){const{locale:o=null,numberingSystem:i=null}=s,r=bn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});return mF(r,t,n)}static fromStringExplain(t,n,s={}){return bt.fromFormatExplain(t,n,s)}static buildFormatParser(t,n={}){const{locale:s=null,numberingSystem:o=null}=n,i=bn.fromOpts({locale:s,numberingSystem:o,defaultToEN:!0});return new gF(i,t)}static fromFormatParser(t,n,s={}){if($t(t)||$t(n))throw new Bs("fromFormatParser requires an input string and a format parser");const{locale:o=null,numberingSystem:i=null}=s,r=bn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});if(!r.equals(n.locale))throw new Bs(`fromFormatParser called with a locale of ${r}, but the format parser was created for ${n.locale}`);const{result:a,zone:l,specificOffset:u,invalidReason:c}=n.explainFromTokens(t);return c?bt.invalid(c):Sc(a,l,s,`format ${n.format}`,t,u)}static get DATE_SHORT(){return qg}static get DATE_MED(){return XI}static get DATE_MED_WITH_WEEKDAY(){return xj}static get DATE_FULL(){return JI}static get DATE_HUGE(){return QI}static get TIME_SIMPLE(){return ex}static get TIME_WITH_SECONDS(){return tx}static get TIME_WITH_SHORT_OFFSET(){return nx}static get TIME_WITH_LONG_OFFSET(){return sx}static get TIME_24_SIMPLE(){return ox}static get TIME_24_WITH_SECONDS(){return ix}static get TIME_24_WITH_SHORT_OFFSET(){return rx}static get TIME_24_WITH_LONG_OFFSET(){return ax}static get DATETIME_SHORT(){return lx}static get DATETIME_SHORT_WITH_SECONDS(){return ux}static get DATETIME_MED(){return cx}static get DATETIME_MED_WITH_SECONDS(){return dx}static get DATETIME_MED_WITH_WEEKDAY(){return Fj}static get DATETIME_FULL(){return hx}static get DATETIME_FULL_WITH_SECONDS(){return fx}static get DATETIME_HUGE(){return px}static get DATETIME_HUGE_WITH_SECONDS(){return gx}}function Wh(e){if(bt.isDateTime(e))return e;if(e&&e.valueOf&&Va(e.valueOf()))return bt.fromJSDate(e);if(e&&typeof e=="object")return bt.fromObject(e);throw new Bs(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const TF="account.last_prefered_timezone",rr=800;var Ht=(e=>(e[e.UNCHECK=0]="UNCHECK",e[e.INDETERMINATE=1]="INDETERMINATE",e[e.CHECKED=2]="CHECKED",e))(Ht||{});function zh(e){if(!e)return null;if(bt.isDateTime(e))return e;if(e instanceof Date){const t=bt.fromJSDate(e);return t.isValid?t:null}if(typeof e=="number"){const t=bt.fromMillis(e);return t.isValid?t:null}if(typeof e=="string"){let t=bt.fromISO(e);return t.isValid||(t=bt.fromRFC2822(e)),t.isValid?t:null}return null}function IF(e,t,n){const s=zh(e);if(!s)return"";const o=n?s.setZone(n):s;return o.isValid?o.toFormat(t):""}const cm=()=>Rj(TF)||"UTC",xF=e=>({id:e.id,name:(e==null?void 0:e.name)??e.display_name,initial:e.initial,profile_image:e.profile_image,color:{bgColor:e.color.bgColor,textColor:e.color.textColor}}),Ec=e=>e!=null&&e.length?e.map(xF):[],E7=e=>{if(!(e!=null&&e.length))return[];const t=new Set;return e.filter(n=>t.has(n.id)?!1:(t.add(n.id),!0))},FF=e=>{if(!e)return null;const t=new Date(e);return Number.isNaN(t.getTime())?null:t},_7=e=>Object.fromEntries(Object.entries(e).filter(([t,n])=>n!==void 0)),PF=(e,t)=>{var s,o,i;const n={id:e.id,name:e.name,assignees:void 0,status:e.template_flow_status,dateRange:[FF(e.start_date),FF(e.due_date)],isStarted:!!Number(e.is_started),isCompleted:!!Number(e.is_completed),lastUpdated:{tooltip:e!=null&&e.last_updated_by?e.last_updated_by:"",value:IF(e.updated_at,"MMM dd, yyyy | HH:mm",t)||""},completedOn:{tooltip:e.actual_due_date==null?"Pending":e.last_completed_by?e.last_completed_by:"",value:IF(e.actual_due_date,"MMM dd, yyyy | HH:mm",t)},isDeleted:!1,isProcessing:e!=null&&e.bulk_process?{state:e==null?void 0:e.bulk_process.state,message:(e==null?void 0:e.bulk_process.message)||""}:void 0,disabled:((s=e==null?void 0:e.bulk_process)==null?void 0:s.state)==0,isArchived:((o=e.property)==null?void 0:o.is_archived)===1||e.status==0,isLocked:((i=e.property)==null?void 0:i.is_locked)===1};return _7(n)},AF={headphone:["headphones","headset"],sofa:["couch"],couch:["sofa"],run:["running","runner"]},Cb=e=>e.toLowerCase().trim(),R7=e=>Cb(e).split(/\s+/).filter(Boolean),kF=e=>e.replace(/(ing|ed|s)$/i,"");function D7(e){const t=new Set;for(const n of e){const s=kF(n);if(t.add(s),t.add(n),AF[s])for(const o of AF[s])t.add(kF(o))}return Array.from(t)}function T7(e,t){const n=Cb(e),s=D7(R7(t));let o=0;for(const i of s)i&&(n.includes(i)&&(o+=i.length*2),n.startsWith(i)&&(o+=3));return o}function I7(e,t){const n=i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s=t.split(/\s+/).filter(Boolean).map(n);if(!s.length)return e;const o=new RegExp(`(${s.join("|")})`,"ig");return e.replace(o,"<mark>$1</mark>")}const OF=e=>{if(e!==null){if(Number(e.metric_type.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number(e.metric_type.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number(e.metric_type.id)==3)return"formula"}},bb=e=>!isNaN(e)&&isFinite(e),dm=(e,t)=>{var i;const{restricted_type:n}=e,s=Math.floor(Number(t)),o=((i=e.restricted_value)==null?void 0:i.split(",").map(Number))||[];if(n=="none")return!0;if(e.restricted_type=="not")return bb(s)&&!o.includes(s);if(e.restricted_type=="range"){const[r,a]=o;return bb(Number(t))&&Number(t)>=Number(r)&&Number(t)<=Number(a)}else if(n=="exact")return bb(s)&&o.includes(s);return!1},x7=(e,t)=>{var i;const n=_n.getInstance().getItem("ws.terminology"),s=n?JSON.parse(n):null;return` ${((i=s==null?void 0:s.find(r=>r.code==="scene"))==null?void 0:i.name)||"Scene"} ${t}`.trim()};/*! js-cookie v3.0.5 | MIT */function hm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)e[s]=n[s]}return e}var F7={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Sb(e,t){function n(o,i,r){if(!(typeof document>"u")){r=hm({},t,r),typeof r.expires=="number"&&(r.expires=new Date(Date.now()+r.expires*864e5)),r.expires&&(r.expires=r.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in r)r[l]&&(a+="; "+l,r[l]!==!0&&(a+="="+r[l].split(";")[0]));return document.cookie=o+"="+e.write(i,o)+a}}function s(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var i=document.cookie?document.cookie.split("; "):[],r={},a=0;a<i.length;a++){var l=i[a].split("="),u=l.slice(1).join("=");try{var c=decodeURIComponent(l[0]);if(r[c]=e.read(u,c),o===c)break}catch{}}return o?r[o]:r}}return Object.create({set:n,get:s,remove:function(o,i){n(o,"",hm({},i,{expires:-1}))},withAttributes:function(o){return Sb(this.converter,hm({},this.attributes,o))},withConverter:function(o){return Sb(hm({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var MF=Sb(F7,{path:"/"});const fm=({date:e,timezone:t,format:n})=>{if(!e)return"";const s=typeof e=="string"?bt.fromISO(e,{zone:t}):e,o=bt.now().setZone(t||"local"),i=s.setZone(t||"local"),r=o.startOf("day"),l=i.startOf("day").diff(r,"days").days;let u="";if(l===0?u="Today":l===-1?u="Yesterday":l===1&&(u="Tomorrow"),u&&(n!=null&&n.includes("HH:mm"))){const c=i.toFormat("HH:mm");return`${u} at ${c}`}else if(u)return u;return i.toFormat(n)},Eb=()=>MF.get("account.last_prefered_timezone")||"UTC",pm=e=>`${bt.fromJSDate(e,{zone:"UTC"}).toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")}999Z`,gm=e=>({id:e.id,label:e.name,value:e.id,data:e,color:e.color||{bgColor:"#CCCCCC",textColor:"#FFFFFF"},selected:!1,hover:!1,type:"text",disabled:!1,clickable:!0,danger:!1}),mm=e=>{var P;const t=En("filterParams",null),n=B(((P=e.value)==null?void 0:P.map(D=>D.id))??[]),s=B([]),o=B(!1),i=Si(e,"workspaceId"),r=Si(e,"entityId"),a=Si(e,"id"),l=Si(e,"ids"),u=Si(e,"isSelectAll"),c=Si(e,"isBulkUpdate"),d=e.updateRowData,h=B([]),{apiServices:f}=ts(!!e.params,e),p=Y(()=>{var O,$;const D=new Set(((O=e.value)==null?void 0:O.map(q=>q.id))??[]),F=(($=e.value)==null?void 0:$.map(q=>({...gm(q),selected:!0})))??[],k=s.value.filter(q=>!D.has(q.id));return uc(F,k,"id")}),g=D=>{const F=p.value.find(k=>k.id===D);return F==null?void 0:F.data},v=()=>{var D;return c.value&&u.value?[]:(D=l.value)!=null&&D.length?l.value:[String(a.value)]},C=async(D,F,k)=>{if(o.value||!f.value)return!1;o.value=!0;try{const O=await D();if((O==null?void 0:O.message)!=="Done")throw new Error("API call failed");return F(),!0}catch(O){return console.error("API call error:",O),k==null||k(O),!1}finally{o.value=!1}},S=Y(()=>!!(c.value&&u.value)),b=async()=>await C(()=>f.value.unAssignAll({workspaceId:String(i.value),userIds:[],itemIds:S.value?void 0:v(),entityId:S.value?String(r.value):void 0,filterParams:t!=null&&t.value?t.value:void 0}),()=>{d==null||d({assignees:[],type:"removeAll"}),n.value=[]},()=>{var F;console.error("Failed to unassign all assignees"),(F=e.errorCallback)==null||F.call(e)}),w=async D=>await C(()=>f.value.replaceAssignee(R(D)),()=>{n.value=[D];const k=g(D);k&&(d==null||d({assignees:Ec([k]),type:"overwrite"}))},()=>{var k;(k=e.errorCallback)==null||k.call(e)}),_=async D=>await C(()=>f.value.addAssignee(R(D)),()=>{var O,$,q;n.value.push(D);const k=g(D);if(k){const J=(q=($=(O=e.params)==null?void 0:O.api)==null?void 0:$.getRowNode(String(e.id)))==null?void 0:q.data,ee=(J==null?void 0:J.assignees)||[],X=uc([...ee,...Ec([k])],"id");d==null||d({assignees:X,type:"add"})}},()=>{var k;(k=e.errorCallback)==null||k.call(e)}),R=D=>{const F={workspaceId:String(i.value),userIds:[D],filterParams:t!=null&&t.value?t.value:void 0};return S.value?(F.itemIds=void 0,F.entityId=String(r.value)):F.itemIds=v(),F},T=async D=>await C(()=>f.value.removeAssignee(R(D)),()=>{var $,q,J;const k=(J=(q=($=e.params)==null?void 0:$.api)==null?void 0:q.getRowNode(String(e.id)))==null?void 0:J.data;n.value=n.value.filter(ee=>ee!==D);const O=Ec(((k==null?void 0:k.assignees)||[]).filter(ee=>ee.id!==D));d==null||d({assignees:O,type:"remove"})},()=>{var k;(k=e.errorCallback)==null||k.call(e)});return{isSubmitting:o,options:h,unAssignAll:b,replaceAssignees:w,addAssignee:_,removeAssignee:T,handleSelect:D=>{const F=String(D.id);n.value.includes(F)?T(F):_(F)},openPeopleInsight:D=>{if(!D||!i.value)return;const F=Ao({type:"people_insight",config:{user_id:D,ws_code:i.value,baseDomain:_n.getInstance().getItem("BASE_URL")||""}}).url;window.open(F,"_blank")},assigneeList:s,mergedOptions:p,selectedUserIds:n}},P7={placement:"bottom-start",theme:"light",trigger:"click",interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,showArrow:!0,showOnInit:!1,alwaysShow:!1,debug:!1,content:void 0};function A7(e){return e.value?"$el"in e.value?e.value.$el:e.value:null}function Fs(e={}){const t=B(!1),n={...P7,...e},s=B(null),o=B(null),i=B(null),r=B(!1);let a=null,l=null;const u=S=>{(S.key==="Escape"||S.key==="Esc")&&p()},c=()=>{a&&l&&(l.removeEventListener("click",a),a=null,l=null),i.value&&(i.value.destroy(),i.value=null,r.value=!1),document.removeEventListener("keydown",u)},d=S=>{const{showOnInit:b,alwaysShow:w,showArrow:_,debug:R,...T}=n;return{...T,content:S,theme:n.theme,trigger:w||n.toggleOnClick?"manual":n.trigger,placement:n.placement||"bottom-start",arrow:!1,offset:n.offset,interactive:n.interactive,appendTo:n.appendTo,animation:"fade",maxWidth:n.maxWidth||350,onShow:I=>{if(e.disabled)return!1;if(r.value=!0,document.addEventListener("keydown",u),e.onShow)return e.onShow(I)},onHide:I=>{if(t.value)return setTimeout(()=>{t.value=!1},200),!1;if(w)return!1;if(r.value=!1,document.removeEventListener("keydown",u),e.onHide)return e.onHide(I)},onClickOutside:n.onClickOutside?n.onClickOutside:(I,x)=>{const P=x.target.closest(".notification-center"),D=x.target.closest("#people-insight-container");if(P||D){t.value=!0;return}if(e.onClickOutside)return e.onClickOutside(I,x);w||I.hide()},popperOptions:n.popperOptions||{modifiers:[{name:"computeStyles",options:{gpuAcceleration:!1}},{name:"preventOverflow",options:{padding:8}}]},hideOnClick:n.hideOnClick!==void 0?n.hideOnClick:!1}},h=()=>{var w;c();const S=A7(s),b=o.value;if(!(!S||!b)){b.style.display==="none"&&(b.style.display="");try{const _=d(b),R=Pa(S,_);i.value=Array.isArray(R)?R[0]:R,n.toggleOnClick&&!n.alwaysShow&&(a=()=>g(),l=S,S.addEventListener("click",a)),(n.showOnInit||n.alwaysShow)&&((w=i.value)==null||w.show())}catch(_){console.error("[useTippyComposable] Failed to create Tippy instance:",_)}}},f=S=>{S&&C(S),i.value&&i.value.show()},p=()=>{n.alwaysShow||i.value&&i.value.hide()},g=()=>{r.value?p():f()},v=S=>{i.value&&i.value.setContent(S)},C=S=>{i.value&&i.value.setProps(S)};return nt([s,o],h,{flush:"post"}),vs(()=>{c()}),{instance:i,isVisible:r,show:f,hide:p,toggle:g,triggerRef:s,popupRef:o,destroyTippy:c,setContent:v,setProps:C}}const NF=(e,t,n)=>{const s=B("Copy"),o=()=>{setTimeout(()=>{s.value="Copy"},5e3)};return{copyToClipboard:async r=>{r.stopPropagation(),r.preventDefault(),r.stopImmediatePropagation();try{return await navigator.clipboard.writeText(e),s.value="Copied",t==null||t(),o(),!0}catch(a){return console.error("Failed to copy text to clipboard:",a),s.value="Copy failed",o(),!1}},tooltip:s}},k7=(e,t,n)=>{const s={truncate:"End date cleared because it was before start. Please pick an end date.",swap:"Dates auto-swapped because start was after end.",...e.messages},o=So({startDate:null,endDate:null,timezone:e.timezone||"UTC",format:e.format||"",isSelectingStart:!1,isSelectingEnd:!1,rangeFeedback:{status:"idle",action:null,message:""},cacheStartDate:null,cacheEndDate:null,isDirty:!1});eh(()=>{var P;((P=e.value)==null?void 0:P.length)===2&&(o.startDate=e.value[0],o.endDate=e.value[1]),o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate,o.isSelectingStart=!1,o.isSelectingEnd=!1,e.timezone&&(o.timezone=e.timezone)});const i=B(!1),r=B(!1),a=()=>{var q,J,ee,X,ve,te,N,V;const P=i.value||((J=(q=o.startDate)==null?void 0:q.getTime)==null?void 0:J.call(q))!==((X=(ee=o.cacheStartDate)==null?void 0:ee.getTime)==null?void 0:X.call(ee)),D=r.value||((te=(ve=o.endDate)==null?void 0:ve.getTime)==null?void 0:te.call(ve))!==((V=(N=o.cacheEndDate)==null?void 0:N.getTime)==null?void 0:V.call(N)),F=o.startDate===null,k=o.endDate===null;let O,$;P&&D&&F&&k?(O=!0,$=!0,t("clearAll")):P&&!D?(O=!0,F?t("clearStart"):t("update:start",o.startDate)):D&&!P?($=!0,k?t("clearDue"):t("update:end",o.endDate)):P&&D&&(O=!0,$=!0,t("update",[o.startDate,o.endDate])),!(!O&&!$)&&(O&&!$?t("confirmed",{start:o.startDate}):!O&&$?t("confirmed",{end:o.endDate}):t("confirmed",{start:o.startDate,end:o.endDate}),o.isDirty=P||D)},l=(P,D)=>{const F=bt.fromObject({year:P.year,month:P.month,day:P.day},{zone:o.timezone});return(D==="start"?F.startOf("day"):F.endOf("day")).toJSDate()},u=()=>{o.rangeFeedback.status="idle",o.rangeFeedback.action=null,o.rangeFeedback.message=""},c=P=>{e.enableRangeFeedback&&(o.rangeFeedback.status="corrected",o.rangeFeedback.action=P,o.rangeFeedback.message=P==="swap"?s.swap:s.truncate)},d=P=>{if(!(!o.startDate||!o.endDate)){if(o.startDate.getTime()<=o.endDate.getTime()){e.enableRangeFeedback&&u();return}if(P==="select-start"){const D={start:o.startDate,end:o.endDate};o.endDate=null,t("range:invalid",D),t("range:corrected",{start:o.startDate,end:o.endDate,action:"truncate"}),o.isSelectingEnd=!0,c("truncate")}else{const D={start:o.startDate,end:o.endDate},F=o.startDate;o.startDate=o.endDate,o.endDate=F,t("range:invalid",D),t("range:corrected",{start:o.startDate,end:o.endDate,action:"swap"}),c("swap")}}},h=B(!1),f=B(!1),p=(P,D=!0)=>{i.value=!0,h.value=!1,!(e.disabled||e.readOnly)&&(o.startDate=l(P,"start"),D?(o.isSelectingStart=!1,o.isSelectingEnd=!0):(o.isSelectingStart=!0,o.isSelectingEnd=!1),d("select-start"))},g=P=>{r.value=!0,f.value=!1,!(e.disabled||e.readOnly)&&(o.endDate=l(P,"end"),d("select-end"))},v=()=>{i.value=!0,!(e.disabled||e.readOnly)&&(o.startDate=null,u())},C=()=>{r.value=!0,!(e.disabled||e.readOnly)&&(o.endDate=null,u())},S=()=>{i.value=!0,r.value=!0,!(e.disabled||e.readOnly)&&(o.startDate=null,o.endDate=null,u(),w())},b=()=>{e.disabled||e.readOnly||o.isDirty||(o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate)},w=()=>{e.disabled||e.readOnly||(a(),o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate,o.isDirty=!1)},_=()=>{e.disabled||e.readOnly||(o.startDate=o.cacheStartDate,o.endDate=o.cacheEndDate,u(),o.isDirty=!1)},R=Y(()=>o.startDate?bt.fromJSDate(o.startDate,{zone:o.timezone}).toFormat(o.format):e.startPlaceholder),T=Y(()=>o.endDate?bt.fromJSDate(o.endDate,{zone:o.timezone}).toFormat(o.format):e.duePlaceholder),I=Y(()=>!o.startDate&&!e.disabled?e.startTooltip:!o.startDate&&(e.disabled||e.readOnly)?e.startPlaceholder:o.startDate?bt.fromJSDate(o.startDate,{zone:o.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):e.startTooltip),x=Y(()=>!o.endDate&&!e.disabled?e.dueTooltip:!o.endDate&&(e.disabled||e.readOnly)?e.startPlaceholder:o.endDate?bt.fromJSDate(o.endDate,{zone:o.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):e.dueTooltip);return{states:o,displayStartDate:R,displayEndDate:T,tooltipStartDate:I,tooltipEndDate:x,showMultipleDueDates:f,showMultipleStartDates:h,selectEndDate:g,selectStartDate:p,clearDue:C,clearStart:v,clearAll:S,beginInteraction:b,confirmSelection:w,cancelSelection:_}},LF="MMM dd",O7=e=>{const t=e.timezone,n=Y(()=>e.start?fm({date:zh(e.start),timezone:t,format:LF}):"No start"),s=Y(()=>e.end?fm({date:zh(e.end),timezone:t,format:LF}):"No due"),o=d=>{if(!d)return null;const h=bt.now().setZone(t).startOf("day"),f=bt.fromISO(d).setZone(t).startOf("day");if(!f.isValid)return console.warn("Invalid date:",d,f.invalidReason),null;const p=f.diff(h,"days").days;return p===0?"today":p===1?"tomorrow":p===-1?"yesterday":p<-1?"past":"future"},i=Y(()=>o(e.start)),r=Y(()=>o(e.end)),a=Y(()=>{if(n.value==="No start")return["empty"];const d=[];return i.value&&d.push(`start-${i.value}`),e.isStarted&&d.push("actual"),d}),l=Y(()=>{if(s.value==="No due")return["empty"];const d=[];return r.value&&d.push(`end-${r.value}`),e.isEnded&&d.push("actual"),d}),u=Y(()=>e.start?fm({date:zh(e.start),timezone:t,format:"MMM dd, yyyy | HH:mm"}):"No start"),c=Y(()=>e.end?fm({date:zh(e.end),timezone:t,format:"MMM dd, yyyy | HH:mm"}):"No due");return{startDate:n,endDate:s,startClasses:a,endClasses:l,fullStartDate:u,fullEndDate:c}},M7="UserCache",N7="user",L7=()=>{const e=B({}),{getCachedValue:t,setCachedValue:n}=Dh({dbName:M7,storeName:N7}),s=async u=>u?await t(u):null;return{getCachedUser:s,setCachedUser:async u=>{if(!(u!=null&&u.id)){console.warn("Cannot cache user without id:",u);return}await n(u.id,u),e.value[u.id]=!0},getCachedUsers:async u=>{if(!u||u.length===0)return[];const c=u.map(h=>s(h));return(await Promise.all(c)).filter(h=>h!==null)},setCachedUsers:async u=>{if(!u||u.length===0)return;const d=uc(u,"id").filter(h=>h.id&&!e.value[h.id]).map(async h=>{await n(h.id,h),e.value[h.id]=!0});await Promise.all(d)},isUserCached:u=>!!e.value[u],clearCacheTracking:()=>{e.value={}}}},V7={placement:"bottom-start",theme:"light",trigger:"manual",interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,showArrow:!0,showOnInit:!1,alwaysShow:!1,debug:!1,content:void 0,useTrigger:!0,showOverlay:!1,overlayOpacity:.5,closeOnOverlayClick:!0,centered:!1};let jh=0,Oo=null;function B7(e){return Oo||(Oo=document.createElement("div"),Oo.className="popup-overlay",Oo.style.cssText=`
|
|
113
|
+
`+z:""),this.inner=z||null):typeof L=="object"&&(this.message="".concat(L.name," ").concat(L.message),this.inner=L):(this.message=N[y]||E,this.inner=null)}return g(A).from(re),m[y]=A,m},{});W.Syntax=SyntaxError,W.Type=TypeError,W.Range=RangeError;var fe=ze.reduce(function(m,y){return m[y+"Error"]=W[y],m},{}),oe=mi.reduce(function(m,y){return["Syntax","Type","Range"].indexOf(y)===-1&&(m[y+"Error"]=W[y]),m},{});function Ie(){}function G(m){return m}function Z(m,y){return m==null||m===G?y:function(E){return y(m(E))}}function de(m,y){return function(){m.apply(this,arguments),y.apply(this,arguments)}}function ke(m,y){return m===Ie?y:function(){var E=m.apply(this,arguments);E!==void 0&&(arguments[0]=E);var A=this.onsuccess,L=this.onerror;this.onsuccess=null,this.onerror=null;var z=y.apply(this,arguments);return A&&(this.onsuccess=this.onsuccess?de(A,this.onsuccess):A),L&&(this.onerror=this.onerror?de(L,this.onerror):L),z!==void 0?z:E}}function Pe(m,y){return m===Ie?y:function(){m.apply(this,arguments);var E=this.onsuccess,A=this.onerror;this.onsuccess=this.onerror=null,y.apply(this,arguments),E&&(this.onsuccess=this.onsuccess?de(E,this.onsuccess):E),A&&(this.onerror=this.onerror?de(A,this.onerror):A)}}function Le(m,y){return m===Ie?y:function(E){var A=m.apply(this,arguments);l(E,A);var L=this.onsuccess,z=this.onerror;return this.onsuccess=null,this.onerror=null,E=y.apply(this,arguments),L&&(this.onsuccess=this.onsuccess?de(L,this.onsuccess):L),z&&(this.onerror=this.onerror?de(z,this.onerror):z),A===void 0?E===void 0?void 0:E:l(A,E)}}function ye(m,y){return m===Ie?y:function(){return y.apply(this,arguments)!==!1&&m.apply(this,arguments)}}function M(m,y){return m===Ie?y:function(){var E=m.apply(this,arguments);if(E&&typeof E.then=="function"){for(var A=this,L=arguments.length,z=new Array(L);L--;)z[L]=arguments[L];return E.then(function(){return y.apply(A,z)})}return y.apply(this,arguments)}}oe.ModifyError=ie,oe.DexieError=V,oe.BulkError=pe;var H=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function le(m){H=m}var Ge={},we=100,wa=typeof Promise>"u"?[]:function(){var m=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[m,u(m),m];var y=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[y,u(y),m]}(),ze=wa[0],mi=wa[1],wa=wa[2],mi=mi&&mi.then,Ue=ze&&ze.constructor,Se=!!wa,Ve=function(m,y){yt.push([m,y]),At&&(queueMicrotask(Ir),At=!1)},pt=!0,At=!0,Ut=[],Jt=[],zt=G,Ne={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ie,pgp:!1,env:{},finalize:Ie},je=Ne,yt=[],Ot=0,Wt=[];function st(m){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var y=this._PSD=je;if(typeof m!="function"){if(m!==Ge)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&pl(this,this._value))}this._state=null,this._value=null,++y.ref,function E(A,L){try{L(function(z){if(A._state===null){if(z===A)throw new TypeError("A promise cannot be resolved with itself.");var se=A._lib&&xr();z&&typeof z.then=="function"?E(A,function(ue,Ce){z instanceof st?z._then(ue,Ce):z.then(ue,Ce)}):(A._state=!0,A._value=z,wo(A)),se&&pi()}},pl.bind(null,A))}catch(z){pl(A,z)}}(this,m)}var ps={get:function(){var m=je,y=Od;function E(A,L){var z=this,se=!m.global&&(m!==je||y!==Od),ue=se&&!jt(),Ce=new st(function(_e,Te){va(z,new Ui(Pr(A,m,se,ue),Pr(L,m,se,ue),_e,Te,m))});return this._consoleTask&&(Ce._consoleTask=this._consoleTask),Ce}return E.prototype=Ge,E},set:function(m){p(this,"then",m&&m.prototype===Ge?ps:{get:function(){return m},set:ps.set})}};function Ui(m,y,E,A,L){this.onFulfilled=typeof m=="function"?m:null,this.onRejected=typeof y=="function"?y:null,this.resolve=E,this.reject=A,this.psd=L}function pl(m,y){var E,A;Jt.push(y),m._state===null&&(E=m._lib&&xr(),y=zt(y),m._state=!1,m._value=y,A=m,Ut.some(function(L){return L._value===A._value})||Ut.push(A),wo(m),E&&pi())}function wo(m){var y=m._listeners;m._listeners=[];for(var E=0,A=y.length;E<A;++E)va(m,y[E]);var L=m._PSD;--L.ref||L.finalize(),Ot===0&&(++Ot,Ve(function(){--Ot==0&&Fr()},[]))}function va(m,y){if(m._state!==null){var E=m._state?y.onFulfilled:y.onRejected;if(E===null)return(m._state?y.resolve:y.reject)(m._value);++y.psd.ref,++Ot,Ve(gl,[E,m,y])}else m._listeners.push(y)}function gl(m,y,E){try{var A,L=y._value;!y._state&&Jt.length&&(Jt=[]),A=H&&y._consoleTask?y._consoleTask.run(function(){return m(L)}):m(L),y._state||Jt.indexOf(L)!==-1||function(z){for(var se=Ut.length;se;)if(Ut[--se]._value===z._value)return Ut.splice(se,1)}(y),E.resolve(A)}catch(z){E.reject(z)}finally{--Ot==0&&Fr(),--E.psd.ref||E.psd.finalize()}}function Ir(){Co(Ne,function(){xr()&&pi()})}function xr(){var m=pt;return At=pt=!1,m}function pi(){var m,y,E;do for(;0<yt.length;)for(m=yt,yt=[],E=m.length,y=0;y<E;++y){var A=m[y];A[0].apply(null,A[1])}while(0<yt.length);At=pt=!0}function Fr(){var m=Ut;Ut=[],m.forEach(function(A){A._PSD.onunhandled.call(null,A._value,A)});for(var y=Wt.slice(0),E=y.length;E;)y[--E]()}function Au(m){return new st(Ge,!1,m)}function kn(m,y){var E=je;return function(){var A=xr(),L=je;try{return js(E,!0),m.apply(this,arguments)}catch(z){y&&y(z)}finally{js(L,!1),A&&pi()}}}h(st.prototype,{then:ps,_then:function(m,y){va(this,new Ui(null,null,m,y,je))},catch:function(m){if(arguments.length===1)return this.then(null,m);var y=m,E=arguments[1];return typeof y=="function"?this.then(null,function(A){return(A instanceof y?E:Au)(A)}):this.then(null,function(A){return(A&&A.name===y?E:Au)(A)})},finally:function(m){return this.then(function(y){return st.resolve(m()).then(function(){return y})},function(y){return st.resolve(m()).then(function(){return Au(y)})})},timeout:function(m,y){var E=this;return m<1/0?new st(function(A,L){var z=setTimeout(function(){return L(new W.Timeout(y))},m);E.then(A,L).finally(clearTimeout.bind(null,z))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&p(st.prototype,Symbol.toStringTag,"Dexie.Promise"),Ne.env=ku(),h(st,{all:function(){var m=ve.apply(null,arguments).map(sn);return new st(function(y,E){m.length===0&&y([]);var A=m.length;m.forEach(function(L,z){return st.resolve(L).then(function(se){m[z]=se,--A||y(m)},E)})})},resolve:function(m){return m instanceof st?m:m&&typeof m.then=="function"?new st(function(y,E){m.then(y,E)}):new st(Ge,!0,m)},reject:Au,race:function(){var m=ve.apply(null,arguments).map(sn);return new st(function(y,E){m.map(function(A){return st.resolve(A).then(y,E)})})},PSD:{get:function(){return je},set:function(m){return je=m}},totalEchoes:{get:function(){return Od}},newPSD:Ae,usePSD:Co,scheduler:{get:function(){return Ve},set:function(m){Ve=m}},rejectionMapper:{get:function(){return zt},set:function(m){zt=m}},follow:function(m,y){return new st(function(E,A){return Ae(function(L,z){var se=je;se.unhandleds=[],se.onunhandled=z,se.finalize=de(function(){var ue,Ce=this;ue=function(){Ce.unhandleds.length===0?L():z(Ce.unhandleds[0])},Wt.push(function _e(){ue(),Wt.splice(Wt.indexOf(_e),1)}),++Ot,Ve(function(){--Ot==0&&Fr()},[])},se.finalize),m()},y,E,A)})}}),Ue&&(Ue.allSettled&&p(st,"allSettled",function(){var m=ve.apply(null,arguments).map(sn);return new st(function(y){m.length===0&&y([]);var E=m.length,A=new Array(E);m.forEach(function(L,z){return st.resolve(L).then(function(se){return A[z]={status:"fulfilled",value:se}},function(se){return A[z]={status:"rejected",reason:se}}).then(function(){return--E||y(A)})})})}),Ue.any&&typeof AggregateError<"u"&&p(st,"any",function(){var m=ve.apply(null,arguments).map(sn);return new st(function(y,E){m.length===0&&E(new AggregateError([]));var A=m.length,L=new Array(A);m.forEach(function(z,se){return st.resolve(z).then(function(ue){return y(ue)},function(ue){L[se]=ue,--A||E(new AggregateError(L))})})})}),Ue.withResolvers&&(st.withResolvers=Ue.withResolvers));var gs={awaits:0,echoes:0,id:0},__=0,Ad=[],kd=0,Od=0,R_=0;function Ae(m,y,E,A){var L=je,z=Object.create(L);return z.parent=L,z.ref=0,z.global=!1,z.id=++R_,Ne.env,z.env=Se?{Promise:st,PromiseProp:{value:st,configurable:!0,writable:!0},all:st.all,race:st.race,allSettled:st.allSettled,any:st.any,resolve:st.resolve,reject:st.reject}:{},y&&l(z,y),++L.ref,z.finalize=function(){--this.parent.ref||this.parent.finalize()},A=Co(z,m,E,A),z.ref===0&&z.finalize(),A}function Ye(){return gs.id||(gs.id=++__),++gs.awaits,gs.echoes+=we,gs.id}function jt(){return!!gs.awaits&&(--gs.awaits==0&&(gs.id=0),gs.echoes=gs.awaits*we,!0)}function sn(m){return gs.echoes&&m&&m.constructor===Ue?(Ye(),m.then(function(y){return jt(),y},function(y){return jt(),Kn(y)})):m}function Wi(){var m=Ad[Ad.length-1];Ad.pop(),js(m,!1)}function js(m,y){var E,A=je;(y?!gs.echoes||kd++&&m===je:!kd||--kd&&m===je)||queueMicrotask(y?(function(L){++Od,gs.echoes&&--gs.echoes!=0||(gs.echoes=gs.awaits=gs.id=0),Ad.push(je),js(L,!0)}).bind(null,m):Wi),m!==je&&(je=m,A===Ne&&(Ne.env=ku()),Se&&(E=Ne.env.Promise,y=m.env,(A.global||m.global)&&(Object.defineProperty(i,"Promise",y.PromiseProp),E.all=y.all,E.race=y.race,E.resolve=y.resolve,E.reject=y.reject,y.allSettled&&(E.allSettled=y.allSettled),y.any&&(E.any=y.any))))}function ku(){var m=i.Promise;return Se?{Promise:m,PromiseProp:Object.getOwnPropertyDescriptor(i,"Promise"),all:m.all,race:m.race,allSettled:m.allSettled,any:m.any,resolve:m.resolve,reject:m.reject}:{}}function Co(m,y,E,A,L){var z=je;try{return js(m,!0),y(E,A,L)}finally{js(z,!1)}}function Pr(m,y,E,A){return typeof m!="function"?m:function(){var L=je;E&&Ye(),js(y,!0);try{return m.apply(this,arguments)}finally{js(L,!1),A&&queueMicrotask(jt)}}}function Fy(m){Promise===Ue&&gs.echoes===0?kd===0?m():enqueueNativeMicroTask(m):setTimeout(m,0)}(""+mi).indexOf("[native code]")===-1&&(Ye=jt=Ie);var Kn=st.reject,ya="",gi="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Ou="String expected.",Md=[],Py="__dbnames",D_="readonly",T_="readwrite";function Mu(m,y){return m?y?function(){return m.apply(this,arguments)&&y.apply(this,arguments)}:m:y}var VB={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Ay(m){return typeof m!="string"||/\./.test(m)?function(y){return y}:function(y){return y[m]===void 0&&m in y&&delete(y=k(y))[m],y}}function BB(){throw W.Type()}function ln(m,y){try{var E=$B(m),A=$B(y);if(E!==A)return E==="Array"?1:A==="Array"?-1:E==="binary"?1:A==="binary"?-1:E==="string"?1:A==="string"?-1:E==="Date"?1:A!=="Date"?NaN:-1;switch(E){case"number":case"Date":case"string":return y<m?1:m<y?-1:0;case"binary":return function(L,z){for(var se=L.length,ue=z.length,Ce=se<ue?se:ue,_e=0;_e<Ce;++_e)if(L[_e]!==z[_e])return L[_e]<z[_e]?-1:1;return se===ue?0:se<ue?-1:1}(HB(m),HB(y));case"Array":return function(L,z){for(var se=L.length,ue=z.length,Ce=se<ue?se:ue,_e=0;_e<Ce;++_e){var Te=ln(L[_e],z[_e]);if(Te!==0)return Te}return se===ue?0:se<ue?-1:1}(m,y)}}catch{}return NaN}function $B(m){var y=typeof m;return y!="object"?y:ArrayBuffer.isView(m)?"binary":(m=$(m),m==="ArrayBuffer"?"binary":m)}function HB(m){return m instanceof Uint8Array?m:ArrayBuffer.isView(m)?new Uint8Array(m.buffer,m.byteOffset,m.byteLength):new Uint8Array(m)}var GB=($n.prototype._trans=function(m,y,E){var A=this._tx||je.trans,L=this.name,z=H&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(m==="readonly"?"read":"write"," ").concat(this.name));function se(_e,Te,he){if(!he.schema[L])throw new W.NotFound("Table "+L+" not part of transaction");return y(he.idbtrans,he)}var ue=xr();try{var Ce=A&&A.db._novip===this.db._novip?A===je.trans?A._promise(m,se,E):Ae(function(){return A._promise(m,se,E)},{trans:A,transless:je.transless||je}):function _e(Te,he,Fe,be){if(Te.idbdb&&(Te._state.openComplete||je.letThrough||Te._vip)){var De=Te._createTransaction(he,Fe,Te._dbSchema);try{De.create(),Te._state.PR1398_maxLoop=3}catch(xe){return xe.name===ae.InvalidState&&Te.isOpen()&&0<--Te._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),Te.close({disableAutoOpen:!1}),Te.open().then(function(){return _e(Te,he,Fe,be)})):Kn(xe)}return De._promise(he,function(xe,Re){return Ae(function(){return je.trans=De,be(xe,Re,De)})}).then(function(xe){if(he==="readwrite")try{De.idbtrans.commit()}catch{}return he==="readonly"?xe:De._completion.then(function(){return xe})})}if(Te._state.openComplete)return Kn(new W.DatabaseClosed(Te._state.dbOpenError));if(!Te._state.isBeingOpened){if(!Te._state.autoOpen)return Kn(new W.DatabaseClosed);Te.open().catch(Ie)}return Te._state.dbReadyPromise.then(function(){return _e(Te,he,Fe,be)})}(this.db,m,[this.name],se);return z&&(Ce._consoleTask=z,Ce=Ce.catch(function(_e){return console.trace(_e),Kn(_e)})),Ce}finally{ue&&pi()}},$n.prototype.get=function(m,y){var E=this;return m&&m.constructor===Object?this.where(m).first(y):m==null?Kn(new W.Type("Invalid argument to Table.get()")):this._trans("readonly",function(A){return E.core.get({trans:A,key:m}).then(function(L){return E.hook.reading.fire(L)})}).then(y)},$n.prototype.where=function(m){if(typeof m=="string")return new this.db.WhereClause(this,m);if(a(m))return new this.db.WhereClause(this,"[".concat(m.join("+"),"]"));var y=r(m);if(y.length===1)return this.where(y[0]).equals(m[y[0]]);var E=this.schema.indexes.concat(this.schema.primKey).filter(function(ue){if(ue.compound&&y.every(function(_e){return 0<=ue.keyPath.indexOf(_e)})){for(var Ce=0;Ce<y.length;++Ce)if(y.indexOf(ue.keyPath[Ce])===-1)return!1;return!0}return!1}).sort(function(ue,Ce){return ue.keyPath.length-Ce.keyPath.length})[0];if(E&&this.db._maxKey!==ya){var z=E.keyPath.slice(0,y.length);return this.where(z).equals(z.map(function(Ce){return m[Ce]}))}!E&&H&&console.warn("The query ".concat(JSON.stringify(m)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(y.join("+"),"]"));var A=this.schema.idxByName;function L(ue,Ce){return ln(ue,Ce)===0}var se=y.reduce(function(he,Ce){var _e=he[0],Te=he[1],he=A[Ce],Fe=m[Ce];return[_e||he,_e||!he?Mu(Te,he&&he.multi?function(be){return be=R(be,Ce),a(be)&&be.some(function(De){return L(Fe,De)})}:function(be){return L(Fe,R(be,Ce))}):Te]},[null,null]),z=se[0],se=se[1];return z?this.where(z.name).equals(m[z.keyPath]).filter(se):E?this.filter(se):this.where(y).equals("")},$n.prototype.filter=function(m){return this.toCollection().and(m)},$n.prototype.count=function(m){return this.toCollection().count(m)},$n.prototype.offset=function(m){return this.toCollection().offset(m)},$n.prototype.limit=function(m){return this.toCollection().limit(m)},$n.prototype.each=function(m){return this.toCollection().each(m)},$n.prototype.toArray=function(m){return this.toCollection().toArray(m)},$n.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},$n.prototype.orderBy=function(m){return new this.db.Collection(new this.db.WhereClause(this,a(m)?"[".concat(m.join("+"),"]"):m))},$n.prototype.reverse=function(){return this.toCollection().reverse()},$n.prototype.mapToClass=function(m){var y,E=this.db,A=this.name;function L(){return y!==null&&y.apply(this,arguments)||this}(this.schema.mappedClass=m).prototype instanceof BB&&(function(Ce,_e){if(typeof _e!="function"&&_e!==null)throw new TypeError("Class extends value "+String(_e)+" is not a constructor or null");function Te(){this.constructor=Ce}n(Ce,_e),Ce.prototype=_e===null?Object.create(_e):(Te.prototype=_e.prototype,new Te)}(L,y=m),Object.defineProperty(L.prototype,"db",{get:function(){return E},enumerable:!1,configurable:!0}),L.prototype.table=function(){return A},m=L);for(var z=new Set,se=m.prototype;se;se=u(se))Object.getOwnPropertyNames(se).forEach(function(Ce){return z.add(Ce)});function ue(Ce){if(!Ce)return Ce;var _e,Te=Object.create(m.prototype);for(_e in Ce)if(!z.has(_e))try{Te[_e]=Ce[_e]}catch{}return Te}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=ue,this.hook("reading",ue),m},$n.prototype.defineClass=function(){return this.mapToClass(function(m){l(this,m)})},$n.prototype.add=function(m,y){var E=this,A=this.schema.primKey,L=A.auto,z=A.keyPath,se=m;return z&&L&&(se=Ay(z)(m)),this._trans("readwrite",function(ue){return E.core.mutate({trans:ue,type:"add",keys:y!=null?[y]:null,values:[se]})}).then(function(ue){return ue.numFailures?st.reject(ue.failures[0]):ue.lastResult}).then(function(ue){if(z)try{T(m,z,ue)}catch{}return ue})},$n.prototype.update=function(m,y){return typeof m!="object"||a(m)?this.where(":id").equals(m).modify(y):(m=R(m,this.schema.primKey.keyPath),m===void 0?Kn(new W.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(m).modify(y))},$n.prototype.put=function(m,y){var E=this,A=this.schema.primKey,L=A.auto,z=A.keyPath,se=m;return z&&L&&(se=Ay(z)(m)),this._trans("readwrite",function(ue){return E.core.mutate({trans:ue,type:"put",values:[se],keys:y!=null?[y]:null})}).then(function(ue){return ue.numFailures?st.reject(ue.failures[0]):ue.lastResult}).then(function(ue){if(z)try{T(m,z,ue)}catch{}return ue})},$n.prototype.delete=function(m){var y=this;return this._trans("readwrite",function(E){return y.core.mutate({trans:E,type:"delete",keys:[m]})}).then(function(E){return E.numFailures?st.reject(E.failures[0]):void 0})},$n.prototype.clear=function(){var m=this;return this._trans("readwrite",function(y){return m.core.mutate({trans:y,type:"deleteRange",range:VB})}).then(function(y){return y.numFailures?st.reject(y.failures[0]):void 0})},$n.prototype.bulkGet=function(m){var y=this;return this._trans("readonly",function(E){return y.core.getMany({keys:m,trans:E}).then(function(A){return A.map(function(L){return y.hook.reading.fire(L)})})})},$n.prototype.bulkAdd=function(m,y,E){var A=this,L=Array.isArray(y)?y:void 0,z=(E=E||(L?void 0:y))?E.allKeys:void 0;return this._trans("readwrite",function(se){var _e=A.schema.primKey,ue=_e.auto,_e=_e.keyPath;if(_e&&L)throw new W.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(L&&L.length!==m.length)throw new W.InvalidArgument("Arguments objects and keys must have the same length");var Ce=m.length,_e=_e&&ue?m.map(Ay(_e)):m;return A.core.mutate({trans:se,type:"add",keys:L,values:_e,wantResults:z}).then(function(De){var he=De.numFailures,Fe=De.results,be=De.lastResult,De=De.failures;if(he===0)return z?Fe:be;throw new pe("".concat(A.name,".bulkAdd(): ").concat(he," of ").concat(Ce," operations failed"),De)})})},$n.prototype.bulkPut=function(m,y,E){var A=this,L=Array.isArray(y)?y:void 0,z=(E=E||(L?void 0:y))?E.allKeys:void 0;return this._trans("readwrite",function(se){var _e=A.schema.primKey,ue=_e.auto,_e=_e.keyPath;if(_e&&L)throw new W.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(L&&L.length!==m.length)throw new W.InvalidArgument("Arguments objects and keys must have the same length");var Ce=m.length,_e=_e&&ue?m.map(Ay(_e)):m;return A.core.mutate({trans:se,type:"put",keys:L,values:_e,wantResults:z}).then(function(De){var he=De.numFailures,Fe=De.results,be=De.lastResult,De=De.failures;if(he===0)return z?Fe:be;throw new pe("".concat(A.name,".bulkPut(): ").concat(he," of ").concat(Ce," operations failed"),De)})})},$n.prototype.bulkUpdate=function(m){var y=this,E=this.core,A=m.map(function(se){return se.key}),L=m.map(function(se){return se.changes}),z=[];return this._trans("readwrite",function(se){return E.getMany({trans:se,keys:A,cache:"clone"}).then(function(ue){var Ce=[],_e=[];m.forEach(function(he,Fe){var be=he.key,De=he.changes,xe=ue[Fe];if(xe){for(var Re=0,Me=Object.keys(De);Re<Me.length;Re++){var $e=Me[Re],He=De[$e];if($e===y.schema.primKey.keyPath){if(ln(He,be)!==0)throw new W.Constraint("Cannot update primary key in bulkUpdate()")}else T(xe,$e,He)}z.push(Fe),Ce.push(be),_e.push(xe)}});var Te=Ce.length;return E.mutate({trans:se,type:"put",keys:Ce,values:_e,updates:{keys:A,changeSpecs:L}}).then(function(he){var Fe=he.numFailures,be=he.failures;if(Fe===0)return Te;for(var De=0,xe=Object.keys(be);De<xe.length;De++){var Re,Me=xe[De],$e=z[Number(Me)];$e!=null&&(Re=be[Me],delete be[Me],be[$e]=Re)}throw new pe("".concat(y.name,".bulkUpdate(): ").concat(Fe," of ").concat(Te," operations failed"),be)})})})},$n.prototype.bulkDelete=function(m){var y=this,E=m.length;return this._trans("readwrite",function(A){return y.core.mutate({trans:A,type:"delete",keys:m})}).then(function(se){var L=se.numFailures,z=se.lastResult,se=se.failures;if(L===0)return z;throw new pe("".concat(y.name,".bulkDelete(): ").concat(L," of ").concat(E," operations failed"),se)})},$n);function $n(){}function yp(m){function y(se,ue){if(ue){for(var Ce=arguments.length,_e=new Array(Ce-1);--Ce;)_e[Ce-1]=arguments[Ce];return E[se].subscribe.apply(null,_e),m}if(typeof se=="string")return E[se]}var E={};y.addEventType=z;for(var A=1,L=arguments.length;A<L;++A)z(arguments[A]);return y;function z(se,ue,Ce){if(typeof se!="object"){var _e;ue=ue||ye;var Te={subscribers:[],fire:Ce=Ce||Ie,subscribe:function(he){Te.subscribers.indexOf(he)===-1&&(Te.subscribers.push(he),Te.fire=ue(Te.fire,he))},unsubscribe:function(he){Te.subscribers=Te.subscribers.filter(function(Fe){return Fe!==he}),Te.fire=Te.subscribers.reduce(ue,Ce)}};return E[se]=y[se]=Te}r(_e=se).forEach(function(he){var Fe=_e[he];if(a(Fe))z(he,_e[he][0],_e[he][1]);else{if(Fe!=="asap")throw new W.InvalidArgument("Invalid event config");var be=z(he,G,function(){for(var De=arguments.length,xe=new Array(De);De--;)xe[De]=arguments[De];be.subscribers.forEach(function(Re){_(function(){Re.apply(null,xe)})})})}})}}function wp(m,y){return g(y).from({prototype:m}),y}function Nd(m,y){return!(m.filter||m.algorithm||m.or)&&(y?m.justLimit:!m.replayFilter)}function I_(m,y){m.filter=Mu(m.filter,y)}function x_(m,y,E){var A=m.replayFilter;m.replayFilter=A?function(){return Mu(A(),y())}:y,m.justLimit=E&&!A}function ky(m,y){if(m.isPrimKey)return y.primaryKey;var E=y.getIndexByKeyPath(m.index);if(!E)throw new W.Schema("KeyPath "+m.index+" on object store "+y.name+" is not indexed");return E}function UB(m,y,E){var A=ky(m,y.schema);return y.openCursor({trans:E,values:!m.keysOnly,reverse:m.dir==="prev",unique:!!m.unique,query:{index:A,range:m.range}})}function Oy(m,y,E,A){var L=m.replayFilter?Mu(m.filter,m.replayFilter()):m.filter;if(m.or){var z={},se=function(ue,Ce,_e){var Te,he;L&&!L(Ce,_e,function(Fe){return Ce.stop(Fe)},function(Fe){return Ce.fail(Fe)})||((he=""+(Te=Ce.primaryKey))=="[object ArrayBuffer]"&&(he=""+new Uint8Array(Te)),d(z,he)||(z[he]=!0,y(ue,Ce,_e)))};return Promise.all([m.or._iterate(se,E),WB(UB(m,A,E),m.algorithm,se,!m.keysOnly&&m.valueMapper)])}return WB(UB(m,A,E),Mu(m.algorithm,L),y,!m.keysOnly&&m.valueMapper)}function WB(m,y,E,A){var L=kn(A?function(z,se,ue){return E(A(z),se,ue)}:E);return m.then(function(z){if(z)return z.start(function(){var se=function(){return z.continue()};y&&!y(z,function(ue){return se=ue},function(ue){z.stop(ue),se=Ie},function(ue){z.fail(ue),se=Ie})||L(z.value,z,function(ue){return se=ue}),se()})})}var wa=Symbol(),Cp=(zB.prototype.execute=function(m){if(this.add!==void 0){var y=this.add;if(a(y))return o(o([],a(m)?m:[],!0),y).sort();if(typeof y=="number")return(Number(m)||0)+y;if(typeof y=="bigint")try{return BigInt(m)+y}catch{return BigInt(0)+y}throw new TypeError("Invalid term ".concat(y))}if(this.remove!==void 0){var E=this.remove;if(a(E))return a(m)?m.filter(function(A){return!E.includes(A)}).sort():[];if(typeof E=="number")return Number(m)-E;if(typeof E=="bigint")try{return BigInt(m)-E}catch{return BigInt(0)-E}throw new TypeError("Invalid subtrahend ".concat(E))}return y=(y=this.replacePrefix)===null||y===void 0?void 0:y[0],y&&typeof m=="string"&&m.startsWith(y)?this.replacePrefix[1]+m.substring(y.length):m},zB);function zB(m){Object.assign(this,m)}var sbe=(mn.prototype._read=function(m,y){var E=this._ctx;return E.error?E.table._trans(null,Kn.bind(null,E.error)):E.table._trans("readonly",m).then(y)},mn.prototype._write=function(m){var y=this._ctx;return y.error?y.table._trans(null,Kn.bind(null,y.error)):y.table._trans("readwrite",m,"locked")},mn.prototype._addAlgorithm=function(m){var y=this._ctx;y.algorithm=Mu(y.algorithm,m)},mn.prototype._iterate=function(m,y){return Oy(this._ctx,m,y,this._ctx.table.core)},mn.prototype.clone=function(m){var y=Object.create(this.constructor.prototype),E=Object.create(this._ctx);return m&&l(E,m),y._ctx=E,y},mn.prototype.raw=function(){return this._ctx.valueMapper=null,this},mn.prototype.each=function(m){var y=this._ctx;return this._read(function(E){return Oy(y,m,E,y.table.core)})},mn.prototype.count=function(m){var y=this;return this._read(function(E){var A=y._ctx,L=A.table.core;if(Nd(A,!0))return L.count({trans:E,query:{index:ky(A,L.schema),range:A.range}}).then(function(se){return Math.min(se,A.limit)});var z=0;return Oy(A,function(){return++z,!1},E,L).then(function(){return z})}).then(m)},mn.prototype.sortBy=function(m,y){var E=m.split(".").reverse(),A=E[0],L=E.length-1;function z(Ce,_e){return _e?z(Ce[E[_e]],_e-1):Ce[A]}var se=this._ctx.dir==="next"?1:-1;function ue(Ce,_e){return ln(z(Ce,L),z(_e,L))*se}return this.toArray(function(Ce){return Ce.sort(ue)}).then(y)},mn.prototype.toArray=function(m){var y=this;return this._read(function(E){var A=y._ctx;if(A.dir==="next"&&Nd(A,!0)&&0<A.limit){var L=A.valueMapper,z=ky(A,A.table.core.schema);return A.table.core.query({trans:E,limit:A.limit,values:!0,query:{index:z,range:A.range}}).then(function(ue){return ue=ue.result,L?ue.map(L):ue})}var se=[];return Oy(A,function(ue){return se.push(ue)},E,A.table.core).then(function(){return se})},m)},mn.prototype.offset=function(m){var y=this._ctx;return m<=0||(y.offset+=m,Nd(y)?x_(y,function(){var E=m;return function(A,L){return E===0||(E===1?--E:L(function(){A.advance(E),E=0}),!1)}}):x_(y,function(){var E=m;return function(){return--E<0}})),this},mn.prototype.limit=function(m){return this._ctx.limit=Math.min(this._ctx.limit,m),x_(this._ctx,function(){var y=m;return function(E,A,L){return--y<=0&&A(L),0<=y}},!0),this},mn.prototype.until=function(m,y){return I_(this._ctx,function(E,A,L){return!m(E.value)||(A(L),y)}),this},mn.prototype.first=function(m){return this.limit(1).toArray(function(y){return y[0]}).then(m)},mn.prototype.last=function(m){return this.reverse().first(m)},mn.prototype.filter=function(m){var y;return I_(this._ctx,function(E){return m(E.value)}),(y=this._ctx).isMatch=Mu(y.isMatch,m),this},mn.prototype.and=function(m){return this.filter(m)},mn.prototype.or=function(m){return new this.db.WhereClause(this._ctx.table,m,this)},mn.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},mn.prototype.desc=function(){return this.reverse()},mn.prototype.eachKey=function(m){var y=this._ctx;return y.keysOnly=!y.isMatch,this.each(function(E,A){m(A.key,A)})},mn.prototype.eachUniqueKey=function(m){return this._ctx.unique="unique",this.eachKey(m)},mn.prototype.eachPrimaryKey=function(m){var y=this._ctx;return y.keysOnly=!y.isMatch,this.each(function(E,A){m(A.primaryKey,A)})},mn.prototype.keys=function(m){var y=this._ctx;y.keysOnly=!y.isMatch;var E=[];return this.each(function(A,L){E.push(L.key)}).then(function(){return E}).then(m)},mn.prototype.primaryKeys=function(m){var y=this._ctx;if(y.dir==="next"&&Nd(y,!0)&&0<y.limit)return this._read(function(A){var L=ky(y,y.table.core.schema);return y.table.core.query({trans:A,values:!1,limit:y.limit,query:{index:L,range:y.range}})}).then(function(A){return A.result}).then(m);y.keysOnly=!y.isMatch;var E=[];return this.each(function(A,L){E.push(L.primaryKey)}).then(function(){return E}).then(m)},mn.prototype.uniqueKeys=function(m){return this._ctx.unique="unique",this.keys(m)},mn.prototype.firstKey=function(m){return this.limit(1).keys(function(y){return y[0]}).then(m)},mn.prototype.lastKey=function(m){return this.reverse().firstKey(m)},mn.prototype.distinct=function(){var m=this._ctx,m=m.index&&m.table.schema.idxByName[m.index];if(!m||!m.multi)return this;var y={};return I_(this._ctx,function(L){var A=L.primaryKey.toString(),L=d(y,A);return y[A]=!0,!L}),this},mn.prototype.modify=function(m){var y=this,E=this._ctx;return this._write(function(A){var L,z,se;se=typeof m=="function"?m:(L=r(m),z=L.length,function(Re){for(var Me=!1,$e=0;$e<z;++$e){var He=L[$e],Ze=m[He],ot=R(Re,He);Ze instanceof Cp?(T(Re,He,Ze.execute(ot)),Me=!0):ot!==Ze&&(T(Re,He,Ze),Me=!0)}return Me});var ue=E.table.core,he=ue.schema.primaryKey,Ce=he.outbound,_e=he.extractKey,Te=200,he=y.db._options.modifyChunkSize;he&&(Te=typeof he=="object"?he[ue.name]||he["*"]||200:he);function Fe(Re,He){var $e=He.failures,He=He.numFailures;De+=Re-He;for(var Ze=0,ot=r($e);Ze<ot.length;Ze++){var gt=ot[Ze];be.push($e[gt])}}var be=[],De=0,xe=[];return y.clone().primaryKeys().then(function(Re){function Me(He){var Ze=Math.min(Te,Re.length-He);return ue.getMany({trans:A,keys:Re.slice(He,He+Ze),cache:"immutable"}).then(function(ot){for(var gt=[],it=[],at=Ce?[]:null,St=[],ht=0;ht<Ze;++ht){var Rt=ot[ht],Zt={value:k(Rt),primKey:Re[He+ht]};se.call(Zt,Zt.value,Zt)!==!1&&(Zt.value==null?St.push(Re[He+ht]):Ce||ln(_e(Rt),_e(Zt.value))===0?(it.push(Zt.value),Ce&&at.push(Re[He+ht])):(St.push(Re[He+ht]),gt.push(Zt.value)))}return Promise.resolve(0<gt.length&&ue.mutate({trans:A,type:"add",values:gt}).then(function(on){for(var rn in on.failures)St.splice(parseInt(rn),1);Fe(gt.length,on)})).then(function(){return(0<it.length||$e&&typeof m=="object")&&ue.mutate({trans:A,type:"put",keys:at,values:it,criteria:$e,changeSpec:typeof m!="function"&&m,isAdditionalChunk:0<He}).then(function(on){return Fe(it.length,on)})}).then(function(){return(0<St.length||$e&&m===F_)&&ue.mutate({trans:A,type:"delete",keys:St,criteria:$e,isAdditionalChunk:0<He}).then(function(on){return Fe(St.length,on)})}).then(function(){return Re.length>He+Ze&&Me(He+Te)})})}var $e=Nd(E)&&E.limit===1/0&&(typeof m!="function"||m===F_)&&{index:E.index,range:E.range};return Me(0).then(function(){if(0<be.length)throw new ie("Error modifying one or more objects",be,De,xe);return Re.length})})})},mn.prototype.delete=function(){var m=this._ctx,y=m.range;return Nd(m)&&(m.isPrimKey||y.type===3)?this._write(function(E){var A=m.table.core.schema.primaryKey,L=y;return m.table.core.count({trans:E,query:{index:A,range:L}}).then(function(z){return m.table.core.mutate({trans:E,type:"deleteRange",range:L}).then(function(se){var ue=se.failures;if(se.lastResult,se.results,se=se.numFailures,se)throw new ie("Could not delete some values",Object.keys(ue).map(function(Ce){return ue[Ce]}),z-se);return z-se})})}):this.modify(F_)},mn);function mn(){}var F_=function(m,y){return y.value=null};function obe(m,y){return m<y?-1:m===y?0:1}function ibe(m,y){return y<m?-1:m===y?0:1}function Uo(m,y,E){return m=m instanceof KB?new m.Collection(m):m,m._ctx.error=new(E||TypeError)(y),m}function Ld(m){return new m.Collection(m,function(){return jB("")}).limit(0)}function My(m,y,E,A){var L,z,se,ue,Ce,_e,Te,he=E.length;if(!E.every(function(De){return typeof De=="string"}))return Uo(m,Ou);function Fe(De){L=De==="next"?function(Re){return Re.toUpperCase()}:function(Re){return Re.toLowerCase()},z=De==="next"?function(Re){return Re.toLowerCase()}:function(Re){return Re.toUpperCase()},se=De==="next"?obe:ibe;var xe=E.map(function(Re){return{lower:z(Re),upper:L(Re)}}).sort(function(Re,Me){return se(Re.lower,Me.lower)});ue=xe.map(function(Re){return Re.upper}),Ce=xe.map(function(Re){return Re.lower}),Te=(_e=De)==="next"?"":A}Fe("next"),m=new m.Collection(m,function(){return ml(ue[0],Ce[he-1]+A)}),m._ondirectionchange=function(De){Fe(De)};var be=0;return m._addAlgorithm(function(De,xe,Re){var Me=De.key;if(typeof Me!="string")return!1;var $e=z(Me);if(y($e,Ce,be))return!0;for(var He=null,Ze=be;Ze<he;++Ze){var ot=function(gt,it,at,St,ht,Rt){for(var Zt=Math.min(gt.length,St.length),on=-1,rn=0;rn<Zt;++rn){var Wo=it[rn];if(Wo!==St[rn])return ht(gt[rn],at[rn])<0?gt.substr(0,rn)+at[rn]+at.substr(rn+1):ht(gt[rn],St[rn])<0?gt.substr(0,rn)+St[rn]+at.substr(rn+1):0<=on?gt.substr(0,on)+it[on]+at.substr(on+1):null;ht(gt[rn],Wo)<0&&(on=rn)}return Zt<St.length&&Rt==="next"?gt+at.substr(gt.length):Zt<gt.length&&Rt==="prev"?gt.substr(0,at.length):on<0?null:gt.substr(0,on)+St[on]+at.substr(on+1)}(Me,$e,ue[Ze],Ce[Ze],se,_e);ot===null&&He===null?be=Ze+1:(He===null||0<se(He,ot))&&(He=ot)}return xe(He!==null?function(){De.continue(He+Te)}:Re),!1}),m}function ml(m,y,E,A){return{type:2,lower:m,upper:y,lowerOpen:E,upperOpen:A}}function jB(m){return{type:1,lower:m,upper:m}}var KB=(Object.defineProperty(Is.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),Is.prototype.between=function(m,y,E,A){E=E!==!1,A=A===!0;try{return 0<this._cmp(m,y)||this._cmp(m,y)===0&&(E||A)&&(!E||!A)?Ld(this):new this.Collection(this,function(){return ml(m,y,!E,!A)})}catch{return Uo(this,gi)}},Is.prototype.equals=function(m){return m==null?Uo(this,gi):new this.Collection(this,function(){return jB(m)})},Is.prototype.above=function(m){return m==null?Uo(this,gi):new this.Collection(this,function(){return ml(m,void 0,!0)})},Is.prototype.aboveOrEqual=function(m){return m==null?Uo(this,gi):new this.Collection(this,function(){return ml(m,void 0,!1)})},Is.prototype.below=function(m){return m==null?Uo(this,gi):new this.Collection(this,function(){return ml(void 0,m,!1,!0)})},Is.prototype.belowOrEqual=function(m){return m==null?Uo(this,gi):new this.Collection(this,function(){return ml(void 0,m)})},Is.prototype.startsWith=function(m){return typeof m!="string"?Uo(this,Ou):this.between(m,m+ya,!0,!0)},Is.prototype.startsWithIgnoreCase=function(m){return m===""?this.startsWith(m):My(this,function(y,E){return y.indexOf(E[0])===0},[m],ya)},Is.prototype.equalsIgnoreCase=function(m){return My(this,function(y,E){return y===E[0]},[m],"")},Is.prototype.anyOfIgnoreCase=function(){var m=ve.apply(X,arguments);return m.length===0?Ld(this):My(this,function(y,E){return E.indexOf(y)!==-1},m,"")},Is.prototype.startsWithAnyOfIgnoreCase=function(){var m=ve.apply(X,arguments);return m.length===0?Ld(this):My(this,function(y,E){return E.some(function(A){return y.indexOf(A)===0})},m,ya)},Is.prototype.anyOf=function(){var m=this,y=ve.apply(X,arguments),E=this._cmp;try{y.sort(E)}catch{return Uo(this,gi)}if(y.length===0)return Ld(this);var A=new this.Collection(this,function(){return ml(y[0],y[y.length-1])});A._ondirectionchange=function(z){E=z==="next"?m._ascending:m._descending,y.sort(E)};var L=0;return A._addAlgorithm(function(z,se,ue){for(var Ce=z.key;0<E(Ce,y[L]);)if(++L===y.length)return se(ue),!1;return E(Ce,y[L])===0||(se(function(){z.continue(y[L])}),!1)}),A},Is.prototype.notEqual=function(m){return this.inAnyRange([[-1/0,m],[m,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},Is.prototype.noneOf=function(){var m=ve.apply(X,arguments);if(m.length===0)return new this.Collection(this);try{m.sort(this._ascending)}catch{return Uo(this,gi)}var y=m.reduce(function(E,A){return E?E.concat([[E[E.length-1][1],A]]):[[-1/0,A]]},null);return y.push([m[m.length-1],this.db._maxKey]),this.inAnyRange(y,{includeLowers:!1,includeUppers:!1})},Is.prototype.inAnyRange=function(Me,y){var E=this,A=this._cmp,L=this._ascending,z=this._descending,se=this._min,ue=this._max;if(Me.length===0)return Ld(this);if(!Me.every(function($e){return $e[0]!==void 0&&$e[1]!==void 0&&L($e[0],$e[1])<=0}))return Uo(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",W.InvalidArgument);var Ce=!y||y.includeLowers!==!1,_e=y&&y.includeUppers===!0,Te,he=L;function Fe($e,He){return he($e[0],He[0])}try{(Te=Me.reduce(function($e,He){for(var Ze=0,ot=$e.length;Ze<ot;++Ze){var gt=$e[Ze];if(A(He[0],gt[1])<0&&0<A(He[1],gt[0])){gt[0]=se(gt[0],He[0]),gt[1]=ue(gt[1],He[1]);break}}return Ze===ot&&$e.push(He),$e},[])).sort(Fe)}catch{return Uo(this,gi)}var be=0,De=_e?function($e){return 0<L($e,Te[be][1])}:function($e){return 0<=L($e,Te[be][1])},xe=Ce?function($e){return 0<z($e,Te[be][0])}:function($e){return 0<=z($e,Te[be][0])},Re=De,Me=new this.Collection(this,function(){return ml(Te[0][0],Te[Te.length-1][1],!Ce,!_e)});return Me._ondirectionchange=function($e){he=$e==="next"?(Re=De,L):(Re=xe,z),Te.sort(Fe)},Me._addAlgorithm(function($e,He,Ze){for(var ot,gt=$e.key;Re(gt);)if(++be===Te.length)return He(Ze),!1;return!De(ot=gt)&&!xe(ot)||(E._cmp(gt,Te[be][1])===0||E._cmp(gt,Te[be][0])===0||He(function(){he===L?$e.continue(Te[be][0]):$e.continue(Te[be][1])}),!1)}),Me},Is.prototype.startsWithAnyOf=function(){var m=ve.apply(X,arguments);return m.every(function(y){return typeof y=="string"})?m.length===0?Ld(this):this.inAnyRange(m.map(function(y){return[y,y+ya]})):Uo(this,"startsWithAnyOf() only works with strings")},Is);function Is(){}function Ar(m){return kn(function(y){return bp(y),m(y.target.error),!1})}function bp(m){m.stopPropagation&&m.stopPropagation(),m.preventDefault&&m.preventDefault()}var Sp="storagemutated",P_="x-storagemutated-1",vl=yp(null,Sp),rbe=(kr.prototype._lock=function(){return w(!je.global),++this._reculock,this._reculock!==1||je.global||(je.lockOwnerFor=this),this},kr.prototype._unlock=function(){if(w(!je.global),--this._reculock==0)for(je.global||(je.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var m=this._blockedFuncs.shift();try{Co(m[1],m[0])}catch{}}return this},kr.prototype._locked=function(){return this._reculock&&je.lockOwnerFor!==this},kr.prototype.create=function(m){var y=this;if(!this.mode)return this;var E=this.db.idbdb,A=this.db._state.dbOpenError;if(w(!this.idbtrans),!m&&!E)switch(A&&A.name){case"DatabaseClosedError":throw new W.DatabaseClosed(A);case"MissingAPIError":throw new W.MissingAPI(A.message,A);default:throw new W.OpenFailed(A)}if(!this.active)throw new W.TransactionInactive;return w(this._completion._state===null),(m=this.idbtrans=m||(this.db.core||E).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=kn(function(L){bp(L),y._reject(m.error)}),m.onabort=kn(function(L){bp(L),y.active&&y._reject(new W.Abort(m.error)),y.active=!1,y.on("abort").fire(L)}),m.oncomplete=kn(function(){y.active=!1,y._resolve(),"mutatedParts"in m&&vl.storagemutated.fire(m.mutatedParts)}),this},kr.prototype._promise=function(m,y,E){var A=this;if(m==="readwrite"&&this.mode!=="readwrite")return Kn(new W.ReadOnly("Transaction is readonly"));if(!this.active)return Kn(new W.TransactionInactive);if(this._locked())return new st(function(z,se){A._blockedFuncs.push([function(){A._promise(m,y,E).then(z,se)},je])});if(E)return Ae(function(){var z=new st(function(se,ue){A._lock();var Ce=y(se,ue,A);Ce&&Ce.then&&Ce.then(se,ue)});return z.finally(function(){return A._unlock()}),z._lib=!0,z});var L=new st(function(z,se){var ue=y(z,se,A);ue&&ue.then&&ue.then(z,se)});return L._lib=!0,L},kr.prototype._root=function(){return this.parent?this.parent._root():this},kr.prototype.waitFor=function(m){var y,E=this._root(),A=st.resolve(m);E._waitingFor?E._waitingFor=E._waitingFor.then(function(){return A}):(E._waitingFor=A,E._waitingQueue=[],y=E.idbtrans.objectStore(E.storeNames[0]),function z(){for(++E._spinCount;E._waitingQueue.length;)E._waitingQueue.shift()();E._waitingFor&&(y.get(-1/0).onsuccess=z)}());var L=E._waitingFor;return new st(function(z,se){A.then(function(ue){return E._waitingQueue.push(kn(z.bind(null,ue)))},function(ue){return E._waitingQueue.push(kn(se.bind(null,ue)))}).finally(function(){E._waitingFor===L&&(E._waitingFor=null)})})},kr.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new W.Abort))},kr.prototype.table=function(m){var y=this._memoizedTables||(this._memoizedTables={});if(d(y,m))return y[m];var E=this.schema[m];if(!E)throw new W.NotFound("Table "+m+" not part of transaction");return E=new this.db.Table(m,E,this),E.core=this.db.core.table(m),y[m]=E},kr);function kr(){}function A_(m,y,E,A,L,z,se){return{name:m,keyPath:y,unique:E,multi:A,auto:L,compound:z,src:(E&&!se?"&":"")+(A?"*":"")+(L?"++":"")+qB(y)}}function qB(m){return typeof m=="string"?m:m?"["+[].join.call(m,"+")+"]":""}function k_(m,y,E){return{name:m,primKey:y,indexes:E,mappedClass:null,idxByName:(A=function(L){return[L.name,L]},E.reduce(function(L,z,se){return se=A(z,se),se&&(L[se[0]]=se[1]),L},{}))};var A}var Ep=function(m){try{return m.only([[]]),Ep=function(){return[[]]},[[]]}catch{return Ep=function(){return ya},ya}};function O_(m){return m==null?function(){}:typeof m=="string"?(y=m).split(".").length===1?function(E){return E[y]}:function(E){return R(E,y)}:function(E){return R(E,m)};var y}function YB(m){return[].slice.call(m)}var abe=0;function _p(m){return m==null?":id":typeof m=="string"?m:"[".concat(m.join("+"),"]")}function lbe(m,y,Ce){function A(Re){if(Re.type===3)return null;if(Re.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var be=Re.lower,De=Re.upper,xe=Re.lowerOpen,Re=Re.upperOpen;return be===void 0?De===void 0?null:y.upperBound(De,!!Re):De===void 0?y.lowerBound(be,!!xe):y.bound(be,De,!!xe,!!Re)}function L(Fe){var be,De=Fe.name;return{name:De,schema:Fe,mutate:function(xe){var Re=xe.trans,Me=xe.type,$e=xe.keys,He=xe.values,Ze=xe.range;return new Promise(function(ot,gt){ot=kn(ot);var it=Re.objectStore(De),at=it.keyPath==null,St=Me==="put"||Me==="add";if(!St&&Me!=="delete"&&Me!=="deleteRange")throw new Error("Invalid operation type: "+Me);var ht,Rt=($e||He||{length:1}).length;if($e&&He&&$e.length!==He.length)throw new Error("Given keys array must have same length as given values array.");if(Rt===0)return ot({numFailures:0,failures:{},results:[],lastResult:void 0});function Zt(oo){++Wo,bp(oo)}var on=[],rn=[],Wo=0;if(Me==="deleteRange"){if(Ze.type===4)return ot({numFailures:Wo,failures:rn,results:[],lastResult:void 0});Ze.type===3?on.push(ht=it.clear()):on.push(ht=it.delete(A(Ze)))}else{var at=St?at?[He,$e]:[He,null]:[$e,null],Kt=at[0],qs=at[1];if(St)for(var Ys=0;Ys<Rt;++Ys)on.push(ht=qs&&qs[Ys]!==void 0?it[Me](Kt[Ys],qs[Ys]):it[Me](Kt[Ys])),ht.onerror=Zt;else for(Ys=0;Ys<Rt;++Ys)on.push(ht=it[Me](Kt[Ys])),ht.onerror=Zt}function qy(oo){oo=oo.target.result,on.forEach(function(Vu,J_){return Vu.error!=null&&(rn[J_]=Vu.error)}),ot({numFailures:Wo,failures:rn,results:Me==="delete"?$e:on.map(function(Vu){return Vu.result}),lastResult:oo})}ht.onerror=function(oo){Zt(oo),qy(oo)},ht.onsuccess=qy})},getMany:function(xe){var Re=xe.trans,Me=xe.keys;return new Promise(function($e,He){$e=kn($e);for(var Ze,ot=Re.objectStore(De),gt=Me.length,it=new Array(gt),at=0,St=0,ht=function(on){on=on.target,it[on._pos]=on.result,++St===at&&$e(it)},Rt=Ar(He),Zt=0;Zt<gt;++Zt)Me[Zt]!=null&&((Ze=ot.get(Me[Zt]))._pos=Zt,Ze.onsuccess=ht,Ze.onerror=Rt,++at);at===0&&$e(it)})},get:function(xe){var Re=xe.trans,Me=xe.key;return new Promise(function($e,He){$e=kn($e);var Ze=Re.objectStore(De).get(Me);Ze.onsuccess=function(ot){return $e(ot.target.result)},Ze.onerror=Ar(He)})},query:(be=_e,function(xe){return new Promise(function(Re,Me){Re=kn(Re);var $e,He,Ze,at=xe.trans,ot=xe.values,gt=xe.limit,ht=xe.query,it=gt===1/0?void 0:gt,St=ht.index,ht=ht.range,at=at.objectStore(De),St=St.isPrimaryKey?at:at.index(St.name),ht=A(ht);if(gt===0)return Re({result:[]});be?((it=ot?St.getAll(ht,it):St.getAllKeys(ht,it)).onsuccess=function(Rt){return Re({result:Rt.target.result})},it.onerror=Ar(Me)):($e=0,He=!ot&&"openKeyCursor"in St?St.openKeyCursor(ht):St.openCursor(ht),Ze=[],He.onsuccess=function(Rt){var Zt=He.result;return Zt?(Ze.push(ot?Zt.value:Zt.primaryKey),++$e===gt?Re({result:Ze}):void Zt.continue()):Re({result:Ze})},He.onerror=Ar(Me))})}),openCursor:function(xe){var Re=xe.trans,Me=xe.values,$e=xe.query,He=xe.reverse,Ze=xe.unique;return new Promise(function(ot,gt){ot=kn(ot);var St=$e.index,it=$e.range,at=Re.objectStore(De),at=St.isPrimaryKey?at:at.index(St.name),St=He?Ze?"prevunique":"prev":Ze?"nextunique":"next",ht=!Me&&"openKeyCursor"in at?at.openKeyCursor(A(it),St):at.openCursor(A(it),St);ht.onerror=Ar(gt),ht.onsuccess=kn(function(Rt){var Zt,on,rn,Wo,Kt=ht.result;Kt?(Kt.___id=++abe,Kt.done=!1,Zt=Kt.continue.bind(Kt),on=(on=Kt.continuePrimaryKey)&&on.bind(Kt),rn=Kt.advance.bind(Kt),Wo=function(){throw new Error("Cursor not stopped")},Kt.trans=Re,Kt.stop=Kt.continue=Kt.continuePrimaryKey=Kt.advance=function(){throw new Error("Cursor not started")},Kt.fail=kn(gt),Kt.next=function(){var qs=this,Ys=1;return this.start(function(){return Ys--?qs.continue():qs.stop()}).then(function(){return qs})},Kt.start=function(qs){function Ys(){if(ht.result)try{qs()}catch(oo){Kt.fail(oo)}else Kt.done=!0,Kt.start=function(){throw new Error("Cursor behind last entry")},Kt.stop()}var qy=new Promise(function(oo,Vu){oo=kn(oo),ht.onerror=Ar(Vu),Kt.fail=Vu,Kt.stop=function(J_){Kt.stop=Kt.continue=Kt.continuePrimaryKey=Kt.advance=Wo,oo(J_)}});return ht.onsuccess=kn(function(oo){ht.onsuccess=Ys,Ys()}),Kt.continue=Zt,Kt.continuePrimaryKey=on,Kt.advance=rn,Ys(),qy},ot(Kt)):ot(null)},gt)})},count:function(xe){var Re=xe.query,Me=xe.trans,$e=Re.index,He=Re.range;return new Promise(function(Ze,ot){var gt=Me.objectStore(De),it=$e.isPrimaryKey?gt:gt.index($e.name),gt=A(He),it=gt?it.count(gt):it.count();it.onsuccess=kn(function(at){return Ze(at.target.result)}),it.onerror=Ar(ot)})}}}var z,se,ue,Te=(se=Ce,ue=YB((z=m).objectStoreNames),{schema:{name:z.name,tables:ue.map(function(Fe){return se.objectStore(Fe)}).map(function(Fe){var be=Fe.keyPath,Re=Fe.autoIncrement,De=a(be),xe={},Re={name:Fe.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:be==null,compound:De,keyPath:be,autoIncrement:Re,unique:!0,extractKey:O_(be)},indexes:YB(Fe.indexNames).map(function(Me){return Fe.index(Me)}).map(function(Ze){var $e=Ze.name,He=Ze.unique,ot=Ze.multiEntry,Ze=Ze.keyPath,ot={name:$e,compound:a(Ze),keyPath:Ze,unique:He,multiEntry:ot,extractKey:O_(Ze)};return xe[_p(Ze)]=ot}),getIndexByKeyPath:function(Me){return xe[_p(Me)]}};return xe[":id"]=Re.primaryKey,be!=null&&(xe[_p(be)]=Re.primaryKey),Re})},hasGetAll:0<ue.length&&"getAll"in se.objectStore(ue[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),Ce=Te.schema,_e=Te.hasGetAll,Te=Ce.tables.map(L),he={};return Te.forEach(function(Fe){return he[Fe.name]=Fe}),{stack:"dbcore",transaction:m.transaction.bind(m),table:function(Fe){if(!he[Fe])throw new Error("Table '".concat(Fe,"' not found"));return he[Fe]},MIN_KEY:-1/0,MAX_KEY:Ep(y),schema:Ce}}function ube(m,y,E,A){var L=E.IDBKeyRange;return E.indexedDB,{dbcore:(A=lbe(y,L,A),m.dbcore.reduce(function(z,se){return se=se.create,s(s({},z),se(z))},A))}}function Ny(m,A){var E=A.db,A=ube(m._middlewares,E,m._deps,A);m.core=A.dbcore,m.tables.forEach(function(L){var z=L.name;m.core.schema.tables.some(function(se){return se.name===z})&&(L.core=m.core.table(z),m[z]instanceof m.Table&&(m[z].core=L.core))})}function Ly(m,y,E,A){E.forEach(function(L){var z=A[L];y.forEach(function(se){var ue=function Ce(_e,Te){return v(_e,Te)||(_e=u(_e))&&Ce(_e,Te)}(se,L);(!ue||"value"in ue&&ue.value===void 0)&&(se===m.Transaction.prototype||se instanceof m.Transaction?p(se,L,{get:function(){return this.table(L)},set:function(Ce){f(this,L,{value:Ce,writable:!0,configurable:!0,enumerable:!0})}}):se[L]=new m.Table(L,z))})})}function M_(m,y){y.forEach(function(E){for(var A in E)E[A]instanceof m.Table&&delete E[A]})}function cbe(m,y){return m._cfg.version-y._cfg.version}function dbe(m,y,E,A){var L=m._dbSchema;E.objectStoreNames.contains("$meta")&&!L.$meta&&(L.$meta=k_("$meta",XB("")[0],[]),m._storeNames.push("$meta"));var z=m._createTransaction("readwrite",m._storeNames,L);z.create(E),z._completion.catch(A);var se=z._reject.bind(z),ue=je.transless||je;Ae(function(){return je.trans=z,je.transless=ue,y!==0?(Ny(m,E),_e=y,((Ce=z).storeNames.includes("$meta")?Ce.table("$meta").get("version").then(function(Te){return Te??_e}):st.resolve(_e)).then(function(Te){return Fe=Te,be=z,De=E,xe=[],Te=(he=m)._versions,Re=he._dbSchema=By(0,he.idbdb,De),(Te=Te.filter(function(Me){return Me._cfg.version>=Fe})).length!==0?(Te.forEach(function(Me){xe.push(function(){var $e=Re,He=Me._cfg.dbschema;$y(he,$e,De),$y(he,He,De),Re=he._dbSchema=He;var Ze=N_($e,He);Ze.add.forEach(function(St){L_(De,St[0],St[1].primKey,St[1].indexes)}),Ze.change.forEach(function(St){if(St.recreate)throw new W.Upgrade("Not yet support for changing primary key");var ht=De.objectStore(St.name);St.add.forEach(function(Rt){return Vy(ht,Rt)}),St.change.forEach(function(Rt){ht.deleteIndex(Rt.name),Vy(ht,Rt)}),St.del.forEach(function(Rt){return ht.deleteIndex(Rt)})});var ot=Me._cfg.contentUpgrade;if(ot&&Me._cfg.version>Fe){Ny(he,De),be._memoizedTables={};var gt=I(He);Ze.del.forEach(function(St){gt[St]=$e[St]}),M_(he,[he.Transaction.prototype]),Ly(he,[he.Transaction.prototype],r(gt),gt),be.schema=gt;var it,at=te(ot);return at&&Ye(),Ze=st.follow(function(){var St;(it=ot(be))&&at&&(St=jt.bind(null,null),it.then(St,St))}),it&&typeof it.then=="function"?st.resolve(it):Ze.then(function(){return it})}}),xe.push(function($e){var He,Ze,ot=Me._cfg.dbschema;He=ot,Ze=$e,[].slice.call(Ze.db.objectStoreNames).forEach(function(gt){return He[gt]==null&&Ze.db.deleteObjectStore(gt)}),M_(he,[he.Transaction.prototype]),Ly(he,[he.Transaction.prototype],he._storeNames,he._dbSchema),be.schema=he._dbSchema}),xe.push(function($e){he.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(he.idbdb.version/10)===Me._cfg.version?(he.idbdb.deleteObjectStore("$meta"),delete he._dbSchema.$meta,he._storeNames=he._storeNames.filter(function(He){return He!=="$meta"})):$e.objectStore("$meta").put(Me._cfg.version,"version"))})}),function Me(){return xe.length?st.resolve(xe.shift()(be.idbtrans)).then(Me):st.resolve()}().then(function(){ZB(Re,De)})):st.resolve();var he,Fe,be,De,xe,Re}).catch(se)):(r(L).forEach(function(Te){L_(E,Te,L[Te].primKey,L[Te].indexes)}),Ny(m,E),void st.follow(function(){return m.on.populate.fire(z)}).catch(se));var Ce,_e})}function hbe(m,y){ZB(m._dbSchema,y),y.db.version%10!=0||y.objectStoreNames.contains("$meta")||y.db.createObjectStore("$meta").add(Math.ceil(y.db.version/10-1),"version");var E=By(0,m.idbdb,y);$y(m,m._dbSchema,y);for(var A=0,L=N_(E,m._dbSchema).change;A<L.length;A++){var z=function(se){if(se.change.length||se.recreate)return console.warn("Unable to patch indexes of table ".concat(se.name," because it has changes on the type of index or primary key.")),{value:void 0};var ue=y.objectStore(se.name);se.add.forEach(function(Ce){H&&console.debug("Dexie upgrade patch: Creating missing index ".concat(se.name,".").concat(Ce.src)),Vy(ue,Ce)})}(L[A]);if(typeof z=="object")return z.value}}function N_(m,y){var E,A={del:[],add:[],change:[]};for(E in m)y[E]||A.del.push(E);for(E in y){var L=m[E],z=y[E];if(L){var se={name:E,def:z,recreate:!1,del:[],add:[],change:[]};if(""+(L.primKey.keyPath||"")!=""+(z.primKey.keyPath||"")||L.primKey.auto!==z.primKey.auto)se.recreate=!0,A.change.push(se);else{var ue=L.idxByName,Ce=z.idxByName,_e=void 0;for(_e in ue)Ce[_e]||se.del.push(_e);for(_e in Ce){var Te=ue[_e],he=Ce[_e];Te?Te.src!==he.src&&se.change.push(he):se.add.push(he)}(0<se.del.length||0<se.add.length||0<se.change.length)&&A.change.push(se)}}else A.add.push([E,z])}return A}function L_(m,y,E,A){var L=m.db.createObjectStore(y,E.keyPath?{keyPath:E.keyPath,autoIncrement:E.auto}:{autoIncrement:E.auto});return A.forEach(function(z){return Vy(L,z)}),L}function ZB(m,y){r(m).forEach(function(E){y.db.objectStoreNames.contains(E)||(H&&console.debug("Dexie: Creating missing table",E),L_(y,E,m[E].primKey,m[E].indexes))})}function Vy(m,y){m.createIndex(y.name,y.keyPath,{unique:y.unique,multiEntry:y.multi})}function By(m,y,E){var A={};return S(y.objectStoreNames,0).forEach(function(L){for(var z=E.objectStore(L),se=A_(qB(_e=z.keyPath),_e||"",!0,!1,!!z.autoIncrement,_e&&typeof _e!="string",!0),ue=[],Ce=0;Ce<z.indexNames.length;++Ce){var Te=z.index(z.indexNames[Ce]),_e=Te.keyPath,Te=A_(Te.name,_e,!!Te.unique,!!Te.multiEntry,!1,_e&&typeof _e!="string",!1);ue.push(Te)}A[L]=k_(L,se,ue)}),A}function $y(m,y,E){for(var A=E.db.objectStoreNames,L=0;L<A.length;++L){var z=A[L],se=E.objectStore(z);m._hasGetAll="getAll"in se;for(var ue=0;ue<se.indexNames.length;++ue){var Ce=se.indexNames[ue],_e=se.index(Ce).keyPath,Te=typeof _e=="string"?_e:"["+S(_e).join("+")+"]";!y[z]||(_e=y[z].idxByName[Te])&&(_e.name=Ce,delete y[z].idxByName[Te],y[z].idxByName[Ce]=_e)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&i.WorkerGlobalScope&&i instanceof i.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(m._hasGetAll=!1)}function XB(m){return m.split(",").map(function(y,E){var A=(y=y.trim()).replace(/([&*]|\+\+)/g,""),L=/^\[/.test(A)?A.match(/^\[(.*)\]$/)[1].split("+"):A;return A_(A,L||null,/\&/.test(y),/\*/.test(y),/\+\+/.test(y),a(L),E===0)})}var fbe=(Hy.prototype._parseStoresSpec=function(m,y){r(m).forEach(function(E){if(m[E]!==null){var A=XB(m[E]),L=A.shift();if(L.unique=!0,L.multi)throw new W.Schema("Primary key cannot be multi-valued");A.forEach(function(z){if(z.auto)throw new W.Schema("Only primary key can be marked as autoIncrement (++)");if(!z.keyPath)throw new W.Schema("Index must have a name and cannot be an empty string")}),y[E]=k_(E,L,A)}})},Hy.prototype.stores=function(E){var y=this.db;this._cfg.storesSource=this._cfg.storesSource?l(this._cfg.storesSource,E):E;var E=y._versions,A={},L={};return E.forEach(function(z){l(A,z._cfg.storesSource),L=z._cfg.dbschema={},z._parseStoresSpec(A,L)}),y._dbSchema=L,M_(y,[y._allTables,y,y.Transaction.prototype]),Ly(y,[y._allTables,y,y.Transaction.prototype,this._cfg.tables],r(L),L),y._storeNames=r(L),this},Hy.prototype.upgrade=function(m){return this._cfg.contentUpgrade=M(this._cfg.contentUpgrade||Ie,m),this},Hy);function Hy(){}function V_(m,y){var E=m._dbNamesDB;return E||(E=m._dbNamesDB=new Ca(Py,{addons:[],indexedDB:m,IDBKeyRange:y})).version(1).stores({dbnames:"name"}),E.table("dbnames")}function B_(m){return m&&typeof m.databases=="function"}function $_(m){return Ae(function(){return je.letThrough=!0,m()})}function H_(m){return!("from"in m)}var Ks=function(m,y){if(!this){var E=new Ks;return m&&"d"in m&&l(E,m),E}l(this,arguments.length?{d:1,from:m,to:1<arguments.length?y:m}:{d:0})};function Rp(m,y,E){var A=ln(y,E);if(!isNaN(A)){if(0<A)throw RangeError();if(H_(m))return l(m,{from:y,to:E,d:1});var L=m.l,A=m.r;if(ln(E,m.from)<0)return L?Rp(L,y,E):m.l={from:y,to:E,d:1,l:null,r:null},QB(m);if(0<ln(y,m.to))return A?Rp(A,y,E):m.r={from:y,to:E,d:1,l:null,r:null},QB(m);ln(y,m.from)<0&&(m.from=y,m.l=null,m.d=A?A.d+1:1),0<ln(E,m.to)&&(m.to=E,m.r=null,m.d=m.l?m.l.d+1:1),E=!m.r,L&&!m.l&&Dp(m,L),A&&E&&Dp(m,A)}}function Dp(m,y){H_(y)||function E(A,Ce){var z=Ce.from,se=Ce.to,ue=Ce.l,Ce=Ce.r;Rp(A,z,se),ue&&E(A,ue),Ce&&E(A,Ce)}(m,y)}function JB(m,y){var E=Gy(y),A=E.next();if(A.done)return!1;for(var L=A.value,z=Gy(m),se=z.next(L.from),ue=se.value;!A.done&&!se.done;){if(ln(ue.from,L.to)<=0&&0<=ln(ue.to,L.from))return!0;ln(L.from,ue.from)<0?L=(A=E.next(ue.from)).value:ue=(se=z.next(L.from)).value}return!1}function Gy(m){var y=H_(m)?null:{s:0,n:m};return{next:function(E){for(var A=0<arguments.length;y;)switch(y.s){case 0:if(y.s=1,A)for(;y.n.l&&ln(E,y.n.from)<0;)y={up:y,n:y.n.l,s:1};else for(;y.n.l;)y={up:y,n:y.n.l,s:1};case 1:if(y.s=2,!A||ln(E,y.n.to)<=0)return{value:y.n,done:!1};case 2:if(y.n.r){y.s=3,y={up:y,n:y.n.r,s:0};continue}case 3:y=y.up}return{done:!0}}}}function QB(m){var y,E,A=(((y=m.r)===null||y===void 0?void 0:y.d)||0)-(((E=m.l)===null||E===void 0?void 0:E.d)||0),L=1<A?"r":A<-1?"l":"";L&&(y=L=="r"?"l":"r",E=s({},m),A=m[L],m.from=A.from,m.to=A.to,m[L]=A[L],E[L]=A[y],(m[y]=E).d=e$(E)),m.d=e$(m)}function e$(E){var y=E.r,E=E.l;return(y?E?Math.max(y.d,E.d):y.d:E?E.d:0)+1}function Uy(m,y){return r(y).forEach(function(E){m[E]?Dp(m[E],y[E]):m[E]=function A(L){var z,se,ue={};for(z in L)d(L,z)&&(se=L[z],ue[z]=!se||typeof se!="object"||D.has(se.constructor)?se:A(se));return ue}(y[E])}),m}function G_(m,y){return m.all||y.all||Object.keys(m).some(function(E){return y[E]&&JB(y[E],m[E])})}h(Ks.prototype,((mi={add:function(m){return Dp(this,m),this},addKey:function(m){return Rp(this,m,m),this},addKeys:function(m){var y=this;return m.forEach(function(E){return Rp(y,E,E)}),this},hasKey:function(m){var y=Gy(this).next(m).value;return y&&ln(y.from,m)<=0&&0<=ln(y.to,m)}})[q]=function(){return Gy(this)},mi));var Nu={},U_={},W_=!1;function Wy(m){Uy(U_,m),W_||(W_=!0,setTimeout(function(){W_=!1,z_(U_,!(U_={}))},0))}function z_(m,y){y===void 0&&(y=!1);var E=new Set;if(m.all)for(var A=0,L=Object.values(Nu);A<L.length;A++)t$(se=L[A],m,E,y);else for(var z in m){var se,ue=/^idb\:\/\/(.*)\/(.*)\//.exec(z);ue&&(z=ue[1],ue=ue[2],(se=Nu["idb://".concat(z,"/").concat(ue)])&&t$(se,m,E,y))}E.forEach(function(Ce){return Ce()})}function t$(m,y,E,A){for(var L=[],z=0,se=Object.entries(m.queries.query);z<se.length;z++){for(var ue=se[z],Ce=ue[0],_e=[],Te=0,he=ue[1];Te<he.length;Te++){var Fe=he[Te];G_(y,Fe.obsSet)?Fe.subscribers.forEach(function(Re){return E.add(Re)}):A&&_e.push(Fe)}A&&L.push([Ce,_e])}if(A)for(var be=0,De=L;be<De.length;be++){var xe=De[be],Ce=xe[0],_e=xe[1];m.queries.query[Ce]=_e}}function pbe(m){var y=m._state,E=m._deps.indexedDB;if(y.isBeingOpened||m.idbdb)return y.dbReadyPromise.then(function(){return y.dbOpenError?Kn(y.dbOpenError):m});y.isBeingOpened=!0,y.dbOpenError=null,y.openComplete=!1;var A=y.openCanceller,L=Math.round(10*m.verno),z=!1;function se(){if(y.openCanceller!==A)throw new W.DatabaseClosed("db.open() was cancelled")}function ue(){return new st(function(Fe,be){if(se(),!E)throw new W.MissingAPI;var De=m.name,xe=y.autoSchema||!L?E.open(De):E.open(De,L);if(!xe)throw new W.MissingAPI;xe.onerror=Ar(be),xe.onblocked=kn(m._fireOnBlocked),xe.onupgradeneeded=kn(function(Re){var Me;Te=xe.transaction,y.autoSchema&&!m._options.allowEmptyDB?(xe.onerror=bp,Te.abort(),xe.result.close(),(Me=E.deleteDatabase(De)).onsuccess=Me.onerror=kn(function(){be(new W.NoSuchDatabase("Database ".concat(De," doesnt exist")))})):(Te.onerror=Ar(be),Re=Re.oldVersion>Math.pow(2,62)?0:Re.oldVersion,he=Re<1,m.idbdb=xe.result,z&&hbe(m,Te),dbe(m,Re/10,Te,be))},be),xe.onsuccess=kn(function(){Te=null;var Re,Me,$e,He,Ze,ot=m.idbdb=xe.result,gt=S(ot.objectStoreNames);if(0<gt.length)try{var it=ot.transaction((He=gt).length===1?He[0]:He,"readonly");if(y.autoSchema)Me=ot,$e=it,(Re=m).verno=Me.version/10,$e=Re._dbSchema=By(0,Me,$e),Re._storeNames=S(Me.objectStoreNames,0),Ly(Re,[Re._allTables],r($e),$e);else if($y(m,m._dbSchema,it),((Ze=N_(By(0,(Ze=m).idbdb,it),Ze._dbSchema)).add.length||Ze.change.some(function(at){return at.add.length||at.change.length}))&&!z)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),ot.close(),L=ot.version+1,z=!0,Fe(ue());Ny(m,it)}catch{}Md.push(m),ot.onversionchange=kn(function(at){y.vcFired=!0,m.on("versionchange").fire(at)}),ot.onclose=kn(function(at){m.on("close").fire(at)}),he&&(Ze=m._deps,it=De,ot=Ze.indexedDB,Ze=Ze.IDBKeyRange,B_(ot)||it===Py||V_(ot,Ze).put({name:it}).catch(Ie)),Fe()},be)}).catch(function(Fe){switch(Fe==null?void 0:Fe.name){case"UnknownError":if(0<y.PR1398_maxLoop)return y.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),ue();break;case"VersionError":if(0<L)return L=0,ue()}return st.reject(Fe)})}var Ce,_e=y.dbReadyResolve,Te=null,he=!1;return st.race([A,(typeof navigator>"u"?st.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(Fe){function be(){return indexedDB.databases().finally(Fe)}Ce=setInterval(be,100),be()}).finally(function(){return clearInterval(Ce)}):Promise.resolve()).then(ue)]).then(function(){return se(),y.onReadyBeingFired=[],st.resolve($_(function(){return m.on.ready.fire(m.vip)})).then(function Fe(){if(0<y.onReadyBeingFired.length){var be=y.onReadyBeingFired.reduce(M,Ie);return y.onReadyBeingFired=[],st.resolve($_(function(){return be(m.vip)})).then(Fe)}})}).finally(function(){y.openCanceller===A&&(y.onReadyBeingFired=null,y.isBeingOpened=!1)}).catch(function(Fe){y.dbOpenError=Fe;try{Te&&Te.abort()}catch{}return A===y.openCanceller&&m._close(),Kn(Fe)}).finally(function(){y.openComplete=!0,_e()}).then(function(){var Fe;return he&&(Fe={},m.tables.forEach(function(be){be.schema.indexes.forEach(function(De){De.name&&(Fe["idb://".concat(m.name,"/").concat(be.name,"/").concat(De.name)]=new Ks(-1/0,[[[]]]))}),Fe["idb://".concat(m.name,"/").concat(be.name,"/")]=Fe["idb://".concat(m.name,"/").concat(be.name,"/:dels")]=new Ks(-1/0,[[[]]])}),vl(Sp).fire(Fe),z_(Fe,!0)),m})}function j_(m){function y(z){return m.next(z)}var E=L(y),A=L(function(z){return m.throw(z)});function L(z){return function(Ce){var ue=z(Ce),Ce=ue.value;return ue.done?Ce:Ce&&typeof Ce.then=="function"?Ce.then(E,A):a(Ce)?Promise.all(Ce).then(E,A):E(Ce)}}return L(y)()}function zy(m,y,E){for(var A=a(m)?m.slice():[m],L=0;L<E;++L)A.push(y);return A}var gbe={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(m){return s(s({},m),{table:function(y){var E=m.table(y),A=E.schema,L={},z=[];function se(he,Fe,be){var De=_p(he),xe=L[De]=L[De]||[],Re=he==null?0:typeof he=="string"?1:he.length,Me=0<Fe,Me=s(s({},be),{name:Me?"".concat(De,"(virtual-from:").concat(be.name,")"):be.name,lowLevelIndex:be,isVirtual:Me,keyTail:Fe,keyLength:Re,extractKey:O_(he),unique:!Me&&be.unique});return xe.push(Me),Me.isPrimaryKey||z.push(Me),1<Re&&se(Re===2?he[0]:he.slice(0,Re-1),Fe+1,be),xe.sort(function($e,He){return $e.keyTail-He.keyTail}),Me}y=se(A.primaryKey.keyPath,0,A.primaryKey),L[":id"]=[y];for(var ue=0,Ce=A.indexes;ue<Ce.length;ue++){var _e=Ce[ue];se(_e.keyPath,0,_e)}function Te(he){var Fe,be=he.query.index;return be.isVirtual?s(s({},he),{query:{index:be.lowLevelIndex,range:(Fe=he.query.range,be=be.keyTail,{type:Fe.type===1?2:Fe.type,lower:zy(Fe.lower,Fe.lowerOpen?m.MAX_KEY:m.MIN_KEY,be),lowerOpen:!0,upper:zy(Fe.upper,Fe.upperOpen?m.MIN_KEY:m.MAX_KEY,be),upperOpen:!0})}}):he}return s(s({},E),{schema:s(s({},A),{primaryKey:y,indexes:z,getIndexByKeyPath:function(he){return(he=L[_p(he)])&&he[0]}}),count:function(he){return E.count(Te(he))},query:function(he){return E.query(Te(he))},openCursor:function(he){var Fe=he.query.index,be=Fe.keyTail,De=Fe.isVirtual,xe=Fe.keyLength;return De?E.openCursor(Te(he)).then(function(Me){return Me&&Re(Me)}):E.openCursor(he);function Re(Me){return Object.create(Me,{continue:{value:function($e){$e!=null?Me.continue(zy($e,he.reverse?m.MAX_KEY:m.MIN_KEY,be)):he.unique?Me.continue(Me.key.slice(0,xe).concat(he.reverse?m.MIN_KEY:m.MAX_KEY,be)):Me.continue()}},continuePrimaryKey:{value:function($e,He){Me.continuePrimaryKey(zy($e,m.MAX_KEY,be),He)}},primaryKey:{get:function(){return Me.primaryKey}},key:{get:function(){var $e=Me.key;return xe===1?$e[0]:$e.slice(0,xe)}},value:{get:function(){return Me.value}}})}}})}})}};function K_(m,y,E,A){return E=E||{},A=A||"",r(m).forEach(function(L){var z,se,ue;d(y,L)?(z=m[L],se=y[L],typeof z=="object"&&typeof se=="object"&&z&&se?(ue=$(z))!==$(se)?E[A+L]=y[L]:ue==="Object"?K_(z,se,E,A+L+"."):z!==se&&(E[A+L]=y[L]):z!==se&&(E[A+L]=y[L])):E[A+L]=void 0}),r(y).forEach(function(L){d(m,L)||(E[A+L]=y[L])}),E}function q_(m,y){return y.type==="delete"?y.keys:y.keys||y.values.map(m.extractKey)}var mbe={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(m){return s(s({},m),{table:function(y){var E=m.table(y),A=E.schema.primaryKey;return s(s({},E),{mutate:function(L){var z=je.trans,se=z.table(y).hook,ue=se.deleting,Ce=se.creating,_e=se.updating;switch(L.type){case"add":if(Ce.fire===Ie)break;return z._promise("readwrite",function(){return Te(L)},!0);case"put":if(Ce.fire===Ie&&_e.fire===Ie)break;return z._promise("readwrite",function(){return Te(L)},!0);case"delete":if(ue.fire===Ie)break;return z._promise("readwrite",function(){return Te(L)},!0);case"deleteRange":if(ue.fire===Ie)break;return z._promise("readwrite",function(){return function he(Fe,be,De){return E.query({trans:Fe,values:!1,query:{index:A,range:be},limit:De}).then(function(xe){var Re=xe.result;return Te({type:"delete",keys:Re,trans:Fe}).then(function(Me){return 0<Me.numFailures?Promise.reject(Me.failures[0]):Re.length<De?{failures:[],numFailures:0,lastResult:void 0}:he(Fe,s(s({},be),{lower:Re[Re.length-1],lowerOpen:!0}),De)})})}(L.trans,L.range,1e4)},!0)}return E.mutate(L);function Te(he){var Fe,be,De,xe=je.trans,Re=he.keys||q_(A,he);if(!Re)throw new Error("Keys missing");return(he=he.type==="add"||he.type==="put"?s(s({},he),{keys:Re}):s({},he)).type!=="delete"&&(he.values=o([],he.values)),he.keys&&(he.keys=o([],he.keys)),Fe=E,De=Re,((be=he).type==="add"?Promise.resolve([]):Fe.getMany({trans:be.trans,keys:De,cache:"immutable"})).then(function(Me){var $e=Re.map(function(He,Ze){var ot,gt,it,at=Me[Ze],St={onerror:null,onsuccess:null};return he.type==="delete"?ue.fire.call(St,He,at,xe):he.type==="add"||at===void 0?(ot=Ce.fire.call(St,He,he.values[Ze],xe),He==null&&ot!=null&&(he.keys[Ze]=He=ot,A.outbound||T(he.values[Ze],A.keyPath,He))):(ot=K_(at,he.values[Ze]),(gt=_e.fire.call(St,ot,He,at,xe))&&(it=he.values[Ze],Object.keys(gt).forEach(function(ht){d(it,ht)?it[ht]=gt[ht]:T(it,ht,gt[ht])}))),St});return E.mutate(he).then(function(He){for(var Ze=He.failures,ot=He.results,gt=He.numFailures,He=He.lastResult,it=0;it<Re.length;++it){var at=(ot||Re)[it],St=$e[it];at==null?St.onerror&&St.onerror(Ze[it]):St.onsuccess&&St.onsuccess(he.type==="put"&&Me[it]?he.values[it]:at)}return{failures:Ze,results:ot,numFailures:gt,lastResult:He}}).catch(function(He){return $e.forEach(function(Ze){return Ze.onerror&&Ze.onerror(He)}),Promise.reject(He)})})}}})}})}};function n$(m,y,E){try{if(!y||y.keys.length<m.length)return null;for(var A=[],L=0,z=0;L<y.keys.length&&z<m.length;++L)ln(y.keys[L],m[z])===0&&(A.push(E?k(y.values[L]):y.values[L]),++z);return A.length===m.length?A:null}catch{return null}}var vbe={stack:"dbcore",level:-1,create:function(m){return{table:function(y){var E=m.table(y);return s(s({},E),{getMany:function(A){if(!A.cache)return E.getMany(A);var L=n$(A.keys,A.trans._cache,A.cache==="clone");return L?st.resolve(L):E.getMany(A).then(function(z){return A.trans._cache={keys:A.keys,values:A.cache==="clone"?k(z):z},z})},mutate:function(A){return A.type!=="add"&&(A.trans._cache=null),E.mutate(A)}})}}}};function s$(m,y){return m.trans.mode==="readonly"&&!!m.subscr&&!m.trans.explicit&&m.trans.db._options.cache!=="disabled"&&!y.schema.primaryKey.outbound}function o$(m,y){switch(m){case"query":return y.values&&!y.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var ybe={stack:"dbcore",level:0,name:"Observability",create:function(m){var y=m.schema.name,E=new Ks(m.MIN_KEY,m.MAX_KEY);return s(s({},m),{transaction:function(A,L,z){if(je.subscr&&L!=="readonly")throw new W.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(je.querier));return m.transaction(A,L,z)},table:function(A){var L=m.table(A),z=L.schema,se=z.primaryKey,he=z.indexes,ue=se.extractKey,Ce=se.outbound,_e=se.autoIncrement&&he.filter(function(be){return be.compound&&be.keyPath.includes(se.keyPath)}),Te=s(s({},L),{mutate:function(be){function De(ht){return ht="idb://".concat(y,"/").concat(A,"/").concat(ht),He[ht]||(He[ht]=new Ks)}var xe,Re,Me,$e=be.trans,He=be.mutatedParts||(be.mutatedParts={}),Ze=De(""),ot=De(":dels"),gt=be.type,St=be.type==="deleteRange"?[be.range]:be.type==="delete"?[be.keys]:be.values.length<50?[q_(se,be).filter(function(ht){return ht}),be.values]:[],it=St[0],at=St[1],St=be.trans._cache;return a(it)?(Ze.addKeys(it),(St=gt==="delete"||it.length===at.length?n$(it,St):null)||ot.addKeys(it),(St||at)&&(xe=De,Re=St,Me=at,z.indexes.forEach(function(ht){var Rt=xe(ht.name||"");function Zt(rn){return rn!=null?ht.extractKey(rn):null}function on(rn){return ht.multiEntry&&a(rn)?rn.forEach(function(Wo){return Rt.addKey(Wo)}):Rt.addKey(rn)}(Re||Me).forEach(function(rn,qs){var Kt=Re&&Zt(Re[qs]),qs=Me&&Zt(Me[qs]);ln(Kt,qs)!==0&&(Kt!=null&&on(Kt),qs!=null&&on(qs))})}))):it?(at={from:(at=it.lower)!==null&&at!==void 0?at:m.MIN_KEY,to:(at=it.upper)!==null&&at!==void 0?at:m.MAX_KEY},ot.add(at),Ze.add(at)):(Ze.add(E),ot.add(E),z.indexes.forEach(function(ht){return De(ht.name).add(E)})),L.mutate(be).then(function(ht){return!it||be.type!=="add"&&be.type!=="put"||(Ze.addKeys(ht.results),_e&&_e.forEach(function(Rt){for(var Zt=be.values.map(function(Kt){return Rt.extractKey(Kt)}),on=Rt.keyPath.findIndex(function(Kt){return Kt===se.keyPath}),rn=0,Wo=ht.results.length;rn<Wo;++rn)Zt[rn][on]=ht.results[rn];De(Rt.name).addKeys(Zt)})),$e.mutatedParts=Uy($e.mutatedParts||{},He),ht})}}),he=function(De){var xe=De.query,De=xe.index,xe=xe.range;return[De,new Ks((De=xe.lower)!==null&&De!==void 0?De:m.MIN_KEY,(xe=xe.upper)!==null&&xe!==void 0?xe:m.MAX_KEY)]},Fe={get:function(be){return[se,new Ks(be.key)]},getMany:function(be){return[se,new Ks().addKeys(be.keys)]},count:he,query:he,openCursor:he};return r(Fe).forEach(function(be){Te[be]=function(De){var xe=je.subscr,Re=!!xe,Me=s$(je,L)&&o$(be,De)?De.obsSet={}:xe;if(Re){var $e=function(at){return at="idb://".concat(y,"/").concat(A,"/").concat(at),Me[at]||(Me[at]=new Ks)},He=$e(""),Ze=$e(":dels"),xe=Fe[be](De),Re=xe[0],xe=xe[1];if((be==="query"&&Re.isPrimaryKey&&!De.values?Ze:$e(Re.name||"")).add(xe),!Re.isPrimaryKey){if(be!=="count"){var ot=be==="query"&&Ce&&De.values&&L.query(s(s({},De),{values:!1}));return L[be].apply(this,arguments).then(function(at){if(be==="query"){if(Ce&&De.values)return ot.then(function(Zt){return Zt=Zt.result,He.addKeys(Zt),at});var St=De.values?at.result.map(ue):at.result;(De.values?He:Ze).addKeys(St)}else if(be==="openCursor"){var ht=at,Rt=De.values;return ht&&Object.create(ht,{key:{get:function(){return Ze.addKey(ht.primaryKey),ht.key}},primaryKey:{get:function(){var Zt=ht.primaryKey;return Ze.addKey(Zt),Zt}},value:{get:function(){return Rt&&He.addKey(ht.primaryKey),ht.value}}})}return at})}Ze.add(E)}}return L[be].apply(this,arguments)}}),Te}})}};function i$(m,y,E){if(E.numFailures===0)return y;if(y.type==="deleteRange")return null;var A=y.keys?y.keys.length:"values"in y&&y.values?y.values.length:1;return E.numFailures===A?null:(y=s({},y),a(y.keys)&&(y.keys=y.keys.filter(function(L,z){return!(z in E.failures)})),"values"in y&&a(y.values)&&(y.values=y.values.filter(function(L,z){return!(z in E.failures)})),y)}function Y_(m,y){return E=m,((A=y).lower===void 0||(A.lowerOpen?0<ln(E,A.lower):0<=ln(E,A.lower)))&&(m=m,(y=y).upper===void 0||(y.upperOpen?ln(m,y.upper)<0:ln(m,y.upper)<=0));var E,A}function r$(m,y,Fe,A,L,z){if(!Fe||Fe.length===0)return m;var se=y.query.index,ue=se.multiEntry,Ce=y.query.range,_e=A.schema.primaryKey.extractKey,Te=se.extractKey,he=(se.lowLevelIndex||se).extractKey,Fe=Fe.reduce(function(be,De){var xe=be,Re=[];if(De.type==="add"||De.type==="put")for(var Me=new Ks,$e=De.values.length-1;0<=$e;--$e){var He,Ze=De.values[$e],ot=_e(Ze);Me.hasKey(ot)||(He=Te(Ze),(ue&&a(He)?He.some(function(ht){return Y_(ht,Ce)}):Y_(He,Ce))&&(Me.addKey(ot),Re.push(Ze)))}switch(De.type){case"add":var gt=new Ks().addKeys(y.values?be.map(function(Rt){return _e(Rt)}):be),xe=be.concat(y.values?Re.filter(function(Rt){return Rt=_e(Rt),!gt.hasKey(Rt)&&(gt.addKey(Rt),!0)}):Re.map(function(Rt){return _e(Rt)}).filter(function(Rt){return!gt.hasKey(Rt)&&(gt.addKey(Rt),!0)}));break;case"put":var it=new Ks().addKeys(De.values.map(function(Rt){return _e(Rt)}));xe=be.filter(function(Rt){return!it.hasKey(y.values?_e(Rt):Rt)}).concat(y.values?Re:Re.map(function(Rt){return _e(Rt)}));break;case"delete":var at=new Ks().addKeys(De.keys);xe=be.filter(function(Rt){return!at.hasKey(y.values?_e(Rt):Rt)});break;case"deleteRange":var St=De.range;xe=be.filter(function(Rt){return!Y_(_e(Rt),St)})}return xe},m);return Fe===m?m:(Fe.sort(function(be,De){return ln(he(be),he(De))||ln(_e(be),_e(De))}),y.limit&&y.limit<1/0&&(Fe.length>y.limit?Fe.length=y.limit:m.length===y.limit&&Fe.length<y.limit&&(L.dirty=!0)),z?Object.freeze(Fe):Fe)}function a$(m,y){return ln(m.lower,y.lower)===0&&ln(m.upper,y.upper)===0&&!!m.lowerOpen==!!y.lowerOpen&&!!m.upperOpen==!!y.upperOpen}function wbe(m,y){return function(E,A,L,z){if(E===void 0)return A!==void 0?-1:0;if(A===void 0)return 1;if((A=ln(E,A))===0){if(L&&z)return 0;if(L)return 1;if(z)return-1}return A}(m.lower,y.lower,m.lowerOpen,y.lowerOpen)<=0&&0<=function(E,A,L,z){if(E===void 0)return A!==void 0?1:0;if(A===void 0)return-1;if((A=ln(E,A))===0){if(L&&z)return 0;if(L)return-1;if(z)return 1}return A}(m.upper,y.upper,m.upperOpen,y.upperOpen)}function Cbe(m,y,E,A){m.subscribers.add(E),A.addEventListener("abort",function(){var L,z;m.subscribers.delete(E),m.subscribers.size===0&&(L=m,z=y,setTimeout(function(){L.subscribers.size===0&&ee(z,L)},3e3))})}var bbe={stack:"dbcore",level:0,name:"Cache",create:function(m){var y=m.schema.name;return s(s({},m),{transaction:function(E,A,L){var z,se,ue=m.transaction(E,A,L);return A==="readwrite"&&(se=(z=new AbortController).signal,L=function(Ce){return function(){if(z.abort(),A==="readwrite"){for(var _e=new Set,Te=0,he=E;Te<he.length;Te++){var Fe=he[Te],be=Nu["idb://".concat(y,"/").concat(Fe)];if(be){var De=m.table(Fe),xe=be.optimisticOps.filter(function(Rt){return Rt.trans===ue});if(ue._explicit&&Ce&&ue.mutatedParts)for(var Re=0,Me=Object.values(be.queries.query);Re<Me.length;Re++)for(var $e=0,He=(gt=Me[Re]).slice();$e<He.length;$e++)G_((it=He[$e]).obsSet,ue.mutatedParts)&&(ee(gt,it),it.subscribers.forEach(function(Rt){return _e.add(Rt)}));else if(0<xe.length){be.optimisticOps=be.optimisticOps.filter(function(Rt){return Rt.trans!==ue});for(var Ze=0,ot=Object.values(be.queries.query);Ze<ot.length;Ze++)for(var gt,it,at,St=0,ht=(gt=ot[Ze]).slice();St<ht.length;St++)(it=ht[St]).res!=null&&ue.mutatedParts&&(Ce&&!it.dirty?(at=Object.isFrozen(it.res),at=r$(it.res,it.req,xe,De,it,at),it.dirty?(ee(gt,it),it.subscribers.forEach(function(Rt){return _e.add(Rt)})):at!==it.res&&(it.res=at,it.promise=st.resolve({result:at}))):(it.dirty&&ee(gt,it),it.subscribers.forEach(function(Rt){return _e.add(Rt)})))}}}_e.forEach(function(Rt){return Rt()})}}},ue.addEventListener("abort",L(!1),{signal:se}),ue.addEventListener("error",L(!1),{signal:se}),ue.addEventListener("complete",L(!0),{signal:se})),ue},table:function(E){var A=m.table(E),L=A.schema.primaryKey;return s(s({},A),{mutate:function(z){var se=je.trans;if(L.outbound||se.db._options.cache==="disabled"||se.explicit||se.idbtrans.mode!=="readwrite")return A.mutate(z);var ue=Nu["idb://".concat(y,"/").concat(E)];return ue?(se=A.mutate(z),z.type!=="add"&&z.type!=="put"||!(50<=z.values.length||q_(L,z).some(function(Ce){return Ce==null}))?(ue.optimisticOps.push(z),z.mutatedParts&&Wy(z.mutatedParts),se.then(function(Ce){0<Ce.numFailures&&(ee(ue.optimisticOps,z),(Ce=i$(0,z,Ce))&&ue.optimisticOps.push(Ce),z.mutatedParts&&Wy(z.mutatedParts))}),se.catch(function(){ee(ue.optimisticOps,z),z.mutatedParts&&Wy(z.mutatedParts)})):se.then(function(Ce){var _e=i$(0,s(s({},z),{values:z.values.map(function(Te,he){var Fe;return Ce.failures[he]?Te:(Te=(Fe=L.keyPath)!==null&&Fe!==void 0&&Fe.includes(".")?k(Te):s({},Te),T(Te,L.keyPath,Ce.results[he]),Te)})}),Ce);ue.optimisticOps.push(_e),queueMicrotask(function(){return z.mutatedParts&&Wy(z.mutatedParts)})}),se):A.mutate(z)},query:function(z){if(!s$(je,A)||!o$("query",z))return A.query(z);var se=((_e=je.trans)===null||_e===void 0?void 0:_e.db._options.cache)==="immutable",he=je,ue=he.requery,Ce=he.signal,_e=function(De,xe,Re,Me){var $e=Nu["idb://".concat(De,"/").concat(xe)];if(!$e)return[];if(!(xe=$e.queries[Re]))return[null,!1,$e,null];var He=xe[(Me.query?Me.query.index.name:null)||""];if(!He)return[null,!1,$e,null];switch(Re){case"query":var Ze=He.find(function(ot){return ot.req.limit===Me.limit&&ot.req.values===Me.values&&a$(ot.req.query.range,Me.query.range)});return Ze?[Ze,!0,$e,He]:[He.find(function(ot){return("limit"in ot.req?ot.req.limit:1/0)>=Me.limit&&(!Me.values||ot.req.values)&&wbe(ot.req.query.range,Me.query.range)}),!1,$e,He];case"count":return Ze=He.find(function(ot){return a$(ot.req.query.range,Me.query.range)}),[Ze,!!Ze,$e,He]}}(y,E,"query",z),Te=_e[0],he=_e[1],Fe=_e[2],be=_e[3];return Te&&he?Te.obsSet=z.obsSet:(he=A.query(z).then(function(De){var xe=De.result;if(Te&&(Te.res=xe),se){for(var Re=0,Me=xe.length;Re<Me;++Re)Object.freeze(xe[Re]);Object.freeze(xe)}else De.result=k(xe);return De}).catch(function(De){return be&&Te&&ee(be,Te),Promise.reject(De)}),Te={obsSet:z.obsSet,promise:he,subscribers:new Set,type:"query",req:z,dirty:!1},be?be.push(Te):(be=[Te],(Fe=Fe||(Nu["idb://".concat(y,"/").concat(E)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[z.query.index.name||""]=be)),Cbe(Te,be,ue,Ce),Te.promise.then(function(De){return{result:r$(De.result,z,Fe==null?void 0:Fe.optimisticOps,A,Te,se)}})}})}})}};function jy(m,y){return new Proxy(m,{get:function(E,A,L){return A==="db"?y:Reflect.get(E,A,L)}})}var Ca=(as.prototype.version=function(m){if(isNaN(m)||m<.1)throw new W.Type("Given version is not a positive number");if(m=Math.round(10*m)/10,this.idbdb||this._state.isBeingOpened)throw new W.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,m);var y=this._versions,E=y.filter(function(A){return A._cfg.version===m})[0];return E||(E=new this.Version(m),y.push(E),y.sort(cbe),E.stores({}),this._state.autoSchema=!1,E)},as.prototype._whenReady=function(m){var y=this;return this.idbdb&&(this._state.openComplete||je.letThrough||this._vip)?m():new st(function(E,A){if(y._state.openComplete)return A(new W.DatabaseClosed(y._state.dbOpenError));if(!y._state.isBeingOpened){if(!y._state.autoOpen)return void A(new W.DatabaseClosed);y.open().catch(Ie)}y._state.dbReadyPromise.then(E,A)}).then(m)},as.prototype.use=function(m){var y=m.stack,E=m.create,A=m.level,L=m.name;return L&&this.unuse({stack:y,name:L}),m=this._middlewares[y]||(this._middlewares[y]=[]),m.push({stack:y,create:E,level:A??10,name:L}),m.sort(function(z,se){return z.level-se.level}),this},as.prototype.unuse=function(m){var y=m.stack,E=m.name,A=m.create;return y&&this._middlewares[y]&&(this._middlewares[y]=this._middlewares[y].filter(function(L){return A?L.create!==A:!!E&&L.name!==E})),this},as.prototype.open=function(){var m=this;return Co(Ne,function(){return pbe(m)})},as.prototype._close=function(){var m=this._state,y=Md.indexOf(this);if(0<=y&&Md.splice(y,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}m.isBeingOpened||(m.dbReadyPromise=new st(function(E){m.dbReadyResolve=E}),m.openCanceller=new st(function(E,A){m.cancelOpen=A}))},as.prototype.close=function(E){var y=(E===void 0?{disableAutoOpen:!0}:E).disableAutoOpen,E=this._state;y?(E.isBeingOpened&&E.cancelOpen(new W.DatabaseClosed),this._close(),E.autoOpen=!1,E.dbOpenError=new W.DatabaseClosed):(this._close(),E.autoOpen=this._options.autoOpen||E.isBeingOpened,E.openComplete=!1,E.dbOpenError=null)},as.prototype.delete=function(m){var y=this;m===void 0&&(m={disableAutoOpen:!0});var E=0<arguments.length&&typeof arguments[0]!="object",A=this._state;return new st(function(L,z){function se(){y.close(m);var ue=y._deps.indexedDB.deleteDatabase(y.name);ue.onsuccess=kn(function(){var Ce,_e,Te;Ce=y._deps,_e=y.name,Te=Ce.indexedDB,Ce=Ce.IDBKeyRange,B_(Te)||_e===Py||V_(Te,Ce).delete(_e).catch(Ie),L()}),ue.onerror=Ar(z),ue.onblocked=y._fireOnBlocked}if(E)throw new W.InvalidArgument("Invalid closeOptions argument to db.delete()");A.isBeingOpened?A.dbReadyPromise.then(se):se()})},as.prototype.backendDB=function(){return this.idbdb},as.prototype.isOpen=function(){return this.idbdb!==null},as.prototype.hasBeenClosed=function(){var m=this._state.dbOpenError;return m&&m.name==="DatabaseClosed"},as.prototype.hasFailed=function(){return this._state.dbOpenError!==null},as.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(as.prototype,"tables",{get:function(){var m=this;return r(this._allTables).map(function(y){return m._allTables[y]})},enumerable:!1,configurable:!0}),as.prototype.transaction=function(){var m=(function(y,E,A){var L=arguments.length;if(L<2)throw new W.InvalidArgument("Too few arguments");for(var z=new Array(L-1);--L;)z[L-1]=arguments[L];return A=z.pop(),[y,P(z),A]}).apply(this,arguments);return this._transaction.apply(this,m)},as.prototype._transaction=function(m,y,E){var A=this,L=je.trans;L&&L.db===this&&m.indexOf("!")===-1||(L=null);var z,se,ue=m.indexOf("?")!==-1;m=m.replace("!","").replace("?","");try{if(se=y.map(function(_e){if(_e=_e instanceof A.Table?_e.name:_e,typeof _e!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return _e}),m=="r"||m===D_)z=D_;else{if(m!="rw"&&m!=T_)throw new W.InvalidArgument("Invalid transaction mode: "+m);z=T_}if(L){if(L.mode===D_&&z===T_){if(!ue)throw new W.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");L=null}L&&se.forEach(function(_e){if(L&&L.storeNames.indexOf(_e)===-1){if(!ue)throw new W.SubTransaction("Table "+_e+" not included in parent transaction.");L=null}}),ue&&L&&!L.active&&(L=null)}}catch(_e){return L?L._promise(null,function(Te,he){he(_e)}):Kn(_e)}var Ce=(function _e(Te,he,Fe,be,De){return st.resolve().then(function(){var xe=je.transless||je,Re=Te._createTransaction(he,Fe,Te._dbSchema,be);if(Re.explicit=!0,xe={trans:Re,transless:xe},be)Re.idbtrans=be.idbtrans;else try{Re.create(),Re.idbtrans._explicit=!0,Te._state.PR1398_maxLoop=3}catch(He){return He.name===ae.InvalidState&&Te.isOpen()&&0<--Te._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),Te.close({disableAutoOpen:!1}),Te.open().then(function(){return _e(Te,he,Fe,null,De)})):Kn(He)}var Me,$e=te(De);return $e&&Ye(),xe=st.follow(function(){var He;(Me=De.call(Re,Re))&&($e?(He=jt.bind(null,null),Me.then(He,He)):typeof Me.next=="function"&&typeof Me.throw=="function"&&(Me=j_(Me)))},xe),(Me&&typeof Me.then=="function"?st.resolve(Me).then(function(He){return Re.active?He:Kn(new W.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):xe.then(function(){return Me})).then(function(He){return be&&Re._resolve(),Re._completion.then(function(){return He})}).catch(function(He){return Re._reject(He),Kn(He)})})}).bind(null,this,z,se,L,E);return L?L._promise(z,Ce,"lock"):je.trans?Co(je.transless,function(){return A._whenReady(Ce)}):this._whenReady(Ce)},as.prototype.table=function(m){if(!d(this._allTables,m))throw new W.InvalidTable("Table ".concat(m," does not exist"));return this._allTables[m]},as);function as(m,y){var E=this;this._middlewares={},this.verno=0;var A=as.dependencies;this._options=y=s({addons:as.addons,autoOpen:!0,indexedDB:A.indexedDB,IDBKeyRange:A.IDBKeyRange,cache:"cloned"},y),this._deps={indexedDB:y.indexedDB,IDBKeyRange:y.IDBKeyRange},A=y.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var L,z,se,ue,Ce,_e={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Ie,dbReadyPromise:null,cancelOpen:Ie,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:y.autoOpen};_e.dbReadyPromise=new st(function(he){_e.dbReadyResolve=he}),_e.openCanceller=new st(function(he,Fe){_e.cancelOpen=Fe}),this._state=_e,this.name=m,this.on=yp(this,"populate","blocked","versionchange","close",{ready:[M,Ie]}),this.on.ready.subscribe=b(this.on.ready.subscribe,function(he){return function(Fe,be){as.vip(function(){var De,xe=E._state;xe.openComplete?(xe.dbOpenError||st.resolve().then(Fe),be&&he(Fe)):xe.onReadyBeingFired?(xe.onReadyBeingFired.push(Fe),be&&he(Fe)):(he(Fe),De=E,be||he(function Re(){De.on.ready.unsubscribe(Fe),De.on.ready.unsubscribe(Re)}))})}}),this.Collection=(L=this,wp(sbe.prototype,function(Me,Re){this.db=L;var be=VB,De=null;if(Re)try{be=Re()}catch($e){De=$e}var xe=Me._ctx,Re=xe.table,Me=Re.hook.reading.fire;this._ctx={table:Re,index:xe.index,isPrimKey:!xe.index||Re.schema.primKey.keyPath&&xe.index===Re.schema.primKey.name,range:be,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:De,or:xe.or,valueMapper:Me!==G?Me:null}})),this.Table=(z=this,wp(GB.prototype,function(he,Fe,be){this.db=z,this._tx=be,this.name=he,this.schema=Fe,this.hook=z._allTables[he]?z._allTables[he].hook:yp(null,{creating:[ke,Ie],reading:[Z,G],updating:[Le,Ie],deleting:[Pe,Ie]})})),this.Transaction=(se=this,wp(rbe.prototype,function(he,Fe,be,De,xe){var Re=this;this.db=se,this.mode=he,this.storeNames=Fe,this.schema=be,this.chromeTransactionDurability=De,this.idbtrans=null,this.on=yp(this,"complete","error","abort"),this.parent=xe||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new st(function(Me,$e){Re._resolve=Me,Re._reject=$e}),this._completion.then(function(){Re.active=!1,Re.on.complete.fire()},function(Me){var $e=Re.active;return Re.active=!1,Re.on.error.fire(Me),Re.parent?Re.parent._reject(Me):$e&&Re.idbtrans&&Re.idbtrans.abort(),Kn(Me)})})),this.Version=(ue=this,wp(fbe.prototype,function(he){this.db=ue,this._cfg={version:he,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(Ce=this,wp(KB.prototype,function(he,Fe,be){if(this.db=Ce,this._ctx={table:he,index:Fe===":id"?null:Fe,or:be},this._cmp=this._ascending=ln,this._descending=function(De,xe){return ln(xe,De)},this._max=function(De,xe){return 0<ln(De,xe)?De:xe},this._min=function(De,xe){return ln(De,xe)<0?De:xe},this._IDBKeyRange=Ce._deps.IDBKeyRange,!this._IDBKeyRange)throw new W.MissingAPI})),this.on("versionchange",function(he){0<he.newVersion?console.warn("Another connection wants to upgrade database '".concat(E.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(E.name,"'. Closing db now to resume the delete request.")),E.close({disableAutoOpen:!1})}),this.on("blocked",function(he){!he.newVersion||he.newVersion<he.oldVersion?console.warn("Dexie.delete('".concat(E.name,"') was blocked")):console.warn("Upgrade '".concat(E.name,"' blocked by other connection holding version ").concat(he.oldVersion/10))}),this._maxKey=Ep(y.IDBKeyRange),this._createTransaction=function(he,Fe,be,De){return new E.Transaction(he,Fe,be,E._options.chromeTransactionDurability,De)},this._fireOnBlocked=function(he){E.on("blocked").fire(he),Md.filter(function(Fe){return Fe.name===E.name&&Fe!==E&&!Fe._state.vcFired}).map(function(Fe){return Fe.on("versionchange").fire(he)})},this.use(vbe),this.use(bbe),this.use(ybe),this.use(gbe),this.use(mbe);var Te=new Proxy(this,{get:function(he,Fe,be){if(Fe==="_vip")return!0;if(Fe==="table")return function(xe){return jy(E.table(xe),Te)};var De=Reflect.get(he,Fe,be);return De instanceof GB?jy(De,Te):Fe==="tables"?De.map(function(xe){return jy(xe,Te)}):Fe==="_createTransaction"?function(){return jy(De.apply(this,arguments),Te)}:De}});this.vip=Te,A.forEach(function(he){return he(E)})}var Ky,mi=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",Sbe=(Z_.prototype.subscribe=function(m,y,E){return this._subscribe(m&&typeof m!="function"?m:{next:m,error:y,complete:E})},Z_.prototype[mi]=function(){return this},Z_);function Z_(m){this._subscribe=m}try{Ky={indexedDB:i.indexedDB||i.mozIndexedDB||i.webkitIndexedDB||i.msIndexedDB,IDBKeyRange:i.IDBKeyRange||i.webkitIDBKeyRange}}catch{Ky={indexedDB:null,IDBKeyRange:null}}function l$(m){var y,E=!1,A=new Sbe(function(L){var z=te(m),se,ue=!1,Ce={},_e={},Te={get closed(){return ue},unsubscribe:function(){ue||(ue=!0,se&&se.abort(),he&&vl.storagemutated.unsubscribe(be))}};L.start&&L.start(Te);var he=!1,Fe=function(){return Fy(De)},be=function(xe){Uy(Ce,xe),G_(_e,Ce)&&Fe()},De=function(){var xe,Re,Me;!ue&&Ky.indexedDB&&(Ce={},xe={},se&&se.abort(),se=new AbortController,Me=function($e){var He=xr();try{z&&Ye();var Ze=Ae(m,$e);return Ze=z?Ze.finally(jt):Ze}finally{He&&pi()}}(Re={subscr:xe,signal:se.signal,requery:Fe,querier:m,trans:null}),Promise.resolve(Me).then(function($e){E=!0,y=$e,ue||Re.signal.aborted||(Ce={},function(He){for(var Ze in He)if(d(He,Ze))return;return 1}(_e=xe)||he||(vl(Sp,be),he=!0),Fy(function(){return!ue&&L.next&&L.next($e)}))},function($e){E=!1,["DatabaseClosedError","AbortError"].includes($e==null?void 0:$e.name)||ue||Fy(function(){ue||L.error&&L.error($e)})}))};return setTimeout(Fe,0),Te});return A.hasValue=function(){return E},A.getValue=function(){return y},A}var Lu=Ca;function X_(m){var y=yl;try{yl=!0,vl.storagemutated.fire(m),z_(m,!0)}finally{yl=y}}h(Lu,s(s({},oe),{delete:function(m){return new Lu(m,{addons:[]}).delete()},exists:function(m){return new Lu(m,{addons:[]}).open().then(function(y){return y.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(m){try{return y=Lu.dependencies,E=y.indexedDB,y=y.IDBKeyRange,(B_(E)?Promise.resolve(E.databases()).then(function(A){return A.map(function(L){return L.name}).filter(function(L){return L!==Py})}):V_(E,y).toCollection().primaryKeys()).then(m)}catch{return Kn(new W.MissingAPI)}var y,E},defineClass:function(){return function(m){l(this,m)}},ignoreTransaction:function(m){return je.trans?Co(je.transless,m):m()},vip:$_,async:function(m){return function(){try{var y=j_(m.apply(this,arguments));return y&&typeof y.then=="function"?y:st.resolve(y)}catch(E){return Kn(E)}}},spawn:function(m,y,E){try{var A=j_(m.apply(E,y||[]));return A&&typeof A.then=="function"?A:st.resolve(A)}catch(L){return Kn(L)}},currentTransaction:{get:function(){return je.trans||null}},waitFor:function(m,y){return y=st.resolve(typeof m=="function"?Lu.ignoreTransaction(m):m).timeout(y||6e4),je.trans?je.trans.waitFor(y):y},Promise:st,debug:{get:function(){return H},set:function(m){le(m)}},derive:g,extend:l,props:h,override:b,Events:yp,on:vl,liveQuery:l$,extendObservabilitySet:Uy,getByKeyPath:R,setByKeyPath:T,delByKeyPath:function(m,y){typeof y=="string"?T(m,y,void 0):"length"in y&&[].map.call(y,function(E){T(m,E,void 0)})},shallowClone:I,deepClone:k,getObjectDiff:K_,cmp:ln,asap:_,minKey:-1/0,addons:[],connections:Md,errnames:ae,dependencies:Ky,cache:Nu,semVer:"4.0.10",version:"4.0.10".split(".").map(function(m){return parseInt(m)}).reduce(function(m,y,E){return m+y/Math.pow(10,2*E)})})),Lu.maxKey=Ep(Lu.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(vl(Sp,function(m){yl||(m=new CustomEvent(P_,{detail:m}),yl=!0,dispatchEvent(m),yl=!1)}),addEventListener(P_,function(m){m=m.detail,yl||X_(m)}));var Vd,yl=!1,u$=function(){};return typeof BroadcastChannel<"u"&&((u$=function(){(Vd=new BroadcastChannel(P_)).onmessage=function(m){return m.data&&X_(m.data)}})(),typeof Vd.unref=="function"&&Vd.unref(),vl(Sp,function(m){yl||Vd.postMessage(m)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(m){if(!Ca.disableBfCache&&m.persisted){H&&console.debug("Dexie: handling persisted pagehide"),Vd!=null&&Vd.close();for(var y=0,E=Md;y<E.length;y++)E[y].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(m){!Ca.disableBfCache&&m.persisted&&(H&&console.debug("Dexie: handling persisted pageshow"),u$(),X_({all:new Ks(-1/0,[[]])}))})),st.rejectionMapper=function(m,y){return!m||m instanceof V||m instanceof TypeError||m instanceof SyntaxError||!m.name||!fe[m.name]?m:(y=new fe[m.name](y||m.message,m),"stack"in m&&p(y,"stack",{get:function(){return this.inner.stack}}),y)},le(H),s(Ca,Object.freeze({__proto__:null,Dexie:Ca,liveQuery:l$,Entity:BB,cmp:ln,PropModSymbol:wa,PropModification:Cp,replacePrefix:function(m,y){return new Cp({replacePrefix:[m,y]})},add:function(m){return new Cp({add:m})},remove:function(m){return new Cp({remove:m})},default:Ca,RangeSet:Ks,mergeRanges:Dp,rangesOverlap:JB}),{default:Ca}),Ca})})(B1);var $z=B1.exports;const bC=Bz($z),$1=Symbol.for("Dexie"),Rh=globalThis[$1]||(globalThis[$1]=bC);if(bC.semVer!==Rh.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${bC.semVer} and ${Rh.semVer}`);const{liveQuery:Lbe,mergeRanges:Vbe,rangesOverlap:Bbe,RangeSet:$be,cmp:Hbe,Entity:Gbe,PropModSymbol:Ube,PropModification:Wbe,replacePrefix:zbe,add:jbe,remove:Kbe}=Rh;class H1 extends Rh{constructor(n){super(n);es(this,"icons");es(this,"visuals");es(this,"users");es(this,"columns");es(this,"general");this.version(1).stores({icons:"key",visuals:"key",users:"key",columns:"key",general:"key"})}getTable(n){return this[n]?this[n]:this.general}}const Ag=new Map,Hz=async e=>{if(!Ag.has(e)){const t=new H1(e);try{await t.open(),Ag.set(e,t)}catch(n){console.error("Failed to open database, attempting to delete and recreate:",n);try{await Rh.delete(e);const s=new H1(e);await s.open(),Ag.set(e,s)}catch(s){throw console.error("Failed to delete and recreate database:",s),s}}}return Ag.get(e)},Dh=({dbName:e,storeName:t})=>{const n=async()=>(await Hz(e)).getTable(t);return{getCachedValue:async u=>{try{const c=await n();if(!c){console.error(`Store is undefined for key: ${u}`);return}const d=await c.get(u);return d==null?void 0:d.value}catch(c){console.error("Failed to get cached value:",c);return}},setCachedValue:async(u,c)=>{try{const d=await n();if(!d){console.error(`Store is undefined, cannot cache key: ${u}`);return}await d.put({key:u,value:c,timestamp:Date.now()})}catch(d){console.error("Failed to cache value:",d)}},deleteCachedValue:async u=>{try{const c=await n();if(!c){console.error(`Store is undefined, cannot delete key: ${u}`);return}await c.delete(u)}catch(c){console.error("Failed to delete cached value:",c)}},clearCache:async()=>{try{const u=await n();if(!u){console.error("Store is undefined, cannot clear cache");return}await u.clear()}catch(u){console.error("Failed to clear cache:",u)}},getAllKeys:async()=>{try{const u=await n();return u?(await u.toArray()).map(d=>d.key):(console.error("Store is undefined, cannot get all keys"),[])}catch(u){return console.error("Failed to get all keys:",u),[]}},getCachedValueWithTimestamp:async u=>{try{const c=await n();if(!c){console.error(`Store is undefined for key: ${u}`);return}return await c.get(u)}catch(c){console.error("Failed to get cached value with timestamp:",c);return}}}},Gz="AvatarCache",Uz="images",Bl={},kg={},Wz=()=>{const{getCachedValue:e,setCachedValue:t}=Dh({dbName:Gz,storeName:Uz}),n=a=>new Promise((l,u)=>{const c=new FileReader;c.onloadend=()=>l(c.result),c.onerror=u,c.readAsDataURL(a)}),s=async a=>{try{if(Bl[a])return Bl[a];if(kg[a])return await kg[a];const l=(async()=>{try{const u=await e(a);if(!u||!(u instanceof Blob))return null;const c=await n(u);return Bl[a]=c,c}catch(u){return console.warn(`Failed to get cached image for key: ${a}`,u),null}})();return kg[a]=l,l.finally(()=>{delete kg[a]}),await l}catch(l){return console.error(`Error in getCachedImage for key: ${a}`,l),null}},o=a=>new Promise((l,u)=>{new Vz(a,{width:96,height:96,quality:1,success(c){l(c)},error(c){console.error("Image compression failed:",c.message),u(c)}})});return{getCachedImage:s,setCachedImage:async(a,l)=>{try{const u=await o(l);await t(a,u);const c=await n(u);Bl[a]=c}catch(u){throw console.error(`Failed to cache image for key: ${a}`,u),u}},clearMemoryCache:a=>{try{a?delete Bl[a]:Object.keys(Bl).forEach(l=>delete Bl[l])}catch(l){console.error("Error clearing memory cache:",l)}}}},Th=new Map,sr=new Map,ic=new Map,zz=5*60*1e3,G1=100;function jz(){const e=Date.now(),t=[];ic.forEach((n,s)=>{e-n>zz&&t.push(s)}),t.forEach(n=>{Th.delete(n),ic.delete(n),sr.delete(n)})}function Kz(){if(ic.size<=G1)return;const e=Array.from(ic.entries()).sort((n,s)=>n[1]-s[1]);e.slice(0,e.length-G1).forEach(([n])=>{Th.delete(n),ic.delete(n),sr.delete(n)})}const qz=(e,t)=>{const n=sr.get(e);return n==null||n.forEach(s=>s(t)),sr.delete(e),t};async function Yz({userId:e,avatarUrl:t,cacheInterface:n,onLoadingChange:s}){let o=e;if(t)try{const d=new URL(t,"http://localhost").pathname.split("/").pop();d?o=`${e}_${d}`:o=t}catch{o=t||e}const i=await n.getCachedImage(o),r=Th.has(o),a=sr.has(o);if(i)return qz(o,i);if(jz(),r)return new Promise(c=>{a||sr.set(o,[]),sr.get(o).push(c)});const l=(async()=>{let c=null,d=null;try{const h=Math.random()*300;await new Promise(p=>setTimeout(p,h)),s==null||s(!0);const f=await fetch(t,{cache:"no-cache"});if(!f.ok)throw new Error("Failed to fetch image");return c=await f.blob(),await n.setCachedImage(o,c),d=URL.createObjectURL(c),d}catch(h){throw console.error("Error loading avatar image:",h),h}finally{c=null,s==null||s(!1),ic.set(o,Date.now()),setTimeout(()=>{Th.delete(o),Kz()},100)}})();Th.set(o,l);const u=await l;return sr.has(o)&&(sr.get(o).forEach(d=>d(u)),sr.delete(o)),u}const Zz=(e,t=3,n=1e3)=>{const s=B(0),o=B(!1),i=B(!1),r=async()=>{try{await e()}catch(a){if(s.value<t)return s.value++,i.value=!0,await new Promise(l=>setTimeout(l,n)),r();throw o.value=!0,a}};return{retry:r,currentAttempt:s,errorRetry:o,isRetrying:i}};function xs(e,t){Xz(e)&&(e="100%");const n=Jz(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Og(e){return Math.min(1,Math.max(0,e))}function Xz(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Jz(e){return typeof e=="string"&&e.indexOf("%")!==-1}function U1(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Mg(e){return Number(e)<=1?`${Number(e)*100}%`:e}function $l(e){return e.length===1?"0"+e:String(e)}function Qz(e,t,n){return{r:xs(e,255)*255,g:xs(t,255)*255,b:xs(n,255)*255}}function W1(e,t,n){e=xs(e,255),t=xs(t,255),n=xs(n,255);const s=Math.max(e,t,n),o=Math.min(e,t,n);let i=0,r=0;const a=(s+o)/2;if(s===o)r=0,i=0;else{const l=s-o;switch(r=a>.5?l/(2-s-o):l/(s+o),s){case e:i=(t-n)/l+(t<n?6:0);break;case t:i=(n-e)/l+2;break;case n:i=(e-t)/l+4;break}i/=6}return{h:i,s:r,l:a}}function SC(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function e3(e,t,n){let s,o,i;if(e=xs(e,360),t=xs(t,100),n=xs(n,100),t===0)o=n,i=n,s=n;else{const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;s=SC(a,r,e+1/3),o=SC(a,r,e),i=SC(a,r,e-1/3)}return{r:s*255,g:o*255,b:i*255}}function z1(e,t,n){e=xs(e,255),t=xs(t,255),n=xs(n,255);const s=Math.max(e,t,n),o=Math.min(e,t,n);let i=0;const r=s,a=s-o,l=s===0?0:a/s;if(s===o)i=0;else{switch(s){case e:i=(t-n)/a+(t<n?6:0);break;case t:i=(n-e)/a+2;break;case n:i=(e-t)/a+4;break}i/=6}return{h:i,s:l,v:r}}function t3(e,t,n){e=xs(e,360)*6,t=xs(t,100),n=xs(n,100);const s=Math.floor(e),o=e-s,i=n*(1-t),r=n*(1-o*t),a=n*(1-(1-o)*t),l=s%6,u=[n,r,i,i,a,n][l],c=[a,n,n,r,i,i][l],d=[i,i,a,n,n,r][l];return{r:u*255,g:c*255,b:d*255}}function j1(e,t,n,s){const o=[$l(Math.round(e).toString(16)),$l(Math.round(t).toString(16)),$l(Math.round(n).toString(16))];return s&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function n3(e,t,n,s,o){const i=[$l(Math.round(e).toString(16)),$l(Math.round(t).toString(16)),$l(Math.round(n).toString(16)),$l(o3(s))];return o&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function s3(e,t,n,s){const o=e/100,i=t/100,r=n/100,a=s/100,l=255*(1-o)*(1-a),u=255*(1-i)*(1-a),c=255*(1-r)*(1-a);return{r:l,g:u,b:c}}function K1(e,t,n){let s=1-e/255,o=1-t/255,i=1-n/255,r=Math.min(s,o,i);return r===1?(s=0,o=0,i=0):(s=(s-r)/(1-r)*100,o=(o-r)/(1-r)*100,i=(i-r)/(1-r)*100),r*=100,{c:Math.round(s),m:Math.round(o),y:Math.round(i),k:Math.round(r)}}function o3(e){return Math.round(parseFloat(e)*255).toString(16)}function q1(e){return Fo(e)/255}function Fo(e){return parseInt(e,16)}function i3(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}const EC={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function r3(e){let t={r:0,g:0,b:0},n=1,s=null,o=null,i=null,r=!1,a=!1;return typeof e=="string"&&(e=a3(e)),typeof e=="object"&&(Po(e.r)&&Po(e.g)&&Po(e.b)?(t=Qz(e.r,e.g,e.b),r=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Po(e.h)&&Po(e.s)&&Po(e.v)?(s=Mg(e.s),o=Mg(e.v),t=t3(e.h,s,o),r=!0,a="hsv"):Po(e.h)&&Po(e.s)&&Po(e.l)?(s=Mg(e.s),i=Mg(e.l),t=e3(e.h,s,i),r=!0,a="hsl"):Po(e.c)&&Po(e.m)&&Po(e.y)&&Po(e.k)&&(t=s3(e.c,e.m,e.y,e.k),r=!0,a="cmyk"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=U1(n),{ok:r,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}const ka="(?:"+"[-\\+]?\\d*\\.\\d+%?"+")|(?:"+"[-\\+]?\\d+%?"+")",_C="[\\s|\\(]+("+ka+")[,|\\s]+("+ka+")[,|\\s]+("+ka+")\\s*\\)?",Ng="[\\s|\\(]+("+ka+")[,|\\s]+("+ka+")[,|\\s]+("+ka+")[,|\\s]+("+ka+")\\s*\\)?",Zo={CSS_UNIT:new RegExp(ka),rgb:new RegExp("rgb"+_C),rgba:new RegExp("rgba"+Ng),hsl:new RegExp("hsl"+_C),hsla:new RegExp("hsla"+Ng),hsv:new RegExp("hsv"+_C),hsva:new RegExp("hsva"+Ng),cmyk:new RegExp("cmyk"+Ng),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function a3(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;let t=!1;if(EC[e])e=EC[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let n=Zo.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Zo.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Zo.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Zo.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Zo.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Zo.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Zo.cmyk.exec(e),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:(n=Zo.hex8.exec(e),n?{r:Fo(n[1]),g:Fo(n[2]),b:Fo(n[3]),a:q1(n[4]),format:t?"name":"hex8"}:(n=Zo.hex6.exec(e),n?{r:Fo(n[1]),g:Fo(n[2]),b:Fo(n[3]),format:t?"name":"hex"}:(n=Zo.hex4.exec(e),n?{r:Fo(n[1]+n[1]),g:Fo(n[2]+n[2]),b:Fo(n[3]+n[3]),a:q1(n[4]+n[4]),format:t?"name":"hex8"}:(n=Zo.hex3.exec(e),n?{r:Fo(n[1]+n[1]),g:Fo(n[2]+n[2]),b:Fo(n[3]+n[3]),format:t?"name":"hex"}:!1))))))))))}function Po(e){return typeof e=="number"?!Number.isNaN(e):Zo.CSS_UNIT.test(e)}class Nn{constructor(t="",n={}){if(t instanceof Nn)return t;typeof t=="number"&&(t=i3(t)),this.originalInput=t;const s=r3(t);this.originalInput=t,this.r=s.r,this.g=s.g,this.b=s.b,this.a=s.a,this.roundA=Math.round(100*this.a)/100,this.format=n.format??s.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=s.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){const t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3}getLuminance(){const t=this.toRgb();let n,s,o;const i=t.r/255,r=t.g/255,a=t.b/255;return i<=.03928?n=i/12.92:n=Math.pow((i+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),a<=.03928?o=a/12.92:o=Math.pow((a+.055)/1.055,2.4),.2126*n+.7152*s+.0722*o}getAlpha(){return this.a}setAlpha(t){return this.a=U1(t),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:t}=this.toHsl();return t===0}toHsv(){const t=z1(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}}toHsvString(){const t=z1(this.r,this.g,this.b),n=Math.round(t.h*360),s=Math.round(t.s*100),o=Math.round(t.v*100);return this.a===1?`hsv(${n}, ${s}%, ${o}%)`:`hsva(${n}, ${s}%, ${o}%, ${this.roundA})`}toHsl(){const t=W1(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}}toHslString(){const t=W1(this.r,this.g,this.b),n=Math.round(t.h*360),s=Math.round(t.s*100),o=Math.round(t.l*100);return this.a===1?`hsl(${n}, ${s}%, ${o}%)`:`hsla(${n}, ${s}%, ${o}%, ${this.roundA})`}toHex(t=!1){return j1(this.r,this.g,this.b,t)}toHexString(t=!1){return"#"+this.toHex(t)}toHex8(t=!1){return n3(this.r,this.g,this.b,this.a,t)}toHex8String(t=!1){return"#"+this.toHex8(t)}toHexShortString(t=!1){return this.a===1?this.toHexString(t):this.toHex8String(t)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){const t=Math.round(this.r),n=Math.round(this.g),s=Math.round(this.b);return this.a===1?`rgb(${t}, ${n}, ${s})`:`rgba(${t}, ${n}, ${s}, ${this.roundA})`}toPercentageRgb(){const t=n=>`${Math.round(xs(n,255)*100)}%`;return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}}toPercentageRgbString(){const t=n=>Math.round(xs(n,255)*100);return this.a===1?`rgb(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%)`:`rgba(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%, ${this.roundA})`}toCmyk(){return{...K1(this.r,this.g,this.b)}}toCmykString(){const{c:t,m:n,y:s,k:o}=K1(this.r,this.g,this.b);return`cmyk(${t}, ${n}, ${s}, ${o})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;const t="#"+j1(this.r,this.g,this.b,!1);for(const[n,s]of Object.entries(EC))if(t===s)return n;return!1}toString(t){const n=!!t;t=t??this.format;let s=!1;const o=this.a<1&&this.a>=0;return!n&&o&&(t.startsWith("hex")||t==="name")?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(s=this.toRgbString()),t==="prgb"&&(s=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(s=this.toHexString()),t==="hex3"&&(s=this.toHexString(!0)),t==="hex4"&&(s=this.toHex8String(!0)),t==="hex8"&&(s=this.toHex8String()),t==="name"&&(s=this.toName()),t==="hsl"&&(s=this.toHslString()),t==="hsv"&&(s=this.toHsvString()),t==="cmyk"&&(s=this.toCmykString()),s||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new Nn(this.toString())}lighten(t=10){const n=this.toHsl();return n.l+=t/100,n.l=Og(n.l),new Nn(n)}brighten(t=10){const n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new Nn(n)}darken(t=10){const n=this.toHsl();return n.l-=t/100,n.l=Og(n.l),new Nn(n)}tint(t=10){return this.mix("white",t)}shade(t=10){return this.mix("black",t)}desaturate(t=10){const n=this.toHsl();return n.s-=t/100,n.s=Og(n.s),new Nn(n)}saturate(t=10){const n=this.toHsl();return n.s+=t/100,n.s=Og(n.s),new Nn(n)}greyscale(){return this.desaturate(100)}spin(t){const n=this.toHsl(),s=(n.h+t)%360;return n.h=s<0?360+s:s,new Nn(n)}mix(t,n=50){const s=this.toRgb(),o=new Nn(t).toRgb(),i=n/100,r={r:(o.r-s.r)*i+s.r,g:(o.g-s.g)*i+s.g,b:(o.b-s.b)*i+s.b,a:(o.a-s.a)*i+s.a};return new Nn(r)}analogous(t=6,n=30){const s=this.toHsl(),o=360/n,i=[this];for(s.h=(s.h-(o*t>>1)+720)%360;--t;)s.h=(s.h+o)%360,i.push(new Nn(s));return i}complement(){const t=this.toHsl();return t.h=(t.h+180)%360,new Nn(t)}monochromatic(t=6){const n=this.toHsv(),{h:s}=n,{s:o}=n;let{v:i}=n;const r=[],a=1/t;for(;t--;)r.push(new Nn({h:s,s:o,v:i})),i=(i+a)%1;return r}splitcomplement(){const t=this.toHsl(),{h:n}=t;return[this,new Nn({h:(n+72)%360,s:t.s,l:t.l}),new Nn({h:(n+216)%360,s:t.s,l:t.l})]}onBackground(t){const n=this.toRgb(),s=new Nn(t).toRgb(),o=n.a+s.a*(1-n.a);return new Nn({r:(n.r*n.a+s.r*s.a*(1-n.a))/o,g:(n.g*n.a+s.g*s.a*(1-n.a))/o,b:(n.b*n.a+s.b*s.a*(1-n.a))/o,a:o})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(t){const n=this.toHsl(),{h:s}=n,o=[this],i=360/t;for(let r=1;r<t;r++)o.push(new Nn({h:(s+r*i)%360,s:n.s,l:n.l}));return o}equals(t){const n=new Nn(t);return this.format==="cmyk"||n.format==="cmyk"?this.toCmykString()===n.toCmykString():this.toRgbString()===n.toRgbString()}}function Y1(e){return new Nn(e||"").isValid}function Lg(e,t){const{c1:n,c2:s}={c1:new Nn(e),c2:new Nn(t)};return n.equals(s)}const l3=["src","alt"],Ih=_t(rt({__name:"Avatar",props:{name:{},id:{},profile_image:{},color:{},initial:{},isMe:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},size:{default:24},isUseShortLabel:{type:Boolean,default:!0},borderRadius:{default:void 0}},setup(e){const t=e,n=B(""),s=B(!1),o=B(null),i=B(!1),r=Y(()=>({name:t.name||"",id:t.id||"",profile_image:t.profile_image||null,color:t.color||{bgColor:"#CCCCCC",textColor:"var(--background-color)"},initial:t.initial})),a=Y(()=>{var _;const w=((_=r.value.color)==null?void 0:_.bgColor)||"#CCCCCC";return Y1(w)?w:"#CCCCCC"}),l=Y(()=>{var _;const w=((_=r.value.color)==null?void 0:_.textColor)||"var(--background-color)";return Y1(w)?w:"var(--background-color)"}),u=Y(()=>{if(!t.isUseShortLabel)return"";const{initial:w,name:_}=r.value;if(typeof w=="string"&&w.trim())return w.trim();if(!(_!=null&&_.trim()))return"";const R=_.trim().split(/\s+/).filter(Boolean);return R.length===1?R[0].slice(0,2).toUpperCase():(R[0][0]+R[1][0]).toUpperCase()}),c=Y(()=>r.value.profile_image?"image":"text"),d=Y(()=>({"--avatar-size":`${t.size}px`,"--avatar-bg":a.value,"--avatar-border":t.isMe?"var(--primary-color)":"#f3f5f8","--text-color":l.value,"--font-size":`${Math.floor(t.size/2)}px`,"--border-radius":t.borderRadius?typeof t.borderRadius=="number"?`${t.borderRadius}px`:t.borderRadius:"4px"})),h=()=>{n.value="",i.value=!0},{getCachedImage:f,setCachedImage:p}=Wz(),g=async()=>{if(o.value&&o.value.abort(),n.value.startsWith("blob:")&&URL.revokeObjectURL(n.value),!r.value.id||!r.value.profile_image){n.value="";return}o.value=new AbortController;const w=o.value;try{const _=await Yz({userId:r.value.id,avatarUrl:r.value.profile_image,cacheInterface:{getCachedImage:f,setCachedImage:p},onLoadingChange:R=>{w.signal.aborted||(s.value=R)}});if(!w.signal.aborted&&(n.value=_,_.length===0))throw console.warn("Loaded avatar image is empty, displaying initials instead."),h(),new Error("Empty image source")}catch(_){w.signal.aborted||(console.error("Failed to load avatar:",_),n.value="")}},{retry:v,errorRetry:C,isRetrying:S}=Zz(g,3,2e3),b=nt(()=>[r.value.id,r.value.profile_image],v,{immediate:!0});return vs(()=>{b(),o.value&&(o.value.abort(),o.value=null),n.value.startsWith("blob:")&&URL.revokeObjectURL(n.value),n.value="",s.value=!1}),(w,_)=>(j(),ce("div",{class:Q([w.$style["avatar-wrapper"],{[w.$style.me]:e.isMe,[w.$style.loading]:s.value,[w.$style.disabled]:e.disabled,[w.$style.readOnly]:t.readOnly}]),style:dn(d.value)},[s.value||U(S)?(j(),ce("div",{key:0,class:Q(w.$style["skeleton-loader"])},null,2)):(j(),ce(xt,{key:1},[c.value==="text"||U(C)||i.value?(j(),ce("div",{key:0,class:Q(w.$style["short-label"])},wt(u.value),3)):n.value.length>0||r.value.profile_image?(j(),ce("img",{key:1,src:n.value||r.value.profile_image||"",alt:r.value.name||"Avatar",loading:"lazy"},null,8,l3)):Je("",!0)],64))],6))}}),[["__cssModules",{$style:{"avatar-wrapper":"_avatar-wrapper_1pd1f_1",me:"_me_1pd1f_17","short-label":"_short-label_1pd1f_20",action:"_action_1pd1f_38",loading:"_loading_1pd1f_56",disabled:"_disabled_1pd1f_59",readOnly:"_readOnly_1pd1f_62"}}]]),u3=["404","ClickChart","ClickToCreate","NoAccess1","NoActivity","NoAssignedComment","NoAssignedScene","NoComment","NoData","NoData2","NoRendition1","NoRendition2","PrivateComment","PrivateScene","ReportAchievement","ReportCompletedScenes","ReportInvolvement","ReportMetric","ReportOverdueScenes","ReportProfessionalName","ReportSceneAssignment","ReportSceneStatus","ReportSceneStatusType","Successful1","Unsuccessful1","ConfirmDeletion","Waiting1","DefaultThumbnail","UploadReviewFile","ClickToSearch","NoDataSearchFilter"],c3=["UploadInProgress"],Pu=class Pu{constructor(){es(this,"KEY_PAIR",{workspaceCode:"ws.code",apiBaseUrl:"API_BASE_URL",assetUrl:"ASSET_URL",baseUrl:"BASE_URL",baseReviewUrl:"BASE_REVIEW_URL"});Object.values(this.KEY_PAIR).every(n=>{const s=sessionStorage.getItem(n);return(s==null||s==="")&&console.error(`[SessionStorageHelper] Key "${n}" is not set in sessionStorage.`),!0})||console.error("[SessionStorageHelper] Some expected keys are missing in sessionStorage. Please ensure all required keys are set.")}static getInstance(){return Pu.instance||(Pu.instance=new Pu),Pu.instance}setItem(t,n){try{sessionStorage.setItem(t,n)}catch(s){console.error("Error setting sessionStorage item:",s)}}getItem(t){try{const n=sessionStorage.getItem(t);return n===null?"":n}catch(n){throw console.error("Error getting sessionStorage item:",n),n}}};es(Pu,"instance");let _n=Pu;const Vg={},Oa={},Z1=(e,t,n,s,o="base64")=>{const i=B(""),r=B(""),a=B(!0),l=Y(()=>`${t}:${e.value.name}`),u=g=>new Promise((v,C)=>{const S=new FileReader;S.onload=()=>v(S.result),S.onerror=C,S.readAsDataURL(g)}),c=g=>`data:image/svg+xml;charset=utf-8,${encodeURIComponent(g)}`,d=async(g,v)=>{if(Oa[v])return Oa[v];if(v in Vg){const b=await Vg[v];return b&&(Oa[v]=b),b}const C=await s(l.value);if(C&&typeof C=="string")return Oa[v]=C,C;const S=(async()=>{try{const b=await fetch(g,{cache:"no-cache"});if(!b.ok)throw new Error("Failed to fetch visual");const w=b.headers.get("Content-Type")||"";let _;if(w.includes("svg")||w.includes("xml")){const R=await b.text();if(!R.trim())throw new Error("Empty SVG content");_=o==="svg"?R:c(R),Oa[v]=_}else if(w.match(/image\/(jpeg|jpg|png|gif|webp)/)){const R=await b.blob();if(!R.size)throw new Error("Empty image blob");_=await u(R),Oa[v]=_}else throw new Error(`Unsupported content type: ${w}`);return await n(l.value,_),_}catch(b){return console.error("Error fetching visual:",b),""}})();return Vg[v]=S,S.finally(()=>{delete Vg[v]}),await S},h=async g=>{a.value=!0;try{if(Oa[l.value]){const _=Oa[l.value];i.value=_,_.startsWith("data:image/svg+xml")?r.value=decodeURIComponent(_.split(",")[1]):(_.startsWith("<svg")||_.includes("<svg"))&&(r.value=_),a.value=!1;return}const v=_n.getInstance().getItem("ASSET_URL")||"",C={icon:`${v}/icon/tess/TESSRAPP_Icon_${g}`,visual:`${v}/icon/visual/TESSRAPP_Visual_${g}`,ratting:`${v}/icon/tess/rating/TESSRAPP_Icon_${g}_Outline`,flag:`${v}/icon/flags/4x3/${g}`},S=u3.includes(g)?"png":c3.includes(g)?"gif":"svg",b=`${C[t]}.${S}`,w=await d(b,l.value);w&&(i.value=w,w.startsWith("data:image/svg+xml")?r.value=decodeURIComponent(w.split(",")[1]):(w.startsWith("<svg")||w.includes("<svg"))&&(r.value=w))}catch(v){console.error("Error fetching remote visual:",v)}finally{a.value=!1}},f=async()=>{i.value="",r.value="",e.value.name&&(a.value=!0,await h(e.value.name),a.value=!1)},p=Y(()=>r.value?r.value:"");return nt(()=>e,()=>{f()},{deep:!0,immediate:!0}),{svgContent:p,url:i,loading:a}},d3=["innerHTML","about"],h3="IconCache",f3="icons",lt=_t(rt({__name:"Icon",props:{src:{},source:{default:"remote"},size:{default:14},color:{default:"currentColor"}},setup(e){jG(h=>({v1555daee:h.size+"px"}));const t=e,n=h=>{if(typeof h=="number")return h;switch(h){case"small":return 14;case"medium":return 14;case"large":return 20;default:return typeof h=="string"?Number.parseInt(h,10):14}},s=Y(()=>n(t.size)),o=Y(()=>({width:s.value+"px",height:s.value+"px",color:t.color})),{getCachedValue:i,setCachedValue:r}=Dh({dbName:h3,storeName:f3}),a=async h=>{const f=await i(h);if(typeof f=="string")return f},l=async(h,f)=>{await r(h,f)},u=Y(()=>t.source==="rating"?"ratting":"icon"),c=Y(()=>({name:t.src,size:s.value,color:t.color||"currentColor"})),{svgContent:d}=Z1(c,u.value,l,a,"svg");return(h,f)=>(j(),ce("div",{class:Q(h.$style.iconWrapper),innerHTML:U(d),style:dn(o.value),about:t.src,"data-icon":"true"},null,14,d3))}}),[["__cssModules",{$style:{iconWrapper:"_iconWrapper_1n0y9_1"}}]]),p3={review:"{reviewDomain}/{ws_code}",review_take:"{reviewDomain}/{ws_code}?id={take_id}",review_scene:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&tab=iteration",review_rendition:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}",review_frame:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}&tab=comment&refresh_marker=true#type=frame&data={frame}",review_rendition_comment:"{reviewDomain}/{ws_code}?scene_id={scene_id}&rendition_id={rendition_id}&comment_id={comment_id}",review_comment:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&comment_id={comment_id}",review_multiple_scenes:"{reviewDomain}/{ws_code}?scene_ids={scene_ids}",scene_hub:"{baseDomain}/{ws_code}/{scene_id}?o=st",hub_rendition:"{baseDomain}/{ws_code}/{scene_id}?o=st&renditionId={rendition_id}",hub_comment:"{baseDomain}/{ws_code}/{scene_id}?o=st&comment_id={comment_id}",people_insight:"{baseDomain}/{ws_code}/{user_id}?o=pt",people_detail:"{baseDomain}/{ws_code}/ws/ppl/{display_name}-${user_id}",project:"{baseDomain}/{ws_code}/pl/dir/{entity_id}",woohoo:"{baseDomain}/{ws_code}/pl/woo/rpt/{woohoo_id}",update:"{baseDomain}/{ws_code}/pl/au?id={entity_id}",core:"{baseDomain}/{ws_code}",project_focusMode:"{baseDomain}/{ws_code}/pl/dir/{parent_id}?f={entity_id}",access_setting:"{baseDomain}/{ws_code}/pl/dir?f={entity_id}&o=as"},Ao=({type:e,config:t})=>{const n=[];try{const s=p3[e];if(!s)throw new Error(`Link template for link type "${e}" not found`);const o=s.replace(/{(.*?)}/g,(i,r)=>{const a=t[String(r)];if(a!==void 0)return a;n.push(r)});return n.length>0?{url:o,hasError:!0,error:`Missing required keys: ${n.join(", ")}`,missingKeys:n}:{url:o,hasError:!1,error:void 0}}catch(s){return console.error("Link Creator ERROR at:",s),{url:"",hasError:!0,error:s instanceof Error?s.message:`Missing required keys: ${n.join(", ")}`}}};var X1=typeof global=="object"&&global&&global.Object===Object&&global,g3=typeof self=="object"&&self&&self.Object===Object&&self,Di=X1||g3||Function("return this")(),Xo=Di.Symbol,J1=Object.prototype,m3=J1.hasOwnProperty,v3=J1.toString,xh=Xo?Xo.toStringTag:void 0;function y3(e){var t=m3.call(e,xh),n=e[xh];try{e[xh]=void 0;var s=!0}catch{}var o=v3.call(e);return s&&(t?e[xh]=n:delete e[xh]),o}var w3=Object.prototype,C3=w3.toString;function b3(e){return C3.call(e)}var S3="[object Null]",E3="[object Undefined]",Q1=Xo?Xo.toStringTag:void 0;function rc(e){return e==null?e===void 0?E3:S3:Q1&&Q1 in Object(e)?y3(e):b3(e)}function jr(e){return e!=null&&typeof e=="object"}var _3="[object Symbol]";function Bg(e){return typeof e=="symbol"||jr(e)&&rc(e)==_3}function R3(e,t){for(var n=-1,s=e==null?0:e.length,o=Array(s);++n<s;)o[n]=t(e[n],n,e);return o}var Jo=Array.isArray,eI=Xo?Xo.prototype:void 0,tI=eI?eI.toString:void 0;function nI(e){if(typeof e=="string")return e;if(Jo(e))return R3(e,nI)+"";if(Bg(e))return tI?tI.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var D3=/\s/;function T3(e){for(var t=e.length;t--&&D3.test(e.charAt(t)););return t}var I3=/^\s+/;function x3(e){return e&&e.slice(0,T3(e)+1).replace(I3,"")}function Ma(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var sI=NaN,F3=/^[-+]0x[0-9a-f]+$/i,P3=/^0b[01]+$/i,A3=/^0o[0-7]+$/i,k3=parseInt;function RC(e){if(typeof e=="number")return e;if(Bg(e))return sI;if(Ma(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ma(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=x3(e);var n=P3.test(e);return n||A3.test(e)?k3(e.slice(2),n?2:8):F3.test(e)?sI:+e}var oI=1/0,O3=17976931348623157e292;function M3(e){if(!e)return e===0?e:0;if(e=RC(e),e===oI||e===-oI){var t=e<0?-1:1;return t*O3}return e===e?e:0}function N3(e){var t=M3(e),n=t%1;return t===t?n?t-n:t:0}function DC(e){return e}var L3="[object AsyncFunction]",V3="[object Function]",B3="[object GeneratorFunction]",$3="[object Proxy]";function iI(e){if(!Ma(e))return!1;var t=rc(e);return t==V3||t==B3||t==L3||t==$3}var TC=Di["__core-js_shared__"],rI=function(){var e=/[^.]+$/.exec(TC&&TC.keys&&TC.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function H3(e){return!!rI&&rI in e}var G3=Function.prototype,U3=G3.toString;function Hl(e){if(e!=null){try{return U3.call(e)}catch{}try{return e+""}catch{}}return""}var W3=/[\\^$.*+?()[\]{}|]/g,z3=/^\[object .+?Constructor\]$/,j3=Function.prototype,K3=Object.prototype,q3=j3.toString,Y3=K3.hasOwnProperty,Z3=RegExp("^"+q3.call(Y3).replace(W3,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function X3(e){if(!Ma(e)||H3(e))return!1;var t=iI(e)?Z3:z3;return t.test(Hl(e))}function J3(e,t){return e==null?void 0:e[t]}function Gl(e,t){var n=J3(e,t);return X3(n)?n:void 0}var IC=Gl(Di,"WeakMap"),aI=Object.create,Q3=function(){function e(){}return function(t){if(!Ma(t))return{};if(aI)return aI(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function e6(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function t6(){}var n6=800,s6=16,o6=Date.now;function i6(e){var t=0,n=0;return function(){var s=o6(),o=s6-(s-n);if(n=s,o>0){if(++t>=n6)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function r6(e){return function(){return e}}var $g=function(){try{var e=Gl(Object,"defineProperty");return e({},"",{}),e}catch{}}(),a6=$g?function(e,t){return $g(e,"toString",{configurable:!0,enumerable:!1,value:r6(t),writable:!0})}:DC,l6=i6(a6);function u6(e,t){for(var n=-1,s=e==null?0:e.length;++n<s&&t(e[n],n,e)!==!1;);return e}function c6(e,t,n,s){for(var o=e.length,i=n+-1;++i<o;)if(t(e[i],i,e))return i;return-1}function d6(e){return e!==e}function h6(e,t,n){for(var s=n-1,o=e.length;++s<o;)if(e[s]===t)return s;return-1}function f6(e,t,n){return t===t?h6(e,t,n):c6(e,d6,n)}function p6(e,t){var n=e==null?0:e.length;return!!n&&f6(e,t,0)>-1}var g6=9007199254740991,m6=/^(?:0|[1-9]\d*)$/;function lI(e,t){var n=typeof e;return t=t??g6,!!t&&(n=="number"||n!="symbol"&&m6.test(e))&&e>-1&&e%1==0&&e<t}function v6(e,t,n){t=="__proto__"&&$g?$g(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function xC(e,t){return e===t||e!==e&&t!==t}var y6=Object.prototype,w6=y6.hasOwnProperty;function C6(e,t,n){var s=e[t];(!(w6.call(e,t)&&xC(s,n))||n===void 0&&!(t in e))&&v6(e,t,n)}var uI=Math.max;function b6(e,t,n){return t=uI(t===void 0?e.length-1:t,0),function(){for(var s=arguments,o=-1,i=uI(s.length-t,0),r=Array(i);++o<i;)r[o]=s[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=s[o];return a[t]=n(r),e6(e,this,a)}}function S6(e,t){return l6(b6(e,t,DC),e+"")}var E6=9007199254740991;function FC(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=E6}function PC(e){return e!=null&&FC(e.length)&&!iI(e)}var _6=Object.prototype;function AC(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||_6;return e===n}function R6(e,t){for(var n=-1,s=Array(e);++n<e;)s[n]=t(n);return s}var D6="[object Arguments]";function cI(e){return jr(e)&&rc(e)==D6}var dI=Object.prototype,T6=dI.hasOwnProperty,I6=dI.propertyIsEnumerable,Hg=cI(function(){return arguments}())?cI:function(e){return jr(e)&&T6.call(e,"callee")&&!I6.call(e,"callee")};function x6(){return!1}var hI=typeof On=="object"&&On&&!On.nodeType&&On,fI=hI&&typeof module=="object"&&module&&!module.nodeType&&module,F6=fI&&fI.exports===hI,pI=F6?Di.Buffer:void 0,P6=pI?pI.isBuffer:void 0,Fh=P6||x6,A6="[object Arguments]",k6="[object Array]",O6="[object Boolean]",M6="[object Date]",N6="[object Error]",L6="[object Function]",V6="[object Map]",B6="[object Number]",$6="[object Object]",H6="[object RegExp]",G6="[object Set]",U6="[object String]",W6="[object WeakMap]",z6="[object ArrayBuffer]",j6="[object DataView]",K6="[object Float32Array]",q6="[object Float64Array]",Y6="[object Int8Array]",Z6="[object Int16Array]",X6="[object Int32Array]",J6="[object Uint8Array]",Q6="[object Uint8ClampedArray]",e4="[object Uint16Array]",t4="[object Uint32Array]",Ln={};Ln[K6]=Ln[q6]=Ln[Y6]=Ln[Z6]=Ln[X6]=Ln[J6]=Ln[Q6]=Ln[e4]=Ln[t4]=!0,Ln[A6]=Ln[k6]=Ln[z6]=Ln[O6]=Ln[j6]=Ln[M6]=Ln[N6]=Ln[L6]=Ln[V6]=Ln[B6]=Ln[$6]=Ln[H6]=Ln[G6]=Ln[U6]=Ln[W6]=!1;function n4(e){return jr(e)&&FC(e.length)&&!!Ln[rc(e)]}function kC(e){return function(t){return e(t)}}var gI=typeof On=="object"&&On&&!On.nodeType&&On,Ph=gI&&typeof module=="object"&&module&&!module.nodeType&&module,s4=Ph&&Ph.exports===gI,OC=s4&&X1.process,ac=function(){try{var e=Ph&&Ph.require&&Ph.require("util").types;return e||OC&&OC.binding&&OC.binding("util")}catch{}}(),mI=ac&&ac.isTypedArray,MC=mI?kC(mI):n4,o4=Object.prototype,i4=o4.hasOwnProperty;function r4(e,t){var n=Jo(e),s=!n&&Hg(e),o=!n&&!s&&Fh(e),i=!n&&!s&&!o&&MC(e),r=n||s||o||i,a=r?R6(e.length,String):[],l=a.length;for(var u in e)i4.call(e,u)&&!(r&&(u=="length"||o&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||lI(u,l)))&&a.push(u);return a}function vI(e,t){return function(n){return e(t(n))}}var a4=vI(Object.keys,Object),l4=Object.prototype,u4=l4.hasOwnProperty;function yI(e){if(!AC(e))return a4(e);var t=[];for(var n in Object(e))u4.call(e,n)&&n!="constructor"&&t.push(n);return t}function wI(e){return PC(e)?r4(e):yI(e)}var c4=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d4=/^\w*$/;function NC(e,t){if(Jo(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Bg(e)?!0:d4.test(e)||!c4.test(e)||t!=null&&e in Object(t)}var Ah=Gl(Object,"create");function h4(){this.__data__=Ah?Ah(null):{},this.size=0}function f4(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var p4="__lodash_hash_undefined__",g4=Object.prototype,m4=g4.hasOwnProperty;function v4(e){var t=this.__data__;if(Ah){var n=t[e];return n===p4?void 0:n}return m4.call(t,e)?t[e]:void 0}var y4=Object.prototype,w4=y4.hasOwnProperty;function C4(e){var t=this.__data__;return Ah?t[e]!==void 0:w4.call(t,e)}var b4="__lodash_hash_undefined__";function S4(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ah&&t===void 0?b4:t,this}function Ul(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}Ul.prototype.clear=h4,Ul.prototype.delete=f4,Ul.prototype.get=v4,Ul.prototype.has=C4,Ul.prototype.set=S4;function E4(){this.__data__=[],this.size=0}function Gg(e,t){for(var n=e.length;n--;)if(xC(e[n][0],t))return n;return-1}var _4=Array.prototype,R4=_4.splice;function D4(e){var t=this.__data__,n=Gg(t,e);if(n<0)return!1;var s=t.length-1;return n==s?t.pop():R4.call(t,n,1),--this.size,!0}function T4(e){var t=this.__data__,n=Gg(t,e);return n<0?void 0:t[n][1]}function I4(e){return Gg(this.__data__,e)>-1}function x4(e,t){var n=this.__data__,s=Gg(n,e);return s<0?(++this.size,n.push([e,t])):n[s][1]=t,this}function Kr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}Kr.prototype.clear=E4,Kr.prototype.delete=D4,Kr.prototype.get=T4,Kr.prototype.has=I4,Kr.prototype.set=x4;var kh=Gl(Di,"Map");function F4(){this.size=0,this.__data__={hash:new Ul,map:new(kh||Kr),string:new Ul}}function P4(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ug(e,t){var n=e.__data__;return P4(t)?n[typeof t=="string"?"string":"hash"]:n.map}function A4(e){var t=Ug(this,e).delete(e);return this.size-=t?1:0,t}function k4(e){return Ug(this,e).get(e)}function O4(e){return Ug(this,e).has(e)}function M4(e,t){var n=Ug(this,e),s=n.size;return n.set(e,t),this.size+=n.size==s?0:1,this}function qr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}qr.prototype.clear=F4,qr.prototype.delete=A4,qr.prototype.get=k4,qr.prototype.has=O4,qr.prototype.set=M4;var N4="Expected a function";function LC(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(N4);var n=function(){var s=arguments,o=t?t.apply(this,s):s[0],i=n.cache;if(i.has(o))return i.get(o);var r=e.apply(this,s);return n.cache=i.set(o,r)||i,r};return n.cache=new(LC.Cache||qr),n}LC.Cache=qr;var L4=500;function V4(e){var t=LC(e,function(s){return n.size===L4&&n.clear(),s}),n=t.cache;return t}var B4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$4=/\\(\\)?/g,H4=V4(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(B4,function(n,s,o,i){t.push(o?i.replace($4,"$1"):s||n)}),t});function G4(e){return e==null?"":nI(e)}function CI(e,t){return Jo(e)?e:NC(e,t)?[e]:H4(G4(e))}function Wg(e){if(typeof e=="string"||Bg(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function bI(e,t){t=CI(t,e);for(var n=0,s=t.length;e!=null&&n<s;)e=e[Wg(t[n++])];return n&&n==s?e:void 0}function U4(e,t,n){var s=e==null?void 0:bI(e,t);return s===void 0?n:s}function SI(e,t){for(var n=-1,s=t.length,o=e.length;++n<s;)e[o+n]=t[n];return e}var EI=Xo?Xo.isConcatSpreadable:void 0;function W4(e){return Jo(e)||Hg(e)||!!(EI&&e&&e[EI])}function z4(e,t,n,s,o){var i=-1,r=e.length;for(n||(n=W4),o||(o=[]);++i<r;){var a=e[i];n(a)&&SI(o,a)}return o}var j4=vI(Object.getPrototypeOf,Object);function K4(e,t,n){var s=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++s<o;)i[s]=e[s+t];return i}var q4=Math.ceil,Y4=Math.max;function Z4(e,t,n){t===void 0?t=1:t=Y4(N3(t),0);var s=e==null?0:e.length;if(!s||t<1)return[];for(var o=0,i=0,r=Array(q4(s/t));o<s;)r[i++]=K4(e,o,o+=t);return r}function X4(){this.__data__=new Kr,this.size=0}function J4(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Q4(e){return this.__data__.get(e)}function e5(e){return this.__data__.has(e)}var t5=200;function n5(e,t){var n=this.__data__;if(n instanceof Kr){var s=n.__data__;if(!kh||s.length<t5-1)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new qr(s)}return n.set(e,t),this.size=n.size,this}function or(e){var t=this.__data__=new Kr(e);this.size=t.size}or.prototype.clear=X4,or.prototype.delete=J4,or.prototype.get=Q4,or.prototype.has=e5,or.prototype.set=n5;var _I=typeof On=="object"&&On&&!On.nodeType&&On,RI=_I&&typeof module=="object"&&module&&!module.nodeType&&module,s5=RI&&RI.exports===_I,DI=s5?Di.Buffer:void 0;DI&&DI.allocUnsafe;function o5(e,t){return e.slice()}function i5(e,t){for(var n=-1,s=e==null?0:e.length,o=0,i=[];++n<s;){var r=e[n];t(r,n,e)&&(i[o++]=r)}return i}function r5(){return[]}var a5=Object.prototype,l5=a5.propertyIsEnumerable,TI=Object.getOwnPropertySymbols,u5=TI?function(e){return e==null?[]:(e=Object(e),i5(TI(e),function(t){return l5.call(e,t)}))}:r5;function c5(e,t,n){var s=t(e);return Jo(e)?s:SI(s,n(e))}function VC(e){return c5(e,wI,u5)}var BC=Gl(Di,"DataView"),$C=Gl(Di,"Promise"),lc=Gl(Di,"Set"),II="[object Map]",d5="[object Object]",xI="[object Promise]",FI="[object Set]",PI="[object WeakMap]",AI="[object DataView]",h5=Hl(BC),f5=Hl(kh),p5=Hl($C),g5=Hl(lc),m5=Hl(IC),Qo=rc;(BC&&Qo(new BC(new ArrayBuffer(1)))!=AI||kh&&Qo(new kh)!=II||$C&&Qo($C.resolve())!=xI||lc&&Qo(new lc)!=FI||IC&&Qo(new IC)!=PI)&&(Qo=function(e){var t=rc(e),n=t==d5?e.constructor:void 0,s=n?Hl(n):"";if(s)switch(s){case h5:return AI;case f5:return II;case p5:return xI;case g5:return FI;case m5:return PI}return t});var v5=Object.prototype,y5=v5.hasOwnProperty;function w5(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&y5.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var zg=Di.Uint8Array;function HC(e){var t=new e.constructor(e.byteLength);return new zg(t).set(new zg(e)),t}function C5(e,t){var n=HC(e.buffer);return new e.constructor(n,e.byteOffset,e.byteLength)}var b5=/\w*$/;function S5(e){var t=new e.constructor(e.source,b5.exec(e));return t.lastIndex=e.lastIndex,t}var kI=Xo?Xo.prototype:void 0,OI=kI?kI.valueOf:void 0;function E5(e){return OI?Object(OI.call(e)):{}}function _5(e,t){var n=HC(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}var R5="[object Boolean]",D5="[object Date]",T5="[object Map]",I5="[object Number]",x5="[object RegExp]",F5="[object Set]",P5="[object String]",A5="[object Symbol]",k5="[object ArrayBuffer]",O5="[object DataView]",M5="[object Float32Array]",N5="[object Float64Array]",L5="[object Int8Array]",V5="[object Int16Array]",B5="[object Int32Array]",$5="[object Uint8Array]",H5="[object Uint8ClampedArray]",G5="[object Uint16Array]",U5="[object Uint32Array]";function W5(e,t,n){var s=e.constructor;switch(t){case k5:return HC(e);case R5:case D5:return new s(+e);case O5:return C5(e);case M5:case N5:case L5:case V5:case B5:case $5:case H5:case G5:case U5:return _5(e);case T5:return new s;case I5:case P5:return new s(e);case x5:return S5(e);case F5:return new s;case A5:return E5(e)}}function z5(e){return typeof e.constructor=="function"&&!AC(e)?Q3(j4(e)):{}}var j5="[object Map]";function K5(e){return jr(e)&&Qo(e)==j5}var MI=ac&&ac.isMap,q5=MI?kC(MI):K5,Y5="[object Set]";function Z5(e){return jr(e)&&Qo(e)==Y5}var NI=ac&&ac.isSet,X5=NI?kC(NI):Z5,LI="[object Arguments]",J5="[object Array]",Q5="[object Boolean]",e8="[object Date]",t8="[object Error]",VI="[object Function]",n8="[object GeneratorFunction]",s8="[object Map]",o8="[object Number]",BI="[object Object]",i8="[object RegExp]",r8="[object Set]",a8="[object String]",l8="[object Symbol]",u8="[object WeakMap]",c8="[object ArrayBuffer]",d8="[object DataView]",h8="[object Float32Array]",f8="[object Float64Array]",p8="[object Int8Array]",g8="[object Int16Array]",m8="[object Int32Array]",v8="[object Uint8Array]",y8="[object Uint8ClampedArray]",w8="[object Uint16Array]",C8="[object Uint32Array]",Fn={};Fn[LI]=Fn[J5]=Fn[c8]=Fn[d8]=Fn[Q5]=Fn[e8]=Fn[h8]=Fn[f8]=Fn[p8]=Fn[g8]=Fn[m8]=Fn[s8]=Fn[o8]=Fn[BI]=Fn[i8]=Fn[r8]=Fn[a8]=Fn[l8]=Fn[v8]=Fn[y8]=Fn[w8]=Fn[C8]=!0,Fn[t8]=Fn[VI]=Fn[u8]=!1;function jg(e,t,n,s,o,i){var r;if(r!==void 0)return r;if(!Ma(e))return e;var a=Jo(e);if(a)r=w5(e);else{var l=Qo(e),u=l==VI||l==n8;if(Fh(e))return o5(e);if(l==BI||l==LI||u&&!o)r=u?{}:z5(e);else{if(!Fn[l])return o?e:{};r=W5(e,l)}}i||(i=new or);var c=i.get(e);if(c)return c;i.set(e,r),X5(e)?e.forEach(function(f){r.add(jg(f,t,n,f,e,i))}):q5(e)&&e.forEach(function(f,p){r.set(p,jg(f,t,n,p,e,i))});var d=VC,h=a?void 0:d(e);return u6(h||e,function(f,p){h&&(p=f,f=e[p]),C6(r,p,jg(f,t,n,p,e,i))}),r}var b8=1,S8=4;function $I(e){return jg(e,b8|S8)}var E8="__lodash_hash_undefined__";function _8(e){return this.__data__.set(e,E8),this}function R8(e){return this.__data__.has(e)}function Oh(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new qr;++t<n;)this.add(e[t])}Oh.prototype.add=Oh.prototype.push=_8,Oh.prototype.has=R8;function D8(e,t){for(var n=-1,s=e==null?0:e.length;++n<s;)if(t(e[n],n,e))return!0;return!1}function HI(e,t){return e.has(t)}var T8=1,I8=2;function GI(e,t,n,s,o,i){var r=n&T8,a=e.length,l=t.length;if(a!=l&&!(r&&l>a))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,h=!0,f=n&I8?new Oh:void 0;for(i.set(e,t),i.set(t,e);++d<a;){var p=e[d],g=t[d];if(s)var v=r?s(g,p,d,t,e,i):s(p,g,d,e,t,i);if(v!==void 0){if(v)continue;h=!1;break}if(f){if(!D8(t,function(C,S){if(!HI(f,S)&&(p===C||o(p,C,n,s,i)))return f.push(S)})){h=!1;break}}else if(!(p===g||o(p,g,n,s,i))){h=!1;break}}return i.delete(e),i.delete(t),h}function x8(e){var t=-1,n=Array(e.size);return e.forEach(function(s,o){n[++t]=[o,s]}),n}function GC(e){var t=-1,n=Array(e.size);return e.forEach(function(s){n[++t]=s}),n}var F8=1,P8=2,A8="[object Boolean]",k8="[object Date]",O8="[object Error]",M8="[object Map]",N8="[object Number]",L8="[object RegExp]",V8="[object Set]",B8="[object String]",$8="[object Symbol]",H8="[object ArrayBuffer]",G8="[object DataView]",UI=Xo?Xo.prototype:void 0,UC=UI?UI.valueOf:void 0;function U8(e,t,n,s,o,i,r){switch(n){case G8:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case H8:return!(e.byteLength!=t.byteLength||!i(new zg(e),new zg(t)));case A8:case k8:case N8:return xC(+e,+t);case O8:return e.name==t.name&&e.message==t.message;case L8:case B8:return e==t+"";case M8:var a=x8;case V8:var l=s&F8;if(a||(a=GC),e.size!=t.size&&!l)return!1;var u=r.get(e);if(u)return u==t;s|=P8,r.set(e,t);var c=GI(a(e),a(t),s,o,i,r);return r.delete(e),c;case $8:if(UC)return UC.call(e)==UC.call(t)}return!1}var W8=1,z8=Object.prototype,j8=z8.hasOwnProperty;function K8(e,t,n,s,o,i){var r=n&W8,a=VC(e),l=a.length,u=VC(t),c=u.length;if(l!=c&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in t:j8.call(t,h)))return!1}var f=i.get(e),p=i.get(t);if(f&&p)return f==t&&p==e;var g=!0;i.set(e,t),i.set(t,e);for(var v=r;++d<l;){h=a[d];var C=e[h],S=t[h];if(s)var b=r?s(S,C,h,t,e,i):s(C,S,h,e,t,i);if(!(b===void 0?C===S||o(C,S,n,s,i):b)){g=!1;break}v||(v=h=="constructor")}if(g&&!v){var w=e.constructor,_=t.constructor;w!=_&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof _=="function"&&_ instanceof _)&&(g=!1)}return i.delete(e),i.delete(t),g}var q8=1,WI="[object Arguments]",zI="[object Array]",Kg="[object Object]",Y8=Object.prototype,jI=Y8.hasOwnProperty;function Z8(e,t,n,s,o,i){var r=Jo(e),a=Jo(t),l=r?zI:Qo(e),u=a?zI:Qo(t);l=l==WI?Kg:l,u=u==WI?Kg:u;var c=l==Kg,d=u==Kg,h=l==u;if(h&&Fh(e)){if(!Fh(t))return!1;r=!0,c=!1}if(h&&!c)return i||(i=new or),r||MC(e)?GI(e,t,n,s,o,i):U8(e,t,l,n,s,o,i);if(!(n&q8)){var f=c&&jI.call(e,"__wrapped__"),p=d&&jI.call(t,"__wrapped__");if(f||p){var g=f?e.value():e,v=p?t.value():t;return i||(i=new or),o(g,v,n,s,i)}}return h?(i||(i=new or),K8(e,t,n,s,o,i)):!1}function WC(e,t,n,s,o){return e===t?!0:e==null||t==null||!jr(e)&&!jr(t)?e!==e&&t!==t:Z8(e,t,n,s,WC,o)}var X8=1,J8=2;function Q8(e,t,n,s){var o=n.length,i=o;if(e==null)return!i;for(e=Object(e);o--;){var r=n[o];if(r[2]?r[1]!==e[r[0]]:!(r[0]in e))return!1}for(;++o<i;){r=n[o];var a=r[0],l=e[a],u=r[1];if(r[2]){if(l===void 0&&!(a in e))return!1}else{var c=new or,d;if(!(d===void 0?WC(u,l,X8|J8,s,c):d))return!1}}return!0}function KI(e){return e===e&&!Ma(e)}function ej(e){for(var t=wI(e),n=t.length;n--;){var s=t[n],o=e[s];t[n]=[s,o,KI(o)]}return t}function qI(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function tj(e){var t=ej(e);return t.length==1&&t[0][2]?qI(t[0][0],t[0][1]):function(n){return n===e||Q8(n,e,t)}}function nj(e,t){return e!=null&&t in Object(e)}function sj(e,t,n){t=CI(t,e);for(var s=-1,o=t.length,i=!1;++s<o;){var r=Wg(t[s]);if(!(i=e!=null&&n(e,r)))break;e=e[r]}return i||++s!=o?i:(o=e==null?0:e.length,!!o&&FC(o)&&lI(r,o)&&(Jo(e)||Hg(e)))}function oj(e,t){return e!=null&&sj(e,t,nj)}var ij=1,rj=2;function aj(e,t){return NC(e)&&KI(t)?qI(Wg(e),t):function(n){var s=U4(n,e);return s===void 0&&s===t?oj(n,e):WC(t,s,ij|rj)}}function lj(e){return function(t){return t==null?void 0:t[e]}}function uj(e){return function(t){return bI(t,e)}}function cj(e){return NC(e)?lj(Wg(e)):uj(e)}function dj(e){return typeof e=="function"?e:e==null?DC:typeof e=="object"?Jo(e)?aj(e[0],e[1]):tj(e):cj(e)}var zC=function(){return Di.Date.now()},hj="Expected a function",fj=Math.max,pj=Math.min;function Ti(e,t,n){var s,o,i,r,a,l,u=0,c=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(hj);t=RC(t)||0,Ma(n)&&(c=!!n.leading,d="maxWait"in n,i=d?fj(RC(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function f(R){var T=s,I=o;return s=o=void 0,u=R,r=e.apply(I,T),r}function p(R){return u=R,a=setTimeout(C,t),c?f(R):r}function g(R){var T=R-l,I=R-u,x=t-T;return d?pj(x,i-I):x}function v(R){var T=R-l,I=R-u;return l===void 0||T>=t||T<0||d&&I>=i}function C(){var R=zC();if(v(R))return S(R);a=setTimeout(C,g(R))}function S(R){return a=void 0,h&&s?f(R):(s=o=void 0,r)}function b(){a!==void 0&&clearTimeout(a),u=0,s=l=o=a=void 0}function w(){return a===void 0?r:S(zC())}function _(){var R=zC(),T=v(R);if(s=arguments,o=this,l=R,T){if(a===void 0)return p(l);if(d)return clearTimeout(a),a=setTimeout(C,t),f(l)}return a===void 0&&(a=setTimeout(C,t)),r}return _.cancel=b,_.flush=w,_}function YI(e){return jr(e)&&PC(e)}function gj(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var mj="[object Map]",vj="[object Set]",yj=Object.prototype,wj=yj.hasOwnProperty;function Cj(e){if(e==null)return!0;if(PC(e)&&(Jo(e)||typeof e=="string"||typeof e.splice=="function"||Fh(e)||MC(e)||Hg(e)))return!e.length;var t=Qo(e);if(t==mj||t==vj)return!e.size;if(AC(e))return!yI(e).length;for(var n in e)if(wj.call(e,n))return!1;return!0}var bj=1/0,Sj=lc&&1/GC(new lc([,-0]))[1]==bj?function(e){return new lc(e)}:t6,Ej=200;function _j(e,t,n){var s=-1,o=p6,i=e.length,r=!0,a=[],l=a;if(i>=Ej){var u=t?null:Sj(e);if(u)return GC(u);r=!1,o=HI,l=new Oh}else l=t?[]:a;e:for(;++s<i;){var c=e[s],d=t?t(c):c;if(c=c!==0?c:0,r&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),a.push(c)}else o(l,d,n)||(l!==a&&l.push(d),a.push(c))}return a}var uc=S6(function(e){var t=gj(e);return YI(t)&&(t=void 0),_j(z4(e,1,YI),dj(t))});const ts=(e,t)=>{const n=Yn();return{apiServices:Y(()=>{var r;const o=n==null?void 0:n.appContext.config.globalProperties,i=(r=t.params)==null?void 0:r.context;if(o!=null&&o.apiServices)return o.apiServices;if(e&&(i!=null&&i.apiServices))return i.apiServices})}},Rj=e=>{const t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return t?decodeURIComponent(t[2]):null};let Wl=class extends Error{};class Dj extends Wl{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class Tj extends Wl{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class Ij extends Wl{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class cc extends Wl{}class ZI extends Wl{constructor(t){super(`Invalid unit ${t}`)}}class Bs extends Wl{}let Na=class extends Wl{constructor(){super("Zone is an abstract class")}};const Et="numeric",Ii="short",ko="long",qg={year:Et,month:Et,day:Et},XI={year:Et,month:Ii,day:Et},xj={year:Et,month:Ii,day:Et,weekday:Ii},JI={year:Et,month:ko,day:Et},QI={year:Et,month:ko,day:Et,weekday:ko},ex={hour:Et,minute:Et},tx={hour:Et,minute:Et,second:Et},nx={hour:Et,minute:Et,second:Et,timeZoneName:Ii},sx={hour:Et,minute:Et,second:Et,timeZoneName:ko},ox={hour:Et,minute:Et,hourCycle:"h23"},ix={hour:Et,minute:Et,second:Et,hourCycle:"h23"},rx={hour:Et,minute:Et,second:Et,hourCycle:"h23",timeZoneName:Ii},ax={hour:Et,minute:Et,second:Et,hourCycle:"h23",timeZoneName:ko},lx={year:Et,month:Et,day:Et,hour:Et,minute:Et},ux={year:Et,month:Et,day:Et,hour:Et,minute:Et,second:Et},cx={year:Et,month:Ii,day:Et,hour:Et,minute:Et},dx={year:Et,month:Ii,day:Et,hour:Et,minute:Et,second:Et},Fj={year:Et,month:Ii,day:Et,weekday:Ii,hour:Et,minute:Et},hx={year:Et,month:ko,day:Et,hour:Et,minute:Et,timeZoneName:Ii},fx={year:Et,month:ko,day:Et,hour:Et,minute:Et,second:Et,timeZoneName:Ii},px={year:Et,month:ko,day:Et,weekday:ko,hour:Et,minute:Et,timeZoneName:ko},gx={year:Et,month:ko,day:Et,weekday:ko,hour:Et,minute:Et,second:Et,timeZoneName:ko};let Mh=class{get type(){throw new Na}get name(){throw new Na}get ianaName(){return this.name}get isUniversal(){throw new Na}offsetName(t,n){throw new Na}formatOffset(t,n){throw new Na}offset(t){throw new Na}equals(t){throw new Na}get isValid(){throw new Na}},jC=null;class Yg extends Mh{static get instance(){return jC===null&&(jC=new Yg),jC}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:s}){return Hx(t,n,s)}formatOffset(t,n){return Bh(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}const KC=new Map;function Pj(e){let t=KC.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),KC.set(e,t)),t}const Aj={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function kj(e,t){const n=e.format(t).replace(/\u200E/g,""),s=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,r,a,l,u,c]=s;return[r,o,i,a,l,u,c]}function Oj(e,t){const n=e.formatToParts(t),s=[];for(let o=0;o<n.length;o++){const{type:i,value:r}=n[o],a=Aj[i];i==="era"?s[a]=r:$t(a)||(s[a]=parseInt(r,10))}return s}const qC=new Map;let dc=class Q_ extends Mh{static create(t){let n=qC.get(t);return n===void 0&&qC.set(t,n=new Q_(t)),n}static resetCache(){qC.clear(),KC.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=Q_.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:s}){return Hx(t,n,s,this.name)}formatOffset(t,n){return Bh(this.offset(t),n)}offset(t){if(!this.valid)return NaN;const n=new Date(t);if(isNaN(n))return NaN;const s=Pj(this.name);let[o,i,r,a,l,u,c]=s.formatToParts?Oj(s,n):kj(s,n);a==="BC"&&(o=-Math.abs(o)+1);const h=em({year:o,month:i,day:r,hour:l===24?0:l,minute:u,second:c,millisecond:0});let f=+n;const p=f%1e3;return f-=p>=0?p:1e3+p,(h-f)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}},mx={};function Mj(e,t={}){const n=JSON.stringify([e,t]);let s=mx[n];return s||(s=new Intl.ListFormat(e,t),mx[n]=s),s}const YC=new Map;function ZC(e,t={}){const n=JSON.stringify([e,t]);let s=YC.get(n);return s===void 0&&(s=new Intl.DateTimeFormat(e,t),YC.set(n,s)),s}const XC=new Map;function Nj(e,t={}){const n=JSON.stringify([e,t]);let s=XC.get(n);return s===void 0&&(s=new Intl.NumberFormat(e,t),XC.set(n,s)),s}const JC=new Map;function Lj(e,t={}){const{base:n,...s}=t,o=JSON.stringify([e,s]);let i=JC.get(o);return i===void 0&&(i=new Intl.RelativeTimeFormat(e,t),JC.set(o,i)),i}let Nh=null;function Vj(){return Nh||(Nh=new Intl.DateTimeFormat().resolvedOptions().locale,Nh)}const QC=new Map;function vx(e){let t=QC.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),QC.set(e,t)),t}const eb=new Map;function Bj(e){let t=eb.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...yx,...t}),eb.set(e,t)}return t}function $j(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let s,o;try{s=ZC(e).resolvedOptions(),o=e}catch{const l=e.substring(0,n);s=ZC(l).resolvedOptions(),o=l}const{numberingSystem:i,calendar:r}=s;return[o,i,r]}}function Hj(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function Gj(e){const t=[];for(let n=1;n<=12;n++){const s=bt.utc(2009,n,1);t.push(e(s))}return t}function Uj(e){const t=[];for(let n=1;n<=7;n++){const s=bt.utc(2016,11,13+n);t.push(e(s))}return t}function Zg(e,t,n,s){const o=e.listingMode();return o==="error"?null:o==="en"?n(t):s(t)}function Wj(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||vx(e.locale).numberingSystem==="latn"}class zj{constructor(t,n,s){this.padTo=s.padTo||0,this.floor=s.floor||!1;const{padTo:o,floor:i,...r}=s;if(!n||Object.keys(r).length>0){const a={useGrouping:!1,...s};s.padTo>0&&(a.minimumIntegerDigits=s.padTo),this.inf=Nj(t,a)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):ub(t,3);return ds(n,this.padTo)}}}class jj{constructor(t,n,s){this.opts=s,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const r=-1*(t.offset/60),a=r>=0?`Etc/GMT+${r}`:`Etc/GMT${r}`;t.offset!==0&&dc.create(a).valid?(o=a,this.dt=t):(o="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,o=t.zone.name):(o="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const i={...this.opts};i.timeZone=i.timeZone||o,this.dtf=ZC(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const s=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:s}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class Kj{constructor(t,n,s){this.opts={style:"long",...s},!n&&Lx()&&(this.rtf=Lj(t,s))}format(t,n){return this.rtf?this.rtf.format(t,n):g7(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const yx={firstDay:1,minimalDays:4,weekend:[6,7]};class bn{static fromOpts(t){return bn.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,s,o,i=!1){const r=t||Zn.defaultLocale,a=r||(i?"en-US":Vj()),l=n||Zn.defaultNumberingSystem,u=s||Zn.defaultOutputCalendar,c=ab(o)||Zn.defaultWeekSettings;return new bn(a,l,u,c,r)}static resetCache(){Nh=null,YC.clear(),XC.clear(),JC.clear(),QC.clear(),eb.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:s,weekSettings:o}={}){return bn.create(t,n,s,o)}constructor(t,n,s,o,i){const[r,a,l]=$j(t);this.locale=r,this.numberingSystem=n||a||null,this.outputCalendar=s||l||null,this.weekSettings=o,this.intl=Hj(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Wj(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:bn.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,ab(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return Zg(this,t,Wx,()=>{const s=this.intl==="ja"||this.intl.startsWith("ja-");n&=!s;const o=n?{month:t,day:"numeric"}:{month:t},i=n?"format":"standalone";if(!this.monthsCache[i][t]){const r=s?a=>this.dtFormatter(a,o).format():a=>this.extract(a,o,"month");this.monthsCache[i][t]=Gj(r)}return this.monthsCache[i][t]})}weekdays(t,n=!1){return Zg(this,t,Kx,()=>{const s=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=Uj(i=>this.extract(i,s,"weekday"))),this.weekdaysCache[o][t]})}meridiems(){return Zg(this,void 0,()=>qx,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[bt.utc(2016,11,13,9),bt.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return Zg(this,t,Yx,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[bt.utc(-40,1,1),bt.utc(2017,1,1)].map(s=>this.extract(s,n,"era"))),this.eraCache[t]})}extract(t,n,s){const o=this.dtFormatter(t,n),i=o.formatToParts(),r=i.find(a=>a.type.toLowerCase()===s);return r?r.value:null}numberFormatter(t={}){return new zj(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new jj(t,this.intl,n)}relFormatter(t={}){return new Kj(this.intl,this.isEnglish(),t)}listFormatter(t={}){return Mj(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||vx(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Vx()?Bj(this.locale):yx}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let tb=null,ir=class Tp extends Mh{static get utcInstance(){return tb===null&&(tb=new Tp(0)),tb}static instance(t){return t===0?Tp.utcInstance:new Tp(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Tp(tm(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Bh(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Bh(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Bh(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}};class qj extends Mh{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function La(e,t){if($t(e)||e===null)return t;if(e instanceof Mh)return e;if(e7(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?Yg.instance:n==="utc"||n==="gmt"?ir.utcInstance:ir.parseSpecifier(n)||dc.create(e)}else return Va(e)?ir.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new qj(e)}const nb={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},wx={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Yj=nb.hanidec.replace(/[\[|\]]/g,"").split("");function Zj(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const s=e.charCodeAt(n);if(e[n].search(nb.hanidec)!==-1)t+=Yj.indexOf(e[n]);else for(const o in wx){const[i,r]=wx[o];s>=i&&s<=r&&(t+=s-i)}}return parseInt(t,10)}else return t}const sb=new Map;function Xj(){sb.clear()}function xi({numberingSystem:e},t=""){const n=e||"latn";let s=sb.get(n);s===void 0&&(s=new Map,sb.set(n,s));let o=s.get(t);return o===void 0&&(o=new RegExp(`${nb[n]}${t}`),s.set(t,o)),o}let Cx=()=>Date.now(),bx="system",Sx=null,Ex=null,_x=null,Rx=60,Dx,Tx=null;class Zn{static get now(){return Cx}static set now(t){Cx=t}static set defaultZone(t){bx=t}static get defaultZone(){return La(bx,Yg.instance)}static get defaultLocale(){return Sx}static set defaultLocale(t){Sx=t}static get defaultNumberingSystem(){return Ex}static set defaultNumberingSystem(t){Ex=t}static get defaultOutputCalendar(){return _x}static set defaultOutputCalendar(t){_x=t}static get defaultWeekSettings(){return Tx}static set defaultWeekSettings(t){Tx=ab(t)}static get twoDigitCutoffYear(){return Rx}static set twoDigitCutoffYear(t){Rx=t%100}static get throwOnInvalid(){return Dx}static set throwOnInvalid(t){Dx=t}static resetCaches(){bn.resetCache(),dc.resetCache(),bt.resetCache(),Xj()}}class Fi{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Ix=[0,31,59,90,120,151,181,212,243,273,304,334],xx=[0,31,60,91,121,152,182,213,244,274,305,335];function ei(e,t){return new Fi("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function ob(e,t,n){const s=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&s.setUTCFullYear(s.getUTCFullYear()-1900);const o=s.getUTCDay();return o===0?7:o}function Fx(e,t,n){return n+(Lh(e)?xx:Ix)[t-1]}function Px(e,t){const n=Lh(e)?xx:Ix,s=n.findIndex(i=>i<t),o=t-n[s];return{month:s+1,day:o}}function ib(e,t){return(e-t+7)%7+1}function Xg(e,t=4,n=1){const{year:s,month:o,day:i}=e,r=Fx(s,o,i),a=ib(ob(s,o,i),n);let l=Math.floor((r-a+14-t)/7),u;return l<1?(u=s-1,l=Vh(u,t,n)):l>Vh(s,t,n)?(u=s+1,l=1):u=s,{weekYear:u,weekNumber:l,weekday:a,...sm(e)}}function Ax(e,t=4,n=1){const{weekYear:s,weekNumber:o,weekday:i}=e,r=ib(ob(s,1,t),n),a=fc(s);let l=o*7+i-r-7+t,u;l<1?(u=s-1,l+=fc(u)):l>a?(u=s+1,l-=fc(s)):u=s;const{month:c,day:d}=Px(u,l);return{year:u,month:c,day:d,...sm(e)}}function rb(e){const{year:t,month:n,day:s}=e,o=Fx(t,n,s);return{year:t,ordinal:o,...sm(e)}}function kx(e){const{year:t,ordinal:n}=e,{month:s,day:o}=Px(t,n);return{year:t,month:s,day:o,...sm(e)}}function Ox(e,t){if(!$t(e.localWeekday)||!$t(e.localWeekNumber)||!$t(e.localWeekYear)){if(!$t(e.weekday)||!$t(e.weekNumber)||!$t(e.weekYear))throw new cc("Cannot mix locale-based week fields with ISO-based week fields");return $t(e.localWeekday)||(e.weekday=e.localWeekday),$t(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),$t(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Jj(e,t=4,n=1){const s=Jg(e.weekYear),o=ti(e.weekNumber,1,Vh(e.weekYear,t,n)),i=ti(e.weekday,1,7);return s?o?i?!1:ei("weekday",e.weekday):ei("week",e.weekNumber):ei("weekYear",e.weekYear)}function Qj(e){const t=Jg(e.year),n=ti(e.ordinal,1,fc(e.year));return t?n?!1:ei("ordinal",e.ordinal):ei("year",e.year)}function Mx(e){const t=Jg(e.year),n=ti(e.month,1,12),s=ti(e.day,1,Qg(e.year,e.month));return t?n?s?!1:ei("day",e.day):ei("month",e.month):ei("year",e.year)}function Nx(e){const{hour:t,minute:n,second:s,millisecond:o}=e,i=ti(t,0,23)||t===24&&n===0&&s===0&&o===0,r=ti(n,0,59),a=ti(s,0,59),l=ti(o,0,999);return i?r?a?l?!1:ei("millisecond",o):ei("second",s):ei("minute",n):ei("hour",t)}function $t(e){return typeof e>"u"}function Va(e){return typeof e=="number"}function Jg(e){return typeof e=="number"&&e%1===0}function e7(e){return typeof e=="string"}function t7(e){return Object.prototype.toString.call(e)==="[object Date]"}function Lx(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Vx(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function n7(e){return Array.isArray(e)?e:[e]}function Bx(e,t,n){if(e.length!==0)return e.reduce((s,o)=>{const i=[t(o),o];return s&&n(s[0],i[0])===s[0]?s:i},null)[1]}function s7(e,t){return t.reduce((n,s)=>(n[s]=e[s],n),{})}function hc(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ab(e){if(e==null)return null;if(typeof e!="object")throw new Bs("Week settings must be an object");if(!ti(e.firstDay,1,7)||!ti(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!ti(t,1,7)))throw new Bs("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function ti(e,t,n){return Jg(e)&&e>=t&&e<=n}function o7(e,t){return e-t*Math.floor(e/t)}function ds(e,t=2){const n=e<0;let s;return n?s="-"+(""+-e).padStart(t,"0"):s=(""+e).padStart(t,"0"),s}function Ba(e){if(!($t(e)||e===null||e===""))return parseInt(e,10)}function zl(e){if(!($t(e)||e===null||e===""))return parseFloat(e)}function lb(e){if(!($t(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function ub(e,t,n="round"){const s=10**t;switch(n){case"expand":return e>0?Math.ceil(e*s)/s:Math.floor(e*s)/s;case"trunc":return Math.trunc(e*s)/s;case"round":return Math.round(e*s)/s;case"floor":return Math.floor(e*s)/s;case"ceil":return Math.ceil(e*s)/s;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function Lh(e){return e%4===0&&(e%100!==0||e%400===0)}function fc(e){return Lh(e)?366:365}function Qg(e,t){const n=o7(t-1,12)+1,s=e+(t-n)/12;return n===2?Lh(s)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function em(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function $x(e,t,n){return-ib(ob(e,1,t),n)+t-1}function Vh(e,t=4,n=1){const s=$x(e,t,n),o=$x(e+1,t,n);return(fc(e)-s+o)/7}function cb(e){return e>99?e:e>Zn.twoDigitCutoffYear?1900+e:2e3+e}function Hx(e,t,n,s=null){const o=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};s&&(i.timeZone=s);const r={timeZoneName:t,...i},a=new Intl.DateTimeFormat(n,r).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function tm(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const s=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-s:s;return n*60+o}function Gx(e){const t=Number(e);if(typeof e=="boolean"||e===""||!Number.isFinite(t))throw new Bs(`Invalid unit value ${e}`);return t}function nm(e,t){const n={};for(const s in e)if(hc(e,s)){const o=e[s];if(o==null)continue;n[t(s)]=Gx(o)}return n}function Bh(e,t){const n=Math.trunc(Math.abs(e/60)),s=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${ds(n,2)}:${ds(s,2)}`;case"narrow":return`${o}${n}${s>0?`:${s}`:""}`;case"techie":return`${o}${ds(n,2)}${ds(s,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function sm(e){return s7(e,["hour","minute","second","millisecond"])}const i7=["January","February","March","April","May","June","July","August","September","October","November","December"],Ux=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],r7=["J","F","M","A","M","J","J","A","S","O","N","D"];function Wx(e){switch(e){case"narrow":return[...r7];case"short":return[...Ux];case"long":return[...i7];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const zx=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],jx=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],a7=["M","T","W","T","F","S","S"];function Kx(e){switch(e){case"narrow":return[...a7];case"short":return[...jx];case"long":return[...zx];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const qx=["AM","PM"],l7=["Before Christ","Anno Domini"],u7=["BC","AD"],c7=["B","A"];function Yx(e){switch(e){case"narrow":return[...c7];case"short":return[...u7];case"long":return[...l7];default:return null}}function d7(e){return qx[e.hour<12?0:1]}function h7(e,t){return Kx(t)[e.weekday-1]}function f7(e,t){return Wx(t)[e.month-1]}function p7(e,t){return Yx(t)[e.year<0?0:1]}function g7(e,t,n="always",s=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&i){const d=e==="days";switch(t){case 1:return d?"tomorrow":`next ${o[e][0]}`;case-1:return d?"yesterday":`last ${o[e][0]}`;case 0:return d?"today":`this ${o[e][0]}`}}const r=Object.is(t,-0)||t<0,a=Math.abs(t),l=a===1,u=o[e],c=s?l?u[1]:u[2]||u[1]:l?o[e][0]:e;return r?`${a} ${c} ago`:`in ${a} ${c}`}function Zx(e,t){let n="";for(const s of e)s.literal?n+=s.val:n+=t(s.val);return n}const m7={D:qg,DD:XI,DDD:JI,DDDD:QI,t:ex,tt:tx,ttt:nx,tttt:sx,T:ox,TT:ix,TTT:rx,TTTT:ax,f:lx,ff:cx,fff:hx,ffff:px,F:ux,FF:dx,FFF:fx,FFFF:gx};class $s{static create(t,n={}){return new $s(t,n)}static parseFormat(t){let n=null,s="",o=!1;const i=[];for(let r=0;r<t.length;r++){const a=t.charAt(r);a==="'"?((s.length>0||o)&&i.push({literal:o||/^\s+$/.test(s),val:s===""?"'":s}),n=null,s="",o=!o):o||a===n?s+=a:(s.length>0&&i.push({literal:/^\s+$/.test(s),val:s}),s=a,n=a)}return s.length>0&&i.push({literal:o||/^\s+$/.test(s),val:s}),i}static macroTokenToFormatOpts(t){return m7[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0,s=void 0){if(this.opts.forceSimple)return ds(t,n);const o={...this.opts};return n>0&&(o.padTo=n),s&&(o.signDisplay=s),this.loc.numberFormatter(o).format(t)}formatDateTimeFromString(t,n){const s=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(f,p)=>this.loc.extract(t,f,p),r=f=>t.isOffsetFixed&&t.offset===0&&f.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,f.format):"",a=()=>s?d7(t):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(f,p)=>s?f7(t,f):i(p?{month:f}:{month:f,day:"numeric"},"month"),u=(f,p)=>s?h7(t,f):i(p?{weekday:f}:{weekday:f,month:"long",day:"numeric"},"weekday"),c=f=>{const p=$s.macroTokenToFormatOpts(f);return p?this.formatWithSystemDefault(t,p):f},d=f=>s?p7(t,f):i({era:f},"era"),h=f=>{switch(f){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return r({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return r({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return r({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return a();case"d":return o?i({day:"numeric"},"day"):this.num(t.day);case"dd":return o?i({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return o?i({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?i({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?i({month:"numeric"},"month"):this.num(t.month);case"MM":return o?i({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?i({year:"numeric"},"year"):this.num(t.year);case"yy":return o?i({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?i({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?i({year:"numeric"},"year"):this.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return c(f)}};return Zx($s.parseFormat(n),h)}formatDurationFromString(t,n){const s=this.opts.signMode==="negativeLargestOnly"?-1:1,o=c=>{switch(c[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},i=(c,d)=>h=>{const f=o(h);if(f){const p=d.isNegativeDuration&&f!==d.largestUnit?s:1;let g;return this.opts.signMode==="negativeLargestOnly"&&f!==d.largestUnit?g="never":this.opts.signMode==="all"?g="always":g="auto",this.num(c.get(f)*p,h.length,g)}else return h},r=$s.parseFormat(n),a=r.reduce((c,{literal:d,val:h})=>d?c:c.concat(h),[]),l=t.shiftTo(...a.map(o).filter(c=>c)),u={isNegativeDuration:l<0,largestUnit:Object.keys(l.values)[0]};return Zx(r,i(l,u))}}const Xx=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function pc(...e){const t=e.reduce((n,s)=>n+s.source,"");return RegExp(`^${t}$`)}function gc(...e){return t=>e.reduce(([n,s,o],i)=>{const[r,a,l]=i(t,o);return[{...n,...r},a||s,l]},[{},null,1]).slice(0,2)}function mc(e,...t){if(e==null)return[null,null];for(const[n,s]of t){const o=n.exec(e);if(o)return s(o)}return[null,null]}function Jx(...e){return(t,n)=>{const s={};let o;for(o=0;o<e.length;o++)s[e[o]]=Ba(t[n+o]);return[s,null,n+o]}}const Qx=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,v7=`(?:${Qx.source}?(?:\\[(${Xx.source})\\])?)?`,db=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,eF=RegExp(`${db.source}${v7}`),hb=RegExp(`(?:[Tt]${eF.source})?`),y7=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,w7=/(\d{4})-?W(\d\d)(?:-?(\d))?/,C7=/(\d{4})-?(\d{3})/,b7=Jx("weekYear","weekNumber","weekDay"),S7=Jx("year","ordinal"),E7=/(\d{4})-(\d\d)-(\d\d)/,tF=RegExp(`${db.source} ?(?:${Qx.source}|(${Xx.source}))?`),_7=RegExp(`(?: ${tF.source})?`);function vc(e,t,n){const s=e[t];return $t(s)?n:Ba(s)}function R7(e,t){return[{year:vc(e,t),month:vc(e,t+1,1),day:vc(e,t+2,1)},null,t+3]}function yc(e,t){return[{hours:vc(e,t,0),minutes:vc(e,t+1,0),seconds:vc(e,t+2,0),milliseconds:lb(e[t+3])},null,t+4]}function $h(e,t){const n=!e[t]&&!e[t+1],s=tm(e[t+1],e[t+2]),o=n?null:ir.instance(s);return[{},o,t+3]}function Hh(e,t){const n=e[t]?dc.create(e[t]):null;return[{},n,t+1]}const D7=RegExp(`^T?${db.source}$`),T7=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function I7(e){const[t,n,s,o,i,r,a,l,u]=e,c=t[0]==="-",d=l&&l[0]==="-",h=(f,p=!1)=>f!==void 0&&(p||f&&c)?-f:f;return[{years:h(zl(n)),months:h(zl(s)),weeks:h(zl(o)),days:h(zl(i)),hours:h(zl(r)),minutes:h(zl(a)),seconds:h(zl(l),l==="-0"),milliseconds:h(lb(u),d)}]}const x7={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function fb(e,t,n,s,o,i,r){const a={year:t.length===2?cb(Ba(t)):Ba(t),month:Ux.indexOf(n)+1,day:Ba(s),hour:Ba(o),minute:Ba(i)};return r&&(a.second=Ba(r)),e&&(a.weekday=e.length>3?zx.indexOf(e)+1:jx.indexOf(e)+1),a}const F7=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function P7(e){const[,t,n,s,o,i,r,a,l,u,c,d]=e,h=fb(t,o,s,n,i,r,a);let f;return l?f=x7[l]:u?f=0:f=tm(c,d),[h,new ir(f)]}function A7(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const k7=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,O7=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,M7=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function nF(e){const[,t,n,s,o,i,r,a]=e;return[fb(t,o,s,n,i,r,a),ir.utcInstance]}function N7(e){const[,t,n,s,o,i,r,a]=e;return[fb(t,a,n,s,o,i,r),ir.utcInstance]}const L7=pc(y7,hb),V7=pc(w7,hb),B7=pc(C7,hb),$7=pc(eF),sF=gc(R7,yc,$h,Hh),H7=gc(b7,yc,$h,Hh),G7=gc(S7,yc,$h,Hh),U7=gc(yc,$h,Hh);function W7(e){return mc(e,[L7,sF],[V7,H7],[B7,G7],[$7,U7])}function z7(e){return mc(A7(e),[F7,P7])}function j7(e){return mc(e,[k7,nF],[O7,nF],[M7,N7])}function K7(e){return mc(e,[T7,I7])}const q7=gc(yc);function Y7(e){return mc(e,[D7,q7])}const Z7=pc(E7,_7),X7=pc(tF),J7=gc(yc,$h,Hh);function Q7(e){return mc(e,[Z7,sF],[X7,J7])}const oF="Invalid Duration",iF={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},eK={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...iF},ni=146097/400,wc=146097/4800,tK={years:{quarters:4,months:12,weeks:ni/7,days:ni,hours:ni*24,minutes:ni*24*60,seconds:ni*24*60*60,milliseconds:ni*24*60*60*1e3},quarters:{months:3,weeks:ni/28,days:ni/4,hours:ni*24/4,minutes:ni*24*60/4,seconds:ni*24*60*60/4,milliseconds:ni*24*60*60*1e3/4},months:{weeks:wc/7,days:wc,hours:wc*24,minutes:wc*24*60,seconds:wc*24*60*60,milliseconds:wc*24*60*60*1e3},...iF},jl=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],nK=jl.slice(0).reverse();function Yr(e,t,n=!1){const s={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new hn(s)}function rF(e,t){let n=t.milliseconds??0;for(const s of nK.slice(1))t[s]&&(n+=t[s]*e[s].milliseconds);return n}function aF(e,t){const n=rF(e,t)<0?-1:1;jl.reduceRight((s,o)=>{if($t(t[o]))return s;if(s){const i=t[s]*n,r=e[o][s],a=Math.floor(i/r);t[o]+=a*n,t[s]-=a*r*n}return o},null),jl.reduce((s,o)=>{if($t(t[o]))return s;if(s){const i=t[s]%1;t[s]-=i,t[o]+=i*e[s][o]}return o},null)}function lF(e){const t={};for(const[n,s]of Object.entries(e))s!==0&&(t[n]=s);return t}class hn{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let s=n?tK:eK;t.matrix&&(s=t.matrix),this.values=t.values,this.loc=t.loc||bn.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=s,this.isLuxonDuration=!0}static fromMillis(t,n){return hn.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new Bs(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new hn({values:nm(t,hn.normalizeUnit),loc:bn.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(Va(t))return hn.fromMillis(t);if(hn.isDuration(t))return t;if(typeof t=="object")return hn.fromObject(t);throw new Bs(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[s]=K7(t);return s?hn.fromObject(s,n):hn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[s]=Y7(t);return s?hn.fromObject(s,n):hn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new Bs("need to specify a reason the Duration is invalid");const s=t instanceof Fi?t:new Fi(t,n);if(Zn.throwOnInvalid)throw new Ij(s);return new hn({invalid:s})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new ZI(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const s={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?$s.create(this.loc,s).formatDurationFromString(this,t):oF}toHuman(t={}){if(!this.isValid)return oF;const n=t.showZeros!==!1,s=jl.map(o=>{const i=this.values[o];return $t(i)||i===0&&!n?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:o.slice(0,-1)}).format(i)}).filter(o=>o);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(s)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=ub(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},bt.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?rF(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=hn.fromDurationLike(t),s={};for(const o of jl)(hc(n.values,o)||hc(this.values,o))&&(s[o]=n.get(o)+this.get(o));return Yr(this,{values:s},!0)}minus(t){if(!this.isValid)return this;const n=hn.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const s of Object.keys(this.values))n[s]=Gx(t(this.values[s],s));return Yr(this,{values:n},!0)}get(t){return this[hn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...nm(t,hn.normalizeUnit)};return Yr(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:s,matrix:o}={}){const r={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:s};return Yr(this,r)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return aF(this.matrix,t),Yr(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=lF(this.normalize().shiftToAll().toObject());return Yr(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(r=>hn.normalizeUnit(r));const n={},s={},o=this.toObject();let i;for(const r of jl)if(t.indexOf(r)>=0){i=r;let a=0;for(const u in s)a+=this.matrix[u][r]*s[u],s[u]=0;Va(o[r])&&(a+=o[r]);const l=Math.trunc(a);n[r]=l,s[r]=(a*1e3-l*1e3)/1e3}else Va(o[r])&&(s[r]=o[r]);for(const r in s)s[r]!==0&&(n[i]+=r===i?s[r]:s[r]/this.matrix[i][r]);return aF(this.matrix,n),Yr(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return Yr(this,{values:t},!0)}removeZeros(){if(!this.isValid)return this;const t=lF(this.values);return Yr(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(s,o){return s===void 0||s===0?o===void 0||o===0:s===o}for(const s of jl)if(!n(this.values[s],t.values[s]))return!1;return!0}}const Cc="Invalid Interval";function sK(e,t){return!e||!e.isValid?Xn.invalid("missing or invalid start"):!t||!t.isValid?Xn.invalid("missing or invalid end"):t<e?Xn.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class Xn{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new Bs("need to specify a reason the Interval is invalid");const s=t instanceof Fi?t:new Fi(t,n);if(Zn.throwOnInvalid)throw new Tj(s);return new Xn({invalid:s})}static fromDateTimes(t,n){const s=Wh(t),o=Wh(n),i=sK(s,o);return i??new Xn({start:s,end:o})}static after(t,n){const s=hn.fromDurationLike(n),o=Wh(t);return Xn.fromDateTimes(o,o.plus(s))}static before(t,n){const s=hn.fromDurationLike(n),o=Wh(t);return Xn.fromDateTimes(o.minus(s),o)}static fromISO(t,n){const[s,o]=(t||"").split("/",2);if(s&&o){let i,r;try{i=bt.fromISO(s,n),r=i.isValid}catch{r=!1}let a,l;try{a=bt.fromISO(o,n),l=a.isValid}catch{l=!1}if(r&&l)return Xn.fromDateTimes(i,a);if(r){const u=hn.fromISO(o,n);if(u.isValid)return Xn.after(i,u)}else if(l){const u=hn.fromISO(s,n);if(u.isValid)return Xn.before(a,u)}}return Xn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const s=this.start.startOf(t,n);let o;return n!=null&&n.useLocaleWeeks?o=this.end.reconfigure({locale:s.locale}):o=this.end,o=o.startOf(t,n),Math.floor(o.diff(s,t).get(t))+(o.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Xn.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(Wh).filter(r=>this.contains(r)).sort((r,a)=>r.toMillis()-a.toMillis()),s=[];let{s:o}=this,i=0;for(;o<this.e;){const r=n[i]||this.e,a=+r>+this.e?this.e:r;s.push(Xn.fromDateTimes(o,a)),o=a,i+=1}return s}splitBy(t){const n=hn.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s}=this,o=1,i;const r=[];for(;s<this.e;){const a=this.start.plus(n.mapUnits(l=>l*o));i=+a>+this.e?this.e:a,r.push(Xn.fromDateTimes(s,i)),s=i,o+=1}return r}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,s=this.e<t.e?this.e:t.e;return n>=s?null:Xn.fromDateTimes(n,s)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,s=this.e>t.e?this.e:t.e;return Xn.fromDateTimes(n,s)}static merge(t){const[n,s]=t.sort((o,i)=>o.s-i.s).reduce(([o,i],r)=>i?i.overlaps(r)||i.abutsStart(r)?[o,i.union(r)]:[o.concat([i]),r]:[o,r],[[],null]);return s&&n.push(s),n}static xor(t){let n=null,s=0;const o=[],i=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),r=Array.prototype.concat(...i),a=r.sort((l,u)=>l.time-u.time);for(const l of a)s+=l.type==="s"?1:-1,s===1?n=l.time:(n&&+n!=+l.time&&o.push(Xn.fromDateTimes(n,l.time)),n=null);return Xn.merge(o)}difference(...t){return Xn.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Cc}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=qg,n={}){return this.isValid?$s.create(this.s.loc.clone(n),t).formatInterval(this):Cc}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Cc}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Cc}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Cc}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Cc}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):hn.invalid(this.invalidReason)}mapEndpoints(t){return Xn.fromDateTimes(t(this.s),t(this.e))}}class bc{static hasDST(t=Zn.defaultZone){const n=bt.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return dc.isValidZone(t)}static normalizeZone(t){return La(t,Zn.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||bn.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||bn.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||bn.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:s=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||bn.create(n,s,i)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:s=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||bn.create(n,s,i)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:s=null,locObj:o=null}={}){return(o||bn.create(n,s,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:s=null,locObj:o=null}={}){return(o||bn.create(n,s,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return bn.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return bn.create(n,null,"gregory").eras(t)}static features(){return{relative:Lx(),localeWeek:Vx()}}}function uF(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),s=n(t)-n(e);return Math.floor(hn.fromMillis(s).as("days"))}function oK(e,t,n){const s=[["years",(l,u)=>u.year-l.year],["quarters",(l,u)=>u.quarter-l.quarter+(u.year-l.year)*4],["months",(l,u)=>u.month-l.month+(u.year-l.year)*12],["weeks",(l,u)=>{const c=uF(l,u);return(c-c%7)/7}],["days",uF]],o={},i=e;let r,a;for(const[l,u]of s)n.indexOf(l)>=0&&(r=l,o[l]=u(e,t),a=i.plus(o),a>t?(o[l]--,e=i.plus(o),e>t&&(a=e,o[l]--,e=i.plus(o))):e=a);return[e,o,a,r]}function iK(e,t,n,s){let[o,i,r,a]=oK(e,t,n);const l=t-o,u=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);u.length===0&&(r<t&&(r=o.plus({[a]:1})),r!==o&&(i[a]=(i[a]||0)+l/(r-o)));const c=hn.fromObject(i,s);return u.length>0?hn.fromMillis(l,s).shiftTo(...u).plus(c):c}const rK="missing Intl.DateTimeFormat.formatToParts support";function vn(e,t=n=>n){return{regex:e,deser:([n])=>t(Zj(n))}}const cF="[ ]",dF=new RegExp(cF,"g");function aK(e){return e.replace(/\./g,"\\.?").replace(dF,cF)}function hF(e){return e.replace(/\./g,"").replace(dF," ").toLowerCase()}function Pi(e,t){return e===null?null:{regex:RegExp(e.map(aK).join("|")),deser:([n])=>e.findIndex(s=>hF(n)===hF(s))+t}}function fF(e,t){return{regex:e,deser:([,n,s])=>tm(n,s),groups:t}}function om(e){return{regex:e,deser:([t])=>t}}function lK(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function uK(e,t){const n=xi(t),s=xi(t,"{2}"),o=xi(t,"{3}"),i=xi(t,"{4}"),r=xi(t,"{6}"),a=xi(t,"{1,2}"),l=xi(t,"{1,3}"),u=xi(t,"{1,6}"),c=xi(t,"{1,9}"),d=xi(t,"{2,4}"),h=xi(t,"{4,6}"),f=v=>({regex:RegExp(lK(v.val)),deser:([C])=>C,literal:!0}),g=(v=>{if(e.literal)return f(v);switch(v.val){case"G":return Pi(t.eras("short"),0);case"GG":return Pi(t.eras("long"),0);case"y":return vn(u);case"yy":return vn(d,cb);case"yyyy":return vn(i);case"yyyyy":return vn(h);case"yyyyyy":return vn(r);case"M":return vn(a);case"MM":return vn(s);case"MMM":return Pi(t.months("short",!0),1);case"MMMM":return Pi(t.months("long",!0),1);case"L":return vn(a);case"LL":return vn(s);case"LLL":return Pi(t.months("short",!1),1);case"LLLL":return Pi(t.months("long",!1),1);case"d":return vn(a);case"dd":return vn(s);case"o":return vn(l);case"ooo":return vn(o);case"HH":return vn(s);case"H":return vn(a);case"hh":return vn(s);case"h":return vn(a);case"mm":return vn(s);case"m":return vn(a);case"q":return vn(a);case"qq":return vn(s);case"s":return vn(a);case"ss":return vn(s);case"S":return vn(l);case"SSS":return vn(o);case"u":return om(c);case"uu":return om(a);case"uuu":return vn(n);case"a":return Pi(t.meridiems(),0);case"kkkk":return vn(i);case"kk":return vn(d,cb);case"W":return vn(a);case"WW":return vn(s);case"E":case"c":return vn(n);case"EEE":return Pi(t.weekdays("short",!1),1);case"EEEE":return Pi(t.weekdays("long",!1),1);case"ccc":return Pi(t.weekdays("short",!0),1);case"cccc":return Pi(t.weekdays("long",!0),1);case"Z":case"ZZ":return fF(new RegExp(`([+-]${a.source})(?::(${s.source}))?`),2);case"ZZZ":return fF(new RegExp(`([+-]${a.source})(${s.source})?`),2);case"z":return om(/[a-z_+-/]{1,256}?/i);case" ":return om(/[^\S\n\r]/);default:return f(v)}})(e)||{invalidReason:rK};return g.token=e,g}const cK={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function dK(e,t,n){const{type:s,value:o}=e;if(s==="literal"){const l=/^\s+$/.test(o);return{literal:!l,val:l?" ":o}}const i=t[s];let r=s;s==="hour"&&(t.hour12!=null?r=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?r="hour12":r="hour24":r=n.hour12?"hour12":"hour24");let a=cK[r];if(typeof a=="object"&&(a=a[i]),a)return{literal:!1,val:a}}function hK(e){return[`^${e.map(n=>n.regex).reduce((n,s)=>`${n}(${s.source})`,"")}$`,e]}function fK(e,t,n){const s=e.match(t);if(s){const o={};let i=1;for(const r in n)if(hc(n,r)){const a=n[r],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(o[a.token.val[0]]=a.deser(s.slice(i,i+l))),i+=l}return[s,o]}else return[s,{}]}function pK(e){const t=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,s;return $t(e.z)||(n=dc.create(e.z)),$t(e.Z)||(n||(n=new ir(e.Z)),s=e.Z),$t(e.q)||(e.M=(e.q-1)*3+1),$t(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),$t(e.u)||(e.S=lb(e.u)),[Object.keys(e).reduce((i,r)=>{const a=t(r);return a&&(i[a]=e[r]),i},{}),n,s]}let pb=null;function gK(){return pb||(pb=bt.fromMillis(1555555555555)),pb}function mK(e,t){if(e.literal)return e;const n=$s.macroTokenToFormatOpts(e.val),s=vF(n,t);return s==null||s.includes(void 0)?e:s}function pF(e,t){return Array.prototype.concat(...e.map(n=>mK(n,t)))}class gF{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=pF($s.parseFormat(n),t),this.units=this.tokens.map(s=>uK(s,t)),this.disqualifyingUnit=this.units.find(s=>s.invalidReason),!this.disqualifyingUnit){const[s,o]=hK(this.units);this.regex=RegExp(s,"i"),this.handlers=o}}explainFromTokens(t){if(this.isValid){const[n,s]=fK(t,this.regex,this.handlers),[o,i,r]=s?pK(s):[null,null,void 0];if(hc(s,"a")&&hc(s,"H"))throw new cc("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:s,result:o,zone:i,specificOffset:r}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function mF(e,t,n){return new gF(e,n).explainFromTokens(t)}function vK(e,t,n){const{result:s,zone:o,specificOffset:i,invalidReason:r}=mF(e,t,n);return[s,o,i,r]}function vF(e,t){if(!e)return null;const s=$s.create(t,e).dtFormatter(gK()),o=s.formatToParts(),i=s.resolvedOptions();return o.map(r=>dK(r,e,i))}const gb="Invalid DateTime",yF=864e13;function Gh(e){return new Fi("unsupported zone",`the zone "${e.name}" is not supported`)}function mb(e){return e.weekData===null&&(e.weekData=Xg(e.c)),e.weekData}function vb(e){return e.localWeekData===null&&(e.localWeekData=Xg(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Kl(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new bt({...n,...t,old:n})}function wF(e,t,n){let s=e-t*60*1e3;const o=n.offset(s);if(t===o)return[s,t];s-=(o-t)*60*1e3;const i=n.offset(s);return o===i?[s,o]:[e-Math.min(o,i)*60*1e3,Math.max(o,i)]}function im(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function rm(e,t,n){return wF(em(e),t,n)}function CF(e,t){const n=e.o,s=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,i={...e.c,year:s,month:o,day:Math.min(e.c.day,Qg(s,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},r=hn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=em(i);let[l,u]=wF(a,n,e.zone);return r!==0&&(l+=r,u=e.zone.offset(l)),{ts:l,o:u}}function Sc(e,t,n,s,o,i){const{setZone:r,zone:a}=n;if(e&&Object.keys(e).length!==0||t){const l=t||a,u=bt.fromObject(e,{...n,zone:l,specificOffset:i});return r?u:u.setZone(a)}else return bt.invalid(new Fi("unparsable",`the input "${o}" can't be parsed as ${s}`))}function am(e,t,n=!0){return e.isValid?$s.create(bn.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function yb(e,t,n){const s=e.c.year>9999||e.c.year<0;let o="";if(s&&e.c.year>=0&&(o+="+"),o+=ds(e.c.year,s?6:4),n==="year")return o;if(t){if(o+="-",o+=ds(e.c.month),n==="month")return o;o+="-"}else if(o+=ds(e.c.month),n==="month")return o;return o+=ds(e.c.day),o}function bF(e,t,n,s,o,i,r){let a=!n||e.c.millisecond!==0||e.c.second!==0,l="";switch(r){case"day":case"month":case"year":break;default:if(l+=ds(e.c.hour),r==="hour")break;if(t){if(l+=":",l+=ds(e.c.minute),r==="minute")break;a&&(l+=":",l+=ds(e.c.second))}else{if(l+=ds(e.c.minute),r==="minute")break;a&&(l+=ds(e.c.second))}if(r==="second")break;a&&(!s||e.c.millisecond!==0)&&(l+=".",l+=ds(e.c.millisecond,3))}return o&&(e.isOffsetFixed&&e.offset===0&&!i?l+="Z":e.o<0?(l+="-",l+=ds(Math.trunc(-e.o/60)),l+=":",l+=ds(Math.trunc(-e.o%60))):(l+="+",l+=ds(Math.trunc(e.o/60)),l+=":",l+=ds(Math.trunc(e.o%60)))),i&&(l+="["+e.zone.ianaName+"]"),l}const SF={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},yK={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},wK={ordinal:1,hour:0,minute:0,second:0,millisecond:0},lm=["year","month","day","hour","minute","second","millisecond"],CK=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],bK=["year","ordinal","hour","minute","second","millisecond"];function um(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new ZI(e);return t}function EF(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return um(e)}}function SK(e){if(Uh===void 0&&(Uh=Zn.now()),e.type!=="iana")return e.offset(Uh);const t=e.name;let n=wb.get(t);return n===void 0&&(n=e.offset(Uh),wb.set(t,n)),n}function _F(e,t){const n=La(t.zone,Zn.defaultZone);if(!n.isValid)return bt.invalid(Gh(n));const s=bn.fromObject(t);let o,i;if($t(e.year))o=Zn.now();else{for(const l of lm)$t(e[l])&&(e[l]=SF[l]);const r=Mx(e)||Nx(e);if(r)return bt.invalid(r);const a=SK(n);[o,i]=rm(e,a,n)}return new bt({ts:o,zone:n,loc:s,o:i})}function RF(e,t,n){const s=$t(n.round)?!0:n.round,o=$t(n.rounding)?"trunc":n.rounding,i=(a,l)=>(a=ub(a,s||n.calendary?0:2,n.calendary?"round":o),t.loc.clone(n).relFormatter(n).format(a,l)),r=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return i(r(n.unit),n.unit);for(const a of n.units){const l=r(a);if(Math.abs(l)>=1)return i(l,a)}return i(e>t?-0:0,n.units[n.units.length-1])}function DF(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let Uh;const wb=new Map;class bt{constructor(t){const n=t.zone||Zn.defaultZone;let s=t.invalid||(Number.isNaN(t.ts)?new Fi("invalid input"):null)||(n.isValid?null:Gh(n));this.ts=$t(t.ts)?Zn.now():t.ts;let o=null,i=null;if(!s)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,i]=[t.old.c,t.old.o];else{const a=Va(t.o)&&!t.old?t.o:n.offset(this.ts);o=im(this.ts,a),s=Number.isNaN(o.year)?new Fi("invalid input"):null,o=s?null:o,i=s?null:a}this._zone=n,this.loc=t.loc||bn.create(),this.invalid=s,this.weekData=null,this.localWeekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}static now(){return new bt({})}static local(){const[t,n]=DF(arguments),[s,o,i,r,a,l,u]=n;return _F({year:s,month:o,day:i,hour:r,minute:a,second:l,millisecond:u},t)}static utc(){const[t,n]=DF(arguments),[s,o,i,r,a,l,u]=n;return t.zone=ir.utcInstance,_F({year:s,month:o,day:i,hour:r,minute:a,second:l,millisecond:u},t)}static fromJSDate(t,n={}){const s=t7(t)?t.valueOf():NaN;if(Number.isNaN(s))return bt.invalid("invalid input");const o=La(n.zone,Zn.defaultZone);return o.isValid?new bt({ts:s,zone:o,loc:bn.fromObject(n)}):bt.invalid(Gh(o))}static fromMillis(t,n={}){if(Va(t))return t<-yF||t>yF?bt.invalid("Timestamp out of range"):new bt({ts:t,zone:La(n.zone,Zn.defaultZone),loc:bn.fromObject(n)});throw new Bs(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(Va(t))return new bt({ts:t*1e3,zone:La(n.zone,Zn.defaultZone),loc:bn.fromObject(n)});throw new Bs("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const s=La(n.zone,Zn.defaultZone);if(!s.isValid)return bt.invalid(Gh(s));const o=bn.fromObject(n),i=nm(t,EF),{minDaysInFirstWeek:r,startOfWeek:a}=Ox(i,o),l=Zn.now(),u=$t(n.specificOffset)?s.offset(l):n.specificOffset,c=!$t(i.ordinal),d=!$t(i.year),h=!$t(i.month)||!$t(i.day),f=d||h,p=i.weekYear||i.weekNumber;if((f||c)&&p)throw new cc("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&c)throw new cc("Can't mix ordinal dates with month/day");const g=p||i.weekday&&!f;let v,C,S=im(l,u);g?(v=CK,C=yK,S=Xg(S,r,a)):c?(v=bK,C=wK,S=rb(S)):(v=lm,C=SF);let b=!1;for(const P of v){const D=i[P];$t(D)?b?i[P]=C[P]:i[P]=S[P]:b=!0}const w=g?Jj(i,r,a):c?Qj(i):Mx(i),_=w||Nx(i);if(_)return bt.invalid(_);const R=g?Ax(i,r,a):c?kx(i):i,[T,I]=rm(R,u,s),x=new bt({ts:T,zone:s,o:I,loc:o});return i.weekday&&f&&t.weekday!==x.weekday?bt.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${x.toISO()}`):x.isValid?x:bt.invalid(x.invalid)}static fromISO(t,n={}){const[s,o]=W7(t);return Sc(s,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[s,o]=z7(t);return Sc(s,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[s,o]=j7(t);return Sc(s,o,n,"HTTP",n)}static fromFormat(t,n,s={}){if($t(t)||$t(n))throw new Bs("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:i=null}=s,r=bn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0}),[a,l,u,c]=vK(r,t,n);return c?bt.invalid(c):Sc(a,l,s,`format ${n}`,t,u)}static fromString(t,n,s={}){return bt.fromFormat(t,n,s)}static fromSQL(t,n={}){const[s,o]=Q7(t);return Sc(s,o,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new Bs("need to specify a reason the DateTime is invalid");const s=t instanceof Fi?t:new Fi(t,n);if(Zn.throwOnInvalid)throw new Dj(s);return new bt({invalid:s})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const s=vF(t,bn.fromObject(n));return s?s.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return pF($s.parseFormat(t),bn.fromObject(n)).map(o=>o.val).join("")}static resetCache(){Uh=void 0,wb.clear()}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?mb(this).weekYear:NaN}get weekNumber(){return this.isValid?mb(this).weekNumber:NaN}get weekday(){return this.isValid?mb(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?vb(this).weekday:NaN}get localWeekNumber(){return this.isValid?vb(this).weekNumber:NaN}get localWeekYear(){return this.isValid?vb(this).weekYear:NaN}get ordinal(){return this.isValid?rb(this.c).ordinal:NaN}get monthShort(){return this.isValid?bc.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?bc.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?bc.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?bc.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,s=em(this.c),o=this.zone.offset(s-t),i=this.zone.offset(s+t),r=this.zone.offset(s-o*n),a=this.zone.offset(s-i*n);if(r===a)return[this];const l=s-r*n,u=s-a*n,c=im(l,r),d=im(u,a);return c.hour===d.hour&&c.minute===d.minute&&c.second===d.second&&c.millisecond===d.millisecond?[Kl(this,{ts:l}),Kl(this,{ts:u})]:[this]}get isInLeapYear(){return Lh(this.year)}get daysInMonth(){return Qg(this.year,this.month)}get daysInYear(){return this.isValid?fc(this.year):NaN}get weeksInWeekYear(){return this.isValid?Vh(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Vh(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:s,calendar:o}=$s.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:s,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(ir.instance(t),n)}toLocal(){return this.setZone(Zn.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:s=!1}={}){if(t=La(t,Zn.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||s){const i=t.offset(this.ts),r=this.toObject();[o]=rm(r,i,t)}return Kl(this,{ts:o,zone:t})}else return bt.invalid(Gh(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:s}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:s});return Kl(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=nm(t,EF),{minDaysInFirstWeek:s,startOfWeek:o}=Ox(n,this.loc),i=!$t(n.weekYear)||!$t(n.weekNumber)||!$t(n.weekday),r=!$t(n.ordinal),a=!$t(n.year),l=!$t(n.month)||!$t(n.day),u=a||l,c=n.weekYear||n.weekNumber;if((u||r)&&c)throw new cc("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new cc("Can't mix ordinal dates with month/day");let d;i?d=Ax({...Xg(this.c,s,o),...n},s,o):$t(n.ordinal)?(d={...this.toObject(),...n},$t(n.day)&&(d.day=Math.min(Qg(d.year,d.month),d.day))):d=kx({...rb(this.c),...n});const[h,f]=rm(d,this.o,this.zone);return Kl(this,{ts:h,o:f})}plus(t){if(!this.isValid)return this;const n=hn.fromDurationLike(t);return Kl(this,CF(this,n))}minus(t){if(!this.isValid)return this;const n=hn.fromDurationLike(t).negate();return Kl(this,CF(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const s={},o=hn.normalizeUnit(t);switch(o){case"years":s.month=1;case"quarters":case"months":s.day=1;case"weeks":case"days":s.hour=0;case"hours":s.minute=0;case"minutes":s.second=0;case"seconds":s.millisecond=0;break}if(o==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:r}=this;r<i&&(s.weekNumber=this.weekNumber-1),s.weekday=i}else s.weekday=1;if(o==="quarters"){const i=Math.ceil(this.month/3);s.month=(i-1)*3+1}return this.set(s)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?$s.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):gb}toLocaleString(t=qg,n={}){return this.isValid?$s.create(this.loc.clone(n),t).formatDateTime(this):gb}toLocaleParts(t={}){return this.isValid?$s.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:s=!1,includeOffset:o=!0,extendedZone:i=!1,precision:r="milliseconds"}={}){if(!this.isValid)return null;r=um(r);const a=t==="extended";let l=yb(this,a,r);return lm.indexOf(r)>=3&&(l+="T"),l+=bF(this,a,n,s,o,i,r),l}toISODate({format:t="extended",precision:n="day"}={}){return this.isValid?yb(this,t==="extended",um(n)):null}toISOWeekDate(){return am(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:s=!0,includePrefix:o=!1,extendedZone:i=!1,format:r="extended",precision:a="milliseconds"}={}){return this.isValid?(a=um(a),(o&&lm.indexOf(a)>=3?"T":"")+bF(this,r==="extended",n,t,s,i,a)):null}toRFC2822(){return am(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return am(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?yb(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:s=!0}={}){let o="HH:mm:ss.SSS";return(n||t)&&(s&&(o+=" "),n?o+="z":t&&(o+="ZZ")),am(this,o,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():gb}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",s={}){if(!this.isValid||!t.isValid)return hn.invalid("created by diffing an invalid DateTime");const o={locale:this.locale,numberingSystem:this.numberingSystem,...s},i=n7(n).map(hn.normalizeUnit),r=t.valueOf()>this.valueOf(),a=r?this:t,l=r?t:this,u=iK(a,l,i,o);return r?u.negate():u}diffNow(t="milliseconds",n={}){return this.diff(bt.now(),t,n)}until(t){return this.isValid?Xn.fromDateTimes(this,t):this}hasSame(t,n,s){if(!this.isValid)return!1;const o=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(n,s)<=o&&o<=i.endOf(n,s)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||bt.fromObject({},{zone:this.zone}),s=t.padding?this<n?-t.padding:t.padding:0;let o=["years","months","days","hours","minutes","seconds"],i=t.unit;return Array.isArray(t.unit)&&(o=t.unit,i=void 0),RF(n,this.plus(s),{...t,numeric:"always",units:o,unit:i})}toRelativeCalendar(t={}){return this.isValid?RF(t.base||bt.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(bt.isDateTime))throw new Bs("min requires all arguments be DateTimes");return Bx(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(bt.isDateTime))throw new Bs("max requires all arguments be DateTimes");return Bx(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,s={}){const{locale:o=null,numberingSystem:i=null}=s,r=bn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});return mF(r,t,n)}static fromStringExplain(t,n,s={}){return bt.fromFormatExplain(t,n,s)}static buildFormatParser(t,n={}){const{locale:s=null,numberingSystem:o=null}=n,i=bn.fromOpts({locale:s,numberingSystem:o,defaultToEN:!0});return new gF(i,t)}static fromFormatParser(t,n,s={}){if($t(t)||$t(n))throw new Bs("fromFormatParser requires an input string and a format parser");const{locale:o=null,numberingSystem:i=null}=s,r=bn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});if(!r.equals(n.locale))throw new Bs(`fromFormatParser called with a locale of ${r}, but the format parser was created for ${n.locale}`);const{result:a,zone:l,specificOffset:u,invalidReason:c}=n.explainFromTokens(t);return c?bt.invalid(c):Sc(a,l,s,`format ${n.format}`,t,u)}static get DATE_SHORT(){return qg}static get DATE_MED(){return XI}static get DATE_MED_WITH_WEEKDAY(){return xj}static get DATE_FULL(){return JI}static get DATE_HUGE(){return QI}static get TIME_SIMPLE(){return ex}static get TIME_WITH_SECONDS(){return tx}static get TIME_WITH_SHORT_OFFSET(){return nx}static get TIME_WITH_LONG_OFFSET(){return sx}static get TIME_24_SIMPLE(){return ox}static get TIME_24_WITH_SECONDS(){return ix}static get TIME_24_WITH_SHORT_OFFSET(){return rx}static get TIME_24_WITH_LONG_OFFSET(){return ax}static get DATETIME_SHORT(){return lx}static get DATETIME_SHORT_WITH_SECONDS(){return ux}static get DATETIME_MED(){return cx}static get DATETIME_MED_WITH_SECONDS(){return dx}static get DATETIME_MED_WITH_WEEKDAY(){return Fj}static get DATETIME_FULL(){return hx}static get DATETIME_FULL_WITH_SECONDS(){return fx}static get DATETIME_HUGE(){return px}static get DATETIME_HUGE_WITH_SECONDS(){return gx}}function Wh(e){if(bt.isDateTime(e))return e;if(e&&e.valueOf&&Va(e.valueOf()))return bt.fromJSDate(e);if(e&&typeof e=="object")return bt.fromObject(e);throw new Bs(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const TF="account.last_prefered_timezone",rr=800;var Ht=(e=>(e[e.UNCHECK=0]="UNCHECK",e[e.INDETERMINATE=1]="INDETERMINATE",e[e.CHECKED=2]="CHECKED",e))(Ht||{});function zh(e){if(!e)return null;if(bt.isDateTime(e))return e;if(e instanceof Date){const t=bt.fromJSDate(e);return t.isValid?t:null}if(typeof e=="number"){const t=bt.fromMillis(e);return t.isValid?t:null}if(typeof e=="string"){let t=bt.fromISO(e);return t.isValid||(t=bt.fromRFC2822(e)),t.isValid?t:null}return null}function IF(e,t,n){const s=zh(e);if(!s)return"";const o=n?s.setZone(n):s;return o.isValid?o.toFormat(t):""}const cm=()=>Rj(TF)||"UTC",xF=e=>({id:e.id,name:(e==null?void 0:e.name)??e.display_name,initial:e.initial,profile_image:e.profile_image,color:{bgColor:e.color.bgColor,textColor:e.color.textColor}}),Ec=e=>e!=null&&e.length?e.map(xF):[],EK=e=>{if(!(e!=null&&e.length))return[];const t=new Set;return e.filter(n=>t.has(n.id)?!1:(t.add(n.id),!0))},FF=e=>{if(!e)return null;const t=new Date(e);return Number.isNaN(t.getTime())?null:t},_K=e=>Object.fromEntries(Object.entries(e).filter(([t,n])=>n!==void 0)),PF=(e,t)=>{var s,o,i;const n={id:e.id,name:e.name,assignees:void 0,status:e.template_flow_status,dateRange:[FF(e.start_date),FF(e.due_date)],isStarted:!!Number(e.is_started),isCompleted:!!Number(e.is_completed),lastUpdated:{tooltip:e!=null&&e.last_updated_by?e.last_updated_by:"",value:IF(e.updated_at,"MMM dd, yyyy | HH:mm",t)||""},completedOn:{tooltip:e.actual_due_date==null?"Pending":e.last_completed_by?e.last_completed_by:"",value:IF(e.actual_due_date,"MMM dd, yyyy | HH:mm",t)},isDeleted:!1,isProcessing:e!=null&&e.bulk_process?{state:e==null?void 0:e.bulk_process.state,message:(e==null?void 0:e.bulk_process.message)||""}:void 0,disabled:((s=e==null?void 0:e.bulk_process)==null?void 0:s.state)==0,isArchived:((o=e.property)==null?void 0:o.is_archived)===1||e.status==0,isLocked:((i=e.property)==null?void 0:i.is_locked)===1};return _K(n)},AF={headphone:["headphones","headset"],sofa:["couch"],couch:["sofa"],run:["running","runner"]},Cb=e=>e.toLowerCase().trim(),RK=e=>Cb(e).split(/\s+/).filter(Boolean),kF=e=>e.replace(/(ing|ed|s)$/i,"");function DK(e){const t=new Set;for(const n of e){const s=kF(n);if(t.add(s),t.add(n),AF[s])for(const o of AF[s])t.add(kF(o))}return Array.from(t)}function TK(e,t){const n=Cb(e),s=DK(RK(t));let o=0;for(const i of s)i&&(n.includes(i)&&(o+=i.length*2),n.startsWith(i)&&(o+=3));return o}function IK(e,t){const n=i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s=t.split(/\s+/).filter(Boolean).map(n);if(!s.length)return e;const o=new RegExp(`(${s.join("|")})`,"ig");return e.replace(o,"<mark>$1</mark>")}const OF=e=>{if(e!==null){if(Number(e.metric_type.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number(e.metric_type.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number(e.metric_type.id)==3)return"formula"}},bb=e=>!isNaN(e)&&isFinite(e),dm=(e,t)=>{var i;const{restricted_type:n}=e,s=Math.floor(Number(t)),o=((i=e.restricted_value)==null?void 0:i.split(",").map(Number))||[];if(n=="none")return!0;if(e.restricted_type=="not")return bb(s)&&!o.includes(s);if(e.restricted_type=="range"){const[r,a]=o;return bb(Number(t))&&Number(t)>=Number(r)&&Number(t)<=Number(a)}else if(n=="exact")return bb(s)&&o.includes(s);return!1},xK=(e,t)=>{var i;const n=_n.getInstance().getItem("ws.terminology"),s=n?JSON.parse(n):null;return` ${((i=s==null?void 0:s.find(r=>r.code==="scene"))==null?void 0:i.name)||"Scene"} ${t}`.trim()};/*! js-cookie v3.0.5 | MIT */function hm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)e[s]=n[s]}return e}var FK={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Sb(e,t){function n(o,i,r){if(!(typeof document>"u")){r=hm({},t,r),typeof r.expires=="number"&&(r.expires=new Date(Date.now()+r.expires*864e5)),r.expires&&(r.expires=r.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in r)r[l]&&(a+="; "+l,r[l]!==!0&&(a+="="+r[l].split(";")[0]));return document.cookie=o+"="+e.write(i,o)+a}}function s(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var i=document.cookie?document.cookie.split("; "):[],r={},a=0;a<i.length;a++){var l=i[a].split("="),u=l.slice(1).join("=");try{var c=decodeURIComponent(l[0]);if(r[c]=e.read(u,c),o===c)break}catch{}}return o?r[o]:r}}return Object.create({set:n,get:s,remove:function(o,i){n(o,"",hm({},i,{expires:-1}))},withAttributes:function(o){return Sb(this.converter,hm({},this.attributes,o))},withConverter:function(o){return Sb(hm({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var MF=Sb(FK,{path:"/"});const fm=({date:e,timezone:t,format:n})=>{if(!e)return"";const s=typeof e=="string"?bt.fromISO(e,{zone:t}):e,o=bt.now().setZone(t||"local"),i=s.setZone(t||"local"),r=o.startOf("day"),l=i.startOf("day").diff(r,"days").days;let u="";if(l===0?u="Today":l===-1?u="Yesterday":l===1&&(u="Tomorrow"),u&&(n!=null&&n.includes("HH:mm"))){const c=i.toFormat("HH:mm");return`${u} at ${c}`}else if(u)return u;return i.toFormat(n)},Eb=()=>MF.get("account.last_prefered_timezone")||"UTC",pm=e=>`${bt.fromJSDate(e,{zone:"UTC"}).toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")}999Z`,gm=e=>({id:e.id,label:e.name,value:e.id,data:e,color:e.color||{bgColor:"#CCCCCC",textColor:"#FFFFFF"},selected:!1,hover:!1,type:"text",disabled:!1,clickable:!0,danger:!1}),mm=e=>{var P;const t=En("filterParams",null),n=B(((P=e.value)==null?void 0:P.map(D=>D.id))??[]),s=B([]),o=B(!1),i=Si(e,"workspaceId"),r=Si(e,"entityId"),a=Si(e,"id"),l=Si(e,"ids"),u=Si(e,"isSelectAll"),c=Si(e,"isBulkUpdate"),d=e.updateRowData,h=B([]),{apiServices:f}=ts(!!e.params,e),p=Y(()=>{var O,$;const D=new Set(((O=e.value)==null?void 0:O.map(q=>q.id))??[]),F=(($=e.value)==null?void 0:$.map(q=>({...gm(q),selected:!0})))??[],k=s.value.filter(q=>!D.has(q.id));return uc(F,k,"id")}),g=D=>{const F=p.value.find(k=>k.id===D);return F==null?void 0:F.data},v=()=>{var D;return c.value&&u.value?[]:(D=l.value)!=null&&D.length?l.value:[String(a.value)]},C=async(D,F,k)=>{if(o.value||!f.value)return!1;o.value=!0;try{const O=await D();if((O==null?void 0:O.message)!=="Done")throw new Error("API call failed");return F(),!0}catch(O){return console.error("API call error:",O),k==null||k(O),!1}finally{o.value=!1}},S=Y(()=>!!(c.value&&u.value)),b=async()=>await C(()=>f.value.unAssignAll({workspaceId:String(i.value),userIds:[],itemIds:S.value?void 0:v(),entityId:S.value?String(r.value):void 0,filterParams:t!=null&&t.value?t.value:void 0}),()=>{d==null||d({assignees:[],type:"removeAll"}),n.value=[]},()=>{var F;console.error("Failed to unassign all assignees"),(F=e.errorCallback)==null||F.call(e)}),w=async D=>await C(()=>f.value.replaceAssignee(R(D)),()=>{n.value=[D];const k=g(D);k&&(d==null||d({assignees:Ec([k]),type:"overwrite"}))},()=>{var k;(k=e.errorCallback)==null||k.call(e)}),_=async D=>await C(()=>f.value.addAssignee(R(D)),()=>{var O,$,q;n.value.push(D);const k=g(D);if(k){const J=(q=($=(O=e.params)==null?void 0:O.api)==null?void 0:$.getRowNode(String(e.id)))==null?void 0:q.data,ee=(J==null?void 0:J.assignees)||[],X=uc([...ee,...Ec([k])],"id");d==null||d({assignees:X,type:"add"})}},()=>{var k;(k=e.errorCallback)==null||k.call(e)}),R=D=>{const F={workspaceId:String(i.value),userIds:[D],filterParams:t!=null&&t.value?t.value:void 0};return S.value?(F.itemIds=void 0,F.entityId=String(r.value)):F.itemIds=v(),F},T=async D=>await C(()=>f.value.removeAssignee(R(D)),()=>{var $,q,J;const k=(J=(q=($=e.params)==null?void 0:$.api)==null?void 0:q.getRowNode(String(e.id)))==null?void 0:J.data;n.value=n.value.filter(ee=>ee!==D);const O=Ec(((k==null?void 0:k.assignees)||[]).filter(ee=>ee.id!==D));d==null||d({assignees:O,type:"remove"})},()=>{var k;(k=e.errorCallback)==null||k.call(e)});return{isSubmitting:o,options:h,unAssignAll:b,replaceAssignees:w,addAssignee:_,removeAssignee:T,handleSelect:D=>{const F=String(D.id);n.value.includes(F)?T(F):_(F)},openPeopleInsight:D=>{if(!D||!i.value)return;const F=Ao({type:"people_insight",config:{user_id:D,ws_code:i.value,baseDomain:_n.getInstance().getItem("BASE_URL")||""}}).url;window.open(F,"_blank")},assigneeList:s,mergedOptions:p,selectedUserIds:n}},PK={placement:"bottom-start",theme:"light",trigger:"click",interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,showArrow:!0,showOnInit:!1,alwaysShow:!1,debug:!1,content:void 0};function AK(e){return e.value?"$el"in e.value?e.value.$el:e.value:null}function Fs(e={}){const t=B(!1),n={...PK,...e},s=B(null),o=B(null),i=B(null),r=B(!1);let a=null,l=null;const u=S=>{(S.key==="Escape"||S.key==="Esc")&&p()},c=()=>{a&&l&&(l.removeEventListener("click",a),a=null,l=null),i.value&&(i.value.destroy(),i.value=null,r.value=!1),document.removeEventListener("keydown",u)},d=S=>{const{showOnInit:b,alwaysShow:w,showArrow:_,debug:R,...T}=n;return{...T,content:S,theme:n.theme,trigger:w||n.toggleOnClick?"manual":n.trigger,placement:n.placement||"bottom-start",arrow:!1,offset:n.offset,interactive:n.interactive,appendTo:n.appendTo,animation:"fade",maxWidth:n.maxWidth||350,onShow:I=>{if(e.disabled)return!1;if(r.value=!0,document.addEventListener("keydown",u),e.onShow)return e.onShow(I)},onHide:I=>{if(t.value)return setTimeout(()=>{t.value=!1},200),!1;if(w)return!1;if(r.value=!1,document.removeEventListener("keydown",u),e.onHide)return e.onHide(I)},onClickOutside:n.onClickOutside?n.onClickOutside:(I,x)=>{const P=x.target.closest(".notification-center"),D=x.target.closest("#people-insight-container");if(P||D){t.value=!0;return}if(e.onClickOutside)return e.onClickOutside(I,x);w||I.hide()},popperOptions:n.popperOptions||{modifiers:[{name:"computeStyles",options:{gpuAcceleration:!1}},{name:"preventOverflow",options:{padding:8}}]},hideOnClick:n.hideOnClick!==void 0?n.hideOnClick:!1}},h=()=>{var w;c();const S=AK(s),b=o.value;if(!(!S||!b)){b.style.display==="none"&&(b.style.display="");try{const _=d(b),R=Pa(S,_);i.value=Array.isArray(R)?R[0]:R,n.toggleOnClick&&!n.alwaysShow&&(a=()=>g(),l=S,S.addEventListener("click",a)),(n.showOnInit||n.alwaysShow)&&((w=i.value)==null||w.show())}catch(_){console.error("[useTippyComposable] Failed to create Tippy instance:",_)}}},f=S=>{S&&C(S),i.value&&i.value.show()},p=()=>{n.alwaysShow||i.value&&i.value.hide()},g=()=>{r.value?p():f()},v=S=>{i.value&&i.value.setContent(S)},C=S=>{i.value&&i.value.setProps(S)};return nt([s,o],h,{flush:"post"}),vs(()=>{c()}),{instance:i,isVisible:r,show:f,hide:p,toggle:g,triggerRef:s,popupRef:o,destroyTippy:c,setContent:v,setProps:C}}const NF=(e,t,n)=>{const s=B("Copy"),o=()=>{setTimeout(()=>{s.value="Copy"},5e3)};return{copyToClipboard:async r=>{r.stopPropagation(),r.preventDefault(),r.stopImmediatePropagation();try{return await navigator.clipboard.writeText(e),s.value="Copied",t==null||t(),o(),!0}catch(a){return console.error("Failed to copy text to clipboard:",a),s.value="Copy failed",o(),!1}},tooltip:s}},kK=(e,t,n)=>{const s={truncate:"End date cleared because it was before start. Please pick an end date.",swap:"Dates auto-swapped because start was after end.",...e.messages},o=So({startDate:null,endDate:null,timezone:e.timezone||"UTC",format:e.format||"",isSelectingStart:!1,isSelectingEnd:!1,rangeFeedback:{status:"idle",action:null,message:""},cacheStartDate:null,cacheEndDate:null,isDirty:!1});eh(()=>{var P;((P=e.value)==null?void 0:P.length)===2&&(o.startDate=e.value[0],o.endDate=e.value[1]),o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate,o.isSelectingStart=!1,o.isSelectingEnd=!1,e.timezone&&(o.timezone=e.timezone)});const i=B(!1),r=B(!1),a=()=>{var q,J,ee,X,ve,te,N,V;const P=i.value||((J=(q=o.startDate)==null?void 0:q.getTime)==null?void 0:J.call(q))!==((X=(ee=o.cacheStartDate)==null?void 0:ee.getTime)==null?void 0:X.call(ee)),D=r.value||((te=(ve=o.endDate)==null?void 0:ve.getTime)==null?void 0:te.call(ve))!==((V=(N=o.cacheEndDate)==null?void 0:N.getTime)==null?void 0:V.call(N)),F=o.startDate===null,k=o.endDate===null;let O,$;P&&D&&F&&k?(O=!0,$=!0,t("clearAll")):P&&!D?(O=!0,F?t("clearStart"):t("update:start",o.startDate)):D&&!P?($=!0,k?t("clearDue"):t("update:end",o.endDate)):P&&D&&(O=!0,$=!0,t("update",[o.startDate,o.endDate])),!(!O&&!$)&&(O&&!$?t("confirmed",{start:o.startDate}):!O&&$?t("confirmed",{end:o.endDate}):t("confirmed",{start:o.startDate,end:o.endDate}),o.isDirty=P||D)},l=(P,D)=>{const F=bt.fromObject({year:P.year,month:P.month,day:P.day},{zone:o.timezone});return(D==="start"?F.startOf("day"):F.endOf("day")).toJSDate()},u=()=>{o.rangeFeedback.status="idle",o.rangeFeedback.action=null,o.rangeFeedback.message=""},c=P=>{e.enableRangeFeedback&&(o.rangeFeedback.status="corrected",o.rangeFeedback.action=P,o.rangeFeedback.message=P==="swap"?s.swap:s.truncate)},d=P=>{if(!(!o.startDate||!o.endDate)){if(o.startDate.getTime()<=o.endDate.getTime()){e.enableRangeFeedback&&u();return}if(P==="select-start"){const D={start:o.startDate,end:o.endDate};o.endDate=null,t("range:invalid",D),t("range:corrected",{start:o.startDate,end:o.endDate,action:"truncate"}),o.isSelectingEnd=!0,c("truncate")}else{const D={start:o.startDate,end:o.endDate},F=o.startDate;o.startDate=o.endDate,o.endDate=F,t("range:invalid",D),t("range:corrected",{start:o.startDate,end:o.endDate,action:"swap"}),c("swap")}}},h=B(!1),f=B(!1),p=(P,D=!0)=>{i.value=!0,h.value=!1,!(e.disabled||e.readOnly)&&(o.startDate=l(P,"start"),D?(o.isSelectingStart=!1,o.isSelectingEnd=!0):(o.isSelectingStart=!0,o.isSelectingEnd=!1),d("select-start"))},g=P=>{r.value=!0,f.value=!1,!(e.disabled||e.readOnly)&&(o.endDate=l(P,"end"),d("select-end"))},v=()=>{i.value=!0,!(e.disabled||e.readOnly)&&(o.startDate=null,u())},C=()=>{r.value=!0,!(e.disabled||e.readOnly)&&(o.endDate=null,u())},S=()=>{i.value=!0,r.value=!0,!(e.disabled||e.readOnly)&&(o.startDate=null,o.endDate=null,u(),w())},b=()=>{e.disabled||e.readOnly||o.isDirty||(o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate)},w=()=>{e.disabled||e.readOnly||(a(),o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate,o.isDirty=!1)},_=()=>{e.disabled||e.readOnly||(o.startDate=o.cacheStartDate,o.endDate=o.cacheEndDate,u(),o.isDirty=!1)},R=Y(()=>o.startDate?bt.fromJSDate(o.startDate,{zone:o.timezone}).toFormat(o.format):e.startPlaceholder),T=Y(()=>o.endDate?bt.fromJSDate(o.endDate,{zone:o.timezone}).toFormat(o.format):e.duePlaceholder),I=Y(()=>!o.startDate&&!e.disabled?e.startTooltip:!o.startDate&&(e.disabled||e.readOnly)?e.startPlaceholder:o.startDate?bt.fromJSDate(o.startDate,{zone:o.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):e.startTooltip),x=Y(()=>!o.endDate&&!e.disabled?e.dueTooltip:!o.endDate&&(e.disabled||e.readOnly)?e.startPlaceholder:o.endDate?bt.fromJSDate(o.endDate,{zone:o.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):e.dueTooltip);return{states:o,displayStartDate:R,displayEndDate:T,tooltipStartDate:I,tooltipEndDate:x,showMultipleDueDates:f,showMultipleStartDates:h,selectEndDate:g,selectStartDate:p,clearDue:C,clearStart:v,clearAll:S,beginInteraction:b,confirmSelection:w,cancelSelection:_}},LF="MMM dd",OK=e=>{const t=e.timezone,n=Y(()=>e.start?fm({date:zh(e.start),timezone:t,format:LF}):"No start"),s=Y(()=>e.end?fm({date:zh(e.end),timezone:t,format:LF}):"No due"),o=d=>{if(!d)return null;const h=bt.now().setZone(t).startOf("day"),f=bt.fromISO(d).setZone(t).startOf("day");if(!f.isValid)return console.warn("Invalid date:",d,f.invalidReason),null;const p=f.diff(h,"days").days;return p===0?"today":p===1?"tomorrow":p===-1?"yesterday":p<-1?"past":"future"},i=Y(()=>o(e.start)),r=Y(()=>o(e.end)),a=Y(()=>{if(n.value==="No start")return["empty"];const d=[];return i.value&&d.push(`start-${i.value}`),e.isStarted&&d.push("actual"),d}),l=Y(()=>{if(s.value==="No due")return["empty"];const d=[];return r.value&&d.push(`end-${r.value}`),e.isEnded&&d.push("actual"),d}),u=Y(()=>e.start?fm({date:zh(e.start),timezone:t,format:"MMM dd, yyyy | HH:mm"}):"No start"),c=Y(()=>e.end?fm({date:zh(e.end),timezone:t,format:"MMM dd, yyyy | HH:mm"}):"No due");return{startDate:n,endDate:s,startClasses:a,endClasses:l,fullStartDate:u,fullEndDate:c}},MK="UserCache",NK="user",LK=()=>{const e=B({}),{getCachedValue:t,setCachedValue:n}=Dh({dbName:MK,storeName:NK}),s=async u=>u?await t(u):null;return{getCachedUser:s,setCachedUser:async u=>{if(!(u!=null&&u.id)){console.warn("Cannot cache user without id:",u);return}await n(u.id,u),e.value[u.id]=!0},getCachedUsers:async u=>{if(!u||u.length===0)return[];const c=u.map(h=>s(h));return(await Promise.all(c)).filter(h=>h!==null)},setCachedUsers:async u=>{if(!u||u.length===0)return;const d=uc(u,"id").filter(h=>h.id&&!e.value[h.id]).map(async h=>{await n(h.id,h),e.value[h.id]=!0});await Promise.all(d)},isUserCached:u=>!!e.value[u],clearCacheTracking:()=>{e.value={}}}},VK={placement:"bottom-start",theme:"light",trigger:"manual",interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,showArrow:!0,showOnInit:!1,alwaysShow:!1,debug:!1,content:void 0,useTrigger:!0,showOverlay:!1,overlayOpacity:.5,closeOnOverlayClick:!0,centered:!1};let jh=0,Oo=null;function BK(e){return Oo||(Oo=document.createElement("div"),Oo.className="popup-overlay",Oo.style.cssText=`
|
|
114
114
|
position: fixed;
|
|
115
115
|
top: 0;
|
|
116
116
|
left: 0;
|
|
@@ -121,14 +121,14 @@ Expected function or array of functions, received type ${typeof e}.`),ls)}functi
|
|
|
121
121
|
opacity: 0;
|
|
122
122
|
transition: opacity 0.3s ease;
|
|
123
123
|
pointer-events: auto;
|
|
124
|
-
`,document.body.appendChild(Oo),requestAnimationFrame(()=>{Oo&&(Oo.style.opacity="1")})),Oo}function VF(e,t){jh++;const n=
|
|
124
|
+
`,document.body.appendChild(Oo),requestAnimationFrame(()=>{Oo&&(Oo.style.opacity="1")})),Oo}function VF(e,t){jh++;const n=BK(e);return t&&n.addEventListener("click",t),()=>{t&&n.removeEventListener("click",t)}}function _b(e){jh--,e&&e(),jh<=0&&(jh=0,Oo&&(Oo.style.opacity="0",setTimeout(()=>{Oo&&jh===0&&(Oo.remove(),Oo=null)},300)))}function vm(e){const t=e.value;return t?"$el"in t?t.$el:t:null}function $K(e={}){const t={...VK,...e},n=B(null),s=B(null),o=B(null),i=B(!1);let r=null;const a=f=>{f.style.cssText=`
|
|
125
125
|
position: fixed;
|
|
126
126
|
top: 50%;
|
|
127
127
|
left: 50%;
|
|
128
128
|
transform: translate(-50%, -50%);
|
|
129
129
|
z-index: 999;
|
|
130
130
|
display: block;
|
|
131
|
-
`},l=()=>{const f=vm(n);if(t.centered&&f){if(i.value=!0,a(f),t.showOverlay){const p=()=>{t.closeOnOverlayClick&&u()};r=VF(t.overlayOpacity,p)}}else if(o.value&&(o.value.show(),i.value=!0,t.showOverlay)){const p=()=>{t.closeOnOverlayClick&&u()};r=VF(t.overlayOpacity,p)}},u=()=>{const f=vm(n);t.centered&&f?(i.value=!1,f.style.display="none",t.showOverlay&&(_b(r||void 0),r=null)):o.value&&(o.value.hide(),i.value=!1,t.showOverlay&&(_b(r||void 0),r=null))},c=()=>{i.value?u():l()},d=()=>{o.value&&(o.value.destroy(),o.value=null),t.showOverlay&&r&&(_b(r),r=null)},h=()=>{var g;const f=vm(n);if(!f)return;if(f.style.display="none",t.centered){t.showOnInit&&l();return}const p={content:f,placement:t.placement,theme:t.theme,trigger:t.trigger,interactive:t.interactive,appendTo:t.appendTo,arrow:t.showArrow,allowHTML:!0,hideOnClick:!1,popperOptions:{...t.popperOptions,modifiers:[...((g=t.popperOptions)==null?void 0:g.modifiers)||[],{name:"computeStyles",options:{adaptive:!1}}]},onShow(){i.value=!0,f.style.display="block"},onHide(){i.value=!1}};if(t.useTrigger){const v=vm(s);if(!v)return;o.value=Pa(v,p)}else{const v=document.createElement("div");v.style.display="none",document.body.appendChild(v),o.value=Pa(v,p)}t.showOnInit&&l()};return tn(()=>{h()}),vs(()=>{d()}),nt(()=>t.alwaysShow,f=>{f?l():u()},{immediate:!0}),{popupRef:n,triggerRef:s,instance:o,isVisible:i,show:l,hide:u,toggle:c,destroy:d}}var H7=Object.create,BF=Object.defineProperty,G7=Object.getOwnPropertyDescriptor,Rb=Object.getOwnPropertyNames,U7=Object.getPrototypeOf,W7=Object.prototype.hasOwnProperty,z7=(e,t)=>function(){return e&&(t=(0,e[Rb(e)[0]])(e=0)),t},j7=(e,t)=>function(){return t||(0,e[Rb(e)[0]])((t={exports:{}}).exports,t),t.exports},K7=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Rb(t))!W7.call(e,o)&&o!==n&&BF(e,o,{get:()=>t[o],enumerable:!(s=G7(t,o))||s.enumerable});return e},q7=(e,t,n)=>(n=e!=null?H7(U7(e)):{},K7(BF(n,"default",{value:e,enumerable:!0}),e)),Kh=z7({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),Y7=j7({"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(e,t){Kh(),t.exports=s;function n(i){return i instanceof Buffer?Buffer.from(i):new i.constructor(i.buffer.slice(),i.byteOffset,i.length)}function s(i){if(i=i||{},i.circles)return o(i);const r=new Map;if(r.set(Date,d=>new Date(d)),r.set(Map,(d,h)=>new Map(l(Array.from(d),h))),r.set(Set,(d,h)=>new Set(l(Array.from(d),h))),i.constructorHandlers)for(const d of i.constructorHandlers)r.set(d[0],d[1]);let a=null;return i.proto?c:u;function l(d,h){const f=Object.keys(d),p=new Array(f.length);for(let g=0;g<f.length;g++){const v=f[g],C=d[v];typeof C!="object"||C===null?p[v]=C:C.constructor!==Object&&(a=r.get(C.constructor))?p[v]=a(C,h):ArrayBuffer.isView(C)?p[v]=n(C):p[v]=h(C)}return p}function u(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return l(d,u);if(d.constructor!==Object&&(a=r.get(d.constructor)))return a(d,u);const h={};for(const f in d){if(Object.hasOwnProperty.call(d,f)===!1)continue;const p=d[f];typeof p!="object"||p===null?h[f]=p:p.constructor!==Object&&(a=r.get(p.constructor))?h[f]=a(p,u):ArrayBuffer.isView(p)?h[f]=n(p):h[f]=u(p)}return h}function c(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return l(d,c);if(d.constructor!==Object&&(a=r.get(d.constructor)))return a(d,c);const h={};for(const f in d){const p=d[f];typeof p!="object"||p===null?h[f]=p:p.constructor!==Object&&(a=r.get(p.constructor))?h[f]=a(p,c):ArrayBuffer.isView(p)?h[f]=n(p):h[f]=c(p)}return h}}function o(i){const r=[],a=[],l=new Map;if(l.set(Date,f=>new Date(f)),l.set(Map,(f,p)=>new Map(c(Array.from(f),p))),l.set(Set,(f,p)=>new Set(c(Array.from(f),p))),i.constructorHandlers)for(const f of i.constructorHandlers)l.set(f[0],f[1]);let u=null;return i.proto?h:d;function c(f,p){const g=Object.keys(f),v=new Array(g.length);for(let C=0;C<g.length;C++){const S=g[C],b=f[S];if(typeof b!="object"||b===null)v[S]=b;else if(b.constructor!==Object&&(u=l.get(b.constructor)))v[S]=u(b,p);else if(ArrayBuffer.isView(b))v[S]=n(b);else{const w=r.indexOf(b);w!==-1?v[S]=a[w]:v[S]=p(b)}}return v}function d(f){if(typeof f!="object"||f===null)return f;if(Array.isArray(f))return c(f,d);if(f.constructor!==Object&&(u=l.get(f.constructor)))return u(f,d);const p={};r.push(f),a.push(p);for(const g in f){if(Object.hasOwnProperty.call(f,g)===!1)continue;const v=f[g];if(typeof v!="object"||v===null)p[g]=v;else if(v.constructor!==Object&&(u=l.get(v.constructor)))p[g]=u(v,d);else if(ArrayBuffer.isView(v))p[g]=n(v);else{const C=r.indexOf(v);C!==-1?p[g]=a[C]:p[g]=d(v)}}return r.pop(),a.pop(),p}function h(f){if(typeof f!="object"||f===null)return f;if(Array.isArray(f))return c(f,h);if(f.constructor!==Object&&(u=l.get(f.constructor)))return u(f,h);const p={};r.push(f),a.push(p);for(const g in f){const v=f[g];if(typeof v!="object"||v===null)p[g]=v;else if(v.constructor!==Object&&(u=l.get(v.constructor)))p[g]=u(v,h);else if(ArrayBuffer.isView(v))p[g]=n(v);else{const C=r.indexOf(v);C!==-1?p[g]=a[C]:p[g]=h(v)}}return r.pop(),a.pop(),p}}}});Kh(),Kh(),Kh();var $F=typeof navigator<"u",Dt=typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof global<"u"?global:{};typeof Dt.chrome<"u"&&Dt.chrome.devtools,$F&&(Dt.self,Dt.top);var HF;typeof navigator<"u"&&((HF=navigator.userAgent)==null||HF.toLowerCase().includes("electron")),Kh();var Z7=q7(Y7()),X7=/(?:^|[-_/])(\w)/g;function J7(e,t){return t?t.toUpperCase():""}function Q7(e){return e&&`${e}`.replace(X7,J7)}function e9(e,t){let n=e.replace(/^[a-z]:/i,"").replace(/\\/g,"/");n.endsWith(`index${t}`)&&(n=n.replace(`/index${t}`,t));const s=n.lastIndexOf("/"),o=n.substring(s+1);{const i=o.lastIndexOf(t);return o.substring(0,i)}}var GF=(0,Z7.default)({circles:!0});const t9={trailing:!0};function _c(e,t=25,n={}){if(n={...t9,...n},!Number.isFinite(t))throw new TypeError("Expected `wait` to be a finite number");let s,o,i=[],r,a;const l=(u,c)=>(r=n9(e,u,c),r.finally(()=>{if(r=null,n.trailing&&a&&!o){const d=l(u,a);return a=null,d}}),r);return function(...u){return r?(n.trailing&&(a=u),r):new Promise(c=>{const d=!o&&n.leading;clearTimeout(o),o=setTimeout(()=>{o=null;const h=n.leading?s:l(this,u);for(const f of i)f(h);i=[]},t),d?(s=l(this,u),c(s)):i.push(c)})}}async function n9(e,t,n){return await e.apply(t,n)}function Db(e,t={},n){for(const s in e){const o=e[s],i=n?`${n}:${s}`:s;typeof o=="object"&&o!==null?Db(o,t,i):typeof o=="function"&&(t[i]=o)}return t}const s9={run:e=>e()},o9=()=>s9,UF=typeof console.createTask<"u"?console.createTask:o9;function i9(e,t){const n=t.shift(),s=UF(n);return e.reduce((o,i)=>o.then(()=>s.run(()=>i(...t))),Promise.resolve())}function r9(e,t){const n=t.shift(),s=UF(n);return Promise.all(e.map(o=>s.run(()=>o(...t))))}function Tb(e,t){for(const n of[...e])n(t)}class a9{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,n,s={}){if(!t||typeof n!="function")return()=>{};const o=t;let i;for(;this._deprecatedHooks[t];)i=this._deprecatedHooks[t],t=i.to;if(i&&!s.allowDeprecated){let r=i.message;r||(r=`${o} hook has been deprecated`+(i.to?`, please use ${i.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(r)||(console.warn(r),this._deprecatedMessages.add(r))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(n),()=>{n&&(this.removeHook(t,n),n=void 0)}}hookOnce(t,n){let s,o=(...i)=>(typeof s=="function"&&s(),s=void 0,o=void 0,n(...i));return s=this.hook(t,o),s}removeHook(t,n){if(this._hooks[t]){const s=this._hooks[t].indexOf(n);s!==-1&&this._hooks[t].splice(s,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,n){this._deprecatedHooks[t]=typeof n=="string"?{to:n}:n;const s=this._hooks[t]||[];delete this._hooks[t];for(const o of s)this.hook(t,o)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const n in t)this.deprecateHook(n,t[n])}addHooks(t){const n=Db(t),s=Object.keys(n).map(o=>this.hook(o,n[o]));return()=>{for(const o of s.splice(0,s.length))o()}}removeHooks(t){const n=Db(t);for(const s in n)this.removeHook(s,n[s])}removeAllHooks(){for(const t in this._hooks)delete this._hooks[t]}callHook(t,...n){return n.unshift(t),this.callHookWith(i9,t,...n)}callHookParallel(t,...n){return n.unshift(t),this.callHookWith(r9,t,...n)}callHookWith(t,n,...s){const o=this._before||this._after?{name:n,args:s,context:{}}:void 0;this._before&&Tb(this._before,o);const i=t(n in this._hooks?[...this._hooks[n]]:[],s);return i instanceof Promise?i.finally(()=>{this._after&&o&&Tb(this._after,o)}):(this._after&&o&&Tb(this._after,o),i)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const n=this._before.indexOf(t);n!==-1&&this._before.splice(n,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const n=this._after.indexOf(t);n!==-1&&this._after.splice(n,1)}}}}function WF(){return new a9}var l9=Object.create,zF=Object.defineProperty,u9=Object.getOwnPropertyDescriptor,Ib=Object.getOwnPropertyNames,c9=Object.getPrototypeOf,d9=Object.prototype.hasOwnProperty,h9=(e,t)=>function(){return e&&(t=(0,e[Ib(e)[0]])(e=0)),t},jF=(e,t)=>function(){return t||(0,e[Ib(e)[0]])((t={exports:{}}).exports,t),t.exports},f9=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ib(t))!d9.call(e,o)&&o!==n&&zF(e,o,{get:()=>t[o],enumerable:!(s=u9(t,o))||s.enumerable});return e},p9=(e,t,n)=>(n=e!=null?l9(c9(e)):{},f9(zF(n,"default",{value:e,enumerable:!0}),e)),Qe=h9({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),g9=jF({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(e,t){Qe(),function(n){var s={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"Ae",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"Oe",Ő:"O",Ø:"O",Ù:"U",Ú:"U",Û:"U",Ü:"Ue",Ű:"U",Ý:"Y",Þ:"TH",ß:"ss",à:"a",á:"a",â:"a",ã:"a",ä:"ae",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"oe",ő:"o",ø:"o",ù:"u",ú:"u",û:"u",ü:"ue",ű:"u",ý:"y",þ:"th",ÿ:"y","ẞ":"SS",ا:"a",أ:"a",إ:"i",آ:"aa",ؤ:"u",ئ:"e",ء:"a",ب:"b",ت:"t",ث:"th",ج:"j",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"dh",ط:"t",ظ:"z",ع:"a",غ:"gh",ف:"f",ق:"q",ك:"k",ل:"l",م:"m",ن:"n",ه:"h",و:"w",ي:"y",ى:"a",ة:"h",ﻻ:"la",ﻷ:"laa",ﻹ:"lai",ﻵ:"laa",گ:"g",چ:"ch",پ:"p",ژ:"zh",ک:"k",ی:"y","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9",က:"k",ခ:"kh",ဂ:"g",ဃ:"ga",င:"ng",စ:"s",ဆ:"sa",ဇ:"z","စျ":"za",ည:"ny",ဋ:"t",ဌ:"ta",ဍ:"d",ဎ:"da",ဏ:"na",တ:"t",ထ:"ta",ဒ:"d",ဓ:"da",န:"n",ပ:"p",ဖ:"pa",ဗ:"b",ဘ:"ba",မ:"m",ယ:"y",ရ:"ya",လ:"l",ဝ:"w",သ:"th",ဟ:"h",ဠ:"la",အ:"a","ြ":"y","ျ":"ya","ွ":"w","ြွ":"yw","ျွ":"ywa","ှ":"h",ဧ:"e","၏":"-e",ဣ:"i",ဤ:"-i",ဉ:"u",ဦ:"-u",ဩ:"aw","သြော":"aw",ဪ:"aw","၀":"0","၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","္":"","့":"","း":"",č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z",ހ:"h",ށ:"sh",ނ:"n",ރ:"r",ބ:"b",ޅ:"lh",ކ:"k",އ:"a",ވ:"v",މ:"m",ފ:"f",ދ:"dh",ތ:"th",ލ:"l",ގ:"g",ޏ:"gn",ސ:"s",ޑ:"d",ޒ:"z",ޓ:"t",ޔ:"y",ޕ:"p",ޖ:"j",ޗ:"ch",ޘ:"tt",ޙ:"hh",ޚ:"kh",ޛ:"th",ޜ:"z",ޝ:"sh",ޞ:"s",ޟ:"d",ޠ:"t",ޡ:"z",ޢ:"a",ޣ:"gh",ޤ:"q",ޥ:"w","ަ":"a","ާ":"aa","ި":"i","ީ":"ee","ު":"u","ޫ":"oo","ެ":"e","ޭ":"ey","ޮ":"o","ޯ":"oa","ް":"",ა:"a",ბ:"b",გ:"g",დ:"d",ე:"e",ვ:"v",ზ:"z",თ:"t",ი:"i",კ:"k",ლ:"l",მ:"m",ნ:"n",ო:"o",პ:"p",ჟ:"zh",რ:"r",ს:"s",ტ:"t",უ:"u",ფ:"p",ქ:"k",ღ:"gh",ყ:"q",შ:"sh",ჩ:"ch",ც:"ts",ძ:"dz",წ:"ts",ჭ:"ch",ხ:"kh",ჯ:"j",ჰ:"h",α:"a",β:"v",γ:"g",δ:"d",ε:"e",ζ:"z",η:"i",θ:"th",ι:"i",κ:"k",λ:"l",μ:"m",ν:"n",ξ:"ks",ο:"o",π:"p",ρ:"r",σ:"s",τ:"t",υ:"y",φ:"f",χ:"x",ψ:"ps",ω:"o",ά:"a",έ:"e",ί:"i",ό:"o",ύ:"y",ή:"i",ώ:"o",ς:"s",ϊ:"i",ΰ:"y",ϋ:"y",ΐ:"i",Α:"A",Β:"B",Γ:"G",Δ:"D",Ε:"E",Ζ:"Z",Η:"I",Θ:"TH",Ι:"I",Κ:"K",Λ:"L",Μ:"M",Ν:"N",Ξ:"KS",Ο:"O",Π:"P",Ρ:"R",Σ:"S",Τ:"T",Υ:"Y",Φ:"F",Χ:"X",Ψ:"PS",Ω:"O",Ά:"A",Έ:"E",Ί:"I",Ό:"O",Ύ:"Y",Ή:"I",Ώ:"O",Ϊ:"I",Ϋ:"Y",ā:"a",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",ū:"u",Ā:"A",Ē:"E",Ģ:"G",Ī:"I",Ķ:"k",Ļ:"L",Ņ:"N",Ū:"U",Ќ:"Kj",ќ:"kj",Љ:"Lj",љ:"lj",Њ:"Nj",њ:"nj",Тс:"Ts",тс:"ts",ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"E",Ł:"L",Ń:"N",Ś:"S",Ź:"Z",Ż:"Z",Є:"Ye",І:"I",Ї:"Yi",Ґ:"G",є:"ye",і:"i",ї:"yi",ґ:"g",ă:"a",Ă:"A",ș:"s",Ș:"S",ț:"t",Ț:"T",ţ:"t",Ţ:"T",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"c",ч:"ch",ш:"sh",щ:"sh",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"Yo",Ж:"Zh",З:"Z",И:"I",Й:"I",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"Kh",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sh",Ъ:"",Ы:"Y",Ь:"",Э:"E",Ю:"Yu",Я:"Ya",ђ:"dj",ј:"j",ћ:"c",џ:"dz",Ђ:"Dj",Ј:"j",Ћ:"C",Џ:"Dz",ľ:"l",ĺ:"l",ŕ:"r",Ľ:"L",Ĺ:"L",Ŕ:"R",ş:"s",Ş:"S",ı:"i",İ:"I",ğ:"g",Ğ:"G",ả:"a",Ả:"A",ẳ:"a",Ẳ:"A",ẩ:"a",Ẩ:"A",đ:"d",Đ:"D",ẹ:"e",Ẹ:"E",ẽ:"e",Ẽ:"E",ẻ:"e",Ẻ:"E",ế:"e",Ế:"E",ề:"e",Ề:"E",ệ:"e",Ệ:"E",ễ:"e",Ễ:"E",ể:"e",Ể:"E",ỏ:"o",ọ:"o",Ọ:"o",ố:"o",Ố:"O",ồ:"o",Ồ:"O",ổ:"o",Ổ:"O",ộ:"o",Ộ:"O",ỗ:"o",Ỗ:"O",ơ:"o",Ơ:"O",ớ:"o",Ớ:"O",ờ:"o",Ờ:"O",ợ:"o",Ợ:"O",ỡ:"o",Ỡ:"O",Ở:"o",ở:"o",ị:"i",Ị:"I",ĩ:"i",Ĩ:"I",ỉ:"i",Ỉ:"i",ủ:"u",Ủ:"U",ụ:"u",Ụ:"U",ũ:"u",Ũ:"U",ư:"u",Ư:"U",ứ:"u",Ứ:"U",ừ:"u",Ừ:"U",ự:"u",Ự:"U",ữ:"u",Ữ:"U",ử:"u",Ử:"ư",ỷ:"y",Ỷ:"y",ỳ:"y",Ỳ:"Y",ỵ:"y",Ỵ:"Y",ỹ:"y",Ỹ:"Y",ạ:"a",Ạ:"A",ấ:"a",Ấ:"A",ầ:"a",Ầ:"A",ậ:"a",Ậ:"A",ẫ:"a",Ẫ:"A",ắ:"a",Ắ:"A",ằ:"a",Ằ:"A",ặ:"a",Ặ:"A",ẵ:"a",Ẵ:"A","⓪":"0","①":"1","②":"2","③":"3","④":"4","⑤":"5","⑥":"6","⑦":"7","⑧":"8","⑨":"9","⑩":"10","⑪":"11","⑫":"12","⑬":"13","⑭":"14","⑮":"15","⑯":"16","⑰":"17","⑱":"18","⑲":"18","⑳":"18","⓵":"1","⓶":"2","⓷":"3","⓸":"4","⓹":"5","⓺":"6","⓻":"7","⓼":"8","⓽":"9","⓾":"10","⓿":"0","⓫":"11","⓬":"12","⓭":"13","⓮":"14","⓯":"15","⓰":"16","⓱":"17","⓲":"18","⓳":"19","⓴":"20","Ⓐ":"A","Ⓑ":"B","Ⓒ":"C","Ⓓ":"D","Ⓔ":"E","Ⓕ":"F","Ⓖ":"G","Ⓗ":"H","Ⓘ":"I","Ⓙ":"J","Ⓚ":"K","Ⓛ":"L","Ⓜ":"M","Ⓝ":"N","Ⓞ":"O","Ⓟ":"P","Ⓠ":"Q","Ⓡ":"R","Ⓢ":"S","Ⓣ":"T","Ⓤ":"U","Ⓥ":"V","Ⓦ":"W","Ⓧ":"X","Ⓨ":"Y","Ⓩ":"Z","ⓐ":"a","ⓑ":"b","ⓒ":"c","ⓓ":"d","ⓔ":"e","ⓕ":"f","ⓖ":"g","ⓗ":"h","ⓘ":"i","ⓙ":"j","ⓚ":"k","ⓛ":"l","ⓜ":"m","ⓝ":"n","ⓞ":"o","ⓟ":"p","ⓠ":"q","ⓡ":"r","ⓢ":"s","ⓣ":"t","ⓤ":"u","ⓦ":"v","ⓥ":"w","ⓧ":"x","ⓨ":"y","ⓩ":"z","“":'"',"”":'"',"‘":"'","’":"'","∂":"d",ƒ:"f","™":"(TM)","©":"(C)",œ:"oe",Œ:"OE","®":"(R)","†":"+","℠":"(SM)","…":"...","˚":"o",º:"o",ª:"a","•":"*","၊":",","။":".",$:"USD","€":"EUR","₢":"BRN","₣":"FRF","£":"GBP","₤":"ITL","₦":"NGN","₧":"ESP","₩":"KRW","₪":"ILS","₫":"VND","₭":"LAK","₮":"MNT","₯":"GRD","₱":"ARS","₲":"PYG","₳":"ARA","₴":"UAH","₵":"GHS","¢":"cent","¥":"CNY",元:"CNY",円:"YEN","﷼":"IRR","₠":"EWE","฿":"THB","₨":"INR","₹":"INR","₰":"PF","₺":"TRY","؋":"AFN","₼":"AZN",лв:"BGN","៛":"KHR","₡":"CRC","₸":"KZT",ден:"MKD",zł:"PLN","₽":"RUB","₾":"GEL"},o=["်","ް"],i={"ာ":"a","ါ":"a","ေ":"e","ဲ":"e","ိ":"i","ီ":"i","ို":"o","ု":"u","ူ":"u","ေါင်":"aung","ော":"aw","ော်":"aw","ေါ":"aw","ေါ်":"aw","်":"်","က်":"et","ိုက်":"aik","ောက်":"auk","င်":"in","ိုင်":"aing","ောင်":"aung","စ်":"it","ည်":"i","တ်":"at","ိတ်":"eik","ုတ်":"ok","ွတ်":"ut","ေတ်":"it","ဒ်":"d","ိုဒ်":"ok","ုဒ်":"ait","န်":"an","ာန်":"an","ိန်":"ein","ုန်":"on","ွန်":"un","ပ်":"at","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","န်ုပ်":"nub","မ်":"an","ိမ်":"ein","ုမ်":"on","ွမ်":"un","ယ်":"e","ိုလ်":"ol","ဉ်":"in","ံ":"an","ိံ":"ein","ုံ":"on","ައް":"ah","ަށް":"ah"},r={en:{},az:{ç:"c",ə:"e",ğ:"g",ı:"i",ö:"o",ş:"s",ü:"u",Ç:"C",Ə:"E",Ğ:"G",İ:"I",Ö:"O",Ş:"S",Ü:"U"},cs:{č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z"},fi:{ä:"a",Ä:"A",ö:"o",Ö:"O"},hu:{ä:"a",Ä:"A",ö:"o",Ö:"O",ü:"u",Ü:"U",ű:"u",Ű:"U"},lt:{ą:"a",č:"c",ę:"e",ė:"e",į:"i",š:"s",ų:"u",ū:"u",ž:"z",Ą:"A",Č:"C",Ę:"E",Ė:"E",Į:"I",Š:"S",Ų:"U",Ū:"U"},lv:{ā:"a",č:"c",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",š:"s",ū:"u",ž:"z",Ā:"A",Č:"C",Ē:"E",Ģ:"G",Ī:"i",Ķ:"k",Ļ:"L",Ņ:"N",Š:"S",Ū:"u",Ž:"Z"},pl:{ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ó:"o",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"e",Ł:"L",Ń:"N",Ó:"O",Ś:"S",Ź:"Z",Ż:"Z"},sv:{ä:"a",Ä:"A",ö:"o",Ö:"O"},sk:{ä:"a",Ä:"A"},sr:{љ:"lj",њ:"nj",Љ:"Lj",Њ:"Nj",đ:"dj",Đ:"Dj"},tr:{Ü:"U",Ö:"O",ü:"u",ö:"o"}},a={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},ge:{"∆":"delta","∞":"usasruloba","♥":"siqvaruli","&":"da","|":"an","<":"naklebi",">":"meti","∑":"jami","¤":"valuta"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}},l=[";","?",":","@","&","=","+","$",",","/"].join(""),u=[";","?",":","@","&","=","+","$",","].join(""),c=[".","!","~","*","'","(",")"].join(""),d=function(v,C){var S="-",b="",w="",_=!0,R={},T,I,x,P,D,F,k,O,$,q,J,ee,X,ve,te="";if(typeof v!="string")return"";if(typeof C=="string"&&(S=C),k=a.en,O=r.en,typeof C=="object"){T=C.maintainCase||!1,R=C.custom&&typeof C.custom=="object"?C.custom:R,x=+C.truncate>1&&C.truncate||!1,P=C.uric||!1,D=C.uricNoSlash||!1,F=C.mark||!1,_=!(C.symbols===!1||C.lang===!1),S=C.separator||S,P&&(te+=l),D&&(te+=u),F&&(te+=c),k=C.lang&&a[C.lang]&&_?a[C.lang]:_?a.en:{},O=C.lang&&r[C.lang]?r[C.lang]:C.lang===!1||C.lang===!0?{}:r.en,C.titleCase&&typeof C.titleCase.length=="number"&&Array.prototype.toString.call(C.titleCase)?(C.titleCase.forEach(function(N){R[N+""]=N+""}),I=!0):I=!!C.titleCase,C.custom&&typeof C.custom.length=="number"&&Array.prototype.toString.call(C.custom)&&C.custom.forEach(function(N){R[N+""]=N+""}),Object.keys(R).forEach(function(N){var V;N.length>1?V=new RegExp("\\b"+f(N)+"\\b","gi"):V=new RegExp(f(N),"gi"),v=v.replace(V,R[N])});for(J in R)te+=J}for(te+=S,te=f(te),v=v.replace(/(^\s+|\s+$)/g,""),X=!1,ve=!1,q=0,ee=v.length;q<ee;q++)J=v[q],p(J,R)?X=!1:O[J]?(J=X&&O[J].match(/[A-Za-z0-9]/)?" "+O[J]:O[J],X=!1):J in s?(q+1<ee&&o.indexOf(v[q+1])>=0?(w+=J,J=""):ve===!0?(J=i[w]+s[J],w=""):J=X&&s[J].match(/[A-Za-z0-9]/)?" "+s[J]:s[J],X=!1,ve=!1):J in i?(w+=J,J="",q===ee-1&&(J=i[w]),ve=!0):k[J]&&!(P&&l.indexOf(J)!==-1)&&!(D&&u.indexOf(J)!==-1)?(J=X||b.substr(-1).match(/[A-Za-z0-9]/)?S+k[J]:k[J],J+=v[q+1]!==void 0&&v[q+1].match(/[A-Za-z0-9]/)?S:"",X=!0):(ve===!0?(J=i[w]+J,w="",ve=!1):X&&(/[A-Za-z0-9]/.test(J)||b.substr(-1).match(/A-Za-z0-9]/))&&(J=" "+J),X=!1),b+=J.replace(new RegExp("[^\\w\\s"+te+"_-]","g"),S);return I&&(b=b.replace(/(\w)(\S*)/g,function(N,V,ne){var ie=V.toUpperCase()+(ne!==null?ne:"");return Object.keys(R).indexOf(ie.toLowerCase())<0?ie:ie.toLowerCase()})),b=b.replace(/\s+/g,S).replace(new RegExp("\\"+S+"+","g"),S).replace(new RegExp("(^\\"+S+"+|\\"+S+"+$)","g"),""),x&&b.length>x&&($=b.charAt(x)===S,b=b.slice(0,x),$||(b=b.slice(0,b.lastIndexOf(S)))),!T&&!I&&(b=b.toLowerCase()),b},h=function(v){return function(S){return d(S,v)}},f=function(v){return v.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},p=function(g,v){for(var C in v)if(v[C]===g)return!0};if(typeof t<"u"&&t.exports)t.exports=d,t.exports.createSlug=h;else if(typeof define<"u"&&define.amd)define([],function(){return d});else try{if(n.getSlug||n.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";n.getSlug=d,n.createSlug=h}catch{}}(e)}}),m9=jF({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js"(e,t){Qe(),t.exports=g9()}});Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe();function v9(e){var t;const n=e.name||e._componentTag||e.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__||e.__name;return n==="index"&&((t=e.__file)!=null&&t.endsWith("index.vue"))?"":n}function y9(e){const t=e.__file;if(t)return Q7(e9(t,".vue"))}function KF(e,t){return e.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__=t,t}function xb(e){if(e.__VUE_DEVTOOLS_NEXT_APP_RECORD__)return e.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(e.root)return e.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__}function qF(e){var t,n;const s=(t=e.subTree)==null?void 0:t.type,o=xb(e);return o?((n=o==null?void 0:o.types)==null?void 0:n.Fragment)===s:!1}function ym(e){var t,n,s;const o=v9((e==null?void 0:e.type)||{});if(o)return o;if((e==null?void 0:e.root)===e)return"Root";for(const r in(n=(t=e.parent)==null?void 0:t.type)==null?void 0:n.components)if(e.parent.type.components[r]===(e==null?void 0:e.type))return KF(e,r);for(const r in(s=e.appContext)==null?void 0:s.components)if(e.appContext.components[r]===(e==null?void 0:e.type))return KF(e,r);const i=y9((e==null?void 0:e.type)||{});return i||"Anonymous Component"}function w9(e){var t,n,s;const o=(s=(n=(t=e==null?void 0:e.appContext)==null?void 0:t.app)==null?void 0:n.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__)!=null?s:0,i=e===(e==null?void 0:e.root)?"root":e.uid;return`${o}:${i}`}function Fb(e,t){return t=t||`${e.id}:root`,e.instanceMap.get(t)||e.instanceMap.get(":root")}function C9(){const e={top:0,bottom:0,left:0,right:0,get width(){return e.right-e.left},get height(){return e.bottom-e.top}};return e}var wm;function b9(e){return wm||(wm=document.createRange()),wm.selectNode(e),wm.getBoundingClientRect()}function S9(e){const t=C9();if(!e.children)return t;for(let n=0,s=e.children.length;n<s;n++){const o=e.children[n];let i;if(o.component)i=ql(o.component);else if(o.el){const r=o.el;r.nodeType===1||r.getBoundingClientRect?i=r.getBoundingClientRect():r.nodeType===3&&r.data.trim()&&(i=b9(r))}i&&E9(t,i)}return t}function E9(e,t){return(!e.top||t.top<e.top)&&(e.top=t.top),(!e.bottom||t.bottom>e.bottom)&&(e.bottom=t.bottom),(!e.left||t.left<e.left)&&(e.left=t.left),(!e.right||t.right>e.right)&&(e.right=t.right),e}var YF={top:0,left:0,right:0,bottom:0,width:0,height:0};function ql(e){const t=e.subTree.el;return typeof window>"u"?YF:qF(e)?S9(e.subTree):(t==null?void 0:t.nodeType)===1?t==null?void 0:t.getBoundingClientRect():e.subTree.component?ql(e.subTree.component):YF}Qe();function Pb(e){return qF(e)?_9(e.subTree):e.subTree?[e.subTree.el]:[]}function _9(e){if(!e.children)return[];const t=[];return e.children.forEach(n=>{n.component?t.push(...Pb(n.component)):n!=null&&n.el&&t.push(n.el)}),t}var ZF="__vue-devtools-component-inspector__",XF="__vue-devtools-component-inspector__card__",JF="__vue-devtools-component-inspector__name__",QF="__vue-devtools-component-inspector__indicator__",eP={display:"block",zIndex:2147483640,position:"fixed",backgroundColor:"#42b88325",border:"1px solid #42b88350",borderRadius:"5px",transition:"all 0.1s ease-in",pointerEvents:"none"},R9={fontFamily:"Arial, Helvetica, sans-serif",padding:"5px 8px",borderRadius:"4px",textAlign:"left",position:"absolute",left:0,color:"#e9e9e9",fontSize:"14px",fontWeight:600,lineHeight:"24px",backgroundColor:"#42b883",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"},D9={display:"inline-block",fontWeight:400,fontStyle:"normal",fontSize:"12px",opacity:.7};function Rc(){return document.getElementById(ZF)}function T9(){return document.getElementById(XF)}function I9(){return document.getElementById(QF)}function x9(){return document.getElementById(JF)}function Ab(e){return{left:`${Math.round(e.left*100)/100}px`,top:`${Math.round(e.top*100)/100}px`,width:`${Math.round(e.width*100)/100}px`,height:`${Math.round(e.height*100)/100}px`}}function kb(e){var t;const n=document.createElement("div");n.id=(t=e.elementId)!=null?t:ZF,Object.assign(n.style,{...eP,...Ab(e.bounds),...e.style});const s=document.createElement("span");s.id=XF,Object.assign(s.style,{...R9,top:e.bounds.top<35?0:"-35px"});const o=document.createElement("span");o.id=JF,o.innerHTML=`<${e.name}> `;const i=document.createElement("i");return i.id=QF,i.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`,Object.assign(i.style,D9),s.appendChild(o),s.appendChild(i),n.appendChild(s),document.body.appendChild(n),n}function Ob(e){const t=Rc(),n=T9(),s=x9(),o=I9();t&&(Object.assign(t.style,{...eP,...Ab(e.bounds)}),Object.assign(n.style,{top:e.bounds.top<35?0:"-35px"}),s.innerHTML=`<${e.name}> `,o.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`)}function F9(e){const t=ql(e);if(!t.width&&!t.height)return;const n=ym(e);Rc()?Ob({bounds:t,name:n}):kb({bounds:t,name:n})}function tP(){const e=Rc();e&&(e.style.display="none")}var Mb=null;function Nb(e){const t=e.target;if(t){const n=t.__vueParentComponent;if(n&&(Mb=n,n.vnode.el)){const o=ql(n),i=ym(n);Rc()?Ob({bounds:o,name:i}):kb({bounds:o,name:i})}}}function P9(e,t){if(e.preventDefault(),e.stopPropagation(),Mb){const n=w9(Mb);t(n)}}var Cm=null;function A9(){tP(),window.removeEventListener("mouseover",Nb),window.removeEventListener("click",Cm,!0),Cm=null}function k9(){return window.addEventListener("mouseover",Nb),new Promise(e=>{function t(n){n.preventDefault(),n.stopPropagation(),P9(n,s=>{window.removeEventListener("click",t,!0),Cm=null,window.removeEventListener("mouseover",Nb);const o=Rc();o&&(o.style.display="none"),e(JSON.stringify({id:s}))})}Cm=t,window.addEventListener("click",t,!0)})}function O9(e){const t=Fb(Js.value,e.id);if(t){const[n]=Pb(t);if(typeof n.scrollIntoView=="function")n.scrollIntoView({behavior:"smooth"});else{const s=ql(t),o=document.createElement("div"),i={...Ab(s),position:"absolute"};Object.assign(o.style,i),document.body.appendChild(o),o.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{document.body.removeChild(o)},2e3)}setTimeout(()=>{const s=ql(t);if(s.width||s.height){const o=ym(t),i=Rc();i?Ob({...e,name:o,bounds:s}):kb({...e,name:o,bounds:s}),setTimeout(()=>{i&&(i.style.display="none")},1500)}},1200)}}Qe();var nP,sP;(sP=(nP=Dt).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__)!=null||(nP.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__=!0);function M9(e){let t=0;const n=setInterval(()=>{Dt.__VUE_INSPECTOR__&&(clearInterval(n),t+=30,e()),t>=5e3&&clearInterval(n)},30)}function N9(){const e=Dt.__VUE_INSPECTOR__,t=e.openInEditor;e.openInEditor=async(...n)=>{e.disable(),t(...n)}}function L9(){return new Promise(e=>{function t(){N9(),e(Dt.__VUE_INSPECTOR__)}Dt.__VUE_INSPECTOR__?t():M9(()=>{t()})})}Qe(),Qe();function V9(e){return!!(e&&e.__v_isReadonly)}function oP(e){return V9(e)?oP(e.__v_raw):!!(e&&e.__v_isReactive)}function Lb(e){return!!(e&&e.__v_isRef===!0)}function qh(e){const t=e&&e.__v_raw;return t?qh(t):e}var B9=class{constructor(){this.refEditor=new $9}set(e,t,n,s){const o=Array.isArray(t)?t:t.split(".");for(;o.length>1;){const a=o.shift();e instanceof Map?e=e.get(a):e instanceof Set?e=Array.from(e.values())[a]:e=e[a],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}const i=o[0],r=this.refEditor.get(e)[i];s?s(e,i,n):this.refEditor.isRef(r)?this.refEditor.set(r,n):e[i]=n}get(e,t){const n=Array.isArray(t)?t:t.split(".");for(let s=0;s<n.length;s++)if(e instanceof Map?e=e.get(n[s]):e=e[n[s]],this.refEditor.isRef(e)&&(e=this.refEditor.get(e)),!e)return;return e}has(e,t,n=!1){if(typeof e>"u")return!1;const s=Array.isArray(t)?t.slice():t.split("."),o=n?2:1;for(;e&&s.length>o;){const i=s.shift();e=e[i],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}return e!=null&&Object.prototype.hasOwnProperty.call(e,s[0])}createDefaultSetCallback(e){return(t,n,s)=>{if((e.remove||e.newKey)&&(Array.isArray(t)?t.splice(n,1):qh(t)instanceof Map?t.delete(n):qh(t)instanceof Set?t.delete(Array.from(t.values())[n]):Reflect.deleteProperty(t,n)),!e.remove){const o=t[e.newKey||n];this.refEditor.isRef(o)?this.refEditor.set(o,s):qh(t)instanceof Map?t.set(e.newKey||n,s):qh(t)instanceof Set?t.add(s):t[e.newKey||n]=s}}}},$9=class{set(e,t){if(Lb(e))e.value=t;else{if(e instanceof Set&&Array.isArray(t)){e.clear(),t.forEach(o=>e.add(o));return}const n=Object.keys(t);if(e instanceof Map){const o=new Set(e.keys());n.forEach(i=>{e.set(i,Reflect.get(t,i)),o.delete(i)}),o.forEach(i=>e.delete(i));return}const s=new Set(Object.keys(e));n.forEach(o=>{Reflect.set(e,o,Reflect.get(t,o)),s.delete(o)}),s.forEach(o=>Reflect.deleteProperty(e,o))}}get(e){return Lb(e)?e.value:e}isRef(e){return Lb(e)||oP(e)}};Qe(),Qe(),Qe();var H9="__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";function G9(){if(typeof window>"u"||!$F||typeof localStorage>"u"||localStorage===null)return{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""};const e=typeof localStorage.getItem<"u"?localStorage.getItem(H9):null;return e?JSON.parse(e):{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""}}Qe(),Qe(),Qe();var iP,rP;(rP=(iP=Dt).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS)!=null||(iP.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS=[]);var U9=new Proxy(Dt.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS,{get(e,t,n){return Reflect.get(e,t,n)}});function W9(e,t){ys.timelineLayersState[t.id]=!1,U9.push({...e,descriptorId:t.id,appRecord:xb(t.app)})}var aP,lP;(lP=(aP=Dt).__VUE_DEVTOOLS_KIT_INSPECTOR__)!=null||(aP.__VUE_DEVTOOLS_KIT_INSPECTOR__=[]);var Vb=new Proxy(Dt.__VUE_DEVTOOLS_KIT_INSPECTOR__,{get(e,t,n){return Reflect.get(e,t,n)}}),uP=_c(()=>{Tc.hooks.callHook("sendInspectorToClient",cP())});function z9(e,t){var n,s;Vb.push({options:e,descriptor:t,treeFilterPlaceholder:(n=e.treeFilterPlaceholder)!=null?n:"Search tree...",stateFilterPlaceholder:(s=e.stateFilterPlaceholder)!=null?s:"Search state...",treeFilter:"",selectedNodeId:"",appRecord:xb(t.app)}),uP()}function cP(){return Vb.filter(e=>e.descriptor.app===Js.value.app).filter(e=>e.descriptor.id!=="components").map(e=>{var t;const n=e.descriptor,s=e.options;return{id:s.id,label:s.label,logo:n.logo,icon:`custom-ic-baseline-${(t=s==null?void 0:s.icon)==null?void 0:t.replace(/_/g,"-")}`,packageName:n.packageName,homepage:n.homepage,pluginId:n.id}})}function bm(e,t){return Vb.find(n=>n.options.id===e&&(t?n.descriptor.app===t:!0))}function j9(){const e=WF();e.hook("addInspector",({inspector:s,plugin:o})=>{z9(s,o.descriptor)});const t=_c(async({inspectorId:s,plugin:o})=>{var i;if(!s||!((i=o==null?void 0:o.descriptor)!=null&&i.app)||ys.highPerfModeEnabled)return;const r=bm(s,o.descriptor.app),a={app:o.descriptor.app,inspectorId:s,filter:(r==null?void 0:r.treeFilter)||"",rootNodes:[]};await new Promise(l=>{e.callHookWith(async u=>{await Promise.all(u.map(c=>c(a))),l()},"getInspectorTree")}),e.callHookWith(async l=>{await Promise.all(l.map(u=>u({inspectorId:s,rootNodes:a.rootNodes})))},"sendInspectorTreeToClient")},120);e.hook("sendInspectorTree",t);const n=_c(async({inspectorId:s,plugin:o})=>{var i;if(!s||!((i=o==null?void 0:o.descriptor)!=null&&i.app)||ys.highPerfModeEnabled)return;const r=bm(s,o.descriptor.app),a={app:o.descriptor.app,inspectorId:s,nodeId:(r==null?void 0:r.selectedNodeId)||"",state:null},l={currentTab:`custom-inspector:${s}`};a.nodeId&&await new Promise(u=>{e.callHookWith(async c=>{await Promise.all(c.map(d=>d(a,l))),u()},"getInspectorState")}),e.callHookWith(async u=>{await Promise.all(u.map(c=>c({inspectorId:s,nodeId:a.nodeId,state:a.state})))},"sendInspectorStateToClient")},120);return e.hook("sendInspectorState",n),e.hook("customInspectorSelectNode",({inspectorId:s,nodeId:o,plugin:i})=>{const r=bm(s,i.descriptor.app);r&&(r.selectedNodeId=o)}),e.hook("timelineLayerAdded",({options:s,plugin:o})=>{W9(s,o.descriptor)}),e.hook("timelineEventAdded",({options:s,plugin:o})=>{var i;const r=["performance","component-event","keyboard","mouse"];ys.highPerfModeEnabled||!((i=ys.timelineLayersState)!=null&&i[o.descriptor.id])&&!r.includes(s.layerId)||e.callHookWith(async a=>{await Promise.all(a.map(l=>l(s)))},"sendTimelineEventToClient")}),e.hook("getComponentInstances",async({app:s})=>{const o=s.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(!o)return null;const i=o.id.toString();return[...o.instanceMap].filter(([a])=>a.split(":")[0]===i).map(([,a])=>a)}),e.hook("getComponentBounds",async({instance:s})=>ql(s)),e.hook("getComponentName",({instance:s})=>ym(s)),e.hook("componentHighlight",({uid:s})=>{const o=Js.value.instanceMap.get(s);o&&F9(o)}),e.hook("componentUnhighlight",()=>{tP()}),e}var dP,hP;(hP=(dP=Dt).__VUE_DEVTOOLS_KIT_APP_RECORDS__)!=null||(dP.__VUE_DEVTOOLS_KIT_APP_RECORDS__=[]);var fP,pP;(pP=(fP=Dt).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__)!=null||(fP.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__={});var gP,mP;(mP=(gP=Dt).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__)!=null||(gP.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__="");var vP,yP;(yP=(vP=Dt).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__)!=null||(vP.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__=[]);var wP,CP;(CP=(wP=Dt).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__)!=null||(wP.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__=[]);var Yl="__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";function K9(){return{connected:!1,clientConnected:!1,vitePluginDetected:!0,appRecords:[],activeAppRecordId:"",tabs:[],commands:[],highPerfModeEnabled:!0,devtoolsClientDetected:{},perfUniqueGroupId:0,timelineLayersState:G9()}}var bP,SP;(SP=(bP=Dt)[Yl])!=null||(bP[Yl]=K9());var q9=_c(e=>{Tc.hooks.callHook("devtoolsStateUpdated",{state:e})});_c((e,t)=>{Tc.hooks.callHook("devtoolsConnectedUpdated",{state:e,oldState:t})});var Sm=new Proxy(Dt.__VUE_DEVTOOLS_KIT_APP_RECORDS__,{get(e,t,n){return t==="value"?Dt.__VUE_DEVTOOLS_KIT_APP_RECORDS__:Dt.__VUE_DEVTOOLS_KIT_APP_RECORDS__[t]}}),Js=new Proxy(Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__,{get(e,t,n){return t==="value"?Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__:t==="id"?Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__:Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[t]}});function EP(){q9({...Dt[Yl],appRecords:Sm.value,activeAppRecordId:Js.id,tabs:Dt.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,commands:Dt.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__})}function Y9(e){Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__=e,EP()}function Z9(e){Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__=e,EP()}var ys=new Proxy(Dt[Yl],{get(e,t){return t==="appRecords"?Sm:t==="activeAppRecordId"?Js.id:t==="tabs"?Dt.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__:t==="commands"?Dt.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__:Dt[Yl][t]},deleteProperty(e,t){return delete e[t],!0},set(e,t,n){return{...Dt[Yl]},e[t]=n,Dt[Yl][t]=n,!0}});function X9(e={}){var t,n,s;const{file:o,host:i,baseUrl:r=window.location.origin,line:a=0,column:l=0}=e;if(o){if(i==="chrome-extension"){const u=o.replace(/\\/g,"\\\\"),c=(n=(t=window.VUE_DEVTOOLS_CONFIG)==null?void 0:t.openInEditorHost)!=null?n:"/";fetch(`${c}__open-in-editor?file=${encodeURI(o)}`).then(d=>{if(!d.ok){const h=`Opening component ${u} failed`;console.log(`%c${h}`,"color:red")}})}else if(ys.vitePluginDetected){const u=(s=Dt.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__)!=null?s:r;Dt.__VUE_INSPECTOR__.openInEditor(u,o,a,l)}}}Qe(),Qe(),Qe(),Qe(),Qe();var _P,RP;(RP=(_P=Dt).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__)!=null||(_P.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__=[]);var Bb=new Proxy(Dt.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__,{get(e,t,n){return Reflect.get(e,t,n)}});function $b(e){const t={};return Object.keys(e).forEach(n=>{t[n]=e[n].defaultValue}),t}function Hb(e){return`__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${e}__`}function J9(e){var t,n,s;const o=(n=(t=Bb.find(i=>{var r;return i[0].id===e&&!!((r=i[0])!=null&&r.settings)}))==null?void 0:t[0])!=null?n:null;return(s=o==null?void 0:o.settings)!=null?s:null}function DP(e,t){var n,s,o;const i=Hb(e);if(i){const r=localStorage.getItem(i);if(r)return JSON.parse(r)}if(e){const r=(s=(n=Bb.find(a=>a[0].id===e))==null?void 0:n[0])!=null?s:null;return $b((o=r==null?void 0:r.settings)!=null?o:{})}return $b(t)}function Q9(e,t){const n=Hb(e);localStorage.getItem(n)||localStorage.setItem(n,JSON.stringify($b(t)))}function eq(e,t,n){const s=Hb(e),o=localStorage.getItem(s),i=JSON.parse(o||"{}"),r={...i,[t]:n};localStorage.setItem(s,JSON.stringify(r)),Tc.hooks.callHookWith(a=>{a.forEach(l=>l({pluginId:e,key:t,oldValue:i[t],newValue:n,settings:r}))},"setPluginSettings")}Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe();var TP,IP,Mo=(IP=(TP=Dt).__VUE_DEVTOOLS_HOOK)!=null?IP:TP.__VUE_DEVTOOLS_HOOK=WF(),tq={vueAppInit(e){Mo.hook("app:init",e)},vueAppUnmount(e){Mo.hook("app:unmount",e)},vueAppConnected(e){Mo.hook("app:connected",e)},componentAdded(e){return Mo.hook("component:added",e)},componentEmit(e){return Mo.hook("component:emit",e)},componentUpdated(e){return Mo.hook("component:updated",e)},componentRemoved(e){return Mo.hook("component:removed",e)},setupDevtoolsPlugin(e){Mo.hook("devtools-plugin:setup",e)},perfStart(e){return Mo.hook("perf:start",e)},perfEnd(e){return Mo.hook("perf:end",e)}},xP={on:tq,setupDevToolsPlugin(e,t){return Mo.callHook("devtools-plugin:setup",e,t)}},nq=class{constructor({plugin:e,ctx:t}){this.hooks=t.hooks,this.plugin=e}get on(){return{visitComponentTree:e=>{this.hooks.hook("visitComponentTree",e)},inspectComponent:e=>{this.hooks.hook("inspectComponent",e)},editComponentState:e=>{this.hooks.hook("editComponentState",e)},getInspectorTree:e=>{this.hooks.hook("getInspectorTree",e)},getInspectorState:e=>{this.hooks.hook("getInspectorState",e)},editInspectorState:e=>{this.hooks.hook("editInspectorState",e)},inspectTimelineEvent:e=>{this.hooks.hook("inspectTimelineEvent",e)},timelineCleared:e=>{this.hooks.hook("timelineCleared",e)},setPluginSettings:e=>{this.hooks.hook("setPluginSettings",e)}}}notifyComponentUpdate(e){var t;if(ys.highPerfModeEnabled)return;const n=cP().find(s=>s.packageName===this.plugin.descriptor.packageName);if(n!=null&&n.id){if(e){const s=[e.appContext.app,e.uid,(t=e.parent)==null?void 0:t.uid,e];Mo.callHook("component:updated",...s)}else Mo.callHook("component:updated");this.hooks.callHook("sendInspectorState",{inspectorId:n.id,plugin:this.plugin})}}addInspector(e){this.hooks.callHook("addInspector",{inspector:e,plugin:this.plugin}),this.plugin.descriptor.settings&&Q9(e.id,this.plugin.descriptor.settings)}sendInspectorTree(e){ys.highPerfModeEnabled||this.hooks.callHook("sendInspectorTree",{inspectorId:e,plugin:this.plugin})}sendInspectorState(e){ys.highPerfModeEnabled||this.hooks.callHook("sendInspectorState",{inspectorId:e,plugin:this.plugin})}selectInspectorNode(e,t){this.hooks.callHook("customInspectorSelectNode",{inspectorId:e,nodeId:t,plugin:this.plugin})}visitComponentTree(e){return this.hooks.callHook("visitComponentTree",e)}now(){return ys.highPerfModeEnabled?0:Date.now()}addTimelineLayer(e){this.hooks.callHook("timelineLayerAdded",{options:e,plugin:this.plugin})}addTimelineEvent(e){ys.highPerfModeEnabled||this.hooks.callHook("timelineEventAdded",{options:e,plugin:this.plugin})}getSettings(e){return DP(e??this.plugin.descriptor.id,this.plugin.descriptor.settings)}getComponentInstances(e){return this.hooks.callHook("getComponentInstances",{app:e})}getComponentBounds(e){return this.hooks.callHook("getComponentBounds",{instance:e})}getComponentName(e){return this.hooks.callHook("getComponentName",{instance:e})}highlightElement(e){const t=e.__VUE_DEVTOOLS_NEXT_UID__;return this.hooks.callHook("componentHighlight",{uid:t})}unhighlightElement(){return this.hooks.callHook("componentUnhighlight")}},sq=nq;Qe(),Qe(),Qe(),Qe();var oq="__vue_devtool_undefined__",iq="__vue_devtool_infinity__",rq="__vue_devtool_negative_infinity__",aq="__vue_devtool_nan__";Qe(),Qe();var lq={[oq]:"undefined",[aq]:"NaN",[iq]:"Infinity",[rq]:"-Infinity"};Object.entries(lq).reduce((e,[t,n])=>(e[n]=t,e),{}),Qe(),Qe(),Qe(),Qe(),Qe();var FP,PP;(PP=(FP=Dt).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__)!=null||(FP.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__=new Set);function AP(e,t){return xP.setupDevToolsPlugin(e,t)}function uq(e,t){const[n,s]=e;if(n.app!==t)return;const o=new sq({plugin:{setupFn:s,descriptor:n},ctx:Tc});n.packageName==="vuex"&&o.on.editInspectorState(i=>{o.sendInspectorState(i.inspectorId)}),s(o)}function kP(e,t){Dt.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(e)||ys.highPerfModeEnabled&&!(t!=null&&t.inspectingComponent)||(Dt.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(e),Bb.forEach(n=>{uq(n,e)}))}Qe(),Qe();var Yh="__VUE_DEVTOOLS_ROUTER__",Dc="__VUE_DEVTOOLS_ROUTER_INFO__",OP,MP;(MP=(OP=Dt)[Dc])!=null||(OP[Dc]={currentRoute:null,routes:[]});var NP,LP;(LP=(NP=Dt)[Yh])!=null||(NP[Yh]={}),new Proxy(Dt[Dc],{get(e,t){return Dt[Dc][t]}}),new Proxy(Dt[Yh],{get(e,t){if(t==="value")return Dt[Yh]}});function cq(e){const t=new Map;return((e==null?void 0:e.getRoutes())||[]).filter(n=>!t.has(n.path)&&t.set(n.path,1))}function Gb(e){return e.map(t=>{let{path:n,name:s,children:o,meta:i}=t;return o!=null&&o.length&&(o=Gb(o)),{path:n,name:s,children:o,meta:i}})}function dq(e){if(e){const{fullPath:t,hash:n,href:s,path:o,name:i,matched:r,params:a,query:l}=e;return{fullPath:t,hash:n,href:s,path:o,name:i,params:a,query:l,matched:Gb(r)}}return e}function hq(e,t){function n(){var s;const o=(s=e.app)==null?void 0:s.config.globalProperties.$router,i=dq(o==null?void 0:o.currentRoute.value),r=Gb(cq(o)),a=console.warn;console.warn=()=>{},Dt[Dc]={currentRoute:i?GF(i):{},routes:GF(r)},Dt[Yh]=o,console.warn=a}n(),xP.on.componentUpdated(_c(()=>{var s;((s=t.value)==null?void 0:s.app)===e.app&&(n(),!ys.highPerfModeEnabled&&Tc.hooks.callHook("routerInfoUpdated",{state:Dt[Dc]}))},200))}function fq(e){return{async getInspectorTree(t){const n={...t,app:Js.value.app,rootNodes:[]};return await new Promise(s=>{e.callHookWith(async o=>{await Promise.all(o.map(i=>i(n))),s()},"getInspectorTree")}),n.rootNodes},async getInspectorState(t){const n={...t,app:Js.value.app,state:null},s={currentTab:`custom-inspector:${t.inspectorId}`};return await new Promise(o=>{e.callHookWith(async i=>{await Promise.all(i.map(r=>r(n,s))),o()},"getInspectorState")}),n.state},editInspectorState(t){const n=new B9,s={...t,app:Js.value.app,set:(o,i=t.path,r=t.state.value,a)=>{n.set(o,i,r,a||n.createDefaultSetCallback(t.state))}};e.callHookWith(o=>{o.forEach(i=>i(s))},"editInspectorState")},sendInspectorState(t){const n=bm(t);e.callHook("sendInspectorState",{inspectorId:t,plugin:{descriptor:n.descriptor,setupFn:()=>({})}})},inspectComponentInspector(){return k9()},cancelInspectComponentInspector(){return A9()},getComponentRenderCode(t){const n=Fb(Js.value,t);if(n)return typeof(n==null?void 0:n.type)!="function"?n.render.toString():n.type.toString()},scrollToComponent(t){return O9({id:t})},openInEditor:X9,getVueInspector:L9,toggleApp(t,n){const s=Sm.value.find(o=>o.id===t);s&&(Z9(t),Y9(s),hq(s,Js),uP(),kP(s.app,n))},inspectDOM(t){const n=Fb(Js.value,t);if(n){const[s]=Pb(n);s&&(Dt.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__=s)}},updatePluginSettings(t,n,s){eq(t,n,s)},getPluginSettings(t){return{options:J9(t),values:DP(t)}}}}Qe();var VP,BP;(BP=(VP=Dt).__VUE_DEVTOOLS_ENV__)!=null||(VP.__VUE_DEVTOOLS_ENV__={vitePluginDetected:!1});var $P=j9(),HP,GP;(GP=(HP=Dt).__VUE_DEVTOOLS_KIT_CONTEXT__)!=null||(HP.__VUE_DEVTOOLS_KIT_CONTEXT__={hooks:$P,get state(){return{...ys,activeAppRecordId:Js.id,activeAppRecord:Js.value,appRecords:Sm.value}},api:fq($P)});var Tc=Dt.__VUE_DEVTOOLS_KIT_CONTEXT__;Qe(),p9(m9());var UP,WP;(WP=(UP=Dt).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__)!=null||(UP.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__={id:0,appIds:new Set}),Qe(),Qe();function pq(e){ys.highPerfModeEnabled=e??!ys.highPerfModeEnabled,!e&&Js.value&&kP(Js.value.app)}Qe(),Qe(),Qe();function gq(e){ys.devtoolsClientDetected={...ys.devtoolsClientDetected,...e};const t=Object.values(ys.devtoolsClientDetected).some(Boolean);pq(!t)}var zP,jP;(jP=(zP=Dt).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__)!=null||(zP.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__=gq),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe();var mq=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},KP=class{constructor(t){this.generateIdentifier=t,this.kv=new mq}register(t,n){this.kv.getByValue(t)||(n||(n=this.generateIdentifier(t)),this.kv.set(n,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}},vq=class extends KP{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t=="object"?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};Qe(),Qe();function yq(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function wq(e,t){const n=yq(e);if("find"in n)return n.find(t);const s=n;for(let o=0;o<s.length;o++){const i=s[o];if(t(i))return i}}function Ic(e,t){Object.entries(e).forEach(([n,s])=>t(s,n))}function Em(e,t){return e.indexOf(t)!==-1}function qP(e,t){for(let n=0;n<e.length;n++){const s=e[n];if(t(s))return s}}var Cq=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return wq(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}};Qe(),Qe();var bq=e=>Object.prototype.toString.call(e).slice(8,-1),YP=e=>typeof e>"u",Sq=e=>e===null,Zh=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,Ub=e=>Zh(e)&&Object.keys(e).length===0,$a=e=>Array.isArray(e),Eq=e=>typeof e=="string",_q=e=>typeof e=="number"&&!isNaN(e),Rq=e=>typeof e=="boolean",Dq=e=>e instanceof RegExp,Xh=e=>e instanceof Map,Jh=e=>e instanceof Set,ZP=e=>bq(e)==="Symbol",Tq=e=>e instanceof Date&&!isNaN(e.valueOf()),Iq=e=>e instanceof Error,XP=e=>typeof e=="number"&&isNaN(e),xq=e=>Rq(e)||Sq(e)||YP(e)||_q(e)||Eq(e)||ZP(e),Fq=e=>typeof e=="bigint",Pq=e=>e===1/0||e===-1/0,Aq=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),kq=e=>e instanceof URL;Qe();var JP=e=>e.replace(/\./g,"\\."),Wb=e=>e.map(String).map(JP).join("."),Qh=e=>{const t=[];let n="";for(let o=0;o<e.length;o++){let i=e.charAt(o);if(i==="\\"&&e.charAt(o+1)==="."){n+=".",o++;continue}if(i==="."){t.push(n),n="";continue}n+=i}const s=n;return t.push(s),t};Qe();function ar(e,t,n,s){return{isApplicable:e,annotation:t,transform:n,untransform:s}}var QP=[ar(YP,"undefined",()=>null,()=>{}),ar(Fq,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),ar(Tq,"Date",e=>e.toISOString(),e=>new Date(e)),ar(Iq,"Error",(e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(s=>{n[s]=e[s]}),n},(e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(s=>{n[s]=e[s]}),n}),ar(Dq,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),ar(Jh,"set",e=>[...e.values()],e=>new Set(e)),ar(Xh,"map",e=>[...e.entries()],e=>new Map(e)),ar(e=>XP(e)||Pq(e),"number",e=>XP(e)?"NaN":e>0?"Infinity":"-Infinity",Number),ar(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),ar(kq,"URL",e=>e.toString(),e=>new URL(e))];function _m(e,t,n,s){return{isApplicable:e,annotation:t,transform:n,untransform:s}}var eA=_m((e,t)=>ZP(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const s=n.symbolRegistry.getValue(t[1]);if(!s)throw new Error("Trying to deserialize unknown symbol");return s}),Oq=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),tA=_m(Aq,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=Oq[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function nA(e,t){return e!=null&&e.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var sA=_m(nA,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const s={};return n.forEach(o=>{s[o]=e[o]}),s},(e,t,n)=>{const s=n.classRegistry.getValue(t[1]);if(!s)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(s.prototype),e)}),oA=_m((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const s=n.customTransformerRegistry.findByName(t[1]);if(!s)throw new Error("Trying to deserialize unknown custom value");return s.deserialize(e)}),Mq=[sA,eA,oA,tA],iA=(e,t)=>{const n=qP(Mq,o=>o.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const s=qP(QP,o=>o.isApplicable(e,t));if(s)return{value:s.transform(e,t),type:s.annotation}},rA={};QP.forEach(e=>{rA[e.annotation]=e});var Nq=(e,t,n)=>{if($a(t))switch(t[0]){case"symbol":return eA.untransform(e,t,n);case"class":return sA.untransform(e,t,n);case"custom":return oA.untransform(e,t,n);case"typed-array":return tA.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const s=rA[t];if(!s)throw new Error("Unknown transformation: "+t);return s.untransform(e,n)}};Qe();var xc=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function aA(e){if(Em(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Em(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Em(e,"constructor"))throw new Error("constructor is not allowed as a property")}var Lq=(e,t)=>{aA(t);for(let n=0;n<t.length;n++){const s=t[n];if(Jh(e))e=xc(e,+s);else if(Xh(e)){const o=+s,i=+t[++n]==0?"key":"value",r=xc(e,o);switch(i){case"key":e=r;break;case"value":e=e.get(r);break}}else e=e[s]}return e},zb=(e,t,n)=>{if(aA(t),t.length===0)return n(e);let s=e;for(let i=0;i<t.length-1;i++){const r=t[i];if($a(s)){const a=+r;s=s[a]}else if(Zh(s))s=s[r];else if(Jh(s)){const a=+r;s=xc(s,a)}else if(Xh(s)){if(i===t.length-2)break;const l=+r,u=+t[++i]==0?"key":"value",c=xc(s,l);switch(u){case"key":s=c;break;case"value":s=s.get(c);break}}}const o=t[t.length-1];if($a(s)?s[+o]=n(s[+o]):Zh(s)&&(s[o]=n(s[o])),Jh(s)){const i=xc(s,+o),r=n(i);i!==r&&(s.delete(i),s.add(r))}if(Xh(s)){const i=+t[t.length-2],r=xc(s,i);switch(+o==0?"key":"value"){case"key":{const l=n(r);s.set(l,s.get(r)),l!==r&&s.delete(r);break}case"value":{s.set(r,n(s.get(r)));break}}}return e};function jb(e,t,n=[]){if(!e)return;if(!$a(e)){Ic(e,(i,r)=>jb(i,t,[...n,...Qh(r)]));return}const[s,o]=e;o&&Ic(o,(i,r)=>{jb(i,t,[...n,...Qh(r)])}),t(s,n)}function Vq(e,t,n){return jb(t,(s,o)=>{e=zb(e,o,i=>Nq(i,s,n))}),e}function Bq(e,t){function n(s,o){const i=Lq(e,Qh(o));s.map(Qh).forEach(r=>{e=zb(e,r,()=>i)})}if($a(t)){const[s,o]=t;s.forEach(i=>{e=zb(e,Qh(i),()=>e)}),o&&Ic(o,n)}else Ic(t,n);return e}var $q=(e,t)=>Zh(e)||$a(e)||Xh(e)||Jh(e)||nA(e,t);function Hq(e,t,n){const s=n.get(e);s?s.push(t):n.set(e,[t])}function Gq(e,t){const n={};let s;return e.forEach(o=>{if(o.length<=1)return;t||(o=o.map(a=>a.map(String)).sort((a,l)=>a.length-l.length));const[i,...r]=o;i.length===0?s=r.map(Wb):n[Wb(i)]=r.map(Wb)}),s?Ub(n)?[s]:[s,n]:Ub(n)?void 0:n}var lA=(e,t,n,s,o=[],i=[],r=new Map)=>{var a;const l=xq(e);if(!l){Hq(e,o,t);const p=r.get(e);if(p)return s?{transformedValue:null}:p}if(!$q(e,n)){const p=iA(e,n),g=p?{transformedValue:p.value,annotations:[p.type]}:{transformedValue:e};return l||r.set(e,g),g}if(Em(i,e))return{transformedValue:null};const u=iA(e,n),c=(a=u==null?void 0:u.value)!=null?a:e,d=$a(c)?[]:{},h={};Ic(c,(p,g)=>{if(g==="__proto__"||g==="constructor"||g==="prototype")throw new Error(`Detected property ${g}. This is a prototype pollution risk, please remove it from your object.`);const v=lA(p,t,n,s,[...o,g],[...i,e],r);d[g]=v.transformedValue,$a(v.annotations)?h[g]=v.annotations:Zh(v.annotations)&&Ic(v.annotations,(C,S)=>{h[JP(g)+"."+S]=C})});const f=Ub(h)?{transformedValue:d,annotations:u?[u.type]:void 0}:{transformedValue:d,annotations:u?[u.type,h]:h};return l||r.set(e,f),f};Qe(),Qe();function uA(e){return Object.prototype.toString.call(e).slice(8,-1)}function cA(e){return uA(e)==="Array"}function Uq(e){if(uA(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function Wq(e,t,n,s,o){const i={}.propertyIsEnumerable.call(s,t)?"enumerable":"nonenumerable";i==="enumerable"&&(e[t]=n),o&&i==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function Kb(e,t={}){if(cA(e))return e.map(o=>Kb(o,t));if(!Uq(e))return e;const n=Object.getOwnPropertyNames(e),s=Object.getOwnPropertySymbols(e);return[...n,...s].reduce((o,i)=>{if(cA(t.props)&&!t.props.includes(i))return o;const r=e[i],a=Kb(r,t);return Wq(o,i,a,e,t.nonenumerable),o},{})}var Pn=class{constructor({dedupe:e=!1}={}){this.classRegistry=new vq,this.symbolRegistry=new KP(t=>{var n;return(n=t.description)!=null?n:""}),this.customTransformerRegistry=new Cq,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=lA(e,t,this,this.dedupe),s={json:n.transformedValue};n.annotations&&(s.meta={...s.meta,values:n.annotations});const o=Gq(t,this.dedupe);return o&&(s.meta={...s.meta,referentialEqualities:o}),s}deserialize(e){const{json:t,meta:n}=e;let s=Kb(t);return n!=null&&n.values&&(s=Vq(s,n.values,this)),n!=null&&n.referentialEqualities&&(s=Bq(s,n.referentialEqualities)),s}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};Pn.defaultInstance=new Pn,Pn.serialize=Pn.defaultInstance.serialize.bind(Pn.defaultInstance),Pn.deserialize=Pn.defaultInstance.deserialize.bind(Pn.defaultInstance),Pn.stringify=Pn.defaultInstance.stringify.bind(Pn.defaultInstance),Pn.parse=Pn.defaultInstance.parse.bind(Pn.defaultInstance),Pn.registerClass=Pn.defaultInstance.registerClass.bind(Pn.defaultInstance),Pn.registerSymbol=Pn.defaultInstance.registerSymbol.bind(Pn.defaultInstance),Pn.registerCustom=Pn.defaultInstance.registerCustom.bind(Pn.defaultInstance),Pn.allowErrorProps=Pn.defaultInstance.allowErrorProps.bind(Pn.defaultInstance),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe();var dA,hA;(hA=(dA=Dt).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__)!=null||(dA.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__=[]);var fA,pA;(pA=(fA=Dt).__VUE_DEVTOOLS_KIT_RPC_CLIENT__)!=null||(fA.__VUE_DEVTOOLS_KIT_RPC_CLIENT__=null);var gA,mA;(mA=(gA=Dt).__VUE_DEVTOOLS_KIT_RPC_SERVER__)!=null||(gA.__VUE_DEVTOOLS_KIT_RPC_SERVER__=null);var vA,yA;(yA=(vA=Dt).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__)!=null||(vA.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__=null);var wA,CA;(CA=(wA=Dt).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__)!=null||(wA.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__=null);var bA,SA;(SA=(bA=Dt).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__)!=null||(bA.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__=null),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe();/*!
|
|
131
|
+
`},l=()=>{const f=vm(n);if(t.centered&&f){if(i.value=!0,a(f),t.showOverlay){const p=()=>{t.closeOnOverlayClick&&u()};r=VF(t.overlayOpacity,p)}}else if(o.value&&(o.value.show(),i.value=!0,t.showOverlay)){const p=()=>{t.closeOnOverlayClick&&u()};r=VF(t.overlayOpacity,p)}},u=()=>{const f=vm(n);t.centered&&f?(i.value=!1,f.style.display="none",t.showOverlay&&(_b(r||void 0),r=null)):o.value&&(o.value.hide(),i.value=!1,t.showOverlay&&(_b(r||void 0),r=null))},c=()=>{i.value?u():l()},d=()=>{o.value&&(o.value.destroy(),o.value=null),t.showOverlay&&r&&(_b(r),r=null)},h=()=>{var g;const f=vm(n);if(!f)return;if(f.style.display="none",t.centered){t.showOnInit&&l();return}const p={content:f,placement:t.placement,theme:t.theme,trigger:t.trigger,interactive:t.interactive,appendTo:t.appendTo,arrow:t.showArrow,allowHTML:!0,hideOnClick:!1,popperOptions:{...t.popperOptions,modifiers:[...((g=t.popperOptions)==null?void 0:g.modifiers)||[],{name:"computeStyles",options:{adaptive:!1}}]},onShow(){i.value=!0,f.style.display="block"},onHide(){i.value=!1}};if(t.useTrigger){const v=vm(s);if(!v)return;o.value=Pa(v,p)}else{const v=document.createElement("div");v.style.display="none",document.body.appendChild(v),o.value=Pa(v,p)}t.showOnInit&&l()};return tn(()=>{h()}),vs(()=>{d()}),nt(()=>t.alwaysShow,f=>{f?l():u()},{immediate:!0}),{popupRef:n,triggerRef:s,instance:o,isVisible:i,show:l,hide:u,toggle:c,destroy:d}}var HK=Object.create,BF=Object.defineProperty,GK=Object.getOwnPropertyDescriptor,Rb=Object.getOwnPropertyNames,UK=Object.getPrototypeOf,WK=Object.prototype.hasOwnProperty,zK=(e,t)=>function(){return e&&(t=(0,e[Rb(e)[0]])(e=0)),t},jK=(e,t)=>function(){return t||(0,e[Rb(e)[0]])((t={exports:{}}).exports,t),t.exports},KK=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Rb(t))!WK.call(e,o)&&o!==n&&BF(e,o,{get:()=>t[o],enumerable:!(s=GK(t,o))||s.enumerable});return e},qK=(e,t,n)=>(n=e!=null?HK(UK(e)):{},KK(BF(n,"default",{value:e,enumerable:!0}),e)),Kh=zK({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),YK=jK({"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(e,t){Kh(),t.exports=s;function n(i){return i instanceof Buffer?Buffer.from(i):new i.constructor(i.buffer.slice(),i.byteOffset,i.length)}function s(i){if(i=i||{},i.circles)return o(i);const r=new Map;if(r.set(Date,d=>new Date(d)),r.set(Map,(d,h)=>new Map(l(Array.from(d),h))),r.set(Set,(d,h)=>new Set(l(Array.from(d),h))),i.constructorHandlers)for(const d of i.constructorHandlers)r.set(d[0],d[1]);let a=null;return i.proto?c:u;function l(d,h){const f=Object.keys(d),p=new Array(f.length);for(let g=0;g<f.length;g++){const v=f[g],C=d[v];typeof C!="object"||C===null?p[v]=C:C.constructor!==Object&&(a=r.get(C.constructor))?p[v]=a(C,h):ArrayBuffer.isView(C)?p[v]=n(C):p[v]=h(C)}return p}function u(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return l(d,u);if(d.constructor!==Object&&(a=r.get(d.constructor)))return a(d,u);const h={};for(const f in d){if(Object.hasOwnProperty.call(d,f)===!1)continue;const p=d[f];typeof p!="object"||p===null?h[f]=p:p.constructor!==Object&&(a=r.get(p.constructor))?h[f]=a(p,u):ArrayBuffer.isView(p)?h[f]=n(p):h[f]=u(p)}return h}function c(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return l(d,c);if(d.constructor!==Object&&(a=r.get(d.constructor)))return a(d,c);const h={};for(const f in d){const p=d[f];typeof p!="object"||p===null?h[f]=p:p.constructor!==Object&&(a=r.get(p.constructor))?h[f]=a(p,c):ArrayBuffer.isView(p)?h[f]=n(p):h[f]=c(p)}return h}}function o(i){const r=[],a=[],l=new Map;if(l.set(Date,f=>new Date(f)),l.set(Map,(f,p)=>new Map(c(Array.from(f),p))),l.set(Set,(f,p)=>new Set(c(Array.from(f),p))),i.constructorHandlers)for(const f of i.constructorHandlers)l.set(f[0],f[1]);let u=null;return i.proto?h:d;function c(f,p){const g=Object.keys(f),v=new Array(g.length);for(let C=0;C<g.length;C++){const S=g[C],b=f[S];if(typeof b!="object"||b===null)v[S]=b;else if(b.constructor!==Object&&(u=l.get(b.constructor)))v[S]=u(b,p);else if(ArrayBuffer.isView(b))v[S]=n(b);else{const w=r.indexOf(b);w!==-1?v[S]=a[w]:v[S]=p(b)}}return v}function d(f){if(typeof f!="object"||f===null)return f;if(Array.isArray(f))return c(f,d);if(f.constructor!==Object&&(u=l.get(f.constructor)))return u(f,d);const p={};r.push(f),a.push(p);for(const g in f){if(Object.hasOwnProperty.call(f,g)===!1)continue;const v=f[g];if(typeof v!="object"||v===null)p[g]=v;else if(v.constructor!==Object&&(u=l.get(v.constructor)))p[g]=u(v,d);else if(ArrayBuffer.isView(v))p[g]=n(v);else{const C=r.indexOf(v);C!==-1?p[g]=a[C]:p[g]=d(v)}}return r.pop(),a.pop(),p}function h(f){if(typeof f!="object"||f===null)return f;if(Array.isArray(f))return c(f,h);if(f.constructor!==Object&&(u=l.get(f.constructor)))return u(f,h);const p={};r.push(f),a.push(p);for(const g in f){const v=f[g];if(typeof v!="object"||v===null)p[g]=v;else if(v.constructor!==Object&&(u=l.get(v.constructor)))p[g]=u(v,h);else if(ArrayBuffer.isView(v))p[g]=n(v);else{const C=r.indexOf(v);C!==-1?p[g]=a[C]:p[g]=h(v)}}return r.pop(),a.pop(),p}}}});Kh(),Kh(),Kh();var $F=typeof navigator<"u",Dt=typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof global<"u"?global:{};typeof Dt.chrome<"u"&&Dt.chrome.devtools,$F&&(Dt.self,Dt.top);var HF;typeof navigator<"u"&&((HF=navigator.userAgent)==null||HF.toLowerCase().includes("electron")),Kh();var ZK=qK(YK()),XK=/(?:^|[-_/])(\w)/g;function JK(e,t){return t?t.toUpperCase():""}function QK(e){return e&&`${e}`.replace(XK,JK)}function e9(e,t){let n=e.replace(/^[a-z]:/i,"").replace(/\\/g,"/");n.endsWith(`index${t}`)&&(n=n.replace(`/index${t}`,t));const s=n.lastIndexOf("/"),o=n.substring(s+1);{const i=o.lastIndexOf(t);return o.substring(0,i)}}var GF=(0,ZK.default)({circles:!0});const t9={trailing:!0};function _c(e,t=25,n={}){if(n={...t9,...n},!Number.isFinite(t))throw new TypeError("Expected `wait` to be a finite number");let s,o,i=[],r,a;const l=(u,c)=>(r=n9(e,u,c),r.finally(()=>{if(r=null,n.trailing&&a&&!o){const d=l(u,a);return a=null,d}}),r);return function(...u){return r?(n.trailing&&(a=u),r):new Promise(c=>{const d=!o&&n.leading;clearTimeout(o),o=setTimeout(()=>{o=null;const h=n.leading?s:l(this,u);for(const f of i)f(h);i=[]},t),d?(s=l(this,u),c(s)):i.push(c)})}}async function n9(e,t,n){return await e.apply(t,n)}function Db(e,t={},n){for(const s in e){const o=e[s],i=n?`${n}:${s}`:s;typeof o=="object"&&o!==null?Db(o,t,i):typeof o=="function"&&(t[i]=o)}return t}const s9={run:e=>e()},o9=()=>s9,UF=typeof console.createTask<"u"?console.createTask:o9;function i9(e,t){const n=t.shift(),s=UF(n);return e.reduce((o,i)=>o.then(()=>s.run(()=>i(...t))),Promise.resolve())}function r9(e,t){const n=t.shift(),s=UF(n);return Promise.all(e.map(o=>s.run(()=>o(...t))))}function Tb(e,t){for(const n of[...e])n(t)}class a9{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,n,s={}){if(!t||typeof n!="function")return()=>{};const o=t;let i;for(;this._deprecatedHooks[t];)i=this._deprecatedHooks[t],t=i.to;if(i&&!s.allowDeprecated){let r=i.message;r||(r=`${o} hook has been deprecated`+(i.to?`, please use ${i.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(r)||(console.warn(r),this._deprecatedMessages.add(r))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(n),()=>{n&&(this.removeHook(t,n),n=void 0)}}hookOnce(t,n){let s,o=(...i)=>(typeof s=="function"&&s(),s=void 0,o=void 0,n(...i));return s=this.hook(t,o),s}removeHook(t,n){if(this._hooks[t]){const s=this._hooks[t].indexOf(n);s!==-1&&this._hooks[t].splice(s,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,n){this._deprecatedHooks[t]=typeof n=="string"?{to:n}:n;const s=this._hooks[t]||[];delete this._hooks[t];for(const o of s)this.hook(t,o)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const n in t)this.deprecateHook(n,t[n])}addHooks(t){const n=Db(t),s=Object.keys(n).map(o=>this.hook(o,n[o]));return()=>{for(const o of s.splice(0,s.length))o()}}removeHooks(t){const n=Db(t);for(const s in n)this.removeHook(s,n[s])}removeAllHooks(){for(const t in this._hooks)delete this._hooks[t]}callHook(t,...n){return n.unshift(t),this.callHookWith(i9,t,...n)}callHookParallel(t,...n){return n.unshift(t),this.callHookWith(r9,t,...n)}callHookWith(t,n,...s){const o=this._before||this._after?{name:n,args:s,context:{}}:void 0;this._before&&Tb(this._before,o);const i=t(n in this._hooks?[...this._hooks[n]]:[],s);return i instanceof Promise?i.finally(()=>{this._after&&o&&Tb(this._after,o)}):(this._after&&o&&Tb(this._after,o),i)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const n=this._before.indexOf(t);n!==-1&&this._before.splice(n,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const n=this._after.indexOf(t);n!==-1&&this._after.splice(n,1)}}}}function WF(){return new a9}var l9=Object.create,zF=Object.defineProperty,u9=Object.getOwnPropertyDescriptor,Ib=Object.getOwnPropertyNames,c9=Object.getPrototypeOf,d9=Object.prototype.hasOwnProperty,h9=(e,t)=>function(){return e&&(t=(0,e[Ib(e)[0]])(e=0)),t},jF=(e,t)=>function(){return t||(0,e[Ib(e)[0]])((t={exports:{}}).exports,t),t.exports},f9=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ib(t))!d9.call(e,o)&&o!==n&&zF(e,o,{get:()=>t[o],enumerable:!(s=u9(t,o))||s.enumerable});return e},p9=(e,t,n)=>(n=e!=null?l9(c9(e)):{},f9(zF(n,"default",{value:e,enumerable:!0}),e)),Qe=h9({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),g9=jF({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(e,t){Qe(),function(n){var s={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"Ae",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"Oe",Ő:"O",Ø:"O",Ù:"U",Ú:"U",Û:"U",Ü:"Ue",Ű:"U",Ý:"Y",Þ:"TH",ß:"ss",à:"a",á:"a",â:"a",ã:"a",ä:"ae",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"oe",ő:"o",ø:"o",ù:"u",ú:"u",û:"u",ü:"ue",ű:"u",ý:"y",þ:"th",ÿ:"y","ẞ":"SS",ا:"a",أ:"a",إ:"i",آ:"aa",ؤ:"u",ئ:"e",ء:"a",ب:"b",ت:"t",ث:"th",ج:"j",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"dh",ط:"t",ظ:"z",ع:"a",غ:"gh",ف:"f",ق:"q",ك:"k",ل:"l",م:"m",ن:"n",ه:"h",و:"w",ي:"y",ى:"a",ة:"h",ﻻ:"la",ﻷ:"laa",ﻹ:"lai",ﻵ:"laa",گ:"g",چ:"ch",پ:"p",ژ:"zh",ک:"k",ی:"y","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9",က:"k",ခ:"kh",ဂ:"g",ဃ:"ga",င:"ng",စ:"s",ဆ:"sa",ဇ:"z","စျ":"za",ည:"ny",ဋ:"t",ဌ:"ta",ဍ:"d",ဎ:"da",ဏ:"na",တ:"t",ထ:"ta",ဒ:"d",ဓ:"da",န:"n",ပ:"p",ဖ:"pa",ဗ:"b",ဘ:"ba",မ:"m",ယ:"y",ရ:"ya",လ:"l",ဝ:"w",သ:"th",ဟ:"h",ဠ:"la",အ:"a","ြ":"y","ျ":"ya","ွ":"w","ြွ":"yw","ျွ":"ywa","ှ":"h",ဧ:"e","၏":"-e",ဣ:"i",ဤ:"-i",ဉ:"u",ဦ:"-u",ဩ:"aw","သြော":"aw",ဪ:"aw","၀":"0","၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","္":"","့":"","း":"",č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z",ހ:"h",ށ:"sh",ނ:"n",ރ:"r",ބ:"b",ޅ:"lh",ކ:"k",އ:"a",ވ:"v",މ:"m",ފ:"f",ދ:"dh",ތ:"th",ލ:"l",ގ:"g",ޏ:"gn",ސ:"s",ޑ:"d",ޒ:"z",ޓ:"t",ޔ:"y",ޕ:"p",ޖ:"j",ޗ:"ch",ޘ:"tt",ޙ:"hh",ޚ:"kh",ޛ:"th",ޜ:"z",ޝ:"sh",ޞ:"s",ޟ:"d",ޠ:"t",ޡ:"z",ޢ:"a",ޣ:"gh",ޤ:"q",ޥ:"w","ަ":"a","ާ":"aa","ި":"i","ީ":"ee","ު":"u","ޫ":"oo","ެ":"e","ޭ":"ey","ޮ":"o","ޯ":"oa","ް":"",ა:"a",ბ:"b",გ:"g",დ:"d",ე:"e",ვ:"v",ზ:"z",თ:"t",ი:"i",კ:"k",ლ:"l",მ:"m",ნ:"n",ო:"o",პ:"p",ჟ:"zh",რ:"r",ს:"s",ტ:"t",უ:"u",ფ:"p",ქ:"k",ღ:"gh",ყ:"q",შ:"sh",ჩ:"ch",ც:"ts",ძ:"dz",წ:"ts",ჭ:"ch",ხ:"kh",ჯ:"j",ჰ:"h",α:"a",β:"v",γ:"g",δ:"d",ε:"e",ζ:"z",η:"i",θ:"th",ι:"i",κ:"k",λ:"l",μ:"m",ν:"n",ξ:"ks",ο:"o",π:"p",ρ:"r",σ:"s",τ:"t",υ:"y",φ:"f",χ:"x",ψ:"ps",ω:"o",ά:"a",έ:"e",ί:"i",ό:"o",ύ:"y",ή:"i",ώ:"o",ς:"s",ϊ:"i",ΰ:"y",ϋ:"y",ΐ:"i",Α:"A",Β:"B",Γ:"G",Δ:"D",Ε:"E",Ζ:"Z",Η:"I",Θ:"TH",Ι:"I",Κ:"K",Λ:"L",Μ:"M",Ν:"N",Ξ:"KS",Ο:"O",Π:"P",Ρ:"R",Σ:"S",Τ:"T",Υ:"Y",Φ:"F",Χ:"X",Ψ:"PS",Ω:"O",Ά:"A",Έ:"E",Ί:"I",Ό:"O",Ύ:"Y",Ή:"I",Ώ:"O",Ϊ:"I",Ϋ:"Y",ā:"a",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",ū:"u",Ā:"A",Ē:"E",Ģ:"G",Ī:"I",Ķ:"k",Ļ:"L",Ņ:"N",Ū:"U",Ќ:"Kj",ќ:"kj",Љ:"Lj",љ:"lj",Њ:"Nj",њ:"nj",Тс:"Ts",тс:"ts",ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"E",Ł:"L",Ń:"N",Ś:"S",Ź:"Z",Ż:"Z",Є:"Ye",І:"I",Ї:"Yi",Ґ:"G",є:"ye",і:"i",ї:"yi",ґ:"g",ă:"a",Ă:"A",ș:"s",Ș:"S",ț:"t",Ț:"T",ţ:"t",Ţ:"T",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"c",ч:"ch",ш:"sh",щ:"sh",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"Yo",Ж:"Zh",З:"Z",И:"I",Й:"I",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"Kh",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sh",Ъ:"",Ы:"Y",Ь:"",Э:"E",Ю:"Yu",Я:"Ya",ђ:"dj",ј:"j",ћ:"c",џ:"dz",Ђ:"Dj",Ј:"j",Ћ:"C",Џ:"Dz",ľ:"l",ĺ:"l",ŕ:"r",Ľ:"L",Ĺ:"L",Ŕ:"R",ş:"s",Ş:"S",ı:"i",İ:"I",ğ:"g",Ğ:"G",ả:"a",Ả:"A",ẳ:"a",Ẳ:"A",ẩ:"a",Ẩ:"A",đ:"d",Đ:"D",ẹ:"e",Ẹ:"E",ẽ:"e",Ẽ:"E",ẻ:"e",Ẻ:"E",ế:"e",Ế:"E",ề:"e",Ề:"E",ệ:"e",Ệ:"E",ễ:"e",Ễ:"E",ể:"e",Ể:"E",ỏ:"o",ọ:"o",Ọ:"o",ố:"o",Ố:"O",ồ:"o",Ồ:"O",ổ:"o",Ổ:"O",ộ:"o",Ộ:"O",ỗ:"o",Ỗ:"O",ơ:"o",Ơ:"O",ớ:"o",Ớ:"O",ờ:"o",Ờ:"O",ợ:"o",Ợ:"O",ỡ:"o",Ỡ:"O",Ở:"o",ở:"o",ị:"i",Ị:"I",ĩ:"i",Ĩ:"I",ỉ:"i",Ỉ:"i",ủ:"u",Ủ:"U",ụ:"u",Ụ:"U",ũ:"u",Ũ:"U",ư:"u",Ư:"U",ứ:"u",Ứ:"U",ừ:"u",Ừ:"U",ự:"u",Ự:"U",ữ:"u",Ữ:"U",ử:"u",Ử:"ư",ỷ:"y",Ỷ:"y",ỳ:"y",Ỳ:"Y",ỵ:"y",Ỵ:"Y",ỹ:"y",Ỹ:"Y",ạ:"a",Ạ:"A",ấ:"a",Ấ:"A",ầ:"a",Ầ:"A",ậ:"a",Ậ:"A",ẫ:"a",Ẫ:"A",ắ:"a",Ắ:"A",ằ:"a",Ằ:"A",ặ:"a",Ặ:"A",ẵ:"a",Ẵ:"A","⓪":"0","①":"1","②":"2","③":"3","④":"4","⑤":"5","⑥":"6","⑦":"7","⑧":"8","⑨":"9","⑩":"10","⑪":"11","⑫":"12","⑬":"13","⑭":"14","⑮":"15","⑯":"16","⑰":"17","⑱":"18","⑲":"18","⑳":"18","⓵":"1","⓶":"2","⓷":"3","⓸":"4","⓹":"5","⓺":"6","⓻":"7","⓼":"8","⓽":"9","⓾":"10","⓿":"0","⓫":"11","⓬":"12","⓭":"13","⓮":"14","⓯":"15","⓰":"16","⓱":"17","⓲":"18","⓳":"19","⓴":"20","Ⓐ":"A","Ⓑ":"B","Ⓒ":"C","Ⓓ":"D","Ⓔ":"E","Ⓕ":"F","Ⓖ":"G","Ⓗ":"H","Ⓘ":"I","Ⓙ":"J","Ⓚ":"K","Ⓛ":"L","Ⓜ":"M","Ⓝ":"N","Ⓞ":"O","Ⓟ":"P","Ⓠ":"Q","Ⓡ":"R","Ⓢ":"S","Ⓣ":"T","Ⓤ":"U","Ⓥ":"V","Ⓦ":"W","Ⓧ":"X","Ⓨ":"Y","Ⓩ":"Z","ⓐ":"a","ⓑ":"b","ⓒ":"c","ⓓ":"d","ⓔ":"e","ⓕ":"f","ⓖ":"g","ⓗ":"h","ⓘ":"i","ⓙ":"j","ⓚ":"k","ⓛ":"l","ⓜ":"m","ⓝ":"n","ⓞ":"o","ⓟ":"p","ⓠ":"q","ⓡ":"r","ⓢ":"s","ⓣ":"t","ⓤ":"u","ⓦ":"v","ⓥ":"w","ⓧ":"x","ⓨ":"y","ⓩ":"z","“":'"',"”":'"',"‘":"'","’":"'","∂":"d",ƒ:"f","™":"(TM)","©":"(C)",œ:"oe",Œ:"OE","®":"(R)","†":"+","℠":"(SM)","…":"...","˚":"o",º:"o",ª:"a","•":"*","၊":",","။":".",$:"USD","€":"EUR","₢":"BRN","₣":"FRF","£":"GBP","₤":"ITL","₦":"NGN","₧":"ESP","₩":"KRW","₪":"ILS","₫":"VND","₭":"LAK","₮":"MNT","₯":"GRD","₱":"ARS","₲":"PYG","₳":"ARA","₴":"UAH","₵":"GHS","¢":"cent","¥":"CNY",元:"CNY",円:"YEN","﷼":"IRR","₠":"EWE","฿":"THB","₨":"INR","₹":"INR","₰":"PF","₺":"TRY","؋":"AFN","₼":"AZN",лв:"BGN","៛":"KHR","₡":"CRC","₸":"KZT",ден:"MKD",zł:"PLN","₽":"RUB","₾":"GEL"},o=["်","ް"],i={"ာ":"a","ါ":"a","ေ":"e","ဲ":"e","ိ":"i","ီ":"i","ို":"o","ု":"u","ူ":"u","ေါင်":"aung","ော":"aw","ော်":"aw","ေါ":"aw","ေါ်":"aw","်":"်","က်":"et","ိုက်":"aik","ောက်":"auk","င်":"in","ိုင်":"aing","ောင်":"aung","စ်":"it","ည်":"i","တ်":"at","ိတ်":"eik","ုတ်":"ok","ွတ်":"ut","ေတ်":"it","ဒ်":"d","ိုဒ်":"ok","ုဒ်":"ait","န်":"an","ာန်":"an","ိန်":"ein","ုန်":"on","ွန်":"un","ပ်":"at","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","န်ုပ်":"nub","မ်":"an","ိမ်":"ein","ုမ်":"on","ွမ်":"un","ယ်":"e","ိုလ်":"ol","ဉ်":"in","ံ":"an","ိံ":"ein","ုံ":"on","ައް":"ah","ަށް":"ah"},r={en:{},az:{ç:"c",ə:"e",ğ:"g",ı:"i",ö:"o",ş:"s",ü:"u",Ç:"C",Ə:"E",Ğ:"G",İ:"I",Ö:"O",Ş:"S",Ü:"U"},cs:{č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z"},fi:{ä:"a",Ä:"A",ö:"o",Ö:"O"},hu:{ä:"a",Ä:"A",ö:"o",Ö:"O",ü:"u",Ü:"U",ű:"u",Ű:"U"},lt:{ą:"a",č:"c",ę:"e",ė:"e",į:"i",š:"s",ų:"u",ū:"u",ž:"z",Ą:"A",Č:"C",Ę:"E",Ė:"E",Į:"I",Š:"S",Ų:"U",Ū:"U"},lv:{ā:"a",č:"c",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",š:"s",ū:"u",ž:"z",Ā:"A",Č:"C",Ē:"E",Ģ:"G",Ī:"i",Ķ:"k",Ļ:"L",Ņ:"N",Š:"S",Ū:"u",Ž:"Z"},pl:{ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ó:"o",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"e",Ł:"L",Ń:"N",Ó:"O",Ś:"S",Ź:"Z",Ż:"Z"},sv:{ä:"a",Ä:"A",ö:"o",Ö:"O"},sk:{ä:"a",Ä:"A"},sr:{љ:"lj",њ:"nj",Љ:"Lj",Њ:"Nj",đ:"dj",Đ:"Dj"},tr:{Ü:"U",Ö:"O",ü:"u",ö:"o"}},a={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},ge:{"∆":"delta","∞":"usasruloba","♥":"siqvaruli","&":"da","|":"an","<":"naklebi",">":"meti","∑":"jami","¤":"valuta"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}},l=[";","?",":","@","&","=","+","$",",","/"].join(""),u=[";","?",":","@","&","=","+","$",","].join(""),c=[".","!","~","*","'","(",")"].join(""),d=function(v,C){var S="-",b="",w="",_=!0,R={},T,I,x,P,D,F,k,O,$,q,J,ee,X,ve,te="";if(typeof v!="string")return"";if(typeof C=="string"&&(S=C),k=a.en,O=r.en,typeof C=="object"){T=C.maintainCase||!1,R=C.custom&&typeof C.custom=="object"?C.custom:R,x=+C.truncate>1&&C.truncate||!1,P=C.uric||!1,D=C.uricNoSlash||!1,F=C.mark||!1,_=!(C.symbols===!1||C.lang===!1),S=C.separator||S,P&&(te+=l),D&&(te+=u),F&&(te+=c),k=C.lang&&a[C.lang]&&_?a[C.lang]:_?a.en:{},O=C.lang&&r[C.lang]?r[C.lang]:C.lang===!1||C.lang===!0?{}:r.en,C.titleCase&&typeof C.titleCase.length=="number"&&Array.prototype.toString.call(C.titleCase)?(C.titleCase.forEach(function(N){R[N+""]=N+""}),I=!0):I=!!C.titleCase,C.custom&&typeof C.custom.length=="number"&&Array.prototype.toString.call(C.custom)&&C.custom.forEach(function(N){R[N+""]=N+""}),Object.keys(R).forEach(function(N){var V;N.length>1?V=new RegExp("\\b"+f(N)+"\\b","gi"):V=new RegExp(f(N),"gi"),v=v.replace(V,R[N])});for(J in R)te+=J}for(te+=S,te=f(te),v=v.replace(/(^\s+|\s+$)/g,""),X=!1,ve=!1,q=0,ee=v.length;q<ee;q++)J=v[q],p(J,R)?X=!1:O[J]?(J=X&&O[J].match(/[A-Za-z0-9]/)?" "+O[J]:O[J],X=!1):J in s?(q+1<ee&&o.indexOf(v[q+1])>=0?(w+=J,J=""):ve===!0?(J=i[w]+s[J],w=""):J=X&&s[J].match(/[A-Za-z0-9]/)?" "+s[J]:s[J],X=!1,ve=!1):J in i?(w+=J,J="",q===ee-1&&(J=i[w]),ve=!0):k[J]&&!(P&&l.indexOf(J)!==-1)&&!(D&&u.indexOf(J)!==-1)?(J=X||b.substr(-1).match(/[A-Za-z0-9]/)?S+k[J]:k[J],J+=v[q+1]!==void 0&&v[q+1].match(/[A-Za-z0-9]/)?S:"",X=!0):(ve===!0?(J=i[w]+J,w="",ve=!1):X&&(/[A-Za-z0-9]/.test(J)||b.substr(-1).match(/A-Za-z0-9]/))&&(J=" "+J),X=!1),b+=J.replace(new RegExp("[^\\w\\s"+te+"_-]","g"),S);return I&&(b=b.replace(/(\w)(\S*)/g,function(N,V,ne){var ie=V.toUpperCase()+(ne!==null?ne:"");return Object.keys(R).indexOf(ie.toLowerCase())<0?ie:ie.toLowerCase()})),b=b.replace(/\s+/g,S).replace(new RegExp("\\"+S+"+","g"),S).replace(new RegExp("(^\\"+S+"+|\\"+S+"+$)","g"),""),x&&b.length>x&&($=b.charAt(x)===S,b=b.slice(0,x),$||(b=b.slice(0,b.lastIndexOf(S)))),!T&&!I&&(b=b.toLowerCase()),b},h=function(v){return function(S){return d(S,v)}},f=function(v){return v.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},p=function(g,v){for(var C in v)if(v[C]===g)return!0};if(typeof t<"u"&&t.exports)t.exports=d,t.exports.createSlug=h;else if(typeof define<"u"&&define.amd)define([],function(){return d});else try{if(n.getSlug||n.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";n.getSlug=d,n.createSlug=h}catch{}}(e)}}),m9=jF({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js"(e,t){Qe(),t.exports=g9()}});Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe();function v9(e){var t;const n=e.name||e._componentTag||e.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__||e.__name;return n==="index"&&((t=e.__file)!=null&&t.endsWith("index.vue"))?"":n}function y9(e){const t=e.__file;if(t)return QK(e9(t,".vue"))}function KF(e,t){return e.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__=t,t}function xb(e){if(e.__VUE_DEVTOOLS_NEXT_APP_RECORD__)return e.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(e.root)return e.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__}function qF(e){var t,n;const s=(t=e.subTree)==null?void 0:t.type,o=xb(e);return o?((n=o==null?void 0:o.types)==null?void 0:n.Fragment)===s:!1}function ym(e){var t,n,s;const o=v9((e==null?void 0:e.type)||{});if(o)return o;if((e==null?void 0:e.root)===e)return"Root";for(const r in(n=(t=e.parent)==null?void 0:t.type)==null?void 0:n.components)if(e.parent.type.components[r]===(e==null?void 0:e.type))return KF(e,r);for(const r in(s=e.appContext)==null?void 0:s.components)if(e.appContext.components[r]===(e==null?void 0:e.type))return KF(e,r);const i=y9((e==null?void 0:e.type)||{});return i||"Anonymous Component"}function w9(e){var t,n,s;const o=(s=(n=(t=e==null?void 0:e.appContext)==null?void 0:t.app)==null?void 0:n.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__)!=null?s:0,i=e===(e==null?void 0:e.root)?"root":e.uid;return`${o}:${i}`}function Fb(e,t){return t=t||`${e.id}:root`,e.instanceMap.get(t)||e.instanceMap.get(":root")}function C9(){const e={top:0,bottom:0,left:0,right:0,get width(){return e.right-e.left},get height(){return e.bottom-e.top}};return e}var wm;function b9(e){return wm||(wm=document.createRange()),wm.selectNode(e),wm.getBoundingClientRect()}function S9(e){const t=C9();if(!e.children)return t;for(let n=0,s=e.children.length;n<s;n++){const o=e.children[n];let i;if(o.component)i=ql(o.component);else if(o.el){const r=o.el;r.nodeType===1||r.getBoundingClientRect?i=r.getBoundingClientRect():r.nodeType===3&&r.data.trim()&&(i=b9(r))}i&&E9(t,i)}return t}function E9(e,t){return(!e.top||t.top<e.top)&&(e.top=t.top),(!e.bottom||t.bottom>e.bottom)&&(e.bottom=t.bottom),(!e.left||t.left<e.left)&&(e.left=t.left),(!e.right||t.right>e.right)&&(e.right=t.right),e}var YF={top:0,left:0,right:0,bottom:0,width:0,height:0};function ql(e){const t=e.subTree.el;return typeof window>"u"?YF:qF(e)?S9(e.subTree):(t==null?void 0:t.nodeType)===1?t==null?void 0:t.getBoundingClientRect():e.subTree.component?ql(e.subTree.component):YF}Qe();function Pb(e){return qF(e)?_9(e.subTree):e.subTree?[e.subTree.el]:[]}function _9(e){if(!e.children)return[];const t=[];return e.children.forEach(n=>{n.component?t.push(...Pb(n.component)):n!=null&&n.el&&t.push(n.el)}),t}var ZF="__vue-devtools-component-inspector__",XF="__vue-devtools-component-inspector__card__",JF="__vue-devtools-component-inspector__name__",QF="__vue-devtools-component-inspector__indicator__",eP={display:"block",zIndex:2147483640,position:"fixed",backgroundColor:"#42b88325",border:"1px solid #42b88350",borderRadius:"5px",transition:"all 0.1s ease-in",pointerEvents:"none"},R9={fontFamily:"Arial, Helvetica, sans-serif",padding:"5px 8px",borderRadius:"4px",textAlign:"left",position:"absolute",left:0,color:"#e9e9e9",fontSize:"14px",fontWeight:600,lineHeight:"24px",backgroundColor:"#42b883",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"},D9={display:"inline-block",fontWeight:400,fontStyle:"normal",fontSize:"12px",opacity:.7};function Rc(){return document.getElementById(ZF)}function T9(){return document.getElementById(XF)}function I9(){return document.getElementById(QF)}function x9(){return document.getElementById(JF)}function Ab(e){return{left:`${Math.round(e.left*100)/100}px`,top:`${Math.round(e.top*100)/100}px`,width:`${Math.round(e.width*100)/100}px`,height:`${Math.round(e.height*100)/100}px`}}function kb(e){var t;const n=document.createElement("div");n.id=(t=e.elementId)!=null?t:ZF,Object.assign(n.style,{...eP,...Ab(e.bounds),...e.style});const s=document.createElement("span");s.id=XF,Object.assign(s.style,{...R9,top:e.bounds.top<35?0:"-35px"});const o=document.createElement("span");o.id=JF,o.innerHTML=`<${e.name}> `;const i=document.createElement("i");return i.id=QF,i.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`,Object.assign(i.style,D9),s.appendChild(o),s.appendChild(i),n.appendChild(s),document.body.appendChild(n),n}function Ob(e){const t=Rc(),n=T9(),s=x9(),o=I9();t&&(Object.assign(t.style,{...eP,...Ab(e.bounds)}),Object.assign(n.style,{top:e.bounds.top<35?0:"-35px"}),s.innerHTML=`<${e.name}> `,o.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`)}function F9(e){const t=ql(e);if(!t.width&&!t.height)return;const n=ym(e);Rc()?Ob({bounds:t,name:n}):kb({bounds:t,name:n})}function tP(){const e=Rc();e&&(e.style.display="none")}var Mb=null;function Nb(e){const t=e.target;if(t){const n=t.__vueParentComponent;if(n&&(Mb=n,n.vnode.el)){const o=ql(n),i=ym(n);Rc()?Ob({bounds:o,name:i}):kb({bounds:o,name:i})}}}function P9(e,t){if(e.preventDefault(),e.stopPropagation(),Mb){const n=w9(Mb);t(n)}}var Cm=null;function A9(){tP(),window.removeEventListener("mouseover",Nb),window.removeEventListener("click",Cm,!0),Cm=null}function k9(){return window.addEventListener("mouseover",Nb),new Promise(e=>{function t(n){n.preventDefault(),n.stopPropagation(),P9(n,s=>{window.removeEventListener("click",t,!0),Cm=null,window.removeEventListener("mouseover",Nb);const o=Rc();o&&(o.style.display="none"),e(JSON.stringify({id:s}))})}Cm=t,window.addEventListener("click",t,!0)})}function O9(e){const t=Fb(Js.value,e.id);if(t){const[n]=Pb(t);if(typeof n.scrollIntoView=="function")n.scrollIntoView({behavior:"smooth"});else{const s=ql(t),o=document.createElement("div"),i={...Ab(s),position:"absolute"};Object.assign(o.style,i),document.body.appendChild(o),o.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{document.body.removeChild(o)},2e3)}setTimeout(()=>{const s=ql(t);if(s.width||s.height){const o=ym(t),i=Rc();i?Ob({...e,name:o,bounds:s}):kb({...e,name:o,bounds:s}),setTimeout(()=>{i&&(i.style.display="none")},1500)}},1200)}}Qe();var nP,sP;(sP=(nP=Dt).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__)!=null||(nP.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__=!0);function M9(e){let t=0;const n=setInterval(()=>{Dt.__VUE_INSPECTOR__&&(clearInterval(n),t+=30,e()),t>=5e3&&clearInterval(n)},30)}function N9(){const e=Dt.__VUE_INSPECTOR__,t=e.openInEditor;e.openInEditor=async(...n)=>{e.disable(),t(...n)}}function L9(){return new Promise(e=>{function t(){N9(),e(Dt.__VUE_INSPECTOR__)}Dt.__VUE_INSPECTOR__?t():M9(()=>{t()})})}Qe(),Qe();function V9(e){return!!(e&&e.__v_isReadonly)}function oP(e){return V9(e)?oP(e.__v_raw):!!(e&&e.__v_isReactive)}function Lb(e){return!!(e&&e.__v_isRef===!0)}function qh(e){const t=e&&e.__v_raw;return t?qh(t):e}var B9=class{constructor(){this.refEditor=new $9}set(e,t,n,s){const o=Array.isArray(t)?t:t.split(".");for(;o.length>1;){const a=o.shift();e instanceof Map?e=e.get(a):e instanceof Set?e=Array.from(e.values())[a]:e=e[a],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}const i=o[0],r=this.refEditor.get(e)[i];s?s(e,i,n):this.refEditor.isRef(r)?this.refEditor.set(r,n):e[i]=n}get(e,t){const n=Array.isArray(t)?t:t.split(".");for(let s=0;s<n.length;s++)if(e instanceof Map?e=e.get(n[s]):e=e[n[s]],this.refEditor.isRef(e)&&(e=this.refEditor.get(e)),!e)return;return e}has(e,t,n=!1){if(typeof e>"u")return!1;const s=Array.isArray(t)?t.slice():t.split("."),o=n?2:1;for(;e&&s.length>o;){const i=s.shift();e=e[i],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}return e!=null&&Object.prototype.hasOwnProperty.call(e,s[0])}createDefaultSetCallback(e){return(t,n,s)=>{if((e.remove||e.newKey)&&(Array.isArray(t)?t.splice(n,1):qh(t)instanceof Map?t.delete(n):qh(t)instanceof Set?t.delete(Array.from(t.values())[n]):Reflect.deleteProperty(t,n)),!e.remove){const o=t[e.newKey||n];this.refEditor.isRef(o)?this.refEditor.set(o,s):qh(t)instanceof Map?t.set(e.newKey||n,s):qh(t)instanceof Set?t.add(s):t[e.newKey||n]=s}}}},$9=class{set(e,t){if(Lb(e))e.value=t;else{if(e instanceof Set&&Array.isArray(t)){e.clear(),t.forEach(o=>e.add(o));return}const n=Object.keys(t);if(e instanceof Map){const o=new Set(e.keys());n.forEach(i=>{e.set(i,Reflect.get(t,i)),o.delete(i)}),o.forEach(i=>e.delete(i));return}const s=new Set(Object.keys(e));n.forEach(o=>{Reflect.set(e,o,Reflect.get(t,o)),s.delete(o)}),s.forEach(o=>Reflect.deleteProperty(e,o))}}get(e){return Lb(e)?e.value:e}isRef(e){return Lb(e)||oP(e)}};Qe(),Qe(),Qe();var H9="__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";function G9(){if(typeof window>"u"||!$F||typeof localStorage>"u"||localStorage===null)return{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""};const e=typeof localStorage.getItem<"u"?localStorage.getItem(H9):null;return e?JSON.parse(e):{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""}}Qe(),Qe(),Qe();var iP,rP;(rP=(iP=Dt).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS)!=null||(iP.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS=[]);var U9=new Proxy(Dt.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS,{get(e,t,n){return Reflect.get(e,t,n)}});function W9(e,t){ys.timelineLayersState[t.id]=!1,U9.push({...e,descriptorId:t.id,appRecord:xb(t.app)})}var aP,lP;(lP=(aP=Dt).__VUE_DEVTOOLS_KIT_INSPECTOR__)!=null||(aP.__VUE_DEVTOOLS_KIT_INSPECTOR__=[]);var Vb=new Proxy(Dt.__VUE_DEVTOOLS_KIT_INSPECTOR__,{get(e,t,n){return Reflect.get(e,t,n)}}),uP=_c(()=>{Tc.hooks.callHook("sendInspectorToClient",cP())});function z9(e,t){var n,s;Vb.push({options:e,descriptor:t,treeFilterPlaceholder:(n=e.treeFilterPlaceholder)!=null?n:"Search tree...",stateFilterPlaceholder:(s=e.stateFilterPlaceholder)!=null?s:"Search state...",treeFilter:"",selectedNodeId:"",appRecord:xb(t.app)}),uP()}function cP(){return Vb.filter(e=>e.descriptor.app===Js.value.app).filter(e=>e.descriptor.id!=="components").map(e=>{var t;const n=e.descriptor,s=e.options;return{id:s.id,label:s.label,logo:n.logo,icon:`custom-ic-baseline-${(t=s==null?void 0:s.icon)==null?void 0:t.replace(/_/g,"-")}`,packageName:n.packageName,homepage:n.homepage,pluginId:n.id}})}function bm(e,t){return Vb.find(n=>n.options.id===e&&(t?n.descriptor.app===t:!0))}function j9(){const e=WF();e.hook("addInspector",({inspector:s,plugin:o})=>{z9(s,o.descriptor)});const t=_c(async({inspectorId:s,plugin:o})=>{var i;if(!s||!((i=o==null?void 0:o.descriptor)!=null&&i.app)||ys.highPerfModeEnabled)return;const r=bm(s,o.descriptor.app),a={app:o.descriptor.app,inspectorId:s,filter:(r==null?void 0:r.treeFilter)||"",rootNodes:[]};await new Promise(l=>{e.callHookWith(async u=>{await Promise.all(u.map(c=>c(a))),l()},"getInspectorTree")}),e.callHookWith(async l=>{await Promise.all(l.map(u=>u({inspectorId:s,rootNodes:a.rootNodes})))},"sendInspectorTreeToClient")},120);e.hook("sendInspectorTree",t);const n=_c(async({inspectorId:s,plugin:o})=>{var i;if(!s||!((i=o==null?void 0:o.descriptor)!=null&&i.app)||ys.highPerfModeEnabled)return;const r=bm(s,o.descriptor.app),a={app:o.descriptor.app,inspectorId:s,nodeId:(r==null?void 0:r.selectedNodeId)||"",state:null},l={currentTab:`custom-inspector:${s}`};a.nodeId&&await new Promise(u=>{e.callHookWith(async c=>{await Promise.all(c.map(d=>d(a,l))),u()},"getInspectorState")}),e.callHookWith(async u=>{await Promise.all(u.map(c=>c({inspectorId:s,nodeId:a.nodeId,state:a.state})))},"sendInspectorStateToClient")},120);return e.hook("sendInspectorState",n),e.hook("customInspectorSelectNode",({inspectorId:s,nodeId:o,plugin:i})=>{const r=bm(s,i.descriptor.app);r&&(r.selectedNodeId=o)}),e.hook("timelineLayerAdded",({options:s,plugin:o})=>{W9(s,o.descriptor)}),e.hook("timelineEventAdded",({options:s,plugin:o})=>{var i;const r=["performance","component-event","keyboard","mouse"];ys.highPerfModeEnabled||!((i=ys.timelineLayersState)!=null&&i[o.descriptor.id])&&!r.includes(s.layerId)||e.callHookWith(async a=>{await Promise.all(a.map(l=>l(s)))},"sendTimelineEventToClient")}),e.hook("getComponentInstances",async({app:s})=>{const o=s.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(!o)return null;const i=o.id.toString();return[...o.instanceMap].filter(([a])=>a.split(":")[0]===i).map(([,a])=>a)}),e.hook("getComponentBounds",async({instance:s})=>ql(s)),e.hook("getComponentName",({instance:s})=>ym(s)),e.hook("componentHighlight",({uid:s})=>{const o=Js.value.instanceMap.get(s);o&&F9(o)}),e.hook("componentUnhighlight",()=>{tP()}),e}var dP,hP;(hP=(dP=Dt).__VUE_DEVTOOLS_KIT_APP_RECORDS__)!=null||(dP.__VUE_DEVTOOLS_KIT_APP_RECORDS__=[]);var fP,pP;(pP=(fP=Dt).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__)!=null||(fP.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__={});var gP,mP;(mP=(gP=Dt).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__)!=null||(gP.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__="");var vP,yP;(yP=(vP=Dt).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__)!=null||(vP.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__=[]);var wP,CP;(CP=(wP=Dt).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__)!=null||(wP.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__=[]);var Yl="__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";function K9(){return{connected:!1,clientConnected:!1,vitePluginDetected:!0,appRecords:[],activeAppRecordId:"",tabs:[],commands:[],highPerfModeEnabled:!0,devtoolsClientDetected:{},perfUniqueGroupId:0,timelineLayersState:G9()}}var bP,SP;(SP=(bP=Dt)[Yl])!=null||(bP[Yl]=K9());var q9=_c(e=>{Tc.hooks.callHook("devtoolsStateUpdated",{state:e})});_c((e,t)=>{Tc.hooks.callHook("devtoolsConnectedUpdated",{state:e,oldState:t})});var Sm=new Proxy(Dt.__VUE_DEVTOOLS_KIT_APP_RECORDS__,{get(e,t,n){return t==="value"?Dt.__VUE_DEVTOOLS_KIT_APP_RECORDS__:Dt.__VUE_DEVTOOLS_KIT_APP_RECORDS__[t]}}),Js=new Proxy(Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__,{get(e,t,n){return t==="value"?Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__:t==="id"?Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__:Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[t]}});function EP(){q9({...Dt[Yl],appRecords:Sm.value,activeAppRecordId:Js.id,tabs:Dt.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,commands:Dt.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__})}function Y9(e){Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__=e,EP()}function Z9(e){Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__=e,EP()}var ys=new Proxy(Dt[Yl],{get(e,t){return t==="appRecords"?Sm:t==="activeAppRecordId"?Js.id:t==="tabs"?Dt.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__:t==="commands"?Dt.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__:Dt[Yl][t]},deleteProperty(e,t){return delete e[t],!0},set(e,t,n){return{...Dt[Yl]},e[t]=n,Dt[Yl][t]=n,!0}});function X9(e={}){var t,n,s;const{file:o,host:i,baseUrl:r=window.location.origin,line:a=0,column:l=0}=e;if(o){if(i==="chrome-extension"){const u=o.replace(/\\/g,"\\\\"),c=(n=(t=window.VUE_DEVTOOLS_CONFIG)==null?void 0:t.openInEditorHost)!=null?n:"/";fetch(`${c}__open-in-editor?file=${encodeURI(o)}`).then(d=>{if(!d.ok){const h=`Opening component ${u} failed`;console.log(`%c${h}`,"color:red")}})}else if(ys.vitePluginDetected){const u=(s=Dt.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__)!=null?s:r;Dt.__VUE_INSPECTOR__.openInEditor(u,o,a,l)}}}Qe(),Qe(),Qe(),Qe(),Qe();var _P,RP;(RP=(_P=Dt).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__)!=null||(_P.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__=[]);var Bb=new Proxy(Dt.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__,{get(e,t,n){return Reflect.get(e,t,n)}});function $b(e){const t={};return Object.keys(e).forEach(n=>{t[n]=e[n].defaultValue}),t}function Hb(e){return`__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${e}__`}function J9(e){var t,n,s;const o=(n=(t=Bb.find(i=>{var r;return i[0].id===e&&!!((r=i[0])!=null&&r.settings)}))==null?void 0:t[0])!=null?n:null;return(s=o==null?void 0:o.settings)!=null?s:null}function DP(e,t){var n,s,o;const i=Hb(e);if(i){const r=localStorage.getItem(i);if(r)return JSON.parse(r)}if(e){const r=(s=(n=Bb.find(a=>a[0].id===e))==null?void 0:n[0])!=null?s:null;return $b((o=r==null?void 0:r.settings)!=null?o:{})}return $b(t)}function Q9(e,t){const n=Hb(e);localStorage.getItem(n)||localStorage.setItem(n,JSON.stringify($b(t)))}function eq(e,t,n){const s=Hb(e),o=localStorage.getItem(s),i=JSON.parse(o||"{}"),r={...i,[t]:n};localStorage.setItem(s,JSON.stringify(r)),Tc.hooks.callHookWith(a=>{a.forEach(l=>l({pluginId:e,key:t,oldValue:i[t],newValue:n,settings:r}))},"setPluginSettings")}Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe();var TP,IP,Mo=(IP=(TP=Dt).__VUE_DEVTOOLS_HOOK)!=null?IP:TP.__VUE_DEVTOOLS_HOOK=WF(),tq={vueAppInit(e){Mo.hook("app:init",e)},vueAppUnmount(e){Mo.hook("app:unmount",e)},vueAppConnected(e){Mo.hook("app:connected",e)},componentAdded(e){return Mo.hook("component:added",e)},componentEmit(e){return Mo.hook("component:emit",e)},componentUpdated(e){return Mo.hook("component:updated",e)},componentRemoved(e){return Mo.hook("component:removed",e)},setupDevtoolsPlugin(e){Mo.hook("devtools-plugin:setup",e)},perfStart(e){return Mo.hook("perf:start",e)},perfEnd(e){return Mo.hook("perf:end",e)}},xP={on:tq,setupDevToolsPlugin(e,t){return Mo.callHook("devtools-plugin:setup",e,t)}},nq=class{constructor({plugin:e,ctx:t}){this.hooks=t.hooks,this.plugin=e}get on(){return{visitComponentTree:e=>{this.hooks.hook("visitComponentTree",e)},inspectComponent:e=>{this.hooks.hook("inspectComponent",e)},editComponentState:e=>{this.hooks.hook("editComponentState",e)},getInspectorTree:e=>{this.hooks.hook("getInspectorTree",e)},getInspectorState:e=>{this.hooks.hook("getInspectorState",e)},editInspectorState:e=>{this.hooks.hook("editInspectorState",e)},inspectTimelineEvent:e=>{this.hooks.hook("inspectTimelineEvent",e)},timelineCleared:e=>{this.hooks.hook("timelineCleared",e)},setPluginSettings:e=>{this.hooks.hook("setPluginSettings",e)}}}notifyComponentUpdate(e){var t;if(ys.highPerfModeEnabled)return;const n=cP().find(s=>s.packageName===this.plugin.descriptor.packageName);if(n!=null&&n.id){if(e){const s=[e.appContext.app,e.uid,(t=e.parent)==null?void 0:t.uid,e];Mo.callHook("component:updated",...s)}else Mo.callHook("component:updated");this.hooks.callHook("sendInspectorState",{inspectorId:n.id,plugin:this.plugin})}}addInspector(e){this.hooks.callHook("addInspector",{inspector:e,plugin:this.plugin}),this.plugin.descriptor.settings&&Q9(e.id,this.plugin.descriptor.settings)}sendInspectorTree(e){ys.highPerfModeEnabled||this.hooks.callHook("sendInspectorTree",{inspectorId:e,plugin:this.plugin})}sendInspectorState(e){ys.highPerfModeEnabled||this.hooks.callHook("sendInspectorState",{inspectorId:e,plugin:this.plugin})}selectInspectorNode(e,t){this.hooks.callHook("customInspectorSelectNode",{inspectorId:e,nodeId:t,plugin:this.plugin})}visitComponentTree(e){return this.hooks.callHook("visitComponentTree",e)}now(){return ys.highPerfModeEnabled?0:Date.now()}addTimelineLayer(e){this.hooks.callHook("timelineLayerAdded",{options:e,plugin:this.plugin})}addTimelineEvent(e){ys.highPerfModeEnabled||this.hooks.callHook("timelineEventAdded",{options:e,plugin:this.plugin})}getSettings(e){return DP(e??this.plugin.descriptor.id,this.plugin.descriptor.settings)}getComponentInstances(e){return this.hooks.callHook("getComponentInstances",{app:e})}getComponentBounds(e){return this.hooks.callHook("getComponentBounds",{instance:e})}getComponentName(e){return this.hooks.callHook("getComponentName",{instance:e})}highlightElement(e){const t=e.__VUE_DEVTOOLS_NEXT_UID__;return this.hooks.callHook("componentHighlight",{uid:t})}unhighlightElement(){return this.hooks.callHook("componentUnhighlight")}},sq=nq;Qe(),Qe(),Qe(),Qe();var oq="__vue_devtool_undefined__",iq="__vue_devtool_infinity__",rq="__vue_devtool_negative_infinity__",aq="__vue_devtool_nan__";Qe(),Qe();var lq={[oq]:"undefined",[aq]:"NaN",[iq]:"Infinity",[rq]:"-Infinity"};Object.entries(lq).reduce((e,[t,n])=>(e[n]=t,e),{}),Qe(),Qe(),Qe(),Qe(),Qe();var FP,PP;(PP=(FP=Dt).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__)!=null||(FP.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__=new Set);function AP(e,t){return xP.setupDevToolsPlugin(e,t)}function uq(e,t){const[n,s]=e;if(n.app!==t)return;const o=new sq({plugin:{setupFn:s,descriptor:n},ctx:Tc});n.packageName==="vuex"&&o.on.editInspectorState(i=>{o.sendInspectorState(i.inspectorId)}),s(o)}function kP(e,t){Dt.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(e)||ys.highPerfModeEnabled&&!(t!=null&&t.inspectingComponent)||(Dt.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(e),Bb.forEach(n=>{uq(n,e)}))}Qe(),Qe();var Yh="__VUE_DEVTOOLS_ROUTER__",Dc="__VUE_DEVTOOLS_ROUTER_INFO__",OP,MP;(MP=(OP=Dt)[Dc])!=null||(OP[Dc]={currentRoute:null,routes:[]});var NP,LP;(LP=(NP=Dt)[Yh])!=null||(NP[Yh]={}),new Proxy(Dt[Dc],{get(e,t){return Dt[Dc][t]}}),new Proxy(Dt[Yh],{get(e,t){if(t==="value")return Dt[Yh]}});function cq(e){const t=new Map;return((e==null?void 0:e.getRoutes())||[]).filter(n=>!t.has(n.path)&&t.set(n.path,1))}function Gb(e){return e.map(t=>{let{path:n,name:s,children:o,meta:i}=t;return o!=null&&o.length&&(o=Gb(o)),{path:n,name:s,children:o,meta:i}})}function dq(e){if(e){const{fullPath:t,hash:n,href:s,path:o,name:i,matched:r,params:a,query:l}=e;return{fullPath:t,hash:n,href:s,path:o,name:i,params:a,query:l,matched:Gb(r)}}return e}function hq(e,t){function n(){var s;const o=(s=e.app)==null?void 0:s.config.globalProperties.$router,i=dq(o==null?void 0:o.currentRoute.value),r=Gb(cq(o)),a=console.warn;console.warn=()=>{},Dt[Dc]={currentRoute:i?GF(i):{},routes:GF(r)},Dt[Yh]=o,console.warn=a}n(),xP.on.componentUpdated(_c(()=>{var s;((s=t.value)==null?void 0:s.app)===e.app&&(n(),!ys.highPerfModeEnabled&&Tc.hooks.callHook("routerInfoUpdated",{state:Dt[Dc]}))},200))}function fq(e){return{async getInspectorTree(t){const n={...t,app:Js.value.app,rootNodes:[]};return await new Promise(s=>{e.callHookWith(async o=>{await Promise.all(o.map(i=>i(n))),s()},"getInspectorTree")}),n.rootNodes},async getInspectorState(t){const n={...t,app:Js.value.app,state:null},s={currentTab:`custom-inspector:${t.inspectorId}`};return await new Promise(o=>{e.callHookWith(async i=>{await Promise.all(i.map(r=>r(n,s))),o()},"getInspectorState")}),n.state},editInspectorState(t){const n=new B9,s={...t,app:Js.value.app,set:(o,i=t.path,r=t.state.value,a)=>{n.set(o,i,r,a||n.createDefaultSetCallback(t.state))}};e.callHookWith(o=>{o.forEach(i=>i(s))},"editInspectorState")},sendInspectorState(t){const n=bm(t);e.callHook("sendInspectorState",{inspectorId:t,plugin:{descriptor:n.descriptor,setupFn:()=>({})}})},inspectComponentInspector(){return k9()},cancelInspectComponentInspector(){return A9()},getComponentRenderCode(t){const n=Fb(Js.value,t);if(n)return typeof(n==null?void 0:n.type)!="function"?n.render.toString():n.type.toString()},scrollToComponent(t){return O9({id:t})},openInEditor:X9,getVueInspector:L9,toggleApp(t,n){const s=Sm.value.find(o=>o.id===t);s&&(Z9(t),Y9(s),hq(s,Js),uP(),kP(s.app,n))},inspectDOM(t){const n=Fb(Js.value,t);if(n){const[s]=Pb(n);s&&(Dt.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__=s)}},updatePluginSettings(t,n,s){eq(t,n,s)},getPluginSettings(t){return{options:J9(t),values:DP(t)}}}}Qe();var VP,BP;(BP=(VP=Dt).__VUE_DEVTOOLS_ENV__)!=null||(VP.__VUE_DEVTOOLS_ENV__={vitePluginDetected:!1});var $P=j9(),HP,GP;(GP=(HP=Dt).__VUE_DEVTOOLS_KIT_CONTEXT__)!=null||(HP.__VUE_DEVTOOLS_KIT_CONTEXT__={hooks:$P,get state(){return{...ys,activeAppRecordId:Js.id,activeAppRecord:Js.value,appRecords:Sm.value}},api:fq($P)});var Tc=Dt.__VUE_DEVTOOLS_KIT_CONTEXT__;Qe(),p9(m9());var UP,WP;(WP=(UP=Dt).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__)!=null||(UP.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__={id:0,appIds:new Set}),Qe(),Qe();function pq(e){ys.highPerfModeEnabled=e??!ys.highPerfModeEnabled,!e&&Js.value&&kP(Js.value.app)}Qe(),Qe(),Qe();function gq(e){ys.devtoolsClientDetected={...ys.devtoolsClientDetected,...e};const t=Object.values(ys.devtoolsClientDetected).some(Boolean);pq(!t)}var zP,jP;(jP=(zP=Dt).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__)!=null||(zP.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__=gq),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe();var mq=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},KP=class{constructor(t){this.generateIdentifier=t,this.kv=new mq}register(t,n){this.kv.getByValue(t)||(n||(n=this.generateIdentifier(t)),this.kv.set(n,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}},vq=class extends KP{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t=="object"?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};Qe(),Qe();function yq(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function wq(e,t){const n=yq(e);if("find"in n)return n.find(t);const s=n;for(let o=0;o<s.length;o++){const i=s[o];if(t(i))return i}}function Ic(e,t){Object.entries(e).forEach(([n,s])=>t(s,n))}function Em(e,t){return e.indexOf(t)!==-1}function qP(e,t){for(let n=0;n<e.length;n++){const s=e[n];if(t(s))return s}}var Cq=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return wq(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}};Qe(),Qe();var bq=e=>Object.prototype.toString.call(e).slice(8,-1),YP=e=>typeof e>"u",Sq=e=>e===null,Zh=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,Ub=e=>Zh(e)&&Object.keys(e).length===0,$a=e=>Array.isArray(e),Eq=e=>typeof e=="string",_q=e=>typeof e=="number"&&!isNaN(e),Rq=e=>typeof e=="boolean",Dq=e=>e instanceof RegExp,Xh=e=>e instanceof Map,Jh=e=>e instanceof Set,ZP=e=>bq(e)==="Symbol",Tq=e=>e instanceof Date&&!isNaN(e.valueOf()),Iq=e=>e instanceof Error,XP=e=>typeof e=="number"&&isNaN(e),xq=e=>Rq(e)||Sq(e)||YP(e)||_q(e)||Eq(e)||ZP(e),Fq=e=>typeof e=="bigint",Pq=e=>e===1/0||e===-1/0,Aq=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),kq=e=>e instanceof URL;Qe();var JP=e=>e.replace(/\./g,"\\."),Wb=e=>e.map(String).map(JP).join("."),Qh=e=>{const t=[];let n="";for(let o=0;o<e.length;o++){let i=e.charAt(o);if(i==="\\"&&e.charAt(o+1)==="."){n+=".",o++;continue}if(i==="."){t.push(n),n="";continue}n+=i}const s=n;return t.push(s),t};Qe();function ar(e,t,n,s){return{isApplicable:e,annotation:t,transform:n,untransform:s}}var QP=[ar(YP,"undefined",()=>null,()=>{}),ar(Fq,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),ar(Tq,"Date",e=>e.toISOString(),e=>new Date(e)),ar(Iq,"Error",(e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(s=>{n[s]=e[s]}),n},(e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(s=>{n[s]=e[s]}),n}),ar(Dq,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),ar(Jh,"set",e=>[...e.values()],e=>new Set(e)),ar(Xh,"map",e=>[...e.entries()],e=>new Map(e)),ar(e=>XP(e)||Pq(e),"number",e=>XP(e)?"NaN":e>0?"Infinity":"-Infinity",Number),ar(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),ar(kq,"URL",e=>e.toString(),e=>new URL(e))];function _m(e,t,n,s){return{isApplicable:e,annotation:t,transform:n,untransform:s}}var eA=_m((e,t)=>ZP(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const s=n.symbolRegistry.getValue(t[1]);if(!s)throw new Error("Trying to deserialize unknown symbol");return s}),Oq=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),tA=_m(Aq,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=Oq[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function nA(e,t){return e!=null&&e.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var sA=_m(nA,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const s={};return n.forEach(o=>{s[o]=e[o]}),s},(e,t,n)=>{const s=n.classRegistry.getValue(t[1]);if(!s)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(s.prototype),e)}),oA=_m((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const s=n.customTransformerRegistry.findByName(t[1]);if(!s)throw new Error("Trying to deserialize unknown custom value");return s.deserialize(e)}),Mq=[sA,eA,oA,tA],iA=(e,t)=>{const n=qP(Mq,o=>o.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const s=qP(QP,o=>o.isApplicable(e,t));if(s)return{value:s.transform(e,t),type:s.annotation}},rA={};QP.forEach(e=>{rA[e.annotation]=e});var Nq=(e,t,n)=>{if($a(t))switch(t[0]){case"symbol":return eA.untransform(e,t,n);case"class":return sA.untransform(e,t,n);case"custom":return oA.untransform(e,t,n);case"typed-array":return tA.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const s=rA[t];if(!s)throw new Error("Unknown transformation: "+t);return s.untransform(e,n)}};Qe();var xc=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function aA(e){if(Em(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Em(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Em(e,"constructor"))throw new Error("constructor is not allowed as a property")}var Lq=(e,t)=>{aA(t);for(let n=0;n<t.length;n++){const s=t[n];if(Jh(e))e=xc(e,+s);else if(Xh(e)){const o=+s,i=+t[++n]==0?"key":"value",r=xc(e,o);switch(i){case"key":e=r;break;case"value":e=e.get(r);break}}else e=e[s]}return e},zb=(e,t,n)=>{if(aA(t),t.length===0)return n(e);let s=e;for(let i=0;i<t.length-1;i++){const r=t[i];if($a(s)){const a=+r;s=s[a]}else if(Zh(s))s=s[r];else if(Jh(s)){const a=+r;s=xc(s,a)}else if(Xh(s)){if(i===t.length-2)break;const l=+r,u=+t[++i]==0?"key":"value",c=xc(s,l);switch(u){case"key":s=c;break;case"value":s=s.get(c);break}}}const o=t[t.length-1];if($a(s)?s[+o]=n(s[+o]):Zh(s)&&(s[o]=n(s[o])),Jh(s)){const i=xc(s,+o),r=n(i);i!==r&&(s.delete(i),s.add(r))}if(Xh(s)){const i=+t[t.length-2],r=xc(s,i);switch(+o==0?"key":"value"){case"key":{const l=n(r);s.set(l,s.get(r)),l!==r&&s.delete(r);break}case"value":{s.set(r,n(s.get(r)));break}}}return e};function jb(e,t,n=[]){if(!e)return;if(!$a(e)){Ic(e,(i,r)=>jb(i,t,[...n,...Qh(r)]));return}const[s,o]=e;o&&Ic(o,(i,r)=>{jb(i,t,[...n,...Qh(r)])}),t(s,n)}function Vq(e,t,n){return jb(t,(s,o)=>{e=zb(e,o,i=>Nq(i,s,n))}),e}function Bq(e,t){function n(s,o){const i=Lq(e,Qh(o));s.map(Qh).forEach(r=>{e=zb(e,r,()=>i)})}if($a(t)){const[s,o]=t;s.forEach(i=>{e=zb(e,Qh(i),()=>e)}),o&&Ic(o,n)}else Ic(t,n);return e}var $q=(e,t)=>Zh(e)||$a(e)||Xh(e)||Jh(e)||nA(e,t);function Hq(e,t,n){const s=n.get(e);s?s.push(t):n.set(e,[t])}function Gq(e,t){const n={};let s;return e.forEach(o=>{if(o.length<=1)return;t||(o=o.map(a=>a.map(String)).sort((a,l)=>a.length-l.length));const[i,...r]=o;i.length===0?s=r.map(Wb):n[Wb(i)]=r.map(Wb)}),s?Ub(n)?[s]:[s,n]:Ub(n)?void 0:n}var lA=(e,t,n,s,o=[],i=[],r=new Map)=>{var a;const l=xq(e);if(!l){Hq(e,o,t);const p=r.get(e);if(p)return s?{transformedValue:null}:p}if(!$q(e,n)){const p=iA(e,n),g=p?{transformedValue:p.value,annotations:[p.type]}:{transformedValue:e};return l||r.set(e,g),g}if(Em(i,e))return{transformedValue:null};const u=iA(e,n),c=(a=u==null?void 0:u.value)!=null?a:e,d=$a(c)?[]:{},h={};Ic(c,(p,g)=>{if(g==="__proto__"||g==="constructor"||g==="prototype")throw new Error(`Detected property ${g}. This is a prototype pollution risk, please remove it from your object.`);const v=lA(p,t,n,s,[...o,g],[...i,e],r);d[g]=v.transformedValue,$a(v.annotations)?h[g]=v.annotations:Zh(v.annotations)&&Ic(v.annotations,(C,S)=>{h[JP(g)+"."+S]=C})});const f=Ub(h)?{transformedValue:d,annotations:u?[u.type]:void 0}:{transformedValue:d,annotations:u?[u.type,h]:h};return l||r.set(e,f),f};Qe(),Qe();function uA(e){return Object.prototype.toString.call(e).slice(8,-1)}function cA(e){return uA(e)==="Array"}function Uq(e){if(uA(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function Wq(e,t,n,s,o){const i={}.propertyIsEnumerable.call(s,t)?"enumerable":"nonenumerable";i==="enumerable"&&(e[t]=n),o&&i==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function Kb(e,t={}){if(cA(e))return e.map(o=>Kb(o,t));if(!Uq(e))return e;const n=Object.getOwnPropertyNames(e),s=Object.getOwnPropertySymbols(e);return[...n,...s].reduce((o,i)=>{if(cA(t.props)&&!t.props.includes(i))return o;const r=e[i],a=Kb(r,t);return Wq(o,i,a,e,t.nonenumerable),o},{})}var Pn=class{constructor({dedupe:e=!1}={}){this.classRegistry=new vq,this.symbolRegistry=new KP(t=>{var n;return(n=t.description)!=null?n:""}),this.customTransformerRegistry=new Cq,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=lA(e,t,this,this.dedupe),s={json:n.transformedValue};n.annotations&&(s.meta={...s.meta,values:n.annotations});const o=Gq(t,this.dedupe);return o&&(s.meta={...s.meta,referentialEqualities:o}),s}deserialize(e){const{json:t,meta:n}=e;let s=Kb(t);return n!=null&&n.values&&(s=Vq(s,n.values,this)),n!=null&&n.referentialEqualities&&(s=Bq(s,n.referentialEqualities)),s}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};Pn.defaultInstance=new Pn,Pn.serialize=Pn.defaultInstance.serialize.bind(Pn.defaultInstance),Pn.deserialize=Pn.defaultInstance.deserialize.bind(Pn.defaultInstance),Pn.stringify=Pn.defaultInstance.stringify.bind(Pn.defaultInstance),Pn.parse=Pn.defaultInstance.parse.bind(Pn.defaultInstance),Pn.registerClass=Pn.defaultInstance.registerClass.bind(Pn.defaultInstance),Pn.registerSymbol=Pn.defaultInstance.registerSymbol.bind(Pn.defaultInstance),Pn.registerCustom=Pn.defaultInstance.registerCustom.bind(Pn.defaultInstance),Pn.allowErrorProps=Pn.defaultInstance.allowErrorProps.bind(Pn.defaultInstance),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe();var dA,hA;(hA=(dA=Dt).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__)!=null||(dA.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__=[]);var fA,pA;(pA=(fA=Dt).__VUE_DEVTOOLS_KIT_RPC_CLIENT__)!=null||(fA.__VUE_DEVTOOLS_KIT_RPC_CLIENT__=null);var gA,mA;(mA=(gA=Dt).__VUE_DEVTOOLS_KIT_RPC_SERVER__)!=null||(gA.__VUE_DEVTOOLS_KIT_RPC_SERVER__=null);var vA,yA;(yA=(vA=Dt).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__)!=null||(vA.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__=null);var wA,CA;(CA=(wA=Dt).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__)!=null||(wA.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__=null);var bA,SA;(SA=(bA=Dt).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__)!=null||(bA.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__=null),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe();/*!
|
|
132
132
|
* pinia v3.0.4
|
|
133
133
|
* (c) 2025 Eduardo San Martin Morote
|
|
134
134
|
* @license MIT
|
|
@@ -138,7 +138,7 @@ Only state can be modified.`);r[0]="$state",Fc=!1,s.set(i,r,s.state.value),Fc=!0
|
|
|
138
138
|
state: () => new MyClass()
|
|
139
139
|
Found in store "${T.$id}".`),p&&i&&n.hydrate&&n.hydrate(T.$state,p),u=!0,c=!0,T}/*! #__NO_SIDE_EFFECTS__ */function Ql(e,t,n){let s;const o=typeof t=="function";s=o?n:t;function i(r,a){const l=Iw();if(r=(K.env.NODE_ENV==="test"&&Zl&&Zl._testing?null:r)||(l?En(Rm,null):null),r&&ef(r),K.env.NODE_ENV!=="production"&&!Zl)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
140
140
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
141
|
-
This will fail in production.`);r=Zl,r._s.has(e)||(o?Jb(e,t,s,r):VA(e,s,r),K.env.NODE_ENV!=="production"&&(i._pinia=r));const u=r._s.get(e);if(K.env.NODE_ENV!=="production"&&a){const c="__hot:"+e,d=o?Jb(c,t,s,r,!0):VA(c,si({},s),r,!0);a._hotUpdate(d),delete r.state.value[c],r._s.delete(c)}if(K.env.NODE_ENV!=="production"&&Zr){const c=Yn();if(c&&c.proxy&&!a){const d=c.proxy,h="_pStores"in d?d._pStores:d._pStores={};h[e]=u}}return u}return i.$id=e,i}function Qs(e){const t=Nt(e),n={};for(const s in t){const o=t[s];o.effect?n[s]=Y({get:()=>e[s],set(i){e[s]=i}}):(gn(o)||zo(o))&&(n[s]=Si(e,s))}return n}const Qb=Ql("permissionStore",()=>{const e=B([]),t=B(),n=B({});return{userPermissions:e,entityPermissions:t,itemPermission:n,setUserPermissions:r=>{e.value=r},setEntityPermissions:r=>{t.value=r},setItemPermission:(r,a)=>{n.value[r]=a}}}),hY="woohoo_getWoohooUserInterface_read",eS="media_getReviewUserInterface_read",fY="update_getUpdateUserInterface_read",BA="Unarchive parent folder first to continue",pY=(e,t,n,s,o,i)=>{const r=Qb(),{userPermissions:a}=Qs(r),l=Y(()=>{const I=_n.getInstance().getItem("BASE_URL"),x=_n.getInstance().getItem("BASE_REVIEW_URL"),{ws_code:P,entity_id:D,scene_id:F}=e.value;return{baseDomain:I||"",ws_code:P||"",entity_id:D||"",scene_id:F||"",reviewDomain:x||"",take_id:D||"",woohoo_id:D||"",parent_id:D||""}}),u=Y(()=>{var x;const I=e.value.permissions;return{canOpenSceneHub:!0,canOpenReview:a.value.includes(eS),canCopyLink:!0,canRename:(I==null?void 0:I.has_edit_permission)??!1,canOpenTakeInReview:a.value.includes(eS),canOpenTakeInUpdate:a.value.includes(fY),canOpenTakeInWoohoo:a.value.includes(hY),canDeleteRendition:((x=I==null?void 0:I.media)==null?void 0:x.has_delete_rendition_permission)??!1,canDeleteThumbnail:(I==null?void 0:I.has_edit_thumbnail_permission)??!1,canArchiveScene:I==null?void 0:I.has_archive_permission,canUnarchiveScene:I==null?void 0:I.has_archive_permission,canDeleteScene:(I==null?void 0:I.has_delete_permission)??!1}}),c=Y(()=>({project:Ao({type:"project",config:l.value}).url,take_review:Ao({type:"review_take",config:l.value}).url,review:Ao({type:"review_scene",config:l.value}).url,review_scene:Ao({type:"review_scene",config:l.value}).url,woohoo:Ao({type:"woohoo",config:l.value}).url,update:Ao({type:"update",config:l.value}).url,scene_hub:Ao({type:"scene_hub",config:l.value}).url})),d=(I,x)=>{const P=I.metaKey||I.ctrlKey,D=c.value[x]||"";if(D){if(x==="scene_hub"){if(P){window.open(D,"_blank");return}if(!s){console.error("Switch instance not found.",{openSceneHub:s,windowFunc:globalThis.window.$switchInstance});return}s(l.value.scene_id||"");return}P?window.open(D,"_blank"):window.location.href=D}},h=async(I,x)=>{var P;try{const D=await((P=e.value.axiosService.value)==null?void 0:P.deleteRendition({workspaceId:l.value.ws_code,itemIds:[l.value.scene_id||""],deleteAll:!0}));(D==null?void 0:D.message)!="Done"&&console.error("Failed to delete rendition.")}catch(D){console.error("Error deleting rendition",D)}finally{o()}},f=async(I,x)=>{var P;try{await((P=e.value.axiosService.value)==null?void 0:P.deleteThumbnail({workspaceId:l.value.ws_code,itemIds:[l.value.scene_id||""]}))}catch(D){console.error("Error deleting thumbnail",D)}finally{o()}},p=async(I,x)=>{var P;try{const D=await((P=e.value.axiosService.value)==null?void 0:P.archiveScene(l.value.ws_code,l.value.entity_id,[l.value.scene_id]));(D==null?void 0:D.message)!="Done"&&console.error("Failed to archive scene."),x&&x("archived")}catch(D){console.error("Error archiving item",D)}finally{o()}},g=async(I,x)=>{var P;try{const D=await((P=e.value.axiosService.value)==null?void 0:P.deleteScene(l.value.ws_code,l.value.entity_id,l.value.scene_id));(D==null?void 0:D.message)!="Done"&&console.error("Failed to delete scene."),x&&x("deleted")}catch(D){console.error("Error deleting item",D)}finally{o()}},v=I=>{const x=c.value.scene_hub||"";x&&(_.value="Copied",navigator.clipboard.writeText(x),setTimeout(()=>{_.value="Copy link"},5e3))},C=async(I,x)=>{var P;try{const D=await((P=e.value.axiosService.value)==null?void 0:P.unarchiveScene(l.value.ws_code,l.value.entity_id,[l.value.scene_id]));(D==null?void 0:D.message)!="Done"&&console.error("Failed to unarchive scene."),x&&x("unarchived")}catch(D){console.error("Error unarchiving item",D)}finally{o()}},S=I=>p(I,t),b=I=>C(I,t),w=I=>g(I,t),_=B("Copy link"),R=I=>d(I,"review"),T=Y(()=>{let I=[];if(!l.value.scene_id&&e.value.optionBlock&&I.push(...e.value.optionBlock),Array.isArray(e.value.optionBlock)&&e.value.optionBlock.length)return e.value.optionBlock;const x=()=>Math.random().toString(36).substring(2,9);return[{id:x(),type:"column",groupLabel:"Download Options",options:[{id:"open_review",label:"Open Review",icon:"PenRuler",action:R,hide:!u.value.canOpenReview,disabled:!u.value.canOpenReview,description:"",type:"icon"},{id:x(),label:_.value,icon:"Link",action:v,hide:!u.value.canCopyLink,disabled:!u.value.canCopyLink,description:"",type:"icon"}]},{id:x(),type:"column",groupLabel:"Download Options",options:[{id:"archive",label:"Archive",icon:"BoxArchive",action:S,hide:u.value.canArchiveScene==0,disabled:u.value.canArchiveScene!==1,description:u.value.canArchiveScene==-1?BA:"",type:"icon"},{id:"unarchive",label:"Unarchive",icon:"BoxArchive",action:b,hide:u.value.canUnarchiveScene==0,disabled:u.value.canUnarchiveScene!==1,description:u.value.canUnarchiveScene===-1?BA:"",type:"icon"},{id:"delete",label:"Delete",icon:"TrashCan",isDanger:!0,description:"Delete permanently",action:w,hide:!u.value.canDeleteScene,type:"icon"}]}]});return{linkMap:c,handleOpen:d,copyLink:v,deleteRendition:h,deleteThumbnail:f,archiveItem:p,deleteItem:g,unArchiveItem:C,options:T}};function ws(e){const t=B(!1),n=B(!1),s=Y(()=>{var d;const u=e.value,c=!!u.readOnly;return{readOnly:c,disabled:!!u.disabled,hovered:n.value,focused:t.value,isEmpty:u.empty??!1,error:!!u.error,actived:!!((d=u.active)!=null&&d.value),clickable:c?!1:u.clickable??!1}}),o=()=>{t.value=!0,Ct(()=>{const u=l(e.value.inputRef);u==null||u.focus()})},i=()=>{t.value=!1},r=()=>{n.value=!0},a=()=>{n.value=!1},l=u=>{if(!u)return null;const c=u.value||u;return(c instanceof HTMLElement?c:c==null?void 0:c.$el)||null};return tn(()=>{const u=l(e.value.inputRef),c=l(e.value.wrapperRef);u&&(u.addEventListener("focus",o),u.addEventListener("blur",i)),c&&(c.addEventListener("mouseenter",r),c.addEventListener("mouseleave",a))}),vs(()=>{const u=l(e.value.inputRef),c=l(e.value.wrapperRef);u&&(u.removeEventListener("focus",o),u.removeEventListener("blur",i)),c&&(c.removeEventListener("mouseenter",r),c.removeEventListener("mouseleave",a))}),{isFocus:t,isHover:n,argsMain:s,handleFocus:o}}const Ac=e=>{const t=B(!1),n=Y(()=>t.value);return tn(()=>{var a,l,u,c;const s=(a=e.params)==null?void 0:a.api,o=(l=e.params)==null?void 0:l.node,i=o==null?void 0:o.rowIndex,r=(c=(u=e.params)==null?void 0:u.colDef)==null?void 0:c.field;return s==null||s.addEventListener("cellEditingStarted",d=>{d.rowIndex===i&&d.colDef.field===r&&(t.value=!0)}),s==null||s.addEventListener("cellEditingStopped",d=>{d.rowIndex===i&&d.colDef.field===r&&(t.value=!1)}),{isEditing:n}}),{isEditing:n}},$A=_t(rt({__name:"StatusBadge",props:{size:{default:16},color:{default:"#02C39A"},label:{default:""},status:{default:void 0},statusTooltip:{default:"Online"},showBadge:{type:Boolean,default:!0},loading:{type:Boolean}},setup(e){const t=To,{triggerRef:n,popupRef:s}=Fs({toggleOnClick:!0,trigger:"mouseenter focus",theme:"dark",placement:"right",arrow:!0}),o=Y(()=>{switch(i.status){case"active":return"#02C39A";case"offline":return"#808080";case"busy":return"#ff0000";case"away":return"#F7941D";default:return"transparent"}}),i=e;return(r,a)=>(j(),ce("div",{class:Q(r.$style["status-badge-wrapper"]),style:dn({"--badge-size":`${i.size}px`,"--badge-color":o.value})},[Tt(r.$slots,"default"),Ke(Ee("div",{class:Q(r.$style["badge-indicator"]),ref_key:"triggerRef",ref:n},null,2),[[Do,i.showBadge],[U(t),{isLoading:i.loading,fullwidth:!0}]]),Ee("div",{ref_key:"popupRef",ref:s,class:Q(r.$style["badge-tooltip"])},wt(i.statusTooltip),3)],6))}}),[["__cssModules",{$style:{"status-badge-wrapper":"_status-badge-wrapper_30ykl_1","badge-indicator":"_badge-indicator_30ykl_6",active:"_active_30ykl_19",offline:"_offline_30ykl_22",busy:"_busy_30ykl_25",away:"_away_30ykl_28","badge-tooltip":"_badge-tooltip_30ykl_32"}}]]),tf=Ql("switchStore",()=>{const e=B(null),t=En("switchInstance");return{openSceneHub:(o,i)=>{if(o){if(!t)throw console.error("Switch instance not found"),new Error("Switch instance not found");t("scene_hub",{id:o,commentId:i},{showLoading:!1})}},openPeopleInsight:o=>{const i=t||e.value;if(!i)throw console.error("Switch instance not found"),new Error("Switch instance not found");o||console.trace("No people_id provided, defaulting to empty string"),i("people_insight",{tab:"home",id:o||""},{showLoading:!1})},switchInstanceFunc:e}}),gY=rt({__name:"MiniPeopleCard",props:{user:{},status:{default:void 0},timezone:{default:cm()},userConfig:{default:()=>({size:96,isUseShortLabel:!0,bgColor:"#E0E0E0",color:"#757575",isMe:!1})},showInsightButton:{type:Boolean,default:!0},showCopyLinkButton:{type:Boolean,default:!0},apiUpdateFunction:{type:Function,default:void 0},refreshInterval:{default:3e4},enableAutoRefresh:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},private:{type:Boolean,default:!1}},emits:["insightClick","copyLink","dataUpdated"],setup(e,{emit:t}){const n=Xt,s=To,o=e,i=t,r={active:"Active in the workspace in the last 10 minutes.",offline:"Logged out from account.",busy:"User is busy",away:"No activity in the workspace within the last 10 minutes"},a=B(o.status),l=B(o.timezone),u=B(!0),c=B(null),d=Y(()=>r[a.value]),h=Y(()=>{var F;return(F=o.user)==null?void 0:F.name}),f=B(!1),p=B(new Date);let g;tn(async()=>{g=setInterval(()=>{p.value=new Date},6e4)}),Il(()=>{g&&clearInterval(g)});const v=Y(()=>{if(!l.value)return"";try{return p.value.toLocaleTimeString("en-US",{timeZone:l.value,hour:"numeric",minute:"2-digit",hour12:!0})}catch{return console.error("Invalid timezone:",l.value),""}}),C=async()=>{var F,k,O;if(o.apiUpdateFunction)try{const $=await o.apiUpdateFunction(o.user.id);if(!$){f.value=!0,console.error("No data returned from API");return}(F=$==null?void 0:$.private_info)!=null&&F.is_offline?a.value="offline":(k=$.private_info)!=null&&k.last_active?a.value="active":a.value="away",(O=$.private_info)!=null&&O.timezone&&(l.value=$.private_info.timezone),i("dataUpdated",$)}catch($){f.value=!0,console.error("Failed to fetch user data:",$)}finally{u.value=!1}},S=()=>{!o.apiUpdateFunction||!o.enableAutoRefresh||(c.value!==null&&clearInterval(c.value),c.value=setInterval(C,o.refreshInterval))},b=()=>{c.value!==null&&(clearInterval(c.value),c.value=null)},w=Y(()=>{const F=globalThis.location.origin,k=_n.getInstance().getItem("ws.code");return Ao({type:"people_insight",config:{ws_code:k,baseDomain:F,user_id:o.user.id}}).url}),{copyToClipboard:_,tooltip:R}=NF(w.value,()=>i("copyLink",o.user.id)),T=tf(),{openPeopleInsight:I}=T,x=F=>{if(F.ctrlKey||F.metaKey){window.open(w.value,"_blank");return}try{I(String(o.user.id))}catch{window.open(w.value,"_blank")}},P=F=>{x(F),i("insightClick",o.user.id)};nt([()=>o.enableAutoRefresh,()=>o.refreshInterval,()=>o.apiUpdateFunction],()=>{b(),o.enableAutoRefresh&&o.apiUpdateFunction&&S()}),tn(async()=>{o.apiUpdateFunction&&(await C(),S())}),vs(b);const D=Y(()=>({name:o.user.name,initial:o.user.initial,id:o.user.id,profile_image:o.user.profile_image,color:o.user.color,size:72,borderRadius:"20px"}));return(F,k)=>(j(),ce("div",{class:Q([F.$style["mini-people-card"],{[F.$style.loading]:u.value},"bg-skeleton"])},[Ee("div",{class:Q(F.$style["avatar-section"])},[!o.private&&!f.value?(j(),qe($A,{key:0,size:12,status:a.value,loading:u.value,"status-tooltip":d.value},{default:me(()=>[ge(Ih,nn({readOnly:!0},D.value,{borderRadius:"8px"}),null,16)]),_:1},8,["status","loading","status-tooltip"])):(j(),qe(Ih,nn({key:1,readOnly:!0},D.value,{borderRadius:"8px"}),null,16))],2),Ee("div",{class:Q(F.$style["user-info"])},[Ee("div",{class:Q(F.$style["info-column"])},[Ke((j(),ce("span",{class:Q(F.$style["user-name"])},[tt(wt(h.value),1)],2)),[[U(n),{content:h.value,delay:[1e3,0]}]]),l.value&&!f.value?(j(),ce("div",{key:0,class:Q([F.$style["info-row"],F.$style["time-row"]])},[Ke((j(),ce("div",{class:Q(F.$style["time-display"])},[ge(lt,{source:"remote",src:"Globe",class:Q(F.$style["clock-icon"]),size:"10"},null,8,["class"]),Ee("span",{class:Q(F.$style["time-text"])},wt(v.value)+" ("+wt(e.timezone)+")",3)],2)),[[U(s),{isLoading:u.value,fullwidth:!0}]])],2)):Je("",!0)],2),!e.readOnly&&!o.private&&!f.value?(j(),ce("div",{key:0,class:Q([F.$style["info-row"],F.$style.actions])},[e.showInsightButton?(j(),qe(mt,{key:0,label:"Insights",variant:"secondary",size:"small",onClick:Pt(P,["prevent","stop"]),disabled:o.disabled},null,8,["disabled"])):Je("",!0),e.showCopyLinkButton?Ke((j(),qe(mt,{key:1,variant:["icon","secondary"],size:"small","aria-label":"Copy link",onClick:Pt(U(_),["prevent","stop"]),disabled:o.disabled},{default:me(()=>[ge(lt,{source:"remote",src:"Link"})]),_:1},8,["onClick","disabled"])),[[U(n),{content:U(R),contentClass:["extra-padding"],hideOnClick:!1,delay:[300,0]}]]):Je("",!0)],2)):Je("",!0)],2)],2))}}),mY=_t(gY,[["__cssModules",{$style:{"mini-people-card":"_mini-people-card_8t908_1",loading:"_loading_8t908_25","avatar-section":"_avatar-section_8t908_28","user-info":"_user-info_8t908_33","info-column":"_info-column_8t908_42","info-row":"_info-row_8t908_50","time-row":"_time-row_8t908_56","time-display":"_time-display_8t908_62","time-text":"_time-text_8t908_70",actions:"_actions_8t908_79","status-badge":"_status-badge_8t908_83",active:"_active_8t908_96",offline:"_offline_8t908_99",busy:"_busy_8t908_102",away:"_away_8t908_105","user-local-time":"_user-local-time_8t908_108","clock-icon":"_clock-icon_8t908_116",separator:"_separator_8t908_128",timezone:"_timezone_8t908_131","refresh-btn":"_refresh-btn_8t908_134",spinning:"_spinning_8t908_137",spin:"_spin_8t908_137","insight-btn":"_insight-btn_8t908_140","copy-link-btn":"_copy-link-btn_8t908_144","last-update":"_last-update_8t908_147","user-name":"_user-name_8t908_153","loading-overlay":"_loading-overlay_8t908_166","loading-spinner":"_loading-spinner_8t908_178"}}]]),vY=_t(rt({name:"MoreOption",__name:"MoreOption",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e,{expose:t}){const n=Ur,s=Xt,o=e,{isEditing:i}=Ac(o),r=()=>{var h,f;const c=(h=o.params)==null?void 0:h.api,d={rowIndex:(f=c==null?void 0:c.getRowNode(String(o.id)))==null?void 0:f.rowIndex,colKey:"options"};c==null||c.startEditingCell(d)},a=Y(()=>{var d,h;const c=(h=(d=o.params)==null?void 0:d.api)==null?void 0:h.getRowNode(String(o.id));return((c==null?void 0:c.rowIndex)??0)+10}),l=()=>{var c,d;(d=(c=o.params)==null?void 0:c.api)==null||d.stopEditing()},u=B();return t({focus(){var c;(c=u.value)==null||c.focus()},blur(){var c;(c=u.value)==null||c.blur()}}),(c,d)=>Ke((j(),qe(mt,{class:Q(c.$style.btnMoreOptions),variant:["secondary","icon"],size:"small",actived:U(i),onClick:Pt(r,["stop"]),onEscape:l,ref_key:"buttonRef",ref:u},{default:me(()=>[ge(lt,{src:"EllipsisVertical",source:"remote"})]),_:1},8,["class","actived"])),[[U(s),"More actions"],[U(n),a.value]])}}),[["__cssModules",{$style:{btnMoreOptions:"_btnMoreOptions_w8s4g_1"}}]]),yY=["src","width","height","alt"],Pm=_t(rt({__name:"Visual",props:{src:{},source:{default:"remote"},size:{},minWidth:{},maxWidth:{},minHeight:{},maxHeight:{},color:{},ratio:{default:"1/1"}},setup(e){const t=To,{getCachedValue:n,setCachedValue:s}=Dh({dbName:"visual-cache-db",storeName:"visuals"}),o=h=>{if(h!==void 0)return typeof h=="number"?`${h}px`:typeof h=="string"&&/^\d+$/.test(h)?`${h}px`:h},i=e,r=Y(()=>({minWidth:o(i.minWidth),maxWidth:o(i.maxWidth),minHeight:o(i.minHeight),maxHeight:o(i.maxHeight),aspectRatio:i.ratio,width:o(i.size)})),a=async h=>{const f=await n(h);if(typeof f=="string")return f},l=async(h,f)=>{await s(h,f)},u=Y(()=>({name:i.src,size:Number(i.size||100),color:""})),{url:c,loading:d}=Z1(u,"visual",l,a);return(h,f)=>Ke((j(),ce("div",{class:Q([h.$style.visualWrapper,{[h.$style.loading]:U(d)}]),style:dn(r.value)},[Ee("img",{src:U(c),width:e.size,height:e.size,alt:"visual-"+e.src,style:dn(r.value)},null,12,yY)],6)),[[U(t),{isLoading:U(d),type:"skeleton",size:"cover",fullwidth:!0}]])}}),[["__cssModules",{$style:{visualWrapper:"_visualWrapper_lvp0k_1",loading:"_loading_lvp0k_8",pulse:"_pulse_lvp0k_1"}}]]),wY=["tabindex"],Cs=_t(rt({__name:"DisplayWrapper",props:{prefix:{},suffix:{},inputType:{},readOnly:{type:Boolean},disabled:{type:Boolean},hovered:{type:Boolean},focused:{type:Boolean},error:{type:Boolean},actived:{type:Boolean},clickable:{type:Boolean},size:{},bordered:{type:Boolean},tabIndex:{}},emits:["event","escape"],setup(e,{expose:t,emit:n}){const s=e,o=n;sg();const i=vg(),r=B(null),a=B("default"),l=Y(()=>{if(typeof s.size=="number")return`${s.size}px`;switch(s.size){case"small":return"32px";case"large":return"48px";case"default":default:return"32px"}}),u=Y(()=>`${Math.max(50,Math.round(Math.random()*100))}%`),c=Y(()=>({[i["display-wrapper"]]:!0,[i.disabled]:s.disabled,[i.readOnly]:s.readOnly,[i.error]:s.error,[i.clickable]:s.clickable,[i.active]:s.actived,[i.hovered]:s.hovered,[i.focused]:!s.readOnly&&!s.disabled&&s.focused,[i.bordered]:s.bordered})),d=()=>{var w,_;const g=((w=r.value)==null?void 0:w.querySelectorAll(":scope > .wrapper-prefix").length)||0,v=((_=r.value)==null?void 0:_.querySelectorAll(":scope > .wrapper-suffix").length)||0,C="var(--icon-size)",b=`calc(var(--gap-size) * ${g+v})`;return g&&!v?`repeat(${g}, ${C}) calc(100% - (${g} * ${C} + ${b}))`:!g&&v?`calc(100% - (${v} * ${C} + ${b})) repeat(${v}, ${C})`:g&&v?`repeat(${g}, ${C}) calc(100% - (${g} * ${C} + ${v} * ${C} + ${b})) repeat(${v}, ${C})`:"100%"},h=B("100%"),f=()=>{h.value=d()};th(()=>{f()}),tn(()=>{f()});const p=g=>{a.value=g};return t({rootEl:r,updateState:p,componentState:a,focus:()=>{Ct(()=>{var g;(g=r.value)==null||g.focus()})},escape:()=>{o("escape")}}),(g,v)=>(j(),ce("div",{ref_key:"rootEl",ref:r,class:Q([U(i)["display-wrapper"],c.value]),tabindex:e.tabIndex,style:dn({"--grid-template":h.value,"--wrapper-size":l.value,"--loading-overlay-width":u.value})},[Tt(g.$slots,"prefix",{hovered:s.hovered,focused:s.focused}),Tt(g.$slots,"default",{hovered:s.hovered,focused:s.focused,updateComponentState:p,disabled:s.disabled}),Tt(g.$slots,"suffix",{hovered:s.hovered,focused:s.focused})],14,wY))}}),[["__cssModules",{$style:{"display-wrapper":"_display-wrapper_11gbb_1",readOnly:"_readOnly_11gbb_26",bordered:"_bordered_11gbb_29",disabled:"_disabled_11gbb_29",active:"_active_11gbb_29",focused:"_focused_11gbb_29",hovered:"_hovered_11gbb_34",error:"_error_11gbb_38",clickable:"_clickable_11gbb_51",suffix:"_suffix_11gbb_57",prefix:"_prefix_11gbb_58"}}]]),CY=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const bY=Object.prototype.toString,SY=e=>bY.call(e)==="[object Object]",kc=()=>{};function EY(e,t){function n(...s){return new Promise((o,i)=>{Promise.resolve(e(()=>t.apply(this,s),{fn:t,thisArg:this,args:s})).then(o).catch(i)})}return n}function _Y(e,t={}){let n,s,o=kc;const i=l=>{clearTimeout(l),o(),o=kc};let r;return l=>{const u=Nr(e),c=Nr(t.maxWait);return n&&i(n),u<=0||c!==void 0&&c<=0?(s&&(i(s),s=void 0),Promise.resolve(l())):new Promise((d,h)=>{o=t.rejectOnCancel?h:d,r=l,c&&!s&&(s=setTimeout(()=>{n&&i(n),s=void 0,d(r())},c)),n=setTimeout(()=>{s&&i(s),s=void 0,d(l())},u)})}}function tS(e){return Array.isArray(e)?e:[e]}function RY(e,t=200,n={}){return EY(_Y(t,n),e)}function DY(e,t,n){return nt(e,t,{...n,immediate:!0})}const HA=CY?window:void 0;function nf(e){var t;const n=Nr(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function nS(...e){const t=(s,o,i,r)=>(s.addEventListener(o,i,r),()=>s.removeEventListener(o,i,r)),n=Y(()=>{const s=tS(Nr(e[0])).filter(o=>o!=null);return s.every(o=>typeof o!="string")?s:void 0});return DY(()=>{var s,o;return[(s=(o=n.value)===null||o===void 0?void 0:o.map(i=>nf(i)))!==null&&s!==void 0?s:[HA].filter(i=>i!=null),tS(Nr(n.value?e[1]:e[0])),tS(U(n.value?e[2]:e[1])),Nr(n.value?e[3]:e[2])]},([s,o,i,r],a,l)=>{if(!(s!=null&&s.length)||!(o!=null&&o.length)||!(i!=null&&i.length))return;const u=SY(r)?{...r}:r,c=s.flatMap(d=>o.flatMap(h=>i.map(f=>t(d,h,f,u))));l(()=>{c.forEach(d=>d())})},{flush:"post"})}function sS(e,t,n={}){const{window:s=HA,ignore:o=[],capture:i=!0,detectIframe:r=!1,controls:a=!1}=n;if(!s)return a?{stop:kc,cancel:kc,trigger:kc}:kc;let l=!0;const u=v=>Nr(o).some(C=>{if(typeof C=="string")return Array.from(s.document.querySelectorAll(C)).some(S=>S===v.target||v.composedPath().includes(S));{const S=nf(C);return S&&(v.target===S||v.composedPath().includes(S))}});function c(v){const C=Nr(v);return C&&C.$.subTree.shapeFlag===16}function d(v,C){const S=Nr(v),b=S.$.subTree&&S.$.subTree.children;return b==null||!Array.isArray(b)?!1:b.some(w=>w.el===C.target||C.composedPath().includes(w.el))}const h=v=>{const C=nf(e);if(v.target!=null&&!(!(C instanceof Element)&&c(e)&&d(e,v))&&!(!C||C===v.target||v.composedPath().includes(C))){if("detail"in v&&v.detail===0&&(l=!u(v)),!l){l=!0;return}t(v)}};let f=!1;const p=[nS(s,"click",v=>{f||(f=!0,setTimeout(()=>{f=!1},0),h(v))},{passive:!0,capture:i}),nS(s,"pointerdown",v=>{const C=nf(e);l=!u(v)&&!!(C&&!v.composedPath().includes(C))},{passive:!0}),r&&nS(s,"blur",v=>{setTimeout(()=>{var C;const S=nf(e);((C=s.document.activeElement)===null||C===void 0?void 0:C.tagName)==="IFRAME"&&!(S!=null&&S.contains(s.document.activeElement))&&t(v)},0)},{passive:!0})].filter(Boolean),g=()=>p.forEach(v=>v());return a?{stop:g,cancel:()=>{l=!1},trigger:v=>{l=!0,h(v),l=!1}}:g}const TY=["value","placeholder","disabled","readonly","inputmode","maxlength"],oS=_t(rt({__name:"InputText",props:{type:{default:"text"},autoEmit:{type:Boolean,default:!1},debounceDelay:{default:300},selectOnFocus:{type:Boolean,default:!1},submitOnEnter:{type:Boolean,default:!0},blurOnEscape:{type:Boolean,default:!0},maxDecimalChar:{},modelValue:{},placeholder:{},focused:{type:Boolean},validatorFnc:{},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{},bordered:{type:Boolean},focusIndex:{}},emits:["update:modelValue","input","clear","focus","blur","change","enterValue","enter","escape","cancel","tab","keydown","keyup","paste","cut","select","onValidation"],setup(e,{expose:t,emit:n}){const s=Ur,o=Xt,i=e,r=n,a=B(null),l=B(i.modelValue||"");nt(l,()=>{r("onValidation",l.value)});const u=B(!1),c=B(i.modelValue||"");nt(()=>i.modelValue,N=>{l.value=N||"",c.value=N||""});const d=Y(()=>{var N;return((N=l.value)==null?void 0:N.length)>0}),h={text:N=>N.slice(0,i.maxLength||255),number:N=>{let V=N.replace(/[^\d.-]/g,"");const ne=V.split(".");ne.length>2&&(V=ne[0]+"."+ne.slice(1).join("")),V=V.replace(/-/g,(W,fe)=>fe===0?W:"");const pe=V.startsWith("-")?"-":"",re=V.replace("-","").split(".");return re[0].length>17&&(re[0]=re[0].substring(0,17)),i.maxDecimalChar!==void 0&&re.length>1&&(re[1]=re[1].substring(0,i.maxDecimalChar)),V=pe+re.join("."),V},email:N=>N.replace(/\s/g,"").slice(0,i.maxLength||255),url:N=>N.replace(/\s/g,"").slice(0,i.maxLength||255),tel:N=>N.replace(/[^\d+\-() ]/g,"").slice(0,i.maxLength||20)},f=N=>{const V=h[i.type];return V?V(N):N},p=RY(N=>{i.autoEmit&&(r("update:modelValue",N),r("input",N))},i.debounceDelay),g=N=>{const V=N;if(i.disabled||i.readOnly){V.preventDefault();return}const ne=V.target,ie=ne.selectionStart||0,pe=l.value,ae=f(ne.value);pe!==ae&&(l.value=ae,r("input",ae),i.autoEmit&&p(ae),ne.value!==ae&&(ne.value=ae,Ct(()=>{let re=ie;if(ae.length<ne.value.length)re=ie;else{const W=ae.length-pe.length;re=ie+W}re=Math.max(0,Math.min(re,ae.length)),ne.setSelectionRange(re,re)})))},v=N=>{if(i.disabled||i.readOnly){N.preventDefault();return}u.value=!0;const V=l.value;l.value="",r("update:modelValue",""),r("clear"),V!==""&&r("change",""),N.preventDefault(),N.stopImmediatePropagation(),N.stopPropagation(),Ct(()=>{var ne;(ne=a.value)==null||ne.focus(),setTimeout(()=>{u.value=!1},100)})},C=N=>{i.disabled||i.readOnly||(r("focus",N),i.selectOnFocus&&Ct(()=>{N.target.select()}))},S=N=>{if(u.value)return;const ne=N.target.value;i.autoEmit||r("update:modelValue",ne),c.value!==ne&&(r("change",ne),c.value=ne),r("blur",ne,N)},b=N=>{setTimeout(()=>{Ct(()=>{const ne=N.target.value;r("enter",ne,N),r("enterValue",ne),i.submitOnEnter&&(N.preventDefault(),i.autoEmit||r("update:modelValue",ne),c.value!==ne&&(r("change",ne),c.value=ne))})},1e3)},w=N=>{const V=N.target,ne=V.value;if(r("escape",ne,N),N.preventDefault(),N.stopImmediatePropagation(),N.stopPropagation(),i.autoEmit){r("cancel"),i.blurOnEscape&&V.blur();return}l.value=i.modelValue||"",a.value&&(a.value.value=l.value),r("cancel"),i.blurOnEscape&&V.blur()},_=N=>{const ne=N.target.value;r("tab",ne,N),i.autoEmit||(r("update:modelValue",ne),c.value!==ne&&(r("change",ne),c.value=ne))},R=(N,V,ne)=>N===""?!0:N==="."?ne>0:new RegExp(`^\\d{0,${V}}(\\.\\d{0,${ne}})?$`).test(N),T=N=>{if(r("keydown",N),N.key===" "&&N.stopPropagation(),i.type==="number"){if(N.key==="e"||N.key==="E"){N.preventDefault();return}if(!(["Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Tab","Enter","Escape","Home","End"].includes(N.key)||N.ctrlKey||N.metaKey||N.altKey)){if(Number.isNaN(Number(N.key))&&N.key!=="."&&N.key!=="-"){N.preventDefault();return}const ie=l.value+N.key;if(!R(ie,17,i.maxDecimalChar||2)){N.preventDefault(),console.log("BLOCKED",ie);return}}}N.key==="Escape"?w(N):N.key==="Enter"?b(N):N.key==="Tab"?_(N):(N.key==="ArrowUp"||N.key==="ArrowDown")&&i.type==="number"&&N.preventDefault()},I=N=>{r("keyup",N)},x=N=>{if(i.disabled||i.readOnly){N.preventDefault();return}r("paste",N)},P=N=>{if(i.disabled||i.readOnly){N.preventDefault();return}r("cut",N)},D=N=>{r("select",N)},F=`input-text-${Math.random().toString(36).substr(2,9)}`,k=B(!1),O=Y(()=>{switch(i.type){case"number":return"decimal";case"email":return"email";case"tel":return"tel";case"url":return"url";default:return"text"}});nt(()=>l.value,N=>{i.validatorFnc?k.value=!!N&&!i.validatorFnc(N):k.value=!1});const $=B(null),q=Y(()=>({disabled:i.disabled,readOnly:i.readOnly,error:k.value,inputRef:a,clickable:!i.disabled&&!i.readOnly,focused:i.focused,wrapperRef:$,bordered:!0})),{argsMain:J,isHover:ee,isFocus:X}=ws(q);t({triggerFocus:()=>{Ct(()=>{var N;(N=a.value)==null||N.focus()})},focus:()=>{ve()},blur:()=>{Ct(()=>{var N;(N=a.value)==null||N.blur()})},select:()=>{Ct(()=>{var N;(N=a.value)==null||N.select()})},setSelectionRange:(N,V)=>{Ct(()=>{var ne;(ne=a.value)==null||ne.setSelectionRange(N,V)})},getValue:()=>l.value,setValue:N=>{l.value=f(N),a.value&&(a.value.value=l.value)},reset:()=>{l.value=i.modelValue||"",a.value&&(a.value.value=l.value)}});const ve=()=>{!i.disabled&&!i.readOnly&&Ct(()=>{var N;(N=a.value)==null||N.focus()})},te=Y(()=>X.value&&d.value);return(N,V)=>(j(),ce("div",{class:Q([N.$style["input-wrapper"],"input-editor"]),onClick:ve},[Ke((j(),qe(Cs,nn(U(J),{ref_key:"wrapperRef",ref:$,class:[N.$style["input-box"],{[N.$style["is-hovered"]]:U(ee),[N.$style["is-focused"]]:U(X),[N.$style["has-input"]]:d.value,[N.$style["is-editting"]]:te.value}],style:{"--icon-size":"20px","--gap-size":"4px"},bordered:i.bordered}),{prefix:me(()=>[Tt(N.$slots,"prefix")]),suffix:me(()=>[d.value&&!i.disabled&&!i.readOnly?Tt(N.$slots,"clear",{key:0},()=>[Ke((j(),qe(mt,{variant:["icon","tertiary"],"aria-label":"Clear search",onMousedown:Pt(v,["prevent","stop"]),size:18,rounded:!0,class:Q(["wrapper-suffix",N.$style["clear-button"]])},{default:me(()=>[ge(lt,{src:"CircleXMark",size:"20",color:"var(--primary-color)"})]),_:1},8,["class"])),[[U(o),{content:"Clear",contentClass:"extra-padding"}]])]):Tt(N.$slots,"suffix",{key:1})]),default:me(()=>[Ee("input",{tabindex:"-1",ref_key:"inputRef",ref:a,type:"text",value:l.value,placeholder:e.placeholder,class:Q([N.$style["column-config__input"]]),id:F,disabled:e.disabled,readonly:e.readOnly,inputmode:O.value,maxlength:i.maxLength,onInput:g,onFocus:C,onBlur:S,onKeydown:T,onKeyup:I,onPaste:x,onCut:P,onSelect:D},null,42,TY)]),_:3},16,["class","bordered"])),[[U(s),i.focusIndex]]),k.value?Tt(N.$slots,"error",{key:0}):Je("",!0)],2))}}),[["__cssModules",{$style:{"input-box":"_input-box_wqanj_1","is-disabled":"_is-disabled_wqanj_16","is-readonly":"_is-readonly_wqanj_16","is-hovered":"_is-hovered_wqanj_16","is-focused":"_is-focused_wqanj_20","column-config__input":"_column-config__input_wqanj_40","clear-button":"_clear-button_wqanj_55"}}]]),IY={class:"wrapper-prefix",style:{width:"18px",height:"18px"}},iS=rt({__name:"SearchBox",props:{modelValue:{default:""},placeholder:{default:"Search"},focused:{type:Boolean},validatorFnc:{},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{},bordered:{type:Boolean},focusIndex:{default:void 0}},emits:["update:modelValue","search","clear","cancel"],setup(e,{expose:t,emit:n}){const s=e,o=n,i=B(null),r=Ti(u=>{o("update:modelValue",u),o("search",u)},rr),a=()=>{o("update:modelValue",""),o("clear"),Ct(()=>{var u;(u=i.value)==null||u.focus()})},l=B(s.modelValue);return t({focus:()=>{var u;(u=i.value)==null||u.focus()},setValue(u){l.value=u}}),(u,c)=>(j(),qe(oS,{focusIndex:s.focusIndex,ref_key:"searchInput",ref:i,modelValue:l.value,"onUpdate:modelValue":c[0]||(c[0]=d=>l.value=d),type:"text",placeholder:e.placeholder,onInput:U(r),onClear:a,onCancel:c[1]||(c[1]=d=>o("cancel")),"auto-emit":!0},{prefix:me(()=>[Ee("div",IY,[ge(lt,{src:"MagnifyingGlass",color:"var(--grey-200)",size:"14"})])]),_:1},8,["focusIndex","modelValue","placeholder","onInput"]))}}),eu=_t(rt({name:"ListItem",directives:{tooltip:Xt},__name:"ListItem",props:{label:{},value:{},type:{},selected:{type:Boolean},disabled:{type:Boolean},hover:{type:Boolean},clickable:{type:Boolean,default:!0},danger:{type:Boolean},data:{},icon:{},readOnly:{type:Boolean,default:!1},show:{type:Boolean},focusIndex:{}},emits:["click","handleClick","keydown","update:selected","select","escape"],setup(e,{expose:t,emit:n}){const s=e,o=n,i=B(!1),r=B(!1);function a(w){if(!w||typeof w!="object")return!1;const _=w;return typeof _.name=="string"&&typeof _.id=="string"&&typeof _.initial=="string"}const l=Y(()=>s.type==="status"||s.type==="assignee"||s.type==="icon"||!!b.prefix),u=Y(()=>!!b.suffix||s.danger&&i.value),c=Y(()=>{var w;return s.type==="status"&&typeof((w=s.data)==null?void 0:w.color)=="string"?{backgroundColor:s.data.color,border:Lg(s.data.color,"white")?"1px solid #ccc":"1px solid #fff"}:{}}),d=vg(),h=Y(()=>({[d.active]:s.selected??!1,[d.disabled]:s.disabled??!1,[d.hover]:s.hover??!1,[d.clickable]:(s.clickable??!0)&&!s.disabled,[d.danger]:s.danger??!1,[d["has-prefix"]]:l.value,[d["has-suffix"]]:u.value,[d.readOnly]:s.readOnly}));Y(()=>({content:"Cancel",...S})),Y(()=>({content:"Confirm",theme:"warning",...S}));function f(w){return{name:w.name,initial:w.initial,id:w.id,profile_image:w.profile_image??null,color:w.color,size:24}}function p(){i.value=!1}function g(w){w?o("click",w):(s.clickable??!0)&&(o("update:selected",!s.selected),o("select",!s.selected))}function v(w){if(!s.disabled){if(s.danger&&!i.value){i.value=!0;return}else s.danger||g(w);o("handleClick",w)}}const C=()=>{i.value?p():o("escape")},S=Object.freeze({delay:[300,0],contentClass:["extra-padding"]}),b=sg();return nt(()=>s.show,w=>{w===!1&&(i.value=!1)}),t({select:()=>{v(new MouseEvent("click",{bubbles:!0,cancelable:!0}))}}),(w,_)=>{const R=Eo("focusable"),T=Eo("tooltip");return Ke((j(),qe(mt,{variant:["menu-item",e.danger?"danger":"menu-item"],class:Q([w.$style["list-item"],h.value]),onHandleClick:v,onMouseenter:_[0]||(_[0]=I=>r.value=!0),onMouseleave:_[1]||(_[1]=I=>r.value=!1),onEscape:C,style:{width:"200px"}},{default:me(()=>[l.value?(j(),ce("div",{key:0,class:Q(w.$style["list-item__prefix"])},[Tt(w.$slots,"prefix",{},()=>[e.type==="icon"&&e.icon?(j(),qe(lt,{key:0,src:e.icon,source:"remote",class:Q(w.$style["item-icon"]),color:s.danger?void 0:"#a6a6a6"},null,8,["src","class","color"])):e.type==="status"?(j(),ce("div",{key:1,class:Q(w.$style["status-indicator"]),style:dn(c.value)},null,6)):e.type==="assignee"&&a(e.data)?(j(),qe(Ih,nn({key:2},f(e.data),{class:w.$style["item-avatar"],readOnly:!0}),null,16,["class"])):Je("",!0)])],2)):Je("",!0),Ee("div",{class:Q(w.$style["list-item__label"])},[Tt(w.$slots,"label",{selected:e.selected},()=>[tt(wt(e.label),1)])],2),u.value?(j(),ce("div",{key:1,class:Q(w.$style["list-item__suffix"])},[Tt(w.$slots,"suffix",{item:w.$props,hovered:r.value},()=>[e.danger&&i.value?(j(),ce("div",{key:0,class:Q(w.$style["confirm-action"])},[Ke((j(),qe(mt,{variant:["tertiary","icon","danger"],size:"small",onClick:Pt(p,["stop","prevent"])},{default:me(()=>[ge(lt,{src:"Xmark",source:"remote"})]),_:1})),[[R,`${s.focusIndex}.0`],[T,{content:"Cancel ",delay:[300,0],contentClass:["extra-padding"]}]]),Ke((j(),qe(mt,{variant:["danger","primary","icon"],size:"small",onClick:Pt(g,["stop","prevent"])},{default:me(()=>[ge(lt,{src:"Check",source:"remote"})]),_:1})),[[R,`${s.focusIndex}.1`],[T,{delay:[300,0],contentClass:["extra-padding"],content:"Confirm ",theme:"warning"}]])],2)):Je("",!0)])],2)):Je("",!0)]),_:3},8,["variant","class"])),[[R,s.focusIndex]])}}}),[["__cssModules",{$style:{"list-item":"_list-item_y7vz1_1",disabled:"_disabled_y7vz1_16",danger:"_danger_y7vz1_23","has-prefix":"_has-prefix_y7vz1_26","has-suffix":"_has-suffix_y7vz1_26",clickable:"_clickable_y7vz1_40",readOnly:"_readOnly_y7vz1_43",hover:"_hover_y7vz1_47",active:"_active_y7vz1_53","list-item__prefix":"_list-item__prefix_y7vz1_78","list-item__label":"_list-item__label_y7vz1_86","list-item__suffix":"_list-item__suffix_y7vz1_100","status-indicator":"_status-indicator_y7vz1_107","item-icon":"_item-icon_y7vz1_113","arbo-icon-state":"_arbo-icon-state_y7vz1_118","item-avatar":"_item-avatar_y7vz1_121","confirm-action":"_confirm-action_y7vz1_130"}}]]),xY=["aria-activedescendant"],FY=["innerHTML"],PY=10,Jr=_t(rt({__name:"SearchList",props:{options:{default:()=>[]},selectedId:{},loading:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},hasMore:{type:Boolean,default:!1},error:{default:null},params:{},maxHeight:{default:"218px"},width:{default:"250px"},minQueryLength:{default:0}},emits:["select","close","search","loadMore","cancel","tab"],setup(e,{expose:t,emit:n}){const s=Xt,o={ARROW_DOWN:"ArrowDown",ARROW_UP:"ArrowUp",ENTER:"Enter",ESCAPE:"Escape",TAB:"Tab"},i=e,r=n,a=B(""),l=B(-1),u=B(null),c=B(null),d=B(new Map),h=Y(()=>Cb(a.value)),f=()=>{const te=h.value;if(!te||te.length<i.minQueryLength)return i.options;if(d.value.has(te))return d.value.get(te);const N=i.options.map(V=>({item:V,score:T7(` ${V.label} `,te)})).filter(({score:V})=>V>0).sort((V,ne)=>ne.score-V.score).map(({item:V})=>V);return d.value.set(te,N),N},p=B([]);nt(()=>i.options,()=>{p.value=f()},{immediate:!0,deep:!0});const g=Y(()=>i.hasMore&&!i.loading&&!i.loadingMore),v=Ti(te=>{a.value=te,l.value=-1,r("search",te)},rr),C=async te=>{X.value=0,await v(te||""),X.value=1},S=te=>a.value?I7(te,a.value):te,b=te=>{const V={[o.ARROW_DOWN]:()=>w(te),[o.ARROW_UP]:()=>_(te),[o.ENTER]:()=>I(te),[o.ESCAPE]:()=>x(te),[o.TAB]:()=>P(te)}[te.key];V&&V()},w=te=>{te.preventDefault(),R(1)},_=te=>{te.preventDefault(),R(-1)},R=te=>{const N=p.value.length;if(N===0)return;let V;te>0?V=(l.value+1)%N:l.value>0?V=l.value-1:V=N-1,l.value=V,T()},T=()=>{Ct(()=>{var N;const te=(N=c.value)==null?void 0:N.querySelectorAll('[role="menuitem"]')[l.value];te==null||te.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})},I=te=>{if(te.preventDefault(),l.value>=0&&l.value<p.value.length){const V=p.value[l.value];D(V,te)}},x=te=>{te.preventDefault(),k()},P=te=>{r("tab",te)},D=(te,N)=>{!te||te.disabled||(r("select",te,N),l.value=-1,k())},F=te=>{te>=0&&te<p.value.length&&(l.value=te)},k=()=>{r("close")},O=()=>{if(!g.value||!c.value)return;const{scrollTop:te,clientHeight:N,scrollHeight:V}=c.value;V-(te+N)<=PY&&r("loadMore")},$=()=>{var te,N,V;(te=c.value)==null||te.addEventListener("scroll",O),(V=(N=ee.value)==null?void 0:N.$el)==null||V.addEventListener("keydown",b)},q=()=>{var te,N,V;(te=c.value)==null||te.removeEventListener("scroll",O),(V=(N=ee.value)==null?void 0:N.$el)==null||V.removeEventListener("keydown",b)};tn(()=>{$()}),vs(()=>{q()}),nt(()=>i.loading,te=>{!te&&p.value.length>0&&(l.value=-1)});const J=te=>te?Array.isArray(i.selectedId)?i.selectedId.includes(String(te.id)):i.selectedId==te.id:!1,ee=B(null);nt(l,()=>{T()}),t({focus:()=>{Ct(()=>{var te;(te=ee.value)==null||te.focus()})},reset:()=>{var te;(te=ee.value)==null||te.focus(),l.value=-1},query:a,filteredOptions:p,selectedIndex:l,closeDropdown:k,clearSearch:()=>{a.value=""},scrollTo:te=>{c.value&&(c.value.scrollTop=te)},selectIndex:te=>{te>=0&&te<p.value.length&&(l.value=te,T())}});const X=B(0);nt([()=>i.loading,()=>a.value,()=>i.options,()=>i.loadingMore],()=>{const te=i.options.length>0&&p.value.length>0,N=!te&&a.value.length>0,V=!te&&a.value.length===0;i.loading?X.value=0:te?X.value=1:N?X.value=2:V&&(X.value=3)},{immediate:!0,deep:!0});const ve=()=>{r("cancel")};return(te,N)=>(j(),ce("datalist",{ref_key:"searchListRef",ref:u,class:Q([te.$style["search-list"],X.value===3||X.value===2?te.$style.empty:"",p.value.length>8?te.$style.scrollable:""]),"aria-activedescendant":l.value>=0?`item-${l.value}`:void 0,style:dn({width:e.width})},[ge(iS,{ref_key:"searchBoxRef",ref:ee,modelValue:a.value,"onUpdate:modelValue":N[0]||(N[0]=V=>a.value=V),class:Q(te.$style["search-box"]),disabled:e.loading,onSearch:C,onClear:N[1]||(N[1]=V=>C("")),onCancel:ve},null,8,["modelValue","class","disabled"]),Ee("div",{ref_key:"popupRef",ref:c,class:Q(te.$style["list-container"])},[Tt(te.$slots,"extra-item",{query:a.value,isEmpty:X.value===3||X.value===2,isLoading:i.loading}),(j(!0),ce(xt,null,xn(p.value,(V,ne)=>Ke((j(),ce("div",{key:`${V.id}-${ne}`,role:"menuitem"},[Tt(te.$slots,"item",{item:V,index:ne,selectedIndex:l.value,isSelected:J,handleSelect:D,handleItemHover:F,getHighlightedLabel:S,query:a.value,idx:ne,focused:l.value==ne},()=>[V.hide?Je("",!0):(j(),qe(eu,nn({key:0,ref_for:!0},V,{hover:ne===l.value,selected:J(V),type:V.type,id:`item-${ne}`,"aria-selected":ne===l.value,onClick:ie=>D(V,ie),onMouseover:ie=>F(ne),onEscape:k}),{prefix:me(()=>[Tt(te.$slots,"prefix-item",{item:V})]),label:me(()=>[a.value?Ke((j(),ce("span",{key:0,class:Q(te.$style.match),innerHTML:S(V.label)},null,10,FY)),[[U(s),{content:V.label,delay:[1e3,0]}]]):Ke((j(),ce("span",{key:1,class:Q(te.$style["item-label"])},[tt(wt(V.label),1)],2)),[[U(s),{content:V.label,delay:[1e3,0]}]])]),suffix:me(({hovered:ie})=>[Tt(te.$slots,"action",{item:V,isHovered:ne===l.value,hovered:ie,selected:l.value==ne})]),_:2},1040,["hover","selected","type","id","aria-selected","onClick","onMouseover"]))])])),[[Do,X.value===1]])),128)),X.value===0?Tt(te.$slots,"loading-more",{key:0},()=>[(j(),ce(xt,null,xn(8,V=>Ee("div",{class:Q(te.$style["loading-more"]),key:V},[Ee("div",{class:Q(te.$style["loading-skeleton"])},null,2),Ee("div",{class:Q(te.$style["loading-skeleton"])},null,2)],2)),64))]):Je("",!0),X.value===2?(j(),ce("div",{key:1,class:Q(te.$style["no-results"])},[Tt(te.$slots,"empty",{query:a.value},()=>[Ee("div",{class:Q(te.$style["no-results-content"])},[...N[2]||(N[2]=[Ee("div",null,[tt(" No results. "),Ee("br"),tt(" Try another search. ")],-1)])],2)])],2)):Je("",!0),X.value===3?(j(),ce("div",{key:2,class:Q(te.$style["no-results"])},[Tt(te.$slots,"empty-list",{},()=>[Ee("div",{class:Q(te.$style["no-results-content"])},[...N[3]||(N[3]=[Ee("div",null,"No items available.",-1)])],2)])],2)):Je("",!0),Tt(te.$slots,"footer")],2)],14,xY))}}),[["__cssModules",{$style:{"search-list":"_search-list_1rcj9_1",empty:"_empty_1rcj9_11",scrollable:"_scrollable_1rcj9_17","list-container":"_list-container_1rcj9_24","item-label":"_item-label_1rcj9_45","loading-state":"_loading-state_1rcj9_53","loading-more":"_loading-more_1rcj9_54","loading-skeleton":"_loading-skeleton_1rcj9_65","is-loading":"_is-loading_1rcj9_72","no-results":"_no-results_1rcj9_127","no-results-content":"_no-results-content_1rcj9_134",title:"_title_1rcj9_137",tips:"_tips_1rcj9_143",match:"_match_1rcj9_157","skeleton-loading":"_skeleton-loading_1rcj9_1"}}]]),Oc=rt({__name:"AvatarProfile",props:{user:{},showProfile:{type:Boolean,default:!0},apiUpdateFunction:{},appendTo:{}},setup(e){const t=gz,n=e,s=B(n.appendTo||void 0),o=()=>({user:n.showProfile?n.user:void 0,placement:"bottom-start",showInsightButton:!0,showCopyLinkButton:!0,apiUpdateFunction:n.apiUpdateFunction,appendTo:s.value}),i=B(o());nt(()=>n,()=>{setTimeout(()=>{Ct(()=>{s.value=n.appendTo||void 0,i.value=o()})},50)},{immediate:!0,deep:!0});const r=Y(()=>({id:n.user.id,name:n.user.name,profile_image:n.user.profile_image,color:n.user.color,initial:n.user.initial}));return(a,l)=>Ke((j(),qe(Ih,iR(Lw(r.value)),null,16)),[[U(t),i.value]])}}),AY={class:"avatar-wrapper"},kY={class:"assignee-label"},GA=_t(rt({__name:"AssigneeItem",props:{user:{},hover:{type:Boolean},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},multipleSelect:{type:Boolean,default:!1},isMe:{type:Boolean},appendTo:{},apiUpdateFunction:{}},emits:["select","deselect","reselect"],setup(e,{emit:t}){const n=Xt,s=e,o=Y(()=>({name:s.user.name,id:s.user.id,profile_image:s.user.profile_image,color:{bgColor:s.user.color.bgColor,textColor:s.user.color.textColor},initial:s.user.initial})),i=Y(()=>s.isMe),r=sg(),a=Y(()=>{if(!l.value&&!s.hover&&!s.focused||!r.actions)return 0;let u=0;const c=d=>{d.forEach(h=>{h.type===xt&&Array.isArray(h.children)?c(h.children):h.type!==qn&&h.type!==Ra&&u++})};return c(r.actions()),u}),l=B(!1);return(u,c)=>(j(),ce("div",{class:Q(["assignee-selector-item",{hovered:l.value||s.hover,disabled:s.disabled,selected:s.selected,single:a.value==0,focused:s.focused}]),style:dn({"--actions-count":a.value}),onMouseenter:c[0]||(c[0]=d=>l.value=!0),onMouseleave:c[1]||(c[1]=d=>l.value=!1)},[Ee("div",AY,[ge(Oc,{user:o.value,"show-profile":!0,isMe:i.value,"append-to":s.appendTo,"api-update-function":s.apiUpdateFunction},null,8,["user","isMe","append-to","api-update-function"]),s.multipleSelect?(j(),ce("div",{key:0,class:Q(["avatar-indicator",[s.selected?"remove":"add"]])},[s.selected?(j(),qe(lt,{key:0,src:"CircleXMark"})):(j(),qe(lt,{key:1,src:"CirclePlus"}))],2)):Je("",!0)]),Ke((j(),ce("div",kY,[Tt(u.$slots,"name",{},()=>[tt(wt(s.user.name),1)],!0)])),[[U(n),{content:s.user.name,delay:[1e3,0]}]]),l.value||s.hover||s.focused?Tt(u.$slots,"actions",{key:0},void 0,!0):Je("",!0)],38))}}),[["__scopeId","data-v-690cf591"]]),OY={class:"unassign-icon"},rS=_t(rt({__name:"UnassignBtn",props:{actived:{type:Boolean,default:!1},label:{default:"No assignee"},borderLeft:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t,s=()=>{n("click")};return(o,i)=>(j(),qe(U(mt),{variant:"menu-item",onClick:s,actived:e.actived,style:dn({"border-top-width":0,"border-bottom-width":0,"border-left-width":e.borderLeft?"4px":"0"})},{prefix:me(()=>[Ee("div",OY,[Tt(o.$slots,"icon",{},()=>[i[0]||(i[0]=Ee("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M2.17953 2.75285C1.98276 2.5977 1.69706 2.63365 1.54191 2.83042C1.38677 3.0272 1.42271 3.3129 1.61949 3.46805L12.8204 12.2471C13.0172 12.4023 13.3029 12.3663 13.458 12.1696C13.6132 11.9728 13.5772 11.6871 13.3805 11.532L8.13003 7.41675C9.16308 7.14051 9.9218 6.19827 9.9218 5.07818C9.9218 3.7405 8.83765 2.65636 7.49997 2.65636C6.17932 2.65636 5.10653 3.71212 5.07815 5.0252L2.17953 2.75285ZM6.4461 8.41386C4.67136 8.51035 3.26179 9.98237 3.26179 11.7817C3.26179 12.092 3.51343 12.3436 3.82372 12.3436H11.1762C11.25 12.3436 11.32 12.3304 11.3843 12.3039L6.4461 8.41386Z",fill:"#a6a6a6"})],-1))],!0)])]),default:me(()=>[Tt(o.$slots,"label",{},()=>[tt(wt(e.label),1)],!0)]),_:3},8,["actived","style"]))}}),[["__scopeId","data-v-ec3b3a15"]]),MY=["innerHTML"],NY=20,UA=_t(rt({__name:"AssigneeGroupEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},ids:{}},emits:["updated","cancel","update-start","update-failed","update-completed"],setup(e,{expose:t,emit:n}){const s=Xt,o=e,{id:i}=Up(o),r=n,a=V=>{var ie,pe;const ne=(pe=(ie=o.params)==null?void 0:ie.api)==null?void 0:pe.getRowNode(String(i.value));ne==null||ne.setDataValue("assignees",$I(V.assignees)),N("updated",V),console.log("Row data updated with new assignees:",V.assignees)},l=B(!1),u=B(!1),c=B(null),d=B(1),h=B(!0),f=B(0),p=B(""),g=En("bulkUpdate",B(!1)),v=En("isSelectAll",B(!1)),{unAssignAll:C,replaceAssignees:S,handleSelect:b,assigneeList:w,mergedOptions:_,selectedUserIds:R}=mm({...o,entityId:o.entityId,updateRowData:a,value:o.value,isBulkUpdate:g,isSelectAll:v,errorCallback:()=>{N("update-failed")}}),{apiServices:T}=ts(!g.value,o),I=En("workspaceId"),x=async(V=1,ne="",ie=!1)=>{var pe,ae,re,W,fe;if(!T.value||!o.id&&!o.ids)throw console.error("API service or item identifiers are undefined",T.value,o.id,o.ids),new Error("API service or item identifiers are undefined");if(ie?u.value=!0:l.value=!0,c.value=null,!((pe=T.value)!=null&&pe.multipleAssignableUser))throw new Error("API service getAssignableUsers is undefined");try{const oe=await((ae=T.value)==null?void 0:ae.multipleAssignableUser({workspaceId:String(I),itemIds:(o.ids??(o.id?[o.id]:[])).map(String),page:V,perPage:NY,q:ne.trim()})),Ie=((re=Ec(oe.data))==null?void 0:re.map(gm))??[];w.value=ie?uc(w.value,Ie,"id"):Ie,f.value=oe.meta.total,h.value=(((W=oe==null?void 0:oe.meta)==null?void 0:W.current_page)||0)<(((fe=oe==null?void 0:oe.meta)==null?void 0:fe.last_page)||0),d.value=V}catch(oe){console.error("Error fetching assignable users:",oe),c.value="Failed to load assignable users"}finally{l.value=!1,u.value=!1}},P=()=>{!u.value&&h.value&&x(d.value+1,p.value,!0)},D=Ti(async V=>{p.value=V,await x(1,V,!1)},rr),F=()=>x(1,p.value,!1);tn(()=>{var V;(V=O.value)==null||V.focus()}),t({getValue:()=>{var V;return(V=_.value.find(ne=>ne.selected))==null?void 0:V.value},refresh:F,clearInternal:()=>{R.value=[]},focus:()=>{var V;(V=O.value)==null||V.focus()}});const k=()=>{const V=_n.getInstance().getItem("BASE_URL"),ne=Ao({type:"access_setting",config:{baseDomain:V,ws_code:o.workspaceId,entity_id:I}}).url;window.open(ne,"_blank")},O=B(null);tn(()=>{Ct(()=>{var V;(V=O.value)==null||V.focus()})}),nt([()=>o.id,()=>o.workspaceId,()=>o.ids],()=>{x()},{deep:!0,immediate:!0});const $=V=>{var ie;const ne=_n.getInstance().getItem("ws.code");return((ie=T.value)==null?void 0:ie.getUserInformation(ne,V))||Promise.resolve(null)},q=async(V,ne,ie)=>{ne.preventDefault(),ne.stopPropagation(),ne.stopImmediatePropagation(),N("update-start");try{const pe=await b(V)}catch(pe){N("update-failed"),console.error("Error updating assignees:",pe)}finally{N("update-completed")}},J=async()=>{try{N("update-start");const V=await C()}catch(V){N("update-failed"),console.error("Error unassigning all assignees:",V)}finally{N("update-completed")}},ee=async V=>{try{N("update-start");const ne=await S(V)}catch(ne){N("update-failed"),console.error("Error replacing assignees:",ne)}finally{N("update-completed")}},X=()=>{var V,ne;r("cancel"),(ne=(V=o.params)==null?void 0:V.api)==null||ne.stopEditing()};Zi("popupAttachRef",O);const ve=B(),te=B(!1),N=(V,ne)=>{switch(V){case"updated":console.log("Emitting updated event with params:",ne),r("updated",ne);break;case"update-start":r("update-start");break;case"update-failed":r("update-failed");break;case"update-completed":r("update-completed");break}};return tn(()=>{Ct(()=>{setTimeout(()=>{te.value=!0},50)})}),(V,ne)=>(j(),ce("div",{class:"assigne-editor-wrapper",ref_key:"wrapperRef",ref:ve},[ge(Jr,nn({"selected-id":U(R)},{...o},{options:U(_),loading:l.value,ref_key:"popupRef",ref:O,"loading-more":u.value,"has-more":h.value,onSelect:ne[0]||(ne[0]=(ie,pe)=>{q(ie,pe)}),"data-wrapper":"true",onSearch:U(D),onLoadMore:P,onCancel:X,onClose:X}),nh({"extra-item":me(({isEmpty:ie,isLoading:pe})=>[!ie&&!pe?(j(),qe(rS,{key:0,onClick:J,actived:!1,label:"Unassign"},{icon:me(()=>[ge(lt,{src:"UserXMark",source:"remote"})]),_:1})):Je("",!0)]),item:me(({item:ie,selectedIndex:pe,isSelected:ae,handleItemHover:re,getHighlightedLabel:W,query:fe,idx:oe,focused:Ie})=>[ge(GA,{user:ie.data,"multiple-select":!0,"append-to":ve.value,isMe:!1,hover:oe===pe,selected:ae(ie),focused:Ie,onClick:Pt(G=>q(ie,G,"click"),["stop","prevent"]),onMouseover:G=>re(oe),"api-update-function":$},{name:me(()=>[fe?Ke((j(),ce("span",{key:0,class:Q([V.$style["item-label"],V.$style.match]),style:{flex:"1"},innerHTML:W(ie.label)},null,10,MY)),[[U(s),{content:ie.label}]]):Ke((j(),ce("span",{key:1,class:Q(V.$style["item-label"]),style:{flex:"1"}},[tt(wt(ie.label),1)],2)),[[U(s),{content:ie.label}]])]),actions:me(()=>[Ke((j(),qe(mt,{tabindex:-1,variant:["secondary","icon"],size:"small",label:"",onClick:Pt(G=>{var Z;return ee((Z=ie.data)==null?void 0:Z.id)},["stop"])},{default:me(()=>[ge(lt,{src:"PeopleArrows"})]),_:1},8,["onClick"])),[[U(s),"Unassign others and reassign"]])]),_:2},1032,["user","append-to","hover","selected","focused","onClick","onMouseover"])]),"empty-list":me(()=>[Ee("div",{class:Q(V.$style["empty-state"])},[ne[3]||(ne[3]=tt(" No assignee available. ",-1)),ne[4]||(ne[4]=Ee("br",null,null,-1)),ge(mt,{onClick:k,variant:["tertiary"],size:"small"},{default:me(()=>[...ne[2]||(ne[2]=[tt(" Go to Access Settings to add team. ",-1)])]),_:1})],2)]),_:2},[c.value?{name:"error",fn:me(()=>[Ee("div",{class:Q(V.$style["error-message"])},[tt(wt(c.value)+" ",1),ge(mt,{onClick:F,size:"small"},{default:me(()=>[...ne[1]||(ne[1]=[tt(" Retry ",-1)])]),_:1})],2)]),key:"0"}:void 0]),1040,["selected-id","options","loading","loading-more","has-more","onSearch"])],512))}}),[["__cssModules",{$style:{action:"_action_nv6on_1","item-assignee":"_item-assignee_nv6on_6","item-action":"_item-action_nv6on_6","item-label":"_item-label_nv6on_16","error-message":"_error-message_nv6on_25","empty-state":"_empty-state_nv6on_35","skeleton-avatar":"_skeleton-avatar_nv6on_48"}}]]),LY={class:"inner"},sf=_t(rt({__name:"BulkUpdateBtnWrapper",props:{isUpdating:{type:Boolean,default:!1},disabled:{type:Boolean}},emits:["onVisibleChange"],setup(e,{expose:t,emit:n}){const s=e,o=B(null),{triggerRef:i,popupRef:r,isVisible:a,hide:l,toggle:u,show:c}=Fs({toggleOnClick:!0,zIndex:2,disabled:s.disabled,placement:"top",appendTo:o.value||void 0}),d=B(null),h=p=>{p.key==="Escape"&&r.value&&l()};tn(()=>{var g;const p=d.value instanceof HTMLElement?d.value:(g=d.value)==null?void 0:g.$el;p&&p.addEventListener("keydown",h)}),vs(()=>{var g;const p=d.value instanceof HTMLElement?d.value:(g=d.value)==null?void 0:g.$el;p&&p.removeEventListener("keydown",h)});const f=n;return nt(()=>a.value,(p,g)=>{f("onVisibleChange",p,g)}),t({hide:l,isVisible:a,open:c}),(p,g)=>(j(),ce("div",{class:"bulk-update-btn-wrapper",ref_key:"containerRef",ref:o},[Ee("div",{class:"trigger-slot",ref_key:"triggerRef",ref:i},[Tt(p.$slots,"trigger",{isVisible:U(a),hide:U(l),disabled:s.isUpdating||s.disabled,popupRef:U(r),triggerRef:U(i),toggle:U(u)},void 0,!0)],512),Ee("div",{class:"popup-slot",ref_key:"popupRef",ref:r},[Ke(Ee("div",LY,[Tt(p.$slots,"popup",{isVisible:U(a),hide:U(l),popupRef:U(r),triggerRef:U(i),toggle:U(u),open:U(c)},void 0,!0)],512),[[Do,!s.isUpdating&&!s.disabled]])],512)],512))}}),[["__scopeId","data-v-97100c8a"]]),VY=rt({__name:"AssignneeUpdateButton",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},ids:{},variant:{}},emits:["update","update-start","update-completed","update-failed"],setup(e,{emit:t}){const n=e;Zi("bulkUpdate",!0);const s=B(!1),o=t,i=B(null),r=()=>{s.value=!0,o("update-start")},a=d=>{setTimeout(()=>{var h,f,p;s.value=!1,(h=l.value)==null||h.hide(),d?(o("update-completed"),(f=l.value)==null||f.hide()):(o("update-failed"),(p=l.value)==null||p.open())},300)},l=B(null),u=d=>{var h;console.log("Updating assignees with params:",d),o("update",d),(h=i.value)==null||h.clearInternal()},c=(d,h)=>{Ct(()=>{var f,p;d?(f=i.value)==null||f.focus():(p=i.value)==null||p.clearInternal()})};return(d,h)=>(j(),qe(sf,{ref_key:"wrapperRef",ref:l,isUpdating:s.value,disabled:n.disabled||s.value,onOnVisibleChange:c},{trigger:me(({hide:f,disabled:p})=>[ge(mt,{variant:n.variant,loading:s.value,disabled:p,onEscape:f},{default:me(()=>[ge(lt,{src:"UserPlus",class:"icon"}),h[2]||(h[2]=tt(" Assignee ",-1))]),_:1},8,["variant","loading","disabled","onEscape"])]),popup:me(({hide:f})=>[ge(UA,nn({ref_key:"assigneeGroupEditorRef",ref:i},n,{ids:e.ids,onUpdated:u,onUpdateStart:r,onUpdateFailed:h[0]||(h[0]=p=>a(!1)),onUpdateCompleted:h[1]||(h[1]=p=>a(!0)),onCancel:f}),null,16,["ids","onCancel"])]),default:me(()=>[h[3]||(h[3]=tt(" > ",-1))]),_:1},8,["isUpdating","disabled"]))}}),of=["start-input","due-input","prev-btn","month-btn","year-btn","next-btn","month-selection","year-selection","date-selection","today-btn","cancel-btn","save-btn"],BY=new Set(["Tab","Enter","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),Ga=(e,t)=>{const n=s=>{var o,i;if(s.key==="Tab"){const r=s.shiftKey||s.metaKey;s.preventDefault(),s.stopImmediatePropagation(),s.stopPropagation();const a=document.activeElement,l=(o=a==null?void 0:a.dataset)==null?void 0:o.index;if(l){let u=of.indexOf(l);const c=r?-1:1;for(const d of of){u=(u+c+of.length)%of.length;const h=of[u],f=document.querySelector(`[data-index="${h}"]`);if(f){f.focus();return}}}}else if(s.key==="Enter")(i=s.target)==null||i.dispatchEvent(new MouseEvent("click",{bubbles:!0}));else if(s.key==="Escape"){s.stopPropagation(),s.stopImmediatePropagation();const r=document.querySelector('[data-index="calendar-wrapper"]');r==null||r.focus()}};if(BY.has(e.key))e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),n(e),t&&t(e);else return},$Y=["aria-label"],HY=["disabled","readOnly","aria-label","data-date","data-weekday","tabindex","onClick"],GY={style:{flex:"1"}},UY=_t(rt({__name:"MainCalendar",props:rD({year:{},month:{},startDate:{},endDate:{},timezone:{default:"UTC"},activeField:{default:"start"},requireConfirm:{type:Boolean,default:!1},locale:{default:"en-US"},weekdayLabelStyle:{default:"narrow"},weekStart:{default:0},cancelLabel:{default:"Cancel"},confirmLabel:{default:"Confirm"},immediatelyUpdate:{type:Boolean,default:!1},disabled:{type:Boolean},readOnly:{type:Boolean},disableConfirm:{type:Boolean,default:!1}},{tracingCase:{default:()=>({case:"",behavior:""})},tracingCaseModifiers:{}}),emits:rD(["select-start","select-end","select-start-utc","select-end-utc","update:activeField","update:tracingCase","update:month","update:year","close","confirm","cancel","gotoToday"],["update:tracingCase"]),setup(e,{expose:t,emit:n}){const s=Xt,o=B(null),i=e,r=Y(()=>i.startDate&&i.endDate),a=tG(e,"tracingCase"),l=n,u=B(i.year),c=B(i.month);nt(()=>[i.year,i.month],([N,V])=>{u.value=N,c.value=V});const d=Y(()=>bt.fromObject({year:u.value,month:c.value,day:1},{zone:i.timezone}).setLocale(i.locale||"en-US").toFormat("LLLL yyyy")),h=Y(()=>bt.now().setZone(i.timezone)),f=Y(()=>i.startDate?bt.fromJSDate(i.startDate,{zone:i.timezone}):null),p=Y(()=>i.endDate?bt.fromJSDate(i.endDate,{zone:i.timezone}):null),g=B(f.value),v=B(p.value),C=B(f.value),S=B(p.value);nt([f,p],()=>{i.requireConfirm||(g.value=f.value,v.value=p.value,C.value=f.value,S.value=p.value)},{immediate:!0});const b=Y(()=>i.requireConfirm?g.value:f.value),w=Y(()=>i.requireConfirm?v.value:p.value);nt(()=>i.activeField,N=>{const V=N==="start"?b.value:w.value;V&&(u.value=V.year,c.value=V.month)}),nt(()=>{var N,V;return[(N=b.value)==null?void 0:N.toISODate(),(V=w.value)==null?void 0:V.toISODate(),i.activeField]},()=>{const N=i.activeField==="start"?b.value:w.value;N&&(N.year!==u.value||N.month!==c.value)&&(u.value=N.year,c.value=N.month)});function _(N){return N.setZone("utc")}const R=B("");function T(N){R.value=N.toISODate()||"",Ct(()=>{const V=document.querySelector(`.arbo-calendar-day[data-date="${R.value}"]`);V==null||V.focus()})}nt(()=>{var N,V;return[u.value,c.value,i.activeField,(N=b.value)==null?void 0:N.toISODate(),(V=w.value)==null?void 0:V.toISODate()]},()=>{const N=i.activeField==="start"?b.value:w.value;let V;N&&N.year===u.value&&N.month===c.value?V=N:b.value&&b.value.year===u.value&&b.value.month===c.value?V=b.value:V=h.value,T(V)});function I(N){return N.toFormat("d")}const x=Y(()=>{const N=bt.fromObject({year:u.value,month:c.value,day:1},{zone:i.timezone}),V=N.weekday,ne=i.weekStart===1?(V+6)%7:V%7;let ie=N.minus({days:ne});const pe=[],ae=bc.weekdays(i.weekdayLabelStyle||"short",{locale:i.locale||"en-US"}),re=vg();for(let fe=0;fe<42;fe++){const oe=[];ie.month!==c.value&&oe.push(re["is-outside"]),ie.hasSame(h.value,"day")&&oe.push(re["is-today"]),b.value&&ie.hasSame(b.value,"day")&&oe.push(re["is-selected-start"]),w.value&&ie.hasSame(w.value,"day")&&oe.push(re["is-selected-end"]),b.value&&w.value&&ie>b.value&&ie<w.value&&oe.push(re["is-in-range"]);const Ie=I(ie),G=ae[ie.weekday-1]||"";pe.push({dt:ie,iso:ie.toISODate()||"",label:ie.toFormat("d"),displayLabel:Ie,weekdayLabel:G,aria:ie.setLocale(i.locale||"en-US").toFormat("cccc, d LLLL yyyy"),classes:oe}),ie=ie.plus({days:1})}const W=[];for(let fe=0;fe<6;fe++)W.push(pe.slice(fe*7,fe*7+7));return W}),P=Y(()=>{const N=bc.weekdays(i.weekdayLabelStyle||"short",{locale:i.locale||"en-US"});return i.weekStart===1?N:[N[6],...N.slice(0,6)]});function D(N,V,ne){const ie=N==="start"?V.startOf("day"):V.endOf("day"),pe=_(ie),ae={year:ie.year,month:ie.month,day:ie.day,utc:pe.toISO()||""};N==="start"?(l("select-start",ae,ne??!0),l("select-start-utc",ae.utc)):(l("select-end",ae),l("select-end-utc",ae.utc))}function F(N){let V=u.value,ne=c.value+N;for(;ne<1;)ne+=12,V-=1;for(;ne>12;)ne-=12,V+=1;u.value=V,c.value=ne,l("update:year",V),l("update:month",ne)}function k(N){const ne=(R.value?bt.fromISO(R.value,{zone:i.timezone}):h.value).plus({days:N});ne.month===c.value&&ne.year===u.value&&T(ne)}function O(N=!1){const ne=(R.value?bt.fromISO(R.value,{zone:i.timezone}):h.value).weekday%7,ie=N?6-ne:-ne;k(ie)}const $=N=>{q(N)};function q(N){switch(N.preventDefault(),N.stopPropagation(),N.key){case"ArrowLeft":N.preventDefault(),k(-1);break;case"ArrowRight":N.preventDefault(),k(1);break;case"ArrowUp":N.preventDefault(),k(-7);break;case"ArrowDown":N.preventDefault(),k(7);break;case"Home":N.preventDefault(),O(!1);break;case"End":N.preventDefault(),O(!0);break;case"PageUp":N.preventDefault(),F(N.shiftKey?-12:-1);break;case"PageDown":N.preventDefault(),F(N.shiftKey?12:1);break;case"Enter":case" ":{N.preventDefault();const V=R.value?bt.fromISO(R.value,{zone:i.timezone}):h.value,ne=x.value.flat().find(ie=>ie.iso===V.toISODate());ne&&ee(ne);break}}}const J=N=>{const V=bt.now().setZone(i.timezone);u.value=V.year,c.value=V.month,l("update:year",V.year),l("update:month",V.month),T(V),l("gotoToday")};function ee(N){var de,ke;const V=!!f.value,ne=!!p.value,ie=i.activeField,pe=((de=f.value)==null?void 0:de.toISODate())||"null",ae=((ke=p.value)==null?void 0:ke.toISODate())||"null",re=N.dt.toISODate()||"",W=(Pe,Le)=>{a.value={case:Pe,behavior:Le}},fe=()=>`Selected start ${re} > existing end ${ae} -> reset both to ${re}`,oe=()=>`Selected end ${re} < existing start ${pe} -> reset both to ${re}`,Ie=()=>{D("start",N.dt,!0),D("end",N.dt),l("update:activeField","end")},G=(Pe=!1)=>{D("start",N.dt,Pe),Pe&&l("update:activeField","end")},Z=(Pe=!1)=>{D("end",N.dt),Pe&&l("close")};if(V&&ne){ie==="start"?p.value&&N.dt>p.value?(Ie(),W("INVERT_RANGE_FROM_START",fe())):(G(!1),W("UPDATE_START_IN_RANGE",`Updated start from ${pe} to ${re}; end remains ${ae}`)):f.value&&N.dt<f.value?(Ie(),W("INVERT_RANGE_FROM_END",oe())):(Z(!1),W("UPDATE_END_IN_RANGE",`Updated end from ${ae} to ${re}; start remains ${pe}`));return}if(!V&&ne&&ie==="start"&&p.value&&N.dt>p.value){Ie(),W("CREATE_RANGE_FROM_LATE_START",fe());return}if(V&&!ne&&ie==="end"&&f.value&&N.dt<f.value){Ie(),W("CREATE_RANGE_FROM_EARLY_END",oe());return}if(!V&&!ne){if(ie==="start"){G(!0),W("INIT_START",`Picked start ${re}; awaiting end selection`);return}Z(i.immediatelyUpdate),W("INIT_END",`Picked end ${re}; awaiting start selection`);return}if(!V&&ne){if(ie==="start"){G(!0),W("FILL_MISSING_START",`Inserted start ${re}; existing end ${ae}`);return}Z(!1),W("STRICT_UPDATE_END_ONLY",`Updated end to ${re}; start still null`);return}if(V&&!ne){if(ie==="start"){G(!0),W("RESELECT_START_BEFORE_END",`Replaced start with ${re}; end still null, switching to end`);return}Z(i.immediatelyUpdate),W("FILL_MISSING_END",`Picked end ${re}; start ${pe}`);return}}function X(){C.value=g.value,S.value=v.value,l("confirm")}function ve(){g.value=C.value,v.value=S.value,l("cancel")}function te(){Ct(()=>{var N;(N=o.value)==null||N.focus()})}return tn(()=>{te()}),t({focus:te}),(N,V)=>(j(),ce("div",{ref_key:"calendarRef",ref:o,class:Q([N.$style["arbo-calendar"],{[N.$style["arbo-date-range-picker"]]:r.value}]),role:"grid","aria-label":d.value,tabindex:"0"},[Ee("div",{class:Q([N.$style["arbo-calendar-header"],N.$style["arbo-calendar-week"]]),role:"row"},[(j(!0),ce(xt,null,xn(P.value,ne=>(j(),ce("div",{key:ne,class:Q(N.$style["arbo-calendar-weekday"]),role:"columnheader"},wt(ne),3))),128))],2),Ee("div",{class:Q(N.$style["arbo-calendar-weeks"]),"data-index":"date-selection",tabindex:"0",onKeydownCapture:V[0]||(V[0]=Pt(ne=>U(Ga)(ne,$),["prevent","stop"]))},[(j(!0),ce(xt,null,xn(x.value,(ne,ie)=>(j(),ce("div",{key:ie,class:Q(N.$style["arbo-calendar-week"])},[(j(!0),ce(xt,null,xn(ne,pe=>(j(),ce("div",{key:pe.iso,class:Q([N.$style["arbo-calendar-day"],pe.classes,{[N.$style["is-focused"]]:pe.iso===R.value}]),disabled:i.disabled,readOnly:i.readOnly,"aria-label":pe.aria,"data-date":pe.iso,"data-weekday":pe.weekdayLabel,tabindex:pe.iso===R.value?0:-1,onClick:ae=>ee(pe)},wt(pe.displayLabel),11,HY))),128))],2))),128))],34),i.readOnly?Je("",!0):(j(),ce("div",{key:0,class:Q(N.$style["arbo-calendar-actions"])},[Ee("div",GY,[Ke((j(),qe(mt,{variant:"secondary",size:"medium",onClick:V[1]||(V[1]=ne=>J()),onKeydown:U(Ga),"data-index":"today-btn"},{prefix:me(()=>[ge(lt,{src:"CalendarDay"})]),_:1},8,["onKeydown"])),[[U(s),"Today"]])]),ge(mt,{disabled:i.disabled,readOnly:i.readOnly,onKeydown:U(Ga),variant:"secondary",size:"medium",onClick:ve,"data-index":"cancel-btn"},{default:me(()=>[tt(wt(i.cancelLabel),1)]),_:1},8,["disabled","readOnly","onKeydown"]),ge(mt,{disabled:i.disabled||i.disableConfirm,readOnly:i.readOnly,variant:"primary",size:"medium","data-index":"save-btn",onKeydown:U(Ga),onClick:X},{default:me(()=>[tt(wt(i.confirmLabel),1)]),_:1},8,["disabled","readOnly","onKeydown"])],2))],10,$Y))}}),[["__cssModules",{$style:{"arbo-date-range-picker":"_arbo-date-range-picker_1a7wo_1","arbo-calendar-day":"_arbo-calendar-day_1a7wo_2","arbo-calendar-week":"_arbo-calendar-week_1a7wo_3","arbo-calendar":"_arbo-calendar_1a7wo_2","arbo-calendar-nav":"_arbo-calendar-nav_1a7wo_38","arbo-calendar-nav-btn":"_arbo-calendar-nav-btn_1a7wo_46","arbo-calendar-nav-label":"_arbo-calendar-nav-label_1a7wo_53","arbo-calendar-weekday":"_arbo-calendar-weekday_1a7wo_58","arbo-calendar-weeks":"_arbo-calendar-weeks_1a7wo_63","is-today":"_is-today_1a7wo_92","is-selected-start":"_is-selected-start_1a7wo_97","is-selected-end":"_is-selected-end_1a7wo_105","is-outside":"_is-outside_1a7wo_125","is-focused":"_is-focused_1a7wo_128","is-in-range":"_is-in-range_1a7wo_133","arbo-calendar-actions":"_arbo-calendar-actions_1a7wo_139","arbo-calendar-btn":"_arbo-calendar-btn_1a7wo_147",cancel:"_cancel_1a7wo_156",confirm:"_confirm_1a7wo_161"}}]]),WY=["onClick"],zY=["variant","onClick"],jY=_t(rt({__name:"CalendarNavigationControl",props:{year:{},month:{},minYear:{default:1970},maxYear:{default:2100},yearSpan:{default:12},monthLabels:{},locale:{default:"en-US"},monthLabelStyle:{default:"short"},ariaPrevLabel:{default:"Previous"},ariaNextLabel:{default:"Next"},ariaToolbarLabel:{default:"Calendar navigation"},ariaSelectYearLabel:{default:"Select year"},ariaSelectMonthLabel:{default:"Select month"},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["update:year","update:month","mode-change","year-selected","month-selected"],setup(e,{expose:t,emit:n}){const s=e,o=Y(()=>{if(s.monthLabels&&s.monthLabels.length===12)return s.monthLabels;const k=s.locale||"en-US",O=s.monthLabelStyle||"short",$=new Intl.DateTimeFormat(k,{month:O,timeZone:"UTC"});return Array.from({length:12},(J,ee)=>$.format(new Date(Date.UTC(2020,ee,1))))}),i=n,r=B(s.year),a=B(s.month),l=B(s.year);nt(()=>s.year,k=>{k!==r.value&&(r.value=k,l.value=k)}),nt(()=>s.month,k=>{k!==a.value&&(a.value=k)});const u=B("days");function c(k){u.value!==k&&(u.value=k,i("mode-change",k))}const d=Y(()=>s.minYear),h=Y(()=>s.maxYear),f=Y(()=>{const k=s.yearSpan;return l.value-l.value%k}),p=Y(()=>f.value+s.yearSpan-1);function g(){const k=s.yearSpan,O=f.value-k;O>=d.value&&(l.value=O)}function v(){const k=s.yearSpan,O=f.value+k;O<=h.value&&(l.value=O)}const C=Y(()=>f.value-s.yearSpan<d.value),S=Y(()=>p.value+s.yearSpan>h.value),b=Y(()=>{const k=s.yearSpan;return Math.ceil(k/3)});function w(k){const $=f.value+(k-1)*3;return Array.from({length:3},(q,J)=>$+J).filter(q=>q<=p.value)}function _(){u.value==="months"?c("days"):c("months")}function R(){u.value==="years"?c("days"):c("years")}function T(k){r.value=k,l.value=k,i("update:year",k),i("year-selected",k),c("months")}function I(k){a.value=k,i("update:month",k),i("month-selected",k),c("days")}function x(){if(u.value==="days"){let k=r.value,O=a.value-1;if(O<1&&(O=12,k--),k<d.value)return;r.value=k,a.value=O,i("update:year",k),i("update:month",O)}else if(u.value==="months"){if(r.value-1<d.value)return;r.value--,i("update:year",r.value)}else u.value==="years"&&g()}function P(){if(u.value==="days"){let k=r.value,O=a.value+1;if(O>12&&(O=1,k++),k>h.value)return;r.value=k,a.value=O,i("update:year",k),i("update:month",O)}else if(u.value==="months"){if(r.value+1>h.value)return;r.value++,i("update:year",r.value)}else u.value==="years"&&v()}const D=Y(()=>u.value==="days"?r.value===d.value&&a.value===1:u.value==="months"?r.value-1<d.value:C.value),F=Y(()=>u.value==="days"?r.value===h.value&&a.value===12:u.value==="months"?r.value+1>h.value:S.value);return t({setNavigation:(k,O)=>{r.value=k,a.value=O}}),(k,O)=>(j(),ce("div",{class:Q([k.$style["cal-nav-wrapper"]])},[Tt(k.$slots,"selection"),u.value==="days"?(j(),ce("div",{key:0,class:Q(k.$style["cal-nav-bar"]),"aria-label":"Calendar navigation"},[ge(mt,{variant:"tertiary",class:Q([k.$style["cal-nav-btn"],k.$style.prev]),"aria-label":"Previous",disabled:D.value,label:"",onClick:x,"data-index":"prev-btn",onKeydownCapture:zn(Pt(x,["prevent","stop"]),["enter"]),onKeydown:U(Ga)},{default:me(({hovered:$})=>[ge(lt,{src:"AnglesRight",source:"remote",color:$?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled","onKeydownCapture","onKeydown"]),Ee("div",{class:Q(k.$style["cal-nav-center"])},[ge(mt,{"data-index":"month-btn",variant:"secondary",onClick:_,onKeydown:U(Ga)},{default:me(()=>[tt(wt(o.value[a.value-1]),1)]),_:1},8,["onKeydown"]),ge(mt,{variant:"secondary",onClick:R,"data-index":"year-btn",onKeydown:U(Ga)},{default:me(()=>[tt(wt(r.value),1)]),_:1},8,["onKeydown"])],2),ge(mt,{"data-index":"next-btn",variant:"tertiary",class:Q([k.$style["cal-nav-btn"],k.$style.next]),"aria-label":"Next",disabled:F.value,label:"",onClick:P,onKeydownCapture:zn(Pt(P,["prevent","stop"]),["enter"]),onKeydown:U(Ga)},{default:me(({hovered:$})=>[ge(lt,{src:"AnglesRight",source:"remote",color:$?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled","onKeydownCapture","onKeydown"])],2)):Je("",!0),u.value==="years"?(j(),ce("div",{key:1,class:Q(k.$style["year-grid"])},[Ee("div",{class:Q(k.$style["year-grid-header"])},[ge(mt,{variant:"tertiary",class:Q([k.$style["cal-nav-btn"],k.$style.prev]),"aria-label":"Next",disabled:C.value,"prefix-icon":"AnglesRight",label:"",onClick:g},{default:me(({hovered:$})=>[ge(lt,{src:"AnglesRight",source:"remote",color:$?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled"]),Ee("div",{class:Q(k.$style["range-label"])},wt(f.value)+" - "+wt(p.value),3),ge(mt,{variant:"tertiary",class:Q([k.$style["cal-nav-btn"],k.$style.next]),"aria-label":"Next",disabled:S.value,"prefix-icon":"AnglesRight",label:"",onClick:v},{default:me(({hovered:$})=>[ge(lt,{src:"AnglesRight",source:"remote",color:$?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled"])],2),Ee("div",{class:Q(k.$style["year-grid-body"]),role:"grid","data-index":"year-selection"},[(j(!0),ce(xt,null,xn(b.value,$=>(j(),ce("div",{key:"yr-row-"+$,class:Q(k.$style["year-grid-row"])},[(j(!0),ce(xt,null,xn(w($),q=>(j(),ce("a",{key:q,tabindex:"0",class:Q([k.$style["year-cell"],{[k.$style.selected]:q===r.value}]),onClick:J=>T(q)},wt(q),11,WY))),128))],2))),128))],2)],2)):u.value==="months"?(j(),ce("div",{key:2,class:Q(k.$style["month-grid"]),"aria-label":"Select month","data-index":"month-selection"},[Ee("div",{class:Q(k.$style.months)},[(j(!0),ce(xt,null,xn(o.value,($,q)=>(j(),ce("a",{tabindex:"0",key:$,variant:q+1===a.value?"primary":"text",class:Q([k.$style["month-cell"],{[k.$style.selected]:q+1===a.value}]),onClick:J=>I(q+1)},wt($),11,zY))),128))],2)],2)):(j(),ce("div",{key:3,class:Q(k.$style["days-slot"])},[Tt(k.$slots,"default",{year:r.value,month:a.value,mode:u.value})],2))],2))}}),[["__cssModules",{$style:{"cal-nav-wrapper":"_cal-nav-wrapper_unh71_1","cal-nav-bar":"_cal-nav-bar_unh71_12","cal-nav-btn":"_cal-nav-btn_unh71_20",prev:"_prev_unh71_33","year-grid-header":"_year-grid-header_unh71_37","cal-nav-center":"_cal-nav-center_unh71_46","cal-nav-label":"_cal-nav-label_unh71_52","month-grid":"_month-grid_unh71_66","year-grid":"_year-grid_unh71_37",months:"_months_unh71_75","month-cell":"_month-cell_unh71_82","year-cell":"_year-cell_unh71_83","pg-btn":"_pg-btn_unh71_105","year-grid-body":"_year-grid-body_unh71_118","year-grid-row":"_year-grid-row_unh71_125",selected:"_selected_unh71_131","days-slot":"_days-slot_unh71_137","range-label":"_range-label_unh71_141"}}]]);function KY(e){const{format:t="dd/MM/yyyy",timezone:n="local",minDate:s,maxDate:o}=e,i=B(""),r=Y(()=>{const g=bt.fromFormat(i.value,t,{zone:n});return g.isValid?g:null}),a=Y(()=>{if(!s||!r.value)return!0;const g={year:s.getFullYear(),month:s.getMonth()+1,day:s.getDate()},v={year:r.value.year,month:r.value.month,day:r.value.day};return v.year>g.year?!0:v.year<g.year?!1:v.month>g.month?!0:v.month<g.month?!1:l(v,g)>=0}),l=(g,v)=>{const C=new Date(g.year,g.month-1,g.day),S=new Date(v.year,v.month-1,v.day);return C<S?-1:C>S?1:0},u=Y(()=>{if(!o||!r.value)return!0;const g={year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()},v={year:r.value.year,month:r.value.month,day:r.value.day};return v.year<g.year?!0:v.year>g.year?!1:v.month<g.month?!0:v.month>g.month?!1:l(v,g)<=0}),c=Y(()=>i.value.length==0||i.value.length>0&&r.value!==null&&a.value&&u.value),d=Y(()=>i.value.length===t.length&&c.value);return{inputValue:i,isValid:c,isComplete:d,clear:()=>{i.value=""},setDate:g=>{let v;g instanceof Date?v=bt.fromJSDate(g,{zone:n}):v=g.setZone(n),v.isValid?i.value=v.toFormat(t):i.value=""},getDate:()=>c.value?r.value:null}}const qY={key:0,style:{marginLeft:"8px"}},YY=["disabled","readonly","placeholder"],WA=_t(rt({__name:"DateInput",props:{modelValue:{},format:{default:"dd/MM/yyyy"},showDebug:{type:Boolean,default:!0},allowPastDates:{type:Boolean,default:!0},allowFutureDates:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},timezone:{default:""},placeholder:{default:""},size:{},minDate:{default:void 0},maxDate:{default:void 0},isMultipleDate:{type:Boolean,default:!1}},emits:["complete","invalid","clear","blur","tab"],setup(e,{expose:t,emit:n}){const s=Xt,o=e,i=n,r=B(null),a=B(null),{isValid:l,isComplete:u,inputValue:c,clear:d,setDate:h,getDate:f}=KY({format:o.format,allowPastDates:o.allowPastDates,allowFutureDates:o.allowFutureDates,timezone:o.timezone,minDate:o.minDate,maxDate:o.maxDate}),p=Y(()=>o.active),g=Y(()=>({disabled:o.disabled,error:!l.value&&c.value.length>0,readOnly:o.readOnly,isEmpty:c.value.length===0,inputRef:r,wrapperRef:a,active:p})),{argsMain:v,isHover:C,isFocus:S}=ws(g),b=I=>{var P;const x=(P=I.clipboardData)==null?void 0:P.getData("text/plain");x&&(c.value=x.trim())},w=I=>{if(I.key==="Escape"){i("blur"),I.target.blur(),I.preventDefault(),I.stopPropagation(),I.stopImmediatePropagation();return}else I.key==="Tab"&&T(I)},_=()=>{d(),i("clear")};t({clear:_,setDate:h,getDate:f,focus:()=>{var I;return(I=r.value)==null?void 0:I.focus()}}),nt(()=>o.modelValue,I=>{I?h(I):d()},{immediate:!0}),nt([()=>u.value,()=>c.value],()=>{if(c.value.length===0)i("complete",null);else if(l.value&&!o.readOnly&&!o.disabled&&u.value){const I=f();(I||c.value.length===0)&&i("complete",I)}}),nt(()=>l.value,I=>{I||i("invalid","")});const R=Y(()=>!!o.isMultipleDate),T=I=>{I.preventDefault(),I.stopImmediatePropagation(),I.stopPropagation(),i("tab",I)};return(I,x)=>(j(),qe(Cs,nn(U(v),{ref_key:"wrapperRef",ref:a,bordered:!0,actived:p.value,size:32,style:{padding:"0 4px 0 0",background:"#FAFAFA"}}),{default:me(()=>[Ee("div",{class:Q([I.$style["date-input-wrapper"]])},[R.value?(j(),ce("span",qY," Multiple ")):Ke((j(),ce("input",{key:1,disabled:o.disabled,readonly:o.readOnly,ref_key:"inputRef",ref:r,type:"text","onUpdate:modelValue":x[0]||(x[0]=P=>gn(c)?c.value=P:null),onPaste:Pt(b,["prevent"]),placeholder:o.placeholder,class:Q([I.$style["date-input"]]),onKeydown:w},null,42,YY)),[[ST,U(c)]]),Tt(I.$slots,"clear",{handleClear:_},()=>[(U(c).length>0||R.value)&&!o.readOnly&&!o.disabled&&(U(C)||U(S))?Ke((j(),qe(mt,{key:0,variant:["icon","primary"],onClick:Pt(_,["stop"]),size:16,rounded:!0},{default:me(()=>[ge(lt,{src:"XMarkSolid",source:"remote",size:"8",color:"white"})]),_:1})),[[U(s),"Clear"]]):(j(),qe(lt,{key:1,src:"Calendar",source:"remote",class:Q(I.$style["icon-calendar"]),color:"var(--grey-200)"},null,8,["class"]))])],2)]),_:3},16,["actived"]))}}),[["__cssModules",{$style:{"date-input-wrapper":"_date-input-wrapper_1yset_1","icon-calendar":"_icon-calendar_1yset_9",focus:"_focus_1yset_12",hover:"_hover_1yset_12",active:"_active_1yset_12","date-input":"_date-input_1yset_1",invalid:"_invalid_1yset_38"}}]]),ZY=rt({__name:"Calendar",props:{params:{},label:{},value:{},timezone:{default:Eb()},format:{default:"LLL dd"},placeholder:{},enableRangeFeedback:{type:Boolean},messages:{},isCompleted:{type:Boolean},isStarted:{type:Boolean},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},size:{},duePlaceholder:{default:"Due"},startPlaceholder:{default:"Start"},startTooltip:{default:"Select start date"},dueTooltip:{default:"Select due date"},showCalendarIcon:{type:Boolean,default:!0},locale:{default:"en-US"},immediatelyUpdate:{type:Boolean,default:!1},multipleStartDates:{type:Boolean},multipleDueDates:{type:Boolean}},emits:["clearStart","clearDue","clearAll","update","update:start","update:end","range:invalid","range:corrected","tracing","confirmed","closed","start-update","finish-update","tab"],setup(e,{expose:t,emit:n}){const s=B({case:"",behavior:""}),o=e,i=B(null),r=n,a=async(W,fe)=>{r("start-update"),await W(),r("finish-update"),Ct(()=>{var oe,Ie;fe(),(Ie=(oe=o.params)==null?void 0:oe.api)==null||Ie.stopEditing()})},l=(W,fe)=>{W(),Ct(()=>{var oe,Ie;fe(),(Ie=(oe=o.params)==null?void 0:oe.api)==null||Ie.stopEditing()})},u=()=>{var fe;const W=bt.now().setZone(o.timezone);V.value=W.year,ne.value=W.month,(fe=N.value)==null||fe.setNavigation(W.year,W.month)},c=So({start:!1,end:!1}),{states:d,showMultipleStartDates:h,showMultipleDueDates:f,selectEndDate:p,cancelSelection:g,confirmSelection:v,selectStartDate:C,beginInteraction:S,clearStart:b,clearDue:w}=k7(o,r),_=Y(()=>{if(d.isSelectingStart)return"start";if(d.isSelectingEnd)return"end"});nt(()=>o.multipleStartDates,W=>{h.value=!!W},{immediate:!0}),nt(()=>o.multipleDueDates,W=>{f.value=!!W},{immediate:!0});const R=B(null),T=B(null),I=W=>{W.preventDefault(),W.stopImmediatePropagation(),W.stopPropagation(),X()},x=()=>{var W;(W=T.value)==null||W.focus()},P=W=>{if(!W){c.start=!1,b();return}const fe=d.endDate?bt.fromJSDate(d.endDate,{zone:o.timezone}):null;if(fe&&D(W,fe)>0){const Ie={year:W.year,month:W.month,day:W.day};c.start=!1,C(Ie,!1),p(Ie),Ct(()=>{d.isSelectingStart=!0,d.isSelectingEnd=!1});return}const oe={year:W.year,month:W.month,day:W.day};c.start=!1,C(oe,!0)},D=(W,fe)=>{const oe=W.startOf("day"),Ie=fe.startOf("day");return oe<Ie?-1:oe>Ie?1:0},F=W=>{var fe;W.preventDefault(),W.stopImmediatePropagation(),W.stopPropagation(),(fe=document.querySelector('[data-index="prev-btn"]'))==null||fe.focus()},k=W=>{if(!W){c.end=!1,w();return}const fe=d.startDate?bt.fromJSDate(d.startDate,{zone:o.timezone}):null;if(fe&&D(W,fe)<0){const Ie={year:W.year,month:W.month,day:W.day};c.end=!1,C(Ie),p(Ie),Ct(()=>{d.isSelectingEnd=!0,d.isSelectingStart=!1});return}const oe={year:W.year,month:W.month,day:W.day};c.end=!1,p(oe)},O=()=>{h.value=!1,b()},$=()=>{f.value=!1,w()},q=()=>{ve()},J=Y(()=>d.isSelectingStart||d.isSelectingEnd);function ee(){o.disabled||o.readOnly||(S(),d.isSelectingStart=!0,d.isSelectingEnd=!1,Ct(()=>{var W;(W=i.value)==null||W.focus()}))}function X(){o.disabled||o.readOnly||(S(),d.isSelectingEnd=!0,d.isSelectingStart=!1,Ct(()=>{var W;(W=R.value)==null||W.focus()}))}function ve(){d.isSelectingStart=!1,d.isSelectingEnd=!1,r("closed")}function te(W){W.key==="Escape"?(W.stopPropagation(),ve()):W.key=="Tab"&&r("tab",W)}const N=B(null),V=B(new Date().getFullYear()),ne=B(new Date().getMonth()+1);nt(()=>[d.isSelectingStart,d.isSelectingEnd,d.startDate,d.endDate],()=>{d.isSelectingStart&&d.startDate?(V.value=d.startDate.getFullYear(),ne.value=d.startDate.getMonth()+1):d.isSelectingEnd&&d.endDate&&(V.value=d.endDate.getFullYear(),ne.value=d.endDate.getMonth()+1)},{immediate:!0});const ie=B(null);function pe(){if(Array.isArray(o.value)){const[fe,oe]=o.value;d.startDate=fe||null,d.endDate=oe||null}d.isSelectingStart=!1,d.isSelectingEnd=!1;const W=d.startDate||d.endDate||new Date;V.value=W.getFullYear(),ne.value=W.getMonth()+1}nt(()=>{var W,fe,oe,Ie,G,Z,de,ke;return[((oe=(fe=(W=o.value)==null?void 0:W[0])==null?void 0:fe.getTime)==null?void 0:oe.call(fe))||((Ie=o.value)==null?void 0:Ie[0]),((de=(Z=(G=o.value)==null?void 0:G[1])==null?void 0:Z.getTime)==null?void 0:de.call(Z))||((ke=o.value)==null?void 0:ke[1]),o.timezone,o.format,o.placeholder,o.enableRangeFeedback]},()=>{pe()},{immediate:!0,deep:!0}),t({resetCalendarLogic:pe,openStart:ee,openEnd:X,closePicker:ve,clearAll:q,isOpen:J,drpRef:ie,getValues:()=>({startDate:d.startDate,endDate:d.endDate,dateRange:[d.startDate,d.endDate]}),focus:()=>{d.startDate||d.endDate?d.startDate?ee():X():ee()}});const re=B(null);return nt(()=>J.value,W=>{if(o.disabled||o.readOnly)return;const fe=re.value;fe&&(W?fe.show():fe.hide())},{immediate:!0}),(W,fe)=>(j(),ce("div",{class:Q(W.$style["calendar-wrapper"]),ref_key:"calendarWrapperRef",ref:T,onKeydown:te,tabindex:"1","data-index":"calendar-wrapper"},[ge(jY,{year:V.value,"onUpdate:year":fe[6]||(fe[6]=oe=>V.value=oe),month:ne.value,"onUpdate:month":fe[7]||(fe[7]=oe=>ne.value=oe),locale:o.locale,disabled:o.disabled,readOnly:o.readOnly,ref_key:"navigationRef",ref:N},{selection:me(()=>[Ee("div",{class:Q(W.$style["calendar-input-section"])},[ge(WA,{ref_key:"starDateRef",ref:i,"model-value":U(d).startDate,placeholder:o.startPlaceholder,timezone:o.timezone,active:U(d).isSelectingStart,onClick:ee,onClear:O,onComplete:P,onInvalid:fe[0]||(fe[0]=oe=>c.start=!0),disabled:o.disabled,readOnly:o.readOnly,onBlur:x,onTab:I},null,8,["model-value","placeholder","timezone","active","disabled","readOnly"]),ge(WA,{ref_key:"endDateRef",ref:R,"model-value":U(d).endDate,placeholder:o.duePlaceholder,timezone:o.timezone,active:U(d).isSelectingEnd,onClick:X,onClear:$,disabled:o.disabled,onComplete:k,onInvalid:fe[1]||(fe[1]=oe=>c.end=!0),readOnly:o.readOnly,isMultipleDate:U(f),onTab:F},null,8,["model-value","placeholder","timezone","active","disabled","readOnly","isMultipleDate"])],2)]),default:me(({year:oe,month:Ie})=>[ge(UY,{disabled:o.disabled,disableConfirm:c.end||c.start,readOnly:o.readOnly,ref_key:"drpRef",ref:ie,"tracing-case":s.value,"onUpdate:tracingCase":fe[2]||(fe[2]=G=>s.value=G),year:oe,month:Ie,"start-date":U(d).startDate,"end-date":U(d).endDate,"active-field":_.value,timezone:o.timezone,immediatelyUpdate:e.immediatelyUpdate,onSelectStart:U(C),onSelectEnd:U(p),onGotoToday:u,onConfirm:fe[3]||(fe[3]=()=>{a(U(v),ve)}),onCancel:fe[4]||(fe[4]=G=>l(U(g),ve)),onClose:fe[5]||(fe[5]=G=>a(U(v),ve))},null,8,["disabled","disableConfirm","readOnly","tracing-case","year","month","start-date","end-date","active-field","timezone","immediatelyUpdate","onSelectStart","onSelectEnd"])]),_:1},8,["year","month","locale","disabled","readOnly"])],34))}}),Am=_t(ZY,[["__cssModules",{$style:{"calendar-wrapper":"_calendar-wrapper_1wull_1","calendar-input-section":"_calendar-input-section_1wull_11","display-wrapper":"_display-wrapper_1wull_19","calendar-actions":"_calendar-actions_1wull_23","clear-all-btn":"_clear-all-btn_1wull_29"}}]]),XY=rt({__name:"DateUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{},rowSelected:{},disabled:{type:Boolean}},emits:["updated","update-start","update-completed","update-failed"],setup(e,{emit:t}){const n=t,s=e,o=En("isSelectAll",B(!1)),i=En("bulkUpdate",B(!1)),r=Y(()=>!!s.entityId&&i.value&&o.value),{apiServices:a}=ts(!i.value,s),l=En("filterParams",null),u=B(null),c=async I=>{var x,P,D,F;try{w.value=!0,n("update-start");let k={workspaceId:s.workspaceId,entityId:s.entityId,itemIds:s.ids,startDate:void 0,dueDate:void 0,filterParams:l!=null&&l.value?l.value:void 0};"start"in I&&(k.startDate=I.start?pm(I.start):null),"end"in I&&(k.dueDate=I.end?pm(I.end):null),r.value?(k.itemIds=void 0,k.entityId=s.entityId):k.entityId=void 0,await((P=(x=a.value)==null?void 0:x.changeDate)==null?void 0:P.call(x,k)),n("updated",{workspaceId:s.workspaceId,itemIds:s.ids,data:k}),n("update-completed"),(D=u.value)==null||D.hide()}catch(k){console.error("Failed to update dates:",k),Ct(()=>{Ct(()=>{var O;n("update-failed"),(O=u.value)==null||O.open()})})}finally{(F=S.value)==null||F.resetCalendarLogic(),w.value=!1}},d=()=>{if(!s.rowSelected||s.rowSelected.length===0){h();return}s.rowSelected.length===1?f():p()},h=()=>{C.value=!1,v.value=!1,b.value=[null,null]},f=()=>{const x=s.rowSelected[0].dateRange;b.value=[(x==null?void 0:x[0])??null,(x==null?void 0:x[1])??null],C.value=!1,v.value=!1},p=()=>{var x,P;if(s.rowSelected.some(D=>D.dateRange&&(D.dateRange[0]!==null||D.dateRange[1]!==null))){const D=g(0),F=g(1);if(v.value=D,C.value=F,D)b.value[0]=null;else{const k=((x=s.rowSelected[0].dateRange)==null?void 0:x[0])??null;b.value[0]=k}if(F)b.value[1]=null;else{const k=((P=s.rowSelected[0].dateRange)==null?void 0:P[1])??null;b.value[1]=k}}else v.value=!1,C.value=!1,b.value=[null,null]},g=I=>{const x=s.rowSelected.map(D=>{var F;return(F=D.dateRange)==null?void 0:F[I]});return x.length===0?!1:new Set(x.map(D=>{var F;return(F=D==null?void 0:D.getTime)==null?void 0:F.call(D)})).size>1},v=B(!1),C=B(!1),S=B(null),b=B([null,null]);nt([()=>s.ids,()=>s.rowSelected],I=>{d(),Ct(()=>{var x;(x=S.value)==null||x.focus()})},{immediate:!0,deep:!0});const w=B(!1),_=()=>{w.value=!0},R=()=>{Ct(()=>{setTimeout(()=>{w.value=!1},500)})},T=(I,x)=>{I&&Ct(()=>{var P;(P=S.value)==null||P.focus()})};return(I,x)=>(j(),qe(sf,{ref_key:"wrapperRef",ref:u,isUpdating:w.value,disabled:s.disabled||w.value,onOnVisibleChange:T},{trigger:me(({hide:P,disabled:D})=>[ge(mt,{variant:s.variant,loading:w.value,disabled:D,onEscape:P},{default:me(()=>[ge(lt,{src:"Calendar"}),x[0]||(x[0]=tt(" Date ",-1))]),_:1},8,["variant","loading","disabled","onEscape"])]),popup:me(({isVisible:P,hide:D})=>[P?(j(),qe(Am,{key:0,immediatelyUpdate:!1,value:b.value,onConfirmed:c,ref_key:"calendarRef",ref:S,onClosed:D,onStartUpdate:_,onFinishUpdate:R,multipleDueDates:C.value,multipleStartDates:v.value},null,8,["value","onClosed","multipleDueDates","multipleStartDates"])):Je("",!0)]),default:me(()=>[x[1]||(x[1]=tt(" > ",-1))]),_:1},8,["isUpdating","disabled"]))}}),JY=e=>{if(Number(e.metric_type.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number(e.metric_type.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number(e.metric_type.id)==3)return"formula"},zA=Ql("metricStore",()=>{const e=B();return{metricList:e,setMetricList:s=>{e.value=s},checkEditType:s=>{var o;if(((o=s==null?void 0:s.auth_permission)==null?void 0:o.permission)==2)return JY(s)}}}),QY=["onKeydown"],eZ=["width","height","viewBox"],tZ=["d"],nZ="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z",jA=rt({__name:"RatingComponent",props:{params:{default:()=>({maxRating:5,readOnly:!1,disabled:!1})},modelValue:{},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},emits:["update","update:modelValue","change","handleEnter","cancel"],setup(e,{expose:t,emit:n}){const s=e,o=n,i=B(s.modelValue??0),r=B(null),a=Y(()=>{var D;return((D=s.params)==null?void 0:D.size)??24}),l=Y(()=>{var D;return((D=s.params)==null?void 0:D.iconViewBox)??"0 0 24 24"}),u=Y(()=>{var D;return((D=s.params)==null?void 0:D.iconPath)??nZ}),c=Y(()=>{var D;return((D=s.params)==null?void 0:D.wrapperTag)??"span"}),d=Y(()=>{var D;return s.disabled||((D=s.params)==null?void 0:D.disabled)||!1}),h=Y(()=>{var D;return s.readOnly||((D=s.params)==null?void 0:D.readOnly)||!1}),f=Y(()=>!d.value&&!h.value),p=Y(()=>d.value?"not-allowed":h.value?"default":"pointer");nt(()=>s.modelValue,D=>{typeof D=="number"&&D!==i.value&&(i.value=D)});const g=D=>{var F;return((F=s.params)==null?void 0:F.maxRating)-D+1<=i.value&&!v.value},v=B(!1),C=()=>{v.value=!0},S=()=>{v.value=!1},b=D=>{f.value&&w(D)},w=D=>{var k,O;if(!f.value)return;let F=((k=s.params)==null?void 0:k.maxRating)-D+1;F===i.value&&(F=0),i.value=F,o("update:modelValue",F),o("update",F),o("change",F),(O=s.params)!=null&&O.onUpdate&&s.params.onUpdate(F)},_=D=>{var F;D!==i.value&&(i.value=D,o("update:modelValue",D),o("update",D),o("change",D),(F=s.params)!=null&&F.onUpdate&&s.params.onUpdate(D),R.value=D)},R=B(i.value),T=D=>{D.preventDefault(),D.stopPropagation(),D.stopImmediatePropagation(),i.value=R.value,o("cancel")},I=D=>{D.preventDefault(),_(i.value),o("handleEnter",i.value)},x=()=>{f.value&&(i.value=Math.min(i.value+1%(s.params.maxRating+1),s.params.maxRating),_(i.value))},P=()=>{f.value&&(i.value=Math.max(i.value-1,0),_(i.value))};return t({focus:()=>{var D;(D=r.value)==null||D.focus()}}),(D,F)=>(j(),ce("div",{class:Q(["rating-component",{"rating-component--disabled":d.value,"rating-component--readOnly":h.value}]),style:dn({"--max-rating":e.params.maxRating}),ref_key:"ratingRef",ref:r,tabindex:"1",onKeydown:[zn(Pt(P,["prevent"]),["left"]),zn(Pt(x,["prevent"]),["right"]),zn(Pt(P,["prevent"]),["down"]),zn(Pt(x,["prevent"]),["up"]),zn(Pt(I,["prevent"]),["enter"]),zn(Pt(I,["prevent"]),["tab"]),zn(Pt(T,["prevent"]),["escape"])]},[(j(!0),ce(xt,null,xn(e.params.maxRating,k=>(j(),qe(bw(c.value),{key:k,class:Q(["rating-item",{filled:g(k),"rating-item--disabled":d.value,"rating-item--readOnly":h.value}]),style:dn({cursor:p.value,order:e.params.maxRating-k,height:a.value+"px",width:a.value+"px"}),"aria-checked":g(k),"aria-disabled":d.value,"aria-readOnly":h.value,title:e.params.maxRating-k+1,tabindex:-1,onClick:Pt(O=>b(k),["prevent","stop"]),onMouseenter:C,onMouseleave:S},{default:me(()=>[Tt(D.$slots,"icon",{index:k,filled:g(k),size:a.value,iconViewBox:l.value,disabled:d.value,readOnly:h.value,value:k},()=>[(j(),ce("svg",{class:"rating-icon",width:a.value,height:a.value,viewBox:l.value,"aria-hidden":"true",focusable:"false"},[Ee("path",{d:u.value},null,8,tZ)],8,eZ))]),Tt(D.$slots,"overlay",{index:k,filled:g(k),disabled:d.value,readOnly:h.value})]),_:2},1064,["class","style","aria-checked","aria-disabled","aria-readOnly","title","onClick"]))),128))],46,QY))}}),sZ={style:{maxWidth:"180px",lineHeight:"15px"}},oZ=["innerHTML"],KA=rt({__name:"MetricEditorDropdown",props:{config:{},modelValue:{}},emits:["update:modelValue","change","close","handleCancel"],setup(e,{expose:t,emit:n}){const s=Xt,o=e,i=n,r=()=>{i("handleCancel")},a=()=>{i("close")},l=v=>{var C;if(v.format_type==="dropdown"&&v.format_value)try{const S=JSON.parse(v.format_value);if(Array.isArray(S)){const b=S.map(w=>({label:w.name,value:w.name,id:w.name}));return b.unshift({label:"-",value:void 0,id:"-"}),b}}catch(S){console.error("Failed to parse dropdown options",S)}if(v.format_type=="number"&&v.restricted_type=="exact"){const S=((C=v.restricted_value)==null?void 0:C.split(",").map(b=>({label:v.mapping[`!${b}`]||b,value:b,id:b})))||[];return S.unshift({label:"-",value:void 0,id:"-"}),S}return[]},u=Y(()=>l(o.config)),c=B(o.modelValue),d=v=>{c.value=v,i("update:modelValue",v),i("change",v||null)},h=B(u.value),f=B(!1),p=v=>{f.value=!0,v?h.value=u.value.filter(C=>C.label.toLowerCase().includes(v.toLowerCase())):h.value=u.value,setTimeout(()=>{f.value=!1},300)},g=B(null);return tn(()=>{var v;(v=g.value)==null||v.focus()}),t({focus:()=>{var v;(v=g.value)==null||v.focus()}}),(v,C)=>(j(),qe(Jr,{style:{width:326},loading:f.value,options:h.value,"selected-id":e.modelValue||void 0,onSearch:p,onSelect:C[0]||(C[0]=S=>d(S.id)),ref_key:"searchListRef",ref:g,onClose:a,onCancel:r},{item:me(({item:S,getHighlightedLabel:b,selectedIndex:w,index:_})=>[ge(eu,{hover:w==_,selected:S.value===e.modelValue,label:S.label,onSelect:R=>d(S.value||null),onClick:R=>d(S.value||null)},{label:me(()=>[Ee("div",sZ,[Ke(Ee("span",{innerHTML:b(S.label)},null,8,oZ),[[U(s),{content:S.label}]])])]),_:2},1032,["hover","selected","label","onSelect","onClick"])]),"empty-list":me(()=>[...C[1]||(C[1]=[tt("No options available.",-1)])]),_:1},8,["loading","options","selected-id"]))}}),iZ={class:"metric-input-wrapper"},rZ={key:0,class:"error-text input-2"},qA=rt({__name:"MetricEditorInput",props:{config:{},modelValue:{},saveOnBlur:{type:Boolean,default:!0},saveOnEscape:{type:Boolean,default:!1},showInlineError:{type:Boolean,default:!1}},emits:["update:modelValue","handleChange","cancel","enter","onValidation"],setup(e,{expose:t,emit:n}){const s=Xt,o=e,i=B(o.modelValue),r=B(o.modelValue),a=B(!1),l=B(!0),u=B(""),c=Y(()=>{var $;const O=Number.parseInt(String(($=o.config)==null?void 0:$.format_value)||"2",10);return Number.isFinite(O)&&O>=0?O:2}),d=O=>{if(!O)return O;const $=String(O).split(".");return $.length>1&&$[1].length>c.value?c.value===0?$[0]:`${$[0]}.${$[1].slice(0,c.value)}`:String(O)},h=O=>{const $=d(O);$!==O&&b.value?i.value=$:i.value=O},f=O=>{const $=O.target;if(!$)return;const q=$.value||"",J=q.indexOf(".");if(O.key==="."&&c.value===0){O.preventDefault();return}J!==-1&&/[0-9]/.test(O.key)&&q.slice(J+1).length>=c.value&&O.preventDefault()},p=Y(()=>l.value||o.showInlineError?{content:""}:{content:u.value,placement:"top",theme:"error",trigger:"mouseenter focus",hideOnClick:!1,interactive:!0,showOnCreate:!0,alwayShow:!0,maxWidth:"200px"}),g=()=>{var te;const O=o.config.restricted_type.trim(),$=((te=o.config.restricted_value)==null?void 0:te.split(",").map(Number))||[],[q,J]=$,X={range:`Enter a value between ${q} and ${J}`,not:`These values are not allowed: ${$.join(", ")}`,exact:"Value is not allowed"}[O];return l.value?"":X},v=Y(()=>{var $;let O="";return Number(($=o.config)==null?void 0:$.format_value)&&(O+="."+Array.from({length:Number(o.config.format_value)}).map(()=>"0").join("")),`0${O}`});nt(()=>o.modelValue,O=>{i.value=O,r.value=O});const C=O=>dm(o.config,O),S=n,b=B(null),w=O=>{const $=O===""?null:O,q=r.value===""?null:r.value;return $!==q},_=O=>{const $=d(O);if(!w($))return!1;const q=$===""?null:$;return i.value=q,r.value=q,S("update:modelValue",q),S("handleChange",q),!0},R=()=>{i.value=r.value,S("update:modelValue",r.value)},T=(O,$)=>{_(O),S("enter")},I=(O,$)=>{if(a.value){a.value=!1;return}o.saveOnBlur?_(O):R()},x=O=>{if(O===null||O===""){l.value=!0;return}l.value=dm(o.config,Number(O)),u.value=l.value?"":g()},P=(O,$)=>{a.value=!0,o.saveOnEscape?_(O):R(),S("cancel"),setTimeout(()=>{a.value=!1},100)},D=O=>{x(O),S("onValidation",O)},F=()=>{a.value=!0,R(),S("cancel"),setTimeout(()=>{a.value=!1},100)},k=()=>{var O;i.value=null,r.value=null,S("update:modelValue",null),S("handleChange",null),(O=b.value)==null||O.focus()};return t({focus:()=>{var O;return(O=b.value)==null?void 0:O.focus()},blur:()=>{var O;return(O=b.value)==null?void 0:O.blur()},getValue:()=>i.value,getCachedValue:()=>r.value,save:()=>_(i.value),revert:R}),tn(()=>{var O;(O=b.value)==null||O.focus()}),(O,$)=>Ke((j(),ce("div",iZ,[ge(oS,{maxDecimalChar:c.value,modelValue:i.value,"onUpdate:modelValue":$[0]||($[0]=q=>i.value=q),placeholder:v.value,validatorFnc:C,style:{"--bg-input":"#FAFAFA"},onInput:h,onKeydown:f,onEnter:T,onBlur:I,onClear:k,onEscape:P,onCancel:F,onOnValidation:D,type:"number",autoEmit:!1,submitOnEnter:!0,blurOnEscape:!1,ref_key:"inputRef",ref:b},null,8,["maxDecimalChar","modelValue","placeholder"]),!l.value&&e.showInlineError?(j(),ce("span",rZ,wt(u.value),1)):Je("",!0)])),[[U(s),p.value]])}}),aZ={key:2},lZ={class:"wrapper-suffix"},uZ={key:3},cZ=_t(rt({__name:"MetricEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},config:{},attachTo:{},focus:{type:Boolean}},emits:["enter","cancel","blur","updateMetric"],setup(e,{expose:t,emit:n}){const s=Xt,o=e,i=B(null),r=B(0),a=B(null),l=B(null),u=Y(()=>OF(o.config)),c=B(!1),d=Y(()=>!!ie.value),h=n,f=()=>{c.value=!1,ne(),h("cancel")},p=B(!0),g=re=>{if(re===null||re===""){p.value=!0;return}if(u.value!=="number"){p.value=!0;return}p.value=dm(o.config,Number(re)),C.value=S()},v=()=>{c.value=!0,J()},C=B(""),S=()=>{var de;const re=o.config.restricted_type.trim(),W=((de=o.config.restricted_value)==null?void 0:de.split(",").map(Number))||[],[fe,oe]=W,G={range:`Enter a value between ${fe} and ${oe}`,not:`These values are not allowed: ${W.join(", ")}`,exact:"Value is not allowed"}[re];return p.value?"":G},b=Y(()=>{var W;const re=Number.parseInt(String((W=o.config)==null?void 0:W.format_value)||"2",10);return Number.isFinite(re)&&re>=0?re:2}),w=re=>{c.value=!0,i.value=re},_=()=>{c.value=!0,ne(),J()},R=re=>{r.value=re,c.value=!0,J()},T=()=>(o.config.format_symbol||"BoltSolid").split(/[\s-_]+/).map(W=>W.charAt(0).toUpperCase()+W.slice(1)).join("").replace(/Outline|Solid/g,""),I=B(null),x=B(!0),P=Y(()=>{var re;return{disabled:o.disabled,error:!1,readOnly:!1,isEmpty:((re=i.value)==null?void 0:re.length)===0,wrapperRef:N,active:d,focus:o.focus,bordered:!0}}),D=B(null),F=Y(()=>x.value),k=Y(()=>({disabled:o.disabled,error:!1,readOnly:!1,isEmpty:r.value===0,wrapperRef:D,active:F,focus:x.value,bordered:!0})),{argsMain:O}=ws(k),{argsMain:$}=ws(P),q=B(null),J=()=>{Ct(()=>{var re;(re=q.value)==null||re.focus()})},ee=re=>{var W;if(re.format_type==="dropdown"&&re.format_value)try{const fe=JSON.parse(re.format_value);if(Array.isArray(fe))return fe.map(oe=>({label:oe.name,value:oe.name,id:oe.name}))}catch(fe){console.error("Failed to parse dropdown options",fe)}return re.format_type=="number"&&re.restricted_type=="exact"?((W=re.restricted_value)==null?void 0:W.split(",").map(oe=>({label:re.mapping[`!${oe}`]||oe,value:oe,id:oe})))||[]:[]},X=Y(()=>ee(o.config)),ve=Y(()=>{var re;return((re=X.value.find(W=>W.value===i.value))==null?void 0:re.label)||i.value||"-"}),te=()=>{var re;if(u.value=="rating")h("updateMetric",r.value==0?null:r.value);else if(u.value=="number"){const W=(re=l.value)==null?void 0:re.getValue();h("updateMetric",W||null)}else h("updateMetric",i.value||null);c.value=!1,ne()},{triggerRef:N,popupRef:V,hide:ne,isVisible:ie,show:pe}=Fs({toggleOnClick:!0,appendTo:()=>o.attachTo||"parent",zIndex:1e4,offset:[0,0]}),ae=()=>{switch(u.value){case"number":Ct(()=>{var re;(re=l.value)==null||re.focus()});break;case"dropdown":pe(),Ct(()=>{var re;(re=I.value)==null||re.focus()});break;case"rating":x.value=!0,Ct(()=>{var re;(re=a.value)==null||re.focus()});break}};return t({resetState:()=>{i.value=null,r.value=0,c.value=!1},focus:ae,hasChanges:()=>c.value}),tn(()=>{Ct(()=>{setTimeout(()=>{ae()},300)})}),(re,W)=>(j(),ce("div",{class:Q(re.$style["metric-editor"])},[u.value=="number"?(j(),qe(qA,{key:0,config:o.config,modelValue:i.value,"onUpdate:modelValue":W[0]||(W[0]=fe=>i.value=fe),style:{width:"100%"},saveOnBlur:!0,saveOnEscape:!1,"show-inline-error":!0,onCancel:f,onOnValidation:g,onEnter:v,onHandleChange:w,maxDecimalChar:b.value,ref_key:"metricEditorInputRef",ref:l},null,8,["config","modelValue","maxDecimalChar"])):u.value=="rating"?(j(),qe(Cs,nn({key:1,"tab-index":1},U(O),{ref_key:"triggerRef2",ref:D,bordered:!0,style:{"--box-padding":"0 ","--icon-size":"18px",background:"#FAFAFA"}}),{default:me(()=>[ge(jA,{params:{maxRating:o.config.range},modelValue:r.value,"onUpdate:modelValue":W[1]||(W[1]=fe=>r.value=fe),onHandleEnter:R,onCancel:f,ref_key:"ratingComponentRef",ref:a},{icon:me(()=>[ge(lt,{source:"rating",src:T()||"Star",size:17},null,8,["src"])]),_:1},8,["params","modelValue"])]),_:1},16)):u.value=="dropdown"?(j(),ce("div",aZ,[ge(Cs,nn(U($),{ref_key:"triggerRef",ref:N,bordered:!0,style:{"--box-padding":"0 4px 0 4px","--icon-size":"18px",background:"#FAFAFA"}}),{suffix:me(({})=>[Ee("div",lZ,[ge(lt,{src:"ChevronDown",color:"#A6A6A6",size:"12"})])]),default:me(()=>[Ke((j(),ce("span",null,[tt(wt(ve.value||""),1)])),[[U(s),{content:ve.value}]])]),_:1},16),Ee("div",{ref_key:"popupRef",ref:V},[U(ie)?(j(),qe(KA,{key:0,ref_key:"metricEditorDropdownRef",ref:I,config:o.config,modelValue:i.value,"onUpdate:modelValue":W[2]||(W[2]=fe=>i.value=fe),onChange:_,onCancel:f},null,8,["config","modelValue"])):Je("",!0)],512)])):(j(),ce("span",uZ,"Formular")),Ke((j(),qe(mt,{ref_key:"confirmButtonRef",ref:q,onHandleClick:te,"tab-index":"1",onKeypress:[zn(Pt(ae,["shift","prevent"]),["tab"]),zn(Pt(f,["prevent"]),["escape"])],disabled:!p.value},{default:me(()=>[ge(lt,{src:"Check"})]),_:1},8,["onKeypress","disabled"])),[[U(s),"Update"]])],2))}}),[["__cssModules",{$style:{"metric-editor":"_metric-editor_18l4p_1","dropdown-trigger":"_dropdown-trigger_18l4p_10"}}]]),dZ=_t(rt({__name:"MetricBulkItem",props:{label:{},morpheme:{},type:{},config:{},attachTo:{}},emits:["loseFocus","open","handleUpdate","focusOnSearch","openSibling"],setup(e,{expose:t,emit:n}){const s=Xt,o=e,i=n,r=B(!1),a=B(null),l=B(null),u=()=>{r.value=!r.value},c=()=>{var g;r.value=!1,(g=l.value)==null||g.resetState()},d=async()=>{var g;r.value=!0,await Ct(),(g=l.value)==null||g.focus()},h=g=>{i("handleUpdate",{id:o.config.id.toString(),value:g})},f=()=>{var g;(g=a.value)==null||g.focus(),i("loseFocus")},p=g=>{const C={Escape:()=>{g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation(),i("focusOnSearch",g)},Tab:()=>{r.value&&c()},Enter:()=>{r.value||d()},ArrowDown:()=>{i("openSibling","down")},ArrowUp:()=>{i("openSibling","up")}}[g.key];C&&C()};return nt(r,g=>{g&&i("open")}),t({hide:c,show:d}),(g,v)=>(j(),ce("div",{class:Q([g.$style["metric-item"],r.value?g.$style.open:""]),tabindex:"0",ref_key:"metricRef",ref:a,onKeydown:p},[Ee("div",{class:Q(g.$style["metric-label"]),onClick:Pt(u,["stop"])},[Tt(g.$slots,"default",{open:r.value},()=>[Ke((j(),ce("span",{class:Q(g.$style["metric-name"])},[tt(wt(e.label),1)],2)),[[U(s),{content:e.label}]]),e.morpheme&&r.value?(j(),ce("small",{key:0,class:Q(g.$style["metric-morpheme"])}," ("+wt(e.morpheme)+") ",3)):Je("",!0)])],2),ge(XD,{mode:"out-in",name:"slide"},{default:me(()=>[r.value?(j(),qe(cZ,{key:`editor-${e.config.id}`,"read-only":!1,focus:r.value,type:e.type,config:e.config,"attach-to":e.attachTo,ref_key:"metricEditorRef",ref:l,onCancel:f,onUpdateMetric:h},null,8,["focus","type","config","attach-to"])):Je("",!0)]),_:1})],34))}}),[["__cssModules",{$style:{"metric-item":"_metric-item_18ft8_1","metric-label":"_metric-label_18ft8_11",open:"_open_18ft8_19","metric-name":"_metric-name_18ft8_23","metric-morpheme":"_metric-morpheme_18ft8_29"}}]]);var Mc=(e=>(e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.ALREADY_REPORTED=208]="ALREADY_REPORTED",e[e.IM_USED=226]="IM_USED",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.FOUND=302]="FOUND",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.SWITCH_PROXY=306]="SWITCH_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",e[e.URI_TOO_LONG=414]="URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.TOO_EARLY=425]="TOO_EARLY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.LOOP_DETECTED=508]="LOOP_DETECTED",e[e.NOT_EXTENDED=510]="NOT_EXTENDED",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",e))(Mc||{});function YA(e,t){return function(){return e.apply(t,arguments)}}const{toString:hZ}=Object.prototype,{getPrototypeOf:aS}=Object,{iterator:km,toStringTag:ZA}=Symbol,Om=(e=>t=>{const n=hZ.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ki=e=>(e=e.toLowerCase(),t=>Om(t)===e),Mm=e=>t=>typeof t===e,{isArray:Nc}=Array,Lc=Mm("undefined");function rf(e){return e!==null&&!Lc(e)&&e.constructor!==null&&!Lc(e.constructor)&&co(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const XA=ki("ArrayBuffer");function fZ(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&XA(e.buffer),t}const pZ=Mm("string"),co=Mm("function"),JA=Mm("number"),af=e=>e!==null&&typeof e=="object",gZ=e=>e===!0||e===!1,Nm=e=>{if(Om(e)!=="object")return!1;const t=aS(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ZA in e)&&!(km in e)},mZ=e=>{if(!af(e)||rf(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},vZ=ki("Date"),yZ=ki("File"),wZ=ki("Blob"),CZ=ki("FileList"),bZ=e=>af(e)&&co(e.pipe),SZ=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||co(e.append)&&((t=Om(e))==="formdata"||t==="object"&&co(e.toString)&&e.toString()==="[object FormData]"))},EZ=ki("URLSearchParams"),[_Z,RZ,DZ,TZ]=["ReadableStream","Request","Response","Headers"].map(ki),IZ=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function lf(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,o;if(typeof e!="object"&&(e=[e]),Nc(e))for(s=0,o=e.length;s<o;s++)t.call(null,e[s],s,e);else{if(rf(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),r=i.length;let a;for(s=0;s<r;s++)a=i[s],t.call(null,e[a],a,e)}}function QA(e,t){if(rf(e))return null;t=t.toLowerCase();const n=Object.keys(e);let s=n.length,o;for(;s-- >0;)if(o=n[s],t===o.toLowerCase())return o;return null}const tu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ek=e=>!Lc(e)&&e!==tu;function lS(){const{caseless:e,skipUndefined:t}=ek(this)&&this||{},n={},s=(o,i)=>{const r=e&&QA(n,i)||i;Nm(n[r])&&Nm(o)?n[r]=lS(n[r],o):Nm(o)?n[r]=lS({},o):Nc(o)?n[r]=o.slice():(!t||!Lc(o))&&(n[r]=o)};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&lf(arguments[o],s);return n}const xZ=(e,t,n,{allOwnKeys:s}={})=>(lf(t,(o,i)=>{n&&co(o)?e[i]=YA(o,n):e[i]=o},{allOwnKeys:s}),e),FZ=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),PZ=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},AZ=(e,t,n,s)=>{let o,i,r;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)r=o[i],(!s||s(r,e,t))&&!a[r]&&(t[r]=e[r],a[r]=!0);e=n!==!1&&aS(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kZ=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},OZ=e=>{if(!e)return null;if(Nc(e))return e;let t=e.length;if(!JA(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},MZ=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&aS(Uint8Array)),NZ=(e,t)=>{const s=(e&&e[km]).call(e);let o;for(;(o=s.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},LZ=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},VZ=ki("HTMLFormElement"),BZ=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,o){return s.toUpperCase()+o}),tk=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),$Z=ki("RegExp"),nk=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};lf(n,(o,i)=>{let r;(r=t(o,i,e))!==!1&&(s[i]=r||o)}),Object.defineProperties(e,s)},HZ=e=>{nk(e,(t,n)=>{if(co(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=e[n];if(co(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},GZ=(e,t)=>{const n={},s=o=>{o.forEach(i=>{n[i]=!0})};return Nc(e)?s(e):s(String(e).split(t)),n},UZ=()=>{},WZ=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function zZ(e){return!!(e&&co(e.append)&&e[ZA]==="FormData"&&e[km])}const jZ=e=>{const t=new Array(10),n=(s,o)=>{if(af(s)){if(t.indexOf(s)>=0)return;if(rf(s))return s;if(!("toJSON"in s)){t[o]=s;const i=Nc(s)?[]:{};return lf(s,(r,a)=>{const l=n(r,o+1);!Lc(l)&&(i[a]=l)}),t[o]=void 0,i}}return s};return n(e,0)},KZ=ki("AsyncFunction"),qZ=e=>e&&(af(e)||co(e))&&co(e.then)&&co(e.catch),sk=((e,t)=>e?setImmediate:t?((n,s)=>(tu.addEventListener("message",({source:o,data:i})=>{o===tu&&i===n&&s.length&&s.shift()()},!1),o=>{s.push(o),tu.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",co(tu.postMessage)),YZ=typeof queueMicrotask<"u"?queueMicrotask.bind(tu):typeof K<"u"&&K.nextTick||sk,Be={isArray:Nc,isArrayBuffer:XA,isBuffer:rf,isFormData:SZ,isArrayBufferView:fZ,isString:pZ,isNumber:JA,isBoolean:gZ,isObject:af,isPlainObject:Nm,isEmptyObject:mZ,isReadableStream:_Z,isRequest:RZ,isResponse:DZ,isHeaders:TZ,isUndefined:Lc,isDate:vZ,isFile:yZ,isBlob:wZ,isRegExp:$Z,isFunction:co,isStream:bZ,isURLSearchParams:EZ,isTypedArray:MZ,isFileList:CZ,forEach:lf,merge:lS,extend:xZ,trim:IZ,stripBOM:FZ,inherits:PZ,toFlatObject:AZ,kindOf:Om,kindOfTest:ki,endsWith:kZ,toArray:OZ,forEachEntry:NZ,matchAll:LZ,isHTMLForm:VZ,hasOwnProperty:tk,hasOwnProp:tk,reduceDescriptors:nk,freezeMethods:HZ,toObjectSet:GZ,toCamelCase:BZ,noop:UZ,toFiniteNumber:WZ,findKey:QA,global:tu,isContextDefined:ek,isSpecCompliantForm:zZ,toJSONObject:jZ,isAsyncFn:KZ,isThenable:qZ,setImmediate:sk,asap:YZ,isIterable:e=>e!=null&&co(e[km])};function qt(e,t,n,s,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),s&&(this.request=s),o&&(this.response=o,this.status=o.status?o.status:null)}Be.inherits(qt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Be.toJSONObject(this.config),code:this.code,status:this.status}}});const ok=qt.prototype,ik={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ik[e]={value:e}}),Object.defineProperties(qt,ik),Object.defineProperty(ok,"isAxiosError",{value:!0}),qt.from=(e,t,n,s,o,i)=>{const r=Object.create(ok);Be.toFlatObject(e,r,function(c){return c!==Error.prototype},u=>u!=="isAxiosError");const a=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return qt.call(r,a,l,n,s,o),e&&r.cause==null&&Object.defineProperty(r,"cause",{value:e,configurable:!0}),r.name=e&&e.name||"Error",i&&Object.assign(r,i),r};const ZZ=null;function uS(e){return Be.isPlainObject(e)||Be.isArray(e)}function rk(e){return Be.endsWith(e,"[]")?e.slice(0,-2):e}function ak(e,t,n){return e?e.concat(t).map(function(o,i){return o=rk(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function XZ(e){return Be.isArray(e)&&!e.some(uS)}const JZ=Be.toFlatObject(Be,{},null,function(t){return/^is[A-Z]/.test(t)});function Lm(e,t,n){if(!Be.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Be.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,v){return!Be.isUndefined(v[g])});const s=n.metaTokens,o=n.visitor||c,i=n.dots,r=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&Be.isSpecCompliantForm(t);if(!Be.isFunction(o))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(Be.isDate(p))return p.toISOString();if(Be.isBoolean(p))return p.toString();if(!l&&Be.isBlob(p))throw new qt("Blob is not supported. Use a Buffer instead.");return Be.isArrayBuffer(p)||Be.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,g,v){let C=p;if(p&&!v&&typeof p=="object"){if(Be.endsWith(g,"{}"))g=s?g:g.slice(0,-2),p=JSON.stringify(p);else if(Be.isArray(p)&&XZ(p)||(Be.isFileList(p)||Be.endsWith(g,"[]"))&&(C=Be.toArray(p)))return g=rk(g),C.forEach(function(b,w){!(Be.isUndefined(b)||b===null)&&t.append(r===!0?ak([g],w,i):r===null?g:g+"[]",u(b))}),!1}return uS(p)?!0:(t.append(ak(v,g,i),u(p)),!1)}const d=[],h=Object.assign(JZ,{defaultVisitor:c,convertValue:u,isVisitable:uS});function f(p,g){if(!Be.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(p),Be.forEach(p,function(C,S){(!(Be.isUndefined(C)||C===null)&&o.call(t,C,Be.isString(S)?S.trim():S,g,h))===!0&&f(C,g?g.concat(S):[S])}),d.pop()}}if(!Be.isObject(e))throw new TypeError("data must be an object");return f(e),t}function lk(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function cS(e,t){this._pairs=[],e&&Lm(e,this,t)}const uk=cS.prototype;uk.append=function(t,n){this._pairs.push([t,n])},uk.toString=function(t){const n=t?function(s){return t.call(this,s,lk)}:lk;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function QZ(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ck(e,t,n){if(!t)return e;const s=n&&n.encode||QZ;Be.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=Be.isURLSearchParams(t)?t.toString():new cS(t,n).toString(s),i){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class dk{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Be.forEach(this.handlers,function(s){s!==null&&t(s)})}}const hk={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},eX={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:cS,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},dS=typeof window<"u"&&typeof document<"u",hS=typeof navigator=="object"&&navigator||void 0,tX=dS&&(!hS||["ReactNative","NativeScript","NS"].indexOf(hS.product)<0),nX=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",sX=dS&&window.location.href||"http://localhost",Gs={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:dS,hasStandardBrowserEnv:tX,hasStandardBrowserWebWorkerEnv:nX,navigator:hS,origin:sX},Symbol.toStringTag,{value:"Module"})),...eX};function oX(e,t){return Lm(e,new Gs.classes.URLSearchParams,{visitor:function(n,s,o,i){return Gs.isNode&&Be.isBuffer(n)?(this.append(s,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function iX(e){return Be.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function rX(e){const t={},n=Object.keys(e);let s;const o=n.length;let i;for(s=0;s<o;s++)i=n[s],t[i]=e[i];return t}function fk(e){function t(n,s,o,i){let r=n[i++];if(r==="__proto__")return!0;const a=Number.isFinite(+r),l=i>=n.length;return r=!r&&Be.isArray(o)?o.length:r,l?(Be.hasOwnProp(o,r)?o[r]=[o[r],s]:o[r]=s,!a):((!o[r]||!Be.isObject(o[r]))&&(o[r]=[]),t(n,s,o[r],i)&&Be.isArray(o[r])&&(o[r]=rX(o[r])),!a)}if(Be.isFormData(e)&&Be.isFunction(e.entries)){const n={};return Be.forEachEntry(e,(s,o)=>{t(iX(s),o,n,0)}),n}return null}function aX(e,t,n){if(Be.isString(e))try{return(t||JSON.parse)(e),Be.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(e)}const uf={transitional:hk,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const s=n.getContentType()||"",o=s.indexOf("application/json")>-1,i=Be.isObject(t);if(i&&Be.isHTMLForm(t)&&(t=new FormData(t)),Be.isFormData(t))return o?JSON.stringify(fk(t)):t;if(Be.isArrayBuffer(t)||Be.isBuffer(t)||Be.isStream(t)||Be.isFile(t)||Be.isBlob(t)||Be.isReadableStream(t))return t;if(Be.isArrayBufferView(t))return t.buffer;if(Be.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(s.indexOf("application/x-www-form-urlencoded")>-1)return oX(t,this.formSerializer).toString();if((a=Be.isFileList(t))||s.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Lm(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),aX(t)):t}],transformResponse:[function(t){const n=this.transitional||uf.transitional,s=n&&n.forcedJSONParsing,o=this.responseType==="json";if(Be.isResponse(t)||Be.isReadableStream(t))return t;if(t&&Be.isString(t)&&(s&&!this.responseType||o)){const r=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(a){if(r)throw a.name==="SyntaxError"?qt.from(a,qt.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Gs.classes.FormData,Blob:Gs.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Be.forEach(["delete","get","head","post","put","patch"],e=>{uf.headers[e]={}});const lX=Be.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),uX=e=>{const t={};let n,s,o;return e&&e.split(`
|
|
141
|
+
This will fail in production.`);r=Zl,r._s.has(e)||(o?Jb(e,t,s,r):VA(e,s,r),K.env.NODE_ENV!=="production"&&(i._pinia=r));const u=r._s.get(e);if(K.env.NODE_ENV!=="production"&&a){const c="__hot:"+e,d=o?Jb(c,t,s,r,!0):VA(c,si({},s),r,!0);a._hotUpdate(d),delete r.state.value[c],r._s.delete(c)}if(K.env.NODE_ENV!=="production"&&Zr){const c=Yn();if(c&&c.proxy&&!a){const d=c.proxy,h="_pStores"in d?d._pStores:d._pStores={};h[e]=u}}return u}return i.$id=e,i}function Qs(e){const t=Nt(e),n={};for(const s in t){const o=t[s];o.effect?n[s]=Y({get:()=>e[s],set(i){e[s]=i}}):(gn(o)||zo(o))&&(n[s]=Si(e,s))}return n}const Qb=Ql("permissionStore",()=>{const e=B([]),t=B(),n=B({});return{userPermissions:e,entityPermissions:t,itemPermission:n,setUserPermissions:r=>{e.value=r},setEntityPermissions:r=>{t.value=r},setItemPermission:(r,a)=>{n.value[r]=a}}}),hY="woohoo_getWoohooUserInterface_read",eS="media_getReviewUserInterface_read",fY="update_getUpdateUserInterface_read",BA="Unarchive parent folder first to continue",pY=(e,t,n,s,o,i)=>{const r=Qb(),{userPermissions:a}=Qs(r),l=Y(()=>{const I=_n.getInstance().getItem("BASE_URL"),x=_n.getInstance().getItem("BASE_REVIEW_URL"),{ws_code:P,entity_id:D,scene_id:F}=e.value;return{baseDomain:I||"",ws_code:P||"",entity_id:D||"",scene_id:F||"",reviewDomain:x||"",take_id:D||"",woohoo_id:D||"",parent_id:D||""}}),u=Y(()=>{var x;const I=e.value.permissions;return{canOpenSceneHub:!0,canOpenReview:a.value.includes(eS),canCopyLink:!0,canRename:(I==null?void 0:I.has_edit_permission)??!1,canOpenTakeInReview:a.value.includes(eS),canOpenTakeInUpdate:a.value.includes(fY),canOpenTakeInWoohoo:a.value.includes(hY),canDeleteRendition:((x=I==null?void 0:I.media)==null?void 0:x.has_delete_rendition_permission)??!1,canDeleteThumbnail:(I==null?void 0:I.has_edit_thumbnail_permission)??!1,canArchiveScene:I==null?void 0:I.has_archive_permission,canUnarchiveScene:I==null?void 0:I.has_archive_permission,canDeleteScene:(I==null?void 0:I.has_delete_permission)??!1}}),c=Y(()=>({project:Ao({type:"project",config:l.value}).url,take_review:Ao({type:"review_take",config:l.value}).url,review:Ao({type:"review_scene",config:l.value}).url,review_scene:Ao({type:"review_scene",config:l.value}).url,woohoo:Ao({type:"woohoo",config:l.value}).url,update:Ao({type:"update",config:l.value}).url,scene_hub:Ao({type:"scene_hub",config:l.value}).url})),d=(I,x)=>{const P=I.metaKey||I.ctrlKey,D=c.value[x]||"";if(D){if(x==="scene_hub"){if(P){window.open(D,"_blank");return}if(!s){console.error("Switch instance not found.",{openSceneHub:s,windowFunc:globalThis.window.$switchInstance});return}s(l.value.scene_id||"");return}P?window.open(D,"_blank"):window.location.href=D}},h=async(I,x)=>{var P;try{const D=await((P=e.value.axiosService.value)==null?void 0:P.deleteRendition({workspaceId:l.value.ws_code,itemIds:[l.value.scene_id||""],deleteAll:!0}));(D==null?void 0:D.message)!="Done"&&console.error("Failed to delete rendition.")}catch(D){console.error("Error deleting rendition",D)}finally{o()}},f=async(I,x)=>{var P;try{await((P=e.value.axiosService.value)==null?void 0:P.deleteThumbnail({workspaceId:l.value.ws_code,itemIds:[l.value.scene_id||""]}))}catch(D){console.error("Error deleting thumbnail",D)}finally{o()}},p=async(I,x)=>{var P;try{const D=await((P=e.value.axiosService.value)==null?void 0:P.archiveScene(l.value.ws_code,l.value.entity_id,[l.value.scene_id]));(D==null?void 0:D.message)!="Done"&&console.error("Failed to archive scene."),x&&x("archived")}catch(D){console.error("Error archiving item",D)}finally{o()}},g=async(I,x)=>{var P;try{const D=await((P=e.value.axiosService.value)==null?void 0:P.deleteScene(l.value.ws_code,l.value.entity_id,l.value.scene_id));(D==null?void 0:D.message)!="Done"&&console.error("Failed to delete scene."),x&&x("deleted")}catch(D){console.error("Error deleting item",D)}finally{o()}},v=I=>{const x=c.value.scene_hub||"";x&&(_.value="Copied",navigator.clipboard.writeText(x),setTimeout(()=>{_.value="Copy link"},5e3))},C=async(I,x)=>{var P;try{const D=await((P=e.value.axiosService.value)==null?void 0:P.unarchiveScene(l.value.ws_code,l.value.entity_id,[l.value.scene_id]));(D==null?void 0:D.message)!="Done"&&console.error("Failed to unarchive scene."),x&&x("unarchived")}catch(D){console.error("Error unarchiving item",D)}finally{o()}},S=I=>p(I,t),b=I=>C(I,t),w=I=>g(I,t),_=B("Copy link"),R=I=>d(I,"review"),T=Y(()=>{let I=[];if(!l.value.scene_id&&e.value.optionBlock&&I.push(...e.value.optionBlock),Array.isArray(e.value.optionBlock)&&e.value.optionBlock.length)return e.value.optionBlock;const x=()=>Math.random().toString(36).substring(2,9);return[{id:x(),type:"column",groupLabel:"Download Options",options:[{id:"open_review",label:"Open Review",icon:"PenRuler",action:R,hide:!u.value.canOpenReview,disabled:!u.value.canOpenReview,description:"",type:"icon"},{id:x(),label:_.value,icon:"Link",action:v,hide:!u.value.canCopyLink,disabled:!u.value.canCopyLink,description:"",type:"icon"}]},{id:x(),type:"column",groupLabel:"Download Options",options:[{id:"archive",label:"Archive",icon:"BoxArchive",action:S,hide:u.value.canArchiveScene==0,disabled:u.value.canArchiveScene!==1,description:u.value.canArchiveScene==-1?BA:"",type:"icon"},{id:"unarchive",label:"Unarchive",icon:"BoxArchive",action:b,hide:u.value.canUnarchiveScene==0,disabled:u.value.canUnarchiveScene!==1,description:u.value.canUnarchiveScene===-1?BA:"",type:"icon"},{id:"delete",label:"Delete",icon:"TrashCan",isDanger:!0,description:"Delete permanently",action:w,hide:!u.value.canDeleteScene,type:"icon"}]}]});return{linkMap:c,handleOpen:d,copyLink:v,deleteRendition:h,deleteThumbnail:f,archiveItem:p,deleteItem:g,unArchiveItem:C,options:T}};function ws(e){const t=B(!1),n=B(!1),s=Y(()=>{var d;const u=e.value,c=!!u.readOnly;return{readOnly:c,disabled:!!u.disabled,hovered:n.value,focused:t.value,isEmpty:u.empty??!1,error:!!u.error,actived:!!((d=u.active)!=null&&d.value),clickable:c?!1:u.clickable??!1}}),o=()=>{t.value=!0,Ct(()=>{const u=l(e.value.inputRef);u==null||u.focus()})},i=()=>{t.value=!1},r=()=>{n.value=!0},a=()=>{n.value=!1},l=u=>{if(!u)return null;const c=u.value||u;return(c instanceof HTMLElement?c:c==null?void 0:c.$el)||null};return tn(()=>{const u=l(e.value.inputRef),c=l(e.value.wrapperRef);u&&(u.addEventListener("focus",o),u.addEventListener("blur",i)),c&&(c.addEventListener("mouseenter",r),c.addEventListener("mouseleave",a))}),vs(()=>{const u=l(e.value.inputRef),c=l(e.value.wrapperRef);u&&(u.removeEventListener("focus",o),u.removeEventListener("blur",i)),c&&(c.removeEventListener("mouseenter",r),c.removeEventListener("mouseleave",a))}),{isFocus:t,isHover:n,argsMain:s,handleFocus:o}}const Ac=e=>{const t=B(!1),n=Y(()=>t.value);return tn(()=>{var a,l,u,c;const s=(a=e.params)==null?void 0:a.api,o=(l=e.params)==null?void 0:l.node,i=o==null?void 0:o.rowIndex,r=(c=(u=e.params)==null?void 0:u.colDef)==null?void 0:c.field;return s==null||s.addEventListener("cellEditingStarted",d=>{d.rowIndex===i&&d.colDef.field===r&&(t.value=!0)}),s==null||s.addEventListener("cellEditingStopped",d=>{d.rowIndex===i&&d.colDef.field===r&&(t.value=!1)}),{isEditing:n}}),{isEditing:n}},$A=_t(rt({__name:"StatusBadge",props:{size:{default:16},color:{default:"#02C39A"},label:{default:""},status:{default:void 0},statusTooltip:{default:"Online"},showBadge:{type:Boolean,default:!0},loading:{type:Boolean}},setup(e){const t=To,{triggerRef:n,popupRef:s}=Fs({toggleOnClick:!0,trigger:"mouseenter focus",theme:"dark",placement:"right",arrow:!0}),o=Y(()=>{switch(i.status){case"active":return"#02C39A";case"offline":return"#808080";case"busy":return"#ff0000";case"away":return"#F7941D";default:return"transparent"}}),i=e;return(r,a)=>(j(),ce("div",{class:Q(r.$style["status-badge-wrapper"]),style:dn({"--badge-size":`${i.size}px`,"--badge-color":o.value})},[Tt(r.$slots,"default"),Ke(Ee("div",{class:Q(r.$style["badge-indicator"]),ref_key:"triggerRef",ref:n},null,2),[[Do,i.showBadge],[U(t),{isLoading:i.loading,fullwidth:!0}]]),Ee("div",{ref_key:"popupRef",ref:s,class:Q(r.$style["badge-tooltip"])},wt(i.statusTooltip),3)],6))}}),[["__cssModules",{$style:{"status-badge-wrapper":"_status-badge-wrapper_30ykl_1","badge-indicator":"_badge-indicator_30ykl_6",active:"_active_30ykl_19",offline:"_offline_30ykl_22",busy:"_busy_30ykl_25",away:"_away_30ykl_28","badge-tooltip":"_badge-tooltip_30ykl_32"}}]]),tf=Ql("switchStore",()=>{const e=B(null),t=En("switchInstance");return{openSceneHub:(o,i)=>{if(o){if(!t)throw console.error("Switch instance not found"),new Error("Switch instance not found");t("scene_hub",{id:o,commentId:i},{showLoading:!1})}},openPeopleInsight:o=>{const i=t||e.value;if(!i)throw console.error("Switch instance not found"),new Error("Switch instance not found");o||console.trace("No people_id provided, defaulting to empty string"),i("people_insight",{tab:"home",id:o||""},{showLoading:!1})},switchInstanceFunc:e}}),gY=rt({__name:"MiniPeopleCard",props:{user:{},status:{default:void 0},timezone:{default:cm()},userConfig:{default:()=>({size:96,isUseShortLabel:!0,bgColor:"#E0E0E0",color:"#757575",isMe:!1})},showInsightButton:{type:Boolean,default:!0},showCopyLinkButton:{type:Boolean,default:!0},apiUpdateFunction:{type:Function,default:void 0},refreshInterval:{default:3e4},enableAutoRefresh:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},private:{type:Boolean,default:!1}},emits:["insightClick","copyLink","dataUpdated"],setup(e,{emit:t}){const n=Xt,s=To,o=e,i=t,r={active:"Active in the workspace in the last 10 minutes.",offline:"Logged out from account.",busy:"User is busy",away:"No activity in the workspace within the last 10 minutes"},a=B(o.status),l=B(o.timezone),u=B(!0),c=B(null),d=Y(()=>r[a.value]),h=Y(()=>{var F;return(F=o.user)==null?void 0:F.name}),f=B(!1),p=B(new Date);let g;tn(async()=>{g=setInterval(()=>{p.value=new Date},6e4)}),Il(()=>{g&&clearInterval(g)});const v=Y(()=>{if(!l.value)return"";try{return p.value.toLocaleTimeString("en-US",{timeZone:l.value,hour:"numeric",minute:"2-digit",hour12:!0})}catch{return console.error("Invalid timezone:",l.value),""}}),C=async()=>{var F,k,O;if(o.apiUpdateFunction)try{const $=await o.apiUpdateFunction(o.user.id);if(!$){f.value=!0,console.error("No data returned from API");return}(F=$==null?void 0:$.private_info)!=null&&F.is_offline?a.value="offline":(k=$.private_info)!=null&&k.last_active?a.value="active":a.value="away",(O=$.private_info)!=null&&O.timezone&&(l.value=$.private_info.timezone),i("dataUpdated",$)}catch($){f.value=!0,console.error("Failed to fetch user data:",$)}finally{u.value=!1}},S=()=>{!o.apiUpdateFunction||!o.enableAutoRefresh||(c.value!==null&&clearInterval(c.value),c.value=setInterval(C,o.refreshInterval))},b=()=>{c.value!==null&&(clearInterval(c.value),c.value=null)},w=Y(()=>{const F=globalThis.location.origin,k=_n.getInstance().getItem("ws.code");return Ao({type:"people_insight",config:{ws_code:k,baseDomain:F,user_id:o.user.id}}).url}),{copyToClipboard:_,tooltip:R}=NF(w.value,()=>i("copyLink",o.user.id)),T=tf(),{openPeopleInsight:I}=T,x=F=>{if(F.ctrlKey||F.metaKey){window.open(w.value,"_blank");return}try{I(String(o.user.id))}catch{window.open(w.value,"_blank")}},P=F=>{x(F),i("insightClick",o.user.id)};nt([()=>o.enableAutoRefresh,()=>o.refreshInterval,()=>o.apiUpdateFunction],()=>{b(),o.enableAutoRefresh&&o.apiUpdateFunction&&S()}),tn(async()=>{o.apiUpdateFunction&&(await C(),S())}),vs(b);const D=Y(()=>({name:o.user.name,initial:o.user.initial,id:o.user.id,profile_image:o.user.profile_image,color:o.user.color,size:72,borderRadius:"20px"}));return(F,k)=>(j(),ce("div",{class:Q([F.$style["mini-people-card"],{[F.$style.loading]:u.value},"bg-skeleton"])},[Ee("div",{class:Q(F.$style["avatar-section"])},[!o.private&&!f.value?(j(),qe($A,{key:0,size:12,status:a.value,loading:u.value,"status-tooltip":d.value},{default:me(()=>[ge(Ih,nn({readOnly:!0},D.value,{borderRadius:"8px"}),null,16)]),_:1},8,["status","loading","status-tooltip"])):(j(),qe(Ih,nn({key:1,readOnly:!0},D.value,{borderRadius:"8px"}),null,16))],2),Ee("div",{class:Q(F.$style["user-info"])},[Ee("div",{class:Q(F.$style["info-column"])},[Ke((j(),ce("span",{class:Q(F.$style["user-name"])},[tt(wt(h.value),1)],2)),[[U(n),{content:h.value,delay:[1e3,0]}]]),l.value&&!f.value?(j(),ce("div",{key:0,class:Q([F.$style["info-row"],F.$style["time-row"]])},[Ke((j(),ce("div",{class:Q(F.$style["time-display"])},[ge(lt,{source:"remote",src:"Globe",class:Q(F.$style["clock-icon"]),size:"10"},null,8,["class"]),Ee("span",{class:Q(F.$style["time-text"])},wt(v.value)+" ("+wt(e.timezone)+")",3)],2)),[[U(s),{isLoading:u.value,fullwidth:!0}]])],2)):Je("",!0)],2),!e.readOnly&&!o.private&&!f.value?(j(),ce("div",{key:0,class:Q([F.$style["info-row"],F.$style.actions])},[e.showInsightButton?(j(),qe(mt,{key:0,label:"Insights",variant:"secondary",size:"small",onClick:Pt(P,["prevent","stop"]),disabled:o.disabled},null,8,["disabled"])):Je("",!0),e.showCopyLinkButton?Ke((j(),qe(mt,{key:1,variant:["icon","secondary"],size:"small","aria-label":"Copy link",onClick:Pt(U(_),["prevent","stop"]),disabled:o.disabled},{default:me(()=>[ge(lt,{source:"remote",src:"Link"})]),_:1},8,["onClick","disabled"])),[[U(n),{content:U(R),contentClass:["extra-padding"],hideOnClick:!1,delay:[300,0]}]]):Je("",!0)],2)):Je("",!0)],2)],2))}}),mY=_t(gY,[["__cssModules",{$style:{"mini-people-card":"_mini-people-card_8t908_1",loading:"_loading_8t908_25","avatar-section":"_avatar-section_8t908_28","user-info":"_user-info_8t908_33","info-column":"_info-column_8t908_42","info-row":"_info-row_8t908_50","time-row":"_time-row_8t908_56","time-display":"_time-display_8t908_62","time-text":"_time-text_8t908_70",actions:"_actions_8t908_79","status-badge":"_status-badge_8t908_83",active:"_active_8t908_96",offline:"_offline_8t908_99",busy:"_busy_8t908_102",away:"_away_8t908_105","user-local-time":"_user-local-time_8t908_108","clock-icon":"_clock-icon_8t908_116",separator:"_separator_8t908_128",timezone:"_timezone_8t908_131","refresh-btn":"_refresh-btn_8t908_134",spinning:"_spinning_8t908_137",spin:"_spin_8t908_137","insight-btn":"_insight-btn_8t908_140","copy-link-btn":"_copy-link-btn_8t908_144","last-update":"_last-update_8t908_147","user-name":"_user-name_8t908_153","loading-overlay":"_loading-overlay_8t908_166","loading-spinner":"_loading-spinner_8t908_178"}}]]),vY=_t(rt({name:"MoreOption",__name:"MoreOption",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e,{expose:t}){const n=Ur,s=Xt,o=e,{isEditing:i}=Ac(o),r=()=>{var h,f;const c=(h=o.params)==null?void 0:h.api,d={rowIndex:(f=c==null?void 0:c.getRowNode(String(o.id)))==null?void 0:f.rowIndex,colKey:"options"};c==null||c.startEditingCell(d)},a=Y(()=>{var d,h;const c=(h=(d=o.params)==null?void 0:d.api)==null?void 0:h.getRowNode(String(o.id));return((c==null?void 0:c.rowIndex)??0)+10}),l=()=>{var c,d;(d=(c=o.params)==null?void 0:c.api)==null||d.stopEditing()},u=B();return t({focus(){var c;(c=u.value)==null||c.focus()},blur(){var c;(c=u.value)==null||c.blur()}}),(c,d)=>Ke((j(),qe(mt,{class:Q(c.$style.btnMoreOptions),variant:["secondary","icon"],size:"small",actived:U(i),onClick:Pt(r,["stop"]),onEscape:l,ref_key:"buttonRef",ref:u},{default:me(()=>[ge(lt,{src:"EllipsisVertical",source:"remote"})]),_:1},8,["class","actived"])),[[U(s),"More actions"],[U(n),a.value]])}}),[["__cssModules",{$style:{btnMoreOptions:"_btnMoreOptions_w8s4g_1"}}]]),yY=["src","width","height","alt"],Pm=_t(rt({__name:"Visual",props:{src:{},source:{default:"remote"},size:{},minWidth:{},maxWidth:{},minHeight:{},maxHeight:{},color:{},ratio:{default:"1/1"}},setup(e){const t=To,{getCachedValue:n,setCachedValue:s}=Dh({dbName:"visual-cache-db",storeName:"visuals"}),o=h=>{if(h!==void 0)return typeof h=="number"?`${h}px`:typeof h=="string"&&/^\d+$/.test(h)?`${h}px`:h},i=e,r=Y(()=>({minWidth:o(i.minWidth),maxWidth:o(i.maxWidth),minHeight:o(i.minHeight),maxHeight:o(i.maxHeight),aspectRatio:i.ratio,width:o(i.size)})),a=async h=>{const f=await n(h);if(typeof f=="string")return f},l=async(h,f)=>{await s(h,f)},u=Y(()=>({name:i.src,size:Number(i.size||100),color:""})),{url:c,loading:d}=Z1(u,"visual",l,a);return(h,f)=>Ke((j(),ce("div",{class:Q([h.$style.visualWrapper,{[h.$style.loading]:U(d)}]),style:dn(r.value)},[Ee("img",{src:U(c),width:e.size,height:e.size,alt:"visual-"+e.src,style:dn(r.value)},null,12,yY)],6)),[[U(t),{isLoading:U(d),type:"skeleton",size:"cover",fullwidth:!0}]])}}),[["__cssModules",{$style:{visualWrapper:"_visualWrapper_lvp0k_1",loading:"_loading_lvp0k_8",pulse:"_pulse_lvp0k_1"}}]]),wY=["tabindex"],Cs=_t(rt({__name:"DisplayWrapper",props:{prefix:{},suffix:{},inputType:{},readOnly:{type:Boolean},disabled:{type:Boolean},hovered:{type:Boolean},focused:{type:Boolean},error:{type:Boolean},actived:{type:Boolean},clickable:{type:Boolean},size:{},bordered:{type:Boolean},tabIndex:{}},emits:["event","escape"],setup(e,{expose:t,emit:n}){const s=e,o=n;sg();const i=vg(),r=B(null),a=B("default"),l=Y(()=>{if(typeof s.size=="number")return`${s.size}px`;switch(s.size){case"small":return"32px";case"large":return"48px";case"default":default:return"32px"}}),u=Y(()=>`${Math.max(50,Math.round(Math.random()*100))}%`),c=Y(()=>({[i["display-wrapper"]]:!0,[i.disabled]:s.disabled,[i.readOnly]:s.readOnly,[i.error]:s.error,[i.clickable]:s.clickable,[i.active]:s.actived,[i.hovered]:s.hovered,[i.focused]:!s.readOnly&&!s.disabled&&s.focused,[i.bordered]:s.bordered})),d=()=>{var w,_;const g=((w=r.value)==null?void 0:w.querySelectorAll(":scope > .wrapper-prefix").length)||0,v=((_=r.value)==null?void 0:_.querySelectorAll(":scope > .wrapper-suffix").length)||0,C="var(--icon-size)",b=`calc(var(--gap-size) * ${g+v})`;return g&&!v?`repeat(${g}, ${C}) calc(100% - (${g} * ${C} + ${b}))`:!g&&v?`calc(100% - (${v} * ${C} + ${b})) repeat(${v}, ${C})`:g&&v?`repeat(${g}, ${C}) calc(100% - (${g} * ${C} + ${v} * ${C} + ${b})) repeat(${v}, ${C})`:"100%"},h=B("100%"),f=()=>{h.value=d()};th(()=>{f()}),tn(()=>{f()});const p=g=>{a.value=g};return t({rootEl:r,updateState:p,componentState:a,focus:()=>{Ct(()=>{var g;(g=r.value)==null||g.focus()})},escape:()=>{o("escape")}}),(g,v)=>(j(),ce("div",{ref_key:"rootEl",ref:r,class:Q([U(i)["display-wrapper"],c.value]),tabindex:e.tabIndex,style:dn({"--grid-template":h.value,"--wrapper-size":l.value,"--loading-overlay-width":u.value})},[Tt(g.$slots,"prefix",{hovered:s.hovered,focused:s.focused}),Tt(g.$slots,"default",{hovered:s.hovered,focused:s.focused,updateComponentState:p,disabled:s.disabled}),Tt(g.$slots,"suffix",{hovered:s.hovered,focused:s.focused})],14,wY))}}),[["__cssModules",{$style:{"display-wrapper":"_display-wrapper_11gbb_1",readOnly:"_readOnly_11gbb_26",bordered:"_bordered_11gbb_29",disabled:"_disabled_11gbb_29",active:"_active_11gbb_29",focused:"_focused_11gbb_29",hovered:"_hovered_11gbb_34",error:"_error_11gbb_38",clickable:"_clickable_11gbb_51",suffix:"_suffix_11gbb_57",prefix:"_prefix_11gbb_58"}}]]),CY=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const bY=Object.prototype.toString,SY=e=>bY.call(e)==="[object Object]",kc=()=>{};function EY(e,t){function n(...s){return new Promise((o,i)=>{Promise.resolve(e(()=>t.apply(this,s),{fn:t,thisArg:this,args:s})).then(o).catch(i)})}return n}function _Y(e,t={}){let n,s,o=kc;const i=l=>{clearTimeout(l),o(),o=kc};let r;return l=>{const u=Nr(e),c=Nr(t.maxWait);return n&&i(n),u<=0||c!==void 0&&c<=0?(s&&(i(s),s=void 0),Promise.resolve(l())):new Promise((d,h)=>{o=t.rejectOnCancel?h:d,r=l,c&&!s&&(s=setTimeout(()=>{n&&i(n),s=void 0,d(r())},c)),n=setTimeout(()=>{s&&i(s),s=void 0,d(l())},u)})}}function tS(e){return Array.isArray(e)?e:[e]}function RY(e,t=200,n={}){return EY(_Y(t,n),e)}function DY(e,t,n){return nt(e,t,{...n,immediate:!0})}const HA=CY?window:void 0;function nf(e){var t;const n=Nr(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function nS(...e){const t=(s,o,i,r)=>(s.addEventListener(o,i,r),()=>s.removeEventListener(o,i,r)),n=Y(()=>{const s=tS(Nr(e[0])).filter(o=>o!=null);return s.every(o=>typeof o!="string")?s:void 0});return DY(()=>{var s,o;return[(s=(o=n.value)===null||o===void 0?void 0:o.map(i=>nf(i)))!==null&&s!==void 0?s:[HA].filter(i=>i!=null),tS(Nr(n.value?e[1]:e[0])),tS(U(n.value?e[2]:e[1])),Nr(n.value?e[3]:e[2])]},([s,o,i,r],a,l)=>{if(!(s!=null&&s.length)||!(o!=null&&o.length)||!(i!=null&&i.length))return;const u=SY(r)?{...r}:r,c=s.flatMap(d=>o.flatMap(h=>i.map(f=>t(d,h,f,u))));l(()=>{c.forEach(d=>d())})},{flush:"post"})}function sS(e,t,n={}){const{window:s=HA,ignore:o=[],capture:i=!0,detectIframe:r=!1,controls:a=!1}=n;if(!s)return a?{stop:kc,cancel:kc,trigger:kc}:kc;let l=!0;const u=v=>Nr(o).some(C=>{if(typeof C=="string")return Array.from(s.document.querySelectorAll(C)).some(S=>S===v.target||v.composedPath().includes(S));{const S=nf(C);return S&&(v.target===S||v.composedPath().includes(S))}});function c(v){const C=Nr(v);return C&&C.$.subTree.shapeFlag===16}function d(v,C){const S=Nr(v),b=S.$.subTree&&S.$.subTree.children;return b==null||!Array.isArray(b)?!1:b.some(w=>w.el===C.target||C.composedPath().includes(w.el))}const h=v=>{const C=nf(e);if(v.target!=null&&!(!(C instanceof Element)&&c(e)&&d(e,v))&&!(!C||C===v.target||v.composedPath().includes(C))){if("detail"in v&&v.detail===0&&(l=!u(v)),!l){l=!0;return}t(v)}};let f=!1;const p=[nS(s,"click",v=>{f||(f=!0,setTimeout(()=>{f=!1},0),h(v))},{passive:!0,capture:i}),nS(s,"pointerdown",v=>{const C=nf(e);l=!u(v)&&!!(C&&!v.composedPath().includes(C))},{passive:!0}),r&&nS(s,"blur",v=>{setTimeout(()=>{var C;const S=nf(e);((C=s.document.activeElement)===null||C===void 0?void 0:C.tagName)==="IFRAME"&&!(S!=null&&S.contains(s.document.activeElement))&&t(v)},0)},{passive:!0})].filter(Boolean),g=()=>p.forEach(v=>v());return a?{stop:g,cancel:()=>{l=!1},trigger:v=>{l=!0,h(v),l=!1}}:g}const TY=["value","placeholder","disabled","readonly","inputmode","maxlength"],oS=_t(rt({__name:"InputText",props:{type:{default:"text"},autoEmit:{type:Boolean,default:!1},debounceDelay:{default:300},selectOnFocus:{type:Boolean,default:!1},submitOnEnter:{type:Boolean,default:!0},blurOnEscape:{type:Boolean,default:!0},maxDecimalChar:{},modelValue:{},placeholder:{},focused:{type:Boolean},validatorFnc:{},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{},bordered:{type:Boolean},focusIndex:{}},emits:["update:modelValue","input","clear","focus","blur","change","enterValue","enter","escape","cancel","tab","keydown","keyup","paste","cut","select","onValidation"],setup(e,{expose:t,emit:n}){const s=Ur,o=Xt,i=e,r=n,a=B(null),l=B(i.modelValue||"");nt(l,()=>{r("onValidation",l.value)});const u=B(!1),c=B(i.modelValue||"");nt(()=>i.modelValue,N=>{l.value=N||"",c.value=N||""});const d=Y(()=>{var N;return((N=l.value)==null?void 0:N.length)>0}),h={text:N=>N.slice(0,i.maxLength||255),number:N=>{let V=N.replace(/[^\d.-]/g,"");const ne=V.split(".");ne.length>2&&(V=ne[0]+"."+ne.slice(1).join("")),V=V.replace(/-/g,(W,fe)=>fe===0?W:"");const pe=V.startsWith("-")?"-":"",re=V.replace("-","").split(".");return re[0].length>17&&(re[0]=re[0].substring(0,17)),i.maxDecimalChar!==void 0&&re.length>1&&(re[1]=re[1].substring(0,i.maxDecimalChar)),V=pe+re.join("."),V},email:N=>N.replace(/\s/g,"").slice(0,i.maxLength||255),url:N=>N.replace(/\s/g,"").slice(0,i.maxLength||255),tel:N=>N.replace(/[^\d+\-() ]/g,"").slice(0,i.maxLength||20)},f=N=>{const V=h[i.type];return V?V(N):N},p=RY(N=>{i.autoEmit&&(r("update:modelValue",N),r("input",N))},i.debounceDelay),g=N=>{const V=N;if(i.disabled||i.readOnly){V.preventDefault();return}const ne=V.target,ie=ne.selectionStart||0,pe=l.value,ae=f(ne.value);pe!==ae&&(l.value=ae,r("input",ae),i.autoEmit&&p(ae),ne.value!==ae&&(ne.value=ae,Ct(()=>{let re=ie;if(ae.length<ne.value.length)re=ie;else{const W=ae.length-pe.length;re=ie+W}re=Math.max(0,Math.min(re,ae.length)),ne.setSelectionRange(re,re)})))},v=N=>{if(i.disabled||i.readOnly){N.preventDefault();return}u.value=!0;const V=l.value;l.value="",r("update:modelValue",""),r("clear"),V!==""&&r("change",""),N.preventDefault(),N.stopImmediatePropagation(),N.stopPropagation(),Ct(()=>{var ne;(ne=a.value)==null||ne.focus(),setTimeout(()=>{u.value=!1},100)})},C=N=>{i.disabled||i.readOnly||(r("focus",N),i.selectOnFocus&&Ct(()=>{N.target.select()}))},S=N=>{if(u.value)return;const ne=N.target.value;i.autoEmit||r("update:modelValue",ne),c.value!==ne&&(r("change",ne),c.value=ne),r("blur",ne,N)},b=N=>{setTimeout(()=>{Ct(()=>{const ne=N.target.value;r("enter",ne,N),r("enterValue",ne),i.submitOnEnter&&(N.preventDefault(),i.autoEmit||r("update:modelValue",ne),c.value!==ne&&(r("change",ne),c.value=ne))})},1e3)},w=N=>{const V=N.target,ne=V.value;if(r("escape",ne,N),N.preventDefault(),N.stopImmediatePropagation(),N.stopPropagation(),i.autoEmit){r("cancel"),i.blurOnEscape&&V.blur();return}l.value=i.modelValue||"",a.value&&(a.value.value=l.value),r("cancel"),i.blurOnEscape&&V.blur()},_=N=>{const ne=N.target.value;r("tab",ne,N),i.autoEmit||(r("update:modelValue",ne),c.value!==ne&&(r("change",ne),c.value=ne))},R=(N,V,ne)=>N===""?!0:N==="."?ne>0:new RegExp(`^\\d{0,${V}}(\\.\\d{0,${ne}})?$`).test(N),T=N=>{if(r("keydown",N),N.key===" "&&N.stopPropagation(),i.type==="number"){if(N.key==="e"||N.key==="E"){N.preventDefault();return}if(!(["Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Tab","Enter","Escape","Home","End"].includes(N.key)||N.ctrlKey||N.metaKey||N.altKey)){if(Number.isNaN(Number(N.key))&&N.key!=="."&&N.key!=="-"){N.preventDefault();return}const ie=l.value+N.key;if(!R(ie,17,i.maxDecimalChar||2)){N.preventDefault(),console.log("BLOCKED",ie);return}}}N.key==="Escape"?w(N):N.key==="Enter"?b(N):N.key==="Tab"?_(N):(N.key==="ArrowUp"||N.key==="ArrowDown")&&i.type==="number"&&N.preventDefault()},I=N=>{r("keyup",N)},x=N=>{if(i.disabled||i.readOnly){N.preventDefault();return}r("paste",N)},P=N=>{if(i.disabled||i.readOnly){N.preventDefault();return}r("cut",N)},D=N=>{r("select",N)},F=`input-text-${Math.random().toString(36).substr(2,9)}`,k=B(!1),O=Y(()=>{switch(i.type){case"number":return"decimal";case"email":return"email";case"tel":return"tel";case"url":return"url";default:return"text"}});nt(()=>l.value,N=>{i.validatorFnc?k.value=!!N&&!i.validatorFnc(N):k.value=!1});const $=B(null),q=Y(()=>({disabled:i.disabled,readOnly:i.readOnly,error:k.value,inputRef:a,clickable:!i.disabled&&!i.readOnly,focused:i.focused,wrapperRef:$,bordered:!0})),{argsMain:J,isHover:ee,isFocus:X}=ws(q);t({triggerFocus:()=>{Ct(()=>{var N;(N=a.value)==null||N.focus()})},focus:()=>{ve()},blur:()=>{Ct(()=>{var N;(N=a.value)==null||N.blur()})},select:()=>{Ct(()=>{var N;(N=a.value)==null||N.select()})},setSelectionRange:(N,V)=>{Ct(()=>{var ne;(ne=a.value)==null||ne.setSelectionRange(N,V)})},getValue:()=>l.value,setValue:N=>{l.value=f(N),a.value&&(a.value.value=l.value)},reset:()=>{l.value=i.modelValue||"",a.value&&(a.value.value=l.value)}});const ve=()=>{!i.disabled&&!i.readOnly&&Ct(()=>{var N;(N=a.value)==null||N.focus()})},te=Y(()=>X.value&&d.value);return(N,V)=>(j(),ce("div",{class:Q([N.$style["input-wrapper"],"input-editor"]),onClick:ve},[Ke((j(),qe(Cs,nn(U(J),{ref_key:"wrapperRef",ref:$,class:[N.$style["input-box"],{[N.$style["is-hovered"]]:U(ee),[N.$style["is-focused"]]:U(X),[N.$style["has-input"]]:d.value,[N.$style["is-editting"]]:te.value}],style:{"--icon-size":"20px","--gap-size":"4px"},bordered:i.bordered}),{prefix:me(()=>[Tt(N.$slots,"prefix")]),suffix:me(()=>[d.value&&!i.disabled&&!i.readOnly?Tt(N.$slots,"clear",{key:0},()=>[Ke((j(),qe(mt,{variant:["icon","tertiary"],"aria-label":"Clear search",onMousedown:Pt(v,["prevent","stop"]),size:18,rounded:!0,class:Q(["wrapper-suffix",N.$style["clear-button"]])},{default:me(()=>[ge(lt,{src:"CircleXMark",size:"20",color:"var(--primary-color)"})]),_:1},8,["class"])),[[U(o),{content:"Clear",contentClass:"extra-padding"}]])]):Tt(N.$slots,"suffix",{key:1})]),default:me(()=>[Ee("input",{tabindex:"-1",ref_key:"inputRef",ref:a,type:"text",value:l.value,placeholder:e.placeholder,class:Q([N.$style["column-config__input"]]),id:F,disabled:e.disabled,readonly:e.readOnly,inputmode:O.value,maxlength:i.maxLength,onInput:g,onFocus:C,onBlur:S,onKeydown:T,onKeyup:I,onPaste:x,onCut:P,onSelect:D},null,42,TY)]),_:3},16,["class","bordered"])),[[U(s),i.focusIndex]]),k.value?Tt(N.$slots,"error",{key:0}):Je("",!0)],2))}}),[["__cssModules",{$style:{"input-box":"_input-box_wqanj_1","is-disabled":"_is-disabled_wqanj_16","is-readonly":"_is-readonly_wqanj_16","is-hovered":"_is-hovered_wqanj_16","is-focused":"_is-focused_wqanj_20","column-config__input":"_column-config__input_wqanj_40","clear-button":"_clear-button_wqanj_55"}}]]),IY={class:"wrapper-prefix",style:{width:"18px",height:"18px"}},iS=rt({__name:"SearchBox",props:{modelValue:{default:""},placeholder:{default:"Search"},focused:{type:Boolean},validatorFnc:{},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{},bordered:{type:Boolean},focusIndex:{default:void 0}},emits:["update:modelValue","search","clear","cancel"],setup(e,{expose:t,emit:n}){const s=e,o=n,i=B(null),r=Ti(u=>{o("update:modelValue",u),o("search",u)},rr),a=()=>{o("update:modelValue",""),o("clear"),Ct(()=>{var u;(u=i.value)==null||u.focus()})},l=B(s.modelValue);return t({focus:()=>{var u;(u=i.value)==null||u.focus()},setValue(u){l.value=u}}),(u,c)=>(j(),qe(oS,{focusIndex:s.focusIndex,ref_key:"searchInput",ref:i,modelValue:l.value,"onUpdate:modelValue":c[0]||(c[0]=d=>l.value=d),type:"text",placeholder:e.placeholder,onInput:U(r),onClear:a,onCancel:c[1]||(c[1]=d=>o("cancel")),"auto-emit":!0},{prefix:me(()=>[Ee("div",IY,[ge(lt,{src:"MagnifyingGlass",color:"var(--grey-200)",size:"14"})])]),_:1},8,["focusIndex","modelValue","placeholder","onInput"]))}}),eu=_t(rt({name:"ListItem",directives:{tooltip:Xt},__name:"ListItem",props:{label:{},value:{},type:{},selected:{type:Boolean},disabled:{type:Boolean},hover:{type:Boolean},clickable:{type:Boolean,default:!0},danger:{type:Boolean},data:{},icon:{},readOnly:{type:Boolean,default:!1},show:{type:Boolean},focusIndex:{}},emits:["click","handleClick","keydown","update:selected","select","escape"],setup(e,{expose:t,emit:n}){const s=e,o=n,i=B(!1),r=B(!1);function a(w){if(!w||typeof w!="object")return!1;const _=w;return typeof _.name=="string"&&typeof _.id=="string"&&typeof _.initial=="string"}const l=Y(()=>s.type==="status"||s.type==="assignee"||s.type==="icon"||!!b.prefix),u=Y(()=>!!b.suffix||s.danger&&i.value),c=Y(()=>{var w;return s.type==="status"&&typeof((w=s.data)==null?void 0:w.color)=="string"?{backgroundColor:s.data.color,border:Lg(s.data.color,"white")?"1px solid #ccc":"1px solid #fff"}:{}}),d=vg(),h=Y(()=>({[d.active]:s.selected??!1,[d.disabled]:s.disabled??!1,[d.hover]:s.hover??!1,[d.clickable]:(s.clickable??!0)&&!s.disabled,[d.danger]:s.danger??!1,[d["has-prefix"]]:l.value,[d["has-suffix"]]:u.value,[d.readOnly]:s.readOnly}));Y(()=>({content:"Cancel",...S})),Y(()=>({content:"Confirm",theme:"warning",...S}));function f(w){return{name:w.name,initial:w.initial,id:w.id,profile_image:w.profile_image??null,color:w.color,size:24}}function p(){i.value=!1}function g(w){w?o("click",w):(s.clickable??!0)&&(o("update:selected",!s.selected),o("select",!s.selected))}function v(w){if(!s.disabled){if(s.danger&&!i.value){i.value=!0;return}else s.danger||g(w);o("handleClick",w)}}const C=()=>{i.value?p():o("escape")},S=Object.freeze({delay:[300,0],contentClass:["extra-padding"]}),b=sg();return nt(()=>s.show,w=>{w===!1&&(i.value=!1)}),t({select:()=>{v(new MouseEvent("click",{bubbles:!0,cancelable:!0}))}}),(w,_)=>{const R=Eo("focusable"),T=Eo("tooltip");return Ke((j(),qe(mt,{variant:["menu-item",e.danger?"danger":"menu-item"],class:Q([w.$style["list-item"],h.value]),onHandleClick:v,onMouseenter:_[0]||(_[0]=I=>r.value=!0),onMouseleave:_[1]||(_[1]=I=>r.value=!1),onEscape:C,style:{width:"200px"}},{default:me(()=>[l.value?(j(),ce("div",{key:0,class:Q(w.$style["list-item__prefix"])},[Tt(w.$slots,"prefix",{},()=>[e.type==="icon"&&e.icon?(j(),qe(lt,{key:0,src:e.icon,source:"remote",class:Q(w.$style["item-icon"]),color:s.danger?void 0:"#a6a6a6"},null,8,["src","class","color"])):e.type==="status"?(j(),ce("div",{key:1,class:Q(w.$style["status-indicator"]),style:dn(c.value)},null,6)):e.type==="assignee"&&a(e.data)?(j(),qe(Ih,nn({key:2},f(e.data),{class:w.$style["item-avatar"],readOnly:!0}),null,16,["class"])):Je("",!0)])],2)):Je("",!0),Ee("div",{class:Q(w.$style["list-item__label"])},[Tt(w.$slots,"label",{selected:e.selected},()=>[tt(wt(e.label),1)])],2),u.value?(j(),ce("div",{key:1,class:Q(w.$style["list-item__suffix"])},[Tt(w.$slots,"suffix",{item:w.$props,hovered:r.value},()=>[e.danger&&i.value?(j(),ce("div",{key:0,class:Q(w.$style["confirm-action"])},[Ke((j(),qe(mt,{variant:["tertiary","icon","danger"],size:"small",onClick:Pt(p,["stop","prevent"])},{default:me(()=>[ge(lt,{src:"Xmark",source:"remote"})]),_:1})),[[R,`${s.focusIndex}.0`],[T,{content:"Cancel ",delay:[300,0],contentClass:["extra-padding"]}]]),Ke((j(),qe(mt,{variant:["danger","primary","icon"],size:"small",onClick:Pt(g,["stop","prevent"])},{default:me(()=>[ge(lt,{src:"Check",source:"remote"})]),_:1})),[[R,`${s.focusIndex}.1`],[T,{delay:[300,0],contentClass:["extra-padding"],content:"Confirm ",theme:"warning"}]])],2)):Je("",!0)])],2)):Je("",!0)]),_:3},8,["variant","class"])),[[R,s.focusIndex]])}}}),[["__cssModules",{$style:{"list-item":"_list-item_17x7d_1",disabled:"_disabled_17x7d_16",danger:"_danger_17x7d_23","has-prefix":"_has-prefix_17x7d_26","has-suffix":"_has-suffix_17x7d_26",clickable:"_clickable_17x7d_40",readOnly:"_readOnly_17x7d_43",hover:"_hover_17x7d_47",active:"_active_17x7d_53","list-item__prefix":"_list-item__prefix_17x7d_78","list-item__label":"_list-item__label_17x7d_86","list-item__suffix":"_list-item__suffix_17x7d_100","status-indicator":"_status-indicator_17x7d_107","item-icon":"_item-icon_17x7d_113","arbo-icon-state":"_arbo-icon-state_17x7d_118","item-avatar":"_item-avatar_17x7d_121","confirm-action":"_confirm-action_17x7d_130"}}]]),xY=["aria-activedescendant"],FY=["innerHTML"],PY=10,Jr=_t(rt({__name:"SearchList",props:{options:{default:()=>[]},selectedId:{},loading:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},hasMore:{type:Boolean,default:!1},error:{default:null},params:{},maxHeight:{default:"218px"},width:{default:"250px"},minQueryLength:{default:0}},emits:["select","close","search","loadMore","cancel","tab"],setup(e,{expose:t,emit:n}){const s=Xt,o={ARROW_DOWN:"ArrowDown",ARROW_UP:"ArrowUp",ENTER:"Enter",ESCAPE:"Escape",TAB:"Tab"},i=e,r=n,a=B(""),l=B(-1),u=B(null),c=B(null),d=B(new Map),h=Y(()=>Cb(a.value)),f=()=>{const te=h.value;if(!te||te.length<i.minQueryLength)return i.options;if(d.value.has(te))return d.value.get(te);const N=i.options.map(V=>({item:V,score:TK(` ${V.label} `,te)})).filter(({score:V})=>V>0).sort((V,ne)=>ne.score-V.score).map(({item:V})=>V);return d.value.set(te,N),N},p=B([]);nt(()=>i.options,()=>{p.value=f()},{immediate:!0,deep:!0});const g=Y(()=>i.hasMore&&!i.loading&&!i.loadingMore),v=Ti(te=>{a.value=te,l.value=-1,r("search",te)},rr),C=async te=>{X.value=0,await v(te||""),X.value=1},S=te=>a.value?IK(te,a.value):te,b=te=>{const V={[o.ARROW_DOWN]:()=>w(te),[o.ARROW_UP]:()=>_(te),[o.ENTER]:()=>I(te),[o.ESCAPE]:()=>x(te),[o.TAB]:()=>P(te)}[te.key];V&&V()},w=te=>{te.preventDefault(),R(1)},_=te=>{te.preventDefault(),R(-1)},R=te=>{const N=p.value.length;if(N===0)return;let V;te>0?V=(l.value+1)%N:l.value>0?V=l.value-1:V=N-1,l.value=V,T()},T=()=>{Ct(()=>{var N;const te=(N=c.value)==null?void 0:N.querySelectorAll('[role="menuitem"]')[l.value];te==null||te.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})},I=te=>{if(te.preventDefault(),l.value>=0&&l.value<p.value.length){const V=p.value[l.value];D(V,te)}},x=te=>{te.preventDefault(),k()},P=te=>{r("tab",te)},D=(te,N)=>{!te||te.disabled||(r("select",te,N),l.value=-1,k())},F=te=>{te>=0&&te<p.value.length&&(l.value=te)},k=()=>{r("close")},O=()=>{if(!g.value||!c.value)return;const{scrollTop:te,clientHeight:N,scrollHeight:V}=c.value;V-(te+N)<=PY&&r("loadMore")},$=()=>{var te,N,V;(te=c.value)==null||te.addEventListener("scroll",O),(V=(N=ee.value)==null?void 0:N.$el)==null||V.addEventListener("keydown",b)},q=()=>{var te,N,V;(te=c.value)==null||te.removeEventListener("scroll",O),(V=(N=ee.value)==null?void 0:N.$el)==null||V.removeEventListener("keydown",b)};tn(()=>{$()}),vs(()=>{q()}),nt(()=>i.loading,te=>{!te&&p.value.length>0&&(l.value=-1)});const J=te=>te?Array.isArray(i.selectedId)?i.selectedId.includes(String(te.id)):i.selectedId==te.id:!1,ee=B(null);nt(l,()=>{T()}),t({focus:()=>{Ct(()=>{var te;(te=ee.value)==null||te.focus()})},reset:()=>{var te;(te=ee.value)==null||te.focus(),l.value=-1},query:a,filteredOptions:p,selectedIndex:l,closeDropdown:k,clearSearch:()=>{a.value=""},scrollTo:te=>{c.value&&(c.value.scrollTop=te)},selectIndex:te=>{te>=0&&te<p.value.length&&(l.value=te,T())}});const X=B(0);nt([()=>i.loading,()=>a.value,()=>i.options,()=>i.loadingMore],()=>{const te=i.options.length>0&&p.value.length>0,N=!te&&a.value.length>0,V=!te&&a.value.length===0;i.loading?X.value=0:te?X.value=1:N?X.value=2:V&&(X.value=3)},{immediate:!0,deep:!0});const ve=()=>{r("cancel")};return(te,N)=>(j(),ce("datalist",{ref_key:"searchListRef",ref:u,class:Q([te.$style["search-list"],X.value===3||X.value===2?te.$style.empty:"",p.value.length>8?te.$style.scrollable:""]),"aria-activedescendant":l.value>=0?`item-${l.value}`:void 0,style:dn({width:e.width})},[ge(iS,{ref_key:"searchBoxRef",ref:ee,modelValue:a.value,"onUpdate:modelValue":N[0]||(N[0]=V=>a.value=V),class:Q(te.$style["search-box"]),disabled:e.loading,onSearch:C,onClear:N[1]||(N[1]=V=>C("")),onCancel:ve},null,8,["modelValue","class","disabled"]),Ee("div",{ref_key:"popupRef",ref:c,class:Q(te.$style["list-container"])},[Tt(te.$slots,"extra-item",{query:a.value,isEmpty:X.value===3||X.value===2,isLoading:i.loading}),(j(!0),ce(xt,null,xn(p.value,(V,ne)=>Ke((j(),ce("div",{key:`${V.id}-${ne}`,role:"menuitem"},[Tt(te.$slots,"item",{item:V,index:ne,selectedIndex:l.value,isSelected:J,handleSelect:D,handleItemHover:F,getHighlightedLabel:S,query:a.value,idx:ne,focused:l.value==ne},()=>[V.hide?Je("",!0):(j(),qe(eu,nn({key:0,ref_for:!0},V,{hover:ne===l.value,selected:J(V),type:V.type,id:`item-${ne}`,"aria-selected":ne===l.value,onClick:ie=>D(V,ie),onMouseover:ie=>F(ne),onEscape:k}),{prefix:me(()=>[Tt(te.$slots,"prefix-item",{item:V})]),label:me(()=>[a.value?Ke((j(),ce("span",{key:0,class:Q(te.$style.match),innerHTML:S(V.label)},null,10,FY)),[[U(s),{content:V.label,delay:[1e3,0]}]]):Ke((j(),ce("span",{key:1,class:Q(te.$style["item-label"])},[tt(wt(V.label),1)],2)),[[U(s),{content:V.label,delay:[1e3,0]}]])]),suffix:me(({hovered:ie})=>[Tt(te.$slots,"action",{item:V,isHovered:ne===l.value,hovered:ie,selected:l.value==ne})]),_:2},1040,["hover","selected","type","id","aria-selected","onClick","onMouseover"]))])])),[[Do,X.value===1]])),128)),X.value===0?Tt(te.$slots,"loading-more",{key:0},()=>[(j(),ce(xt,null,xn(8,V=>Ee("div",{class:Q(te.$style["loading-more"]),key:V},[Ee("div",{class:Q(te.$style["loading-skeleton"])},null,2),Ee("div",{class:Q(te.$style["loading-skeleton"])},null,2)],2)),64))]):Je("",!0),X.value===2?(j(),ce("div",{key:1,class:Q(te.$style["no-results"])},[Tt(te.$slots,"empty",{query:a.value},()=>[Ee("div",{class:Q(te.$style["no-results-content"])},[...N[2]||(N[2]=[Ee("div",null,[tt(" No results. "),Ee("br"),tt(" Try another search. ")],-1)])],2)])],2)):Je("",!0),X.value===3?(j(),ce("div",{key:2,class:Q(te.$style["no-results"])},[Tt(te.$slots,"empty-list",{},()=>[Ee("div",{class:Q(te.$style["no-results-content"])},[...N[3]||(N[3]=[Ee("div",null,"No items available.",-1)])],2)])],2)):Je("",!0),Tt(te.$slots,"footer")],2)],14,xY))}}),[["__cssModules",{$style:{"search-list":"_search-list_1rcj9_1",empty:"_empty_1rcj9_11",scrollable:"_scrollable_1rcj9_17","list-container":"_list-container_1rcj9_24","item-label":"_item-label_1rcj9_45","loading-state":"_loading-state_1rcj9_53","loading-more":"_loading-more_1rcj9_54","loading-skeleton":"_loading-skeleton_1rcj9_65","is-loading":"_is-loading_1rcj9_72","no-results":"_no-results_1rcj9_127","no-results-content":"_no-results-content_1rcj9_134",title:"_title_1rcj9_137",tips:"_tips_1rcj9_143",match:"_match_1rcj9_157","skeleton-loading":"_skeleton-loading_1rcj9_1"}}]]),Oc=rt({__name:"AvatarProfile",props:{user:{},showProfile:{type:Boolean,default:!0},apiUpdateFunction:{},appendTo:{}},setup(e){const t=gz,n=e,s=B(n.appendTo||void 0),o=()=>({user:n.showProfile?n.user:void 0,placement:"bottom-start",showInsightButton:!0,showCopyLinkButton:!0,apiUpdateFunction:n.apiUpdateFunction,appendTo:s.value}),i=B(o());nt(()=>n,()=>{setTimeout(()=>{Ct(()=>{s.value=n.appendTo||void 0,i.value=o()})},50)},{immediate:!0,deep:!0});const r=Y(()=>({id:n.user.id,name:n.user.name,profile_image:n.user.profile_image,color:n.user.color,initial:n.user.initial}));return(a,l)=>Ke((j(),qe(Ih,iR(Lw(r.value)),null,16)),[[U(t),i.value]])}}),AY={class:"avatar-wrapper"},kY={class:"assignee-label"},GA=_t(rt({__name:"AssigneeItem",props:{user:{},hover:{type:Boolean},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},multipleSelect:{type:Boolean,default:!1},isMe:{type:Boolean},appendTo:{},apiUpdateFunction:{}},emits:["select","deselect","reselect"],setup(e,{emit:t}){const n=Xt,s=e,o=Y(()=>({name:s.user.name,id:s.user.id,profile_image:s.user.profile_image,color:{bgColor:s.user.color.bgColor,textColor:s.user.color.textColor},initial:s.user.initial})),i=Y(()=>s.isMe),r=sg(),a=Y(()=>{if(!l.value&&!s.hover&&!s.focused||!r.actions)return 0;let u=0;const c=d=>{d.forEach(h=>{h.type===xt&&Array.isArray(h.children)?c(h.children):h.type!==qn&&h.type!==Ra&&u++})};return c(r.actions()),u}),l=B(!1);return(u,c)=>(j(),ce("div",{class:Q(["assignee-selector-item",{hovered:l.value||s.hover,disabled:s.disabled,selected:s.selected,single:a.value==0,focused:s.focused}]),style:dn({"--actions-count":a.value}),onMouseenter:c[0]||(c[0]=d=>l.value=!0),onMouseleave:c[1]||(c[1]=d=>l.value=!1)},[Ee("div",AY,[ge(Oc,{user:o.value,"show-profile":!0,isMe:i.value,"append-to":s.appendTo,"api-update-function":s.apiUpdateFunction},null,8,["user","isMe","append-to","api-update-function"]),s.multipleSelect?(j(),ce("div",{key:0,class:Q(["avatar-indicator",[s.selected?"remove":"add"]])},[s.selected?(j(),qe(lt,{key:0,src:"CircleXMark"})):(j(),qe(lt,{key:1,src:"CirclePlus"}))],2)):Je("",!0)]),Ke((j(),ce("div",kY,[Tt(u.$slots,"name",{},()=>[tt(wt(s.user.name),1)],!0)])),[[U(n),{content:s.user.name,delay:[1e3,0]}]]),l.value||s.hover||s.focused?Tt(u.$slots,"actions",{key:0},void 0,!0):Je("",!0)],38))}}),[["__scopeId","data-v-690cf591"]]),OY={class:"unassign-icon"},rS=_t(rt({__name:"UnassignBtn",props:{actived:{type:Boolean,default:!1},label:{default:"No assignee"},borderLeft:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t,s=()=>{n("click")};return(o,i)=>(j(),qe(U(mt),{variant:"menu-item",onClick:s,actived:e.actived,style:dn({"border-top-width":0,"border-bottom-width":0,"border-left-width":e.borderLeft?"4px":"0"})},{prefix:me(()=>[Ee("div",OY,[Tt(o.$slots,"icon",{},()=>[i[0]||(i[0]=Ee("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M2.17953 2.75285C1.98276 2.5977 1.69706 2.63365 1.54191 2.83042C1.38677 3.0272 1.42271 3.3129 1.61949 3.46805L12.8204 12.2471C13.0172 12.4023 13.3029 12.3663 13.458 12.1696C13.6132 11.9728 13.5772 11.6871 13.3805 11.532L8.13003 7.41675C9.16308 7.14051 9.9218 6.19827 9.9218 5.07818C9.9218 3.7405 8.83765 2.65636 7.49997 2.65636C6.17932 2.65636 5.10653 3.71212 5.07815 5.0252L2.17953 2.75285ZM6.4461 8.41386C4.67136 8.51035 3.26179 9.98237 3.26179 11.7817C3.26179 12.092 3.51343 12.3436 3.82372 12.3436H11.1762C11.25 12.3436 11.32 12.3304 11.3843 12.3039L6.4461 8.41386Z",fill:"#a6a6a6"})],-1))],!0)])]),default:me(()=>[Tt(o.$slots,"label",{},()=>[tt(wt(e.label),1)],!0)]),_:3},8,["actived","style"]))}}),[["__scopeId","data-v-ec3b3a15"]]),MY=["innerHTML"],NY=20,UA=_t(rt({__name:"AssigneeGroupEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},ids:{}},emits:["updated","cancel","update-start","update-failed","update-completed"],setup(e,{expose:t,emit:n}){const s=Xt,o=e,{id:i}=Up(o),r=n,a=V=>{var ie,pe;const ne=(pe=(ie=o.params)==null?void 0:ie.api)==null?void 0:pe.getRowNode(String(i.value));ne==null||ne.setDataValue("assignees",$I(V.assignees)),N("updated",V),console.log("Row data updated with new assignees:",V.assignees)},l=B(!1),u=B(!1),c=B(null),d=B(1),h=B(!0),f=B(0),p=B(""),g=En("bulkUpdate",B(!1)),v=En("isSelectAll",B(!1)),{unAssignAll:C,replaceAssignees:S,handleSelect:b,assigneeList:w,mergedOptions:_,selectedUserIds:R}=mm({...o,entityId:o.entityId,updateRowData:a,value:o.value,isBulkUpdate:g,isSelectAll:v,errorCallback:()=>{N("update-failed")}}),{apiServices:T}=ts(!g.value,o),I=En("workspaceId"),x=async(V=1,ne="",ie=!1)=>{var pe,ae,re,W,fe;if(!T.value||!o.id&&!o.ids)throw console.error("API service or item identifiers are undefined",T.value,o.id,o.ids),new Error("API service or item identifiers are undefined");if(ie?u.value=!0:l.value=!0,c.value=null,!((pe=T.value)!=null&&pe.multipleAssignableUser))throw new Error("API service getAssignableUsers is undefined");try{const oe=await((ae=T.value)==null?void 0:ae.multipleAssignableUser({workspaceId:String(I),itemIds:(o.ids??(o.id?[o.id]:[])).map(String),page:V,perPage:NY,q:ne.trim()})),Ie=((re=Ec(oe.data))==null?void 0:re.map(gm))??[];w.value=ie?uc(w.value,Ie,"id"):Ie,f.value=oe.meta.total,h.value=(((W=oe==null?void 0:oe.meta)==null?void 0:W.current_page)||0)<(((fe=oe==null?void 0:oe.meta)==null?void 0:fe.last_page)||0),d.value=V}catch(oe){console.error("Error fetching assignable users:",oe),c.value="Failed to load assignable users"}finally{l.value=!1,u.value=!1}},P=()=>{!u.value&&h.value&&x(d.value+1,p.value,!0)},D=Ti(async V=>{p.value=V,await x(1,V,!1)},rr),F=()=>x(1,p.value,!1);tn(()=>{var V;(V=O.value)==null||V.focus()}),t({getValue:()=>{var V;return(V=_.value.find(ne=>ne.selected))==null?void 0:V.value},refresh:F,clearInternal:()=>{R.value=[]},focus:()=>{var V;(V=O.value)==null||V.focus()}});const k=()=>{const V=_n.getInstance().getItem("BASE_URL"),ne=Ao({type:"access_setting",config:{baseDomain:V,ws_code:o.workspaceId,entity_id:I}}).url;window.open(ne,"_blank")},O=B(null);tn(()=>{Ct(()=>{var V;(V=O.value)==null||V.focus()})}),nt([()=>o.id,()=>o.workspaceId,()=>o.ids],()=>{x()},{deep:!0,immediate:!0});const $=V=>{var ie;const ne=_n.getInstance().getItem("ws.code");return((ie=T.value)==null?void 0:ie.getUserInformation(ne,V))||Promise.resolve(null)},q=async(V,ne,ie)=>{ne.preventDefault(),ne.stopPropagation(),ne.stopImmediatePropagation(),N("update-start");try{const pe=await b(V)}catch(pe){N("update-failed"),console.error("Error updating assignees:",pe)}finally{N("update-completed")}},J=async()=>{try{N("update-start");const V=await C()}catch(V){N("update-failed"),console.error("Error unassigning all assignees:",V)}finally{N("update-completed")}},ee=async V=>{try{N("update-start");const ne=await S(V)}catch(ne){N("update-failed"),console.error("Error replacing assignees:",ne)}finally{N("update-completed")}},X=()=>{var V,ne;r("cancel"),(ne=(V=o.params)==null?void 0:V.api)==null||ne.stopEditing()};Zi("popupAttachRef",O);const ve=B(),te=B(!1),N=(V,ne)=>{switch(V){case"updated":console.log("Emitting updated event with params:",ne),r("updated",ne);break;case"update-start":r("update-start");break;case"update-failed":r("update-failed");break;case"update-completed":r("update-completed");break}};return tn(()=>{Ct(()=>{setTimeout(()=>{te.value=!0},50)})}),(V,ne)=>(j(),ce("div",{class:"assigne-editor-wrapper",ref_key:"wrapperRef",ref:ve},[ge(Jr,nn({"selected-id":U(R)},{...o},{options:U(_),loading:l.value,ref_key:"popupRef",ref:O,"loading-more":u.value,"has-more":h.value,onSelect:ne[0]||(ne[0]=(ie,pe)=>{q(ie,pe)}),"data-wrapper":"true",onSearch:U(D),onLoadMore:P,onCancel:X,onClose:X}),nh({"extra-item":me(({isEmpty:ie,isLoading:pe})=>[!ie&&!pe?(j(),qe(rS,{key:0,onClick:J,actived:!1,label:"Unassign"},{icon:me(()=>[ge(lt,{src:"UserXMark",source:"remote"})]),_:1})):Je("",!0)]),item:me(({item:ie,selectedIndex:pe,isSelected:ae,handleItemHover:re,getHighlightedLabel:W,query:fe,idx:oe,focused:Ie})=>[ge(GA,{user:ie.data,"multiple-select":!0,"append-to":ve.value,isMe:!1,hover:oe===pe,selected:ae(ie),focused:Ie,onClick:Pt(G=>q(ie,G,"click"),["stop","prevent"]),onMouseover:G=>re(oe),"api-update-function":$},{name:me(()=>[fe?Ke((j(),ce("span",{key:0,class:Q([V.$style["item-label"],V.$style.match]),style:{flex:"1"},innerHTML:W(ie.label)},null,10,MY)),[[U(s),{content:ie.label}]]):Ke((j(),ce("span",{key:1,class:Q(V.$style["item-label"]),style:{flex:"1"}},[tt(wt(ie.label),1)],2)),[[U(s),{content:ie.label}]])]),actions:me(()=>[Ke((j(),qe(mt,{tabindex:-1,variant:["secondary","icon"],size:"small",label:"",onClick:Pt(G=>{var Z;return ee((Z=ie.data)==null?void 0:Z.id)},["stop"])},{default:me(()=>[ge(lt,{src:"PeopleArrows"})]),_:1},8,["onClick"])),[[U(s),"Unassign others and reassign"]])]),_:2},1032,["user","append-to","hover","selected","focused","onClick","onMouseover"])]),"empty-list":me(()=>[Ee("div",{class:Q(V.$style["empty-state"])},[ne[3]||(ne[3]=tt(" No assignee available. ",-1)),ne[4]||(ne[4]=Ee("br",null,null,-1)),ge(mt,{onClick:k,variant:["tertiary"],size:"small"},{default:me(()=>[...ne[2]||(ne[2]=[tt(" Go to Access Settings to add team. ",-1)])]),_:1})],2)]),_:2},[c.value?{name:"error",fn:me(()=>[Ee("div",{class:Q(V.$style["error-message"])},[tt(wt(c.value)+" ",1),ge(mt,{onClick:F,size:"small"},{default:me(()=>[...ne[1]||(ne[1]=[tt(" Retry ",-1)])]),_:1})],2)]),key:"0"}:void 0]),1040,["selected-id","options","loading","loading-more","has-more","onSearch"])],512))}}),[["__cssModules",{$style:{action:"_action_nv6on_1","item-assignee":"_item-assignee_nv6on_6","item-action":"_item-action_nv6on_6","item-label":"_item-label_nv6on_16","error-message":"_error-message_nv6on_25","empty-state":"_empty-state_nv6on_35","skeleton-avatar":"_skeleton-avatar_nv6on_48"}}]]),LY={class:"inner"},sf=_t(rt({__name:"BulkUpdateBtnWrapper",props:{isUpdating:{type:Boolean,default:!1},disabled:{type:Boolean}},emits:["onVisibleChange"],setup(e,{expose:t,emit:n}){const s=e,o=B(null),{triggerRef:i,popupRef:r,isVisible:a,hide:l,toggle:u,show:c}=Fs({toggleOnClick:!0,zIndex:2,disabled:s.disabled,placement:"top",appendTo:o.value||void 0}),d=B(null),h=p=>{p.key==="Escape"&&r.value&&l()};tn(()=>{var g;const p=d.value instanceof HTMLElement?d.value:(g=d.value)==null?void 0:g.$el;p&&p.addEventListener("keydown",h)}),vs(()=>{var g;const p=d.value instanceof HTMLElement?d.value:(g=d.value)==null?void 0:g.$el;p&&p.removeEventListener("keydown",h)});const f=n;return nt(()=>a.value,(p,g)=>{f("onVisibleChange",p,g)}),t({hide:l,isVisible:a,open:c}),(p,g)=>(j(),ce("div",{class:"bulk-update-btn-wrapper",ref_key:"containerRef",ref:o},[Ee("div",{class:"trigger-slot",ref_key:"triggerRef",ref:i},[Tt(p.$slots,"trigger",{isVisible:U(a),hide:U(l),disabled:s.isUpdating||s.disabled,popupRef:U(r),triggerRef:U(i),toggle:U(u)},void 0,!0)],512),Ee("div",{class:"popup-slot",ref_key:"popupRef",ref:r},[Ke(Ee("div",LY,[Tt(p.$slots,"popup",{isVisible:U(a),hide:U(l),popupRef:U(r),triggerRef:U(i),toggle:U(u),open:U(c)},void 0,!0)],512),[[Do,!s.isUpdating&&!s.disabled]])],512)],512))}}),[["__scopeId","data-v-97100c8a"]]),VY=rt({__name:"AssignneeUpdateButton",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},ids:{},variant:{}},emits:["update","update-start","update-completed","update-failed"],setup(e,{emit:t}){const n=e;Zi("bulkUpdate",!0);const s=B(!1),o=t,i=B(null),r=()=>{s.value=!0,o("update-start")},a=d=>{setTimeout(()=>{var h,f,p;s.value=!1,(h=l.value)==null||h.hide(),d?(o("update-completed"),(f=l.value)==null||f.hide()):(o("update-failed"),(p=l.value)==null||p.open())},300)},l=B(null),u=d=>{var h;console.log("Updating assignees with params:",d),o("update",d),(h=i.value)==null||h.clearInternal()},c=(d,h)=>{Ct(()=>{var f,p;d?(f=i.value)==null||f.focus():(p=i.value)==null||p.clearInternal()})};return(d,h)=>(j(),qe(sf,{ref_key:"wrapperRef",ref:l,isUpdating:s.value,disabled:n.disabled||s.value,onOnVisibleChange:c},{trigger:me(({hide:f,disabled:p})=>[ge(mt,{variant:n.variant,loading:s.value,disabled:p,onEscape:f},{default:me(()=>[ge(lt,{src:"UserPlus",class:"icon"}),h[2]||(h[2]=tt(" Assignee ",-1))]),_:1},8,["variant","loading","disabled","onEscape"])]),popup:me(({hide:f})=>[ge(UA,nn({ref_key:"assigneeGroupEditorRef",ref:i},n,{ids:e.ids,onUpdated:u,onUpdateStart:r,onUpdateFailed:h[0]||(h[0]=p=>a(!1)),onUpdateCompleted:h[1]||(h[1]=p=>a(!0)),onCancel:f}),null,16,["ids","onCancel"])]),default:me(()=>[h[3]||(h[3]=tt(" > ",-1))]),_:1},8,["isUpdating","disabled"]))}}),of=["start-input","due-input","prev-btn","month-btn","year-btn","next-btn","month-selection","year-selection","date-selection","today-btn","cancel-btn","save-btn"],BY=new Set(["Tab","Enter","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),Ga=(e,t)=>{const n=s=>{var o,i;if(s.key==="Tab"){const r=s.shiftKey||s.metaKey;s.preventDefault(),s.stopImmediatePropagation(),s.stopPropagation();const a=document.activeElement,l=(o=a==null?void 0:a.dataset)==null?void 0:o.index;if(l){let u=of.indexOf(l);const c=r?-1:1;for(const d of of){u=(u+c+of.length)%of.length;const h=of[u],f=document.querySelector(`[data-index="${h}"]`);if(f){f.focus();return}}}}else if(s.key==="Enter")(i=s.target)==null||i.dispatchEvent(new MouseEvent("click",{bubbles:!0}));else if(s.key==="Escape"){s.stopPropagation(),s.stopImmediatePropagation();const r=document.querySelector('[data-index="calendar-wrapper"]');r==null||r.focus()}};if(BY.has(e.key))e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),n(e),t&&t(e);else return},$Y=["aria-label"],HY=["disabled","readOnly","aria-label","data-date","data-weekday","tabindex","onClick"],GY={style:{flex:"1"}},UY=_t(rt({__name:"MainCalendar",props:rD({year:{},month:{},startDate:{},endDate:{},timezone:{default:"UTC"},activeField:{default:"start"},requireConfirm:{type:Boolean,default:!1},locale:{default:"en-US"},weekdayLabelStyle:{default:"narrow"},weekStart:{default:0},cancelLabel:{default:"Cancel"},confirmLabel:{default:"Confirm"},immediatelyUpdate:{type:Boolean,default:!1},disabled:{type:Boolean},readOnly:{type:Boolean},disableConfirm:{type:Boolean,default:!1}},{tracingCase:{default:()=>({case:"",behavior:""})},tracingCaseModifiers:{}}),emits:rD(["select-start","select-end","select-start-utc","select-end-utc","update:activeField","update:tracingCase","update:month","update:year","close","confirm","cancel","gotoToday"],["update:tracingCase"]),setup(e,{expose:t,emit:n}){const s=Xt,o=B(null),i=e,r=Y(()=>i.startDate&&i.endDate),a=tG(e,"tracingCase"),l=n,u=B(i.year),c=B(i.month);nt(()=>[i.year,i.month],([N,V])=>{u.value=N,c.value=V});const d=Y(()=>bt.fromObject({year:u.value,month:c.value,day:1},{zone:i.timezone}).setLocale(i.locale||"en-US").toFormat("LLLL yyyy")),h=Y(()=>bt.now().setZone(i.timezone)),f=Y(()=>i.startDate?bt.fromJSDate(i.startDate,{zone:i.timezone}):null),p=Y(()=>i.endDate?bt.fromJSDate(i.endDate,{zone:i.timezone}):null),g=B(f.value),v=B(p.value),C=B(f.value),S=B(p.value);nt([f,p],()=>{i.requireConfirm||(g.value=f.value,v.value=p.value,C.value=f.value,S.value=p.value)},{immediate:!0});const b=Y(()=>i.requireConfirm?g.value:f.value),w=Y(()=>i.requireConfirm?v.value:p.value);nt(()=>i.activeField,N=>{const V=N==="start"?b.value:w.value;V&&(u.value=V.year,c.value=V.month)}),nt(()=>{var N,V;return[(N=b.value)==null?void 0:N.toISODate(),(V=w.value)==null?void 0:V.toISODate(),i.activeField]},()=>{const N=i.activeField==="start"?b.value:w.value;N&&(N.year!==u.value||N.month!==c.value)&&(u.value=N.year,c.value=N.month)});function _(N){return N.setZone("utc")}const R=B("");function T(N){R.value=N.toISODate()||"",Ct(()=>{const V=document.querySelector(`.arbo-calendar-day[data-date="${R.value}"]`);V==null||V.focus()})}nt(()=>{var N,V;return[u.value,c.value,i.activeField,(N=b.value)==null?void 0:N.toISODate(),(V=w.value)==null?void 0:V.toISODate()]},()=>{const N=i.activeField==="start"?b.value:w.value;let V;N&&N.year===u.value&&N.month===c.value?V=N:b.value&&b.value.year===u.value&&b.value.month===c.value?V=b.value:V=h.value,T(V)});function I(N){return N.toFormat("d")}const x=Y(()=>{const N=bt.fromObject({year:u.value,month:c.value,day:1},{zone:i.timezone}),V=N.weekday,ne=i.weekStart===1?(V+6)%7:V%7;let ie=N.minus({days:ne});const pe=[],ae=bc.weekdays(i.weekdayLabelStyle||"short",{locale:i.locale||"en-US"}),re=vg();for(let fe=0;fe<42;fe++){const oe=[];ie.month!==c.value&&oe.push(re["is-outside"]),ie.hasSame(h.value,"day")&&oe.push(re["is-today"]),b.value&&ie.hasSame(b.value,"day")&&oe.push(re["is-selected-start"]),w.value&&ie.hasSame(w.value,"day")&&oe.push(re["is-selected-end"]),b.value&&w.value&&ie>b.value&&ie<w.value&&oe.push(re["is-in-range"]);const Ie=I(ie),G=ae[ie.weekday-1]||"";pe.push({dt:ie,iso:ie.toISODate()||"",label:ie.toFormat("d"),displayLabel:Ie,weekdayLabel:G,aria:ie.setLocale(i.locale||"en-US").toFormat("cccc, d LLLL yyyy"),classes:oe}),ie=ie.plus({days:1})}const W=[];for(let fe=0;fe<6;fe++)W.push(pe.slice(fe*7,fe*7+7));return W}),P=Y(()=>{const N=bc.weekdays(i.weekdayLabelStyle||"short",{locale:i.locale||"en-US"});return i.weekStart===1?N:[N[6],...N.slice(0,6)]});function D(N,V,ne){const ie=N==="start"?V.startOf("day"):V.endOf("day"),pe=_(ie),ae={year:ie.year,month:ie.month,day:ie.day,utc:pe.toISO()||""};N==="start"?(l("select-start",ae,ne??!0),l("select-start-utc",ae.utc)):(l("select-end",ae),l("select-end-utc",ae.utc))}function F(N){let V=u.value,ne=c.value+N;for(;ne<1;)ne+=12,V-=1;for(;ne>12;)ne-=12,V+=1;u.value=V,c.value=ne,l("update:year",V),l("update:month",ne)}function k(N){const ne=(R.value?bt.fromISO(R.value,{zone:i.timezone}):h.value).plus({days:N});ne.month===c.value&&ne.year===u.value&&T(ne)}function O(N=!1){const ne=(R.value?bt.fromISO(R.value,{zone:i.timezone}):h.value).weekday%7,ie=N?6-ne:-ne;k(ie)}const $=N=>{q(N)};function q(N){switch(N.preventDefault(),N.stopPropagation(),N.key){case"ArrowLeft":N.preventDefault(),k(-1);break;case"ArrowRight":N.preventDefault(),k(1);break;case"ArrowUp":N.preventDefault(),k(-7);break;case"ArrowDown":N.preventDefault(),k(7);break;case"Home":N.preventDefault(),O(!1);break;case"End":N.preventDefault(),O(!0);break;case"PageUp":N.preventDefault(),F(N.shiftKey?-12:-1);break;case"PageDown":N.preventDefault(),F(N.shiftKey?12:1);break;case"Enter":case" ":{N.preventDefault();const V=R.value?bt.fromISO(R.value,{zone:i.timezone}):h.value,ne=x.value.flat().find(ie=>ie.iso===V.toISODate());ne&&ee(ne);break}}}const J=N=>{const V=bt.now().setZone(i.timezone);u.value=V.year,c.value=V.month,l("update:year",V.year),l("update:month",V.month),T(V),l("gotoToday")};function ee(N){var de,ke;const V=!!f.value,ne=!!p.value,ie=i.activeField,pe=((de=f.value)==null?void 0:de.toISODate())||"null",ae=((ke=p.value)==null?void 0:ke.toISODate())||"null",re=N.dt.toISODate()||"",W=(Pe,Le)=>{a.value={case:Pe,behavior:Le}},fe=()=>`Selected start ${re} > existing end ${ae} -> reset both to ${re}`,oe=()=>`Selected end ${re} < existing start ${pe} -> reset both to ${re}`,Ie=()=>{D("start",N.dt,!0),D("end",N.dt),l("update:activeField","end")},G=(Pe=!1)=>{D("start",N.dt,Pe),Pe&&l("update:activeField","end")},Z=(Pe=!1)=>{D("end",N.dt),Pe&&l("close")};if(V&&ne){ie==="start"?p.value&&N.dt>p.value?(Ie(),W("INVERT_RANGE_FROM_START",fe())):(G(!1),W("UPDATE_START_IN_RANGE",`Updated start from ${pe} to ${re}; end remains ${ae}`)):f.value&&N.dt<f.value?(Ie(),W("INVERT_RANGE_FROM_END",oe())):(Z(!1),W("UPDATE_END_IN_RANGE",`Updated end from ${ae} to ${re}; start remains ${pe}`));return}if(!V&&ne&&ie==="start"&&p.value&&N.dt>p.value){Ie(),W("CREATE_RANGE_FROM_LATE_START",fe());return}if(V&&!ne&&ie==="end"&&f.value&&N.dt<f.value){Ie(),W("CREATE_RANGE_FROM_EARLY_END",oe());return}if(!V&&!ne){if(ie==="start"){G(!0),W("INIT_START",`Picked start ${re}; awaiting end selection`);return}Z(i.immediatelyUpdate),W("INIT_END",`Picked end ${re}; awaiting start selection`);return}if(!V&&ne){if(ie==="start"){G(!0),W("FILL_MISSING_START",`Inserted start ${re}; existing end ${ae}`);return}Z(!1),W("STRICT_UPDATE_END_ONLY",`Updated end to ${re}; start still null`);return}if(V&&!ne){if(ie==="start"){G(!0),W("RESELECT_START_BEFORE_END",`Replaced start with ${re}; end still null, switching to end`);return}Z(i.immediatelyUpdate),W("FILL_MISSING_END",`Picked end ${re}; start ${pe}`);return}}function X(){C.value=g.value,S.value=v.value,l("confirm")}function ve(){g.value=C.value,v.value=S.value,l("cancel")}function te(){Ct(()=>{var N;(N=o.value)==null||N.focus()})}return tn(()=>{te()}),t({focus:te}),(N,V)=>(j(),ce("div",{ref_key:"calendarRef",ref:o,class:Q([N.$style["arbo-calendar"],{[N.$style["arbo-date-range-picker"]]:r.value}]),role:"grid","aria-label":d.value,tabindex:"0"},[Ee("div",{class:Q([N.$style["arbo-calendar-header"],N.$style["arbo-calendar-week"]]),role:"row"},[(j(!0),ce(xt,null,xn(P.value,ne=>(j(),ce("div",{key:ne,class:Q(N.$style["arbo-calendar-weekday"]),role:"columnheader"},wt(ne),3))),128))],2),Ee("div",{class:Q(N.$style["arbo-calendar-weeks"]),"data-index":"date-selection",tabindex:"0",onKeydownCapture:V[0]||(V[0]=Pt(ne=>U(Ga)(ne,$),["prevent","stop"]))},[(j(!0),ce(xt,null,xn(x.value,(ne,ie)=>(j(),ce("div",{key:ie,class:Q(N.$style["arbo-calendar-week"])},[(j(!0),ce(xt,null,xn(ne,pe=>(j(),ce("div",{key:pe.iso,class:Q([N.$style["arbo-calendar-day"],pe.classes,{[N.$style["is-focused"]]:pe.iso===R.value}]),disabled:i.disabled,readOnly:i.readOnly,"aria-label":pe.aria,"data-date":pe.iso,"data-weekday":pe.weekdayLabel,tabindex:pe.iso===R.value?0:-1,onClick:ae=>ee(pe)},wt(pe.displayLabel),11,HY))),128))],2))),128))],34),i.readOnly?Je("",!0):(j(),ce("div",{key:0,class:Q(N.$style["arbo-calendar-actions"])},[Ee("div",GY,[Ke((j(),qe(mt,{variant:"secondary",size:"medium",onClick:V[1]||(V[1]=ne=>J()),onKeydown:U(Ga),"data-index":"today-btn"},{prefix:me(()=>[ge(lt,{src:"CalendarDay"})]),_:1},8,["onKeydown"])),[[U(s),"Today"]])]),ge(mt,{disabled:i.disabled,readOnly:i.readOnly,onKeydown:U(Ga),variant:"secondary",size:"medium",onClick:ve,"data-index":"cancel-btn"},{default:me(()=>[tt(wt(i.cancelLabel),1)]),_:1},8,["disabled","readOnly","onKeydown"]),ge(mt,{disabled:i.disabled||i.disableConfirm,readOnly:i.readOnly,variant:"primary",size:"medium","data-index":"save-btn",onKeydown:U(Ga),onClick:X},{default:me(()=>[tt(wt(i.confirmLabel),1)]),_:1},8,["disabled","readOnly","onKeydown"])],2))],10,$Y))}}),[["__cssModules",{$style:{"arbo-date-range-picker":"_arbo-date-range-picker_1a7wo_1","arbo-calendar-day":"_arbo-calendar-day_1a7wo_2","arbo-calendar-week":"_arbo-calendar-week_1a7wo_3","arbo-calendar":"_arbo-calendar_1a7wo_2","arbo-calendar-nav":"_arbo-calendar-nav_1a7wo_38","arbo-calendar-nav-btn":"_arbo-calendar-nav-btn_1a7wo_46","arbo-calendar-nav-label":"_arbo-calendar-nav-label_1a7wo_53","arbo-calendar-weekday":"_arbo-calendar-weekday_1a7wo_58","arbo-calendar-weeks":"_arbo-calendar-weeks_1a7wo_63","is-today":"_is-today_1a7wo_92","is-selected-start":"_is-selected-start_1a7wo_97","is-selected-end":"_is-selected-end_1a7wo_105","is-outside":"_is-outside_1a7wo_125","is-focused":"_is-focused_1a7wo_128","is-in-range":"_is-in-range_1a7wo_133","arbo-calendar-actions":"_arbo-calendar-actions_1a7wo_139","arbo-calendar-btn":"_arbo-calendar-btn_1a7wo_147",cancel:"_cancel_1a7wo_156",confirm:"_confirm_1a7wo_161"}}]]),WY=["onClick"],zY=["variant","onClick"],jY=_t(rt({__name:"CalendarNavigationControl",props:{year:{},month:{},minYear:{default:1970},maxYear:{default:2100},yearSpan:{default:12},monthLabels:{},locale:{default:"en-US"},monthLabelStyle:{default:"short"},ariaPrevLabel:{default:"Previous"},ariaNextLabel:{default:"Next"},ariaToolbarLabel:{default:"Calendar navigation"},ariaSelectYearLabel:{default:"Select year"},ariaSelectMonthLabel:{default:"Select month"},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["update:year","update:month","mode-change","year-selected","month-selected"],setup(e,{expose:t,emit:n}){const s=e,o=Y(()=>{if(s.monthLabels&&s.monthLabels.length===12)return s.monthLabels;const k=s.locale||"en-US",O=s.monthLabelStyle||"short",$=new Intl.DateTimeFormat(k,{month:O,timeZone:"UTC"});return Array.from({length:12},(J,ee)=>$.format(new Date(Date.UTC(2020,ee,1))))}),i=n,r=B(s.year),a=B(s.month),l=B(s.year);nt(()=>s.year,k=>{k!==r.value&&(r.value=k,l.value=k)}),nt(()=>s.month,k=>{k!==a.value&&(a.value=k)});const u=B("days");function c(k){u.value!==k&&(u.value=k,i("mode-change",k))}const d=Y(()=>s.minYear),h=Y(()=>s.maxYear),f=Y(()=>{const k=s.yearSpan;return l.value-l.value%k}),p=Y(()=>f.value+s.yearSpan-1);function g(){const k=s.yearSpan,O=f.value-k;O>=d.value&&(l.value=O)}function v(){const k=s.yearSpan,O=f.value+k;O<=h.value&&(l.value=O)}const C=Y(()=>f.value-s.yearSpan<d.value),S=Y(()=>p.value+s.yearSpan>h.value),b=Y(()=>{const k=s.yearSpan;return Math.ceil(k/3)});function w(k){const $=f.value+(k-1)*3;return Array.from({length:3},(q,J)=>$+J).filter(q=>q<=p.value)}function _(){u.value==="months"?c("days"):c("months")}function R(){u.value==="years"?c("days"):c("years")}function T(k){r.value=k,l.value=k,i("update:year",k),i("year-selected",k),c("months")}function I(k){a.value=k,i("update:month",k),i("month-selected",k),c("days")}function x(){if(u.value==="days"){let k=r.value,O=a.value-1;if(O<1&&(O=12,k--),k<d.value)return;r.value=k,a.value=O,i("update:year",k),i("update:month",O)}else if(u.value==="months"){if(r.value-1<d.value)return;r.value--,i("update:year",r.value)}else u.value==="years"&&g()}function P(){if(u.value==="days"){let k=r.value,O=a.value+1;if(O>12&&(O=1,k++),k>h.value)return;r.value=k,a.value=O,i("update:year",k),i("update:month",O)}else if(u.value==="months"){if(r.value+1>h.value)return;r.value++,i("update:year",r.value)}else u.value==="years"&&v()}const D=Y(()=>u.value==="days"?r.value===d.value&&a.value===1:u.value==="months"?r.value-1<d.value:C.value),F=Y(()=>u.value==="days"?r.value===h.value&&a.value===12:u.value==="months"?r.value+1>h.value:S.value);return t({setNavigation:(k,O)=>{r.value=k,a.value=O}}),(k,O)=>(j(),ce("div",{class:Q([k.$style["cal-nav-wrapper"]])},[Tt(k.$slots,"selection"),u.value==="days"?(j(),ce("div",{key:0,class:Q(k.$style["cal-nav-bar"]),"aria-label":"Calendar navigation"},[ge(mt,{variant:"tertiary",class:Q([k.$style["cal-nav-btn"],k.$style.prev]),"aria-label":"Previous",disabled:D.value,label:"",onClick:x,"data-index":"prev-btn",onKeydownCapture:zn(Pt(x,["prevent","stop"]),["enter"]),onKeydown:U(Ga)},{default:me(({hovered:$})=>[ge(lt,{src:"AnglesRight",source:"remote",color:$?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled","onKeydownCapture","onKeydown"]),Ee("div",{class:Q(k.$style["cal-nav-center"])},[ge(mt,{"data-index":"month-btn",variant:"secondary",onClick:_,onKeydown:U(Ga)},{default:me(()=>[tt(wt(o.value[a.value-1]),1)]),_:1},8,["onKeydown"]),ge(mt,{variant:"secondary",onClick:R,"data-index":"year-btn",onKeydown:U(Ga)},{default:me(()=>[tt(wt(r.value),1)]),_:1},8,["onKeydown"])],2),ge(mt,{"data-index":"next-btn",variant:"tertiary",class:Q([k.$style["cal-nav-btn"],k.$style.next]),"aria-label":"Next",disabled:F.value,label:"",onClick:P,onKeydownCapture:zn(Pt(P,["prevent","stop"]),["enter"]),onKeydown:U(Ga)},{default:me(({hovered:$})=>[ge(lt,{src:"AnglesRight",source:"remote",color:$?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled","onKeydownCapture","onKeydown"])],2)):Je("",!0),u.value==="years"?(j(),ce("div",{key:1,class:Q(k.$style["year-grid"])},[Ee("div",{class:Q(k.$style["year-grid-header"])},[ge(mt,{variant:"tertiary",class:Q([k.$style["cal-nav-btn"],k.$style.prev]),"aria-label":"Next",disabled:C.value,"prefix-icon":"AnglesRight",label:"",onClick:g},{default:me(({hovered:$})=>[ge(lt,{src:"AnglesRight",source:"remote",color:$?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled"]),Ee("div",{class:Q(k.$style["range-label"])},wt(f.value)+" - "+wt(p.value),3),ge(mt,{variant:"tertiary",class:Q([k.$style["cal-nav-btn"],k.$style.next]),"aria-label":"Next",disabled:S.value,"prefix-icon":"AnglesRight",label:"",onClick:v},{default:me(({hovered:$})=>[ge(lt,{src:"AnglesRight",source:"remote",color:$?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled"])],2),Ee("div",{class:Q(k.$style["year-grid-body"]),role:"grid","data-index":"year-selection"},[(j(!0),ce(xt,null,xn(b.value,$=>(j(),ce("div",{key:"yr-row-"+$,class:Q(k.$style["year-grid-row"])},[(j(!0),ce(xt,null,xn(w($),q=>(j(),ce("a",{key:q,tabindex:"0",class:Q([k.$style["year-cell"],{[k.$style.selected]:q===r.value}]),onClick:J=>T(q)},wt(q),11,WY))),128))],2))),128))],2)],2)):u.value==="months"?(j(),ce("div",{key:2,class:Q(k.$style["month-grid"]),"aria-label":"Select month","data-index":"month-selection"},[Ee("div",{class:Q(k.$style.months)},[(j(!0),ce(xt,null,xn(o.value,($,q)=>(j(),ce("a",{tabindex:"0",key:$,variant:q+1===a.value?"primary":"text",class:Q([k.$style["month-cell"],{[k.$style.selected]:q+1===a.value}]),onClick:J=>I(q+1)},wt($),11,zY))),128))],2)],2)):(j(),ce("div",{key:3,class:Q(k.$style["days-slot"])},[Tt(k.$slots,"default",{year:r.value,month:a.value,mode:u.value})],2))],2))}}),[["__cssModules",{$style:{"cal-nav-wrapper":"_cal-nav-wrapper_unh71_1","cal-nav-bar":"_cal-nav-bar_unh71_12","cal-nav-btn":"_cal-nav-btn_unh71_20",prev:"_prev_unh71_33","year-grid-header":"_year-grid-header_unh71_37","cal-nav-center":"_cal-nav-center_unh71_46","cal-nav-label":"_cal-nav-label_unh71_52","month-grid":"_month-grid_unh71_66","year-grid":"_year-grid_unh71_37",months:"_months_unh71_75","month-cell":"_month-cell_unh71_82","year-cell":"_year-cell_unh71_83","pg-btn":"_pg-btn_unh71_105","year-grid-body":"_year-grid-body_unh71_118","year-grid-row":"_year-grid-row_unh71_125",selected:"_selected_unh71_131","days-slot":"_days-slot_unh71_137","range-label":"_range-label_unh71_141"}}]]);function KY(e){const{format:t="dd/MM/yyyy",timezone:n="local",minDate:s,maxDate:o}=e,i=B(""),r=Y(()=>{const g=bt.fromFormat(i.value,t,{zone:n});return g.isValid?g:null}),a=Y(()=>{if(!s||!r.value)return!0;const g={year:s.getFullYear(),month:s.getMonth()+1,day:s.getDate()},v={year:r.value.year,month:r.value.month,day:r.value.day};return v.year>g.year?!0:v.year<g.year?!1:v.month>g.month?!0:v.month<g.month?!1:l(v,g)>=0}),l=(g,v)=>{const C=new Date(g.year,g.month-1,g.day),S=new Date(v.year,v.month-1,v.day);return C<S?-1:C>S?1:0},u=Y(()=>{if(!o||!r.value)return!0;const g={year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()},v={year:r.value.year,month:r.value.month,day:r.value.day};return v.year<g.year?!0:v.year>g.year?!1:v.month<g.month?!0:v.month>g.month?!1:l(v,g)<=0}),c=Y(()=>i.value.length==0||i.value.length>0&&r.value!==null&&a.value&&u.value),d=Y(()=>i.value.length===t.length&&c.value);return{inputValue:i,isValid:c,isComplete:d,clear:()=>{i.value=""},setDate:g=>{let v;g instanceof Date?v=bt.fromJSDate(g,{zone:n}):v=g.setZone(n),v.isValid?i.value=v.toFormat(t):i.value=""},getDate:()=>c.value?r.value:null}}const qY={key:0,style:{marginLeft:"8px"}},YY=["disabled","readonly","placeholder"],WA=_t(rt({__name:"DateInput",props:{modelValue:{},format:{default:"dd/MM/yyyy"},showDebug:{type:Boolean,default:!0},allowPastDates:{type:Boolean,default:!0},allowFutureDates:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},timezone:{default:""},placeholder:{default:""},size:{},minDate:{default:void 0},maxDate:{default:void 0},isMultipleDate:{type:Boolean,default:!1}},emits:["complete","invalid","clear","blur","tab"],setup(e,{expose:t,emit:n}){const s=Xt,o=e,i=n,r=B(null),a=B(null),{isValid:l,isComplete:u,inputValue:c,clear:d,setDate:h,getDate:f}=KY({format:o.format,allowPastDates:o.allowPastDates,allowFutureDates:o.allowFutureDates,timezone:o.timezone,minDate:o.minDate,maxDate:o.maxDate}),p=Y(()=>o.active),g=Y(()=>({disabled:o.disabled,error:!l.value&&c.value.length>0,readOnly:o.readOnly,isEmpty:c.value.length===0,inputRef:r,wrapperRef:a,active:p})),{argsMain:v,isHover:C,isFocus:S}=ws(g),b=I=>{var P;const x=(P=I.clipboardData)==null?void 0:P.getData("text/plain");x&&(c.value=x.trim())},w=I=>{if(I.key==="Escape"){i("blur"),I.target.blur(),I.preventDefault(),I.stopPropagation(),I.stopImmediatePropagation();return}else I.key==="Tab"&&T(I)},_=()=>{d(),i("clear")};t({clear:_,setDate:h,getDate:f,focus:()=>{var I;return(I=r.value)==null?void 0:I.focus()}}),nt(()=>o.modelValue,I=>{I?h(I):d()},{immediate:!0}),nt([()=>u.value,()=>c.value],()=>{if(c.value.length===0)i("complete",null);else if(l.value&&!o.readOnly&&!o.disabled&&u.value){const I=f();(I||c.value.length===0)&&i("complete",I)}}),nt(()=>l.value,I=>{I||i("invalid","")});const R=Y(()=>!!o.isMultipleDate),T=I=>{I.preventDefault(),I.stopImmediatePropagation(),I.stopPropagation(),i("tab",I)};return(I,x)=>(j(),qe(Cs,nn(U(v),{ref_key:"wrapperRef",ref:a,bordered:!0,actived:p.value,size:32,style:{padding:"0 4px 0 0",background:"#FAFAFA"}}),{default:me(()=>[Ee("div",{class:Q([I.$style["date-input-wrapper"]])},[R.value?(j(),ce("span",qY," Multiple ")):Ke((j(),ce("input",{key:1,disabled:o.disabled,readonly:o.readOnly,ref_key:"inputRef",ref:r,type:"text","onUpdate:modelValue":x[0]||(x[0]=P=>gn(c)?c.value=P:null),onPaste:Pt(b,["prevent"]),placeholder:o.placeholder,class:Q([I.$style["date-input"]]),onKeydown:w},null,42,YY)),[[ST,U(c)]]),Tt(I.$slots,"clear",{handleClear:_},()=>[(U(c).length>0||R.value)&&!o.readOnly&&!o.disabled&&(U(C)||U(S))?Ke((j(),qe(mt,{key:0,variant:["icon","primary"],onClick:Pt(_,["stop"]),size:16,rounded:!0},{default:me(()=>[ge(lt,{src:"XMarkSolid",source:"remote",size:"8",color:"white"})]),_:1})),[[U(s),"Clear"]]):(j(),qe(lt,{key:1,src:"Calendar",source:"remote",class:Q(I.$style["icon-calendar"]),color:"var(--grey-200)"},null,8,["class"]))])],2)]),_:3},16,["actived"]))}}),[["__cssModules",{$style:{"date-input-wrapper":"_date-input-wrapper_1yset_1","icon-calendar":"_icon-calendar_1yset_9",focus:"_focus_1yset_12",hover:"_hover_1yset_12",active:"_active_1yset_12","date-input":"_date-input_1yset_1",invalid:"_invalid_1yset_38"}}]]),ZY=rt({__name:"Calendar",props:{params:{},label:{},value:{},timezone:{default:Eb()},format:{default:"LLL dd"},placeholder:{},enableRangeFeedback:{type:Boolean},messages:{},isCompleted:{type:Boolean},isStarted:{type:Boolean},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},size:{},duePlaceholder:{default:"Due"},startPlaceholder:{default:"Start"},startTooltip:{default:"Select start date"},dueTooltip:{default:"Select due date"},showCalendarIcon:{type:Boolean,default:!0},locale:{default:"en-US"},immediatelyUpdate:{type:Boolean,default:!1},multipleStartDates:{type:Boolean},multipleDueDates:{type:Boolean}},emits:["clearStart","clearDue","clearAll","update","update:start","update:end","range:invalid","range:corrected","tracing","confirmed","closed","start-update","finish-update","tab"],setup(e,{expose:t,emit:n}){const s=B({case:"",behavior:""}),o=e,i=B(null),r=n,a=async(W,fe)=>{r("start-update"),await W(),r("finish-update"),Ct(()=>{var oe,Ie;fe(),(Ie=(oe=o.params)==null?void 0:oe.api)==null||Ie.stopEditing()})},l=(W,fe)=>{W(),Ct(()=>{var oe,Ie;fe(),(Ie=(oe=o.params)==null?void 0:oe.api)==null||Ie.stopEditing()})},u=()=>{var fe;const W=bt.now().setZone(o.timezone);V.value=W.year,ne.value=W.month,(fe=N.value)==null||fe.setNavigation(W.year,W.month)},c=So({start:!1,end:!1}),{states:d,showMultipleStartDates:h,showMultipleDueDates:f,selectEndDate:p,cancelSelection:g,confirmSelection:v,selectStartDate:C,beginInteraction:S,clearStart:b,clearDue:w}=kK(o,r),_=Y(()=>{if(d.isSelectingStart)return"start";if(d.isSelectingEnd)return"end"});nt(()=>o.multipleStartDates,W=>{h.value=!!W},{immediate:!0}),nt(()=>o.multipleDueDates,W=>{f.value=!!W},{immediate:!0});const R=B(null),T=B(null),I=W=>{W.preventDefault(),W.stopImmediatePropagation(),W.stopPropagation(),X()},x=()=>{var W;(W=T.value)==null||W.focus()},P=W=>{if(!W){c.start=!1,b();return}const fe=d.endDate?bt.fromJSDate(d.endDate,{zone:o.timezone}):null;if(fe&&D(W,fe)>0){const Ie={year:W.year,month:W.month,day:W.day};c.start=!1,C(Ie,!1),p(Ie),Ct(()=>{d.isSelectingStart=!0,d.isSelectingEnd=!1});return}const oe={year:W.year,month:W.month,day:W.day};c.start=!1,C(oe,!0)},D=(W,fe)=>{const oe=W.startOf("day"),Ie=fe.startOf("day");return oe<Ie?-1:oe>Ie?1:0},F=W=>{var fe;W.preventDefault(),W.stopImmediatePropagation(),W.stopPropagation(),(fe=document.querySelector('[data-index="prev-btn"]'))==null||fe.focus()},k=W=>{if(!W){c.end=!1,w();return}const fe=d.startDate?bt.fromJSDate(d.startDate,{zone:o.timezone}):null;if(fe&&D(W,fe)<0){const Ie={year:W.year,month:W.month,day:W.day};c.end=!1,C(Ie),p(Ie),Ct(()=>{d.isSelectingEnd=!0,d.isSelectingStart=!1});return}const oe={year:W.year,month:W.month,day:W.day};c.end=!1,p(oe)},O=()=>{h.value=!1,b()},$=()=>{f.value=!1,w()},q=()=>{ve()},J=Y(()=>d.isSelectingStart||d.isSelectingEnd);function ee(){o.disabled||o.readOnly||(S(),d.isSelectingStart=!0,d.isSelectingEnd=!1,Ct(()=>{var W;(W=i.value)==null||W.focus()}))}function X(){o.disabled||o.readOnly||(S(),d.isSelectingEnd=!0,d.isSelectingStart=!1,Ct(()=>{var W;(W=R.value)==null||W.focus()}))}function ve(){d.isSelectingStart=!1,d.isSelectingEnd=!1,r("closed")}function te(W){W.key==="Escape"?(W.stopPropagation(),ve()):W.key=="Tab"&&r("tab",W)}const N=B(null),V=B(new Date().getFullYear()),ne=B(new Date().getMonth()+1);nt(()=>[d.isSelectingStart,d.isSelectingEnd,d.startDate,d.endDate],()=>{d.isSelectingStart&&d.startDate?(V.value=d.startDate.getFullYear(),ne.value=d.startDate.getMonth()+1):d.isSelectingEnd&&d.endDate&&(V.value=d.endDate.getFullYear(),ne.value=d.endDate.getMonth()+1)},{immediate:!0});const ie=B(null);function pe(){if(Array.isArray(o.value)){const[fe,oe]=o.value;d.startDate=fe||null,d.endDate=oe||null}d.isSelectingStart=!1,d.isSelectingEnd=!1;const W=d.startDate||d.endDate||new Date;V.value=W.getFullYear(),ne.value=W.getMonth()+1}nt(()=>{var W,fe,oe,Ie,G,Z,de,ke;return[((oe=(fe=(W=o.value)==null?void 0:W[0])==null?void 0:fe.getTime)==null?void 0:oe.call(fe))||((Ie=o.value)==null?void 0:Ie[0]),((de=(Z=(G=o.value)==null?void 0:G[1])==null?void 0:Z.getTime)==null?void 0:de.call(Z))||((ke=o.value)==null?void 0:ke[1]),o.timezone,o.format,o.placeholder,o.enableRangeFeedback]},()=>{pe()},{immediate:!0,deep:!0}),t({resetCalendarLogic:pe,openStart:ee,openEnd:X,closePicker:ve,clearAll:q,isOpen:J,drpRef:ie,getValues:()=>({startDate:d.startDate,endDate:d.endDate,dateRange:[d.startDate,d.endDate]}),focus:()=>{d.startDate||d.endDate?d.startDate?ee():X():ee()}});const re=B(null);return nt(()=>J.value,W=>{if(o.disabled||o.readOnly)return;const fe=re.value;fe&&(W?fe.show():fe.hide())},{immediate:!0}),(W,fe)=>(j(),ce("div",{class:Q(W.$style["calendar-wrapper"]),ref_key:"calendarWrapperRef",ref:T,onKeydown:te,tabindex:"1","data-index":"calendar-wrapper"},[ge(jY,{year:V.value,"onUpdate:year":fe[6]||(fe[6]=oe=>V.value=oe),month:ne.value,"onUpdate:month":fe[7]||(fe[7]=oe=>ne.value=oe),locale:o.locale,disabled:o.disabled,readOnly:o.readOnly,ref_key:"navigationRef",ref:N},{selection:me(()=>[Ee("div",{class:Q(W.$style["calendar-input-section"])},[ge(WA,{ref_key:"starDateRef",ref:i,"model-value":U(d).startDate,placeholder:o.startPlaceholder,timezone:o.timezone,active:U(d).isSelectingStart,onClick:ee,onClear:O,onComplete:P,onInvalid:fe[0]||(fe[0]=oe=>c.start=!0),disabled:o.disabled,readOnly:o.readOnly,onBlur:x,onTab:I},null,8,["model-value","placeholder","timezone","active","disabled","readOnly"]),ge(WA,{ref_key:"endDateRef",ref:R,"model-value":U(d).endDate,placeholder:o.duePlaceholder,timezone:o.timezone,active:U(d).isSelectingEnd,onClick:X,onClear:$,disabled:o.disabled,onComplete:k,onInvalid:fe[1]||(fe[1]=oe=>c.end=!0),readOnly:o.readOnly,isMultipleDate:U(f),onTab:F},null,8,["model-value","placeholder","timezone","active","disabled","readOnly","isMultipleDate"])],2)]),default:me(({year:oe,month:Ie})=>[ge(UY,{disabled:o.disabled,disableConfirm:c.end||c.start,readOnly:o.readOnly,ref_key:"drpRef",ref:ie,"tracing-case":s.value,"onUpdate:tracingCase":fe[2]||(fe[2]=G=>s.value=G),year:oe,month:Ie,"start-date":U(d).startDate,"end-date":U(d).endDate,"active-field":_.value,timezone:o.timezone,immediatelyUpdate:e.immediatelyUpdate,onSelectStart:U(C),onSelectEnd:U(p),onGotoToday:u,onConfirm:fe[3]||(fe[3]=()=>{a(U(v),ve)}),onCancel:fe[4]||(fe[4]=G=>l(U(g),ve)),onClose:fe[5]||(fe[5]=G=>a(U(v),ve))},null,8,["disabled","disableConfirm","readOnly","tracing-case","year","month","start-date","end-date","active-field","timezone","immediatelyUpdate","onSelectStart","onSelectEnd"])]),_:1},8,["year","month","locale","disabled","readOnly"])],34))}}),Am=_t(ZY,[["__cssModules",{$style:{"calendar-wrapper":"_calendar-wrapper_1wull_1","calendar-input-section":"_calendar-input-section_1wull_11","display-wrapper":"_display-wrapper_1wull_19","calendar-actions":"_calendar-actions_1wull_23","clear-all-btn":"_clear-all-btn_1wull_29"}}]]),XY=rt({__name:"DateUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{},rowSelected:{},disabled:{type:Boolean}},emits:["updated","update-start","update-completed","update-failed"],setup(e,{emit:t}){const n=t,s=e,o=En("isSelectAll",B(!1)),i=En("bulkUpdate",B(!1)),r=Y(()=>!!s.entityId&&i.value&&o.value),{apiServices:a}=ts(!i.value,s),l=En("filterParams",null),u=B(null),c=async I=>{var x,P,D,F;try{w.value=!0,n("update-start");let k={workspaceId:s.workspaceId,entityId:s.entityId,itemIds:s.ids,startDate:void 0,dueDate:void 0,filterParams:l!=null&&l.value?l.value:void 0};"start"in I&&(k.startDate=I.start?pm(I.start):null),"end"in I&&(k.dueDate=I.end?pm(I.end):null),r.value?(k.itemIds=void 0,k.entityId=s.entityId):k.entityId=void 0,await((P=(x=a.value)==null?void 0:x.changeDate)==null?void 0:P.call(x,k)),n("updated",{workspaceId:s.workspaceId,itemIds:s.ids,data:k}),n("update-completed"),(D=u.value)==null||D.hide()}catch(k){console.error("Failed to update dates:",k),Ct(()=>{Ct(()=>{var O;n("update-failed"),(O=u.value)==null||O.open()})})}finally{(F=S.value)==null||F.resetCalendarLogic(),w.value=!1}},d=()=>{if(!s.rowSelected||s.rowSelected.length===0){h();return}s.rowSelected.length===1?f():p()},h=()=>{C.value=!1,v.value=!1,b.value=[null,null]},f=()=>{const x=s.rowSelected[0].dateRange;b.value=[(x==null?void 0:x[0])??null,(x==null?void 0:x[1])??null],C.value=!1,v.value=!1},p=()=>{var x,P;if(s.rowSelected.some(D=>D.dateRange&&(D.dateRange[0]!==null||D.dateRange[1]!==null))){const D=g(0),F=g(1);if(v.value=D,C.value=F,D)b.value[0]=null;else{const k=((x=s.rowSelected[0].dateRange)==null?void 0:x[0])??null;b.value[0]=k}if(F)b.value[1]=null;else{const k=((P=s.rowSelected[0].dateRange)==null?void 0:P[1])??null;b.value[1]=k}}else v.value=!1,C.value=!1,b.value=[null,null]},g=I=>{const x=s.rowSelected.map(D=>{var F;return(F=D.dateRange)==null?void 0:F[I]});return x.length===0?!1:new Set(x.map(D=>{var F;return(F=D==null?void 0:D.getTime)==null?void 0:F.call(D)})).size>1},v=B(!1),C=B(!1),S=B(null),b=B([null,null]);nt([()=>s.ids,()=>s.rowSelected],I=>{d(),Ct(()=>{var x;(x=S.value)==null||x.focus()})},{immediate:!0,deep:!0});const w=B(!1),_=()=>{w.value=!0},R=()=>{Ct(()=>{setTimeout(()=>{w.value=!1},500)})},T=(I,x)=>{I&&Ct(()=>{var P;(P=S.value)==null||P.focus()})};return(I,x)=>(j(),qe(sf,{ref_key:"wrapperRef",ref:u,isUpdating:w.value,disabled:s.disabled||w.value,onOnVisibleChange:T},{trigger:me(({hide:P,disabled:D})=>[ge(mt,{variant:s.variant,loading:w.value,disabled:D,onEscape:P},{default:me(()=>[ge(lt,{src:"Calendar"}),x[0]||(x[0]=tt(" Date ",-1))]),_:1},8,["variant","loading","disabled","onEscape"])]),popup:me(({isVisible:P,hide:D})=>[P?(j(),qe(Am,{key:0,immediatelyUpdate:!1,value:b.value,onConfirmed:c,ref_key:"calendarRef",ref:S,onClosed:D,onStartUpdate:_,onFinishUpdate:R,multipleDueDates:C.value,multipleStartDates:v.value},null,8,["value","onClosed","multipleDueDates","multipleStartDates"])):Je("",!0)]),default:me(()=>[x[1]||(x[1]=tt(" > ",-1))]),_:1},8,["isUpdating","disabled"]))}}),JY=e=>{if(Number(e.metric_type.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number(e.metric_type.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number(e.metric_type.id)==3)return"formula"},zA=Ql("metricStore",()=>{const e=B();return{metricList:e,setMetricList:s=>{e.value=s},checkEditType:s=>{var o;if(((o=s==null?void 0:s.auth_permission)==null?void 0:o.permission)==2)return JY(s)}}}),QY=["onKeydown"],eZ=["width","height","viewBox"],tZ=["d"],nZ="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z",jA=rt({__name:"RatingComponent",props:{params:{default:()=>({maxRating:5,readOnly:!1,disabled:!1})},modelValue:{},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},emits:["update","update:modelValue","change","handleEnter","cancel"],setup(e,{expose:t,emit:n}){const s=e,o=n,i=B(s.modelValue??0),r=B(null),a=Y(()=>{var D;return((D=s.params)==null?void 0:D.size)??24}),l=Y(()=>{var D;return((D=s.params)==null?void 0:D.iconViewBox)??"0 0 24 24"}),u=Y(()=>{var D;return((D=s.params)==null?void 0:D.iconPath)??nZ}),c=Y(()=>{var D;return((D=s.params)==null?void 0:D.wrapperTag)??"span"}),d=Y(()=>{var D;return s.disabled||((D=s.params)==null?void 0:D.disabled)||!1}),h=Y(()=>{var D;return s.readOnly||((D=s.params)==null?void 0:D.readOnly)||!1}),f=Y(()=>!d.value&&!h.value),p=Y(()=>d.value?"not-allowed":h.value?"default":"pointer");nt(()=>s.modelValue,D=>{typeof D=="number"&&D!==i.value&&(i.value=D)});const g=D=>{var F;return((F=s.params)==null?void 0:F.maxRating)-D+1<=i.value&&!v.value},v=B(!1),C=()=>{v.value=!0},S=()=>{v.value=!1},b=D=>{f.value&&w(D)},w=D=>{var k,O;if(!f.value)return;let F=((k=s.params)==null?void 0:k.maxRating)-D+1;F===i.value&&(F=0),i.value=F,o("update:modelValue",F),o("update",F),o("change",F),(O=s.params)!=null&&O.onUpdate&&s.params.onUpdate(F)},_=D=>{var F;D!==i.value&&(i.value=D,o("update:modelValue",D),o("update",D),o("change",D),(F=s.params)!=null&&F.onUpdate&&s.params.onUpdate(D),R.value=D)},R=B(i.value),T=D=>{D.preventDefault(),D.stopPropagation(),D.stopImmediatePropagation(),i.value=R.value,o("cancel")},I=D=>{D.preventDefault(),_(i.value),o("handleEnter",i.value)},x=()=>{f.value&&(i.value=Math.min(i.value+1%(s.params.maxRating+1),s.params.maxRating),_(i.value))},P=()=>{f.value&&(i.value=Math.max(i.value-1,0),_(i.value))};return t({focus:()=>{var D;(D=r.value)==null||D.focus()}}),(D,F)=>(j(),ce("div",{class:Q(["rating-component",{"rating-component--disabled":d.value,"rating-component--readOnly":h.value}]),style:dn({"--max-rating":e.params.maxRating}),ref_key:"ratingRef",ref:r,tabindex:"1",onKeydown:[zn(Pt(P,["prevent"]),["left"]),zn(Pt(x,["prevent"]),["right"]),zn(Pt(P,["prevent"]),["down"]),zn(Pt(x,["prevent"]),["up"]),zn(Pt(I,["prevent"]),["enter"]),zn(Pt(I,["prevent"]),["tab"]),zn(Pt(T,["prevent"]),["escape"])]},[(j(!0),ce(xt,null,xn(e.params.maxRating,k=>(j(),qe(bw(c.value),{key:k,class:Q(["rating-item",{filled:g(k),"rating-item--disabled":d.value,"rating-item--readOnly":h.value}]),style:dn({cursor:p.value,order:e.params.maxRating-k,height:a.value+"px",width:a.value+"px"}),"aria-checked":g(k),"aria-disabled":d.value,"aria-readOnly":h.value,title:e.params.maxRating-k+1,tabindex:-1,onClick:Pt(O=>b(k),["prevent","stop"]),onMouseenter:C,onMouseleave:S},{default:me(()=>[Tt(D.$slots,"icon",{index:k,filled:g(k),size:a.value,iconViewBox:l.value,disabled:d.value,readOnly:h.value,value:k},()=>[(j(),ce("svg",{class:"rating-icon",width:a.value,height:a.value,viewBox:l.value,"aria-hidden":"true",focusable:"false"},[Ee("path",{d:u.value},null,8,tZ)],8,eZ))]),Tt(D.$slots,"overlay",{index:k,filled:g(k),disabled:d.value,readOnly:h.value})]),_:2},1064,["class","style","aria-checked","aria-disabled","aria-readOnly","title","onClick"]))),128))],46,QY))}}),sZ={style:{maxWidth:"180px",lineHeight:"15px"}},oZ=["innerHTML"],KA=rt({__name:"MetricEditorDropdown",props:{config:{},modelValue:{}},emits:["update:modelValue","change","close","handleCancel"],setup(e,{expose:t,emit:n}){const s=Xt,o=e,i=n,r=()=>{i("handleCancel")},a=()=>{i("close")},l=v=>{var C;if(v.format_type==="dropdown"&&v.format_value)try{const S=JSON.parse(v.format_value);if(Array.isArray(S)){const b=S.map(w=>({label:w.name,value:w.name,id:w.name}));return b.unshift({label:"-",value:void 0,id:"-"}),b}}catch(S){console.error("Failed to parse dropdown options",S)}if(v.format_type=="number"&&v.restricted_type=="exact"){const S=((C=v.restricted_value)==null?void 0:C.split(",").map(b=>({label:v.mapping[`!${b}`]||b,value:b,id:b})))||[];return S.unshift({label:"-",value:void 0,id:"-"}),S}return[]},u=Y(()=>l(o.config)),c=B(o.modelValue),d=v=>{c.value=v,i("update:modelValue",v),i("change",v||null)},h=B(u.value),f=B(!1),p=v=>{f.value=!0,v?h.value=u.value.filter(C=>C.label.toLowerCase().includes(v.toLowerCase())):h.value=u.value,setTimeout(()=>{f.value=!1},300)},g=B(null);return tn(()=>{var v;(v=g.value)==null||v.focus()}),t({focus:()=>{var v;(v=g.value)==null||v.focus()}}),(v,C)=>(j(),qe(Jr,{style:{width:326},loading:f.value,options:h.value,"selected-id":e.modelValue||void 0,onSearch:p,onSelect:C[0]||(C[0]=S=>d(S.id)),ref_key:"searchListRef",ref:g,onClose:a,onCancel:r},{item:me(({item:S,getHighlightedLabel:b,selectedIndex:w,index:_})=>[ge(eu,{hover:w==_,selected:S.value===e.modelValue,label:S.label,onSelect:R=>d(S.value||null),onClick:R=>d(S.value||null)},{label:me(()=>[Ee("div",sZ,[Ke(Ee("span",{innerHTML:b(S.label)},null,8,oZ),[[U(s),{content:S.label}]])])]),_:2},1032,["hover","selected","label","onSelect","onClick"])]),"empty-list":me(()=>[...C[1]||(C[1]=[tt("No options available.",-1)])]),_:1},8,["loading","options","selected-id"]))}}),iZ={class:"metric-input-wrapper"},rZ={key:0,class:"error-text input-2"},qA=rt({__name:"MetricEditorInput",props:{config:{},modelValue:{},saveOnBlur:{type:Boolean,default:!0},saveOnEscape:{type:Boolean,default:!1},showInlineError:{type:Boolean,default:!1}},emits:["update:modelValue","handleChange","cancel","enter","onValidation"],setup(e,{expose:t,emit:n}){const s=Xt,o=e,i=B(o.modelValue),r=B(o.modelValue),a=B(!1),l=B(!0),u=B(""),c=Y(()=>{var $;const O=Number.parseInt(String(($=o.config)==null?void 0:$.format_value)||"2",10);return Number.isFinite(O)&&O>=0?O:2}),d=O=>{if(!O)return O;const $=String(O).split(".");return $.length>1&&$[1].length>c.value?c.value===0?$[0]:`${$[0]}.${$[1].slice(0,c.value)}`:String(O)},h=O=>{const $=d(O);$!==O&&b.value?i.value=$:i.value=O},f=O=>{const $=O.target;if(!$)return;const q=$.value||"",J=q.indexOf(".");if(O.key==="."&&c.value===0){O.preventDefault();return}J!==-1&&/[0-9]/.test(O.key)&&q.slice(J+1).length>=c.value&&O.preventDefault()},p=Y(()=>l.value||o.showInlineError?{content:""}:{content:u.value,placement:"top",theme:"error",trigger:"mouseenter focus",hideOnClick:!1,interactive:!0,showOnCreate:!0,alwayShow:!0,maxWidth:"200px"}),g=()=>{var te;const O=o.config.restricted_type.trim(),$=((te=o.config.restricted_value)==null?void 0:te.split(",").map(Number))||[],[q,J]=$,X={range:`Enter a value between ${q} and ${J}`,not:`These values are not allowed: ${$.join(", ")}`,exact:"Value is not allowed"}[O];return l.value?"":X},v=Y(()=>{var $;let O="";return Number(($=o.config)==null?void 0:$.format_value)&&(O+="."+Array.from({length:Number(o.config.format_value)}).map(()=>"0").join("")),`0${O}`});nt(()=>o.modelValue,O=>{i.value=O,r.value=O});const C=O=>dm(o.config,O),S=n,b=B(null),w=O=>{const $=O===""?null:O,q=r.value===""?null:r.value;return $!==q},_=O=>{const $=d(O);if(!w($))return!1;const q=$===""?null:$;return i.value=q,r.value=q,S("update:modelValue",q),S("handleChange",q),!0},R=()=>{i.value=r.value,S("update:modelValue",r.value)},T=(O,$)=>{_(O),S("enter")},I=(O,$)=>{if(a.value){a.value=!1;return}o.saveOnBlur?_(O):R()},x=O=>{if(O===null||O===""){l.value=!0;return}l.value=dm(o.config,Number(O)),u.value=l.value?"":g()},P=(O,$)=>{a.value=!0,o.saveOnEscape?_(O):R(),S("cancel"),setTimeout(()=>{a.value=!1},100)},D=O=>{x(O),S("onValidation",O)},F=()=>{a.value=!0,R(),S("cancel"),setTimeout(()=>{a.value=!1},100)},k=()=>{var O;i.value=null,r.value=null,S("update:modelValue",null),S("handleChange",null),(O=b.value)==null||O.focus()};return t({focus:()=>{var O;return(O=b.value)==null?void 0:O.focus()},blur:()=>{var O;return(O=b.value)==null?void 0:O.blur()},getValue:()=>i.value,getCachedValue:()=>r.value,save:()=>_(i.value),revert:R}),tn(()=>{var O;(O=b.value)==null||O.focus()}),(O,$)=>Ke((j(),ce("div",iZ,[ge(oS,{maxDecimalChar:c.value,modelValue:i.value,"onUpdate:modelValue":$[0]||($[0]=q=>i.value=q),placeholder:v.value,validatorFnc:C,style:{"--bg-input":"#FAFAFA"},onInput:h,onKeydown:f,onEnter:T,onBlur:I,onClear:k,onEscape:P,onCancel:F,onOnValidation:D,type:"number",autoEmit:!1,submitOnEnter:!0,blurOnEscape:!1,ref_key:"inputRef",ref:b},null,8,["maxDecimalChar","modelValue","placeholder"]),!l.value&&e.showInlineError?(j(),ce("span",rZ,wt(u.value),1)):Je("",!0)])),[[U(s),p.value]])}}),aZ={key:2},lZ={class:"wrapper-suffix"},uZ={key:3},cZ=_t(rt({__name:"MetricEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},config:{},attachTo:{},focus:{type:Boolean}},emits:["enter","cancel","blur","updateMetric"],setup(e,{expose:t,emit:n}){const s=Xt,o=e,i=B(null),r=B(0),a=B(null),l=B(null),u=Y(()=>OF(o.config)),c=B(!1),d=Y(()=>!!ie.value),h=n,f=()=>{c.value=!1,ne(),h("cancel")},p=B(!0),g=re=>{if(re===null||re===""){p.value=!0;return}if(u.value!=="number"){p.value=!0;return}p.value=dm(o.config,Number(re)),C.value=S()},v=()=>{c.value=!0,J()},C=B(""),S=()=>{var de;const re=o.config.restricted_type.trim(),W=((de=o.config.restricted_value)==null?void 0:de.split(",").map(Number))||[],[fe,oe]=W,G={range:`Enter a value between ${fe} and ${oe}`,not:`These values are not allowed: ${W.join(", ")}`,exact:"Value is not allowed"}[re];return p.value?"":G},b=Y(()=>{var W;const re=Number.parseInt(String((W=o.config)==null?void 0:W.format_value)||"2",10);return Number.isFinite(re)&&re>=0?re:2}),w=re=>{c.value=!0,i.value=re},_=()=>{c.value=!0,ne(),J()},R=re=>{r.value=re,c.value=!0,J()},T=()=>(o.config.format_symbol||"BoltSolid").split(/[\s-_]+/).map(W=>W.charAt(0).toUpperCase()+W.slice(1)).join("").replace(/Outline|Solid/g,""),I=B(null),x=B(!0),P=Y(()=>{var re;return{disabled:o.disabled,error:!1,readOnly:!1,isEmpty:((re=i.value)==null?void 0:re.length)===0,wrapperRef:N,active:d,focus:o.focus,bordered:!0}}),D=B(null),F=Y(()=>x.value),k=Y(()=>({disabled:o.disabled,error:!1,readOnly:!1,isEmpty:r.value===0,wrapperRef:D,active:F,focus:x.value,bordered:!0})),{argsMain:O}=ws(k),{argsMain:$}=ws(P),q=B(null),J=()=>{Ct(()=>{var re;(re=q.value)==null||re.focus()})},ee=re=>{var W;if(re.format_type==="dropdown"&&re.format_value)try{const fe=JSON.parse(re.format_value);if(Array.isArray(fe))return fe.map(oe=>({label:oe.name,value:oe.name,id:oe.name}))}catch(fe){console.error("Failed to parse dropdown options",fe)}return re.format_type=="number"&&re.restricted_type=="exact"?((W=re.restricted_value)==null?void 0:W.split(",").map(oe=>({label:re.mapping[`!${oe}`]||oe,value:oe,id:oe})))||[]:[]},X=Y(()=>ee(o.config)),ve=Y(()=>{var re;return((re=X.value.find(W=>W.value===i.value))==null?void 0:re.label)||i.value||"-"}),te=()=>{var re;if(u.value=="rating")h("updateMetric",r.value==0?null:r.value);else if(u.value=="number"){const W=(re=l.value)==null?void 0:re.getValue();h("updateMetric",W||null)}else h("updateMetric",i.value||null);c.value=!1,ne()},{triggerRef:N,popupRef:V,hide:ne,isVisible:ie,show:pe}=Fs({toggleOnClick:!0,appendTo:()=>o.attachTo||"parent",zIndex:1e4,offset:[0,0]}),ae=()=>{switch(u.value){case"number":Ct(()=>{var re;(re=l.value)==null||re.focus()});break;case"dropdown":pe(),Ct(()=>{var re;(re=I.value)==null||re.focus()});break;case"rating":x.value=!0,Ct(()=>{var re;(re=a.value)==null||re.focus()});break}};return t({resetState:()=>{i.value=null,r.value=0,c.value=!1},focus:ae,hasChanges:()=>c.value}),tn(()=>{Ct(()=>{setTimeout(()=>{ae()},300)})}),(re,W)=>(j(),ce("div",{class:Q(re.$style["metric-editor"])},[u.value=="number"?(j(),qe(qA,{key:0,config:o.config,modelValue:i.value,"onUpdate:modelValue":W[0]||(W[0]=fe=>i.value=fe),style:{width:"100%"},saveOnBlur:!0,saveOnEscape:!1,"show-inline-error":!0,onCancel:f,onOnValidation:g,onEnter:v,onHandleChange:w,maxDecimalChar:b.value,ref_key:"metricEditorInputRef",ref:l},null,8,["config","modelValue","maxDecimalChar"])):u.value=="rating"?(j(),qe(Cs,nn({key:1,"tab-index":1},U(O),{ref_key:"triggerRef2",ref:D,bordered:!0,style:{"--box-padding":"0 ","--icon-size":"18px",background:"#FAFAFA"}}),{default:me(()=>[ge(jA,{params:{maxRating:o.config.range},modelValue:r.value,"onUpdate:modelValue":W[1]||(W[1]=fe=>r.value=fe),onHandleEnter:R,onCancel:f,ref_key:"ratingComponentRef",ref:a},{icon:me(()=>[ge(lt,{source:"rating",src:T()||"Star",size:17},null,8,["src"])]),_:1},8,["params","modelValue"])]),_:1},16)):u.value=="dropdown"?(j(),ce("div",aZ,[ge(Cs,nn(U($),{ref_key:"triggerRef",ref:N,bordered:!0,style:{"--box-padding":"0 4px 0 4px","--icon-size":"18px",background:"#FAFAFA"}}),{suffix:me(({})=>[Ee("div",lZ,[ge(lt,{src:"ChevronDown",color:"#A6A6A6",size:"12"})])]),default:me(()=>[Ke((j(),ce("span",null,[tt(wt(ve.value||""),1)])),[[U(s),{content:ve.value}]])]),_:1},16),Ee("div",{ref_key:"popupRef",ref:V},[U(ie)?(j(),qe(KA,{key:0,ref_key:"metricEditorDropdownRef",ref:I,config:o.config,modelValue:i.value,"onUpdate:modelValue":W[2]||(W[2]=fe=>i.value=fe),onChange:_,onCancel:f},null,8,["config","modelValue"])):Je("",!0)],512)])):(j(),ce("span",uZ,"Formular")),Ke((j(),qe(mt,{ref_key:"confirmButtonRef",ref:q,onHandleClick:te,"tab-index":"1",onKeypress:[zn(Pt(ae,["shift","prevent"]),["tab"]),zn(Pt(f,["prevent"]),["escape"])],disabled:!p.value},{default:me(()=>[ge(lt,{src:"Check"})]),_:1},8,["onKeypress","disabled"])),[[U(s),"Update"]])],2))}}),[["__cssModules",{$style:{"metric-editor":"_metric-editor_18l4p_1","dropdown-trigger":"_dropdown-trigger_18l4p_10"}}]]),dZ=_t(rt({__name:"MetricBulkItem",props:{label:{},morpheme:{},type:{},config:{},attachTo:{}},emits:["loseFocus","open","handleUpdate","focusOnSearch","openSibling"],setup(e,{expose:t,emit:n}){const s=Xt,o=e,i=n,r=B(!1),a=B(null),l=B(null),u=()=>{r.value=!r.value},c=()=>{var g;r.value=!1,(g=l.value)==null||g.resetState()},d=async()=>{var g;r.value=!0,await Ct(),(g=l.value)==null||g.focus()},h=g=>{i("handleUpdate",{id:o.config.id.toString(),value:g})},f=()=>{var g;(g=a.value)==null||g.focus(),i("loseFocus")},p=g=>{const C={Escape:()=>{g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation(),i("focusOnSearch",g)},Tab:()=>{r.value&&c()},Enter:()=>{r.value||d()},ArrowDown:()=>{i("openSibling","down")},ArrowUp:()=>{i("openSibling","up")}}[g.key];C&&C()};return nt(r,g=>{g&&i("open")}),t({hide:c,show:d}),(g,v)=>(j(),ce("div",{class:Q([g.$style["metric-item"],r.value?g.$style.open:""]),tabindex:"0",ref_key:"metricRef",ref:a,onKeydown:p},[Ee("div",{class:Q(g.$style["metric-label"]),onClick:Pt(u,["stop"])},[Tt(g.$slots,"default",{open:r.value},()=>[Ke((j(),ce("span",{class:Q(g.$style["metric-name"])},[tt(wt(e.label),1)],2)),[[U(s),{content:e.label}]]),e.morpheme&&r.value?(j(),ce("small",{key:0,class:Q(g.$style["metric-morpheme"])}," ("+wt(e.morpheme)+") ",3)):Je("",!0)])],2),ge(XD,{mode:"out-in",name:"slide"},{default:me(()=>[r.value?(j(),qe(cZ,{key:`editor-${e.config.id}`,"read-only":!1,focus:r.value,type:e.type,config:e.config,"attach-to":e.attachTo,ref_key:"metricEditorRef",ref:l,onCancel:f,onUpdateMetric:h},null,8,["focus","type","config","attach-to"])):Je("",!0)]),_:1})],34))}}),[["__cssModules",{$style:{"metric-item":"_metric-item_18ft8_1","metric-label":"_metric-label_18ft8_11",open:"_open_18ft8_19","metric-name":"_metric-name_18ft8_23","metric-morpheme":"_metric-morpheme_18ft8_29"}}]]);var Mc=(e=>(e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.ALREADY_REPORTED=208]="ALREADY_REPORTED",e[e.IM_USED=226]="IM_USED",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.FOUND=302]="FOUND",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.SWITCH_PROXY=306]="SWITCH_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",e[e.URI_TOO_LONG=414]="URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.TOO_EARLY=425]="TOO_EARLY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.LOOP_DETECTED=508]="LOOP_DETECTED",e[e.NOT_EXTENDED=510]="NOT_EXTENDED",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",e))(Mc||{});function YA(e,t){return function(){return e.apply(t,arguments)}}const{toString:hZ}=Object.prototype,{getPrototypeOf:aS}=Object,{iterator:km,toStringTag:ZA}=Symbol,Om=(e=>t=>{const n=hZ.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ki=e=>(e=e.toLowerCase(),t=>Om(t)===e),Mm=e=>t=>typeof t===e,{isArray:Nc}=Array,Lc=Mm("undefined");function rf(e){return e!==null&&!Lc(e)&&e.constructor!==null&&!Lc(e.constructor)&&co(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const XA=ki("ArrayBuffer");function fZ(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&XA(e.buffer),t}const pZ=Mm("string"),co=Mm("function"),JA=Mm("number"),af=e=>e!==null&&typeof e=="object",gZ=e=>e===!0||e===!1,Nm=e=>{if(Om(e)!=="object")return!1;const t=aS(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ZA in e)&&!(km in e)},mZ=e=>{if(!af(e)||rf(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},vZ=ki("Date"),yZ=ki("File"),wZ=ki("Blob"),CZ=ki("FileList"),bZ=e=>af(e)&&co(e.pipe),SZ=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||co(e.append)&&((t=Om(e))==="formdata"||t==="object"&&co(e.toString)&&e.toString()==="[object FormData]"))},EZ=ki("URLSearchParams"),[_Z,RZ,DZ,TZ]=["ReadableStream","Request","Response","Headers"].map(ki),IZ=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function lf(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,o;if(typeof e!="object"&&(e=[e]),Nc(e))for(s=0,o=e.length;s<o;s++)t.call(null,e[s],s,e);else{if(rf(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),r=i.length;let a;for(s=0;s<r;s++)a=i[s],t.call(null,e[a],a,e)}}function QA(e,t){if(rf(e))return null;t=t.toLowerCase();const n=Object.keys(e);let s=n.length,o;for(;s-- >0;)if(o=n[s],t===o.toLowerCase())return o;return null}const tu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ek=e=>!Lc(e)&&e!==tu;function lS(){const{caseless:e,skipUndefined:t}=ek(this)&&this||{},n={},s=(o,i)=>{const r=e&&QA(n,i)||i;Nm(n[r])&&Nm(o)?n[r]=lS(n[r],o):Nm(o)?n[r]=lS({},o):Nc(o)?n[r]=o.slice():(!t||!Lc(o))&&(n[r]=o)};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&lf(arguments[o],s);return n}const xZ=(e,t,n,{allOwnKeys:s}={})=>(lf(t,(o,i)=>{n&&co(o)?e[i]=YA(o,n):e[i]=o},{allOwnKeys:s}),e),FZ=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),PZ=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},AZ=(e,t,n,s)=>{let o,i,r;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)r=o[i],(!s||s(r,e,t))&&!a[r]&&(t[r]=e[r],a[r]=!0);e=n!==!1&&aS(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kZ=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},OZ=e=>{if(!e)return null;if(Nc(e))return e;let t=e.length;if(!JA(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},MZ=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&aS(Uint8Array)),NZ=(e,t)=>{const s=(e&&e[km]).call(e);let o;for(;(o=s.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},LZ=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},VZ=ki("HTMLFormElement"),BZ=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,o){return s.toUpperCase()+o}),tk=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),$Z=ki("RegExp"),nk=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};lf(n,(o,i)=>{let r;(r=t(o,i,e))!==!1&&(s[i]=r||o)}),Object.defineProperties(e,s)},HZ=e=>{nk(e,(t,n)=>{if(co(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=e[n];if(co(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},GZ=(e,t)=>{const n={},s=o=>{o.forEach(i=>{n[i]=!0})};return Nc(e)?s(e):s(String(e).split(t)),n},UZ=()=>{},WZ=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function zZ(e){return!!(e&&co(e.append)&&e[ZA]==="FormData"&&e[km])}const jZ=e=>{const t=new Array(10),n=(s,o)=>{if(af(s)){if(t.indexOf(s)>=0)return;if(rf(s))return s;if(!("toJSON"in s)){t[o]=s;const i=Nc(s)?[]:{};return lf(s,(r,a)=>{const l=n(r,o+1);!Lc(l)&&(i[a]=l)}),t[o]=void 0,i}}return s};return n(e,0)},KZ=ki("AsyncFunction"),qZ=e=>e&&(af(e)||co(e))&&co(e.then)&&co(e.catch),sk=((e,t)=>e?setImmediate:t?((n,s)=>(tu.addEventListener("message",({source:o,data:i})=>{o===tu&&i===n&&s.length&&s.shift()()},!1),o=>{s.push(o),tu.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",co(tu.postMessage)),YZ=typeof queueMicrotask<"u"?queueMicrotask.bind(tu):typeof K<"u"&&K.nextTick||sk,Be={isArray:Nc,isArrayBuffer:XA,isBuffer:rf,isFormData:SZ,isArrayBufferView:fZ,isString:pZ,isNumber:JA,isBoolean:gZ,isObject:af,isPlainObject:Nm,isEmptyObject:mZ,isReadableStream:_Z,isRequest:RZ,isResponse:DZ,isHeaders:TZ,isUndefined:Lc,isDate:vZ,isFile:yZ,isBlob:wZ,isRegExp:$Z,isFunction:co,isStream:bZ,isURLSearchParams:EZ,isTypedArray:MZ,isFileList:CZ,forEach:lf,merge:lS,extend:xZ,trim:IZ,stripBOM:FZ,inherits:PZ,toFlatObject:AZ,kindOf:Om,kindOfTest:ki,endsWith:kZ,toArray:OZ,forEachEntry:NZ,matchAll:LZ,isHTMLForm:VZ,hasOwnProperty:tk,hasOwnProp:tk,reduceDescriptors:nk,freezeMethods:HZ,toObjectSet:GZ,toCamelCase:BZ,noop:UZ,toFiniteNumber:WZ,findKey:QA,global:tu,isContextDefined:ek,isSpecCompliantForm:zZ,toJSONObject:jZ,isAsyncFn:KZ,isThenable:qZ,setImmediate:sk,asap:YZ,isIterable:e=>e!=null&&co(e[km])};function qt(e,t,n,s,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),s&&(this.request=s),o&&(this.response=o,this.status=o.status?o.status:null)}Be.inherits(qt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Be.toJSONObject(this.config),code:this.code,status:this.status}}});const ok=qt.prototype,ik={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ik[e]={value:e}}),Object.defineProperties(qt,ik),Object.defineProperty(ok,"isAxiosError",{value:!0}),qt.from=(e,t,n,s,o,i)=>{const r=Object.create(ok);Be.toFlatObject(e,r,function(c){return c!==Error.prototype},u=>u!=="isAxiosError");const a=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return qt.call(r,a,l,n,s,o),e&&r.cause==null&&Object.defineProperty(r,"cause",{value:e,configurable:!0}),r.name=e&&e.name||"Error",i&&Object.assign(r,i),r};const ZZ=null;function uS(e){return Be.isPlainObject(e)||Be.isArray(e)}function rk(e){return Be.endsWith(e,"[]")?e.slice(0,-2):e}function ak(e,t,n){return e?e.concat(t).map(function(o,i){return o=rk(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function XZ(e){return Be.isArray(e)&&!e.some(uS)}const JZ=Be.toFlatObject(Be,{},null,function(t){return/^is[A-Z]/.test(t)});function Lm(e,t,n){if(!Be.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Be.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,v){return!Be.isUndefined(v[g])});const s=n.metaTokens,o=n.visitor||c,i=n.dots,r=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&Be.isSpecCompliantForm(t);if(!Be.isFunction(o))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(Be.isDate(p))return p.toISOString();if(Be.isBoolean(p))return p.toString();if(!l&&Be.isBlob(p))throw new qt("Blob is not supported. Use a Buffer instead.");return Be.isArrayBuffer(p)||Be.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,g,v){let C=p;if(p&&!v&&typeof p=="object"){if(Be.endsWith(g,"{}"))g=s?g:g.slice(0,-2),p=JSON.stringify(p);else if(Be.isArray(p)&&XZ(p)||(Be.isFileList(p)||Be.endsWith(g,"[]"))&&(C=Be.toArray(p)))return g=rk(g),C.forEach(function(b,w){!(Be.isUndefined(b)||b===null)&&t.append(r===!0?ak([g],w,i):r===null?g:g+"[]",u(b))}),!1}return uS(p)?!0:(t.append(ak(v,g,i),u(p)),!1)}const d=[],h=Object.assign(JZ,{defaultVisitor:c,convertValue:u,isVisitable:uS});function f(p,g){if(!Be.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(p),Be.forEach(p,function(C,S){(!(Be.isUndefined(C)||C===null)&&o.call(t,C,Be.isString(S)?S.trim():S,g,h))===!0&&f(C,g?g.concat(S):[S])}),d.pop()}}if(!Be.isObject(e))throw new TypeError("data must be an object");return f(e),t}function lk(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function cS(e,t){this._pairs=[],e&&Lm(e,this,t)}const uk=cS.prototype;uk.append=function(t,n){this._pairs.push([t,n])},uk.toString=function(t){const n=t?function(s){return t.call(this,s,lk)}:lk;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function QZ(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ck(e,t,n){if(!t)return e;const s=n&&n.encode||QZ;Be.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=Be.isURLSearchParams(t)?t.toString():new cS(t,n).toString(s),i){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class dk{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Be.forEach(this.handlers,function(s){s!==null&&t(s)})}}const hk={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},eX={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:cS,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},dS=typeof window<"u"&&typeof document<"u",hS=typeof navigator=="object"&&navigator||void 0,tX=dS&&(!hS||["ReactNative","NativeScript","NS"].indexOf(hS.product)<0),nX=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",sX=dS&&window.location.href||"http://localhost",Gs={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:dS,hasStandardBrowserEnv:tX,hasStandardBrowserWebWorkerEnv:nX,navigator:hS,origin:sX},Symbol.toStringTag,{value:"Module"})),...eX};function oX(e,t){return Lm(e,new Gs.classes.URLSearchParams,{visitor:function(n,s,o,i){return Gs.isNode&&Be.isBuffer(n)?(this.append(s,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function iX(e){return Be.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function rX(e){const t={},n=Object.keys(e);let s;const o=n.length;let i;for(s=0;s<o;s++)i=n[s],t[i]=e[i];return t}function fk(e){function t(n,s,o,i){let r=n[i++];if(r==="__proto__")return!0;const a=Number.isFinite(+r),l=i>=n.length;return r=!r&&Be.isArray(o)?o.length:r,l?(Be.hasOwnProp(o,r)?o[r]=[o[r],s]:o[r]=s,!a):((!o[r]||!Be.isObject(o[r]))&&(o[r]=[]),t(n,s,o[r],i)&&Be.isArray(o[r])&&(o[r]=rX(o[r])),!a)}if(Be.isFormData(e)&&Be.isFunction(e.entries)){const n={};return Be.forEachEntry(e,(s,o)=>{t(iX(s),o,n,0)}),n}return null}function aX(e,t,n){if(Be.isString(e))try{return(t||JSON.parse)(e),Be.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(e)}const uf={transitional:hk,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const s=n.getContentType()||"",o=s.indexOf("application/json")>-1,i=Be.isObject(t);if(i&&Be.isHTMLForm(t)&&(t=new FormData(t)),Be.isFormData(t))return o?JSON.stringify(fk(t)):t;if(Be.isArrayBuffer(t)||Be.isBuffer(t)||Be.isStream(t)||Be.isFile(t)||Be.isBlob(t)||Be.isReadableStream(t))return t;if(Be.isArrayBufferView(t))return t.buffer;if(Be.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(s.indexOf("application/x-www-form-urlencoded")>-1)return oX(t,this.formSerializer).toString();if((a=Be.isFileList(t))||s.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Lm(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),aX(t)):t}],transformResponse:[function(t){const n=this.transitional||uf.transitional,s=n&&n.forcedJSONParsing,o=this.responseType==="json";if(Be.isResponse(t)||Be.isReadableStream(t))return t;if(t&&Be.isString(t)&&(s&&!this.responseType||o)){const r=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(a){if(r)throw a.name==="SyntaxError"?qt.from(a,qt.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Gs.classes.FormData,Blob:Gs.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Be.forEach(["delete","get","head","post","put","patch"],e=>{uf.headers[e]={}});const lX=Be.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),uX=e=>{const t={};let n,s,o;return e&&e.split(`
|
|
142
142
|
`).forEach(function(r){o=r.indexOf(":"),n=r.substring(0,o).trim().toLowerCase(),s=r.substring(o+1).trim(),!(!n||t[n]&&lX[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t},pk=Symbol("internals");function cf(e){return e&&String(e).trim().toLowerCase()}function Vm(e){return e===!1||e==null?e:Be.isArray(e)?e.map(Vm):String(e)}function cX(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const dX=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function fS(e,t,n,s,o){if(Be.isFunction(s))return s.call(this,t,n);if(o&&(t=n),!!Be.isString(t)){if(Be.isString(s))return t.indexOf(s)!==-1;if(Be.isRegExp(s))return s.test(t)}}function hX(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function fX(e,t){const n=Be.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{value:function(o,i,r){return this[s].call(this,t,o,i,r)},configurable:!0})})}let ho=class{constructor(t){t&&this.set(t)}set(t,n,s){const o=this;function i(a,l,u){const c=cf(l);if(!c)throw new Error("header name must be a non-empty string");const d=Be.findKey(o,c);(!d||o[d]===void 0||u===!0||u===void 0&&o[d]!==!1)&&(o[d||l]=Vm(a))}const r=(a,l)=>Be.forEach(a,(u,c)=>i(u,c,l));if(Be.isPlainObject(t)||t instanceof this.constructor)r(t,n);else if(Be.isString(t)&&(t=t.trim())&&!dX(t))r(uX(t),n);else if(Be.isObject(t)&&Be.isIterable(t)){let a={},l,u;for(const c of t){if(!Be.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[u=c[0]]=(l=a[u])?Be.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}r(a,n)}else t!=null&&i(n,t,s);return this}get(t,n){if(t=cf(t),t){const s=Be.findKey(this,t);if(s){const o=this[s];if(!n)return o;if(n===!0)return cX(o);if(Be.isFunction(n))return n.call(this,o,s);if(Be.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=cf(t),t){const s=Be.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||fS(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let o=!1;function i(r){if(r=cf(r),r){const a=Be.findKey(s,r);a&&(!n||fS(s,s[a],a,n))&&(delete s[a],o=!0)}}return Be.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let s=n.length,o=!1;for(;s--;){const i=n[s];(!t||fS(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,s={};return Be.forEach(this,(o,i)=>{const r=Be.findKey(s,i);if(r){n[r]=Vm(o),delete n[i];return}const a=t?hX(i):String(i).trim();a!==i&&delete n[i],n[a]=Vm(o),s[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Be.forEach(this,(s,o)=>{s!=null&&s!==!1&&(n[o]=t&&Be.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
143
143
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(o=>s.set(o)),s}static accessor(t){const s=(this[pk]=this[pk]={accessors:{}}).accessors,o=this.prototype;function i(r){const a=cf(r);s[a]||(fX(o,r),s[a]=!0)}return Be.isArray(t)?t.forEach(i):i(t),this}};ho.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Be.reduceDescriptors(ho.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}}),Be.freezeMethods(ho);function pS(e,t){const n=this||uf,s=t||n,o=ho.from(s.headers);let i=s.data;return Be.forEach(e,function(a){i=a.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function gk(e){return!!(e&&e.__CANCEL__)}function Vc(e,t,n){qt.call(this,e??"canceled",qt.ERR_CANCELED,t,n),this.name="CanceledError"}Be.inherits(Vc,qt,{__CANCEL__:!0});function mk(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new qt("Request failed with status code "+n.status,[qt.ERR_BAD_REQUEST,qt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function pX(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function gX(e,t){e=e||10;const n=new Array(e),s=new Array(e);let o=0,i=0,r;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=s[i];r||(r=u),n[o]=l,s[o]=u;let d=i,h=0;for(;d!==o;)h+=n[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-r<t)return;const f=c&&u-c;return f?Math.round(h*1e3/f):void 0}}function mX(e,t){let n=0,s=1e3/t,o,i;const r=(u,c=Date.now())=>{n=c,o=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=s?r(u,c):(o=u,i||(i=setTimeout(()=>{i=null,r(o)},s-d)))},()=>o&&r(o)]}const Bm=(e,t,n=3)=>{let s=0;const o=gX(50,250);return mX(i=>{const r=i.loaded,a=i.lengthComputable?i.total:void 0,l=r-s,u=o(l),c=r<=a;s=r;const d={loaded:r,total:a,progress:a?r/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-r)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},vk=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},yk=e=>(...t)=>Be.asap(()=>e(...t)),vX=Gs.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Gs.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Gs.origin),Gs.navigator&&/(msie|trident)/i.test(Gs.navigator.userAgent)):()=>!0,yX=Gs.hasStandardBrowserEnv?{write(e,t,n,s,o,i,r){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];Be.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),Be.isString(s)&&a.push(`path=${s}`),Be.isString(o)&&a.push(`domain=${o}`),i===!0&&a.push("secure"),Be.isString(r)&&a.push(`SameSite=${r}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function wX(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function CX(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function wk(e,t,n){let s=!wX(t);return e&&(s||n==!1)?CX(e,t):t}const Ck=e=>e instanceof ho?{...e}:e;function nu(e,t){t=t||{};const n={};function s(u,c,d,h){return Be.isPlainObject(u)&&Be.isPlainObject(c)?Be.merge.call({caseless:h},u,c):Be.isPlainObject(c)?Be.merge({},c):Be.isArray(c)?c.slice():c}function o(u,c,d,h){if(Be.isUndefined(c)){if(!Be.isUndefined(u))return s(void 0,u,d,h)}else return s(u,c,d,h)}function i(u,c){if(!Be.isUndefined(c))return s(void 0,c)}function r(u,c){if(Be.isUndefined(c)){if(!Be.isUndefined(u))return s(void 0,u)}else return s(void 0,c)}function a(u,c,d){if(d in t)return s(u,c);if(d in e)return s(void 0,u)}const l={url:i,method:i,data:i,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(u,c,d)=>o(Ck(u),Ck(c),d,!0)};return Be.forEach(Object.keys({...e,...t}),function(c){const d=l[c]||o,h=d(e[c],t[c],c);Be.isUndefined(h)&&d!==a||(n[c]=h)}),n}const bk=e=>{const t=nu({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:o,xsrfCookieName:i,headers:r,auth:a}=t;if(t.headers=r=ho.from(r),t.url=ck(wk(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&r.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),Be.isFormData(n)){if(Gs.hasStandardBrowserEnv||Gs.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if(Be.isFunction(n.getHeaders)){const l=n.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([c,d])=>{u.includes(c.toLowerCase())&&r.set(c,d)})}}if(Gs.hasStandardBrowserEnv&&(s&&Be.isFunction(s)&&(s=s(t)),s||s!==!1&&vX(t.url))){const l=o&&i&&yX.read(i);l&&r.set(o,l)}return t},bX=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,s){const o=bk(e);let i=o.data;const r=ho.from(o.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=o,c,d,h,f,p;function g(){f&&f(),p&&p(),o.cancelToken&&o.cancelToken.unsubscribe(c),o.signal&&o.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(o.method.toUpperCase(),o.url,!0),v.timeout=o.timeout;function C(){if(!v)return;const b=ho.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),_={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:b,config:e,request:v};mk(function(T){n(T),g()},function(T){s(T),g()},_),v=null}"onloadend"in v?v.onloadend=C:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(C)},v.onabort=function(){v&&(s(new qt("Request aborted",qt.ECONNABORTED,e,v)),v=null)},v.onerror=function(w){const _=w&&w.message?w.message:"Network Error",R=new qt(_,qt.ERR_NETWORK,e,v);R.event=w||null,s(R),v=null},v.ontimeout=function(){let w=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const _=o.transitional||hk;o.timeoutErrorMessage&&(w=o.timeoutErrorMessage),s(new qt(w,_.clarifyTimeoutError?qt.ETIMEDOUT:qt.ECONNABORTED,e,v)),v=null},i===void 0&&r.setContentType(null),"setRequestHeader"in v&&Be.forEach(r.toJSON(),function(w,_){v.setRequestHeader(_,w)}),Be.isUndefined(o.withCredentials)||(v.withCredentials=!!o.withCredentials),a&&a!=="json"&&(v.responseType=o.responseType),u&&([h,p]=Bm(u,!0),v.addEventListener("progress",h)),l&&v.upload&&([d,f]=Bm(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",f)),(o.cancelToken||o.signal)&&(c=b=>{v&&(s(!b||b.type?new Vc(null,e,v):b),v.abort(),v=null)},o.cancelToken&&o.cancelToken.subscribe(c),o.signal&&(o.signal.aborted?c():o.signal.addEventListener("abort",c)));const S=pX(o.url);if(S&&Gs.protocols.indexOf(S)===-1){s(new qt("Unsupported protocol "+S+":",qt.ERR_BAD_REQUEST,e));return}v.send(i||null)})},SX=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let s=new AbortController,o;const i=function(u){if(!o){o=!0,a();const c=u instanceof Error?u:this.reason;s.abort(c instanceof qt?c:new Vc(c instanceof Error?c.message:c))}};let r=t&&setTimeout(()=>{r=null,i(new qt(`timeout ${t} of ms exceeded`,qt.ETIMEDOUT))},t);const a=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:l}=s;return l.unsubscribe=()=>Be.asap(a),l}},EX=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let s=0,o;for(;s<n;)o=s+t,yield e.slice(s,o),s=o},_X=async function*(e,t){for await(const n of RX(e))yield*EX(n,t)},RX=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:s}=await t.read();if(n)break;yield s}}finally{await t.cancel()}},Sk=(e,t,n,s)=>{const o=_X(e,t);let i=0,r,a=l=>{r||(r=!0,s&&s(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await o.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let h=i+=d;n(h)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),o.return()}},{highWaterMark:2})},Ek=64*1024,{isFunction:$m}=Be,DX=(({Request:e,Response:t})=>({Request:e,Response:t}))(Be.global),{ReadableStream:_k,TextEncoder:Rk}=Be.global,Dk=(e,...t)=>{try{return!!e(...t)}catch{return!1}},TX=e=>{e=Be.merge.call({skipUndefined:!0},DX,e);const{fetch:t,Request:n,Response:s}=e,o=t?$m(t):typeof fetch=="function",i=$m(n),r=$m(s);if(!o)return!1;const a=o&&$m(_k),l=o&&(typeof Rk=="function"?(p=>g=>p.encode(g))(new Rk):async p=>new Uint8Array(await new n(p).arrayBuffer())),u=i&&a&&Dk(()=>{let p=!1;const g=new n(Gs.origin,{body:new _k,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!g}),c=r&&a&&Dk(()=>Be.isReadableStream(new s("").body)),d={stream:c&&(p=>p.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!d[p]&&(d[p]=(g,v)=>{let C=g&&g[p];if(C)return C.call(g);throw new qt(`Response type '${p}' is not supported`,qt.ERR_NOT_SUPPORT,v)})});const h=async p=>{if(p==null)return 0;if(Be.isBlob(p))return p.size;if(Be.isSpecCompliantForm(p))return(await new n(Gs.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(Be.isArrayBufferView(p)||Be.isArrayBuffer(p))return p.byteLength;if(Be.isURLSearchParams(p)&&(p=p+""),Be.isString(p))return(await l(p)).byteLength},f=async(p,g)=>{const v=Be.toFiniteNumber(p.getContentLength());return v??h(g)};return async p=>{let{url:g,method:v,data:C,signal:S,cancelToken:b,timeout:w,onDownloadProgress:_,onUploadProgress:R,responseType:T,headers:I,withCredentials:x="same-origin",fetchOptions:P}=bk(p),D=t||fetch;T=T?(T+"").toLowerCase():"text";let F=SX([S,b&&b.toAbortSignal()],w),k=null;const O=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let $;try{if(R&&u&&v!=="get"&&v!=="head"&&($=await f(I,C))!==0){let te=new n(g,{method:"POST",body:C,duplex:"half"}),N;if(Be.isFormData(C)&&(N=te.headers.get("content-type"))&&I.setContentType(N),te.body){const[V,ne]=vk($,Bm(yk(R)));C=Sk(te.body,Ek,V,ne)}}Be.isString(x)||(x=x?"include":"omit");const q=i&&"credentials"in n.prototype,J={...P,signal:F,method:v.toUpperCase(),headers:I.normalize().toJSON(),body:C,duplex:"half",credentials:q?x:void 0};k=i&&new n(g,J);let ee=await(i?D(k,P):D(g,J));const X=c&&(T==="stream"||T==="response");if(c&&(_||X&&O)){const te={};["status","statusText","headers"].forEach(ie=>{te[ie]=ee[ie]});const N=Be.toFiniteNumber(ee.headers.get("content-length")),[V,ne]=_&&vk(N,Bm(yk(_),!0))||[];ee=new s(Sk(ee.body,Ek,V,()=>{ne&&ne(),O&&O()}),te)}T=T||"text";let ve=await d[Be.findKey(d,T)||"text"](ee,p);return!X&&O&&O(),await new Promise((te,N)=>{mk(te,N,{data:ve,headers:ho.from(ee.headers),status:ee.status,statusText:ee.statusText,config:p,request:k})})}catch(q){throw O&&O(),q&&q.name==="TypeError"&&/Load failed|fetch/i.test(q.message)?Object.assign(new qt("Network Error",qt.ERR_NETWORK,p,k),{cause:q.cause||q}):qt.from(q,q&&q.code,p,k)}}},IX=new Map,Tk=e=>{let t=e&&e.env||{};const{fetch:n,Request:s,Response:o}=t,i=[s,o,n];let r=i.length,a=r,l,u,c=IX;for(;a--;)l=i[a],u=c.get(l),u===void 0&&c.set(l,u=a?new Map:TX(t)),c=u;return u};Tk();const gS={http:ZZ,xhr:bX,fetch:{get:Tk}};Be.forEach(gS,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ik=e=>`- ${e}`,xX=e=>Be.isFunction(e)||e===null||e===!1;function FX(e,t){e=Be.isArray(e)?e:[e];const{length:n}=e;let s,o;const i={};for(let r=0;r<n;r++){s=e[r];let a;if(o=s,!xX(s)&&(o=gS[(a=String(s)).toLowerCase()],o===void 0))throw new qt(`Unknown adapter '${a}'`);if(o&&(Be.isFunction(o)||(o=o.get(t))))break;i[a||"#"+r]=o}if(!o){const r=Object.entries(i).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?r.length>1?`since :
|
|
144
144
|
`+r.map(Ik).join(`
|
|
@@ -203,7 +203,7 @@ See ${wO(e,t)}`;return Array.isArray(s)?s.concat(i):[s,i]}var bue={1:"Charting A
|
|
|
203
203
|
`)}checkProperties(e,t,n,s,o){const i=["__ob__","__v_skip","__metadata__"],r=Gue(Object.getOwnPropertyNames(e),[...i,...t,...n],n),a=Object.keys(r);for(const l of a){const u=r[l];let c=`invalid ${s} property '${l}' did you mean any of these: ${u.slice(0,8).join(", ")}.`;n.includes("context")&&(c+=`
|
|
204
204
|
If you are trying to annotate ${s} with application data, use the '${s}.context' property instead.`),_f(c)}if(a.length>0&&o){const l=this.beans.frameworkOverrides.getDocLink(o);_f(`to see all the valid ${s} properties please check: ${l}`)}}};function Gue(e,t,n){const s={},o=e.filter(i=>!t.some(r=>r===i));if(o.length>0)for(const i of o)s[i]=oE({inputValue:i,allSuggestions:n}).values;return s}var Uue=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),Wue={moduleName:"Validation",version:ut,beans:[Hue]};function yL(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var zue=class extends We{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=["excludeChildrenWhenTreeDataFiltering"]}wireBeans(e){this.filterManager=e.filterManager}execute(e){const{changedPath:t}=e;this.filter(t)}filter(e){var n;const t=!!((n=this.filterManager)!=null&&n.isChildFilterPresent());this.filterNodes(t,e)}filterNodes(e,t){const n=(s,o)=>{s.hasChildren()&&e&&!o?s.childrenAfterFilter=s.childrenAfterGroup.filter(i=>{const r=i.childrenAfterFilter&&i.childrenAfterFilter.length>0,a=i.data&&this.filterManager.doesRowPassFilter({rowNode:i});return r||a}):s.childrenAfterFilter=s.childrenAfterGroup,yL(s)};if(this.doingTreeDataFiltering()){const s=(i,r)=>{if(i.childrenAfterGroup)for(let a=0;a<i.childrenAfterGroup.length;a++){const l=i.childrenAfterGroup[a],u=r||this.filterManager.doesRowPassFilter({rowNode:l});l.childrenAfterGroup?s(i.childrenAfterGroup[a],u):n(l,u)}n(i,r)},o=i=>s(i,!1);t.executeFromRootNode(o)}else{const s=o=>n(o,!1);t.forEachChangedNodeDepthFirst(s,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},jue=class extends OE{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,n,s,o){this.comp=e;const i=Pf(this,this.beans.context,o);this.eButtonShowMainFilter=n,this.eFloatingFilterBody=s,this.setGui(t,i),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(i),this.setupLeft(i),this.setupHover(i),this.setupFocus(i),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(i),this.setupUi(),i.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(i);const r=()=>this.onColDefChanged(i);i.addManagedListeners(this.column,{colDefChanged:r}),i.addManagedEventListeners({filterSwitched:({column:a})=>{a===this.column&&r()}}),i.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,n=e.colDef;return Ft(t.gos,{colDef:n,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,n=!!e.floatingFilter;this.active=t&&n}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=li("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new td(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.getLocaleTextFunc();$c(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){var r;const{beans:t}=this;if(Hn(t)===this.eGui)return;const o=fu(t,this.eGui,null,e.shiftKey);if(o){(r=t.headerNavigation)==null||r.scrollToColumn(this.column),e.preventDefault(),o.focus();return}const i=this.findNextColumnWithFloatingFilter(e.shiftKey);i&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:i},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let n=this.column;do if(n=e?t.getColBefore(n):t.getColAfter(n),!n)break;while(!n.getColDef().filter||!n.getColDef().floatingFilter);return n}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case Oe.UP:case Oe.DOWN:case Oe.LEFT:case Oe.RIGHT:if(t)return;mu(e);case Oe.ENTER:t&&hu(this.eGui)&&e.preventDefault();break;case Oe.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const n=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),s=!!e.relatedTarget&&iu(e.relatedTarget,"ag-floating-filter");if(n&&s&&e.target===this.eGui){const o=this.lastFocusEvent,i=!!(o&&o.key===Oe.TAB);if(o&&i){const r=o.shiftKey;hu(this.eGui,r)}}this.focusThis()}setupHover(e){var t;(t=this.beans.colHover)==null||t.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new kE(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){var e;this.suppressFilterButton=!((e=this.beans.menuSvc)!=null&&e.isFloatingFilterButtonEnabled(this.column)),this.highlightFilterButtonWhenActive=!Lo(this.gos)}setupUserComp(){var t;if(!this.active)return;const e=(t=this.beans.colFilter)==null?void 0:t.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){var t;const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;(t=this.beans.menuSvc)==null||t.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{beans:{colFilter:t},column:n,gos:s}=this,o=i=>{if((i==null?void 0:i.source)==="filterDestroyed"&&(!this.isAlive()||!(t!=null&&t.isAlive())))return;const r=this.comp.getFloatingFilterComp();r&&r.then(a=>{if(a){if(s.get("enableFilterHandlers")){const c=i;let d="filter";c!=null&&c.afterFloatingFilter?d="ui":c!=null&&c.afterDataChange?d="dataChanged":(i==null?void 0:i.source)==="api"&&(d="api"),this.updateFloatingFilterParams(this.userCompDetails,d);return}const l=t==null?void 0:t.getCurrentFloatingFilterParentModel(n),u=i?{...i,columns:i.columns??[],source:i.source==="api"?"api":"columnFilter"}:null;a.onParentModelChanged(l,u)}})};[this.destroySyncListener]=e.addManagedListeners(n,{filterChanged:o}),t!=null&&t.isFilterActive(n)&&o(null)}setupWidth(e){const t=()=>{const n=`${this.column.getActualWidth()}px`;this.comp.setWidth(n)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){var e;if(!this.suppressFilterButton&&this.comp){const t=!!((e=this.beans.filterManager)!=null&&e.isFilterAllowed(this.column));this.comp.setButtonWrapperDisplayed(t),this.highlightFilterButtonWhenActive&&t&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const n=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const s=this.beans.colFilter,o=this.active?s==null?void 0:s.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,i=this.comp.getFloatingFilterComp();!i||!o?this.updateCompDetails(e,o,n):i.then(r=>{!r||s!=null&&s.areFilterCompsDifferent(this.userCompDetails??null,o)?this.updateCompDetails(e,o,n):this.updateFloatingFilterParams(o,"colDef")})}updateCompDetails(e,t,n){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),n&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){var s;if(!e)return;let n=e.params;(s=this.comp.getFloatingFilterComp())==null||s.then(o=>{var i;typeof(o==null?void 0:o.refresh)=="function"&&(this.gos.get("enableFilterHandlers")&&(n={...n,model:Ds(((i=this.beans.colFilter)==null?void 0:i.model)??{},this.column.getColId()),source:t}),o.refresh(n))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function Kue(e,t){var s;const n=e.colModel.getCol(t);if(!n){Sn(12,{colKey:t});return}(s=e.menuSvc)==null||s.showColumnMenu({column:n,positionBy:"auto"})}function que(e){var t;(t=e.menuSvc)==null||t.hidePopupMenu()}var Yue={moduleName:"SharedMenu",version:ut,beans:[rse],apiFunctions:{showColumnMenu:Kue,hidePopupMenu:que}},Zue=class extends Tte{postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getDefaultPopupParent(){return this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:n,event:s}=e,o=t.getBoundingClientRect(),i=this.getParentRect();this.setAlignedTo(t,n);let r=!1;const a=()=>{const l=this.keepXYWithinBounds(n,o.top-i.top,0),u=n.clientWidth>0?n.clientWidth:200;r||(n.style.minWidth=`${u}px`,r=!0);const d=i.right-i.left-u;let h;return this.gos.get("enableRtl")?(h=p(),h<0&&(h=f(),this.setAlignedStyles(n,"left")),h>d&&(h=0,this.setAlignedStyles(n,"right"))):(h=f(),h>d&&(h=p(),this.setAlignedStyles(n,"right")),h<0&&(h=0,this.setAlignedStyles(n,"left"))),{x:h,y:l};function f(){return o.right-i.left-2}function p(){return o.left-i.left-u}};this.positionPopup({ePopup:n,keepWithinBounds:!0,updatePosition:a,postProcessCallback:()=>this.callPostProcessPopup(e,"subMenu",n,t,s instanceof MouseEvent?s:void 0)})}callPostProcessPopup(e,t,n,s,o){const i=this.gos.getCallback("postProcessPopup");if(i){const{column:r,rowNode:a}=e;i({column:r,rowNode:a,ePopup:n,type:t,eventSource:s,mouseEvent:o})}}getActivePopups(){return this.popupList.map(e=>e.element)}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const n of this.popupList)t.applyThemeClasses(n.wrapper)}}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return la(e)}},Uv={moduleName:"Popup",version:ut,beans:[Zue]},Xue=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper,:where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}:where(.ag-floating-filter-full-body)>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function Jue(e){const t=e.filterManager;return!!(t!=null&&t.isColumnFilterPresent())||!!(t!=null&&t.isAggregateFilterPresent())}function Que(e,t){var n;return((n=e.filterManager)==null?void 0:n.getColumnFilterInstance(t))??Promise.resolve(void 0)}function ece(e,t){var s;const n=e.colModel.getColDefCol(t);if(n)return(s=e.colFilter)==null?void 0:s.destroyFilter(n,"api")}function tce(e,t){e.frameworkOverrides.wrapIncoming(()=>{var n;return(n=e.filterManager)==null?void 0:n.setFilterModel(t)})}function nce(e){var t;return((t=e.filterManager)==null?void 0:t.getFilterModel())??{}}function sce(e,t,n){const{gos:s,colModel:o,colFilter:i}=e;n&&!s.get("enableFilterHandlers")&&(Xe(288),n=!1);const r=o.getColDefCol(t);return r?(i==null?void 0:i.getModelForColumn(r,n))??null:null}function oce(e,t,n){var s;return((s=e.filterManager)==null?void 0:s.setColumnFilterModel(t,n))??Promise.resolve()}function ice(e,t){var s;const n=e.colModel.getCol(t);if(!n){Sn(12,{colKey:t});return}(s=e.menuSvc)==null||s.showFilterMenu({column:n,containerType:"columnFilter",positionBy:"auto"})}function rce(e){var t;(t=e.menuSvc)==null||t.hideFilterMenu()}function ace(e,t){var s;const n=e.colModel.getCol(t);if(!n){Sn(12,{colKey:t});return}return(s=e.colFilter)==null?void 0:s.getHandler(n,!0)}function lce(e,t){const{colModel:n,colFilter:s,gos:o}=e;if(!o.get("enableFilterHandlers")){Xe(287);return}const{colId:i,action:r}=t;if(i){const a=n.getColById(i);a&&(s==null||s.updateModel(a,r))}else s==null||s.updateAllModels(r)}var uce={filterHandler:()=>({doesFilterPass:()=>!0})},cce=class extends We{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...xM},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){var n,s;this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)});const e=this.gos,t={...((s=(n=e.get("initialState"))==null?void 0:n.filter)==null?void 0:s.filterModel)??{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",n){const{colModel:s,dataTypeSvc:o,filterManager:i}=this.beans;if(o!=null&&o.isPendingInference){this.modelUpdates.push({model:e,source:t});return}const r=[],a=this.getModel(!0);if(e){const l=new Set(Object.keys(e));this.allColumnFilters.forEach((u,c)=>{const d=e[c];r.push(this.setModelOnFilterWrapper(u,d)),l.delete(c)}),l.forEach(u=>{const c=s.getColDefCol(u)||s.getCol(u);if(!c){Xe(62,{colId:u});return}if(!c.isFilterAllowed()){Xe(63,{colId:u});return}const d=this.getOrCreateFilterWrapper(c,!0);if(!d){Xe(64,{colId:u});return}r.push(this.setModelOnFilterWrapper(d,e[u],!0))})}else this.model={},this.allColumnFilters.forEach(l=>{r.push(this.setModelOnFilterWrapper(l,null))});jn.all(r).then(()=>{const l=this.getModel(!0),u=[];this.allColumnFilters.forEach((c,d)=>{const h=a?a[d]:null,f=l?l[d]:null;ff(h,f)||u.push(c.column)}),u.length>0?i==null||i.onFilterChanged({columns:u,source:t}):n&&this.updateActive("filterChanged")})}getModel(e){var i;const t={},{allColumnFilters:n,initialModel:s,beans:{colModel:o}}=this;if(n.forEach((r,a)=>{const l=this.getModelFromFilterWrapper(r);dt(l)&&(t[a]=l)}),!e)for(const r of Object.keys(s)){const a=s[r];dt(a)&&!n.has(r)&&((i=o.getCol(r))!=null&&i.isFilterAllowed())&&(t[r]=a)}return t}setState(e,t,n="api"){if(this.state.clear(),t)for(const s of Object.keys(t)){const o=t[s];this.state.set(s,{model:Ds(this.model,s),state:o})}this.setModel(e,n,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let n=!1;return e.forEach((s,o)=>{const i=s.state;i!=null&&(n=!0,t[o]=i)}),n?t:void 0}getModelFromFilterWrapper(e){const n=e.column.getColId();if(e.isHandler)return Ds(this.model,n);const s=e.filter;return s?typeof s.getModel!="function"?(Xe(66),null):s.getModel():Ds(this.initialModel,n)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){const e=u=>u?u.isFilterActive?u.isFilterActive():(Xe(67),!1):!1,{colModel:t,gos:n}=this.beans,s=!!VS(n),o=u=>{if(!u.isPrimary())return!0;const d=!t.isPivotActive();return!u.isValueActive()||!d?!1:t.isPivotMode()?!0:s},i=[],r=[],a=(u,c,d)=>{c&&(o(u)?i.push(d):r.push(d))},l=[];return this.allColumnFilters.forEach(u=>{const c=u.column,d=c.getColId();if(u.isHandler)l.push(jn.resolve().then(()=>{a(c,this.isHandlerActive(c),{colId:d,isHandler:!0,handler:u.handler,handlerParams:u.handlerParams})}));else{const h=Qa(u);h&&l.push(h.then(f=>{a(c,e(f),{colId:d,isHandler:!1,comp:f})}))}}),jn.all(l).then(()=>{this.activeAggregateFilters=i,this.activeColumnFilters=r})}updateFilterFlagInColumns(e,t){var s;const n=[];return this.allColumnFilters.forEach(o=>{const i=o.column;if(o.isHandler)n.push(jn.resolve().then(()=>{this.setColFilterActive(i,this.isHandlerActive(i),e,t)}));else{const r=Qa(o);r&&n.push(r.then(a=>{this.setColFilterActive(i,a.isFilterActive(),e,t)}))}}),(s=this.beans.groupFilter)==null||s.updateFilterFlags(e,t),jn.all(n)}doFiltersPass(e,t,n){const{data:s,aggData:o}=e,i=n?this.activeAggregateFilters:this.activeColumnFilters,r=n?o:s,a=this.model;for(let l=0;l<i.length;l++){const u=i[l],{colId:c,isHandler:d}=u;if(c!==t)if(d){const{handler:h,handlerParams:f}=u;if(!h.doesFilterPass({node:e,data:r,model:Ds(a,c),handlerParams:f}))return!1}else{const h=u.comp;if(typeof h.doesFilterPass!="function"){Sn(91);continue}if(!h.doesFilterPass({node:e,data:r}))return!1}}return!0}getHandlerParams(e){const t=this.allColumnFilters.get(e.getColId());return t!=null&&t.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:n}=this.beans,s=()=>{this.isAlive()&&(n==null||n.onFilterChanged(e))};t.isRefreshInProgress()?setTimeout(s,0):s()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:n}=e,s=t==null?void 0:t.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",n).then(()=>{this.allColumnFilters.forEach(o=>{var a,l,u;const{column:i,isHandler:r}=o;s!==i.getColId()&&(r&&((l=(a=o.handler).onAnyFilterChanged)==null||l.call(a)),(u=Qa(o,r))==null||u.then(c=>{typeof(c==null?void 0:c.onAnyFilterChanged)=="function"&&c.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(n=>{var i,r;const s=n.isHandler;s&&((r=(i=n.handler).onNewRowsLoaded)==null||r.call(i));const o=Qa(n,s);o&&t.push(o.then(a=>{var l;(l=a.onNewRowsLoaded)==null||l.call(a)}))}),jn.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:n,colModel:s}=this.beans;return(o,i)=>{const r=i?s.getCol(i):e;return r?n.getValue(r,o,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t!=null&&t.isHandler)return this.isHandlerActive(e);const n=t==null?void 0:t.filter;return n?n.isFilterActive():Ds(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=dt(Ds(this.model,e.getColId()));if(t)return t;const n=this.beans.groupFilter;return n!=null&&n.isGroupFilter(e)?n.isFilterActive(e):!1}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?Qa(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const n=Qa(t);return n?n.then(s=>({comp:s,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const n=this.getOrCreateFilterWrapper(e,t);return n!=null&&n.isHandler?n.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let n=this.cachedFilter(e);return!n&&t&&(n=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,n)),n}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>{var n;return(n=this.beans.dataTypeSvc)==null?void 0:n.getBaseDataType(e)},t)}getDefaultFilterFromDataType(e,t=!1){return uQ(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":Xte(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,n,s,o,i){const r=()=>{const u=this.createFilterCompParams(e,o,i),c=s(u,o);return hee(this.beans.userCompFactory,t,c,n)},a=r();return a?{compDetails:a,createFilterUi:u=>(u?r():a).newAgStackInstance()}:null}createFilterInstance(e,t,n,s){var d,h;const o=this.beans.selectableFilter;o!=null&&o.isSelectable(t)&&(t=o.getFilterDef(e,t));const{handler:i,handlerParams:r,handlerGenerator:a}=this.createHandler(e,t,n)??{},l=this.createFilterComp(e,t,n,s,!!i,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:i,handlerGenerator:a,handlerParams:r};const{compDetails:u,createFilterUi:c}=l;return this.isGlobalButtons&&((h=(d=u.params)==null?void 0:d.buttons)!=null&&h.length||Xe(281,{colId:e.getColId()})),{compDetails:u,handler:i,handlerGenerator:a,handlerParams:r,createFilterUi:c}}createBaseFilterParams(e,t){const{filterManager:n,rowModel:s}=this.beans;return Ft(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:o=>(n==null?void 0:n.doesRowPassOtherFilters(e.getColId(),o))??!0,rowModel:s})}createFilterCompParams(e,t,n,s){const o=this.filterChangedCallbackFactory(e),i=this.createBaseFilterParams(e,s);if(i.filterChangedCallback=o,i.filterModifiedCallback=s?()=>{}:r=>this.filterModified(e,r),t){const r=i,a=e.getColId(),l=Ds(this.model,a);r.model=l,r.state=this.state.get(a)??{model:l},r.onModelChange=(u,c)=>{this.updateStoredModel(a,u),this.refreshHandlerAndUi(e,u,"ui",!1,c).then(()=>{o({...c,source:"columnFilter"})})},r.onStateChange=u=>{this.updateState(e,u),this.updateOrRefreshFilterUi(e)},r.onAction=(u,c,d)=>{this.updateModel(e,u,c),this.dispatchLocalEvent({type:"filterAction",column:e,action:u,event:d})},r.getHandler=()=>this.getHandler(e,!0),r.onUiChange=u=>this.filterUiChanged(e,u),r.source=n}return i}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,n){const s=t(),o={created:!0,create:t,filterParams:e.params,compDetails:e,promise:s};return s.then(n),o}createFilterWrapper(e){var a;const{compDetails:t,handler:n,handlerGenerator:s,handlerParams:o,createFilterUi:i}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),l=>l),r=e.getColId();if(n)return delete this.initialModel[r],(a=n.init)==null||a.call(n,{...o,source:"init",model:Ds(this.model,r)}),{column:e,isHandler:!0,handler:n,handlerGenerator:s,handlerParams:o,filterUi:this.createFilterUiForHandler(t,i)};if(i){const l={column:e,filterUi:null,isHandler:!1};return l.filterUi=this.createFilterUiLegacy(t,i,u=>{l.filter=u??void 0}),l}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,n){var f;const{gos:s,frameworkOverrides:o,registry:i}=this.beans;let r;const a=p=>{const g=p.filter;if(YO(g)){const v=g.handler;return v||(r=g.doesFilterPass,r?()=>({doesFilterPass:r}):void 0)}return typeof g=="string"?g:void 0},l=s.get("enableFilterHandlers"),u=l?a(t):void 0,c=p=>()=>this.createBean(i.createDynamicBean(p,!0));let d,h;if(typeof u=="string"){const p=(f=s.get("filterHandlers"))==null?void 0:f[u];p!=null?d=p:Bte.has(u)&&(d=c(u),h=u)}else d=u;if(!d){let p;const{compName:g,jsComp:v,fwComp:C}=eM(o,t);g?p=g:v==null&&C==null&&t.filter===!0&&(p=n),h=this.handlerMap[p],h&&(d=c(h))}return d?{filterHandler:d,handlerNameOrCallback:r??h}:l?(ss(s)&&Xe(277,{colId:e.getColId()}),uce):void 0}createHandler(e,t,n){const s=this.createHandlerFunc(e,t,n);if(!s)return;const o=WS(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:i,filterHandler:r}=s,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,r,o);return{handler:a,handlerParams:l,handlerGenerator:i??r}}createHandlerFromFunc(e,t,n){const s=e.getColDef(),o=t(Ft(this.gos,{column:e,colDef:s})),i=this.createHandlerParams(e,n);return{handler:o,handlerParams:i}}createHandlerParams(e,t){const n=e.getColDef(),s=e.getColId(),o=this.filterChangedCallbackFactory(e);return Ft(this.gos,{colDef:n,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:i=>{var r;return((r=this.beans.filterManager)==null?void 0:r.doesRowPassOtherFilters(s,i))??!0},onModelChange:(i,r)=>{this.updateStoredModel(s,i),this.refreshHandlerAndUi(e,i,"handler",!1,r).then(()=>{o({...r,source:"columnFilter"})})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:n,groupFilter:s}=this.beans;this.allColumnFilters.forEach((i,r)=>{let a;i.column.isPrimary()?a=t.getColDefCol(r):a=t.getCol(r),!(a&&a===i.column)&&(e.push(i.column),this.disposeFilterWrapper(i,"columnChanged"),this.disposeColumnListener(r))});const o=s&&e.every(i=>s.isGroupFilter(i));e.length>0&&!o&&(n==null||n.onFilterChanged({columns:e,source:"api"}))}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const n=this.beans.groupFilter;return n!=null&&n.isGroupFilter(e)?n.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){const{userCompFactory:n,frameworkOverrides:s,selectableFilter:o}=this.beans,i=h=>{const f=this.getOrCreateFilterUi(e);f!=null&&f.then(p=>{h(kf(p))})},r=e.getColDef(),a=o!=null&&o.isSelectable(r)?o.getFilterDef(e,r):r,l=nne(s,a,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",u=this.gos.get("enableFilterHandlers"),c=WS(n,a,this.createFilterCompParams(e,u,"init",!0)),d=Ft(this.gos,{column:e,filterParams:c,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:i,showParentFilter:t});if(u){const h=d,f=e.getColId(),p=this.filterChangedCallbackFactory(e);h.onUiChange=g=>this.floatingFilterUiChanged(e,g),h.model=Ds(this.model,f),h.onModelChange=(g,v)=>{this.updateStoredModel(f,g),this.refreshHandlerAndUi(e,g,"floating",!0,v).then(()=>{p({...v,source:"columnFilter"})})},h.getHandler=()=>this.getHandler(e,!0),h.source="init"}return vee(n,r,d,l)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,n,s){const o="paramsUpdated";if(e.isHandler){const i=t.getColId();delete this.initialModel[i],this.state.delete(i);const r=e.filterUi,a=this.createFilterUiForHandler(n,s);e.filterUi=a;const l=this.eventSvc;r!=null&&r.created?r.promise.then(u=>{this.destroyBean(u),l.dispatchEvent({type:"filterDestroyed",source:o,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:o,column:t})}else this.destroyFilter(t,o)}destroyFilter(e,t="api"){const n=e.getColId(),s=this.allColumnFilters.get(n);this.disposeColumnListener(n),delete this.initialModel[n],s&&this.disposeFilterWrapper(s,t).then(o=>{var i;o&&this.isAlive()&&((i=this.beans.filterManager)==null||i.onFilterChanged({columns:[e],source:"api"}))})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let n=!1;const{column:s,isHandler:o,filterUi:i}=e,r=s.getColId();o&&(n=this.isHandlerActive(s),this.destroyBean(e.handler),delete this.model[r],this.state.delete(r));const a=()=>{this.setColFilterActive(s,!1,"filterDestroyed"),this.allColumnFilters.delete(r),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:s})};if(i){if(i.created)return i.promise.then(l=>(n=o?n:!!(l!=null&&l.isFilterActive()),this.destroyBean(l),a(),n));a()}return jn.resolve(n)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:(t==null?void 0:t.source)??"columnFilter"})}}filterParamsChanged(e,t="api"){var v,C,S,b,w,_;const n=this.allColumnFilters.get(e);if(!n)return;const s=this.beans,o=n.column,i=o.getColDef(),r=o.isFilterAllowed(),a=this.getDefaultFilter(o),l=s.selectableFilter,u=l!=null&&l.isSelectable(i)?l.getFilterDef(o,i):i,c=r?this.createHandlerFunc(o,u,this.getDefaultFilter(o)):void 0,d=!!c,h=n.isHandler;if(h!=d){this.destroyFilter(o,"paramsUpdated");return}const{compDetails:f,createFilterUi:p}=(r?this.createFilterComp(o,u,a,R=>R,d,"colDef"):null)??{compDetails:null,createFilterUi:null},g=(f==null?void 0:f.params)??WS(s.userCompFactory,u,this.createFilterCompParams(o,d,"colDef"));if(h){const R=(c==null?void 0:c.handlerNameOrCallback)??(c==null?void 0:c.filterHandler),T=Ds(this.model,e);if(n.handlerGenerator!=R){const I=n.handler,{handler:x,handlerParams:P}=this.createHandlerFromFunc(o,c.filterHandler,g);n.handler=x,n.handlerParams=P,n.handlerGenerator=R,delete this.model[e],(v=x.init)==null||v.call(x,{...P,source:"init",model:null}),this.destroyBean(I),T!=null&&((C=this.beans.filterManager)==null||C.onFilterChanged({columns:[o],source:t}))}else{const I=this.createHandlerParams(o,f==null?void 0:f.params);n.handlerParams=I,(b=(S=n.handler).refresh)==null||b.call(S,{...I,source:"colDef",model:T})}}if(this.areFilterCompsDifferent(((w=n.filterUi)==null?void 0:w.compDetails)??null,f)||!n.filterUi||!f){this.destroyFilterUi(n,o,f,p);return}n.filterUi.filterParams=g,(_=Qa(n,h))==null||_.then(R=>{(R!=null&&R.refresh?R.refresh(g):!0)===!1?this.destroyFilterUi(n,o,f,p):this.dispatchLocalEvent({type:"filterParamsChanged",column:o,params:g})})}refreshHandlerAndUi(e,t,n,s,o){const i=this.cachedFilter(e);if(!i)return s&&this.getOrCreateFilterWrapper(e,!0),jn.resolve();if(!i.isHandler)return jn.resolve();const{filterUi:r,handler:a,handlerParams:l}=i;return $te(()=>{if(r){const{created:u,filterParams:c}=r;if(u)return r.promise.then(d=>d?{filter:d,filterParams:c}:void 0);r.refreshed=!0}return jn.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},n,o)}setColumnFilterWrapper(e,t){const n=e.getColId();this.allColumnFilters.set(n,t),this.allColumnListeners.set(n,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(n)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:n}=e,{componentClass:s}=t;return!(n===s||(n==null?void 0:n.render)&&(s==null?void 0:s.render)&&n.render===s.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){const t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);const n=this.getOrCreateFilterUi(t);return n?new Promise(s=>{n.then(o=>{s(kf(o))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:n})=>{this.setModelForColumn(e,t).then(()=>n())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:s,model:o}=this,i=e.getColId(),r=s.get(i);return r?r.model??null:Ds(o,i)}const n=this.cachedFilter(e);return n?this.getModelFromFilterWrapper(n):null}setModelForColumn(e,t){var n;if((n=this.beans.dataTypeSvc)!=null&&n.isPendingInference){let s=()=>{};const o=new Promise(i=>{s=i});return this.columnModelUpdates.push({key:e,model:t,resolve:s}),o}return new Promise(s=>{this.setModelForColumnLegacy(e,t).then(o=>s(o))})}getStateForColumn(e){return this.state.get(e)??{model:Ds(this.model,e)}}setModelForColumnLegacy(e,t){const n=this.beans.colModel.getColDefCol(e),s=n?this.getOrCreateFilterWrapper(n,!0):null;return s?this.setModelOnFilterWrapper(s,t):jn.resolve()}setColDefPropsForDataType(e,t,n){var c;const s=e.filter,o=s===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):s;if(typeof o!="string")return;let i,r;const a=this.beans,{filterParams:l,filterValueGetter:u}=e;o==="agMultiColumnFilter"?{filterParams:i,filterValueGetter:r}=((c=a.multiFilter)==null?void 0:c.getParamsForDataType(l,u,t,n))??{}:{filterParams:i,filterValueGetter:r}=qte(o,l,u,t,n,a,this.getLocaleTextFunc()),e.filterParams=i,r&&(e.filterValueGetter=r)}setColFilterActive(e,t,n,s){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",n)),e.dispatchColEvent("filterChanged",n,s)}setModelOnFilterWrapper(e,t,n){return new jn(s=>{if(e.isHandler){const i=e.column,r=i.getColId(),a=this.model[r];if(this.updateStoredModel(r,t),n&&t===a){s();return}this.refreshHandlerAndUi(i,t,"api").then(()=>s());return}const o=Qa(e);if(o){o.then(i=>{if(typeof(i==null?void 0:i.setModel)!="function"){Xe(65),s();return}(i.setModel(t)||jn.resolve()).then(()=>s())});return}s()})}updateStoredModel(e,t){dt(t)?this.model[e]=t:delete this.model[e];const n=this.state.get(e),s={model:t,state:n==null?void 0:n.state};this.state.set(e,s)}filterModified(e,t){var n;(n=this.getOrCreateFilterUi(e))==null||n.then(s=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:s,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,n){var r;const s=e.getColId(),o=this.cachedFilter(e),i=()=>o==null?void 0:o.filterUi;AM(t,i,()=>Ds(this.model,s),()=>this.state.get(s),a=>this.updateState(e,a),a=>{var l,u;return(u=(l=i())==null?void 0:l.filterParams)==null?void 0:u.onModelChange(a,n)},o!=null&&o.isHandler?(r=o.handler.processModelToApply)==null?void 0:r.bind(o.handler):void 0)}updateAllModels(e,t){const n=[];this.allColumnFilters.forEach((s,o)=>{var r;const i=this.beans.colModel.getColDefCol(o);i&&AM(e,()=>s.filterUi,()=>Ds(this.model,o),()=>this.state.get(o),a=>this.updateState(i,a),a=>{this.updateStoredModel(o,a),this.dispatchLocalEvent({type:"filterAction",column:i,action:e}),n.push(this.refreshHandlerAndUi(i,a,"ui"))},s!=null&&s.isHandler?(r=s.handler.processModelToApply)==null?void 0:r.bind(s.handler):void 0)}),n.length&&jn.all(n).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();PM(()=>{var n;return(n=this.cachedFilter(e))==null?void 0:n.filterUi},()=>Ds(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:n}=this;for(const o of n)if(o.source==="COLUMN_MENU")return!1;let s=!1;for(const o of e.keys()){const i=e.get(o);if(i.valid===!1)return!1;(i.model??null)!==Ds(t,o)&&(s=!0)}return s}hasUnappliedModel(e){var s;const{model:t,state:n}=this;return(((s=n.get(e))==null?void 0:s.model)??null)!==Ds(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;const n=this.beans.filterPanelSvc;return n!=null&&n.isActive?!!n.getState(e.getColId()):!1}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function dce(e){var t;return!!((t=e.filterManager)!=null&&t.isAnyFilterPresent())}function hce(e,t="api"){var n;(n=e.filterManager)==null||n.onFilterChanged({source:t})}var fce=class extends We{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:s})=>this.onAdvFilterEnabledChanged(s),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:n}=this;this.alwaysPassFilter=n.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=n.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,n="api"){var s;this.isAdvFilterEnabled()||(s=this.colFilter)==null||s.setState(e,t,n)}setFilterModel(e,t="api",n){var s;if(this.isAdvFilterEnabled()){n||this.warnAdvFilters();return}(s=this.colFilter)==null||s.setModel(e,t)}getFilterModel(){var e;return((e=this.colFilter)==null?void 0:e.getModel())??{}}getFilterState(){var e;return(e=this.colFilter)==null?void 0:e.getState()}isColumnFilterPresent(){var e;return!!((e=this.colFilter)!=null&&e.isFilterPresent())}isAggregateFilterPresent(){var e;return!!((e=this.colFilter)!=null&&e.isAggFilterPresent())}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){var t,n;e?(t=this.colFilter)!=null&&t.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):(n=this.advancedFilter)!=null&&n.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){var e;return!!((e=this.advancedFilter)!=null&&e.isEnabled())}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){VS(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:n,columns:s=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):jn.resolve()).then(()=>{var i;const o={source:t,type:"filterChanged",columns:s};n&&eo(o,n),this.eventSvc.dispatchEvent(o),(i=this.colFilter)==null||i.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){var e;return!!((e=this.colFilter)!=null&&e.isSuppressFlashingCellsBecauseFiltering())}isQuickFilterPresent(){var e;return!!((e=this.quickFilter)!=null&&e.isFilterPresent())}updateAggFiltering(){this.aggFiltering=!!VS(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,colIdToSkip:e})}doesRowPassAggregateFilters(e){var n;const{rowNode:t}=e;return(n=this.alwaysPassFilter)!=null&&n.call(this,t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){var n;const{rowNode:t}=e;return(n=this.alwaysPassFilter)!=null&&n.call(this,t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterAllowed(e){var t;return this.isAdvFilterEnabled()?!1:!!((t=this.colFilter)!=null&&t.isFilterAllowed(e))}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){var n;if(this.isAdvFilterEnabled()){if((n=this.beans.dataTypeSvc)!=null&&n.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){var e;return this.isAdvFilterEnabled()?!1:!!((e=this.colFilter)!=null&&e.hasFloatingFilters())}getColumnFilterInstance(e){var t;return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):((t=this.colFilter)==null?void 0:t.getFilterInstance(e))??Promise.resolve(void 0)}warnAdvFilters(){Xe(68)}setupAdvFilterHeaderComp(e){var t;(t=this.advancedFilter)==null||t.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(const e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){var n;return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):((n=this.colFilter)==null?void 0:n.setModelForColumn(e,t))??Promise.resolve()}},pce=class extends We{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){var e;(e=this.hidePopup)==null||e.call(this)}showMenuAfterMouseEvent(e,t,n,s){e&&!e.isColumn||this.showPopup(e,o=>{var i;(i=this.popupSvc)==null||i.positionPopupUnderMouseEvent({column:e,type:n,mouseEvent:t,ePopup:o})},n,t.target,Lo(this.gos),s)}showMenuAfterButtonClick(e,t,n,s){if(e&&!e.isColumn)return;let o=-1,i="left";const r=Lo(this.gos);!r&&this.gos.get("enableRtl")&&(o=1,i="right");const a=r?void 0:4*o,l=r?void 0:4;this.showPopup(e,u=>{var c;(c=this.popupSvc)==null||c.positionPopupByComponent({type:n,eventSource:t,ePopup:u,nudgeX:a,nudgeY:l,alignSide:i,keepWithinBounds:!0,position:"under",column:e})},n,t,r,s)}showPopup(e,t,n,s,o,i){var g;const r=e?this.createBean(new jte(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!(r!=null&&r.hasFilter())||!e){Sn(57);return}const a=is({tag:"div",cls:`ag-menu${o?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:v=>this.trapFocusWithin(v,a)}),a.appendChild(r==null?void 0:r.getGui());let l;const u=()=>r==null?void 0:r.afterGuiDetached(),c=cQ(this.gos)?s??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,d=v=>{nN(e,!1,"contextMenu");const C=v instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),C&&s&&dr(s)){const S=aM(s);S==null||S.focus({preventScroll:!0})}u(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,n,e),i==null||i()},h=this.getLocaleTextFunc(),f=o&&n!=="columnFilter"?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),p=(g=this.popupSvc)==null?void 0:g.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:d,positionCallback:()=>t(a),anchorToElement:c,ariaLabel:f});p&&(this.hidePopup=l=p.hideFunc),r.afterInit().then(()=>{t(a),r.afterGuiAttached({container:n,hidePopup:l})}),nN(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,n,e)}trapFocusWithin(e,t){e.key!==Oe.TAB||e.defaultPrevented||fu(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),hu(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,n){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:n??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},gce=class extends We{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,n){if(!t)return;const s=e.getColDef(),{selectableFilter:o,valueSvc:i}=this.beans,r=n??(o==null?void 0:o.getFilterValueGetter(e.getColId()))??s.filterValueGetter;return r?this.executeFilterValueGetter(r,t.data,e,t,s):i.getValue(e,t)}executeFilterValueGetter(e,t,n,s,o){const{expressionSvc:i,valueSvc:r}=this.beans,a=Ft(this.gos,{data:t,node:s,column:n,colDef:o,getValue:r.getValueCallback.bind(r,s)});return typeof e=="function"?e(a):i==null?void 0:i.evaluate(e,a)}},mce={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},vce=class extends yn{constructor(){super(mce,[mv]),this.eFloatingFilterText=ct}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const n=e,s=n.getHandler();if(s.getModelAsString){const o=s.getModelAsString(n.model);this.eFloatingFilterText.setValue(o)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const n=t.getModelAsString(e);this.eFloatingFilterText.setValue(n)}})}refresh(e){this.init(e)}},d0=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const n=e.filterOptions??t;this.filterOptions!==n&&(this.filterOptions=n,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e){if(typeof t=="string")continue;const n=[["displayKey"],["displayName"],["predicate","test"]],s=o=>o.some(i=>t[i]!=null)?!0:(Xe(72,{keys:o}),!1);if(!n.every(s)){this.filterOptions=e.filter(o=>o===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const n=t[0];if(typeof n=="string")return n;if(n.displayKey)return n.displayKey;Xe(73)}else Xe(74)}getCustomOption(e){return this.customFilterOptions[e]}};function jf(e,t,n){return n==null?e.splice(t):e.splice(t,n)}function Wv(e){return e==null||typeof e=="string"&&e.trim().length===0}function yce(e){return e==="AND"||e==="OR"?e:"AND"}function wce(e,t,n){if(e==null)return;const{predicate:s}=e;if(s!=null&&!t.some(o=>o==null))return s(t,n)}function Cce(e,t){let n=e.length;return n>t&&(e.splice(t),Xe(78),n=t),n}function Kf(e,t){const n=t.getCustomOption(e);if(n){const{numberOfInputs:o}=n;return o??1}return e&&["empty","notBlank","blank"].indexOf(e)>=0?0:e==="inRange"?2:1}var h0=class extends tne{constructor(e,t,n){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=n,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(e){super.setParams(e);const t=new d0;this.optionsFactory=t,t.init(e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e)}commonUpdateSimpleParams(e){this.setNumConditions(e),this.defaultJoinOperator=yce(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions();const t=this.getGui();this.isReadOnly()?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,n)=>{const s=n===0?e:this.optionsFactory.defaultOption;t.setValue(s,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const n=!e.operator,s=!t.operator;if(!n&&s||n&&!s)return!1;let i;if(n){const r=e,a=t;i=this.areSimpleModelsEqual(r,a)}else{const r=e,a=t;i=r.operator===a.operator&&Ya(r.conditions,a.conditions,(l,u)=>this.areSimpleModelsEqual(l,u))}return i}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),jn.resolve();if(e.operator){const s=e;let o=s.conditions;o==null&&(o=[],Xe(77));const i=Cce(o,this.maxNumConditions),r=this.getNumConditions();if(i<r)this.removeConditionsAndOperators(i);else if(i>r)for(let l=r;l<i;l++)this.createJoinOperatorPanel(),this.createOption();const a=s.operator==="OR";this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),o.forEach((l,u)=>{this.eTypes[u].setValue(l.type,!0),this.setConditionIntoUi(l,u)})}else{const s=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(s.type,!0),this.setConditionIntoUi(s,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),jn.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(Xe(79),t=1),this.maxNumConditions=t;let n=e.numAlwaysVisibleConditions??1;n<1&&(Xe(80),n=1),n>t&&(Xe(81),n=t),this.numAlwaysVisibleConditions=n}createOption(){const e=this.getGui(),t=this.createManagedBean(new uE);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const n=this.createEValue();this.eConditionBodies.push(n),e.appendChild(n),this.putOptionsIntoDropdown(t),this.resetType(t);const s=this.getNumConditions()-1;this.forEachPositionInput(s,o=>this.resetInput(o)),this.addChangedListeners(t,s)}createJoinOperatorPanel(){const e=is({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),n=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const s=this.eJoinPanels.length-1,o=this.joinOperatorId++;this.resetJoinOperatorAnd(t,s,o),this.resetJoinOperatorOr(n,s,o),this.isReadOnly()||(t.onValueChange(this.listener),n.onValueChange(this.listener))}createJoinOperator(e,t,n){const s=this.createManagedBean(new Aee);e.push(s);const o="ag-filter-condition-operator";return s.addCss(o),s.addCss(`${o}-${n}`),t.appendChild(s.getGui()),s}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const n of t)e.addOption(n);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,n=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:n?this.getLocaleTextFunc()(n.displayKey,n.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let n=0;n<this.getNumConditions();n++)this.isConditionUiComplete(n)?e=n:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const n=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<n){this.removeConditionsAndOperators(n+1);const s=e+1,o=n-s;o>0&&this.removeConditionsAndOperators(s,o),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((s,o)=>{const i=this.isConditionDisabled(o,e);s.setDisabled(i||this.filterListOptions.length<=1),o===1&&(vf(this.eJoinPanels[0],i),this.eJoinAnds[0].setDisabled(i),this.eJoinOrs[0].setDisabled(i))}),this.eConditionBodies.forEach((s,o)=>{Bn(s,this.isConditionBodyVisible(o))});const n=(t??this.getJoinOperator())==="OR";for(const s of this.eJoinAnds)s.setValue(!n,!0);for(const s of this.eJoinOrs)s.setValue(n,!0);this.forEachInput((s,o,i,r)=>{this.setElementDisplayed(s,o<r),this.setElementDisabled(s,this.isConditionDisabled(i,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:n,eConditionBodies:s,eJoinPanels:o,eJoinAnds:i,eJoinOrs:r}=this;this.removeComponents(n,e,t),this.removeElements(s,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(o,a,t),this.removeComponents(i,a,t),this.removeComponents(r,a,t)}removeElements(e,t,n){const s=jf(e,t,n);for(const o of s)Mi(o)}removeComponents(e,t,n){const s=jf(e,t,n);for(const o of s)Mi(o.getGui()),this.destroyBean(o)}afterGuiAttached(e){var t;if(super.afterGuiAttached(e),this.resetPlaceholder(),!(e!=null&&e.suppressFocus)){let n;if(!this.isReadOnly()){const s=this.getInputs(0)[0];s instanceof pu&&this.isConditionBodyVisible(0)?n=s.getInputElement():n=(t=this.eTypes[0])==null?void 0:t.getFocusableElement()}(n??this.getGui()).focus({preventScroll:!0})}}afterGuiDetached(){var r;super.afterGuiDetached();const e=this.params;if((r=this.beans.colFilter)!=null&&r.shouldKeepStateOnDetach(e.column))return;e.onStateChange({model:e.model});let t=-1,n=-1,s=!1;const o=this.getJoinOperator();for(let a=this.getNumConditions()-1;a>=0;a--)if(this.isConditionUiComplete(a))t===-1&&(t=a,n=a);else{const l=a>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(a-1),u=a<t;(l||u)&&(this.removeConditionsAndOperators(a,1),s=!0,u&&n--)}let i=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),i=!0),this.shouldAddNewConditionAtEnd(n===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),i=!0),i&&this.updateConditionStatusesAndValues(n,o),s&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=n}getModelAsString(e){var t,n;return((n=(t=this.params.getHandler())==null?void 0:t.getModelAsString)==null?void 0:n.call(t,e))??""}getPlaceholderText(e,t){let n=this.translate(e);if(typeof this.filterPlaceholder=="function"){const s=this.eTypes[t].getValue(),o=this.translate(s);n=this.filterPlaceholder({filterOptionKey:s,filterOption:o,placeholder:n})}else typeof this.filterPlaceholder=="string"&&(n=this.filterPlaceholder);return n}resetPlaceholder(){const e=this.getLocaleTextFunc();this.forEachInput((t,n,s,o)=>{if(!(t instanceof pu))return;const i=n===0&&o>1?"inRangeStart":n===0?"filterOoo":"inRangeEnd",r=n===0&&o>1?e("ariaFilterFromValue","Filter from value"):n===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(i,s)),t.setInputAriaLabel(r)})}setElementValue(e,t,n){e instanceof pu&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){KO(e)&&Bn(e.getGui(),t)}setElementDisabled(e,t){KO(e)&&vf(e.getGui(),t)}attachElementOnChange(e,t){e instanceof pu&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,n)=>{this.forEachPositionTypeInput(n,t,e)})}forEachPositionInput(e,t){const n=this.getConditionType(e);this.forEachPositionTypeInput(e,n,t)}forEachPositionTypeInput(e,t,n){const s=Kf(t,this.optionsFactory),o=this.getInputs(e);for(let i=0;i<o.length;i++){const r=o[i];r!=null&&n(r,i,e,s)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return Kf(t,this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(n=>n==null))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinAnds.forEach((t,n)=>this.resetJoinOperatorAnd(t,n,this.joinOperatorId+n)),this.eJoinOrs.forEach((t,n)=>this.resetJoinOperatorOr(t,n,this.joinOperatorId+n)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const n=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(n).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,n){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),n)}resetJoinOperatorOr(e,t,n){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),n)}resetJoinOperator(e,t,n,s,o){this.updateJoinOperatorDisabled(e.setValue(n,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${o}`).setLabel(s),t)}updateJoinOperatorsDisabled(){const e=(t,n)=>this.updateJoinOperatorDisabled(t,n);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const n=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((s,o,i)=>{i===t&&this.setElementValue(s,n[o]!=null?n[o]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,n,s)=>{this.setElementValue(t,n===0&&s===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,n=>{this.attachElementOnChange(n,this.listener)}))}hasInvalidInputs(){return!1}isReadOnly(){return!!this.params.readOnly}},wL=class{constructor(e,t,n,s,o,i){this.alive=!0,this.context=e,this.eParent=o;const r=fee(t,n,s);r&&r.newAgStackInstance().then(a=>{var c,d;if(!this.alive){e.destroyBean(a);return}if(this.dateComp=a,!a)return;o.appendChild(a.getGui()),(c=a==null?void 0:a.afterGuiAttached)==null||c.call(a);const{tempValue:l,disabled:u}=this;l&&a.setDate(l),u!=null&&((d=a.setDisabled)==null||d.call(a,u)),i==null||i(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){var n;const t=this.dateComp;t?(n=t.setDisabled)==null||n.call(t,e):this.disabled=e}setDisplayed(e){Bn(this.eParent,e)}setInputPlaceholder(e){var t,n;(n=(t=this.dateComp)==null?void 0:t.setInputPlaceholder)==null||n.call(t,e)}setInputAriaLabel(e){var t,n;(n=(t=this.dateComp)==null?void 0:t.setInputAriaLabel)==null||n.call(t,e)}afterGuiAttached(e){var t,n;(n=(t=this.dateComp)==null?void 0:t.afterGuiAttached)==null||n.call(t,e)}updateParams(e){var t,n;(n=(t=this.dateComp)==null?void 0:t.refresh)==null||n.call(t,e)}},f0=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function CL(e,t){const{dateFrom:n,dateTo:s,type:o}=e||{};return[n&&fo(n,void 0,!0)||null,s&&fo(s,void 0,!0)||null].slice(0,Kf(o,t))}var bL=1e3,SL=1/0,bce=class extends h0{constructor(){super("dateFilter",CL,f0),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=bL,this.maxValidYear=SL,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(l,u)=>{const c=e[l];if(c!=null)if(isNaN(c))Xe(82,{param:l});else return c==null?u:Number(c);return u},n=t("minValidYear",bL),s=t("maxValidYear",SL);this.minValidYear=n,this.maxValidYear=s,n>s&&Xe(83);const{minValidDate:o,maxValidDate:i}=e,r=o instanceof Date?o:fo(o);this.minValidDate=r;const a=i instanceof Date?i:fo(i);this.maxValidDate=a,r&&a&&r>a&&Xe(84)}createDateCompWrapper(e){const{beans:{userCompFactory:t,context:n,gos:s},params:o}=this,i=new wL(n,t,o.colDef,Ft(s,{onDateChanged:()=>this.onUiChanged(),filterParams:o,location:"filter"}),e);return this.addDestroyFunc(()=>i.destroy()),i}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=is({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,n,s){const o=is({tag:"div",cls:`ag-filter-${s} ag-filter-date-${s}`});t.push(o),e.appendChild(o),n.push(this.createDateCompWrapper(o))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),jf(this.eConditionPanelsFrom,e,t),jf(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,n){const s=jf(e,t,n);for(const o of s)o.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:n,minValidYear:s,maxValidYear:o}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<s)return!1;if(n){if(e>n)return!1}else if(e.getUTCFullYear()>o)return!1;return!0}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachInput((n,s,o,i)=>{o!==e||!t||s>=i||(t=t&&this.isValidDateValue(n.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),n={},s=this.getValues(e),o=this.params.useIsoSeparator?"T":" ";return s.length>0&&(n.dateFrom=Vo(s[0],!0,o)),s.length>1&&(n.dateTo=Vo(s[1],!0,o)),{dateFrom:null,dateTo:null,filterType:this.filterType,type:t,...n}}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),n=e("ariaFilterValue","Filter Value");this.forEachInput(s=>{s.setInputPlaceholder(t),s.setInputAriaLabel(n)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(n,s,o,i)=>{s<i&&t.push(n.getDate())}),t}translate(e){return e==="lessThan"?super.translate("before"):e==="greaterThan"?super.translate("after"):super.translate(e)}},EL=class extends We{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,n=new d0;this.optionsFactory=n,n.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(n,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source==="colDef"){const t=e.filterParams,n=this.optionsFactory;n.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:n,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(t==null)return!0;const{operator:n}=t,s=[];if(n){const r=t;s.push(...r.conditions??[])}else s.push(t);const o=n&&n==="OR"?"some":"every",i=this.params.getValue(e.node);return s[o](r=>this.individualConditionPasses(e,r,i))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:n,maxNumConditions:s}}=e;if(t==null)return;let i=VM(t)?t.conditions:[t];const r=(n==null?void 0:n.map(c=>typeof c=="string"?c:c.displayKey))??this.defaultOptions;if(!(!i||i.every(c=>r.find(d=>d===c.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let l=!1;const u=this.filterType;if((i&&!i.every(c=>c.filterType===u)||t.filterType!==u)&&(i=i.map(c=>({...c,filterType:u})),l=!0),typeof s=="number"&&i&&i.length>s&&(i=i.slice(0,s),l=!0),l){const c=i.length>1?{...t,filterType:u,conditions:i}:{...i[0],filterType:u};this.params={...e,model:c},e.onModelChange(c)}}individualConditionPasses(e,t,n){const s=this.optionsFactory,o=this.mapValuesFromModel(t,s),i=s.getCustomOption(t.type),r=wce(i,o,n);return r??(n==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(o,n,t,e))}},_L=class extends EL{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:n,includeBlanksInGreaterThan:s,includeBlanksInLessThan:o,includeBlanksInRange:i}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(n)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(s)return!0;break;case"lessThan":case"lessThanOrEqual":if(o)return!0;break;case"inRange":if(i)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,n){const s=n.type;if(!this.isValid(t))return s==="notEqual"||s==="notBlank";const o=this.comparator(),i=e[0]!=null?o(e[0],t):0;switch(s){case"equals":return i===0;case"notEqual":return i!==0;case"greaterThan":return i>0;case"greaterThanOrEqual":return i>=0;case"lessThan":return i<0;case"lessThanOrEqual":return i<=0;case"inRange":{const r=o(e[1],t);return this.params.filterParams.inRangeInclusive?i>=0&&r<=0:i>0&&r<0}case"blank":return Wv(t);case"notBlank":return!Wv(t);default:return Xe(76,{filterModelType:s}),!0}}},RL={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},Sce={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},p0=class extends We{constructor(e,t,n){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=n}getModelAsString(e,t){const n=this.getLocaleTextFunc(),s=t==="filterToolPanel";if(!e)return s?el(this,"filterSummaryInactive"):null;if(e.operator!=null){const i=e,a=(i.conditions??[]).map(u=>this.getModelAsString(u,t)),l=i.operator==="AND"?"andCondition":"orCondition";return a.join(` ${el(this,l)} `)}else{if(e.type==="blank"||e.type==="notBlank")return s?el(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):n(e.type,e.type);{const i=e,r=this.optionsFactory.getCustomOption(i.type),{displayKey:a,displayName:l,numberOfInputs:u}=r||{};return a&&l&&u===0?n(a,l):this.conditionToString(i,s,i.type==="inRange"||u===2,a,l)}}}updateParams(e){const{optionsFactory:t,filterParams:n}=e;this.optionsFactory=t,this.filterParams=n}conditionForToolPanel(e,t,n,s,o,i){let r;const a=this.getTypeKey(e);return a&&(r=el(this,a)),o&&i&&(r=this.getLocaleTextFunc()(o,i)),r!=null?t?`${r} ${el(this,"filterSummaryInRangeValues",[n(),s()])}`:`${r} ${n()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},DL=class extends p0{constructor(e,t){super(e,t,n=>{const{dataTypeSvc:s,valueSvc:o}=this.beans,i=t.column,r=s==null?void 0:s.getDateFormatterFunction(i),a=r?r(n??void 0):n;return o.formatValue(i,null,a)}),this.filterTypeKeys=RL}conditionToString(e,t,n,s,o){const{type:i}=e,r=fo(e.dateFrom),a=fo(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,u=t?this.formatValue.bind(this):h=>sE(h,l),c=()=>r!==null?u(r):"null",d=()=>a!==null?u(a):"null";if(t){const h=this.conditionForToolPanel(i,n,c,d,s,o);if(h!=null)return h}return n?`${c()}-${d()}`:r!=null?u(r):`${i}`}};function Ece(e,t){const n=t;return n<e?-1:n>e?1:0}var _ce=class extends _L{constructor(){super(CL,f0),this.filterType="date",this.FilterModelFormatterClass=DL}comparator(){return this.params.filterParams.comparator??Ece}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}},TL=class extends yn{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let n;t?n=e.conditions[0]:n=e,this.lastType=n.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const n=e;return this.isTypeEditable(n.type)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){const n=e;this.onModelUpdated(n.model)}}setParams(e){const t=new d0;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const n=this.optionsFactory.defaultOption;t||(this.lastType=n),this.readOnly=!!e.filterParams.readOnly;const s=this.isTypeEditable(n);this.setEditable(s)}refresh(e){this.params=e;const t=e,n=this.reactive;if((!n||t.source==="colDef")&&this.updateParams(e),n){const{source:s,model:o}=t;if(s==="dataChanged"||s==="ui")return;this.onModelUpdated(o)}}updateParams(e){const t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t!=null&&t.afterFloatingFilter||t!=null&&t.afterDataChange||this.onModelUpdated(e)}hasSingleInput(e){var n;const t=(n=this.optionsFactory.getCustomOption(e))==null?void 0:n.numberOfInputs;return t==null||t==1}isTypeEditable(e){const t=["inRange","empty","blank","notBlank"];return!!e&&!this.readOnly&&this.hasSingleInput(e)&&t.indexOf(e)<0}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},Rce={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},Dce=class extends TL{constructor(){super(Rce,[mv]),this.eReadOnlyText=ct,this.eDateWrapper=ct,this.FilterModelFormatterClass=DL,this.filterType="date",this.defaultOptions=f0}setParams(e){super.setParams(e),this.createDateComponent();const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const n=e?fo(e.dateFrom):null;this.dateComp.setDate(n),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){Bn(this.eDateWrapper,e),Bn(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const n=t.model,s=Vo(e),o=s==null?null:{...n??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:s};t.onModelChange(o,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t==null||t.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=yE(e,this.defaultDebounceMs);return Ft(this.gos,{onDateChanged:As(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:n,params:s}=this;this.dateComp=new wL(e,t,s.column.getColDef(),this.getDateComponentParams(),n,o=>{o.setInputAriaLabel(this.getAriaLabel(s))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},Tce={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},Ice=class extends yn{constructor(){super(Tce,[mv]),this.eDateInput=ct,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}setParams(e){var h;const t=this.eDateInput.getInputElement(),n=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=n&&Za();const{minValidYear:s,maxValidYear:o,minValidDate:i,maxValidDate:r,buttons:a,includeTime:l,colDef:u}=e.filterParams||{},c=this.beans.dataTypeSvc,d=l??((h=c==null?void 0:c.getDateIncludesTimeFlag)==null?void 0:h.call(c,u.cellDataType))??!1;if(n?d?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text",i&&s&&Xe(85),r&&o&&Xe(86),i&&r){const[f,p]=[i,r].map(g=>g instanceof Date?g:fo(g));f&&p&&f.getTime()>p.getTime()&&Xe(87)}i?i instanceof Date?t.min=sE(i):t.min=i:s&&(t.min=`${s}-01-01`),r?r instanceof Date?t.max=sE(r):t.max=r:o&&(t.max=`${o}-12-31`),this.isApply=e.location==="floatingFilter"&&!!(a!=null&&a.includes("apply"))}refresh(e){this.params=e,this.setParams(e)}getDate(){return fo(this.eDateInput.getValue())}setDate(e){var s;const t=this.params.filterParams.colDef.cellDataType,n=((s=this.beans.dataTypeSvc)==null?void 0:s.getDateIncludesTimeFlag(t))??!1;this.eDateInput.setValue(Vo(e,n))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e!=null&&e.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){var t;return((t=e==null?void 0:e.filterParams)==null?void 0:t.browserDatePicker)??!0}},g0=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function m0(e){const{allowedCharPattern:t}=e??{};return t??null}function v0(e){return e==null||isNaN(e)?null:e}function IL(e,t){const{filter:n,filterTo:s,type:o}=e||{};return[v0(n),v0(s)].slice(0,Kf(o,t))}var xce=class extends h0{constructor(){super("numberFilter",IL,g0),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}setElementValue(e,t,n){const{numberFormatter:s}=this.params,o=!n&&s?s(t??null):t;super.setElementValue(e,o)}createEValue(){const e=m0(this.params),t=is({tag:"div",cls:"ag-filter-body",role:"presentation"});return this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,n,s){const o=this.createManagedBean(s?new gu({allowedCharPattern:s}):new lE);o.addCss(`ag-filter-${n}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui())}removeEValues(e,t){const n=s=>this.removeComponents(s,e,t);n(this.eValuesFrom),n(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(n,s,o,i)=>{s<i&&t.push(v0(this.stringToFloat(n.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}stringToFloat(e){if(typeof e=="number")return e;let t=Qr(e);t!=null&&t.trim()===""&&(t=null);const n=this.params.numberParser;return n?n(t):t==null||t.trim()==="-"?null:Number.parseFloat(t)}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},s=this.getValues(e);return s.length>0&&(n.filter=s[0]),s.length>1&&(n.filterTo=s[1]),n}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{t.getInputElement().validity.valid||(e=!0)}),e}},xL=class extends p0{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=RL}conditionToString(e,t,n,s,o){const{filter:i,filterTo:r,type:a}=e,l=this.formatValue.bind(this);if(t){const u=this.conditionForToolPanel(a,n,()=>l(i),()=>l(r),s,o);if(u!=null)return u}return n?`${l(i)}-${l(r)}`:i!=null?l(i):`${a}`}},Fce=class extends _L{constructor(){super(IL,g0),this.filterType="number",this.FilterModelFormatterClass=xL}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},FL=class extends We{constructor(e){super(),this.params=e,this.eInput=ct,this.onValueChanged=()=>{}}setupGui(e){var s;this.eInput=this.createManagedBean(new gu((s=this.params)==null?void 0:s.config));const t=this.eInput.getGui();e.appendChild(t);const n=o=>this.onValueChanged(o);this.addManagedListeners(t,{input:n,keydown:n})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t}){const{eInput:n}=this;n.setInputAriaLabel(e),t!==void 0&&n.setAutoComplete(t)}};function y0(e){const t=e==null?void 0:e.trim();return t===""?e:t}function PL(e,t){const{filter:n,filterTo:s,type:o}=e||{};return[n||null,s||null].slice(0,Kf(o,t))}var Pce={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},AL=class extends TL{constructor(){super(...arguments),this.eFloatingFilterInputContainer=ct,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(Pce)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){const t=e.browserAutoComplete??!1,{inputSvc:n,defaultDebounceMs:s,readOnly:o}=this;if(n.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:t}),this.applyActive=bv(e.filterParams),!o){const i=yE(e.filterParams,s),r=As(this,this.syncUpWithParentFilter.bind(this),i);n.setValueChangedListener(r)}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,n=t.getValue();Ps(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(n,!0)}syncUpWithParentFilter(e){const t=e.key===Oe.ENTER,n=this.reactive;if(n&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:s,params:o,lastType:i}=this;let r=s.getValue();if(o.filterParams.trimInput&&(r=y0(r),s.setValue(r,!0)),n){const a=o,l=a.model,u=this.convertValue(r),c=u==null?null:{...l??{filterType:this.filterType,type:i??this.optionsFactory.defaultOption},filter:u};a.onModelChange(c,{afterFloatingFilter:!0})}else o.parentFilterInstance(a=>{a==null||a.onFloatingFilterChanged(i||null,r||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},Ace=class extends We{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new lE),this.eTextInput=this.createManagedBean(new gu),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),n=this.eTextInput.getGui();e.appendChild(t),e.appendChild(n),this.setupListeners(t,s=>this.onValueChanged(s)),this.setupListeners(n,s=>this.onValueChanged(s))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams(e){this.setAriaLabel(e.ariaLabel),e.autoComplete!==void 0&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},kce=class extends AL{constructor(){super(...arguments),this.FilterModelFormatterClass=xL,this.filterType="number",this.defaultOptions=g0}updateParams(e){m0(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=m0(e.filterParams),this.allowedCharPattern?this.createManagedBean(new FL({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new Ace)}convertValue(e){return e?Number(e):null}},w0=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],Oce=class extends h0{constructor(){super("textFilter",PL,w0),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},s=this.getValues(e);return s.length>0&&(n.filter=s[0]),s.length>1&&(n.filterTo=s[1]),n}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(n,s,o,i)=>{s<i&&t.push(Qr(n.getValue()))}),t}createEValue(){const e=is({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:n}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,n,"to"),e}createFromToElement(e,t,n){const s=this.createManagedBean(new gu);s.addCss(`ag-filter-${n}`),s.addCss("ag-filter-filter"),t.push(s),e.appendChild(s.getGui())}removeEValues(e,t){const n=i=>this.removeComponents(i,e,t),{eValuesFrom:s,eValuesTo:o}=this;n(s),n(o)}},kL=class extends p0{constructor(){super(...arguments),this.filterTypeKeys=Sce}conditionToString(e,t,n,s,o){const{filter:i,filterTo:r,type:a}=e;if(t){const l=c=>()=>el(this,"filterSummaryTextQuote",[c]),u=this.conditionForToolPanel(a,n,l(i),l(r),s,o);if(u!=null)return u}return n?`${i}-${r}`:i!=null?`${i}`:`${a}`}},Mce=({filterOption:e,value:t,filterText:n})=>{if(n==null)return!1;switch(e){case"contains":return t.includes(n);case"notContains":return!t.includes(n);case"equals":return t===n;case"notEqual":return t!=n;case"startsWith":return t.indexOf(n)===0;case"endsWith":{const s=t.lastIndexOf(n);return s>=0&&s===t.length-n.length}default:return!1}},Nce=e=>e,Lce=e=>e==null?null:e.toString().toLowerCase(),Vce=class extends EL{constructor(){super(PL,w0),this.filterType="text",this.FilterModelFormatterClass=kL}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??Mce,this.formatter=t.textFormatter??(t.caseSensitive?Nce:Lce)}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,n,s){const o=e.map(h=>this.formatter(h))||[],i=this.formatter(t),{api:r,colDef:a,column:l,context:u,filterParams:{textFormatter:c}}=this.params;if(n.type==="blank")return Wv(t);if(n.type==="notBlank")return!Wv(t);const d={api:r,colDef:a,column:l,context:u,node:s.node,data:s.data,filterOption:n.type,value:i,textFormatter:c};return o.some(h=>this.matcher({...d,filterText:h}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=n=>{const s={...n},{filter:o,filterTo:i}=n;return o&&(s.filter=y0(o)??null),i&&(s.filterTo=y0(i)??null),s};return VM(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},Bce=class extends AL{constructor(){super(...arguments),this.FilterModelFormatterClass=kL,this.filterType="text",this.defaultOptions=w0}createFloatingFilterInputService(){return this.createManagedBean(new FL)}};function $ce(e){var t;return!!((t=e.quickFilter)!=null&&t.isFilterPresent())}function Hce(e){var t;return(t=e.quickFilter)==null?void 0:t.getText()}function Gce(e){var t;(t=e.quickFilter)==null||t.resetCache()}var Uce=class extends We{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",n=>this.setFilter(n.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){var l;const{autoColSvc:e,colModel:t,gos:n,pivotResultCols:s}=this.beans,o=t.isPivotMode(),i=e==null?void 0:e.getColumns(),r=t.getColDefCols();let a=(o&&!n.get("applyQuickFilterBeforePivotOrAgg")?(l=s==null?void 0:s.getPivotResultCols())==null?void 0:l.list:r)??[];i&&(a=a.concat(i)),this.colsToUse=n.get("includeHiddenColumnsInQuickFilter")?a:a.filter(u=>u.isVisible()||u.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(n=>t?this.doesRowPassCache(e,n):this.doesRowPassNoCache(e,n))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return dt(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){Xe(70,{newFilter:e});return}const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),n=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,n&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(n=>{const s=this.getTextForColumn(n,e);return dt(s)&&s.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let n;e?(this.checkGenerateAggText(t),n=t.quickFilterAggregateText):n=this.getAggText(t);const{quickFilterParts:s,matcher:o}=this;return o(s,n)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let n=this.beans.filterValueSvc.getValue(e,t);const s=e.getColDef();if(s.getQuickFilterText){const o=Ft(this.gos,{value:n,node:t,data:t.data,column:e,colDef:s});n=s.getQuickFilterText(o)}return dt(n)?n.toString().toUpperCase():null}getAggText(e){const t=[];for(const n of this.colsToUse){const s=this.getTextForColumn(n,e);dt(s)&&t.push(s)}return t.join(`
|
|
205
205
|
`)}},Wce={moduleName:"ClientSideRowModelFilter",version:ut,rowModels:["clientSide"],beans:[zue]},C0={moduleName:"FilterCore",version:ut,beans:[fce],apiFunctions:{isAnyFilterPresent:dce,onFilterChanged:hce},css:[Xue],dependsOn:[Wce]},OL={moduleName:"FilterValue",version:ut,beans:[gce]},zv={moduleName:"ColumnFilter",version:ut,beans:[cce,pce],dynamicBeans:{headerFilterCellCtrl:jue},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:Jue,getColumnFilterInstance:Que,destroyFilter:ece,setFilterModel:tce,getFilterModel:nce,getColumnFilterModel:sce,setColumnFilterModel:oce,showColumnFilter:ice,hideColumnFilter:rce,getColumnFilterHandler:ace,doFilterAction:lce},dependsOn:[C0,Uv,OL,Yue]},zce={moduleName:"CustomFilter",version:ut,userComponents:{agReadOnlyFloatingFilter:vce},dependsOn:[zv]},jce={moduleName:"TextFilter",version:ut,dependsOn:[zv],userComponents:{agTextColumnFilter:{classImp:Oce,params:{useForm:!0}},agTextColumnFloatingFilter:Bce},dynamicBeans:{agTextColumnFilterHandler:Vce}},Kce={moduleName:"NumberFilter",version:ut,dependsOn:[zv],userComponents:{agNumberColumnFilter:{classImp:xce,params:{useForm:!0}},agNumberColumnFloatingFilter:kce},dynamicBeans:{agNumberColumnFilterHandler:Fce}},qce={moduleName:"DateFilter",version:ut,dependsOn:[zv],userComponents:{agDateColumnFilter:{classImp:bce,params:{useForm:!0}},agDateInput:Ice,agDateColumnFloatingFilter:Dce},dynamicBeans:{agDateColumnFilterHandler:_ce}},Yce={moduleName:"QuickFilterCore",version:ut,rowModels:["clientSide"],beans:[Uce],dependsOn:[C0,OL]},Zce={moduleName:"QuickFilter",version:ut,apiFunctions:{isQuickFilterPresent:$ce,getQuickFilter:Hce,resetQuickFilter:Gce},dependsOn:[Yce]},Xce={moduleName:"ExternalFilter",version:ut,dependsOn:[C0]},Jce=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",b0=(e,t,n)=>{var a,l,u;const{editModelSvc:s}=e,o=(l=(a=s==null?void 0:s.getCellValidationModel())==null?void 0:a.getCellValidation(t))==null?void 0:l.errorMessages,i=(u=s==null?void 0:s.getRowValidationModel().getRowValidation(t))==null?void 0:u.errorMessages,r=o||i;return r!=null&&r.length?r.join(n("tooltipValidationErrorSeparator",". ")):void 0},Qce=class extends We{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,n,s){e&&t.destroyBean(e);const o=this.gos,i=c0(o),{column:r,eGui:a}=t,l=r.getColDef();!s&&i&&!l.headerComponent&&(s=Zm(()=>a.querySelector(".ag-header-cell-text")));const u="header",d=this.beans.colNames.getDisplayNameForColumn(r,"header",!0),h=n??d,f={getGui:()=>a,getLocation:()=>u,getTooltipValue:()=>{var g;return n??((g=l==null?void 0:l.headerTooltipValueGetter)==null?void 0:g.call(l,Ft(o,{location:u,colDef:l,column:r,value:h,valueFormatted:d})))??(l==null?void 0:l.headerTooltip)},shouldDisplayTooltip:s,getAdditionalParams:()=>({column:r,colDef:r.getColDef()})};let p=this.createTooltipFeature(f);return p&&(p=t.createBean(p),t.setRefreshFunction("tooltip",()=>p.refreshTooltip())),p}setupHeaderGroupTooltip(e,t,n,s){e&&t.destroyBean(e);const o=this.gos,i=c0(o),{column:r,eGui:a}=t,l=r.getColGroupDef();!s&&i&&!(l!=null&&l.headerGroupComponent)&&(s=Zm(()=>a.querySelector(".ag-header-group-text")));const u="headerGroup",d=this.beans.colNames.getDisplayNameForColumnGroup(r,"header"),h=n??d,f={getGui:()=>a,getLocation:()=>u,getTooltipValue:()=>{var g;return n??((g=l==null?void 0:l.headerTooltipValueGetter)==null?void 0:g.call(l,Ft(o,{location:u,colDef:l,column:r,value:h,valueFormatted:d})))??(l==null?void 0:l.headerTooltip)},shouldDisplayTooltip:s,getAdditionalParams:()=>{const g={column:r};return l&&(g.colDef=l),g}},p=this.createTooltipFeature(f);return p&&t.createBean(p)}enableCellTooltipFeature(e,t,n){const{beans:s}=this,{gos:o,editSvc:i}=s,{column:r,rowNode:a}=e;let l="cell";const u=()=>{const f=!!!(i!=null&&i.isEditing(e))&&b0(s,e,this.getLocaleTextFunc());if(f)return l="cellEditor",f;l="cell";const p=r.getColDef(),g=a.data;if(p.tooltipField&&dt(g))return Gf(g,p.tooltipField,r.isTooltipFieldContainsDots());const v=p.tooltipValueGetter;return v?v(Ft(o,{location:"cell",colDef:r.getColDef(),column:r,rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,value:e.value,valueFormatted:e.valueFormatted})):null},c=c0(o);n||(c&&!e.isCellRenderer()?n=()=>{const h=!!(i!=null&&i.isEditing(e));if(!h&&b0(s,e,this.getLocaleTextFunc()))return!0;if(!r.isTooltipEnabled())return!1;const g=Zm(()=>{const v=e.eGui;return v.children.length===0?v:v.querySelector(".ag-cell-value")});return!h&&g()}:n=()=>!(i!=null&&i.isEditing(e)));const d={getGui:()=>e.eGui,getLocation:()=>l,getTooltipValue:t!=null?()=>t:u,shouldDisplayTooltip:n,getAdditionalParams:()=>({column:r,colDef:r.getColDef(),rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(d,s)}setupFullWidthRowTooltip(e,t,n,s){const o={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>n,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:s},i=this.beans,r=i.context;e&&t.destroyBean(e,r);const a=this.createTooltipFeature(o,i);if(a)return t.createBean(a,r)}setupCellEditorTooltip(e,t){var a,l;const{beans:n}=this,{context:s}=n,o=((a=t.getValidationElement)==null?void 0:a.call(t,!0))||!((l=t.isPopup)!=null&&l.call(t))&&e.eGui;if(!o)return;const i={getGui:()=>o,getTooltipValue:()=>b0(n,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{var p,g;const{editModelSvc:u}=n,c=(p=u==null?void 0:u.getRowValidationModel())==null?void 0:p.getRowValidationMap(),d=(g=u==null?void 0:u.getCellValidationModel())==null?void 0:g.getCellValidationMap(),h=!!c&&c.size>0,f=!!d&&d.size>0;return h||f}},r=this.createTooltipFeature(i,n);if(r)return e.createBean(r,s)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=dt(t.tooltipField)||dt(t.tooltipValueGetter)||dt(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},ede=class extends _te{createTooltipComp(e,t){const n=mee(this.beans.userCompFactory,e);n==null||n.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){var e;(e=this.onColumnMovedEventCallback)==null||e.call(this),this.onColumnMovedEventCallback=void 0}},ML={moduleName:"Tooltip",version:ut,beans:[Qce],dynamicBeans:{tooltipFeature:bM,highlightTooltipFeature:Rte,tooltipStateManager:ede},userComponents:{agTooltipComponent:Ite},dependsOn:[Uv],css:[Jce]},ud=class{constructor(e){this.cellValueChanges=e}},S0=class extends ud{constructor(e,t,n,s){super(e),this.initialRange=t,this.finalRange=n,this.ranges=s}},tde=10,NL=class{constructor(e){this.actionStack=[],this.maxStackSize=e||tde,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},nde=class extends We{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},n=this.activeCellEdit!==null&&yN(this.activeCellEdit,t),s=this.activeRowEdit!==null&&Roe(this.activeRowEdit,t);if(!(n||s||this.isPasting||this.isRangeInAction))return;const{rowPinned:i,rowIndex:r,column:a,oldValue:l,value:u}=e,c={rowPinned:i,rowIndex:r,columnId:a.getColId(),newValue:u,oldValue:l};this.cellValueChanges.push(c)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const n=e.get("undoRedoCellEditingLimit");if(n<=0)return;this.undoStack=new NL(n),this.redoStack=new NL(n),this.addListeners();const s=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:o=>{o.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:s,newColumnsLoaded:s,columnGroupOpened:s,columnRowGroupChanged:s,columnMoved:s,columnPinned:s,columnVisible:s,rowDragEnd:s}),t.whenReady(this,o=>{this.gridBodyCtrl=o.gridBodyCtrl})}getCurrentUndoStackSize(){var e;return((e=this.undoStack)==null?void 0:e.getCurrentStackSize())??0}getCurrentRedoStackSize(){var e;return((e=this.redoStack)==null?void 0:e.getCurrentStackSize())??0}undo(e){const{eventSvc:t,undoStack:n,redoStack:s}=this;t.dispatchEvent({type:"undoStarted",source:e});const o=this.undoRedo(n,s,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:o})}redo(e){const{eventSvc:t,undoStack:n,redoStack:s}=this;t.dispatchEvent({type:"redoStarted",source:e});const o=this.undoRedo(s,n,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:o})}undoRedo(e,t,n,s,o){if(!e)return!1;const i=e.pop();return i!=null&&i.cellValueChanges?(this.processAction(i,r=>r[s],o),i instanceof S0?this.processRange(i.ranges||[i[n]]):this.processCell(i.cellValueChanges),t.push(i),!0):!1}processAction(e,t,n){for(const s of e.cellValueChanges){const{rowIndex:o,rowPinned:i,columnId:r}=s,a={rowIndex:o,rowPinned:i},l=ua(this.beans,a);l.displayed&&l.setDataValue(r,t(s),n)}}processRange(e){let t;const n=this.beans.rangeSvc;n.removeAllCellRanges(!0),e.forEach((s,o)=>{if(!s)return;const i=s.startRow,r=s.endRow;o===e.length-1&&(t={rowPinned:i.rowPinned,rowIndex:i.rowIndex,columnId:s.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:i.rowIndex,rowStartPinned:i.rowPinned,rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnStart:s.startColumn,columns:s.columns};n.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:n,rowPinned:s}=t,o={rowIndex:n,rowPinned:s},i=ua(this.beans,o),r={rowPinned:t.rowPinned,rowIndex:i.rowIndex,columnId:t.columnId};this.setLastFocusedCell(r)}setLastFocusedCell(e){const{rowIndex:t,columnId:n,rowPinned:s}=e,{colModel:o,focusSvc:i,rangeSvc:r}=this.beans,a=o.getCol(n);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const u={rowIndex:t,column:a,rowPinned:s};i.setFocusedCell({...u,forceBrowserFocus:!0}),r==null||r.setRangeToCell(u)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new ud(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const n=new ud(this.cellValueChanges);this.pushActionsToUndoStack(n)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new ud(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new S0(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:n}=this.beans;t&&ta(n)?e=new S0(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new ud(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:e})=>this.stopBigChange("batchEditing",e),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:e})=>this.stopBigChange("bulkEditing",e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){e==="bulkEditing"?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if(e==="bulkEditing"&&!this.bulkEditing||e==="batchEditing"&&!this.batchEditing||(this.updateBigChange(e,!1),(t==null?void 0:t.length)===0))return;const n=new ud(t??[]);this.pushActionsToUndoStack(n),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},sde=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}",ode={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},ide=class extends Av{constructor(){super(ode,[aE]),this.eEditor=ct}initialiseEditor(e){const t=e.value??void 0,n=this.eEditor;n.setValue(t),n.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(n,{fieldValueChanged:o=>this.setAriaLabel(o.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),n=jm(t,e),s=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${s} (${n})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,n=this.getValue();return t?t({value:n,internalErrors:null,cellEditorParams:e}):null}},jv=class extends Av{constructor(e){super(),this.cellEditorInput=e,this.eEditor=ct}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:n}=this,{cellStartedEdit:s,eventKey:o,suppressPreventDefault:i}=e;n.getInputElement().setAttribute("title",""),t.init(n,e);let r,a=!0;s?(this.focusAfterAttached=!0,o===Oe.BACKSPACE||o===Oe.DELETE?r="":o&&o.length===1?i?a=!1:r=o:(r=t.getStartValue(),o!==Oe.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),a&&r!=null&&n.setStartValue(r),this.addGuiEventListener("keydown",l=>{const{key:u}=l;(u===Oe.PAGE_UP||u===Oe.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){var s,o;const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;Za()||t.getFocusableElement().focus();const n=t.getInputElement();this.highlightAllOnFocus?n.select():(o=(s=this.cellEditorInput).setCaret)==null||o.call(s)}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),n=e.getInputElement();t.focus(),n.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},rde={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},ade=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return rde}getAgComponents(){return[uM]}init(e,t){var r,a;this.eEditor=e,this.params=t;const{min:n,max:s,step:o,colDef:i}=t;n!=null&&e.setMin(n),s!=null&&e.setMax(s),o!=null&&e.setStep(o),this.includeTime=t.includeTime??((a=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:a.call(r,i.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:n}=this,{min:s,max:o,getValidationErrors:i}=n;let r=[];const a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(s){const l=s instanceof Date?s:new Date(s);if(t<l){const u=l.toLocaleDateString();r.push(a("minDateValidation",`Date must be after ${u}`,[u]))}}if(o){const l=o instanceof Date?o:new Date(o);if(t>l){const u=l.toLocaleDateString();r.push(a("maxDateValidation",`Date must be before ${u}`,[u]))}}}return r.length||(r=null),i?i({value:t,cellEditorParams:n,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,n=e.getDate();return!dt(n)&&!dt(t.value)?t.value:n??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return Vo(e,this.includeTime??!1)}},lde=class extends jv{constructor(){super(new ade(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},ude={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},cde=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return ude}getAgComponents(){return[uM]}init(e,t){var r,a;this.eEditor=e,this.params=t;const{min:n,max:s,step:o,colDef:i}=t;n!=null&&e.setMin(n),s!=null&&e.setMax(s),o!=null&&e.setStep(o),this.includeTime=t.includeTime??((a=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:a.call(r,i.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,n=e.getInputElement().value,s=this.formatDate(this.parseDate(n??void 0)),{min:o,max:i,getValidationErrors:r}=t;let a=[];if(s){const l=new Date(s),u=this.getLocaleTextFunc();if(o){const c=new Date(o);if(l<c){const d=c.toLocaleDateString();a.push(u("minDateValidation",`Date must be after ${d}`,[d]))}}if(i){const c=new Date(i);if(l>c){const d=c.toLocaleDateString();a.push(u("maxDateValidation",`Date must be before ${d}`,[d]))}}}return a.length||(a=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,n=this.formatDate(t.getDate());return!dt(n)&&!dt(e.value)?e.value:e.parseValue(n??"")}getStartValue(){return Vo(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):fo(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):Vo(e??null,this.includeTime??!1)??void 0}},dde=class extends jv{constructor(){super(new cde(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},hde={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},fde=class extends Av{constructor(){super(hde,[Oee]),this.eEditor=ct}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:n,eventKey:s,maxLength:o,cols:i,rows:r}=e;this.focusAfterAttached=n,t.getInputElement().setAttribute("title",""),t.setMaxLength(o||200).setCols(i||60).setRows(r||10);let a;n?(this.focusAfterAttached=!0,s===Oe.BACKSPACE||s===Oe.DELETE?a="":s&&s.length===1?a=s:(a=this.getStartValue(e),s!==Oe.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=this.getStartValue(e)),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return(t==null?void 0:t.toString())??t}onKeyDown(e){const t=e.key;(t===Oe.LEFT||t===Oe.UP||t===Oe.RIGHT||t===Oe.DOWN||e.shiftKey&&t===Oe.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:n}=this,s=this.getLocaleTextFunc();e.setInputAriaLabel(s("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),n&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:n}=t,s=e.getValue();return!dt(s)&&!dt(n)?n:t.parseValue(s)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:n}=e,s=this.getLocaleTextFunc(),o=this.getValue();let i=[];return typeof o=="string"&&t!=null&&o.length>t&&i.push(s("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),i.length||(i=null),n?n({value:o,internalErrors:i,cellEditorParams:e}):i}},pde={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},gde=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return pde}getAgComponents(){return[Mee]}init(e,t){this.eEditor=e,this.params=t;const{max:n,min:s,precision:o,step:i}=t;n!=null&&e.setMax(n),s!=null&&e.setMin(s),o!=null&&e.setPrecision(o),i!=null&&e.setStep(i);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:n,getValidationErrors:s}=e,i=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let a=[];return typeof i=="number"&&(t!=null&&i<t&&a.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),n!=null&&i>n&&a.push(r("maxValueValidation",`Must be less than or equal to ${n}.`,[String(n)]))),a.length||(a=null),s?s({value:i,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===Oe.UP||e.key===Oe.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,n=e.getValue();if(!dt(n)&&!dt(t.value))return t.value;let s=t.parseValue(n);if(s==null)return s;if(typeof s=="string"){if(s==="")return null;s=Number(s)}return isNaN(s)?null:s}getStartValue(){return this.params.value}setCaret(){Za()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},mde=class extends jv{constructor(){super(new gde(()=>this.getLocaleTextFunc()))}},vde={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},yde=class extends Av{constructor(){super(vde,[jee]),this.eEditor=ct,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:n,gos:s}=this,{values:o,value:i,eventKey:r}=e;if(Vn(o)){Xe(58);return}this.startedByEnter=r!=null?r===Oe.ENTER:!1;let a=!1;o.forEach(d=>{const h={value:d},f=n.formatValue(e.column,null,d),p=f!=null;h.text=p?f:d,t.addOption(h),a=a||i===d}),a?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:u,valueListMaxHeight:c}=e;l!=null&&t.setPickerGap(l),c!=null&&t.setPickerMaxHeight(c),u!=null&&t.setPickerMaxWidth(u),s.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:n}=e,s=this.getValue();let o=[];if(t&&!t.includes(s)){const i=this.getLocaleTextFunc();o.push(i("invalidSelectionValidation","Invalid selection."))}else o=null;return n?n({value:s,internalErrors:o,cellEditorParams:e}):o}},wde={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},Cde=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return wde}getAgComponents(){return[mv]}init(e,t){this.eEditor=e,this.params=t;const n=t.maxLength;n!=null&&e.setMaxLength(n)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:n}=e,s=this.getValue(),o=this.getLocaleTextFunc();let i=[];return t!=null&&typeof s=="string"&&s.length>t&&i.push(o("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),i.length||(i=null),n?n({value:s,cellEditorParams:e,internalErrors:i}):i}getValue(){const{eEditor:e,params:t}=this,n=e.getValue();return!dt(n)&&!dt(t.value)?t.value:t.parseValue(n)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){Za()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),n=dt(t)&&t.length||0;n&&e.getInputElement().setSelectionRange(n,n)}},LL=class extends jv{constructor(){super(new Cde(()=>this.getLocaleTextFunc()))}};function bde(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function Sde(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function VL(e,t,n="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,n),"ensureVisible")}function BL(e,t,n){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,n),"ensureVisible")}function Ede(e,t,n=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,n),"ensureVisible")}function _de(e){var t;(t=e.undoRedo)==null||t.undo("api")}function Rde(e){var t;(t=e.undoRedo)==null||t.redo("api")}function Dde(e,t){var n;return(n=e.editModelSvc)==null?void 0:n.getEditRowDataValue(t,{checkSiblings:!0})}function Tde(e){var s;const t=(s=e.editModelSvc)==null?void 0:s.getEditMap(),n=[];return t==null||t.forEach((o,i)=>{const{rowIndex:r,rowPinned:a}=i;o.forEach((l,u)=>{const{editorValue:c,pendingValue:d,sourceValue:h,state:f}=l,p=ca(l);let g=c??d;g===ci&&(g=void 0);const v={newValue:g,oldValue:h,state:f,column:u,colId:u.getColId(),colKey:u.getColId(),rowIndex:r,rowPinned:a};(f==="editing"||f==="changed"&&p)&&n.push(v)})}),n}function Ide(e,t=!1){var s;const{editSvc:n}=e;if(n!=null&&n.isBatchEditing()){if(t)for(const o of((s=e.editModelSvc)==null?void 0:s.getEditPositions())??[])o.state==="editing"&&n.revertSingleCellEdit(o);else Cu(e,{persist:!0});rd(e,void 0,{cancel:t})}else n==null||n.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function xde(e,t){var s;const n=Gn(e,t);return((s=e.editSvc)==null?void 0:s.isEditing(n))??!1}function Fde(e,t){const{key:n,colKey:s,rowIndex:o,rowPinned:i}=t,{editSvc:r,colModel:a}=e,l=a.getCol(s);if(!l){Xe(12,{colKey:s});return}const c=ua(e,{rowIndex:o,rowPinned:i||null});if(!c){Xe(290,{rowIndex:o,rowPinned:i});return}if(!l.isCellEditable(c))return;i==null&&BL(e,o),VL(e,s),r==null||r.startEditing({rowNode:c,column:l},{event:n?new KeyboardEvent("keydown",{key:n}):void 0,source:"api"})}function Pde(e){var t;return((t=e.editSvc)==null?void 0:t.validateEdit())||null}function Ade(e){var t;return((t=e.undoRedo)==null?void 0:t.getCurrentUndoStackSize())??0}function kde(e){var t;return((t=e.undoRedo)==null?void 0:t.getCurrentRedoStackSize())??0}var Ode={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},Mde=class extends zS{constructor(e){super(Ode),this.params=e}postConstruct(){uu(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,n=s=>{DE(this.gos,s,t.node,t.column,!0)||t.onKeyDown(s)};this.addManagedElementListeners(e,{keydown:n})}};function Nde(e,{column:t},n,s,o="ui"){var u;if(n instanceof KeyboardEvent&&(n.key===Oe.TAB||n.key===Oe.ENTER||n.key===Oe.F2||n.key===Oe.BACKSPACE&&s))return!0;if((n==null?void 0:n.shiftKey)&&((u=e.rangeSvc)==null?void 0:u.getCellRanges().length)!=0)return!1;const r=t==null?void 0:t.getColDef(),a=Lde(e.gos,r),l=n==null?void 0:n.type;return l==="click"&&(n==null?void 0:n.detail)===1&&a===1||l==="dblclick"&&(n==null?void 0:n.detail)===2&&a===2?!0:o==="api"?s??!1:!1}function Lde(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t!=null&&t.singleClickEdit?1:2}function E0(e,{rowNode:t,column:n},s="ui"){const o=n.getColDef().editable,i=e.editModelSvc;return n.isColumnFunc(t,o)||!!i&&i.hasEdits({rowNode:t,column:n},{withOpenEditor:!0})}function Vde(e,t,n="ui"){const s=E0(e,t,n);return s===!0||n==="ui"?s:e.colModel.getCols().some(i=>E0(e,{rowNode:t.rowNode,column:i},n))}var Kv=(e,t=!1)=>{if(e!==void 0)return ca(e)||t&&e.state==="editing"};function $L(e,t,n=!1){var s;return Kv((s=e.editModelSvc)==null?void 0:s.getEdit(t),n)}var HL=(e,t,n)=>{if(e)for(let s=0,o=e.length;s<o;++s){const i=e[s];if(i.data&&(Kv(t==null?void 0:t.getEdit({rowNode:i,column:n}))||Kv(t==null?void 0:t.getEdit({rowNode:i.pinnedSibling,column:n})))||HL(i.childrenAfterGroup,t,n))return!0}};function GL(e,t){const{column:n,rowNode:s}=t;return e.gos.get("groupTotalRow")&&!(s!=null&&s.footer)?!1:HL(s==null?void 0:s.childrenAfterGroup,e.editModelSvc,n)}function UL(e,{rowNode:t,column:n}){var s;if(t=t.pinnedSibling,!!t)return Kv((s=e.editModelSvc)==null?void 0:s.getEdit({rowNode:t,column:n}))}var Bde=class extends We{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){var o;const{cellCtrl:e,editSvc:t,beans:n}=this;if(t!=null&&t.isBatchEditing()&&t.isEditing()){const i=$L(n,e)||GL(n,e)||UL(n,e);this.applyBatchingStyle(i)}else this.applyBatchingStyle(!1);const s=!!((o=this.editModelSvc)!=null&&o.getCellValidationModel().hasCellValidation(this.cellCtrl));this.cellComp.toggleCss("ag-cell-editing-error",s)}applyBatchingStyle(e){var t;this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&((t=this.editSvc)==null?void 0:t.isBatchEditing()))??!1)}},$de=class extends We{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){var r;const{rowCtrl:e,editModelSvc:t,beans:n}=this;let s=e.rowNode,o=t==null?void 0:t.getEditRow(s);const i=(r=this.editModelSvc)==null?void 0:r.getRowValidationModel().hasRowValidation({rowNode:s});if(!o&&s.pinnedSibling&&(s=s.pinnedSibling,o=t==null?void 0:t.getEditRow(s)),o){const a=Array.from(o.keys()).some(l=>{const u={rowNode:s,column:l};return $L(n,u,!0)||GL(n,u)||UL(n,u)});this.applyStyle(i,a);return}this.applyStyle(i)}applyStyle(e=!1,t=!1){var o,i;const n=((o=this.editSvc)==null?void 0:o.isBatchEditing())??!1,s=this.gos.get("editType")==="fullRow";(i=this.rowCtrl)==null||i.forEachGui(void 0,({rowComp:r})=>{r.toggleCss("ag-row-editing",s&&t),r.toggleCss("ag-row-batch-edit",s&&t&&n),r.toggleCss("ag-row-inline-editing",t),r.toggleCss("ag-row-not-inline-editing",!t),r.toggleCss("ag-row-editing-invalid",s&&t&&e)})}},Hde=({rowModel:e,pinnedRowModel:t,editModelSvc:n},s)=>{const o=new Set;e.forEachNode(i=>s.has(i)&&o.add(i)),t==null||t.forEachPinnedRow("top",i=>s.has(i)&&o.add(i)),t==null||t.forEachPinnedRow("bottom",i=>s.has(i)&&o.add(i));for(const i of s)o.has(i)||n.removeEdits({rowNode:i});return o},Gde=({editModelSvc:e},t,n)=>{var s;for(const o of t)(s=e==null?void 0:e.getEditRow(o))==null||s.forEach((i,r)=>!n.has(r)&&e.removeEdits({rowNode:o,column:r}))},Ude=e=>()=>{const t=new Set(e.colModel.getCols()),n=e.editModelSvc.getEditMap(!0),s=new Set(n.keys());Gde(e,Hde(e,s),t)},Wde=new Set(["undo","redo","paste","bulk","rangeSvc"]),zde=new Set(["ui","api"]),WL={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},jde=new Set(Object.keys(WL)),Kde=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),qv={cancel:!0,source:"api"},qde={cancel:!1,source:"api"},cd={checkSiblings:!0},qf={force:!0,suppressFlash:!0},Yde=class extends We{constructor(){super(...arguments),this.beanName="editSvc",this.batch=!1,this.stopping=!1,this.committing=!1}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:s})=>{this.stopEditing(void 0,qv),this.createStrategy(s)});const t=Ude(e),n=()=>{const s=this.model.getCellValidationModel().getCellValidationMap().size>0,o=this.model.getRowValidationModel().getRowValidationMap().size>0;return s||o?this.stopEditing(void 0,qv):this.isEditing()&&(this.isBatchEditing()?rd(e,this.model.getEditPositions()):this.stopEditing(void 0,qde)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:n,filterChanged:n,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}setBatchEditing(e){e?(this.batch=!0,this.stopEditing(void 0,qv)):(this.stopEditing(void 0,qv),this.batch=!1)}createStrategy(e){const{beans:t,gos:n,strategy:s}=this,o=zL(n,e);if(s){if(s.beanName===o)return s;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(o,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,n,s="ui"){const o=Nde(this.beans,e,t,n,s);return o&&(this.strategy??(this.strategy=this.createStrategy())),o}shouldStopEditing(e,t,n="ui"){var s;return((s=this.strategy)==null?void 0:s.shouldStop(e,t,n))??null}shouldCancelEditing(e,t,n="ui"){var s;return((s=this.strategy)==null?void 0:s.shouldCancel(e,t,n))??null}validateEdit(){return cle(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??cd)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){const{startedEdit:n=!0,event:s=null,source:o="ui",ignoreEventKey:i=!1,silent:r}=t;if(this.strategy??(this.strategy=this.createStrategy()),!this.isCellEditable(e,"api"))return;const a=Gn(this.beans,e);if(a&&!a.comp){a.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const l=this.shouldStartEditing(e,s,n,o);if(l===!1&&o!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,o)&&!t.continueEditing&&this.stopEditing(void 0,{source:o}),l&&this.isBatchEditing()&&this.dispatchBatchEvent("batchEditingStarted",new Map),this.strategy.start({position:e,event:s,source:o,ignoreEventKey:i,startedEdit:n,silent:r})}stopEditing(e,t){var v,C,S;const{event:n,cancel:s,source:o="ui",forceCancel:i,forceStop:r}=t||{},{beans:a,model:l}=this;if(jde.has(o)&&this.isBatchEditing())return this.bulkRefresh(e),!1;const u=this.committing?WL[o]:o;if(!(this.committing||this.isEditing(e)||this.isBatchEditing()&&l.hasEdits(e,cd))||!this.strategy||this.stopping)return!1;this.stopping=!0;const d=Gn(a,e);d&&(d.onEditorAttachedFuncs=[]);let h=l.getEditMap(!0),f=!1;const p=!s&&(!!this.shouldStopEditing(e,n,u)||this.committing&&!this.batch)||(r??!1),g=s&&!!this.shouldCancelEditing(e,n,u)||(i??!1);if(p||g){Cu(a,{persist:!0,isCancelling:g||s,isStopping:p});const b=l.getEditMap(),w=this.processEdits(b,s,o);(v=this.strategy)==null||v.stop(s,n);for(const _ of w)l.clearEditValue(_);this.bulkRefresh(void 0,h);for(const _ of l.getEditPositions(b)){const R=Gn(a,_),T=ca(_);R==null||R.refreshCell({force:!0,suppressFlash:!T})}h=b,f||(f=p)}else if(n instanceof KeyboardEvent&&this.batch&&((C=this.strategy)!=null&&C.midBatchInputsAllowed(e))&&this.isEditing(e,{withOpenEditor:!0})){const{key:b}=n,w=b===Oe.ENTER,_=b===Oe.ESCAPE,R=b===Oe.TAB;(w||R||_)&&(w||R?Cu(a,{persist:!0}):_&&this.revertSingleCellEdit(d),this.isBatchEditing()?(S=this.strategy)==null||S.cleanupEditors():rd(a,l.getEditPositions(),{event:n,cancel:_}),n.preventDefault(),this.bulkRefresh(e,h,{suppressFlash:!0}),h=l.getEditMap())}else Cu(a,{persist:!0}),h=l.getEditMap();return f&&e&&this.model.removeEdits(e),this.navigateAfterEdit(t,d==null?void 0:d.cellPosition),n0(a),this.model.hasEdits()||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap()),this.bulkRefresh(),g&&this.beans.rowRenderer.refreshRows({rowNodes:Array.from(h.keys())}),this.isBatchEditing()&&(this.beans.rowRenderer.refreshRows({suppressFlash:!0,force:!0}),f&&p&&this.dispatchBatchEvent("batchEditingStopped",h)),this.stopping=!1,f}navigateAfterEdit(e,t){var u;if(!e||!t)return;const{event:n,suppressNavigateAfterEdit:s}=e;if(!(n instanceof KeyboardEvent)||s)return;const{key:i,shiftKey:r}=n,a=this.gos.get("enterNavigatesVerticallyAfterEdit");if(i!==Oe.ENTER||!a)return;const l=r?Oe.UP:Oe.DOWN;(u=this.beans.navigation)==null||u.navigateToNextCell(null,l,t,!1)}processEdits(e,t=!1,n){const s=Array.from(e.keys()),o=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,i=[];for(const r of s){const a=e.get(r);for(const l of a.keys()){const u=a.get(l),c={rowNode:r,column:l},d=ca(u);!t&&d&&!o&&(this.setNodeDataValue(r,l,u.pendingValue,void 0,n)||i.push(c))}}return i}setNodeDataValue(e,t,n,s,o="edit"){const{beans:i}=this,r=Gn(i,{rowNode:e,column:t}),a=zde.has(o)?"edit":o;r&&(r.suppressRefreshCell=!0),this.commitNextEdit();const l=e.setDataValue(t,n,a);return r&&(r.suppressRefreshCell=!1),s&&(r==null||r.refreshCell(qf)),l}setEditMap(e,t){var s;this.strategy??(this.strategy=this.createStrategy()),(s=this.strategy)==null||s.setEditMap(e,t),this.bulkRefresh();let n=qf;t!=null&&t.forceRefreshOfEditCellsOnly&&(n={...Zde(e),...qf}),this.beans.rowRenderer.refreshCells(n)}dispatchEditValuesChanged({rowNode:e,column:t},n={}){if(!e||!t||!n)return;const{pendingValue:s,sourceValue:o}=n,{rowIndex:i,rowPinned:r,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:i,rowPinned:r,column:t,source:"api",data:a,newValue:s,oldValue:o,value:s,colDef:t.getColDef()})}bulkRefresh(e={},t,n={}){var a;const{beans:s,gos:o}=this,{editModelSvc:i,rowModel:r}=s;ss(o)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),n):t&&((a=i==null?void 0:i.getEditMap(!1))==null||a.forEach((l,u)=>{for(const c of l.keys())this.refCell({rowNode:u,column:c},l.get(c),n)})))}refCell({rowNode:e,column:t},n,s={}){var d,h,f;const{beans:o,gos:i}=this,r=new Set([e]),a=new Set,l=e.pinnedSibling;l&&r.add(l);const u=e.sibling;u&&a.add(u);let c=e.parent;for(;c;)(d=c.sibling)!=null&&d.footer&&i.get("groupTotalRow")||!c.parent&&c.sibling&&i.get("grandTotalRow")?a.add(c.sibling):a.add(c),c=c.parent;for(const p of r)this.dispatchEditValuesChanged({rowNode:p,column:t},n);for(const p of r)(h=Gn(o,{rowNode:p,column:t}))==null||h.refreshCell(s);for(const p of a)(f=Gn(o,{rowNode:p,column:t}))==null||f.refreshCell(s)}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{rowNode:n}=e,{gos:s,beans:o}=this;if(n.group){if(s.get("treeData")){if(!n.data&&!s.get("enableGroupEdit"))return!1}else if(!s.get("enableGroupEdit"))return!1}const i=zL(s)==="fullRow"?Vde(o,e,t):E0(o,e,t);return i&&(this.strategy??(this.strategy=this.createStrategy())),i}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,n=!0){var s,o,i,r;if(this.hasValidationErrors(e)){const a=Gn(this.beans,e);return this.cellEditingInvalidCommitBlocks()?((s=t==null?void 0:t.preventDefault)==null||s.call(t),n&&(!(a!=null&&a.hasBrowserFocus())&&(a==null||a.focusCell()),(r=(i=(o=a==null?void 0:a.comp)==null?void 0:o.getCellEditor())==null?void 0:i.focusIn)==null||r.call(i)),"block-stop"):(a&&this.revertSingleCellEdit(a),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){var s,o,i,r;const n=Gn(this.beans,e);(s=n==null?void 0:n.comp)!=null&&s.getCellEditor()&&(rd(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),id(this.beans,e,{silent:!0}),bu(this.beans),n==null||n.refreshCell(qf),t&&(n==null||n.focusCell(),(r=(i=(o=n==null?void 0:n.comp)==null?void 0:o.getCellEditor())==null?void 0:i.focusIn)==null||r.call(i)))}hasValidationErrors(e){var s;bu(this.beans);const t=Gn(this.beans,e);t&&(t.refreshCell(qf),(s=t.rowCtrl.rowEditStyleFeature)==null||s.applyRowStyles());let n=!1;return e!=null&&e.rowNode?(n||(n=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(n||(n=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(n||(n=this.model.getCellValidationModel().getCellValidationMap().size>0),n||(n=this.model.getRowValidationModel().getRowValidationMap().size>0)),n}moveToNextCell(e,t,n,s="ui"){var a;let o;const i=this.isEditing(),r=i&&this.checkNavWithValidation(void 0,n)==="block-stop";return e instanceof ad&&i&&(o=(a=this.strategy)==null?void 0:a.moveToNextEditingCell(e,t,n,s,r)),o===null||(o=o||!!this.beans.focusSvc.focusedHeader,o===!1&&!r&&this.stopEditing()),o}getCellDataValue({rowNode:e,column:t},n=!0){if(!e||!t)return;let s=this.model.getEdit({rowNode:e,column:t});const o=e.pinnedSibling;if(o){const r=this.model.getEdit({rowNode:o,column:t});r&&(s=r)}const i=n?(s==null?void 0:s.editorValue)??(s==null?void 0:s.pendingValue):s==null?void 0:s.pendingValue;return i===ci||!s?(s==null?void 0:s.sourceValue)??this.valueSvc.getValue(t,e,!1,"api"):i}addStopEditingWhenGridLosesFocus(e){ole(this,this.beans,e)}createPopupEditorWrapper(e){return new Mde(e)}commitNextEdit(){this.committing=!0}setDataValue(e,t,n){var s;try{if((!this.isEditing()||this.committing)&&!Kde.has(n))return;const{beans:o}=this;this.strategy??(this.strategy=this.createStrategy());const i=this.isBatchEditing()?"ui":this.committing?n??"api":"api";if(!n||Wde.has(n))return Bv(o,e,t,n,void 0,{persist:!0}),this.setNodeDataValue(e.rowNode,e.column,t,!0,n);const r=this.model.getEdit(e);if(r){if(r.pendingValue===t)return!1;if(r.sourceValue!==t)return Bv(o,e,t,n,void 0,{persist:!0}),this.stopEditing(e,{source:i,suppressNavigateAfterEdit:!0}),!0;if(r.sourceValue===t)return(s=o.editModelSvc)==null||s.removeEdits(e),this.dispatchEditValuesChanged(e,{...r,pendingValue:t}),!0}return Bv(o,e,t,n,void 0,{persist:!0}),this.stopEditing(e,{source:i,suppressNavigateAfterEdit:!0}),!0}finally{this.committing=!1}}handleColDefChanged(e){ale(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,cd))return;const{rowNode:s,column:o}=e,{compDetails:i,valueToDisplay:r}=t;if(i){const{params:l}=i;return l.data=this.model.getEditRowDataValue(s,cd),{compDetails:i}}const a=this.model.getEditRow(e.rowNode,cd);if(r!==void 0&&(a!=null&&a.has(o)))return{valueToDisplay:this.valueSvc.getValue(o,s)}}cleanupEditors(){var e;(e=this.strategy)==null||e.cleanupEditors()}dispatchCellEvent(e,t,n,s){var o;(o=this.strategy)==null||o.dispatchCellEvent(e,t,n,s)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return Ft(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},n){var u,c;if(!n||n.length===0)return;const{beans:s,rangeSvc:o,valueSvc:i}=this;Cu(s,{persist:!0});const r=this.model.getEditMap(!0),a=(c=(u=r.get(e))==null?void 0:u.get(t))==null?void 0:c.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),n.forEach(d=>{if(o==null||o.forEachRowInRange(d,h=>{const f=ua(s,h);if(f===void 0)return;const p=r.get(f)??new Map;for(const g of d.columns)if(g&&this.isCellEditable({rowNode:f,column:g},"api")){const v=i.getValue(g,f,!0,"api");let C=i.parseValue(g,f??null,a,v);Number.isNaN(C)&&(C=null),p.set(g,{editorValue:void 0,pendingValue:C,sourceValue:v,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}p.size>0&&r.set(f,p)}),this.setEditMap(r),this.batch){this.cleanupEditors(),n0(s),this.bulkRefresh();return}this.commitNextEdit(),this.stopEditing(void 0,{source:"bulk"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(r)})}),this.bulkRefresh();const l=Gn(s,{rowNode:e,column:t});l&&l.focusCell(!0)}createCellStyleFeature(e,t){return new Bde(e,t)}createRowStyleFeature(e,t){return new $de(e,t)}setEditingCells(e,t){const{beans:n}=this,{colModel:s,valueSvc:o}=n,i=new Map;for(let{colId:r,column:a,colKey:l,rowIndex:u,rowPinned:c,newValue:d,state:h}of e){const f=r?s.getCol(r):l?s.getCol(l):a;if(!f)continue;const p=ua(n,{rowIndex:u,rowPinned:c});if(!p)continue;const g=o.getValue(f,p,!0,"api");if(!(t!=null&&t.forceRefreshOfEditCellsOnly)&&!ca({pendingValue:d,sourceValue:g})&&h!=="editing")continue;let v=i.get(p);v||(v=new Map,i.set(p,v)),d===void 0&&(d=ci),v.set(f,{editorValue:void 0,pendingValue:d,sourceValue:g,state:h??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(i,t)}onCellFocused(e){var i;const t=Gn(this.beans,e);if(!t||!this.isEditing(t,cd))return;const n=this.model.getEdit(t);if(!n||!ca(n))return;const o=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");(i=this.beans.ariaAnnounce)==null||i.announceValue(o,"pendingChange")}allowedFocusTargetOnValidation(e){return Gn(this.beans,e)}};function Zde(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap(t=>Array.from(t.keys())))]:void 0}}function zL(e,t){return t??e.get("editType")??"singleCell"}var jL=class extends We{postConstruct(){var e,t;this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:(e=this.onCellFocusChanged)==null?void 0:e.bind(this),cellFocusCleared:(t=this.onCellFocusChanged)==null?void 0:t.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const n=e.previousParams,{editSvc:s,beans:o}=this,i=e.type==="cellFocused"?e.sourceEvent:null;n&&(t=Gn(o,n));const{gos:r,editModelSvc:a}=o,l=e.type==="cellFocusCleared";if(s.isEditing(void 0,{withOpenEditor:!0})){const{column:u,rowIndex:c,rowPinned:d}=e,h={column:u,rowNode:ua(o,{rowIndex:c,rowPinned:d})},f=r.get("invalidEditValueMode")==="block";if(f)return;const p=!f,g=!!(a!=null&&a.getCellValidationModel().hasCellValidation(h)),v=p&&g;(n||l?s.stopEditing(void 0,{cancel:v,source:l&&p?"api":void 0,event:i}):!0)||(s.isBatchEditing()?s.cleanupEditors():s.stopEditing(void 0,{source:"api"}))}t==null||t.refreshCell({suppressFlash:!0,force:!0})}stop(e,t){var o,i;const n=this.model.getEditPositions(),s={all:[],pass:[],fail:[]};for(const r of n){s.all.push(r);const a=this.model.getCellValidationModel().getCellValidation(r);if((((o=a==null?void 0:a.errorMessages)==null?void 0:o.length)??0)>0){s.fail.push(r);continue}s.pass.push(r)}if(e)for(const r of n)$v(this.beans,r,{cancel:e}),this.model.stop(r);else{const r=this.processValidationResults(s);if(r.destroy.length>0)for(const a of r.destroy)$v(this.beans,a,{event:t,cancel:e}),this.model.stop(a);if(r.keep.length>0)for(const a of r.keep){const l=Gn(this.beans,a);(i=this.editSvc)!=null&&i.cellEditingInvalidCommitBlocks()||l&&this.editSvc.revertSingleCellEdit(l)}}return!0}cleanupEditors({rowNode:e}={},t){Cu(this.beans,{persist:!1});const n=this.model.getEditPositions(),s=[];if(e)for(const o of n)o.rowNode!==e&&s.push(o);else for(const o of n)s.push(o);rd(this.beans,s),n0(this.beans,t)}setFocusOutOnEditor(e){var t,n,s;(s=(n=(t=e.comp)==null?void 0:t.getCellEditor())==null?void 0:n.focusOut)==null||s.call(n)}setFocusInOnEditor(e){const t=e.comp,n=t==null?void 0:t.getCellEditor();if(n!=null&&n.focusIn)n.focusIn();else{const s=this.beans.gos.get("editType")==="fullRow";e.focusCell(s),e.onEditorAttachedFuncs.push(()=>{var o,i;return(i=(o=t==null?void 0:t.getCellEditor())==null?void 0:o.focusIn)==null?void 0:i.call(o)})}}setupEditors(e){const{event:t,ignoreEventKey:n=!1,startedEdit:s,position:o,cells:i=this.model.getEditPositions()}=e,r=t instanceof KeyboardEvent&&!n&&t.key||void 0;rle(this.beans,i,o,r,t,s)}dispatchCellEvent(e,t,n,s){const o=Gn(this.beans,e);o&&this.eventSvc.dispatchEvent({...o.createEvent(t??null,n),...s})}dispatchRowEvent(e,t,n){if(n)return;const s=e0(this.beans,e);s&&this.eventSvc.dispatchEvent(s.createRowEvent(t))}shouldStop(e,t,n="ui"){const s=this.editSvc.isBatchEditing();return s&&n==="api"?!0:s&&(n==="ui"||n==="edit")?!1:n==="api"?!0:t instanceof KeyboardEvent&&!s?t.key===Oe.ENTER:null}shouldCancel(e,t,n="ui"){const s=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!s&&t.key===Oe.ESCAPE||s&&n==="api"||n==="api")}setEditMap(e,t){var s;t!=null&&t.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const n=[];if(e.forEach((o,i)=>{o.forEach((r,a)=>{r.state==="editing"&&n.push({...r,rowNode:i,column:a})})}),t!=null&&t.update&&(e=new Map([...this.model.getEditMap(),...e])),(s=this.model)==null||s.setEditMap(e),n.length>0){const o=n.at(-1),i=o.pendingValue===ci?void 0:o.pendingValue;this.start({position:o,event:new KeyboardEvent("keydown",{key:i}),source:"api"});const r=Gn(this.beans,o);r&&this.setFocusInOnEditor(r)}}destroy(){this.cleanupEditors(),super.destroy()}},Xde=class extends jL{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}shouldStop(e,t,n="ui"){const{rowNode:s}=e||{};if(!e0(this.beans,{rowNode:this.rowNode}))return!0;const i=super.shouldStop({rowNode:this.rowNode},t,n);return i!==null?i:this.rowNode?s!==this.rowNode:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:n,startedEdit:s,event:o,ignoreEventKey:i}=e,{rowNode:r}=t;this.rowNode!==r&&super.cleanupEditors(t);const a=this.beans.visibleCols.allCols,l=[],u=[];for(const c of a)c.isCellEditable(r)&&u.push(c);if(u.length!=0){this.dispatchRowEvent({rowNode:r},"rowEditingStarted",n),this.startedRows.push(r);for(const c of u){const d={rowNode:r,column:c};l.push(d),this.model.hasEdits(d)||this.model.start(d)}this.rowNode=r,this.setupEditors({cells:l,position:t,startedEdit:s,event:o,ignoreEventKey:i})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){var o;const{rowNode:n}=this;if(n&&!this.model.hasRowEdits(n))return!1;const s=[];if(e||this.model.getEditMap().forEach((i,r)=>{if(!(!i||i.size===0)){for(const a of i.values())if(ca(a)){s.push(r);break}}}),bu(this.beans),!e&&((o=this.editSvc)==null?void 0:o.checkNavWithValidation({rowNode:n}))==="block-stop")return!1;super.stop(e,t);for(const i of s)this.dispatchRowEvent({rowNode:i},"rowValueChanged");return this.cleanupEditors({rowNode:n},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,n=e.previousParams;if((n==null?void 0:n.rowIndex)===t||e.sourceEvent instanceof KeyboardEvent)return;const s=Gn(this.beans,n);this.gos.get("invalidEditValueMode")==="block"&&s&&(this.model.getCellValidationModel().getCellValidation(s)||this.model.getRowValidationModel().getRowValidation(s))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);for(const n of this.startedRows)this.dispatchRowEvent({rowNode:n},"rowEditingStopped");this.startedRows.length=0}moveToNextEditingCell(e,t,n,s="ui",o=!1){var h,f,p,g;const i=e.cellPosition;let r;this.model.suspend(!0);try{r=(h=this.beans.navigation)==null?void 0:h.findNextCellToFocusOn(i,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const a=r.cellPosition,l=e.isCellEditable(),u=r.isCellEditable(),c=a&&i.rowIndex===a.rowIndex&&i.rowPinned===a.rowPinned;l&&this.setFocusOutOnEditor(e),this.restoreEditors();const d=this.gos.get("suppressStartEditOnTab");return u&&!o?d?r.focusCell(!0,n):((f=r.comp)!=null&&f.getCellEditor()||id(this.beans,r,{event:n,cellStartedEdit:!0}),this.setFocusInOnEditor(r),r.focusCell(!1,n)):(u&&o&&this.setFocusInOnEditor(r),r.focusCell(!0,n)),!c&&!o&&((p=this.editSvc)==null||p.stopEditing({rowNode:e.rowNode},{event:n}),this.cleanupEditors(r,!0),d?r.focusCell(!0,n):this.editSvc.startEditing(r,{startedEdit:!0,event:n,source:s,ignoreEventKey:!0})),(g=e.rowCtrl)==null||g.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach((e,t)=>e.forEach(({state:n},s)=>{var i;if(n!=="editing")return;const o=Gn(this.beans,{rowNode:t,column:s});o&&!((i=o.comp)!=null&&i.getCellEditor())&&id(this.beans,o,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},Jde=class extends jL{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,n="ui"){const s=super.shouldStop(e,t,n);if(s!==null)return s;const{rowNode:o,column:i}=e||{};return(!this.rowNode||!this.column)&&o&&i?null:this.rowNode!==o||this.column!==i}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:n,event:s,ignoreEventKey:o}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:n,event:s,ignoreEventKey:o})}dispatchRowEvent(e,t,n){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){return super.stop(e,t),this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:n}=this.beans,{rowIndex:s,column:o,rowPinned:i}=e,r=ua(this.beans,{rowIndex:s,rowPinned:i}),a=t0(o),l=t.getCol(a),u=e.previousParams;if(u){const c=t0(u.column);if((u==null?void 0:u.rowIndex)===s&&c===a&&(u==null?void 0:u.rowPinned)===i)return}n!=null&&n.isEditing({rowNode:r,column:l},{withOpenEditor:!0})&&e.type==="cellFocused"||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,n,s="ui",o=!1){var p,g,v,C,S,b;const i=this.beans.focusSvc.getFocusedCell();i&&(e=sd(this.beans,i)??e);const r=e.cellPosition;let a;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),o||(e.eGui.focus(),(g=this.editSvc)==null||g.stopEditing(e,{source:(p=this.editSvc)!=null&&p.isBatchEditing()?"ui":"api",event:n}));try{a=(v=this.beans.navigation)==null?void 0:v.findNextCellToFocusOn(r,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(a===!1)return null;if(a==null)return!1;const u=a.cellPosition,c=e.isCellEditable(),d=a.isCellEditable(),h=u&&r.rowIndex===u.rowIndex&&r.rowPinned===u.rowPinned;c&&!o&&this.setFocusOutOnEditor(e);const f=this.gos.get("suppressStartEditOnTab");if(!h&&!o&&(super.cleanupEditors(a,!0),f?a.focusCell(!0,n):this.editSvc.startEditing(a,{startedEdit:!0,event:n,source:s,ignoreEventKey:!0})),d&&!o){if(a.focusCell(!1,n),f)a.focusCell(!0,n);else if(!((C=a.comp)!=null&&C.getCellEditor())){const w=(S=this.editSvc)==null?void 0:S.isEditing(a,{withOpenEditor:!0});id(this.beans,a,{event:n,cellStartedEdit:!0,silent:w}),this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else d&&o&&this.setFocusInOnEditor(a),a.focusCell(!0,n);return(b=e.rowCtrl)==null||b.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},ol={moduleName:"EditCore",version:ut,beans:[sle,Yde],apiFunctions:{getEditingCells:Tde,getEditRowValues:Dde,getCellEditorInstances:ile,startEditingCell:Fde,stopEditing:Ide,isEditing:xde,validateEdit:Pde},dynamicBeans:{singleCell:Jde,fullRow:Xde},dependsOn:[Uv,ML],css:[sde]},Qde={moduleName:"UndoRedoEdit",version:ut,beans:[nde],apiFunctions:{undoCellEditing:_de,redoCellEditing:Rde,getCurrentUndoSize:Ade,getCurrentRedoSize:kde},dependsOn:[ol]},ehe={moduleName:"TextEditor",version:ut,userComponents:{agCellEditor:LL,agTextCellEditor:LL},dependsOn:[ol]},the={moduleName:"NumberEditor",version:ut,userComponents:{agNumberCellEditor:{classImp:mde}},dependsOn:[ol]},nhe={moduleName:"DateEditor",version:ut,userComponents:{agDateCellEditor:lde,agDateStringCellEditor:dde},dependsOn:[ol]},she={moduleName:"CheckboxEditor",version:ut,userComponents:{agCheckboxCellEditor:ide},dependsOn:[ol]},ohe={moduleName:"SelectEditor",version:ut,userComponents:{agSelectCellEditor:yde},dependsOn:[ol]},ihe={moduleName:"LargeTextEditor",version:ut,userComponents:{agLargeTextCellEditor:fde},dependsOn:[ol]},rhe={moduleName:"CustomEditor",version:ut,dependsOn:[ol]},ahe=class extends We{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,qc(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),yQ(e))}createColumns(e,t){var h,f;const n=()=>{var p;uv(this.beans,(p=this.columns)==null?void 0:p.tree),this.columns=null},s=e.treeDepth,i=(((h=this.columns)==null?void 0:h.treeDepth)??-1)==s,r=this.generateSelectionCols();if(vQ(r,((f=this.columns)==null?void 0:f.list)??[])&&i)return;n();const{colGroupSvc:l}=this.beans,u=(l==null?void 0:l.findDepth(e.tree))??0,c=(l==null?void 0:l.balanceTreeForAutoCols(r,u))??[];this.columns={list:r,tree:c,treeDepth:u,map:{}},t(p=>{if(!p)return null;const g=p.filter(v=>!sa(v));return[...r,...g]})}updateColumns(e){var n;const t=qc(e.source);for(const s of((n=this.columns)==null?void 0:n.list)??[]){const o=this.createSelectionColDef(e.currentValue);s.setColDef(o,null,t),Li(this.beans,{state:[{...o,colId:s.getColId()}]},t)}}getColumn(e){var t;return((t=this.columns)==null?void 0:t.list.find(n=>Ff(n,e)))??null}getColumns(){var e;return((e=this.columns)==null?void 0:e.list)??null}isSelectionColumnEnabled(){var r,a;const{gos:e,beans:t}=this,n=e.get("rowSelection");if(typeof n!="object"||!au(e))return!1;const s=(((a=(r=t.autoColSvc)==null?void 0:r.getColumns())==null?void 0:a.length)??0)>0;if(n.checkboxLocation==="autoGroupColumn"&&s)return!1;const o=!!Kc(n),i=sv(n);return o||i}createSelectionColDef(e){const{gos:t}=this,n=e??t.get("selectionColumnDef"),s=t.get("enableRtl"),{rowSpan:o,spanRows:i,...r}=n??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:s?"right":"left",comparator(a,l,u,c){const d=u.isSelected(),h=c.isSelected();return d===h?0:d?1:-1},editable:!1,suppressFillHandle:!0,pinned:null,...r,colId:OO,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const n=new cu(e,null,t,!1);return this.createBean(n),[n]}onSelectionOptionsChanged(e,t,n){const s=t&&typeof t!="string"?Kc(t):void 0,o=e&&typeof e!="string"?Kc(e):void 0,i=s!==o,r=t&&typeof t!="string"?sv(t):void 0,a=e&&typeof e!="string"?sv(e):void 0,l=r!==a,u=ov(e),c=ov(t);(i||l||u!==c)&&this.beans.colModel.refreshAll(n)}destroy(){var e;uv(this.beans,(e=this.columns)==null?void 0:e.tree),super.destroy()}refreshVisibility(e,t,n){var l,u;if(!((l=this.columns)!=null&&l.list.length))return;const s=e.length+t.length+n.length;if(s===0)return;const o=this.columns.list[0];if(!o.isVisible())return;const i=()=>{let c;switch(o.pinned){case"left":case!0:c=e;break;case"right":c=n;break;default:c=t}c&&Ni(c,o)};(((u=this.beans.rowNumbersSvc)==null?void 0:u.getColumn(MO))?2:1)===s&&i()}};function lhe(e,t){var r;if(!t.nodes.every(a=>a.rowPinned&&!Bf(a)?(Xe(59),!1):a.id===void 0?(Xe(60),!1):!0))return;const{nodes:s,source:o,newValue:i}=t;(r=e.selectionSvc)==null||r.setNodesSelected({nodes:s,source:o??"api",newValue:i})}function uhe(e,t,n="apiSelectAll"){var s;(s=e.selectionSvc)==null||s.selectAllRowNodes({source:n,selectAll:t})}function che(e,t,n="apiSelectAll"){var s;(s=e.selectionSvc)==null||s.deselectAllRowNodes({source:n,selectAll:t})}function dhe(e,t="apiSelectAllFiltered"){var n;(n=e.selectionSvc)==null||n.selectAllRowNodes({source:t,selectAll:"filtered"})}function hhe(e,t="apiSelectAllFiltered"){var n;(n=e.selectionSvc)==null||n.deselectAllRowNodes({source:t,selectAll:"filtered"})}function fhe(e,t="apiSelectAllCurrentPage"){var n;(n=e.selectionSvc)==null||n.selectAllRowNodes({source:t,selectAll:"currentPage"})}function phe(e,t="apiSelectAllCurrentPage"){var n;(n=e.selectionSvc)==null||n.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function ghe(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedNodes())??[]}function mhe(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedRows())??[]}var vhe=class extends Fse{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();const{gos:e}=this;this.mode=iv(e),this.groupSelectsDescendants=If(e),this.groupSelectsFiltered=rv(e)==="filteredDescendants",this.masterSelectsDetail=xO(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=If(e),n=iv(e),s=rv(e)==="filteredDescendants";this.masterSelectsDetail=xO(e)==="detail",(t!==this.groupSelectsDescendants||s!==this.groupSelectsFiltered||n!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=s,this.mode=n)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,n){if(this.isRowSelectionBlocked(t))return 0;const s=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,n);if(s==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in s)return s.reset?this.resetNodes():this.selectRange(s.deselect,!1,n),this.selectRange(s.select,!0,n);{const o=s.checkFilteredNodes?qL(s.node):s.newValue;return this.setNodesSelected({nodes:[s.node],newValue:o,clearSelection:s.clearSelection,keepDescendants:s.keepDescendants,event:e,source:n})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:n,nodes:s,event:o,source:i,keepDescendants:r=!1}){var u;if(s.length===0)return 0;const{gos:a}=this;if(!au(a)&&e)return Xe(132),0;if(s.length>1&&!this.isMultiSelect())return Xe(130),0;let l=0;for(let c=0;c<s.length;c++){const d=s[c],h=dd(d);if(h.rowPinned&&!Bf(h)){Xe(59);continue}if(h.id===void 0){Xe(60);continue}this.groupSelectsFiltered&&h.group&&!a.get("treeData")||this.selectRowNode(h,e,o,i)&&(this.detailSelection.delete(h.id),l++),this.groupSelectsDescendants&&((u=h.childrenAfterGroup)!=null&&u.length)&&(l+=this.selectChildren(h,e,i))}return n||(s.length===1&&i==="api"&&this.selectionCtx.setRoot(dd(s[0])),e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(dd(s[0]),r,i)),l>0&&(this.updateGroupsFromChildrenSelections(i),this.dispatchSelectionChanged(i))),l}selectRange(e,t,n){let s=0;return e.forEach(o=>{const i=dd(o);if(i.group&&this.groupSelectsDescendants)return;this.selectRowNode(i,t,void 0,n)&&s++}),s>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n)),s}selectChildren(e,t,n){const s=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return s?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:n,nodes:s}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((n,s)=>{e(n)&&t.set(s,n)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:n,rowModel:s}=this.beans;if(!ss(n))return!1;const o=s.rootNode;if(!o)return!1;t||(t=new Hf(!0,o),t.active=!1);let i=!1;return t.forEachChangedNodeDepthFirst(r=>{if(r!==o){const a=this.calculateSelectedFromChildren(r);i=this.selectRowNode(r,a===null?!1:a,void 0,e)||i}}),i}clearOtherNodes(e,t,n){const s=new Map;let o=0;return this.selectedNodes.forEach(i=>{const r=i.id==e.id;if((t?!whe(e,i):!0)&&!r){const l=this.selectedNodes.get(i.id);o+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:n}),this.groupSelectsDescendants&&i.parent&&s.set(i.parent.id,i.parent)}}),s.forEach(i=>{const r=this.calculateSelectedFromChildren(i);this.selectRowNode(i,r===null?!1:r,void 0,n)}),o}onRowSelected(e){const t=e.node;this.groupSelectsDescendants&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}createDaemonNode(e){if(!e.id)return;const t=new Ja(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:e,rowModel:t}=this.beans;if(!ss(e))return;const n=t.getTopLevelNodes();if(n===null)return;const s=[];function o(i){for(let r=0,a=i.length;r<a;r++){const l=i[r];l.isSelected()?s.push(l):l.group&&l.childrenAfterGroup&&o(l.childrenAfterGroup)}}return o(n),s}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){const n=ss(this.gos);let s=!1;const o=i=>{const r=this.selectRowNode(dd(i),!1,void 0,e);s||(s=r)};if(t==="currentPage"||t==="filtered"){if(!n){Sn(102);return}this.getNodesToSelect(t).forEach(o)}else this.selectedNodes.forEach(o),this.reset(e);if(this.selectionCtx.selectAll=!1,n&&this.groupSelectsDescendants){const i=this.updateGroupsFromChildrenSelections(e);s||(s=i)}s&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,n=0;return this.getNodesToSelect(e).forEach(s=>{this.groupSelectsDescendants&&s.group||(s.isSelected()?t++:s.selectable&&n++)}),{selectedCount:t,notSelectedCount:n}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:n}=this.getSelectedCounts(e);return KL(t,n)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],n=o=>t.push(o);if(e==="currentPage")return this.forEachNodeOnPage(o=>{if(!o.group){n(o);return}if(!o.expanded&&!o.footer){const i=r=>{var a;n(r),(a=r.childrenAfterFilter)==null||a.forEach(i)};i(o);return}this.groupSelectsDescendants||n(o)}),t;const s=this.beans.rowModel;return e==="filtered"?(s.forEachNodeAfterFilter(n),t):(s.forEachNode(n),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:n}=this.beans,s=t.getFirstRow(),o=t.getLastRow();for(let i=s;i<=o;i++){const r=n.getRow(i);r&&e(r)}}selectAllRowNodes(e){const{gos:t,selectionCtx:n}=this;if(!au(t)){Xe(132);return}if(oQ(t)&&!Tf(t)){Xe(130);return}if(!this.canSelectAll())return;const{source:s,selectAll:o}=e;let i=!1;if(this.getNodesToSelect(o).forEach(r=>{const a=this.selectRowNode(dd(r),!0,void 0,s);i||(i=a)}),n.selectAll=!0,ss(t)&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(s);i||(i=r)}i&&this.dispatchSelectionChanged(s)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,n){if(e||(e=[]),!Array.isArray(e)){Sn(103);return}const s=new Set(e),o=[];this.beans.rowModel.forEachNode(i=>{s.has(i.id)&&o.push(i)}),n&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:o,source:t})}canSelectAll(){return ss(this.beans.gos)}updateSelectable(e){var l;const{gos:t,rowModel:n}=this.beans;if(!au(t))return;const s="selectableChanged",o=e!==void 0,i=ss(t)&&this.groupSelectsDescendants,r=[],a=u=>{var d;if(o&&!u.group)return;if(i&&u.group){const h=((d=u.childrenAfterGroup)==null?void 0:d.some(f=>f.selectable))??!1;this.setRowSelectable(u,h,!0);return}!this.updateRowSelectable(u,!0)&&u.isSelected()&&r.push(u)};if(i){if(e===void 0){const u=n.rootNode;e=u?new Hf(!1,u):void 0}e==null||e.forEachChangedNodeDepthFirst(a,!o,!o)}else n.forEachNode(a);r.length&&this.setNodesSelected({nodes:r,newValue:!1,source:s}),!o&&i&&((l=this.updateGroupsFromChildrenSelections)==null||l.call(this,s))}updateSelectableAfterGrouping(e){var t;this.updateSelectable(e),this.groupSelectsDescendants&&((t=this.updateGroupsFromChildrenSelections)!=null&&t.call(this,"rowGroupChanged",e))&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){var i,r;if(!this.masterSelectsDetail)return;const n=(r=(i=e.detailNode)==null?void 0:i.detailGridInfo)==null?void 0:r.api;if(!n)return;const s=yhe(n);if(e.isSelected()!==s&&this.selectRowNode(e,s,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!s){const a=this.detailSelection.get(e.id)??new Set;for(const l of n.getSelectedNodes())a.add(l.id);this.detailSelection.set(e.id,a)}}setDetailSelectionState(e,t,n){if(this.masterSelectsDetail){if(!Tf(t)){Xe(269);return}switch(e.isSelected()){case!0:{n.selectAll();break}case!1:{n.deselectAll();break}case void 0:{const s=this.detailSelection.get(e.id);if(s){const o=[];for(const i of s){const r=n.getRowNode(i);r&&o.push(r)}n.setNodesSelected({nodes:o,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function dd(e){return Bf(e)?e.pinnedSibling:e.footer?e.sibling:e}function yhe(e){let t=0,n=0;return e.forEachNode(s=>{s.isSelected()?t++:s.selectable&&n++}),KL(t,n)}function KL(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function whe(e,t){let n=t.parent;for(;n;){if(n===e)return!0;n=n.parent}return!1}function qL(e){var s;const t=e.isSelected()===!1,n=((s=e.childrenAfterFilter)==null?void 0:s.some(qL))??!1;return t||n}var Che={moduleName:"SharedRowSelection",version:ut,beans:[ahe],apiFunctions:{setNodesSelected:lhe,selectAll:uhe,deselectAll:che,selectAllFiltered:dhe,deselectAllFiltered:hhe,selectAllOnCurrentPage:fhe,deselectAllOnCurrentPage:phe,getSelectedNodes:ghe,getSelectedRows:mhe}},bhe={moduleName:"RowSelection",version:ut,rowModels:["clientSide","infinite","viewport"],beans:[vhe],dependsOn:[Che]};function She(e){var t;(t=e.expansionSvc)==null||t.expandAll(!0)}function Ehe(e){var t;(t=e.expansionSvc)==null||t.expandAll(!1)}function YL(e){var t;(t=e.rowModel)==null||t.onRowHeightChanged()}function ZL(e){var t,n;if((t=e.rowAutoHeight)!=null&&t.active){Xe(3);return}(n=e.rowModel)==null||n.resetRowHeights()}function _he(e,t,n){var o,i;const s=Rue(e);if(s){if(((o=e.rowGroupColsSvc)==null?void 0:o.columns.length)===0){if(t<0){Sn(238);return}s.setRowCount(t,n);return}Sn(28);return}(i=Gv(e))==null||i.setRowCount(t,n)}function Rhe(e){var t;return Wc(e.gos)?e.rowModel.getBlockStates():((t=e.rowNodeBlockLoader)==null?void 0:t.getBlockState())??{}}function Dhe(e){return e.rowModel.isLastRowIndexKnown()}var The={moduleName:"CsrmSsrmSharedApi",version:ut,apiFunctions:{expandAll:She,collapseAll:Ehe}},Ihe={moduleName:"RowModelSharedApi",version:ut,apiFunctions:{onRowHeightChanged:YL,resetRowHeights:ZL}},xhe={moduleName:"SsrmInfiniteSharedApi",version:ut,apiFunctions:{setRowCount:_he,getCacheBlockState:Rhe,isLastRowIndexKnown:Dhe}},Fhe=class extends We{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(s=>{var i;if(!s){Sn(18),t||Sn(20);return}if(this.isGridApi(s))return s;const o=s;return"current"in o?(i=o.current)==null?void 0:i.api:(o.api||Sn(19),o.api)}).filter(s=>!!s&&!s.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){if(!this.consuming)for(const t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const n=[];return e.columns?e.columns.forEach(s=>{n.push(t(s))}):e.column&&n.push(t(e.column)),n}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":Xe(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;if(t)for(const n of e.columnGroups){let s=null;n&&(s=t.getProvidedColGroup(n.getGroupId())),!(n&&!s)&&t.setColumnGroupOpened(s,n.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let n=null;const s=this.beans,{colResize:o,ctrlsSvc:i,colModel:r}=s;if(t&&(n=r.getColDefCol(t.getColId())),t&&!n)return;const a=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const d=e.api.getColumnState().map(h=>({colId:h.colId}));Li(s,{state:d,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const d=e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}));Li(s,{state:d},"alignedGridChanged")}break;case"columnPinned":{const d=e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}));Li(s,{state:d},"alignedGridChanged")}break;case"columnResized":{const c=e,d={};for(const h of a)d[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()};for(const h of c.flexColumns??[])d[h.getId()]&&delete d[h.getId()];o==null||o.setColumnWidths(Object.values(d),!1,c.finished,"alignedGridChanged");break}}const u=i.getGridBodyCtrl().isVerticalScrollShowing();for(const c of this.getAlignedGridApis())c.setGridOption("alwaysShowVerticalScroll",u)}},Phe={moduleName:"AlignedGrids",version:ut,beans:[Fhe],dependsOn:[ON]},Ahe=class extends We{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},XL(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){const{selectionSvc:t,pinnedRowModel:n,groupStage:s}=this.beans;t==null||t.reset("rowDataChanged"),n!=null&&n.isManual()&&n.reset(),this.dispatchRowDataUpdateStarted(e),this.allNodesMap=Object.create(null),this.nextId=0;const o=XL(this.rootNode),i=new Array(e.length);o._leafs=i;let r=0;const a=s==null?void 0:s.getNestedDataGetter(),l=a?new Set:null,u=(c,d)=>{const h=c.level+1;for(let f=0,p=d.length;f<p;++f){const g=d[f];if(!g)continue;const v=this.createRowNode(g,h);if(v.sourceRowIndex=r,i[r++]=v,l&&!l.has(g)){l.add(g),v.treeParent=c;const C=a(g);C&&u(v,C)}}};u(o,e),i.length=r}setImmutableRowData(e,t){var C;const{rootNode:n,gos:s}=this;this.dispatchRowDataUpdateStarted(t);const o=jc(s),i=e.changedRowNodes,{adds:r,updates:a}=i,l=new Set,u=[],c=(C=this.beans.groupStage)==null?void 0:C.getNestedDataGetter();let d=s.get("suppressMaintainUnsortedOrder")?void 0:!1,h=-1,f=!1;const p=(S,b)=>{if(!d&&d!==void 0){const w=S.sourceRowIndex;d=w<=h,h=w}S.data!==b&&(S.updateData(b),r.has(S)||a.add(S),!S.selectable&&S.isSelected()&&u.push(S))},g=(S,b,w)=>{for(let _=0,R=b.length;_<R;++_){const T=b[_];if(!T)continue;let I=this.getRowNode(o({data:T,level:w}));if(I?(p(I,T),f||(f=!!c&&I.treeParent!==S)):(I=this.createRowNode(T,w),r.add(I)),!c||l.has(I)){l.add(I);continue}l.add(I),I.treeParent=S;const x=c(T);x&&g(I,x,w+1)}};g(n,t,0);const v=this.deleteUnusedNodes(l,i,u)||d||r.size>0;if(v){const S=n._leafs??(n._leafs=[]);d===void 0?Lhe(S,l,i):Nhe(S,l)&&(i.reordered=!0)}(v||f||a.size)&&(e.rowDataUpdated=!0,this.deselect(u))}deleteUnusedNodes(e,{removals:t},n){const s=this.rootNode._leafs;for(let o=0,i=s.length;o<i;o++){const r=s[o];e.has(r)||(t.add(r),r.isSelected()&&n.push(r),this.deleteNode(r))}return t.size>0}updateRowData(e,t){var a;if(this.dispatchRowDataUpdateStarted(e.add),(a=this.beans.groupStage)!=null&&a.getNestedDataGetter())return Xe(268),{remove:[],update:[],add:[]};const n=[],s=jc(this.gos),o=this.executeRemove(s,e,t,n),i=this.executeUpdate(s,e,t,n),r=this.executeAdd(e,t);return this.deselect(n),{remove:o,update:i,add:r}}executeRemove(e,{remove:t},{adds:n,updates:s,removals:o},i){const r=this.rootNode._leafs,a=r==null?void 0:r.length,l=t==null?void 0:t.length;if(!l||!a)return[];let u=0,c=a,d=0,h;const f=new Array(l);for(let p=0;p<l;++p){const g=this.lookupNode(e,t[p]);if(!g)continue;const v=g.sourceRowIndex;v<c&&(c=v),v>d&&(d=v),g.isSelected()&&i.push(g),this.deleteNode(g),n.delete(g)?(h??(h=new Set),h.add(g)):(s.delete(g),o.add(g)),f[u++]=g}return f.length=u,u&&Mhe(r,c,d,o,h),f}executeUpdate(e,{update:t},{adds:n,updates:s},o){const i=t==null?void 0:t.length;if(!i)return[];const r=new Array(i);let a=0;for(let l=0;l<i;l++){const u=t[l],c=this.lookupNode(e,u);c&&(c.updateData(u),!c.selectable&&c.isSelected()&&o.push(c),r[a++]=c,n.has(c)||s.add(c))}return r.length=a,r}executeAdd(e,t){var n;const s=(n=this.rootNode)._leafs??(n._leafs=[]),o=s.length,i=e.add,r=i==null?void 0:i.length;if(!r)return[];const a=o+r;let l=this.sanitizeAddIndex(s,e.addIndex);if(l<o){for(let d=o-1,h=a-1;d>=l;--d){const f=s[d];f.sourceRowIndex=h,s[h--]=f}t.reordered=!0}s.length=a;const u=new Array(r),c=t.adds;for(let d=0;d<r;d++){const h=this.createRowNode(i[d],0);c.add(h),h.sourceRowIndex=l,s[l]=h,u[d]=h,l++}return u}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e!=null&&e.length?e[0]:null})}deselect(e){var s;const t="rowDataChanged",n=this.beans.selectionSvc;e.length&&(n==null||n.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t})),(s=n==null?void 0:n.updateGroupsFromChildrenSelections)==null||s.call(n,t),e.length&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:(n==null?void 0:n.getSelectedNodes())??null,serverSideState:null})}createRowNode(e,t){const n=new Ja(this.beans);n.parent=this.rootNode,n.level=t,n.group=!1,n.expanded=!1,n.setDataAndId(e,String(this.nextId++));const s=n.id,o=this.allNodesMap;return o[s]&&Xe(2,{nodeId:s}),o[s]=n,n}deleteNode(e){var o;e.clearRowTopAndRowIndex();const t=e.id,n=this.allNodesMap;n[t]===e&&delete n[t];const s=e.pinnedSibling;s&&((o=this.beans.pinnedRowModel)==null||o.pinRow(s,null))}lookupNode(e,t){if(!e)return Ohe(this.rootNode._leafs,t);const n=e({data:t,level:0}),s=this.allNodesMap[n];return s||(Sn(4,{id:n}),null)}sanitizeAddIndex(e,t){const n=e.length;if(typeof t!="number"||t<0||t>=n||Number.isNaN(t))return n;t=Math.ceil(t);const s=this.gos;return t>0&&s.get("treeData")&&s.get("getDataPath")&&(t=khe(e,t)),t}},khe=(e,t)=>{for(let n=0,s=e.length;n<s;n++){const o=e[n];if((o==null?void 0:o.rowIndex)==t-1)return n+1}return t},XL=e=>{var r;e.group=!0,e.level=-1,e.id="ROOT_NODE_ID",((r=e._leafs)==null?void 0:r.length)!==0&&(e._leafs=[]);const t=[],n=[],s=[],o=[];e.childrenAfterGroup=t,e.childrenAfterSort=n,e.childrenAfterAggFilter=s,e.childrenAfterFilter=o;const i=e.sibling;return i&&(i.childrenAfterGroup=t,i.childrenAfterSort=n,i.childrenAfterAggFilter=s,i.childrenAfterFilter=o,i.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},Ohe=(e,t)=>{if(e)for(let n=0,s=e.length;n<s;n++){const o=e[n];if(o.data===t)return o}return Sn(5,{data:t}),null},Mhe=(e,t,n,s,o)=>{t=Math.max(0,t);for(let i=t,r=e.length;i<r;++i){const a=e[i];i<=n&&(s.has(a)||o!=null&&o.has(a))||(a.sourceRowIndex=t,e[t++]=a)}e.length=t},Nhe=(e,t)=>{const n=t.size;e.length=n;let s=0,o=!1,i=!1;for(const r of t){const a=r.sourceRowIndex;a===s?i||(i=o):(a>=0?i=!0:o=!0,r.sourceRowIndex=s,e[s]=r),++s}return i},Lhe=(e,t,{removals:n,adds:s})=>{const o=e.length;e.length=t.size;let i=0;for(let r=0;r<o;++r){const a=e[r];n.has(a)||(i!==r&&(a.sourceRowIndex=i,e[i]=a),++i)}for(const r of s)r.sourceRowIndex<0&&(r.sourceRowIndex=i,e[i++]=r);e.length=i},JL=e=>{const t=e.childrenAfterSort,n=e.sibling;if(n&&(n.childrenAfterSort=t),!!t)for(let s=0,o=t.length-1;s<=o;s++){const i=t[s],r=s===0,a=s===o;i.firstChild!==r&&(i.firstChild=r,i.dispatchRowEvent("firstChildChanged")),i.lastChild!==a&&(i.lastChild=a,i.dispatchRowEvent("lastChildChanged")),i.childIndex!==s&&(i.childIndex=s,i.dispatchRowEvent("childIndexChanged"))}},Vhe=class extends We{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e){const t=this.beans.sortSvc.getSortOptions(),n=t.length>0&&!!e.changedRowNodes&&this.gos.get("deltaSort");this.sort(t,n,e.changedRowNodes,e.changedPath)}sort(e,t,n,s){const{gos:o,colModel:i,rowGroupColsSvc:r,rowNodeSorter:a,rowRenderer:l,showRowGroupCols:u}=this.beans,c=o.get("groupMaintainOrder"),d=i.getCols().some(S=>S.isRowGroupActive()),h=r==null?void 0:r.columns,f=i.isPivotMode(),p=o.getCallback("postSortRows");let g=!1,v;const C=S=>{var R,T;const b=f&&S.leafGroup;let w=c&&d&&!S.leafGroup;w&&(v??(v=this.shouldSortContainsGroupCols(e)),w&&(w=!v));let _=null;if(w){let I=!1;if(h){const x=S.level+1;x<h.length&&(I=h[x].getSort()===null)}I||(_=Hhe(S))}else!e.length||b||(t&&n?_=Bhe(a,S,n,s,e):_=a.doFullSort(S.childrenAfterAggFilter,e));if(_||(_=((R=S.childrenAfterAggFilter)==null?void 0:R.slice(0))??[]),g||(g=((T=S.childrenAfterSort)==null?void 0:T[0])!==_[0]),S.childrenAfterSort=_,JL(S),p){const I={nodes:S.childrenAfterSort};p(I)}};if(s==null||s.forEachChangedNodeDepthFirst(C),g&&o.get("groupHideOpenParents")){const S=u==null?void 0:u.getShowRowGroupCols();S!=null&&S.length&&l.refreshCells({columns:S,force:!0})}}shouldSortContainsGroupCols(e){const t=e.length;if(!t)return!1;if(gr(this.gos)){for(let n=0;n<t;++n){const s=e[n].column;if(s.isPrimary()&&s.isRowGroupActive())return!0}return!1}for(let n=0;n<t;++n)if(e[n].column.getColDef().showRowGroup)return!0;return!1}},Bhe=(e,t,n,s,o)=>{const i=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(i,o);const a=new Set,l=[],{updates:u,adds:c}=n;for(let h=0,f=i.length;h<f;++h){const p=i[h];u.has(p)||c.has(p)||s&&!s.canSkip(p)?l.push({currentPos:l.length,rowNode:p}):a.add(p)}const d=r.filter(h=>a.has(h)).map((h,f)=>({currentPos:f,rowNode:h}));return l.sort((h,f)=>e.compareRowNodes(o,h,f)),$he(e,o,l,d)},$he=(e,t,n,s)=>{let o=0,i=0;const r=n.length,a=s.length,l=new Array(r+a);let u=0;for(;o<r&&i<a;){const c=n[o],d=s[i];e.compareRowNodes(t,c,d)<0?(l[u++]=c.rowNode,++o):(l[u++]=d.rowNode,++i)}for(;o<r;)l[u++]=n[o++].rowNode;for(;i<a;)l[u++]=s[i++].rowNode;return l},Hhe=e=>{const t=e.childrenAfterSort,n=e.childrenAfterAggFilter,s=t==null?void 0:t.length,o=n==null?void 0:n.length;if(!s||!o)return null;const i=new Array(o),r=new Set;for(let l=0;l<o;++l)r.add(n[l]);let a=0;for(let l=0;l<s;++l){const u=t[l];r.delete(u)&&(i[a++]=u)}if(r.size===0&&a===s)return t;for(const l of r)i[a++]=l;return i.length=a,i},Ghe=class extends We{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.rowDataUpdatedPending=!1,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingModel=!1,this.rowNodesCountReady=!1,this.stages=[],this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=As(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const e=this.beans,t=new Ja(e);this.rootNode=t,this.nodeManager=this.createBean(new Ahe(t));const n=this.refreshModel.bind(this,{step:"group"}),s=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:s,columnRowGroupChanged:n,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:n,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,n=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(s=>!!s);this.stages=n;for(let s=n.length-1;s>=0;--s)for(const o of n[s].refreshProps)t.set(o,s);this.addManagedPropertyListeners([...t.keys()],s=>{var i;const o=(i=s.changeSet)==null?void 0:i.properties;o&&this.onPropChange(o)}),this.addManagedPropertyListener("rowData",()=>this.onPropChange(["rowData"])),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,n,s){let o,i=!1;do{o=!1;const r=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(r,n),u=Math.min(a,s);for(let c=l;c<=u;c++){const d=this.getRow(c);if(d.rowHeightEstimated){const h=Ka(this.beans,d);d.setRowHeight(h.height),o=!0,i=!0}}o&&this.setRowTopAndRowIndex()}while(o);return i}onPropChange(e){const{nodeManager:t,gos:n,beans:s}=this,o=s.groupStage;if(!t)return;const i=new Set(e),r=o==null?void 0:o.onPropChange(i);let a;i.has("rowData")?a=n.get("rowData"):r&&(a=o==null?void 0:o.extractData()),a&&!Array.isArray(a)&&(a=null,Xe(1));const l={step:"nothing",changedProps:i};a&&(!r&&!this.isEmpty()&&a.length>0&&n.exists("getRowId")&&!n.get("resetRowDataOnUpdate")?(l.keepRenderedRows=!0,l.animate=!n.get("suppressAnimationFrame"),l.changedRowNodes=new Ov,t.setImmutableRowData(l,a)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(a),this.rowNodesCountReady=!0));const u=l.rowDataUpdated?"group":this.getRefreshedStage(e);u&&(l.step=u,this.refreshModel(l))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:n}=this,s=t.length;let o=s;for(let i=0,r=e.length;i<r&&o;++i)o=Math.min(o,n.get(e[i])??o);return o<s?t[o].step:null}setRowTopAndRowIndex(e){const{beans:t,rowsToDisplay:n}=this,s=t.environment.getDefaultRowHeight();let o=0;const i=ks(this.gos,"normal");for(let r=0,a=n.length;r<a;++r){const l=n[r],u=l.id;if(u!=null&&(e==null||e.add(u)),l.rowHeight==null){const c=Ka(t,l,i,s);l.setRowHeight(c.height,c.estimated)}l.setRowTop(o),l.setRowIndex(r),o+=l.rowHeight}}clearRowTopAndRowIndex(e,t){const n=e.active,s=r=>{(r==null?void 0:r.id)!=null&&!t.has(r.id)&&r.clearRowTopAndRowIndex()},o=r=>{s(r),s(r.detailNode),s(r.sibling);const a=r.childrenAfterGroup;if(!r.hasChildren()||!a)return;const l=r.level==-1;if(!(n&&!l&&!r.expanded))for(let c=0,d=a.length;c<d;++c)o(a[c])},i=this.rootNode;i&&o(i)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){var o,i;const{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;const s=(o=e.sibling)!=null&&o.displayed?1:0;return(((i=e.childrenAfterSort)==null?void 0:i.length)??0)+s}getTopLevelRowDisplayedIndex(e){const{beans:t,rootNode:n,rowsToDisplay:s}=this;if(!n||!s.length||s[0]===n)return e;const i=n.childrenAfterSort,r=l=>{let u=i[l];if(this.gos.get("groupHideOpenParents"))for(;u.expanded&&u.childrenAfterSort&&u.childrenAfterSort.length>0;)u=u.childrenAfterSort[0];return u.rowIndex},a=t.footerSvc;return a?a==null?void 0:a.getTopDisplayIndex(s,e,i,r):r(e)}getTopLevelIndexFromDisplayedIndex(e){var a;const{rootNode:t,rowsToDisplay:n}=this;if(!t||!n.length||n[0]===t)return e;let o=this.getRow(e);o.footer&&(o=o.sibling);let i=o.parent;for(;i&&i!==t;)o=i,i=o.parent;const r=((a=t.childrenAfterSort)==null?void 0:a.indexOf(o))??-1;return r>=0?r:e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:zc(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const s=t.length===0||t.some(o=>o.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:s,keepRenderedRows:!0,animate:zc(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:zc(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){const t=new Hf(!1,this.rootNode);return t.active=e,t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:n,rowDataUpdated:s}=e;return!(!t||n||!s||t.removals.size||t.adds.size)}refreshModel(e){var u,c;const{nodeManager:t,beans:n,eventSvc:s,started:o,refreshingModel:i}=this;if(!t)return;const r=!!e.rowDataUpdated,a=e.changedPath??(e.changedPath=this.createChangePath(!e.newData&&r));if(o&&r&&s.dispatchEvent({type:"rowDataUpdated"}),!o||i||n.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(e)){this.rowDataUpdatedPending||(this.rowDataUpdatedPending=r);return}switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.refreshingModel=!0,(u=n.masterDetailSvc)==null||u.refreshModel(e),r&&e.step!=="group"&&((c=n.colFilter)==null||c.refreshModel()),e.step){case"group":this.doGrouping(e);case"filter":this.doFilter(a);case"pivot":this.doPivot(a);case"aggregate":this.doAggregate(a);case"filter_aggregates":this.doFilterAggregates(a);case"sort":this.doSort(e.changedRowNodes,a);case"map":this.doRowsToDisplay()}const l=new Set;this.setRowTopAndRowIndex(l),this.clearRowTopAndRowIndex(a,l),this.refreshingModel=!1,s.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}isEmpty(){var e,t,n;return!((t=(e=this.rootNode)==null?void 0:e._leafs)!=null&&t.length)||!((n=this.beans.colModel)!=null&&n.ready)}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let n=!1,s=!1;const o=[],i=If(this.gos);return this.forEachNodeAfterFilterAndSort(r=>{if(s)return;if(n&&(r===t||r===e)&&(s=!0,i&&r.group)){QL(o,r);return}if(!n){if(r!==t&&r!==e)return;n=!0,t===e&&(s=!0)}(!r.group||!i)&&o.push(r)}),o}getTopLevelNodes(){var e;return((e=this.rootNode)==null?void 0:e.childrenAfterGroup)??null}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay,n=t.length;if(this.isEmpty()||n===0)return-1;let s=0,o=n-1;if(e<=0)return 0;if(t[o].rowTop<=e)return o;let r=-1,a=-1;for(;;){const l=Math.floor((s+o)/2),u=t[l];if(this.isRowInPixel(u,e)||(u.rowTop<e?s=l+1:u.rowTop>e&&(o=l-1),r===s&&a===o))return l;r=s,a=o}}isRowInPixel(e,t){const n=e.rowTop,s=n+e.rowHeight;return n<=t&&s>t}forEachLeafNode(e){var n;const t=(n=this.rootNode)==null?void 0:n._leafs;if(t)for(let s=0,o=t.length;s<o;++s)e(t[s],s)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){const t=this.rowsToDisplay;for(let n=0,s=t.length;n<s;++n)e(t[n],n)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,n=>n.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,n=>n.childrenAfterSort)}forEachPivotNode(e,t,n){const{colModel:s,rowGroupColsSvc:o}=this.beans;if(!s.isPivotMode())return;if(!(o!=null&&o.columns.length)){e(this.rootNode,0);return}const i=n?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,r=>r.leafGroup?null:r[i])}depthFirstSearchRowNodes(e,t=!1,n=i=>i.childrenAfterGroup,s=this.rootNode,o=0){let i=o;if(!s)return i;const r=s===this.rootNode;if(r||e(s,i++),s.hasChildren()&&!s.footer){const a=n(s);if(a){const l=this.beans.footerSvc;i=(l==null?void 0:l.addTotalRows(i,s,e,t,r,"top"))??i;for(const u of a)i=this.depthFirstSearchRowNodes(e,t,n,u,i);return(l==null?void 0:l.addTotalRows(i,s,e,t,r,"bottom"))??i}}return i}doAggregate(e){var n;const t=this.rootNode;t&&((n=this.beans.aggStage)==null||n.execute({rowNode:t,changedPath:e}))}doFilterAggregates(e){const t=this.rootNode,n=this.beans.filterAggStage;if(n){n.execute({rowNode:t,changedPath:e});return}t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){const n=this.beans.sortStage;if(n){n.execute({rowNode:this.rootNode,changedRowNodes:e,changedPath:t});return}t.forEachChangedNodeDepthFirst(s=>{s.childrenAfterSort=s.childrenAfterAggFilter.slice(0),JL(s)})}doGrouping(e){var o;const t=this.rootNode,n=this.beans.groupStage,s=n==null?void 0:n.execute({rowNode:t,changedRowNodes:e.changedRowNodes,changedPath:e.changedPath,afterColumnsChanged:!!e.afterColumnsChanged});if(s===void 0){const i=t._leafs;t.childrenAfterGroup=i,t.updateHasChildren();const r=t.sibling;r&&(r.childrenAfterGroup=i)}(s||e.rowDataUpdated)&&((o=this.beans.colFilter)==null||o.refreshModel()),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){const t=this.beans.filterStage;if(t){t.execute({rowNode:this.rootNode,changedPath:e});return}e.forEachChangedNodeDepthFirst(n=>{n.childrenAfterFilter=n.childrenAfterGroup,yL(n)},!0)}doPivot(e){var t;(t=this.beans.pivotStage)==null||t.execute({rowNode:this.rootNode,changedPath:e})}getRowNode(e){var s,o;const t=(s=this.nodeManager)==null?void 0:s.getRowNode(e);return typeof t=="object"?t:typeof e=="string"&&e.indexOf(gE)===0?(o=this.beans.groupStage)==null?void 0:o.getNode(e):void 0}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const n=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),n)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){var a;const{nodeManager:e,beans:t,eventSvc:n,asyncTransactions:s}=this;if(!e)return;(a=t.valueCache)==null||a.onDataChanged();const o=[],i=[],r=new Ov;for(const{rowDataTransaction:l,callback:u}of s??[]){this.rowNodesCountReady=!0;const c=e.updateRowData(l,r);o.push(c),u&&i.push(u.bind(null,c))}this.commitTransactions(r),i.length>0&&setTimeout(()=>{for(let l=0,u=i.length;l<u;l++)i[l]()},0),o.length>0&&n.dispatchEvent({type:"asyncTransactionsFlushed",results:o}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){var o;const t=this.nodeManager;if(!t)return null;(o=this.beans.valueCache)==null||o.onDataChanged(),this.rowNodesCountReady=!0;const n=new Ov,s=t.updateRowData(e,n);return this.commitTransactions(n),s}commitTransactions(e){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:e,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{beans:e,rootNode:t}=this,n=e.flattenStage;if(n){this.rowsToDisplay=n.execute({rowNode:t});return}const s=this.rootNode.childrenAfterSort??[];for(const o of s)o.setUiLevel(0);this.rowsToDisplay=s}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);const n=e.sibling;n==null||n.setRowHeight(n.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const n=t.detailNode;n==null||n.setRowHeight(n.rowHeight,!0);const s=t.sibling;s==null||s.setRowHeight(s.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){var t;e.rowHeightChanged&&!((t=this.beans.rowAutoHeight)!=null&&t.active)&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},QL=(e,t)=>{const n=t.childrenAfterGroup;if(n)for(let s=0,o=n.length;s<o;++s){const i=n[s];i.data&&e.push(i),i.group&&QL(e,i)}};function Uhe(e){var t;(t=e.expansionSvc)==null||t.onGroupExpandedOrCollapsed()}function Whe(e,t){const n=sl(e);n&&((!t||t==="everything")&&(t="group"),n.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function zhe(e){var t;return((t=sl(e))==null?void 0:t.isEmpty())??!0}function jhe(e,t){var n;(n=sl(e))==null||n.forEachLeafNode(t)}function Khe(e,t){var n;(n=sl(e))==null||n.forEachNodeAfterFilter(t)}function qhe(e,t){var n;(n=sl(e))==null||n.forEachNodeAfterFilterAndSort(t)}function Yhe(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var n;return(n=sl(e))==null?void 0:n.updateRowData(t)})}function Zhe(e,t,n){e.frameworkOverrides.wrapIncoming(()=>{var s;return(s=sl(e))==null?void 0:s.batchUpdateRowData(t,n)})}function Xhe(e){e.frameworkOverrides.wrapIncoming(()=>{var t;return(t=sl(e))==null?void 0:t.flushAsyncTransactions()})}function Jhe(e){var t;return(t=e.selectionSvc)==null?void 0:t.getBestCostNodeSelection()}var eV={moduleName:"ClientSideRowModel",version:ut,rowModels:["clientSide"],beans:[Ghe,Vhe],dependsOn:[uL]},Qhe={moduleName:"ClientSideRowModelApi",version:ut,apiFunctions:{onGroupExpandedOrCollapsed:Uhe,refreshClientSideRowModel:Whe,isRowDataEmpty:zhe,forEachLeafNode:jhe,forEachNodeAfterFilter:Khe,forEachNodeAfterFilterAndSort:qhe,applyTransaction:Yhe,applyTransactionAsync:Zhe,flushAsyncTransactions:Xhe,getBestCostNodeSelection:Jhe,resetRowHeights:ZL,onRowHeightChanged:YL},dependsOn:[The,Ihe]},efe=class extends We{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:n,columnKeys:s,skipRowGroups:o,exportRowNumbers:i}=t,r=this.getColumnsToExport({allColumns:n,skipRowGroups:o,columnKeys:s,exportRowNumbers:i});return[this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,n,s){var p;const o=t.shouldRowBeSkipped||(()=>!1),r=t.rowPositions!=null||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!r,l=this.colModel.isPivotMode()?s.leafGroup:!s.group,u=!!s.footer,c=s.allChildrenCount===1&&((p=s.childrenAfterGroup)==null?void 0:p.length)===1&&nQ(this.gos,s);if(!l&&!u&&(t.skipRowGroups||c||a)||t.onlySelected&&!s.isSelected()||t.skipPinnedTop&&s.rowPinned==="top"||t.skipPinnedBottom&&s.rowPinned==="bottom"||s.stub||s.level===-1&&!l&&!u||o(Ft(this.gos,{node:s})))return;const f=e.onNewBodyRow(s);if(n.forEach((g,v)=>{f.onColumn(g,v,s)}),t.getCustomContentBelowRow){const g=t.getCustomContentBelowRow(Ft(this.gos,{node:s}));g&&e.addCustomContent(g)}}appendContent(e){return t=>{const n=e.appendContent;return n&&t.addCustomContent(n),t}}prependContent(e){return t=>{const n=e.prependContent;return n&&t.addCustomContent(n),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return n=>{if(!e.skipColumnGroupHeaders){const s=new jO,{colGroupSvc:o}=this.beans,i=o?o.createColumnGroups({columns:t,idCreator:s,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(i,n,e.processGroupHeaderCallback)}return n}}exportHeaders(e,t){return n=>{if(!e.skipColumnHeaders){const s=n.onNewHeaderRow();t.forEach((o,i)=>{s.onColumn(o,i,void 0)})}return n}}processPinnedTopRows(e,t){return n=>{var o,i;const s=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(r=>r.rowPinned==="top").sort((r,a)=>r.rowIndex-a.rowIndex).map(r=>{var a;return(a=this.pinnedRowModel)==null?void 0:a.getPinnedTopRow(r.rowIndex)}).forEach(s):(o=this.pinnedRowModel)!=null&&o.isManual()||(i=this.pinnedRowModel)==null||i.forEachPinnedRow("top",s),n}}processRows(e,t){return n=>{var u;const s=this.rowModel,o=ss(this.gos),i=Wc(this.gos),r=!o&&e.onlySelected,a=this.processRow.bind(this,n,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(c=>c.rowPinned==null).sort((c,d)=>c.rowIndex-d.rowIndex).map(c=>s.getRow(c.rowIndex)).forEach(a);else if(this.colModel.isPivotMode())o?s.forEachPivotNode(a,!0,l==="filteredAndSorted"):i?s.forEachNodeAfterFilterAndSort(a,!0):s.forEachNode(a);else if(e.onlySelectedAllPages||r){const c=((u=this.beans.selectionSvc)==null?void 0:u.getSelectedNodes())??[];this.replicateSortedOrder(c),c.forEach(a)}else l==="all"?s.forEachNode(a):o||i?s.forEachNodeAfterFilterAndSort(a,!0):s.forEachNode(a);return n}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:n}=this.beans;if(!t||!n)return;const s=t.getSortOptions(),o=(i,r)=>{var a,l;return i.rowIndex!=null&&r.rowIndex!=null?i.rowIndex-r.rowIndex:i.level===r.level?((a=i.parent)==null?void 0:a.id)===((l=r.parent)==null?void 0:l.id)?n.compareRowNodes(s,{rowNode:i,currentPos:i.rowIndex??-1},{rowNode:r,currentPos:r.rowIndex??-1}):o(i.parent,r.parent):i.level>r.level?o(i.parent,r):o(i,r.parent)};e.sort(o)}processPinnedBottomRows(e,t){return n=>{var o,i;const s=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(r=>r.rowPinned==="bottom").sort((r,a)=>r.rowIndex-a.rowIndex).map(r=>{var a;return(a=this.pinnedRowModel)==null?void 0:a.getPinnedBottomRow(r.rowIndex)}).forEach(s):(o=this.pinnedRowModel)!=null&&o.isManual()||(i=this.pinnedRowModel)==null||i.forEachPinnedRow("bottom",s),n}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:n=!1,exportRowNumbers:s=!1,columnKeys:o}=e,{colModel:i,gos:r,visibleCols:a}=this,l=i.isPivotMode(),u=h=>sa(h)?!1:!oa(h)||s;if(o!=null&&o.length)return i.getColsForKeys(o).filter(u);const c=r.get("treeData");let d=[];return t&&!l?d=i.getCols():d=a.allCols,d=d.filter(h=>u(h)&&(n&&!c?!HS(h):!0)),d}recursivelyAddHeaderGroups(e,t,n){const s=[];for(const o of e){const i=o;if(i.getChildren)for(const r of i.getChildren()??[])s.push(r)}e.length>0&&os(e[0])&&this.doAddHeaderHeader(t,e,n),s&&s.length>0&&this.recursivelyAddHeaderGroups(s,t,n)}doAddHeaderHeader(e,t,n){const s=e.onNewHeaderGroupingRow();let o=0;for(const i of t){const r=i;let a;n?a=n(Ft(this.gos,{columnGroup:r})):a=this.beans.colNames.getDisplayNameForColumnGroup(r,"header");const u=(r.isExpandable()?r.getLeafColumns():[]).reduce((c,d,h,f)=>{let p=Rn(c);return d.getColumnGroupShow()==="open"?(!p||p[1]!=null)&&(p=[h],c.push(p)):p&&p[1]==null&&(p[1]=h-1),h===f.length-1&&p&&p[1]==null&&(p[1]=h),c},[]);s.onColumn(r,a||"",o++,r.getLeafColumns().length-1,u)}}},tfe={moduleName:"SharedExport",version:ut,beans:[efe]},tV=`\r
|
|
206
|
-
`,nfe=class extends Pue{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,tV),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((n,s)=>{s!==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,s){n!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(s)}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 s=this.extractRowCellValue(e,t,t,"csv",n);this.result+=this.putInQuotes(s.valueFormatted??s.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():(Xe(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=tV),this.isFirstLine=!1}},sfe=class extends Fue{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()){Xe(51);return}const t=this.getMergedParams(e),n=this.getData(t),s=new Blob(["\uFEFF",n],{type:"text/plain"}),o=typeof t.fileName=="function"?t.fileName(Ft(this.gos,{})):t.fileName;Aue(this.getFileName(o),s)}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:s,valueSvc:o,gos:i}=this,{processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:u,suppressQuotes:c,columnSeparator:d}=e;return new nfe({colModel:t,colNames:n,valueSvc:o,gos:i,processCellCallback:r||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:u||void 0,suppressQuotes:c||!1,columnSeparator:d||",",rowGroupColsSvc:s})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function ofe(e,t){var n;return(n=e.csvCreator)==null?void 0:n.getDataAsCsv(t)}function ife(e,t){var n;(n=e.csvCreator)==null||n.exportDataAsCsv(t)}var rfe={moduleName:"CsvExport",version:ut,beans:[sfe],apiFunctions:{getDataAsCsv:ofe,exportDataAsCsv:ife},dependsOn:[tfe]},afe=class extends We{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:s,rowNodes:o}=this;for(let i=0;i<e;i++){const r=n+i,a=new Ja(s);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(r),a.setRowTop(t*r),o.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:n,state:s}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:n,pageStatus:s}}}setDataAndId(e,t,n){dt(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(Vn(this.params.datasource.getRows)){Xe(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:n,params:{sortModel:s,filterModel:o},gos:i}=this;return{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,n),failCallback:this.pageLoadFailed.bind(this,n),sortModel:s,filterModel:o,context:Ft(i,{}).context}}forEachNode(e,t,n){this.rowNodes.forEach((s,o)=>{this.startRow+o<n&&e(s,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((o,i)=>{const r=e.rowData?e.rowData[i]:void 0;!o.id&&o.alreadyRendered&&r&&(t[i]=new Ja(n),t[i].setRowIndex(o.rowIndex),t[i].setRowTop(o.rowTop),t[i].setRowHeight(o.rowHeight),o.clearRowTopAndRowIndex()),this.setDataAndId(t[i],r,this.startRow+i)});const s=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,s)}destroy(){for(const e of this.rowNodes)e.clearRowTopAndRowIndex();super.destroy()}},lfe=2,ufe=class extends We{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 s=this.blocks[n];if(!s){if(t)return;s=this.createBlock(n)}return s.getRow(e)}createBlock(e){const t=this.params,n=this.createBean(new afe(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()&&(ja(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(r=>r!=e),n=(r,a)=>a.lastAccessed-r.lastAccessed;t.sort(n);const s=this.params.maxBlocksInCache>0,o=s?this.params.maxBlocksInCache-1:null,i=lfe-1;t.forEach((r,a)=>{const l=r.state==="needsLoading"&&a>=i,u=s?a>=o:!1;if(l||u){if(this.isBlockCurrentlyDisplayed(r)||this.isBlockFocused(r))return;this.removeBlockFromCache(r)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:n,endRow:s}=e;return t.rowIndex>=n&&t.rowIndex<s}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:s}=this.params,i=(e.id+1)*n+s;this.rowCount<i&&(this.rowCount=i)}}setRowCount(e,t){this.rowCount=e,dt(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,s)=>n.id-s.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 s=-1,o=!1;const i={value:0};let r=!1;for(const l of this.getBlocksInOrder())if(!r){if(o&&s+1!==l.id){r=!0;continue}s=l.id,l.forEachNode(u=>{const c=u===e||u===t;(o||c)&&n.push(u),c&&(o=!o)},i,this.rowCount)}return r||o?[]:n}},cfe=class extends We{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 Ja(e);this.rootNode=t,t.level=-1,this.rowHeight=lu(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=lu(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){var t;let e;this.cacheParams?e=!ff(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;jc(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:s,eventSvc:o,gos:i}=e;this.cacheParams={datasource:this.datasource,filterModel:(t==null?void 0:t.getFilterModel())??{},sortModel:(n==null?void 0:n.getSortModel())??[],rowNodeBlockLoader:s,initialRowCount:i.get("infiniteInitialRowCount"),maxBlocksInCache:i.get("maxBlocksInCache"),rowHeight:lu(e),overflowSize:i.get("cacheOverflowSize"),blockSize:i.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new ufe(this.cacheParams)),o.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 dfe(e){var t;(t=Gv(e))==null||t.refreshCache()}function hfe(e){var t;(t=Gv(e))==null||t.purgeCache()}function ffe(e){var t;return(t=Gv(e))==null?void 0:t.getRowCount()}var pfe=class extends We{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=sQ(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=As(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Ni(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){ja(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:s}=t.getBlockStateJson();e[n]=s}),e}printCacheStatus(){ja(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},gfe={moduleName:"InfiniteRowModelCore",version:ut,rowModels:["infinite"],beans:[cfe,pfe]},mfe={moduleName:"InfiniteRowModel",version:ut,apiFunctions:{refreshInfiniteCache:dfe,purgeInfiniteCache:hfe,getInfiniteRowCount:ffe},dependsOn:[gfe,xhe]},vfe="↑",yfe="↓",wfe={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},Cfe=class extends yn{constructor(){super(wfe),this.eValue=ct,this.eDelta=ct,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const n=Math.abs(t),s=e.formatValue(n),o=dt(s)?s:n,i=t>=0,r=this.eDelta;i?r.textContent=vfe+o:r.textContent=yfe+o,r.classList.toggle("ag-value-change-delta-up",i),r.classList.toggle("ag-value-change-delta-down",!i)}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"),Ps(this.eDelta)}refresh(e,t=!1){var u;const{value:n,valueFormatted:s}=e,{eValue:o,lastValue:i,beans:r}=this;if(n===i||(dt(s)?o.textContent=s:dt(n)?o.textContent=n:Ps(o),(u=r.filterManager)!=null&&u.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n,l=i&&typeof i=="object"&&"toNumber"in i?i.toNumber():i;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return i&&o.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=n,!0}},bfe=".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}",Sfe={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},Efe=class extends yn{constructor(){super(Sfe),this.eCurrent=ct,this.refreshCount=0,this.registerCSS(bfe)}init(e){this.refresh(e,!0)}addSlideAnimation(){var o;this.refreshCount++;const e=this.refreshCount;(o=this.ePrevious)==null||o.remove();const{beans:t,eCurrent:n}=this,s=is({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=s,s.textContent=n.textContent,this.getGui().insertBefore(s,n),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{var i;e===this.refreshCount&&((i=this.ePrevious)==null||i.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var o;let n=e.value;if(Vn(n)&&(n=""),n===this.lastValue||(o=this.beans.filterManager)!=null&&o.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=n;const s=this.eCurrent;return dt(e.valueFormatted)?s.textContent=e.valueFormatted:dt(e.value)?s.textContent=n:Ps(s),!0}},_fe=class extends We{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"),s=this.beans.gos.get("cellFadeDuration")){const o=this.animations[t];o.delete(e);const i=Date.now(),r=i+n,a=i+n+s,l={phase:"flash",flashEndTime:r,fadeEndTime:a};o.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&&r+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=r)}advanceAnimations(){const e=Date.now();let t=null;for(const n of Object.keys(this.animations)){const s=this.animations[n],o=`ag-cell-${n}`,i=`${o}-animation`;for(const[r,a]of s){if(!r.isAlive()||!r.comp){s.delete(r);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}}=r;switch(l){case"flash":f.toggleCss(o,!1),f.toggleCss(i,!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(o,!1),f.toggleCss(i,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),s.delete(r);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=Eoe(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 Rfe(e,t={}){const{cellFlashSvc:n}=e;n&&e.frameworkOverrides.wrapIncoming(()=>{for(const s of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))n.flashCell(s,t)})}var Dfe={moduleName:"HighlightChanges",version:ut,beans:[_fe],userComponents:{agAnimateShowChangeCellRenderer:Cfe,agAnimateSlideCellRenderer:Efe},apiFunctions:{flashCells:Rfe}};function Tfe(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function Ife(e,t,n){var s;return(s=e.stateSvc)==null?void 0:s.setState(t,n)}function nV(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=xfe(e)),e.version=ut,e}function xfe(e){return e.cellSelection=Ffe(e,"rangeSelection"),e}function Ffe(e,t){if(e&&typeof e=="object")return e[t]}var Pfe=class extends We{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=As(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=As(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=As(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=ss(e);const s=nV(e.get("initialState")??{}),o=s.partialColumnState;delete s.partialColumnState,this.cachedState=s;const i=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>i(()=>this.setupStateOnGridReady(s))),(s.columnOrder||s.columnVisibility||s.columnSizing||s.columnPinning||s.columnGroup)&&(n==null||n.hideColumns("columnState"));const[r,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:u})=>{u==="gridInitializing"&&(r(),i(()=>{this.setupStateOnColumnsInitialised(s,!!o),n==null||n.revealColumns("columnState")}))},rowCountReady:()=>{a==null||a(),i(()=>this.setupStateOnRowCountReady(s))},firstDataRendered:()=>{l==null||l(),i(()=>this.setupStateOnFirstDataRendered(s))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const n=nV(e);delete n.partialColumnState,this.cachedState=n,this.startSuppressEvents();const s="api",o=t?new Set(t):void 0;this.setGridReadyState(n,s,o),this.setColumnsInitialisedState(n,s,!!o,o),this.setRowCountState(n,s,o),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(n,s,o),this.stopSuppressEvents(s)})}setGridReadyState(e,t,n){var s,o;t==="api"&&!(n!=null&&n.has("sideBar"))&&((o=(s=this.beans.sideBar)==null?void 0:s.comp)==null||o.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,s){this.setColumnState(e,t,n,s),this.setColumnGroupState(e,t,s),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const n=s=>()=>this.updateColumnState([s]);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:s,rowGroupExpansion:o,ssrmRowGroupExpansion:i,rowSelection:r,pagination:a}=e,l=(c,d)=>!(n!=null&&n.has(c))&&(d||t==="api");l("filter",s)&&this.setFilterState(s),l("rowGroupExpansion",o)&&this.setRowGroupExpansionState(i,o,t),l("rowSelection",r)&&this.setRowSelectionState(r,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))},s=()=>t("filter",this.getFilterState()),{gos:o,colFilter:i}=this.beans;this.addManagedEventListeners({filterChanged:s,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{(o.get("groupDefaultExpanded")!==0||o.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(n)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&t("pagination",this.getPaginationState())}}),i&&this.addManagedListeners(i,{filterStateChanged:s})}setFirstDataRenderedState(e,t,n){const{scroll:s,cellSelection:o,focusedCell:i,columnOrder:r,rowPinning:a}=e,l=(d,h)=>!(n!=null&&n.has(d))&&(h||t==="api");l("focusedCell",i)&&this.setFocusedCellState(i),l("cellSelection",o)&&this.setCellSelectionState(o),l("scroll",s)&&this.setScrollState(s),l("rowPinning",a)&&this.setRowPinningState(a),this.setColumnPivotState(!!(r!=null&&r.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:s=>{if(s.finished){const o=this.getRangeSelectionState();t("rangeSelection",o),t("cellSelection",o)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return Tue(dv(e),e.colModel.isPivotMode())}setColumnState(e,t,n,s){const{sort:o,rowGroup:i,aggregation:r,pivot:a,columnPinning:l,columnVisibility:u,columnSizing:c,columnOrder:d}=e;let h=!1;const f=(D,F)=>{const k=!(s!=null&&s.has(D))&&!!(F||t==="api");return h||(h=k),k},p={},g=D=>{let F=p[D];return F||(F={colId:D},p[D]=F,F)},v={},C=f("sort",o);C&&(o==null||o.sortModel.forEach(({colId:D,sort:F},k)=>{const O=g(D);O.sort=F,O.sortIndex=k})),(C||!n)&&(v.sort=null,v.sortIndex=null);const S=f("rowGroup",i);S&&(i==null||i.groupColIds.forEach((D,F)=>{const k=g(D);k.rowGroup=!0,k.rowGroupIndex=F})),(S||!n)&&(v.rowGroup=null,v.rowGroupIndex=null);const b=f("aggregation",r);b&&(r==null||r.aggregationModel.forEach(({colId:D,aggFunc:F})=>{g(D).aggFunc=F})),(b||!n)&&(v.aggFunc=null);const w=f("pivot",a);w&&(a==null||a.pivotColIds.forEach((D,F)=>{const k=g(D);k.pivot=!0,k.pivotIndex=F}),this.gos.updateGridOptions({options:{pivotMode:!!(a!=null&&a.pivotMode)},source:t})),(w||!n)&&(v.pivot=null,v.pivotIndex=null);const _=f("columnPinning",l);if(_){for(const D of(l==null?void 0:l.leftColIds)??[])g(D).pinned="left";for(const D of(l==null?void 0:l.rightColIds)??[])g(D).pinned="right"}(_||!n)&&(v.pinned=null);const R=f("columnVisibility",u);if(R)for(const D of(u==null?void 0:u.hiddenColIds)??[])g(D).hide=!0;(R||!n)&&(v.hide=null);const T=f("columnSizing",c);if(T)for(const{colId:D,flex:F,width:k}of(c==null?void 0:c.columnSizingModel)??[]){const O=g(D);O.flex=F??null,O.width=k}(T||!n)&&(v.flex=null);const I=d==null?void 0:d.orderedColIds,x=!!(I!=null&&I.length)&&!(s!=null&&s.has("columnOrder")),P=x?I.map(D=>g(D)):Object.values(p);(P.length||h)&&(this.columnStates=P,Li(this.beans,{state:P,applyOrder:x,defaultState:v},t))}setColumnPivotState(e,t){const n=this.columnStates;this.columnStates=void 0;const s=this.columnGroupStates;this.columnGroupStates=void 0;const o=this.beans,{pivotResultCols:i,colGroupSvc:r}=o;if(i!=null&&i.isPivotResultColsPresent()){if(n){const a=[];for(const l of n)i.getPivotResultCol(l.colId)&&a.push(l);Li(o,{state:a,applyOrder:e},t)}s&&(r==null||r.setColumnGroupState(s,t))}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return Iue(t)}setColumnGroupState(e,t,n){var a;const s=this.beans.colGroupSvc;if(!s||n!=null&&n.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const o=new Set((a=e.columnGroup)==null?void 0:a.openColumnGroupIds),r=s.getColumnGroupState().map(({groupId:l})=>{const u=o.has(l);return u&&o.delete(l),{groupId:l,open:u}});for(const l of o)r.push({groupId:l,open:!0});r.length&&(this.columnGroupStates=r),s.setColumnGroupState(r,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(),s=(e==null?void 0:e.getAdvFilterModel())??void 0;return t||s||n?{filterModel:t,columnFilterState:n,advancedFilterModel:s}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:n,columnFilterState:s,advancedFilterModel:o}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(n!==void 0||s!==void 0)&&(t==null||t.setFilterState(n??null,s??null,"columnFilter")),o!==void 0&&(t==null||t.setAdvFilterModel(o??null,"advancedFilter"))}getRangeSelectionState(){var t;const e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(n=>{const{id:s,type:o,startRow:i,endRow:r,columns:a,startColumn:l}=n;return{id:s,type:o,startRow:i,endRow:r,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:s,visibleCols:o}=this.beans;if(!ta(t)||!n)return;const i=[];for(const r of(e==null?void 0:e.cellRanges)??[]){const a=[];for(const u of r.colIds){const c=s.getCol(u);c&&a.push(c)}if(!a.length)continue;let l=s.getCol(r.startColId);if(!l){const u=o.allCols,c=new Set(a);l=u.find(d=>c.has(d))}i.push({...r,columns:a,startColumn:l})}n.setCellRanges(i)}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:s,rowRenderer:o,animationFrameSvc:i,ctrlsSvc:r}=this.beans;s.wrapIncoming(()=>{var a;r.get("center").setCenterViewportScrollLeft(n),(a=r.getScrollFeature())==null||a.setVerticalScrollPosition(t),o.redraw({afterScroll:!0}),i==null||i.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:s}=e;return{colId:t.getColId(),rowIndex:n,rowPinned:s}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:n}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:s,rowIndex:o,rowPinned:i}=e;t.setFocusedCell({column:n.getCol(s),rowIndex:o,rowPinned:i,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const n=e.getCurrentPage(),s=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!n&&!s))return{page:n,pageSize:s}}setPaginationState(e,t){const{pagination:n,gos:s}=this.beans;if(!n)return;const{pageSize:o,page:i}=e??{page:0,pageSize:s.get("paginationPageSize")},r=t==="gridInitializing";o&&!s.get("paginationAutoPageSize")&&n.setPageSize(o,r?"initialState":"pageSizeSelector"),typeof i=="number"&&(r?n.setPage(i):n.goToPage(i))}getRowSelectionState(){var s;const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((s=t==null?void 0:t.toggledNodes)!=null&&s.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 s=this.beans.expansionSvc;if(!s)return;const o=t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};s.setExpansionState(o,n)}updateColumnState(e){const t=this.getColumnState();let n=!1;const s=this.cachedState;for(const o of Object.keys(t)){const i=t[o];ff(i,s[o])||(n=!0)}this.cachedState={...s,...t},n&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const n=this.cachedState[e];this.setCachedStateValue(e,t),ff(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")}},Afe={moduleName:"GridState",version:ut,beans:[Pfe],apiFunctions:{getState:Tfe,setState:Ife}};function kfe(e){return e.rowModel.isLastRowIndexKnown()}function Ofe(e){var t;return((t=e.pagination)==null?void 0:t.getPageSize())??100}function Mfe(e){var t;return((t=e.pagination)==null?void 0:t.getCurrentPage())??0}function Nfe(e){var t;return((t=e.pagination)==null?void 0:t.getTotalPages())??1}function Lfe(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function Vfe(e){var t;(t=e.pagination)==null||t.goToNextPage()}function Bfe(e){var t;(t=e.pagination)==null||t.goToPreviousPage()}function $fe(e){var t;(t=e.pagination)==null||t.goToFirstPage()}function Hfe(e){var t;(t=e.pagination)==null||t.goToLastPage()}function Gfe(e,t){var n;(n=e.pagination)==null||n.goToPage(t)}var Ufe=class extends We{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 s=Math.max(lu(t),1),o=Math.floor(e/s);t.pagination.setPageSize(o,"autoCalculated")};this.isBodyRendered?As(this,n,50)():(n(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},Yf="paginationPageSizeSelector",Wfe={tag:"span",cls:"ag-paging-page-size"},zfe=class extends yn{constructor(){super(Wfe),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(Yf,()=>{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(){Ps(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(Yf)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),n=!t||!e.includes(t);if(n){const o=this.gos.exists("paginationPageSize"),i=this.gos.get(Yf)!==!0;Xe(94,{pageSizeSet:o,pageSizesSet:i,pageSizeOptions:e,paginationPageSizeOption:t}),i||Xe(95,{paginationPageSizeOption:t,paginationPageSizeSelector:Yf}),e.unshift("")}const s=String(n?"":t);this.selectPageSizeComp?(Ya(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(s,!0)):this.createPageSizeSelectorComp(e,s),this.hasEmptyOption=n}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const n=this.getLocaleTextFunc(),s=n("pageSizeSelectorLabel","Page Size:"),o=n("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new uE).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(o).setLabel(s).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(Yf);return!Array.isArray(t)||!(t!=null&&t.length)?e:[...t].sort((n,s)=>n-s)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},jfe={selector:"AG-PAGE-SIZE-SELECTOR",component:zfe},Kfe=".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}",qfe=class extends fN{constructor(){super(),this.btFirst=ct,this.btPrevious=ct,this.btNext=ct,this.btLast=ct,this.lbRecordCount=ct,this.lbFirstRowOnPage=ct,this.lbLastRowOnPage=ct,this.lbCurrent=ct,this.lbTotal=ct,this.pageSizeComp=ct,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(Kfe)}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(),[jfe]);const{btFirst:t,btPrevious:n,btNext:s,btLast:o}=this;this.activateTabIndex([t,n,s,o]),t.insertAdjacentElement("afterbegin",li(e?"last":"first",this.beans)),n.insertAdjacentElement("afterbegin",li(e?"next":"previous",this.beans)),s.insertAdjacentElement("afterbegin",li(e?"previous":"next",this.beans)),o.insertAdjacentElement("afterbegin",li(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:i=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(i):Une(this.beans,i),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:s=>{(s.key===Oe.ENTER||s.key===Oe.SPACE)&&(s.preventDefault(),n())}})}Gne(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}):xue(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 s=this.isZeroPagesToDisplay(),o=e===n-1;this.nextButtonDisabled=o||s,this.lastButtonDisabled=!t||s||e===n-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){sJ(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(),s=e?n:null,o=this.pagination.getCurrentPage(),i=this.pagination.getPageSize();let r,a;this.isZeroPagesToDisplay()?r=a=0:(r=i*o+1,a=r+i-1,e&&a>s&&(a=s));const l=r+i-1,u=!e&&n<l,c=this.formatNumber(r);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?o+1:0,g=this.formatNumber(p);this.lbCurrent.textContent=g;let v,C;if(e)v=this.formatNumber(t),C=this.formatNumber(s);else{const S=h("more","more");v=S,C=S}this.lbTotal.textContent=v,this.lbRecordCount.textContent=C,this.announceAriaStatus(c,d,C,g,v)}announceAriaStatus(e,t,n,s,o){var d,h;const i=this.getLocaleTextFunc(),r=i("page","Page"),a=i("to","to"),l=i("of","of"),u=`${e} ${a} ${t} ${l} ${n}`,c=`${r} ${s} ${l} ${o}`;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"))}},Yfe={selector:"AG-PAGINATION",component:qfe},Zfe=class extends We{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 Yfe}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,s;if(!this.active)return;let t=e;this.paginateChildRows||(t=((s=(n=this.beans.rowModel).getTopLevelIndexFromDisplayedIndex)==null?void 0:s.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 dt(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:dt(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:dt(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:dt(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,s=t-1;this.totalPages=Math.floor(s/n)+1,this.adjustCurrentPageIfInvalid();const o=this.currentPage,i=n*o;let r=n*(o+1)-1;if(r>s&&(r=s),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(i),r===s)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(r+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,s=e-1;this.totalPages=Math.floor(s/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*n,this.bottomDisplayedRowIndex=t*(n+1)-1,this.bottomDisplayedRowIndex>s&&(this.bottomDisplayedRowIndex=s)}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:s=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:n,newPageSize:s,keepRenderedRows:t})}},Xfe={moduleName:"Pagination",version:ut,beans:[Zfe,Ufe],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:kfe,paginationGetPageSize:Ofe,paginationGetCurrentPage:Mfe,paginationGetTotalPages:Nfe,paginationGetRowCount:Lfe,paginationGoToNextPage:Vfe,paginationGoToPreviousPage:Bfe,paginationGoToFirstPage:$fe,paginationGoToLastPage:Hfe,paginationGoToPage:Gfe},dependsOn:[Uv]};function Jfe(e,t={}){const n=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(n))}function sV(e,t,n,s,o){t&&(s&&t.parent&&t.parent.level!==-1&&sV(e,t.parent,n,s,o),t.setExpanded(n,void 0,o))}function Qfe(e,t){return e.rowModel.getRowNode(t)}function epe(e,t,n,s){e.rowRenderer.addRenderedRowListener(t,n,s)}function tpe(e){return e.rowRenderer.getRenderedNodes()}function npe(e,t,n){e.rowModel.forEachNode(t,n)}function spe(e){return e.rowRenderer.firstRenderedRow}function ope(e){return e.rowRenderer.lastRenderedRow}function ipe(e,t){return e.rowModel.getRow(t)}function rpe(e){return e.rowModel.getRowCount()}var ape={moduleName:"RowApi",version:ut,apiFunctions:{redrawRows:Jfe,setRowNodeExpanded:sV,getRowNode:Qfe,addRenderedRowListener:epe,getRenderedNodes:tpe,forEachNode:npe,getFirstDisplayedRowIndex:spe,getLastDisplayedRowIndex:ope,getDisplayedRowAtIndex:ipe,getDisplayedRowCount:rpe}},lpe={moduleName:"ScrollApi",version:ut,apiFunctions:{getVerticalPixelRange:bde,getHorizontalPixelRange:Sde,ensureColumnVisible:VL,ensureIndexVisible:BL,ensureNodeVisible:Ede}};function upe(e,t,n){if(!t)return;const s=e.ctrlsSvc.getGridBodyCtrl().eGridBody,o=`aria-${t}`;n===null?s.removeAttribute(o):s.setAttribute(o,n)}function cpe(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function dpe(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function hpe(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function fpe(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function ppe(e){return{rowHeight:lu(e),headerHeight:Nf(e)}}function gpe(e,t={}){var i;const n=[];for(const r of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const a=r.getCellRenderer();a!=null&&n.push(kf(a))}if((i=t.columns)!=null&&i.length)return n;const s=[],o=r0(t.rowNodes);for(const r of e.rowRenderer.getAllRowCtrls()){if(o&&!a0(r.rowNode,o)||!r.isFullWidth())continue;const a=r.getFullWidthCellRenderers();for(let l=0;l<a.length;l++){const u=a[l];u!=null&&s.push(kf(u))}}return[...s,...n]}var mpe={moduleName:"RenderApi",version:ut,apiFunctions:{setGridAriaProperty:upe,refreshCells:cpe,refreshHeader:dpe,isAnimationFrameQueueEmpty:hpe,flushAllAnimationFrames:fpe,getSizesForCurrentTheme:ppe,getCellRendererInstances:gpe}};function vpe(e,t){var n,s;typeof t=="number"?(n=e.colAutosize)==null||n.sizeColumnsToFit(t,"api"):(s=e.colAutosize)==null||s.sizeColumnsToFitGridBody(t)}function oV({colAutosize:e,visibleCols:t},n,s){Array.isArray(n)?e==null||e.autoSizeCols({colKeys:n,skipHeader:s,source:"api"}):e==null||e.autoSizeCols({...n,colKeys:n.colIds??t.allCols,source:"api"})}function ype(e,t){var n;t&&typeof t=="object"?oV(e,t):(n=e.colAutosize)==null||n.autoSizeAllColumns({source:"api",skipHeader:t})}var wpe=class extends We{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 s=!1;const o=t.type;if(o==="fitGridWidth"||o==="fitProvidedWidth")s=!0;else if(o==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const i=e.get("rowData");s=i!=null&&i.length>0&&ss(e)}s&&((n=this.beans.colDelayRenderSvc)==null||n.hideColumns(o))}}autoSizeCols(e){const{eventSvc:t,visibleCols:n}=this.beans;this.innerAutoSizeCols(e).then(s=>{var u;const o=c=>Yc(t,Array.from(c),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return o(s);const i=iV(this.beans),r=c=>n.leftCols.some(d=>Ff(d,c)),a=c=>n.rightCols.some(d=>Ff(d,c)),l=e.colKeys.filter(c=>!sa(c)&&!oa(c)&&!r(c)&&!a(c));this.sizeColumnsToFit(i,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}),o(s)})}innerAutoSizeCols(e){return new Promise((t,n)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,n));const{colKeys:s,skipHeader:o,skipHeaderGroups:i,stopAtGroup:r,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 C=-1;const S=Object.fromEntries(u.map(({colId:_,...R})=>[_,R])),b=o??this.gos.get("skipHeaderOnAutoSize"),w=i??b;for(;C!==0;){C=0;const _=[];for(const R of s){if(!R||mQ(R))continue;const T=f.getCol(R);if(!T||v.has(T))continue;const I=p.getPreferredWidthForColumn(T,b);if(I>0){const x=S[T.colId]??{};x.minWidth??(x.minWidth=l),x.maxWidth??(x.maxWidth=a);const P=Cpe(T,I,x);T.setActualWidth(P,c),v.add(T),C++}_.push(T)}_.length&&g.refresh(c)}w||this.autoSizeColumnGroupsByColumns(s,c,r),t(v)})}autoSizeColumn(e,t,n){this.autoSizeCols({colKeys:[e],skipHeader:n,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,n){const{colModel:s,ctrlsSvc:o}=this.beans,i=new Set,r=s.getColsForKeys(e);for(const l of r){let u=l.getParent();for(;u&&u!=n;)u.isPadding()||i.add(u),u=u.getParent()}let a;for(const l of i){for(const u of o.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"),s=()=>{this.autoSizeColumn(t,"uiColumnResized",n)};e.addEventListener("dblclick",s);const o=new yu(e);return o.addEventListener("doubleTap",s),()=>{e.removeEventListener("dblclick",s),o.destroy()}}addColumnGroupResize(e,t,n){const s=this.gos.get("skipHeaderOnAutoSize"),o=()=>{const i=[],r=t.getDisplayedLeafColumns();for(const a of r)a.getColDef().suppressAutoSize||i.push(a.getColId());i.length>0&&this.autoSizeCols({colKeys:i,skipHeader:s,stopAtGroup:t,source:"uiColumnResized"}),n()};return e.addEventListener("dblclick",o),()=>e.removeEventListener("dblclick",o)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const n=iV(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):Xe(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",n,s){var p,g;if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,n,s));return}const o={};for(const{key:v,...C}of(s==null?void 0:s.columnLimits)??[])o[typeof v=="string"?v:v.getColId()]=C;const i=this.beans.visibleCols.allCols;if(e<=0||!i.length)return;const r=na(i);if(s!=null&&s.onlyScaleUp&&r>e||e===r&&i.every(C=>{if(C.colDef.suppressSizeToFit)return!0;const S=o==null?void 0:o[C.getId()],b=(S==null?void 0:S.minWidth)??(s==null?void 0:s.defaultMinWidth),w=(S==null?void 0:S.maxWidth)??(s==null?void 0:s.defaultMaxWidth),_=C.getActualWidth();return(b==null||_>=b)&&(w==null||_<=w)}))return;const l=[],u=[];for(const v of i){const C=((p=s==null?void 0:s.colKeys)==null?void 0:p.some(S=>Ff(v,S)))??!0;v.getColDef().suppressSizeToFit||!C?u.push(v):l.push(v)}const c=l.slice(0);let d=!1;const h=v=>{Ni(l,v),u.push(v)};for(const v of l){v.resetActualWidth(t);const C=o==null?void 0:o[v.getId()],S=(C==null?void 0:C.minWidth)??(s==null?void 0:s.defaultMinWidth),b=(C==null?void 0:C.maxWidth)??(s==null?void 0:s.defaultMaxWidth),w=v.getActualWidth();typeof S=="number"&&w<S?v.setActualWidth(S,t,!0):typeof b=="number"&&w>b&&v.setActualWidth(b,t,!0)}for(;!d;){d=!0;const v=e-na(u);if(v<=0)for(const C of l){const S=((g=o==null?void 0:o[C.getId()])==null?void 0:g.minWidth)??(s==null?void 0:s.defaultMinWidth)??C.minWidth;C.setActualWidth(S,t,!0)}else{const C=v/na(l);let S=v;for(let b=l.length-1;b>=0;b--){const w=l[b],_=o==null?void 0:o[w.getId()],R=(_==null?void 0:_.minWidth)??(s==null?void 0:s.defaultMinWidth),T=(_==null?void 0:_.maxWidth)??(s==null?void 0:s.defaultMaxWidth),I=w.getMinWidth(),x=w.getMaxWidth(),P=typeof R=="number"&&R>I?R:I,D=typeof T=="number"&&T<x?T:x;let F=Math.round(w.getActualWidth()*C);F<P?(F=P,h(w),d=!1):F>D?(F=D,h(w),d=!1):b===0&&(F=S),w.setActualWidth(F,t,!0),S-=F}}}for(const v of c)v.fireColumnWidthChangedEvent(t);const f=this.beans.visibleCols;f.setLeftValues(t),f.updateBodyWidths(),!n&&Yc(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 s=n.type;if(s==="fitGridWidth"){const{columnLimits:o,defaultMinWidth:i,defaultMaxWidth:r}=n,a=o==null?void 0:o.map(({colId:l,minWidth:u,maxWidth:c})=>({key:l,minWidth:u,maxWidth:c}));this.sizeColumnsToFitGridBody({defaultMinWidth:i,defaultMaxWidth:r,columnLimits:a})}else s==="fitProvidedWidth"&&this.sizeColumnsToFit(n.width,"sizeColumnsToFit");t==null||t.revealColumns(s)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{var s;if(!this.isAlive())return;const n="autosizeColumns";e?this.autoSizeCols({...t,source:n,colKeys:e}):this.autoSizeAllColumns({...t,source:n}),(s=this.beans.colDelayRenderSvc)==null||s.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 Cpe(e,t,n={}){const s=n.minWidth??e.getMinWidth();t<s&&(t=s);const o=n.maxWidth??e.getMaxWidth();return t>o&&(t=o),t}function iV({ctrlsSvc:e,scrollVisibleSvc:t}){const n=e.getGridBodyCtrl(),o=n.isVerticalScrollShowing()?t.getScrollbarWidth():0;return yf(n.eGridBody)-o}var bpe={moduleName:"ColumnAutoSize",version:ut,beans:[wpe],apiFunctions:{sizeColumnsToFit:vpe,autoSizeColumns:oV,autoSizeAllColumns:ype},dependsOn:[FN]},Spe=".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 Epe(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function _pe(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function Rpe(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedTopRow(t)}function Dpe(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedBottomRow(t)}function Tpe(e,t,n){var s;return(s=e.pinnedRowModel)==null?void 0:s.forEachPinnedRow(t,n)}var Ipe={moduleName:"PinnedRow",version:ut,beans:[Rse],css:[Spe],apiFunctions:{getPinnedTopRowCount:Epe,getPinnedBottomRowCount:_pe,getPinnedTopRow:Rpe,getPinnedBottomRow:Dpe,forEachPinnedRow:Tpe},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},xpe=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 s of this.spannedNodes)s!==this.lastNode&&(t+=s.rowHeight);return e-t}},Fpe=class extends We{constructor(e){super(),this.column=e}buildCache(e){var b;const{column:t,beans:{gos:n,pinnedRowModel:s,rowModel:o,valueSvc:i,pagination:r}}=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 C=(w,_)=>{p=w,g=null,v=_},S=w=>{const _=!w.isExpandable()&&!w.group&&!w.detail&&(c?!c({rowNode:w}):!0);if(w.rowIndex==null||!_){C(null,null);return}if(p==null||w.level!==p.level||w.footer||g&&w.rowIndex-1!==(g==null?void 0:g.getLastNode().rowIndex)){C(w,i.getValue(t,w));return}const R=i.getValue(t,w);if(f){const T=Ft(n,{valueA:v,nodeA:p,valueB:R,nodeB:w,column:t,colDef:a});if(!h(T)){C(w,R);return}}else if(d?!d(v,R):v!==R){C(w,R);return}if(!g){const T=l==null?void 0:l.get(p);(T==null?void 0:T.firstNode)===p?(T.reset(),g=T):g=new xpe(t,p),u.set(p,g)}g.addSpannedNode(w),u.set(w,g)};switch(e){case"center":(b=o.forEachDisplayedNode)==null||b.call(o,w=>{(!r||r.isRowInPage(w.rowIndex))&&S(w)}),this.centerValueNodeMap=u;break;case"top":s==null||s.forEachPinnedRow("top",S),this.topValueNodeMap=u;break;case"bottom":s==null||s.forEachPinnedRow("bottom",S),this.bottomValueNodeMap=u;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},Ppe=class extends We{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=As(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=As(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 Fpe(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,s=e.column,o=e.rowIndex,i=this.spanningColumns.get(s);if(!i)return;let r;switch(e.rowPinned){case"top":r=t==null?void 0:t.getPinnedTopRow(o);break;case"bottom":r=t==null?void 0:t.getPinnedBottomRow(o);break;default:r=n.getRow(o)}if(r)return i.getCellSpan(r)}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,s]of this.spanningColumns)if(s.isCellSpanning(e)){const o=s.getCellSpan(e);t(n,o)}}destroy(){super.destroy(),this.spanningColumns.clear()}},Ape=class extends ad{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,s,o,i,r){this.eWrapper=n,super.setComp(e,t,n,s,o,i,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||zm(e,t.rowIndex)}setAriaRowSpan(){lJ(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(Pv(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}},kpe=class extends Hv{onRowIndexChanged(){super.onRowIndexChanged();for(const e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){var s;const t=(s=this.beans.rowSpanSvc)==null?void 0:s.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new Ape(t,this,this.beans)}isCorrectCtrlForSpan(e){var s;const t=(s=this.beans.rowSpanSvc)==null?void 0:s.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},Ope=class extends We{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),s=n.size,o=this.getAllRelevantRowControls(e),i=new Map;let r=!1;for(const l of o)l.isAlive()&&(t==null||t.forEachSpannedColumn(l.rowNode,(u,c)=>{if(i.has(c.firstNode))return;const d=n.get(c.firstNode);if(d){i.set(c.firstNode,d),n.delete(c.firstNode);return}r=!0;const h=new kpe(c.firstNode,this.beans,!1,!1,!1);i.set(c.firstNode,h)}));this.setCtrlsMap(e,i);const a=i.size===s;if(!(!r&&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 s=this.getCtrlsMap(e.rowPinned).get(n.firstNode);if(s)return s.getAllCellCtrls().find(o=>o.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")}},Mpe={moduleName:"CellSpan",version:ut,beans:[Ppe,Ope]},Npe=class extends We{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,s=n.cellClassRules,o=this.getCellClassParams(e,n);o0(this.beans.expressionSvc,s===this.cellClassRules?void 0:this.cellClassRules,s,o,i=>t.toggleCss(i,!0),i=>t.toggleCss(i,!1)),this.cellClassRules=s}applyUserStyles(){const e=this.column,t=e.colDef,n=t.cellStyle;if(!n)return;let s;if(typeof n=="function"){const o=this.getCellClassParams(e,t);s=n(o)}else s=n;s&&this.cellComp.setUserStyles(s)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,n=e.colDef,s=this.getCellClassParams(e,n);for(const i of this.staticClasses)t.toggleCss(i,!1);const o=this.beans.cellStyles.getStaticCellClasses(n,s);this.staticClasses=o;for(const i of o)t.toggleCss(i,!0)}getCellClassParams(e,t){const{value:n,rowNode:s}=this.cellCtrl;return Ft(this.beans.gos,{value:n,data:s.data,node:s,colDef:t,column:e,rowIndex:s.rowIndex})}},Lpe=class extends We{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,n,s){o0(this.beans.expressionSvc,void 0,e.cellClassRules,t,n,s),this.processStaticCellClasses(e,t,n)}getStaticCellClasses(e,t){const{cellClass:n}=e;if(!n)return[];let s;return typeof n=="function"?s=n(t):s=n,typeof s=="string"&&(s=[s]),s||[]}createCellCustomStyleFeature(e,t){return new Npe(e,t)}processStaticCellClasses(e,t,n){this.getStaticCellClasses(e,t).forEach(o=>{n(o)})}},Vpe={moduleName:"CellStyle",version:ut,beans:[Lpe]},Bpe={moduleName:"RowStyle",version:ut,beans:[Rle]};function $pe(e,t){var n;return!!((n=e.colHover)!=null&&n.isHovered(t))}var Hpe=class extends We{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=n=>{const{beans:s,gos:o,element:i,columns:r}=this,a=s.colHover;if(n??!!o.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(i,{mouseover:a.setMouseOver.bind(a,r),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}},Gpe="ag-column-hover",Upe=class extends We{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 s=()=>{const o=this.isHovered(n);t.toggleCss("ag-column-hover",o)};e.addManagedEventListeners({columnHoverChanged:s}),s()}onCellColumnHover(e,t){if(!t)return;const n=this.isHovered(e);t.toggleCss(Gpe,n)}addHeaderFilterColumnHoverListener(e,t,n,s){this.createHoverFeature(e,[n],s);const o=()=>{const i=this.isHovered(n);t.toggleCss("ag-column-hover",i)};e.addManagedEventListeners({columnHoverChanged:o}),o()}createHoverFeature(e,t,n){e.createManagedBean(new Hpe(t,n))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},Wpe={moduleName:"ColumnHover",version:ut,beans:[Upe],apiFunctions:{isColumnHovered:$pe}},zpe=class extends We{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 i;const n=((i=this.wrapSvc)==null?void 0:i.wrap(e,t))??t,s=!Vv.has(e),o=s?this.asyncListeners:this.syncListeners;o.has(e)||o.set(e,new Set),o.get(e).add(n),this.eventSvc.addListener(e,n,s)}removeListener(e,t){var i,r;const n=((i=this.wrapSvc)==null?void 0:i.unwrap(e,t))??t,s=this.asyncListeners.get(e),o=!!(s!=null&&s.delete(n));o||(r=this.syncListeners.get(e))==null||r.delete(n),this.eventSvc.removeListener(e,n,o)}addGlobalListener(e){var i;const t=((i=this.wrapSvc)==null?void 0:i.wrapGlobal(e))??e,n=(r,a)=>{Vv.has(r)&&t(r,a)},s=(r,a)=>{Vv.has(r)||t(r,a)};this.globalListenerPairs.set(e,{syncListener:n,asyncListener:s});const o=this.eventSvc;o.addGlobalListener(n,!1),o.addGlobalListener(s,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:n,globalListenerPairs:s}=this,o=(n==null?void 0:n.unwrapGlobal(e))??e;if(s.has(o)){const{syncListener:r,asyncListener:a}=s.get(o);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!0),s.delete(e)}else this.syncGlobalListeners.delete(o),t.removeGlobalListener(o,!1)}destroyEventListeners(e,t){e.forEach((n,s)=>{n.forEach(o=>this.eventSvc.removeListener(s,o,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:s})=>{t.removeGlobalListener(n,!1),t.removeGlobalListener(s,!0)}),e.clear()}};function jpe(e,t,n){var s;(s=e.apiEventSvc)==null||s.addListener(t,n)}function Kpe(e,t,n){var s;(s=e.apiEventSvc)==null||s.removeListener(t,n)}function qpe(e,t){var n;(n=e.apiEventSvc)==null||n.addGlobalListener(t)}function Ype(e,t){var n;(n=e.apiEventSvc)==null||n.removeGlobalListener(t)}var Zpe={moduleName:"EventApi",version:ut,apiFunctions:{addEventListener:jpe,addGlobalListener:qpe,removeEventListener:Kpe,removeGlobalListener:Ype},beans:[zpe]},Xpe={moduleName:"Locale",version:ut,beans:[Due]},Jpe=class extends We{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=As(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:s}=this.beans,o=e.autoHeightCols;let i=!1;const r=d=>{var p;const h=d.__autoHeights;let f=Ka(this.beans,d).height;for(const g of o){let v=h==null?void 0:h[g.getColId()];const C=n==null?void 0:n.getCellSpan(g,d);if(C){if(C.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),i=!0)};(a=s==null?void 0:s.forEachPinnedRow)==null||a.call(s,"top",r),(l=s==null?void 0:s.forEachPinnedRow)==null||l.call(s,"bottom",r),(u=t.forEachDisplayedNode)==null||u.call(t,r),i&&((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 s=e.__autoHeights[n.getId()];e.__autoHeights[n.getId()]=t,s!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:n,colViewport:s,visibleCols:o}=this.beans;if(!n.colSpanActive)return!1;let i=[];switch(e.getPinned()){case"left":i=o.getLeftColsForRow(t);break;case"right":i=o.getRightColsForRow(t);break;case null:i=s.getColsWithinViewport(t);break}return!i.includes(e)}setupCellAutoHeight(e,t,n){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const s=t.parentElement,{rowNode:o,column:i}=e,r=this.beans,a=c=>{var S;if((S=this.beans.editSvc)!=null&&S.isEditing(e)||!e.isAlive()||!n.isAlive())return;const{paddingTop:d,paddingBottom:h,borderBottomWidth:f,borderTopWidth:p}=ru(s),g=d+h+f+p,C=t.offsetHeight+g;if(c<5){const b=Rs(r),w=!(b!=null&&b.contains(t)),_=C==0;if(w||_){window.setTimeout(()=>a(c+1),0);return}}this.setRowAutoHeight(o,C,i)},l=()=>a(0);l();const u=Wa(r,t,l);return n.addDestroyFunc(()=>{u(),this.setRowAutoHeight(o,void 0,i)}),!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(o=>o.isAutoHeight())),t.length!==0){if(!n.__autoHeights)return!1;for(const s of t){const o=n.__autoHeights[s.getColId()];if(!o||n.rowHeight<o)return!1}}return!0}},Qpe={moduleName:"RowAutoHeight",version:ut,beans:[Jpe]},ege={moduleName:"AllCommunity",version:ut,dependsOn:[eV,rfe,mfe,Wue,ehe,the,nhe,she,ohe,ihe,rhe,Qde,jce,Kce,qce,zce,Zce,Xce,Afe,Phe,Xfe,ON,ape,lpe,mpe,bpe,Boe,Ipe,bhe,aue,Vpe,Wpe,Bpe,Zpe,cue,Dfe,ML,Xpe,Qpe,Voe,Qhe,Mpe]};const tge=rt({__name:"StatusUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{},disabled:{type:Boolean}},emits:["updated","update-start","update-completed","update-failed"],setup(e,{emit:t}){const n=e,s=Y(()=>{const h=Yn();return h==null?void 0:h.appContext.config.globalProperties.apiServices}),o=t,i=B(!1),r=B(null),a=h=>{i.value=!1,o("updated",h)},l=Y(()=>({apiServices:s.value,ids:n.ids,workspaceId:n.workspaceId,entityId:n.entityId}));Zi("bulkUpdate",!0);const u=(h,f)=>{console.trace("Status update button setLoading called with value:",h,"hide:",f),i.value=h,o(h?"update-start":"update-completed"),setTimeout(()=>{var p,g;f?(p=r.value)==null||p.hide():(g=r.value)==null||g.open()},300)},c=B(null),d=(h,f)=>{var p;h&&((p=c.value)==null||p.focus())};return(h,f)=>(j(),qe(sf,{ref_key:"wrapperRef",ref:r,isUpdating:i.value,disabled:n.disabled||i.value,onOnVisibleChange:d},{trigger:me(({hide:p,disabled:g})=>[ge(mt,{variant:n.variant,loading:i.value,disabled:g,onEscape:p},{default:me(()=>[ge(lt,{src:"Square",class:"icon"}),f[3]||(f[3]=tt(" Status ",-1))]),_:1},8,["variant","loading","disabled","onEscape"])]),popup:me(({hide:p,isVisible:g})=>[Ke(ge(Bk,nn({disabled:i.value,ref_key:"statusRef",ref:c},l.value,{onUpdated:a,onCancel:p,onStartUpdate:f[0]||(f[0]=v=>u(!0,!0)),onFinishUpdate:f[1]||(f[1]=v=>u(!1,!0)),onError:f[2]||(f[2]=()=>{u(!1,!1)}),callback:()=>u(!1,!0)}),null,16,["disabled","onCancel","callback"]),[[Do,g]])]),default:me(()=>[f[4]||(f[4]=tt(" > ",-1))]),_:1},8,["isUpdating","disabled"]))}}),rV=_t(rt({name:"MoreOptionEditor",__name:"MoreOptionEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},optionBlock:{},isSubmenu:{type:Boolean,default:!1},layer:{default:0},focusableIndex:{}},emits:["actionExecuted"],setup(e,{expose:t,emit:n}){const s=Ur,o=e,i=Y(()=>(o==null?void 0:o.workspaceId)||""),r=Y(()=>(o==null?void 0:o.entityId)||""),a=()=>{var O,$,q;return(q=(O=o.params)==null?void 0:O.api)==null?void 0:q.getCellRendererInstances({columns:["options"],rowNodes:($=o.params)!=null&&$.node?[o.params.node]:[]})[0]},l=()=>{var $,q,J,ee;const O=a();(q=($=O==null?void 0:O.componsenExposed)==null?void 0:$.blur)==null||q.call($),(ee=(J=O==null?void 0:O.container)==null?void 0:J.parentElement)==null||ee.classList.remove("ag-cell-focus")},u=()=>{var q,J,ee;(J=(q=o.params)==null?void 0:q.api)==null||J.stopEditing(),l();const O=`scene-name-${o.id}`,$=document.getElementById(O);(ee=$==null?void 0:$.__sceneNameEditor)==null||ee.startEdit()},{apiServices:c}=ts(!0,o),d=Y(()=>{var O;return{ws_code:i.value,entity_id:r.value,scene_id:o.id,axiosService:c,optionBlock:o.optionBlock,permissions:(O=o.data)==null?void 0:O.permissions}}),h=O=>{var q,J,ee,X,ve,te;let $=(J=(q=o.params)==null?void 0:q.api)==null?void 0:J.getRowNode(String(o.id));if($){const N={...$.data,isDeleted:O==="deleted",isArchived:O==="archived"?!0:$.data.isArchived,isLocked:O==="locked"?!0:$.data.isLocked,disabled:!1};O=="deleted"&&(N.isLocked=!1,N.disabled=!0),O=="unarchived"&&(N.isArchived=!1),(X=(ee=o.params)==null?void 0:ee.api)==null||X.redrawRows({rowNodes:[$]}),$.setData(N),(te=(ve=o.params)==null?void 0:ve.api)==null||te.redrawRows({rowNodes:[$]})}},f=tf(),{openSceneHub:p}=f,g=()=>{Ct(()=>{var q,J,ee,X,ve,te;const O=((J=(q=o.params)==null?void 0:q.node)==null?void 0:J.rowIndex)||0,$=((X=(ee=o.params)==null?void 0:ee.column)==null?void 0:X.getColId())||"";(te=(ve=o.params)==null?void 0:ve.api)==null||te.setFocusedCell(O,$)})};Y(()=>{var $,q;const O=(q=($=o.params)==null?void 0:$.api)==null?void 0:q.getRowNode(String(o.id));return O==null?void 0:O.data});const{options:v}=pY(d,h,u,p,g),C=n,S=()=>{var O,$,q,J,ee,X;console.trace("Focusing current cell for row:",o.id),(X=(O=o.params)==null?void 0:O.api)==null||X.setFocusedCell(((q=($=o.params)==null?void 0:$.node)==null?void 0:q.rowIndex)||0,((ee=(J=o.params)==null?void 0:J.column)==null?void 0:ee.getColId())||"")},b=Y(()=>{var O;return(O=o.params)==null?void 0:O.api}),w=(O,$)=>{var q,J,ee,X,ve,te,N,V;if(C("actionExecuted",O),O.id=="copy-link"){(ve=b.value)==null||ve.startEditingCell({rowIndex:(J=(q=o.params)==null?void 0:q.node)==null?void 0:J.rowIndex,colKey:(X=(ee=o.params)==null?void 0:ee.column)==null?void 0:X.getColId()});return}else{if(O.id!=="copy-link"&&((te=b.value)==null||te.stopEditing()),O.id==="rename")(N=b.value)==null||N.stopEditing(),(V=b.value)==null||V.clearFocusedCell(),l();else if(O.id==="copy-link"){const ne=document.getElementById($);setTimeout(()=>{var ie,pe,ae;(ae=(pe=(ie=ne==null?void 0:ne.__vueParentComponent)==null?void 0:ie.exposed)==null?void 0:pe.focus)==null||ae.call(pe)},300)}else if(["delete-rendition","delete-thumbnail"].includes(O.id)){setTimeout(()=>{S()},300);return}setTimeout(()=>{var ne,ie;(ie=(ne=o.params)==null?void 0:ne.api)==null||ie.clearFocusedCell()},300)}},_=()=>{var O,$;($=(O=o.params)==null?void 0:O.api)==null||$.stopEditing()},R=O=>{var $,q,J,ee;return O==="archive"?!((q=($=o.params)==null?void 0:$.data)!=null&&q.isArchived):O==="unarchive"?(ee=(J=o.params)==null?void 0:J.data)==null?void 0:ee.isArchived:!0},T=Y(()=>v.value.map(O=>({...O,options:O.options.filter($=>!$.hide&&R($.id))})).filter(O=>O.options.length>0)),I=B({}),x=B(null),P=Y(()=>{var $,q;if(o.focusableIndex)return o.focusableIndex;const O=(q=($=o.params)==null?void 0:$.api)==null?void 0:q.getRowNode(String(o.id));return`${((O==null?void 0:O.rowIndex)??0)+10}`}),D=(O,$)=>`${P.value}.${O*10+$}`,F=(O,$)=>{if($&&"focus"in $){I.value[O]=$;return}delete I.value[O]},k=O=>{O.preventDefault(),O.stopPropagation(),O.stopImmediatePropagation()};return tn(()=>{var O;(O=x.value)==null||O.focus()}),t({focus(){var q;const O=`${P.value}.0`,$=I.value[O];$&&$.focus?$.focus():(q=x.value)==null||q.focus()}}),(O,$)=>Ke((j(),ce("div",{onKeydown:k,class:Q([O.$style["more-option-section"],{[O.$style.submenu]:e.isSubmenu}]),ref_key:"wrapperRef",ref:x,tabindex:"0",role:"menu"},[(j(!0),ce(xt,null,xn(T.value,(q,J)=>(j(),ce("div",{key:q.id,style:dn({"--g-number":Math.min(q.options.length,4),"--g-size":q.type==="column"?"36px":"auto"}),class:Q([O.$style["option-block"],O.$style[q.type]])},[(j(!0),ce(xt,null,xn(q.options,(ee,X)=>(j(),ce("div",{key:ee.id,class:Q(O.$style["option-item"])},[ge(sge,{layer:o.layer,"scene-id":String(o.id),option:ee,type:q.type,onActionExecuted:ve=>w(ve,`more-action-${ve.id}-${o.id}`),focusableIndex:D(J,X),ref_for:!0,ref:ve=>F(D(J,X),ve),onHandleHide:_,id:`more-action-${ee.id}-${o.id}`,label:ee.label},null,8,["layer","scene-id","option","type","onActionExecuted","focusableIndex","id","label"])],2))),128))],6))),128))],34)),[[U(s),P.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"}}]]),nge={key:0,style:{height:"20px",width:"20px",display:"flex","align-items":"center","justify-content":"center"}},sge=_t(rt({__name:"MoreOptionItem",props:{option:{},sceneId:{},type:{},layer:{},focusableIndex:{}},emits:["actionExecuted","handleHide"],setup(e,{expose:t,emit:n}){const s=Ur,o=Xt,i=e,r=B(!1),a=B(!1),l=(I,x)=>{if(!x){p();return}const P=x.target;P.closest(".tippy-content")||P.closest(".tippy-box")||P.closest("[data-tippy-root]")||P.closest(".option-item")||p()},u=B(null),{triggerRef:c,popupRef:d,show:h,isVisible:f,hide:p}=Fs({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 I=>{var x,P;if(!a.value){a.value=!0;try{await((P=(x=i.option).action)==null?void 0:P.call(x,I)),g("actionExecuted",i.option)}catch(D){console.error("Action execution failed:",D)}finally{a.value=!1,r.value=!1}}},C=async I=>{var x,P;if(I.preventDefault(),I.stopPropagation(),!a.value){if(i.option.isDanger){r.value=!r.value;return}if(i.option.subMenu)h();else{a.value=!0;try{await((P=(x=i.option).action)==null?void 0:P.call(x,I)),g("actionExecuted",i.option)}catch(D){console.error("Action execution failed:",D)}finally{a.value=!1}return}}},S=I=>{g("actionExecuted",I),p()},b=I=>{I.key==="Escape"&&p()},w=I=>({row:"small",column:"medium",block:"small"})[I]||"medium",_=I=>{const x=i.option.isDanger?["danger","tertiary"]:[];return{row:["secondary","icon",...x],column:["menu-item",...x],block:["secondary",...x]}[I]||[]},R=()=>{r.value?r.value=!1:f.value?p():g("handleHide")};t({focus:()=>{Ct(()=>{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:()=>{C(new MouseEvent("click"))}});const T=I=>{var x;I.stopPropagation(),I.preventDefault(),r.value=!1,(x=c.value)==null||x.focus()};return(I,x)=>{var P;return Ke((j(),ce("div",{ref_key:"wrapperRef",ref:u,class:Q(I.$style["option-item-wrapper"]),style:{width:"100%",overflow:"visible"},onClick:Pt(C,["stop","prevent"])},[Ke((j(),qe(mt,{ref_key:"triggerRef",ref:c,class:Q(I.$style["option-item"]),disabled:e.option.disabled||a.value,actived:U(f)||r.value,size:w(e.type),variant:_(e.type),onClick:Pt(C,["stop","prevent"]),onKeydown:b,onEscape:R,label:e.option.label},{prefix:me(()=>[e.option.icon?(j(),ce("div",nge,[ge(lt,{size:"14",src:e.option.icon,color:e.option.isDanger?void 0:"#a6a6a6",source:"remote"},null,8,["src","color"])])):Je("",!0)]),suffix:me(()=>[e.option.subMenu?(j(),qe(lt,{key:0,src:"Play",source:"remote"})):Je("",!0),e.option.isDanger&&r.value?(j(),ce("div",{key:1,class:Q(I.$style["confirm-action"])},[Ke((j(),qe(mt,{variant:["tertiary","icon","danger"],size:"small",onHandleClick:T},{default:me(()=>[ge(lt,{src:"XMarkSolid",source:"remote"})]),_:1})),[[U(s),`${i.focusableIndex}.0`],[U(o),{content:"Cancel ",delay:[300,0],contentClass:["extra-padding"]}]]),Ke((j(),qe(mt,{variant:["danger","primary","icon"],size:"small",onClick:Pt(v,["stop","prevent"]),onEscape:x[0]||(x[0]=D=>r.value=!1)},{default:me(()=>[ge(lt,{src:"Check",source:"remote"})]),_:1})),[[U(s),`${i.focusableIndex}.1`],[U(o),{delay:[300,0],contentClass:["extra-padding"],content:"Confirm ",theme:"warning"}]])],2)):Je("",!0)]),_:1},8,["class","disabled","actived","size","variant","label"])),[[U(s),i.focusableIndex]]),e.option.subMenu?(j(),ce("div",{key:0,ref_key:"popupRef",ref:d,class:Q(I.$style["submenu-container"])},[ge(rV,{focusableIndex:i.focusableIndex,layer:i.layer+1,ref:"submenuRef","option-block":[((P=e.option)==null?void 0:P.subMenu)||[]],"is-submenu":!1,onActionExecuted:S},null,8,["focusableIndex","layer","option-block"])],2)):Je("",!0)],2)),[[U(o),{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"}}]]),oge={style:{"max-width":"225px","line-height":"14px"}},ige={style:{"max-width":"100px","line-height":"14px"}},rge=_t(rt({__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"],setup(e,{emit:t}){const n=Xt,s=Ur,o=e,i=t,r=Wm(),{handelSelectAll:a}=r,{selectionStatus:l}=Qs(r),u=Y(()=>l.value===Ht.CHECKED),c=Y(()=>o.selectRowData.map(ie=>ie.id)),d=Y(()=>o.selectRowData.length>0);Zi("bulkUpdate",d),Zi("isSelectAll",u);const h=({itemIds:ie,data:pe})=>{const ae=o.gridApi;ie.forEach(re=>{if(!ae){console.error("Grid API is undefined");return}const W=ae.getRowNode(re);if(W){const fe={...W.data,status:pe};W.setData(fe)}})},f=Y(()=>o.selectRowData),p=({itemIds:ie,data:pe})=>{const ae=o.gridApi;if(!ae){console.error("Grid API is undefined");return}ie.forEach(re=>{const W=ae.getRowNode(re);if(W){const fe=W.data.dateRange||[null,null];"startDate"in pe&&pe.startDate!==void 0&&(fe[0]=pe.startDate?new Date(pe.startDate):null),"dueDate"in pe&&pe.dueDate!==void 0&&(fe[1]=pe.dueDate?new Date(pe.dueDate):null);const oe={...W.data,dateRange:fe};W.setData(oe)}}),i("updated")},g=Y(()=>o.selectRowData.map(ie=>ie.id)),v=ie=>{const pe=o.gridApi,{id:ae,value:re}=ie;if(!pe){console.error("Grid API is undefined");return}g.value.forEach(W=>{const fe=pe.getRowNode(W);if(fe){const oe={...fe.data,[`metric_${ae}`]:re};fe.setData(oe)}}),i("updated")},C=["primary"],S=[{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}],b=()=>{i("unselect")},w=Qb(),{userPermissions:_}=Qs(w),R=Y(()=>_.value.includes(eS)),T=()=>{const ie=o.selectRowData.map(ae=>ae.id).join(","),pe=Ao({type:"review_multiple_scenes",config:{reviewDomain:_n.getInstance().getItem("BASE_REVIEW_URL"),ws_code:o.workspaceId,scene_ids:ie}}).url;window.open(pe,"_blank")},I=ie=>{console.log("Updating assignees with params:",ie);const{assignees:pe,type:ae}=ie,re=o.gridApi;if(!re){console.error("Grid API is not available for bulk update.");return}o.selectRowData.map(fe=>{const oe=re.getRowNode(fe.id);if(!oe)return null;const Ie=oe.data.assignees||[];let G=[];switch(ae){case"add":{const Z=new Set(Ie.map(ke=>ke.id)),de=pe.filter(ke=>!Z.has(ke.id));G=[...Ie,...de];break}case"overwrite":{G=pe;break}case"remove":{const Z=new Set(pe.map(de=>de.id));G=Ie.filter(de=>!Z.has(de.id));break}case"removeAll":{G=[];break}}return{...oe.data,assignees:G}}).filter(fe=>fe!==null).forEach(fe=>{const oe=re.getRowNode(fe.id);oe&&oe.setData(fe)})},{apiServices:x}=ts(!1,o),P=async()=>{var re;const ie=o.selectRowData.map(W=>W.id),pe=o.gridApi;if(!pe){console.error("Grid API is not available for bulk delete.");return}const ae=await((re=x.value)==null?void 0:re.bulkDeleteItems(O.value));(ae==null?void 0:ae.message)=="Done"&&(ie.forEach(W=>{const fe=pe.getRowNode(W);if(fe){const oe={...fe.data,isDeleted:!0,disabled:!0};fe.setData(oe)}}),pe.deselectAll())},D=B(null),F=async()=>{var re,W,fe;const ie=o.selectRowData.map(oe=>oe.id);if(!o.gridApi){console.error("Grid API is not available for bulk unarchive.");return}const ae=await((re=x.value)==null?void 0:re.bulkUnarchiveItems(O.value));if((ae==null?void 0:ae.message)!="Done"){console.error("Failed to unarchive items."),(W=D.value)==null||W.open();return}q(ie,"isArchived",!1),(fe=D.value)==null||fe.hide()},k=En("filterParams",void 0),O=Y(()=>({workspaceId:String(o.workspaceId),itemIds:d.value&&u.value?[]:o.selectRowData.map(ie=>ie.id),entityId:o.entityId,filterParams:k!=null&&k.value?k.value:void 0})),$=async()=>{var re,W,fe;const ie=o.selectRowData.map(oe=>oe.id);if(!o.gridApi){console.error("Grid API is not available for bulk archive.");return}const ae=await((re=x.value)==null?void 0:re.bulkArchiveItems(O.value));if((ae==null?void 0:ae.message)!="Done"){console.error("Failed to archive items."),(W=D.value)==null||W.open();return}q(ie,"isArchived",!0),(fe=D.value)==null||fe.hide()},q=(ie,pe,ae)=>{const re=o.gridApi;if(!re){console.error("Grid API is not available for bulk update.");return}const W=ie.map(fe=>{const oe=re.getRowNode(fe);if(oe){const Ie={...oe.data,[pe]:ae};oe.setData(Ie)}return oe}).filter(fe=>fe!=null);console.log("Updated row nodes:",{idsToUpdate:ie,rowNodes:W}),re.redrawRows({rowNodes:W})},J=async()=>{var re,W,fe;const ie=o.selectRowData.map(oe=>oe.id),pe=o.gridApi;if(!pe){console.error("Grid API is not available for bulk thumbnail deletion.");return}const ae=await((re=x.value)==null?void 0:re.deleteThumbnail(O.value));if((ae==null?void 0:ae.message)!="Done"){console.error("Failed to delete thumbnails."),(W=D.value)==null||W.open();return}ie.forEach(oe=>{const Ie=pe.getRowNode(oe);if(Ie){const G={...Ie.data,thumbnail:null};Ie.setData(G)}}),(fe=D.value)==null||fe.hide()},ee=async()=>{var re,W,fe;const ie=o.selectRowData.map(oe=>oe.id),pe=o.gridApi;if(!pe){console.error("Grid API is not available for bulk rendition deletion.");return}const ae=await((re=x.value)==null?void 0:re.deleteRendition(O.value));if((ae==null?void 0:ae.message)!="Done"){console.error("Failed to delete renditions."),(W=D.value)==null||W.open();return}ie.forEach(oe=>{const Ie=pe.getRowNode(oe);if(Ie){const G={...Ie.data,rendition:null};Ie.setData(G)}}),(fe=D.value)==null||fe.hide()},X=B(!1),ve=B(null),te=async ie=>{var pe,ae;try{switch(V.value=!0,X.value=!0,ie.id){case"unarchive":await F();break;case"delete":await P();break;case"archive":await $();break;case"delete-thumbnail":await J();break;case"delete-rendition":await ee();break;default:console.error("Unknown action:",ie.id),X.value=!1;break}}catch(re){console.error("Error performing action:",re),(pe=D.value)==null||pe.open()}finally{(ae=ve.value)==null||ae.focus(),Ct(()=>{V.value=!1,X.value=!1})}},N=(ie,pe)=>{var ae;!ie&&pe&&((ae=ve.value)==null||ae.focus())},V=B(!0),ne=ie=>{Ct(()=>{V.value=ie})};return nt(()=>o.selectRowData,ie=>{V.value=!1},{deep:!0,immediate:!0}),(ie,pe)=>Ke((j(),ce("div",{class:Q(ie.$style["bulk-update-action"])},[Ee("div",{class:Q(ie.$style["left-actions"])},[Ee("div",{class:Q(ie.$style["selection-track"])},[ge(mt,{class:Q(ie.$style["btn-close"]),variant:["tertiary","icon"],onClick:b,style:{background:"transparent"}},{prefix:me(()=>[ge(lt,{src:"XMarkSolid",source:"remote"})]),_:1},8,["class"]),U(l)==U(Ht).INDETERMINATE?(j(),ce("span",{key:0,class:Q(ie.$style["selected-count"])},wt(e.selectRowData.length)+" selected ",3)):Je("",!0),U(l)==U(Ht).CHECKED?(j(),ce("span",{key:1,class:Q(ie.$style["selected-count"]),style:{"line-height":"14px"}},[pe[12]||(pe[12]=tt(' All in " ',-1)),Ke((j(),ce("span",oge,[tt(wt(e.takeName),1)])),[[U(n),{content:e.takeName}]]),pe[13]||(pe[13]=tt(' " ',-1))],2)):Je("",!0),!e.loading&&U(l)==U(Ht).INDETERMINATE&&e.totalRows>e.selectRowData.length&&e.selectRowData.length==e.visibleRows?(j(),qe(mt,{key:2,variant:"secondary",onHandleClick:U(a)},{default:me(()=>[Ee("span",{class:Q(ie.$style["selected-count"]),style:{"line-height":"14px"}},[pe[14]||(pe[14]=tt(' Select all in " ',-1)),Ke((j(),ce("span",ige,[tt(wt(e.takeName),1)])),[[U(n),{content:e.takeName}]]),pe[15]||(pe[15]=tt(' " ',-1))],2)]),_:1},8,["onHandleClick"])):Je("",!0),Ee("span",{class:Q(ie.$style.divider)},null,2)],2),ge(tge,{ids:c.value,"workspace-id":e.workspaceId,"entity-id":e.entityId,variant:C,disabled:V.value,onUpdated:h,onUpdateStart:pe[0]||(pe[0]=ae=>V.value=!0),onUpdateCompleted:pe[1]||(pe[1]=ae=>ne(!1)),onUpdateFailed:pe[2]||(pe[2]=ae=>ne(!1))},null,8,["ids","workspace-id","entity-id","disabled"]),ge(VY,{disabled:V.value,onUpdate:I,onUpdateStart:pe[3]||(pe[3]=ae=>V.value=!0),onUpdateCompleted:pe[4]||(pe[4]=ae=>ne(!1)),onUpdateFailed:pe[5]||(pe[5]=ae=>ne(!1)),ids:c.value,"workspace-id":e.workspaceId,variant:C,"entity-id":e.entityId},null,8,["disabled","ids","workspace-id","entity-id"]),ge(XY,{ids:c.value,disabled:V.value,"workspace-id":e.workspaceId,"entity-id":e.entityId,variant:C,"row-selected":f.value,onUpdated:p,onUpdateStart:pe[6]||(pe[6]=ae=>V.value=!0),onUpdateCompleted:pe[7]||(pe[7]=ae=>ne(!1)),onUpdateFailed:pe[8]||(pe[8]=ae=>ne(!1))},null,8,["ids","disabled","workspace-id","entity-id","row-selected"]),ge(WX,{disabled:V.value,onUpdate:v,onUpdateStart:pe[9]||(pe[9]=ae=>V.value=!0),onUpdateCompleted:pe[10]||(pe[10]=ae=>ne(!1)),onUpdateFailed:pe[11]||(pe[11]=ae=>ne(!1)),selectedIds:c.value,"workspace-id":e.workspaceId,variant:C,"entity-id":e.entityId},null,8,["disabled","selectedIds","workspace-id","entity-id"]),Ee("span",{class:Q(ie.$style.divider)},null,2),Ke((j(),ce("div",null,[R.value?(j(),qe(mt,{key:0,class:Q(ie.$style["action-button"]),variant:[...C,"icon"],onClick:T,disabled:o.selectRowData.length>40},{default:me(()=>[ge(lt,{src:"PenRuler",class:Q(ie.$style["icon-btn"])},null,8,["class"])]),_:1},8,["class","variant","disabled"])):Je("",!0)])),[[U(n),o.selectRowData.length<=40?"Open in Review":"Select fewer than 40 items to open in Review"]]),Ee("span",{class:Q(ie.$style.divider)},null,2),ge(sf,{ref_key:"wrapperRef",ref:D,isUpdating:V.value,disabled:V.value,onOnVisibleChange:N},{trigger:me(({hide:ae,toggle:re,isVisible:W,disabled:fe})=>[Ke((j(),qe(mt,{onEscape:ae,actived:W,ref_key:"moreActionRef",ref:ve,class:Q(ie.$style["action-button"]),variant:["secondary","icon"],loading:X.value,disabled:fe||V.value,onClick:Pt(re,["stop"])},{default:me(()=>[ge(lt,{src:"EllipsisVertical",class:Q(ie.$style.icon),source:"remote"},null,8,["class"])]),_:1},8,["onEscape","actived","class","loading","disabled","onClick"])),[[U(s),"99999"],[U(n),{content:"More actions"}]])]),popup:me(({isVisible:ae,hide:re})=>[(j(),ce(xt,null,xn(S,(W,fe)=>ge(eu,nn({clickable:!0,key:W.id},{ref_for:!0},W,{show:ae,style:{borderLeft:0},"focus-index":"99999."+fe,onClick:()=>{te(W)},onEscape:re}),null,16,["show","focus-index","onClick","onEscape"])),64))]),_:1},8,["isUpdating","disabled"])],2)],2)),[[Do,e.selectRowData.length>0]])}}),[["__cssModules",{$style:{"bulk-update-action":"_bulk-update-action_1c92i_1","left-actions":"_left-actions_1c92i_19","right-actions":"_right-actions_1c92i_20","selection-track":"_selection-track_1c92i_25","btn-close":"_btn-close_1c92i_31","close-icon":"_close-icon_1c92i_37","selected-count":"_selected-count_1c92i_41",divider:"_divider_1c92i_47","more-button":"_more-button_1c92i_52",dropdown:"_dropdown_1c92i_56","dropdown-content":"_dropdown-content_1c92i_59",delete:"_delete_1c92i_82","icon-btn":"_icon-btn_1c92i_89","selected-list":"_selected-list_1c92i_93"}}]]),il=_t(rt({name:"LabelRenderer",__name:"LabelRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=To,n=Xt,s=e,o=Y(()=>({disabled:s.disabled,error:!1,readOnly:s.readOnly,isEmpty:s.value===void 0||s.value===null||s.value==="",clickable:!0})),{argsMain:i}=ws(o),r=Y(()=>{var u,c,d;return!!((u=s.params)!=null&&u.api||(c=s.params)!=null&&c.node||(d=s.params)!=null&&d.context)}),a=Y(()=>{if(s.tooltip){if(typeof s.tooltip=="string")return{content:s.tooltip};if(typeof s.tooltip=="object"&&"display_name"in s.tooltip){const u=s.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=ge(Ih,{id:u.id,name:u.display_name,profile_image:u.profile_image,size:20,initial:u.initial,color:u.color});Yw(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}}}return{content:void 0}}),l=Y(()=>s.value===void 0);return(u,c)=>Ke((j(),qe(Cs,iR(Lw(U(i))),{default:me(()=>[Ee("span",{class:Q(u.$style["item-table-label-renderer"])},wt(s.value||"-"),3)]),_:1},16)),[[U(t),{isLoading:l.value||!r.value}],[U(n),a.value]])}}),[["__cssModules",{$style:{"item-table-label-renderer":"_item-table-label-renderer_s1gdy_1"}}]]),age=["placeholder","maxlength"],lge={key:0,class:"wrapper-suffix"},uge=_t(rt({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 s=To,o=Xt,i=e,r=n,a=B(i.value),l=B(null),u=B(null),c=B(i.value||""),d=B(!1),h=B(!1),f=Y(()=>{var F;return{disabled:i.disabled,error:!1,readOnly:i.readOnly,isEmpty:((F=i.value)==null?void 0:F.length)===0,inputRef:l,wrapperRef:u,clickable:!0,focused:d.value||i.keyboardFocusing}}),{argsMain:p,isHover:g}=ws(f),v=F=>{const k=document.createElement("div");return k.textContent=F,k.innerHTML},C=()=>c.value!==a.value,S=()=>{h.value=!0,d.value=!1,c.value=a.value,r("update:value",a.value),setTimeout(()=>{h.value=!1},100)},b=()=>{if(!d.value||!l.value)return;const F=v(l.value.value);if(!C()){d.value=!1;return}a.value=F,r("update:value",F),r("enter",F),d.value=!1},w=()=>{h.value||(i.saveOnBlur?b():S(),r("blur",c.value))},_=F=>{var k;if(F.key==="ArrowLeft"||F.key==="ArrowRight"){F.stopPropagation();return}F.ctrlKey&&(F.key=="a"||F.key=="A")?(F.stopPropagation(),(k=l.value)==null||k.select()):F.key==="Enter"?(F.preventDefault(),F.stopPropagation(),b()):F.key==="Escape"&&(F.preventDefault(),F.stopPropagation(),S())},R=()=>{a.value=i.value,c.value=i.value,d.value=!0,Ct(()=>{var F,k;(F=l.value)==null||F.click(),(k=l.value)==null||k.focus()})},T=()=>{var F;d.value?S():(F=l.value)==null||F.blur(),r("blur",c.value)},I={focus:()=>{R()}};tn(()=>{var k;const F=(k=u.value)==null?void 0:k.$el;F&&(F.__sceneNameEditor=I)}),vs(()=>{const F=u.value;F&&delete F.__sceneNameEditor});const x=B(null),P=B(null);t({focus:R,blur:()=>{var F;return(F=l.value)==null?void 0:F.blur()},save:b,cancel:S,focusEditButton:()=>{Ct(()=>{var F;(F=x.value)==null||F.focus()})},focusCancelButton:()=>{Ct(()=>{var F;(F=P.value)==null||F.focus()})},startEdit:R});const D=Y(()=>i.value===void 0);return sS(u,()=>{d.value&&w()}),(F,k)=>Ke((j(),qe(U(Cs),nn(U(p),{ref_key:"wrapperRef",ref:u,bordered:i.bordered,style:{paddingTop:"0px",paddingBottom:"0px"}}),nh({default:me(()=>[d.value?Je("",!0):Tt(F.$slots,"default",{key:0,isEditting:d.value,isHover:U(g)},()=>[Ke((j(),ce("span",{class:Q(F.$style["label-renderer"])},[tt(wt(c.value),1)],2)),[[U(o),{content:c.value||void 0}]])]),Ke(Ee("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":k[0]||(k[0]=O=>c.value=O),class:Q(F.$style["label-editor"]),placeholder:e.placeholder,maxlength:e.maxLength,onKeydown:_,onBlur:w},null,42,age),[[Do,d.value],[ST,c.value]])]),_:2},[!e.disabled&&!e.readOnly?{name:"suffix",fn:me(({hovered:O,focused:$})=>[O?(j(),ce("div",lge,[O&&!$?Ke((j(),qe(mt,{key:0,variant:["icon","secondary"],size:24,onClick:Pt(R,["prevent","stop"]),tabindex:"0",ref_key:"editButtonRef",ref:x,onKeydown:[zn(Pt(R,["prevent","stop"]),["enter"]),zn(Pt(T,["prevent","stop"]),["escape"])]},{default:me(()=>[ge(U(lt),{src:"Pen",source:"remote"})]),_:1},8,["onKeydown"])),[[U(o),"Edit"]]):Je("",!0)])):Je("",!0)]),key:"0"}:void 0]),1040,["bordered"])),[[U(s),{isLoading:D.value}]])}}),[["__cssModules",{$style:{"label-renderer":"_label-renderer_cyzth_1","label-editor":"_label-editor_cyzth_10"}}]]),cge=["tabindex"],aV=_t(rt({name:"SceneNameEditor",__name:"SceneNameEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},placeholder:{default:"Enter name"}},emits:["update:value","enter","blur"],setup(e,{expose:t,emit:n}){const s=Xt,o=To,i=e,r=n,a=B(i.value),l=B(i.value),u=B(null),c=B(null),d=En("bulkUpdate",!1),{apiServices:h}=ts(!d,i),f=Y(()=>{var X;return{componentType:void 0,disabled:i.disabled,error:!1,readOnly:i.readOnly,isEmpty:((X=a==null?void 0:a.value)==null?void 0:X.length)===0,inputRef:u,wrapperRef:c,clickable:!0}}),{isFocus:p}=ws(f),g=Y(()=>{const X=_n.getInstance().getItem("ws.code"),ve=_n.getInstance().getItem("BASE_URL"),te=X||i.workspaceId;return Ao({type:"scene_hub",config:{baseDomain:ve,ws_code:te,scene_id:String(i.id)}}).url}),v=Y(()=>{var X,ve,te;return((ve=(X=i.data)==null?void 0:X.isProcessing)==null?void 0:ve.state)==0||((te=i.data)==null?void 0:te.isDeleted)==!0}),C=Y(()=>i.readOnly||R.value),S=Y(()=>{var X,ve,te,N,V;return((X=i.data)==null?void 0:X.isDeleted)==!0||((te=(ve=i.data)==null?void 0:ve.isProcessing)==null?void 0:te.state)==0||((V=(N=i.data)==null?void 0:N.isProcessing)==null?void 0:V.state)==1}),b=Y(()=>{var X,ve;return(ve=(X=i.data)==null?void 0:X.isProcessing)==null?void 0:ve.message}),w=Y(()=>{var X;return((X=i.data)==null?void 0:X.isArchived)==1}),_=Y(()=>{var X;return((X=i.data)==null?void 0:X.isLocked)==1}),R=Y(()=>i.value===void 0),T=async X=>{var ve,te,N,V,ne,ie,pe,ae,re,W;a.value=X,p.value=!1;try{const fe=await((te=(ve=h.value)==null?void 0:ve.updateSceneName)==null?void 0:te.call(ve,{workspaceId:i.workspaceId,entityId:i.entityId,itemId:i.id,name:a.value})),oe=MF.get(TF)||"UTC";if(fe){const Ie=PF(fe,oe),G={...i.data,...Ie};(N=i.params)==null||N.api.clearFocusedCell();const Z=((ne=(V=i.params)==null?void 0:V.column)==null?void 0:ne.getColId())||"",de=((pe=(ie=i.params)==null?void 0:ie.node)==null?void 0:pe.rowIndex)||0;(ae=i.params)==null||ae.api.setFocusedCell(de,Z),(W=(re=i.params)==null?void 0:re.node)==null||W.setData(G),l.value=a.value,r("enter")}else a.value=l.value}catch(fe){console.error("Failed to update scene name:",fe),a.value=l.value}},I={focus:()=>{p.value=!0,Ct(()=>{var X;return(X=c.value)==null?void 0:X.focus()})},startEdit:()=>{var X;(X=c.value)==null||X.startEdit()}},x=()=>c.value?"$el"in c.value?c.value.$el:c.value:null;nt(()=>i.value,X=>{a.value=X,l.value=X}),tn(()=>{const X=x();X&&(X.__sceneNameEditor=I)}),vs(()=>{const X=c.value,ve=X&&"$el"in X?X.$el:X;ve&&delete ve.__sceneNameEditor});const P=tf(),{openSceneHub:D}=P,F=X=>{try{if(X.ctrlKey||X.metaKey){window.open(g.value,"_blank");return}D(String(i.id))}catch{window.open(g.value,"_blank")}finally{J()}},k=()=>{setTimeout(()=>{ee.value=!0,O.value=0,Ct(()=>{var X;(X=$.value)==null||X.focus()})},300)},O=B(-1),$=B(null);t({focus:k,trigerFocus:k,startEdit:()=>{var X;(X=c.value)==null||X.startEdit()}});const q=X=>{if(X.key==="Enter"){X.preventDefault(),F(X);return}if(X.key==="Escape"){X.preventDefault(),J();return}X.key==="Tab"&&(X.preventDefault(),X.stopPropagation(),X.stopImmediatePropagation(),Ct(()=>{var ve;(ve=c.value)==null||ve.focusEditButton()}))},J=()=>{var te,N,V,ne,ie,pe;ee.value=!1,O.value=-1,(te=i.params)==null||te.api.clearFocusedCell();const X=((V=(N=i.params)==null?void 0:N.column)==null?void 0:V.getColId())||"",ve=((ie=(ne=i.params)==null?void 0:ne.node)==null?void 0:ie.rowIndex)||0;(pe=i.params)==null||pe.api.setFocusedCell(ve,X)},ee=B(!1);return(X,ve)=>Ke((j(),qe(uge,{"save-on-blur":!0,ref_key:"wrapperRef",ref:c,disabled:i.disabled,"read-only":C.value,placeholder:i.placeholder,value:a.value,"onUpdate:value":ve[0]||(ve[0]=te=>a.value=te),id:`scene-name-${i.id}`,onEnter:T,"max-length":255,bordered:!0,keyboardFocusing:ee.value,onBlur:J},{default:me(({isHover:te,isEditting:N})=>[Ke(Ee("div",{class:Q(X.$style["scene-name-display"])},[Ke((j(),ce("a",{tabindex:O.value,ref_key:"nameRef",ref:$,onClick:Pt(F,["prevent"]),onKeydown:q,target:"_blank",class:Q(X.$style["scene-name-text"]),style:{lineHeight:"28px"}},[tt(wt(a.value),1)],42,cge)),[[U(s),{content:a.value,delay:[1e3,0]}]]),C.value||!te&&!N&&!C.value?(j(),ce(xt,{key:0},[_.value?Ke((j(),ce("div",{key:0,class:Q([X.$style["icon-processing"],X.$style.isLocked])},[ge(lt,{src:"Lock"})],2)),[[U(s),{content:"Locked",delay:[1e3,0]}]]):Je("",!0),w.value?Ke((j(),ce("div",{key:1,class:Q([X.$style["icon-processing"],X.$style.archived])},[ge(lt,{src:"BoxArchive"})],2)),[[U(s),{content:"Archived",delay:[1e3,0]}]]):Je("",!0),S.value?Ke((j(),ce("div",{key:2,class:Q([X.$style["icon-processing"],X.$style.processing,v.value&&X.$style["icon-red"]])},[ge(lt,{src:"AnimatedHourglass",color:"inherit"})],2)),[[U(s),b.value]]):Je("",!0)],64)):Je("",!0)],2),[[Do,!U(p)]])]),_:1},8,["disabled","read-only","placeholder","value","id","keyboardFocusing"])),[[U(o),{isLoading:R.value}]])}}),[["__cssModules",{$style:{"scene-name-editor":"_scene-name-editor_1ws9s_1","scene-name-display":"_scene-name-display_1ws9s_11","icon-processing":"_icon-processing_1ws9s_18",archived:"_archived_1ws9s_28",locked:"_locked_1ws9s_31",processing:"_processing_1ws9s_34","icon-red":"_icon-red_1ws9s_38","scene-name-text":"_scene-name-text_1ws9s_43"}}]]),_0=_t(rt({__name:"ButtonDropdown",props:{label:{},value:{},variant:{},options:{default:()=>[]},size:{},placement:{default:"bottom"},disabled:{type:Boolean},readOnly:{type:Boolean},tabIndex:{}},emits:["select","handleClick"],setup(e,{expose:t,emit:n}){const s=Ur,o=B([]),i=e,r=B(null),a=Y(()=>typeof i.size=="number"?`${i.size}px`:{small:"24px",medium:"32px",large:"48px"}[i.size]??"32px"),l=Y(()=>{let C=[];return typeof i.variant=="string"?C.push(i.variant):Array.isArray(i.variant)&&(C=[...i.variant]),[...C,"icon"]}),u=n,{hide:c,isVisible:d,show:h,triggerRef:f,popupRef:p,instance:g}=Fs({toggleOnClick:!0,offset:[0,0]});function v(C){u("select",C),c()}return th(()=>{g.value&&g.value.setProps({placement:i.placement})}),t({show:h,hide:c,hideDropdown:()=>{c()},popupRef:p}),nt(d,C=>{var S;C&&((S=p.value)==null||S.focus())}),(C,S)=>(j(),ce("div",{class:Q(C.$style["button-dropdown-wrapper"]),style:dn({"--button-size":a.value})},[Ee("div",{class:Q(C.$style["button-group"])},[Tt(C.$slots,"prefix"),Ee("div",{ref_key:"triggerRef",ref:f,class:Q(U(d)?C.$style.open:"")},[Tt(C.$slots,"triggerDropdown",{open:U(d)},()=>[i.readOnly?Je("",!0):Ke((j(),qe(mt,{key:0,onEscape:U(c),ref_key:"mainButton",ref:r,actived:U(d),class:Q(C.$style["button-dropdown-trigger"]),variant:l.value,size:e.size,disabled:i.disabled},{default:me(()=>[Tt(C.$slots,"iconDropdown",{},()=>[ge(lt,{class:Q(C.$style["icon-dropdown"]),src:"ChevronDown",source:"remote"},null,8,["class"])])]),_:3},8,["onEscape","actived","class","variant","size","disabled"])),[[U(s),e.tabIndex]])])],2)],2),Ee("div",{ref_key:"popupRef",ref:p,tabindex:"0",class:Q(C.$style["button-dropdown-list"]),style:{borderRadius:"var(--radius-lg)",overflow:"hidden"}},[(j(!0),ce(xt,null,xn(e.options,(b,w)=>Ke((j(),qe(eu,nn({ref_for:!0,ref:_=>o.value[w]=_,key:b.value},{ref_for:!0},{...b},{"icon-name":b.icon,onClick:Pt(_=>v(b.value||""),["stop","prevent"]),style:{borderLeft:0}}),{label:me(()=>[tt(wt(b.label),1)]),_:2},1040,["icon-name","onClick"])),[[U(s),`${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"}}]]),Zf=_t(rt({__name:"CloseBadgeWrapper",props:{disableRemove:{type:Boolean,default:!0},tooltip:{default:"Unassign"}},emits:["clear"],setup(e,{emit:t}){const n=Xt,s=e,o=t,i=a=>{a.preventDefault(),a.stopImmediatePropagation(),a.stopPropagation(),o("clear")},r=Y(()=>({content:s.tooltip,contentClass:"extra-padding",appendTo:()=>globalThis.document.body}));return(a,l)=>(j(),ce("div",{class:Q(a.$style["close-wrapper"])},[e.disableRemove?Je("",!0):(j(),ce("div",{key:0,class:Q(a.$style["close-button"])},[Ke((j(),qe(mt,{variant:["icon","tertiary"],style:{background:"white"},"aria-label":"remove",onClick:i,size:16,rounded:!0},{default:me(()=>[ge(lt,{src:"CircleXMark",size:"16",color:"var(--primary-color)"})]),_:1})),[[U(n),r.value]])],2)),Tt(a.$slots,"default")],2))}}),[["__cssModules",{$style:{"close-wrapper":"_close-wrapper_15u1e_1","close-button":"_close-button_15u1e_5"}}]]),dge=_t(rt({name:"AssigneeGroupRenderer",__name:"AssigneeGroupRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean,default:!0},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},error:{type:Boolean},maxVisible:{default:4}},setup(e){const t=Xt,n=To,s=e,{isEditing:o}=Ac(s),i=B(s.value),r=B(null),a=B(null),{apiServices:l}=ts(!0,s),u=B(!0),c=()=>{u.value=s.value===void 0};eh(()=>{c()}),tn(()=>{c()}),nt(()=>s.value,I=>{c()});const d=Y(()=>({disabled:s.disabled,readOnly:s.readOnly,error:s.error,inputRef:r,wrapperRef:a,clickable:!(s.readOnly||u.value),active:o})),{argsMain:h,isHover:f}=ws(d),p=Y(()=>{var I;return((I=i.value)==null?void 0:I.slice(0,s.maxVisible))||[]}),g=Y(()=>{var I;return Math.max(0,(((I=i.value)==null?void 0:I.length)||0)-s.maxVisible)}),v=Y(()=>{var I;return g.value<=0?"":((I=i.value)==null?void 0:I.slice(s.maxVisible).map(x=>x.name).join(", "))||""}),C=Y(()=>p.value.map(I=>({id:I.id,name:I.name,initial:I.initial,avatarId:I.id,profile_image:I.profile_image,color:I.color,size:24,user:I}))),S=Y(()=>({color:f.value?"var(--primary-color)":"var(--grey-300)",display:"flex",alignItems:"center",marginLeft:"4px"}));nt(()=>s.value,I=>{i.value=I},{immediate:!0,deep:!0});const b=async I=>{var P,D,F;await T(I)&&(i.value=(P=i.value)==null?void 0:P.filter(k=>k.id!==I),(F=s.params)==null||F.node.setData({...(D=s.params)==null?void 0:D.node.data,assignees:i.value}))},w=I=>{var P;const x=_n.getInstance().getItem("ws.code");return((P=l.value)==null?void 0:P.getUserInformation(x,I))||Promise.resolve(null)},{id:_}=Up(s),R=I=>{var P,D;const x=(D=(P=s.params)==null?void 0:P.api)==null?void 0:D.getRowNode(String(_.value));x==null||x.setDataValue("assignees",$I(I.assignees))},{removeAssignee:T}=mm({...s,entityId:s.entityId,updateRowData:R,value:s.value,errorCallback:()=>{}});return(I,x)=>Ke((j(),qe(Cs,nn(U(h),{ref_key:"wrapperRef",ref:a,bordered:!0}),{default:me(()=>{var P;return[Ee("div",{class:Q(I.$style.assigneeGroupRenderer)},[((P=i.value)==null?void 0:P.length)===0?(j(),qe(lt,{key:0,src:"UserPlus",source:"remote",color:"#6B6B6B",style:dn(S.value)},null,8,["style"])):Je("",!0),(j(!0),ce(xt,null,xn(C.value,D=>(j(),qe(Zf,{key:D.id,"disable-remove":s.readOnly||s.disabled,onClear:F=>b(D.id),style:{marginLeft:"0"}},{default:me(()=>[ge(Oc,{user:D.user,"show-profile":!0,apiUpdateFunction:w,class:Q(I.$style["ib-assignee-avatar"])},null,8,["user","class"])]),_:2},1032,["disable-remove","onClear"]))),128)),g.value>0?Ke((j(),ce("div",{key:1,class:Q(I.$style["extra-avatars"])},[tt(" +"+wt(g.value),1)],2)),[[U(t),v.value]]):Je("",!0)],2)]}),_:1},16)),[[U(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"}}]]),hge=_t(rt({name:"DateRangeRenderer",__name:"DateRangeRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean,default:!1},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isStarted:{type:Boolean},isCompleted:{type:Boolean},timezone:{}},setup(e){var R,T;const t=Xt,n=To,s=Eb(),o=e,i=B(null),r=B(null),{isEditing:a}=Ac(o),l=I=>{if(I){if(typeof I=="string")return I;if(I instanceof Date)return I.toISOString()}},u=Y(()=>o.value===void 0),c=Y(()=>{var I;return(I=o.data)==null?void 0:I.isStarted}),d=Y(()=>{var I;return(I=o.data)==null?void 0:I.isCompleted}),h=Y(()=>!!(o.value&&(o.value[0]||o.value[1]))),f=Y(()=>h.value?o.disabled&&!o.readOnly?"var(--disabled-color)":"var(--primary-color)":"var(--grey-300)"),p=Y(()=>({disabled:o.disabled,error:!1,readOnly:o.readOnly,inputRef:i,wrapperRef:r,clickable:!0,active:a})),{argsMain:g}=ws(p),{startDate:v,endDate:C,startClasses:S,endClasses:b,fullStartDate:w,fullEndDate:_}=O7({start:l((R=o.value)==null?void 0:R[0]),end:l((T=o.value)==null?void 0:T[1]),isStarted:c.value,isEnded:d.value,timezone:o.timezone||s});return(I,x)=>Ke((j(),qe(Cs,nn(U(g),{ref_key:"wrapperRef",ref:r,bordered:!0}),{default:me(()=>[u.value?Je("",!0):(j(),ce("div",{key:0,class:Q(I.$style.dateRangeRenderer)},[h.value?Je("",!0):(j(),qe(lt,{key:0,src:"Calendar",class:Q(I.$style.calendarIcon),color:f.value},null,8,["class","color"])),h.value?(j(),ce(xt,{key:1},[Ke((j(),ce("span",{class:Q([I.$style.dateLabelDisplay,...U(S).map(P=>I.$style[P])])},[tt(wt(U(v)),1)],2)),[[U(t),U(w)]]),x[0]||(x[0]=Ee("span",null,"→",-1)),Ke((j(),ce("span",{class:Q([I.$style.dateLabelDisplay,...U(b).map(P=>I.$style[P])])},[tt(wt(U(C)),1)],2)),[[U(t),U(_)]])],64)):Je("",!0)],2))]),_:1},16)),[[U(n),{isLoading:u.value}]])}}),[["__cssModules",{$style:{dateRangeRenderer:"_dateRangeRenderer_1hon8_1",calendarIcon:"_calendarIcon_1hon8_7",dateSection:"_dateSection_1hon8_11",dateLabelDisplay:"_dateLabelDisplay_1hon8_18",empty:"_empty_1hon8_28","end-today":"_end-today_1hon8_34",actual:"_actual_1hon8_37","end-tomorrow":"_end-tomorrow_1hon8_40","end-yesterday":"_end-yesterday_1hon8_46","end-past":"_end-past_1hon8_52","end-future":"_end-future_1hon8_58","start-today":"_start-today_1hon8_61","start-tomorrow":"_start-tomorrow_1hon8_67","start-yesterday":"_start-yesterday_1hon8_73","start-past":"_start-past_1hon8_79","start-future":"_start-future_1hon8_85"}}]]),fge=rt({__name:"DateRangeEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{default:void 0},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isStarted:{type:Boolean},isCompleted:{type:Boolean},timezone:{default:Eb()}},emits:["closed"],setup(e,{expose:t,emit:n}){const s=B(null);tn(()=>{Ct(()=>{s.value&&s.value.focus()})});const o=e,i=n,r=()=>{var C;(C=o.params)==null||C.api.stopEditing(),i("closed")},a=C=>`${bt.fromJSDate(C,{zone:"utc"}).toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")}999Z`,l=async C=>{await v({startDate:C[0]?a(C[0]):null,dueDate:C[1]?a(C[1]):null})},u=async()=>{await v({startDate:null})},c=async()=>{await v({dueDate:null})},d=async C=>{await v({startDate:C?a(C):null})},h=async C=>{await v({dueDate:C?a(C):null})},f=async()=>{await v({startDate:null,dueDate:null})},p=En("bulkUpdate",!1),{apiServices:g}=ts(!p,o),v=async C=>{var S,b,w,_,R;try{const T=(S=s.value)==null?void 0:S.getValues(),I=await((w=(b=g.value)==null?void 0:b.changeDate)==null?void 0:w.call(b,{workspaceId:o.workspaceId,itemIds:[o.id],startDate:C.startDate,dueDate:C.dueDate}));I!=null&&I.message&&((R=o.params)==null||R.node.setData({...(_=o.params)==null?void 0:_.node.data,dateRange:T==null?void 0:T.dateRange}))}catch(T){console.error("Failed to update scene name:",T)}};return t({focus:()=>{Ct(()=>{var C;(C=s.value)==null||C.focus()})}}),(C,S)=>(j(),qe(Am,nn(o,{onUpdate:l,"onUpdate:end":h,"onUpdate:start":d,onClearAll:f,onClearDue:c,onClearStart:u,onClosed:r,ref_key:"calendarRef",ref:s}),null,16))}}),pge=_t(rt({__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),s=B(0);let o=null;tn(()=>{n.value&&(o=new ResizeObserver(r=>{for(const a of r)s.value=a.contentRect.height}),o.observe(n.value))}),Il(()=>{o&&n.value&&o.unobserve(n.value)});const i=Y(()=>{const r=s.value;return r>120?r-42-36:0});return(r,a)=>(j(),ce("div",{class:Q(r.$style["item-table-wrapper"]),ref_key:"itemTableWrapperRef",ref:n},[Ee("div",{class:Q(r.$style["item-header"])},[Ee("div",{class:Q(r.$style["item-header__left"])},[Tt(r.$slots,"header-left",{},()=>[Ee("h1",{class:Q(r.$style["item-header__title"])},[Tt(r.$slots,"title",{},()=>[a[0]||(a[0]=tt("Items",-1))])],2)])],2),Ee("div",{class:Q(r.$style["item-header__spacer"])},null,2),Ee("div",{class:Q(r.$style["item-header__actions"])},[Tt(r.$slots,"header-actions")],2)],2),Tt(r.$slots,"grid",{availableHeight:i.value}),Ee("div",{class:Q(r.$style.footer)},[Tt(r.$slots,"footer")],2),Tt(r.$slots,"new-row"),Tt(r.$slots,"bulk-update-actions"),Tt(r.$slots,"snackbar"),Tt(r.$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"}}]]),lV=(e,t)=>{const n=B(Number(e.value.value)),s=Y(()=>e.value.metricConfig),o=Y(()=>{var g,v;const l=s.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}}),i=17,r=Y(()=>{var l;return{maxRating:((l=s.value)==null?void 0:l.range)||5,readOnly:e.value.readOnly,disabled:e.value.disabled,size:i}});return{componentState:o,metricConfig:s,ICON_SIZE:i,ratingParams:r,standardNameforIcon:()=>{var u;return(((u=s.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}},gge=["aria-label"],uV=_t(rt({name:"MetricRenderer",__name:"MetricRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean,default:!0},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},error:{type:Boolean},config:{}},emits:["update:value","clear","copy"],setup(e,{emit:t}){const n=To,s=Xt,o=e,i=Gp(!1),r=B(null),a=B(null),{isEditing:l}=Ac(o),u=Y(()=>{var $,q;return{value:o.value,metricConfig:((q=($=o.params)==null?void 0:$.colDef)==null?void 0:q.context)||o.config,error:o.error,hovered:i.value,readOnly:o.readOnly,disabled:o.disabled,active:l}}),{componentState:c,metricConfig:d,internalValue:h}=lV(u,i),f=Y(()=>{var q,J;let $=!1;if(["number","formula"].includes(d.value.metric_type.code)){const ee=Number(o.value),X=Number((q=d.value)==null?void 0:q.format_value);Number.isFinite(X)&&X>=0&&($=(((J=ee.toString().split(".")[1])==null?void 0:J.length)||0)>X)}return $}),p=Y(()=>{var $;return!!(($=d.value)!=null&&$.morpheme_value)||c.value.isEmpty||f.value}),g=Y(()=>{var J,ee,X;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 $=x.value,q=(J=d.value)==null?void 0:J.morpheme_type;return q==="prefix"?`${((ee=d.value)==null?void 0:ee.morpheme_value)||""} ${$}`.trim():q==="suffix"?`${$} ${((X=d.value)==null?void 0:X.morpheme_value)||""}`.trim():$}),v=Y(()=>{const{format_type:$,format_value:q}=d.value;if($==="dropdown"&&typeof q=="string"&&q.startsWith("["))try{return JSON.parse(q)}catch{return[]}return[]}),C=Y(()=>({disabled:o.disabled,error:c.value.isError,inputRef:r,wrapperRef:a,clickable:!I.value,readOnly:o.readOnly||I.value,isEmpty:c.value.isEmpty})),{argsMain:S,isHover:b}=ws(C),w=($,q,J="en-US")=>new Intl.NumberFormat(J,{minimumFractionDigits:q,maximumFractionDigits:q}).format($),_=Y(()=>{if(c.value.isEmpty)return"";if(c.value.pendingCalculation)return"pending";const $=o.value,{format_type:q,format_value:J,mapping:ee}=d.value;if(ee&&typeof ee=="object"&&!Array.isArray(ee)){const X=ee[`!${$}`];if(X)return X}if(q==="dropdown"){const X=v.value.find(ve=>String(ve.name)===String($));if(X)return X.name}if(typeof $=="string"){const X=Number($);return Number.isNaN(X)?$:$.replace(/[.-]/g,"").length>16?R($,J):R(X,J)}return typeof $=="number"?R($,J):String($)}),R=($,q)=>{const J=Number.parseInt(String(q)||"2",10),ee=Number.isFinite(J)&&J>=0?J:2;try{if(typeof $=="string"){const X=$.split("."),ve=X[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),te=X[1]?X[1].substring(0,ee).padEnd(ee,"0"):"0".repeat(ee);return ee>0?`${ve}.${te}`:ve}return w($,ee)}catch(X){return console.error("Error formatting metric value:",X,{num:$,decimals:ee}),String($)}},T=($,q)=>{const J=Number.parseInt(String(q)||"2",10),ee=Number.isFinite(J)&&J>=0?J:2;try{if(typeof $=="string"){const X=$.split("."),ve=X[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),te=X[1]?X[1].length:0,N=Math.max(ee,te),V=X[1]?X[1].padEnd(N,"0"):"0".repeat(N);return N>0?`${ve}.${V}`:ve}return new Intl.NumberFormat("en-US",{minimumFractionDigits:ee,maximumFractionDigits:20}).format($)}catch(X){return console.error("Error formatting exact metric value:",X,{num:$,decimals:ee}),String($)}},I=Y(()=>{var $;return(($=d.value)==null?void 0:$.metric_type.code)==="formula"}),x=Y(()=>{if(c.value.isEmpty)return"";if(c.value.pendingCalculation)return"pending";const $=o.value,{format_type:q,format_value:J,mapping:ee}=d.value;if(ee&&typeof ee=="object"&&!Array.isArray(ee)){const X=ee[`!${$}`];if(X)return X}if(q==="dropdown"){const X=v.value.find(ve=>String(ve.name)===String($));if(X)return X.name}if(typeof $=="string"){const X=Number($);return Number.isNaN(X)?$:$.replace(/[.-]/g,"").length>16?T($,J):T(X,J)}return typeof $=="number"?T($,J):String($)}),{tooltip:P}=NF(""),D=async $=>{$.stopPropagation(),$.preventDefault(),$.stopImmediatePropagation();try{await navigator.clipboard.writeText(x.value),P.value="Copied",setTimeout(()=>{P.value="Copy"},3e3)}catch(q){console.error("Failed to copy text:",q),P.value="Copy failed",setTimeout(()=>{P.value="Copy"},3e3)}};nt(()=>o.value,($,q)=>{const J=Number($);Number.isFinite(J)&&J!==h.value?h.value=J:$==null&&h.value!==0&&(h.value=0)},{immediate:!0,deep:!0});const k=()=>{i.value=!0},O=()=>{i.value=!1};return($,q)=>Ke((j(),qe(Cs,nn(U(S),{onMouseenter:k,style:{"--icon-size":"24px"},onMouseleave:O,ref_key:"wrapperRef",ref:a,actived:U(l),bordered:!0}),{suffix:me(()=>[o.disabled?Je("",!0):(j(),ce("div",{key:0,class:Q([$.$style.suffix,"wrapper-suffix"])},[i.value&&!U(c).isEmpty&&!U(c).isError?Ke((j(),qe(mt,{key:0,variant:["icon","secondary"],size:24,onClick:Pt(D,["prevent","stop"])},{default:me(()=>[ge(lt,{src:"Copy",source:"remote",size:12})]),_:1})),[[U(s),{content:U(P),hideOnClick:!1,contentClass:"extra-padding"}]]):Je("",!0)],2))]),default:me(()=>[Ee("div",{class:Q($.$style["metric-wrapper"]),"aria-label":U(d).format_value||void 0},[Ee("div",{class:Q([$.$style["metric-content"],o.disabled?$.$style.disabled:""])},[!U(c).isError&&U(c).isEmpty?(j(),ce(xt,{key:0},[U(c).pendingCalculation?Ke((j(),ce("span",{key:0,class:Q($.$style["metric-empty"])},[...q[0]||(q[0]=[tt(" - ",-1)])],2)),[[U(s),"Can’t calculate yet. Complete required fields."]]):U(c).isEmpty?(j(),ce("span",{key:1,class:Q($.$style["metric-empty"])}," - ",2)):Je("",!0)],64)):Je("",!0),U(c).isError?Ke((j(),ce("div",{key:1,class:Q($.$style["metric-error"])},[...q[1]||(q[1]=[tt(" Error ",-1)])],2)),[[U(s),"Something went wrong. Review formula, inputs and retry."]]):Je("",!0),!U(c).isEmpty&&!U(c).isError?Ke((j(),ce("span",{key:2,class:Q([$.$style["metric-value"],U(b)?$.$style.hovered:"",{[$.$style.disabled]:o.disabled}])},[tt(wt(_.value),1)],2)),[[U(s),{content:g.value,bypassOverflowCheck:p.value}]]):Je("",!0)],2)],10,gge)]),_:1},16,["actived"])),[[U(n),{isLoading:U(c).isLoading}]])}}),[["__cssModules",{$style:{"metric-wrapper":"_metric-wrapper_7otc0_1","metric-content":"_metric-content_7otc0_5",disabled:"_disabled_7otc0_15","metric-value":"_metric-value_7otc0_19",hovered:"_hovered_7otc0_19","metric-error":"_metric-error_7otc0_23","with-morpheme":"_with-morpheme_7otc0_38","with-formula-icon":"_with-formula-icon_7otc0_41","metric-value--number":"_metric-value--number_7otc0_47","metric-value--currency":"_metric-value--currency_7otc0_47","metric-value--percentage":"_metric-value--percentage_7otc0_47","metric-morpheme":"_metric-morpheme_7otc0_51","metric-empty":"_metric-empty_7otc0_64","metric-icon":"_metric-icon_7otc0_71"}}]]),mge={key:0,style:{color:"#6b6b6b"}},vge=_t(rt({__name:"HeaderSorting",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean},modelValue:{}},emits:["sort-changed","update:modelValue"],setup(e,{emit:t}){const n=Xt,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"}},o={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"}},r={asc:{value:"asc",label:"Ascending",id:"asc"},desc:{value:"desc",label:"Descending",id:"desc"}},a=e,l={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"},u=Y(()=>{var F,k;if(a.headerType)return a.headerType;if(((k=(F=a.params)==null?void 0:F.column)==null?void 0:k.getColId()).includes("metric"))return"default";const D=a.headerType??a.params.column.getColId();return l[D]||"default"}),c=B(),d=()=>{var D,F,k;const P=(F=(D=a.params)==null?void 0:D.column)==null?void 0:F.getColDef();if((k=P.colId)!=null&&k.includes("metric")){if(P.context.is_primary==1)return"primary";if(P.context.is_point_metric==1)return"secondary"}};th(()=>{c.value=d()}),tn(()=>{c.value=d()});const h=Y(()=>{var P,D;return((D=(P=a.params)==null?void 0:P.column.getColDef().context)==null?void 0:D.morpheme_value)||void 0}),f=Y(()=>{var P;return(P=a.params)==null?void 0:P.displayName}),p=Y(()=>{let P=[];switch(u.value){case"dateRange":P=Object.values(s).map(D=>({...D,selected:v.value===D.value,type:"text",hover:T.value===D.value}));break;case"date":P=Object.values(o).map(D=>({...D,selected:v.value===D.value,type:"text",hover:T.value===D.value}));break;case"number":P=Object.values(i).map(D=>({...D,selected:v.value===D.value,type:"text",hover:T.value===D.value}));break;default:P=Object.values(r).map(D=>({...D,selected:v.value===D.value,type:"text",hover:T.value===D.value}));break}return v.value!=="none"&&P.push({id:"clear",label:"Clear",value:"none",selected:!1,type:"text",icon:"XMark",hover:T.value=="none"}),P}),g=Y(()=>String(v.value).endsWith("asc")?"SortUp":String(v.value).endsWith("desc")?"SortDown":"Sort"),v=B(a.modelValue??"none"),C=P=>{_("update:modelValue",P),_("sort-changed",P)},S=P=>{v.value=P},b=Ti(()=>{if(u.value==="date"||u.value==="default"||u.value==="number"){let P;v.value==="none"?P="asc":v.value==="asc"?P="desc":P="none",v.value=P}else{const P=[s.START_ASC.value,s.START_DESC.value,s.DUE_ASC.value,s.DUE_DESC.value,"none"],F=(P.indexOf(v.value)+1)%P.length;v.value=P[F]}},rr),w=Y(()=>{if(v.value==="none")return"No sorting applied";const P=p.value.find(D=>D.value===v.value);return(P==null?void 0:P.label)||""}),_=t,R=Y(()=>{if(a.disabled&&!a.readOnly)return"var(--disabled-color)";if(v.value!=="none")return"var(--primary-color-hover)"});nt(()=>a.modelValue,P=>{P!=v.value&&(v.value=P)}),nt(v,P=>{P!==a.modelValue&&C(P)});const T=B(v.value);nt(()=>v.value,P=>{T.value=P});const I=P=>{var O,$;if(a.readOnly||a.disabled)return;let D=0;P.key==="ArrowDown"?D=1:P.key==="ArrowUp"&&(D=-1);const F=p.value.findIndex(q=>q.value===T.value),k=p.value.length;if(P.key==="Enter"||P.key===" ")P.preventDefault(),v.value=T.value,(O=x.value)==null||O.hide();else if(D!==0){P.preventDefault();let q=(F+D+k)%k;T.value=p.value[q].value}else P.key==="Escape"&&(($=x.value)==null||$.hide())},x=B(null);return tn(()=>{var P,D;(D=(P=x.value)==null?void 0:P.$el)==null||D.addEventListener("keydown",I)}),Il(()=>{var P,D;(D=(P=x.value)==null?void 0:P.$el)==null||D.removeEventListener("keydown",I)}),(P,D)=>(j(),qe(_0,{ref_key:"dropdownRef",ref:x,options:p.value,label:f.value,readOnly:a.readOnly,disabled:a.disabled,variant:["icon","tertiary"],size:"small",onHandleClick:U(b),onSelect:D[0]||(D[0]=F=>S(F))},{prefix:me(()=>[ge(mt,{variant:["text"],onClick:U(b),size:"small"},{default:me(()=>[Ke((j(),ce("b",null,[tt(wt(f.value),1)])),[[U(n),{content:f.value}]]),h.value?(j(),ce("small",mge," ("+wt(h.value)+") ",1)):Je("",!0),c.value=="primary"?Ke((j(),ce("div",{key:1,class:Q(P.$style["icon-metric"])},[ge(lt,{src:"ChartPie",color:"#A6A6A6",size:"14"})],2)),[[U(n),"Woohoo metric"]]):Je("",!0),c.value=="secondary"?Ke((j(),ce("div",{key:2,class:Q(P.$style["icon-metric"])},[ge(lt,{src:"Bullseye",color:"#A6A6A6",size:"14"})],2)),[[U(n),"Point Metric"]]):Je("",!0)]),_:1},8,["onClick"])]),iconDropdown:me(()=>[Ke(ge(lt,{src:g.value,source:"remote",color:R.value},null,8,["src","color"]),[[U(n),w.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"}}]]),yge=["disabled","readonly","checked","indeterminate"],cV=_t(rt({__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=Xt,s=Ur,o=e,i=t,r=Y(()=>{if(typeof o.size=="string"){if(["small","medium","large"].includes(o.size))switch(o.size){case"small":return"14px";case"large":return"24px";case"medium":default:return"20px"}if(o.size.endsWith("px"))return o.size}return typeof o.size=="number"?`${o.size}px`:"20px"}),a=Y(()=>o.allowIndeterminate?[Ht.UNCHECK,Ht.INDETERMINATE,Ht.CHECKED]:[Ht.UNCHECK,Ht.CHECKED]),l=Y(()=>{if(typeof o.tooltipText=="string"||!o.tooltipText)return o.tooltipText||"";switch(c.value){case Ht.UNCHECK:return o.tooltipText.unchecked;case Ht.INDETERMINATE:return o.tooltipText.indeterminate;case Ht.CHECKED:return o.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 o.modelValue=="boolean"?o.modelValue?Ht.CHECKED:Ht.UNCHECK:o.modelValue),d=Y(()=>({checked:c.value===Ht.CHECKED,indeterminate:c.value===Ht.INDETERMINATE,none:c.value===Ht.UNCHECK})),h=Y(()=>o.disabled||o.readOnly);return nt(()=>c.value,f=>{i("update:modelValue",f===Ht.CHECKED)}),(f,p)=>Ke((j(),ce("input",{disabled:o.disabled,key:c.value,readonly:o.readOnly,type:"checkbox",class:Q([f.$style["input-checkbox"]]),checked:d.value.checked,indeterminate:d.value.indeterminate,onChange:u,"aria-label":"Select All Items",style:dn({"--input-size":r.value})},null,46,yge)),[[U(n),{content:l.value,hideOnClick:!1,contentClass:"extra-padding"}],[U(s),o.focusIndex]])}}),[["__cssModules",{$style:{small:"_small_npdz3_84",large:"_large_npdz3_87",medium:"_medium_npdz3_90"}}]]),wge=_t(rt({name:"HeaderCheckbox",__name:"HeaderCheckbox",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=e,n=Xt,s=Wm(),{setSelectionStatus:o}=s,{rowCount:i,selectionStatus:r}=Qs(s),a=B(new Set);nt(r,w=>{o(w)},{immediate:!0});const l=Y(()=>r.value!==Ht.UNCHECK),u=Y(()=>({checked:r.value===Ht.CHECKED,indeterminate:r.value===Ht.INDETERMINATE,UNCHECK:r.value===Ht.UNCHECK})),c=Y(()=>({[Ht.UNCHECK]:"Click to select all",[Ht.INDETERMINATE]:"Click to clear selection",[Ht.CHECKED]:"Click to clear selection"})[r.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:i.value.total,loaded:i.value.loaded}),f=({api:w,state:_})=>{if(w)if(_===Ht.UNCHECK)w.deselectAll(),a.value.clear(),r.value=_;else if(_===Ht.CHECKED){const R=new Set;w.forEachNode(T=>{T.isSelected()&&R.add(T.id||"")}),a.value=R,w.forEachNode(T=>T.setSelected(!0)),r.value=_}else w.forEachNode(R=>R.setSelected(!0)),r.value=_},p=()=>{var R;const w=(R=t.params)==null?void 0:R.api;if(!w){console.error("[HeaderCheckbox] There is no API available");return}const _={[Ht.UNCHECK]:Ht.INDETERMINATE,[Ht.INDETERMINATE]:Ht.UNCHECK,[Ht.CHECKED]:Ht.UNCHECK};f({api:w,state:_[r.value]})},g=w=>{var T;const _=(T=t.params)==null?void 0:T.api;if(!_){console.error("no api");return}const R={INDETERMINATE:Ht.INDETERMINATE,GLOBAL:Ht.CHECKED,UNCHECK:Ht.UNCHECK};f({api:_,state:R[w]})},v=Ti(w=>{const{selected:_,total:R}=h(w);if(R==0){r.value=Ht.UNCHECK;return}_===R?r.value=Ht.CHECKED:_===0?r.value=Ht.UNCHECK:r.value=Ht.INDETERMINATE},300);let C=[];const S=w=>{v(w)};tn(()=>{var I;const w=(I=t.params)==null?void 0:I.api;if(!w)return;const _=x=>v(x.api),R=()=>S(w),T=()=>S(w);w.addEventListener("selectionChanged",_),w.addEventListener("rowDataUpdated",R),w.addEventListener("modelUpdated",R),C=[()=>w.removeEventListener("selectionChanged",_),()=>w.removeEventListener("rowDataUpdated",R),()=>w.removeEventListener("modelUpdated",T)]}),vs(()=>{C.forEach(w=>w())});const b=`header-checkbox-${Math.random().toString(36).substr(2,9)}`;return(w,_)=>(j(),qe(_0,{tabIndex:"9",options:d.value,size:24,disabled:t.disabled,readOnly:t.readOnly,variant:["icon","tertiary"],placement:"bottom-start",onSelect:g},{prefix:me(()=>[Ke((j(),qe(cV,{"tab-index":"8",id:b,disabled:t.disabled,key:U(r),readonly:t.readOnly,type:"checkbox",checked:u.value.checked,indeterminate:u.value.indeterminate,modelValue:U(r),"onUpdate:modelValue":_[0]||(_[0]=R=>gn(r)?r.value=R:null),onChange:p,"aria-label":U(r)===U(Ht).CHECKED?"All items selected":"Select visible items",class:Q(w.$style["ag-checkbox-input"])},null,8,["disabled","readonly","checked","indeterminate","modelValue","aria-label","class"])),[[U(n),{content:c.value,hideOnClick:!1,contentClass:"extra-padding"}]])]),_:1},8,["options","disabled","readOnly"]))}}),[["__cssModules",{$style:{"ag-checkbox-input":"_ag-checkbox-input_uj7ro_1","button-group":"_button-group_uj7ro_62","button-main":"_button-main_uj7ro_62",headerCheckbox:"_headerCheckbox_uj7ro_66"}}]]),Cge={key:1},bge=_t(rt({name:"StatusRenderer",__name:"StatusRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean,default:!0},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=To,n=Xt,s=e,{isEditing:o}=Ac(s),i=B(null),r=B(null),a=Y(()=>s.value),l=Y(()=>a.value===void 0),u=Y(()=>{var g;return((g=a.value)==null?void 0:g.name)||"No status"}),c=Y(()=>{var g;return{disabled:s.disabled,error:!1,readOnly:s.readOnly,isEmpty:Cj((g=a.value)==null?void 0:g.label),inputRef:i,wrapperRef:r,clickable:!s.disabled&&!s.readOnly,active:o}}),{argsMain:d,isHover:h}=ws(c),f=Y(()=>{var g;return((g=a.value)==null?void 0:g.color)||"red"}),p=Y(()=>new Nn(f.value).isLight()?"#000":"#fff");return(g,v)=>Ke((j(),qe(U(Cs),nn(U(d),{ref_key:"wrapperRef",ref:r,bordered:!0,style:{background:`${f.value} !important`,color:p.value,"--border-color":!U(o)&&!U(h)?"#f3f5f8":void 0}}),{default:me(()=>[l.value?Je("",!0):(j(),ce("div",{key:0,class:Q(g.$style["status-renderer"])},[a.value?Ke((j(),ce("div",{key:0,class:Q(g.$style["status-renderer__status-name"])},[tt(wt(u.value),1)],2)),[[U(n),{content:u.value,delay:[1e3,0]}]]):l.value?Je("",!0):(j(),ce("div",Cge,"No status"))],2))]),_:1},16,["style"])),[[U(t),{isLoading:l.value}]])}}),[["__cssModules",{$style:{"status-renderer":"_status-renderer_108pu_1","status-renderer__color-code":"_status-renderer__color-code_108pu_10","status-renderer__status-name":"_status-renderer__status-name_108pu_20"}}]]),dV=_t(rt({__name:"PopupLayout",props:{popupName:{},showOverlay:{type:Boolean,default:!0},overlayOpacity:{default:.5},closeOnOverlayClick:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0}},emits:["shown","hidden"],setup(e,{expose:t,emit:n}){const s=e,{popupRef:o,show:i,hide:r,isVisible:a}=$7({useTrigger:!1,arrow:!1,centered:!0,showOverlay:s.showOverlay,overlayOpacity:s.overlayOpacity,closeOnOverlayClick:s.closeOnOverlayClick,appendTo(c){return document.body}}),l=c=>{s.closeOnEscape&&c.key==="Escape"&&a.value&&r()};tn(()=>{document.addEventListener("keydown",l)}),vs(()=>{document.removeEventListener("keydown",l)}),t({show:i,hide:r,isVisible:a});const u=n;return nt(()=>a.value,c=>{u(c?"shown":"hidden")}),(c,d)=>{const h=Eo("tooltip");return j(),ce("div",{ref_key:"popupRef",ref:o,class:Q(c.$style.popupContainer)},[Ee("div",{class:Q(c.$style.popupWrapper)},[Ee("div",{class:Q(c.$style.header)},[Ee("span",{class:Q(c.$style["header-title"])},wt(e.popupName),3),Ke((j(),qe(mt,{style:{position:"absolute",top:"0",right:"0"},variant:"text",onClick:U(r),"aria-label":"Close popup"},{default:me(()=>[ge(lt,{src:"Xmark"})]),_:1},8,["onClick"])),[[h,"Close"]])],2),Ee("div",{class:Q(c.$style.body)},[Tt(c.$slots,"default")],2),Ee("div",{class:Q(c.$style.footer)},[Tt(c.$slots,"footer")],2)],2)],2)}}}),[["__cssModules",{$style:{popupContainer:"_popupContainer_73gw5_1",popupWrapper:"_popupWrapper_73gw5_5",popupFadeIn:"_popupFadeIn_73gw5_1",header:"_header_73gw5_19","header-title":"_header-title_73gw5_28",body:"_body_73gw5_38",footer:"_footer_73gw5_43"}}]]),Sge={...{list_cursor:{error:"Failed to fetch data. Please reload table."},assignedUser:{error:"Failed to fetch assignees. Please reload table."},metricValues:{error:"Failed to fetch metric values. Please reload table."},assignableUser:{error:"Failed to fetch people. Please try again."},assignableStatus:{error:"Failed to fetch statuses. Please try again."},basicInfor:{error:"Failed to fetch basic information."},item:{error:"Update failed. Please try again."},removeAssignee:{error:"Update failed. Please try again."},metricList:{error:"Failed to fetch metrics. Please try again."},multipleAssignableUser:{error:"Failed to fetch data. Please reload table."},getPermission:{error:"Failed to fetch permissions."},delete_rendition:{success:"Deletion successful.",error:"Deletion failed. Please try again."},delete_thumbnail:{success:"Deletion successful.",error:"Deletion failed. Please try again."},archive_item:{success:"Archive successful.",error:"Archive failed. Please try again."},unarchive_item:{success:"Unarchive successful.",error:"Unarchive failed. Please try again."},bulkDelete:{success:"Deletion successful.",error:"Deletion failed. Please try again."},bulkArchive:{error:"Archive failed. Please try again."},bulkDateUpdate:{error:"Failed to update items."},bulkAssignUpdate:{error:"Failed to update assignees."},bulkStatusUpdate:{error:"Failed to update items."},getUserPermission:{error:"Failed to fetch user permissions."},getEntityDetail:{error:"Failed to fetch entity details."},bulkUnarchive:{error:"Unarchive failed. Please try again."},downloadTemplate:{},importItems:{},exportItems:{},updateFromFile:{},me:{},workspaces:{},entityUserRoles:{},templateFlowStatuses:{},bulkMetricUpdate:{error:"Update failed. Please try again."},createNewItem:{},getAssignableAssignees:{},getAssignableStatuses:{},getFilterStatuses:{}},offline:{error:"You are currently offline. Please check your network connection."}};class Ege extends Error{}class rl extends Ege{constructor(){super("Zone is an abstract class")}}class hV{get type(){throw new rl}get name(){throw new rl}get ianaName(){return this.name}get isUniversal(){throw new rl}offsetName(t,n){throw new rl}formatOffset(t,n){throw new rl}offset(t){throw new rl}equals(t){throw new rl}get isValid(){throw new rl}}const R0=new Map;function _ge(e){let t=R0.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),R0.set(e,t)),t}const Rge={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Dge(e,t){const n=e.format(t).replace(/\u200E/g,""),s=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,r,a,l,u,c]=s;return[r,o,i,a,l,u,c]}function Tge(e,t){const n=e.formatToParts(t),s=[];for(let o=0;o<n.length;o++){const{type:i,value:r}=n[o],a=Rge[i];i==="era"?s[a]=r:Zv(a)||(s[a]=parseInt(r,10))}return s}const D0=new Map;class Yv extends hV{static create(t){let n=D0.get(t);return n===void 0&&D0.set(t,n=new Yv(t)),n}static resetCache(){D0.clear(),R0.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=Yv.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:s}){return Fge(t,n,s,this.name)}formatOffset(t,n){return Jv(this.offset(t),n)}offset(t){if(!this.valid)return NaN;const n=new Date(t);if(isNaN(n))return NaN;const s=_ge(this.name);let[o,i,r,a,l,u,c]=s.formatToParts?Tge(s,n):Dge(s,n);a==="BC"&&(o=-Math.abs(o)+1);const h=xge({year:o,month:i,day:r,hour:l===24?0:l,minute:u,second:c,millisecond:0});let f=+n;const p=f%1e3;return f-=p>=0?p:1e3+p,(h-f)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let T0=null;class hd extends hV{static get utcInstance(){return T0===null&&(T0=new hd(0)),T0}static instance(t){return t===0?hd.utcInstance:new hd(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new hd(pV(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Jv(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Jv(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Jv(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}function Zv(e){return typeof e>"u"}function Xv(e,t=2){const n=e<0;let s;return n?s="-"+(""+-e).padStart(t,"0"):s=(""+e).padStart(t,"0"),s}function fV(e){if(!(Zv(e)||e===null||e===""))return parseInt(e,10)}function Ige(e){if(!(Zv(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function xge(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Fge(e,t,n,s=null){const o=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};s&&(i.timeZone=s);const r={timeZoneName:t,...i},a=new Intl.DateTimeFormat(n,r).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function pV(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const s=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-s:s;return n*60+o}function Jv(e,t){const n=Math.trunc(Math.abs(e/60)),s=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${Xv(n,2)}:${Xv(s,2)}`;case"narrow":return`${o}${n}${s>0?`:${s}`:""}`;case"techie":return`${o}${Xv(n,2)}${Xv(s,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}const gV=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function fd(...e){const t=e.reduce((n,s)=>n+s.source,"");return RegExp(`^${t}$`)}function pd(...e){return t=>e.reduce(([n,s,o],i)=>{const[r,a,l]=i(t,o);return[{...n,...r},a||s,l]},[{},null,1]).slice(0,2)}function mV(...e){return(t,n)=>{const s={};let o;for(o=0;o<e.length;o++)s[e[o]]=fV(t[n+o]);return[s,null,n+o]}}const vV=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,Pge=`(?:${vV.source}?(?:\\[(${gV.source})\\])?)?`,yV=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,wV=RegExp(`${yV.source}${Pge}`),I0=RegExp(`(?:[Tt]${wV.source})?`),Age=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,kge=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Oge=/(\d{4})-?(\d{3})/,Mge=mV("weekYear","weekNumber","weekDay"),Nge=mV("year","ordinal"),Lge=/(\d{4})-(\d\d)-(\d\d)/,CV=RegExp(`${yV.source} ?(?:${vV.source}|(${gV.source}))?`),Vge=RegExp(`(?: ${CV.source})?`);function gd(e,t,n){const s=e[t];return Zv(s)?n:fV(s)}function Bge(e,t){return[{year:gd(e,t),month:gd(e,t+1,1),day:gd(e,t+2,1)},null,t+3]}function md(e,t){return[{hours:gd(e,t,0),minutes:gd(e,t+1,0),seconds:gd(e,t+2,0),milliseconds:Ige(e[t+3])},null,t+4]}function Xf(e,t){const n=!e[t]&&!e[t+1],s=pV(e[t+1],e[t+2]),o=n?null:hd.instance(s);return[{},o,t+3]}function Jf(e,t){const n=e[t]?Yv.create(e[t]):null;return[{},n,t+1]}fd(Age,I0),fd(kge,I0),fd(Oge,I0),fd(wV),pd(Bge,md,Xf,Jf),pd(Mge,md,Xf,Jf),pd(Nge,md,Xf,Jf),pd(md,Xf,Jf),pd(md),fd(Lge,Vge),fd(CV),pd(md,Xf,Jf);function vd(e){"@babel/helpers - typeof";return vd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vd(e)}var bs;(function(e){e.review="{reviewDomain}/{ws_code}",e.review_take="{reviewDomain}/{ws_code}?id={take_id}",e.review_scene="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&tab=iteration",e.review_rendition="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}",e.review_frame="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}&tab=comment&refresh_marker=true#type=frame&data={frame}",e.review_rendition_comment="{reviewDomain}/{ws_code}?scene_id={scene_id}&rendition_id={rendition_id}&comment_id={comment_id}&tab=comment",e.review_comment="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&comment_id={comment_id}",e.scene_hub="{baseDomain}/{ws_code}/{scene_id}?o=st",e.hub_rendition="{baseDomain}/{ws_code}/{scene_id}?o=st&renditionId={rendition_id}",e.hub_comment="{baseDomain}/{ws_code}/{scene_id}?o=st&comment_id={comment_id}",e.people_insight="{baseDomain}/{ws_code}/{user_id}?o=pt",e.people_detail="{baseDomain}/{ws_code}/ws/ppl/{display_name}-{user_id}",e.project="{baseDomain}/{ws_code}/pl/dir/{entity_id}",e.project_focusMode="{baseDomain}/{ws_code}/pl/dir/{parent_id}?f={entity_id}",e.woohoo="{baseDomain}/{ws_code}/pl/woo/rpt/{woohoo_id}",e.update="{baseDomain}/{ws_code}/pl/au?id={entity_id}",e.core="{baseDomain}/{ws_code}"})(bs||(bs={})),bs.review,bs.review_take,bs.review_scene,bs.review_rendition,bs.review_frame,bs.review_rendition_comment,bs.review_comment,bs.scene_hub,bs.hub_rendition,bs.hub_comment,bs.people_insight,bs.people_detail,bs.project,bs.woohoo,bs.update,bs.core,bs.project_focusMode;var x0=null;function $ge(e){x0=e}function Qv(){if(!x0)throw new Error("i18n instance not set. Call setI18nInstance(i18n) before using errorHelper.");return x0}function bV(){try{var e=Qv();return e.t("errorMessages.fallback.unknownError")}catch{return"An error occurred. Please try again or contact support."}}function Hge(e,t,n,s){var o=e.replace(/{field}/g,t);if(s&&vd(s)==="object")Object.keys(s).forEach(function(r){var a="{".concat(r,"}"),l=s[r];Array.isArray(l)?l=l.join(", "):r==="value"&&(s.min||s.max)&&(l="".concat(s.min||s.value," and ").concat(s.max||s.value)),o=o.replace(new RegExp(a,"g"),l||"")});else if(Array.isArray(n)&&n.length>0){var i=n[0]||"";n.length>1?i="".concat(n[0]," and ").concat(n[1]):n.length===1&&Array.isArray(n[0])&&(i=n[0].join(", ")),o=o.replace(/{value}/g,i)}return o}function Gge(e,t){for(var n=Object.keys(t),s=0,o=n;s<o.length;s++){var i=o[s],r=Array.isArray(t[i])?t[i].join(", "):String(t[i]);e=e.replace(new RegExp("\\{".concat(i,"\\}"),"g"),r)}if(n.length>0&&e.includes("{value}")){var a=t[n[0]],l=Array.isArray(a)?a.join(", "):String(a);e=e.replace(/{value}/g,l)}return e}function SV(e){return!!(e&&e.validation&&e.validation.fields&&Object.keys(e.validation.fields).length>0)}function EV(e,t){if(!e||vd(e)!=="object")return null;try{var n=Qv();if(e.validation&&e.validation.fields)for(var s=e.validation.fields,o=Object.keys(s),i=0,r=o;i<r.length;i++){var a=r[i],l=s[a];if(l&&l.rule){var u=l.rule,c=l.data||[],d=l.params||{};try{var h,f,p=((h=n.messages)===null||h===void 0?void 0:h.value)||n.messages,g=((f=n.locale)===null||f===void 0?void 0:f.value)||n.locale,v=null;if(t){var C,S=t.toUpperCase();v=(C=p[g])===null||C===void 0||(C=C.errorMessages)===null||C===void 0||(C=C[S])===null||C===void 0||(C=C.validation_rules)===null||C===void 0?void 0:C[u]}if(!v){var b;v=(b=p[g])===null||b===void 0||(b=b.errorMessages)===null||b===void 0||(b=b.GEN)===null||b===void 0||(b=b.validation_rules)===null||b===void 0?void 0:b[u]}if(v&&typeof v=="string")return Hge(v,a,c,d)}catch(w){console.error("Error in validation rules",w)}}}}catch(w){return console.error("Error in getValidationErrorMessage:",w),null}return null}function Uge(e){if(!e)return bV();var t=e.code,n=e.error,s=e.details,o=e.message;if(SV(s)&&s){var i=EV(s,n==null?void 0:n.type);if(console.log("[Error Utils Debug]",i),i)return t!==""?"[".concat(t,"] ").concat(i):i;try{var r=Qv();return r.t("errorMessages.GEN.validation_error")}catch{return"Validation error occurred."}}if(n&&vd(n)==="object"&&n.type&&n.key){var a=n.type.toUpperCase();try{var l,u,c,d="errorMessages.".concat(a,".").concat(n.key),h=Qv(),f=((l=h.messages)===null||l===void 0?void 0:l.value)||h.messages,p=((u=h.locale)===null||u===void 0?void 0:u.value)||h.locale,g=(c=f[p])===null||c===void 0||(c=c.errorMessages)===null||c===void 0||(c=c[a])===null||c===void 0?void 0:c[n.key];if(g&&typeof g=="string"){var v=g;return s!=null&&s.context&&(v=Gge(v,s.context),console.log("[Error Utils Debug]",v)),t!==""?"[".concat(t,"] ").concat(v):v}}catch(S){console.error("[Error Utils Debug]",S)}}if(n&&vd(n)!=="object"&&SV(s)){var C=EV(s);if(C)return t!==""?"[".concat(t,"] ").concat(C):C}return o||bV()}var Wge={GEN:{general_error:"General Error",validation_error:"Validation error occurred.",data_locked:"Update failed. Record(s) are locked or currently being updated. You may try again later.",unauthenticated:"Authentication required. Please log in to continue.",unauthorized:"Access denied. You don’t have permission to view this.",not_found:"Resource not found. Check link or try again.",server_error:"Something went wrong on our end. Please try again later.",validation_rules:{required:"The {field} field is required",unique:"The {field} field must be unique",email:"{field} must be a valid email address",emails:"Invalid email(s) pattern",email_exists:"{field} already exists in workspace {value}",regex:"The {field} format is invalid",min:"{field} must be at least {value} characters",max:"{field} cannot exceed {value} characters",between:"{field} must be between {value} characters",numeric:"The {field} must be a number",integer:"The {field} must be an integer",date:"The {field} must be a valid date",after:"The {field} must be after {value}",before:"The {field} must be before {value}",image:"The {field} must be an image",mimes:"The {field} must be a file of type: {value}",max_file_size:"The {field} size cannot exceed {value}MB",confirmed:"The {field} confirmation does not match",same:"The {field} must match {value}",exists:"The Selected {field} is invalid",password_requirements:"The {field} does not meet security requirements",decimal:"Update failed. Maximum allowed decimal places is {value}.",before_or_equal:"{field} must be a date before or equal {value}.",after_or_equal:"{field} must be a date after or equal {value}."}},MRC:{validation_rules:{not_in:"Update failed. These values are not allowed: {value}.",in:"Update failed. Only these values are allowed: {value}.",between:"Update failed. Enter a value between {value}."},excess_decimal_places:"Update failed. Maximum allowed decimal places is {value}."},PPL:{invite_deleted_user:"Invitation failed. Users deleted from the workspace can't be re-invited. Please contact support.",insufficient_seats:"Invitation failed. No seats remaining. Purchase seat(s) to continue."},TM:{NO_ENTITY_TO_UNDEPLOY:"Undeploy failed. No entity specified.",NO_TEAM_EDITOR_ROLE:"No team editor role."},DIR:{has_project_admin_access:"Update failed. User has project access by default.",NO_EDIT_ENTITY_TEAM_ACCESS:"No permission to edit entity team."},AS:{"invalid_field (TBD)":"Something went wrong with account creation. Please contact support."},custom_default_msg:{general:{invalid_data:"Invalid data provided",retry:"Try again later."},network:{offline:"You are currently offline. Please check your network connection.",request_timeout:"Your request has timed out. Please ensure your internet connection is stable.",network_problem:"Network problem. Request timed out. Please try again later.",network_connection_lost:"Network connection lost",gateway_timeout:"Gateway Timeout"},auth:{token_expired:"Token refresh failed"},storage:{storage_limit:"Storage limit exceeded.",thumbnail_size_limit:"Thumbnail picture size can not exceed 2MB!",thumbnail_picture_format:"Thumbnail picture must be image format!",upload_limit:"Your upload exceeds the maximum allowed size"}},fallback:{unknownError:"An error occurred. Please try again or contact support."}};const Qf=Ql("toast",()=>{const e=l=>{var u;if((l==null?void 0:l.apiCode)==="offline")o({id:"offline",type:"error",message:"You are currently offline. Please check your network connection."});else{const c=Uge((u=l==null?void 0:l.res)==null?void 0:u.data);o({id:l==null?void 0:l.apiCode,type:"error",message:c})}},t=B([]),n=(l,u)=>{const c=Sge[l];if(c){const d=c[u];if(d){o({id:l,type:u,message:d});return}}else o({id:l,type:u,message:l})},s=new Map,o=(l,u=5e3)=>{const c={...l,id:l.id??Date.now()+Math.random()};if(t.value.push(c),u>0){const d=Date.now(),h=setTimeout(()=>{i(c.id),s.delete(c.id)},u);s.set(c.id,{timeoutId:h,remainingTime:u,startTime:d})}};function i(l){t.value=t.value.filter(c=>c.id!==l);const u=s.get(l);u&&(clearTimeout(u.timeoutId),s.delete(l))}function r(l){const u=s.get(l);if(u){clearTimeout(u.timeoutId);const c=Date.now()-u.startTime;u.remainingTime=Math.max(0,u.remainingTime-c)}}function a(l){const u=s.get(l);if(u&&u.remainingTime>0){const c=setTimeout(()=>{i(l),s.delete(l)},u.remainingTime);u.timeoutId=c,u.startTime=Date.now()}}return{notifications:t,addNotification:o,removeNotification:i,showMessage:n,showErrorNetMessage:e,pauseAutoDismiss:r,resumeAutoDismiss:a}}),zge=["onMouseenter","onMouseleave"],jge=["innerHTML"],Kge=["innerHTML"],qge=["data-tooltip"],Yge={key:2,style:{"min-width":"24px","min-height":"24px",position:"absolute",top:"0",right:"0",display:"flex","align-items":"center","justify-content":"center"}},Zge=_t(rt({__name:"Snackbar",setup(e){const t=Xt,n=EU,s=Qf(),{removeNotification:o}=s,{notifications:i}=Qs(s),r=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=s.pauseAutoDismiss)==null||p.call(s,f)},h=f=>{var p;c.value.delete(f),(p=s.resumeAutoDismiss)==null||p.call(s,f)};return(f,p)=>(j(),qe(rU,{name:"list",tag:"div",class:Q(["notification-center",f.$style["notification-wrapper"]])},{default:me(()=>[(j(!0),ce(xt,null,xn(U(i),g=>{var v;return Ke((j(),ce("div",{key:g.id,class:Q([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:C=>d(g.id),onMouseleave:C=>h(g.id)},[Ee("p",{class:Q(f.$style.snackbar__message)},[Ee("span",{class:Q(f.$style.snackbar__icon)},[!g.icon&&g.type=="success"?(j(),qe(lt,{key:0,src:"CircleCheck",source:"remote"})):Je("",!0),!g.icon&&g.type=="interactive"?(j(),qe(lt,{key:1,src:"CircleCheck",source:"remote"})):!g.icon&&g.type=="error"?(j(),qe(lt,{key:2,src:"CircleXMark",source:"remote"})):g.icon&&r(g.icon)?(j(),ce("i",{key:3,class:Q(f.$style["icon-draw"]),innerHTML:g.icon},null,10,jge)):g.icon&&!r(g.icon)?(j(),qe(lt,{key:4,src:g.icon,source:"remote",color:"var(--primary-color)"},null,8,["src"])):Je("",!0)],2),Ee("span",{class:Q(f.$style["error-message"])},[Ee("span",{class:Q(f.$style.message),innerHTML:g.message},null,10,Kge)],2)],2),g.actions?(j(),ce("div",{key:0,class:Q(f.$style["actions-notification"]),"data-notification":"true"},[(j(!0),ce(xt,null,xn(g.actions,C=>(j(),qe(mt,nn({key:C.label},{ref_for:!0},C,{onClick:Pt(C.action,["prevent","stop"]),variant:"secondary",size:"small"}),{prefix:me(()=>[C.btnIcon?(j(),qe(lt,{key:0,src:C.btnIcon,source:"remote",color:"var(--primary-color)"},null,8,["src"])):Je("",!0)]),_:2},1040,["onClick"]))),128))],2)):Je("",!0),g.type!=="interactive"?Ke((j(),ce("div",{key:1,"data-tooltip":a.value,style:{"min-width":"24px"}},[ge(mt,{variant:"secondary",onClick:C=>u(g.message),class:Q(f.$style["copy-btn"])},{prefix:me(()=>[ge(lt,{src:"Copy",source:"remote",color:"var(--primary-color)",size:"11"})]),_:1},8,["onClick","class"])],8,qge)),[[U(t),a.value]]):Je("",!0),g.type=="interactive"?Ke((j(),ce("div",Yge,[ge(mt,{variant:"tertiary",onClick:C=>U(o)(g.id),class:Q(f.$style["close-btn"]),size:18},{default:me(()=>[ge(lt,{src:"XMarkSolid",size:"9"})]),_:1},8,["onClick","class"])])),[[U(t),"Close"]]):Je("",!0)],42,zge)),[[U(n)]])}),128))]),_:1},8,["class"]))}}),[["__cssModules",{$style:{"notification-wrapper":"_notification-wrapper_egqq4_1","notification-item":"_notification-item_egqq4_15","notification--success":"_notification--success_egqq4_30","notification--error":"_notification--error_egqq4_36","close-btn":"_close-btn_egqq4_42","notification--info":"_notification--info_egqq4_45","notification--warning":"_notification--warning_egqq4_52","notification--interactive":"_notification--interactive_egqq4_59","snackbar-type":"_snackbar-type_egqq4_67",snackbar__message:"_snackbar__message_egqq4_76",message:"_message_egqq4_89","error-message":"_error-message_egqq4_97",snackbar__icon:"_snackbar__icon_egqq4_103","actions-notification":"_actions-notification_egqq4_112","icon-draw":"_icon-draw_egqq4_120","copy-btn":"_copy-btn_egqq4_128"}}]]);/*!
|
|
206
|
+
`,nfe=class extends Pue{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,tV),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((n,s)=>{s!==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,s){n!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(s)}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 s=this.extractRowCellValue(e,t,t,"csv",n);this.result+=this.putInQuotes(s.valueFormatted??s.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():(Xe(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=tV),this.isFirstLine=!1}},sfe=class extends Fue{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()){Xe(51);return}const t=this.getMergedParams(e),n=this.getData(t),s=new Blob(["\uFEFF",n],{type:"text/plain"}),o=typeof t.fileName=="function"?t.fileName(Ft(this.gos,{})):t.fileName;Aue(this.getFileName(o),s)}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:s,valueSvc:o,gos:i}=this,{processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:u,suppressQuotes:c,columnSeparator:d}=e;return new nfe({colModel:t,colNames:n,valueSvc:o,gos:i,processCellCallback:r||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:u||void 0,suppressQuotes:c||!1,columnSeparator:d||",",rowGroupColsSvc:s})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function ofe(e,t){var n;return(n=e.csvCreator)==null?void 0:n.getDataAsCsv(t)}function ife(e,t){var n;(n=e.csvCreator)==null||n.exportDataAsCsv(t)}var rfe={moduleName:"CsvExport",version:ut,beans:[sfe],apiFunctions:{getDataAsCsv:ofe,exportDataAsCsv:ife},dependsOn:[tfe]},afe=class extends We{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:s,rowNodes:o}=this;for(let i=0;i<e;i++){const r=n+i,a=new Ja(s);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(r),a.setRowTop(t*r),o.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:n,state:s}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:n,pageStatus:s}}}setDataAndId(e,t,n){dt(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(Vn(this.params.datasource.getRows)){Xe(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:n,params:{sortModel:s,filterModel:o},gos:i}=this;return{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,n),failCallback:this.pageLoadFailed.bind(this,n),sortModel:s,filterModel:o,context:Ft(i,{}).context}}forEachNode(e,t,n){this.rowNodes.forEach((s,o)=>{this.startRow+o<n&&e(s,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((o,i)=>{const r=e.rowData?e.rowData[i]:void 0;!o.id&&o.alreadyRendered&&r&&(t[i]=new Ja(n),t[i].setRowIndex(o.rowIndex),t[i].setRowTop(o.rowTop),t[i].setRowHeight(o.rowHeight),o.clearRowTopAndRowIndex()),this.setDataAndId(t[i],r,this.startRow+i)});const s=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,s)}destroy(){for(const e of this.rowNodes)e.clearRowTopAndRowIndex();super.destroy()}},lfe=2,ufe=class extends We{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 s=this.blocks[n];if(!s){if(t)return;s=this.createBlock(n)}return s.getRow(e)}createBlock(e){const t=this.params,n=this.createBean(new afe(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()&&(ja(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(r=>r!=e),n=(r,a)=>a.lastAccessed-r.lastAccessed;t.sort(n);const s=this.params.maxBlocksInCache>0,o=s?this.params.maxBlocksInCache-1:null,i=lfe-1;t.forEach((r,a)=>{const l=r.state==="needsLoading"&&a>=i,u=s?a>=o:!1;if(l||u){if(this.isBlockCurrentlyDisplayed(r)||this.isBlockFocused(r))return;this.removeBlockFromCache(r)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:n,endRow:s}=e;return t.rowIndex>=n&&t.rowIndex<s}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:s}=this.params,i=(e.id+1)*n+s;this.rowCount<i&&(this.rowCount=i)}}setRowCount(e,t){this.rowCount=e,dt(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,s)=>n.id-s.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 s=-1,o=!1;const i={value:0};let r=!1;for(const l of this.getBlocksInOrder())if(!r){if(o&&s+1!==l.id){r=!0;continue}s=l.id,l.forEachNode(u=>{const c=u===e||u===t;(o||c)&&n.push(u),c&&(o=!o)},i,this.rowCount)}return r||o?[]:n}},cfe=class extends We{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 Ja(e);this.rootNode=t,t.level=-1,this.rowHeight=lu(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=lu(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){var t;let e;this.cacheParams?e=!ff(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;jc(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:s,eventSvc:o,gos:i}=e;this.cacheParams={datasource:this.datasource,filterModel:(t==null?void 0:t.getFilterModel())??{},sortModel:(n==null?void 0:n.getSortModel())??[],rowNodeBlockLoader:s,initialRowCount:i.get("infiniteInitialRowCount"),maxBlocksInCache:i.get("maxBlocksInCache"),rowHeight:lu(e),overflowSize:i.get("cacheOverflowSize"),blockSize:i.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new ufe(this.cacheParams)),o.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 dfe(e){var t;(t=Gv(e))==null||t.refreshCache()}function hfe(e){var t;(t=Gv(e))==null||t.purgeCache()}function ffe(e){var t;return(t=Gv(e))==null?void 0:t.getRowCount()}var pfe=class extends We{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=sQ(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=As(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Ni(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){ja(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:s}=t.getBlockStateJson();e[n]=s}),e}printCacheStatus(){ja(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},gfe={moduleName:"InfiniteRowModelCore",version:ut,rowModels:["infinite"],beans:[cfe,pfe]},mfe={moduleName:"InfiniteRowModel",version:ut,apiFunctions:{refreshInfiniteCache:dfe,purgeInfiniteCache:hfe,getInfiniteRowCount:ffe},dependsOn:[gfe,xhe]},vfe="↑",yfe="↓",wfe={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},Cfe=class extends yn{constructor(){super(wfe),this.eValue=ct,this.eDelta=ct,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const n=Math.abs(t),s=e.formatValue(n),o=dt(s)?s:n,i=t>=0,r=this.eDelta;i?r.textContent=vfe+o:r.textContent=yfe+o,r.classList.toggle("ag-value-change-delta-up",i),r.classList.toggle("ag-value-change-delta-down",!i)}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"),Ps(this.eDelta)}refresh(e,t=!1){var u;const{value:n,valueFormatted:s}=e,{eValue:o,lastValue:i,beans:r}=this;if(n===i||(dt(s)?o.textContent=s:dt(n)?o.textContent=n:Ps(o),(u=r.filterManager)!=null&&u.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n,l=i&&typeof i=="object"&&"toNumber"in i?i.toNumber():i;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return i&&o.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=n,!0}},bfe=".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}",Sfe={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},Efe=class extends yn{constructor(){super(Sfe),this.eCurrent=ct,this.refreshCount=0,this.registerCSS(bfe)}init(e){this.refresh(e,!0)}addSlideAnimation(){var o;this.refreshCount++;const e=this.refreshCount;(o=this.ePrevious)==null||o.remove();const{beans:t,eCurrent:n}=this,s=is({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=s,s.textContent=n.textContent,this.getGui().insertBefore(s,n),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{var i;e===this.refreshCount&&((i=this.ePrevious)==null||i.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var o;let n=e.value;if(Vn(n)&&(n=""),n===this.lastValue||(o=this.beans.filterManager)!=null&&o.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=n;const s=this.eCurrent;return dt(e.valueFormatted)?s.textContent=e.valueFormatted:dt(e.value)?s.textContent=n:Ps(s),!0}},_fe=class extends We{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"),s=this.beans.gos.get("cellFadeDuration")){const o=this.animations[t];o.delete(e);const i=Date.now(),r=i+n,a=i+n+s,l={phase:"flash",flashEndTime:r,fadeEndTime:a};o.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&&r+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=r)}advanceAnimations(){const e=Date.now();let t=null;for(const n of Object.keys(this.animations)){const s=this.animations[n],o=`ag-cell-${n}`,i=`${o}-animation`;for(const[r,a]of s){if(!r.isAlive()||!r.comp){s.delete(r);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}}=r;switch(l){case"flash":f.toggleCss(o,!1),f.toggleCss(i,!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(o,!1),f.toggleCss(i,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),s.delete(r);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=Eoe(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 Rfe(e,t={}){const{cellFlashSvc:n}=e;n&&e.frameworkOverrides.wrapIncoming(()=>{for(const s of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))n.flashCell(s,t)})}var Dfe={moduleName:"HighlightChanges",version:ut,beans:[_fe],userComponents:{agAnimateShowChangeCellRenderer:Cfe,agAnimateSlideCellRenderer:Efe},apiFunctions:{flashCells:Rfe}};function Tfe(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function Ife(e,t,n){var s;return(s=e.stateSvc)==null?void 0:s.setState(t,n)}function nV(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=xfe(e)),e.version=ut,e}function xfe(e){return e.cellSelection=Ffe(e,"rangeSelection"),e}function Ffe(e,t){if(e&&typeof e=="object")return e[t]}var Pfe=class extends We{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=As(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=As(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=As(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=ss(e);const s=nV(e.get("initialState")??{}),o=s.partialColumnState;delete s.partialColumnState,this.cachedState=s;const i=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>i(()=>this.setupStateOnGridReady(s))),(s.columnOrder||s.columnVisibility||s.columnSizing||s.columnPinning||s.columnGroup)&&(n==null||n.hideColumns("columnState"));const[r,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:u})=>{u==="gridInitializing"&&(r(),i(()=>{this.setupStateOnColumnsInitialised(s,!!o),n==null||n.revealColumns("columnState")}))},rowCountReady:()=>{a==null||a(),i(()=>this.setupStateOnRowCountReady(s))},firstDataRendered:()=>{l==null||l(),i(()=>this.setupStateOnFirstDataRendered(s))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const n=nV(e);delete n.partialColumnState,this.cachedState=n,this.startSuppressEvents();const s="api",o=t?new Set(t):void 0;this.setGridReadyState(n,s,o),this.setColumnsInitialisedState(n,s,!!o,o),this.setRowCountState(n,s,o),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(n,s,o),this.stopSuppressEvents(s)})}setGridReadyState(e,t,n){var s,o;t==="api"&&!(n!=null&&n.has("sideBar"))&&((o=(s=this.beans.sideBar)==null?void 0:s.comp)==null||o.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,s){this.setColumnState(e,t,n,s),this.setColumnGroupState(e,t,s),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const n=s=>()=>this.updateColumnState([s]);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:s,rowGroupExpansion:o,ssrmRowGroupExpansion:i,rowSelection:r,pagination:a}=e,l=(c,d)=>!(n!=null&&n.has(c))&&(d||t==="api");l("filter",s)&&this.setFilterState(s),l("rowGroupExpansion",o)&&this.setRowGroupExpansionState(i,o,t),l("rowSelection",r)&&this.setRowSelectionState(r,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))},s=()=>t("filter",this.getFilterState()),{gos:o,colFilter:i}=this.beans;this.addManagedEventListeners({filterChanged:s,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{(o.get("groupDefaultExpanded")!==0||o.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(n)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&t("pagination",this.getPaginationState())}}),i&&this.addManagedListeners(i,{filterStateChanged:s})}setFirstDataRenderedState(e,t,n){const{scroll:s,cellSelection:o,focusedCell:i,columnOrder:r,rowPinning:a}=e,l=(d,h)=>!(n!=null&&n.has(d))&&(h||t==="api");l("focusedCell",i)&&this.setFocusedCellState(i),l("cellSelection",o)&&this.setCellSelectionState(o),l("scroll",s)&&this.setScrollState(s),l("rowPinning",a)&&this.setRowPinningState(a),this.setColumnPivotState(!!(r!=null&&r.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:s=>{if(s.finished){const o=this.getRangeSelectionState();t("rangeSelection",o),t("cellSelection",o)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return Tue(dv(e),e.colModel.isPivotMode())}setColumnState(e,t,n,s){const{sort:o,rowGroup:i,aggregation:r,pivot:a,columnPinning:l,columnVisibility:u,columnSizing:c,columnOrder:d}=e;let h=!1;const f=(D,F)=>{const k=!(s!=null&&s.has(D))&&!!(F||t==="api");return h||(h=k),k},p={},g=D=>{let F=p[D];return F||(F={colId:D},p[D]=F,F)},v={},C=f("sort",o);C&&(o==null||o.sortModel.forEach(({colId:D,sort:F},k)=>{const O=g(D);O.sort=F,O.sortIndex=k})),(C||!n)&&(v.sort=null,v.sortIndex=null);const S=f("rowGroup",i);S&&(i==null||i.groupColIds.forEach((D,F)=>{const k=g(D);k.rowGroup=!0,k.rowGroupIndex=F})),(S||!n)&&(v.rowGroup=null,v.rowGroupIndex=null);const b=f("aggregation",r);b&&(r==null||r.aggregationModel.forEach(({colId:D,aggFunc:F})=>{g(D).aggFunc=F})),(b||!n)&&(v.aggFunc=null);const w=f("pivot",a);w&&(a==null||a.pivotColIds.forEach((D,F)=>{const k=g(D);k.pivot=!0,k.pivotIndex=F}),this.gos.updateGridOptions({options:{pivotMode:!!(a!=null&&a.pivotMode)},source:t})),(w||!n)&&(v.pivot=null,v.pivotIndex=null);const _=f("columnPinning",l);if(_){for(const D of(l==null?void 0:l.leftColIds)??[])g(D).pinned="left";for(const D of(l==null?void 0:l.rightColIds)??[])g(D).pinned="right"}(_||!n)&&(v.pinned=null);const R=f("columnVisibility",u);if(R)for(const D of(u==null?void 0:u.hiddenColIds)??[])g(D).hide=!0;(R||!n)&&(v.hide=null);const T=f("columnSizing",c);if(T)for(const{colId:D,flex:F,width:k}of(c==null?void 0:c.columnSizingModel)??[]){const O=g(D);O.flex=F??null,O.width=k}(T||!n)&&(v.flex=null);const I=d==null?void 0:d.orderedColIds,x=!!(I!=null&&I.length)&&!(s!=null&&s.has("columnOrder")),P=x?I.map(D=>g(D)):Object.values(p);(P.length||h)&&(this.columnStates=P,Li(this.beans,{state:P,applyOrder:x,defaultState:v},t))}setColumnPivotState(e,t){const n=this.columnStates;this.columnStates=void 0;const s=this.columnGroupStates;this.columnGroupStates=void 0;const o=this.beans,{pivotResultCols:i,colGroupSvc:r}=o;if(i!=null&&i.isPivotResultColsPresent()){if(n){const a=[];for(const l of n)i.getPivotResultCol(l.colId)&&a.push(l);Li(o,{state:a,applyOrder:e},t)}s&&(r==null||r.setColumnGroupState(s,t))}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return Iue(t)}setColumnGroupState(e,t,n){var a;const s=this.beans.colGroupSvc;if(!s||n!=null&&n.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const o=new Set((a=e.columnGroup)==null?void 0:a.openColumnGroupIds),r=s.getColumnGroupState().map(({groupId:l})=>{const u=o.has(l);return u&&o.delete(l),{groupId:l,open:u}});for(const l of o)r.push({groupId:l,open:!0});r.length&&(this.columnGroupStates=r),s.setColumnGroupState(r,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(),s=(e==null?void 0:e.getAdvFilterModel())??void 0;return t||s||n?{filterModel:t,columnFilterState:n,advancedFilterModel:s}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:n,columnFilterState:s,advancedFilterModel:o}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(n!==void 0||s!==void 0)&&(t==null||t.setFilterState(n??null,s??null,"columnFilter")),o!==void 0&&(t==null||t.setAdvFilterModel(o??null,"advancedFilter"))}getRangeSelectionState(){var t;const e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(n=>{const{id:s,type:o,startRow:i,endRow:r,columns:a,startColumn:l}=n;return{id:s,type:o,startRow:i,endRow:r,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:s,visibleCols:o}=this.beans;if(!ta(t)||!n)return;const i=[];for(const r of(e==null?void 0:e.cellRanges)??[]){const a=[];for(const u of r.colIds){const c=s.getCol(u);c&&a.push(c)}if(!a.length)continue;let l=s.getCol(r.startColId);if(!l){const u=o.allCols,c=new Set(a);l=u.find(d=>c.has(d))}i.push({...r,columns:a,startColumn:l})}n.setCellRanges(i)}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:s,rowRenderer:o,animationFrameSvc:i,ctrlsSvc:r}=this.beans;s.wrapIncoming(()=>{var a;r.get("center").setCenterViewportScrollLeft(n),(a=r.getScrollFeature())==null||a.setVerticalScrollPosition(t),o.redraw({afterScroll:!0}),i==null||i.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:s}=e;return{colId:t.getColId(),rowIndex:n,rowPinned:s}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:n}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:s,rowIndex:o,rowPinned:i}=e;t.setFocusedCell({column:n.getCol(s),rowIndex:o,rowPinned:i,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const n=e.getCurrentPage(),s=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!n&&!s))return{page:n,pageSize:s}}setPaginationState(e,t){const{pagination:n,gos:s}=this.beans;if(!n)return;const{pageSize:o,page:i}=e??{page:0,pageSize:s.get("paginationPageSize")},r=t==="gridInitializing";o&&!s.get("paginationAutoPageSize")&&n.setPageSize(o,r?"initialState":"pageSizeSelector"),typeof i=="number"&&(r?n.setPage(i):n.goToPage(i))}getRowSelectionState(){var s;const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((s=t==null?void 0:t.toggledNodes)!=null&&s.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 s=this.beans.expansionSvc;if(!s)return;const o=t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};s.setExpansionState(o,n)}updateColumnState(e){const t=this.getColumnState();let n=!1;const s=this.cachedState;for(const o of Object.keys(t)){const i=t[o];ff(i,s[o])||(n=!0)}this.cachedState={...s,...t},n&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const n=this.cachedState[e];this.setCachedStateValue(e,t),ff(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")}},Afe={moduleName:"GridState",version:ut,beans:[Pfe],apiFunctions:{getState:Tfe,setState:Ife}};function kfe(e){return e.rowModel.isLastRowIndexKnown()}function Ofe(e){var t;return((t=e.pagination)==null?void 0:t.getPageSize())??100}function Mfe(e){var t;return((t=e.pagination)==null?void 0:t.getCurrentPage())??0}function Nfe(e){var t;return((t=e.pagination)==null?void 0:t.getTotalPages())??1}function Lfe(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function Vfe(e){var t;(t=e.pagination)==null||t.goToNextPage()}function Bfe(e){var t;(t=e.pagination)==null||t.goToPreviousPage()}function $fe(e){var t;(t=e.pagination)==null||t.goToFirstPage()}function Hfe(e){var t;(t=e.pagination)==null||t.goToLastPage()}function Gfe(e,t){var n;(n=e.pagination)==null||n.goToPage(t)}var Ufe=class extends We{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 s=Math.max(lu(t),1),o=Math.floor(e/s);t.pagination.setPageSize(o,"autoCalculated")};this.isBodyRendered?As(this,n,50)():(n(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},Yf="paginationPageSizeSelector",Wfe={tag:"span",cls:"ag-paging-page-size"},zfe=class extends yn{constructor(){super(Wfe),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(Yf,()=>{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(){Ps(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(Yf)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),n=!t||!e.includes(t);if(n){const o=this.gos.exists("paginationPageSize"),i=this.gos.get(Yf)!==!0;Xe(94,{pageSizeSet:o,pageSizesSet:i,pageSizeOptions:e,paginationPageSizeOption:t}),i||Xe(95,{paginationPageSizeOption:t,paginationPageSizeSelector:Yf}),e.unshift("")}const s=String(n?"":t);this.selectPageSizeComp?(Ya(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(s,!0)):this.createPageSizeSelectorComp(e,s),this.hasEmptyOption=n}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const n=this.getLocaleTextFunc(),s=n("pageSizeSelectorLabel","Page Size:"),o=n("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new uE).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(o).setLabel(s).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(Yf);return!Array.isArray(t)||!(t!=null&&t.length)?e:[...t].sort((n,s)=>n-s)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},jfe={selector:"AG-PAGE-SIZE-SELECTOR",component:zfe},Kfe=".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}",qfe=class extends fN{constructor(){super(),this.btFirst=ct,this.btPrevious=ct,this.btNext=ct,this.btLast=ct,this.lbRecordCount=ct,this.lbFirstRowOnPage=ct,this.lbLastRowOnPage=ct,this.lbCurrent=ct,this.lbTotal=ct,this.pageSizeComp=ct,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(Kfe)}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(),[jfe]);const{btFirst:t,btPrevious:n,btNext:s,btLast:o}=this;this.activateTabIndex([t,n,s,o]),t.insertAdjacentElement("afterbegin",li(e?"last":"first",this.beans)),n.insertAdjacentElement("afterbegin",li(e?"next":"previous",this.beans)),s.insertAdjacentElement("afterbegin",li(e?"previous":"next",this.beans)),o.insertAdjacentElement("afterbegin",li(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:i=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(i):Une(this.beans,i),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:s=>{(s.key===Oe.ENTER||s.key===Oe.SPACE)&&(s.preventDefault(),n())}})}Gne(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}):xue(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 s=this.isZeroPagesToDisplay(),o=e===n-1;this.nextButtonDisabled=o||s,this.lastButtonDisabled=!t||s||e===n-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){sJ(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(),s=e?n:null,o=this.pagination.getCurrentPage(),i=this.pagination.getPageSize();let r,a;this.isZeroPagesToDisplay()?r=a=0:(r=i*o+1,a=r+i-1,e&&a>s&&(a=s));const l=r+i-1,u=!e&&n<l,c=this.formatNumber(r);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?o+1:0,g=this.formatNumber(p);this.lbCurrent.textContent=g;let v,C;if(e)v=this.formatNumber(t),C=this.formatNumber(s);else{const S=h("more","more");v=S,C=S}this.lbTotal.textContent=v,this.lbRecordCount.textContent=C,this.announceAriaStatus(c,d,C,g,v)}announceAriaStatus(e,t,n,s,o){var d,h;const i=this.getLocaleTextFunc(),r=i("page","Page"),a=i("to","to"),l=i("of","of"),u=`${e} ${a} ${t} ${l} ${n}`,c=`${r} ${s} ${l} ${o}`;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"))}},Yfe={selector:"AG-PAGINATION",component:qfe},Zfe=class extends We{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 Yfe}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,s;if(!this.active)return;let t=e;this.paginateChildRows||(t=((s=(n=this.beans.rowModel).getTopLevelIndexFromDisplayedIndex)==null?void 0:s.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 dt(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:dt(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:dt(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:dt(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,s=t-1;this.totalPages=Math.floor(s/n)+1,this.adjustCurrentPageIfInvalid();const o=this.currentPage,i=n*o;let r=n*(o+1)-1;if(r>s&&(r=s),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(i),r===s)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(r+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,s=e-1;this.totalPages=Math.floor(s/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*n,this.bottomDisplayedRowIndex=t*(n+1)-1,this.bottomDisplayedRowIndex>s&&(this.bottomDisplayedRowIndex=s)}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:s=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:n,newPageSize:s,keepRenderedRows:t})}},Xfe={moduleName:"Pagination",version:ut,beans:[Zfe,Ufe],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:kfe,paginationGetPageSize:Ofe,paginationGetCurrentPage:Mfe,paginationGetTotalPages:Nfe,paginationGetRowCount:Lfe,paginationGoToNextPage:Vfe,paginationGoToPreviousPage:Bfe,paginationGoToFirstPage:$fe,paginationGoToLastPage:Hfe,paginationGoToPage:Gfe},dependsOn:[Uv]};function Jfe(e,t={}){const n=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(n))}function sV(e,t,n,s,o){t&&(s&&t.parent&&t.parent.level!==-1&&sV(e,t.parent,n,s,o),t.setExpanded(n,void 0,o))}function Qfe(e,t){return e.rowModel.getRowNode(t)}function epe(e,t,n,s){e.rowRenderer.addRenderedRowListener(t,n,s)}function tpe(e){return e.rowRenderer.getRenderedNodes()}function npe(e,t,n){e.rowModel.forEachNode(t,n)}function spe(e){return e.rowRenderer.firstRenderedRow}function ope(e){return e.rowRenderer.lastRenderedRow}function ipe(e,t){return e.rowModel.getRow(t)}function rpe(e){return e.rowModel.getRowCount()}var ape={moduleName:"RowApi",version:ut,apiFunctions:{redrawRows:Jfe,setRowNodeExpanded:sV,getRowNode:Qfe,addRenderedRowListener:epe,getRenderedNodes:tpe,forEachNode:npe,getFirstDisplayedRowIndex:spe,getLastDisplayedRowIndex:ope,getDisplayedRowAtIndex:ipe,getDisplayedRowCount:rpe}},lpe={moduleName:"ScrollApi",version:ut,apiFunctions:{getVerticalPixelRange:bde,getHorizontalPixelRange:Sde,ensureColumnVisible:VL,ensureIndexVisible:BL,ensureNodeVisible:Ede}};function upe(e,t,n){if(!t)return;const s=e.ctrlsSvc.getGridBodyCtrl().eGridBody,o=`aria-${t}`;n===null?s.removeAttribute(o):s.setAttribute(o,n)}function cpe(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function dpe(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function hpe(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function fpe(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function ppe(e){return{rowHeight:lu(e),headerHeight:Nf(e)}}function gpe(e,t={}){var i;const n=[];for(const r of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const a=r.getCellRenderer();a!=null&&n.push(kf(a))}if((i=t.columns)!=null&&i.length)return n;const s=[],o=r0(t.rowNodes);for(const r of e.rowRenderer.getAllRowCtrls()){if(o&&!a0(r.rowNode,o)||!r.isFullWidth())continue;const a=r.getFullWidthCellRenderers();for(let l=0;l<a.length;l++){const u=a[l];u!=null&&s.push(kf(u))}}return[...s,...n]}var mpe={moduleName:"RenderApi",version:ut,apiFunctions:{setGridAriaProperty:upe,refreshCells:cpe,refreshHeader:dpe,isAnimationFrameQueueEmpty:hpe,flushAllAnimationFrames:fpe,getSizesForCurrentTheme:ppe,getCellRendererInstances:gpe}};function vpe(e,t){var n,s;typeof t=="number"?(n=e.colAutosize)==null||n.sizeColumnsToFit(t,"api"):(s=e.colAutosize)==null||s.sizeColumnsToFitGridBody(t)}function oV({colAutosize:e,visibleCols:t},n,s){Array.isArray(n)?e==null||e.autoSizeCols({colKeys:n,skipHeader:s,source:"api"}):e==null||e.autoSizeCols({...n,colKeys:n.colIds??t.allCols,source:"api"})}function ype(e,t){var n;t&&typeof t=="object"?oV(e,t):(n=e.colAutosize)==null||n.autoSizeAllColumns({source:"api",skipHeader:t})}var wpe=class extends We{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 s=!1;const o=t.type;if(o==="fitGridWidth"||o==="fitProvidedWidth")s=!0;else if(o==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const i=e.get("rowData");s=i!=null&&i.length>0&&ss(e)}s&&((n=this.beans.colDelayRenderSvc)==null||n.hideColumns(o))}}autoSizeCols(e){const{eventSvc:t,visibleCols:n}=this.beans;this.innerAutoSizeCols(e).then(s=>{var u;const o=c=>Yc(t,Array.from(c),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return o(s);const i=iV(this.beans),r=c=>n.leftCols.some(d=>Ff(d,c)),a=c=>n.rightCols.some(d=>Ff(d,c)),l=e.colKeys.filter(c=>!sa(c)&&!oa(c)&&!r(c)&&!a(c));this.sizeColumnsToFit(i,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}),o(s)})}innerAutoSizeCols(e){return new Promise((t,n)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,n));const{colKeys:s,skipHeader:o,skipHeaderGroups:i,stopAtGroup:r,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 C=-1;const S=Object.fromEntries(u.map(({colId:_,...R})=>[_,R])),b=o??this.gos.get("skipHeaderOnAutoSize"),w=i??b;for(;C!==0;){C=0;const _=[];for(const R of s){if(!R||mQ(R))continue;const T=f.getCol(R);if(!T||v.has(T))continue;const I=p.getPreferredWidthForColumn(T,b);if(I>0){const x=S[T.colId]??{};x.minWidth??(x.minWidth=l),x.maxWidth??(x.maxWidth=a);const P=Cpe(T,I,x);T.setActualWidth(P,c),v.add(T),C++}_.push(T)}_.length&&g.refresh(c)}w||this.autoSizeColumnGroupsByColumns(s,c,r),t(v)})}autoSizeColumn(e,t,n){this.autoSizeCols({colKeys:[e],skipHeader:n,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,n){const{colModel:s,ctrlsSvc:o}=this.beans,i=new Set,r=s.getColsForKeys(e);for(const l of r){let u=l.getParent();for(;u&&u!=n;)u.isPadding()||i.add(u),u=u.getParent()}let a;for(const l of i){for(const u of o.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"),s=()=>{this.autoSizeColumn(t,"uiColumnResized",n)};e.addEventListener("dblclick",s);const o=new yu(e);return o.addEventListener("doubleTap",s),()=>{e.removeEventListener("dblclick",s),o.destroy()}}addColumnGroupResize(e,t,n){const s=this.gos.get("skipHeaderOnAutoSize"),o=()=>{const i=[],r=t.getDisplayedLeafColumns();for(const a of r)a.getColDef().suppressAutoSize||i.push(a.getColId());i.length>0&&this.autoSizeCols({colKeys:i,skipHeader:s,stopAtGroup:t,source:"uiColumnResized"}),n()};return e.addEventListener("dblclick",o),()=>e.removeEventListener("dblclick",o)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const n=iV(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):Xe(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",n,s){var p,g;if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,n,s));return}const o={};for(const{key:v,...C}of(s==null?void 0:s.columnLimits)??[])o[typeof v=="string"?v:v.getColId()]=C;const i=this.beans.visibleCols.allCols;if(e<=0||!i.length)return;const r=na(i);if(s!=null&&s.onlyScaleUp&&r>e||e===r&&i.every(C=>{if(C.colDef.suppressSizeToFit)return!0;const S=o==null?void 0:o[C.getId()],b=(S==null?void 0:S.minWidth)??(s==null?void 0:s.defaultMinWidth),w=(S==null?void 0:S.maxWidth)??(s==null?void 0:s.defaultMaxWidth),_=C.getActualWidth();return(b==null||_>=b)&&(w==null||_<=w)}))return;const l=[],u=[];for(const v of i){const C=((p=s==null?void 0:s.colKeys)==null?void 0:p.some(S=>Ff(v,S)))??!0;v.getColDef().suppressSizeToFit||!C?u.push(v):l.push(v)}const c=l.slice(0);let d=!1;const h=v=>{Ni(l,v),u.push(v)};for(const v of l){v.resetActualWidth(t);const C=o==null?void 0:o[v.getId()],S=(C==null?void 0:C.minWidth)??(s==null?void 0:s.defaultMinWidth),b=(C==null?void 0:C.maxWidth)??(s==null?void 0:s.defaultMaxWidth),w=v.getActualWidth();typeof S=="number"&&w<S?v.setActualWidth(S,t,!0):typeof b=="number"&&w>b&&v.setActualWidth(b,t,!0)}for(;!d;){d=!0;const v=e-na(u);if(v<=0)for(const C of l){const S=((g=o==null?void 0:o[C.getId()])==null?void 0:g.minWidth)??(s==null?void 0:s.defaultMinWidth)??C.minWidth;C.setActualWidth(S,t,!0)}else{const C=v/na(l);let S=v;for(let b=l.length-1;b>=0;b--){const w=l[b],_=o==null?void 0:o[w.getId()],R=(_==null?void 0:_.minWidth)??(s==null?void 0:s.defaultMinWidth),T=(_==null?void 0:_.maxWidth)??(s==null?void 0:s.defaultMaxWidth),I=w.getMinWidth(),x=w.getMaxWidth(),P=typeof R=="number"&&R>I?R:I,D=typeof T=="number"&&T<x?T:x;let F=Math.round(w.getActualWidth()*C);F<P?(F=P,h(w),d=!1):F>D?(F=D,h(w),d=!1):b===0&&(F=S),w.setActualWidth(F,t,!0),S-=F}}}for(const v of c)v.fireColumnWidthChangedEvent(t);const f=this.beans.visibleCols;f.setLeftValues(t),f.updateBodyWidths(),!n&&Yc(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 s=n.type;if(s==="fitGridWidth"){const{columnLimits:o,defaultMinWidth:i,defaultMaxWidth:r}=n,a=o==null?void 0:o.map(({colId:l,minWidth:u,maxWidth:c})=>({key:l,minWidth:u,maxWidth:c}));this.sizeColumnsToFitGridBody({defaultMinWidth:i,defaultMaxWidth:r,columnLimits:a})}else s==="fitProvidedWidth"&&this.sizeColumnsToFit(n.width,"sizeColumnsToFit");t==null||t.revealColumns(s)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{var s;if(!this.isAlive())return;const n="autosizeColumns";e?this.autoSizeCols({...t,source:n,colKeys:e}):this.autoSizeAllColumns({...t,source:n}),(s=this.beans.colDelayRenderSvc)==null||s.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 Cpe(e,t,n={}){const s=n.minWidth??e.getMinWidth();t<s&&(t=s);const o=n.maxWidth??e.getMaxWidth();return t>o&&(t=o),t}function iV({ctrlsSvc:e,scrollVisibleSvc:t}){const n=e.getGridBodyCtrl(),o=n.isVerticalScrollShowing()?t.getScrollbarWidth():0;return yf(n.eGridBody)-o}var bpe={moduleName:"ColumnAutoSize",version:ut,beans:[wpe],apiFunctions:{sizeColumnsToFit:vpe,autoSizeColumns:oV,autoSizeAllColumns:ype},dependsOn:[FN]},Spe=".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 Epe(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function _pe(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function Rpe(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedTopRow(t)}function Dpe(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedBottomRow(t)}function Tpe(e,t,n){var s;return(s=e.pinnedRowModel)==null?void 0:s.forEachPinnedRow(t,n)}var Ipe={moduleName:"PinnedRow",version:ut,beans:[Rse],css:[Spe],apiFunctions:{getPinnedTopRowCount:Epe,getPinnedBottomRowCount:_pe,getPinnedTopRow:Rpe,getPinnedBottomRow:Dpe,forEachPinnedRow:Tpe},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},xpe=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 s of this.spannedNodes)s!==this.lastNode&&(t+=s.rowHeight);return e-t}},Fpe=class extends We{constructor(e){super(),this.column=e}buildCache(e){var b;const{column:t,beans:{gos:n,pinnedRowModel:s,rowModel:o,valueSvc:i,pagination:r}}=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 C=(w,_)=>{p=w,g=null,v=_},S=w=>{const _=!w.isExpandable()&&!w.group&&!w.detail&&(c?!c({rowNode:w}):!0);if(w.rowIndex==null||!_){C(null,null);return}if(p==null||w.level!==p.level||w.footer||g&&w.rowIndex-1!==(g==null?void 0:g.getLastNode().rowIndex)){C(w,i.getValue(t,w));return}const R=i.getValue(t,w);if(f){const T=Ft(n,{valueA:v,nodeA:p,valueB:R,nodeB:w,column:t,colDef:a});if(!h(T)){C(w,R);return}}else if(d?!d(v,R):v!==R){C(w,R);return}if(!g){const T=l==null?void 0:l.get(p);(T==null?void 0:T.firstNode)===p?(T.reset(),g=T):g=new xpe(t,p),u.set(p,g)}g.addSpannedNode(w),u.set(w,g)};switch(e){case"center":(b=o.forEachDisplayedNode)==null||b.call(o,w=>{(!r||r.isRowInPage(w.rowIndex))&&S(w)}),this.centerValueNodeMap=u;break;case"top":s==null||s.forEachPinnedRow("top",S),this.topValueNodeMap=u;break;case"bottom":s==null||s.forEachPinnedRow("bottom",S),this.bottomValueNodeMap=u;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},Ppe=class extends We{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=As(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=As(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 Fpe(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,s=e.column,o=e.rowIndex,i=this.spanningColumns.get(s);if(!i)return;let r;switch(e.rowPinned){case"top":r=t==null?void 0:t.getPinnedTopRow(o);break;case"bottom":r=t==null?void 0:t.getPinnedBottomRow(o);break;default:r=n.getRow(o)}if(r)return i.getCellSpan(r)}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,s]of this.spanningColumns)if(s.isCellSpanning(e)){const o=s.getCellSpan(e);t(n,o)}}destroy(){super.destroy(),this.spanningColumns.clear()}},Ape=class extends ad{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,s,o,i,r){this.eWrapper=n,super.setComp(e,t,n,s,o,i,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||zm(e,t.rowIndex)}setAriaRowSpan(){lJ(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(Pv(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}},kpe=class extends Hv{onRowIndexChanged(){super.onRowIndexChanged();for(const e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){var s;const t=(s=this.beans.rowSpanSvc)==null?void 0:s.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new Ape(t,this,this.beans)}isCorrectCtrlForSpan(e){var s;const t=(s=this.beans.rowSpanSvc)==null?void 0:s.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},Ope=class extends We{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),s=n.size,o=this.getAllRelevantRowControls(e),i=new Map;let r=!1;for(const l of o)l.isAlive()&&(t==null||t.forEachSpannedColumn(l.rowNode,(u,c)=>{if(i.has(c.firstNode))return;const d=n.get(c.firstNode);if(d){i.set(c.firstNode,d),n.delete(c.firstNode);return}r=!0;const h=new kpe(c.firstNode,this.beans,!1,!1,!1);i.set(c.firstNode,h)}));this.setCtrlsMap(e,i);const a=i.size===s;if(!(!r&&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 s=this.getCtrlsMap(e.rowPinned).get(n.firstNode);if(s)return s.getAllCellCtrls().find(o=>o.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")}},Mpe={moduleName:"CellSpan",version:ut,beans:[Ppe,Ope]},Npe=class extends We{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,s=n.cellClassRules,o=this.getCellClassParams(e,n);o0(this.beans.expressionSvc,s===this.cellClassRules?void 0:this.cellClassRules,s,o,i=>t.toggleCss(i,!0),i=>t.toggleCss(i,!1)),this.cellClassRules=s}applyUserStyles(){const e=this.column,t=e.colDef,n=t.cellStyle;if(!n)return;let s;if(typeof n=="function"){const o=this.getCellClassParams(e,t);s=n(o)}else s=n;s&&this.cellComp.setUserStyles(s)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,n=e.colDef,s=this.getCellClassParams(e,n);for(const i of this.staticClasses)t.toggleCss(i,!1);const o=this.beans.cellStyles.getStaticCellClasses(n,s);this.staticClasses=o;for(const i of o)t.toggleCss(i,!0)}getCellClassParams(e,t){const{value:n,rowNode:s}=this.cellCtrl;return Ft(this.beans.gos,{value:n,data:s.data,node:s,colDef:t,column:e,rowIndex:s.rowIndex})}},Lpe=class extends We{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,n,s){o0(this.beans.expressionSvc,void 0,e.cellClassRules,t,n,s),this.processStaticCellClasses(e,t,n)}getStaticCellClasses(e,t){const{cellClass:n}=e;if(!n)return[];let s;return typeof n=="function"?s=n(t):s=n,typeof s=="string"&&(s=[s]),s||[]}createCellCustomStyleFeature(e,t){return new Npe(e,t)}processStaticCellClasses(e,t,n){this.getStaticCellClasses(e,t).forEach(o=>{n(o)})}},Vpe={moduleName:"CellStyle",version:ut,beans:[Lpe]},Bpe={moduleName:"RowStyle",version:ut,beans:[Rle]};function $pe(e,t){var n;return!!((n=e.colHover)!=null&&n.isHovered(t))}var Hpe=class extends We{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=n=>{const{beans:s,gos:o,element:i,columns:r}=this,a=s.colHover;if(n??!!o.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(i,{mouseover:a.setMouseOver.bind(a,r),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}},Gpe="ag-column-hover",Upe=class extends We{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 s=()=>{const o=this.isHovered(n);t.toggleCss("ag-column-hover",o)};e.addManagedEventListeners({columnHoverChanged:s}),s()}onCellColumnHover(e,t){if(!t)return;const n=this.isHovered(e);t.toggleCss(Gpe,n)}addHeaderFilterColumnHoverListener(e,t,n,s){this.createHoverFeature(e,[n],s);const o=()=>{const i=this.isHovered(n);t.toggleCss("ag-column-hover",i)};e.addManagedEventListeners({columnHoverChanged:o}),o()}createHoverFeature(e,t,n){e.createManagedBean(new Hpe(t,n))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},Wpe={moduleName:"ColumnHover",version:ut,beans:[Upe],apiFunctions:{isColumnHovered:$pe}},zpe=class extends We{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 i;const n=((i=this.wrapSvc)==null?void 0:i.wrap(e,t))??t,s=!Vv.has(e),o=s?this.asyncListeners:this.syncListeners;o.has(e)||o.set(e,new Set),o.get(e).add(n),this.eventSvc.addListener(e,n,s)}removeListener(e,t){var i,r;const n=((i=this.wrapSvc)==null?void 0:i.unwrap(e,t))??t,s=this.asyncListeners.get(e),o=!!(s!=null&&s.delete(n));o||(r=this.syncListeners.get(e))==null||r.delete(n),this.eventSvc.removeListener(e,n,o)}addGlobalListener(e){var i;const t=((i=this.wrapSvc)==null?void 0:i.wrapGlobal(e))??e,n=(r,a)=>{Vv.has(r)&&t(r,a)},s=(r,a)=>{Vv.has(r)||t(r,a)};this.globalListenerPairs.set(e,{syncListener:n,asyncListener:s});const o=this.eventSvc;o.addGlobalListener(n,!1),o.addGlobalListener(s,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:n,globalListenerPairs:s}=this,o=(n==null?void 0:n.unwrapGlobal(e))??e;if(s.has(o)){const{syncListener:r,asyncListener:a}=s.get(o);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!0),s.delete(e)}else this.syncGlobalListeners.delete(o),t.removeGlobalListener(o,!1)}destroyEventListeners(e,t){e.forEach((n,s)=>{n.forEach(o=>this.eventSvc.removeListener(s,o,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:s})=>{t.removeGlobalListener(n,!1),t.removeGlobalListener(s,!0)}),e.clear()}};function jpe(e,t,n){var s;(s=e.apiEventSvc)==null||s.addListener(t,n)}function Kpe(e,t,n){var s;(s=e.apiEventSvc)==null||s.removeListener(t,n)}function qpe(e,t){var n;(n=e.apiEventSvc)==null||n.addGlobalListener(t)}function Ype(e,t){var n;(n=e.apiEventSvc)==null||n.removeGlobalListener(t)}var Zpe={moduleName:"EventApi",version:ut,apiFunctions:{addEventListener:jpe,addGlobalListener:qpe,removeEventListener:Kpe,removeGlobalListener:Ype},beans:[zpe]},Xpe={moduleName:"Locale",version:ut,beans:[Due]},Jpe=class extends We{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=As(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:s}=this.beans,o=e.autoHeightCols;let i=!1;const r=d=>{var p;const h=d.__autoHeights;let f=Ka(this.beans,d).height;for(const g of o){let v=h==null?void 0:h[g.getColId()];const C=n==null?void 0:n.getCellSpan(g,d);if(C){if(C.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),i=!0)};(a=s==null?void 0:s.forEachPinnedRow)==null||a.call(s,"top",r),(l=s==null?void 0:s.forEachPinnedRow)==null||l.call(s,"bottom",r),(u=t.forEachDisplayedNode)==null||u.call(t,r),i&&((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 s=e.__autoHeights[n.getId()];e.__autoHeights[n.getId()]=t,s!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:n,colViewport:s,visibleCols:o}=this.beans;if(!n.colSpanActive)return!1;let i=[];switch(e.getPinned()){case"left":i=o.getLeftColsForRow(t);break;case"right":i=o.getRightColsForRow(t);break;case null:i=s.getColsWithinViewport(t);break}return!i.includes(e)}setupCellAutoHeight(e,t,n){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const s=t.parentElement,{rowNode:o,column:i}=e,r=this.beans,a=c=>{var S;if((S=this.beans.editSvc)!=null&&S.isEditing(e)||!e.isAlive()||!n.isAlive())return;const{paddingTop:d,paddingBottom:h,borderBottomWidth:f,borderTopWidth:p}=ru(s),g=d+h+f+p,C=t.offsetHeight+g;if(c<5){const b=Rs(r),w=!(b!=null&&b.contains(t)),_=C==0;if(w||_){window.setTimeout(()=>a(c+1),0);return}}this.setRowAutoHeight(o,C,i)},l=()=>a(0);l();const u=Wa(r,t,l);return n.addDestroyFunc(()=>{u(),this.setRowAutoHeight(o,void 0,i)}),!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(o=>o.isAutoHeight())),t.length!==0){if(!n.__autoHeights)return!1;for(const s of t){const o=n.__autoHeights[s.getColId()];if(!o||n.rowHeight<o)return!1}}return!0}},Qpe={moduleName:"RowAutoHeight",version:ut,beans:[Jpe]},ege={moduleName:"AllCommunity",version:ut,dependsOn:[eV,rfe,mfe,Wue,ehe,the,nhe,she,ohe,ihe,rhe,Qde,jce,Kce,qce,zce,Zce,Xce,Afe,Phe,Xfe,ON,ape,lpe,mpe,bpe,Boe,Ipe,bhe,aue,Vpe,Wpe,Bpe,Zpe,cue,Dfe,ML,Xpe,Qpe,Voe,Qhe,Mpe]};const tge=rt({__name:"StatusUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{},disabled:{type:Boolean}},emits:["updated","update-start","update-completed","update-failed"],setup(e,{emit:t}){const n=e,s=Y(()=>{const h=Yn();return h==null?void 0:h.appContext.config.globalProperties.apiServices}),o=t,i=B(!1),r=B(null),a=h=>{i.value=!1,o("updated",h)},l=Y(()=>({apiServices:s.value,ids:n.ids,workspaceId:n.workspaceId,entityId:n.entityId}));Zi("bulkUpdate",!0);const u=(h,f)=>{console.trace("Status update button setLoading called with value:",h,"hide:",f),i.value=h,o(h?"update-start":"update-completed"),setTimeout(()=>{var p,g;f?(p=r.value)==null||p.hide():(g=r.value)==null||g.open()},300)},c=B(null),d=(h,f)=>{var p;h&&((p=c.value)==null||p.focus())};return(h,f)=>(j(),qe(sf,{ref_key:"wrapperRef",ref:r,isUpdating:i.value,disabled:n.disabled||i.value,onOnVisibleChange:d},{trigger:me(({hide:p,disabled:g})=>[ge(mt,{variant:n.variant,loading:i.value,disabled:g,onEscape:p},{default:me(()=>[ge(lt,{src:"Square",class:"icon"}),f[3]||(f[3]=tt(" Status ",-1))]),_:1},8,["variant","loading","disabled","onEscape"])]),popup:me(({hide:p,isVisible:g})=>[Ke(ge(Bk,nn({disabled:i.value,ref_key:"statusRef",ref:c},l.value,{onUpdated:a,onCancel:p,onStartUpdate:f[0]||(f[0]=v=>u(!0,!0)),onFinishUpdate:f[1]||(f[1]=v=>u(!1,!0)),onError:f[2]||(f[2]=()=>{u(!1,!1)}),callback:()=>u(!1,!0)}),null,16,["disabled","onCancel","callback"]),[[Do,g]])]),default:me(()=>[f[4]||(f[4]=tt(" > ",-1))]),_:1},8,["isUpdating","disabled"]))}}),rV=_t(rt({name:"MoreOptionEditor",__name:"MoreOptionEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},optionBlock:{},isSubmenu:{type:Boolean,default:!1},layer:{default:0},focusableIndex:{}},emits:["actionExecuted"],setup(e,{expose:t,emit:n}){const s=Ur,o=e,i=Y(()=>(o==null?void 0:o.workspaceId)||""),r=Y(()=>(o==null?void 0:o.entityId)||""),a=()=>{var O,$,q;return(q=(O=o.params)==null?void 0:O.api)==null?void 0:q.getCellRendererInstances({columns:["options"],rowNodes:($=o.params)!=null&&$.node?[o.params.node]:[]})[0]},l=()=>{var $,q,J,ee;const O=a();(q=($=O==null?void 0:O.componsenExposed)==null?void 0:$.blur)==null||q.call($),(ee=(J=O==null?void 0:O.container)==null?void 0:J.parentElement)==null||ee.classList.remove("ag-cell-focus")},u=()=>{var q,J,ee;(J=(q=o.params)==null?void 0:q.api)==null||J.stopEditing(),l();const O=`scene-name-${o.id}`,$=document.getElementById(O);(ee=$==null?void 0:$.__sceneNameEditor)==null||ee.startEdit()},{apiServices:c}=ts(!0,o),d=Y(()=>{var O;return{ws_code:i.value,entity_id:r.value,scene_id:o.id,axiosService:c,optionBlock:o.optionBlock,permissions:(O=o.data)==null?void 0:O.permissions}}),h=O=>{var q,J,ee,X,ve,te;let $=(J=(q=o.params)==null?void 0:q.api)==null?void 0:J.getRowNode(String(o.id));if($){const N={...$.data,isDeleted:O==="deleted",isArchived:O==="archived"?!0:$.data.isArchived,isLocked:O==="locked"?!0:$.data.isLocked,disabled:!1};O=="deleted"&&(N.isLocked=!1,N.disabled=!0),O=="unarchived"&&(N.isArchived=!1),(X=(ee=o.params)==null?void 0:ee.api)==null||X.redrawRows({rowNodes:[$]}),$.setData(N),(te=(ve=o.params)==null?void 0:ve.api)==null||te.redrawRows({rowNodes:[$]})}},f=tf(),{openSceneHub:p}=f,g=()=>{Ct(()=>{var q,J,ee,X,ve,te;const O=((J=(q=o.params)==null?void 0:q.node)==null?void 0:J.rowIndex)||0,$=((X=(ee=o.params)==null?void 0:ee.column)==null?void 0:X.getColId())||"";(te=(ve=o.params)==null?void 0:ve.api)==null||te.setFocusedCell(O,$)})};Y(()=>{var $,q;const O=(q=($=o.params)==null?void 0:$.api)==null?void 0:q.getRowNode(String(o.id));return O==null?void 0:O.data});const{options:v}=pY(d,h,u,p,g),C=n,S=()=>{var O,$,q,J,ee,X;console.trace("Focusing current cell for row:",o.id),(X=(O=o.params)==null?void 0:O.api)==null||X.setFocusedCell(((q=($=o.params)==null?void 0:$.node)==null?void 0:q.rowIndex)||0,((ee=(J=o.params)==null?void 0:J.column)==null?void 0:ee.getColId())||"")},b=Y(()=>{var O;return(O=o.params)==null?void 0:O.api}),w=(O,$)=>{var q,J,ee,X,ve,te,N,V;if(C("actionExecuted",O),O.id=="copy-link"){(ve=b.value)==null||ve.startEditingCell({rowIndex:(J=(q=o.params)==null?void 0:q.node)==null?void 0:J.rowIndex,colKey:(X=(ee=o.params)==null?void 0:ee.column)==null?void 0:X.getColId()});return}else{if(O.id!=="copy-link"&&((te=b.value)==null||te.stopEditing()),O.id==="rename")(N=b.value)==null||N.stopEditing(),(V=b.value)==null||V.clearFocusedCell(),l();else if(O.id==="copy-link"){const ne=document.getElementById($);setTimeout(()=>{var ie,pe,ae;(ae=(pe=(ie=ne==null?void 0:ne.__vueParentComponent)==null?void 0:ie.exposed)==null?void 0:pe.focus)==null||ae.call(pe)},300)}else if(["delete-rendition","delete-thumbnail"].includes(O.id)){setTimeout(()=>{S()},300);return}setTimeout(()=>{var ne,ie;(ie=(ne=o.params)==null?void 0:ne.api)==null||ie.clearFocusedCell()},300)}},_=()=>{var O,$;($=(O=o.params)==null?void 0:O.api)==null||$.stopEditing()},R=O=>{var $,q,J,ee;return O==="archive"?!((q=($=o.params)==null?void 0:$.data)!=null&&q.isArchived):O==="unarchive"?(ee=(J=o.params)==null?void 0:J.data)==null?void 0:ee.isArchived:!0},T=Y(()=>v.value.map(O=>({...O,options:O.options.filter($=>!$.hide&&R($.id))})).filter(O=>O.options.length>0)),I=B({}),x=B(null),P=Y(()=>{var $,q;if(o.focusableIndex)return o.focusableIndex;const O=(q=($=o.params)==null?void 0:$.api)==null?void 0:q.getRowNode(String(o.id));return`${((O==null?void 0:O.rowIndex)??0)+10}`}),D=(O,$)=>`${P.value}.${O*10+$}`,F=(O,$)=>{if($&&"focus"in $){I.value[O]=$;return}delete I.value[O]},k=O=>{O.preventDefault(),O.stopPropagation(),O.stopImmediatePropagation()};return tn(()=>{var O;(O=x.value)==null||O.focus()}),t({focus(){var q;const O=`${P.value}.0`,$=I.value[O];$&&$.focus?$.focus():(q=x.value)==null||q.focus()}}),(O,$)=>Ke((j(),ce("div",{onKeydown:k,class:Q([O.$style["more-option-section"],{[O.$style.submenu]:e.isSubmenu}]),ref_key:"wrapperRef",ref:x,tabindex:"0",role:"menu"},[(j(!0),ce(xt,null,xn(T.value,(q,J)=>(j(),ce("div",{key:q.id,style:dn({"--g-number":Math.min(q.options.length,4),"--g-size":q.type==="column"?"36px":"auto"}),class:Q([O.$style["option-block"],O.$style[q.type]])},[(j(!0),ce(xt,null,xn(q.options,(ee,X)=>(j(),ce("div",{key:ee.id,class:Q(O.$style["option-item"])},[ge(sge,{layer:o.layer,"scene-id":String(o.id),option:ee,type:q.type,onActionExecuted:ve=>w(ve,`more-action-${ve.id}-${o.id}`),focusableIndex:D(J,X),ref_for:!0,ref:ve=>F(D(J,X),ve),onHandleHide:_,id:`more-action-${ee.id}-${o.id}`,label:ee.label},null,8,["layer","scene-id","option","type","onActionExecuted","focusableIndex","id","label"])],2))),128))],6))),128))],34)),[[U(s),P.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"}}]]),nge={key:0,style:{height:"20px",width:"20px",display:"flex","align-items":"center","justify-content":"center"}},sge=_t(rt({__name:"MoreOptionItem",props:{option:{},sceneId:{},type:{},layer:{},focusableIndex:{}},emits:["actionExecuted","handleHide"],setup(e,{expose:t,emit:n}){const s=Ur,o=Xt,i=e,r=B(!1),a=B(!1),l=(I,x)=>{if(!x){p();return}const P=x.target;P.closest(".tippy-content")||P.closest(".tippy-box")||P.closest("[data-tippy-root]")||P.closest(".option-item")||p()},u=B(null),{triggerRef:c,popupRef:d,show:h,isVisible:f,hide:p}=Fs({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 I=>{var x,P;if(!a.value){a.value=!0;try{await((P=(x=i.option).action)==null?void 0:P.call(x,I)),g("actionExecuted",i.option)}catch(D){console.error("Action execution failed:",D)}finally{a.value=!1,r.value=!1}}},C=async I=>{var x,P;if(I.preventDefault(),I.stopPropagation(),!a.value){if(i.option.isDanger){r.value=!r.value;return}if(i.option.subMenu)h();else{a.value=!0;try{await((P=(x=i.option).action)==null?void 0:P.call(x,I)),g("actionExecuted",i.option)}catch(D){console.error("Action execution failed:",D)}finally{a.value=!1}return}}},S=I=>{g("actionExecuted",I),p()},b=I=>{I.key==="Escape"&&p()},w=I=>({row:"small",column:"medium",block:"small"})[I]||"medium",_=I=>{const x=i.option.isDanger?["danger","tertiary"]:[];return{row:["secondary","icon",...x],column:["menu-item",...x],block:["secondary",...x]}[I]||[]},R=()=>{r.value?r.value=!1:f.value?p():g("handleHide")};t({focus:()=>{Ct(()=>{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:()=>{C(new MouseEvent("click"))}});const T=I=>{var x;I.stopPropagation(),I.preventDefault(),r.value=!1,(x=c.value)==null||x.focus()};return(I,x)=>{var P;return Ke((j(),ce("div",{ref_key:"wrapperRef",ref:u,class:Q(I.$style["option-item-wrapper"]),style:{width:"100%",overflow:"visible"},onClick:Pt(C,["stop","prevent"])},[Ke((j(),qe(mt,{ref_key:"triggerRef",ref:c,class:Q(I.$style["option-item"]),disabled:e.option.disabled||a.value,actived:U(f)||r.value,size:w(e.type),variant:_(e.type),onClick:Pt(C,["stop","prevent"]),onKeydown:b,onEscape:R,label:e.option.label},{prefix:me(()=>[e.option.icon?(j(),ce("div",nge,[ge(lt,{size:"14",src:e.option.icon,color:e.option.isDanger?void 0:"#a6a6a6",source:"remote"},null,8,["src","color"])])):Je("",!0)]),suffix:me(()=>[e.option.subMenu?(j(),qe(lt,{key:0,src:"Play",source:"remote"})):Je("",!0),e.option.isDanger&&r.value?(j(),ce("div",{key:1,class:Q(I.$style["confirm-action"])},[Ke((j(),qe(mt,{variant:["tertiary","icon","danger"],size:"small",onHandleClick:T},{default:me(()=>[ge(lt,{src:"XMarkSolid",source:"remote"})]),_:1})),[[U(s),`${i.focusableIndex}.0`],[U(o),{content:"Cancel ",delay:[300,0],contentClass:["extra-padding"]}]]),Ke((j(),qe(mt,{variant:["danger","primary","icon"],size:"small",onClick:Pt(v,["stop","prevent"]),onEscape:x[0]||(x[0]=D=>r.value=!1)},{default:me(()=>[ge(lt,{src:"Check",source:"remote"})]),_:1})),[[U(s),`${i.focusableIndex}.1`],[U(o),{delay:[300,0],contentClass:["extra-padding"],content:"Confirm ",theme:"warning"}]])],2)):Je("",!0)]),_:1},8,["class","disabled","actived","size","variant","label"])),[[U(s),i.focusableIndex]]),e.option.subMenu?(j(),ce("div",{key:0,ref_key:"popupRef",ref:d,class:Q(I.$style["submenu-container"])},[ge(rV,{focusableIndex:i.focusableIndex,layer:i.layer+1,ref:"submenuRef","option-block":[((P=e.option)==null?void 0:P.subMenu)||[]],"is-submenu":!1,onActionExecuted:S},null,8,["focusableIndex","layer","option-block"])],2)):Je("",!0)],2)),[[U(o),{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"}}]]),oge={style:{"max-width":"225px","line-height":"14px"}},ige={style:{"max-width":"100px","line-height":"14px"}},rge=_t(rt({__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"],setup(e,{emit:t}){const n=Xt,s=Ur,o=e,i=t,r=Wm(),{handelSelectAll:a}=r,{selectionStatus:l}=Qs(r),u=Y(()=>l.value===Ht.CHECKED),c=Y(()=>o.selectRowData.map(ie=>ie.id)),d=Y(()=>o.selectRowData.length>0);Zi("bulkUpdate",d),Zi("isSelectAll",u);const h=({itemIds:ie,data:pe})=>{const ae=o.gridApi;ie.forEach(re=>{if(!ae){console.error("Grid API is undefined");return}const W=ae.getRowNode(re);if(W){const fe={...W.data,status:pe};W.setData(fe)}})},f=Y(()=>o.selectRowData),p=({itemIds:ie,data:pe})=>{const ae=o.gridApi;if(!ae){console.error("Grid API is undefined");return}ie.forEach(re=>{const W=ae.getRowNode(re);if(W){const fe=W.data.dateRange||[null,null];"startDate"in pe&&pe.startDate!==void 0&&(fe[0]=pe.startDate?new Date(pe.startDate):null),"dueDate"in pe&&pe.dueDate!==void 0&&(fe[1]=pe.dueDate?new Date(pe.dueDate):null);const oe={...W.data,dateRange:fe};W.setData(oe)}}),i("updated")},g=Y(()=>o.selectRowData.map(ie=>ie.id)),v=ie=>{const pe=o.gridApi,{id:ae,value:re}=ie;if(!pe){console.error("Grid API is undefined");return}g.value.forEach(W=>{const fe=pe.getRowNode(W);if(fe){const oe={...fe.data,[`metric_${ae}`]:re};fe.setData(oe)}}),i("updated")},C=["primary"],S=[{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}],b=()=>{i("unselect")},w=Qb(),{userPermissions:_}=Qs(w),R=Y(()=>_.value.includes(eS)),T=()=>{const ie=o.selectRowData.map(ae=>ae.id).join(","),pe=Ao({type:"review_multiple_scenes",config:{reviewDomain:_n.getInstance().getItem("BASE_REVIEW_URL"),ws_code:o.workspaceId,scene_ids:ie}}).url;window.open(pe,"_blank")},I=ie=>{console.log("Updating assignees with params:",ie);const{assignees:pe,type:ae}=ie,re=o.gridApi;if(!re){console.error("Grid API is not available for bulk update.");return}o.selectRowData.map(fe=>{const oe=re.getRowNode(fe.id);if(!oe)return null;const Ie=oe.data.assignees||[];let G=[];switch(ae){case"add":{const Z=new Set(Ie.map(ke=>ke.id)),de=pe.filter(ke=>!Z.has(ke.id));G=[...Ie,...de];break}case"overwrite":{G=pe;break}case"remove":{const Z=new Set(pe.map(de=>de.id));G=Ie.filter(de=>!Z.has(de.id));break}case"removeAll":{G=[];break}}return{...oe.data,assignees:G}}).filter(fe=>fe!==null).forEach(fe=>{const oe=re.getRowNode(fe.id);oe&&oe.setData(fe)})},{apiServices:x}=ts(!1,o),P=async()=>{var re;const ie=o.selectRowData.map(W=>W.id),pe=o.gridApi;if(!pe){console.error("Grid API is not available for bulk delete.");return}const ae=await((re=x.value)==null?void 0:re.bulkDeleteItems(O.value));(ae==null?void 0:ae.message)=="Done"&&(ie.forEach(W=>{const fe=pe.getRowNode(W);if(fe){const oe={...fe.data,isDeleted:!0,disabled:!0};fe.setData(oe)}}),pe.deselectAll())},D=B(null),F=async()=>{var re,W,fe;const ie=o.selectRowData.map(oe=>oe.id);if(!o.gridApi){console.error("Grid API is not available for bulk unarchive.");return}const ae=await((re=x.value)==null?void 0:re.bulkUnarchiveItems(O.value));if((ae==null?void 0:ae.message)!="Done"){console.error("Failed to unarchive items."),(W=D.value)==null||W.open();return}q(ie,"isArchived",!1),(fe=D.value)==null||fe.hide()},k=En("filterParams",void 0),O=Y(()=>({workspaceId:String(o.workspaceId),itemIds:d.value&&u.value?[]:o.selectRowData.map(ie=>ie.id),entityId:o.entityId,filterParams:k!=null&&k.value?k.value:void 0})),$=async()=>{var re,W,fe;const ie=o.selectRowData.map(oe=>oe.id);if(!o.gridApi){console.error("Grid API is not available for bulk archive.");return}const ae=await((re=x.value)==null?void 0:re.bulkArchiveItems(O.value));if((ae==null?void 0:ae.message)!="Done"){console.error("Failed to archive items."),(W=D.value)==null||W.open();return}q(ie,"isArchived",!0),(fe=D.value)==null||fe.hide()},q=(ie,pe,ae)=>{const re=o.gridApi;if(!re){console.error("Grid API is not available for bulk update.");return}const W=ie.map(fe=>{const oe=re.getRowNode(fe);if(oe){const Ie={...oe.data,[pe]:ae};oe.setData(Ie)}return oe}).filter(fe=>fe!=null);console.log("Updated row nodes:",{idsToUpdate:ie,rowNodes:W}),re.redrawRows({rowNodes:W})},J=async()=>{var re,W,fe;const ie=o.selectRowData.map(oe=>oe.id),pe=o.gridApi;if(!pe){console.error("Grid API is not available for bulk thumbnail deletion.");return}const ae=await((re=x.value)==null?void 0:re.deleteThumbnail(O.value));if((ae==null?void 0:ae.message)!="Done"){console.error("Failed to delete thumbnails."),(W=D.value)==null||W.open();return}ie.forEach(oe=>{const Ie=pe.getRowNode(oe);if(Ie){const G={...Ie.data,thumbnail:null};Ie.setData(G)}}),(fe=D.value)==null||fe.hide()},ee=async()=>{var re,W,fe;const ie=o.selectRowData.map(oe=>oe.id),pe=o.gridApi;if(!pe){console.error("Grid API is not available for bulk rendition deletion.");return}const ae=await((re=x.value)==null?void 0:re.deleteRendition(O.value));if((ae==null?void 0:ae.message)!="Done"){console.error("Failed to delete renditions."),(W=D.value)==null||W.open();return}ie.forEach(oe=>{const Ie=pe.getRowNode(oe);if(Ie){const G={...Ie.data,rendition:null};Ie.setData(G)}}),(fe=D.value)==null||fe.hide()},X=B(!1),ve=B(null),te=async ie=>{var pe,ae;try{switch(V.value=!0,X.value=!0,ie.id){case"unarchive":await F();break;case"delete":await P();break;case"archive":await $();break;case"delete-thumbnail":await J();break;case"delete-rendition":await ee();break;default:console.error("Unknown action:",ie.id),X.value=!1;break}}catch(re){console.error("Error performing action:",re),(pe=D.value)==null||pe.open()}finally{(ae=ve.value)==null||ae.focus(),Ct(()=>{V.value=!1,X.value=!1})}},N=(ie,pe)=>{var ae;!ie&&pe&&((ae=ve.value)==null||ae.focus())},V=B(!0),ne=ie=>{Ct(()=>{V.value=ie})};return nt(()=>o.selectRowData,ie=>{V.value=!1},{deep:!0,immediate:!0}),(ie,pe)=>Ke((j(),ce("div",{class:Q(ie.$style["bulk-update-action"])},[Ee("div",{class:Q(ie.$style["left-actions"])},[Ee("div",{class:Q(ie.$style["selection-track"])},[ge(mt,{class:Q(ie.$style["btn-close"]),variant:["tertiary","icon"],onClick:b,style:{background:"transparent"}},{prefix:me(()=>[ge(lt,{src:"XMarkSolid",source:"remote"})]),_:1},8,["class"]),U(l)==U(Ht).INDETERMINATE?(j(),ce("span",{key:0,class:Q(ie.$style["selected-count"])},wt(e.selectRowData.length)+" selected ",3)):Je("",!0),U(l)==U(Ht).CHECKED?(j(),ce("span",{key:1,class:Q(ie.$style["selected-count"]),style:{"line-height":"14px"}},[pe[12]||(pe[12]=tt(' All in " ',-1)),Ke((j(),ce("span",oge,[tt(wt(e.takeName),1)])),[[U(n),{content:e.takeName}]]),pe[13]||(pe[13]=tt(' " ',-1))],2)):Je("",!0),!e.loading&&U(l)==U(Ht).INDETERMINATE&&e.totalRows>e.selectRowData.length&&e.selectRowData.length==e.visibleRows?(j(),qe(mt,{key:2,variant:"secondary",onHandleClick:U(a)},{default:me(()=>[Ee("span",{class:Q(ie.$style["selected-count"]),style:{"line-height":"14px"}},[pe[14]||(pe[14]=tt(' Select all in " ',-1)),Ke((j(),ce("span",ige,[tt(wt(e.takeName),1)])),[[U(n),{content:e.takeName}]]),pe[15]||(pe[15]=tt(' " ',-1))],2)]),_:1},8,["onHandleClick"])):Je("",!0),Ee("span",{class:Q(ie.$style.divider)},null,2)],2),ge(tge,{ids:c.value,"workspace-id":e.workspaceId,"entity-id":e.entityId,variant:C,disabled:V.value,onUpdated:h,onUpdateStart:pe[0]||(pe[0]=ae=>V.value=!0),onUpdateCompleted:pe[1]||(pe[1]=ae=>ne(!1)),onUpdateFailed:pe[2]||(pe[2]=ae=>ne(!1))},null,8,["ids","workspace-id","entity-id","disabled"]),ge(VY,{disabled:V.value,onUpdate:I,onUpdateStart:pe[3]||(pe[3]=ae=>V.value=!0),onUpdateCompleted:pe[4]||(pe[4]=ae=>ne(!1)),onUpdateFailed:pe[5]||(pe[5]=ae=>ne(!1)),ids:c.value,"workspace-id":e.workspaceId,variant:C,"entity-id":e.entityId},null,8,["disabled","ids","workspace-id","entity-id"]),ge(XY,{ids:c.value,disabled:V.value,"workspace-id":e.workspaceId,"entity-id":e.entityId,variant:C,"row-selected":f.value,onUpdated:p,onUpdateStart:pe[6]||(pe[6]=ae=>V.value=!0),onUpdateCompleted:pe[7]||(pe[7]=ae=>ne(!1)),onUpdateFailed:pe[8]||(pe[8]=ae=>ne(!1))},null,8,["ids","disabled","workspace-id","entity-id","row-selected"]),ge(WX,{disabled:V.value,onUpdate:v,onUpdateStart:pe[9]||(pe[9]=ae=>V.value=!0),onUpdateCompleted:pe[10]||(pe[10]=ae=>ne(!1)),onUpdateFailed:pe[11]||(pe[11]=ae=>ne(!1)),selectedIds:c.value,"workspace-id":e.workspaceId,variant:C,"entity-id":e.entityId},null,8,["disabled","selectedIds","workspace-id","entity-id"]),Ee("span",{class:Q(ie.$style.divider)},null,2),Ke((j(),ce("div",null,[R.value?(j(),qe(mt,{key:0,class:Q(ie.$style["action-button"]),variant:[...C,"icon"],onClick:T,disabled:o.selectRowData.length>40},{default:me(()=>[ge(lt,{src:"PenRuler",class:Q(ie.$style["icon-btn"])},null,8,["class"])]),_:1},8,["class","variant","disabled"])):Je("",!0)])),[[U(n),o.selectRowData.length<=40?"Open in Review":"Select fewer than 40 items to open in Review"]]),Ee("span",{class:Q(ie.$style.divider)},null,2),ge(sf,{ref_key:"wrapperRef",ref:D,isUpdating:V.value,disabled:V.value,onOnVisibleChange:N},{trigger:me(({hide:ae,toggle:re,isVisible:W,disabled:fe})=>[Ke((j(),qe(mt,{onEscape:ae,actived:W,ref_key:"moreActionRef",ref:ve,class:Q(ie.$style["action-button"]),variant:["secondary","icon"],loading:X.value,disabled:fe||V.value,onClick:Pt(re,["stop"])},{default:me(()=>[ge(lt,{src:"EllipsisVertical",class:Q(ie.$style.icon),source:"remote"},null,8,["class"])]),_:1},8,["onEscape","actived","class","loading","disabled","onClick"])),[[U(s),"99999"],[U(n),{content:"More actions"}]])]),popup:me(({isVisible:ae,hide:re})=>[(j(),ce(xt,null,xn(S,(W,fe)=>ge(eu,nn({clickable:!0,key:W.id},{ref_for:!0},W,{show:ae,style:{borderLeft:0},"focus-index":"99999."+fe,onClick:()=>{te(W)},onEscape:re}),null,16,["show","focus-index","onClick","onEscape"])),64))]),_:1},8,["isUpdating","disabled"])],2)],2)),[[Do,e.selectRowData.length>0]])}}),[["__cssModules",{$style:{"bulk-update-action":"_bulk-update-action_1c92i_1","left-actions":"_left-actions_1c92i_19","right-actions":"_right-actions_1c92i_20","selection-track":"_selection-track_1c92i_25","btn-close":"_btn-close_1c92i_31","close-icon":"_close-icon_1c92i_37","selected-count":"_selected-count_1c92i_41",divider:"_divider_1c92i_47","more-button":"_more-button_1c92i_52",dropdown:"_dropdown_1c92i_56","dropdown-content":"_dropdown-content_1c92i_59",delete:"_delete_1c92i_82","icon-btn":"_icon-btn_1c92i_89","selected-list":"_selected-list_1c92i_93"}}]]),il=_t(rt({name:"LabelRenderer",__name:"LabelRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=To,n=Xt,s=e,o=Y(()=>({disabled:s.disabled,error:!1,readOnly:s.readOnly,isEmpty:s.value===void 0||s.value===null||s.value==="",clickable:!0})),{argsMain:i}=ws(o),r=Y(()=>{var u,c,d;return!!((u=s.params)!=null&&u.api||(c=s.params)!=null&&c.node||(d=s.params)!=null&&d.context)}),a=Y(()=>{if(s.tooltip){if(typeof s.tooltip=="string")return{content:s.tooltip};if(typeof s.tooltip=="object"&&"display_name"in s.tooltip){const u=s.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=ge(Ih,{id:u.id,name:u.display_name,profile_image:u.profile_image,size:20,initial:u.initial,color:u.color});Yw(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}}}return{content:void 0}}),l=Y(()=>s.value===void 0);return(u,c)=>Ke((j(),qe(Cs,iR(Lw(U(i))),{default:me(()=>[Ee("span",{class:Q(u.$style["item-table-label-renderer"])},wt(s.value||"-"),3)]),_:1},16)),[[U(t),{isLoading:l.value||!r.value}],[U(n),a.value]])}}),[["__cssModules",{$style:{"item-table-label-renderer":"_item-table-label-renderer_s1gdy_1"}}]]),age=["placeholder","maxlength"],lge={key:0,class:"wrapper-suffix"},uge=_t(rt({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 s=To,o=Xt,i=e,r=n,a=B(i.value),l=B(null),u=B(null),c=B(i.value||""),d=B(!1),h=B(!1),f=Y(()=>{var F;return{disabled:i.disabled,error:!1,readOnly:i.readOnly,isEmpty:((F=i.value)==null?void 0:F.length)===0,inputRef:l,wrapperRef:u,clickable:!0,focused:d.value||i.keyboardFocusing}}),{argsMain:p,isHover:g}=ws(f),v=F=>{const k=document.createElement("div");return k.textContent=F,k.innerHTML},C=()=>c.value!==a.value,S=()=>{h.value=!0,d.value=!1,c.value=a.value,r("update:value",a.value),setTimeout(()=>{h.value=!1},100)},b=()=>{if(!d.value||!l.value)return;const F=v(l.value.value);if(!C()){d.value=!1;return}a.value=F,r("update:value",F),r("enter",F),d.value=!1},w=()=>{h.value||(i.saveOnBlur?b():S(),r("blur",c.value))},_=F=>{var k;if(F.key==="ArrowLeft"||F.key==="ArrowRight"){F.stopPropagation();return}F.ctrlKey&&(F.key=="a"||F.key=="A")?(F.stopPropagation(),(k=l.value)==null||k.select()):F.key==="Enter"?(F.preventDefault(),F.stopPropagation(),b()):F.key==="Escape"&&(F.preventDefault(),F.stopPropagation(),S())},R=()=>{a.value=i.value,c.value=i.value,d.value=!0,Ct(()=>{var F,k;(F=l.value)==null||F.click(),(k=l.value)==null||k.focus()})},T=()=>{var F;d.value?S():(F=l.value)==null||F.blur(),r("blur",c.value)},I={focus:()=>{R()}};tn(()=>{var k;const F=(k=u.value)==null?void 0:k.$el;F&&(F.__sceneNameEditor=I)}),vs(()=>{const F=u.value;F&&delete F.__sceneNameEditor});const x=B(null),P=B(null);t({focus:R,blur:()=>{var F;return(F=l.value)==null?void 0:F.blur()},save:b,cancel:S,focusEditButton:()=>{Ct(()=>{var F;(F=x.value)==null||F.focus()})},focusCancelButton:()=>{Ct(()=>{var F;(F=P.value)==null||F.focus()})},startEdit:R});const D=Y(()=>i.value===void 0);return sS(u,()=>{d.value&&w()}),(F,k)=>Ke((j(),qe(U(Cs),nn(U(p),{ref_key:"wrapperRef",ref:u,bordered:i.bordered,style:{paddingTop:"0px",paddingBottom:"0px"}}),nh({default:me(()=>[d.value?Je("",!0):Tt(F.$slots,"default",{key:0,isEditting:d.value,isHover:U(g)},()=>[Ke((j(),ce("span",{class:Q(F.$style["label-renderer"])},[tt(wt(c.value),1)],2)),[[U(o),{content:c.value||void 0}]])]),Ke(Ee("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":k[0]||(k[0]=O=>c.value=O),class:Q(F.$style["label-editor"]),placeholder:e.placeholder,maxlength:e.maxLength,onKeydown:_,onBlur:w},null,42,age),[[Do,d.value],[ST,c.value]])]),_:2},[!e.disabled&&!e.readOnly?{name:"suffix",fn:me(({hovered:O,focused:$})=>[O?(j(),ce("div",lge,[O&&!$?Ke((j(),qe(mt,{key:0,variant:["icon","secondary"],size:24,onClick:Pt(R,["prevent","stop"]),tabindex:"0",ref_key:"editButtonRef",ref:x,onKeydown:[zn(Pt(R,["prevent","stop"]),["enter"]),zn(Pt(T,["prevent","stop"]),["escape"])]},{default:me(()=>[ge(U(lt),{src:"Pen",source:"remote"})]),_:1},8,["onKeydown"])),[[U(o),"Edit"]]):Je("",!0)])):Je("",!0)]),key:"0"}:void 0]),1040,["bordered"])),[[U(s),{isLoading:D.value}]])}}),[["__cssModules",{$style:{"label-renderer":"_label-renderer_cyzth_1","label-editor":"_label-editor_cyzth_10"}}]]),cge=["tabindex"],aV=_t(rt({name:"SceneNameEditor",__name:"SceneNameEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},placeholder:{default:"Enter name"}},emits:["update:value","enter","blur"],setup(e,{expose:t,emit:n}){const s=Xt,o=To,i=e,r=n,a=B(i.value),l=B(i.value),u=B(null),c=B(null),d=En("bulkUpdate",!1),{apiServices:h}=ts(!d,i),f=Y(()=>{var X;return{componentType:void 0,disabled:i.disabled,error:!1,readOnly:i.readOnly,isEmpty:((X=a==null?void 0:a.value)==null?void 0:X.length)===0,inputRef:u,wrapperRef:c,clickable:!0}}),{isFocus:p}=ws(f),g=Y(()=>{const X=_n.getInstance().getItem("ws.code"),ve=_n.getInstance().getItem("BASE_URL"),te=X||i.workspaceId;return Ao({type:"scene_hub",config:{baseDomain:ve,ws_code:te,scene_id:String(i.id)}}).url}),v=Y(()=>{var X,ve,te;return((ve=(X=i.data)==null?void 0:X.isProcessing)==null?void 0:ve.state)==0||((te=i.data)==null?void 0:te.isDeleted)==!0}),C=Y(()=>i.readOnly||R.value),S=Y(()=>{var X,ve,te,N,V;return((X=i.data)==null?void 0:X.isDeleted)==!0||((te=(ve=i.data)==null?void 0:ve.isProcessing)==null?void 0:te.state)==0||((V=(N=i.data)==null?void 0:N.isProcessing)==null?void 0:V.state)==1}),b=Y(()=>{var X,ve;return(ve=(X=i.data)==null?void 0:X.isProcessing)==null?void 0:ve.message}),w=Y(()=>{var X;return((X=i.data)==null?void 0:X.isArchived)==1}),_=Y(()=>{var X;return((X=i.data)==null?void 0:X.isLocked)==1}),R=Y(()=>i.value===void 0),T=async X=>{var ve,te,N,V,ne,ie,pe,ae,re,W;a.value=X,p.value=!1;try{const fe=await((te=(ve=h.value)==null?void 0:ve.updateSceneName)==null?void 0:te.call(ve,{workspaceId:i.workspaceId,entityId:i.entityId,itemId:i.id,name:a.value})),oe=MF.get(TF)||"UTC";if(fe){const Ie=PF(fe,oe),G={...i.data,...Ie};(N=i.params)==null||N.api.clearFocusedCell();const Z=((ne=(V=i.params)==null?void 0:V.column)==null?void 0:ne.getColId())||"",de=((pe=(ie=i.params)==null?void 0:ie.node)==null?void 0:pe.rowIndex)||0;(ae=i.params)==null||ae.api.setFocusedCell(de,Z),(W=(re=i.params)==null?void 0:re.node)==null||W.setData(G),l.value=a.value,r("enter")}else a.value=l.value}catch(fe){console.error("Failed to update scene name:",fe),a.value=l.value}},I={focus:()=>{p.value=!0,Ct(()=>{var X;return(X=c.value)==null?void 0:X.focus()})},startEdit:()=>{var X;(X=c.value)==null||X.startEdit()}},x=()=>c.value?"$el"in c.value?c.value.$el:c.value:null;nt(()=>i.value,X=>{a.value=X,l.value=X}),tn(()=>{const X=x();X&&(X.__sceneNameEditor=I)}),vs(()=>{const X=c.value,ve=X&&"$el"in X?X.$el:X;ve&&delete ve.__sceneNameEditor});const P=tf(),{openSceneHub:D}=P,F=X=>{try{if(X.ctrlKey||X.metaKey){window.open(g.value,"_blank");return}D(String(i.id))}catch{window.open(g.value,"_blank")}finally{J()}},k=()=>{setTimeout(()=>{ee.value=!0,O.value=0,Ct(()=>{var X;(X=$.value)==null||X.focus()})},300)},O=B(-1),$=B(null);t({focus:k,trigerFocus:k,startEdit:()=>{var X;(X=c.value)==null||X.startEdit()}});const q=X=>{if(X.key==="Enter"){X.preventDefault(),F(X);return}if(X.key==="Escape"){X.preventDefault(),J();return}X.key==="Tab"&&(X.preventDefault(),X.stopPropagation(),X.stopImmediatePropagation(),Ct(()=>{var ve;(ve=c.value)==null||ve.focusEditButton()}))},J=()=>{var te,N,V,ne,ie,pe;ee.value=!1,O.value=-1,(te=i.params)==null||te.api.clearFocusedCell();const X=((V=(N=i.params)==null?void 0:N.column)==null?void 0:V.getColId())||"",ve=((ie=(ne=i.params)==null?void 0:ne.node)==null?void 0:ie.rowIndex)||0;(pe=i.params)==null||pe.api.setFocusedCell(ve,X)},ee=B(!1);return(X,ve)=>Ke((j(),qe(uge,{"save-on-blur":!0,ref_key:"wrapperRef",ref:c,disabled:i.disabled,"read-only":C.value,placeholder:i.placeholder,value:a.value,"onUpdate:value":ve[0]||(ve[0]=te=>a.value=te),id:`scene-name-${i.id}`,onEnter:T,"max-length":255,bordered:!0,keyboardFocusing:ee.value,onBlur:J},{default:me(({isHover:te,isEditting:N})=>[Ke(Ee("div",{class:Q(X.$style["scene-name-display"])},[Ke((j(),ce("a",{tabindex:O.value,ref_key:"nameRef",ref:$,onClick:Pt(F,["prevent"]),onKeydown:q,target:"_blank",class:Q(X.$style["scene-name-text"]),style:{lineHeight:"28px"}},[tt(wt(a.value),1)],42,cge)),[[U(s),{content:a.value,delay:[1e3,0]}]]),C.value||!te&&!N&&!C.value?(j(),ce(xt,{key:0},[_.value?Ke((j(),ce("div",{key:0,class:Q([X.$style["icon-processing"],X.$style.isLocked])},[ge(lt,{src:"Lock"})],2)),[[U(s),{content:"Locked",delay:[1e3,0]}]]):Je("",!0),w.value?Ke((j(),ce("div",{key:1,class:Q([X.$style["icon-processing"],X.$style.archived])},[ge(lt,{src:"BoxArchive"})],2)),[[U(s),{content:"Archived",delay:[1e3,0]}]]):Je("",!0),S.value?Ke((j(),ce("div",{key:2,class:Q([X.$style["icon-processing"],X.$style.processing,v.value&&X.$style["icon-red"]])},[ge(lt,{src:"AnimatedHourglass",color:"inherit"})],2)),[[U(s),b.value]]):Je("",!0)],64)):Je("",!0)],2),[[Do,!U(p)]])]),_:1},8,["disabled","read-only","placeholder","value","id","keyboardFocusing"])),[[U(o),{isLoading:R.value}]])}}),[["__cssModules",{$style:{"scene-name-editor":"_scene-name-editor_1ws9s_1","scene-name-display":"_scene-name-display_1ws9s_11","icon-processing":"_icon-processing_1ws9s_18",archived:"_archived_1ws9s_28",locked:"_locked_1ws9s_31",processing:"_processing_1ws9s_34","icon-red":"_icon-red_1ws9s_38","scene-name-text":"_scene-name-text_1ws9s_43"}}]]),_0=_t(rt({__name:"ButtonDropdown",props:{label:{},value:{},variant:{},options:{default:()=>[]},size:{},placement:{default:"bottom"},disabled:{type:Boolean},readOnly:{type:Boolean},tabIndex:{}},emits:["select","handleClick"],setup(e,{expose:t,emit:n}){const s=Ur,o=B([]),i=e,r=B(null),a=Y(()=>typeof i.size=="number"?`${i.size}px`:{small:"24px",medium:"32px",large:"48px"}[i.size]??"32px"),l=Y(()=>{let C=[];return typeof i.variant=="string"?C.push(i.variant):Array.isArray(i.variant)&&(C=[...i.variant]),[...C,"icon"]}),u=n,{hide:c,isVisible:d,show:h,triggerRef:f,popupRef:p,instance:g}=Fs({toggleOnClick:!0,offset:[0,0]});function v(C){u("select",C),c()}return th(()=>{g.value&&g.value.setProps({placement:i.placement})}),t({show:h,hide:c,hideDropdown:()=>{c()},popupRef:p}),nt(d,C=>{var S;C&&((S=p.value)==null||S.focus())}),(C,S)=>(j(),ce("div",{class:Q(C.$style["button-dropdown-wrapper"]),style:dn({"--button-size":a.value})},[Ee("div",{class:Q(C.$style["button-group"])},[Tt(C.$slots,"prefix"),Ee("div",{ref_key:"triggerRef",ref:f,class:Q(U(d)?C.$style.open:"")},[Tt(C.$slots,"triggerDropdown",{open:U(d)},()=>[i.readOnly?Je("",!0):Ke((j(),qe(mt,{key:0,onEscape:U(c),ref_key:"mainButton",ref:r,actived:U(d),class:Q(C.$style["button-dropdown-trigger"]),variant:l.value,size:e.size,disabled:i.disabled},{default:me(()=>[Tt(C.$slots,"iconDropdown",{},()=>[ge(lt,{class:Q(C.$style["icon-dropdown"]),src:"ChevronDown",source:"remote"},null,8,["class"])])]),_:3},8,["onEscape","actived","class","variant","size","disabled"])),[[U(s),e.tabIndex]])])],2)],2),Ee("div",{ref_key:"popupRef",ref:p,tabindex:"0",class:Q(C.$style["button-dropdown-list"]),style:{borderRadius:"var(--radius-lg)",overflow:"hidden"}},[(j(!0),ce(xt,null,xn(e.options,(b,w)=>Ke((j(),qe(eu,nn({ref_for:!0,ref:_=>o.value[w]=_,key:b.value},{ref_for:!0},{...b},{"icon-name":b.icon,onClick:Pt(_=>v(b.value||""),["stop","prevent"]),style:{borderLeft:0}}),{label:me(()=>[tt(wt(b.label),1)]),_:2},1040,["icon-name","onClick"])),[[U(s),`${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"}}]]),Zf=_t(rt({__name:"CloseBadgeWrapper",props:{disableRemove:{type:Boolean,default:!0},tooltip:{default:"Unassign"}},emits:["clear"],setup(e,{emit:t}){const n=Xt,s=e,o=t,i=a=>{a.preventDefault(),a.stopImmediatePropagation(),a.stopPropagation(),o("clear")},r=Y(()=>({content:s.tooltip,contentClass:"extra-padding",appendTo:()=>globalThis.document.body}));return(a,l)=>(j(),ce("div",{class:Q(a.$style["close-wrapper"])},[e.disableRemove?Je("",!0):(j(),ce("div",{key:0,class:Q(a.$style["close-button"])},[Ke((j(),qe(mt,{variant:["icon","tertiary"],style:{background:"white"},"aria-label":"remove",onClick:i,size:16,rounded:!0},{default:me(()=>[ge(lt,{src:"CircleXMark",size:"16",color:"var(--primary-color)"})]),_:1})),[[U(n),r.value]])],2)),Tt(a.$slots,"default")],2))}}),[["__cssModules",{$style:{"close-wrapper":"_close-wrapper_15u1e_1","close-button":"_close-button_15u1e_5"}}]]),dge=_t(rt({name:"AssigneeGroupRenderer",__name:"AssigneeGroupRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean,default:!0},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},error:{type:Boolean},maxVisible:{default:4}},setup(e){const t=Xt,n=To,s=e,{isEditing:o}=Ac(s),i=B(s.value),r=B(null),a=B(null),{apiServices:l}=ts(!0,s),u=B(!0),c=()=>{u.value=s.value===void 0};eh(()=>{c()}),tn(()=>{c()}),nt(()=>s.value,I=>{c()});const d=Y(()=>({disabled:s.disabled,readOnly:s.readOnly,error:s.error,inputRef:r,wrapperRef:a,clickable:!(s.readOnly||u.value),active:o})),{argsMain:h,isHover:f}=ws(d),p=Y(()=>{var I;return((I=i.value)==null?void 0:I.slice(0,s.maxVisible))||[]}),g=Y(()=>{var I;return Math.max(0,(((I=i.value)==null?void 0:I.length)||0)-s.maxVisible)}),v=Y(()=>{var I;return g.value<=0?"":((I=i.value)==null?void 0:I.slice(s.maxVisible).map(x=>x.name).join(", "))||""}),C=Y(()=>p.value.map(I=>({id:I.id,name:I.name,initial:I.initial,avatarId:I.id,profile_image:I.profile_image,color:I.color,size:24,user:I}))),S=Y(()=>({color:f.value?"var(--primary-color)":"var(--grey-300)",display:"flex",alignItems:"center",marginLeft:"4px"}));nt(()=>s.value,I=>{i.value=I},{immediate:!0,deep:!0});const b=async I=>{var P,D,F;await T(I)&&(i.value=(P=i.value)==null?void 0:P.filter(k=>k.id!==I),(F=s.params)==null||F.node.setData({...(D=s.params)==null?void 0:D.node.data,assignees:i.value}))},w=I=>{var P;const x=_n.getInstance().getItem("ws.code");return((P=l.value)==null?void 0:P.getUserInformation(x,I))||Promise.resolve(null)},{id:_}=Up(s),R=I=>{var P,D;const x=(D=(P=s.params)==null?void 0:P.api)==null?void 0:D.getRowNode(String(_.value));x==null||x.setDataValue("assignees",$I(I.assignees))},{removeAssignee:T}=mm({...s,entityId:s.entityId,updateRowData:R,value:s.value,errorCallback:()=>{}});return(I,x)=>Ke((j(),qe(Cs,nn(U(h),{ref_key:"wrapperRef",ref:a,bordered:!0}),{default:me(()=>{var P;return[Ee("div",{class:Q(I.$style.assigneeGroupRenderer)},[((P=i.value)==null?void 0:P.length)===0?(j(),qe(lt,{key:0,src:"UserPlus",source:"remote",color:"#6B6B6B",style:dn(S.value)},null,8,["style"])):Je("",!0),(j(!0),ce(xt,null,xn(C.value,D=>(j(),qe(Zf,{key:D.id,"disable-remove":s.readOnly||s.disabled,onClear:F=>b(D.id),style:{marginLeft:"0"}},{default:me(()=>[ge(Oc,{user:D.user,"show-profile":!0,apiUpdateFunction:w,class:Q(I.$style["ib-assignee-avatar"])},null,8,["user","class"])]),_:2},1032,["disable-remove","onClear"]))),128)),g.value>0?Ke((j(),ce("div",{key:1,class:Q(I.$style["extra-avatars"])},[tt(" +"+wt(g.value),1)],2)),[[U(t),v.value]]):Je("",!0)],2)]}),_:1},16)),[[U(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"}}]]),hge=_t(rt({name:"DateRangeRenderer",__name:"DateRangeRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean,default:!1},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isStarted:{type:Boolean},isCompleted:{type:Boolean},timezone:{}},setup(e){var R,T;const t=Xt,n=To,s=Eb(),o=e,i=B(null),r=B(null),{isEditing:a}=Ac(o),l=I=>{if(I){if(typeof I=="string")return I;if(I instanceof Date)return I.toISOString()}},u=Y(()=>o.value===void 0),c=Y(()=>{var I;return(I=o.data)==null?void 0:I.isStarted}),d=Y(()=>{var I;return(I=o.data)==null?void 0:I.isCompleted}),h=Y(()=>!!(o.value&&(o.value[0]||o.value[1]))),f=Y(()=>h.value?o.disabled&&!o.readOnly?"var(--disabled-color)":"var(--primary-color)":"var(--grey-300)"),p=Y(()=>({disabled:o.disabled,error:!1,readOnly:o.readOnly,inputRef:i,wrapperRef:r,clickable:!0,active:a})),{argsMain:g}=ws(p),{startDate:v,endDate:C,startClasses:S,endClasses:b,fullStartDate:w,fullEndDate:_}=OK({start:l((R=o.value)==null?void 0:R[0]),end:l((T=o.value)==null?void 0:T[1]),isStarted:c.value,isEnded:d.value,timezone:o.timezone||s});return(I,x)=>Ke((j(),qe(Cs,nn(U(g),{ref_key:"wrapperRef",ref:r,bordered:!0}),{default:me(()=>[u.value?Je("",!0):(j(),ce("div",{key:0,class:Q(I.$style.dateRangeRenderer)},[h.value?Je("",!0):(j(),qe(lt,{key:0,src:"Calendar",class:Q(I.$style.calendarIcon),color:f.value},null,8,["class","color"])),h.value?(j(),ce(xt,{key:1},[Ke((j(),ce("span",{class:Q([I.$style.dateLabelDisplay,...U(S).map(P=>I.$style[P])])},[tt(wt(U(v)),1)],2)),[[U(t),U(w)]]),x[0]||(x[0]=Ee("span",null,"→",-1)),Ke((j(),ce("span",{class:Q([I.$style.dateLabelDisplay,...U(b).map(P=>I.$style[P])])},[tt(wt(U(C)),1)],2)),[[U(t),U(_)]])],64)):Je("",!0)],2))]),_:1},16)),[[U(n),{isLoading:u.value}]])}}),[["__cssModules",{$style:{dateRangeRenderer:"_dateRangeRenderer_1hon8_1",calendarIcon:"_calendarIcon_1hon8_7",dateSection:"_dateSection_1hon8_11",dateLabelDisplay:"_dateLabelDisplay_1hon8_18",empty:"_empty_1hon8_28","end-today":"_end-today_1hon8_34",actual:"_actual_1hon8_37","end-tomorrow":"_end-tomorrow_1hon8_40","end-yesterday":"_end-yesterday_1hon8_46","end-past":"_end-past_1hon8_52","end-future":"_end-future_1hon8_58","start-today":"_start-today_1hon8_61","start-tomorrow":"_start-tomorrow_1hon8_67","start-yesterday":"_start-yesterday_1hon8_73","start-past":"_start-past_1hon8_79","start-future":"_start-future_1hon8_85"}}]]),fge=rt({__name:"DateRangeEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{default:void 0},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isStarted:{type:Boolean},isCompleted:{type:Boolean},timezone:{default:Eb()}},emits:["closed"],setup(e,{expose:t,emit:n}){const s=B(null);tn(()=>{Ct(()=>{s.value&&s.value.focus()})});const o=e,i=n,r=()=>{var C;(C=o.params)==null||C.api.stopEditing(),i("closed")},a=C=>`${bt.fromJSDate(C,{zone:"utc"}).toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")}999Z`,l=async C=>{await v({startDate:C[0]?a(C[0]):null,dueDate:C[1]?a(C[1]):null})},u=async()=>{await v({startDate:null})},c=async()=>{await v({dueDate:null})},d=async C=>{await v({startDate:C?a(C):null})},h=async C=>{await v({dueDate:C?a(C):null})},f=async()=>{await v({startDate:null,dueDate:null})},p=En("bulkUpdate",!1),{apiServices:g}=ts(!p,o),v=async C=>{var S,b,w,_,R;try{const T=(S=s.value)==null?void 0:S.getValues(),I=await((w=(b=g.value)==null?void 0:b.changeDate)==null?void 0:w.call(b,{workspaceId:o.workspaceId,itemIds:[o.id],startDate:C.startDate,dueDate:C.dueDate}));I!=null&&I.message&&((R=o.params)==null||R.node.setData({...(_=o.params)==null?void 0:_.node.data,dateRange:T==null?void 0:T.dateRange}))}catch(T){console.error("Failed to update scene name:",T)}};return t({focus:()=>{Ct(()=>{var C;(C=s.value)==null||C.focus()})}}),(C,S)=>(j(),qe(Am,nn(o,{onUpdate:l,"onUpdate:end":h,"onUpdate:start":d,onClearAll:f,onClearDue:c,onClearStart:u,onClosed:r,ref_key:"calendarRef",ref:s}),null,16))}}),pge=_t(rt({__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),s=B(0);let o=null;tn(()=>{n.value&&(o=new ResizeObserver(r=>{for(const a of r)s.value=a.contentRect.height}),o.observe(n.value))}),Il(()=>{o&&n.value&&o.unobserve(n.value)});const i=Y(()=>{const r=s.value;return r>120?r-42-36:0});return(r,a)=>(j(),ce("div",{class:Q(r.$style["item-table-wrapper"]),ref_key:"itemTableWrapperRef",ref:n},[Ee("div",{class:Q(r.$style["item-header"])},[Ee("div",{class:Q(r.$style["item-header__left"])},[Tt(r.$slots,"header-left",{},()=>[Ee("h1",{class:Q(r.$style["item-header__title"])},[Tt(r.$slots,"title",{},()=>[a[0]||(a[0]=tt("Items",-1))])],2)])],2),Ee("div",{class:Q(r.$style["item-header__spacer"])},null,2),Ee("div",{class:Q(r.$style["item-header__actions"])},[Tt(r.$slots,"header-actions")],2)],2),Tt(r.$slots,"grid",{availableHeight:i.value}),Ee("div",{class:Q(r.$style.footer)},[Tt(r.$slots,"footer")],2),Tt(r.$slots,"new-row"),Tt(r.$slots,"bulk-update-actions"),Tt(r.$slots,"snackbar"),Tt(r.$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"}}]]),lV=(e,t)=>{const n=B(Number(e.value.value)),s=Y(()=>e.value.metricConfig),o=Y(()=>{var g,v;const l=s.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}}),i=17,r=Y(()=>{var l;return{maxRating:((l=s.value)==null?void 0:l.range)||5,readOnly:e.value.readOnly,disabled:e.value.disabled,size:i}});return{componentState:o,metricConfig:s,ICON_SIZE:i,ratingParams:r,standardNameforIcon:()=>{var u;return(((u=s.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}},gge=["aria-label"],uV=_t(rt({name:"MetricRenderer",__name:"MetricRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean,default:!0},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},error:{type:Boolean},config:{}},emits:["update:value","clear","copy"],setup(e,{emit:t}){const n=To,s=Xt,o=e,i=Gp(!1),r=B(null),a=B(null),{isEditing:l}=Ac(o),u=Y(()=>{var $,q;return{value:o.value,metricConfig:((q=($=o.params)==null?void 0:$.colDef)==null?void 0:q.context)||o.config,error:o.error,hovered:i.value,readOnly:o.readOnly,disabled:o.disabled,active:l}}),{componentState:c,metricConfig:d,internalValue:h}=lV(u,i),f=Y(()=>{var q,J;let $=!1;if(["number","formula"].includes(d.value.metric_type.code)){const ee=Number(o.value),X=Number((q=d.value)==null?void 0:q.format_value);Number.isFinite(X)&&X>=0&&($=(((J=ee.toString().split(".")[1])==null?void 0:J.length)||0)>X)}return $}),p=Y(()=>{var $;return!!(($=d.value)!=null&&$.morpheme_value)||c.value.isEmpty||f.value}),g=Y(()=>{var J,ee,X;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 $=x.value,q=(J=d.value)==null?void 0:J.morpheme_type;return q==="prefix"?`${((ee=d.value)==null?void 0:ee.morpheme_value)||""} ${$}`.trim():q==="suffix"?`${$} ${((X=d.value)==null?void 0:X.morpheme_value)||""}`.trim():$}),v=Y(()=>{const{format_type:$,format_value:q}=d.value;if($==="dropdown"&&typeof q=="string"&&q.startsWith("["))try{return JSON.parse(q)}catch{return[]}return[]}),C=Y(()=>({disabled:o.disabled,error:c.value.isError,inputRef:r,wrapperRef:a,clickable:!I.value,readOnly:o.readOnly||I.value,isEmpty:c.value.isEmpty})),{argsMain:S,isHover:b}=ws(C),w=($,q,J="en-US")=>new Intl.NumberFormat(J,{minimumFractionDigits:q,maximumFractionDigits:q}).format($),_=Y(()=>{if(c.value.isEmpty)return"";if(c.value.pendingCalculation)return"pending";const $=o.value,{format_type:q,format_value:J,mapping:ee}=d.value;if(ee&&typeof ee=="object"&&!Array.isArray(ee)){const X=ee[`!${$}`];if(X)return X}if(q==="dropdown"){const X=v.value.find(ve=>String(ve.name)===String($));if(X)return X.name}if(typeof $=="string"){const X=Number($);return Number.isNaN(X)?$:$.replace(/[.-]/g,"").length>16?R($,J):R(X,J)}return typeof $=="number"?R($,J):String($)}),R=($,q)=>{const J=Number.parseInt(String(q)||"2",10),ee=Number.isFinite(J)&&J>=0?J:2;try{if(typeof $=="string"){const X=$.split("."),ve=X[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),te=X[1]?X[1].substring(0,ee).padEnd(ee,"0"):"0".repeat(ee);return ee>0?`${ve}.${te}`:ve}return w($,ee)}catch(X){return console.error("Error formatting metric value:",X,{num:$,decimals:ee}),String($)}},T=($,q)=>{const J=Number.parseInt(String(q)||"2",10),ee=Number.isFinite(J)&&J>=0?J:2;try{if(typeof $=="string"){const X=$.split("."),ve=X[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),te=X[1]?X[1].length:0,N=Math.max(ee,te),V=X[1]?X[1].padEnd(N,"0"):"0".repeat(N);return N>0?`${ve}.${V}`:ve}return new Intl.NumberFormat("en-US",{minimumFractionDigits:ee,maximumFractionDigits:20}).format($)}catch(X){return console.error("Error formatting exact metric value:",X,{num:$,decimals:ee}),String($)}},I=Y(()=>{var $;return(($=d.value)==null?void 0:$.metric_type.code)==="formula"}),x=Y(()=>{if(c.value.isEmpty)return"";if(c.value.pendingCalculation)return"pending";const $=o.value,{format_type:q,format_value:J,mapping:ee}=d.value;if(ee&&typeof ee=="object"&&!Array.isArray(ee)){const X=ee[`!${$}`];if(X)return X}if(q==="dropdown"){const X=v.value.find(ve=>String(ve.name)===String($));if(X)return X.name}if(typeof $=="string"){const X=Number($);return Number.isNaN(X)?$:$.replace(/[.-]/g,"").length>16?T($,J):T(X,J)}return typeof $=="number"?T($,J):String($)}),{tooltip:P}=NF(""),D=async $=>{$.stopPropagation(),$.preventDefault(),$.stopImmediatePropagation();try{await navigator.clipboard.writeText(x.value),P.value="Copied",setTimeout(()=>{P.value="Copy"},3e3)}catch(q){console.error("Failed to copy text:",q),P.value="Copy failed",setTimeout(()=>{P.value="Copy"},3e3)}};nt(()=>o.value,($,q)=>{const J=Number($);Number.isFinite(J)&&J!==h.value?h.value=J:$==null&&h.value!==0&&(h.value=0)},{immediate:!0,deep:!0});const k=()=>{i.value=!0},O=()=>{i.value=!1};return($,q)=>Ke((j(),qe(Cs,nn(U(S),{onMouseenter:k,style:{"--icon-size":"24px"},onMouseleave:O,ref_key:"wrapperRef",ref:a,actived:U(l),bordered:!0}),{suffix:me(()=>[o.disabled?Je("",!0):(j(),ce("div",{key:0,class:Q([$.$style.suffix,"wrapper-suffix"])},[i.value&&!U(c).isEmpty&&!U(c).isError?Ke((j(),qe(mt,{key:0,variant:["icon","secondary"],size:24,onClick:Pt(D,["prevent","stop"])},{default:me(()=>[ge(lt,{src:"Copy",source:"remote",size:12})]),_:1})),[[U(s),{content:U(P),hideOnClick:!1,contentClass:"extra-padding"}]]):Je("",!0)],2))]),default:me(()=>[Ee("div",{class:Q($.$style["metric-wrapper"]),"aria-label":U(d).format_value||void 0},[Ee("div",{class:Q([$.$style["metric-content"],o.disabled?$.$style.disabled:""])},[!U(c).isError&&U(c).isEmpty?(j(),ce(xt,{key:0},[U(c).pendingCalculation?Ke((j(),ce("span",{key:0,class:Q($.$style["metric-empty"])},[...q[0]||(q[0]=[tt(" - ",-1)])],2)),[[U(s),"Can’t calculate yet. Complete required fields."]]):U(c).isEmpty?(j(),ce("span",{key:1,class:Q($.$style["metric-empty"])}," - ",2)):Je("",!0)],64)):Je("",!0),U(c).isError?Ke((j(),ce("div",{key:1,class:Q($.$style["metric-error"])},[...q[1]||(q[1]=[tt(" Error ",-1)])],2)),[[U(s),"Something went wrong. Review formula, inputs and retry."]]):Je("",!0),!U(c).isEmpty&&!U(c).isError?Ke((j(),ce("span",{key:2,class:Q([$.$style["metric-value"],U(b)?$.$style.hovered:"",{[$.$style.disabled]:o.disabled}])},[tt(wt(_.value),1)],2)),[[U(s),{content:g.value,bypassOverflowCheck:p.value}]]):Je("",!0)],2)],10,gge)]),_:1},16,["actived"])),[[U(n),{isLoading:U(c).isLoading}]])}}),[["__cssModules",{$style:{"metric-wrapper":"_metric-wrapper_7otc0_1","metric-content":"_metric-content_7otc0_5",disabled:"_disabled_7otc0_15","metric-value":"_metric-value_7otc0_19",hovered:"_hovered_7otc0_19","metric-error":"_metric-error_7otc0_23","with-morpheme":"_with-morpheme_7otc0_38","with-formula-icon":"_with-formula-icon_7otc0_41","metric-value--number":"_metric-value--number_7otc0_47","metric-value--currency":"_metric-value--currency_7otc0_47","metric-value--percentage":"_metric-value--percentage_7otc0_47","metric-morpheme":"_metric-morpheme_7otc0_51","metric-empty":"_metric-empty_7otc0_64","metric-icon":"_metric-icon_7otc0_71"}}]]),mge={key:0,style:{color:"#6b6b6b"}},vge=_t(rt({__name:"HeaderSorting",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean},modelValue:{}},emits:["sort-changed","update:modelValue"],setup(e,{emit:t}){const n=Xt,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"}},o={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"}},r={asc:{value:"asc",label:"Ascending",id:"asc"},desc:{value:"desc",label:"Descending",id:"desc"}},a=e,l={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"},u=Y(()=>{var F,k;if(a.headerType)return a.headerType;if(((k=(F=a.params)==null?void 0:F.column)==null?void 0:k.getColId()).includes("metric"))return"default";const D=a.headerType??a.params.column.getColId();return l[D]||"default"}),c=B(),d=()=>{var D,F,k;const P=(F=(D=a.params)==null?void 0:D.column)==null?void 0:F.getColDef();if((k=P.colId)!=null&&k.includes("metric")){if(P.context.is_primary==1)return"primary";if(P.context.is_point_metric==1)return"secondary"}};th(()=>{c.value=d()}),tn(()=>{c.value=d()});const h=Y(()=>{var P,D;return((D=(P=a.params)==null?void 0:P.column.getColDef().context)==null?void 0:D.morpheme_value)||void 0}),f=Y(()=>{var P;return(P=a.params)==null?void 0:P.displayName}),p=Y(()=>{let P=[];switch(u.value){case"dateRange":P=Object.values(s).map(D=>({...D,selected:v.value===D.value,type:"text",hover:T.value===D.value}));break;case"date":P=Object.values(o).map(D=>({...D,selected:v.value===D.value,type:"text",hover:T.value===D.value}));break;case"number":P=Object.values(i).map(D=>({...D,selected:v.value===D.value,type:"text",hover:T.value===D.value}));break;default:P=Object.values(r).map(D=>({...D,selected:v.value===D.value,type:"text",hover:T.value===D.value}));break}return v.value!=="none"&&P.push({id:"clear",label:"Clear",value:"none",selected:!1,type:"text",icon:"XMark",hover:T.value=="none"}),P}),g=Y(()=>String(v.value).endsWith("asc")?"SortUp":String(v.value).endsWith("desc")?"SortDown":"Sort"),v=B(a.modelValue??"none"),C=P=>{_("update:modelValue",P),_("sort-changed",P)},S=P=>{v.value=P},b=Ti(()=>{if(u.value==="date"||u.value==="default"||u.value==="number"){let P;v.value==="none"?P="asc":v.value==="asc"?P="desc":P="none",v.value=P}else{const P=[s.START_ASC.value,s.START_DESC.value,s.DUE_ASC.value,s.DUE_DESC.value,"none"],F=(P.indexOf(v.value)+1)%P.length;v.value=P[F]}},rr),w=Y(()=>{if(v.value==="none")return"No sorting applied";const P=p.value.find(D=>D.value===v.value);return(P==null?void 0:P.label)||""}),_=t,R=Y(()=>{if(a.disabled&&!a.readOnly)return"var(--disabled-color)";if(v.value!=="none")return"var(--primary-color-hover)"});nt(()=>a.modelValue,P=>{P!=v.value&&(v.value=P)}),nt(v,P=>{P!==a.modelValue&&C(P)});const T=B(v.value);nt(()=>v.value,P=>{T.value=P});const I=P=>{var O,$;if(a.readOnly||a.disabled)return;let D=0;P.key==="ArrowDown"?D=1:P.key==="ArrowUp"&&(D=-1);const F=p.value.findIndex(q=>q.value===T.value),k=p.value.length;if(P.key==="Enter"||P.key===" ")P.preventDefault(),v.value=T.value,(O=x.value)==null||O.hide();else if(D!==0){P.preventDefault();let q=(F+D+k)%k;T.value=p.value[q].value}else P.key==="Escape"&&(($=x.value)==null||$.hide())},x=B(null);return tn(()=>{var P,D;(D=(P=x.value)==null?void 0:P.$el)==null||D.addEventListener("keydown",I)}),Il(()=>{var P,D;(D=(P=x.value)==null?void 0:P.$el)==null||D.removeEventListener("keydown",I)}),(P,D)=>(j(),qe(_0,{ref_key:"dropdownRef",ref:x,options:p.value,label:f.value,readOnly:a.readOnly,disabled:a.disabled,variant:["icon","tertiary"],size:"small",onHandleClick:U(b),onSelect:D[0]||(D[0]=F=>S(F))},{prefix:me(()=>[ge(mt,{variant:["text"],onClick:U(b),size:"small"},{default:me(()=>[Ke((j(),ce("b",null,[tt(wt(f.value),1)])),[[U(n),{content:f.value}]]),h.value?(j(),ce("small",mge," ("+wt(h.value)+") ",1)):Je("",!0),c.value=="primary"?Ke((j(),ce("div",{key:1,class:Q(P.$style["icon-metric"])},[ge(lt,{src:"ChartPie",color:"#A6A6A6",size:"14"})],2)),[[U(n),"Woohoo metric"]]):Je("",!0),c.value=="secondary"?Ke((j(),ce("div",{key:2,class:Q(P.$style["icon-metric"])},[ge(lt,{src:"Bullseye",color:"#A6A6A6",size:"14"})],2)),[[U(n),"Point Metric"]]):Je("",!0)]),_:1},8,["onClick"])]),iconDropdown:me(()=>[Ke(ge(lt,{src:g.value,source:"remote",color:R.value},null,8,["src","color"]),[[U(n),w.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"}}]]),yge=["disabled","readonly","checked","indeterminate"],cV=_t(rt({__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=Xt,s=Ur,o=e,i=t,r=Y(()=>{if(typeof o.size=="string"){if(["small","medium","large"].includes(o.size))switch(o.size){case"small":return"14px";case"large":return"24px";case"medium":default:return"20px"}if(o.size.endsWith("px"))return o.size}return typeof o.size=="number"?`${o.size}px`:"20px"}),a=Y(()=>o.allowIndeterminate?[Ht.UNCHECK,Ht.INDETERMINATE,Ht.CHECKED]:[Ht.UNCHECK,Ht.CHECKED]),l=Y(()=>{if(typeof o.tooltipText=="string"||!o.tooltipText)return o.tooltipText||"";switch(c.value){case Ht.UNCHECK:return o.tooltipText.unchecked;case Ht.INDETERMINATE:return o.tooltipText.indeterminate;case Ht.CHECKED:return o.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 o.modelValue=="boolean"?o.modelValue?Ht.CHECKED:Ht.UNCHECK:o.modelValue),d=Y(()=>({checked:c.value===Ht.CHECKED,indeterminate:c.value===Ht.INDETERMINATE,none:c.value===Ht.UNCHECK})),h=Y(()=>o.disabled||o.readOnly);return nt(()=>c.value,f=>{i("update:modelValue",f===Ht.CHECKED)}),(f,p)=>Ke((j(),ce("input",{disabled:o.disabled,key:c.value,readonly:o.readOnly,type:"checkbox",class:Q([f.$style["input-checkbox"]]),checked:d.value.checked,indeterminate:d.value.indeterminate,onChange:u,"aria-label":"Select All Items",style:dn({"--input-size":r.value})},null,46,yge)),[[U(n),{content:l.value,hideOnClick:!1,contentClass:"extra-padding"}],[U(s),o.focusIndex]])}}),[["__cssModules",{$style:{small:"_small_npdz3_84",large:"_large_npdz3_87",medium:"_medium_npdz3_90"}}]]),wge=_t(rt({name:"HeaderCheckbox",__name:"HeaderCheckbox",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=e,n=Xt,s=Wm(),{setSelectionStatus:o}=s,{rowCount:i,selectionStatus:r}=Qs(s),a=B(new Set);nt(r,w=>{o(w)},{immediate:!0});const l=Y(()=>r.value!==Ht.UNCHECK),u=Y(()=>({checked:r.value===Ht.CHECKED,indeterminate:r.value===Ht.INDETERMINATE,UNCHECK:r.value===Ht.UNCHECK})),c=Y(()=>({[Ht.UNCHECK]:"Click to select all",[Ht.INDETERMINATE]:"Click to clear selection",[Ht.CHECKED]:"Click to clear selection"})[r.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:i.value.total,loaded:i.value.loaded}),f=({api:w,state:_})=>{if(w)if(_===Ht.UNCHECK)w.deselectAll(),a.value.clear(),r.value=_;else if(_===Ht.CHECKED){const R=new Set;w.forEachNode(T=>{T.isSelected()&&R.add(T.id||"")}),a.value=R,w.forEachNode(T=>T.setSelected(!0)),r.value=_}else w.forEachNode(R=>R.setSelected(!0)),r.value=_},p=()=>{var R;const w=(R=t.params)==null?void 0:R.api;if(!w){console.error("[HeaderCheckbox] There is no API available");return}const _={[Ht.UNCHECK]:Ht.INDETERMINATE,[Ht.INDETERMINATE]:Ht.UNCHECK,[Ht.CHECKED]:Ht.UNCHECK};f({api:w,state:_[r.value]})},g=w=>{var T;const _=(T=t.params)==null?void 0:T.api;if(!_){console.error("no api");return}const R={INDETERMINATE:Ht.INDETERMINATE,GLOBAL:Ht.CHECKED,UNCHECK:Ht.UNCHECK};f({api:_,state:R[w]})},v=Ti(w=>{const{selected:_,total:R}=h(w);if(R==0){r.value=Ht.UNCHECK;return}_===R?r.value=Ht.CHECKED:_===0?r.value=Ht.UNCHECK:r.value=Ht.INDETERMINATE},300);let C=[];const S=w=>{v(w)};tn(()=>{var I;const w=(I=t.params)==null?void 0:I.api;if(!w)return;const _=x=>v(x.api),R=()=>S(w),T=()=>S(w);w.addEventListener("selectionChanged",_),w.addEventListener("rowDataUpdated",R),w.addEventListener("modelUpdated",R),C=[()=>w.removeEventListener("selectionChanged",_),()=>w.removeEventListener("rowDataUpdated",R),()=>w.removeEventListener("modelUpdated",T)]}),vs(()=>{C.forEach(w=>w())});const b=`header-checkbox-${Math.random().toString(36).substr(2,9)}`;return(w,_)=>(j(),qe(_0,{tabIndex:"9",options:d.value,size:24,disabled:t.disabled,readOnly:t.readOnly,variant:["icon","tertiary"],placement:"bottom-start",onSelect:g},{prefix:me(()=>[Ke((j(),qe(cV,{"tab-index":"8",id:b,disabled:t.disabled,key:U(r),readonly:t.readOnly,type:"checkbox",checked:u.value.checked,indeterminate:u.value.indeterminate,modelValue:U(r),"onUpdate:modelValue":_[0]||(_[0]=R=>gn(r)?r.value=R:null),onChange:p,"aria-label":U(r)===U(Ht).CHECKED?"All items selected":"Select visible items",class:Q(w.$style["ag-checkbox-input"])},null,8,["disabled","readonly","checked","indeterminate","modelValue","aria-label","class"])),[[U(n),{content:c.value,hideOnClick:!1,contentClass:"extra-padding"}]])]),_:1},8,["options","disabled","readOnly"]))}}),[["__cssModules",{$style:{"ag-checkbox-input":"_ag-checkbox-input_uj7ro_1","button-group":"_button-group_uj7ro_62","button-main":"_button-main_uj7ro_62",headerCheckbox:"_headerCheckbox_uj7ro_66"}}]]),Cge={key:1},bge=_t(rt({name:"StatusRenderer",__name:"StatusRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean,default:!0},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=To,n=Xt,s=e,{isEditing:o}=Ac(s),i=B(null),r=B(null),a=Y(()=>s.value),l=Y(()=>a.value===void 0),u=Y(()=>{var g;return((g=a.value)==null?void 0:g.name)||"No status"}),c=Y(()=>{var g;return{disabled:s.disabled,error:!1,readOnly:s.readOnly,isEmpty:Cj((g=a.value)==null?void 0:g.label),inputRef:i,wrapperRef:r,clickable:!s.disabled&&!s.readOnly,active:o}}),{argsMain:d,isHover:h}=ws(c),f=Y(()=>{var g;return((g=a.value)==null?void 0:g.color)||"red"}),p=Y(()=>new Nn(f.value).isLight()?"#000":"#fff");return(g,v)=>Ke((j(),qe(U(Cs),nn(U(d),{ref_key:"wrapperRef",ref:r,bordered:!0,style:{background:`${f.value} !important`,color:p.value,"--border-color":!U(o)&&!U(h)?"#f3f5f8":void 0}}),{default:me(()=>[l.value?Je("",!0):(j(),ce("div",{key:0,class:Q(g.$style["status-renderer"])},[a.value?Ke((j(),ce("div",{key:0,class:Q(g.$style["status-renderer__status-name"])},[tt(wt(u.value),1)],2)),[[U(n),{content:u.value,delay:[1e3,0]}]]):l.value?Je("",!0):(j(),ce("div",Cge,"No status"))],2))]),_:1},16,["style"])),[[U(t),{isLoading:l.value}]])}}),[["__cssModules",{$style:{"status-renderer":"_status-renderer_108pu_1","status-renderer__color-code":"_status-renderer__color-code_108pu_10","status-renderer__status-name":"_status-renderer__status-name_108pu_20"}}]]),dV=_t(rt({__name:"PopupLayout",props:{popupName:{},showOverlay:{type:Boolean,default:!0},overlayOpacity:{default:.5},closeOnOverlayClick:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0}},emits:["shown","hidden"],setup(e,{expose:t,emit:n}){const s=e,{popupRef:o,show:i,hide:r,isVisible:a}=$K({useTrigger:!1,arrow:!1,centered:!0,showOverlay:s.showOverlay,overlayOpacity:s.overlayOpacity,closeOnOverlayClick:s.closeOnOverlayClick,appendTo(c){return document.body}}),l=c=>{s.closeOnEscape&&c.key==="Escape"&&a.value&&r()};tn(()=>{document.addEventListener("keydown",l)}),vs(()=>{document.removeEventListener("keydown",l)}),t({show:i,hide:r,isVisible:a});const u=n;return nt(()=>a.value,c=>{u(c?"shown":"hidden")}),(c,d)=>{const h=Eo("tooltip");return j(),ce("div",{ref_key:"popupRef",ref:o,class:Q(c.$style.popupContainer)},[Ee("div",{class:Q(c.$style.popupWrapper)},[Ee("div",{class:Q(c.$style.header)},[Ee("span",{class:Q(c.$style["header-title"])},wt(e.popupName),3),Ke((j(),qe(mt,{style:{position:"absolute",top:"0",right:"0"},variant:"text",onClick:U(r),"aria-label":"Close popup"},{default:me(()=>[ge(lt,{src:"Xmark"})]),_:1},8,["onClick"])),[[h,"Close"]])],2),Ee("div",{class:Q(c.$style.body)},[Tt(c.$slots,"default")],2),Ee("div",{class:Q(c.$style.footer)},[Tt(c.$slots,"footer")],2)],2)],2)}}}),[["__cssModules",{$style:{popupContainer:"_popupContainer_73gw5_1",popupWrapper:"_popupWrapper_73gw5_5",popupFadeIn:"_popupFadeIn_73gw5_1",header:"_header_73gw5_19","header-title":"_header-title_73gw5_28",body:"_body_73gw5_38",footer:"_footer_73gw5_43"}}]]),Sge={...{list_cursor:{error:"Failed to fetch data. Please reload table."},assignedUser:{error:"Failed to fetch assignees. Please reload table."},metricValues:{error:"Failed to fetch metric values. Please reload table."},assignableUser:{error:"Failed to fetch people. Please try again."},assignableStatus:{error:"Failed to fetch statuses. Please try again."},basicInfor:{error:"Failed to fetch basic information."},item:{error:"Update failed. Please try again."},removeAssignee:{error:"Update failed. Please try again."},metricList:{error:"Failed to fetch metrics. Please try again."},multipleAssignableUser:{error:"Failed to fetch data. Please reload table."},getPermission:{error:"Failed to fetch permissions."},delete_rendition:{success:"Deletion successful.",error:"Deletion failed. Please try again."},delete_thumbnail:{success:"Deletion successful.",error:"Deletion failed. Please try again."},archive_item:{success:"Archive successful.",error:"Archive failed. Please try again."},unarchive_item:{success:"Unarchive successful.",error:"Unarchive failed. Please try again."},bulkDelete:{success:"Deletion successful.",error:"Deletion failed. Please try again."},bulkArchive:{error:"Archive failed. Please try again."},bulkDateUpdate:{error:"Failed to update items."},bulkAssignUpdate:{error:"Failed to update assignees."},bulkStatusUpdate:{error:"Failed to update items."},getUserPermission:{error:"Failed to fetch user permissions."},getEntityDetail:{error:"Failed to fetch entity details."},bulkUnarchive:{error:"Unarchive failed. Please try again."},downloadTemplate:{},importItems:{},exportItems:{},updateFromFile:{},me:{},workspaces:{},entityUserRoles:{},templateFlowStatuses:{},bulkMetricUpdate:{error:"Update failed. Please try again."},createNewItem:{},getAssignableAssignees:{},getAssignableStatuses:{},getFilterStatuses:{}},offline:{error:"You are currently offline. Please check your network connection."}};class Ege extends Error{}class rl extends Ege{constructor(){super("Zone is an abstract class")}}class hV{get type(){throw new rl}get name(){throw new rl}get ianaName(){return this.name}get isUniversal(){throw new rl}offsetName(t,n){throw new rl}formatOffset(t,n){throw new rl}offset(t){throw new rl}equals(t){throw new rl}get isValid(){throw new rl}}const R0=new Map;function _ge(e){let t=R0.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),R0.set(e,t)),t}const Rge={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Dge(e,t){const n=e.format(t).replace(/\u200E/g,""),s=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,r,a,l,u,c]=s;return[r,o,i,a,l,u,c]}function Tge(e,t){const n=e.formatToParts(t),s=[];for(let o=0;o<n.length;o++){const{type:i,value:r}=n[o],a=Rge[i];i==="era"?s[a]=r:Zv(a)||(s[a]=parseInt(r,10))}return s}const D0=new Map;class Yv extends hV{static create(t){let n=D0.get(t);return n===void 0&&D0.set(t,n=new Yv(t)),n}static resetCache(){D0.clear(),R0.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=Yv.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:s}){return Fge(t,n,s,this.name)}formatOffset(t,n){return Jv(this.offset(t),n)}offset(t){if(!this.valid)return NaN;const n=new Date(t);if(isNaN(n))return NaN;const s=_ge(this.name);let[o,i,r,a,l,u,c]=s.formatToParts?Tge(s,n):Dge(s,n);a==="BC"&&(o=-Math.abs(o)+1);const h=xge({year:o,month:i,day:r,hour:l===24?0:l,minute:u,second:c,millisecond:0});let f=+n;const p=f%1e3;return f-=p>=0?p:1e3+p,(h-f)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let T0=null;class hd extends hV{static get utcInstance(){return T0===null&&(T0=new hd(0)),T0}static instance(t){return t===0?hd.utcInstance:new hd(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new hd(pV(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Jv(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Jv(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Jv(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}function Zv(e){return typeof e>"u"}function Xv(e,t=2){const n=e<0;let s;return n?s="-"+(""+-e).padStart(t,"0"):s=(""+e).padStart(t,"0"),s}function fV(e){if(!(Zv(e)||e===null||e===""))return parseInt(e,10)}function Ige(e){if(!(Zv(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function xge(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Fge(e,t,n,s=null){const o=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};s&&(i.timeZone=s);const r={timeZoneName:t,...i},a=new Intl.DateTimeFormat(n,r).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function pV(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const s=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-s:s;return n*60+o}function Jv(e,t){const n=Math.trunc(Math.abs(e/60)),s=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${Xv(n,2)}:${Xv(s,2)}`;case"narrow":return`${o}${n}${s>0?`:${s}`:""}`;case"techie":return`${o}${Xv(n,2)}${Xv(s,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}const gV=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function fd(...e){const t=e.reduce((n,s)=>n+s.source,"");return RegExp(`^${t}$`)}function pd(...e){return t=>e.reduce(([n,s,o],i)=>{const[r,a,l]=i(t,o);return[{...n,...r},a||s,l]},[{},null,1]).slice(0,2)}function mV(...e){return(t,n)=>{const s={};let o;for(o=0;o<e.length;o++)s[e[o]]=fV(t[n+o]);return[s,null,n+o]}}const vV=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,Pge=`(?:${vV.source}?(?:\\[(${gV.source})\\])?)?`,yV=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,wV=RegExp(`${yV.source}${Pge}`),I0=RegExp(`(?:[Tt]${wV.source})?`),Age=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,kge=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Oge=/(\d{4})-?(\d{3})/,Mge=mV("weekYear","weekNumber","weekDay"),Nge=mV("year","ordinal"),Lge=/(\d{4})-(\d\d)-(\d\d)/,CV=RegExp(`${yV.source} ?(?:${vV.source}|(${gV.source}))?`),Vge=RegExp(`(?: ${CV.source})?`);function gd(e,t,n){const s=e[t];return Zv(s)?n:fV(s)}function Bge(e,t){return[{year:gd(e,t),month:gd(e,t+1,1),day:gd(e,t+2,1)},null,t+3]}function md(e,t){return[{hours:gd(e,t,0),minutes:gd(e,t+1,0),seconds:gd(e,t+2,0),milliseconds:Ige(e[t+3])},null,t+4]}function Xf(e,t){const n=!e[t]&&!e[t+1],s=pV(e[t+1],e[t+2]),o=n?null:hd.instance(s);return[{},o,t+3]}function Jf(e,t){const n=e[t]?Yv.create(e[t]):null;return[{},n,t+1]}fd(Age,I0),fd(kge,I0),fd(Oge,I0),fd(wV),pd(Bge,md,Xf,Jf),pd(Mge,md,Xf,Jf),pd(Nge,md,Xf,Jf),pd(md,Xf,Jf),pd(md),fd(Lge,Vge),fd(CV),pd(md,Xf,Jf);function vd(e){"@babel/helpers - typeof";return vd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vd(e)}var bs;(function(e){e.review="{reviewDomain}/{ws_code}",e.review_take="{reviewDomain}/{ws_code}?id={take_id}",e.review_scene="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&tab=iteration",e.review_rendition="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}",e.review_frame="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}&tab=comment&refresh_marker=true#type=frame&data={frame}",e.review_rendition_comment="{reviewDomain}/{ws_code}?scene_id={scene_id}&rendition_id={rendition_id}&comment_id={comment_id}&tab=comment",e.review_comment="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&comment_id={comment_id}",e.scene_hub="{baseDomain}/{ws_code}/{scene_id}?o=st",e.hub_rendition="{baseDomain}/{ws_code}/{scene_id}?o=st&renditionId={rendition_id}",e.hub_comment="{baseDomain}/{ws_code}/{scene_id}?o=st&comment_id={comment_id}",e.people_insight="{baseDomain}/{ws_code}/{user_id}?o=pt",e.people_detail="{baseDomain}/{ws_code}/ws/ppl/{display_name}-{user_id}",e.project="{baseDomain}/{ws_code}/pl/dir/{entity_id}",e.project_focusMode="{baseDomain}/{ws_code}/pl/dir/{parent_id}?f={entity_id}",e.woohoo="{baseDomain}/{ws_code}/pl/woo/rpt/{woohoo_id}",e.update="{baseDomain}/{ws_code}/pl/au?id={entity_id}",e.core="{baseDomain}/{ws_code}"})(bs||(bs={})),bs.review,bs.review_take,bs.review_scene,bs.review_rendition,bs.review_frame,bs.review_rendition_comment,bs.review_comment,bs.scene_hub,bs.hub_rendition,bs.hub_comment,bs.people_insight,bs.people_detail,bs.project,bs.woohoo,bs.update,bs.core,bs.project_focusMode;var x0=null;function $ge(e){x0=e}function Qv(){if(!x0)throw new Error("i18n instance not set. Call setI18nInstance(i18n) before using errorHelper.");return x0}function bV(){try{var e=Qv();return e.t("errorMessages.fallback.unknownError")}catch{return"An error occurred. Please try again or contact support."}}function Hge(e,t,n,s){var o=e.replace(/{field}/g,t);if(s&&vd(s)==="object")Object.keys(s).forEach(function(r){var a="{".concat(r,"}"),l=s[r];Array.isArray(l)?l=l.join(", "):r==="value"&&(s.min||s.max)&&(l="".concat(s.min||s.value," and ").concat(s.max||s.value)),o=o.replace(new RegExp(a,"g"),l||"")});else if(Array.isArray(n)&&n.length>0){var i=n[0]||"";n.length>1?i="".concat(n[0]," and ").concat(n[1]):n.length===1&&Array.isArray(n[0])&&(i=n[0].join(", ")),o=o.replace(/{value}/g,i)}return o}function Gge(e,t){for(var n=Object.keys(t),s=0,o=n;s<o.length;s++){var i=o[s],r=Array.isArray(t[i])?t[i].join(", "):String(t[i]);e=e.replace(new RegExp("\\{".concat(i,"\\}"),"g"),r)}if(n.length>0&&e.includes("{value}")){var a=t[n[0]],l=Array.isArray(a)?a.join(", "):String(a);e=e.replace(/{value}/g,l)}return e}function SV(e){return!!(e&&e.validation&&e.validation.fields&&Object.keys(e.validation.fields).length>0)}function EV(e,t){if(!e||vd(e)!=="object")return null;try{var n=Qv();if(e.validation&&e.validation.fields)for(var s=e.validation.fields,o=Object.keys(s),i=0,r=o;i<r.length;i++){var a=r[i],l=s[a];if(l&&l.rule){var u=l.rule,c=l.data||[],d=l.params||{};try{var h,f,p=((h=n.messages)===null||h===void 0?void 0:h.value)||n.messages,g=((f=n.locale)===null||f===void 0?void 0:f.value)||n.locale,v=null;if(t){var C,S=t.toUpperCase();v=(C=p[g])===null||C===void 0||(C=C.errorMessages)===null||C===void 0||(C=C[S])===null||C===void 0||(C=C.validation_rules)===null||C===void 0?void 0:C[u]}if(!v){var b;v=(b=p[g])===null||b===void 0||(b=b.errorMessages)===null||b===void 0||(b=b.GEN)===null||b===void 0||(b=b.validation_rules)===null||b===void 0?void 0:b[u]}if(v&&typeof v=="string")return Hge(v,a,c,d)}catch(w){console.error("Error in validation rules",w)}}}}catch(w){return console.error("Error in getValidationErrorMessage:",w),null}return null}function Uge(e){if(!e)return bV();var t=e.code,n=e.error,s=e.details,o=e.message;if(SV(s)&&s){var i=EV(s,n==null?void 0:n.type);if(console.log("[Error Utils Debug]",i),i)return t!==""?"[".concat(t,"] ").concat(i):i;try{var r=Qv();return r.t("errorMessages.GEN.validation_error")}catch{return"Validation error occurred."}}if(n&&vd(n)==="object"&&n.type&&n.key){var a=n.type.toUpperCase();try{var l,u,c,d="errorMessages.".concat(a,".").concat(n.key),h=Qv(),f=((l=h.messages)===null||l===void 0?void 0:l.value)||h.messages,p=((u=h.locale)===null||u===void 0?void 0:u.value)||h.locale,g=(c=f[p])===null||c===void 0||(c=c.errorMessages)===null||c===void 0||(c=c[a])===null||c===void 0?void 0:c[n.key];if(g&&typeof g=="string"){var v=g;return s!=null&&s.context&&(v=Gge(v,s.context),console.log("[Error Utils Debug]",v)),t!==""?"[".concat(t,"] ").concat(v):v}}catch(S){console.error("[Error Utils Debug]",S)}}if(n&&vd(n)!=="object"&&SV(s)){var C=EV(s);if(C)return t!==""?"[".concat(t,"] ").concat(C):C}return o||bV()}var Wge={GEN:{general_error:"General Error",validation_error:"Validation error occurred.",data_locked:"Update failed. Record(s) are locked or currently being updated. You may try again later.",unauthenticated:"Authentication required. Please log in to continue.",unauthorized:"Access denied. You don’t have permission to view this.",not_found:"Resource not found. Check link or try again.",server_error:"Something went wrong on our end. Please try again later.",validation_rules:{required:"The {field} field is required",unique:"The {field} field must be unique",email:"{field} must be a valid email address",emails:"Invalid email(s) pattern",email_exists:"{field} already exists in workspace {value}",regex:"The {field} format is invalid",min:"{field} must be at least {value} characters",max:"{field} cannot exceed {value} characters",between:"{field} must be between {value} characters",numeric:"The {field} must be a number",integer:"The {field} must be an integer",date:"The {field} must be a valid date",after:"The {field} must be after {value}",before:"The {field} must be before {value}",image:"The {field} must be an image",mimes:"The {field} must be a file of type: {value}",max_file_size:"The {field} size cannot exceed {value}MB",confirmed:"The {field} confirmation does not match",same:"The {field} must match {value}",exists:"The Selected {field} is invalid",password_requirements:"The {field} does not meet security requirements",decimal:"Update failed. Maximum allowed decimal places is {value}.",before_or_equal:"{field} must be a date before or equal {value}.",after_or_equal:"{field} must be a date after or equal {value}."}},MRC:{validation_rules:{not_in:"Update failed. These values are not allowed: {value}.",in:"Update failed. Only these values are allowed: {value}.",between:"Update failed. Enter a value between {value}."},excess_decimal_places:"Update failed. Maximum allowed decimal places is {value}."},PPL:{invite_deleted_user:"Invitation failed. Users deleted from the workspace can't be re-invited. Please contact support.",insufficient_seats:"Invitation failed. No seats remaining. Purchase seat(s) to continue."},TM:{NO_ENTITY_TO_UNDEPLOY:"Undeploy failed. No entity specified.",NO_TEAM_EDITOR_ROLE:"No team editor role."},DIR:{has_project_admin_access:"Update failed. User has project access by default.",NO_EDIT_ENTITY_TEAM_ACCESS:"No permission to edit entity team."},AS:{"invalid_field (TBD)":"Something went wrong with account creation. Please contact support."},custom_default_msg:{general:{invalid_data:"Invalid data provided",retry:"Try again later."},network:{offline:"You are currently offline. Please check your network connection.",request_timeout:"Your request has timed out. Please ensure your internet connection is stable.",network_problem:"Network problem. Request timed out. Please try again later.",network_connection_lost:"Network connection lost",gateway_timeout:"Gateway Timeout"},auth:{token_expired:"Token refresh failed"},storage:{storage_limit:"Storage limit exceeded.",thumbnail_size_limit:"Thumbnail picture size can not exceed 2MB!",thumbnail_picture_format:"Thumbnail picture must be image format!",upload_limit:"Your upload exceeds the maximum allowed size"}},fallback:{unknownError:"An error occurred. Please try again or contact support."}};const Qf=Ql("toast",()=>{const e=l=>{var u;if((l==null?void 0:l.apiCode)==="offline")o({id:"offline",type:"error",message:"You are currently offline. Please check your network connection."});else{const c=Uge((u=l==null?void 0:l.res)==null?void 0:u.data);o({id:l==null?void 0:l.apiCode,type:"error",message:c})}},t=B([]),n=(l,u)=>{const c=Sge[l];if(c){const d=c[u];if(d){o({id:l,type:u,message:d});return}}else o({id:l,type:u,message:l})},s=new Map,o=(l,u=5e3)=>{const c={...l,id:l.id??Date.now()+Math.random()};if(t.value.push(c),u>0){const d=Date.now(),h=setTimeout(()=>{i(c.id),s.delete(c.id)},u);s.set(c.id,{timeoutId:h,remainingTime:u,startTime:d})}};function i(l){t.value=t.value.filter(c=>c.id!==l);const u=s.get(l);u&&(clearTimeout(u.timeoutId),s.delete(l))}function r(l){const u=s.get(l);if(u){clearTimeout(u.timeoutId);const c=Date.now()-u.startTime;u.remainingTime=Math.max(0,u.remainingTime-c)}}function a(l){const u=s.get(l);if(u&&u.remainingTime>0){const c=setTimeout(()=>{i(l),s.delete(l)},u.remainingTime);u.timeoutId=c,u.startTime=Date.now()}}return{notifications:t,addNotification:o,removeNotification:i,showMessage:n,showErrorNetMessage:e,pauseAutoDismiss:r,resumeAutoDismiss:a}}),zge=["onMouseenter","onMouseleave"],jge=["innerHTML"],Kge=["innerHTML"],qge=["data-tooltip"],Yge={key:2,style:{"min-width":"24px","min-height":"24px",position:"absolute",top:"0",right:"0",display:"flex","align-items":"center","justify-content":"center"}},Zge=_t(rt({__name:"Snackbar",setup(e){const t=Xt,n=EU,s=Qf(),{removeNotification:o}=s,{notifications:i}=Qs(s),r=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=s.pauseAutoDismiss)==null||p.call(s,f)},h=f=>{var p;c.value.delete(f),(p=s.resumeAutoDismiss)==null||p.call(s,f)};return(f,p)=>(j(),qe(rU,{name:"list",tag:"div",class:Q(["notification-center",f.$style["notification-wrapper"]])},{default:me(()=>[(j(!0),ce(xt,null,xn(U(i),g=>{var v;return Ke((j(),ce("div",{key:g.id,class:Q([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:C=>d(g.id),onMouseleave:C=>h(g.id)},[Ee("p",{class:Q(f.$style.snackbar__message)},[Ee("span",{class:Q(f.$style.snackbar__icon)},[!g.icon&&g.type=="success"?(j(),qe(lt,{key:0,src:"CircleCheck",source:"remote"})):Je("",!0),!g.icon&&g.type=="interactive"?(j(),qe(lt,{key:1,src:"CircleCheck",source:"remote"})):!g.icon&&g.type=="error"?(j(),qe(lt,{key:2,src:"CircleXMark",source:"remote"})):g.icon&&r(g.icon)?(j(),ce("i",{key:3,class:Q(f.$style["icon-draw"]),innerHTML:g.icon},null,10,jge)):g.icon&&!r(g.icon)?(j(),qe(lt,{key:4,src:g.icon,source:"remote",color:"var(--primary-color)"},null,8,["src"])):Je("",!0)],2),Ee("span",{class:Q(f.$style["error-message"])},[Ee("span",{class:Q(f.$style.message),innerHTML:g.message},null,10,Kge)],2)],2),g.actions?(j(),ce("div",{key:0,class:Q(f.$style["actions-notification"]),"data-notification":"true"},[(j(!0),ce(xt,null,xn(g.actions,C=>(j(),qe(mt,nn({key:C.label},{ref_for:!0},C,{onClick:Pt(C.action,["prevent","stop"]),variant:"secondary",size:"small"}),{prefix:me(()=>[C.btnIcon?(j(),qe(lt,{key:0,src:C.btnIcon,source:"remote",color:"var(--primary-color)"},null,8,["src"])):Je("",!0)]),_:2},1040,["onClick"]))),128))],2)):Je("",!0),g.type!=="interactive"?Ke((j(),ce("div",{key:1,"data-tooltip":a.value,style:{"min-width":"24px"}},[ge(mt,{variant:"secondary",onClick:C=>u(g.message),class:Q(f.$style["copy-btn"])},{prefix:me(()=>[ge(lt,{src:"Copy",source:"remote",color:"var(--primary-color)",size:"11"})]),_:1},8,["onClick","class"])],8,qge)),[[U(t),a.value]]):Je("",!0),g.type=="interactive"?Ke((j(),ce("div",Yge,[ge(mt,{variant:"tertiary",onClick:C=>U(o)(g.id),class:Q(f.$style["close-btn"]),size:18},{default:me(()=>[ge(lt,{src:"XMarkSolid",size:"9"})]),_:1},8,["onClick","class"])])),[[U(t),"Close"]]):Je("",!0)],42,zge)),[[U(n)]])}),128))]),_:1},8,["class"]))}}),[["__cssModules",{$style:{"notification-wrapper":"_notification-wrapper_egqq4_1","notification-item":"_notification-item_egqq4_15","notification--success":"_notification--success_egqq4_30","notification--error":"_notification--error_egqq4_36","close-btn":"_close-btn_egqq4_42","notification--info":"_notification--info_egqq4_45","notification--warning":"_notification--warning_egqq4_52","notification--interactive":"_notification--interactive_egqq4_59","snackbar-type":"_snackbar-type_egqq4_67",snackbar__message:"_snackbar__message_egqq4_76",message:"_message_egqq4_89","error-message":"_error-message_egqq4_97",snackbar__icon:"_snackbar__icon_egqq4_103","actions-notification":"_actions-notification_egqq4_112","icon-draw":"_icon-draw_egqq4_120","copy-btn":"_copy-btn_egqq4_128"}}]]);/*!
|
|
207
207
|
* vue-draggable-next v2.3.0
|
|
208
208
|
* (c) 2025 Anish George
|
|
209
209
|
* @license MIT
|
|
@@ -212,7 +212,7 @@ If you are trying to annotate ${s} with application data, use the '${s}.context'
|
|
|
212
212
|
* @author RubaXa <trash@rubaxa.org>
|
|
213
213
|
* @author owenm <owen23355@gmail.com>
|
|
214
214
|
* @license MIT
|
|
215
|
-
*/function DV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,s)}return n}function Er(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DV(Object(n),!0).forEach(function(s){tme(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DV(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function ey(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ey=function(t){return typeof t}:ey=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ey(e)}function tme(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function da(){return da=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},da.apply(this,arguments)}function nme(e,t){if(e==null)return{};var n={},s=Object.keys(e),o,i;for(i=0;i<s.length;i++)o=s[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function sme(e,t){if(e==null)return{};var n=nme(e,t),s,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)s=i[o],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}var ome="1.14.0";function ha(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var fa=ha(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ep=ha(/Edge/i),TV=ha(/firefox/i),tp=ha(/safari/i)&&!ha(/chrome/i)&&!ha(/android/i),IV=ha(/iP(ad|od|hone)/i),ime=ha(/chrome/i)&&ha(/android/i),xV={capture:!1,passive:!1};function wn(e,t,n){e.addEventListener(t,n,!fa&&xV)}function fn(e,t,n){e.removeEventListener(t,n,!fa&&xV)}function ty(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function rme(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function _r(e,t,n,s){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&ty(e,t):ty(e,t))||s&&e===n)return e;if(e===n)break}while(e=rme(e))}return null}var FV=/\s+/g;function Bo(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var s=(" "+e.className+" ").replace(FV," ").replace(" "+t+" "," ");e.className=(s+(n?" "+t:"")).replace(FV," ")}}function Vt(e,t,n){var s=e&&e.style;if(s){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in s)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),s[t]=n+(typeof n=="string"?"":"px")}}function yd(e,t){var n="";if(typeof e=="string")n=e;else do{var s=Vt(e,"transform");s&&s!=="none"&&(n=s+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function PV(e,t,n){if(e){var s=e.getElementsByTagName(t),o=0,i=s.length;if(n)for(;o<i;o++)n(s[o],o);return s}return[]}function Rr(){var e=document.scrollingElement;return e||document.documentElement}function Ss(e,t,n,s,o){if(!(!e.getBoundingClientRect&&e!==window)){var i,r,a,l,u,c,d;if(e!==window&&e.parentNode&&e!==Rr()?(i=e.getBoundingClientRect(),r=i.top,a=i.left,l=i.bottom,u=i.right,c=i.height,d=i.width):(r=0,a=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!fa))do if(o&&o.getBoundingClientRect&&(Vt(o,"transform")!=="none"||n&&Vt(o,"position")!=="static")){var h=o.getBoundingClientRect();r-=h.top+parseInt(Vt(o,"border-top-width")),a-=h.left+parseInt(Vt(o,"border-left-width")),l=r+i.height,u=a+i.width;break}while(o=o.parentNode);if(s&&e!==window){var f=yd(o||e),p=f&&f.a,g=f&&f.d;f&&(r/=g,a/=p,d/=p,c/=g,l=r+c,u=a+d)}return{top:r,left:a,bottom:l,right:u,width:d,height:c}}}function AV(e,t,n){for(var s=al(e,!0),o=Ss(e)[t];s;){var i=Ss(s)[n],r=void 0;if(r=o>=i,!r)return s;if(s===Rr())break;s=al(s,!1)}return!1}function wd(e,t,n,s){for(var o=0,i=0,r=e.children;i<r.length;){if(r[i].style.display!=="none"&&r[i]!==Bt.ghost&&(s||r[i]!==Bt.dragged)&&_r(r[i],n.draggable,e,!1)){if(o===t)return r[i];o++}i++}return null}function P0(e,t){for(var n=e.lastElementChild;n&&(n===Bt.ghost||Vt(n,"display")==="none"||t&&!ty(n,t));)n=n.previousElementSibling;return n||null}function di(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==Bt.clone&&(!t||ty(e,t))&&n++;return n}function kV(e){var t=0,n=0,s=Rr();if(e)do{var o=yd(e),i=o.a,r=o.d;t+=e.scrollLeft*i,n+=e.scrollTop*r}while(e!==s&&(e=e.parentNode));return[t,n]}function ame(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var s in t)if(t.hasOwnProperty(s)&&t[s]===e[n][s])return Number(n)}return-1}function al(e,t){if(!e||!e.getBoundingClientRect)return Rr();var n=e,s=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=Vt(n);if(n.clientWidth<n.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return Rr();if(s||t)return n;s=!0}}while(n=n.parentNode);return Rr()}function lme(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function A0(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var np;function OV(e,t){return function(){if(!np){var n=arguments,s=this;n.length===1?e.call(s,n[0]):e.apply(s,n),np=setTimeout(function(){np=void 0},t)}}}function ume(){clearTimeout(np),np=void 0}function MV(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function NV(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var $o="Sortable"+new Date().getTime();function cme(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var s=[].slice.call(this.el.children);s.forEach(function(o){if(!(Vt(o,"display")==="none"||o===Bt.ghost)){e.push({target:o,rect:Ss(o)});var i=Er({},e[e.length-1].rect);if(o.thisAnimationDuration){var r=yd(o,!0);r&&(i.top-=r.f,i.left-=r.e)}o.fromRect=i}})}},addAnimationState:function(s){e.push(s)},removeAnimationState:function(s){e.splice(ame(e,{target:s}),1)},animateAll:function(s){var o=this;if(!this.options.animation){clearTimeout(t),typeof s=="function"&&s();return}var i=!1,r=0;e.forEach(function(a){var l=0,u=a.target,c=u.fromRect,d=Ss(u),h=u.prevFromRect,f=u.prevToRect,p=a.rect,g=yd(u,!0);g&&(d.top-=g.f,d.left-=g.e),u.toRect=d,u.thisAnimationDuration&&A0(h,d)&&!A0(c,d)&&(p.top-d.top)/(p.left-d.left)===(c.top-d.top)/(c.left-d.left)&&(l=hme(p,h,f,o.options)),A0(d,c)||(u.prevFromRect=c,u.prevToRect=d,l||(l=o.options.animation),o.animate(u,p,d,l)),l&&(i=!0,r=Math.max(r,l),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},l),u.thisAnimationDuration=l)}),clearTimeout(t),i?t=setTimeout(function(){typeof s=="function"&&s()},r):typeof s=="function"&&s(),e=[]},animate:function(s,o,i,r){if(r){Vt(s,"transition",""),Vt(s,"transform","");var a=yd(this.el),l=a&&a.a,u=a&&a.d,c=(o.left-i.left)/(l||1),d=(o.top-i.top)/(u||1);s.animatingX=!!c,s.animatingY=!!d,Vt(s,"transform","translate3d("+c+"px,"+d+"px,0)"),this.forRepaintDummy=dme(s),Vt(s,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),Vt(s,"transform","translate3d(0,0,0)"),typeof s.animated=="number"&&clearTimeout(s.animated),s.animated=setTimeout(function(){Vt(s,"transition",""),Vt(s,"transform",""),s.animated=!1,s.animatingX=!1,s.animatingY=!1},r)}}}}function dme(e){return e.offsetWidth}function hme(e,t,n,s){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*s.animation}var Cd=[],k0={initializeByDefault:!0},sp={mount:function(t){for(var n in k0)k0.hasOwnProperty(n)&&!(n in t)&&(t[n]=k0[n]);Cd.forEach(function(s){if(s.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Cd.push(t)},pluginEvent:function(t,n,s){var o=this;this.eventCanceled=!1,s.cancel=function(){o.eventCanceled=!0};var i=t+"Global";Cd.forEach(function(r){n[r.pluginName]&&(n[r.pluginName][i]&&n[r.pluginName][i](Er({sortable:n},s)),n.options[r.pluginName]&&n[r.pluginName][t]&&n[r.pluginName][t](Er({sortable:n},s)))})},initializePlugins:function(t,n,s,o){Cd.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var u=new a(t,n,t.options);u.sortable=t,u.options=t.options,t[l]=u,da(s,u.defaults)}});for(var i in t.options)if(t.options.hasOwnProperty(i)){var r=this.modifyOption(t,i,t.options[i]);typeof r<"u"&&(t.options[i]=r)}},getEventProperties:function(t,n){var s={};return Cd.forEach(function(o){typeof o.eventProperties=="function"&&da(s,o.eventProperties.call(n[o.pluginName],t))}),s},modifyOption:function(t,n,s){var o;return Cd.forEach(function(i){t[i.pluginName]&&i.optionListeners&&typeof i.optionListeners[n]=="function"&&(o=i.optionListeners[n].call(t[i.pluginName],s))}),o}};function fme(e){var t=e.sortable,n=e.rootEl,s=e.name,o=e.targetEl,i=e.cloneEl,r=e.toEl,a=e.fromEl,l=e.oldIndex,u=e.newIndex,c=e.oldDraggableIndex,d=e.newDraggableIndex,h=e.originalEvent,f=e.putSortable,p=e.extraEventProperties;if(t=t||n&&n[$o],!!t){var g,v=t.options,C="on"+s.charAt(0).toUpperCase()+s.substr(1);window.CustomEvent&&!fa&&!ep?g=new CustomEvent(s,{bubbles:!0,cancelable:!0}):(g=document.createEvent("Event"),g.initEvent(s,!0,!0)),g.to=r||n,g.from=a||n,g.item=o||n,g.clone=i,g.oldIndex=l,g.newIndex=u,g.oldDraggableIndex=c,g.newDraggableIndex=d,g.originalEvent=h,g.pullMode=f?f.lastPutMode:void 0;var S=Er(Er({},p),sp.getEventProperties(s,t));for(var b in S)g[b]=S[b];n&&n.dispatchEvent(g),v[C]&&v[C].call(t,g)}}var pme=["evt"],mo=function(t,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=s.evt,i=sme(s,pme);sp.pluginEvent.bind(Bt)(t,n,Er({dragEl:ft,parentEl:Jn,ghostEl:Yt,rootEl:Un,nextEl:Su,lastDownEl:ny,cloneEl:Qn,cloneHidden:ll,dragStarted:ip,putSortable:Os,activeSortable:Bt.active,originalEvent:o,oldIndex:bd,oldDraggableIndex:op,newIndex:Ho,newDraggableIndex:ul,hideGhostForTarget:UV,unhideGhostForTarget:WV,cloneNowHidden:function(){ll=!0},cloneNowShown:function(){ll=!1},dispatchSortableEvent:function(a){to({sortable:n,name:a,originalEvent:o})}},i))};function to(e){fme(Er({putSortable:Os,cloneEl:Qn,targetEl:ft,rootEl:Un,oldIndex:bd,oldDraggableIndex:op,newIndex:Ho,newDraggableIndex:ul},e))}var ft,Jn,Yt,Un,Su,ny,Qn,ll,bd,Ho,op,ul,sy,Os,Sd=!1,oy=!1,iy=[],Eu,Bi,O0,M0,LV,VV,ip,Ed,rp,ap=!1,ry=!1,ay,zs,N0=[],L0=!1,ly=[],uy=typeof document<"u",cy=IV,BV=ep||fa?"cssFloat":"float",gme=uy&&!ime&&!IV&&"draggable"in document.createElement("div"),$V=function(){if(uy){if(fa)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),HV=function(t,n){var s=Vt(t),o=parseInt(s.width)-parseInt(s.paddingLeft)-parseInt(s.paddingRight)-parseInt(s.borderLeftWidth)-parseInt(s.borderRightWidth),i=wd(t,0,n),r=wd(t,1,n),a=i&&Vt(i),l=r&&Vt(r),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Ss(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Ss(r).width;if(s.display==="flex")return s.flexDirection==="column"||s.flexDirection==="column-reverse"?"vertical":"horizontal";if(s.display==="grid")return s.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&a.float!=="none"){var d=a.float==="left"?"left":"right";return r&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return i&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||u>=o&&s[BV]==="none"||r&&s[BV]==="none"&&u+c>o)?"vertical":"horizontal"},mme=function(t,n,s){var o=s?t.left:t.top,i=s?t.right:t.bottom,r=s?t.width:t.height,a=s?n.left:n.top,l=s?n.right:n.bottom,u=s?n.width:n.height;return o===a||i===l||o+r/2===a+u/2},vme=function(t,n){var s;return iy.some(function(o){var i=o[$o].options.emptyInsertThreshold;if(!(!i||P0(o))){var r=Ss(o),a=t>=r.left-i&&t<=r.right+i,l=n>=r.top-i&&n<=r.bottom+i;if(a&&l)return s=o}}),s},GV=function(t){function n(i,r){return function(a,l,u,c){var d=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(i==null&&(r||d))return!0;if(i==null||i===!1)return!1;if(r&&i==="clone")return i;if(typeof i=="function")return n(i(a,l,u,c),r)(a,l,u,c);var h=(r?a:l).options.group.name;return i===!0||typeof i=="string"&&i===h||i.join&&i.indexOf(h)>-1}}var s={},o=t.group;(!o||ey(o)!="object")&&(o={name:o}),s.name=o.name,s.checkPull=n(o.pull,!0),s.checkPut=n(o.put),s.revertClone=o.revertClone,t.group=s},UV=function(){!$V&&Yt&&Vt(Yt,"display","none")},WV=function(){!$V&&Yt&&Vt(Yt,"display","")};uy&&document.addEventListener("click",function(e){if(oy)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),oy=!1,!1},!0);var _u=function(t){if(ft){t=t.touches?t.touches[0]:t;var n=vme(t.clientX,t.clientY);if(n){var s={};for(var o in t)t.hasOwnProperty(o)&&(s[o]=t[o]);s.target=s.rootEl=n,s.preventDefault=void 0,s.stopPropagation=void 0,n[$o]._onDragOver(s)}}},yme=function(t){ft&&ft.parentNode[$o]._isOutsideThisEl(t.target)};function Bt(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=da({},t),e[$o]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return HV(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(r,a){r.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Bt.supportPointer!==!1&&"PointerEvent"in window&&!tp,emptyInsertThreshold:5};sp.initializePlugins(this,e,n);for(var s in n)!(s in t)&&(t[s]=n[s]);GV(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:gme,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?wn(e,"pointerdown",this._onTapStart):(wn(e,"mousedown",this._onTapStart),wn(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(wn(e,"dragover",this),wn(e,"dragenter",this)),iy.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),da(this,cme())}Bt.prototype={constructor:Bt,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Ed=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,ft):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,s=this.el,o=this.options,i=o.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(Dme(s),!ft&&!(/mousedown|pointerdown/.test(r)&&t.button!==0||o.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&tp&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=_r(l,o.draggable,s,!1),!(l&&l.animated)&&ny!==l)){if(bd=di(l),op=di(l,o.draggable),typeof c=="function"){if(c.call(this,t,l,this)){to({sortable:n,rootEl:u,name:"filter",targetEl:l,toEl:s,fromEl:s}),mo("filter",n,{evt:t}),i&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(d){if(d=_r(u,d.trim(),s,!1),d)return to({sortable:n,rootEl:d,name:"filter",targetEl:l,fromEl:s,toEl:s}),mo("filter",n,{evt:t}),!0}),c)){i&&t.cancelable&&t.preventDefault();return}o.handle&&!_r(u,o.handle,s,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,n,s){var o=this,i=o.el,r=o.options,a=i.ownerDocument,l;if(s&&!ft&&s.parentNode===i){var u=Ss(s);if(Un=i,ft=s,Jn=ft.parentNode,Su=ft.nextSibling,ny=s,sy=r.group,Bt.dragged=ft,Eu={target:ft,clientX:(n||t).clientX,clientY:(n||t).clientY},LV=Eu.clientX-u.left,VV=Eu.clientY-u.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,ft.style["will-change"]="all",l=function(){if(mo("delayEnded",o,{evt:t}),Bt.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!TV&&o.nativeDraggable&&(ft.draggable=!0),o._triggerDragStart(t,n),to({sortable:o,name:"choose",originalEvent:t}),Bo(ft,r.chosenClass,!0)},r.ignore.split(",").forEach(function(c){PV(ft,c.trim(),V0)}),wn(a,"dragover",_u),wn(a,"mousemove",_u),wn(a,"touchmove",_u),wn(a,"mouseup",o._onDrop),wn(a,"touchend",o._onDrop),wn(a,"touchcancel",o._onDrop),TV&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ft.draggable=!0),mo("delayStart",this,{evt:t}),r.delay&&(!r.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(ep||fa))){if(Bt.eventCanceled){this._onDrop();return}wn(a,"mouseup",o._disableDelayedDrag),wn(a,"touchend",o._disableDelayedDrag),wn(a,"touchcancel",o._disableDelayedDrag),wn(a,"mousemove",o._delayedDragTouchMoveHandler),wn(a,"touchmove",o._delayedDragTouchMoveHandler),r.supportPointer&&wn(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,r.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ft&&V0(ft),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;fn(t,"mouseup",this._disableDelayedDrag),fn(t,"touchend",this._disableDelayedDrag),fn(t,"touchcancel",this._disableDelayedDrag),fn(t,"mousemove",this._delayedDragTouchMoveHandler),fn(t,"touchmove",this._delayedDragTouchMoveHandler),fn(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?wn(document,"pointermove",this._onTouchMove):n?wn(document,"touchmove",this._onTouchMove):wn(document,"mousemove",this._onTouchMove):(wn(ft,"dragend",this),wn(Un,"dragstart",this._onDragStart));try{document.selection?hy(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(Sd=!1,Un&&ft){mo("dragStarted",this,{evt:n}),this.nativeDraggable&&wn(document,"dragover",yme);var s=this.options;!t&&Bo(ft,s.dragClass,!1),Bo(ft,s.ghostClass,!0),Bt.active=this,t&&this._appendGhost(),to({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Bi){this._lastX=Bi.clientX,this._lastY=Bi.clientY,UV();for(var t=document.elementFromPoint(Bi.clientX,Bi.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Bi.clientX,Bi.clientY),t!==n);)n=t;if(ft.parentNode[$o]._isOutsideThisEl(t),n)do{if(n[$o]){var s=void 0;if(s=n[$o]._onDragOver({clientX:Bi.clientX,clientY:Bi.clientY,target:t,rootEl:n}),s&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);WV()}},_onTouchMove:function(t){if(Eu){var n=this.options,s=n.fallbackTolerance,o=n.fallbackOffset,i=t.touches?t.touches[0]:t,r=Yt&&yd(Yt,!0),a=Yt&&r&&r.a,l=Yt&&r&&r.d,u=cy&&zs&&kV(zs),c=(i.clientX-Eu.clientX+o.x)/(a||1)+(u?u[0]-N0[0]:0)/(a||1),d=(i.clientY-Eu.clientY+o.y)/(l||1)+(u?u[1]-N0[1]:0)/(l||1);if(!Bt.active&&!Sd){if(s&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<s)return;this._onDragStart(t,!0)}if(Yt){r?(r.e+=c-(O0||0),r.f+=d-(M0||0)):r={a:1,b:0,c:0,d:1,e:c,f:d};var h="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");Vt(Yt,"webkitTransform",h),Vt(Yt,"mozTransform",h),Vt(Yt,"msTransform",h),Vt(Yt,"transform",h),O0=c,M0=d,Bi=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Yt){var t=this.options.fallbackOnBody?document.body:Un,n=Ss(ft,!0,cy,!0,t),s=this.options;if(cy){for(zs=t;Vt(zs,"position")==="static"&&Vt(zs,"transform")==="none"&&zs!==document;)zs=zs.parentNode;zs!==document.body&&zs!==document.documentElement?(zs===document&&(zs=Rr()),n.top+=zs.scrollTop,n.left+=zs.scrollLeft):zs=Rr(),N0=kV(zs)}Yt=ft.cloneNode(!0),Bo(Yt,s.ghostClass,!1),Bo(Yt,s.fallbackClass,!0),Bo(Yt,s.dragClass,!0),Vt(Yt,"transition",""),Vt(Yt,"transform",""),Vt(Yt,"box-sizing","border-box"),Vt(Yt,"margin",0),Vt(Yt,"top",n.top),Vt(Yt,"left",n.left),Vt(Yt,"width",n.width),Vt(Yt,"height",n.height),Vt(Yt,"opacity","0.8"),Vt(Yt,"position",cy?"absolute":"fixed"),Vt(Yt,"zIndex","100000"),Vt(Yt,"pointerEvents","none"),Bt.ghost=Yt,t.appendChild(Yt),Vt(Yt,"transform-origin",LV/parseInt(Yt.style.width)*100+"% "+VV/parseInt(Yt.style.height)*100+"%")}},_onDragStart:function(t,n){var s=this,o=t.dataTransfer,i=s.options;if(mo("dragStart",this,{evt:t}),Bt.eventCanceled){this._onDrop();return}mo("setupClone",this),Bt.eventCanceled||(Qn=NV(ft),Qn.draggable=!1,Qn.style["will-change"]="",this._hideClone(),Bo(Qn,this.options.chosenClass,!1),Bt.clone=Qn),s.cloneId=hy(function(){mo("clone",s),!Bt.eventCanceled&&(s.options.removeCloneOnHide||Un.insertBefore(Qn,ft),s._hideClone(),to({sortable:s,name:"clone"}))}),!n&&Bo(ft,i.dragClass,!0),n?(oy=!0,s._loopId=setInterval(s._emulateDragOver,50)):(fn(document,"mouseup",s._onDrop),fn(document,"touchend",s._onDrop),fn(document,"touchcancel",s._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(s,o,ft)),wn(document,"drop",s),Vt(ft,"transform","translateZ(0)")),Sd=!0,s._dragStartId=hy(s._dragStarted.bind(s,n,t)),wn(document,"selectstart",s),ip=!0,tp&&Vt(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,s=t.target,o,i,r,a=this.options,l=a.group,u=Bt.active,c=sy===l,d=a.sort,h=Os||u,f,p=this,g=!1;if(L0)return;function v(ee,X){mo(ee,p,Er({evt:t,isOwner:c,axis:f?"vertical":"horizontal",revert:r,dragRect:o,targetRect:i,canSort:d,fromSortable:h,target:s,completed:S,onMove:function(te,N){return dy(Un,n,ft,o,te,Ss(te),t,N)},changed:b},X))}function C(){v("dragOverAnimationCapture"),p.captureAnimationState(),p!==h&&h.captureAnimationState()}function S(ee){return v("dragOverCompleted",{insertion:ee}),ee&&(c?u._hideClone():u._showClone(p),p!==h&&(Bo(ft,Os?Os.options.ghostClass:u.options.ghostClass,!1),Bo(ft,a.ghostClass,!0)),Os!==p&&p!==Bt.active?Os=p:p===Bt.active&&Os&&(Os=null),h===p&&(p._ignoreWhileAnimating=s),p.animateAll(function(){v("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(s===ft&&!ft.animated||s===n&&!s.animated)&&(Ed=null),!a.dragoverBubble&&!t.rootEl&&s!==document&&(ft.parentNode[$o]._isOutsideThisEl(t.target),!ee&&_u(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function b(){Ho=di(ft),ul=di(ft,a.draggable),to({sortable:p,name:"change",toEl:n,newIndex:Ho,newDraggableIndex:ul,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),s=_r(s,a.draggable,n,!0),v("dragOver"),Bt.eventCanceled)return g;if(ft.contains(t.target)||s.animated&&s.animatingX&&s.animatingY||p._ignoreWhileAnimating===s)return S(!1);if(oy=!1,u&&!a.disabled&&(c?d||(r=Jn!==Un):Os===this||(this.lastPutMode=sy.checkPull(this,u,ft,t))&&l.checkPut(this,u,ft,t))){if(f=this._getDirection(t,s)==="vertical",o=Ss(ft),v("dragOverValid"),Bt.eventCanceled)return g;if(r)return Jn=Un,C(),this._hideClone(),v("revert"),Bt.eventCanceled||(Su?Un.insertBefore(ft,Su):Un.appendChild(ft)),S(!0);var w=P0(n,a.draggable);if(!w||Sme(t,f,this)&&!w.animated){if(w===ft)return S(!1);if(w&&n===t.target&&(s=w),s&&(i=Ss(s)),dy(Un,n,ft,o,s,i,t,!!s)!==!1)return C(),n.appendChild(ft),Jn=n,b(),S(!0)}else if(w&&bme(t,f,this)){var _=wd(n,0,a,!0);if(_===ft)return S(!1);if(s=_,i=Ss(s),dy(Un,n,ft,o,s,i,t,!1)!==!1)return C(),n.insertBefore(ft,_),Jn=n,b(),S(!0)}else if(s.parentNode===n){i=Ss(s);var R=0,T,I=ft.parentNode!==n,x=!mme(ft.animated&&ft.toRect||o,s.animated&&s.toRect||i,f),P=f?"top":"left",D=AV(s,"top","top")||AV(ft,"top","top"),F=D?D.scrollTop:void 0;Ed!==s&&(T=i[P],ap=!1,ry=!x&&a.invertSwap||I),R=Eme(t,s,i,f,x?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,ry,Ed===s);var k;if(R!==0){var O=di(ft);do O-=R,k=Jn.children[O];while(k&&(Vt(k,"display")==="none"||k===Yt))}if(R===0||k===s)return S(!1);Ed=s,rp=R;var $=s.nextElementSibling,q=!1;q=R===1;var J=dy(Un,n,ft,o,s,i,t,q);if(J!==!1)return(J===1||J===-1)&&(q=J===1),L0=!0,setTimeout(Cme,30),C(),q&&!$?n.appendChild(ft):s.parentNode.insertBefore(ft,q?$:s),D&&MV(D,0,F-D.scrollTop),Jn=ft.parentNode,T!==void 0&&!ry&&(ay=Math.abs(T-Ss(s)[P])),b(),S(!0)}if(n.contains(ft))return S(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){fn(document,"mousemove",this._onTouchMove),fn(document,"touchmove",this._onTouchMove),fn(document,"pointermove",this._onTouchMove),fn(document,"dragover",_u),fn(document,"mousemove",_u),fn(document,"touchmove",_u)},_offUpEvents:function(){var t=this.el.ownerDocument;fn(t,"mouseup",this._onDrop),fn(t,"touchend",this._onDrop),fn(t,"pointerup",this._onDrop),fn(t,"touchcancel",this._onDrop),fn(document,"selectstart",this)},_onDrop:function(t){var n=this.el,s=this.options;if(Ho=di(ft),ul=di(ft,s.draggable),mo("drop",this,{evt:t}),Jn=ft&&ft.parentNode,Ho=di(ft),ul=di(ft,s.draggable),Bt.eventCanceled){this._nulling();return}Sd=!1,ry=!1,ap=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),B0(this.cloneId),B0(this._dragStartId),this.nativeDraggable&&(fn(document,"drop",this),fn(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),tp&&Vt(document.body,"user-select",""),Vt(ft,"transform",""),t&&(ip&&(t.cancelable&&t.preventDefault(),!s.dropBubble&&t.stopPropagation()),Yt&&Yt.parentNode&&Yt.parentNode.removeChild(Yt),(Un===Jn||Os&&Os.lastPutMode!=="clone")&&Qn&&Qn.parentNode&&Qn.parentNode.removeChild(Qn),ft&&(this.nativeDraggable&&fn(ft,"dragend",this),V0(ft),ft.style["will-change"]="",ip&&!Sd&&Bo(ft,Os?Os.options.ghostClass:this.options.ghostClass,!1),Bo(ft,this.options.chosenClass,!1),to({sortable:this,name:"unchoose",toEl:Jn,newIndex:null,newDraggableIndex:null,originalEvent:t}),Un!==Jn?(Ho>=0&&(to({rootEl:Jn,name:"add",toEl:Jn,fromEl:Un,originalEvent:t}),to({sortable:this,name:"remove",toEl:Jn,originalEvent:t}),to({rootEl:Jn,name:"sort",toEl:Jn,fromEl:Un,originalEvent:t}),to({sortable:this,name:"sort",toEl:Jn,originalEvent:t})),Os&&Os.save()):Ho!==bd&&Ho>=0&&(to({sortable:this,name:"update",toEl:Jn,originalEvent:t}),to({sortable:this,name:"sort",toEl:Jn,originalEvent:t})),Bt.active&&((Ho==null||Ho===-1)&&(Ho=bd,ul=op),to({sortable:this,name:"end",toEl:Jn,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){mo("nulling",this),Un=ft=Jn=Yt=Su=Qn=ny=ll=Eu=Bi=ip=Ho=ul=bd=op=Ed=rp=Os=sy=Bt.dragged=Bt.ghost=Bt.clone=Bt.active=null,ly.forEach(function(t){t.checked=!0}),ly.length=O0=M0=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":ft&&(this._onDragOver(t),wme(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,s=this.el.children,o=0,i=s.length,r=this.options;o<i;o++)n=s[o],_r(n,r.draggable,this.el,!1)&&t.push(n.getAttribute(r.dataIdAttr)||Rme(n));return t},sort:function(t,n){var s={},o=this.el;this.toArray().forEach(function(i,r){var a=o.children[r];_r(a,this.options.draggable,o,!1)&&(s[i]=a)},this),n&&this.captureAnimationState(),t.forEach(function(i){s[i]&&(o.removeChild(s[i]),o.appendChild(s[i]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return _r(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var s=this.options;if(n===void 0)return s[t];var o=sp.modifyOption(this,t,n);typeof o<"u"?s[t]=o:s[t]=n,t==="group"&&GV(s)},destroy:function(){mo("destroy",this);var t=this.el;t[$o]=null,fn(t,"mousedown",this._onTapStart),fn(t,"touchstart",this._onTapStart),fn(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(fn(t,"dragover",this),fn(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),iy.splice(iy.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!ll){if(mo("hideClone",this),Bt.eventCanceled)return;Vt(Qn,"display","none"),this.options.removeCloneOnHide&&Qn.parentNode&&Qn.parentNode.removeChild(Qn),ll=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(ll){if(mo("showClone",this),Bt.eventCanceled)return;ft.parentNode==Un&&!this.options.group.revertClone?Un.insertBefore(Qn,ft):Su?Un.insertBefore(Qn,Su):Un.appendChild(Qn),this.options.group.revertClone&&this.animate(ft,Qn),Vt(Qn,"display",""),ll=!1}}};function wme(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function dy(e,t,n,s,o,i,r,a){var l,u=e[$o],c=u.options.onMove,d;return window.CustomEvent&&!fa&&!ep?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=e,l.dragged=n,l.draggedRect=s,l.related=o||t,l.relatedRect=i||Ss(t),l.willInsertAfter=a,l.originalEvent=r,e.dispatchEvent(l),c&&(d=c.call(u,l,r)),d}function V0(e){e.draggable=!1}function Cme(){L0=!1}function bme(e,t,n){var s=Ss(wd(n.el,0,n.options,!0)),o=10;return t?e.clientX<s.left-o||e.clientY<s.top&&e.clientX<s.right:e.clientY<s.top-o||e.clientY<s.bottom&&e.clientX<s.left}function Sme(e,t,n){var s=Ss(P0(n.el,n.options.draggable)),o=10;return t?e.clientX>s.right+o||e.clientX<=s.right&&e.clientY>s.bottom&&e.clientX>=s.left:e.clientX>s.right&&e.clientY>s.top||e.clientX<=s.right&&e.clientY>s.bottom+o}function Eme(e,t,n,s,o,i,r,a){var l=s?e.clientY:e.clientX,u=s?n.height:n.width,c=s?n.top:n.left,d=s?n.bottom:n.right,h=!1;if(!r){if(a&&ay<u*o){if(!ap&&(rp===1?l>c+u*i/2:l<d-u*i/2)&&(ap=!0),ap)h=!0;else if(rp===1?l<c+ay:l>d-ay)return-rp}else if(l>c+u*(1-o)/2&&l<d-u*(1-o)/2)return _me(t)}return h=h||r,h&&(l<c+u*i/2||l>d-u*i/2)?l>c+u/2?1:-1:0}function _me(e){return di(ft)<di(e)?1:-1}function Rme(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,s=0;n--;)s+=t.charCodeAt(n);return s.toString(36)}function Dme(e){ly.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var s=t[n];s.checked&&ly.push(s)}}function hy(e){return setTimeout(e,0)}function B0(e){return clearTimeout(e)}uy&&wn(document,"touchmove",function(e){(Bt.active||Sd)&&e.cancelable&&e.preventDefault()}),Bt.utils={on:wn,off:fn,css:Vt,find:PV,is:function(t,n){return!!_r(t,n,t,!1)},extend:lme,throttle:OV,closest:_r,toggleClass:Bo,clone:NV,index:di,nextTick:hy,cancelNextTick:B0,detectDirection:HV,getChild:wd},Bt.get=function(e){return e[$o]},Bt.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(s){if(!s.prototype||!s.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(s));s.utils&&(Bt.utils=Er(Er({},Bt.utils),s.utils)),sp.mount(s)})},Bt.create=function(e,t){return new Bt(e,t)},Bt.version=ome;var hs=[],lp,$0,H0=!1,G0,U0,fy,up;function Tme(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(n){var s=n.originalEvent;this.sortable.nativeDraggable?wn(document,"dragover",this._handleAutoScroll):this.options.supportPointer?wn(document,"pointermove",this._handleFallbackAutoScroll):s.touches?wn(document,"touchmove",this._handleFallbackAutoScroll):wn(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var s=n.originalEvent;!this.options.dragOverBubble&&!s.rootEl&&this._handleAutoScroll(s)},drop:function(){this.sortable.nativeDraggable?fn(document,"dragover",this._handleAutoScroll):(fn(document,"pointermove",this._handleFallbackAutoScroll),fn(document,"touchmove",this._handleFallbackAutoScroll),fn(document,"mousemove",this._handleFallbackAutoScroll)),zV(),py(),ume()},nulling:function(){fy=$0=lp=H0=up=G0=U0=null,hs.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,s){var o=this,i=(n.touches?n.touches[0]:n).clientX,r=(n.touches?n.touches[0]:n).clientY,a=document.elementFromPoint(i,r);if(fy=n,s||this.options.forceAutoScrollFallback||ep||fa||tp){W0(n,this.options,a,s);var l=al(a,!0);H0&&(!up||i!==G0||r!==U0)&&(up&&zV(),up=setInterval(function(){var u=al(document.elementFromPoint(i,r),!0);u!==l&&(l=u,py()),W0(n,o.options,u,s)},10),G0=i,U0=r)}else{if(!this.options.bubbleScroll||al(a,!0)===Rr()){py();return}W0(n,this.options,al(a,!1),!1)}}},da(e,{pluginName:"scroll",initializeByDefault:!0})}function py(){hs.forEach(function(e){clearInterval(e.pid)}),hs=[]}function zV(){clearInterval(up)}var W0=OV(function(e,t,n,s){if(t.scroll){var o=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,r=t.scrollSensitivity,a=t.scrollSpeed,l=Rr(),u=!1,c;$0!==n&&($0=n,py(),lp=t.scroll,c=t.scrollFn,lp===!0&&(lp=al(n,!0)));var d=0,h=lp;do{var f=h,p=Ss(f),g=p.top,v=p.bottom,C=p.left,S=p.right,b=p.width,w=p.height,_=void 0,R=void 0,T=f.scrollWidth,I=f.scrollHeight,x=Vt(f),P=f.scrollLeft,D=f.scrollTop;f===l?(_=b<T&&(x.overflowX==="auto"||x.overflowX==="scroll"||x.overflowX==="visible"),R=w<I&&(x.overflowY==="auto"||x.overflowY==="scroll"||x.overflowY==="visible")):(_=b<T&&(x.overflowX==="auto"||x.overflowX==="scroll"),R=w<I&&(x.overflowY==="auto"||x.overflowY==="scroll"));var F=_&&(Math.abs(S-o)<=r&&P+b<T)-(Math.abs(C-o)<=r&&!!P),k=R&&(Math.abs(v-i)<=r&&D+w<I)-(Math.abs(g-i)<=r&&!!D);if(!hs[d])for(var O=0;O<=d;O++)hs[O]||(hs[O]={});(hs[d].vx!=F||hs[d].vy!=k||hs[d].el!==f)&&(hs[d].el=f,hs[d].vx=F,hs[d].vy=k,clearInterval(hs[d].pid),(F!=0||k!=0)&&(u=!0,hs[d].pid=setInterval((function(){s&&this.layer===0&&Bt.active._onTouchMove(fy);var $=hs[this.layer].vy?hs[this.layer].vy*a:0,q=hs[this.layer].vx?hs[this.layer].vx*a:0;typeof c=="function"&&c.call(Bt.dragged.parentNode[$o],q,$,e,fy,hs[this.layer].el)!=="continue"||MV(hs[this.layer].el,q,$)}).bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==l&&(h=al(h,!1)));H0=u}},30),jV=function(t){var n=t.originalEvent,s=t.putSortable,o=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(n){var u=s||i;a();var c=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,d=document.elementFromPoint(c.clientX,c.clientY);l(),u&&!u.el.contains(d)&&(r("spill"),this.onSpill({dragEl:o,putSortable:s}))}};function z0(){}z0.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,s=t.putSortable;this.sortable.captureAnimationState(),s&&s.captureAnimationState();var o=wd(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(n,o):this.sortable.el.appendChild(n),this.sortable.animateAll(),s&&s.animateAll()},drop:jV},da(z0,{pluginName:"revertOnSpill"});function j0(){}j0.prototype={onSpill:function(t){var n=t.dragEl,s=t.putSortable,o=s||this.sortable;o.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),o.animateAll()},drop:jV},da(j0,{pluginName:"removeOnSpill"}),Bt.mount(new Tme),Bt.mount(j0,z0);function Ime(e,t){return Object.values(e).indexOf(t)}function xme(e,t,n,s){if(!e)return[];const o=Object.values(e),i=t.length-s;return[...t].map((a,l)=>l>=i?o.length:o.indexOf(a))}function Fme(e){return["transition-group","TransitionGroup"].includes(e)}function KV(e){if(!e||e.length!==1)return!1;const[{type:t}]=e;return t?Fme(t.name):!1}function Pme(e,t){return t?{...t.props,...t.attrs}:e}const K0=["Start","Add","Remove","Update","End"],q0=["Choose","Unchoose","Sort","Filter","Clone"],Ame=["Move",...K0,...q0].map(e=>"on"+e);let Y0=null;const kme=rt({name:"VueDraggableNext",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},emits:["update:modelValue","move","change",...K0.map(e=>e.toLowerCase()),...q0.map(e=>e.toLowerCase())],setup(e,{emit:t,slots:n,attrs:s}){const o=B(!1),i=B(!1),r=B(0),a=B(0),l=B([]),u=B(null),c=B(null),d=Y(()=>e.list?e.list:e.modelValue),h=Yn();function f(){return e.component?VH(e.component):e.tag}function p(V){if(c.value)for(const ne in V){const ie=_V(ne);Ame.indexOf(ie)===-1&&c.value.option(ie,V[ne])}}function g(){var V;return((V=h==null?void 0:h.proxy)==null?void 0:V.$el.children)||[]}async function v(){var V;await Ct(),l.value=xme(g(),((V=h==null?void 0:h.proxy)==null?void 0:V.$el.children)||[],o.value,a.value)}function C(V){const ne=Ime(g()||[],V);if(ne===-1)return null;const ie=d.value?d.value[ne]:null;return{index:ne,element:ie}}function S(V){Ct(()=>t("change",V))}function b(V){if(e.list){V(e.list);return}const ne=[...e.modelValue||[]];V(ne),t("update:modelValue",ne)}function w(...V){b(ie=>ie.splice(...V))}function _(V,ne){b(pe=>pe.splice(ne,0,pe.splice(V,1)[0]))}function R(V){const ne=l.value,ie=ne.length;return V>ie-1?ie:ne[V]}function T(){var ne,ie;return n.default&&((ie=(ne=n.default()[0])==null?void 0:ne.component)==null?void 0:ie.proxy)||null}function I(V){if(!e.noTransitionOnDrag||!o.value)return;const ne=g();ne[V]&&(ne[V].data=null);const ie=T();ie&&(ie.children=[],ie.kept=void 0)}function x(V){v(),u.value=C(V.item),u.value&&(V.item._underlying_vm_=e.clone(u.value.element),Y0=V.item)}function P(V){const ne=V.item._underlying_vm_;if(ne===void 0)return;F0(V.item);const ie=R(V.newIndex);w(ie,0,ne),v(),S({added:{element:ne,newIndex:ie}})}function D(V){var ie;if(RV((ie=h==null?void 0:h.proxy)==null?void 0:ie.$el,V.item,V.oldIndex),V.pullMode==="clone"){F0(V.clone);return}if(!u.value)return;const ne=u.value.index;w(ne,1),I(ne),S({removed:{element:u.value.element,oldIndex:ne}})}function F(V){var pe,ae;F0(V.item),RV(V.from,V.item,V.oldIndex);const ne=(pe=u.value)==null?void 0:pe.index,ie=R(V.newIndex);_(ne,ie),S({moved:{element:(ae=u.value)==null?void 0:ae.element,oldIndex:ne,newIndex:ie}})}function k(V,ne){Object.prototype.hasOwnProperty.call(V,ne)&&(V[ne]+=r.value)}function O(V){return V.__draggable_component__}function $({to:V,related:ne}){const ie=O(V);if(!ie)return{component:ie};const pe=ie.realList,ae={list:pe,component:ie};if(V!==ne&&pe&&ie.getUnderlyingVm){const re=ie.getUnderlyingVm(ne);if(re)return Object.assign(re,ae)}return ae}function q(V,ne){const ie=[...ne.to.children].filter(W=>W.style.display!=="none");if(ie.length===0)return 0;const pe=ie.indexOf(ne.related),ae=V.component.getVmIndex(pe);return ie.indexOf(Y0)!==-1||!ne.willInsertAfter?ae:ae+1}const J=()=>{var ae,re;const V={};K0.forEach(W=>{V["on"+W]=X(W)}),q0.forEach(W=>{V["on"+W]=ee.bind(null,W)});const ne=Object.keys(s).reduce((W,fe)=>(W[_V(fe)]=s[fe],W),{}),ie=Object.assign({},ne,V,{onMove:(W,fe)=>ve(W,fe)});"draggable"in ie||(ie.draggable=">*");const pe=((ae=h==null?void 0:h.proxy)==null?void 0:ae.$el.nodeType)===1?h.proxy.$el:((re=h==null?void 0:h.proxy)==null?void 0:re.$el.parentElement)||null;pe&&(c.value=new Bt(pe,ie),pe.__draggable_component__=h==null?void 0:h.proxy,v())};function ee(V,ne){Ct(()=>t(V.toLowerCase(),ne))}function X(V){return ne=>{if(d.value!==null){const ie="onDrag"+V,pe=N[ie];pe&&pe(ne)}ee(V,ne)}}function ve(V,ne){const ie=e.move;if(!ie||!d.value)return!0;const pe=$(V),ae=u.value,re=q(pe,V);ae&&Object.assign(ae,{futureIndex:re});const W=Object.assign({},V,{relatedContext:pe,draggedContext:ae});return ie(W,ne)}function te(){v(),Y0=null}const N={onDragStart:x,onDragAdd:P,onDragRemove:D,onDragUpdate:F,onDragMove:ve,onDragEnd:te};return tn(()=>{J()}),e.list!==null&&e.modelValue!==null&&Jge.error("list props are mutually exclusive! Please set one."),{getTag:f,realList:d,visibleIndexes:l,noneFunctionalComponentMode:i,headerOffset:r,footerOffset:a,transitionMode:o,computeIndexes:v,updateOptions:p,getChildrenNodes:g,getUnderlyingVm:C,emitChanges:S,alterList:b,spliceList:w,updatePosition:_,getVmIndex:R,getComponent:T,resetTransitionData:I,onDragStart:x,onDragAdd:P,onDragRemove:D,onDragUpdate:F,updateProperty:k,onDragMove:ve,onDragEnd:te,mounted:J,context:u,sortableInstance:c,getRelatedContextFromMoveEvent:$,getTargetedComponent:O,computeFutureIndex:q}},render(){const e=this.getTag(),t=Pme(this.$attrs,this.componentData);if(typeof e=="string"){const s=this.$slots.default&&typeof this.$slots.default=="function"?this.$slots.default():null;return s?(this.transitionMode=KV(s),Zu(e,t,s)):Zu(e,t,[])}const n=this.$slots.default?{default:this.$slots.default}:{};if(this.$slots.default){const s=typeof this.$slots.default=="function"?this.$slots.default():null;this.transitionMode=KV(s||[])}return Zu(e,t,n)}}),Ome=_t(rt({__name:"DragDropList",props:{modelValue:{},groupName:{},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["changed","update:modelValue"],setup(e,{emit:t}){const n=B([]),s=e,o=t,i=B({}),r=()=>{n.value=s.modelValue.map(u=>({id:u.field,name:u.headerName,...u}))||[],s.modelValue.forEach(u=>{i.value[u.field]={...u}})};nt(()=>s.modelValue,u=>{r()},{immediate:!0,deep:!0}),nt(n,u=>{if(u.length===s.modelValue.length&&!u.every((d,h)=>d.id===s.modelValue[h].field)){const d=u.map(h=>i.value[h.id]);o("changed",d),o("update:modelValue",d)}});const a=()=>!(s.readOnly||s.disabled),l=u=>!(s.readOnly||s.disabled);return(u,c)=>(j(),qe(U(kme),{modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=d=>n.value=d),tag:"transition-group",disabled:s.disabled||s.readOnly,onMove:l,onStart:a,"item-key":"id","component-data":{tag:"div",type:"transition",name:"fade"},animation:300,easing:"cubic-bezier(0.4, 0, 0.2, 1)","ghost-class":"ghost","chosen-class":"chosen","drag-class":"drag"},{default:me(()=>[(j(!0),ce(xt,null,xn(n.value,(d,h)=>(j(),ce("div",{key:d.id,class:"fade-item"},[Tt(u.$slots,"item",{item:d,index:h},()=>[tt(wt(d.name),1)],!0)]))),128))]),_:3},8,["modelValue","disabled"]))}}),[["__scopeId","data-v-2106e8ed"]]),Mme={key:0},Nme={key:1,style:{"font-style":"italic"}},Lme={key:2,style:{"font-style":"italic"}},Vme={key:3},gy=_t(rt({__name:"DragDropItem",props:{item:{},isDisableNewCheck:{type:Boolean,default:!1},disableDrag:{type:Boolean,default:!1},disableCheckbox:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},columnStates:{},disableDragTooltip:{default:""},focusIndex:{}},emits:["toggle-column"],setup(e,{emit:t}){const n=Xt,s=e,o=B(s.columnStates[String(s.item.field)]||!1),i=t,r=h=>{o.value=h},a=Y(()=>{var h;return(h=s.item)==null?void 0:h.context}),l=Y(()=>{var f,p,g;return(f=a.value)!=null&&f.formula?"formular":((g=(p=a.value)==null?void 0:p.metric_type)==null?void 0:g.code)||"number"}),u=Y(()=>{var h,f;return(f=(h=s.item)==null?void 0:h.field)==null?void 0:f.includes("metric")}),c=Y(()=>{var h;return u.value&&((h=a.value)==null?void 0:h.is_primary)==1}),d=Y(()=>{var h;return u.value&&((h=a.value)==null?void 0:h.is_point_metric)==1});return nt(()=>o.value,()=>{i("toggle-column",s.item.field,s.item.required)}),(h,f)=>(j(),ce("div",{key:e.item.field,class:Q([h.$style["column-config__item"],{[h.$style.disabled]:s.readOnly,[h.$style["is-metric"]]:u.value,[h.$style["is-point-metric"]]:d.value,[h.$style["is-woohoo-metric"]]:c.value}])},[ge(cV,{focusIndex:s.focusIndex,id:`col-${e.item.field}`,"model-value":o.value==!0?U(Ht).CHECKED:U(Ht).UNCHECK,"onUpdate:modelValue":r,disabled:s.disableCheckbox||e.isDisableNewCheck&&!o.value,size:"16px"},null,8,["focusIndex","id","model-value","disabled"]),Ke((j(),ce("div",{class:"move-handler",style:dn({cursor:s.disableDrag?"not-allowed":"move"})},[ge(lt,{color:s.disableDrag?"#D7D7D7":"#6B6B6B",source:"remote",src:"GripVertical",class:Q(h.$style.handler)},null,8,["color","class"])],4)),[[U(n),s.disableDrag==!0?s.disableDragTooltip:""]]),u.value?(j(),ce("div",{key:0,class:Q(h.$style["metric-type"])},[l.value=="rating"?(j(),ce("span",Mme,"★")):l.value=="formular"?(j(),ce("span",Nme," ƒx ")):l.value=="number"?(j(),ce("span",Lme," # ")):(j(),ce("span",Vme,wt(l.value),1))],2)):Je("",!0),Ee("span",{class:Q(h.$style["column-config__item-label"])},[Ke((j(),ce("div",null,[tt(wt(e.item.headerName),1)])),[[U(n),{content:e.item.headerName}]])],2),d.value?Ke((j(),ce("div",{key:1,class:Q(h.$style["metric-icon"])},[ge(lt,{src:"Bullseye",color:"#A6A6A6"})],2)),[[U(n),"Point metric"]]):Je("",!0),c.value?Ke((j(),ce("div",{key:2,class:Q(h.$style["metric-icon"])},[ge(lt,{src:"ChartPie",color:"#A6A6A6"})],2)),[[U(n),"Woohoo metric"]]):Je("",!0)],2))}}),[["__cssModules",{$style:{"column-config__item":"_column-config__item_7scp0_1","is-metric":"_is-metric_7scp0_8","is-woohoo-metric":"_is-woohoo-metric_7scp0_12","is-point-metric":"_is-point-metric_7scp0_15","column-config__item-label":"_column-config__item-label_7scp0_18",disabled:"_disabled_7scp0_34",readOnly:"_readOnly_7scp0_38","column-config__item--pinned":"_column-config__item--pinned_7scp0_41",handler:"_handler_7scp0_48",badge:"_badge_7scp0_52","metric-type":"_metric-type_7scp0_78","metric-icon":"_metric-icon_7scp0_106"}}]]),Bme=_t(rt({__name:"DropdownWrapper",props:{placement:{default:"bottom-start"},show:{type:Boolean,default:!1},maxWidth:{default:400}},emits:["open","close"],setup(e,{expose:t,emit:n}){const s=e,o=n,{hide:i,triggerRef:r,popupRef:a,isVisible:l,toggle:u}=Fs({toggleOnClick:!0,placement:s.placement,trigger:"click",interactive:!0,arrow:!1,offset:[0,4],showOnInit:s.show,maxWidth:s.maxWidth}),c=Y(()=>l.value);nt(l,f=>{o(f?"open":"close")});const d=()=>{i()};t({closeDropdown:d,isOpen:c});const h=f=>{f.key==="Escape"&&a.value&&i()};return tn(()=>{var p;const f=r.value instanceof HTMLElement?r.value:(p=r.value)==null?void 0:p.$el;f&&f.addEventListener("keydown",h)}),vs(()=>{var p;const f=r.value instanceof HTMLElement?r.value:(p=r.value)==null?void 0:p.$el;f&&f.removeEventListener("keydown",h)}),(f,p)=>(j(),ce("div",{ref_key:"triggerRef",ref:r,class:Q(f.$style["dropdown-wrapper"])},[Tt(f.$slots,"trigger",{open:U(l),toggle:U(u),closeDropdown:d},()=>[Ee("button",{class:Q(f.$style["editable-dropdown__trigger"]),"aria-label":"Select or type"}," ▼ ",2)]),Ee("div",{ref_key:"popupRef",ref:a,tabindex:"0",class:Q(f.$style["dropdown-content"]),style:dn({display:U(l)?"block":"none",maxWidth:s.maxWidth?s.maxWidth+"px":"unset"})},[Tt(f.$slots,"content",{closeDropdown:d,visible:U(l)},()=>[Ee("div",{class:Q(f.$style["dropdown-list"])},null,2)])],6)],2))}}),[["__cssModules",{$style:{"dropdown-wrapper":"_dropdown-wrapper_lghkw_1","dropdown-content":"_dropdown-content_lghkw_5","dropdown-list":"_dropdown-list_lghkw_11"}}]]),$me={class:"reach-limit-icon"},Hme=_t(rt({__name:"TableCustomization",props:{modelValue:{},readOnly:{type:Boolean},disabled:{type:Boolean},checkboxColumn:{},gridApi:{},tableHeight:{}},emits:["update:modelValue","input","change"],setup(e,{expose:t,emit:n}){const s=Xt,o=e,i=n,r=B(""),a=B(),l=Y(()=>r.value.trim().length>0),u=B([]),c=B({}),{triggerRef:d,popupRef:h,isVisible:f,hide:p}=Fs({toggleOnClick:!0,placement:"bottom-end",trigger:"click",offset:[0,0]});nt(f,k=>{var O;k&&((O=a.value)==null||O.focus())});const g=Y(()=>o.disabled||r.value.length>0),v=Y(()=>u.value.filter(k=>k.pinned==="left"&&k.field&&k.headerName)),C=Y(()=>u.value.filter(k=>k.pinned==="right"&&k.field||k.field==="blank")),S=Y({get:()=>u.value.filter(k=>!k.pinned&&k.field&&k.field!=="blank"),set:k=>{u.value=[...v.value,...k,...C.value]}}),b=Y(()=>{if(!r.value)return{};const k=r.value.toLowerCase();return[...u.value,...S.value].reduce((O,$)=>{var q;return(q=$.headerName)!=null&&q.toLowerCase().includes(k)&&$.field&&(O[$.field]=!0),O},{})}),w=Y(()=>o.modelValue),_=()=>{const k={};u.value.forEach(O=>{O.field&&(k[O.field]=!O.hide)}),c.value=k},R=Y(()=>{if(!r.value)return u.value;const k=r.value.toLowerCase();return u.value.filter(O=>{var $;return($=O.headerName)==null?void 0:$.toLowerCase().includes(k)})}),T=()=>{var $;const k=($=o.gridApi)==null?void 0:$.getColumnState().reduce((q,J)=>(q[J.colId]=Number(J.width),q),{}),O=u.value.map(q=>({...q,hide:q.field?!c.value[q.field]:!1,width:q.field?k==null?void 0:k[q.field]:q.width}));i("update:modelValue",O),i("change",O),i("input",O)},I=k=>{const O=[...v.value,...k,...C.value];o.checkboxColumn&&O.unshift(o.checkboxColumn),u.value=O,T()},x=k=>{k&&(c.value[k]=!c.value[k],T())};nt(w,k=>{k&&k.length>0&&(u.value=[...k],_())},{immediate:!0}),t({updateColumnDefs(k){u.value=[...k],_()}});const P=Y(()=>F.value>=5),D=Y(()=>o.disabled||r.value.length>0),F=Y(()=>u.value.reduce((k,O)=>O.field&&O.field.includes("metric")&&c.value[O.field]===!0?k+1:k,0));return(k,O)=>{const $=Eo("focusable");return j(),ce("div",{class:Q(k.$style["table-customization"])},[Ee("div",{ref_key:"triggerRef",ref:d},[Tt(k.$slots,"trigger",{},()=>[Ke((j(),qe(mt,{variant:["secondary"],disabled:o.disabled,actived:U(f),style:{width:"32px"},onEscape:U(p)},{prefix:me(()=>[ge(lt,{src:"TableColumns"})]),_:1},8,["disabled","actived","onEscape"])),[[$,"7"],[U(s),"Columns"]])])],512),Ee("div",{ref_key:"popupRef",ref:h,class:Q(k.$style["tippy-content-wrapper"])},[Ee("div",{class:Q([k.$style["column-config"],P.value?k.$style["has-warning"]:""]),style:dn({"--max-height":o.tableHeight?o.tableHeight:"max(500px, 60vh)"})},[ge(iS,{tabIndex:"7.0",modelValue:r.value,"onUpdate:modelValue":O[0]||(O[0]=q=>r.value=q),ref_key:"searchBoxRef",ref:a},null,8,["modelValue"]),Ee("div",{class:Q(k.$style["column-config__header"])},[...O[2]||(O[2]=[Ee("span",null,"Manage columns",-1)])],2),P.value?(j(),ce("div",{key:0,class:Q(k.$style["reach-limit"])},[Ee("div",$me,[ge(lt,{src:"InfoCircle",color:"#F7941D",size:14})]),Ee("div",{class:Q(k.$style["warning-limit-text"])},[...O[3]||(O[3]=[tt(" You’ve reached the maximum number of metric columns. ",-1),Ee("br",null,null,-1),tt(" Deselect one to show another. ",-1)])],2)],2)):Je("",!0),l.value?(j(),ce(xt,{key:1},[R.value.length===0&&l.value?(j(),ce("div",{key:0,class:Q(k.$style["no-columns"])},[...O[4]||(O[4]=[tt(" No results. ",-1),Ee("br",null,null,-1),tt(" Try another search. ",-1)])],2)):Je("",!0),l.value&&R.value.length>0?(j(),ce("div",{key:1,class:Q(k.$style["column-config__pinned-section"])},[(j(!0),ce(xt,null,xn(R.value,q=>{var J;return j(),qe(gy,{key:q.colId,item:q,columnStates:c.value,disableDrag:D.value,disableDragTooltip:"Reordering is disabled while search is active.",readOnly:o.readOnly,isDisableNewCheck:P.value&&((J=q.colId)==null?void 0:J.includes("metric")),onToggleColumn:x},null,8,["item","columnStates","disableDrag","readOnly","isDisableNewCheck"])}),128))],2)):Je("",!0)],64)):Je("",!0),l.value?Je("",!0):(j(),ce("div",{key:2,class:Q(k.$style["column-config__list"])},[(j(!0),ce(xt,null,xn(v.value,q=>Ke((j(),qe(gy,{key:q.field,item:q,disabled:!0,readOnly:!0,disableDrag:!0,disableDragTooltip:" ","disable-checkbox":!0,columnStates:c.value},null,8,["item","columnStates"])),[[Do,b.value[q.field]||!r.value]])),128)),ge(Ome,{modelValue:S.value,"onUpdate:modelValue":O[1]||(O[1]=q=>S.value=q),"group-name":"columns",onChanged:I,disabled:g.value,readOnly:o.readOnly},{item:me(({item:q,index:J})=>[Ke((j(),qe(gy,{focusIndex:`7.${J+1}`,key:q.id,item:q,columnStates:c.value,disableDrag:D.value,disableDragTooltip:D.value?"Reordering is disabled while search is active.":void 0,readOnly:o.readOnly,isDisableNewCheck:P.value&&q.id.includes("metric"),onToggleColumn:x},null,8,["focusIndex","item","columnStates","disableDrag","disableDragTooltip","readOnly","isDisableNewCheck"])),[[Do,b.value[q.field]||!r.value]])]),_:1},8,["modelValue","disabled","readOnly"]),(j(!0),ce(xt,null,xn(C.value.filter(q=>{var J;return q.headerName&&((J=q.headerName)==null?void 0:J.length)>0}),q=>Ke((j(),qe(gy,{key:q.field,item:q,disabled:o.disabled,readOnly:o.readOnly,columnStates:c.value},null,8,["item","disabled","readOnly","columnStates"])),[[Do,b.value[q.field]||!r.value]])),128))],2))],6)],2)],2)}}}),[["__cssModules",{$style:{"reach-limit":"_reach-limit_1m3bt_1","reach-limit-icon":"_reach-limit-icon_1m3bt_11","warning-limit-text":"_warning-limit-text_1m3bt_18","table-customization":"_table-customization_1m3bt_24","table-customization__trigger":"_table-customization__trigger_1m3bt_30","column-config":"_column-config_1m3bt_46","has-warning":"_has-warning_1m3bt_61","column-config__header":"_column-config__header_1m3bt_64","icon-color":"_icon-color_1m3bt_73","column-config__list":"_column-config__list_1m3bt_76","column-config__section-label":"_column-config__section-label_1m3bt_80","column-config__footer":"_column-config__footer_1m3bt_89","column-config__add-button":"_column-config__add-button_1m3bt_92","cs-icon":"_cs-icon_1m3bt_110","no-columns":"_no-columns_1m3bt_114"}}]]),Gme=["aria-label"],Ume=["aria-disabled","onClick"],Wme=_t(rt({__name:"MonthSelection",props:{monthLabels:{default:()=>["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},ariaLabel:{default:"Select month"},selectedYear:{default:null},selectedMonth:{default:null},displayYear:{default:null},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},isMonthSelectable:{type:Function,default:()=>!0}},emits:["select","keydown"],setup(e,{emit:t}){const n=e,s=t,o=a=>{n.disabled||n.readOnly||!n.isMonthSelectable(a)||s("select",a)},i=new Date().getFullYear(),r=new Date().getMonth()+1;return(a,l)=>(j(),ce("div",{class:Q([a.$style["month-grid"],n.compact?a.$style.compact:""]),"aria-label":n.ariaLabel,"data-index":"month-selection"},[Ee("div",{class:Q(a.$style.months)},[(j(!0),ce(xt,null,xn(n.monthLabels,(u,c)=>(j(),ce("a",{key:u,tabindex:"0",class:Q([a.$style["month-cell"],{[a.$style.selected]:c+1===n.selectedMonth&&n.selectedYear===n.displayYear,[a.$style.current]:c+1===r&&U(i)===n.displayYear,[a.$style.disabled]:n.disabled||n.readOnly||!n.isMonthSelectable(c+1)}]),"aria-disabled":n.disabled||n.readOnly||!n.isMonthSelectable(c+1),onClick:d=>o(c+1),onKeydown:l[0]||(l[0]=d=>s("keydown",d))},wt(u),43,Ume))),128))],2)],10,Gme))}}),[["__cssModules",{$style:{"month-grid":"_month-grid_a776x_1",months:"_months_a776x_8","month-cell":"_month-cell_a776x_22",selected:"_selected_a776x_36",compact:"_compact_a776x_40",current:"_current_a776x_53",disabled:"_disabled_a776x_61"}}]]),zme=["data-year","aria-disabled","onClick"],jme=_t(rt({__name:"YearSelection",props:{years:{},selectedYear:{default:null},disabled:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},scrollable:{type:Boolean,default:!1},isYearSelectable:{type:Function,default:()=>!0}},emits:["select","keydown"],setup(e,{expose:t,emit:n}){const s=e,o=n,i=B(null),r=new Date().getFullYear(),a=l=>{s.disabled||!s.isYearSelectable(l)||o("select",l)};return t({rootEl:i}),tn(()=>{if(i.value){const l=i.value.querySelector(`[data-year="${s.selectedYear}"]`);l&&l.scrollIntoView({block:"center"})}}),(l,u)=>(j(),ce("div",{ref_key:"rootEl",ref:i,class:Q([l.$style["year-grid-body"],s.scrollable?l.$style.scrollable:"",s.compact?l.$style.compact:""]),role:"grid","data-index":"year-selection"},[(j(!0),ce(xt,null,xn(s.years,c=>(j(),ce("a",{key:c,"data-year":c,tabindex:"0",class:Q([l.$style["year-cell"],{[l.$style.selected]:c===s.selectedYear,[l.$style.current]:c===U(r),[l.$style.disabled]:s.disabled||!s.isYearSelectable(c)}]),"aria-disabled":s.disabled||!s.isYearSelectable(c),onClick:d=>a(c),onKeydown:u[0]||(u[0]=d=>o("keydown",d))},wt(c),43,zme))),128))],2))}}),[["__cssModules",{$style:{"year-grid-body":"_year-grid-body_1us7k_1",scrollable:"_scrollable_1us7k_11","year-cell":"_year-cell_1us7k_16",selected:"_selected_1us7k_28",current:"_current_1us7k_31",compact:"_compact_1us7k_35",disabled:"_disabled_1us7k_47"}}]]),Kme={class:"navigation"},qme={class:"picker"},Yme={key:0,class:"footer"},Zme=_t(rt({__name:"MonthPickerLayout",props:{disableConfirm:{type:Boolean,default:!1}},setup(e){return(t,n)=>(j(),ce("div",{class:Q(["month-picker-layout",{"disable-confirm":e.disableConfirm}])},[Ee("div",Kme,[Tt(t.$slots,"navigation",{},void 0,!0)]),Ee("div",qme,[Tt(t.$slots,"picker",{},void 0,!0)]),ge(XD,{name:"fade",mode:"out-in"},{default:me(()=>[e.disableConfirm?Je("",!0):(j(),ce("div",Yme,[Tt(t.$slots,"footer",{},void 0,!0)]))]),_:3})],2))}}),[["__scopeId","data-v-885d09b2"]]),Xme={style:{flex:"1"}},Jme=_t(rt({__name:"CalendarFooter",props:{disabled:{type:Boolean},readOnly:{type:Boolean},cancelLabel:{default:"Cancel"},confirmLabel:{default:"Save"},disableConfirm:{type:Boolean,default:!1}},emits:["cancel","confirm","goto-date"],setup(e,{emit:t}){const n=e,s=t,o=()=>{s("cancel")},i=()=>{s("confirm")},r=(l=new Date)=>{s("goto-date")},a=l=>{if(l.key==="Enter"||l.key===" "){l.preventDefault(),l.stopPropagation();const u=l.target;u.dataset.index==="today-btn"?r():u.dataset.index==="cancel-btn"?o():u.dataset.index==="save-btn"&&i()}};return(l,u)=>{const c=Eo("tooltip");return n.readOnly?Je("",!0):(j(),ce("div",{key:0,class:Q(l.$style["arbo-calendar-actions"])},[Ee("div",Xme,[Ke((j(),qe(U(mt),{variant:"secondary",size:"medium",onClick:u[0]||(u[0]=d=>r()),onKeydown:a,"data-index":"today-btn"},{prefix:me(()=>[ge(U(lt),{src:"CalendarDay"})]),_:1})),[[c,"Today"]])]),ge(U(mt),{disabled:n.disabled,readOnly:n.readOnly,onKeydown:a,variant:"secondary",size:"medium",onClick:o,"data-index":"cancel-btn"},{default:me(()=>[tt(wt(n.cancelLabel),1)]),_:1},8,["disabled","readOnly"]),ge(U(mt),{disabled:n.disabled||n.disableConfirm,readOnly:n.readOnly,variant:"primary",size:"medium","data-index":"save-btn",onKeydown:a,onClick:i},{default:me(()=>[tt(wt(n.confirmLabel),1)]),_:1},8,["disabled","readOnly"])],2))}}}),[["__cssModules",{$style:{"arbo-calendar-actions":"_arbo-calendar-actions_132g0_1"}}]]),Qme=_t(rt({__name:"CalendarNavigation",props:{disabled:{type:Boolean},readOnly:{type:Boolean},cancelLabel:{default:"Cancel"},confirmLabel:{default:"Save"},disableConfirm:{type:Boolean,default:!1},minDate:{},maxDate:{},monthLabels:{},monthLabelStyle:{},locale:{},month:{},year:{},hideMonth:{type:Boolean,default:!1},mode:{}},emits:["cancel","confirm","goto-date","prev","next","toggle-months","toggle-years"],setup(e,{emit:t}){const n=e,s=So({month:new Date().getMonth()+1,year:new Date().getFullYear()}),o=Y(()=>{if(n.minDate){const h=s.month===1?12:s.month-1,f=s.month===1?s.year-1:s.year;return new Date(f,h-1,1)<new Date(n.minDate.getFullYear(),n.minDate.getMonth(),1)}return!1}),i=Y(()=>{if(n.maxDate){const h=s.month===12?1:s.month+1,f=s.month===12?s.year+1:s.year;return new Date(f,h-1,1)>new Date(n.maxDate.getFullYear(),n.maxDate.getMonth(),1)}return!1}),r=t,a=()=>{o.value||(n.mode==="month"?s.month=s.month===0?11:s.month-1:n.mode==="year"&&(s.year-=1)),r("prev",{month:s.month,year:s.year})},l=()=>{i.value||(n.mode==="month"?s.month=s.month===11?0:s.month+1:n.mode==="year"&&(s.year+=1)),r("next",{month:s.month,year:s.year})},u=()=>{r("toggle-months")},c=()=>{r("toggle-years")},d=Y(()=>{if(n.monthLabels&&n.monthLabels.length===12)return n.monthLabels;const h=n.locale||"en-US",f=n.monthLabelStyle||"short",p=new Intl.DateTimeFormat(h,{month:f,timeZone:"UTC"});return Array.from({length:12},(v,C)=>p.format(new Date(Date.UTC(2020,C,1))))});return(h,f)=>(j(),ce("div",{class:Q(h.$style["cal-nav-bar"])},[e.mode!="year"?(j(),qe(U(mt),{key:0,variant:"tertiary",class:Q([h.$style["cal-nav-btn"],h.$style.prev]),"aria-label":"Previous",disabled:o.value,label:"",onClick:a,"data-index":"prev-btn",onKeydownCapture:zn(Pt(a,["prevent","stop"]),["enter"])},{default:me(({hovered:p})=>[ge(U(lt),{src:"AnglesRight",source:"remote",color:p?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled","onKeydownCapture"])):Je("",!0),Ee("div",{class:Q([h.$style["cal-nav-center"],e.hideMonth?h.$style.single:""])},[e.hideMonth?Je("",!0):(j(),qe(U(mt),{key:0,"data-index":"month-btn",variant:"secondary",onClick:u},{default:me(()=>[tt(wt(d.value[n.month-1]),1)]),_:1})),ge(U(mt),{variant:"secondary",onClick:c,"data-index":"year-btn"},{default:me(()=>[tt(wt(n.year),1)]),_:1})],2),e.mode!="year"?(j(),qe(U(mt),{key:1,"data-index":"next-btn",variant:"tertiary",class:Q([h.$style["cal-nav-btn"],h.$style.next]),"aria-label":"Next",disabled:i.value,label:"",onClick:l,onKeydownCapture:zn(Pt(l,["prevent","stop"]),["enter"])},{default:me(({hovered:p})=>[ge(U(lt),{src:"AnglesRight",source:"remote",color:p?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled","onKeydownCapture"])):Je("",!0)],2))}}),[["__cssModules",{$style:{"cal-nav-wrapper":"_cal-nav-wrapper_beyjg_1","cal-nav-bar":"_cal-nav-bar_beyjg_12","cal-nav-btn":"_cal-nav-btn_beyjg_19",prev:"_prev_beyjg_32","year-grid-header":"_year-grid-header_beyjg_36","cal-nav-center":"_cal-nav-center_beyjg_45",single:"_single_beyjg_52","cal-nav-label":"_cal-nav-label_beyjg_56","year-grid":"_year-grid_beyjg_36",months:"_months_beyjg_78","month-cell":"_month-cell_beyjg_85","year-cell":"_year-cell_beyjg_86","pg-btn":"_pg-btn_beyjg_108","year-grid-body":"_year-grid-body_beyjg_121",selected:"_selected_beyjg_125","days-slot":"_days-slot_beyjg_131","range-label":"_range-label_beyjg_135"}}]]),eve=["aria-label"];new Date().getUTCFullYear()-12,new Date().getUTCFullYear()+12;const tve={class:"wrapper-suffix"},nve=_t(rt({__name:"StatusSelect",props:{modelValue:{},getStatusFunc:{type:Function},workspaceId:{},id:{}},emits:["updated","error","cancel","update:modelValue"],setup(e,{expose:t,emit:n}){const s=Xt,o={PER_PAGE:20,INITIAL_PAGE:1},i=e,r=B(i.modelValue),a=n,l=Y(()=>f.value.find(D=>D.id===r.value)||null),u=D=>{r.value=D.id,a("update:modelValue",D.id)},c=Y(()=>{if(!r.value)return{backgroundColor:"#A6A6A6",border:"1px solid #A6A6A6"};const D=f.value.find(k=>k.id===r.value),F=String((D==null?void 0:D.color)||"white");return{backgroundColor:F,border:Lg(F,"white")?"1px solid #ccc":"1px solid #fff"}}),d=B(null),h=()=>{var D;(D=d.value)==null||D.focus()},f=B([]),p=B(!1),g=B(!1),v=B(null),C=B(o.INITIAL_PAGE),S=B(!0),b=B(0),w=B(""),_=Y(()=>!!(i.id&&i.workspaceId)),R=D=>{const F=f.value.find(k=>k.id===D.value);F&&u(F)},T=D=>({label:D.name,value:D.id,selected:r.value===D.id,hover:!1,type:"status",disabled:!1,clickable:!0,danger:!1,data:D,id:D.id,color:D.color}),I=async(D=o.INITIAL_PAGE,F="",k=!1)=>{var O;if(!_.value){console.error("Missing required props",i);return}k?g.value=!0:p.value=!0,v.value=null;try{const $={workspaceId:String(i.workspaceId),itemIds:i.id,page:D,perPage:o.PER_PAGE,name_like:F.trim()};if(i.getStatusFunc===void 0)throw new Error("API service getAssignableStatus is undefined");const q=await i.getStatusFunc($);if(!q){k||(f.value=[]),S.value=!1;return}const J=q.data.map(T);f.value=k?[...f.value,...J]:J,b.value=((O=q.meta)==null?void 0:O.total)??q.data.length,S.value=f.value.length<b.value,C.value=D}catch($){console.error("Error fetching statuses:",$),v.value="Failed to load statuses",k||(f.value=[]),S.value=!1,a("error",v.value)}finally{p.value=!1,g.value=!1}},x=async()=>{!S.value||g.value||await I(C.value+1,w.value,!0)};nt([()=>i.id,()=>i.workspaceId],()=>{I()},{deep:!0,immediate:!0});const P=async D=>{w.value=D,C.value=o.INITIAL_PAGE,await I(o.INITIAL_PAGE,D,!1)};return t({focus:h,clear:()=>{r.value=null,a("update:modelValue",null)}}),(D,F)=>(j(),qe(Bme,{onOpen:h,placement:"bottom-start","max-width":500},{trigger:me(({open:k})=>[ge(Cs,{actived:k,class:Q(D.$style["status-wrapper"])},{suffix:me(()=>[Ee("div",tve,[ge(lt,{src:"ChevronUp",source:"remote",class:Q([[D.$style["dropdown-icon"]],{[D.$style["dropdown-icon-show"]]:!k}])},null,8,["class"])])]),default:me(()=>{var O;return[Ee("div",{class:Q(D.$style.status)},[Ee("div",{class:Q(D.$style["color-indicator"]),style:dn(c.value)},null,6),Ke((j(),ce("span",{style:{"max-width":"400px"},class:Q({[D.$style.empty]:!l.value})},[tt(wt(l.value?l.value.label:"Select status"),1)],2)),[[U(s),{content:((O=l.value)==null?void 0:O.label)||void 0}]])],2)]}),_:2},1032,["actived","class"])]),content:me(({closeDropdown:k})=>{var O;return[ge(Jr,{ref_key:"popupRef",ref:d,"selected-id":(O=l.value)==null?void 0:O.id,options:f.value,loading:p.value,"loading-more":g.value,"has-more":S.value,error:v.value,onSearch:P,onSelect:$=>{R($),k()},onLoadMore:x,onCancel:F[0]||(F[0]=$=>a("cancel")),style:{width:"500px"}},null,8,["selected-id","options","loading","loading-more","has-more","error","onSelect"])]}),_:1}))}}),[["__cssModules",{$style:{"status-wrapper":"_status-wrapper_1hlgx_1",status:"_status_1hlgx_1","color-indicator":"_color-indicator_1hlgx_12",empty:"_empty_1hlgx_21","dropdown-icon":"_dropdown-icon_1hlgx_25","dropdown-icon-show":"_dropdown-icon-show_1hlgx_30",options:"_options_1hlgx_34"}}]]),qV=e=>({updateCellData:({rowId:n,field:s,value:o})=>{if(!e)return;const i=e.getRowNode(n);i&&i.setDataValue(s,o),e.refreshCells({rowNodes:i?[i]:[],columns:[s],force:!0})}}),sve={key:2},ove=_t(rt({name:"MetricEditorWrapper",__name:"MetricEditorWrapper",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},error:{type:Boolean}},emits:["update:value","clear","copy"],setup(e,{emit:t}){var S;const n=e,s=B(n.value),o=B(!0),i=B(""),r=()=>{var P,D,F;const b=(P=c.value)==null?void 0:P.restricted_type.trim(),w=((F=(D=c.value)==null?void 0:D.restricted_value)==null?void 0:F.split(",").map(Number))||[],[_,R]=w,I={range:`Enter a value between ${_} and ${R}`,not:`These values are not allowed: ${w.join(", ")}`,exact:"Value is not allowed"}[b];return o.value?"":I},a=b=>{if(c.value){if(b===null||b===""){o.value=!0;return}if(u.value!=="number"){o.value=!0;return}o.value=dm(c.value,Number(b)),i.value=r()}};Y(()=>o.value?{content:"",showOnCreate:!1}:{content:i.value,bypassOverflowCheck:!0,showOnCreate:!0,theme:"error",alwaysShow:!0});const l=B(null),u=Y(()=>OF(c.value)),c=Y(()=>{var w,_;return((_=(w=n.params)==null?void 0:w.colDef)==null?void 0:_.context)||null}),{apiServices:d}=ts(!0,n),{updateCellData:h}=qV((S=n.params)==null?void 0:S.api),f=B(!1),p=Si(n,"id"),g=()=>{var b;(b=n.params)==null||b.api.stopEditing()},v=()=>{g()},C=async b=>{var _,R;if(g(),f.value=!0,s.value=b||null,b===n.value){f.value=!1;return}const w={itemIds:[String(p.value)],metricId:((_=c.value)==null?void 0:_.id)||"",workspaceId:String(n.workspaceId)};b==null?w.clear=1:w.value=b,h({rowId:String(p.value),field:`metric_${w.metricId}`,value:void 0});try{const T=await((R=d.value)==null?void 0:R.bulkUpdateMetric(w));(T==null?void 0:T.message)=="Done"?h({rowId:String(p.value),field:`metric_${w.metricId}`,value:b||null}):(h({rowId:String(p.value),field:`metric_${w.metricId}`,value:n.value}),console.error("Failed to update metric value:",T),s.value=n.value)}catch(T){console.error("Error during bulk metric update:",T),h({rowId:String(p.value),field:`metric_${w.metricId}`,value:n.value})}finally{f.value=!1}};return(b,w)=>(j(),ce("div",{class:"metric-editor-wrapper",ref_key:"metricEditorWrapperRef",ref:l},[u.value=="dropdown"&&c.value?(j(),qe(KA,{key:0,config:c.value,modelValue:s.value,"onUpdate:modelValue":w[0]||(w[0]=_=>s.value=_),onChange:C,onHandleCancel:v},null,8,["config","modelValue"])):u.value=="number"&&c.value?(j(),qe(qA,{key:1,showInlineError:!1,autoEmit:!0,config:c.value,modelValue:s.value,"onUpdate:modelValue":w[1]||(w[1]=_=>s.value=_),style:{width:"100%"},onHandleChange:C,onCancel:v,onOnValidation:a},null,8,["config","modelValue"])):(j(),ce("div",sve,"Metric type:"+wt(u.value),1))],512))}}),[["__scopeId","data-v-519d44e5"]]),ive=_t(rt({name:"EmptyData",__name:"EmptyData",props:{isSearching:{type:Boolean},isFiltering:{type:Boolean}},setup(e){const t=e,n={noData:"No data available.",noSearchResults:"No results. Try another search.",noFilterResults:"No results. Try another filter.",emptySearchFilter:"No results. Try another search or filter."},s=Y(()=>t.isSearching||t.isFiltering?"NoDataSearchFilter":"ClickToCreate"),o=Y(()=>t.isSearching&&!t.isFiltering?n.noSearchResults:t.isFiltering&&!t.isSearching?n.noFilterResults:t.isSearching&&t.isFiltering?n.emptySearchFilter:n.noData),i=B(!1);return tn(()=>{i.value=!0}),(r,a)=>(j(),ce("div",{class:Q(r.$style["no-data-item-table"])},[Ee("div",{class:Q(r.$style.visual)},[i.value?(j(),qe(Pm,{key:0,source:"remote",src:s.value,ratio:"4/3",maxWidth:500,maxHeight:350},null,8,["src"])):Je("",!0)],2),Ee("div",{class:Q(r.$style.description)},wt(o.value),3)],2))}}),[["__cssModules",{$style:{"no-data-item-table":"_no-data-item-table_oh0wi_1",visual:"_visual_oh0wi_12",description:"_description_oh0wi_19"}}]]),YV=Ql("sortStore",()=>{const e=B({}),t={id:"id",name:"name",isStated:"actual_start_date",isCompleted:"actual_due_date",lastUpdated:"updated_at",completedOn:"actual_due_date",status:"template_flow_status",assignees:"assignee"},n={start_asc:{column:"start_date",direction:"asc"},start_desc:{column:"start_date",direction:"desc"},due_asc:{column:"due_date",direction:"asc"},due_desc:{column:"due_date",direction:"desc"}},s=Y(()=>{const a=e.value;return Object.values(a).filter(u=>u.sort!=="none"&&!!u.sort).map(u=>{let c;switch(u.colId){case"dateRange":c=n[u.sort];break;default:if(u.colId.includes("metric")){const[d,h]=u.colId.split("_");c={column:d,direction:u.sort,type:h}}else c={column:t[u.colId]||u.colId,direction:u.sort};break}return c})}),o=(a,l)=>{e.value={[a]:{colId:a,sort:l}}},i=()=>{e.value={}},r=B(!1);return{sortingAPIConfiguration:s,sorts:e,setSort:o,clearSorting:i,isSortingRunning:r}}),Ru=rt({name:"HeaderSorting",__name:"HeaderWrapper",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean}},setup(e){const t=e,n=YV(),{sorts:s}=Qs(n),o=Y(()=>{var l,u;return((u=(l=t.params)==null?void 0:l.column)==null?void 0:u.getColId())||"template_col_id"}),i=l=>{o.value&&n.setSort(o.value,l)},r=Y(()=>t.params.headerType||void 0),a=B("none");return nt(()=>s.value,Ti(()=>{if(o.value){const l=s.value[o.value];a.value=l?l.sort:"none"}},rr),{deep:!0,immediate:!0}),(l,u)=>o.value?(j(),qe(vge,nn({key:0},t,{"header-type":r.value,modelValue:a.value,"onUpdate:modelValue":u[0]||(u[0]=c=>a.value=c),onSortChanged:i}),null,16,["header-type","modelValue"])):Je("",!0)}});function rve(){const e=So({isCreating:!1,name:"",error:void 0,assignees:null,status:null,start_date:null,due_date:null}),t=()=>{const o=e.name.trim();e.status,o.length===0?e.error="Name cannot be empty":o.length>25?e.error="Name cannot exceed 25 characters":e.error=void 0},n=()=>{e.isCreating=!0,e.name="",e.error=void 0,e.assignees=null,e.status=null,e.start_date=null,e.due_date=null},s=()=>{e.isCreating=!1};return nt(()=>e,()=>{t()},{deep:!0}),{newItemData:e,validateNewItem:t,openNewItemForm:n,closeNewItemForm:s,resetNewItemForm:()=>{e.name="",e.assignees=null,e.start_date=null,e.due_date=null,e.error=void 0}}}const my=Ql("userStore",()=>{const e=B(null),t=B(null);return{user:e,setUser:o=>{e.value=o},setUserRoleId:o=>{t.value=o},workspaceUserRoleId:t}}),ave=["innerHTML"],lve=20,uve=_t(rt({__name:"AddNewAssignee",props:{maxVisible:{default:3}},emits:["updated","cancel","start-update","tab","close","show","hide"],setup(e,{expose:t,emit:n}){const s=e,{triggerRef:o,popupRef:i,isVisible:r,show:a,hide:l}=Fs({toggleOnClick:!0,appendTo:"parent",offset:[-15,8]}),u=()=>{a()},c=B(null),d=()=>{P.value=[],ie.value=!1},h=Y(()=>r.value),f=Y(()=>{var W;return{disabled:!1,error:!1,readOnly:!1,isEmpty:((W=P.value)==null?void 0:W.length)===0,wrapperRef:o,active:h,bordered:!0}}),{argsMain:p}=ws(f),g=Xt,v=n,C=Y(()=>{var W;return Math.max(0,(((W=P.value)==null?void 0:W.length)||0)-s.maxVisible)}),S=Y(()=>{var W;return C.value<=0?"":((W=P.value)==null?void 0:W.slice(s.maxVisible).map(fe=>fe.name).join(", "))||""}),b=B(!1),w=B(!1),_=B(null),R=B(1),T=B(!0),I=B(0),x=B(""),P=B([]),D=Y(()=>{var W;return((W=P.value)==null?void 0:W.map(fe=>fe.id))||[]}),{assigneeList:F,mergedOptions:k}=mm({...s,value:[]}),{apiServices:O}=ts(!1,s),$=En("entityId"),q=async(W=1,fe="",oe=!1)=>{var G,Z,de,ke,Pe;if(!O.value)throw console.error("API service or item identifiers are undefined"),new Error("API service or item identifiers are undefined");if(oe?w.value=!0:b.value=!0,_.value=null,!((G=O.value)!=null&&G.getAssignableAssignees))throw new Error("API service getAssignableAssignees is undefined");const Ie=_n.getInstance().getItem("ws.code");try{const Le=await((Z=O.value)==null?void 0:Z.getAssignableAssignees(String(Ie),{entity_ids:($==null?void 0:$.value)||"",page:W,per_page:lve,display_name_like:fe})),ye=((de=Ec(Le.data))==null?void 0:de.map(gm))??[];F.value=oe?uc(F.value,ye,"id"):ye,I.value=Le.meta.total,T.value=(((ke=Le==null?void 0:Le.meta)==null?void 0:ke.current_page)||0)<(((Pe=Le==null?void 0:Le.meta)==null?void 0:Pe.last_page)||0),R.value=W}catch(Le){console.error("Error fetching assignable users:",Le),_.value="Failed to load assignable users"}finally{b.value=!1,w.value=!1}},J=W=>{var fe,oe,Ie;if((fe=P.value)!=null&&fe.some(G=>G.id===W.data.id)){P.value=(oe=P.value)==null?void 0:oe.filter(G=>G.id!==W.data.id);return}P.value=[...P.value||[],W.data],(Ie=c.value)==null||Ie.focus()},ee=()=>{P.value=[]},X=()=>{!w.value&&T.value&&q(R.value+1,x.value,!0)},ve=Ti(async W=>{x.value=W,await q(1,W,!1)},rr);nt(()=>r.value,W=>{var fe;W?(q(1,x.value,!1),(fe=c.value)==null||fe.focus(),v("show")):v("hide")});const te=Y(()=>{var W;return((W=P.value)==null?void 0:W.slice(0,3))||[]}),N=Y(()=>te.value.map(W=>({id:W.id,name:W.name,initial:W.initial,avatarId:W.id,profile_image:W.profile_image,color:W.color,size:24,user:W}))),V=my(),{user:ne}=Qs(V),ie=B(!1);t({getData:()=>P.value,clear:d,setData:W=>{P.value=W},focus:()=>{a(),Ct(()=>{var W;(W=c.value)==null||W.focus()})},hide:()=>{l()}}),nt([P,ie],()=>{v("updated",P.value)},{deep:!0});const pe=W=>{var fe;P.value=(fe=P.value)==null?void 0:fe.filter(oe=>oe.id!==W)},ae=W=>{var oe;const fe=_n.getInstance().getItem("ws.code");return((oe=O.value)==null?void 0:oe.getUserInformation(fe,W))||Promise.resolve(null)},re=B();return(W,fe)=>(j(),ce("div",{class:"new-assignee-wrapper",ref_key:"wrapperRef",ref:re},[ge(Cs,nn(U(p),{style:{"--icon-size":"18px"}}),{prefix:me(()=>[N.value.length==0?(j(),ce("div",{key:0,class:Q([W.$style["icon-wrapper"],"wrapper-prefix"]),onClick:Pt(u,["stop","prevent"])},[ge(lt,{src:"UserPlus",color:"#A6A6A6"})],2)):Je("",!0)]),default:me(()=>[Ee("div",{class:Q([W.$style["assignee-row"],W.$style["assignee-selector"]]),ref_key:"triggerRef",ref:o},[Ee("div",{style:{flex:1},class:Q([W.$style["assignee-row"]])},[(j(!0),ce(xt,null,xn(N.value,oe=>(j(),qe(Zf,{onClear:Ie=>pe(oe.id),key:oe.user.id,"disable-remove":!1},{default:me(()=>[ge(Oc,{user:oe.user,apiUpdateFunction:ae,appendTo:re.value},null,8,["user","appendTo"])]),_:2},1032,["onClear"]))),128)),C.value>0?Ke((j(),ce("div",{key:0,class:Q(W.$style["extra-avatars"])},[tt(" +"+wt(C.value),1)],2)),[[U(g),S.value]]):Je("",!0)],2)],2)]),_:1},16),Ee("div",{ref_key:"popupRef",ref:i},[ge(Jr,nn({"selected-id":D.value},{...s},{options:U(k),loading:b.value,"loading-more":w.value,"has-more":T.value,ref_key:"searchListRef",ref:c,onTab:fe[0]||(fe[0]=oe=>v("tab",oe)),onSelect:fe[1]||(fe[1]=oe=>{J(oe),v("start-update")}),onSearch:U(ve),onClose:fe[2]||(fe[2]=()=>v("close")),onLoadMore:X}),{"extra-item":me(()=>[ge(rS,{onClick:ee,label:"Unassign",borderLeft:!0},{icon:me(()=>[ge(lt,{src:"UserXMark",source:"remote"})]),_:1})]),item:me(({item:oe,selectedIndex:Ie,isSelected:G,handleSelect:Z,handleItemHover:de,getHighlightedLabel:ke,query:Pe,idx:Le})=>[ge(eu,nn(oe,{hover:Le===Ie,selected:G(oe),type:oe.type,onClick:Pt(ye=>Z(oe,ye),["stop","prevent"]),onMouseover:ye=>de(Le),class:W.$style["item-assignee"]}),{prefix:me(()=>[ge(Oc,{user:oe.data,apiUpdateFunction:ae,appendTo:U(i)},null,8,["user","appendTo"])]),label:me(({})=>[Pe?Ke((j(),ce("span",{key:0,class:Q([W.$style["item-label"],W.$style.match]),style:{flex:"1"},innerHTML:ke(oe.label)},null,10,ave)),[[U(g),{content:oe.label}]]):Ke((j(),ce("span",{key:1,class:Q(W.$style["item-label"]),style:{flex:"1"}},[tt(wt(oe.label),1)],2)),[[U(g),{content:oe.label}]])]),_:2},1040,["hover","selected","type","onClick","onMouseover","class"])]),_:1},16,["selected-id","options","loading","loading-more","has-more","onSearch"])],512)],512))}}),[["__cssModules",{$style:{action:"_action_1xvno_1","item-assignee":"_item-assignee_1xvno_6","item-action":"_item-action_1xvno_6","item-label":"_item-label_1xvno_16","icon-wrapper":"_icon-wrapper_1xvno_25","error-message":"_error-message_1xvno_34","empty-state":"_empty-state_1xvno_44","assignee-row":"_assignee-row_1xvno_57","assignee-selector":"_assignee-selector_1xvno_65",seperator:"_seperator_1xvno_69","extra-avatars":"_extra-avatars_1xvno_77",list:"_list_1xvno_89"}}]]),cve={key:0},dve={key:1},hve={key:0},fve={key:1},pve={key:0,class:"wrapper-suffix"},gve={key:0,class:"wrapper-prefix",style:{display:"flex",justifyContent:"center",alignItems:"center",width:"24px",height:"24px"}},mve=_t(rt({__name:"AddNewDate",emits:["updated","tab","show","hide"],setup(e,{expose:t,emit:n}){const s=Xt,{triggerRef:o,popupRef:i,isVisible:r,hide:a,show:l}=Fs({toggleOnClick:!0,appendTo:"parent",offset:[0,0]}),u=()=>{c.value=[null,null]},c=B([null,null]),d=w=>{const _=cm();return w?bt.fromJSDate(w,{zone:_}).toFormat("MMM dd"):""},h=Y(()=>r.value),f=Y(()=>({disabled:!1,error:!1,readOnly:!1,isEmpty:c.value[0]===null&&c.value[1]===null,wrapperRef:o,active:h,bordered:!0})),{argsMain:p}=ws(f),g=B(!1),v=w=>{S("tab",w)},C=w=>{"start"in w&&w.start!==void 0&&(c.value[0]=w.start),"end"in w&&w.end!==void 0&&(c.value[1]=w.end)};t({getData:()=>c.value,clear:u,setData:w=>{c.value=w},focus:()=>{l(),Ct(()=>{var w;(w=b.value)==null||w.focus()})},hide:()=>{a()}});const S=n;nt(()=>c.value,w=>{S("updated",w)},{deep:!0});const b=B(null);return nt(()=>r.value,w=>{w?(Ct(()=>{var _;(_=b.value)==null||_.focus()}),S("show")):S("hide")}),(w,_)=>(j(),ce(xt,null,[ge(Cs,nn({ref_key:"triggerRef",ref:o},U(p),{style:{"--icon-size":"18px",cursor:"pointer"}}),{default:me(({focused:R})=>[Ee("div",{class:Q(w.$style["date-time"])},[Ee("div",{class:Q(w.$style.date)},[c.value[0]==null&&(R||U(r))?(j(),ce("span",cve,"MMMDD")):(j(),ce("span",dve,wt(d(c.value[0])),1))],2),c.value[0]!==null||c.value[1]!==null||R||U(r)?(j(),ce("div",{key:0,class:Q(w.$style.separator)}," → ",2)):Je("",!0),Ee("div",{class:Q(w.$style.date)},[c.value[1]==null&&(R||U(r))?(j(),ce("span",hve,"MMMDD")):(j(),ce("span",fve,wt(d(c.value[1])),1))],2)],2)]),suffix:me(({hovered:R,focused:T})=>[(c.value[0]!==null||c.value[1]!==null)&&(R||T||U(r))?(j(),ce("div",pve,[Ke((j(),qe(mt,{onClick:Pt(u,["stop","prevent"]),variant:["icon","primary"],rounded:!0,size:18},{default:me(()=>[ge(lt,{src:"XMarkSolid",size:"8"})]),_:1})),[[U(s),"Clear"]])])):Je("",!0)]),prefix:me(()=>[c.value[0]===null&&c.value[1]===null?(j(),ce("div",gve,[ge(lt,{src:"Calendar",color:"#A6A6A6"})])):Je("",!0)]),_:1},16),Ee("div",{ref_key:"popupRef",ref:i},[U(r)?(j(),qe(Am,{key:0,immediatelyUpdate:!1,value:c.value,onConfirmed:C,ref_key:"calendarRef",ref:b,onClosed:U(a),onStartUpdate:_[0]||(_[0]=R=>g.value=!0),onFinishUpdate:_[1]||(_[1]=R=>g.value=!1),onTab:v},null,8,["value","onClosed"])):Je("",!0)],512)],64))}}),[["__cssModules",{$style:{"list-item":"_list-item_n9o5g_2","date-time":"_date-time_n9o5g_5",date:"_date_n9o5g_5",separator:"_separator_n9o5g_18"}}]]),vve=_t(rt({__name:"AddNewStatus",props:{entityId:{}},emits:["updated","error","cancel","update:modelValue","tab","close","show","hide"],setup(e,{expose:t,emit:n}){const s=e,o={PER_PAGE:20,INITIAL_PAGE:1},{triggerRef:i,popupRef:r,isVisible:a,show:l,hide:u}=Fs({toggleOnClick:!0,appendTo:"parent"}),c=B(null),d=B([]),h=B(!1),f=B(!1),p=B(null),g=B(o.INITIAL_PAGE),v=B(!0),C=B(0),S=B(""),b=n,w=Y(()=>a.value),_=Y(()=>({disabled:!1,error:!1,readOnly:!1,isEmpty:!c.value,wrapperRef:i,active:w,bordered:!0})),R=B(null),{argsMain:T}=ws(_),I=Y(()=>c.value?d.value.filter(te=>te.id===c.value):[]),x=Y(()=>!c.value||I.value.length===0?"":I.value[0].label),P=Y(()=>c.value?[c.value]:[]),D=Y(()=>{if(!c.value)return{backgroundColor:"#A6A6A6",border:"1px solid #A6A6A6",minWidth:"14px"};const te=I.value[0],N=String((te==null?void 0:te.color)||"white");return{backgroundColor:N,border:Lg(N,"white")?"1px solid #ccc":"1px solid #fff",minWidth:"14px"}}),F=te=>({label:te.name,value:te.id,selected:c.value===te.id,hover:!1,type:"status",disabled:!1,clickable:!0,danger:!1,data:te,id:te.id,color:te.color}),{apiServices:k}=ts(!1,s),O=async(te=o.INITIAL_PAGE,N="",V=!1)=>{var ne,ie;V?f.value=!0:h.value=!0,p.value=null;try{const pe=_n.getInstance().getItem("ws.code"),ae=await((ne=k.value)==null?void 0:ne.getAssignableStatuses(pe,{entity_id:s.entityId||"",name_like:N,page:te,per_page:o.PER_PAGE}));if(!ae){V||(d.value=[]),v.value=!1;return}const re=ae.data.map(F);d.value=V?[...d.value,...re]:re,C.value=((ie=ae.meta)==null?void 0:ie.total)??ae.data.length,v.value=d.value.length<C.value,g.value=te}catch(pe){console.error("Error fetching statuses:",pe),p.value="Failed to load statuses",V||(d.value=[]),v.value=!1,b("error",p.value)}finally{h.value=!1,f.value=!1}},$=(te,N)=>{var ne;N.stopImmediatePropagation(),N.preventDefault(),N.stopPropagation();const V=te.id;c.value=V,(ne=R.value)==null||ne.focus(),b("update:modelValue",c.value),u()},q=async()=>{!v.value||f.value||await O(g.value+1,S.value,!0)},J=async te=>{S.value=te,g.value=o.INITIAL_PAGE,await O(o.INITIAL_PAGE,te,!1)},ee=()=>{c.value=null,b("update:modelValue",null)},X=()=>{l(),Ct(()=>{var te;(te=R.value)==null||te.focus()})};return nt(()=>a.value,te=>{var N;te?(O(1,S.value,!1),(N=R.value)==null||N.focus(),b("show")):b("hide")}),nt(()=>c.value,te=>{b("updated",te)}),t({focus:X,clear:ee,getData:()=>c.value,setData:te=>{c.value=te},hide:u,autoFillDefault:async()=>{S.value="",await O(1,S.value,!1),d.value.length>0&&(c.value=d.value[0].id,b("update:modelValue",c.value))}}),(te,N)=>{const V=Eo("tooltip");return j(),ce(xt,null,[ge(Cs,nn({ref_key:"triggerRef",ref:i},U(T),{style:{"--icon-size":"18px"}}),{default:me(()=>[Ee("div",{class:Q(te.$style.status)},[Ee("div",{class:Q(te.$style["color-indicator"]),style:dn(D.value)},null,6),Ke((j(),ce("span",{class:Q({[te.$style.empty]:I.value.length===0,[te.$style["status-text"]]:!0})},[tt(wt(x.value),1)],2)),[[V,{content:x.value}]])],2)]),_:1},16),Ee("div",{ref_key:"popupRef",ref:r},[ge(Jr,{style:{width:"200px"},ref_key:"searchListRef",ref:R,"selected-id":P.value,options:d.value,loading:h.value,"loading-more":f.value,"has-more":v.value,error:p.value,onSearch:J,onSelect:$,onLoadMore:q,onCancel:N[0]||(N[0]=ne=>b("cancel")),onTab:N[1]||(N[1]=ne=>b("tab",ne)),onClose:N[2]||(N[2]=()=>b("close"))},null,8,["selected-id","options","loading","loading-more","has-more","error"])],512)],64)}}}),[["__cssModules",{$style:{"list-item":"_list-item_1gv28_2",status:"_status_1gv28_6","color-indicator":"_color-indicator_1gv28_12","count-badge":"_count-badge_1gv28_25","status-text":"_status-text_1gv28_32",empty:"_empty_1gv28_41"}}],["__scopeId","data-v-6fccb209"]]),yve=_t(rt({__name:"CreateNewScene",emits:["create-new-item","focus-on-id","search-for-code"],setup(e,{expose:t,emit:n}){const s=["name","assignees","status","date","cancel","create-keep","create"],o=Xt,i=xH("target"),r=En("workspaceId"),a=En("entityId"),l=n,u=e,{newItemData:c,validateNewItem:d,resetNewItemForm:h,closeNewItemForm:f}=rve(),{apiServices:p}=ts(!1,u),{openSceneHub:g}=tf(),v=B(!1),C=B(!1),S=B(null),b=B({assignees:!1,status:!1,date:!1}),w={name:B(null),assignees:B(null),status:B(null),date:B(null),cancel:B(null),"create-keep":B(null),create:B(null)},_=w.name,R=w.assignees,T=w.status,I=w.date,x=w.cancel,P=w["create-keep"],D=w.create,F=B(new Map),k=Y(()=>!!c.error||!c.name.trim()||C.value),O=(ye,M)=>{ye&&F.value.set(M,ye.$el||ye)},$=(ye,M)=>{if(ye==="date"){const[H,le]=Array.isArray(M)?M:[void 0,void 0];c.start_date=H,c.due_date=le}else c[ye]=M},q=()=>{c.isCreating=!0,S.value="name"},J=()=>{c.isCreating=!1,h()},ee=En("switchInstance"),{addNotification:X}=Qf(),ve=ye=>{l("focus-on-id",ye)},te=(ye,M,H)=>{const le=x7(void 0,"created");X({id:String(ye),message:`<div style="display:flex; flex-direction: column; align-items: flex-start;"><b>${le}</b>
|
|
215
|
+
*/function DV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,s)}return n}function Er(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DV(Object(n),!0).forEach(function(s){tme(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DV(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function ey(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ey=function(t){return typeof t}:ey=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ey(e)}function tme(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function da(){return da=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},da.apply(this,arguments)}function nme(e,t){if(e==null)return{};var n={},s=Object.keys(e),o,i;for(i=0;i<s.length;i++)o=s[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function sme(e,t){if(e==null)return{};var n=nme(e,t),s,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)s=i[o],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}var ome="1.14.0";function ha(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var fa=ha(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ep=ha(/Edge/i),TV=ha(/firefox/i),tp=ha(/safari/i)&&!ha(/chrome/i)&&!ha(/android/i),IV=ha(/iP(ad|od|hone)/i),ime=ha(/chrome/i)&&ha(/android/i),xV={capture:!1,passive:!1};function wn(e,t,n){e.addEventListener(t,n,!fa&&xV)}function fn(e,t,n){e.removeEventListener(t,n,!fa&&xV)}function ty(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function rme(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function _r(e,t,n,s){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&ty(e,t):ty(e,t))||s&&e===n)return e;if(e===n)break}while(e=rme(e))}return null}var FV=/\s+/g;function Bo(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var s=(" "+e.className+" ").replace(FV," ").replace(" "+t+" "," ");e.className=(s+(n?" "+t:"")).replace(FV," ")}}function Vt(e,t,n){var s=e&&e.style;if(s){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in s)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),s[t]=n+(typeof n=="string"?"":"px")}}function yd(e,t){var n="";if(typeof e=="string")n=e;else do{var s=Vt(e,"transform");s&&s!=="none"&&(n=s+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function PV(e,t,n){if(e){var s=e.getElementsByTagName(t),o=0,i=s.length;if(n)for(;o<i;o++)n(s[o],o);return s}return[]}function Rr(){var e=document.scrollingElement;return e||document.documentElement}function Ss(e,t,n,s,o){if(!(!e.getBoundingClientRect&&e!==window)){var i,r,a,l,u,c,d;if(e!==window&&e.parentNode&&e!==Rr()?(i=e.getBoundingClientRect(),r=i.top,a=i.left,l=i.bottom,u=i.right,c=i.height,d=i.width):(r=0,a=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!fa))do if(o&&o.getBoundingClientRect&&(Vt(o,"transform")!=="none"||n&&Vt(o,"position")!=="static")){var h=o.getBoundingClientRect();r-=h.top+parseInt(Vt(o,"border-top-width")),a-=h.left+parseInt(Vt(o,"border-left-width")),l=r+i.height,u=a+i.width;break}while(o=o.parentNode);if(s&&e!==window){var f=yd(o||e),p=f&&f.a,g=f&&f.d;f&&(r/=g,a/=p,d/=p,c/=g,l=r+c,u=a+d)}return{top:r,left:a,bottom:l,right:u,width:d,height:c}}}function AV(e,t,n){for(var s=al(e,!0),o=Ss(e)[t];s;){var i=Ss(s)[n],r=void 0;if(r=o>=i,!r)return s;if(s===Rr())break;s=al(s,!1)}return!1}function wd(e,t,n,s){for(var o=0,i=0,r=e.children;i<r.length;){if(r[i].style.display!=="none"&&r[i]!==Bt.ghost&&(s||r[i]!==Bt.dragged)&&_r(r[i],n.draggable,e,!1)){if(o===t)return r[i];o++}i++}return null}function P0(e,t){for(var n=e.lastElementChild;n&&(n===Bt.ghost||Vt(n,"display")==="none"||t&&!ty(n,t));)n=n.previousElementSibling;return n||null}function di(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==Bt.clone&&(!t||ty(e,t))&&n++;return n}function kV(e){var t=0,n=0,s=Rr();if(e)do{var o=yd(e),i=o.a,r=o.d;t+=e.scrollLeft*i,n+=e.scrollTop*r}while(e!==s&&(e=e.parentNode));return[t,n]}function ame(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var s in t)if(t.hasOwnProperty(s)&&t[s]===e[n][s])return Number(n)}return-1}function al(e,t){if(!e||!e.getBoundingClientRect)return Rr();var n=e,s=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=Vt(n);if(n.clientWidth<n.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return Rr();if(s||t)return n;s=!0}}while(n=n.parentNode);return Rr()}function lme(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function A0(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var np;function OV(e,t){return function(){if(!np){var n=arguments,s=this;n.length===1?e.call(s,n[0]):e.apply(s,n),np=setTimeout(function(){np=void 0},t)}}}function ume(){clearTimeout(np),np=void 0}function MV(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function NV(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var $o="Sortable"+new Date().getTime();function cme(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var s=[].slice.call(this.el.children);s.forEach(function(o){if(!(Vt(o,"display")==="none"||o===Bt.ghost)){e.push({target:o,rect:Ss(o)});var i=Er({},e[e.length-1].rect);if(o.thisAnimationDuration){var r=yd(o,!0);r&&(i.top-=r.f,i.left-=r.e)}o.fromRect=i}})}},addAnimationState:function(s){e.push(s)},removeAnimationState:function(s){e.splice(ame(e,{target:s}),1)},animateAll:function(s){var o=this;if(!this.options.animation){clearTimeout(t),typeof s=="function"&&s();return}var i=!1,r=0;e.forEach(function(a){var l=0,u=a.target,c=u.fromRect,d=Ss(u),h=u.prevFromRect,f=u.prevToRect,p=a.rect,g=yd(u,!0);g&&(d.top-=g.f,d.left-=g.e),u.toRect=d,u.thisAnimationDuration&&A0(h,d)&&!A0(c,d)&&(p.top-d.top)/(p.left-d.left)===(c.top-d.top)/(c.left-d.left)&&(l=hme(p,h,f,o.options)),A0(d,c)||(u.prevFromRect=c,u.prevToRect=d,l||(l=o.options.animation),o.animate(u,p,d,l)),l&&(i=!0,r=Math.max(r,l),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},l),u.thisAnimationDuration=l)}),clearTimeout(t),i?t=setTimeout(function(){typeof s=="function"&&s()},r):typeof s=="function"&&s(),e=[]},animate:function(s,o,i,r){if(r){Vt(s,"transition",""),Vt(s,"transform","");var a=yd(this.el),l=a&&a.a,u=a&&a.d,c=(o.left-i.left)/(l||1),d=(o.top-i.top)/(u||1);s.animatingX=!!c,s.animatingY=!!d,Vt(s,"transform","translate3d("+c+"px,"+d+"px,0)"),this.forRepaintDummy=dme(s),Vt(s,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),Vt(s,"transform","translate3d(0,0,0)"),typeof s.animated=="number"&&clearTimeout(s.animated),s.animated=setTimeout(function(){Vt(s,"transition",""),Vt(s,"transform",""),s.animated=!1,s.animatingX=!1,s.animatingY=!1},r)}}}}function dme(e){return e.offsetWidth}function hme(e,t,n,s){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*s.animation}var Cd=[],k0={initializeByDefault:!0},sp={mount:function(t){for(var n in k0)k0.hasOwnProperty(n)&&!(n in t)&&(t[n]=k0[n]);Cd.forEach(function(s){if(s.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Cd.push(t)},pluginEvent:function(t,n,s){var o=this;this.eventCanceled=!1,s.cancel=function(){o.eventCanceled=!0};var i=t+"Global";Cd.forEach(function(r){n[r.pluginName]&&(n[r.pluginName][i]&&n[r.pluginName][i](Er({sortable:n},s)),n.options[r.pluginName]&&n[r.pluginName][t]&&n[r.pluginName][t](Er({sortable:n},s)))})},initializePlugins:function(t,n,s,o){Cd.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var u=new a(t,n,t.options);u.sortable=t,u.options=t.options,t[l]=u,da(s,u.defaults)}});for(var i in t.options)if(t.options.hasOwnProperty(i)){var r=this.modifyOption(t,i,t.options[i]);typeof r<"u"&&(t.options[i]=r)}},getEventProperties:function(t,n){var s={};return Cd.forEach(function(o){typeof o.eventProperties=="function"&&da(s,o.eventProperties.call(n[o.pluginName],t))}),s},modifyOption:function(t,n,s){var o;return Cd.forEach(function(i){t[i.pluginName]&&i.optionListeners&&typeof i.optionListeners[n]=="function"&&(o=i.optionListeners[n].call(t[i.pluginName],s))}),o}};function fme(e){var t=e.sortable,n=e.rootEl,s=e.name,o=e.targetEl,i=e.cloneEl,r=e.toEl,a=e.fromEl,l=e.oldIndex,u=e.newIndex,c=e.oldDraggableIndex,d=e.newDraggableIndex,h=e.originalEvent,f=e.putSortable,p=e.extraEventProperties;if(t=t||n&&n[$o],!!t){var g,v=t.options,C="on"+s.charAt(0).toUpperCase()+s.substr(1);window.CustomEvent&&!fa&&!ep?g=new CustomEvent(s,{bubbles:!0,cancelable:!0}):(g=document.createEvent("Event"),g.initEvent(s,!0,!0)),g.to=r||n,g.from=a||n,g.item=o||n,g.clone=i,g.oldIndex=l,g.newIndex=u,g.oldDraggableIndex=c,g.newDraggableIndex=d,g.originalEvent=h,g.pullMode=f?f.lastPutMode:void 0;var S=Er(Er({},p),sp.getEventProperties(s,t));for(var b in S)g[b]=S[b];n&&n.dispatchEvent(g),v[C]&&v[C].call(t,g)}}var pme=["evt"],mo=function(t,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=s.evt,i=sme(s,pme);sp.pluginEvent.bind(Bt)(t,n,Er({dragEl:ft,parentEl:Jn,ghostEl:Yt,rootEl:Un,nextEl:Su,lastDownEl:ny,cloneEl:Qn,cloneHidden:ll,dragStarted:ip,putSortable:Os,activeSortable:Bt.active,originalEvent:o,oldIndex:bd,oldDraggableIndex:op,newIndex:Ho,newDraggableIndex:ul,hideGhostForTarget:UV,unhideGhostForTarget:WV,cloneNowHidden:function(){ll=!0},cloneNowShown:function(){ll=!1},dispatchSortableEvent:function(a){to({sortable:n,name:a,originalEvent:o})}},i))};function to(e){fme(Er({putSortable:Os,cloneEl:Qn,targetEl:ft,rootEl:Un,oldIndex:bd,oldDraggableIndex:op,newIndex:Ho,newDraggableIndex:ul},e))}var ft,Jn,Yt,Un,Su,ny,Qn,ll,bd,Ho,op,ul,sy,Os,Sd=!1,oy=!1,iy=[],Eu,Bi,O0,M0,LV,VV,ip,Ed,rp,ap=!1,ry=!1,ay,zs,N0=[],L0=!1,ly=[],uy=typeof document<"u",cy=IV,BV=ep||fa?"cssFloat":"float",gme=uy&&!ime&&!IV&&"draggable"in document.createElement("div"),$V=function(){if(uy){if(fa)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),HV=function(t,n){var s=Vt(t),o=parseInt(s.width)-parseInt(s.paddingLeft)-parseInt(s.paddingRight)-parseInt(s.borderLeftWidth)-parseInt(s.borderRightWidth),i=wd(t,0,n),r=wd(t,1,n),a=i&&Vt(i),l=r&&Vt(r),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Ss(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Ss(r).width;if(s.display==="flex")return s.flexDirection==="column"||s.flexDirection==="column-reverse"?"vertical":"horizontal";if(s.display==="grid")return s.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&a.float!=="none"){var d=a.float==="left"?"left":"right";return r&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return i&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||u>=o&&s[BV]==="none"||r&&s[BV]==="none"&&u+c>o)?"vertical":"horizontal"},mme=function(t,n,s){var o=s?t.left:t.top,i=s?t.right:t.bottom,r=s?t.width:t.height,a=s?n.left:n.top,l=s?n.right:n.bottom,u=s?n.width:n.height;return o===a||i===l||o+r/2===a+u/2},vme=function(t,n){var s;return iy.some(function(o){var i=o[$o].options.emptyInsertThreshold;if(!(!i||P0(o))){var r=Ss(o),a=t>=r.left-i&&t<=r.right+i,l=n>=r.top-i&&n<=r.bottom+i;if(a&&l)return s=o}}),s},GV=function(t){function n(i,r){return function(a,l,u,c){var d=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(i==null&&(r||d))return!0;if(i==null||i===!1)return!1;if(r&&i==="clone")return i;if(typeof i=="function")return n(i(a,l,u,c),r)(a,l,u,c);var h=(r?a:l).options.group.name;return i===!0||typeof i=="string"&&i===h||i.join&&i.indexOf(h)>-1}}var s={},o=t.group;(!o||ey(o)!="object")&&(o={name:o}),s.name=o.name,s.checkPull=n(o.pull,!0),s.checkPut=n(o.put),s.revertClone=o.revertClone,t.group=s},UV=function(){!$V&&Yt&&Vt(Yt,"display","none")},WV=function(){!$V&&Yt&&Vt(Yt,"display","")};uy&&document.addEventListener("click",function(e){if(oy)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),oy=!1,!1},!0);var _u=function(t){if(ft){t=t.touches?t.touches[0]:t;var n=vme(t.clientX,t.clientY);if(n){var s={};for(var o in t)t.hasOwnProperty(o)&&(s[o]=t[o]);s.target=s.rootEl=n,s.preventDefault=void 0,s.stopPropagation=void 0,n[$o]._onDragOver(s)}}},yme=function(t){ft&&ft.parentNode[$o]._isOutsideThisEl(t.target)};function Bt(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=da({},t),e[$o]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return HV(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(r,a){r.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Bt.supportPointer!==!1&&"PointerEvent"in window&&!tp,emptyInsertThreshold:5};sp.initializePlugins(this,e,n);for(var s in n)!(s in t)&&(t[s]=n[s]);GV(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:gme,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?wn(e,"pointerdown",this._onTapStart):(wn(e,"mousedown",this._onTapStart),wn(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(wn(e,"dragover",this),wn(e,"dragenter",this)),iy.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),da(this,cme())}Bt.prototype={constructor:Bt,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Ed=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,ft):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,s=this.el,o=this.options,i=o.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(Dme(s),!ft&&!(/mousedown|pointerdown/.test(r)&&t.button!==0||o.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&tp&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=_r(l,o.draggable,s,!1),!(l&&l.animated)&&ny!==l)){if(bd=di(l),op=di(l,o.draggable),typeof c=="function"){if(c.call(this,t,l,this)){to({sortable:n,rootEl:u,name:"filter",targetEl:l,toEl:s,fromEl:s}),mo("filter",n,{evt:t}),i&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(d){if(d=_r(u,d.trim(),s,!1),d)return to({sortable:n,rootEl:d,name:"filter",targetEl:l,fromEl:s,toEl:s}),mo("filter",n,{evt:t}),!0}),c)){i&&t.cancelable&&t.preventDefault();return}o.handle&&!_r(u,o.handle,s,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,n,s){var o=this,i=o.el,r=o.options,a=i.ownerDocument,l;if(s&&!ft&&s.parentNode===i){var u=Ss(s);if(Un=i,ft=s,Jn=ft.parentNode,Su=ft.nextSibling,ny=s,sy=r.group,Bt.dragged=ft,Eu={target:ft,clientX:(n||t).clientX,clientY:(n||t).clientY},LV=Eu.clientX-u.left,VV=Eu.clientY-u.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,ft.style["will-change"]="all",l=function(){if(mo("delayEnded",o,{evt:t}),Bt.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!TV&&o.nativeDraggable&&(ft.draggable=!0),o._triggerDragStart(t,n),to({sortable:o,name:"choose",originalEvent:t}),Bo(ft,r.chosenClass,!0)},r.ignore.split(",").forEach(function(c){PV(ft,c.trim(),V0)}),wn(a,"dragover",_u),wn(a,"mousemove",_u),wn(a,"touchmove",_u),wn(a,"mouseup",o._onDrop),wn(a,"touchend",o._onDrop),wn(a,"touchcancel",o._onDrop),TV&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ft.draggable=!0),mo("delayStart",this,{evt:t}),r.delay&&(!r.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(ep||fa))){if(Bt.eventCanceled){this._onDrop();return}wn(a,"mouseup",o._disableDelayedDrag),wn(a,"touchend",o._disableDelayedDrag),wn(a,"touchcancel",o._disableDelayedDrag),wn(a,"mousemove",o._delayedDragTouchMoveHandler),wn(a,"touchmove",o._delayedDragTouchMoveHandler),r.supportPointer&&wn(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,r.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ft&&V0(ft),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;fn(t,"mouseup",this._disableDelayedDrag),fn(t,"touchend",this._disableDelayedDrag),fn(t,"touchcancel",this._disableDelayedDrag),fn(t,"mousemove",this._delayedDragTouchMoveHandler),fn(t,"touchmove",this._delayedDragTouchMoveHandler),fn(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?wn(document,"pointermove",this._onTouchMove):n?wn(document,"touchmove",this._onTouchMove):wn(document,"mousemove",this._onTouchMove):(wn(ft,"dragend",this),wn(Un,"dragstart",this._onDragStart));try{document.selection?hy(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(Sd=!1,Un&&ft){mo("dragStarted",this,{evt:n}),this.nativeDraggable&&wn(document,"dragover",yme);var s=this.options;!t&&Bo(ft,s.dragClass,!1),Bo(ft,s.ghostClass,!0),Bt.active=this,t&&this._appendGhost(),to({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Bi){this._lastX=Bi.clientX,this._lastY=Bi.clientY,UV();for(var t=document.elementFromPoint(Bi.clientX,Bi.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Bi.clientX,Bi.clientY),t!==n);)n=t;if(ft.parentNode[$o]._isOutsideThisEl(t),n)do{if(n[$o]){var s=void 0;if(s=n[$o]._onDragOver({clientX:Bi.clientX,clientY:Bi.clientY,target:t,rootEl:n}),s&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);WV()}},_onTouchMove:function(t){if(Eu){var n=this.options,s=n.fallbackTolerance,o=n.fallbackOffset,i=t.touches?t.touches[0]:t,r=Yt&&yd(Yt,!0),a=Yt&&r&&r.a,l=Yt&&r&&r.d,u=cy&&zs&&kV(zs),c=(i.clientX-Eu.clientX+o.x)/(a||1)+(u?u[0]-N0[0]:0)/(a||1),d=(i.clientY-Eu.clientY+o.y)/(l||1)+(u?u[1]-N0[1]:0)/(l||1);if(!Bt.active&&!Sd){if(s&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<s)return;this._onDragStart(t,!0)}if(Yt){r?(r.e+=c-(O0||0),r.f+=d-(M0||0)):r={a:1,b:0,c:0,d:1,e:c,f:d};var h="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");Vt(Yt,"webkitTransform",h),Vt(Yt,"mozTransform",h),Vt(Yt,"msTransform",h),Vt(Yt,"transform",h),O0=c,M0=d,Bi=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Yt){var t=this.options.fallbackOnBody?document.body:Un,n=Ss(ft,!0,cy,!0,t),s=this.options;if(cy){for(zs=t;Vt(zs,"position")==="static"&&Vt(zs,"transform")==="none"&&zs!==document;)zs=zs.parentNode;zs!==document.body&&zs!==document.documentElement?(zs===document&&(zs=Rr()),n.top+=zs.scrollTop,n.left+=zs.scrollLeft):zs=Rr(),N0=kV(zs)}Yt=ft.cloneNode(!0),Bo(Yt,s.ghostClass,!1),Bo(Yt,s.fallbackClass,!0),Bo(Yt,s.dragClass,!0),Vt(Yt,"transition",""),Vt(Yt,"transform",""),Vt(Yt,"box-sizing","border-box"),Vt(Yt,"margin",0),Vt(Yt,"top",n.top),Vt(Yt,"left",n.left),Vt(Yt,"width",n.width),Vt(Yt,"height",n.height),Vt(Yt,"opacity","0.8"),Vt(Yt,"position",cy?"absolute":"fixed"),Vt(Yt,"zIndex","100000"),Vt(Yt,"pointerEvents","none"),Bt.ghost=Yt,t.appendChild(Yt),Vt(Yt,"transform-origin",LV/parseInt(Yt.style.width)*100+"% "+VV/parseInt(Yt.style.height)*100+"%")}},_onDragStart:function(t,n){var s=this,o=t.dataTransfer,i=s.options;if(mo("dragStart",this,{evt:t}),Bt.eventCanceled){this._onDrop();return}mo("setupClone",this),Bt.eventCanceled||(Qn=NV(ft),Qn.draggable=!1,Qn.style["will-change"]="",this._hideClone(),Bo(Qn,this.options.chosenClass,!1),Bt.clone=Qn),s.cloneId=hy(function(){mo("clone",s),!Bt.eventCanceled&&(s.options.removeCloneOnHide||Un.insertBefore(Qn,ft),s._hideClone(),to({sortable:s,name:"clone"}))}),!n&&Bo(ft,i.dragClass,!0),n?(oy=!0,s._loopId=setInterval(s._emulateDragOver,50)):(fn(document,"mouseup",s._onDrop),fn(document,"touchend",s._onDrop),fn(document,"touchcancel",s._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(s,o,ft)),wn(document,"drop",s),Vt(ft,"transform","translateZ(0)")),Sd=!0,s._dragStartId=hy(s._dragStarted.bind(s,n,t)),wn(document,"selectstart",s),ip=!0,tp&&Vt(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,s=t.target,o,i,r,a=this.options,l=a.group,u=Bt.active,c=sy===l,d=a.sort,h=Os||u,f,p=this,g=!1;if(L0)return;function v(ee,X){mo(ee,p,Er({evt:t,isOwner:c,axis:f?"vertical":"horizontal",revert:r,dragRect:o,targetRect:i,canSort:d,fromSortable:h,target:s,completed:S,onMove:function(te,N){return dy(Un,n,ft,o,te,Ss(te),t,N)},changed:b},X))}function C(){v("dragOverAnimationCapture"),p.captureAnimationState(),p!==h&&h.captureAnimationState()}function S(ee){return v("dragOverCompleted",{insertion:ee}),ee&&(c?u._hideClone():u._showClone(p),p!==h&&(Bo(ft,Os?Os.options.ghostClass:u.options.ghostClass,!1),Bo(ft,a.ghostClass,!0)),Os!==p&&p!==Bt.active?Os=p:p===Bt.active&&Os&&(Os=null),h===p&&(p._ignoreWhileAnimating=s),p.animateAll(function(){v("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(s===ft&&!ft.animated||s===n&&!s.animated)&&(Ed=null),!a.dragoverBubble&&!t.rootEl&&s!==document&&(ft.parentNode[$o]._isOutsideThisEl(t.target),!ee&&_u(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function b(){Ho=di(ft),ul=di(ft,a.draggable),to({sortable:p,name:"change",toEl:n,newIndex:Ho,newDraggableIndex:ul,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),s=_r(s,a.draggable,n,!0),v("dragOver"),Bt.eventCanceled)return g;if(ft.contains(t.target)||s.animated&&s.animatingX&&s.animatingY||p._ignoreWhileAnimating===s)return S(!1);if(oy=!1,u&&!a.disabled&&(c?d||(r=Jn!==Un):Os===this||(this.lastPutMode=sy.checkPull(this,u,ft,t))&&l.checkPut(this,u,ft,t))){if(f=this._getDirection(t,s)==="vertical",o=Ss(ft),v("dragOverValid"),Bt.eventCanceled)return g;if(r)return Jn=Un,C(),this._hideClone(),v("revert"),Bt.eventCanceled||(Su?Un.insertBefore(ft,Su):Un.appendChild(ft)),S(!0);var w=P0(n,a.draggable);if(!w||Sme(t,f,this)&&!w.animated){if(w===ft)return S(!1);if(w&&n===t.target&&(s=w),s&&(i=Ss(s)),dy(Un,n,ft,o,s,i,t,!!s)!==!1)return C(),n.appendChild(ft),Jn=n,b(),S(!0)}else if(w&&bme(t,f,this)){var _=wd(n,0,a,!0);if(_===ft)return S(!1);if(s=_,i=Ss(s),dy(Un,n,ft,o,s,i,t,!1)!==!1)return C(),n.insertBefore(ft,_),Jn=n,b(),S(!0)}else if(s.parentNode===n){i=Ss(s);var R=0,T,I=ft.parentNode!==n,x=!mme(ft.animated&&ft.toRect||o,s.animated&&s.toRect||i,f),P=f?"top":"left",D=AV(s,"top","top")||AV(ft,"top","top"),F=D?D.scrollTop:void 0;Ed!==s&&(T=i[P],ap=!1,ry=!x&&a.invertSwap||I),R=Eme(t,s,i,f,x?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,ry,Ed===s);var k;if(R!==0){var O=di(ft);do O-=R,k=Jn.children[O];while(k&&(Vt(k,"display")==="none"||k===Yt))}if(R===0||k===s)return S(!1);Ed=s,rp=R;var $=s.nextElementSibling,q=!1;q=R===1;var J=dy(Un,n,ft,o,s,i,t,q);if(J!==!1)return(J===1||J===-1)&&(q=J===1),L0=!0,setTimeout(Cme,30),C(),q&&!$?n.appendChild(ft):s.parentNode.insertBefore(ft,q?$:s),D&&MV(D,0,F-D.scrollTop),Jn=ft.parentNode,T!==void 0&&!ry&&(ay=Math.abs(T-Ss(s)[P])),b(),S(!0)}if(n.contains(ft))return S(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){fn(document,"mousemove",this._onTouchMove),fn(document,"touchmove",this._onTouchMove),fn(document,"pointermove",this._onTouchMove),fn(document,"dragover",_u),fn(document,"mousemove",_u),fn(document,"touchmove",_u)},_offUpEvents:function(){var t=this.el.ownerDocument;fn(t,"mouseup",this._onDrop),fn(t,"touchend",this._onDrop),fn(t,"pointerup",this._onDrop),fn(t,"touchcancel",this._onDrop),fn(document,"selectstart",this)},_onDrop:function(t){var n=this.el,s=this.options;if(Ho=di(ft),ul=di(ft,s.draggable),mo("drop",this,{evt:t}),Jn=ft&&ft.parentNode,Ho=di(ft),ul=di(ft,s.draggable),Bt.eventCanceled){this._nulling();return}Sd=!1,ry=!1,ap=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),B0(this.cloneId),B0(this._dragStartId),this.nativeDraggable&&(fn(document,"drop",this),fn(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),tp&&Vt(document.body,"user-select",""),Vt(ft,"transform",""),t&&(ip&&(t.cancelable&&t.preventDefault(),!s.dropBubble&&t.stopPropagation()),Yt&&Yt.parentNode&&Yt.parentNode.removeChild(Yt),(Un===Jn||Os&&Os.lastPutMode!=="clone")&&Qn&&Qn.parentNode&&Qn.parentNode.removeChild(Qn),ft&&(this.nativeDraggable&&fn(ft,"dragend",this),V0(ft),ft.style["will-change"]="",ip&&!Sd&&Bo(ft,Os?Os.options.ghostClass:this.options.ghostClass,!1),Bo(ft,this.options.chosenClass,!1),to({sortable:this,name:"unchoose",toEl:Jn,newIndex:null,newDraggableIndex:null,originalEvent:t}),Un!==Jn?(Ho>=0&&(to({rootEl:Jn,name:"add",toEl:Jn,fromEl:Un,originalEvent:t}),to({sortable:this,name:"remove",toEl:Jn,originalEvent:t}),to({rootEl:Jn,name:"sort",toEl:Jn,fromEl:Un,originalEvent:t}),to({sortable:this,name:"sort",toEl:Jn,originalEvent:t})),Os&&Os.save()):Ho!==bd&&Ho>=0&&(to({sortable:this,name:"update",toEl:Jn,originalEvent:t}),to({sortable:this,name:"sort",toEl:Jn,originalEvent:t})),Bt.active&&((Ho==null||Ho===-1)&&(Ho=bd,ul=op),to({sortable:this,name:"end",toEl:Jn,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){mo("nulling",this),Un=ft=Jn=Yt=Su=Qn=ny=ll=Eu=Bi=ip=Ho=ul=bd=op=Ed=rp=Os=sy=Bt.dragged=Bt.ghost=Bt.clone=Bt.active=null,ly.forEach(function(t){t.checked=!0}),ly.length=O0=M0=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":ft&&(this._onDragOver(t),wme(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,s=this.el.children,o=0,i=s.length,r=this.options;o<i;o++)n=s[o],_r(n,r.draggable,this.el,!1)&&t.push(n.getAttribute(r.dataIdAttr)||Rme(n));return t},sort:function(t,n){var s={},o=this.el;this.toArray().forEach(function(i,r){var a=o.children[r];_r(a,this.options.draggable,o,!1)&&(s[i]=a)},this),n&&this.captureAnimationState(),t.forEach(function(i){s[i]&&(o.removeChild(s[i]),o.appendChild(s[i]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return _r(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var s=this.options;if(n===void 0)return s[t];var o=sp.modifyOption(this,t,n);typeof o<"u"?s[t]=o:s[t]=n,t==="group"&&GV(s)},destroy:function(){mo("destroy",this);var t=this.el;t[$o]=null,fn(t,"mousedown",this._onTapStart),fn(t,"touchstart",this._onTapStart),fn(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(fn(t,"dragover",this),fn(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),iy.splice(iy.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!ll){if(mo("hideClone",this),Bt.eventCanceled)return;Vt(Qn,"display","none"),this.options.removeCloneOnHide&&Qn.parentNode&&Qn.parentNode.removeChild(Qn),ll=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(ll){if(mo("showClone",this),Bt.eventCanceled)return;ft.parentNode==Un&&!this.options.group.revertClone?Un.insertBefore(Qn,ft):Su?Un.insertBefore(Qn,Su):Un.appendChild(Qn),this.options.group.revertClone&&this.animate(ft,Qn),Vt(Qn,"display",""),ll=!1}}};function wme(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function dy(e,t,n,s,o,i,r,a){var l,u=e[$o],c=u.options.onMove,d;return window.CustomEvent&&!fa&&!ep?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=e,l.dragged=n,l.draggedRect=s,l.related=o||t,l.relatedRect=i||Ss(t),l.willInsertAfter=a,l.originalEvent=r,e.dispatchEvent(l),c&&(d=c.call(u,l,r)),d}function V0(e){e.draggable=!1}function Cme(){L0=!1}function bme(e,t,n){var s=Ss(wd(n.el,0,n.options,!0)),o=10;return t?e.clientX<s.left-o||e.clientY<s.top&&e.clientX<s.right:e.clientY<s.top-o||e.clientY<s.bottom&&e.clientX<s.left}function Sme(e,t,n){var s=Ss(P0(n.el,n.options.draggable)),o=10;return t?e.clientX>s.right+o||e.clientX<=s.right&&e.clientY>s.bottom&&e.clientX>=s.left:e.clientX>s.right&&e.clientY>s.top||e.clientX<=s.right&&e.clientY>s.bottom+o}function Eme(e,t,n,s,o,i,r,a){var l=s?e.clientY:e.clientX,u=s?n.height:n.width,c=s?n.top:n.left,d=s?n.bottom:n.right,h=!1;if(!r){if(a&&ay<u*o){if(!ap&&(rp===1?l>c+u*i/2:l<d-u*i/2)&&(ap=!0),ap)h=!0;else if(rp===1?l<c+ay:l>d-ay)return-rp}else if(l>c+u*(1-o)/2&&l<d-u*(1-o)/2)return _me(t)}return h=h||r,h&&(l<c+u*i/2||l>d-u*i/2)?l>c+u/2?1:-1:0}function _me(e){return di(ft)<di(e)?1:-1}function Rme(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,s=0;n--;)s+=t.charCodeAt(n);return s.toString(36)}function Dme(e){ly.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var s=t[n];s.checked&&ly.push(s)}}function hy(e){return setTimeout(e,0)}function B0(e){return clearTimeout(e)}uy&&wn(document,"touchmove",function(e){(Bt.active||Sd)&&e.cancelable&&e.preventDefault()}),Bt.utils={on:wn,off:fn,css:Vt,find:PV,is:function(t,n){return!!_r(t,n,t,!1)},extend:lme,throttle:OV,closest:_r,toggleClass:Bo,clone:NV,index:di,nextTick:hy,cancelNextTick:B0,detectDirection:HV,getChild:wd},Bt.get=function(e){return e[$o]},Bt.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(s){if(!s.prototype||!s.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(s));s.utils&&(Bt.utils=Er(Er({},Bt.utils),s.utils)),sp.mount(s)})},Bt.create=function(e,t){return new Bt(e,t)},Bt.version=ome;var hs=[],lp,$0,H0=!1,G0,U0,fy,up;function Tme(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(n){var s=n.originalEvent;this.sortable.nativeDraggable?wn(document,"dragover",this._handleAutoScroll):this.options.supportPointer?wn(document,"pointermove",this._handleFallbackAutoScroll):s.touches?wn(document,"touchmove",this._handleFallbackAutoScroll):wn(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var s=n.originalEvent;!this.options.dragOverBubble&&!s.rootEl&&this._handleAutoScroll(s)},drop:function(){this.sortable.nativeDraggable?fn(document,"dragover",this._handleAutoScroll):(fn(document,"pointermove",this._handleFallbackAutoScroll),fn(document,"touchmove",this._handleFallbackAutoScroll),fn(document,"mousemove",this._handleFallbackAutoScroll)),zV(),py(),ume()},nulling:function(){fy=$0=lp=H0=up=G0=U0=null,hs.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,s){var o=this,i=(n.touches?n.touches[0]:n).clientX,r=(n.touches?n.touches[0]:n).clientY,a=document.elementFromPoint(i,r);if(fy=n,s||this.options.forceAutoScrollFallback||ep||fa||tp){W0(n,this.options,a,s);var l=al(a,!0);H0&&(!up||i!==G0||r!==U0)&&(up&&zV(),up=setInterval(function(){var u=al(document.elementFromPoint(i,r),!0);u!==l&&(l=u,py()),W0(n,o.options,u,s)},10),G0=i,U0=r)}else{if(!this.options.bubbleScroll||al(a,!0)===Rr()){py();return}W0(n,this.options,al(a,!1),!1)}}},da(e,{pluginName:"scroll",initializeByDefault:!0})}function py(){hs.forEach(function(e){clearInterval(e.pid)}),hs=[]}function zV(){clearInterval(up)}var W0=OV(function(e,t,n,s){if(t.scroll){var o=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,r=t.scrollSensitivity,a=t.scrollSpeed,l=Rr(),u=!1,c;$0!==n&&($0=n,py(),lp=t.scroll,c=t.scrollFn,lp===!0&&(lp=al(n,!0)));var d=0,h=lp;do{var f=h,p=Ss(f),g=p.top,v=p.bottom,C=p.left,S=p.right,b=p.width,w=p.height,_=void 0,R=void 0,T=f.scrollWidth,I=f.scrollHeight,x=Vt(f),P=f.scrollLeft,D=f.scrollTop;f===l?(_=b<T&&(x.overflowX==="auto"||x.overflowX==="scroll"||x.overflowX==="visible"),R=w<I&&(x.overflowY==="auto"||x.overflowY==="scroll"||x.overflowY==="visible")):(_=b<T&&(x.overflowX==="auto"||x.overflowX==="scroll"),R=w<I&&(x.overflowY==="auto"||x.overflowY==="scroll"));var F=_&&(Math.abs(S-o)<=r&&P+b<T)-(Math.abs(C-o)<=r&&!!P),k=R&&(Math.abs(v-i)<=r&&D+w<I)-(Math.abs(g-i)<=r&&!!D);if(!hs[d])for(var O=0;O<=d;O++)hs[O]||(hs[O]={});(hs[d].vx!=F||hs[d].vy!=k||hs[d].el!==f)&&(hs[d].el=f,hs[d].vx=F,hs[d].vy=k,clearInterval(hs[d].pid),(F!=0||k!=0)&&(u=!0,hs[d].pid=setInterval((function(){s&&this.layer===0&&Bt.active._onTouchMove(fy);var $=hs[this.layer].vy?hs[this.layer].vy*a:0,q=hs[this.layer].vx?hs[this.layer].vx*a:0;typeof c=="function"&&c.call(Bt.dragged.parentNode[$o],q,$,e,fy,hs[this.layer].el)!=="continue"||MV(hs[this.layer].el,q,$)}).bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==l&&(h=al(h,!1)));H0=u}},30),jV=function(t){var n=t.originalEvent,s=t.putSortable,o=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(n){var u=s||i;a();var c=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,d=document.elementFromPoint(c.clientX,c.clientY);l(),u&&!u.el.contains(d)&&(r("spill"),this.onSpill({dragEl:o,putSortable:s}))}};function z0(){}z0.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,s=t.putSortable;this.sortable.captureAnimationState(),s&&s.captureAnimationState();var o=wd(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(n,o):this.sortable.el.appendChild(n),this.sortable.animateAll(),s&&s.animateAll()},drop:jV},da(z0,{pluginName:"revertOnSpill"});function j0(){}j0.prototype={onSpill:function(t){var n=t.dragEl,s=t.putSortable,o=s||this.sortable;o.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),o.animateAll()},drop:jV},da(j0,{pluginName:"removeOnSpill"}),Bt.mount(new Tme),Bt.mount(j0,z0);function Ime(e,t){return Object.values(e).indexOf(t)}function xme(e,t,n,s){if(!e)return[];const o=Object.values(e),i=t.length-s;return[...t].map((a,l)=>l>=i?o.length:o.indexOf(a))}function Fme(e){return["transition-group","TransitionGroup"].includes(e)}function KV(e){if(!e||e.length!==1)return!1;const[{type:t}]=e;return t?Fme(t.name):!1}function Pme(e,t){return t?{...t.props,...t.attrs}:e}const K0=["Start","Add","Remove","Update","End"],q0=["Choose","Unchoose","Sort","Filter","Clone"],Ame=["Move",...K0,...q0].map(e=>"on"+e);let Y0=null;const kme=rt({name:"VueDraggableNext",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},emits:["update:modelValue","move","change",...K0.map(e=>e.toLowerCase()),...q0.map(e=>e.toLowerCase())],setup(e,{emit:t,slots:n,attrs:s}){const o=B(!1),i=B(!1),r=B(0),a=B(0),l=B([]),u=B(null),c=B(null),d=Y(()=>e.list?e.list:e.modelValue),h=Yn();function f(){return e.component?VH(e.component):e.tag}function p(V){if(c.value)for(const ne in V){const ie=_V(ne);Ame.indexOf(ie)===-1&&c.value.option(ie,V[ne])}}function g(){var V;return((V=h==null?void 0:h.proxy)==null?void 0:V.$el.children)||[]}async function v(){var V;await Ct(),l.value=xme(g(),((V=h==null?void 0:h.proxy)==null?void 0:V.$el.children)||[],o.value,a.value)}function C(V){const ne=Ime(g()||[],V);if(ne===-1)return null;const ie=d.value?d.value[ne]:null;return{index:ne,element:ie}}function S(V){Ct(()=>t("change",V))}function b(V){if(e.list){V(e.list);return}const ne=[...e.modelValue||[]];V(ne),t("update:modelValue",ne)}function w(...V){b(ie=>ie.splice(...V))}function _(V,ne){b(pe=>pe.splice(ne,0,pe.splice(V,1)[0]))}function R(V){const ne=l.value,ie=ne.length;return V>ie-1?ie:ne[V]}function T(){var ne,ie;return n.default&&((ie=(ne=n.default()[0])==null?void 0:ne.component)==null?void 0:ie.proxy)||null}function I(V){if(!e.noTransitionOnDrag||!o.value)return;const ne=g();ne[V]&&(ne[V].data=null);const ie=T();ie&&(ie.children=[],ie.kept=void 0)}function x(V){v(),u.value=C(V.item),u.value&&(V.item._underlying_vm_=e.clone(u.value.element),Y0=V.item)}function P(V){const ne=V.item._underlying_vm_;if(ne===void 0)return;F0(V.item);const ie=R(V.newIndex);w(ie,0,ne),v(),S({added:{element:ne,newIndex:ie}})}function D(V){var ie;if(RV((ie=h==null?void 0:h.proxy)==null?void 0:ie.$el,V.item,V.oldIndex),V.pullMode==="clone"){F0(V.clone);return}if(!u.value)return;const ne=u.value.index;w(ne,1),I(ne),S({removed:{element:u.value.element,oldIndex:ne}})}function F(V){var pe,ae;F0(V.item),RV(V.from,V.item,V.oldIndex);const ne=(pe=u.value)==null?void 0:pe.index,ie=R(V.newIndex);_(ne,ie),S({moved:{element:(ae=u.value)==null?void 0:ae.element,oldIndex:ne,newIndex:ie}})}function k(V,ne){Object.prototype.hasOwnProperty.call(V,ne)&&(V[ne]+=r.value)}function O(V){return V.__draggable_component__}function $({to:V,related:ne}){const ie=O(V);if(!ie)return{component:ie};const pe=ie.realList,ae={list:pe,component:ie};if(V!==ne&&pe&&ie.getUnderlyingVm){const re=ie.getUnderlyingVm(ne);if(re)return Object.assign(re,ae)}return ae}function q(V,ne){const ie=[...ne.to.children].filter(W=>W.style.display!=="none");if(ie.length===0)return 0;const pe=ie.indexOf(ne.related),ae=V.component.getVmIndex(pe);return ie.indexOf(Y0)!==-1||!ne.willInsertAfter?ae:ae+1}const J=()=>{var ae,re;const V={};K0.forEach(W=>{V["on"+W]=X(W)}),q0.forEach(W=>{V["on"+W]=ee.bind(null,W)});const ne=Object.keys(s).reduce((W,fe)=>(W[_V(fe)]=s[fe],W),{}),ie=Object.assign({},ne,V,{onMove:(W,fe)=>ve(W,fe)});"draggable"in ie||(ie.draggable=">*");const pe=((ae=h==null?void 0:h.proxy)==null?void 0:ae.$el.nodeType)===1?h.proxy.$el:((re=h==null?void 0:h.proxy)==null?void 0:re.$el.parentElement)||null;pe&&(c.value=new Bt(pe,ie),pe.__draggable_component__=h==null?void 0:h.proxy,v())};function ee(V,ne){Ct(()=>t(V.toLowerCase(),ne))}function X(V){return ne=>{if(d.value!==null){const ie="onDrag"+V,pe=N[ie];pe&&pe(ne)}ee(V,ne)}}function ve(V,ne){const ie=e.move;if(!ie||!d.value)return!0;const pe=$(V),ae=u.value,re=q(pe,V);ae&&Object.assign(ae,{futureIndex:re});const W=Object.assign({},V,{relatedContext:pe,draggedContext:ae});return ie(W,ne)}function te(){v(),Y0=null}const N={onDragStart:x,onDragAdd:P,onDragRemove:D,onDragUpdate:F,onDragMove:ve,onDragEnd:te};return tn(()=>{J()}),e.list!==null&&e.modelValue!==null&&Jge.error("list props are mutually exclusive! Please set one."),{getTag:f,realList:d,visibleIndexes:l,noneFunctionalComponentMode:i,headerOffset:r,footerOffset:a,transitionMode:o,computeIndexes:v,updateOptions:p,getChildrenNodes:g,getUnderlyingVm:C,emitChanges:S,alterList:b,spliceList:w,updatePosition:_,getVmIndex:R,getComponent:T,resetTransitionData:I,onDragStart:x,onDragAdd:P,onDragRemove:D,onDragUpdate:F,updateProperty:k,onDragMove:ve,onDragEnd:te,mounted:J,context:u,sortableInstance:c,getRelatedContextFromMoveEvent:$,getTargetedComponent:O,computeFutureIndex:q}},render(){const e=this.getTag(),t=Pme(this.$attrs,this.componentData);if(typeof e=="string"){const s=this.$slots.default&&typeof this.$slots.default=="function"?this.$slots.default():null;return s?(this.transitionMode=KV(s),Zu(e,t,s)):Zu(e,t,[])}const n=this.$slots.default?{default:this.$slots.default}:{};if(this.$slots.default){const s=typeof this.$slots.default=="function"?this.$slots.default():null;this.transitionMode=KV(s||[])}return Zu(e,t,n)}}),Ome=_t(rt({__name:"DragDropList",props:{modelValue:{},groupName:{},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["changed","update:modelValue"],setup(e,{emit:t}){const n=B([]),s=e,o=t,i=B({}),r=()=>{n.value=s.modelValue.map(u=>({id:u.field,name:u.headerName,...u}))||[],s.modelValue.forEach(u=>{i.value[u.field]={...u}})};nt(()=>s.modelValue,u=>{r()},{immediate:!0,deep:!0}),nt(n,u=>{if(u.length===s.modelValue.length&&!u.every((d,h)=>d.id===s.modelValue[h].field)){const d=u.map(h=>i.value[h.id]);o("changed",d),o("update:modelValue",d)}});const a=()=>!(s.readOnly||s.disabled),l=u=>!(s.readOnly||s.disabled);return(u,c)=>(j(),qe(U(kme),{modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=d=>n.value=d),tag:"transition-group",disabled:s.disabled||s.readOnly,onMove:l,onStart:a,"item-key":"id","component-data":{tag:"div",type:"transition",name:"fade"},animation:300,easing:"cubic-bezier(0.4, 0, 0.2, 1)","ghost-class":"ghost","chosen-class":"chosen","drag-class":"drag"},{default:me(()=>[(j(!0),ce(xt,null,xn(n.value,(d,h)=>(j(),ce("div",{key:d.id,class:"fade-item"},[Tt(u.$slots,"item",{item:d,index:h},()=>[tt(wt(d.name),1)],!0)]))),128))]),_:3},8,["modelValue","disabled"]))}}),[["__scopeId","data-v-2106e8ed"]]),Mme={key:0},Nme={key:1,style:{"font-style":"italic"}},Lme={key:2,style:{"font-style":"italic"}},Vme={key:3},gy=_t(rt({__name:"DragDropItem",props:{item:{},isDisableNewCheck:{type:Boolean,default:!1},disableDrag:{type:Boolean,default:!1},disableCheckbox:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},columnStates:{},disableDragTooltip:{default:""},focusIndex:{}},emits:["toggle-column"],setup(e,{emit:t}){const n=Xt,s=e,o=B(s.columnStates[String(s.item.field)]||!1),i=t,r=h=>{o.value=h},a=Y(()=>{var h;return(h=s.item)==null?void 0:h.context}),l=Y(()=>{var f,p,g;return(f=a.value)!=null&&f.formula?"formular":((g=(p=a.value)==null?void 0:p.metric_type)==null?void 0:g.code)||"number"}),u=Y(()=>{var h,f;return(f=(h=s.item)==null?void 0:h.field)==null?void 0:f.includes("metric")}),c=Y(()=>{var h;return u.value&&((h=a.value)==null?void 0:h.is_primary)==1}),d=Y(()=>{var h;return u.value&&((h=a.value)==null?void 0:h.is_point_metric)==1});return nt(()=>o.value,()=>{i("toggle-column",s.item.field,s.item.required)}),(h,f)=>(j(),ce("div",{key:e.item.field,class:Q([h.$style["column-config__item"],{[h.$style.disabled]:s.readOnly,[h.$style["is-metric"]]:u.value,[h.$style["is-point-metric"]]:d.value,[h.$style["is-woohoo-metric"]]:c.value}])},[ge(cV,{focusIndex:s.focusIndex,id:`col-${e.item.field}`,"model-value":o.value==!0?U(Ht).CHECKED:U(Ht).UNCHECK,"onUpdate:modelValue":r,disabled:s.disableCheckbox||e.isDisableNewCheck&&!o.value,size:"16px"},null,8,["focusIndex","id","model-value","disabled"]),Ke((j(),ce("div",{class:"move-handler",style:dn({cursor:s.disableDrag?"not-allowed":"move"})},[ge(lt,{color:s.disableDrag?"#D7D7D7":"#6B6B6B",source:"remote",src:"GripVertical",class:Q(h.$style.handler)},null,8,["color","class"])],4)),[[U(n),s.disableDrag==!0?s.disableDragTooltip:""]]),u.value?(j(),ce("div",{key:0,class:Q(h.$style["metric-type"])},[l.value=="rating"?(j(),ce("span",Mme,"★")):l.value=="formular"?(j(),ce("span",Nme," ƒx ")):l.value=="number"?(j(),ce("span",Lme," # ")):(j(),ce("span",Vme,wt(l.value),1))],2)):Je("",!0),Ee("span",{class:Q(h.$style["column-config__item-label"])},[Ke((j(),ce("div",null,[tt(wt(e.item.headerName),1)])),[[U(n),{content:e.item.headerName}]])],2),d.value?Ke((j(),ce("div",{key:1,class:Q(h.$style["metric-icon"])},[ge(lt,{src:"Bullseye",color:"#A6A6A6"})],2)),[[U(n),"Point metric"]]):Je("",!0),c.value?Ke((j(),ce("div",{key:2,class:Q(h.$style["metric-icon"])},[ge(lt,{src:"ChartPie",color:"#A6A6A6"})],2)),[[U(n),"Woohoo metric"]]):Je("",!0)],2))}}),[["__cssModules",{$style:{"column-config__item":"_column-config__item_7scp0_1","is-metric":"_is-metric_7scp0_8","is-woohoo-metric":"_is-woohoo-metric_7scp0_12","is-point-metric":"_is-point-metric_7scp0_15","column-config__item-label":"_column-config__item-label_7scp0_18",disabled:"_disabled_7scp0_34",readOnly:"_readOnly_7scp0_38","column-config__item--pinned":"_column-config__item--pinned_7scp0_41",handler:"_handler_7scp0_48",badge:"_badge_7scp0_52","metric-type":"_metric-type_7scp0_78","metric-icon":"_metric-icon_7scp0_106"}}]]),Bme=_t(rt({__name:"DropdownWrapper",props:{placement:{default:"bottom-start"},show:{type:Boolean,default:!1},maxWidth:{default:400}},emits:["open","close"],setup(e,{expose:t,emit:n}){const s=e,o=n,{hide:i,triggerRef:r,popupRef:a,isVisible:l,toggle:u}=Fs({toggleOnClick:!0,placement:s.placement,trigger:"click",interactive:!0,arrow:!1,offset:[0,4],showOnInit:s.show,maxWidth:s.maxWidth}),c=Y(()=>l.value);nt(l,f=>{o(f?"open":"close")});const d=()=>{i()};t({closeDropdown:d,isOpen:c});const h=f=>{f.key==="Escape"&&a.value&&i()};return tn(()=>{var p;const f=r.value instanceof HTMLElement?r.value:(p=r.value)==null?void 0:p.$el;f&&f.addEventListener("keydown",h)}),vs(()=>{var p;const f=r.value instanceof HTMLElement?r.value:(p=r.value)==null?void 0:p.$el;f&&f.removeEventListener("keydown",h)}),(f,p)=>(j(),ce("div",{ref_key:"triggerRef",ref:r,class:Q(f.$style["dropdown-wrapper"])},[Tt(f.$slots,"trigger",{open:U(l),toggle:U(u),closeDropdown:d},()=>[Ee("button",{class:Q(f.$style["editable-dropdown__trigger"]),"aria-label":"Select or type"}," ▼ ",2)]),Ee("div",{ref_key:"popupRef",ref:a,tabindex:"0",class:Q(f.$style["dropdown-content"]),style:dn({display:U(l)?"block":"none",maxWidth:s.maxWidth?s.maxWidth+"px":"unset"})},[Tt(f.$slots,"content",{closeDropdown:d,visible:U(l)},()=>[Ee("div",{class:Q(f.$style["dropdown-list"])},null,2)])],6)],2))}}),[["__cssModules",{$style:{"dropdown-wrapper":"_dropdown-wrapper_lghkw_1","dropdown-content":"_dropdown-content_lghkw_5","dropdown-list":"_dropdown-list_lghkw_11"}}]]),$me={class:"reach-limit-icon"},Hme=_t(rt({__name:"TableCustomization",props:{modelValue:{},readOnly:{type:Boolean},disabled:{type:Boolean},checkboxColumn:{},gridApi:{},tableHeight:{}},emits:["update:modelValue","input","change"],setup(e,{expose:t,emit:n}){const s=Xt,o=e,i=n,r=B(""),a=B(),l=Y(()=>r.value.trim().length>0),u=B([]),c=B({}),{triggerRef:d,popupRef:h,isVisible:f,hide:p}=Fs({toggleOnClick:!0,placement:"bottom-end",trigger:"click",offset:[0,0]});nt(f,k=>{var O;k&&((O=a.value)==null||O.focus())});const g=Y(()=>o.disabled||r.value.length>0),v=Y(()=>u.value.filter(k=>k.pinned==="left"&&k.field&&k.headerName)),C=Y(()=>u.value.filter(k=>k.pinned==="right"&&k.field||k.field==="blank")),S=Y({get:()=>u.value.filter(k=>!k.pinned&&k.field&&k.field!=="blank"),set:k=>{u.value=[...v.value,...k,...C.value]}}),b=Y(()=>{if(!r.value)return{};const k=r.value.toLowerCase();return[...u.value,...S.value].reduce((O,$)=>{var q;return(q=$.headerName)!=null&&q.toLowerCase().includes(k)&&$.field&&(O[$.field]=!0),O},{})}),w=Y(()=>o.modelValue),_=()=>{const k={};u.value.forEach(O=>{O.field&&(k[O.field]=!O.hide)}),c.value=k},R=Y(()=>{if(!r.value)return u.value;const k=r.value.toLowerCase();return u.value.filter(O=>{var $;return($=O.headerName)==null?void 0:$.toLowerCase().includes(k)})}),T=()=>{var $;const k=($=o.gridApi)==null?void 0:$.getColumnState().reduce((q,J)=>(q[J.colId]=Number(J.width),q),{}),O=u.value.map(q=>({...q,hide:q.field?!c.value[q.field]:!1,width:q.field?k==null?void 0:k[q.field]:q.width}));i("update:modelValue",O),i("change",O),i("input",O)},I=k=>{const O=[...v.value,...k,...C.value];o.checkboxColumn&&O.unshift(o.checkboxColumn),u.value=O,T()},x=k=>{k&&(c.value[k]=!c.value[k],T())};nt(w,k=>{k&&k.length>0&&(u.value=[...k],_())},{immediate:!0}),t({updateColumnDefs(k){u.value=[...k],_()}});const P=Y(()=>F.value>=5),D=Y(()=>o.disabled||r.value.length>0),F=Y(()=>u.value.reduce((k,O)=>O.field&&O.field.includes("metric")&&c.value[O.field]===!0?k+1:k,0));return(k,O)=>{const $=Eo("focusable");return j(),ce("div",{class:Q(k.$style["table-customization"])},[Ee("div",{ref_key:"triggerRef",ref:d},[Tt(k.$slots,"trigger",{},()=>[Ke((j(),qe(mt,{variant:["secondary"],disabled:o.disabled,actived:U(f),style:{width:"32px"},onEscape:U(p)},{prefix:me(()=>[ge(lt,{src:"TableColumns"})]),_:1},8,["disabled","actived","onEscape"])),[[$,"7"],[U(s),"Columns"]])])],512),Ee("div",{ref_key:"popupRef",ref:h,class:Q(k.$style["tippy-content-wrapper"])},[Ee("div",{class:Q([k.$style["column-config"],P.value?k.$style["has-warning"]:""]),style:dn({"--max-height":o.tableHeight?o.tableHeight:"max(500px, 60vh)"})},[ge(iS,{tabIndex:"7.0",modelValue:r.value,"onUpdate:modelValue":O[0]||(O[0]=q=>r.value=q),ref_key:"searchBoxRef",ref:a},null,8,["modelValue"]),Ee("div",{class:Q(k.$style["column-config__header"])},[...O[2]||(O[2]=[Ee("span",null,"Manage columns",-1)])],2),P.value?(j(),ce("div",{key:0,class:Q(k.$style["reach-limit"])},[Ee("div",$me,[ge(lt,{src:"InfoCircle",color:"#F7941D",size:14})]),Ee("div",{class:Q(k.$style["warning-limit-text"])},[...O[3]||(O[3]=[tt(" You’ve reached the maximum number of metric columns. ",-1),Ee("br",null,null,-1),tt(" Deselect one to show another. ",-1)])],2)],2)):Je("",!0),l.value?(j(),ce(xt,{key:1},[R.value.length===0&&l.value?(j(),ce("div",{key:0,class:Q(k.$style["no-columns"])},[...O[4]||(O[4]=[tt(" No results. ",-1),Ee("br",null,null,-1),tt(" Try another search. ",-1)])],2)):Je("",!0),l.value&&R.value.length>0?(j(),ce("div",{key:1,class:Q(k.$style["column-config__pinned-section"])},[(j(!0),ce(xt,null,xn(R.value,q=>{var J;return j(),qe(gy,{key:q.colId,item:q,columnStates:c.value,disableDrag:D.value,disableDragTooltip:"Reordering is disabled while search is active.",readOnly:o.readOnly,isDisableNewCheck:P.value&&((J=q.colId)==null?void 0:J.includes("metric")),onToggleColumn:x},null,8,["item","columnStates","disableDrag","readOnly","isDisableNewCheck"])}),128))],2)):Je("",!0)],64)):Je("",!0),l.value?Je("",!0):(j(),ce("div",{key:2,class:Q(k.$style["column-config__list"])},[(j(!0),ce(xt,null,xn(v.value,q=>Ke((j(),qe(gy,{key:q.field,item:q,disabled:!0,readOnly:!0,disableDrag:!0,disableDragTooltip:" ","disable-checkbox":!0,columnStates:c.value},null,8,["item","columnStates"])),[[Do,b.value[q.field]||!r.value]])),128)),ge(Ome,{modelValue:S.value,"onUpdate:modelValue":O[1]||(O[1]=q=>S.value=q),"group-name":"columns",onChanged:I,disabled:g.value,readOnly:o.readOnly},{item:me(({item:q,index:J})=>[Ke((j(),qe(gy,{focusIndex:`7.${J+1}`,key:q.id,item:q,columnStates:c.value,disableDrag:D.value,disableDragTooltip:D.value?"Reordering is disabled while search is active.":void 0,readOnly:o.readOnly,isDisableNewCheck:P.value&&q.id.includes("metric"),onToggleColumn:x},null,8,["focusIndex","item","columnStates","disableDrag","disableDragTooltip","readOnly","isDisableNewCheck"])),[[Do,b.value[q.field]||!r.value]])]),_:1},8,["modelValue","disabled","readOnly"]),(j(!0),ce(xt,null,xn(C.value.filter(q=>{var J;return q.headerName&&((J=q.headerName)==null?void 0:J.length)>0}),q=>Ke((j(),qe(gy,{key:q.field,item:q,disabled:o.disabled,readOnly:o.readOnly,columnStates:c.value},null,8,["item","disabled","readOnly","columnStates"])),[[Do,b.value[q.field]||!r.value]])),128))],2))],6)],2)],2)}}}),[["__cssModules",{$style:{"reach-limit":"_reach-limit_1m3bt_1","reach-limit-icon":"_reach-limit-icon_1m3bt_11","warning-limit-text":"_warning-limit-text_1m3bt_18","table-customization":"_table-customization_1m3bt_24","table-customization__trigger":"_table-customization__trigger_1m3bt_30","column-config":"_column-config_1m3bt_46","has-warning":"_has-warning_1m3bt_61","column-config__header":"_column-config__header_1m3bt_64","icon-color":"_icon-color_1m3bt_73","column-config__list":"_column-config__list_1m3bt_76","column-config__section-label":"_column-config__section-label_1m3bt_80","column-config__footer":"_column-config__footer_1m3bt_89","column-config__add-button":"_column-config__add-button_1m3bt_92","cs-icon":"_cs-icon_1m3bt_110","no-columns":"_no-columns_1m3bt_114"}}]]),Gme=["aria-label"],Ume=["aria-disabled","onClick"],Wme=_t(rt({__name:"MonthSelection",props:{monthLabels:{default:()=>["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},ariaLabel:{default:"Select month"},selectedYear:{default:null},selectedMonth:{default:null},displayYear:{default:null},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},isMonthSelectable:{type:Function,default:()=>!0}},emits:["select","keydown"],setup(e,{emit:t}){const n=e,s=t,o=a=>{n.disabled||n.readOnly||!n.isMonthSelectable(a)||s("select",a)},i=new Date().getFullYear(),r=new Date().getMonth()+1;return(a,l)=>(j(),ce("div",{class:Q([a.$style["month-grid"],n.compact?a.$style.compact:""]),"aria-label":n.ariaLabel,"data-index":"month-selection"},[Ee("div",{class:Q(a.$style.months)},[(j(!0),ce(xt,null,xn(n.monthLabels,(u,c)=>(j(),ce("a",{key:u,tabindex:"0",class:Q([a.$style["month-cell"],{[a.$style.selected]:c+1===n.selectedMonth&&n.selectedYear===n.displayYear,[a.$style.current]:c+1===r&&U(i)===n.displayYear,[a.$style.disabled]:n.disabled||n.readOnly||!n.isMonthSelectable(c+1)}]),"aria-disabled":n.disabled||n.readOnly||!n.isMonthSelectable(c+1),onClick:d=>o(c+1),onKeydown:l[0]||(l[0]=d=>s("keydown",d))},wt(u),43,Ume))),128))],2)],10,Gme))}}),[["__cssModules",{$style:{"month-grid":"_month-grid_a776x_1",months:"_months_a776x_8","month-cell":"_month-cell_a776x_22",selected:"_selected_a776x_36",compact:"_compact_a776x_40",current:"_current_a776x_53",disabled:"_disabled_a776x_61"}}]]),zme=["data-year","aria-disabled","onClick"],jme=_t(rt({__name:"YearSelection",props:{years:{},selectedYear:{default:null},disabled:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},scrollable:{type:Boolean,default:!1},isYearSelectable:{type:Function,default:()=>!0}},emits:["select","keydown"],setup(e,{expose:t,emit:n}){const s=e,o=n,i=B(null),r=new Date().getFullYear(),a=l=>{s.disabled||!s.isYearSelectable(l)||o("select",l)};return t({rootEl:i}),tn(()=>{if(i.value){const l=i.value.querySelector(`[data-year="${s.selectedYear}"]`);l&&l.scrollIntoView({block:"center"})}}),(l,u)=>(j(),ce("div",{ref_key:"rootEl",ref:i,class:Q([l.$style["year-grid-body"],s.scrollable?l.$style.scrollable:"",s.compact?l.$style.compact:""]),role:"grid","data-index":"year-selection"},[(j(!0),ce(xt,null,xn(s.years,c=>(j(),ce("a",{key:c,"data-year":c,tabindex:"0",class:Q([l.$style["year-cell"],{[l.$style.selected]:c===s.selectedYear,[l.$style.current]:c===U(r),[l.$style.disabled]:s.disabled||!s.isYearSelectable(c)}]),"aria-disabled":s.disabled||!s.isYearSelectable(c),onClick:d=>a(c),onKeydown:u[0]||(u[0]=d=>o("keydown",d))},wt(c),43,zme))),128))],2))}}),[["__cssModules",{$style:{"year-grid-body":"_year-grid-body_1us7k_1",scrollable:"_scrollable_1us7k_11","year-cell":"_year-cell_1us7k_16",selected:"_selected_1us7k_28",current:"_current_1us7k_31",compact:"_compact_1us7k_35",disabled:"_disabled_1us7k_47"}}]]),Kme={class:"navigation"},qme={class:"picker"},Yme={key:0,class:"footer"},Zme=_t(rt({__name:"MonthPickerLayout",props:{disableConfirm:{type:Boolean,default:!1}},setup(e){return(t,n)=>(j(),ce("div",{class:Q(["month-picker-layout",{"disable-confirm":e.disableConfirm}])},[Ee("div",Kme,[Tt(t.$slots,"navigation",{},void 0,!0)]),Ee("div",qme,[Tt(t.$slots,"picker",{},void 0,!0)]),ge(XD,{name:"fade",mode:"out-in"},{default:me(()=>[e.disableConfirm?Je("",!0):(j(),ce("div",Yme,[Tt(t.$slots,"footer",{},void 0,!0)]))]),_:3})],2))}}),[["__scopeId","data-v-885d09b2"]]),Xme={style:{flex:"1"}},Jme=_t(rt({__name:"CalendarFooter",props:{disabled:{type:Boolean},readOnly:{type:Boolean},cancelLabel:{default:"Cancel"},confirmLabel:{default:"Save"},disableConfirm:{type:Boolean,default:!1}},emits:["cancel","confirm","goto-date"],setup(e,{emit:t}){const n=e,s=t,o=()=>{s("cancel")},i=()=>{s("confirm")},r=(l=new Date)=>{s("goto-date")},a=l=>{if(l.key==="Enter"||l.key===" "){l.preventDefault(),l.stopPropagation();const u=l.target;u.dataset.index==="today-btn"?r():u.dataset.index==="cancel-btn"?o():u.dataset.index==="save-btn"&&i()}};return(l,u)=>{const c=Eo("tooltip");return n.readOnly?Je("",!0):(j(),ce("div",{key:0,class:Q(l.$style["arbo-calendar-actions"])},[Ee("div",Xme,[Ke((j(),qe(U(mt),{variant:"secondary",size:"medium",onClick:u[0]||(u[0]=d=>r()),onKeydown:a,"data-index":"today-btn"},{prefix:me(()=>[ge(U(lt),{src:"CalendarDay"})]),_:1})),[[c,"Today"]])]),ge(U(mt),{disabled:n.disabled,readOnly:n.readOnly,onKeydown:a,variant:"secondary",size:"medium",onClick:o,"data-index":"cancel-btn"},{default:me(()=>[tt(wt(n.cancelLabel),1)]),_:1},8,["disabled","readOnly"]),ge(U(mt),{disabled:n.disabled||n.disableConfirm,readOnly:n.readOnly,variant:"primary",size:"medium","data-index":"save-btn",onKeydown:a,onClick:i},{default:me(()=>[tt(wt(n.confirmLabel),1)]),_:1},8,["disabled","readOnly"])],2))}}}),[["__cssModules",{$style:{"arbo-calendar-actions":"_arbo-calendar-actions_132g0_1"}}]]),Qme=_t(rt({__name:"CalendarNavigation",props:{disabled:{type:Boolean},readOnly:{type:Boolean},cancelLabel:{default:"Cancel"},confirmLabel:{default:"Save"},disableConfirm:{type:Boolean,default:!1},minDate:{},maxDate:{},monthLabels:{},monthLabelStyle:{},locale:{},month:{},year:{},hideMonth:{type:Boolean,default:!1},mode:{}},emits:["cancel","confirm","goto-date","prev","next","toggle-months","toggle-years"],setup(e,{emit:t}){const n=e,s=So({month:new Date().getMonth()+1,year:new Date().getFullYear()}),o=Y(()=>{if(n.minDate){const h=s.month===1?12:s.month-1,f=s.month===1?s.year-1:s.year;return new Date(f,h-1,1)<new Date(n.minDate.getFullYear(),n.minDate.getMonth(),1)}return!1}),i=Y(()=>{if(n.maxDate){const h=s.month===12?1:s.month+1,f=s.month===12?s.year+1:s.year;return new Date(f,h-1,1)>new Date(n.maxDate.getFullYear(),n.maxDate.getMonth(),1)}return!1}),r=t,a=()=>{o.value||(n.mode==="month"?s.month=s.month===0?11:s.month-1:n.mode==="year"&&(s.year-=1)),r("prev",{month:s.month,year:s.year})},l=()=>{i.value||(n.mode==="month"?s.month=s.month===11?0:s.month+1:n.mode==="year"&&(s.year+=1)),r("next",{month:s.month,year:s.year})},u=()=>{r("toggle-months")},c=()=>{r("toggle-years")},d=Y(()=>{if(n.monthLabels&&n.monthLabels.length===12)return n.monthLabels;const h=n.locale||"en-US",f=n.monthLabelStyle||"short",p=new Intl.DateTimeFormat(h,{month:f,timeZone:"UTC"});return Array.from({length:12},(v,C)=>p.format(new Date(Date.UTC(2020,C,1))))});return(h,f)=>(j(),ce("div",{class:Q(h.$style["cal-nav-bar"])},[e.mode!="year"?(j(),qe(U(mt),{key:0,variant:"tertiary",class:Q([h.$style["cal-nav-btn"],h.$style.prev]),"aria-label":"Previous",disabled:o.value,label:"",onClick:a,"data-index":"prev-btn",onKeydownCapture:zn(Pt(a,["prevent","stop"]),["enter"])},{default:me(({hovered:p})=>[ge(U(lt),{src:"AnglesRight",source:"remote",color:p?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled","onKeydownCapture"])):Je("",!0),Ee("div",{class:Q([h.$style["cal-nav-center"],e.hideMonth?h.$style.single:""])},[e.hideMonth?Je("",!0):(j(),qe(U(mt),{key:0,"data-index":"month-btn",variant:"secondary",onClick:u},{default:me(()=>[tt(wt(d.value[n.month-1]),1)]),_:1})),ge(U(mt),{variant:"secondary",onClick:c,"data-index":"year-btn"},{default:me(()=>[tt(wt(n.year),1)]),_:1})],2),e.mode!="year"?(j(),qe(U(mt),{key:1,"data-index":"next-btn",variant:"tertiary",class:Q([h.$style["cal-nav-btn"],h.$style.next]),"aria-label":"Next",disabled:i.value,label:"",onClick:l,onKeydownCapture:zn(Pt(l,["prevent","stop"]),["enter"])},{default:me(({hovered:p})=>[ge(U(lt),{src:"AnglesRight",source:"remote",color:p?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled","onKeydownCapture"])):Je("",!0)],2))}}),[["__cssModules",{$style:{"cal-nav-wrapper":"_cal-nav-wrapper_beyjg_1","cal-nav-bar":"_cal-nav-bar_beyjg_12","cal-nav-btn":"_cal-nav-btn_beyjg_19",prev:"_prev_beyjg_32","year-grid-header":"_year-grid-header_beyjg_36","cal-nav-center":"_cal-nav-center_beyjg_45",single:"_single_beyjg_52","cal-nav-label":"_cal-nav-label_beyjg_56","year-grid":"_year-grid_beyjg_36",months:"_months_beyjg_78","month-cell":"_month-cell_beyjg_85","year-cell":"_year-cell_beyjg_86","pg-btn":"_pg-btn_beyjg_108","year-grid-body":"_year-grid-body_beyjg_121",selected:"_selected_beyjg_125","days-slot":"_days-slot_beyjg_131","range-label":"_range-label_beyjg_135"}}]]),eve=["aria-label"];new Date().getUTCFullYear()-12,new Date().getUTCFullYear()+12;const tve={class:"wrapper-suffix"},nve=_t(rt({__name:"StatusSelect",props:{modelValue:{},getStatusFunc:{type:Function},workspaceId:{},id:{}},emits:["updated","error","cancel","update:modelValue"],setup(e,{expose:t,emit:n}){const s=Xt,o={PER_PAGE:20,INITIAL_PAGE:1},i=e,r=B(i.modelValue),a=n,l=Y(()=>f.value.find(D=>D.id===r.value)||null),u=D=>{r.value=D.id,a("update:modelValue",D.id)},c=Y(()=>{if(!r.value)return{backgroundColor:"#A6A6A6",border:"1px solid #A6A6A6"};const D=f.value.find(k=>k.id===r.value),F=String((D==null?void 0:D.color)||"white");return{backgroundColor:F,border:Lg(F,"white")?"1px solid #ccc":"1px solid #fff"}}),d=B(null),h=()=>{var D;(D=d.value)==null||D.focus()},f=B([]),p=B(!1),g=B(!1),v=B(null),C=B(o.INITIAL_PAGE),S=B(!0),b=B(0),w=B(""),_=Y(()=>!!(i.id&&i.workspaceId)),R=D=>{const F=f.value.find(k=>k.id===D.value);F&&u(F)},T=D=>({label:D.name,value:D.id,selected:r.value===D.id,hover:!1,type:"status",disabled:!1,clickable:!0,danger:!1,data:D,id:D.id,color:D.color}),I=async(D=o.INITIAL_PAGE,F="",k=!1)=>{var O;if(!_.value){console.error("Missing required props",i);return}k?g.value=!0:p.value=!0,v.value=null;try{const $={workspaceId:String(i.workspaceId),itemIds:i.id,page:D,perPage:o.PER_PAGE,name_like:F.trim()};if(i.getStatusFunc===void 0)throw new Error("API service getAssignableStatus is undefined");const q=await i.getStatusFunc($);if(!q){k||(f.value=[]),S.value=!1;return}const J=q.data.map(T);f.value=k?[...f.value,...J]:J,b.value=((O=q.meta)==null?void 0:O.total)??q.data.length,S.value=f.value.length<b.value,C.value=D}catch($){console.error("Error fetching statuses:",$),v.value="Failed to load statuses",k||(f.value=[]),S.value=!1,a("error",v.value)}finally{p.value=!1,g.value=!1}},x=async()=>{!S.value||g.value||await I(C.value+1,w.value,!0)};nt([()=>i.id,()=>i.workspaceId],()=>{I()},{deep:!0,immediate:!0});const P=async D=>{w.value=D,C.value=o.INITIAL_PAGE,await I(o.INITIAL_PAGE,D,!1)};return t({focus:h,clear:()=>{r.value=null,a("update:modelValue",null)}}),(D,F)=>(j(),qe(Bme,{onOpen:h,placement:"bottom-start","max-width":500},{trigger:me(({open:k})=>[ge(Cs,{actived:k,class:Q(D.$style["status-wrapper"])},{suffix:me(()=>[Ee("div",tve,[ge(lt,{src:"ChevronUp",source:"remote",class:Q([[D.$style["dropdown-icon"]],{[D.$style["dropdown-icon-show"]]:!k}])},null,8,["class"])])]),default:me(()=>{var O;return[Ee("div",{class:Q(D.$style.status)},[Ee("div",{class:Q(D.$style["color-indicator"]),style:dn(c.value)},null,6),Ke((j(),ce("span",{style:{"max-width":"400px"},class:Q({[D.$style.empty]:!l.value})},[tt(wt(l.value?l.value.label:"Select status"),1)],2)),[[U(s),{content:((O=l.value)==null?void 0:O.label)||void 0}]])],2)]}),_:2},1032,["actived","class"])]),content:me(({closeDropdown:k})=>{var O;return[ge(Jr,{ref_key:"popupRef",ref:d,"selected-id":(O=l.value)==null?void 0:O.id,options:f.value,loading:p.value,"loading-more":g.value,"has-more":S.value,error:v.value,onSearch:P,onSelect:$=>{R($),k()},onLoadMore:x,onCancel:F[0]||(F[0]=$=>a("cancel")),style:{width:"500px"}},null,8,["selected-id","options","loading","loading-more","has-more","error","onSelect"])]}),_:1}))}}),[["__cssModules",{$style:{"status-wrapper":"_status-wrapper_1hlgx_1",status:"_status_1hlgx_1","color-indicator":"_color-indicator_1hlgx_12",empty:"_empty_1hlgx_21","dropdown-icon":"_dropdown-icon_1hlgx_25","dropdown-icon-show":"_dropdown-icon-show_1hlgx_30",options:"_options_1hlgx_34"}}]]),qV=e=>({updateCellData:({rowId:n,field:s,value:o})=>{if(!e)return;const i=e.getRowNode(n);i&&i.setDataValue(s,o),e.refreshCells({rowNodes:i?[i]:[],columns:[s],force:!0})}}),sve={key:2},ove=_t(rt({name:"MetricEditorWrapper",__name:"MetricEditorWrapper",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},error:{type:Boolean}},emits:["update:value","clear","copy"],setup(e,{emit:t}){var S;const n=e,s=B(n.value),o=B(!0),i=B(""),r=()=>{var P,D,F;const b=(P=c.value)==null?void 0:P.restricted_type.trim(),w=((F=(D=c.value)==null?void 0:D.restricted_value)==null?void 0:F.split(",").map(Number))||[],[_,R]=w,I={range:`Enter a value between ${_} and ${R}`,not:`These values are not allowed: ${w.join(", ")}`,exact:"Value is not allowed"}[b];return o.value?"":I},a=b=>{if(c.value){if(b===null||b===""){o.value=!0;return}if(u.value!=="number"){o.value=!0;return}o.value=dm(c.value,Number(b)),i.value=r()}};Y(()=>o.value?{content:"",showOnCreate:!1}:{content:i.value,bypassOverflowCheck:!0,showOnCreate:!0,theme:"error",alwaysShow:!0});const l=B(null),u=Y(()=>OF(c.value)),c=Y(()=>{var w,_;return((_=(w=n.params)==null?void 0:w.colDef)==null?void 0:_.context)||null}),{apiServices:d}=ts(!0,n),{updateCellData:h}=qV((S=n.params)==null?void 0:S.api),f=B(!1),p=Si(n,"id"),g=()=>{var b;(b=n.params)==null||b.api.stopEditing()},v=()=>{g()},C=async b=>{var _,R;if(g(),f.value=!0,s.value=b||null,b===n.value){f.value=!1;return}const w={itemIds:[String(p.value)],metricId:((_=c.value)==null?void 0:_.id)||"",workspaceId:String(n.workspaceId)};b==null?w.clear=1:w.value=b,h({rowId:String(p.value),field:`metric_${w.metricId}`,value:void 0});try{const T=await((R=d.value)==null?void 0:R.bulkUpdateMetric(w));(T==null?void 0:T.message)=="Done"?h({rowId:String(p.value),field:`metric_${w.metricId}`,value:b||null}):(h({rowId:String(p.value),field:`metric_${w.metricId}`,value:n.value}),console.error("Failed to update metric value:",T),s.value=n.value)}catch(T){console.error("Error during bulk metric update:",T),h({rowId:String(p.value),field:`metric_${w.metricId}`,value:n.value})}finally{f.value=!1}};return(b,w)=>(j(),ce("div",{class:"metric-editor-wrapper",ref_key:"metricEditorWrapperRef",ref:l},[u.value=="dropdown"&&c.value?(j(),qe(KA,{key:0,config:c.value,modelValue:s.value,"onUpdate:modelValue":w[0]||(w[0]=_=>s.value=_),onChange:C,onHandleCancel:v},null,8,["config","modelValue"])):u.value=="number"&&c.value?(j(),qe(qA,{key:1,showInlineError:!1,autoEmit:!0,config:c.value,modelValue:s.value,"onUpdate:modelValue":w[1]||(w[1]=_=>s.value=_),style:{width:"100%"},onHandleChange:C,onCancel:v,onOnValidation:a},null,8,["config","modelValue"])):(j(),ce("div",sve,"Metric type:"+wt(u.value),1))],512))}}),[["__scopeId","data-v-519d44e5"]]),ive=_t(rt({name:"EmptyData",__name:"EmptyData",props:{isSearching:{type:Boolean},isFiltering:{type:Boolean}},setup(e){const t=e,n={noData:"No data available.",noSearchResults:"No results. Try another search.",noFilterResults:"No results. Try another filter.",emptySearchFilter:"No results. Try another search or filter."},s=Y(()=>t.isSearching||t.isFiltering?"NoDataSearchFilter":"ClickToCreate"),o=Y(()=>t.isSearching&&!t.isFiltering?n.noSearchResults:t.isFiltering&&!t.isSearching?n.noFilterResults:t.isSearching&&t.isFiltering?n.emptySearchFilter:n.noData),i=B(!1);return tn(()=>{i.value=!0}),(r,a)=>(j(),ce("div",{class:Q(r.$style["no-data-item-table"])},[Ee("div",{class:Q(r.$style.visual)},[i.value?(j(),qe(Pm,{key:0,source:"remote",src:s.value,ratio:"4/3",maxWidth:500,maxHeight:350},null,8,["src"])):Je("",!0)],2),Ee("div",{class:Q(r.$style.description)},wt(o.value),3)],2))}}),[["__cssModules",{$style:{"no-data-item-table":"_no-data-item-table_oh0wi_1",visual:"_visual_oh0wi_12",description:"_description_oh0wi_19"}}]]),YV=Ql("sortStore",()=>{const e=B({}),t={id:"id",name:"name",isStated:"actual_start_date",isCompleted:"actual_due_date",lastUpdated:"updated_at",completedOn:"actual_due_date",status:"template_flow_status",assignees:"assignee"},n={start_asc:{column:"start_date",direction:"asc"},start_desc:{column:"start_date",direction:"desc"},due_asc:{column:"due_date",direction:"asc"},due_desc:{column:"due_date",direction:"desc"}},s=Y(()=>{const a=e.value;return Object.values(a).filter(u=>u.sort!=="none"&&!!u.sort).map(u=>{let c;switch(u.colId){case"dateRange":c=n[u.sort];break;default:if(u.colId.includes("metric")){const[d,h]=u.colId.split("_");c={column:d,direction:u.sort,type:h}}else c={column:t[u.colId]||u.colId,direction:u.sort};break}return c})}),o=(a,l)=>{e.value={[a]:{colId:a,sort:l}}},i=()=>{e.value={}},r=B(!1);return{sortingAPIConfiguration:s,sorts:e,setSort:o,clearSorting:i,isSortingRunning:r}}),Ru=rt({name:"HeaderSorting",__name:"HeaderWrapper",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean}},setup(e){const t=e,n=YV(),{sorts:s}=Qs(n),o=Y(()=>{var l,u;return((u=(l=t.params)==null?void 0:l.column)==null?void 0:u.getColId())||"template_col_id"}),i=l=>{o.value&&n.setSort(o.value,l)},r=Y(()=>t.params.headerType||void 0),a=B("none");return nt(()=>s.value,Ti(()=>{if(o.value){const l=s.value[o.value];a.value=l?l.sort:"none"}},rr),{deep:!0,immediate:!0}),(l,u)=>o.value?(j(),qe(vge,nn({key:0},t,{"header-type":r.value,modelValue:a.value,"onUpdate:modelValue":u[0]||(u[0]=c=>a.value=c),onSortChanged:i}),null,16,["header-type","modelValue"])):Je("",!0)}});function rve(){const e=So({isCreating:!1,name:"",error:void 0,assignees:null,status:null,start_date:null,due_date:null}),t=()=>{const o=e.name.trim();e.status,o.length===0?e.error="Name cannot be empty":o.length>25?e.error="Name cannot exceed 25 characters":e.error=void 0},n=()=>{e.isCreating=!0,e.name="",e.error=void 0,e.assignees=null,e.status=null,e.start_date=null,e.due_date=null},s=()=>{e.isCreating=!1};return nt(()=>e,()=>{t()},{deep:!0}),{newItemData:e,validateNewItem:t,openNewItemForm:n,closeNewItemForm:s,resetNewItemForm:()=>{e.name="",e.assignees=null,e.start_date=null,e.due_date=null,e.error=void 0}}}const my=Ql("userStore",()=>{const e=B(null),t=B(null);return{user:e,setUser:o=>{e.value=o},setUserRoleId:o=>{t.value=o},workspaceUserRoleId:t}}),ave=["innerHTML"],lve=20,uve=_t(rt({__name:"AddNewAssignee",props:{maxVisible:{default:3}},emits:["updated","cancel","start-update","tab","close","show","hide"],setup(e,{expose:t,emit:n}){const s=e,{triggerRef:o,popupRef:i,isVisible:r,show:a,hide:l}=Fs({toggleOnClick:!0,appendTo:"parent",offset:[-15,8]}),u=()=>{a()},c=B(null),d=()=>{P.value=[],ie.value=!1},h=Y(()=>r.value),f=Y(()=>{var W;return{disabled:!1,error:!1,readOnly:!1,isEmpty:((W=P.value)==null?void 0:W.length)===0,wrapperRef:o,active:h,bordered:!0}}),{argsMain:p}=ws(f),g=Xt,v=n,C=Y(()=>{var W;return Math.max(0,(((W=P.value)==null?void 0:W.length)||0)-s.maxVisible)}),S=Y(()=>{var W;return C.value<=0?"":((W=P.value)==null?void 0:W.slice(s.maxVisible).map(fe=>fe.name).join(", "))||""}),b=B(!1),w=B(!1),_=B(null),R=B(1),T=B(!0),I=B(0),x=B(""),P=B([]),D=Y(()=>{var W;return((W=P.value)==null?void 0:W.map(fe=>fe.id))||[]}),{assigneeList:F,mergedOptions:k}=mm({...s,value:[]}),{apiServices:O}=ts(!1,s),$=En("entityId"),q=async(W=1,fe="",oe=!1)=>{var G,Z,de,ke,Pe;if(!O.value)throw console.error("API service or item identifiers are undefined"),new Error("API service or item identifiers are undefined");if(oe?w.value=!0:b.value=!0,_.value=null,!((G=O.value)!=null&&G.getAssignableAssignees))throw new Error("API service getAssignableAssignees is undefined");const Ie=_n.getInstance().getItem("ws.code");try{const Le=await((Z=O.value)==null?void 0:Z.getAssignableAssignees(String(Ie),{entity_ids:($==null?void 0:$.value)||"",page:W,per_page:lve,display_name_like:fe})),ye=((de=Ec(Le.data))==null?void 0:de.map(gm))??[];F.value=oe?uc(F.value,ye,"id"):ye,I.value=Le.meta.total,T.value=(((ke=Le==null?void 0:Le.meta)==null?void 0:ke.current_page)||0)<(((Pe=Le==null?void 0:Le.meta)==null?void 0:Pe.last_page)||0),R.value=W}catch(Le){console.error("Error fetching assignable users:",Le),_.value="Failed to load assignable users"}finally{b.value=!1,w.value=!1}},J=W=>{var fe,oe,Ie;if((fe=P.value)!=null&&fe.some(G=>G.id===W.data.id)){P.value=(oe=P.value)==null?void 0:oe.filter(G=>G.id!==W.data.id);return}P.value=[...P.value||[],W.data],(Ie=c.value)==null||Ie.focus()},ee=()=>{P.value=[]},X=()=>{!w.value&&T.value&&q(R.value+1,x.value,!0)},ve=Ti(async W=>{x.value=W,await q(1,W,!1)},rr);nt(()=>r.value,W=>{var fe;W?(q(1,x.value,!1),(fe=c.value)==null||fe.focus(),v("show")):v("hide")});const te=Y(()=>{var W;return((W=P.value)==null?void 0:W.slice(0,3))||[]}),N=Y(()=>te.value.map(W=>({id:W.id,name:W.name,initial:W.initial,avatarId:W.id,profile_image:W.profile_image,color:W.color,size:24,user:W}))),V=my(),{user:ne}=Qs(V),ie=B(!1);t({getData:()=>P.value,clear:d,setData:W=>{P.value=W},focus:()=>{a(),Ct(()=>{var W;(W=c.value)==null||W.focus()})},hide:()=>{l()}}),nt([P,ie],()=>{v("updated",P.value)},{deep:!0});const pe=W=>{var fe;P.value=(fe=P.value)==null?void 0:fe.filter(oe=>oe.id!==W)},ae=W=>{var oe;const fe=_n.getInstance().getItem("ws.code");return((oe=O.value)==null?void 0:oe.getUserInformation(fe,W))||Promise.resolve(null)},re=B();return(W,fe)=>(j(),ce("div",{class:"new-assignee-wrapper",ref_key:"wrapperRef",ref:re},[ge(Cs,nn(U(p),{style:{"--icon-size":"18px"}}),{prefix:me(()=>[N.value.length==0?(j(),ce("div",{key:0,class:Q([W.$style["icon-wrapper"],"wrapper-prefix"]),onClick:Pt(u,["stop","prevent"])},[ge(lt,{src:"UserPlus",color:"#A6A6A6"})],2)):Je("",!0)]),default:me(()=>[Ee("div",{class:Q([W.$style["assignee-row"],W.$style["assignee-selector"]]),ref_key:"triggerRef",ref:o},[Ee("div",{style:{flex:1},class:Q([W.$style["assignee-row"]])},[(j(!0),ce(xt,null,xn(N.value,oe=>(j(),qe(Zf,{onClear:Ie=>pe(oe.id),key:oe.user.id,"disable-remove":!1},{default:me(()=>[ge(Oc,{user:oe.user,apiUpdateFunction:ae,appendTo:re.value},null,8,["user","appendTo"])]),_:2},1032,["onClear"]))),128)),C.value>0?Ke((j(),ce("div",{key:0,class:Q(W.$style["extra-avatars"])},[tt(" +"+wt(C.value),1)],2)),[[U(g),S.value]]):Je("",!0)],2)],2)]),_:1},16),Ee("div",{ref_key:"popupRef",ref:i},[ge(Jr,nn({"selected-id":D.value},{...s},{options:U(k),loading:b.value,"loading-more":w.value,"has-more":T.value,ref_key:"searchListRef",ref:c,onTab:fe[0]||(fe[0]=oe=>v("tab",oe)),onSelect:fe[1]||(fe[1]=oe=>{J(oe),v("start-update")}),onSearch:U(ve),onClose:fe[2]||(fe[2]=()=>v("close")),onLoadMore:X}),{"extra-item":me(()=>[ge(rS,{onClick:ee,label:"Unassign",borderLeft:!0},{icon:me(()=>[ge(lt,{src:"UserXMark",source:"remote"})]),_:1})]),item:me(({item:oe,selectedIndex:Ie,isSelected:G,handleSelect:Z,handleItemHover:de,getHighlightedLabel:ke,query:Pe,idx:Le})=>[ge(eu,nn(oe,{hover:Le===Ie,selected:G(oe),type:oe.type,onClick:Pt(ye=>Z(oe,ye),["stop","prevent"]),onMouseover:ye=>de(Le),class:W.$style["item-assignee"]}),{prefix:me(()=>[ge(Oc,{user:oe.data,apiUpdateFunction:ae,appendTo:U(i)},null,8,["user","appendTo"])]),label:me(({})=>[Pe?Ke((j(),ce("span",{key:0,class:Q([W.$style["item-label"],W.$style.match]),style:{flex:"1"},innerHTML:ke(oe.label)},null,10,ave)),[[U(g),{content:oe.label}]]):Ke((j(),ce("span",{key:1,class:Q(W.$style["item-label"]),style:{flex:"1"}},[tt(wt(oe.label),1)],2)),[[U(g),{content:oe.label}]])]),_:2},1040,["hover","selected","type","onClick","onMouseover","class"])]),_:1},16,["selected-id","options","loading","loading-more","has-more","onSearch"])],512)],512))}}),[["__cssModules",{$style:{action:"_action_1xvno_1","item-assignee":"_item-assignee_1xvno_6","item-action":"_item-action_1xvno_6","item-label":"_item-label_1xvno_16","icon-wrapper":"_icon-wrapper_1xvno_25","error-message":"_error-message_1xvno_34","empty-state":"_empty-state_1xvno_44","assignee-row":"_assignee-row_1xvno_57","assignee-selector":"_assignee-selector_1xvno_65",seperator:"_seperator_1xvno_69","extra-avatars":"_extra-avatars_1xvno_77",list:"_list_1xvno_89"}}]]),cve={key:0},dve={key:1},hve={key:0},fve={key:1},pve={key:0,class:"wrapper-suffix"},gve={key:0,class:"wrapper-prefix",style:{display:"flex",justifyContent:"center",alignItems:"center",width:"24px",height:"24px"}},mve=_t(rt({__name:"AddNewDate",emits:["updated","tab","show","hide"],setup(e,{expose:t,emit:n}){const s=Xt,{triggerRef:o,popupRef:i,isVisible:r,hide:a,show:l}=Fs({toggleOnClick:!0,appendTo:"parent",offset:[0,0]}),u=()=>{c.value=[null,null]},c=B([null,null]),d=w=>{const _=cm();return w?bt.fromJSDate(w,{zone:_}).toFormat("MMM dd"):""},h=Y(()=>r.value),f=Y(()=>({disabled:!1,error:!1,readOnly:!1,isEmpty:c.value[0]===null&&c.value[1]===null,wrapperRef:o,active:h,bordered:!0})),{argsMain:p}=ws(f),g=B(!1),v=w=>{S("tab",w)},C=w=>{"start"in w&&w.start!==void 0&&(c.value[0]=w.start),"end"in w&&w.end!==void 0&&(c.value[1]=w.end)};t({getData:()=>c.value,clear:u,setData:w=>{c.value=w},focus:()=>{l(),Ct(()=>{var w;(w=b.value)==null||w.focus()})},hide:()=>{a()}});const S=n;nt(()=>c.value,w=>{S("updated",w)},{deep:!0});const b=B(null);return nt(()=>r.value,w=>{w?(Ct(()=>{var _;(_=b.value)==null||_.focus()}),S("show")):S("hide")}),(w,_)=>(j(),ce(xt,null,[ge(Cs,nn({ref_key:"triggerRef",ref:o},U(p),{style:{"--icon-size":"18px",cursor:"pointer"}}),{default:me(({focused:R})=>[Ee("div",{class:Q(w.$style["date-time"])},[Ee("div",{class:Q(w.$style.date)},[c.value[0]==null&&(R||U(r))?(j(),ce("span",cve,"MMMDD")):(j(),ce("span",dve,wt(d(c.value[0])),1))],2),c.value[0]!==null||c.value[1]!==null||R||U(r)?(j(),ce("div",{key:0,class:Q(w.$style.separator)}," → ",2)):Je("",!0),Ee("div",{class:Q(w.$style.date)},[c.value[1]==null&&(R||U(r))?(j(),ce("span",hve,"MMMDD")):(j(),ce("span",fve,wt(d(c.value[1])),1))],2)],2)]),suffix:me(({hovered:R,focused:T})=>[(c.value[0]!==null||c.value[1]!==null)&&(R||T||U(r))?(j(),ce("div",pve,[Ke((j(),qe(mt,{onClick:Pt(u,["stop","prevent"]),variant:["icon","primary"],rounded:!0,size:18},{default:me(()=>[ge(lt,{src:"XMarkSolid",size:"8"})]),_:1})),[[U(s),"Clear"]])])):Je("",!0)]),prefix:me(()=>[c.value[0]===null&&c.value[1]===null?(j(),ce("div",gve,[ge(lt,{src:"Calendar",color:"#A6A6A6"})])):Je("",!0)]),_:1},16),Ee("div",{ref_key:"popupRef",ref:i},[U(r)?(j(),qe(Am,{key:0,immediatelyUpdate:!1,value:c.value,onConfirmed:C,ref_key:"calendarRef",ref:b,onClosed:U(a),onStartUpdate:_[0]||(_[0]=R=>g.value=!0),onFinishUpdate:_[1]||(_[1]=R=>g.value=!1),onTab:v},null,8,["value","onClosed"])):Je("",!0)],512)],64))}}),[["__cssModules",{$style:{"list-item":"_list-item_n9o5g_2","date-time":"_date-time_n9o5g_5",date:"_date_n9o5g_5",separator:"_separator_n9o5g_18"}}]]),vve=_t(rt({__name:"AddNewStatus",props:{entityId:{}},emits:["updated","error","cancel","update:modelValue","tab","close","show","hide"],setup(e,{expose:t,emit:n}){const s=e,o={PER_PAGE:20,INITIAL_PAGE:1},{triggerRef:i,popupRef:r,isVisible:a,show:l,hide:u}=Fs({toggleOnClick:!0,appendTo:"parent"}),c=B(null),d=B([]),h=B(!1),f=B(!1),p=B(null),g=B(o.INITIAL_PAGE),v=B(!0),C=B(0),S=B(""),b=n,w=Y(()=>a.value),_=Y(()=>({disabled:!1,error:!1,readOnly:!1,isEmpty:!c.value,wrapperRef:i,active:w,bordered:!0})),R=B(null),{argsMain:T}=ws(_),I=Y(()=>c.value?d.value.filter(te=>te.id===c.value):[]),x=Y(()=>!c.value||I.value.length===0?"":I.value[0].label),P=Y(()=>c.value?[c.value]:[]),D=Y(()=>{if(!c.value)return{backgroundColor:"#A6A6A6",border:"1px solid #A6A6A6",minWidth:"14px"};const te=I.value[0],N=String((te==null?void 0:te.color)||"white");return{backgroundColor:N,border:Lg(N,"white")?"1px solid #ccc":"1px solid #fff",minWidth:"14px"}}),F=te=>({label:te.name,value:te.id,selected:c.value===te.id,hover:!1,type:"status",disabled:!1,clickable:!0,danger:!1,data:te,id:te.id,color:te.color}),{apiServices:k}=ts(!1,s),O=async(te=o.INITIAL_PAGE,N="",V=!1)=>{var ne,ie;V?f.value=!0:h.value=!0,p.value=null;try{const pe=_n.getInstance().getItem("ws.code"),ae=await((ne=k.value)==null?void 0:ne.getAssignableStatuses(pe,{entity_id:s.entityId||"",name_like:N,page:te,per_page:o.PER_PAGE}));if(!ae){V||(d.value=[]),v.value=!1;return}const re=ae.data.map(F);d.value=V?[...d.value,...re]:re,C.value=((ie=ae.meta)==null?void 0:ie.total)??ae.data.length,v.value=d.value.length<C.value,g.value=te}catch(pe){console.error("Error fetching statuses:",pe),p.value="Failed to load statuses",V||(d.value=[]),v.value=!1,b("error",p.value)}finally{h.value=!1,f.value=!1}},$=(te,N)=>{var ne;N.stopImmediatePropagation(),N.preventDefault(),N.stopPropagation();const V=te.id;c.value=V,(ne=R.value)==null||ne.focus(),b("update:modelValue",c.value),u()},q=async()=>{!v.value||f.value||await O(g.value+1,S.value,!0)},J=async te=>{S.value=te,g.value=o.INITIAL_PAGE,await O(o.INITIAL_PAGE,te,!1)},ee=()=>{c.value=null,b("update:modelValue",null)},X=()=>{l(),Ct(()=>{var te;(te=R.value)==null||te.focus()})};return nt(()=>a.value,te=>{var N;te?(O(1,S.value,!1),(N=R.value)==null||N.focus(),b("show")):b("hide")}),nt(()=>c.value,te=>{b("updated",te)}),t({focus:X,clear:ee,getData:()=>c.value,setData:te=>{c.value=te},hide:u,autoFillDefault:async()=>{S.value="",await O(1,S.value,!1),d.value.length>0&&(c.value=d.value[0].id,b("update:modelValue",c.value))}}),(te,N)=>{const V=Eo("tooltip");return j(),ce(xt,null,[ge(Cs,nn({ref_key:"triggerRef",ref:i},U(T),{style:{"--icon-size":"18px"}}),{default:me(()=>[Ee("div",{class:Q(te.$style.status)},[Ee("div",{class:Q(te.$style["color-indicator"]),style:dn(D.value)},null,6),Ke((j(),ce("span",{class:Q({[te.$style.empty]:I.value.length===0,[te.$style["status-text"]]:!0})},[tt(wt(x.value),1)],2)),[[V,{content:x.value}]])],2)]),_:1},16),Ee("div",{ref_key:"popupRef",ref:r},[ge(Jr,{style:{width:"200px"},ref_key:"searchListRef",ref:R,"selected-id":P.value,options:d.value,loading:h.value,"loading-more":f.value,"has-more":v.value,error:p.value,onSearch:J,onSelect:$,onLoadMore:q,onCancel:N[0]||(N[0]=ne=>b("cancel")),onTab:N[1]||(N[1]=ne=>b("tab",ne)),onClose:N[2]||(N[2]=()=>b("close"))},null,8,["selected-id","options","loading","loading-more","has-more","error"])],512)],64)}}}),[["__cssModules",{$style:{"list-item":"_list-item_1gv28_2",status:"_status_1gv28_6","color-indicator":"_color-indicator_1gv28_12","count-badge":"_count-badge_1gv28_25","status-text":"_status-text_1gv28_32",empty:"_empty_1gv28_41"}}],["__scopeId","data-v-6fccb209"]]),yve=_t(rt({__name:"CreateNewScene",emits:["create-new-item","focus-on-id","search-for-code"],setup(e,{expose:t,emit:n}){const s=["name","assignees","status","date","cancel","create-keep","create"],o=Xt,i=xH("target"),r=En("workspaceId"),a=En("entityId"),l=n,u=e,{newItemData:c,validateNewItem:d,resetNewItemForm:h,closeNewItemForm:f}=rve(),{apiServices:p}=ts(!1,u),{openSceneHub:g}=tf(),v=B(!1),C=B(!1),S=B(null),b=B({assignees:!1,status:!1,date:!1}),w={name:B(null),assignees:B(null),status:B(null),date:B(null),cancel:B(null),"create-keep":B(null),create:B(null)},_=w.name,R=w.assignees,T=w.status,I=w.date,x=w.cancel,P=w["create-keep"],D=w.create,F=B(new Map),k=Y(()=>!!c.error||!c.name.trim()||C.value),O=(ye,M)=>{ye&&F.value.set(M,ye.$el||ye)},$=(ye,M)=>{if(ye==="date"){const[H,le]=Array.isArray(M)?M:[void 0,void 0];c.start_date=H,c.due_date=le}else c[ye]=M},q=()=>{c.isCreating=!0,S.value="name"},J=()=>{c.isCreating=!1,h()},ee=En("switchInstance"),{addNotification:X}=Qf(),ve=ye=>{l("focus-on-id",ye)},te=(ye,M,H)=>{const le=xK(void 0,"created");X({id:String(ye),message:`<div style="display:flex; flex-direction: column; align-items: flex-start;"><b>${le}</b>
|
|
216
216
|
<span>${M} </span></div>`,actions:[{label:"Find in table",variant:"secondary",btnIcon:"MagnifyingGlass",action:()=>{l("search-for-code",{code:H,name:M}),ve(String(ye))}},{label:"Full view",btnIcon:"CustomSceneHub",variant:"primary",action:Ge=>{if(Ge.ctrlKey||Ge.metaKey){const we=Ao({type:"scene_hub",config:{ws_code:r,baseDomain:_n.getInstance().getItem("BASE_URL")||"",scene_id:String(ye)}}).url;window.open(we,"_blank");return}else ee("scene_hub",{id:String(ye)},{showLoading:!1})}}],type:"interactive"})},N=ye=>{ye&&Ct(()=>{var H;const M=(H=w[ye])==null?void 0:H.value;M&&(typeof M.focus=="function"?M.focus():M.$el&&typeof M.$el.focus=="function"&&M.$el.focus())})},V=ye=>{var M;(M=i.value)==null||M.focus()},ne=ye=>{const M=H=>{var le;return(le=H==null?void 0:H.hide)==null?void 0:le.call(H)};ye!=="assignees"&&M(R.value),ye!=="status"&&M(T.value),ye!=="date"&&M(I.value)},ie=(ye,M)=>{M instanceof KeyboardEvent&&M.key!=="Tab"&&M.preventDefault();const H=S.value?s.indexOf(S.value):-1;if(H===-1){N("name");return}let Ge=(H+(ye==="next"?1:-1)+s.length)%s.length,we=s[Ge];(we==="create"||we==="create-keep")&&k.value&&(Ge=0,we=s[0]),ne(we),N(we)},pe=ye=>{b.value[ye]=!0,S.value=ye},ae=ye=>{b.value[ye]=!1,V()},re=ye=>{b.value[ye]||(S.value=null)},W=ye=>{ye.target===i.value&&N("name")},fe=ye=>{var M,H,le;if(ye.key==="Enter"){if(!S.value)return;switch(ye.preventDefault(),ye.stopPropagation(),S.value){case"create":k.value||de("clear");break;case"create-keep":k.value||de("keep");break;case"cancel":f();break;case"assignees":(M=R.value)==null||M.focus();break;case"status":(H=T.value)==null||H.focus();break;case"date":(le=I.value)==null||le.focus();break}return}if(ye.key==="Tab"){ye.preventDefault(),ye.stopImmediatePropagation(),ye.stopPropagation(),S.value!=="name"&&oe(ye);return}if(ye.key==="Escape"){S.value=null,J();return}},oe=ye=>{ye.preventDefault(),ye.stopImmediatePropagation(),ye.stopPropagation();const M=ye.shiftKey?"prev":"next";ie(M,ye)},Ie=()=>{var ye;return(ye=R.value)==null?void 0:ye.focus()},G=()=>{var ye;return(ye=T.value)==null?void 0:ye.focus()},Z=()=>{var ye;return(ye=I.value)==null?void 0:ye.focus()},de=async(ye="clear")=>{Ct(async()=>{var H,le,Ge,we,ze,Ue,Se,Ve,pt,At,Ut;if(k.value||v.value||C.value)return;C.value=!0,v.value=!0;const M={name:c.name,template_flow_status_id:c.status??void 0,ws_user_role_ids:(H=c.assignees)==null?void 0:H.map(Jt=>Jt.id),start_date:c.start_date?pm(c.start_date):void 0,due_date:c.due_date?pm(c.due_date):void 0};if(!((le=p.value)!=null&&le.addNewItem)){console.warn("API service unavailable"),v.value=!1;return}try{const Jt=await p.value.addNewItem(r,a,M),zt=c.name;if(te(Jt.id,Jt.name,Jt.code),!Jt.id)throw new Error("Invalid response from server: missing scene ID");switch(C.value=!1,v.value=!1,ye){case"close":h(),(Ge=R.value)==null||Ge.setData([]),(we=T.value)==null||we.setData(null),(ze=I.value)==null||ze.setData([null,null]),f(),J();break;case"close-open":h(),(Ue=R.value)==null||Ue.setData([]),(Se=T.value)==null||Se.setData(null),(Ve=I.value)==null||Ve.setData([null,null]),f(),J(),g(Jt.id);break;case"clear":l("create-new-item",zt),h(),(pt=R.value)==null||pt.setData([]),(At=T.value)==null||At.setData(null),(Ut=I.value)==null||Ut.setData([null,null]),N("name");break;case"keep":l("create-new-item",zt),c.name="",c.error="",N("name");break}}catch(Jt){console.error("Error creating scene:",Jt),ye=="close"&&(f(),J())}finally{v.value=!1,C.value=!1}})},ke=(ye,M)=>{k.value||(M.metaKey||M.ctrlKey?de("close-open"):M.shiftKey?de("keep"):de("clear"))},Pe=(ye=!1)=>{c.isCreating&&(!k.value&&!c.error?de(ye?"close":"clear"):J())},Le=()=>{f(),c.name="",Ct(()=>{var ye;(ye=_.value)==null||ye.setValue(c.name)})};return sS(i,ye=>{const M=ye.target.closest(".notification-center"),H=ye.target.closest("#people-insight-container");if(M||H)return!1;Pe(!0)}),nt(()=>c.isCreating,ye=>{ye&&N("name")}),t({show:q,hide:J}),(ye,M)=>Ke((j(),ce("div",{class:Q(ye.$style.newRow),ref_key:"target",ref:i,onKeydown:fe,onClick:W,tabindex:"-1"},[Ee("div",{ref:H=>O(H,"name"),class:Q({[ye.$style["field-wrapper"]]:!0,[ye.$style.active]:S.value==="name"})},[ge(oS,{ref_key:"nameInputRef",ref:_,disabled:v.value||C.value,modelValue:U(c).name,"onUpdate:modelValue":M[0]||(M[0]=H=>U(c).name=H),onChange:U(d),onEnter:ke,onCancel:Le,onTab:M[1]||(M[1]=(H,le)=>oe(le)),onFocus:M[2]||(M[2]=H=>S.value="name"),placeholder:"Enter name",focused:!0,"max-length":255,type:"text","auto-emit":!0,style:{"--bg-input":"transparent","--border-color":"#f3f5f7"},bordered:!0,class:"border-f3f5f7"},null,8,["disabled","modelValue","onChange"])],2),Ee("div",{ref:H=>O(H,"assignees"),onEnter:Pt(Ie,["prevent","stop"]),class:Q({[ye.$style["field-wrapper"]]:!0,[ye.$style.active]:S.value==="assignees"})},[ge(uve,{ref_key:"assigneeRef",ref:R,onUpdated:M[3]||(M[3]=H=>$("assignees",H)),onTab:M[4]||(M[4]=H=>oe(H)),onEnter:Ie,onFocus:M[5]||(M[5]=H=>S.value="assignees"),onBlur:M[6]||(M[6]=H=>re("assignees")),onShow:M[7]||(M[7]=H=>pe("assignees")),onHide:M[8]||(M[8]=H=>ae("assignees"))},null,512)],34),Ee("div",{ref:H=>O(H,"status"),class:Q({[ye.$style["field-wrapper"]]:!0,[ye.$style.active]:S.value==="status"})},[ge(vve,{ref_key:"statusRef",ref:T,"entity-id":U(a),onUpdated:M[9]||(M[9]=H=>$("status",H)),onTab:M[10]||(M[10]=H=>oe(H)),onEnter:G,onFocus:M[11]||(M[11]=H=>S.value="status"),onBlur:M[12]||(M[12]=H=>re("status")),onShow:M[13]||(M[13]=H=>pe("status")),onHide:M[14]||(M[14]=H=>ae("status"))},null,8,["entity-id"])],2),Ee("div",{ref:H=>O(H,"date"),class:Q({[ye.$style["field-wrapper"]]:!0,[ye.$style.active]:S.value==="date"})},[ge(mve,{ref_key:"dateRef",ref:I,onUpdated:M[15]||(M[15]=H=>$("date",H)),onTab:M[16]||(M[16]=H=>oe(H)),onEnter:Z,onFocus:M[17]||(M[17]=H=>S.value="date"),onBlur:M[18]||(M[18]=H=>re("date")),onShow:M[19]||(M[19]=H=>pe("date")),onHide:M[20]||(M[20]=H=>ae("date"))},null,512)],2),Ee("div",{class:Q(ye.$style["field-actions"])},[Ee("div",{ref:H=>O(H,"cancel"),class:Q({[ye.$style["field-wrapper"]]:!0,[ye.$style.active]:S.value==="cancel",[ye.$style["field-button"]]:!0})},[ge(mt,{ref_key:"cancelRef",ref:x,variant:["secondary"],onClick:U(f),onKeydown:[zn(U(f),["enter"]),M[22]||(M[22]=zn(H=>oe(H),["tab"]))],onFocus:M[21]||(M[21]=H=>S.value="cancel"),tabindex:"0"},{default:me(()=>[...M[31]||(M[31]=[tt(" Cancel ",-1)])]),_:1},8,["onClick","onKeydown"])],2),Ke((j(),ce("div",{ref:H=>O(H,"create-keep"),class:Q({[ye.$style["field-wrapper"]]:!0,[ye.$style["field-button"]]:!0,[ye.$style.active]:S.value==="create-keep"})},[ge(mt,{ref_key:"createKeepRef",ref:P,onClick:M[23]||(M[23]=()=>de("keep")),onKeydown:[M[24]||(M[24]=zn(H=>!k.value&&de("keep"),["enter"])),M[26]||(M[26]=zn(H=>oe(H),["tab"]))],onFocus:M[25]||(M[25]=H=>S.value="create-keep"),disabled:k.value,variant:["primary"],loading:v.value,tabindex:"0",style:dn([{padding:"4px 8px",width:"100%"},{"letter-spacing":"-0.5px"}])},{default:me(()=>[...M[32]||(M[32]=[tt(" Create & Keep ",-1)])]),_:1},8,["disabled","loading"])],2)),[[U(o),k.value?"Enter a name and select a status to continue.":"Create and keep field values (⇧↵ Shift+Enter)"]]),Ke((j(),ce("div",{ref:H=>O(H,"create"),class:Q({[ye.$style["field-wrapper"]]:!0,[ye.$style.active]:S.value==="create",[ye.$style["field-button"]]:!0})},[ge(mt,{ref_key:"createRef",ref:D,onClick:M[27]||(M[27]=()=>de("clear")),onKeydown:[M[28]||(M[28]=zn(H=>!k.value&&de("clear"),["enter"])),M[30]||(M[30]=zn(H=>oe(H),["tab"]))],onFocus:M[29]||(M[29]=H=>S.value="create"),disabled:k.value,variant:["primary"],loading:v.value,tabindex:"0"},{default:me(()=>[...M[33]||(M[33]=[tt(" Create ",-1)])]),_:1},8,["disabled","loading"])],2)),[[U(o),k.value?"Enter a name and select a status to continue.":"Create and clear the fields (↵ Enter)"]])],2)],34)),[[Do,U(c).isCreating]])}}),[["__cssModules",{$style:{newRow:"_newRow_mf32t_1","field-actions":"_field-actions_mf32t_14","field-wrapper":"_field-wrapper_mf32t_43",active:"_active_mf32t_49","field-button":"_field-button_mf32t_52","warning-text":"_warning-text_mf32t_55","has-error":"_has-error_mf32t_60"}}]]),wve=["innerHTML"],Cve=["accept"],ZV=_t(rt({__name:"FileUploader",props:{modelValue:{},acceptTypes:{default:()=>["xlsx","xls","csv"]}},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){const s=B(null),o=x=>`<svg xmlns="http://www.w3.org/2000/svg" width="49" height="49" viewBox="0 0 49 49" fill="none">
|
|
217
217
|
<g clip-path="url(#clip0)">
|
|
218
218
|
<path d="M9.86719 3.56641C9.86719 2.05448 11.1053 0.816406 12.6172 0.816406H33.5136L45.3672 12.67V45.5664C45.3672 47.0783 44.1291 48.3164 42.6172 48.3164H12.6172C11.1053 48.3164 9.86719 47.0783 9.86719 45.5664V3.56641Z" stroke="#232323" stroke-width="0.5"/>
|
|
@@ -249,5 +249,5 @@ ${u}`:l)}else throw r},onCacheKey:r=>zve(t,n,r)}}function Twe(e){if(vt(e))return
|
|
|
249
249
|
* Released under the MIT License.
|
|
250
250
|
*/const Lwe="9.14.5";function Vwe(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(pa().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(pa().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(pa().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(pa().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(pa().__INTLIFY_PROD_DEVTOOLS__=!1)}const oB=so.__EXTEND_POINT__,ma=yy(oB),Wn={FALLBACK_TO_ROOT:oB,NOT_SUPPORTED_PRESERVE:ma(),NOT_SUPPORTED_FORMATTER:ma(),NOT_SUPPORTED_PRESERVE_DIRECTIVE:ma(),NOT_SUPPORTED_GET_CHOICE_INDEX:ma(),COMPONENT_NAME_LEGACY_COMPATIBLE:ma(),NOT_FOUND_PARENT_SCOPE:ma(),IGNORE_OBJ_FLATTEN:ma(),NOTICE_DROP_ALLOW_COMPOSITION:ma(),NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG:ma()},Bwe={[Wn.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Wn.NOT_SUPPORTED_PRESERVE]:"Not supported 'preserve'.",[Wn.NOT_SUPPORTED_FORMATTER]:"Not supported 'formatter'.",[Wn.NOT_SUPPORTED_PRESERVE_DIRECTIVE]:"Not supported 'preserveDirectiveContent'.",[Wn.NOT_SUPPORTED_GET_CHOICE_INDEX]:"Not supported 'getChoiceIndex'.",[Wn.COMPONENT_NAME_LEGACY_COMPATIBLE]:"Component name legacy compatible: '{name}' -> 'i18n'",[Wn.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Wn.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Wn.NOTICE_DROP_ALLOW_COMPOSITION]:"'allowComposition' option will be dropped in the next major version. For more information, please see 👉 https://tinyurl.com/2p97mcze",[Wn.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG]:"'translateExistCompatible' option will be dropped in the next major version."};function vo(e,...t){return Z0(Bwe[e],...t)}const iB=Ts.__EXTEND_POINT__,yo=yy(iB),cn={UNEXPECTED_RETURN_TYPE:iB,INVALID_ARGUMENT:yo(),MUST_BE_CALL_SETUP_TOP:yo(),NOT_INSTALLED:yo(),NOT_AVAILABLE_IN_LEGACY_MODE:yo(),REQUIRED_VALUE:yo(),INVALID_VALUE:yo(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:yo(),NOT_INSTALLED_WITH_PROVIDE:yo(),UNEXPECTED_ERROR:yo(),NOT_COMPATIBLE_LEGACY_VUE_I18N:yo(),BRIDGE_SUPPORT_VUE_2_ONLY:yo(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:yo(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:yo(),__EXTEND_POINT__:yo()};function Es(e,...t){return _d(e,null,K.env.NODE_ENV!=="production"?{messages:$we,args:t}:void 0)}const $we={[cn.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[cn.INVALID_ARGUMENT]:"Invalid argument",[cn.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[cn.NOT_INSTALLED]:"Need to install with `app.use` function",[cn.UNEXPECTED_ERROR]:"Unexpected error",[cn.NOT_AVAILABLE_IN_LEGACY_MODE]:"Not available in legacy mode",[cn.REQUIRED_VALUE]:"Required in value: {0}",[cn.INVALID_VALUE]:"Invalid value",[cn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[cn.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[cn.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[cn.BRIDGE_SUPPORT_VUE_2_ONLY]:"vue-i18n-bridge support Vue 2.x only",[cn.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]:"Must define ‘i18n’ option or custom block in Composition API with using local scope in Legacy API mode",[cn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},c_=Dr("__translateVNode"),d_=Dr("__datetimeParts"),h_=Dr("__numberParts"),Fu=Dr("__enableEmitter"),pp=Dr("__disableEmitter"),rB=Dr("__setPluralRules"),aB=Dr("__injectWithOption"),f_=Dr("__dispose");function gp(e){if(!an(e)||hi(e))return e;for(const t in e)if(Hi(e,t))if(!t.includes("."))an(e[t])&&gp(e[t]);else{const n=t.split("."),s=n.length-1;let o=e,i=!1;for(let r=0;r<s;r++){if(n[r]==="__proto__")throw new Error(`unsafe key: ${n[r]}`);if(n[r]in o||(o[n[r]]=Dn()),!an(o[n[r]])){K.env.NODE_ENV!=="production"&&fs(vo(Wn.IGNORE_OBJ_FLATTEN,{key:n[r]})),i=!0;break}o=o[n[r]]}if(i||(hi(o)?b2.includes(n[s])||delete e[t]:(o[n[s]]=e[t],delete e[t])),!hi(o)){const r=o[n[s]];an(r)&&gp(r)}}return e}function Ty(e,t){const{messages:n,__i18n:s,messageResolver:o,flatJson:i}=t,r=Gt(n)?n:An(s)?Dn():{[e]:Dn()};if(An(s)&&s.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:l,resource:u}=a;l?(r[l]=r[l]||Dn(),Cy(u,r[l])):Cy(u,r)}else vt(a)&&Cy(JSON.parse(a),r)}),o==null&&i)for(const a in r)Hi(r,a)&&gp(r[a]);return r}function lB(e){return e.type}function uB(e,t,n){let s=an(t.messages)?t.messages:Dn();"__i18nGlobal"in n&&(s=Ty(e.locale.value,{messages:s,__i18n:n.__i18nGlobal}));const o=Object.keys(s);o.length&&o.forEach(i=>{e.mergeLocaleMessage(i,s[i])});{if(an(t.datetimeFormats)){const i=Object.keys(t.datetimeFormats);i.length&&i.forEach(r=>{e.mergeDateTimeFormat(r,t.datetimeFormats[r])})}if(an(t.numberFormats)){const i=Object.keys(t.numberFormats);i.length&&i.forEach(r=>{e.mergeNumberFormat(r,t.numberFormats[r])})}}}function cB(e){return ge(Ra,null,e,0)}const dB="__INTLIFY_META__",hB=()=>[],Hwe=()=>!1;let fB=0;function pB(e){return(t,n,s,o)=>e(n,s,Yn()||void 0,o)}const Gwe=()=>{const e=Yn();let t=null;return e&&(t=lB(e)[dB])?{[dB]:t}:null};function p_(e={},t){const{__root:n,__injectWithOption:s}=e,o=n===void 0,i=e.flatJson,r=$i?B:Gp,a=!!e.translateExistCompatible;K.env.NODE_ENV!=="production"&&a&&QV(vo(Wn.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG));let l=Qt(e.inheritLocale)?e.inheritLocale:!0;const u=r(n&&l?n.locale.value:vt(e.locale)?e.locale:Td),c=r(n&&l?n.fallbackLocale.value:vt(e.fallbackLocale)||An(e.fallbackLocale)||Gt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:u.value),d=r(Ty(u.value,e)),h=r(Gt(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),f=r(Gt(e.numberFormats)?e.numberFormats:{[u.value]:{}});let p=n?n.missingWarn:Qt(e.missingWarn)||cl(e.missingWarn)?e.missingWarn:!0,g=n?n.fallbackWarn:Qt(e.fallbackWarn)||cl(e.fallbackWarn)?e.fallbackWarn:!0,v=n?n.fallbackRoot:Qt(e.fallbackRoot)?e.fallbackRoot:!0,C=!!e.fallbackFormat,S=Tn(e.missing)?e.missing:null,b=Tn(e.missing)?pB(e.missing):null,w=Tn(e.postTranslation)?e.postTranslation:null,_=n?n.warnHtmlMessage:Qt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,R=!!e.escapeParameter;const T=n?n.modifiers:Gt(e.modifiers)?e.modifiers:{};let I=e.pluralRules||n&&n.pluralRules,x;x=(()=>{o&&N2(null);const Se={version:Lwe,locale:u.value,fallbackLocale:c.value,messages:d.value,modifiers:T,pluralRules:I,missing:b===null?void 0:b,missingWarn:p,fallbackWarn:g,fallbackFormat:C,unresolving:!0,postTranslation:w===null?void 0:w,warnHtmlMessage:_,escapeParameter:R,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};Se.datetimeFormats=h.value,Se.numberFormats=f.value,Se.__datetimeFormatters=Gt(x)?x.__datetimeFormatters:void 0,Se.__numberFormatters=Gt(x)?x.__numberFormatters:void 0,K.env.NODE_ENV!=="production"&&(Se.__v_emitter=Gt(x)?x.__v_emitter:void 0);const Ve=ywe(Se);return o&&N2(Ve),Ve})(),fp(x,u.value,c.value);function D(){return[u.value,c.value,d.value,h.value,f.value]}const F=Y({get:()=>u.value,set:Se=>{u.value=Se,x.locale=u.value}}),k=Y({get:()=>c.value,set:Se=>{c.value=Se,x.fallbackLocale=c.value,fp(x,u.value,Se)}}),O=Y(()=>d.value),$=Y(()=>h.value),q=Y(()=>f.value);function J(){return Tn(w)?w:null}function ee(Se){w=Se,x.postTranslation=Se}function X(){return S}function ve(Se){Se!==null&&(b=pB(Se)),S=Se,x.missing=b}function te(Se,Ve){return Se!=="translate"||!Ve.resolvedMessage}const N=(Se,Ve,pt,At,Ut,Jt)=>{D();let zt;try{K.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,o||(x.fallbackContext=n?vwe():void 0),zt=Se(x)}finally{K.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,o||(x.fallbackContext=void 0)}if(pt!=="translate exists"&&rs(zt)&&zt===_y||pt==="translate exists"&&!zt){const[Ne,je]=Ve();if(K.env.NODE_ENV!=="production"&&n&&vt(Ne)&&te(pt,je)&&(v&&(Dy(g,Ne)||V2(p,Ne))&&fs(vo(Wn.FALLBACK_TO_ROOT,{key:Ne,type:pt})),K.env.NODE_ENV!=="production")){const{__v_emitter:yt}=x;yt&&v&&yt.emit("fallback",{type:pt,key:Ne,to:"global",groupId:`${pt}:${Ne}`})}return n&&v?At(n):Ut(Ne)}else{if(Jt(zt))return zt;throw Es(cn.UNEXPECTED_RETURN_TYPE)}};function V(...Se){return N(Ve=>Reflect.apply(j2,null,[Ve,...Se]),()=>r_(...Se),"translate",Ve=>Reflect.apply(Ve.t,Ve,[...Se]),Ve=>Ve,Ve=>vt(Ve))}function ne(...Se){const[Ve,pt,At]=Se;if(At&&!an(At))throw Es(cn.INVALID_ARGUMENT);return V(Ve,pt,Ms({resolvedMessage:!0},At||{}))}function ie(...Se){return N(Ve=>Reflect.apply(X2,null,[Ve,...Se]),()=>a_(...Se),"datetime format",Ve=>Reflect.apply(Ve.d,Ve,[...Se]),()=>Ry,Ve=>vt(Ve))}function pe(...Se){return N(Ve=>Reflect.apply(eB,null,[Ve,...Se]),()=>l_(...Se),"number format",Ve=>Reflect.apply(Ve.n,Ve,[...Se]),()=>Ry,Ve=>vt(Ve))}function ae(Se){return Se.map(Ve=>vt(Ve)||rs(Ve)||Qt(Ve)?cB(String(Ve)):Ve)}const W={normalize:ae,interpolate:Se=>Se,type:"vnode"};function fe(...Se){return N(Ve=>{let pt;const At=Ve;try{At.processor=W,pt=Reflect.apply(j2,null,[At,...Se])}finally{At.processor=null}return pt},()=>r_(...Se),"translate",Ve=>Ve[c_](...Se),Ve=>[cB(Ve)],Ve=>An(Ve))}function oe(...Se){return N(Ve=>Reflect.apply(eB,null,[Ve,...Se]),()=>l_(...Se),"number format",Ve=>Ve[h_](...Se),hB,Ve=>vt(Ve)||An(Ve))}function Ie(...Se){return N(Ve=>Reflect.apply(X2,null,[Ve,...Se]),()=>a_(...Se),"datetime format",Ve=>Ve[d_](...Se),hB,Ve=>vt(Ve)||An(Ve))}function G(Se){I=Se,x.pluralRules=I}function Z(Se,Ve){return N(()=>{if(!Se)return!1;const pt=vt(Ve)?Ve:u.value,At=Pe(pt),Ut=x.messageResolver(At,Se);return a?Ut!=null:hi(Ut)||fi(Ut)||vt(Ut)},()=>[Se],"translate exists",pt=>Reflect.apply(pt.te,pt,[Se,Ve]),Hwe,pt=>Qt(pt))}function de(Se){let Ve=null;const pt=T2(x,c.value,u.value);for(let At=0;At<pt.length;At++){const Ut=d.value[pt[At]]||{},Jt=x.messageResolver(Ut,Se);if(Jt!=null){Ve=Jt;break}}return Ve}function ke(Se){const Ve=de(Se);return Ve??(n?n.tm(Se)||{}:{})}function Pe(Se){return d.value[Se]||{}}function Le(Se,Ve){if(i){const pt={[Se]:Ve};for(const At in pt)Hi(pt,At)&&gp(pt[At]);Ve=pt[Se]}d.value[Se]=Ve,x.messages=d.value}function ye(Se,Ve){d.value[Se]=d.value[Se]||{};const pt={[Se]:Ve};if(i)for(const At in pt)Hi(pt,At)&&gp(pt[At]);Ve=pt[Se],Cy(Ve,d.value[Se]),x.messages=d.value}function M(Se){return h.value[Se]||{}}function H(Se,Ve){h.value[Se]=Ve,x.datetimeFormats=h.value,Q2(x,Se,Ve)}function le(Se,Ve){h.value[Se]=Ms(h.value[Se]||{},Ve),x.datetimeFormats=h.value,Q2(x,Se,Ve)}function Ge(Se){return f.value[Se]||{}}function we(Se,Ve){f.value[Se]=Ve,x.numberFormats=f.value,nB(x,Se,Ve)}function ze(Se,Ve){f.value[Se]=Ms(f.value[Se]||{},Ve),x.numberFormats=f.value,nB(x,Se,Ve)}fB++,n&&$i&&(nt(n.locale,Se=>{l&&(u.value=Se,x.locale=Se,fp(x,u.value,c.value))}),nt(n.fallbackLocale,Se=>{l&&(c.value=Se,x.fallbackLocale=Se,fp(x,u.value,c.value))}));const Ue={id:fB,locale:F,fallbackLocale:k,get inheritLocale(){return l},set inheritLocale(Se){l=Se,Se&&n&&(u.value=n.locale.value,c.value=n.fallbackLocale.value,fp(x,u.value,c.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:O,get modifiers(){return T},get pluralRules(){return I||{}},get isGlobal(){return o},get missingWarn(){return p},set missingWarn(Se){p=Se,x.missingWarn=p},get fallbackWarn(){return g},set fallbackWarn(Se){g=Se,x.fallbackWarn=g},get fallbackRoot(){return v},set fallbackRoot(Se){v=Se},get fallbackFormat(){return C},set fallbackFormat(Se){C=Se,x.fallbackFormat=C},get warnHtmlMessage(){return _},set warnHtmlMessage(Se){_=Se,x.warnHtmlMessage=Se},get escapeParameter(){return R},set escapeParameter(Se){R=Se,x.escapeParameter=Se},t:V,getLocaleMessage:Pe,setLocaleMessage:Le,mergeLocaleMessage:ye,getPostTranslationHandler:J,setPostTranslationHandler:ee,getMissingHandler:X,setMissingHandler:ve,[rB]:G};return Ue.datetimeFormats=$,Ue.numberFormats=q,Ue.rt=ne,Ue.te=Z,Ue.tm=ke,Ue.d=ie,Ue.n=pe,Ue.getDateTimeFormat=M,Ue.setDateTimeFormat=H,Ue.mergeDateTimeFormat=le,Ue.getNumberFormat=Ge,Ue.setNumberFormat=we,Ue.mergeNumberFormat=ze,Ue[aB]=s,Ue[c_]=fe,Ue[d_]=Ie,Ue[h_]=oe,K.env.NODE_ENV!=="production"&&(Ue[Fu]=Se=>{x.__v_emitter=Se},Ue[pp]=()=>{x.__v_emitter=void 0}),Ue}function Uwe(e){const t=vt(e.locale)?e.locale:Td,n=vt(e.fallbackLocale)||An(e.fallbackLocale)||Gt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,s=Tn(e.missing)?e.missing:void 0,o=Qt(e.silentTranslationWarn)||cl(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,i=Qt(e.silentFallbackWarn)||cl(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,r=Qt(e.fallbackRoot)?e.fallbackRoot:!0,a=!!e.formatFallbackMessages,l=Gt(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=Tn(e.postTranslation)?e.postTranslation:void 0,d=vt(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,h=!!e.escapeParameterHtml,f=Qt(e.sync)?e.sync:!0;K.env.NODE_ENV!=="production"&&e.formatter&&fs(vo(Wn.NOT_SUPPORTED_FORMATTER)),K.env.NODE_ENV!=="production"&&e.preserveDirectiveContent&&fs(vo(Wn.NOT_SUPPORTED_PRESERVE_DIRECTIVE));let p=e.messages;if(Gt(e.sharedMessages)){const R=e.sharedMessages;p=Object.keys(R).reduce((I,x)=>{const P=I[x]||(I[x]={});return Ms(P,R[x]),I},p||{})}const{__i18n:g,__root:v,__injectWithOption:C}=e,S=e.datetimeFormats,b=e.numberFormats,w=e.flatJson,_=e.translateExistCompatible;return{locale:t,fallbackLocale:n,messages:p,flatJson:w,datetimeFormats:S,numberFormats:b,missing:s,missingWarn:o,fallbackWarn:i,fallbackRoot:r,fallbackFormat:a,modifiers:l,pluralRules:u,postTranslation:c,warnHtmlMessage:d,escapeParameter:h,messageResolver:e.messageResolver,inheritLocale:f,translateExistCompatible:_,__i18n:g,__root:v,__injectWithOption:C}}function g_(e={},t){{const n=p_(Uwe(e)),{__extender:s}=e,o={id:n.id,get locale(){return n.locale.value},set locale(i){n.locale.value=i},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(i){n.fallbackLocale.value=i},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return K.env.NODE_ENV!=="production"&&fs(vo(Wn.NOT_SUPPORTED_FORMATTER)),{interpolate(){return[]}}},set formatter(i){K.env.NODE_ENV!=="production"&&fs(vo(Wn.NOT_SUPPORTED_FORMATTER))},get missing(){return n.getMissingHandler()},set missing(i){n.setMissingHandler(i)},get silentTranslationWarn(){return Qt(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(i){n.missingWarn=Qt(i)?!i:i},get silentFallbackWarn(){return Qt(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(i){n.fallbackWarn=Qt(i)?!i:i},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(i){n.fallbackFormat=i},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(i){n.setPostTranslationHandler(i)},get sync(){return n.inheritLocale},set sync(i){n.inheritLocale=i},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(i){n.warnHtmlMessage=i!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(i){n.escapeParameter=i},get preserveDirectiveContent(){return K.env.NODE_ENV!=="production"&&fs(vo(Wn.NOT_SUPPORTED_PRESERVE_DIRECTIVE)),!0},set preserveDirectiveContent(i){K.env.NODE_ENV!=="production"&&fs(vo(Wn.NOT_SUPPORTED_PRESERVE_DIRECTIVE))},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...i){const[r,a,l]=i,u={};let c=null,d=null;if(!vt(r))throw Es(cn.INVALID_ARGUMENT);const h=r;return vt(a)?u.locale=a:An(a)?c=a:Gt(a)&&(d=a),An(l)?c=l:Gt(l)&&(d=l),Reflect.apply(n.t,n,[h,c||d||{},u])},rt(...i){return Reflect.apply(n.rt,n,[...i])},tc(...i){const[r,a,l]=i,u={plural:1};let c=null,d=null;if(!vt(r))throw Es(cn.INVALID_ARGUMENT);const h=r;return vt(a)?u.locale=a:rs(a)?u.plural=a:An(a)?c=a:Gt(a)&&(d=a),vt(l)?u.locale=l:An(l)?c=l:Gt(l)&&(d=l),Reflect.apply(n.t,n,[h,c||d||{},u])},te(i,r){return n.te(i,r)},tm(i){return n.tm(i)},getLocaleMessage(i){return n.getLocaleMessage(i)},setLocaleMessage(i,r){n.setLocaleMessage(i,r)},mergeLocaleMessage(i,r){n.mergeLocaleMessage(i,r)},d(...i){return Reflect.apply(n.d,n,[...i])},getDateTimeFormat(i){return n.getDateTimeFormat(i)},setDateTimeFormat(i,r){n.setDateTimeFormat(i,r)},mergeDateTimeFormat(i,r){n.mergeDateTimeFormat(i,r)},n(...i){return Reflect.apply(n.n,n,[...i])},getNumberFormat(i){return n.getNumberFormat(i)},setNumberFormat(i,r){n.setNumberFormat(i,r)},mergeNumberFormat(i,r){n.mergeNumberFormat(i,r)},getChoiceIndex(i,r){return K.env.NODE_ENV!=="production"&&fs(vo(Wn.NOT_SUPPORTED_GET_CHOICE_INDEX)),-1}};return o.__extender=s,K.env.NODE_ENV!=="production"&&(o.__enableEmitter=i=>{const r=n;r[Fu]&&r[Fu](i)},o.__disableEmitter=()=>{const i=n;i[pp]&&i[pp]()}),o}}const m_={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function Wwe({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((s,o)=>[...s,...o.type===xt?o.children:[o]],[]):t.reduce((n,s)=>{const o=e[s];return o&&(n[s]=o()),n},Dn())}function gB(e){return xt}const v_=rt({name:"i18n-t",props:Ms({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>rs(e)||!isNaN(e)}},m_),setup(e,t){const{slots:n,attrs:s}=t,o=e.i18n||b_({useScope:e.scope,__useComponent:!0});return()=>{const i=Object.keys(n).filter(d=>d!=="_"),r=Dn();e.locale&&(r.locale=e.locale),e.plural!==void 0&&(r.plural=vt(e.plural)?+e.plural:e.plural);const a=Wwe(t,i),l=o[c_](e.keypath,a,r),u=Ms(Dn(),s),c=vt(e.tag)||an(e.tag)?e.tag:gB();return Zu(c,u,l)}}});function zwe(e){return An(e)&&!vt(e[0])}function mB(e,t,n,s){const{slots:o,attrs:i}=t;return()=>{const r={part:!0};let a=Dn();e.locale&&(r.locale=e.locale),vt(e.format)?r.key=e.format:an(e.format)&&(vt(e.format.key)&&(r.key=e.format.key),a=Object.keys(e.format).reduce((h,f)=>n.includes(f)?Ms(Dn(),h,{[f]:e.format[f]}):h,Dn()));const l=s(e.value,r,a);let u=[r.key];An(l)?u=l.map((h,f)=>{const p=o[h.type],g=p?p({[h.type]:h.value,index:f,parts:l}):[h.value];return zwe(g)&&(g[0].key=`${h.type}-${f}`),g}):vt(l)&&(u=[l]);const c=Ms(Dn(),i),d=vt(e.tag)||an(e.tag)?e.tag:gB();return Zu(d,c,u)}}const vB=rt({name:"i18n-n",props:Ms({value:{type:Number,required:!0},format:{type:[String,Object]}},m_),setup(e,t){const n=e.i18n||b_({useScope:e.scope,__useComponent:!0});return mB(e,t,tB,(...s)=>n[h_](...s))}}),yB=rt({name:"i18n-d",props:Ms({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},m_),setup(e,t){const n=e.i18n||b_({useScope:e.scope,__useComponent:!0});return mB(e,t,J2,(...s)=>n[d_](...s))}});function jwe(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const s=n.__getInstance(t);return s!=null?s.__composer:e.global.__composer}}function Kwe(e){const t=r=>{const{instance:a,modifiers:l,value:u}=r;if(!a||!a.$)throw Es(cn.UNEXPECTED_ERROR);const c=jwe(e,a.$);K.env.NODE_ENV!=="production"&&l.preserve&&fs(vo(Wn.NOT_SUPPORTED_PRESERVE));const d=wB(u);return[Reflect.apply(c.t,c,[...CB(d)]),c]};return{created:(r,a)=>{const[l,u]=t(a);$i&&e.global===u&&(r.__i18nWatcher=nt(u.locale,()=>{a.instance&&a.instance.$forceUpdate()})),r.__composer=u,r.textContent=l},unmounted:r=>{$i&&r.__i18nWatcher&&(r.__i18nWatcher(),r.__i18nWatcher=void 0,delete r.__i18nWatcher),r.__composer&&(r.__composer=void 0,delete r.__composer)},beforeUpdate:(r,{value:a})=>{if(r.__composer){const l=r.__composer,u=wB(a);r.textContent=Reflect.apply(l.t,l,[...CB(u)])}},getSSRProps:r=>{const[a]=t(r);return{textContent:a}}}}function wB(e){if(vt(e))return{path:e};if(Gt(e)){if(!("path"in e))throw Es(cn.REQUIRED_VALUE,"path");return e}else throw Es(cn.INVALID_VALUE)}function CB(e){const{path:t,locale:n,args:s,choice:o,plural:i}=e,r={},a=s||{};return vt(n)&&(r.locale=n),rs(o)&&(r.plural=o),rs(i)&&(r.plural=i),[t,a,r]}function qwe(e,t,...n){const s=Gt(n[0])?n[0]:{},o=!!s.useI18nComponentName,i=Qt(s.globalInstall)?s.globalInstall:!0;K.env.NODE_ENV!=="production"&&i&&o&&fs(vo(Wn.COMPONENT_NAME_LEGACY_COMPATIBLE,{name:v_.name})),i&&([o?"i18n":v_.name,"I18nT"].forEach(r=>e.component(r,v_)),[vB.name,"I18nN"].forEach(r=>e.component(r,vB)),[yB.name,"I18nD"].forEach(r=>e.component(r,yB))),e.directive("t",Kwe(t))}const y_={"vue-devtools-plugin-vue-i18n":"Vue I18n devtools","vue-i18n-resource-inspector":"I18n Resources","vue-i18n-timeline":"Vue I18n"},Ywe={"vue-i18n-resource-inspector":"Search for scopes ..."},Zwe={"vue-i18n-timeline":16764185},bB="vue-i18n: composer properties";let w_;async function Xwe(e,t){return new Promise((n,s)=>{try{Nwe({id:"vue-devtools-plugin-vue-i18n",label:y_["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:[bB],app:e},o=>{w_=o,o.on.visitComponentTree(({componentInstance:r,treeNode:a})=>{Jwe(r,a,t)}),o.on.inspectComponent(({componentInstance:r,instanceData:a})=>{r.vnode.el&&r.vnode.el.__VUE_I18N__&&a&&(t.mode==="legacy"?r.vnode.el.__VUE_I18N__!==t.global.__composer&&EB(a,r.vnode.el.__VUE_I18N__):EB(a,r.vnode.el.__VUE_I18N__))}),o.addInspector({id:"vue-i18n-resource-inspector",label:y_["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:Ywe["vue-i18n-resource-inspector"]}),o.on.getInspectorTree(r=>{r.app===e&&r.inspectorId==="vue-i18n-resource-inspector"&&sCe(r,t)});const i=new Map;o.on.getInspectorState(async r=>{if(r.app===e&&r.inspectorId==="vue-i18n-resource-inspector")if(o.unhighlightElement(),iCe(r,t),r.nodeId==="global"){if(!i.has(r.app)){const[a]=await o.getComponentInstances(r.app);i.set(r.app,a)}o.highlightElement(i.get(r.app))}else{const a=oCe(r.nodeId,t);a&&o.highlightElement(a)}}),o.on.editInspectorState(r=>{r.app===e&&r.inspectorId==="vue-i18n-resource-inspector"&&aCe(r,t)}),o.addTimelineLayer({id:"vue-i18n-timeline",label:y_["vue-i18n-timeline"],color:Zwe["vue-i18n-timeline"]}),n(!0)})}catch(o){console.error(o),s(!1)}})}function SB(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function Jwe(e,t,n){const s=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&e.vnode.el.__VUE_I18N__!==s){const o={label:`i18n (${SB(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(o)}}function EB(e,t){const n=bB;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:C_(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 C_(e){const t={};return Object.keys(e).forEach(n=>{const s=e[n];Tn(s)&&"source"in s?t[n]=nCe(s):hi(s)&&s.loc&&s.loc.source?t[n]=s.loc.source:an(s)?t[n]=C_(s):t[n]=s}),t}const Qwe={"<":"<",">":">",'"':""","&":"&"};function eCe(e){return e.replace(/[<>"&]/g,tCe)}function tCe(e){return Qwe[e]||e}function nCe(e){return{_custom:{type:"function",display:`<span>ƒ</span> ${e.source?`("${eCe(e.source)}")`:"(?)"}`}}}function sCe(e,t){e.rootNodes.push({id:"global",label:"Global Scope"});const n=t.mode==="composition"?t.global:t.global.__composer;for(const[s,o]of t.__instances){const i=t.mode==="composition"?o:o.__composer;n!==i&&e.rootNodes.push({id:i.id.toString(),label:`${SB(s)} Scope`})}}function oCe(e,t){let n=null;if(e!=="global"){for(const[s,o]of t.__instances.entries())if(o.id.toString()===e){n=s;break}}return n}function _B(e,t){if(e==="global")return t.mode==="composition"?t.global:t.global.__composer;{const n=Array.from(t.__instances.values()).find(s=>s.id.toString()===e);return n?t.mode==="composition"?n:n.__composer:null}}function iCe(e,t){const n=_B(e.nodeId,t);return n&&(e.state=rCe(n)),null}function rCe(e){const t={},n="Locale related info",s=[{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]=s;const o="Locale messages info",i=[{type:o,key:"messages",editable:!1,value:C_(e.messages.value)}];t[o]=i;{const r="Datetime formats info",a=[{type:r,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];t[r]=a;const l="Datetime formats info",u=[{type:l,key:"numberFormats",editable:!1,value:e.numberFormats.value}];t[l]=u}return t}function mp(e,t){if(w_){let n;t&&"groupId"in t&&(n=t.groupId,delete t.groupId),w_.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 aCe(e,t){const n=_B(e.nodeId,t);if(n){const[s]=e.path;s==="locale"&&vt(e.state.value)?n.locale.value=e.state.value:s==="fallbackLocale"&&(vt(e.state.value)||An(e.state.value)||an(e.state.value))?n.fallbackLocale.value=e.state.value:s==="inheritLocale"&&Qt(e.state.value)&&(n.inheritLocale=e.state.value)}}function lCe(e,t,n){return{beforeCreate(){const s=Yn();if(!s)throw Es(cn.UNEXPECTED_ERROR);const o=this.$options;if(o.i18n){const i=o.i18n;if(o.__i18n&&(i.__i18n=o.__i18n),i.__root=t,this===this.$root)this.$i18n=RB(e,i);else{i.__injectWithOption=!0,i.__extender=n.__vueI18nExtend,this.$i18n=g_(i);const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}}else if(o.__i18n)if(this===this.$root)this.$i18n=RB(e,o);else{this.$i18n=g_({__i18n:o.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}else this.$i18n=e;o.__i18nGlobal&&uB(t,o,o),this.$t=(...i)=>this.$i18n.t(...i),this.$rt=(...i)=>this.$i18n.rt(...i),this.$tc=(...i)=>this.$i18n.tc(...i),this.$te=(i,r)=>this.$i18n.te(i,r),this.$d=(...i)=>this.$i18n.d(...i),this.$n=(...i)=>this.$i18n.n(...i),this.$tm=i=>this.$i18n.tm(i),n.__setInstance(s,this.$i18n)},mounted(){if(K.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const s=this.$i18n;this.$el.__VUE_I18N__=s.__composer;const o=this.__v_emitter=X0();s.__enableEmitter&&s.__enableEmitter(o),o.on("*",mp)}},unmounted(){const s=Yn();if(!s)throw Es(cn.UNEXPECTED_ERROR);const o=this.$i18n;K.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",mp),delete this.__v_emitter),this.$i18n&&(o.__disableEmitter&&o.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,o.__disposer&&(o.__disposer(),delete o.__disposer,delete o.__extender),n.__deleteInstance(s),delete this.$i18n}}}function RB(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[rB](t.pluralizationRules||e.pluralizationRules);const n=Ty(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(s=>e.mergeLocaleMessage(s,n[s])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(s=>e.mergeDateTimeFormat(s,t.datetimeFormats[s])),t.numberFormats&&Object.keys(t.numberFormats).forEach(s=>e.mergeNumberFormat(s,t.numberFormats[s])),e}const uCe=Dr("global-vue-i18n");function cCe(e={},t){const n=__VUE_I18N_LEGACY_API__&&Qt(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,s=Qt(e.globalInjection)?e.globalInjection:!0,o=__VUE_I18N_LEGACY_API__&&n?!!e.allowComposition:!0,i=new Map,[r,a]=dCe(e,n),l=Dr(K.env.NODE_ENV!=="production"?"vue-i18n":"");K.env.NODE_ENV!=="production"&&n&&o&&fs(vo(Wn.NOTICE_DROP_ALLOW_COMPOSITION));function u(h){return i.get(h)||null}function c(h,f){i.set(h,f)}function d(h){i.delete(h)}{const h={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},get allowComposition(){return o},async install(f,...p){if(K.env.NODE_ENV!=="production"&&(f.__VUE_I18N__=h),f.__VUE_I18N_SYMBOL__=l,f.provide(f.__VUE_I18N_SYMBOL__,h),Gt(p[0])){const C=p[0];h.__composerExtend=C.__composerExtend,h.__vueI18nExtend=C.__vueI18nExtend}let g=null;!n&&s&&(g=CCe(f,h.global)),__VUE_I18N_FULL_INSTALL__&&qwe(f,h,...p),__VUE_I18N_LEGACY_API__&&n&&f.mixin(lCe(a,a.__composer,h));const v=f.unmount;if(f.unmount=()=>{g&&g(),h.dispose(),v()},K.env.NODE_ENV!=="production"){if(!await Xwe(f,h))throw Es(cn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const S=X0();if(n){const b=a;b.__enableEmitter&&b.__enableEmitter(S)}else{const b=a;b[Fu]&&b[Fu](S)}S.on("*",mp)}},get global(){return a},dispose(){r.stop()},__instances:i,__getInstance:u,__setInstance:c,__deleteInstance:d};return h}}function b_(e={}){const t=Yn();if(t==null)throw Es(cn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Es(cn.NOT_INSTALLED);const n=hCe(t),s=pCe(n),o=lB(t),i=fCe(e,o);if(__VUE_I18N_LEGACY_API__&&n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw Es(cn.NOT_AVAILABLE_IN_LEGACY_MODE);return yCe(t,i,s,e)}if(i==="global")return uB(s,e,o),s;if(i==="parent"){let l=gCe(n,t,e.__useComponent);return l==null&&(K.env.NODE_ENV!=="production"&&fs(vo(Wn.NOT_FOUND_PARENT_SCOPE)),l=s),l}const r=n;let a=r.__getInstance(t);if(a==null){const l=Ms({},e);"__i18n"in o&&(l.__i18n=o.__i18n),s&&(l.__root=s),a=p_(l),r.__composerExtend&&(a[f_]=r.__composerExtend(a)),vCe(r,t,a),r.__setInstance(t,a)}return a}function dCe(e,t,n){const s=ew();{const o=__VUE_I18N_LEGACY_API__&&t?s.run(()=>g_(e)):s.run(()=>p_(e));if(o==null)throw Es(cn.UNEXPECTED_ERROR);return[s,o]}}function hCe(e){{const t=En(e.isCE?uCe:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Es(e.isCE?cn.NOT_INSTALLED_WITH_PROVIDE:cn.UNEXPECTED_ERROR);return t}}function fCe(e,t){return vy(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function pCe(e){return e.mode==="composition"?e.global:e.global.__composer}function gCe(e,t,n=!1){let s=null;const o=t.root;let i=mCe(t,n);for(;i!=null;){const r=e;if(e.mode==="composition")s=r.__getInstance(i);else if(__VUE_I18N_LEGACY_API__){const a=r.__getInstance(i);a!=null&&(s=a.__composer,n&&s&&!s[aB]&&(s=null))}if(s!=null||o===i)break;i=i.parent}return s}function mCe(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function vCe(e,t,n){let s=null;tn(()=>{if(K.env.NODE_ENV!=="production"&&t.vnode.el){t.vnode.el.__VUE_I18N__=n,s=X0();const o=n;o[Fu]&&o[Fu](s),s.on("*",mp)}},t),Il(()=>{const o=n;K.env.NODE_ENV!=="production"&&t.vnode.el&&t.vnode.el.__VUE_I18N__&&(s&&s.off("*",mp),o[pp]&&o[pp](),delete t.vnode.el.__VUE_I18N__),e.__deleteInstance(t);const i=o[f_];i&&(i(),delete o[f_])},t)}function yCe(e,t,n,s={}){const o=t==="local",i=Gp(null);if(o&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw Es(cn.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const r=Qt(s.inheritLocale)?s.inheritLocale:!vt(s.locale),a=B(!o||r?n.locale.value:vt(s.locale)?s.locale:Td),l=B(!o||r?n.fallbackLocale.value:vt(s.fallbackLocale)||An(s.fallbackLocale)||Gt(s.fallbackLocale)||s.fallbackLocale===!1?s.fallbackLocale:a.value),u=B(Ty(a.value,s)),c=B(Gt(s.datetimeFormats)?s.datetimeFormats:{[a.value]:{}}),d=B(Gt(s.numberFormats)?s.numberFormats:{[a.value]:{}}),h=o?n.missingWarn:Qt(s.missingWarn)||cl(s.missingWarn)?s.missingWarn:!0,f=o?n.fallbackWarn:Qt(s.fallbackWarn)||cl(s.fallbackWarn)?s.fallbackWarn:!0,p=o?n.fallbackRoot:Qt(s.fallbackRoot)?s.fallbackRoot:!0,g=!!s.fallbackFormat,v=Tn(s.missing)?s.missing:null,C=Tn(s.postTranslation)?s.postTranslation:null,S=o?n.warnHtmlMessage:Qt(s.warnHtmlMessage)?s.warnHtmlMessage:!0,b=!!s.escapeParameter,w=o?n.modifiers:Gt(s.modifiers)?s.modifiers:{},_=s.pluralRules||o&&n.pluralRules;function R(){return[a.value,l.value,u.value,c.value,d.value]}const T=Y({get:()=>i.value?i.value.locale.value:a.value,set:Z=>{i.value&&(i.value.locale.value=Z),a.value=Z}}),I=Y({get:()=>i.value?i.value.fallbackLocale.value:l.value,set:Z=>{i.value&&(i.value.fallbackLocale.value=Z),l.value=Z}}),x=Y(()=>i.value?i.value.messages.value:u.value),P=Y(()=>c.value),D=Y(()=>d.value);function F(){return i.value?i.value.getPostTranslationHandler():C}function k(Z){i.value&&i.value.setPostTranslationHandler(Z)}function O(){return i.value?i.value.getMissingHandler():v}function $(Z){i.value&&i.value.setMissingHandler(Z)}function q(Z){return R(),Z()}function J(...Z){return i.value?q(()=>Reflect.apply(i.value.t,null,[...Z])):q(()=>"")}function ee(...Z){return i.value?Reflect.apply(i.value.rt,null,[...Z]):""}function X(...Z){return i.value?q(()=>Reflect.apply(i.value.d,null,[...Z])):q(()=>"")}function ve(...Z){return i.value?q(()=>Reflect.apply(i.value.n,null,[...Z])):q(()=>"")}function te(Z){return i.value?i.value.tm(Z):{}}function N(Z,de){return i.value?i.value.te(Z,de):!1}function V(Z){return i.value?i.value.getLocaleMessage(Z):{}}function ne(Z,de){i.value&&(i.value.setLocaleMessage(Z,de),u.value[Z]=de)}function ie(Z,de){i.value&&i.value.mergeLocaleMessage(Z,de)}function pe(Z){return i.value?i.value.getDateTimeFormat(Z):{}}function ae(Z,de){i.value&&(i.value.setDateTimeFormat(Z,de),c.value[Z]=de)}function re(Z,de){i.value&&i.value.mergeDateTimeFormat(Z,de)}function W(Z){return i.value?i.value.getNumberFormat(Z):{}}function fe(Z,de){i.value&&(i.value.setNumberFormat(Z,de),d.value[Z]=de)}function oe(Z,de){i.value&&i.value.mergeNumberFormat(Z,de)}const Ie={get id(){return i.value?i.value.id:-1},locale:T,fallbackLocale:I,messages:x,datetimeFormats:P,numberFormats:D,get inheritLocale(){return i.value?i.value.inheritLocale:r},set inheritLocale(Z){i.value&&(i.value.inheritLocale=Z)},get availableLocales(){return i.value?i.value.availableLocales:Object.keys(u.value)},get modifiers(){return i.value?i.value.modifiers:w},get pluralRules(){return i.value?i.value.pluralRules:_},get isGlobal(){return i.value?i.value.isGlobal:!1},get missingWarn(){return i.value?i.value.missingWarn:h},set missingWarn(Z){i.value&&(i.value.missingWarn=Z)},get fallbackWarn(){return i.value?i.value.fallbackWarn:f},set fallbackWarn(Z){i.value&&(i.value.missingWarn=Z)},get fallbackRoot(){return i.value?i.value.fallbackRoot:p},set fallbackRoot(Z){i.value&&(i.value.fallbackRoot=Z)},get fallbackFormat(){return i.value?i.value.fallbackFormat:g},set fallbackFormat(Z){i.value&&(i.value.fallbackFormat=Z)},get warnHtmlMessage(){return i.value?i.value.warnHtmlMessage:S},set warnHtmlMessage(Z){i.value&&(i.value.warnHtmlMessage=Z)},get escapeParameter(){return i.value?i.value.escapeParameter:b},set escapeParameter(Z){i.value&&(i.value.escapeParameter=Z)},t:J,getPostTranslationHandler:F,setPostTranslationHandler:k,getMissingHandler:O,setMissingHandler:$,rt:ee,d:X,n:ve,tm:te,te:N,getLocaleMessage:V,setLocaleMessage:ne,mergeLocaleMessage:ie,getDateTimeFormat:pe,setDateTimeFormat:ae,mergeDateTimeFormat:re,getNumberFormat:W,setNumberFormat:fe,mergeNumberFormat:oe};function G(Z){Z.locale.value=a.value,Z.fallbackLocale.value=l.value,Object.keys(u.value).forEach(de=>{Z.mergeLocaleMessage(de,u.value[de])}),Object.keys(c.value).forEach(de=>{Z.mergeDateTimeFormat(de,c.value[de])}),Object.keys(d.value).forEach(de=>{Z.mergeNumberFormat(de,d.value[de])}),Z.escapeParameter=b,Z.fallbackFormat=g,Z.fallbackRoot=p,Z.fallbackWarn=f,Z.missingWarn=h,Z.warnHtmlMessage=S}return eh(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw Es(cn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const Z=i.value=e.proxy.$i18n.__composer;t==="global"?(a.value=Z.locale.value,l.value=Z.fallbackLocale.value,u.value=Z.messages.value,c.value=Z.datetimeFormats.value,d.value=Z.numberFormats.value):o&&G(Z)}),Ie}const wCe=["locale","fallbackLocale","availableLocales"],DB=["t","rt","d","n","tm","te"];function CCe(e,t){const n=Object.create(null);return wCe.forEach(o=>{const i=Object.getOwnPropertyDescriptor(t,o);if(!i)throw Es(cn.UNEXPECTED_ERROR);const r=gn(i.value)?{get(){return i.value.value},set(a){i.value.value=a}}:{get(){return i.get&&i.get()}};Object.defineProperty(n,o,r)}),e.config.globalProperties.$i18n=n,DB.forEach(o=>{const i=Object.getOwnPropertyDescriptor(t,o);if(!i||!i.value)throw Es(cn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${o}`,i)}),()=>{delete e.config.globalProperties.$i18n,DB.forEach(o=>{delete e.config.globalProperties[`$${o}`]})}}if(Vwe(),__INTLIFY_JIT_COMPILATION__?P2(Ewe):P2(Swe),fwe(Kye),pwe(T2),K.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=pa();e.__INTLIFY__=!0,nwe(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}K.env.NODE_ENV;async function bCe(){return cCe({legacy:!1,locale:"en",fallbackLocale:"en",messages:{en:{errorMessages:Wge}}})}const SCe=async()=>{const e=await bCe();return $ge(e.global),e},ECe={style:{color:"#ff5200"}},TB=_t(rt({__name:"ImportVisual",props:{state:{},errorMessage:{},overwrite:{type:Boolean}},setup(e){return(t,n)=>(j(),ce("div",{class:Q(t.$style["inform-layout"])},[e.state==="importing"?(j(),ce("div",{key:0,class:Q(t.$style["import-error"]),style:{width:"500px"}},[ge(U(Pm),{src:"UploadInProgress","max-height":180,"max-width":180})],2)):e.state==="error"?(j(),ce("div",{key:1,class:Q(t.$style["import-error"]),style:{width:"500px"}},[ge(U(Pm),{src:"Unsuccessful1","max-height":180,"max-width":180}),Ee("span",{class:Q(t.$style["step-title"])}," File doesn’t meet requirements. Check file and try again. ",2),Ee("div",ECe,[Ee("span",{class:Q(t.$style["step-description"])},"Error code",2),Ee("span",{class:Q(t.$style["step-description"])},wt(e.errorMessage),3)])],2)):e.state==="success"?(j(),ce(xt,{key:2},[ge(U(Pm),{src:"Successful1","max-height":180,"max-width":180}),Ee("span",{class:Q(t.$style["step-title"]),style:{"white-space":"pre-wrap","align-items":"center","text-align":"center"}},wt(e.overwrite?`Existing data will be overwritten in the background.
|
|
251
251
|
Refresh to see updates.`:`Work will be created in background.
|
|
252
|
-
Refresh to see updates.`),3)],64)):Je("",!0)],2))}}),[["__cssModules",{$style:{"inform-layout":"_inform-layout_16bpq_1","import-error":"_import-error_16bpq_11","step-title":"_step-title_16bpq_22","step-description":"_step-description_16bpq_27"}}]]),IB=_t(rt({__name:"DateRule",setup(e){const n=(()=>{const o=(h,f,p,g)=>{const v=document.createElement("span");return v.textContent=h,v.style.fontWeight=f,v.style.fontSize=p,v.style.color=g,v},i=document.createElement("div");i.style.display="flex",i.style.flexDirection="column";const r=document.createElement("div"),a=document.createElement("div"),l=o("Valid formats:","normal","14px","#02C39A"),u=o("Invalid formats:","normal","14px","#FF5200"),c=o(" 2025.12.31, 2025-12-31, 2025/12/31 ","normal","14px",""),d=o(" 12.31.2025, 2025.31.12","normal","14px","");return r.appendChild(l),r.appendChild(c),a.appendChild(u),a.appendChild(d),i.appendChild(r),i.appendChild(a),i.outerHTML})(),s=Xt;return(o,i)=>(j(),ce("div",{class:Q(o.$style["date-format-guide"])},[Ee("span",{class:Q(o.$style["step-title-2"])},[i[0]||(i[0]=tt(" Date format guide ",-1)),Ke(ge(U(lt),{src:"InfoCircle",color:"#A6A6A6"},null,512),[[U(s),{content:U(n)}]])],2),Ee("div",{class:Q(o.$style["date-rule-section"])},[i[3]||(i[3]=Ee("span",null,"Enter dates in one of these formats:",-1)),Ee("ul",{class:Q(o.$style["step-description"])},[Ee("li",{class:Q(o.$style["date-rule"])},[...i[1]||(i[1]=[Ee("b",null,"DD MM YYYY",-1),tt(" (Day-Month-Year) ",-1)])],2),Ee("li",{class:Q(o.$style["date-rule"])},[...i[2]||(i[2]=[Ee("b",null,"YYYY MM DD",-1),tt(" (Year-Month-Day) ",-1)])],2)],2)],2)],2))}}),[["__cssModules",{$style:{"date-format-guide":"_date-format-guide_1clky_1","step-title-2":"_step-title-2_1clky_13","date-rule-section":"_date-rule-section_1clky_25","step-description":"_step-description_1clky_29","date-rule":"_date-rule_1clky_25"}}]]),_Ce={key:1},RCe=_t(rt({__name:"PopupCreateScenes",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const s=B(null),o=e,i=()=>{s.value&&s.value.show()},r=B(""),a=B("idle"),l=Y(()=>({error:"Import failed",importing:"Import in progress",success:"Import successful",idle:"Create new work"})[a.value]),u=B(null),c=B({file:null,format:null}),{apiServices:d}=ts(!1,o),h=async P=>{var F,k;if(((F=d==null?void 0:d.value)==null?void 0:F.getTemplateFlowStatuses)===void 0){console.error("API services not available",(k=d==null?void 0:d.value)==null?void 0:k.getTemplateFlowStatuses);return}return await d.value.getTemplateFlowStatuses({workspaceId:o.workspaceId,entityId:o.entityId,...P})},f=B(!1),p=async()=>{f.value=!0;const P=o.workspaceId,D=o.entityId;if(!P||!D||!d.value){console.error("Workspace ID or Entity ID is missing");return}try{if(!await d.value.downloadTemplate(P,D))throw new Error("No response from downloadTemplate API")}catch(F){console.error("Error downloading template:",F)}f.value=!1},g=async P=>{var k,O,$;const D=new FormData,F=((k=P.name.split(".").pop())==null?void 0:k.toString())||"";if(D.append("file",P),D.append("format",F),D.append("entity_id",o.entityId||""),D.append("template_flow_status_id",_.value||""),!d.value||!o.workspaceId||!o.entityId){console.error("API services not available");return}try{await d.value.addNewSceneViaImportFile(o.workspaceId,o.entityId,D),v()}catch(q){throw console.error("Error uploading file:",q),C((($=(O=q.response)==null?void 0:O.data)==null?void 0:$.message)||"An unknown error occurred during file upload."),q}},v=()=>{a.value="success"},C=P=>{r.value=P,a.value="error"},S=n,b=()=>{S("import-success"),x()},w=async()=>{if(!c.value||!c.value.file){console.error("No file to upload");return}a.value="importing",await g(c.value.file)};t({open:i});const _=B(null),R=Y(()=>!c.value.file||!c.value.format||!c.value.isValid||!_.value),T=B(null),I=()=>{var P,D;(P=u.value)==null||P.clear(),r.value="",c.value={file:null,format:null},_.value=null,(D=T==null?void 0:T.value)==null||D.clear(),a.value="idle"},x=()=>{var P;I(),(P=s.value)==null||P.hide()};return(P,D)=>(j(),qe(U(dV),{"popup-name":l.value,"show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:s,onHidden:I},nh({default:me(()=>[a.value==="importing"||a.value==="error"||a.value==="success"?(j(),qe(TB,{key:0,state:a.value,"error-message":r.value},null,8,["state","error-message"])):(j(),ce("div",_Ce,[Ee("div",{class:Q(P.$style["step-section"])},[Ee("span",{class:Q(P.$style["step-title"])},"Step 1: Download sample file",2),Ee("span",{class:Q(P.$style["step-description"])}," Get a sample file with all columns ready for editing. ",2),ge(U(mt),{class:Q(P.$style["download-sample-btn"]),size:12,variant:"secondary",disabled:f.value,onHandleClick:p},{prefix:me(()=>[ge(U(lt),{src:"Download"})]),default:me(()=>[D[2]||(D[2]=tt(" Download sample file ",-1))]),_:1},8,["class","disabled"])],2),Ee("div",{class:Q(P.$style["step-section"])},[Ee("span",{class:Q(P.$style["step-title"])},"Step 2: Upload your file (.xlsx, .xls, .csv)",2),ge(U(ZV),{modelValue:c.value,"onUpdate:modelValue":D[0]||(D[0]=F=>c.value=F),ref_key:"filUploaderRef",ref:u},null,8,["modelValue"])],2),Ee("div",{class:Q(P.$style["step-section"])},[Ee("span",{class:Q(P.$style["step-title"])},"Step 3: Select status",2),Ee("span",{class:Q(P.$style["step-description"])},"Choose a status for the new work.",2),ge(U(nve),{ref_key:"statusRef",ref:T,modelValue:_.value,"onUpdate:modelValue":D[1]||(D[1]=F=>_.value=F),"get-status-func":h,"workspace-id":o.workspaceId,id:o.entityId},null,8,["modelValue","workspace-id","id"])],2),Ee("div",{class:Q(P.$style["step-section"]),style:{"padding-top":"0","padding-bottom":"0"}},[ge(IB)],2)]))]),_:2},[a.value==="idle"?{name:"footer",fn:me(()=>[ge(U(mt),{style:{flex:"1"},variant:"secondary",onClick:x},{default:me(()=>[...D[3]||(D[3]=[tt(" Cancel ",-1)])]),_:1}),ge(U(mt),{disabled:R.value,style:{flex:"1"},variant:"primary",onClick:w},{default:me(()=>[...D[4]||(D[4]=[tt(" Import ",-1)])]),_:1},8,["disabled"])]),key:"0"}:a.value==="success"?{name:"footer",fn:me(()=>[ge(U(mt),{style:{flex:"1"},variant:"primary",onClick:b},{default:me(()=>[...D[5]||(D[5]=[tt(" Close ",-1)])]),_:1})]),key:"1"}:a.value=="error"?{name:"footer",fn:me(()=>[ge(U(mt),{style:{flex:"1"},variant:"primary",onClick:I},{default:me(()=>[...D[6]||(D[6]=[tt(" Try Again ",-1)])]),_:1})]),key:"2"}:void 0]),1032,["popup-name"]))}}),[["__cssModules",{$style:{"step-section":"_step-section_1ml4p_1","step-title":"_step-title_1ml4p_11","step-title-2":"_step-title-2_1ml4p_17","step-description":"_step-description_1ml4p_23","date-format-guide":"_date-format-guide_1ml4p_28","import-error":"_import-error_1ml4p_39","drop-area":"_drop-area_1ml4p_49","is-dragging":"_is-dragging_1ml4p_49","drop-area-content":"_drop-area-content_1ml4p_52",browse:"_browse_1ml4p_61","download-sample-btn":"_download-sample-btn_1ml4p_65"}}]]),xB={text:il,id:void 0,assignees:dge,status:bge,dateRange:hge,isStarted:il,isCompleted:il,lastUpdated:il,completedOn:il,isDeleted:il,isArchived:il,isProcessing:il,name:aV,options:vY,metric:uV,__checkboxSelection:void 0},DCe={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},TCe={text:null,id:void 0,assignees:UA,status:Bk,dateRange:fge,isStarted:void 0,isCompleted:void 0,lastUpdated:void 0,completedOn:void 0,isDeleted:void 0,isArchived:void 0,isProcessing:void 0,name:aV,options:rV,metric:void 0,__checkboxSelection:void 0},ICe={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]},xCe={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}},FCe=e=>{var t,n,s;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((s=e.metric_type)==null?void 0:s.id)==3)return}},Fd=e=>{if(e)return FCe(e)};function FB(e,t){var o,i,r,a;const n=(o=t==null?void 0:t.data)==null?void 0:o.permissions;let s={disabled:!1,readOnly:!1,type:void 0};if(!t||!e)s={disabled:!1,readOnly:!0,type:void 0};else if(e==="options")s={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_","")}`;s={disabled:!1,readOnly:!((t==null?void 0:t.data)&&t.data[l]&&((i=t.data[l])==null?void 0:i.permission)==2&&!((r=t.colDef)!=null&&r.context.formula)&&!t.data.isLocked&&!t.data.isDeleted),type:Fd((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}[e]??0;s={disabled:u===-1,readOnly:u!==1,type:void 0}}return s}class S_{constructor(){es(this,"eGui");es(this,"params")}init(t){this.params=t}getGui(){var n,s,o,i,r;const t=document.createElement("div");return(n=this.params)!=null&&n.height&&t.style.setProperty("--height",(s=this.params)==null?void 0:s.height),(o=this.params)!=null&&o.width?t.style.setProperty("--width",(i=this.params)==null?void 0:i.width):(r=this.params)!=null&&r.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 PB=new Map;class vp{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 s=t.data||((u=t.node)==null?void 0:u.data),o=(c=t.colDef)==null?void 0:c.field,i=o&&s?s[o]:void 0,r=FB((d=t.colDef)==null?void 0:d.field,t),a=typeof n=="function"?n(t):n??{};return{...t,value:i,disabled:r==null?void 0:r.disabled,readOnly:r==null?void 0:r.readOnly,type:Fd(t.context),...a}}static resolveRendererComponent(t,n){let s;return t.includes("metric")&&xB.metric?Fd(n)==="rating"?s=Uve:s=uV:s=xB[t]??void 0,s}static resolveEditorComponent(t,n){const s=t.includes("metric");let o;const i=Fd(n);return s&&["number","dropdown"].includes(i)?o=ove:o=TCe[t],o}static canEditField(t,n){var i;if(n.data===void 0)return!1;const s=FB((i=n.colDef)==null?void 0:i.field,n),o=DCe[t]??!0;return!(s!=null&&s.disabled)&&!(s!=null&&s.readOnly)&&o&&(s==null?void 0:s.type)!=="rating"}static resolveSize(t){const[n=250,s=300]=ICe[t]??[];return{minWidth:n,maxWidth:s}}static buildHeaderComponentParams(t){return n=>typeof t=="function"?t(n):t??{}}static fromType(t){const{wrapVueCellEditor:n}=this.getWrappers(),s=String(t.field??""),o=this.resolveSize(s),i=xCe[s]??{},r=Fd(t.context),a=r==="number"||r==="rating",l=r=="rating"?t.context.range*24+20:o.minWidth;return{...t,headerName:t.headerName,...o,...t,cellEditorSelector:c=>{const d=this.resolveEditorComponent(s,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(s,c),d},minWidth:l,cellRendererSelector:c=>PCe(c,{component:n(this.resolveRendererComponent(s,t.context)),params:this.buildCommonCellParams(c,t.cellRendererParams)}),headerComponentParams:this.buildHeaderComponentParams(t.headerComponentParams),...i,cellClass:c=>`${r}--${c.colDef.field}`}}}es(vp,"wrappers",null);const PCe=(e,t)=>{var o;const n=(o=e.colDef)==null?void 0:o.field,s=`${n}-${e.node.rowIndex}`;return PB.set(s,(PB.get(s)??0)+1),n!=null&&n.includes("metric")?e.value===void 0?{component:S_,params:{fullwidth:!1}}:t:e.data&&e.value!==void 0?t:!n||n==="options"||n==="__checkboxSelection"?e.data?t:{component:S_,params:{fullwidth:!0,width:"24px",height:"24px"}}:!e.data||e.value===void 0?{component:S_,params:{fullwidth:!1}}:t},ACe=_t(rt({__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,s=B(null),o=Y(()=>{var a;return((a=n.component)==null?void 0:a.name)||"UnknownComponent"}),i=Y(()=>{var a;return((a=n.component)==null?void 0:a.default)||n.component}),r=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=s.value)!=null&&a.focus?s.value.focus():console.warn(`Component ${o.value} does not have a focus method.`),!0},blur:()=>{var a,l;return(l=(a=s.value)==null?void 0:a.blur)==null||l.call(a),!0},trigger:(a,l)=>{var u;return(u=s.value)==null||u.$emit(a,l),!0}}),(a,l)=>(j(),qe(bw(i.value),nn(r.value,{ref_key:"componentRef",ref:s}),null,16))}}),[["__cssModules",{$style:{skeleton:"_skeleton_7xde7_1",shimmer:"_shimmer_7xde7_16","skeleton-loading":"_skeleton-loading_7xde7_1"}}]]);function kCe(e){return"stopEditing"in e}const OCe=8,MCe=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 AB(e){return class{constructor(){es(this,"container");es(this,"vNode",null);es(this,"componentInstance",null);es(this,"componsenExposed",null);es(this,"params");es(this,"isEditor",!1);es(this,"_destroyed",!1)}init(n){var l,u,c,d;if(!n){console.error("[Vue3CellWrapper] Missing params");return}const s=performance.now();this.params=n,this.isEditor=kCe(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 o=n.context.apiClass,i=n,r={component:e,params:Object.freeze(n),disabled:!1,readOnly:i.readOnly??!1,value:n.value,maxRating:i.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:o,tooltip:i.tooltip??void 0,isSearching:i.isSearching??!1,isFiltering:i.isFiltering??!1,isNoData:i.isNoData??!1,config:i.config,sceneId:(i==null?void 0:i.sceneId)||void 0};this.vNode=ge(ACe,r),Yw(this.vNode,this.container);const a=performance.now()-s;a>OCe&&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():MCe(this.container)}getValue(){var n,s,o;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((o=(s=this.componentInstance).getValue)==null?void 0:o.call(s))??this.componentInstance.value:(console.warn("[Vue3CellWrapper] getValue() called but component instance not available"),(n=this.params)==null?void 0:n.value)}isPopup(n){var r,a,l,u,c;const s=(l=(a=(r=this.params)==null?void 0:r.colDef)==null?void 0:a.field)==null?void 0:l.includes("metric"),o=((u=this.params)==null?void 0:u.context)&&Fd(this.params.context);return s||(o==="number"||o==="rating")||!this.isEditor?!1:(c=this.componentInstance)!=null&&c.isPopup?this.componentInstance.isPopup():!0}getPopupPosition(){var s,o,i;return this.isEditor?(s=this.componentInstance)!=null&&s.getPopupPosition?this.componentInstance.getPopupPosition():((i=(o=this.params)==null?void 0:o.colDef)==null?void 0:i.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(o){console.warn("[Vue3CellWrapper] Error during $destroy:",o)}try{typeof n.destroy=="function"&&n.destroy()}catch(o){console.warn("[Vue3CellWrapper] Error during destroy():",o)}}(typeof queueMicrotask=="function"?queueMicrotask:o=>Promise.resolve().then(o))(()=>{try{Yw(null,this.container)}catch(o){console.warn("[Vue3CellWrapper] Error during unmount:",o)}finally{this.container.textContent=""}})}catch(n){console.error("[Vue3CellWrapper] Error during cleanup:",n)}finally{this.vNode=null,this.componentInstance=null}}}}function Iy(e){return AB(e)}function kB(e){return AB(e)}let OB=!1;OB||(jJ.registerModules([ege,eV]),OB=!0);class NCe{constructor(t,n){es(this,"gridApi",null);es(this,"container");es(this,"config");es(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:s,onRowSelected:o,...i}=this.config,r={...i,onGridReady:a=>{this.gridApi=a.api,t&&t(a)},onCellClicked:a=>{n&&n(a)},onCellFocused:a=>{s&&s(a)},onRowSelected:a=>{o&&o(a)}};return this.gridApi=Sue(this.container,r),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 s={add:[t],addIndex:n==="bottom"?void 0:0};if(this.gridApi.applyTransaction(s),n==="bottom"){const o=this.gridApi.getDisplayedRowCount();o>0&&this.gridApi.ensureIndexVisible(o-1,"bottom")}}}addRows(t,n="bottom"){if(this.gridApi&&t.length>0){const s={add:t,addIndex:n==="bottom"?void 0:0};if(this.gridApi.applyTransaction(s),n==="bottom"){const o=this.gridApi.getDisplayedRowCount();o>0&&this.gridApi.ensureIndexVisible(o-1,"bottom")}}}destroy(){this.gridApi&&(this.eventListeners.forEach((t,n)=>{t.forEach(s=>{var o;(o=this.gridApi)==null||o.removeEventListener(n,s)})}),this.eventListeners.clear(),this.gridApi.destroy(),this.gridApi=null)}getApi(){return this.gridApi}switchTheme(t){document.body.dataset.agThemeMode=t==="dark"?"dark":"light"}}const LCe=$N.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"),VCe=rt({__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"],setup(e,{expose:t,emit:n}){const s=e,o=n,i=B(null);sS(i,()=>{var v;const g=(v=r.value)==null?void 0:v.getApi();g==null||g.clearFocusedCell()});const r=B(null),a=Y(()=>({width:"100%",height:s.height||"500px"})),l=Y(()=>({...s,theme:LCe}));function u(){if(!i.value){console.warn("Grid container element not found");return}const g={...l.value,height:s.height};r.value=new NCe(i.value,g),r.value.init(),c()}function c(){var v;const g=((v=r.value)==null?void 0:v.getApi())??null;o("onGridReady",g)}function d(g){var C,S;if(!g)return;(C=r.value)==null||C.updateColumnDefs(g);const v=g.map(b=>b.field&&b.width&&!b.hide?{colId:b.field,width:b.width}:null).filter(b=>b!==null);(S=r.value)==null||S.setColumnWidth(v)}function h(){var g;(g=r.value)==null||g.destroy(),r.value=null}function f(){var g;return((g=r.value)==null?void 0:g.getApi())||void 0}function p(){return r.value||null}return nt(()=>s.columnDefs,(g,v)=>{const C=g==null?void 0:g.filter(b=>!b.hide).map(b=>b.field).join(","),S=v==null?void 0:v.filter(b=>!b.hide).map(b=>b.field).join(",");C!==S&&d(g)},{deep:!0}),vs(()=>{h()}),t({gridApi:f,gridManager:p,syncColumnDefs:d}),tn(()=>{u()}),vs(()=>{h()}),(g,v)=>(j(),ce("div",{ref_key:"gridContainerRef",ref:i,style:dn(a.value),class:Q(["ag-theme-quartz",["ag-table-container",s.isSorting?"is-sorting":""]])},null,6))}});function Pd(e){return kB(e)}const BCe=()=>[...[{headerName:"Name",field:"name",sortable:!1,filter:!1,pinned:"left",headerComponent:Pd(Ru),suppressMovable:!0},{headerName:"Assignee",field:"assignees",sortable:!1,filter:!1,headerComponent:Pd(Ru)},{headerName:"Status",field:"status",sortable:!1,filter:!1,headerComponent:Pd(Ru)},{headerName:"Date Range",field:"dateRange",sortable:!1,filter:!1,headerComponent:Pd(Ru)},{headerName:"Last Updated",field:"lastUpdated",sortable:!1,filter:!1,headerComponent:Pd(Ru),cellRendererParams:n=>{var s,o,i;return{...n,value:(s=n==null?void 0:n.data)==null?void 0:s.lastUpdated.value,tooltip:((i=(o=n==null?void 0:n.data)==null?void 0:o.lastUpdated)==null?void 0:i.tooltip)||void 0,readOnly:!0}}},{headerName:"Completed On",field:"completedOn",sortable:!1,filter:!1,headerComponent:Pd(Ru),cellRendererParams:n=>{var s,o,i;return{...n,value:(s=n==null?void 0:n.data)==null?void 0:s.completedOn.value,tooltip:((i=(o=n==null?void 0:n.data)==null?void 0:o.completedOn)==null?void 0:i.tooltip)||void 0,readOnly:!0}}}].map(n=>vp.fromType(n))],xy={WIDTH:60,HEADER_CLASS:"ag-checkbox-header"},$Ce={field:"blank",headerName:"",flex:1,editable:!1,sortable:!1,filter:!1,cellClass:"ag-cell-optimized",suppressMovable:!0,suppressNavigable:!0,suppressAutoSize:!1,suppressSizeToFit:!1},HCe=()=>({field:"__checkboxSelection",checkboxSelection:!0,headerCheckboxSelection:!0,pinned:"left",width:xy.WIDTH,minWidth:xy.WIDTH,maxWidth:xy.WIDTH,cellClass:"ag-checkbox-cell",headerClass:xy.HEADER_CLASS,headerComponent:Iy(wge),suppressMovable:!0}),GCe={headerName:"",field:"options",sortable:!1,filter:!1,editable:!0,pinned:"right",lockPosition:!0,suppressMovable:!0,resizable:!1},UCe=(e,t,n)=>{const{getCachedValue:s,setCachedValue:o}=Dh({dbName:"item_table_column_configs",storeName:"column_configs"}),i=async()=>{const c=await s(t);if(c&&typeof c=="string")try{return JSON.parse(c)}catch(d){return console.error("Failed to parse cached column config:",d),null}return null},r=B([]),a=HCe(),l=async c=>{const d=await i(),h=new Map;d==null||d.forEach(F=>{F.width&&h.set(F.field,F.width)});const f=BCe(),p=vp.fromType(GCe),v=((c==null?void 0:c.map(F=>{var k;return{headerName:F.name,field:`metric_${F.id}`,editable:((k=F==null?void 0:F.auth_permission)==null?void 0:k.permission)==2,sortable:!0,filter:!1,flex:1,context:{...F},hide:!(F.is_primary||F.is_point_metric),cellClass:"ag-cell-optimized",headerComponent:Iy(Ru),headerComponentParams:O=>({headerType:F.metric_type.code=="number"||F.metric_type.code=="formula"?"number":"default"}),width:h.get(`metric_${F.id}`)}}))||[]).map(F=>vp.fromType(F)),C=[a,...f,...v,$Ce,p],S=C.filter(F=>F.pinned==="left"),b=C.filter(F=>F.pinned==="right"||F.field==="blank"),w=C.filter(F=>!F.pinned&&F.field!=="blank");if(!d||d.length===0){r.value=C;return}const _=new Map(d.map(F=>[F.field,F])),R=new Map(w.map(F=>[F.field,F])),T=[];for(const F of d)if(F.field&&R.has(F.field)){const k=R.get(F.field);T.push({...k,hide:F.hide,width:F.width}),R.delete(F.field)}const I=Array.from(R.values()),x=[...T,...I],P=S.map(F=>{const k=_.get(F.field);return k!=null&&k.width?{...F,width:k.width}:F}),D=b.map(F=>{const k=_.get(F.field);return k!=null&&k.width?{...F,width:k.width}:F});r.value=[...P,...x,...D]};nt(e,c=>l(c),{immediate:!0});const u=Ti((c,d)=>{var C,S;if(c.source!==void 0)if(["uiColumnResized","uiColumnMoved","api"].indexOf(c.source)===-1){console.warn("Skipping saveColumnConfig for source:",c.source);return}else console.warn("Executing saveColumnConfig for source:",c.source);else console.warn("Executing saveColumnConfig for source:",c);const h=(C=n==null?void 0:n.value)==null?void 0:C.getColumnDefs(),f=(S=n==null?void 0:n.value)==null?void 0:S.getColumnState().reduce((b,w)=>(b[w.colId]=Number(w.width),b),{}),p=new Map;Object.entries(f||{}).forEach(([b,w])=>{p.set(b,w)}),r.value=h||r.value;const g=h==null?void 0:h.filter(b=>!b.pinned&&b.field!=="blank"),v=(g==null?void 0:g.map(b=>({field:b.field,hide:b.hide,width:p.get(b.field)||b.width,pinned:b.pinned})))||[];d&&o(t,JSON.stringify(v))},rr);return{columnDefs:r,checkboxColumn:a,saveColumnConfig:u}},WCe=()=>{const e=_n.getInstance().getItem("API_BASE_URL");return e!=null&&e.includes("v1")?e.slice(0,e.lastIndexOf("/v1")):String(e)},zCe=e=>{var F,k,O;const{showMessage:t,showErrorNetMessage:n}=Qf(),s=Yn(),o={domainApi:WCe(),wsCode:_n.getInstance().getItem("ws.code"),entityId:e.value.entityId},i=(O=(k=(F=s==null?void 0:s.appContext)==null?void 0:F.config)==null?void 0:k.globalProperties)==null?void 0:O.apiConfig;if(!i||o.domainApi===""||o.wsCode==="")throw new Error("API configuration is missing in useItems");const r=new Lk(i,o);r.on("call-api",$=>{$.success?t($.apiCode,"success"):n($)});const a=So({}),l=B([]),u=B(!1),c=B(null),d=B(null),h=B(1),f=B(20);let p=Promise.resolve();const{setCachedUsers:g}=L7(),v=$=>({workspaceId:e.value.workspaceId,entityIds:[e.value.entityId],orderBy:"id-asc",include_permission:"{include_permission}",include_permission_names:!0,q:$}),C=50,S=async($,q,J)=>{if(!$.length)return[];const ee=Z4($,q);return(await Promise.all(ee.map(J))).flat()},b=async $=>{try{return(await r.getPermissionForItems({workspaceId:e.value.workspaceId,itemIds:$})).data.map(J=>[J==null?void 0:J.id,J.permission])}catch(q){return console.error("Failed to fetch item permissions chunk:",q),[]}},w=async($,q)=>{try{const J=await r.getMetricValues({workspaceId:e.value.workspaceId,item_ids:$,per_page:$.length*q.length,metric_ids:q}),ee=J.data.map(ve=>{const te=new Map(ve.item_metrics.map(V=>[V.metric_id,{value:V.value,auth_permission:V==null?void 0:V.auth_permission}])),N=Object.fromEntries(q.map(V=>[V,te.get(V)??null]));return[ve==null?void 0:ve.id,N]}),X=new Set(J.data.map(ve=>ve==null?void 0:ve.id));for(const ve of $)if(!X.has(ve)){const te=Object.fromEntries(q.map(N=>[N,{value:null,auth_permission:void 0}]));ee.push([ve,te])}return ee}catch(J){return console.error("Failed to fetch a chunk of metric values:",J),$.map(X=>[X,Object.fromEntries(q.map(ve=>[ve,void 0]))])}},_=async $=>{try{const q=await r.getAssignedUser({workspaceId:e.value.workspaceId,item_ids:$,per_page:$.length}),J=q.data.flatMap(ee=>ee.assignees);return g(J),q.data.map(ee=>[ee==null?void 0:ee.id,ee==null?void 0:ee.assignees])}catch(q){return console.error("Failed to fetch a chunk of assigned users:",q),[]}},R=async $=>{if(!$.length)return console.warn("getPermissionForItems: Empty itemIds"),{};try{const q=await S($,C,b);return Object.fromEntries(q)}catch(q){return console.error("Failed to fetch item permissions:",q),{}}},T=async($,q)=>!$.length||!q.length?{}:(p=p.then(async()=>{try{const X=[];let ve=0;for(let N=0;N<q.length;N+=5){ve++;const V=q.slice(N,N+5),ne=[];for(let pe=0;pe<V.length;pe++){const ae=V[pe],re=await S($,C,W=>w(W,[ae]));ne.push(re),await new Promise(W=>setTimeout(W,500))}X.push(...ne);const ie=N+5>=q.length}const te={};for(const N of X.flat()){const[V,ne]=N;te[V]||(te[V]={}),Object.assign(te[V],ne)}return te}catch(J){return console.error("Failed to fetch metric values:",J),{}}}),p),I=async $=>{if(!$.length)return console.warn("getAssignedUsers: Empty itemIds"),{};try{const q=await S($,C,_);return Object.fromEntries(q)}catch(q){return console.error("Failed to fetch assigned users:",q),{}}};return{items:l,loading:u,error:c,pagination:d,currentPage:h,pageSize:f,cusorMap:a,fetchItems:async $=>{const{cursor:q,offset:J,size:ee,searchQuery:X}=$;let ve=[];u.value=!0,c.value=null;try{const te=await r.getAllItem_cursor({...$,cursor:q||void 0,offset:J||void 0,pageSize:ee||f.value,...v(X),sortBy:$.sort_by});return l.value=te.data,d.value=te.meta,h.value=te.meta.current_page||0,ve=te.data.map(N=>N==null?void 0:N.id),te}catch(te){throw c.value=te,console.error("Failed to fetch items (cursor):",te),te}finally{const te=async()=>{try{const[N,V]=await Promise.all([I(ve),R(ve)]);e.value.updateItemData({assignees:N,permission:V},ve);const ne=await T(ve,e.value.metricIds);e.value.setMetricValues(ne,new Set(ve),e.value.metricIds)}catch(N){console.error("Post-fetch processing failed:",N)}};u.value=!1,setTimeout(te)}},getAssignableStatus:async $=>{try{return await r.getAssignableStatus({workspaceId:e.value.workspaceId,itemIds:$})}catch(q){throw console.error("Failed to fetch assignable status:",q),q}},getMetricList:async $=>{try{return await r.getMetricList({workspaceId:e.value.workspaceId,entityId:$})}catch(q){throw console.error("Failed to fetch metric list:",q),q}},getMetricValues:T,getAssignedUsers:I}};function jCe(e){return{updateRowData:(s,o)=>{if(!e.value)return;const i=[],r=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);o.forEach(u=>{var d;const c=(d=e.value)==null?void 0:d.getRowNode(u);if(c){if(i.push(c),s.assignees){const h=E7((s.assignees[u]||[]).map(xF));c.data.assignees=h,r.add("assignees")}s.permission&&(c.data.permissions=s.permission[u]),l.forEach(h=>{c.data[h]=c.data[h]??null})}}),r.add("assignees"),r.add("status"),r.add("dateRange"),r.add("moreActions"),r.add("name"),e.value.refreshCells({rowNodes:i,columns:Array.from(r),force:!0})},setMetricValues:(s,o,i)=>{const r=e.value;if(!r)return;const a=new Map(Array.from(o).map(u=>[u,new Map(i.map(c=>[c,{value:null,auth_permission:void 0}]))]));Object.entries(s).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=r.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&&r.refreshCells({rowNodes:l,columns:Array.from(i).map(u=>`metric_${u}`),force:!0})}}}function KCe(e,t,n,s,o){let i=!0;return{async getRows(r){try{s(!0),i&&(o(!0),i=!1);const a=Math.floor(r.startRow/t)+1,{rows:l,total:u}=await e({page:a,pageSize:t,filterText:n(),sort_by:r.sortModel});let c=-1;Number.isFinite(u)?c=u:l.length<t&&(c=r.startRow+l.length),r.context={pageSize:t,text:n()},r.successCallback(l,c),s(!1),o(!1)}catch(a){console.error("Datasource fetch error:",a),r.failCallback(),s(!1),o(!1)}}}}function qCe(e){const{selectRowData:t,isSidebarOpen:n,quickFilterText:s,gridApi:o,fetcher:i}=e,r=B(!0),a=B(!0),l=B(!1),u=()=>{n.value=!n.value},c=v=>{if(r.value=!1,o.value=v,!v)return null;const{addEventListener:C,setGridOption:S}=v;if(!i)return console.error("Fetcher function is undefined"),null;const b=KCe(i,e.perPage,()=>s.value,w=>{r.value=w},w=>{a.value=w});return S==null||S("datasource",b),C==null||C("selectionChanged",()=>{t.value=v.getSelectedRows()}),v||null},d=v=>{var C,S;if((C=o.value)==null||C.hideOverlay(),v!==void 0&&(s.value=v),(S=o.value)==null||S.deselectAll(),t.value=[],r.value=!0,!o.value||!i){console.error("Grid API or fetcher is not available"),r.value=!1;return}l.value=!0,a.value=!0,o.value.purgeInfiniteCache(),o.value.ensureIndexVisible(0,"top"),setTimeout(()=>{r.value=!1,setTimeout(()=>{l.value=!1},100)},300)},h=()=>{var v;(v=o.value)==null||v.deselectAll(),t.value=[]},f=Ti(v=>{d(v)},rr),p=()=>{o.value},g=B(!1);return{isLoading:r,toggleSidebar:u,onGridReady:c,onSearch:f,handleUnSelect:h,firstLoad:a,cacheCleared:l,handleSelectAll:p,isSelectAll:g}}const YCe={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."]}}},ZCe=e=>{var t;return(t=Object.entries(YCe.changelog).find(([n,s])=>n===e))==null?void 0:t[1].changes},XCe={key:1},JCe=_t(rt({__name:"PopupOverwriteScenes",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const s=B(null),o=e,i=()=>{s.value&&s.value.show()},r=B(""),a=B("idle"),l=B({file:null,format:null}),{apiServices:u}=ts(!1,{}),c=B(!1),d=async()=>{c.value=!0;const T=o.workspaceId,I=o.entityId;if(!T||!I||!u.value){console.error("Workspace ID or Entity ID is missing");return}try{if(!await u.value.downloadExportedItemsFile(T,I))throw new Error("No response from downloadTemplate API")}catch(x){console.error("Error downloading template:",x)}c.value=!1},h=n,f=()=>{h("import-success"),S()},p=async T=>{var P,D,F;const I=new FormData,x=((P=T.name.split(".").pop())==null?void 0:P.toString())||"";if(I.append("file",T),I.append("format",x),I.append("entity_id",o.entityId||""),!u.value){console.error("API services not available");return}try{await u.value.overwriteScenesViaImportFile(o.workspaceId,o.entityId,I),g()}catch(k){throw console.error("Error uploading file:",k),v(((F=(D=k.response)==null?void 0:D.data)==null?void 0:F.message)||"An unknown error occurred during file upload."),k}},g=()=>{a.value="success"},v=T=>{r.value=T,a.value="error"},C=async()=>{!l.value||!l.value.file||await p(l.value.file)},S=()=>{var T;R(),(T=s.value)==null||T.hide()};t({close:S,open:i});const b=Y(()=>({error:"Import failed",importing:"Import in progress",success:"Import successful",idle:"Update existing work"})[a.value]),w=Y(()=>l.value.file?!1:(console.error("No file selected"),!0)),_=B(null),R=()=>{var T;(T=_.value)==null||T.clear(),r.value="",l.value={file:null,format:null},a.value="idle"};return(T,I)=>(j(),qe(U(dV),{"popup-name":b.value,"show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:s,onHidden:R},nh({default:me(()=>[a.value==="importing"||a.value==="error"||a.value==="success"?(j(),qe(TB,{key:0,state:a.value,"error-message":r.value,overwrite:!0},null,8,["state","error-message"])):(j(),ce("div",XCe,[Ee("div",{class:Q(T.$style["step-section"])},[Ee("span",{class:Q(T.$style["step-title"])},"Step 1: Download current data",2),Ee("span",{class:Q(T.$style["step-description"])},[...I[1]||(I[1]=[tt(" Download a file with all existing work and details. Edit it, then upload in Step 2. ",-1),Ee("br",null,null,-1),Ee("i",null,"Note: Empty cells and unchanged values will be skipped.",-1)])],2),ge(U(mt),{class:Q(T.$style["download-sample-btn"]),size:12,variant:"secondary",disabled:c.value,onHandleClick:d},{prefix:me(()=>[ge(U(lt),{src:"Download"})]),default:me(()=>[I[2]||(I[2]=tt(" Download file ",-1))]),_:1},8,["class","disabled"])],2),Ee("div",{class:Q(T.$style["step-section"])},[Ee("span",{class:Q(T.$style["step-title"])},"Step 2: Upload updated file (.xlsx, .xls, .csv)",2),ge(U(ZV),{modelValue:l.value,"onUpdate:modelValue":I[0]||(I[0]=x=>l.value=x),ref_key:"filUploaderRef",ref:_},null,8,["modelValue"])],2),Ee("div",{class:Q(T.$style["step-section"]),style:{"padding-top":"0","padding-bottom":"0"}},[ge(IB)],2)]))]),_:2},[a.value==="idle"?{name:"footer",fn:me(()=>[ge(U(mt),{style:{flex:"1"},variant:"secondary",onClick:S},{default:me(()=>[...I[3]||(I[3]=[tt(" Cancel ",-1)])]),_:1}),ge(U(mt),{disabled:w.value,style:{flex:"1"},variant:"primary",onClick:C},{default:me(()=>[...I[4]||(I[4]=[tt(" Import ",-1)])]),_:1},8,["disabled"])]),key:"0"}:a.value==="success"?{name:"footer",fn:me(()=>[ge(U(mt),{style:{flex:"1"},variant:"primary",onClick:f},{default:me(()=>[...I[5]||(I[5]=[tt(" Close ",-1)])]),_:1})]),key:"1"}:{name:"footer",fn:me(()=>[ge(U(mt),{style:{flex:"1"},variant:"primary",onClick:R},{default:me(()=>[...I[6]||(I[6]=[tt(" Try Again ",-1)])]),_:1})]),key:"2"}]),1032,["popup-name"]))}}),[["__cssModules",{$style:{"step-section":"_step-section_lw86z_1","step-title":"_step-title_lw86z_11","step-title-2":"_step-title-2_lw86z_17","step-description":"_step-description_lw86z_23","date-format-guide":"_date-format-guide_lw86z_28","import-error":"_import-error_lw86z_39","drop-area":"_drop-area_lw86z_49","is-dragging":"_is-dragging_lw86z_49","drop-area-content":"_drop-area-content_lw86z_52",browse:"_browse_lw86z_61","download-sample-btn":"_download-sample-btn_lw86z_65"}}]]),QCe={style:{cursor:"help"}},ebe=_t(rt({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const n=To,s=Qb(),{setUserPermissions:o,setEntityPermissions:i}=s,{entityPermissions:r}=Qs(s),a=Xt,l=B(null),u={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},c=B(""),d=Y(()=>{var Ye;const Ae=((Ye=r.value)==null?void 0:Ye.has_create_item_permission)==1||!1;return[{label:"Create manually",value:"new_scene",icon:"Plus",type:"icon",id:"create_new_scene",hide:!Ae},{label:"Import from CSV or Excel",value:"import_scenes",icon:"FileImport",type:"icon",hide:!Ae,id:"import_scenes_option"},{label:"Update existing (CSV or Excel)",value:"overwrite_scenes",icon:"FilePen",type:"icon",hide:!Ae,id:"overwrite_scenes_option"}]}),h=e;vp.initialize({wrapVueCellRenderer:Iy,wrapVueCellEditor:kB});const f=tf(),{switchInstanceFunc:p}=Qs(f);tn(()=>{const Ae=Yn();p.value=Ae==null?void 0:Ae.appContext.config.globalProperties.switchInstance;const Ye=new BroadcastChannel("focusable_channel");Ct(()=>{setTimeout(()=>{Ye.postMessage("Focusable elements updated")},7e3)})});const g=B(null),v=B([]),C=Wm(),{rowCount:S}=Qs(C),b=B(!1),w=B(""),_=B(),R=zA(),{metricList:T}=Qs(R),I=B(""),x=B(!1),P=B(new Set),D=B(new Map),{apiServices:F}=ts(!1,h),{columnDefs:k,checkboxColumn:O,saveColumnConfig:$}=UCe(T,h.entityId,g),q=B();nt(()=>k,()=>{var Ae;(Ae=q.value)==null||Ae.updateColumnDefs(k.value)},{deep:!0});const J=(Ae,Ye)=>{$(Ae,Ye)},{updateRowData:ee,setMetricValues:X}=jCe(g),ve=Y(()=>({isSearching:w.value.length>0,isFiltering:!(Object.keys(ke.value||{}).length==1&&Object.keys(ke.value)[0]=="preflight_status")&&Object.keys(ke.value||{}).length>0})),te=Y(cm),N=Y(()=>k.value.filter(Ae=>{var Ye;return((Ye=Ae.field)==null?void 0:Ye.startsWith("metric_"))&&!Ae.hide}).map(Ae=>{var Ye;return((Ye=Ae.field)==null?void 0:Ye.replace("metric_",""))||""}));Zi("timezone",te);const V=Y(()=>({autoFetch:!1,workspaceId:h.workspaceId,entityId:h.entityId,metricIds:N.value,updateItemData:ee,setMetricValues:X})),{fetchItems:ne,getMetricList:ie,cusorMap:pe,getMetricValues:ae}=zCe(V),re=Y(()=>{if(!g.value)return!1;const Ae=g.value.getSelectedRows().length;return Ae>0&&Ae>=S.value.total}),W=Y(()=>{var Ae;return((Ae=l.value)==null?void 0:Ae.name)||"Items"}),fe=Ae=>{setTimeout(()=>{Ct(()=>{var Ye,jt;g.value&&(Ae?(Ye=g.value)==null||Ye.showNoRowsOverlay():(jt=g.value)==null||jt.hideOverlay())})},500)},oe=(Ae,Ye)=>{var jt;S.value.total=Ae.meta.total??0,(jt=Ae.meta.next)!=null&&jt.cursor&&(pe[Ye+1]=Ae.meta.next.cursor),I.value=Ae.meta["X-Tsr-signature"]||"",Ae.meta.total===0?fe(!0):fe(!1)},Ie=YV(),G=B(null),{sortingAPIConfiguration:Z,isSortingRunning:de}=Qs(Ie),ke=B({preflight_status:"1"}),Pe=Y(()=>({...ke.value,search:w.value}));Zi("filterParams",Pe);const Le=B([]),ye=async({page:Ae,pageSize:Ye,filterText:jt})=>{var ku;(ku=g.value)==null||ku.hideOverlay();const sn=pe[Ae],Wi=!sn&&Ae>1?(Ae-1)*Ye:void 0,js=Z.value;js.length>0&&(de.value=!0);try{const Co={cursor:sn,size:Ye,searchQuery:jt,offset:Wi,sort_by:js,...ke.value},Pr=await ne(Co);if(!Pr)return{rows:[],total:0};const Kn=(ya=>{const gi=ya.data.map(Ou=>PF(Ou,te.value));return gi.forEach(Ou=>{P.value.add(String(Ou.id)),D.value.set(String(Ou.id),{})}),gi})(Pr);return oe(Pr,Ae),{rows:Kn,total:S.value.total}}catch(Co){return console.error("Failed to fetch items:",Co),{rows:[],total:0}}finally{de.value=!1}},{isLoading:M,toggleSidebar:H,onGridReady:le,handleUnSelect:Ge,handleSelectAll:we,onSearch:ze,firstLoad:Ue}=qCe({selectRowData:B([]),isSidebarOpen:b,quickFilterText:w,gridApi:g,perPage:u.ROWS_PER_PAGE,fetcher:ye}),Se=B([]),Ve=()=>{var Ae;Se.value=((Ae=g.value)==null?void 0:Ae.getSelectedRows())||[]},pt=So({columnsDisplay:[],rowsDisplay:{fromIndex:0,toIndex:0}}),At=Y(()=>({blockLoadDebounceMillis:1e3,columnDefs:k.value,rowModelType:"infinite",cacheBlockSize:u.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:u.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:u.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:Ut,noRowsOverlayComponent:Iy(ive),noRowsOverlayComponentParams:()=>ve.value,defaultColDef:{editable:!1,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:Ae=>Ae.data.id,getRowClass:Ae=>{if(!Ae.data)return["row-empty"];const Ye=["row-highlight"];return Ae.data.id||Ye.push("row-inactive"),Ae.data.isDeleted&&Ye.push("row-deleted"),Ae.data.disabled&&Ye.push("row-deleted"),Ae.data.isArchived&&Ye.push("row-archived"),Ae.data.isLocked&&Ye.push("row-locked"),Ye},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:h.workspaceId,entityId:h.entityId,apiServices:F.value,sorting:de.value},onCellKeyDown:Ae=>{var Ye,jt,sn;if(Ae.data.isDeleted)return!1;if(((Ye=Ae==null?void 0:Ae.event)==null?void 0:Ye.key)==="Enter"){const{api:Wi,node:js,column:ku}=Ae,Co=Wi.getCellRendererInstances({rowNodes:[js],columns:[ku]});if(Co.length>0){const Pr=Co[0];Pr&&typeof((jt=Pr.componsenExposed)==null?void 0:jt.focus)=="function"&&((sn=Pr.componsenExposed)==null||sn.focus())}}},isRowSelectable:Ae=>!Ae.group,suppressKeyboardEvent:Ae=>{var sn;if((sn=Ae.data)!=null&&sn.isDeleted)return!0;const Ye=Ae.event.key,jt=Ae.editing;return jt&&Ye==="Tab"?!0:jt&&Ye==="Enter"?!1:Ye==="Enter"?(Ae.event.preventDefault(),Ae.event.stopPropagation(),!0):Ye==="ArrowUp"||Ye==="ArrowDown"||Ye==="ArrowLeft"||Ye==="ArrowRight"||Ye==="Tab"||Ye==="Enter"},navigateToNextCell:()=>null,onBodyScroll:Ae=>{const Ye=Ae.api.getFirstDisplayedRowIndex(),jt=Ae.api.getLastDisplayedRowIndex();pt.rowsDisplay.fromIndex=Ye,pt.rowsDisplay.toIndex=jt,pt.columnsDisplay=Ae.api.getAllDisplayedVirtualColumns().map(sn=>sn.getColId())},onViewportChanged:Ae=>{pt.columnsDisplay=Ae.api.getAllDisplayedVirtualColumns().map(Ye=>Ye.getColId())},suppressHeaderFocus:!0,onCellEditingStarted(Ae){if(Ae.data.isDeleted&&Ae.api.stopEditing(),Ae.colDef.field=="options"){const Ye=Ae.api.getCellRendererInstances({rowNodes:[Ae.node],columns:[Ae.column]});Ye.length>0&&Ye[0].focusUi()}},tabToNextCell:Ae=>{let Ye=Ae.nextCellPosition;if(Ye&&Ye.column.getColId()==="ag-Grid-SelectionColumn"){const jt=Ae.api.getAllDisplayedColumns(),sn=jt.indexOf(Ye.column),Wi=Ae.backwards?-1:1,js=jt[sn+Wi];if(js)return{rowIndex:Ye.rowIndex,column:js,rowPinned:Ye.rowPinned}}return Ye}}));function Ut(){if(!g.value)return;let Ae=0;g.value.forEachNode(Ye=>{Ye.data&&Ae++}),S.value.loaded=Math.min(Ae,S.value.total)}nt(()=>Z,()=>{g.value&&(I.value="",P.value.clear(),g.value.deselectAll(),Object.keys(pe).forEach(Ae=>delete pe[Number(Ae)]),g.value.purgeInfiniteCache(),g.value.ensureIndexVisible(0))},{deep:!0});const Jt=B(),zt=B(),Ne=()=>{var Ae;(Ae=zt.value)==null||Ae.open()},je=()=>{var Ae;(Ae=Jt.value)==null||Ae.open()},yt=async()=>{Ue.value=!0,g.value&&(I.value="",P.value.clear(),Object.keys(pe).forEach(Ae=>delete pe[Number(Ae)]),await g.value.deselectAll(),await g.value.ensureIndexVisible(0,"top"),await g.value.purgeInfiniteCache(),await g.value.refreshInfiniteCache())},Ot=Y(()=>_n.getInstance().getItem("ITEM_TABLE_APP_VERSION")||""),Wt=B(),st=Y(()=>{var Ae;return(Ae=ZCe(Ot.value))==null?void 0:Ae.map(Ye=>`<div>• ${Ye}</div>`).join(`
|
|
253
|
-
`)});function ps(Ae){var Ye;Ae==="new_scene"?(Ye=Wt.value)==null||Ye.show():Ae==="import_scenes"?je():Ae==="overwrite_scenes"&&Ne()}const Ui=Ae=>{v.value=Ae.api.getSelectedRows().map(Ye=>Ye.id)},pl=Ae=>{const Ye=le(Ae);return Ye&&(Ye.addEventListener("modelUpdated",Ut),Ye.addEventListener("bodyScroll",()=>Ye.stopEditing()),Ye.addEventListener("selectionChanged",Ve),Ye.addEventListener("columnMoved",sn=>J(sn,!0)),Ye.addEventListener("columnResized",sn=>J(sn,!0)),Ye.addEventListener("firstDataRendered",()=>{Ue.value=!1}),!document.querySelector(".ag-body-viewport")),Ye},wo=()=>{var Ae;c.value=(((Ae=document.getElementById("item-table-layout-id"))==null?void 0:Ae.clientHeight)??0)-78+"px"};tn(()=>{Ct(()=>{wo()}),window.addEventListener("resize",wo);function Ae(){requestAnimationFrame(Ae)}Ae()}),vs(()=>{window.removeEventListener("resize",wo)});const va=async({code:Ae,name:Ye})=>{await ze(Ae),setTimeout(()=>{var jt;(jt=_.value)==null||jt.setValue(Ye)},300)},gl=Ae=>{if(!g.value)return;const Ye=g.value.getRowNode(Ae);Ye?(g.value.ensureIndexVisible(Number(Ye.rowIndex),"middle"),g.value.flashCells({rowNodes:[Ye],flashDuration:3e3,fadeDuration:1e3})):g.value.ensureIndexVisible(S.value.total-1,"bottom")},Ir=Ae=>Ae.metric_type.code==="number"?"number":"default",xr=async()=>{if(h.entityId)try{const Ae=await ie(h.entityId);T.value=Ae.data.map(Ye=>({...Ye,sortType:Ir(Ye)}))}catch(Ae){console.error("Failed to initialize metric list:",Ae),T.value=[]}},pi=async()=>{if(F.value)try{const Ae=await F.value.getUserPermission(h.workspaceId);o(Ae)}catch(Ae){console.error("Failed to fetch user permissions:",Ae)}},Fr=async()=>{if(F.value)try{const Ae=await F.value.getEntityDetail(h.workspaceId,h.entityId);i(Ae.permission),l.value=Ae}catch(Ae){console.error("Failed to fetch entity details:",Ae)}},Au=my(),{setUser:kn}=Au,gs=async()=>{if(F.value)try{const Ae=await F.value.getMe();return kn(Ae),Ae}catch(Ae){console.error("Failed to fetch user details:",Ae)}},__=async()=>{var Ae;if(F.value)try{const Ye=await F.value.getWorkspaces(h.workspaceId),jt=(Ae=Ye.data[0])==null?void 0:Ae.ws_user_role_id;return jt&&Au.setUserRoleId(jt),Ye}catch(Ye){console.error("Failed to fetch workspace details:",Ye)}};nt(()=>[h.entityId,h.workspaceId],async([Ae,Ye])=>{!Ae||!Ye||(gs(),__(),xr(),pi(),Fr())},{immediate:!0,deep:!0}),nt(N,(Ae,Ye)=>{const jt=Ae.filter(sn=>!(Ye!=null&&Ye.includes(sn)));jt.length>0&&ae(Array.from(P.value),jt).then(sn=>{X(sn,P.value,jt)})},{immediate:!0,deep:!0}),nt(I,(Ae,Ye)=>{x.value=!!(Ye&&Ae&&Ye!==Ae)}),t({refreshTable:yt});const Ad=Ae=>{ke.value=Ae,yt()},kd=Ae=>{Le.value=Ae,yt()},Od=Ae=>{k.value=Ae||[],J({},!0)},R_=Y(()=>{var sn;const Ae=_n.getInstance().getItem("ws.terminology"),Ye=Ae?JSON.parse(Ae):null;return`New ${((sn=Ye==null?void 0:Ye.find(Wi=>Wi.code==="scene"))==null?void 0:sn.name)||"Scene"}`});return(Ae,Ye)=>{const jt=Eo("focusable");return j(),qe(U(pge),{"is-sidebar-open":b.value,onCloseSidebar:U(H),onSidebarClear:U(H),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:U(H)},{"header-left":me(()=>{var sn;return[((sn=U(r))==null?void 0:sn.has_create_item_permission)==1?(j(),qe(U(_0),{key:0,variant:["primary"],options:d.value,onSelect:ps,onHandleClick:Ye[1]||(Ye[1]=Wi=>ps("new_scene")),id:"create_scene_dropdown",tabIndex:2},{prefix:me(()=>[Ke(ge(U(mt),{"data-focus-index":"1",id:"create_new_scene",variant:["primary"],onClick:Ye[0]||(Ye[0]=Wi=>ps("new_scene")),label:R_.value},null,8,["label"]),[[jt,1]])]),_:1},8,["options"])):Je("",!0),Ee("div",{class:Q(Ae.$style["beta-tag"])},"Beta",2),Ke((j(),ce("span",QCe,[tt(wt(Ot.value),1)])),[[U(a),st.value||""]])]}),"header-actions":me(()=>[ge(U(Gve),{"onUpdate:assignees":kd,onApplyFilter:Ad,loading:U(Ue),entityId:h.entityId},null,8,["loading","entityId"]),Ke(ge(U(iS),{focusIndex:"4",modelValue:w.value,"onUpdate:modelValue":Ye[2]||(Ye[2]=sn=>w.value=sn),onSearch:U(ze),class:Q(Ae.$style.itemSearchBox),onClear:Ye[3]||(Ye[3]=sn=>U(ze)("")),id:"item_search_box",ref_key:"searchBoxRef",ref:_},null,8,["modelValue","onSearch","class"]),[[U(n),{isLoading:U(Ue),fullwidth:!0}]]),Ke((j(),qe(U($A),{status:U(M)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":x.value},{default:me(()=>[Ke((j(),qe(U(mt),{variant:["secondary","icon"],disabled:U(M),onClick:yt},{default:me(()=>[ge(U(lt),{src:"ArrowsRotate"})]),_:1},8,["disabled"])),[[jt,5],[U(a),"Refresh"]])]),_:1},8,["status","show-badge"])),[[U(n),{isLoading:U(Ue),fullwidth:!0}]]),Ke(ge(U(Hme),{"model-value":U(k),onChange:Ye[4]||(Ye[4]=sn=>Od(sn)),id:"table_customization",gridApi:g.value,ref_key:"tableCustomizationRef",ref:q,"checkbox-column":U(O),tableHeight:c.value},null,8,["model-value","gridApi","checkbox-column","tableHeight"]),[[U(n),{isLoading:U(Ue),fullwidth:!0}]])]),grid:me(({availableHeight:sn})=>[ge(U(VCe),nn({id:"item_table_main",ref_key:"agGrid",ref:G},At.value,{height:sn+"px",isSorting:U(de),onOnGridReady:pl,onSelectionChanged:Ui}),null,16,["height","isSorting"])]),footer:me(()=>[Ee("div",{class:Q(Ae.$style.tableFooter),id:"table_footer"},[Ee("span",null,[Ye[5]||(Ye[5]=tt(" Showing ",-1)),Ee("b",null,wt(U(S).loaded)+" of "+wt(U(S).total),1)])],2)]),"new-row":me(()=>[ge(U(yve),{ref_key:"createNewSceneRef",ref:Wt,onSearchForCode:va,onFocusOnId:gl},null,512)]),"bulk-update-actions":me(()=>[!b.value&&v.value.length>0?Ke((j(),qe(U(rge),{key:0,selectRowData:Se.value,"workspace-id":h.workspaceId,"entity-id":h.entityId,"grid-api":g.value,onUnselect:U(Ge),onSelectAll:U(we),"take-name":W.value,"selected-all":re.value,"total-rows":U(S).total,"visible-rows":U(S).loaded,onUpdated:Ve,loading:U(M)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","onSelectAll","take-name","selected-all","total-rows","visible-rows","loading"])),[[Do,!b.value&&v.value.length>0]]):Je("",!0)]),snackbar:me(()=>[ge(U(Zge))]),popup:me(()=>[ge(RCe,{ref_key:"popupCreateSceneRef",ref:Jt,"workspace-id":h.workspaceId,"entity-id":h.entityId,onImportSuccess:yt},null,8,["workspace-id","entity-id"]),ge(JCe,{ref_key:"popupOverwriteScenesRef",ref:zt,"workspace-id":h.workspaceId,"entity-id":h.entityId,onImportSuccess:yt},null,8,["workspace-id","entity-id"])]),_: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"}}]]),MB="0.1.
|
|
252
|
+
Refresh to see updates.`),3)],64)):Je("",!0)],2))}}),[["__cssModules",{$style:{"inform-layout":"_inform-layout_16bpq_1","import-error":"_import-error_16bpq_11","step-title":"_step-title_16bpq_22","step-description":"_step-description_16bpq_27"}}]]),IB=_t(rt({__name:"DateRule",setup(e){const n=(()=>{const o=(h,f,p,g)=>{const v=document.createElement("span");return v.textContent=h,v.style.fontWeight=f,v.style.fontSize=p,v.style.color=g,v},i=document.createElement("div");i.style.display="flex",i.style.flexDirection="column";const r=document.createElement("div"),a=document.createElement("div"),l=o("Valid formats:","normal","14px","#02C39A"),u=o("Invalid formats:","normal","14px","#FF5200"),c=o(" 2025.12.31, 2025-12-31, 2025/12/31 ","normal","14px",""),d=o(" 12.31.2025, 2025.31.12","normal","14px","");return r.appendChild(l),r.appendChild(c),a.appendChild(u),a.appendChild(d),i.appendChild(r),i.appendChild(a),i.outerHTML})(),s=Xt;return(o,i)=>(j(),ce("div",{class:Q(o.$style["date-format-guide"])},[Ee("span",{class:Q(o.$style["step-title-2"])},[i[0]||(i[0]=tt(" Date format guide ",-1)),Ke(ge(U(lt),{src:"InfoCircle",color:"#A6A6A6"},null,512),[[U(s),{content:U(n)}]])],2),Ee("div",{class:Q(o.$style["date-rule-section"])},[i[3]||(i[3]=Ee("span",null,"Enter dates in one of these formats:",-1)),Ee("ul",{class:Q(o.$style["step-description"])},[Ee("li",{class:Q(o.$style["date-rule"])},[...i[1]||(i[1]=[Ee("b",null,"DD MM YYYY",-1),tt(" (Day-Month-Year) ",-1)])],2),Ee("li",{class:Q(o.$style["date-rule"])},[...i[2]||(i[2]=[Ee("b",null,"YYYY MM DD",-1),tt(" (Year-Month-Day) ",-1)])],2)],2)],2)],2))}}),[["__cssModules",{$style:{"date-format-guide":"_date-format-guide_1clky_1","step-title-2":"_step-title-2_1clky_13","date-rule-section":"_date-rule-section_1clky_25","step-description":"_step-description_1clky_29","date-rule":"_date-rule_1clky_25"}}]]),_Ce={key:1},RCe=_t(rt({__name:"PopupCreateScenes",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const s=B(null),o=e,i=()=>{s.value&&s.value.show()},r=B(""),a=B("idle"),l=Y(()=>({error:"Import failed",importing:"Import in progress",success:"Import successful",idle:"Create new work"})[a.value]),u=B(null),c=B({file:null,format:null}),{apiServices:d}=ts(!1,o),h=async P=>{var F,k;if(((F=d==null?void 0:d.value)==null?void 0:F.getTemplateFlowStatuses)===void 0){console.error("API services not available",(k=d==null?void 0:d.value)==null?void 0:k.getTemplateFlowStatuses);return}return await d.value.getTemplateFlowStatuses({workspaceId:o.workspaceId,entityId:o.entityId,...P})},f=B(!1),p=async()=>{f.value=!0;const P=o.workspaceId,D=o.entityId;if(!P||!D||!d.value){console.error("Workspace ID or Entity ID is missing");return}try{if(!await d.value.downloadTemplate(P,D))throw new Error("No response from downloadTemplate API")}catch(F){console.error("Error downloading template:",F)}f.value=!1},g=async P=>{var k,O,$;const D=new FormData,F=((k=P.name.split(".").pop())==null?void 0:k.toString())||"";if(D.append("file",P),D.append("format",F),D.append("entity_id",o.entityId||""),D.append("template_flow_status_id",_.value||""),!d.value||!o.workspaceId||!o.entityId){console.error("API services not available");return}try{await d.value.addNewSceneViaImportFile(o.workspaceId,o.entityId,D),v()}catch(q){throw console.error("Error uploading file:",q),C((($=(O=q.response)==null?void 0:O.data)==null?void 0:$.message)||"An unknown error occurred during file upload."),q}},v=()=>{a.value="success"},C=P=>{r.value=P,a.value="error"},S=n,b=()=>{S("import-success"),x()},w=async()=>{if(!c.value||!c.value.file){console.error("No file to upload");return}a.value="importing",await g(c.value.file)};t({open:i});const _=B(null),R=Y(()=>!c.value.file||!c.value.format||!c.value.isValid||!_.value),T=B(null),I=()=>{var P,D;(P=u.value)==null||P.clear(),r.value="",c.value={file:null,format:null},_.value=null,(D=T==null?void 0:T.value)==null||D.clear(),a.value="idle"},x=()=>{var P;I(),(P=s.value)==null||P.hide()};return(P,D)=>(j(),qe(U(dV),{"popup-name":l.value,"show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:s,onHidden:I},nh({default:me(()=>[a.value==="importing"||a.value==="error"||a.value==="success"?(j(),qe(TB,{key:0,state:a.value,"error-message":r.value},null,8,["state","error-message"])):(j(),ce("div",_Ce,[Ee("div",{class:Q(P.$style["step-section"])},[Ee("span",{class:Q(P.$style["step-title"])},"Step 1: Download sample file",2),Ee("span",{class:Q(P.$style["step-description"])}," Get a sample file with all columns ready for editing. ",2),ge(U(mt),{class:Q(P.$style["download-sample-btn"]),size:12,variant:"secondary",disabled:f.value,onHandleClick:p},{prefix:me(()=>[ge(U(lt),{src:"Download"})]),default:me(()=>[D[2]||(D[2]=tt(" Download sample file ",-1))]),_:1},8,["class","disabled"])],2),Ee("div",{class:Q(P.$style["step-section"])},[Ee("span",{class:Q(P.$style["step-title"])},"Step 2: Upload your file (.xlsx, .xls, .csv)",2),ge(U(ZV),{modelValue:c.value,"onUpdate:modelValue":D[0]||(D[0]=F=>c.value=F),ref_key:"filUploaderRef",ref:u},null,8,["modelValue"])],2),Ee("div",{class:Q(P.$style["step-section"])},[Ee("span",{class:Q(P.$style["step-title"])},"Step 3: Select status",2),Ee("span",{class:Q(P.$style["step-description"])},"Choose a status for the new work.",2),ge(U(nve),{ref_key:"statusRef",ref:T,modelValue:_.value,"onUpdate:modelValue":D[1]||(D[1]=F=>_.value=F),"get-status-func":h,"workspace-id":o.workspaceId,id:o.entityId},null,8,["modelValue","workspace-id","id"])],2),Ee("div",{class:Q(P.$style["step-section"]),style:{"padding-top":"0","padding-bottom":"0"}},[ge(IB)],2)]))]),_:2},[a.value==="idle"?{name:"footer",fn:me(()=>[ge(U(mt),{style:{flex:"1"},variant:"secondary",onClick:x},{default:me(()=>[...D[3]||(D[3]=[tt(" Cancel ",-1)])]),_:1}),ge(U(mt),{disabled:R.value,style:{flex:"1"},variant:"primary",onClick:w},{default:me(()=>[...D[4]||(D[4]=[tt(" Import ",-1)])]),_:1},8,["disabled"])]),key:"0"}:a.value==="success"?{name:"footer",fn:me(()=>[ge(U(mt),{style:{flex:"1"},variant:"primary",onClick:b},{default:me(()=>[...D[5]||(D[5]=[tt(" Close ",-1)])]),_:1})]),key:"1"}:a.value=="error"?{name:"footer",fn:me(()=>[ge(U(mt),{style:{flex:"1"},variant:"primary",onClick:I},{default:me(()=>[...D[6]||(D[6]=[tt(" Try Again ",-1)])]),_:1})]),key:"2"}:void 0]),1032,["popup-name"]))}}),[["__cssModules",{$style:{"step-section":"_step-section_1ml4p_1","step-title":"_step-title_1ml4p_11","step-title-2":"_step-title-2_1ml4p_17","step-description":"_step-description_1ml4p_23","date-format-guide":"_date-format-guide_1ml4p_28","import-error":"_import-error_1ml4p_39","drop-area":"_drop-area_1ml4p_49","is-dragging":"_is-dragging_1ml4p_49","drop-area-content":"_drop-area-content_1ml4p_52",browse:"_browse_1ml4p_61","download-sample-btn":"_download-sample-btn_1ml4p_65"}}]]),xB={text:il,id:void 0,assignees:dge,status:bge,dateRange:hge,isStarted:il,isCompleted:il,lastUpdated:il,completedOn:il,isDeleted:il,isArchived:il,isProcessing:il,name:aV,options:vY,metric:uV,__checkboxSelection:void 0},DCe={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},TCe={text:null,id:void 0,assignees:UA,status:Bk,dateRange:fge,isStarted:void 0,isCompleted:void 0,lastUpdated:void 0,completedOn:void 0,isDeleted:void 0,isArchived:void 0,isProcessing:void 0,name:aV,options:rV,metric:void 0,__checkboxSelection:void 0},ICe={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]},xCe={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}},FCe=e=>{var t,n,s;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((s=e.metric_type)==null?void 0:s.id)==3)return}},Fd=e=>{if(e)return FCe(e)};function FB(e,t){var o,i,r,a;const n=(o=t==null?void 0:t.data)==null?void 0:o.permissions;let s={disabled:!1,readOnly:!1,type:void 0};if(!t||!e)s={disabled:!1,readOnly:!0,type:void 0};else if(e==="options")s={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_","")}`;s={disabled:!1,readOnly:!((t==null?void 0:t.data)&&t.data[l]&&((i=t.data[l])==null?void 0:i.permission)==2&&!((r=t.colDef)!=null&&r.context.formula)&&!t.data.isLocked&&!t.data.isDeleted),type:Fd((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}[e]??0;s={disabled:u===-1,readOnly:u!==1,type:void 0}}return s}class S_{constructor(){es(this,"eGui");es(this,"params")}init(t){this.params=t}getGui(){var n,s,o,i,r;const t=document.createElement("div");return(n=this.params)!=null&&n.height&&t.style.setProperty("--height",(s=this.params)==null?void 0:s.height),(o=this.params)!=null&&o.width?t.style.setProperty("--width",(i=this.params)==null?void 0:i.width):(r=this.params)!=null&&r.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 PB=new Map;class vp{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 s=t.data||((u=t.node)==null?void 0:u.data),o=(c=t.colDef)==null?void 0:c.field,i=o&&s?s[o]:void 0,r=FB((d=t.colDef)==null?void 0:d.field,t),a=typeof n=="function"?n(t):n??{};return{...t,value:i,disabled:r==null?void 0:r.disabled,readOnly:r==null?void 0:r.readOnly,type:Fd(t.context),...a}}static resolveRendererComponent(t,n){let s;return t.includes("metric")&&xB.metric?Fd(n)==="rating"?s=Uve:s=uV:s=xB[t]??void 0,s}static resolveEditorComponent(t,n){const s=t.includes("metric");let o;const i=Fd(n);return s&&["number","dropdown"].includes(i)?o=ove:o=TCe[t],o}static canEditField(t,n){var i;if(n.data===void 0)return!1;const s=FB((i=n.colDef)==null?void 0:i.field,n),o=DCe[t]??!0;return!(s!=null&&s.disabled)&&!(s!=null&&s.readOnly)&&o&&(s==null?void 0:s.type)!=="rating"}static resolveSize(t){const[n=250,s=300]=ICe[t]??[];return{minWidth:n,maxWidth:s}}static buildHeaderComponentParams(t){return n=>typeof t=="function"?t(n):t??{}}static fromType(t){const{wrapVueCellEditor:n}=this.getWrappers(),s=String(t.field??""),o=this.resolveSize(s),i=xCe[s]??{},r=Fd(t.context),a=r==="number"||r==="rating",l=r=="rating"?t.context.range*24+20:o.minWidth;return{...t,headerName:t.headerName,...o,...t,cellEditorSelector:c=>{const d=this.resolveEditorComponent(s,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(s,c),d},minWidth:l,cellRendererSelector:c=>PCe(c,{component:n(this.resolveRendererComponent(s,t.context)),params:this.buildCommonCellParams(c,t.cellRendererParams)}),headerComponentParams:this.buildHeaderComponentParams(t.headerComponentParams),...i,cellClass:c=>`${r}--${c.colDef.field}`}}}es(vp,"wrappers",null);const PCe=(e,t)=>{var o;const n=(o=e.colDef)==null?void 0:o.field,s=`${n}-${e.node.rowIndex}`;return PB.set(s,(PB.get(s)??0)+1),n!=null&&n.includes("metric")?e.value===void 0?{component:S_,params:{fullwidth:!1}}:t:e.data&&e.value!==void 0?t:!n||n==="options"||n==="__checkboxSelection"?e.data?t:{component:S_,params:{fullwidth:!0,width:"24px",height:"24px"}}:!e.data||e.value===void 0?{component:S_,params:{fullwidth:!1}}:t},ACe=_t(rt({__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,s=B(null),o=Y(()=>{var a;return((a=n.component)==null?void 0:a.name)||"UnknownComponent"}),i=Y(()=>{var a;return((a=n.component)==null?void 0:a.default)||n.component}),r=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=s.value)!=null&&a.focus?s.value.focus():console.warn(`Component ${o.value} does not have a focus method.`),!0},blur:()=>{var a,l;return(l=(a=s.value)==null?void 0:a.blur)==null||l.call(a),!0},trigger:(a,l)=>{var u;return(u=s.value)==null||u.$emit(a,l),!0}}),(a,l)=>(j(),qe(bw(i.value),nn(r.value,{ref_key:"componentRef",ref:s}),null,16))}}),[["__cssModules",{$style:{skeleton:"_skeleton_7xde7_1",shimmer:"_shimmer_7xde7_16","skeleton-loading":"_skeleton-loading_7xde7_1"}}]]);function kCe(e){return"stopEditing"in e}const OCe=8,MCe=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 AB(e){return class{constructor(){es(this,"container");es(this,"vNode",null);es(this,"componentInstance",null);es(this,"componsenExposed",null);es(this,"params");es(this,"isEditor",!1);es(this,"_destroyed",!1)}init(n){var l,u,c,d;if(!n){console.error("[Vue3CellWrapper] Missing params");return}const s=performance.now();this.params=n,this.isEditor=kCe(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 o=n.context.apiClass,i=n,r={component:e,params:Object.freeze(n),disabled:!1,readOnly:i.readOnly??!1,value:n.value,maxRating:i.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:o,tooltip:i.tooltip??void 0,isSearching:i.isSearching??!1,isFiltering:i.isFiltering??!1,isNoData:i.isNoData??!1,config:i.config,sceneId:(i==null?void 0:i.sceneId)||void 0};this.vNode=ge(ACe,r),Yw(this.vNode,this.container);const a=performance.now()-s;a>OCe&&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():MCe(this.container)}getValue(){var n,s,o;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((o=(s=this.componentInstance).getValue)==null?void 0:o.call(s))??this.componentInstance.value:(console.warn("[Vue3CellWrapper] getValue() called but component instance not available"),(n=this.params)==null?void 0:n.value)}isPopup(n){var r,a,l,u,c;const s=(l=(a=(r=this.params)==null?void 0:r.colDef)==null?void 0:a.field)==null?void 0:l.includes("metric"),o=((u=this.params)==null?void 0:u.context)&&Fd(this.params.context);return s||(o==="number"||o==="rating")||!this.isEditor?!1:(c=this.componentInstance)!=null&&c.isPopup?this.componentInstance.isPopup():!0}getPopupPosition(){var s,o,i;return this.isEditor?(s=this.componentInstance)!=null&&s.getPopupPosition?this.componentInstance.getPopupPosition():((i=(o=this.params)==null?void 0:o.colDef)==null?void 0:i.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(o){console.warn("[Vue3CellWrapper] Error during $destroy:",o)}try{typeof n.destroy=="function"&&n.destroy()}catch(o){console.warn("[Vue3CellWrapper] Error during destroy():",o)}}(typeof queueMicrotask=="function"?queueMicrotask:o=>Promise.resolve().then(o))(()=>{try{Yw(null,this.container)}catch(o){console.warn("[Vue3CellWrapper] Error during unmount:",o)}finally{this.container.textContent=""}})}catch(n){console.error("[Vue3CellWrapper] Error during cleanup:",n)}finally{this.vNode=null,this.componentInstance=null}}}}function Iy(e){return AB(e)}function kB(e){return AB(e)}let OB=!1;OB||(jJ.registerModules([ege,eV]),OB=!0);class NCe{constructor(t,n){es(this,"gridApi",null);es(this,"container");es(this,"config");es(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:s,onRowSelected:o,...i}=this.config,r={...i,onGridReady:a=>{this.gridApi=a.api,t&&t(a)},onCellClicked:a=>{n&&n(a)},onCellFocused:a=>{s&&s(a)},onRowSelected:a=>{o&&o(a)}};return this.gridApi=Sue(this.container,r),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 s={add:[t],addIndex:n==="bottom"?void 0:0};if(this.gridApi.applyTransaction(s),n==="bottom"){const o=this.gridApi.getDisplayedRowCount();o>0&&this.gridApi.ensureIndexVisible(o-1,"bottom")}}}addRows(t,n="bottom"){if(this.gridApi&&t.length>0){const s={add:t,addIndex:n==="bottom"?void 0:0};if(this.gridApi.applyTransaction(s),n==="bottom"){const o=this.gridApi.getDisplayedRowCount();o>0&&this.gridApi.ensureIndexVisible(o-1,"bottom")}}}destroy(){this.gridApi&&(this.eventListeners.forEach((t,n)=>{t.forEach(s=>{var o;(o=this.gridApi)==null||o.removeEventListener(n,s)})}),this.eventListeners.clear(),this.gridApi.destroy(),this.gridApi=null)}getApi(){return this.gridApi}switchTheme(t){document.body.dataset.agThemeMode=t==="dark"?"dark":"light"}}const LCe=$N.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"),VCe=rt({__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"],setup(e,{expose:t,emit:n}){const s=e,o=n,i=B(null);sS(i,()=>{var v;const g=(v=r.value)==null?void 0:v.getApi();g==null||g.clearFocusedCell()});const r=B(null),a=Y(()=>({width:"100%",height:s.height||"500px"})),l=Y(()=>({...s,theme:LCe}));function u(){if(!i.value){console.warn("Grid container element not found");return}const g={...l.value,height:s.height};r.value=new NCe(i.value,g),r.value.init(),c()}function c(){var v;const g=((v=r.value)==null?void 0:v.getApi())??null;o("onGridReady",g)}function d(g){var C,S;if(!g)return;(C=r.value)==null||C.updateColumnDefs(g);const v=g.map(b=>b.field&&b.width&&!b.hide?{colId:b.field,width:b.width}:null).filter(b=>b!==null);(S=r.value)==null||S.setColumnWidth(v)}function h(){var g;(g=r.value)==null||g.destroy(),r.value=null}function f(){var g;return((g=r.value)==null?void 0:g.getApi())||void 0}function p(){return r.value||null}return nt(()=>s.columnDefs,(g,v)=>{const C=g==null?void 0:g.filter(b=>!b.hide).map(b=>b.field).join(","),S=v==null?void 0:v.filter(b=>!b.hide).map(b=>b.field).join(",");C!==S&&d(g)},{deep:!0}),vs(()=>{h()}),t({gridApi:f,gridManager:p,syncColumnDefs:d}),tn(()=>{u()}),vs(()=>{h()}),(g,v)=>(j(),ce("div",{ref_key:"gridContainerRef",ref:i,style:dn(a.value),class:Q(["ag-theme-quartz",["ag-table-container",s.isSorting?"is-sorting":""]])},null,6))}});function Pd(e){return kB(e)}const BCe=()=>[...[{headerName:"Name",field:"name",sortable:!1,filter:!1,pinned:"left",headerComponent:Pd(Ru),suppressMovable:!0},{headerName:"Assignee",field:"assignees",sortable:!1,filter:!1,headerComponent:Pd(Ru)},{headerName:"Status",field:"status",sortable:!1,filter:!1,headerComponent:Pd(Ru)},{headerName:"Date Range",field:"dateRange",sortable:!1,filter:!1,headerComponent:Pd(Ru)},{headerName:"Last Updated",field:"lastUpdated",sortable:!1,filter:!1,headerComponent:Pd(Ru),cellRendererParams:n=>{var s,o,i;return{...n,value:(s=n==null?void 0:n.data)==null?void 0:s.lastUpdated.value,tooltip:((i=(o=n==null?void 0:n.data)==null?void 0:o.lastUpdated)==null?void 0:i.tooltip)||void 0,readOnly:!0}}},{headerName:"Completed On",field:"completedOn",sortable:!1,filter:!1,headerComponent:Pd(Ru),cellRendererParams:n=>{var s,o,i;return{...n,value:(s=n==null?void 0:n.data)==null?void 0:s.completedOn.value,tooltip:((i=(o=n==null?void 0:n.data)==null?void 0:o.completedOn)==null?void 0:i.tooltip)||void 0,readOnly:!0}}}].map(n=>vp.fromType(n))],xy={WIDTH:60,HEADER_CLASS:"ag-checkbox-header"},$Ce={field:"blank",headerName:"",flex:1,editable:!1,sortable:!1,filter:!1,cellClass:"ag-cell-optimized",suppressMovable:!0,suppressNavigable:!0,suppressAutoSize:!1,suppressSizeToFit:!1},HCe=()=>({field:"__checkboxSelection",checkboxSelection:!0,headerCheckboxSelection:!0,pinned:"left",width:xy.WIDTH,minWidth:xy.WIDTH,maxWidth:xy.WIDTH,cellClass:"ag-checkbox-cell",headerClass:xy.HEADER_CLASS,headerComponent:Iy(wge),suppressMovable:!0}),GCe={headerName:"",field:"options",sortable:!1,filter:!1,editable:!0,pinned:"right",lockPosition:!0,suppressMovable:!0,resizable:!1},UCe=(e,t,n)=>{const{getCachedValue:s,setCachedValue:o}=Dh({dbName:"item_table_column_configs",storeName:"column_configs"}),i=async()=>{const c=await s(t);if(c&&typeof c=="string")try{return JSON.parse(c)}catch(d){return console.error("Failed to parse cached column config:",d),null}return null},r=B([]),a=HCe(),l=async c=>{const d=await i(),h=new Map;d==null||d.forEach(F=>{F.width&&h.set(F.field,F.width)});const f=BCe(),p=vp.fromType(GCe),v=((c==null?void 0:c.map(F=>{var k;return{headerName:F.name,field:`metric_${F.id}`,editable:((k=F==null?void 0:F.auth_permission)==null?void 0:k.permission)==2,sortable:!0,filter:!1,flex:1,context:{...F},hide:!(F.is_primary||F.is_point_metric),cellClass:"ag-cell-optimized",headerComponent:Iy(Ru),headerComponentParams:O=>({headerType:F.metric_type.code=="number"||F.metric_type.code=="formula"?"number":"default"}),width:h.get(`metric_${F.id}`)}}))||[]).map(F=>vp.fromType(F)),C=[a,...f,...v,$Ce,p],S=C.filter(F=>F.pinned==="left"),b=C.filter(F=>F.pinned==="right"||F.field==="blank"),w=C.filter(F=>!F.pinned&&F.field!=="blank");if(!d||d.length===0){r.value=C;return}const _=new Map(d.map(F=>[F.field,F])),R=new Map(w.map(F=>[F.field,F])),T=[];for(const F of d)if(F.field&&R.has(F.field)){const k=R.get(F.field);T.push({...k,hide:F.hide,width:F.width}),R.delete(F.field)}const I=Array.from(R.values()),x=[...T,...I],P=S.map(F=>{const k=_.get(F.field);return k!=null&&k.width?{...F,width:k.width}:F}),D=b.map(F=>{const k=_.get(F.field);return k!=null&&k.width?{...F,width:k.width}:F});r.value=[...P,...x,...D]};nt(e,c=>l(c),{immediate:!0});const u=Ti((c,d)=>{var C,S;if(c.source!==void 0)if(["uiColumnResized","uiColumnMoved","api"].indexOf(c.source)===-1){console.warn("Skipping saveColumnConfig for source:",c.source);return}else console.warn("Executing saveColumnConfig for source:",c.source);else console.warn("Executing saveColumnConfig for source:",c);const h=(C=n==null?void 0:n.value)==null?void 0:C.getColumnDefs(),f=(S=n==null?void 0:n.value)==null?void 0:S.getColumnState().reduce((b,w)=>(b[w.colId]=Number(w.width),b),{}),p=new Map;Object.entries(f||{}).forEach(([b,w])=>{p.set(b,w)}),r.value=h||r.value;const g=h==null?void 0:h.filter(b=>!b.pinned&&b.field!=="blank"),v=(g==null?void 0:g.map(b=>({field:b.field,hide:b.hide,width:p.get(b.field)||b.width,pinned:b.pinned})))||[];d&&o(t,JSON.stringify(v))},rr);return{columnDefs:r,checkboxColumn:a,saveColumnConfig:u}},WCe=()=>{const e=_n.getInstance().getItem("API_BASE_URL");return e!=null&&e.includes("v1")?e.slice(0,e.lastIndexOf("/v1")):String(e)},zCe=e=>{var F,k,O;const{showMessage:t,showErrorNetMessage:n}=Qf(),s=Yn(),o={domainApi:WCe(),wsCode:_n.getInstance().getItem("ws.code"),entityId:e.value.entityId},i=(O=(k=(F=s==null?void 0:s.appContext)==null?void 0:F.config)==null?void 0:k.globalProperties)==null?void 0:O.apiConfig;if(!i||o.domainApi===""||o.wsCode==="")throw new Error("API configuration is missing in useItems");const r=new Lk(i,o);r.on("call-api",$=>{$.success?t($.apiCode,"success"):n($)});const a=So({}),l=B([]),u=B(!1),c=B(null),d=B(null),h=B(1),f=B(20);let p=Promise.resolve();const{setCachedUsers:g}=LK(),v=$=>({workspaceId:e.value.workspaceId,entityIds:[e.value.entityId],orderBy:"id-asc",include_permission:"{include_permission}",include_permission_names:!0,q:$}),C=50,S=async($,q,J)=>{if(!$.length)return[];const ee=Z4($,q);return(await Promise.all(ee.map(J))).flat()},b=async $=>{try{return(await r.getPermissionForItems({workspaceId:e.value.workspaceId,itemIds:$})).data.map(J=>[J==null?void 0:J.id,J.permission])}catch(q){return console.error("Failed to fetch item permissions chunk:",q),[]}},w=async($,q)=>{try{const J=await r.getMetricValues({workspaceId:e.value.workspaceId,item_ids:$,per_page:$.length*q.length,metric_ids:q}),ee=J.data.map(ve=>{const te=new Map(ve.item_metrics.map(V=>[V.metric_id,{value:V.value,auth_permission:V==null?void 0:V.auth_permission}])),N=Object.fromEntries(q.map(V=>[V,te.get(V)??null]));return[ve==null?void 0:ve.id,N]}),X=new Set(J.data.map(ve=>ve==null?void 0:ve.id));for(const ve of $)if(!X.has(ve)){const te=Object.fromEntries(q.map(N=>[N,{value:null,auth_permission:void 0}]));ee.push([ve,te])}return ee}catch(J){return console.error("Failed to fetch a chunk of metric values:",J),$.map(X=>[X,Object.fromEntries(q.map(ve=>[ve,void 0]))])}},_=async $=>{try{const q=await r.getAssignedUser({workspaceId:e.value.workspaceId,item_ids:$,per_page:$.length}),J=q.data.flatMap(ee=>ee.assignees);return g(J),q.data.map(ee=>[ee==null?void 0:ee.id,ee==null?void 0:ee.assignees])}catch(q){return console.error("Failed to fetch a chunk of assigned users:",q),[]}},R=async $=>{if(!$.length)return console.warn("getPermissionForItems: Empty itemIds"),{};try{const q=await S($,C,b);return Object.fromEntries(q)}catch(q){return console.error("Failed to fetch item permissions:",q),{}}},T=async($,q)=>!$.length||!q.length?{}:(p=p.then(async()=>{try{const X=[];let ve=0;for(let N=0;N<q.length;N+=5){ve++;const V=q.slice(N,N+5),ne=[];for(let pe=0;pe<V.length;pe++){const ae=V[pe],re=await S($,C,W=>w(W,[ae]));ne.push(re),await new Promise(W=>setTimeout(W,500))}X.push(...ne);const ie=N+5>=q.length}const te={};for(const N of X.flat()){const[V,ne]=N;te[V]||(te[V]={}),Object.assign(te[V],ne)}return te}catch(J){return console.error("Failed to fetch metric values:",J),{}}}),p),I=async $=>{if(!$.length)return console.warn("getAssignedUsers: Empty itemIds"),{};try{const q=await S($,C,_);return Object.fromEntries(q)}catch(q){return console.error("Failed to fetch assigned users:",q),{}}};return{items:l,loading:u,error:c,pagination:d,currentPage:h,pageSize:f,cusorMap:a,fetchItems:async $=>{const{cursor:q,offset:J,size:ee,searchQuery:X}=$;let ve=[];u.value=!0,c.value=null;try{const te=await r.getAllItem_cursor({...$,cursor:q||void 0,offset:J||void 0,pageSize:ee||f.value,...v(X),sortBy:$.sort_by});return l.value=te.data,d.value=te.meta,h.value=te.meta.current_page||0,ve=te.data.map(N=>N==null?void 0:N.id),te}catch(te){throw c.value=te,console.error("Failed to fetch items (cursor):",te),te}finally{const te=async()=>{try{const[N,V]=await Promise.all([I(ve),R(ve)]);e.value.updateItemData({assignees:N,permission:V},ve);const ne=await T(ve,e.value.metricIds);e.value.setMetricValues(ne,new Set(ve),e.value.metricIds)}catch(N){console.error("Post-fetch processing failed:",N)}};u.value=!1,setTimeout(te)}},getAssignableStatus:async $=>{try{return await r.getAssignableStatus({workspaceId:e.value.workspaceId,itemIds:$})}catch(q){throw console.error("Failed to fetch assignable status:",q),q}},getMetricList:async $=>{try{return await r.getMetricList({workspaceId:e.value.workspaceId,entityId:$})}catch(q){throw console.error("Failed to fetch metric list:",q),q}},getMetricValues:T,getAssignedUsers:I}};function jCe(e){return{updateRowData:(s,o)=>{if(!e.value)return;const i=[],r=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);o.forEach(u=>{var d;const c=(d=e.value)==null?void 0:d.getRowNode(u);if(c){if(i.push(c),s.assignees){const h=EK((s.assignees[u]||[]).map(xF));c.data.assignees=h,r.add("assignees")}s.permission&&(c.data.permissions=s.permission[u]),l.forEach(h=>{c.data[h]=c.data[h]??null})}}),r.add("assignees"),r.add("status"),r.add("dateRange"),r.add("moreActions"),r.add("name"),e.value.refreshCells({rowNodes:i,columns:Array.from(r),force:!0})},setMetricValues:(s,o,i)=>{const r=e.value;if(!r)return;const a=new Map(Array.from(o).map(u=>[u,new Map(i.map(c=>[c,{value:null,auth_permission:void 0}]))]));Object.entries(s).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=r.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&&r.refreshCells({rowNodes:l,columns:Array.from(i).map(u=>`metric_${u}`),force:!0})}}}function KCe(e,t,n,s,o){let i=!0;return{async getRows(r){try{s(!0),i&&(o(!0),i=!1);const a=Math.floor(r.startRow/t)+1,{rows:l,total:u}=await e({page:a,pageSize:t,filterText:n(),sort_by:r.sortModel});let c=-1;Number.isFinite(u)?c=u:l.length<t&&(c=r.startRow+l.length),r.context={pageSize:t,text:n()},r.successCallback(l,c),s(!1),o(!1)}catch(a){console.error("Datasource fetch error:",a),r.failCallback(),s(!1),o(!1)}}}}function qCe(e){const{selectRowData:t,isSidebarOpen:n,quickFilterText:s,gridApi:o,fetcher:i}=e,r=B(!0),a=B(!0),l=B(!1),u=()=>{n.value=!n.value},c=v=>{if(r.value=!1,o.value=v,!v)return null;const{addEventListener:C,setGridOption:S}=v;if(!i)return console.error("Fetcher function is undefined"),null;const b=KCe(i,e.perPage,()=>s.value,w=>{r.value=w},w=>{a.value=w});return S==null||S("datasource",b),C==null||C("selectionChanged",()=>{t.value=v.getSelectedRows()}),v||null},d=v=>{var C,S;if((C=o.value)==null||C.hideOverlay(),v!==void 0&&(s.value=v),(S=o.value)==null||S.deselectAll(),t.value=[],r.value=!0,!o.value||!i){console.error("Grid API or fetcher is not available"),r.value=!1;return}l.value=!0,a.value=!0,o.value.purgeInfiniteCache(),o.value.ensureIndexVisible(0,"top"),setTimeout(()=>{r.value=!1,setTimeout(()=>{l.value=!1},100)},300)},h=()=>{var v;(v=o.value)==null||v.deselectAll(),t.value=[]},f=Ti(v=>{d(v)},rr),p=()=>{o.value},g=B(!1);return{isLoading:r,toggleSidebar:u,onGridReady:c,onSearch:f,handleUnSelect:h,firstLoad:a,cacheCleared:l,handleSelectAll:p,isSelectAll:g}}const YCe={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."]}}},ZCe=e=>{var t;return(t=Object.entries(YCe.changelog).find(([n,s])=>n===e))==null?void 0:t[1].changes},XCe={key:1},JCe=_t(rt({__name:"PopupOverwriteScenes",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const s=B(null),o=e,i=()=>{s.value&&s.value.show()},r=B(""),a=B("idle"),l=B({file:null,format:null}),{apiServices:u}=ts(!1,{}),c=B(!1),d=async()=>{c.value=!0;const T=o.workspaceId,I=o.entityId;if(!T||!I||!u.value){console.error("Workspace ID or Entity ID is missing");return}try{if(!await u.value.downloadExportedItemsFile(T,I))throw new Error("No response from downloadTemplate API")}catch(x){console.error("Error downloading template:",x)}c.value=!1},h=n,f=()=>{h("import-success"),S()},p=async T=>{var P,D,F;const I=new FormData,x=((P=T.name.split(".").pop())==null?void 0:P.toString())||"";if(I.append("file",T),I.append("format",x),I.append("entity_id",o.entityId||""),!u.value){console.error("API services not available");return}try{await u.value.overwriteScenesViaImportFile(o.workspaceId,o.entityId,I),g()}catch(k){throw console.error("Error uploading file:",k),v(((F=(D=k.response)==null?void 0:D.data)==null?void 0:F.message)||"An unknown error occurred during file upload."),k}},g=()=>{a.value="success"},v=T=>{r.value=T,a.value="error"},C=async()=>{!l.value||!l.value.file||await p(l.value.file)},S=()=>{var T;R(),(T=s.value)==null||T.hide()};t({close:S,open:i});const b=Y(()=>({error:"Import failed",importing:"Import in progress",success:"Import successful",idle:"Update existing work"})[a.value]),w=Y(()=>l.value.file?!1:(console.error("No file selected"),!0)),_=B(null),R=()=>{var T;(T=_.value)==null||T.clear(),r.value="",l.value={file:null,format:null},a.value="idle"};return(T,I)=>(j(),qe(U(dV),{"popup-name":b.value,"show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:s,onHidden:R},nh({default:me(()=>[a.value==="importing"||a.value==="error"||a.value==="success"?(j(),qe(TB,{key:0,state:a.value,"error-message":r.value,overwrite:!0},null,8,["state","error-message"])):(j(),ce("div",XCe,[Ee("div",{class:Q(T.$style["step-section"])},[Ee("span",{class:Q(T.$style["step-title"])},"Step 1: Download current data",2),Ee("span",{class:Q(T.$style["step-description"])},[...I[1]||(I[1]=[tt(" Download a file with all existing work and details. Edit it, then upload in Step 2. ",-1),Ee("br",null,null,-1),Ee("i",null,"Note: Empty cells and unchanged values will be skipped.",-1)])],2),ge(U(mt),{class:Q(T.$style["download-sample-btn"]),size:12,variant:"secondary",disabled:c.value,onHandleClick:d},{prefix:me(()=>[ge(U(lt),{src:"Download"})]),default:me(()=>[I[2]||(I[2]=tt(" Download file ",-1))]),_:1},8,["class","disabled"])],2),Ee("div",{class:Q(T.$style["step-section"])},[Ee("span",{class:Q(T.$style["step-title"])},"Step 2: Upload updated file (.xlsx, .xls, .csv)",2),ge(U(ZV),{modelValue:l.value,"onUpdate:modelValue":I[0]||(I[0]=x=>l.value=x),ref_key:"filUploaderRef",ref:_},null,8,["modelValue"])],2),Ee("div",{class:Q(T.$style["step-section"]),style:{"padding-top":"0","padding-bottom":"0"}},[ge(IB)],2)]))]),_:2},[a.value==="idle"?{name:"footer",fn:me(()=>[ge(U(mt),{style:{flex:"1"},variant:"secondary",onClick:S},{default:me(()=>[...I[3]||(I[3]=[tt(" Cancel ",-1)])]),_:1}),ge(U(mt),{disabled:w.value,style:{flex:"1"},variant:"primary",onClick:C},{default:me(()=>[...I[4]||(I[4]=[tt(" Import ",-1)])]),_:1},8,["disabled"])]),key:"0"}:a.value==="success"?{name:"footer",fn:me(()=>[ge(U(mt),{style:{flex:"1"},variant:"primary",onClick:f},{default:me(()=>[...I[5]||(I[5]=[tt(" Close ",-1)])]),_:1})]),key:"1"}:{name:"footer",fn:me(()=>[ge(U(mt),{style:{flex:"1"},variant:"primary",onClick:R},{default:me(()=>[...I[6]||(I[6]=[tt(" Try Again ",-1)])]),_:1})]),key:"2"}]),1032,["popup-name"]))}}),[["__cssModules",{$style:{"step-section":"_step-section_lw86z_1","step-title":"_step-title_lw86z_11","step-title-2":"_step-title-2_lw86z_17","step-description":"_step-description_lw86z_23","date-format-guide":"_date-format-guide_lw86z_28","import-error":"_import-error_lw86z_39","drop-area":"_drop-area_lw86z_49","is-dragging":"_is-dragging_lw86z_49","drop-area-content":"_drop-area-content_lw86z_52",browse:"_browse_lw86z_61","download-sample-btn":"_download-sample-btn_lw86z_65"}}]]),QCe={style:{cursor:"help"}},ebe=_t(rt({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const n=To,s=Qb(),{setUserPermissions:o,setEntityPermissions:i}=s,{entityPermissions:r}=Qs(s),a=Xt,l=B(null),u={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},c=B(""),d=Y(()=>{var Ye;const Ae=((Ye=r.value)==null?void 0:Ye.has_create_item_permission)==1||!1;return[{label:"Create manually",value:"new_scene",icon:"Plus",type:"icon",id:"create_new_scene",hide:!Ae},{label:"Import from CSV or Excel",value:"import_scenes",icon:"FileImport",type:"icon",hide:!Ae,id:"import_scenes_option"},{label:"Update existing (CSV or Excel)",value:"overwrite_scenes",icon:"FilePen",type:"icon",hide:!Ae,id:"overwrite_scenes_option"}]}),h=e;vp.initialize({wrapVueCellRenderer:Iy,wrapVueCellEditor:kB});const f=tf(),{switchInstanceFunc:p}=Qs(f);tn(()=>{const Ae=Yn();p.value=Ae==null?void 0:Ae.appContext.config.globalProperties.switchInstance;const Ye=new BroadcastChannel("focusable_channel");Ct(()=>{setTimeout(()=>{Ye.postMessage("Focusable elements updated")},7e3)})});const g=B(null),v=B([]),C=Wm(),{rowCount:S}=Qs(C),b=B(!1),w=B(""),_=B(),R=zA(),{metricList:T}=Qs(R),I=B(""),x=B(!1),P=B(new Set),D=B(new Map),{apiServices:F}=ts(!1,h),{columnDefs:k,checkboxColumn:O,saveColumnConfig:$}=UCe(T,h.entityId,g),q=B();nt(()=>k,()=>{var Ae;(Ae=q.value)==null||Ae.updateColumnDefs(k.value)},{deep:!0});const J=(Ae,Ye)=>{$(Ae,Ye)},{updateRowData:ee,setMetricValues:X}=jCe(g),ve=Y(()=>({isSearching:w.value.length>0,isFiltering:!(Object.keys(ke.value||{}).length==1&&Object.keys(ke.value)[0]=="preflight_status")&&Object.keys(ke.value||{}).length>0})),te=Y(cm),N=Y(()=>k.value.filter(Ae=>{var Ye;return((Ye=Ae.field)==null?void 0:Ye.startsWith("metric_"))&&!Ae.hide}).map(Ae=>{var Ye;return((Ye=Ae.field)==null?void 0:Ye.replace("metric_",""))||""}));Zi("timezone",te);const V=Y(()=>({autoFetch:!1,workspaceId:h.workspaceId,entityId:h.entityId,metricIds:N.value,updateItemData:ee,setMetricValues:X})),{fetchItems:ne,getMetricList:ie,cusorMap:pe,getMetricValues:ae}=zCe(V),re=Y(()=>{if(!g.value)return!1;const Ae=g.value.getSelectedRows().length;return Ae>0&&Ae>=S.value.total}),W=Y(()=>{var Ae;return((Ae=l.value)==null?void 0:Ae.name)||"Items"}),fe=Ae=>{setTimeout(()=>{Ct(()=>{var Ye,jt;g.value&&(Ae?(Ye=g.value)==null||Ye.showNoRowsOverlay():(jt=g.value)==null||jt.hideOverlay())})},500)},oe=(Ae,Ye)=>{var jt;S.value.total=Ae.meta.total??0,(jt=Ae.meta.next)!=null&&jt.cursor&&(pe[Ye+1]=Ae.meta.next.cursor),I.value=Ae.meta["X-Tsr-signature"]||"",Ae.meta.total===0?fe(!0):fe(!1)},Ie=YV(),G=B(null),{sortingAPIConfiguration:Z,isSortingRunning:de}=Qs(Ie),ke=B({preflight_status:"1"}),Pe=Y(()=>({...ke.value,search:w.value}));Zi("filterParams",Pe);const Le=B([]),ye=async({page:Ae,pageSize:Ye,filterText:jt})=>{var ku;(ku=g.value)==null||ku.hideOverlay();const sn=pe[Ae],Wi=!sn&&Ae>1?(Ae-1)*Ye:void 0,js=Z.value;js.length>0&&(de.value=!0);try{const Co={cursor:sn,size:Ye,searchQuery:jt,offset:Wi,sort_by:js,...ke.value},Pr=await ne(Co);if(!Pr)return{rows:[],total:0};const Kn=(ya=>{const gi=ya.data.map(Ou=>PF(Ou,te.value));return gi.forEach(Ou=>{P.value.add(String(Ou.id)),D.value.set(String(Ou.id),{})}),gi})(Pr);return oe(Pr,Ae),{rows:Kn,total:S.value.total}}catch(Co){return console.error("Failed to fetch items:",Co),{rows:[],total:0}}finally{de.value=!1}},{isLoading:M,toggleSidebar:H,onGridReady:le,handleUnSelect:Ge,handleSelectAll:we,onSearch:ze,firstLoad:Ue}=qCe({selectRowData:B([]),isSidebarOpen:b,quickFilterText:w,gridApi:g,perPage:u.ROWS_PER_PAGE,fetcher:ye}),Se=B([]),Ve=()=>{var Ae;Se.value=((Ae=g.value)==null?void 0:Ae.getSelectedRows())||[]},pt=So({columnsDisplay:[],rowsDisplay:{fromIndex:0,toIndex:0}}),At=Y(()=>({blockLoadDebounceMillis:1e3,columnDefs:k.value,rowModelType:"infinite",cacheBlockSize:u.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:u.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:u.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:Ut,noRowsOverlayComponent:Iy(ive),noRowsOverlayComponentParams:()=>ve.value,defaultColDef:{editable:!1,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:Ae=>Ae.data.id,getRowClass:Ae=>{if(!Ae.data)return["row-empty"];const Ye=["row-highlight"];return Ae.data.id||Ye.push("row-inactive"),Ae.data.isDeleted&&Ye.push("row-deleted"),Ae.data.disabled&&Ye.push("row-deleted"),Ae.data.isArchived&&Ye.push("row-archived"),Ae.data.isLocked&&Ye.push("row-locked"),Ye},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:h.workspaceId,entityId:h.entityId,apiServices:F.value,sorting:de.value},onCellKeyDown:Ae=>{var Ye,jt,sn;if(Ae.data.isDeleted)return!1;if(((Ye=Ae==null?void 0:Ae.event)==null?void 0:Ye.key)==="Enter"){const{api:Wi,node:js,column:ku}=Ae,Co=Wi.getCellRendererInstances({rowNodes:[js],columns:[ku]});if(Co.length>0){const Pr=Co[0];Pr&&typeof((jt=Pr.componsenExposed)==null?void 0:jt.focus)=="function"&&((sn=Pr.componsenExposed)==null||sn.focus())}}},isRowSelectable:Ae=>!Ae.group,suppressKeyboardEvent:Ae=>{var sn;if((sn=Ae.data)!=null&&sn.isDeleted)return!0;const Ye=Ae.event.key,jt=Ae.editing;return jt&&Ye==="Tab"?!0:jt&&Ye==="Enter"?!1:Ye==="Enter"?(Ae.event.preventDefault(),Ae.event.stopPropagation(),!0):Ye==="ArrowUp"||Ye==="ArrowDown"||Ye==="ArrowLeft"||Ye==="ArrowRight"||Ye==="Tab"||Ye==="Enter"},navigateToNextCell:()=>null,onBodyScroll:Ae=>{const Ye=Ae.api.getFirstDisplayedRowIndex(),jt=Ae.api.getLastDisplayedRowIndex();pt.rowsDisplay.fromIndex=Ye,pt.rowsDisplay.toIndex=jt,pt.columnsDisplay=Ae.api.getAllDisplayedVirtualColumns().map(sn=>sn.getColId())},onViewportChanged:Ae=>{pt.columnsDisplay=Ae.api.getAllDisplayedVirtualColumns().map(Ye=>Ye.getColId())},suppressHeaderFocus:!0,onCellEditingStarted(Ae){if(Ae.data.isDeleted&&Ae.api.stopEditing(),Ae.colDef.field=="options"){const Ye=Ae.api.getCellRendererInstances({rowNodes:[Ae.node],columns:[Ae.column]});Ye.length>0&&Ye[0].focusUi()}},tabToNextCell:Ae=>{let Ye=Ae.nextCellPosition;if(Ye&&Ye.column.getColId()==="ag-Grid-SelectionColumn"){const jt=Ae.api.getAllDisplayedColumns(),sn=jt.indexOf(Ye.column),Wi=Ae.backwards?-1:1,js=jt[sn+Wi];if(js)return{rowIndex:Ye.rowIndex,column:js,rowPinned:Ye.rowPinned}}return Ye}}));function Ut(){if(!g.value)return;let Ae=0;g.value.forEachNode(Ye=>{Ye.data&&Ae++}),S.value.loaded=Math.min(Ae,S.value.total)}nt(()=>Z,()=>{g.value&&(I.value="",P.value.clear(),g.value.deselectAll(),Object.keys(pe).forEach(Ae=>delete pe[Number(Ae)]),g.value.purgeInfiniteCache(),g.value.ensureIndexVisible(0))},{deep:!0});const Jt=B(),zt=B(),Ne=()=>{var Ae;(Ae=zt.value)==null||Ae.open()},je=()=>{var Ae;(Ae=Jt.value)==null||Ae.open()},yt=async()=>{Ue.value=!0,g.value&&(I.value="",P.value.clear(),Object.keys(pe).forEach(Ae=>delete pe[Number(Ae)]),await g.value.deselectAll(),await g.value.ensureIndexVisible(0,"top"),await g.value.purgeInfiniteCache(),await g.value.refreshInfiniteCache())},Ot=Y(()=>_n.getInstance().getItem("ITEM_TABLE_APP_VERSION")||""),Wt=B(),st=Y(()=>{var Ae;return(Ae=ZCe(Ot.value))==null?void 0:Ae.map(Ye=>`<div>• ${Ye}</div>`).join(`
|
|
253
|
+
`)});function ps(Ae){var Ye;Ae==="new_scene"?(Ye=Wt.value)==null||Ye.show():Ae==="import_scenes"?je():Ae==="overwrite_scenes"&&Ne()}const Ui=Ae=>{v.value=Ae.api.getSelectedRows().map(Ye=>Ye.id)},pl=Ae=>{const Ye=le(Ae);return Ye&&(Ye.addEventListener("modelUpdated",Ut),Ye.addEventListener("bodyScroll",()=>Ye.stopEditing()),Ye.addEventListener("selectionChanged",Ve),Ye.addEventListener("columnMoved",sn=>J(sn,!0)),Ye.addEventListener("columnResized",sn=>J(sn,!0)),Ye.addEventListener("firstDataRendered",()=>{Ue.value=!1}),!document.querySelector(".ag-body-viewport")),Ye},wo=()=>{var Ae;c.value=(((Ae=document.getElementById("item-table-layout-id"))==null?void 0:Ae.clientHeight)??0)-78+"px"};tn(()=>{Ct(()=>{wo()}),window.addEventListener("resize",wo);function Ae(){requestAnimationFrame(Ae)}Ae()}),vs(()=>{window.removeEventListener("resize",wo)});const va=async({code:Ae,name:Ye})=>{await ze(Ae),setTimeout(()=>{var jt;(jt=_.value)==null||jt.setValue(Ye)},300)},gl=Ae=>{if(!g.value)return;const Ye=g.value.getRowNode(Ae);Ye?(g.value.ensureIndexVisible(Number(Ye.rowIndex),"middle"),g.value.flashCells({rowNodes:[Ye],flashDuration:3e3,fadeDuration:1e3})):g.value.ensureIndexVisible(S.value.total-1,"bottom")},Ir=Ae=>Ae.metric_type.code==="number"?"number":"default",xr=async()=>{if(h.entityId)try{const Ae=await ie(h.entityId);T.value=Ae.data.map(Ye=>({...Ye,sortType:Ir(Ye)}))}catch(Ae){console.error("Failed to initialize metric list:",Ae),T.value=[]}},pi=async()=>{if(F.value)try{const Ae=await F.value.getUserPermission(h.workspaceId);o(Ae)}catch(Ae){console.error("Failed to fetch user permissions:",Ae)}},Fr=async()=>{if(F.value)try{const Ae=await F.value.getEntityDetail(h.workspaceId,h.entityId);i(Ae.permission),l.value=Ae}catch(Ae){console.error("Failed to fetch entity details:",Ae)}},Au=my(),{setUser:kn}=Au,gs=async()=>{if(F.value)try{const Ae=await F.value.getMe();return kn(Ae),Ae}catch(Ae){console.error("Failed to fetch user details:",Ae)}},__=async()=>{var Ae;if(F.value)try{const Ye=await F.value.getWorkspaces(h.workspaceId),jt=(Ae=Ye.data[0])==null?void 0:Ae.ws_user_role_id;return jt&&Au.setUserRoleId(jt),Ye}catch(Ye){console.error("Failed to fetch workspace details:",Ye)}};nt(()=>[h.entityId,h.workspaceId],async([Ae,Ye])=>{!Ae||!Ye||(gs(),__(),xr(),pi(),Fr())},{immediate:!0,deep:!0}),nt(N,(Ae,Ye)=>{const jt=Ae.filter(sn=>!(Ye!=null&&Ye.includes(sn)));jt.length>0&&ae(Array.from(P.value),jt).then(sn=>{X(sn,P.value,jt)})},{immediate:!0,deep:!0}),nt(I,(Ae,Ye)=>{x.value=!!(Ye&&Ae&&Ye!==Ae)}),t({refreshTable:yt});const Ad=Ae=>{ke.value=Ae,yt()},kd=Ae=>{Le.value=Ae,yt()},Od=Ae=>{k.value=Ae||[],J({},!0)},R_=Y(()=>{var sn;const Ae=_n.getInstance().getItem("ws.terminology"),Ye=Ae?JSON.parse(Ae):null;return`New ${((sn=Ye==null?void 0:Ye.find(Wi=>Wi.code==="scene"))==null?void 0:sn.name)||"Scene"}`});return(Ae,Ye)=>{const jt=Eo("focusable");return j(),qe(U(pge),{"is-sidebar-open":b.value,onCloseSidebar:U(H),onSidebarClear:U(H),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:U(H)},{"header-left":me(()=>{var sn;return[((sn=U(r))==null?void 0:sn.has_create_item_permission)==1?(j(),qe(U(_0),{key:0,variant:["primary"],options:d.value,onSelect:ps,onHandleClick:Ye[1]||(Ye[1]=Wi=>ps("new_scene")),id:"create_scene_dropdown",tabIndex:2},{prefix:me(()=>[Ke(ge(U(mt),{"data-focus-index":"1",id:"create_new_scene",variant:["primary"],onClick:Ye[0]||(Ye[0]=Wi=>ps("new_scene")),label:R_.value},null,8,["label"]),[[jt,1]])]),_:1},8,["options"])):Je("",!0),Ee("div",{class:Q(Ae.$style["beta-tag"])},"Beta",2),Ke((j(),ce("span",QCe,[tt(wt(Ot.value),1)])),[[U(a),st.value||""]])]}),"header-actions":me(()=>[ge(U(Gve),{"onUpdate:assignees":kd,onApplyFilter:Ad,loading:U(Ue),entityId:h.entityId},null,8,["loading","entityId"]),Ke(ge(U(iS),{focusIndex:"4",modelValue:w.value,"onUpdate:modelValue":Ye[2]||(Ye[2]=sn=>w.value=sn),onSearch:U(ze),class:Q(Ae.$style.itemSearchBox),onClear:Ye[3]||(Ye[3]=sn=>U(ze)("")),id:"item_search_box",ref_key:"searchBoxRef",ref:_},null,8,["modelValue","onSearch","class"]),[[U(n),{isLoading:U(Ue),fullwidth:!0}]]),Ke((j(),qe(U($A),{status:U(M)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":x.value},{default:me(()=>[Ke((j(),qe(U(mt),{variant:["secondary","icon"],disabled:U(M),onClick:yt},{default:me(()=>[ge(U(lt),{src:"ArrowsRotate"})]),_:1},8,["disabled"])),[[jt,5],[U(a),"Refresh"]])]),_:1},8,["status","show-badge"])),[[U(n),{isLoading:U(Ue),fullwidth:!0}]]),Ke(ge(U(Hme),{"model-value":U(k),onChange:Ye[4]||(Ye[4]=sn=>Od(sn)),id:"table_customization",gridApi:g.value,ref_key:"tableCustomizationRef",ref:q,"checkbox-column":U(O),tableHeight:c.value},null,8,["model-value","gridApi","checkbox-column","tableHeight"]),[[U(n),{isLoading:U(Ue),fullwidth:!0}]])]),grid:me(({availableHeight:sn})=>[ge(U(VCe),nn({id:"item_table_main",ref_key:"agGrid",ref:G},At.value,{height:sn+"px",isSorting:U(de),onOnGridReady:pl,onSelectionChanged:Ui}),null,16,["height","isSorting"])]),footer:me(()=>[Ee("div",{class:Q(Ae.$style.tableFooter),id:"table_footer"},[Ee("span",null,[Ye[5]||(Ye[5]=tt(" Showing ",-1)),Ee("b",null,wt(U(S).loaded)+" of "+wt(U(S).total),1)])],2)]),"new-row":me(()=>[ge(U(yve),{ref_key:"createNewSceneRef",ref:Wt,onSearchForCode:va,onFocusOnId:gl},null,512)]),"bulk-update-actions":me(()=>[!b.value&&v.value.length>0?Ke((j(),qe(U(rge),{key:0,selectRowData:Se.value,"workspace-id":h.workspaceId,"entity-id":h.entityId,"grid-api":g.value,onUnselect:U(Ge),onSelectAll:U(we),"take-name":W.value,"selected-all":re.value,"total-rows":U(S).total,"visible-rows":U(S).loaded,onUpdated:Ve,loading:U(M)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","onSelectAll","take-name","selected-all","total-rows","visible-rows","loading"])),[[Do,!b.value&&v.value.length>0]]):Je("",!0)]),snackbar:me(()=>[ge(U(Zge))]),popup:me(()=>[ge(RCe,{ref_key:"popupCreateSceneRef",ref:Jt,"workspace-id":h.workspaceId,"entity-id":h.entityId,onImportSuccess:yt},null,8,["workspace-id","entity-id"]),ge(JCe,{ref_key:"popupOverwriteScenesRef",ref:zt,"workspace-id":h.workspaceId,"entity-id":h.entityId,onImportSuccess:yt},null,8,["workspace-id","entity-id"])]),_: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"}}]]),MB="0.1.94",tbe={key:0},nbe=_t(rt({__name:"app",setup(e){const t=Y(()=>n.id.length===0||n.workspaceId.length===0),n=So({id:"",workspaceId:"",apiConfig:{}}),s=Qf(),{showMessage:o,showErrorNetMessage:i}=s,r=["basicInfor"],a=h=>{h.success?o(h.apiCode,"success"):r.includes(h.apiCode)||i(h)},l=B(null),u=()=>{const h=_n.getInstance().getItem("API_BASE_URL");return h!=null&&h.includes("v1")?h.slice(0,h.lastIndexOf("/v1")):String(h)};eh(()=>{var h,f,p;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",MB);try{if(l.value=Yn(),!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)||_n.getInstance().getItem("ws.code");const g={domainApi:u(),wsCode:_n.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 Lk(n.apiConfig,g);v.on("call-api",a),l.value.appContext.config.globalProperties.apiServices=v}catch(g){console.error("Error getting current instance:",g)}}),vs(()=>{l.value.appContext.config.globalProperties.apiServices.off("call-api",a)});const c=Y(()=>n.id),d=Y(()=>n.workspaceId);return Zi("workspaceId",d),Zi("entityId",c),(h,f)=>(j(),ce("div",{class:Q(h.$style.dashboardPluginWrapper)},[t.value?(j(),ce("span",tbe," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):c.value?(j(),qe(U(ebe),{key:1,entityId:c.value,workspaceId:d.value},null,8,["entityId","workspaceId"])):Je("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),E_=async(e={},t={})=>{const n=RT(nbe),s=lY();n.use(s);const o=["apiConfig","workspaceId","id"],i={};Object.entries(e).forEach(([a,l])=>{l!==void 0&&(n.config.globalProperties[a]=l,i[a]=l,o.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=i,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${MB}`,"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",Xt),n.directive("focusable",Ur);const r=await SCe();return n.use(r),n};globalThis.window!==void 0&&(globalThis.window.arboDashboard=E_),On.default=E_,On.initDashboard=E_,Object.defineProperties(On,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|