@arbocollab/arbo-web-people 0.1.85-alpha.10 → 0.1.85-alpha.12
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/cjs/index.cjs.js +4 -4
- package/es/index.es.js +4 -4
- package/npmjs.npmrc +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/umd/index.umd.js +4 -4
package/cjs/index.cjs.js
CHANGED
|
@@ -26,7 +26,7 @@ Expected function or array of functions, received type ${typeof t}.`),za)}functi
|
|
|
26
26
|
* vue v3.5.18
|
|
27
27
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
28
28
|
* @license MIT
|
|
29
|
-
**/function Uge(){rge()}ve.env.NODE_ENV!=="production"&&Uge();var Wge=Object.defineProperty,zge=(t,e,n)=>e in t?Wge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jf=(t,e,n)=>(zge(t,typeof e!="symbol"?e+"":e,n),n);const vV=(t,e)=>e.some(n=>t instanceof n);let Tj,Dj;function jge(){return Tj||(Tj=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Hge(){return Dj||(Dj=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const yV=new WeakMap,uL=new WeakMap,qO=new WeakMap;function Yge(t){const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("success",a),t.removeEventListener("error",o)},a=()=>{n(bv(t.result)),i()},o=()=>{r(t.error),i()};t.addEventListener("success",a),t.addEventListener("error",o)});return qO.set(e,t),e}function qge(t){if(yV.has(t))return;const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("complete",a),t.removeEventListener("error",o),t.removeEventListener("abort",o)},a=()=>{n(),i()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",a),t.addEventListener("error",o),t.addEventListener("abort",o)});yV.set(t,e)}let bV={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return yV.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return bv(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function Jee(t){bV=t(bV)}function Kge(t){return Hge().includes(t)?function(...e){return t.apply(_V(this),e),bv(this.request)}:function(...e){return bv(t.apply(_V(this),e))}}function Gge(t){return typeof t=="function"?Kge(t):(t instanceof IDBTransaction&&qge(t),vV(t,jge())?new Proxy(t,bV):t)}function bv(t){if(t instanceof IDBRequest)return Yge(t);if(uL.has(t))return uL.get(t);const e=Gge(t);return e!==t&&(uL.set(t,e),qO.set(e,t)),e}const _V=t=>qO.get(t);function Zge(t,e,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(t,e),s=bv(o);return r&&o.addEventListener("upgradeneeded",l=>{r(bv(o.result),l.oldVersion,l.newVersion,bv(o.transaction),l)}),n&&o.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),s}const Qge=["get","getKey","getAll","getAllKeys","count"],Xge=["put","add","delete","clear"],cL=new Map;function Oj(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(cL.get(e))return cL.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,i=Xge.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||Qge.includes(n)))return;const a=async function(o,...s){const l=this.transaction(o,i?"readwrite":"readonly");let c=l.store;return r&&(c=c.index(s.shift())),(await Promise.all([c[n](...s),i&&l.done]))[0]};return cL.set(e,a),a}Jee(t=>({...t,get:(e,n,r)=>Oj(e,n)||t.get(e,n,r),has:(e,n)=>!!Oj(e,n)||t.has(e,n)}));const Jge=["continue","continuePrimaryKey","advance"],Cj={},wV=new WeakMap,ete=new WeakMap,eve={get(t,e){if(!Jge.includes(e))return t[e];let n=Cj[e];return n||(n=Cj[e]=function(...r){wV.set(this,ete.get(this)[e](...r))}),n}};async function*tve(...t){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...t)),!e)return;e=e;const n=new Proxy(e,eve);for(ete.set(n,e),qO.set(n,_V(e));e;)yield n,e=await(wV.get(n)||e.continue()),wV.delete(n)}function Ij(t,e){return e===Symbol.asyncIterator&&vV(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&vV(t,[IDBIndex,IDBObjectStore])}Jee(t=>({...t,get(e,n,r){return Ij(e,n)?tve:t.get(e,n,r)},has(e,n){return Ij(e,n)||t.has(e,n)}}));const nve="0.0.372-alpha.16",rve={version:nve},tte="mediaCachingDB",fh="mediaStore",bD="__cache_flag__",ive=1,nte=!1,_D=rve.version;let j1=null,dT=!1,fT=null,ave=class{constructor(){Jf(this,"logs",[]),Jf(this,"logTimeout",null),Jf(this,"LOG_DELAY",2e3),Jf(this,"MAX_LOGS",100)}addLog(e){const n={...e,timestamp:Date.now()};this.logs.push(n),this.logs.length>this.MAX_LOGS&&(this.logs=this.logs.slice(-this.MAX_LOGS)),this.scheduleLogging()}scheduleLogging(){this.logTimeout&&clearTimeout(this.logTimeout),this.logTimeout=setTimeout(()=>{this.printLogs()},this.LOG_DELAY)}printLogs(){}groupLogsByOperation(){const e={};return this.logs.forEach(n=>{e[n.operation]||(e[n.operation]=[]),e[n.operation].push(n)}),e}getOperationDisplay(e){switch(e){case"HIT":return"✅ HIT";case"MISS":return"⚠️ MISS";case"SAVE":return"💾 SAVE";case"ERROR":return"❌ ERROR";default:return e}}truncateUrl(e,n){return e.length<=n?e:e.substring(0,n-3)+"..."}printEnhancedSummary(){const e=this.logs.reduce((a,o)=>(a.total++,o.size&&(a.totalSize+=o.size),o.duration&&(a.totalDuration+=o.duration,a.minDuration=Math.min(a.minDuration,o.duration),a.maxDuration=Math.max(a.maxDuration,o.duration)),a[o.operation]=(a[o.operation]||0)+1,a),{total:0,totalSize:0,totalDuration:0,minDuration:Number.POSITIVE_INFINITY,maxDuration:0,HIT:0,MISS:0,SAVE:0,ERROR:0});if(e.total===0)return;const n=e.totalDuration/e.total,r=e.total>0?(e.HIT/e.total*100).toFixed(1):"0",i=[{metric:"Total Operations",value:e.total,percentage:"100%",performance:`${n.toFixed(1)}ms avg`},{metric:"Cache Hits",value:e.HIT,percentage:`${r}%`,performance:"✅ Optimal"},{metric:"Cache Misses",value:e.MISS,percentage:`${e.total?(e.MISS/e.total*100).toFixed(1):"0"}%`,performance:"⚠️ Network"},{metric:"New Saves",value:e.SAVE,percentage:`${e.total?(e.SAVE/e.total*100).toFixed(1):"0"}%`,performance:"💾 Storage"},{metric:"Errors",value:e.ERROR,percentage:`${e.total?(e.ERROR/e.total*100).toFixed(1):"0"}%`,performance:e.ERROR?"❌ Issues":"✅ Clean"},{metric:"Total Data Size",value:`${(e.totalSize/1024).toFixed(1)} KB`,percentage:"N/A",performance:"📦 Storage"},{metric:"Performance Range",value:`${isFinite(e.minDuration)?e.minDuration.toFixed(1):"0"}-${e.maxDuration.toFixed(1)}ms`,percentage:"N/A",performance:"⚡ Speed"}];console.table(i)}forceLog(){this.logTimeout&&(clearTimeout(this.logTimeout),this.logTimeout=null),this.printLogs()}clear(){this.logs=[],this.logTimeout&&(clearTimeout(this.logTimeout),this.logTimeout=null)}};const pp=new ave;async function mA(){if(j1)return j1;try{return j1=await Zge(tte,ive,{upgrade(t,e,n){nte&&console.warn(`Upgrading IndexedDB from version ${e} to ${n}`),t.objectStoreNames.contains(fh)||t.createObjectStore(fh)},blocked(){},blocking(){}}),j1}catch(t){throw t}}async function dL(){try{const t=await mA();if(!t)throw new Error("Failed to initialize database");await t.put(fh,_D,bD)}catch(t){throw t}}async function rte(){return fT||(dT?Promise.resolve():(fT=ove(),fT))}async function ove(){try{const t=await mA();if(!t)throw new Error("Failed to initialize database");const e=await t.get(fh,bD);e===void 0?await dL():e!==_D&&await dL(),dT=!0}catch{try{await dL(),dT=!0}catch(t){throw dT=!1,fT=null,t}}}async function ite(t){const e=performance.now();try{const n=await mA();if(!n)return pp.addLog({url:t,operation:"ERROR",error:"Failed to initialize database",duration:performance.now()-e}),null;const r=await n.get(fh,t),i=performance.now()-e;return r?(pp.addLog({url:t,operation:"HIT",size:typeof r=="string"?new Blob([r]).size:0,duration:i}),r):(pp.addLog({url:t,operation:"MISS",duration:i}),null)}catch(n){const r=performance.now()-e;return n instanceof Error&&n.name==="VersionError"?(await sve(),pp.addLog({url:t,operation:"ERROR",error:"VersionError - database reset",duration:r}),null):(pp.addLog({url:t,operation:"ERROR",error:n instanceof Error?n.message:"Unknown error",duration:r}),null)}}async function wD(t,e){const n=performance.now();try{const r=await mA();if(!r)throw pp.addLog({url:t,operation:"ERROR",error:"Failed to initialize database",duration:performance.now()-n}),new Error("Failed to initialize database");const i=new Blob([e]).size;await r.put(fh,e,t),await r.get(fh,bD)!==_D&&await r.put(fh,_D,bD);const a=performance.now()-n;pp.addLog({url:t,operation:"SAVE",size:i,duration:a})}catch(r){const i=performance.now()-n;throw pp.addLog({url:t,operation:"ERROR",error:r instanceof Error?r.message:"Unknown error",duration:i}),r}}async function Mj(t){try{const e=await mA();if(!e)throw new Error("Failed to initialize database");await e.delete(fh,t)}catch(e){throw e}}async function sve(){try{j1=null;const t=indexedDB.deleteDatabase(tte);await new Promise((e,n)=>{t.onsuccess=()=>e(),t.onerror=()=>n(t.error),t.onblocked=()=>{nte&&console.warn("Database deletion blocked - close other tabs using this database"),n(new Error("Database deletion blocked"))}})}catch(t){throw t}}let lve=class{constructor(){Jf(this,"batchQueue",[]),Jf(this,"batchTimeout",null),Jf(this,"BATCH_DELAY",50),Jf(this,"MAX_BATCH_SIZE",10),Jf(this,"MAX_BATCH_WAIT",100)}async addRequest(e){return new Promise((n,r)=>{const i={url:e,resolve:n,reject:r,timestamp:Date.now()};this.batchQueue.push(i),this.batchQueue.length>=this.MAX_BATCH_SIZE?this.processBatch():this.batchTimeout||(this.batchTimeout=setTimeout(()=>{this.processBatch()},this.BATCH_DELAY))})}async processBatch(){if(this.batchTimeout&&(clearTimeout(this.batchTimeout),this.batchTimeout=null),this.batchQueue.length===0)return;const e=this.batchQueue.splice(0,this.MAX_BATCH_SIZE),n=e.map(i=>i.url),r=[...new Set(n)];try{const i=await this.fetchBatch(r);e.forEach(a=>{const o=i.get(a.url);o!==void 0?a.resolve(o):a.reject(new Error("Request not found in batch results"))})}catch(i){e.forEach(a=>{a.reject(i)})}}async fetchBatch(e){const n=new Map,r=e.map(async s=>{try{const l=await ite(s);return{url:s,result:l}}catch(l){return{url:s,result:null,error:l}}}),i=await Promise.all(r),a=new Set;i.forEach(({url:s,result:l})=>{l&&(n.set(s,l),a.add(s))});const o=e.filter(s=>!a.has(s));if(o.length>0){const s=o.map(async l=>{try{const c=await this.fetchSingleResource(l);return{url:l,result:c}}catch{return{url:l,result:null}}});(await Promise.all(s)).forEach(({url:l,result:c})=>{n.set(l,c)})}return n}async fetchSingleResource(e){try{const n=await fetch(e);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const r=n.headers.get("Content-Type");if(!r)throw new Error("No content type received");if(r.includes("image/svg+xml")){const i=await n.text();return await wD(e,i),i}if(r.includes("image/")){const i=await n.blob();if(!i||i.size===0)throw new Error("Invalid or empty blob received from server");const a=await this.blobToBase64(i);return await wD(e,a),a}throw new Error(`Unsupported content type: ${r}`)}catch{return null}}blobToBase64(e){return new Promise((n,r)=>{const i=new FileReader;i.onload=()=>n(i.result),i.onerror=r,i.readAsDataURL(e)})}forceProcess(){this.batchTimeout&&(clearTimeout(this.batchTimeout),this.batchTimeout=null),this.processBatch()}getStatus(){return{queueLength:this.batchQueue.length,hasTimeout:!!this.batchTimeout}}clear(){this.batchTimeout&&(clearTimeout(this.batchTimeout),this.batchTimeout=null),this.batchQueue.forEach(e=>{e.reject(new Error("Batch cleared"))}),this.batchQueue=[]}};const uve=new lve;async function cve(t){return uve.addRequest(t)}const qt=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},fk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABLAAAAKjCAYAAAANs/bAAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAACdLSURBVHgB7d0LaxzJ2bDh+jLByxgZGRktEhYeCBgE+d/5R4FAYIPDGhsbGQubmDUR30uN07uSrcMcuqufqrouGLQJe7DlHvXTN1U1/+9vf/vb/08AAAAAENSfEgAAAAAEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAENqfE0Ahjx49SsvlMi0Wi/Vf//TTT7//df46/D23ubq6+uH19evX9N///jd9+fJl/b+HrwAAALRFwAJGN0Spg4OD9Pjx43W0uh6pdv13bvLPDyHr06dP66/5lUMXAAAA9RKwgFHkWPXkyZP112GV1Rzyfzf/GvJrkAPW58+f11ErfxW0AAAA6iJgATvJoejw8HAdrfLXuYLVJvLqr6Ojo/Ury6uycsi6uLhY/zUAAACxCVjAxobVTT///POsq6z2lX/t+XV8fLxejXV5eZnevXtnZRYAAEBQAhbwoBytnj59ul7BVGu0uktenZVDVn4Nq7I+fPiQAAAAiEPAAu6Uw9Xp6emN86RaNpydlX/POWa9efPGqiwAAIAABCzghrzCKm8RzKut8uqkHl0/MyuvxhKyAAAA5iVgAWtDuMpb6VrbJrgPIQsAAGB+AhawDjR521yvK642IWQBAADMR8CCjvV2xtUYhpD19u3b9ScXXl1dJQAAAKYlYEGH8hbB1WqVDg8PE7s5OTlZh6y8GsunFgIAAExLwILO5HOucnxxztX+8pbLHAKfPHliWyEAAMCEBCzoxBBbbBccX16JlVez5Yj1/v37BAAAwLgELOjAs2fP0vPnz626mlD+3p6dnaXHjx9bjQUAADAyAQsalqNKPqT9+Pg4UUZejZVXub169Sp9/vw5AQAAsL8/JaBJecvg+fm5eDWD/L1/+fLlOh4CAACwPyuwoEH5PKZ83pUtg/PKh+Uvl8v1aqyrq6sEAADAbqzAgsbkVT9/+ctfxKsgckzMK+HyqiwAAAB2I2BBQ/Ih4nnVD7EMWwrzaiwAAAC2J2BBA/Jqq7zqynlXcQ0RK6/IAgAAYDsCFlQuxythpA5DaMyfVAgAAMDmBCyo2BCvbE2rSz5gX8QCAADYnIAFlRKv6iZiAQAAbE7AggqJV20QsQAAADYjYEGFxKt25Ijl/DIAAID7CVhQmRw8xKu2+DMFAAC4n4AFFTk9PbXlrEHDpxM+evQoAQAA8CMBCyrx888/p5OTk0SbcrzKW0NzzAIAAOAmAQsqkLeXPX/+PNG2HLHydkIAAABuErAguBw18vYy+pAPdM9bRQEAAPiDgAXB5RU5zkbqS94qenBwkAAAAPhGwILA8kocIaNPOVw6DwsAAOAbAQuCyquuHNreL1tHAQAA/iBgQUB55U3+RDr6llffHR8fJwAAgN4JWBBQ3jro3Csy1wIAAICABeHkWGHVDYO8Gi+fhwUAANAzAQuCsXWQ7+WthIeHhwkAAKBXAhYE8vPPP9suxq18KiEAANAzAQuCsHWQ++R45foAAAB6JWBBEA7r5iFW6AEAAL0SsCCAHCWOjo4S3CevwsqhEwAAoDcCFgQgSrCpHDrzoe4AAAA9EbBgZlZfsS3BEwAA6I2ABTMTI9hWXoFlFRYAANATAQtmZPUVu8oHugMAAPRCwIIZWX3Frg4PD9eHugMAAPRAwIKZWH3Fvo6PjxMAAEAPBCyYiTOM2FfeRmgVFgAA0AMBC2Zi+yD7yvHKKj4AAKAHAhbMIK++ylsIYV9Pnz5NAAAArROwYAbPnj1LMIYcQ5fLZQIAAGiZgAWF2fbF2PInEgIAALRMwILCxAbGZkUfAADQOgELCnNmEWPL56n5VEsAAKBlAhYUlLcPWoHFFAQsAACgZQIWFCQyMJUnT54kAACAVglYUJDtg0wlx9G8wg8AAKBFAhYUZAUWU7I9FQAAaJWABYXkg7bzC6YikAIAAK0SsKAQcYGpOQcLAABolYAFhYgLTM0qPwAAoFUCFhSyXC4TTM11BgAAtEjAgkKEBUqwVRUAAGiRgAUFiAqUYgshAADQIgELCrD6ilIeP36cAAAAWiNgQQFWxVBKvtYWi0UCAABoiYAFBVgVQ0mCKQAA0BoBCwqwIoaSbFkFAABaI2BBAYICJQmmAABAawQsmJiYQGm2EAIAAK0RsGBiYgKliaYAAEBrBCyYmJhAaT/99FMCAABoiYAFExOwKM2qPwAAoDUCFkxMwAIAAID9CFgwMQGL0lxzAABAawQsmJiYQGmuOQAAoDUCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWDCxr1+/JijJNQcAALRGwAIAAAAgNAELJnZ1dZWgJCuwAACA1ghYMDExAQAAAPYjYMHErMCitN9++y0BAAC0RMCCiVmBRWmuOQAAoDUCFhQgKFCSVX8AAEBrBCwoQFCgpC9fviQAAICWCFhQwH/+858EpQimAABAawQsKMCKGEpyvQEAAK0RsKAAZ2BRingFAAC0SMCCAkQFSrFdFQAAaJGABQXkFVjOJaIEsRQAAGiRgAWFfP78OcHUBCwAAKBFAhYUYmsXJQilAABAiwQsKERYYGquMQAAoFUCFhSSt3Y5B4spffr0KQEAALRIwIJCcrxyPhFTsgILAABolYAFBX38+DHBFHIgFbAAAIBWCVhQ0OXlZYIp2D4IAAC0TMCCgr5+/bp+wdjEUQAAoGUCFhR2cXGRYGwCFgAA0DIBCwpzThFjy2er+YRLAACgZQIWFJYDlk8jZExWXwEAAK0TsGAGPo2QseQz1T58+JAAAABaJmDBDN6/f59gDD59EAAA6IGABTPI5xU5C4sxvH37NgEAALROwIKZvHnzJsE+cgTNWwgBAABaJ2DBTHJ8sAqLfVxcXCQAAIAeCFgwIwGCXTm8HQAA6ImABTO6vLxcn4cF27IFFQAA6ImABTPK8erdu3cJtmH1FQAA0BsBC2b2/v17q7DYitVXAABAbwQsmFmOV4IEm7L6CgAA6JGABQHkVVg5TMBDxE4AAKBHAhYE8erVqwT3sfoKAADolYAFQXz+/Hn9grv88ssvCQAAoEcCFgTy66+/JrjNxcVF+vLlSwIAAOiRgAWB5EDhjCO+l7cOvn37NgEAAPRKwIJgHOjO93LUdE0AAAA9E7AgmKurKwe687t8LpqD2wEAgN4JWBBQjhbv3r1L9C2vuhIzAQAABCwIK5955NDuvtk6CAAA8I2ABUHlrYS//PLL+iv9ySvwbB0EAAD4RsCCwPLqG59K2B+fOggAAHCTgAXB5U8ldB5WP/KKu3/+859W3gEAAFwjYEEFXr9+7TysTuRD2517BQAAcJOABZXI52EJG23L20UvLy8TAAAANwlYUIkcr2wta1feJurcKwAAgNsJWFCRIWLRlo8fP663iQIAAHA7AQsqk8/Cyuck0Yb85/nvf/87AQAAcDcBCyr04cMHEasBOV7ZFgoAAPAwAQsqJWLVTbwCAADYnIAFFROx6iReAQAAbEfAgsqJWHURrwAAALb35wRUL0esHEZevnyZFotFIqaLiwsHtgMAAOzACixoRA5Y//jHP9LXr18T8bx580a8AgAA2JGABQ3J8SpvT8sxizh+/fXX9Pbt2wQAAMBuBCxoTI5YeSXWu3fvEvMa/izev3+fAAAA2J0zsKBRr1+/XgeU09NT52LN4PPnz+vD9W3pBAAA2J+ABQ3LK38uLy/Xh7s/evQoUUbeMmjVFQAAwHhsIYTG5RVAf//739eHiDOt4Qwy8QoAAGBcVmBBJ/Ih4nlb22q1shprAvnMsfw9vrq6SgAAAIxLwIKO5ICVV2OdnJysz8Zif/kTH/OWwfy9BQAAYBoCFnQorxT68OFDev78eXr69Glie3ml1bDqCgAAgGkJWNCpfF7Tv/71r3R0dLRejWVb4eZsFwQAAChLwILO5ZVY+SVkPSxvE3z16tU6/gEAAFCOgAWsCVl3y+Eqf4qjc64AAADmIWABNwhZ3+TtgRcXF+vvRT6oHQAAgPkIWMCthpB1cHCwjlnPnj1LPRgOZ3///r0zrgAAAIIQsIB75W1z+ZUPLc8xq8VVWTlU5d9jDle2CQIAAMQjYAEbyQeXD6uylsvlelXW06dPq41ZOVrlrYF5m+Dl5aXVVgAAAIEJWMDWcvh5/fr1+pVjVl6ZlWNW/hpZjnAfP35cB6v8exCtAAAA6iBgAXvJISi/8plRWY5Y+fXkyZN13FosFmkuw6/t06dP662BOWABAABQHwELGNX1M7OyvMUwh6z8evz48TpojRm28iqqYTvgb7/99nu0yrHKCisAAIA2CFjApHJIyq+8be97OW4NZ2h9//V7Q6i6/u+8/v8BAADQLgELmM0QogAAAOA+f0oAAAAAEJiABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABANCcxWKRAIB2CFgAADRluVymv/71r+no6CgBAG0QsAAAaEaOVy9fvlyvwFqtViIWADRCwAIAoAnX49VAxAKANghYAABU77Z4NRCxAKB+AhYAAFW7L14NRCwAqJuABQBAtTaJVwMRCwDqJWABAFClbeLVQMQCgDoJWAAAVOfRo0dbx6uBiAUA9RGwAACoyj7xaiBiAUBdBCwAAKoxxKv8dV8iFgDUQ8ACAKAKY8argYgFAHUQsAAACG+KeDXIEev4+DgBAHEJWAAAhDZlvBqcnZ2l09PTBADEJGABABBWiXg1ODk5EbEAICgBCwCAkErGq4GIBQAxCVgAAIQzR7waiFgAEI+ABQBAKHPGq4GIBQCxCFgAAIQRIV4NRCwAiEPAAgAghEjxaiBiAUAMAhYAALOLGK8GIhYAzE/AAgBgVpHj1UDEAoB5CVgAAMymhng1ELEAYD4CFgAAs1gsFtXEq4GIBQDzELAAACiuxng1ELEAoDwBCwCAooZ4tVwuU61ELAAoS8ACAKCYFuLVQMQCgHIELAAAimgpXg1ELAAoQ8ACAGByLcargYgFANMTsAAAmFTL8WogYgHAtAQsAAAm00O8GohYADAdAQsAgMmsVqsu4tVAxAKAaQhYAABMIserw8PD1BsRCwDGJ2ABADC6HK+Ojo5Sr0QsABiXgAUAwKh6j1cDEQsAxiNgAQAwGvHqJhELAMYhYAEAMArx6nY5Yp2dnSUAYHcCFgAAexOv7nd8fLz+HgEAuxGwAADYi3i1mfw9ErEAYDcCFgAAO8vnO4lXmxOxAGA3AhYAADvJ8Sqf78R2RCwA2J6ABQDA1sSr/YhYALAdAQsAgK2IV+MQsQBgcwIWAAAbE6/GJWIBwGYELAAANiJeTUPEAoCHCVgAADxIvJqWiAUA9xOwAAC4l3hVhogFAHcTsAAAuJN4VZaIBQC3E7AAALiVeDWPHLFevnyZFotFAgC+EbAAAPiBeDWvg4MDEQsArhGwAAC4QbyKYblcilgA8D8CFgAAvxOvYhGxAOAbAQsAgDXxKiYRCwAELAAAkngVnYgFQO8ELACAzj179ky8qoCIBUDPBCwAgI7lePXixYtEHUQsAHolYAEAdEq8qpOIBUCPBCwAgA6JV3UTsQDojYAFANAZ8aoNIhYAPRGwAAA6Il61RcQCoBcCFgBAJ8SrNuWIdX5+nh49epQAoFUCFgBABw4PD8WrhuV4lVdiiVgAtErAAgBoXF6hs1qtEm0TsQBomYAFANAwZyT1RcQCoFUCFgBAo8SrPolYALRIwAIAaJB41TcRC4DWCFgAAI0Rr8hELABaImABADREvOI6EQuAVghYAACNEK+4jYgFQAsELACABgyRQrziNiIWALUTsAAAKidesQkRC4CaCVgAABUTJdiG6wWAWglYAACVEiPYhesGgBoJWAAAFRIh2IfrB4DaCFgAAJURHxiD6wiAmghYAAAVER0Yk+sJgFoIWAAAlRAbmILrCoAaCFgAABUQGZiS6wuA6AQsAIDgxAVKcJ0BEJmABQAQmKhASa43AKISsAAAghITmIPrDoCIBCwAgIBEBObk+gMgGgELACAY8YAIXIcARCJgAQAEIhoQiesRgCgELACAIBaLhVhAOPl6PD8/T8vlMgHAXAQsAIAAxCsiG65PEQuAuQhYAAAzEweogesUgDkJWAAAMxIFqInrFYC5CFgAADMRA6iR6xaAOQhYAAAzEAGomesXgNIELACAwjz80wLXMQAlCVgAAAV56KclrmcAShGwAAAKWq1WHvZpiogFQAkCFgBAITleHR4eJmiNiAXA1AQsAIACcrw6OjpK0CoRC4ApCVgAABMTr+jFELEODg4SAIxJwAIAmJB4RW+GiOW6B2BMAhYAwETEK3rm+gdgTAIWAMAEPLyD9wEA4xGwAABG5qEd/uD9AMAYBCwAgBGdnp56WIfviFgA7EvAAgAYSY5XJycnCfiRiAXAPgQsAIARiFfwMBELgF0JWAAAexKvYHMiFgC7ELAAAPYgXsH2RCwAtiVgAQDsSLyC3YlYAGxDwAIA2IF4BfsTsQDYlIAFALAl8QrGkyPW8fFxAoD7CFgAAFsQr2B8Z2dn6/cWANxFwAIA2JB4BdPJ7y0RC4C7CFgAABsQr2B6IhYAdxGwAAAeIF5BOSIWALcRsAAA7iFeQXkiFgDfE7AAAO4gXsF8RCwArhOwAABuIV7B/EQsAAYCFgDAd549eyZeQRAiFgCZgAUAcE2OVy9evEhAHCIWAAIWAMD/iFcQl4gF0DcBCwAgiVdQAxELoF8CFgDQPfEK6iFiAfRJwAKowGKxSMA0xCuoj4gF0B8BCyC4R48epfPzc4M6TEC8gnqJWAB9EbAAAsvx6uXLl+uvBnUY1+HhoXgFlXNvBOiHgAUQ1PV4NTCowziWy2VarVYJqJ97I0AfBCyAgG6LVwODOuwnx6v8/nK2HLTDvRGgfQIWQDD3xauBQR12I15Bu9wbAdomYAEEskm8GhjUYTviFbTPvRGgXQIWQBDbxKuBQR02I15BP9wbAdokYAEEsEu8GhjU4X7iFfTHvRGgPQIWwMz2iVcDgzrcTryCfrk3ArRFwAKY0RjxamBQh5uG95d4Bf1ybwRoh4AFMJMx49XAoA7fiFfAIN8bz87OEgB1E7AAZjBFvBqIWPRuyvcXUKfj4+O0Wq0SAPUSsAAKK/FwLWLRK/EKuMvR0ZGIBVAxAQugoJIP1yIWvRGvgIeIWAD1ErAACpnj4VrEohfiFbApEQugTgIWQAFzPlyLWLROvAK2JWIB1EfAAphYhIdrEYtWiVfArkQsgLoIWAATivRwLWLRGvEK2JeIBVAPAQtgIhEfrkUsWiFeAWMRsQDqIGABTCDyw7WIRe3EK2BsIhZAfAIWwMhqeLgWsaiVeAVMRcQCiE3AAhhRTQ/XIha1Ea+AqYlYAHEJWAAjqfHhWsSiFuIVUEqOWPnnzWKxSADEIWABjKDmh2sRi+jEK6C0g4MDEQsgGAELYE8tPFyLWESVHx7FK2AOy+VSxAIIRMAC2ENLK0NELKIRr4C5iVgAcQhYADtqcVuTiEUUQ7zKD48AcxKxAGIQsAB20PKZPCIWcxOvgGhELID5CVgAW+rhQGkRi7mIV0BUIhbAvAQsgC309GloIhaliVdAdCIWwHwELIAN9RSvBiIWpYhXQC1ELIB5CFgAG+gxXg1ELKYmXgG1EbEAyhOwAB7Qc7waiFhMabVaiVdAdUQsgLIELIB7iFd/ELGYQo5Xh4eHCaBGIhZAOQIWwB3Eqx+JWIwpx6ujo6MEULMcsc7Pz80LABMTsABuIV7dTcRiDOIV0BJzA8D0BCyA7xhCHyZisQ/xCmiR+QFgWgIWwDWGz82JWOxCvAJaZo4AmI6ABfA/hs7tiVhsQ7wCemCeAJiGgAWQDJv7ELHYhHgF9MRcATA+AQvoniFzfyIW98nXhngF9MZ8ATAuAQvomuFyPCIWt8nXRL42AHpkzgAYj4AFdMtQOT4Ri+vEKwDzBsBYBCygS4bJ6YhYZOIVwB/MHQD7E7CA7hgipydi9U28AviR+QNgPwIW0BXDYzkiVp/EK4C7mUMAdidgAd0wNJYnYvVFvAJ4mHkEYDcCFtAFw+J8RKw+iFcAmzOXAGxPwAKaZ0icn4jVNvEKYHvmE4DtCFhA0wyHcYhYbRKvAHZnTgHYnIAFNMtQGI+I1RbxCmB/5hWAzQhYQJMMg3GJWG0QrwDGY24BeJiABTTHEBifiFU38QpgfOYXgPsJWEBTDH/1ELHqJF4BTMccA3A3AQtohqGvPiJWXcQrgOmZZwBuJ2ABTTDs1UvEqsOzZ8/EK4BCzDUAPxKwgOoZ8uonYsWW49WLFy8SAOWYbwBuErCAqhnu2iFixSReAczHnAPwBwELqJahrj0iViziFcD88pxzfn6elstlAuiZgAVUSbxql4gVg3gFEMdisVjPPSIW0DMBC6iOeNU+EWte4hVAPCIW0DsBC6iKeNUPEWse4hVAXCIW0DMBC6iGeNUfEausw8ND8QogOBEL6JWABVRBvOqXiFVGfhBarVYJgPhELKBHAhYQnniFiDWt/ACU32P5gQiAOohYQG8ELCA08YqBiDUN8QqgXiIW0BMBCwhLvOJ7Ita4xCuA+olYQC8ELCAk8Yq7iFjjEK8A2iFiAT0QsIBwxCseImLtR7wCaI+IBbROwAJCEa/YlIi1G/EKoF1DxDo4OEgArRGwgDDEK7YlYm1neI+JVwDtGiLW0dFRAmiJgAWEIF6xKxFrM+IVQF9Wq5WIBTRFwAJmJ16xLxHrft5jAH0SsYCWCFjArDxYMxYR63beYwB9E7GAVghYwGw8WDM2Eesm7zEAMhELaIGABczCgzVTEbG+8R4D4DoRC6idgAUU58GaqfUesbzHALiNiAXUTMACivJgTSm9RizvMQDuI2IBtRKwgGI8WFNabxHLewyATYhYQI0ELKAID9bMpZeI5T0GwDZELKA2AhYwOQ/WzK31iOU9BsAuRCygJgIWMCkP1kTRasTyHgNgHzliHR8fJ4DoBCxgMh6siaa1iOU9BsAYzs7Ouv70XqAOAhYwCQ/WRNVKxPIeA2BMvX56L1APAQsYnQdroqt9SPceA2AKIhYQmYAFjMqDNbWodUhfLBbeYwBMRsQCohKwgNGIV9SmtiFdvAKgBBELiEjAAkYhXlGrWob0IV4tl8sEAFMTsYBoBCxgb+IVtYs+pItXAMxBxAIiEbCAvYhXtCLqkC5eATAnEQuIQsACdiZe0ZpoQ7p4BUAEIhYQgYAF7ES8olVRhnTxCoBIRCxgbgIWsDXxitbNPaSLVwBEJGIBcxKwgK2IV/RiziF9tVqJVwCEJGIBcxGwgI2JV/RmjiE9x6vDw8MEAFGJWMAcBCxgI+IVvSo5pOd4dXR0lAAgOhELKE3AAh4kXtG7EkO6eAVAbUQsoCQBC7iXeAXfTDmki1cA1ErEAkoRsIA7iVdw0xRDungFQO1ELKAEAQu4lXgFtxtzSBevAGiFiAVMTcACfiBewf3GGNLFKwBaI2IBUxKwgBvEK9jMPkN6/ufEKwBaJGIBUxGwgN+JV7CdXYb0/Pfnfw4AWiViAVMQsIA18Qp2s82QLl4B0AsRCxibgAWIV7CnTYZ08QqA3ohYwJgELOiceAXjuG9IF68A6FW+/52dnSWAfQlY0DHxCsZ1W8QSrwDo3fHx8frTdwH2IWBBp8QrmMb1iCVeAcA3+dN3RSxgH39OQHfEK5hWjlYHBwfrFwDwTY5Y2atXrxLAtqzAgs6IV1CGeAUAP7ISC9iVgAUdEa8AAJibiAXsQsCCTohXAABEIWIB2xKwoAPiFQAA0YhYwDYELGiceAUAQFQiFrApAQsaJl4BABCdiAVsQsCCRolXAADUQsQCHiJgQYPEKwAAaiNiAfcRsKAx4hUAALXKESvPsovFIgFcJ2BBQ8QrAABqd3BwIGIBPxCwoBHiFQAArVgulyIWcIOABQ0QrwAAaI2IBVwnYEHlxCsAAFolYgEDAQsqJl4BANA6EQvIBCyolHgFAEAvRCxAwIIKiVcAAPRGxIK+CVhQGfEKAIBeiVjQLwELKiJeAQDQOxEL+iRgQSXEKwAA+EbEgv4IWFAB8QoAAG4SsaAvAhYEJ14BAMDtcsQ6Pz83K0MHBCwITLwCAID7mZmhDwIWBOVGDAAAmzE7Q/sELAjIDRgAALZjhoa2CVgQjBsvAADsxiwN7RKwIBA3XAAA2I+ZGtokYEEQbrQAADAOszW0R8CCANxgAQBgXGZsaIuABTNzYwUAgGmYtaEdAhbMyA0VAACmZeaGNghYMBM3UgAAKMPsDfUTsGAGbqAAAFCWGRzqJmBBYW6cAAAwD7M41EvAgoLcMAEAYF5mcqiTgAWFuFECAEAMZnOoj4AFBbhBAgBALGZ0qIuABRNzYwQAgJjM6lAPAQsm5IYIAACxmdmhDgIWTMSNEAAA6mB2h/gELJiAGyAAANTFDA+xCVgwMjc+AACok1ke4hKwYERueAAAUDczPcQkYMFI3OgAAKANZnuIR8CCEbjBAQBAW8z4EIuABXtyYwMAgDblGf/8/Dwtl8sEzEvAgj2IVwAA0LbFYrGe+UUsmJeABTsSrwAAoA8iFsxPwIIdiFcAANAXEQvmJWDBlsQrAADok4gF8xGwYAviFQAA9E3EgnkIWLAh8QoAAMhELChPwIINiFcAAMB1IhaUJWDBA8QrAADgNiIWlCNgwT3EKwAA4D4iFpQhYMEdxCsAAGATIhZMT8CCW4hXAADANoaIdXBwkIDxCVjwHfEKAADYxRCxjo6OEjAuAQuuEa8AAIB9rVYrEQtGJmDB/4hXAADAWEQsGJeABUm8AgAAxidiwXgELLonXgEAAFMRsWAcAhZdE68AAICpiViwPwGLbolXAABAKSIW7EfAokviFQAAUJqIBbsTsOiOeAUAAMxFxILdCFh0RbwCAADmJmLB9gQsuiFeAQAAUYhYsB0Biy6IVwAAQDQ5Yh0fHyfgYQIWzROvAACAqM7OztLp6WkC7idg0TTxCgAAiO7k5ETEggcIWDRLvAIAAGohYsH9BCyaJF4BAAC1EbHgbgIWzRGvAACAWolYcDsBi6aIVwAAQO1ELPiRgEUzxCsAAKAVIhbcJGDRBPEKAABojYgFfxCwqJ54BQAAtErEgm8ELKomXgEAAK0TsUDAomLiFQAA0AsRi94JWFRJvAIAAHojYtEzAYvqiFcAAECvRCx6JWBRFfEKAADonYhFjwQsqiFeAQAAfCNi0RsBiyqIVwAAADeJWPREwCI88QoAAOB2Iha9ELAITbwCAAC4n4hFDwQswhKvAAAANiNi0ToBi5DEKwAAgO2IWLRMwCIc8QoAAGA3IhatErAIRbwCAADYj4hFiwQswhCvAAAAxiFi0RoBixDEKwAAgHHliHV2dpagBQIWsxOvAAAApnF8fJxWq1WC2glYzEq8AgAAmNbR0ZGIRfUELGYjXgEAAJQhYlE7AYtZiFcAAABliVjUTMCiOPEKAABgHiIWtRKwKEq8AgAAmJeIRY0ELIoRrwAAAGIQsaiNgEUR4hUAAEAsIhY1EbCYnHgFAAAQk4hFLQQsJiVeAQAAxCZiUQMBi8mIVwAAAHUQsYhOwGIS4hUAAEBdcsTKz3GLxSJBNAIWoxOvAAAA6nRwcCBiEZKAxajEKwAAgLotl0sRi3AELEYjXgEAALRBxCIaAYtRiFcAAABtEbGIRMBib+IVAABAm0QsohCw2It4BQAA0DYRiwgELHYmXgEAAPRBxGJuAhY7Ea8AAAD6ImIxJwGLrYlXAAAAfRKxmIuAxVbEKwAAgL6JWMxBwGJj4hUAAACZiEVpAhYbEa8AAAC4Lkes8/Nzz4kUIWDxIPEKAACA23hepBQBi3v5YQQAAMB9PDdSgoDFnfwQAgAAYBOeH5magMWt/PABAABgG54jmZKAxQ/80AEAAGAXnieZioDFDX7YAAAAsA/PlUxBwOJ3fsgAAAAwBs+XjE3AYs0PFwAAAMbkOZMxCVj4oQIAAMAkPG8yFgGrc36YAAAAMCXPnYxBwOqYHyIAAACU4PmTff0fcAVXtCn46yAAAAAASUVORK5CYII=",dve=[],fve=["UploadInProgress"],hve=["innerHTML"],pve=["src","alt"],mve=Qe({__name:"SvgRender",props:{name:{default:""},url:{default:""},alt:{default:"image"},classIcon:{default:"arbo-icon-state"},type:{default:"icon"},isSquareSize:{type:Boolean,default:!1},imageDefault:{default:fk},iconStyle:{default:""}},emits:["error","load"],setup(t,{emit:e}){const n=t,r=Ht({imageSrc:null,retried:!1,svgContent:null,isLoading:!1,error:null}),i=e,a=re(null),o=hc("ASSET_URL","https://arbodev.s3.ap-south-1.amazonaws.com"),s=C=>{var F;return C&&((F=C.split(".").pop())==null?void 0:F.toLowerCase())||""},l=()=>Math.random().toString(36).slice(2,11),c=C=>new Promise((F,W)=>{if(C.type==="image/gif"){const j=new FileReader;j.onload=()=>F(j.result),j.onerror=W,j.readAsDataURL(C);return}const H=new Image;H.onload=()=>{try{const j=document.createElement("canvas"),N=j.getContext("2d");if(!N){W(new Error("Could not get canvas context"));return}j.width=H.naturalWidth||H.width,j.height=H.naturalHeight||H.height,N.drawImage(H,0,0);const U=j.toDataURL("image/png",.9);URL.revokeObjectURL(H.src),F(U)}catch(j){URL.revokeObjectURL(H.src),W(j)}},H.onerror=()=>{URL.revokeObjectURL(H.src),W(new Error("Failed to load image from blob"))},H.src=URL.createObjectURL(C)}),f=re(null),h=C=>{if(!C.startsWith("data:image/"))return!1;const F=C.split(",")[1];if(!F||F.length===0)return!1;try{const W=F.substring(0,Math.min(100,F.length));return atob(W),!0}catch(W){return console.warn("Invalid base64 data detected:",W),!1}},p=Z(()=>r.imageSrc||""),g=Z(()=>r.svgContent),y=Z(()=>!!(n.name&&n.type!=="visual")),v=Z(()=>{let C=n.classIcon;return y.value&&(C+=" arbo__internal-icon"),C}),b=Z(()=>{if(n.name&&n.type!=="visual")return!0;const C=s((n==null?void 0:n.url)||"");return(C==null?void 0:C.toLowerCase())==="svg"}),w=C=>{if(!C)return null;try{const F=new DOMParser().parseFromString(C,"image/svg+xml"),W=F.documentElement,H=`-${l()}`,j=F.querySelector("linearGradient");if(j){const le=j.getAttribute("id");if(le){const _e=le+H;j.setAttribute("id",_e);const be=F.querySelector("rect");be&&be.getAttribute("fill")===`url(#${le})`&&be.setAttribute("fill",`url(#${_e})`)}}const N=W.getAttribute("style")||"",U=n.iconStyle||"",ee=`${N}; ${U}`.trim();return ee&&W.setAttribute("style",ee),W.setAttribute("class",v.value),new XMLSerializer().serializeToString(F)}catch(F){return console.error("Error formatting SVG:",F),r.error="Failed to format SVG",C}};async function S(C){if(!C)return null;const F=await ite(C);if(F)if(F.startsWith("data:image/")&&!h(F)){console.warn("Cached base64 is corrupted, removing from cache and refetching:",C);try{await Mj(C),console.warn("Successfully removed corrupted cache entry")}catch(W){console.warn("Failed to remove corrupted cache entry:",W)}}else return F;try{r.isLoading=!0;const W=await fetch(C);if(!W.ok)throw new Error(`HTTP error! status: ${W.status}`);const H=W.headers.get("Content-Type");if(H!=null&&H.includes("image/svg+xml")||H!=null&&H.includes("text/xml")){const j=await W.text();if(j.trim())return await wD(C,j),j;throw new Error("Empty SVG content received")}else if(H&&(H.includes("image/jpeg")||H.includes("image/jpg")||H.includes("image/png")||H.includes("image/gif")||H.includes("image/webp"))){const j=await W.blob();if(j&&j.size>0){const N=await c(j);return await wD(C,N),N}else throw new Error("Invalid or empty blob received from server")}else throw new Error(`Unsupported content type: ${H}`)}catch(W){return console.error(`Failed to fetch media: ${C}`,W),r.error=`Failed to fetch media: ${W}`,null}finally{r.isLoading=!1}}const T=()=>{if(!n.name||n.type==="visual")return"";let C=`${o}/icon/tess`,F="TESSRAPP_Icon_";switch(n.type){case"rating":{C=`${o}/icon/tess/rating`;break}case"country":{C=n.isSquareSize?`${o}/icon/flags/1x1`:`${o}/icon/flags/4x3`,F="";break}default:{C=`${o}/icon/tess`;break}}return`${C}/${F}${n.name}.svg`},_=async()=>{switch(r.isLoading=!0,r.svgContent=null,r.imageSrc=null,r.error=null,f.value=null,!0){case(n.name&&n.type!=="visual"):await E();break;case(n.url&&n.type!=="visual"):await D();break;case!!(n.type==="visual"&&n.name):await O();break;default:await V();break}setTimeout(()=>{r.isLoading=!1},300)},E=async()=>{try{const C=T(),F=await S(C);if(typeof F=="string")F.startsWith("data:image/")?(r.imageSrc=F,r.svgContent=null,f.value=C):r.svgContent=F;else throw new Error("Failed to load internal icon")}catch(C){console.error("Error loading internal icon:",C),r.error=`Failed to load icon: ${C}`,await V()}},D=async()=>{try{const C=await S(n.url);if(typeof C=="string")C.startsWith("data:image/")?(r.imageSrc=C,r.svgContent=null,f.value=n.url):r.svgContent=C;else throw new Error("Failed to load external media")}catch(C){console.error("Error loading external media:",C),r.error=`Failed to load external media: ${C}`,await V()}},O=async()=>{try{const C=`${o}/icon/visual`,F="TESSRAPP_Visual_",W=dve.includes(n.name)?"svg":fve.includes(n.name)?"gif":"png",H=`${C}/${F}${n.name}.${W}`,j=await S(H);if(typeof j=="string")j.startsWith("data:image/")?(r.imageSrc=j,r.svgContent=null,f.value=H):r.svgContent=j;else throw new Error("Failed to load visual asset")}catch(C){console.error("Error loading visual asset:",C),r.error=`Failed to load visual asset: ${C}`,await V()}},V=async()=>{try{const C=typeof n.imageDefault=="string"?n.imageDefault:fk,F=await S(C);typeof F=="string"?F.startsWith("data:image/")?(r.imageSrc=F,r.svgContent=null,f.value=C):r.svgContent=F:r.imageSrc=C}catch(C){console.error("Error loading default image:",C),r.imageSrc=typeof n.imageDefault=="string"?n.imageDefault:fk}},P=async()=>{var C;if(i("error",r.error||"Image failed to load"),!r.retried){try{if((C=r.imageSrc)!=null&&C.startsWith("data:image/")&&f.value){console.warn("Base64 image failed to load, removing potentially corrupted cache entry");try{await Mj(f.value)}catch(F){console.warn("Failed to remove corrupted cache entry:",F)}}}catch(F){console.error("Error during image error recovery:",F);const W=typeof n.imageDefault=="string"?n.imageDefault:fk;await V(),r.imageSrc=W,f.value=null}r.retried=!0}},M=()=>{i("load")};return Ge(()=>[n.name,n.url,n.type],async()=>{r.retried=!1,r.error=null,await _()}),Ks(async()=>{r.retried=!1,r.error=null,await _()}),zt(async()=>{await rte()}),(C,F)=>b.value&&g.value?(R(),Y("div",{key:0,class:"svg-render",innerHTML:w(g.value)},null,8,hve)):p.value?(R(),Y("img",{key:1,ref_key:"imgInstance",ref:a,src:p.value,alt:n.alt,class:Fe(n.classIcon),onError:P,onLoad:M},null,42,pve)):pe("",!0)}}),mr=qt(mve,[["__scopeId","data-v-58ceffbd"]]),qn=Qe({__name:"Icon.ce",props:{name:{type:String,required:!0},type:{type:String,default:"icon"},isSquareSize:{type:Boolean,default:!1}},setup(t){const e=t;return(n,r)=>(R(),Re(mr,Ft(e,{"class-icon":`arbo--icon ${e.type}`}),null,16,["class-icon"]))}});var Bs="top",su="bottom",lu="right",Us="left",pU="auto",gA=[Bs,su,lu,Us],Pb="start",pS="end",gve="clippingParents",ate="viewport",c1="popper",vve="reference",Rj=gA.reduce(function(t,e){return t.concat([e+"-"+Pb,e+"-"+pS])},[]),ote=[].concat(gA,[pU]).reduce(function(t,e){return t.concat([e,e+"-"+Pb,e+"-"+pS])},[]),yve="beforeRead",bve="read",_ve="afterRead",wve="beforeMain",xve="main",Sve="afterMain",Ave="beforeWrite",kve="write",Eve="afterWrite",Tve=[yve,bve,_ve,wve,xve,Sve,Ave,kve,Eve];function Sd(t){return t?(t.nodeName||"").toLowerCase():null}function Sl(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Bv(t){var e=Sl(t).Element;return t instanceof e||t instanceof Element}function ru(t){var e=Sl(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function mU(t){if(typeof ShadowRoot>"u")return!1;var e=Sl(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Dve(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},a=e.elements[n];!ru(a)||!Sd(a)||(Object.assign(a.style,r),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function Ove(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],a=e.attributes[r]||{},o=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),s=o.reduce(function(l,c){return l[c]="",l},{});!ru(i)||!Sd(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(l){i.removeAttribute(l)}))})}}const ste={name:"applyStyles",enabled:!0,phase:"write",fn:Dve,effect:Ove,requires:["computeStyles"]};function dd(t){return t.split("-")[0]}var _v=Math.max,xD=Math.min,Lb=Math.round;function xV(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function lte(){return!/^((?!chrome|android).)*safari/i.test(xV())}function Nb(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,a=1;e&&ru(t)&&(i=t.offsetWidth>0&&Lb(r.width)/t.offsetWidth||1,a=t.offsetHeight>0&&Lb(r.height)/t.offsetHeight||1);var o=Bv(t)?Sl(t):window,s=o.visualViewport,l=!lte()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,f=(r.top+(l&&s?s.offsetTop:0))/a,h=r.width/i,p=r.height/a;return{width:h,height:p,top:f,right:c+h,bottom:f+p,left:c,x:c,y:f}}function gU(t){var e=Nb(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function ute(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&mU(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function yh(t){return Sl(t).getComputedStyle(t)}function Cve(t){return["table","td","th"].indexOf(Sd(t))>=0}function Zp(t){return((Bv(t)?t.ownerDocument:t.document)||window.document).documentElement}function KO(t){return Sd(t)==="html"?t:t.assignedSlot||t.parentNode||(mU(t)?t.host:null)||Zp(t)}function $j(t){return!ru(t)||yh(t).position==="fixed"?null:t.offsetParent}function Ive(t){var e=/firefox/i.test(xV()),n=/Trident/i.test(xV());if(n&&ru(t)){var r=yh(t);if(r.position==="fixed")return null}var i=KO(t);for(mU(i)&&(i=i.host);ru(i)&&["html","body"].indexOf(Sd(i))<0;){var a=yh(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||e&&a.willChange==="filter"||e&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function vA(t){for(var e=Sl(t),n=$j(t);n&&Cve(n)&&yh(n).position==="static";)n=$j(n);return n&&(Sd(n)==="html"||Sd(n)==="body"&&yh(n).position==="static")?e:n||Ive(t)||e}function vU(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Dx(t,e,n){return _v(t,xD(e,n))}function Mve(t,e,n){var r=Dx(t,e,n);return r>n?n:r}function cte(){return{top:0,right:0,bottom:0,left:0}}function dte(t){return Object.assign({},cte(),t)}function fte(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var Rve=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,dte(typeof t!="number"?t:fte(t,gA))};function $ve(t){var e,n=t.state,r=t.name,i=t.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=dd(n.placement),l=vU(s),c=[Us,lu].indexOf(s)>=0,f=c?"height":"width";if(!(!a||!o)){var h=Rve(i.padding,n),p=gU(a),g=l==="y"?Bs:Us,y=l==="y"?su:lu,v=n.rects.reference[f]+n.rects.reference[l]-o[l]-n.rects.popper[f],b=o[l]-n.rects.reference[l],w=vA(a),S=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,T=v/2-b/2,_=h[g],E=S-p[f]-h[y],D=S/2-p[f]/2+T,O=Dx(_,D,E),V=l;n.modifiersData[r]=(e={},e[V]=O,e.centerOffset=O-D,e)}}function Pve(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||ute(e.elements.popper,i)&&(e.elements.arrow=i))}const Lve={name:"arrow",enabled:!0,phase:"main",fn:$ve,effect:Pve,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Fb(t){return t.split("-")[1]}var Nve={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Fve(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:Lb(n*i)/i||0,y:Lb(r*i)/i||0}}function Pj(t){var e,n=t.popper,r=t.popperRect,i=t.placement,a=t.variation,o=t.offsets,s=t.position,l=t.gpuAcceleration,c=t.adaptive,f=t.roundOffsets,h=t.isFixed,p=o.x,g=p===void 0?0:p,y=o.y,v=y===void 0?0:y,b=typeof f=="function"?f({x:g,y:v}):{x:g,y:v};g=b.x,v=b.y;var w=o.hasOwnProperty("x"),S=o.hasOwnProperty("y"),T=Us,_=Bs,E=window;if(c){var D=vA(n),O="clientHeight",V="clientWidth";if(D===Sl(n)&&(D=Zp(n),yh(D).position!=="static"&&s==="absolute"&&(O="scrollHeight",V="scrollWidth")),D=D,i===Bs||(i===Us||i===lu)&&a===pS){_=su;var P=h&&D===E&&E.visualViewport?E.visualViewport.height:D[O];v-=P-r.height,v*=l?1:-1}if(i===Us||(i===Bs||i===su)&&a===pS){T=lu;var M=h&&D===E&&E.visualViewport?E.visualViewport.width:D[V];g-=M-r.width,g*=l?1:-1}}var C=Object.assign({position:s},c&&Nve),F=f===!0?Fve({x:g,y:v},Sl(n)):{x:g,y:v};if(g=F.x,v=F.y,l){var W;return Object.assign({},C,(W={},W[_]=S?"0":"",W[T]=w?"0":"",W.transform=(E.devicePixelRatio||1)<=1?"translate("+g+"px, "+v+"px)":"translate3d("+g+"px, "+v+"px, 0)",W))}return Object.assign({},C,(e={},e[_]=S?v+"px":"",e[T]=w?g+"px":"",e.transform="",e))}function Vve(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:dd(e.placement),variation:Fb(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Pj(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Pj(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Bve={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Vve,data:{}};var hk={passive:!0};function Uve(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,s=o===void 0?!0:o,l=Sl(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&c.forEach(function(f){f.addEventListener("scroll",n.update,hk)}),s&&l.addEventListener("resize",n.update,hk),function(){a&&c.forEach(function(f){f.removeEventListener("scroll",n.update,hk)}),s&&l.removeEventListener("resize",n.update,hk)}}const Wve={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Uve,data:{}};var zve={left:"right",right:"left",bottom:"top",top:"bottom"};function hT(t){return t.replace(/left|right|bottom|top/g,function(e){return zve[e]})}var jve={start:"end",end:"start"};function Lj(t){return t.replace(/start|end/g,function(e){return jve[e]})}function yU(t){var e=Sl(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function bU(t){return Nb(Zp(t)).left+yU(t).scrollLeft}function Hve(t,e){var n=Sl(t),r=Zp(t),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;var c=lte();(c||!c&&e==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s+bU(t),y:l}}function Yve(t){var e,n=Zp(t),r=yU(t),i=(e=t.ownerDocument)==null?void 0:e.body,a=_v(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=_v(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+bU(t),l=-r.scrollTop;return yh(i||n).direction==="rtl"&&(s+=_v(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:l}}function _U(t){var e=yh(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function hte(t){return["html","body","#document"].indexOf(Sd(t))>=0?t.ownerDocument.body:ru(t)&&_U(t)?t:hte(KO(t))}function Ox(t,e){var n;e===void 0&&(e=[]);var r=hte(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),a=Sl(r),o=i?[a].concat(a.visualViewport||[],_U(r)?r:[]):r,s=e.concat(o);return i?s:s.concat(Ox(KO(o)))}function SV(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function qve(t,e){var n=Nb(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Nj(t,e,n){return e===ate?SV(Hve(t,n)):Bv(e)?qve(e,n):SV(Yve(Zp(t)))}function Kve(t){var e=Ox(KO(t)),n=["absolute","fixed"].indexOf(yh(t).position)>=0,r=n&&ru(t)?vA(t):t;return Bv(r)?e.filter(function(i){return Bv(i)&&ute(i,r)&&Sd(i)!=="body"}):[]}function Gve(t,e,n,r){var i=e==="clippingParents"?Kve(t):[].concat(e),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(l,c){var f=Nj(t,c,r);return l.top=_v(f.top,l.top),l.right=xD(f.right,l.right),l.bottom=xD(f.bottom,l.bottom),l.left=_v(f.left,l.left),l},Nj(t,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function pte(t){var e=t.reference,n=t.element,r=t.placement,i=r?dd(r):null,a=r?Fb(r):null,o=e.x+e.width/2-n.width/2,s=e.y+e.height/2-n.height/2,l;switch(i){case Bs:l={x:o,y:e.y-n.height};break;case su:l={x:o,y:e.y+e.height};break;case lu:l={x:e.x+e.width,y:s};break;case Us:l={x:e.x-n.width,y:s};break;default:l={x:e.x,y:e.y}}var c=i?vU(i):null;if(c!=null){var f=c==="y"?"height":"width";switch(a){case Pb:l[c]=l[c]-(e[f]/2-n[f]/2);break;case pS:l[c]=l[c]+(e[f]/2-n[f]/2);break}}return l}function mS(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,a=n.strategy,o=a===void 0?t.strategy:a,s=n.boundary,l=s===void 0?gve:s,c=n.rootBoundary,f=c===void 0?ate:c,h=n.elementContext,p=h===void 0?c1:h,g=n.altBoundary,y=g===void 0?!1:g,v=n.padding,b=v===void 0?0:v,w=dte(typeof b!="number"?b:fte(b,gA)),S=p===c1?vve:c1,T=t.rects.popper,_=t.elements[y?S:p],E=Gve(Bv(_)?_:_.contextElement||Zp(t.elements.popper),l,f,o),D=Nb(t.elements.reference),O=pte({reference:D,element:T,placement:i}),V=SV(Object.assign({},T,O)),P=p===c1?V:D,M={top:E.top-P.top+w.top,bottom:P.bottom-E.bottom+w.bottom,left:E.left-P.left+w.left,right:P.right-E.right+w.right},C=t.modifiersData.offset;if(p===c1&&C){var F=C[i];Object.keys(M).forEach(function(W){var H=[lu,su].indexOf(W)>=0?1:-1,j=[Bs,su].indexOf(W)>=0?"y":"x";M[W]+=F[j]*H})}return M}function Zve(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?ote:l,f=Fb(r),h=f?s?Rj:Rj.filter(function(y){return Fb(y)===f}):gA,p=h.filter(function(y){return c.indexOf(y)>=0});p.length===0&&(p=h);var g=p.reduce(function(y,v){return y[v]=mS(t,{placement:v,boundary:i,rootBoundary:a,padding:o})[dd(v)],y},{});return Object.keys(g).sort(function(y,v){return g[y]-g[v]})}function Qve(t){if(dd(t)===pU)return[];var e=hT(t);return[Lj(t),e,Lj(e)]}function Xve(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!0:o,l=n.fallbackPlacements,c=n.padding,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,y=g===void 0?!0:g,v=n.allowedAutoPlacements,b=e.options.placement,w=dd(b),S=w===b,T=l||(S||!y?[hT(b)]:Qve(b)),_=[b].concat(T).reduce(function(me,Ee){return me.concat(dd(Ee)===pU?Zve(e,{placement:Ee,boundary:f,rootBoundary:h,padding:c,flipVariations:y,allowedAutoPlacements:v}):Ee)},[]),E=e.rects.reference,D=e.rects.popper,O=new Map,V=!0,P=_[0],M=0;M<_.length;M++){var C=_[M],F=dd(C),W=Fb(C)===Pb,H=[Bs,su].indexOf(F)>=0,j=H?"width":"height",N=mS(e,{placement:C,boundary:f,rootBoundary:h,altBoundary:p,padding:c}),U=H?W?lu:Us:W?su:Bs;E[j]>D[j]&&(U=hT(U));var ee=hT(U),le=[];if(a&&le.push(N[F]<=0),s&&le.push(N[U]<=0,N[ee]<=0),le.every(function(me){return me})){P=C,V=!1;break}O.set(C,le)}if(V)for(var _e=y?3:1,be=function(me){var Ee=_.find(function(Ce){var de=O.get(Ce);if(de)return de.slice(0,me).every(function(G){return G})});if(Ee)return P=Ee,"break"},Te=_e;Te>0;Te--){var J=be(Te);if(J==="break")break}e.placement!==P&&(e.modifiersData[r]._skip=!0,e.placement=P,e.reset=!0)}}const Jve={name:"flip",enabled:!0,phase:"main",fn:Xve,requiresIfExists:["offset"],data:{_skip:!1}};function Fj(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Vj(t){return[Bs,lu,su,Us].some(function(e){return t[e]>=0})}function eye(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,a=e.modifiersData.preventOverflow,o=mS(e,{elementContext:"reference"}),s=mS(e,{altBoundary:!0}),l=Fj(o,r),c=Fj(s,i,a),f=Vj(l),h=Vj(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const tye={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:eye};function nye(t,e,n){var r=dd(t),i=[Us,Bs].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[Us,lu].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function rye(t){var e=t.state,n=t.options,r=t.name,i=n.offset,a=i===void 0?[0,0]:i,o=ote.reduce(function(f,h){return f[h]=nye(h,e.rects,a),f},{}),s=o[e.placement],l=s.x,c=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=o}const iye={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:rye};function aye(t){var e=t.state,n=t.name;e.modifiersData[n]=pte({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const oye={name:"popperOffsets",enabled:!0,phase:"read",fn:aye,data:{}};function sye(t){return t==="x"?"y":"x"}function lye(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!1:o,l=n.boundary,c=n.rootBoundary,f=n.altBoundary,h=n.padding,p=n.tether,g=p===void 0?!0:p,y=n.tetherOffset,v=y===void 0?0:y,b=mS(e,{boundary:l,rootBoundary:c,padding:h,altBoundary:f}),w=dd(e.placement),S=Fb(e.placement),T=!S,_=vU(w),E=sye(_),D=e.modifiersData.popperOffsets,O=e.rects.reference,V=e.rects.popper,P=typeof v=="function"?v(Object.assign({},e.rects,{placement:e.placement})):v,M=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),C=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,F={x:0,y:0};if(D){if(a){var W,H=_==="y"?Bs:Us,j=_==="y"?su:lu,N=_==="y"?"height":"width",U=D[_],ee=U+b[H],le=U-b[j],_e=g?-V[N]/2:0,be=S===Pb?O[N]:V[N],Te=S===Pb?-V[N]:-O[N],J=e.elements.arrow,me=g&&J?gU(J):{width:0,height:0},Ee=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:cte(),Ce=Ee[H],de=Ee[j],G=Dx(0,O[N],me[N]),ge=T?O[N]/2-_e-G-Ce-M.mainAxis:be-G-Ce-M.mainAxis,Ue=T?-O[N]/2+_e+G+de+M.mainAxis:Te+G+de+M.mainAxis,ce=e.elements.arrow&&vA(e.elements.arrow),Ye=ce?_==="y"?ce.clientTop||0:ce.clientLeft||0:0,te=(W=C==null?void 0:C[_])!=null?W:0,ae=U+ge-te-Ye,ne=U+Ue-te,Ne=Dx(g?xD(ee,ae):ee,U,g?_v(le,ne):le);D[_]=Ne,F[_]=Ne-U}if(s){var Me,Ve=_==="x"?Bs:Us,at=_==="x"?su:lu,Ie=D[E],Ze=E==="y"?"height":"width",tt=Ie+b[Ve],Oe=Ie-b[at],Be=[Bs,Us].indexOf(w)!==-1,gt=(Me=C==null?void 0:C[E])!=null?Me:0,Bt=Be?tt:Ie-O[Ze]-V[Ze]-gt+M.altAxis,jt=Be?Ie+O[Ze]+V[Ze]-gt-M.altAxis:Oe,yt=g&&Be?Mve(Bt,Ie,jt):Dx(g?Bt:tt,Ie,g?jt:Oe);D[E]=yt,F[E]=yt-Ie}e.modifiersData[r]=F}}const uye={name:"preventOverflow",enabled:!0,phase:"main",fn:lye,requiresIfExists:["offset"]};function cye(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function dye(t){return t===Sl(t)||!ru(t)?yU(t):cye(t)}function fye(t){var e=t.getBoundingClientRect(),n=Lb(e.width)/t.offsetWidth||1,r=Lb(e.height)/t.offsetHeight||1;return n!==1||r!==1}function hye(t,e,n){n===void 0&&(n=!1);var r=ru(e),i=ru(e)&&fye(e),a=Zp(e),o=Nb(t,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Sd(e)!=="body"||_U(a))&&(s=dye(e)),ru(e)?(l=Nb(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):a&&(l.x=bU(a))),{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function pye(t){var e=new Map,n=new Set,r=[];t.forEach(function(a){e.set(a.name,a)});function i(a){n.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!n.has(s)){var l=e.get(s);l&&i(l)}}),r.push(a)}return t.forEach(function(a){n.has(a.name)||i(a)}),r}function mye(t){var e=pye(t);return Tve.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function gye(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function vye(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var Bj={placement:"bottom",modifiers:[],strategy:"absolute"};function Uj(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function yye(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,i=e.defaultOptions,a=i===void 0?Bj:i;return function(o,s,l){l===void 0&&(l=a);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Bj,a),modifiersData:{},elements:{reference:o,popper:s},attributes:{},styles:{}},f=[],h=!1,p={state:c,setOptions:function(v){var b=typeof v=="function"?v(c.options):v;y(),c.options=Object.assign({},a,c.options,b),c.scrollParents={reference:Bv(o)?Ox(o):o.contextElement?Ox(o.contextElement):[],popper:Ox(s)};var w=mye(vye([].concat(r,c.options.modifiers)));return c.orderedModifiers=w.filter(function(S){return S.enabled}),g(),p.update()},forceUpdate:function(){if(!h){var v=c.elements,b=v.reference,w=v.popper;if(Uj(b,w)){c.rects={reference:hye(b,vA(w),c.options.strategy==="fixed"),popper:gU(w)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(V){return c.modifiersData[V.name]=Object.assign({},V.data)});for(var S=0;S<c.orderedModifiers.length;S++){if(c.reset===!0){c.reset=!1,S=-1;continue}var T=c.orderedModifiers[S],_=T.fn,E=T.options,D=E===void 0?{}:E,O=T.name;typeof _=="function"&&(c=_({state:c,options:D,name:O,instance:p})||c)}}}},update:gye(function(){return new Promise(function(v){p.forceUpdate(),v(c)})}),destroy:function(){y(),h=!0}};if(!Uj(o,s))return p;p.setOptions(l).then(function(v){!h&&l.onFirstUpdate&&l.onFirstUpdate(v)});function g(){c.orderedModifiers.forEach(function(v){var b=v.name,w=v.options,S=w===void 0?{}:w,T=v.effect;if(typeof T=="function"){var _=T({state:c,name:b,instance:p,options:S}),E=function(){};f.push(_||E)}})}function y(){f.forEach(function(v){return v()}),f=[]}return p}}var bye=[Wve,oye,Bve,ste,iye,Jve,uye,Lve,tye],_ye=yye({defaultModifiers:bye}),wye="tippy-box",mte="tippy-content",xye="tippy-backdrop",gte="tippy-arrow",vte="tippy-svg-arrow",qg={passive:!0,capture:!0},yte=function(){return document.body};function Sye(t,e){return{}.hasOwnProperty.call(t,e)}function fL(t,e,n){if(Array.isArray(t)){var r=t[e];return r??(Array.isArray(n)?n[e]:n)}return t}function wU(t,e){var n={}.toString.call(t);return n.indexOf("[object")===0&&n.indexOf(e+"]")>-1}function bte(t,e){return typeof t=="function"?t.apply(void 0,e):t}function Wj(t,e){if(e===0)return t;var n;return function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)}}function Aye(t,e){var n=Object.assign({},t);return e.forEach(function(r){delete n[r]}),n}function kye(t){return t.split(/\s+/).filter(Boolean)}function Gy(t){return[].concat(t)}function zj(t,e){t.indexOf(e)===-1&&t.push(e)}function Eye(t){return t.filter(function(e,n){return t.indexOf(e)===n})}function Tye(t){return t.split("-")[0]}function SD(t){return[].slice.call(t)}function jj(t){return Object.keys(t).reduce(function(e,n){return t[n]!==void 0&&(e[n]=t[n]),e},{})}function Cx(){return document.createElement("div")}function gS(t){return["Element","Fragment"].some(function(e){return wU(t,e)})}function Dye(t){return wU(t,"NodeList")}function Oye(t){return wU(t,"MouseEvent")}function Cye(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function Iye(t){return gS(t)?[t]:Dye(t)?SD(t):Array.isArray(t)?t:SD(document.querySelectorAll(t))}function hL(t,e){t.forEach(function(n){n&&(n.style.transitionDuration=e+"ms")})}function Hj(t,e){t.forEach(function(n){n&&n.setAttribute("data-state",e)})}function Mye(t){var e,n=Gy(t),r=n[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function Rye(t,e){var n=e.clientX,r=e.clientY;return t.every(function(i){var a=i.popperRect,o=i.popperState,s=i.props,l=s.interactiveBorder,c=Tye(o.placement),f=o.modifiersData.offset;if(!f)return!0;var h=c==="bottom"?f.top.y:0,p=c==="top"?f.bottom.y:0,g=c==="right"?f.left.x:0,y=c==="left"?f.right.x:0,v=a.top-r+h>l,b=r-a.bottom-p>l,w=a.left-n+g>l,S=n-a.right-y>l;return v||b||w||S})}function pL(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){t[r](i,n)})}function Yj(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var ed={isTouch:!1},qj=0;function $ye(){ed.isTouch||(ed.isTouch=!0,window.performance&&document.addEventListener("mousemove",_te))}function _te(){var t=performance.now();t-qj<20&&(ed.isTouch=!1,document.removeEventListener("mousemove",_te)),qj=t}function Pye(){var t=document.activeElement;if(Cye(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function Lye(){document.addEventListener("touchstart",$ye,qg),window.addEventListener("blur",Pye)}var Nye=typeof window<"u"&&typeof document<"u",Fye=Nye?!!window.msCrypto:!1;function Ey(t){var e=t==="destroy"?"n already-":" ";return[t+"() was called on a"+e+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function Kj(t){var e=/[ \t]{2,}/g,n=/^[ \t]*/gm;return t.replace(e," ").replace(n,"").trim()}function Vye(t){return Kj(`
|
|
29
|
+
**/function Uge(){rge()}ve.env.NODE_ENV!=="production"&&Uge();var Wge=Object.defineProperty,zge=(t,e,n)=>e in t?Wge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jf=(t,e,n)=>(zge(t,typeof e!="symbol"?e+"":e,n),n);const vV=(t,e)=>e.some(n=>t instanceof n);let Tj,Dj;function jge(){return Tj||(Tj=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Hge(){return Dj||(Dj=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const yV=new WeakMap,uL=new WeakMap,qO=new WeakMap;function Yge(t){const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("success",a),t.removeEventListener("error",o)},a=()=>{n(bv(t.result)),i()},o=()=>{r(t.error),i()};t.addEventListener("success",a),t.addEventListener("error",o)});return qO.set(e,t),e}function qge(t){if(yV.has(t))return;const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("complete",a),t.removeEventListener("error",o),t.removeEventListener("abort",o)},a=()=>{n(),i()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",a),t.addEventListener("error",o),t.addEventListener("abort",o)});yV.set(t,e)}let bV={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return yV.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return bv(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function Jee(t){bV=t(bV)}function Kge(t){return Hge().includes(t)?function(...e){return t.apply(_V(this),e),bv(this.request)}:function(...e){return bv(t.apply(_V(this),e))}}function Gge(t){return typeof t=="function"?Kge(t):(t instanceof IDBTransaction&&qge(t),vV(t,jge())?new Proxy(t,bV):t)}function bv(t){if(t instanceof IDBRequest)return Yge(t);if(uL.has(t))return uL.get(t);const e=Gge(t);return e!==t&&(uL.set(t,e),qO.set(e,t)),e}const _V=t=>qO.get(t);function Zge(t,e,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(t,e),s=bv(o);return r&&o.addEventListener("upgradeneeded",l=>{r(bv(o.result),l.oldVersion,l.newVersion,bv(o.transaction),l)}),n&&o.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),s}const Qge=["get","getKey","getAll","getAllKeys","count"],Xge=["put","add","delete","clear"],cL=new Map;function Oj(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(cL.get(e))return cL.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,i=Xge.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||Qge.includes(n)))return;const a=async function(o,...s){const l=this.transaction(o,i?"readwrite":"readonly");let c=l.store;return r&&(c=c.index(s.shift())),(await Promise.all([c[n](...s),i&&l.done]))[0]};return cL.set(e,a),a}Jee(t=>({...t,get:(e,n,r)=>Oj(e,n)||t.get(e,n,r),has:(e,n)=>!!Oj(e,n)||t.has(e,n)}));const Jge=["continue","continuePrimaryKey","advance"],Cj={},wV=new WeakMap,ete=new WeakMap,eve={get(t,e){if(!Jge.includes(e))return t[e];let n=Cj[e];return n||(n=Cj[e]=function(...r){wV.set(this,ete.get(this)[e](...r))}),n}};async function*tve(...t){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...t)),!e)return;e=e;const n=new Proxy(e,eve);for(ete.set(n,e),qO.set(n,_V(e));e;)yield n,e=await(wV.get(n)||e.continue()),wV.delete(n)}function Ij(t,e){return e===Symbol.asyncIterator&&vV(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&vV(t,[IDBIndex,IDBObjectStore])}Jee(t=>({...t,get(e,n,r){return Ij(e,n)?tve:t.get(e,n,r)},has(e,n){return Ij(e,n)||t.has(e,n)}}));const nve="0.0.372-alpha.17",rve={version:nve},tte="mediaCachingDB",fh="mediaStore",bD="__cache_flag__",ive=1,nte=!1,_D=rve.version;let j1=null,dT=!1,fT=null,ave=class{constructor(){Jf(this,"logs",[]),Jf(this,"logTimeout",null),Jf(this,"LOG_DELAY",2e3),Jf(this,"MAX_LOGS",100)}addLog(e){const n={...e,timestamp:Date.now()};this.logs.push(n),this.logs.length>this.MAX_LOGS&&(this.logs=this.logs.slice(-this.MAX_LOGS)),this.scheduleLogging()}scheduleLogging(){this.logTimeout&&clearTimeout(this.logTimeout),this.logTimeout=setTimeout(()=>{this.printLogs()},this.LOG_DELAY)}printLogs(){}groupLogsByOperation(){const e={};return this.logs.forEach(n=>{e[n.operation]||(e[n.operation]=[]),e[n.operation].push(n)}),e}getOperationDisplay(e){switch(e){case"HIT":return"✅ HIT";case"MISS":return"⚠️ MISS";case"SAVE":return"💾 SAVE";case"ERROR":return"❌ ERROR";default:return e}}truncateUrl(e,n){return e.length<=n?e:e.substring(0,n-3)+"..."}printEnhancedSummary(){const e=this.logs.reduce((a,o)=>(a.total++,o.size&&(a.totalSize+=o.size),o.duration&&(a.totalDuration+=o.duration,a.minDuration=Math.min(a.minDuration,o.duration),a.maxDuration=Math.max(a.maxDuration,o.duration)),a[o.operation]=(a[o.operation]||0)+1,a),{total:0,totalSize:0,totalDuration:0,minDuration:Number.POSITIVE_INFINITY,maxDuration:0,HIT:0,MISS:0,SAVE:0,ERROR:0});if(e.total===0)return;const n=e.totalDuration/e.total,r=e.total>0?(e.HIT/e.total*100).toFixed(1):"0",i=[{metric:"Total Operations",value:e.total,percentage:"100%",performance:`${n.toFixed(1)}ms avg`},{metric:"Cache Hits",value:e.HIT,percentage:`${r}%`,performance:"✅ Optimal"},{metric:"Cache Misses",value:e.MISS,percentage:`${e.total?(e.MISS/e.total*100).toFixed(1):"0"}%`,performance:"⚠️ Network"},{metric:"New Saves",value:e.SAVE,percentage:`${e.total?(e.SAVE/e.total*100).toFixed(1):"0"}%`,performance:"💾 Storage"},{metric:"Errors",value:e.ERROR,percentage:`${e.total?(e.ERROR/e.total*100).toFixed(1):"0"}%`,performance:e.ERROR?"❌ Issues":"✅ Clean"},{metric:"Total Data Size",value:`${(e.totalSize/1024).toFixed(1)} KB`,percentage:"N/A",performance:"📦 Storage"},{metric:"Performance Range",value:`${isFinite(e.minDuration)?e.minDuration.toFixed(1):"0"}-${e.maxDuration.toFixed(1)}ms`,percentage:"N/A",performance:"⚡ Speed"}];console.table(i)}forceLog(){this.logTimeout&&(clearTimeout(this.logTimeout),this.logTimeout=null),this.printLogs()}clear(){this.logs=[],this.logTimeout&&(clearTimeout(this.logTimeout),this.logTimeout=null)}};const pp=new ave;async function mA(){if(j1)return j1;try{return j1=await Zge(tte,ive,{upgrade(t,e,n){nte&&console.warn(`Upgrading IndexedDB from version ${e} to ${n}`),t.objectStoreNames.contains(fh)||t.createObjectStore(fh)},blocked(){},blocking(){}}),j1}catch(t){throw t}}async function dL(){try{const t=await mA();if(!t)throw new Error("Failed to initialize database");await t.put(fh,_D,bD)}catch(t){throw t}}async function rte(){return fT||(dT?Promise.resolve():(fT=ove(),fT))}async function ove(){try{const t=await mA();if(!t)throw new Error("Failed to initialize database");const e=await t.get(fh,bD);e===void 0?await dL():e!==_D&&await dL(),dT=!0}catch{try{await dL(),dT=!0}catch(t){throw dT=!1,fT=null,t}}}async function ite(t){const e=performance.now();try{const n=await mA();if(!n)return pp.addLog({url:t,operation:"ERROR",error:"Failed to initialize database",duration:performance.now()-e}),null;const r=await n.get(fh,t),i=performance.now()-e;return r?(pp.addLog({url:t,operation:"HIT",size:typeof r=="string"?new Blob([r]).size:0,duration:i}),r):(pp.addLog({url:t,operation:"MISS",duration:i}),null)}catch(n){const r=performance.now()-e;return n instanceof Error&&n.name==="VersionError"?(await sve(),pp.addLog({url:t,operation:"ERROR",error:"VersionError - database reset",duration:r}),null):(pp.addLog({url:t,operation:"ERROR",error:n instanceof Error?n.message:"Unknown error",duration:r}),null)}}async function wD(t,e){const n=performance.now();try{const r=await mA();if(!r)throw pp.addLog({url:t,operation:"ERROR",error:"Failed to initialize database",duration:performance.now()-n}),new Error("Failed to initialize database");const i=new Blob([e]).size;await r.put(fh,e,t),await r.get(fh,bD)!==_D&&await r.put(fh,_D,bD);const a=performance.now()-n;pp.addLog({url:t,operation:"SAVE",size:i,duration:a})}catch(r){const i=performance.now()-n;throw pp.addLog({url:t,operation:"ERROR",error:r instanceof Error?r.message:"Unknown error",duration:i}),r}}async function Mj(t){try{const e=await mA();if(!e)throw new Error("Failed to initialize database");await e.delete(fh,t)}catch(e){throw e}}async function sve(){try{j1=null;const t=indexedDB.deleteDatabase(tte);await new Promise((e,n)=>{t.onsuccess=()=>e(),t.onerror=()=>n(t.error),t.onblocked=()=>{nte&&console.warn("Database deletion blocked - close other tabs using this database"),n(new Error("Database deletion blocked"))}})}catch(t){throw t}}let lve=class{constructor(){Jf(this,"batchQueue",[]),Jf(this,"batchTimeout",null),Jf(this,"BATCH_DELAY",50),Jf(this,"MAX_BATCH_SIZE",10),Jf(this,"MAX_BATCH_WAIT",100)}async addRequest(e){return new Promise((n,r)=>{const i={url:e,resolve:n,reject:r,timestamp:Date.now()};this.batchQueue.push(i),this.batchQueue.length>=this.MAX_BATCH_SIZE?this.processBatch():this.batchTimeout||(this.batchTimeout=setTimeout(()=>{this.processBatch()},this.BATCH_DELAY))})}async processBatch(){if(this.batchTimeout&&(clearTimeout(this.batchTimeout),this.batchTimeout=null),this.batchQueue.length===0)return;const e=this.batchQueue.splice(0,this.MAX_BATCH_SIZE),n=e.map(i=>i.url),r=[...new Set(n)];try{const i=await this.fetchBatch(r);e.forEach(a=>{const o=i.get(a.url);o!==void 0?a.resolve(o):a.reject(new Error("Request not found in batch results"))})}catch(i){e.forEach(a=>{a.reject(i)})}}async fetchBatch(e){const n=new Map,r=e.map(async s=>{try{const l=await ite(s);return{url:s,result:l}}catch(l){return{url:s,result:null,error:l}}}),i=await Promise.all(r),a=new Set;i.forEach(({url:s,result:l})=>{l&&(n.set(s,l),a.add(s))});const o=e.filter(s=>!a.has(s));if(o.length>0){const s=o.map(async l=>{try{const c=await this.fetchSingleResource(l);return{url:l,result:c}}catch{return{url:l,result:null}}});(await Promise.all(s)).forEach(({url:l,result:c})=>{n.set(l,c)})}return n}async fetchSingleResource(e){try{const n=await fetch(e);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const r=n.headers.get("Content-Type");if(!r)throw new Error("No content type received");if(r.includes("image/svg+xml")){const i=await n.text();return await wD(e,i),i}if(r.includes("image/")){const i=await n.blob();if(!i||i.size===0)throw new Error("Invalid or empty blob received from server");const a=await this.blobToBase64(i);return await wD(e,a),a}throw new Error(`Unsupported content type: ${r}`)}catch{return null}}blobToBase64(e){return new Promise((n,r)=>{const i=new FileReader;i.onload=()=>n(i.result),i.onerror=r,i.readAsDataURL(e)})}forceProcess(){this.batchTimeout&&(clearTimeout(this.batchTimeout),this.batchTimeout=null),this.processBatch()}getStatus(){return{queueLength:this.batchQueue.length,hasTimeout:!!this.batchTimeout}}clear(){this.batchTimeout&&(clearTimeout(this.batchTimeout),this.batchTimeout=null),this.batchQueue.forEach(e=>{e.reject(new Error("Batch cleared"))}),this.batchQueue=[]}};const uve=new lve;async function cve(t){return uve.addRequest(t)}const qt=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},fk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABLAAAAKjCAYAAAANs/bAAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAACdLSURBVHgB7d0LaxzJ2bDh+jLByxgZGRktEhYeCBgE+d/5R4FAYIPDGhsbGQubmDUR30uN07uSrcMcuqufqrouGLQJe7DlHvXTN1U1/+9vf/vb/08AAAAAENSfEgAAAAAEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAENqfE0Ahjx49SsvlMi0Wi/Vf//TTT7//df46/D23ubq6+uH19evX9N///jd9+fJl/b+HrwAAALRFwAJGN0Spg4OD9Pjx43W0uh6pdv13bvLPDyHr06dP66/5lUMXAAAA9RKwgFHkWPXkyZP112GV1Rzyfzf/GvJrkAPW58+f11ErfxW0AAAA6iJgATvJoejw8HAdrfLXuYLVJvLqr6Ojo/Ury6uycsi6uLhY/zUAAACxCVjAxobVTT///POsq6z2lX/t+XV8fLxejXV5eZnevXtnZRYAAEBQAhbwoBytnj59ul7BVGu0uktenZVDVn4Nq7I+fPiQAAAAiEPAAu6Uw9Xp6emN86RaNpydlX/POWa9efPGqiwAAIAABCzghrzCKm8RzKut8uqkHl0/MyuvxhKyAAAA5iVgAWtDuMpb6VrbJrgPIQsAAGB+AhawDjR521yvK642IWQBAADMR8CCjvV2xtUYhpD19u3b9ScXXl1dJQAAAKYlYEGH8hbB1WqVDg8PE7s5OTlZh6y8GsunFgIAAExLwILO5HOucnxxztX+8pbLHAKfPHliWyEAAMCEBCzoxBBbbBccX16JlVez5Yj1/v37BAAAwLgELOjAs2fP0vPnz626mlD+3p6dnaXHjx9bjQUAADAyAQsalqNKPqT9+Pg4UUZejZVXub169Sp9/vw5AQAAsL8/JaBJecvg+fm5eDWD/L1/+fLlOh4CAACwPyuwoEH5PKZ83pUtg/PKh+Uvl8v1aqyrq6sEAADAbqzAgsbkVT9/+ctfxKsgckzMK+HyqiwAAAB2I2BBQ/Ih4nnVD7EMWwrzaiwAAAC2J2BBA/Jqq7zqynlXcQ0RK6/IAgAAYDsCFlQuxythpA5DaMyfVAgAAMDmBCyo2BCvbE2rSz5gX8QCAADYnIAFlRKv6iZiAQAAbE7AggqJV20QsQAAADYjYEGFxKt25Ijl/DIAAID7CVhQmRw8xKu2+DMFAAC4n4AFFTk9PbXlrEHDpxM+evQoAQAA8CMBCyrx888/p5OTk0SbcrzKW0NzzAIAAOAmAQsqkLeXPX/+PNG2HLHydkIAAABuErAguBw18vYy+pAPdM9bRQEAAPiDgAXB5RU5zkbqS94qenBwkAAAAPhGwILA8kocIaNPOVw6DwsAAOAbAQuCyquuHNreL1tHAQAA/iBgQUB55U3+RDr6llffHR8fJwAAgN4JWBBQ3jro3Csy1wIAAICABeHkWGHVDYO8Gi+fhwUAANAzAQuCsXWQ7+WthIeHhwkAAKBXAhYE8vPPP9suxq18KiEAANAzAQuCsHWQ++R45foAAAB6JWBBEA7r5iFW6AEAAL0SsCCAHCWOjo4S3CevwsqhEwAAoDcCFgQgSrCpHDrzoe4AAAA9EbBgZlZfsS3BEwAA6I2ABTMTI9hWXoFlFRYAANATAQtmZPUVu8oHugMAAPRCwIIZWX3Frg4PD9eHugMAAPRAwIKZWH3Fvo6PjxMAAEAPBCyYiTOM2FfeRmgVFgAA0AMBC2Zi+yD7yvHKKj4AAKAHAhbMIK++ylsIYV9Pnz5NAAAArROwYAbPnj1LMIYcQ5fLZQIAAGiZgAWF2fbF2PInEgIAALRMwILCxAbGZkUfAADQOgELCnNmEWPL56n5VEsAAKBlAhYUlLcPWoHFFAQsAACgZQIWFCQyMJUnT54kAACAVglYUJDtg0wlx9G8wg8AAKBFAhYUZAUWU7I9FQAAaJWABYXkg7bzC6YikAIAAK0SsKAQcYGpOQcLAABolYAFhYgLTM0qPwAAoFUCFhSyXC4TTM11BgAAtEjAgkKEBUqwVRUAAGiRgAUFiAqUYgshAADQIgELCrD6ilIeP36cAAAAWiNgQQFWxVBKvtYWi0UCAABoiYAFBVgVQ0mCKQAA0BoBCwqwIoaSbFkFAABaI2BBAYICJQmmAABAawQsmJiYQGm2EAIAAK0RsGBiYgKliaYAAEBrBCyYmJhAaT/99FMCAABoiYAFExOwKM2qPwAAoDUCFkxMwAIAAID9CFgwMQGL0lxzAABAawQsmJiYQGmuOQAAoDUCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWDCxr1+/JijJNQcAALRGwAIAAAAgNAELJnZ1dZWgJCuwAACA1ghYMDExAQAAAPYjYMHErMCitN9++y0BAAC0RMCCiVmBRWmuOQAAoDUCFhQgKFCSVX8AAEBrBCwoQFCgpC9fviQAAICWCFhQwH/+858EpQimAABAawQsKMCKGEpyvQEAAK0RsKAAZ2BRingFAAC0SMCCAkQFSrFdFQAAaJGABQXkFVjOJaIEsRQAAGiRgAWFfP78OcHUBCwAAKBFAhYUYmsXJQilAABAiwQsKERYYGquMQAAoFUCFhSSt3Y5B4spffr0KQEAALRIwIJCcrxyPhFTsgILAABolYAFBX38+DHBFHIgFbAAAIBWCVhQ0OXlZYIp2D4IAAC0TMCCgr5+/bp+wdjEUQAAoGUCFhR2cXGRYGwCFgAA0DIBCwpzThFjy2er+YRLAACgZQIWFJYDlk8jZExWXwEAAK0TsGAGPo2QseQz1T58+JAAAABaJmDBDN6/f59gDD59EAAA6IGABTPI5xU5C4sxvH37NgEAALROwIKZvHnzJsE+cgTNWwgBAABaJ2DBTHJ8sAqLfVxcXCQAAIAeCFgwIwGCXTm8HQAA6ImABTO6vLxcn4cF27IFFQAA6ImABTPK8erdu3cJtmH1FQAA0BsBC2b2/v17q7DYitVXAABAbwQsmFmOV4IEm7L6CgAA6JGABQHkVVg5TMBDxE4AAKBHAhYE8erVqwT3sfoKAADolYAFQXz+/Hn9grv88ssvCQAAoEcCFgTy66+/JrjNxcVF+vLlSwIAAOiRgAWB5EDhjCO+l7cOvn37NgEAAPRKwIJgHOjO93LUdE0AAAA9E7AgmKurKwe687t8LpqD2wEAgN4JWBBQjhbv3r1L9C2vuhIzAQAABCwIK5955NDuvtk6CAAA8I2ABUHlrYS//PLL+iv9ySvwbB0EAAD4RsCCwPLqG59K2B+fOggAAHCTgAXB5U8ldB5WP/KKu3/+859W3gEAAFwjYEEFXr9+7TysTuRD2517BQAAcJOABZXI52EJG23L20UvLy8TAAAANwlYUIkcr2wta1feJurcKwAAgNsJWFCRIWLRlo8fP663iQIAAHA7AQsqk8/Cyuck0Yb85/nvf/87AQAAcDcBCyr04cMHEasBOV7ZFgoAAPAwAQsqJWLVTbwCAADYnIAFFROx6iReAQAAbEfAgsqJWHURrwAAALb35wRUL0esHEZevnyZFotFIqaLiwsHtgMAAOzACixoRA5Y//jHP9LXr18T8bx580a8AgAA2JGABQ3J8SpvT8sxizh+/fXX9Pbt2wQAAMBuBCxoTI5YeSXWu3fvEvMa/izev3+fAAAA2J0zsKBRr1+/XgeU09NT52LN4PPnz+vD9W3pBAAA2J+ABQ3LK38uLy/Xh7s/evQoUUbeMmjVFQAAwHhsIYTG5RVAf//739eHiDOt4Qwy8QoAAGBcVmBBJ/Ih4nlb22q1shprAvnMsfw9vrq6SgAAAIxLwIKO5ICVV2OdnJysz8Zif/kTH/OWwfy9BQAAYBoCFnQorxT68OFDev78eXr69Glie3ml1bDqCgAAgGkJWNCpfF7Tv/71r3R0dLRejWVb4eZsFwQAAChLwILO5ZVY+SVkPSxvE3z16tU6/gEAAFCOgAWsCVl3y+Eqf4qjc64AAADmIWABNwhZ3+TtgRcXF+vvRT6oHQAAgPkIWMCthpB1cHCwjlnPnj1LPRgOZ3///r0zrgAAAIIQsIB75W1z+ZUPLc8xq8VVWTlU5d9jDle2CQIAAMQjYAEbyQeXD6uylsvlelXW06dPq41ZOVrlrYF5m+Dl5aXVVgAAAIEJWMDWcvh5/fr1+pVjVl6ZlWNW/hpZjnAfP35cB6v8exCtAAAA6iBgAXvJISi/8plRWY5Y+fXkyZN13FosFmkuw6/t06dP662BOWABAABQHwELGNX1M7OyvMUwh6z8evz48TpojRm28iqqYTvgb7/99nu0yrHKCisAAIA2CFjApHJIyq+8be97OW4NZ2h9//V7Q6i6/u+8/v8BAADQLgELmM0QogAAAOA+f0oAAAAAEJiABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABANCcxWKRAIB2CFgAADRluVymv/71r+no6CgBAG0QsAAAaEaOVy9fvlyvwFqtViIWADRCwAIAoAnX49VAxAKANghYAABU77Z4NRCxAKB+AhYAAFW7L14NRCwAqJuABQBAtTaJVwMRCwDqJWABAFClbeLVQMQCgDoJWAAAVOfRo0dbx6uBiAUA9RGwAACoyj7xaiBiAUBdBCwAAKoxxKv8dV8iFgDUQ8ACAKAKY8argYgFAHUQsAAACG+KeDXIEev4+DgBAHEJWAAAhDZlvBqcnZ2l09PTBADEJGABABBWiXg1ODk5EbEAICgBCwCAkErGq4GIBQAxCVgAAIQzR7waiFgAEI+ABQBAKHPGq4GIBQCxCFgAAIQRIV4NRCwAiEPAAgAghEjxaiBiAUAMAhYAALOLGK8GIhYAzE/AAgBgVpHj1UDEAoB5CVgAAMymhng1ELEAYD4CFgAAs1gsFtXEq4GIBQDzELAAACiuxng1ELEAoDwBCwCAooZ4tVwuU61ELAAoS8ACAKCYFuLVQMQCgHIELAAAimgpXg1ELAAoQ8ACAGByLcargYgFANMTsAAAmFTL8WogYgHAtAQsAAAm00O8GohYADAdAQsAgMmsVqsu4tVAxAKAaQhYAABMIserw8PD1BsRCwDGJ2ABADC6HK+Ojo5Sr0QsABiXgAUAwKh6j1cDEQsAxiNgAQAwGvHqJhELAMYhYAEAMArx6nY5Yp2dnSUAYHcCFgAAexOv7nd8fLz+HgEAuxGwAADYi3i1mfw9ErEAYDcCFgAAO8vnO4lXmxOxAGA3AhYAADvJ8Sqf78R2RCwA2J6ABQDA1sSr/YhYALAdAQsAgK2IV+MQsQBgcwIWAAAbE6/GJWIBwGYELAAANiJeTUPEAoCHCVgAADxIvJqWiAUA9xOwAAC4l3hVhogFAHcTsAAAuJN4VZaIBQC3E7AAALiVeDWPHLFevnyZFotFAgC+EbAAAPiBeDWvg4MDEQsArhGwAAC4QbyKYblcilgA8D8CFgAAvxOvYhGxAOAbAQsAgDXxKiYRCwAELAAAkngVnYgFQO8ELACAzj179ky8qoCIBUDPBCwAgI7lePXixYtEHUQsAHolYAEAdEq8qpOIBUCPBCwAgA6JV3UTsQDojYAFANAZ8aoNIhYAPRGwAAA6Il61RcQCoBcCFgBAJ8SrNuWIdX5+nh49epQAoFUCFgBABw4PD8WrhuV4lVdiiVgAtErAAgBoXF6hs1qtEm0TsQBomYAFANAwZyT1RcQCoFUCFgBAo8SrPolYALRIwAIAaJB41TcRC4DWCFgAAI0Rr8hELABaImABADREvOI6EQuAVghYAACNEK+4jYgFQAsELACABgyRQrziNiIWALUTsAAAKidesQkRC4CaCVgAABUTJdiG6wWAWglYAACVEiPYhesGgBoJWAAAFRIh2IfrB4DaCFgAAJURHxiD6wiAmghYAAAVER0Yk+sJgFoIWAAAlRAbmILrCoAaCFgAABUQGZiS6wuA6AQsAIDgxAVKcJ0BEJmABQAQmKhASa43AKISsAAAghITmIPrDoCIBCwAgIBEBObk+gMgGgELACAY8YAIXIcARCJgAQAEIhoQiesRgCgELACAIBaLhVhAOPl6PD8/T8vlMgHAXAQsAIAAxCsiG65PEQuAuQhYAAAzEweogesUgDkJWAAAMxIFqInrFYC5CFgAADMRA6iR6xaAOQhYAAAzEAGomesXgNIELACAwjz80wLXMQAlCVgAAAV56KclrmcAShGwAAAKWq1WHvZpiogFQAkCFgBAITleHR4eJmiNiAXA1AQsAIACcrw6OjpK0CoRC4ApCVgAABMTr+jFELEODg4SAIxJwAIAmJB4RW+GiOW6B2BMAhYAwETEK3rm+gdgTAIWAMAEPLyD9wEA4xGwAABG5qEd/uD9AMAYBCwAgBGdnp56WIfviFgA7EvAAgAYSY5XJycnCfiRiAXAPgQsAIARiFfwMBELgF0JWAAAexKvYHMiFgC7ELAAAPYgXsH2RCwAtiVgAQDsSLyC3YlYAGxDwAIA2IF4BfsTsQDYlIAFALAl8QrGkyPW8fFxAoD7CFgAAFsQr2B8Z2dn6/cWANxFwAIA2JB4BdPJ7y0RC4C7CFgAABsQr2B6IhYAdxGwAAAeIF5BOSIWALcRsAAA7iFeQXkiFgDfE7AAAO4gXsF8RCwArhOwAABuIV7B/EQsAAYCFgDAd549eyZeQRAiFgCZgAUAcE2OVy9evEhAHCIWAAIWAMD/iFcQl4gF0DcBCwAgiVdQAxELoF8CFgDQPfEK6iFiAfRJwAKowGKxSMA0xCuoj4gF0B8BCyC4R48epfPzc4M6TEC8gnqJWAB9EbAAAsvx6uXLl+uvBnUY1+HhoXgFlXNvBOiHgAUQ1PV4NTCowziWy2VarVYJqJ97I0AfBCyAgG6LVwODOuwnx6v8/nK2HLTDvRGgfQIWQDD3xauBQR12I15Bu9wbAdomYAEEskm8GhjUYTviFbTPvRGgXQIWQBDbxKuBQR02I15BP9wbAdokYAEEsEu8GhjU4X7iFfTHvRGgPQIWwMz2iVcDgzrcTryCfrk3ArRFwAKY0RjxamBQh5uG95d4Bf1ybwRoh4AFMJMx49XAoA7fiFfAIN8bz87OEgB1E7AAZjBFvBqIWPRuyvcXUKfj4+O0Wq0SAPUSsAAKK/FwLWLRK/EKuMvR0ZGIBVAxAQugoJIP1yIWvRGvgIeIWAD1ErAACpnj4VrEohfiFbApEQugTgIWQAFzPlyLWLROvAK2JWIB1EfAAphYhIdrEYtWiVfArkQsgLoIWAATivRwLWLRGvEK2JeIBVAPAQtgIhEfrkUsWiFeAWMRsQDqIGABTCDyw7WIRe3EK2BsIhZAfAIWwMhqeLgWsaiVeAVMRcQCiE3AAhhRTQ/XIha1Ea+AqYlYAHEJWAAjqfHhWsSiFuIVUEqOWPnnzWKxSADEIWABjKDmh2sRi+jEK6C0g4MDEQsgGAELYE8tPFyLWESVHx7FK2AOy+VSxAIIRMAC2ENLK0NELKIRr4C5iVgAcQhYADtqcVuTiEUUQ7zKD48AcxKxAGIQsAB20PKZPCIWcxOvgGhELID5CVgAW+rhQGkRi7mIV0BUIhbAvAQsgC309GloIhaliVdAdCIWwHwELIAN9RSvBiIWpYhXQC1ELIB5CFgAG+gxXg1ELKYmXgG1EbEAyhOwAB7Qc7waiFhMabVaiVdAdUQsgLIELIB7iFd/ELGYQo5Xh4eHCaBGIhZAOQIWwB3Eqx+JWIwpx6ujo6MEULMcsc7Pz80LABMTsABuIV7dTcRiDOIV0BJzA8D0BCyA7xhCHyZisQ/xCmiR+QFgWgIWwDWGz82JWOxCvAJaZo4AmI6ABfA/hs7tiVhsQ7wCemCeAJiGgAWQDJv7ELHYhHgF9MRcATA+AQvoniFzfyIW98nXhngF9MZ8ATAuAQvomuFyPCIWt8nXRL42AHpkzgAYj4AFdMtQOT4Ri+vEKwDzBsBYBCygS4bJ6YhYZOIVwB/MHQD7E7CA7hgipydi9U28AviR+QNgPwIW0BXDYzkiVp/EK4C7mUMAdidgAd0wNJYnYvVFvAJ4mHkEYDcCFtAFw+J8RKw+iFcAmzOXAGxPwAKaZ0icn4jVNvEKYHvmE4DtCFhA0wyHcYhYbRKvAHZnTgHYnIAFNMtQGI+I1RbxCmB/5hWAzQhYQJMMg3GJWG0QrwDGY24BeJiABTTHEBifiFU38QpgfOYXgPsJWEBTDH/1ELHqJF4BTMccA3A3AQtohqGvPiJWXcQrgOmZZwBuJ2ABTTDs1UvEqsOzZ8/EK4BCzDUAPxKwgOoZ8uonYsWW49WLFy8SAOWYbwBuErCAqhnu2iFixSReAczHnAPwBwELqJahrj0iViziFcD88pxzfn6elstlAuiZgAVUSbxql4gVg3gFEMdisVjPPSIW0DMBC6iOeNU+EWte4hVAPCIW0DsBC6iKeNUPEWse4hVAXCIW0DMBC6iGeNUfEausw8ND8QogOBEL6JWABVRBvOqXiFVGfhBarVYJgPhELKBHAhYQnniFiDWt/ACU32P5gQiAOohYQG8ELCA08YqBiDUN8QqgXiIW0BMBCwhLvOJ7Ita4xCuA+olYQC8ELCAk8Yq7iFjjEK8A2iFiAT0QsIBwxCseImLtR7wCaI+IBbROwAJCEa/YlIi1G/EKoF1DxDo4OEgArRGwgDDEK7YlYm1neI+JVwDtGiLW0dFRAmiJgAWEIF6xKxFrM+IVQF9Wq5WIBTRFwAJmJ16xLxHrft5jAH0SsYCWCFjArDxYMxYR63beYwB9E7GAVghYwGw8WDM2Eesm7zEAMhELaIGABczCgzVTEbG+8R4D4DoRC6idgAUU58GaqfUesbzHALiNiAXUTMACivJgTSm9RizvMQDuI2IBtRKwgGI8WFNabxHLewyATYhYQI0ELKAID9bMpZeI5T0GwDZELKA2AhYwOQ/WzK31iOU9BsAuRCygJgIWMCkP1kTRasTyHgNgHzliHR8fJ4DoBCxgMh6siaa1iOU9BsAYzs7Ouv70XqAOAhYwCQ/WRNVKxPIeA2BMvX56L1APAQsYnQdroqt9SPceA2AKIhYQmYAFjMqDNbWodUhfLBbeYwBMRsQCohKwgNGIV9SmtiFdvAKgBBELiEjAAkYhXlGrWob0IV4tl8sEAFMTsYBoBCxgb+IVtYs+pItXAMxBxAIiEbCAvYhXtCLqkC5eATAnEQuIQsACdiZe0ZpoQ7p4BUAEIhYQgYAF7ES8olVRhnTxCoBIRCxgbgIWsDXxitbNPaSLVwBEJGIBcxKwgK2IV/RiziF9tVqJVwCEJGIBcxGwgI2JV/RmjiE9x6vDw8MEAFGJWMAcBCxgI+IVvSo5pOd4dXR0lAAgOhELKE3AAh4kXtG7EkO6eAVAbUQsoCQBC7iXeAXfTDmki1cA1ErEAkoRsIA7iVdw0xRDungFQO1ELKAEAQu4lXgFtxtzSBevAGiFiAVMTcACfiBewf3GGNLFKwBaI2IBUxKwgBvEK9jMPkN6/ufEKwBaJGIBUxGwgN+JV7CdXYb0/Pfnfw4AWiViAVMQsIA18Qp2s82QLl4B0AsRCxibgAWIV7CnTYZ08QqA3ohYwJgELOiceAXjuG9IF68A6FW+/52dnSWAfQlY0DHxCsZ1W8QSrwDo3fHx8frTdwH2IWBBp8QrmMb1iCVeAcA3+dN3RSxgH39OQHfEK5hWjlYHBwfrFwDwTY5Y2atXrxLAtqzAgs6IV1CGeAUAP7ISC9iVgAUdEa8AAJibiAXsQsCCTohXAABEIWIB2xKwoAPiFQAA0YhYwDYELGiceAUAQFQiFrApAQsaJl4BABCdiAVsQsCCRolXAADUQsQCHiJgQYPEKwAAaiNiAfcRsKAx4hUAALXKESvPsovFIgFcJ2BBQ8QrAABqd3BwIGIBPxCwoBHiFQAArVgulyIWcIOABQ0QrwAAaI2IBVwnYEHlxCsAAFolYgEDAQsqJl4BANA6EQvIBCyolHgFAEAvRCxAwIIKiVcAAPRGxIK+CVhQGfEKAIBeiVjQLwELKiJeAQDQOxEL+iRgQSXEKwAA+EbEgv4IWFAB8QoAAG4SsaAvAhYEJ14BAMDtcsQ6Pz83K0MHBCwITLwCAID7mZmhDwIWBOVGDAAAmzE7Q/sELAjIDRgAALZjhoa2CVgQjBsvAADsxiwN7RKwIBA3XAAA2I+ZGtokYEEQbrQAADAOszW0R8CCANxgAQBgXGZsaIuABTNzYwUAgGmYtaEdAhbMyA0VAACmZeaGNghYMBM3UgAAKMPsDfUTsGAGbqAAAFCWGRzqJmBBYW6cAAAwD7M41EvAgoLcMAEAYF5mcqiTgAWFuFECAEAMZnOoj4AFBbhBAgBALGZ0qIuABRNzYwQAgJjM6lAPAQsm5IYIAACxmdmhDgIWTMSNEAAA6mB2h/gELJiAGyAAANTFDA+xCVgwMjc+AACok1ke4hKwYERueAAAUDczPcQkYMFI3OgAAKANZnuIR8CCEbjBAQBAW8z4EIuABXtyYwMAgDblGf/8/Dwtl8sEzEvAgj2IVwAA0LbFYrGe+UUsmJeABTsSrwAAoA8iFsxPwIIdiFcAANAXEQvmJWDBlsQrAADok4gF8xGwYAviFQAA9E3EgnkIWLAh8QoAAMhELChPwIINiFcAAMB1IhaUJWDBA8QrAADgNiIWlCNgwT3EKwAA4D4iFpQhYMEdxCsAAGATIhZMT8CCW4hXAADANoaIdXBwkIDxCVjwHfEKAADYxRCxjo6OEjAuAQuuEa8AAIB9rVYrEQtGJmDB/4hXAADAWEQsGJeABUm8AgAAxidiwXgELLonXgEAAFMRsWAcAhZdE68AAICpiViwPwGLbolXAABAKSIW7EfAokviFQAAUJqIBbsTsOiOeAUAAMxFxILdCFh0RbwCAADmJmLB9gQsuiFeAQAAUYhYsB0Biy6IVwAAQDQ5Yh0fHyfgYQIWzROvAACAqM7OztLp6WkC7idg0TTxCgAAiO7k5ETEggcIWDRLvAIAAGohYsH9BCyaJF4BAAC1EbHgbgIWzRGvAACAWolYcDsBi6aIVwAAQO1ELPiRgEUzxCsAAKAVIhbcJGDRBPEKAABojYgFfxCwqJ54BQAAtErEgm8ELKomXgEAAK0TsUDAomLiFQAA0AsRi94JWFRJvAIAAHojYtEzAYvqiFcAAECvRCx6JWBRFfEKAADonYhFjwQsqiFeAQAAfCNi0RsBiyqIVwAAADeJWPREwCI88QoAAOB2Iha9ELAITbwCAAC4n4hFDwQswhKvAAAANiNi0ToBi5DEKwAAgO2IWLRMwCIc8QoAAGA3IhatErAIRbwCAADYj4hFiwQswhCvAAAAxiFi0RoBixDEKwAAgHHliHV2dpagBQIWsxOvAAAApnF8fJxWq1WC2glYzEq8AgAAmNbR0ZGIRfUELGYjXgEAAJQhYlE7AYtZiFcAAABliVjUTMCiOPEKAABgHiIWtRKwKEq8AgAAmJeIRY0ELIoRrwAAAGIQsaiNgEUR4hUAAEAsIhY1EbCYnHgFAAAQk4hFLQQsJiVeAQAAxCZiUQMBi8mIVwAAAHUQsYhOwGIS4hUAAEBdcsTKz3GLxSJBNAIWoxOvAAAA6nRwcCBiEZKAxajEKwAAgLotl0sRi3AELEYjXgEAALRBxCIaAYtRiFcAAABtEbGIRMBib+IVAABAm0QsohCw2It4BQAA0DYRiwgELHYmXgEAAPRBxGJuAhY7Ea8AAAD6ImIxJwGLrYlXAAAAfRKxmIuAxVbEKwAAgL6JWMxBwGJj4hUAAACZiEVpAhYbEa8AAAC4Lkes8/Nzz4kUIWDxIPEKAACA23hepBQBi3v5YQQAAMB9PDdSgoDFnfwQAgAAYBOeH5magMWt/PABAABgG54jmZKAxQ/80AEAAGAXnieZioDFDX7YAAAAsA/PlUxBwOJ3fsgAAAAwBs+XjE3AYs0PFwAAAMbkOZMxCVj4oQIAAMAkPG8yFgGrc36YAAAAMCXPnYxBwOqYHyIAAACU4PmTff0fcAVXtCn46yAAAAAASUVORK5CYII=",dve=[],fve=["UploadInProgress"],hve=["innerHTML"],pve=["src","alt"],mve=Qe({__name:"SvgRender",props:{name:{default:""},url:{default:""},alt:{default:"image"},classIcon:{default:"arbo-icon-state"},type:{default:"icon"},isSquareSize:{type:Boolean,default:!1},imageDefault:{default:fk},iconStyle:{default:""}},emits:["error","load"],setup(t,{emit:e}){const n=t,r=Ht({imageSrc:null,retried:!1,svgContent:null,isLoading:!1,error:null}),i=e,a=re(null),o=hc("ASSET_URL","https://arbodev.s3.ap-south-1.amazonaws.com"),s=C=>{var F;return C&&((F=C.split(".").pop())==null?void 0:F.toLowerCase())||""},l=()=>Math.random().toString(36).slice(2,11),c=C=>new Promise((F,W)=>{if(C.type==="image/gif"){const j=new FileReader;j.onload=()=>F(j.result),j.onerror=W,j.readAsDataURL(C);return}const H=new Image;H.onload=()=>{try{const j=document.createElement("canvas"),N=j.getContext("2d");if(!N){W(new Error("Could not get canvas context"));return}j.width=H.naturalWidth||H.width,j.height=H.naturalHeight||H.height,N.drawImage(H,0,0);const U=j.toDataURL("image/png",.9);URL.revokeObjectURL(H.src),F(U)}catch(j){URL.revokeObjectURL(H.src),W(j)}},H.onerror=()=>{URL.revokeObjectURL(H.src),W(new Error("Failed to load image from blob"))},H.src=URL.createObjectURL(C)}),f=re(null),h=C=>{if(!C.startsWith("data:image/"))return!1;const F=C.split(",")[1];if(!F||F.length===0)return!1;try{const W=F.substring(0,Math.min(100,F.length));return atob(W),!0}catch(W){return console.warn("Invalid base64 data detected:",W),!1}},p=Z(()=>r.imageSrc||""),g=Z(()=>r.svgContent),y=Z(()=>!!(n.name&&n.type!=="visual")),v=Z(()=>{let C=n.classIcon;return y.value&&(C+=" arbo__internal-icon"),C}),b=Z(()=>{if(n.name&&n.type!=="visual")return!0;const C=s((n==null?void 0:n.url)||"");return(C==null?void 0:C.toLowerCase())==="svg"}),w=C=>{if(!C)return null;try{const F=new DOMParser().parseFromString(C,"image/svg+xml"),W=F.documentElement,H=`-${l()}`,j=F.querySelector("linearGradient");if(j){const le=j.getAttribute("id");if(le){const _e=le+H;j.setAttribute("id",_e);const be=F.querySelector("rect");be&&be.getAttribute("fill")===`url(#${le})`&&be.setAttribute("fill",`url(#${_e})`)}}const N=W.getAttribute("style")||"",U=n.iconStyle||"",ee=`${N}; ${U}`.trim();return ee&&W.setAttribute("style",ee),W.setAttribute("class",v.value),new XMLSerializer().serializeToString(F)}catch(F){return console.error("Error formatting SVG:",F),r.error="Failed to format SVG",C}};async function S(C){if(!C)return null;const F=await ite(C);if(F)if(F.startsWith("data:image/")&&!h(F)){console.warn("Cached base64 is corrupted, removing from cache and refetching:",C);try{await Mj(C),console.warn("Successfully removed corrupted cache entry")}catch(W){console.warn("Failed to remove corrupted cache entry:",W)}}else return F;try{r.isLoading=!0;const W=await fetch(C);if(!W.ok)throw new Error(`HTTP error! status: ${W.status}`);const H=W.headers.get("Content-Type");if(H!=null&&H.includes("image/svg+xml")||H!=null&&H.includes("text/xml")){const j=await W.text();if(j.trim())return await wD(C,j),j;throw new Error("Empty SVG content received")}else if(H&&(H.includes("image/jpeg")||H.includes("image/jpg")||H.includes("image/png")||H.includes("image/gif")||H.includes("image/webp"))){const j=await W.blob();if(j&&j.size>0){const N=await c(j);return await wD(C,N),N}else throw new Error("Invalid or empty blob received from server")}else throw new Error(`Unsupported content type: ${H}`)}catch(W){return console.error(`Failed to fetch media: ${C}`,W),r.error=`Failed to fetch media: ${W}`,null}finally{r.isLoading=!1}}const T=()=>{if(!n.name||n.type==="visual")return"";let C=`${o}/icon/tess`,F="TESSRAPP_Icon_";switch(n.type){case"rating":{C=`${o}/icon/tess/rating`;break}case"country":{C=n.isSquareSize?`${o}/icon/flags/1x1`:`${o}/icon/flags/4x3`,F="";break}default:{C=`${o}/icon/tess`;break}}return`${C}/${F}${n.name}.svg`},_=async()=>{switch(r.isLoading=!0,r.svgContent=null,r.imageSrc=null,r.error=null,f.value=null,!0){case(n.name&&n.type!=="visual"):await E();break;case(n.url&&n.type!=="visual"):await D();break;case!!(n.type==="visual"&&n.name):await O();break;default:await V();break}setTimeout(()=>{r.isLoading=!1},300)},E=async()=>{try{const C=T(),F=await S(C);if(typeof F=="string")F.startsWith("data:image/")?(r.imageSrc=F,r.svgContent=null,f.value=C):r.svgContent=F;else throw new Error("Failed to load internal icon")}catch(C){console.error("Error loading internal icon:",C),r.error=`Failed to load icon: ${C}`,await V()}},D=async()=>{try{const C=await S(n.url);if(typeof C=="string")C.startsWith("data:image/")?(r.imageSrc=C,r.svgContent=null,f.value=n.url):r.svgContent=C;else throw new Error("Failed to load external media")}catch(C){console.error("Error loading external media:",C),r.error=`Failed to load external media: ${C}`,await V()}},O=async()=>{try{const C=`${o}/icon/visual`,F="TESSRAPP_Visual_",W=dve.includes(n.name)?"svg":fve.includes(n.name)?"gif":"png",H=`${C}/${F}${n.name}.${W}`,j=await S(H);if(typeof j=="string")j.startsWith("data:image/")?(r.imageSrc=j,r.svgContent=null,f.value=H):r.svgContent=j;else throw new Error("Failed to load visual asset")}catch(C){console.error("Error loading visual asset:",C),r.error=`Failed to load visual asset: ${C}`,await V()}},V=async()=>{try{const C=typeof n.imageDefault=="string"?n.imageDefault:fk,F=await S(C);typeof F=="string"?F.startsWith("data:image/")?(r.imageSrc=F,r.svgContent=null,f.value=C):r.svgContent=F:r.imageSrc=C}catch(C){console.error("Error loading default image:",C),r.imageSrc=typeof n.imageDefault=="string"?n.imageDefault:fk}},P=async()=>{var C;if(i("error",r.error||"Image failed to load"),!r.retried){try{if((C=r.imageSrc)!=null&&C.startsWith("data:image/")&&f.value){console.warn("Base64 image failed to load, removing potentially corrupted cache entry");try{await Mj(f.value)}catch(F){console.warn("Failed to remove corrupted cache entry:",F)}}}catch(F){console.error("Error during image error recovery:",F);const W=typeof n.imageDefault=="string"?n.imageDefault:fk;await V(),r.imageSrc=W,f.value=null}r.retried=!0}},M=()=>{i("load")};return Ge(()=>[n.name,n.url,n.type],async()=>{r.retried=!1,r.error=null,await _()}),Ks(async()=>{r.retried=!1,r.error=null,await _()}),zt(async()=>{await rte()}),(C,F)=>b.value&&g.value?(R(),Y("div",{key:0,class:"svg-render",innerHTML:w(g.value)},null,8,hve)):p.value?(R(),Y("img",{key:1,ref_key:"imgInstance",ref:a,src:p.value,alt:n.alt,class:Fe(n.classIcon),onError:P,onLoad:M},null,42,pve)):pe("",!0)}}),mr=qt(mve,[["__scopeId","data-v-58ceffbd"]]),qn=Qe({__name:"Icon.ce",props:{name:{type:String,required:!0},type:{type:String,default:"icon"},isSquareSize:{type:Boolean,default:!1}},setup(t){const e=t;return(n,r)=>(R(),Re(mr,Ft(e,{"class-icon":`arbo--icon ${e.type}`}),null,16,["class-icon"]))}});var Bs="top",su="bottom",lu="right",Us="left",pU="auto",gA=[Bs,su,lu,Us],Pb="start",pS="end",gve="clippingParents",ate="viewport",c1="popper",vve="reference",Rj=gA.reduce(function(t,e){return t.concat([e+"-"+Pb,e+"-"+pS])},[]),ote=[].concat(gA,[pU]).reduce(function(t,e){return t.concat([e,e+"-"+Pb,e+"-"+pS])},[]),yve="beforeRead",bve="read",_ve="afterRead",wve="beforeMain",xve="main",Sve="afterMain",Ave="beforeWrite",kve="write",Eve="afterWrite",Tve=[yve,bve,_ve,wve,xve,Sve,Ave,kve,Eve];function Sd(t){return t?(t.nodeName||"").toLowerCase():null}function Sl(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Bv(t){var e=Sl(t).Element;return t instanceof e||t instanceof Element}function ru(t){var e=Sl(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function mU(t){if(typeof ShadowRoot>"u")return!1;var e=Sl(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Dve(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},a=e.elements[n];!ru(a)||!Sd(a)||(Object.assign(a.style,r),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function Ove(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],a=e.attributes[r]||{},o=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),s=o.reduce(function(l,c){return l[c]="",l},{});!ru(i)||!Sd(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(l){i.removeAttribute(l)}))})}}const ste={name:"applyStyles",enabled:!0,phase:"write",fn:Dve,effect:Ove,requires:["computeStyles"]};function dd(t){return t.split("-")[0]}var _v=Math.max,xD=Math.min,Lb=Math.round;function xV(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function lte(){return!/^((?!chrome|android).)*safari/i.test(xV())}function Nb(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,a=1;e&&ru(t)&&(i=t.offsetWidth>0&&Lb(r.width)/t.offsetWidth||1,a=t.offsetHeight>0&&Lb(r.height)/t.offsetHeight||1);var o=Bv(t)?Sl(t):window,s=o.visualViewport,l=!lte()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,f=(r.top+(l&&s?s.offsetTop:0))/a,h=r.width/i,p=r.height/a;return{width:h,height:p,top:f,right:c+h,bottom:f+p,left:c,x:c,y:f}}function gU(t){var e=Nb(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function ute(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&mU(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function yh(t){return Sl(t).getComputedStyle(t)}function Cve(t){return["table","td","th"].indexOf(Sd(t))>=0}function Zp(t){return((Bv(t)?t.ownerDocument:t.document)||window.document).documentElement}function KO(t){return Sd(t)==="html"?t:t.assignedSlot||t.parentNode||(mU(t)?t.host:null)||Zp(t)}function $j(t){return!ru(t)||yh(t).position==="fixed"?null:t.offsetParent}function Ive(t){var e=/firefox/i.test(xV()),n=/Trident/i.test(xV());if(n&&ru(t)){var r=yh(t);if(r.position==="fixed")return null}var i=KO(t);for(mU(i)&&(i=i.host);ru(i)&&["html","body"].indexOf(Sd(i))<0;){var a=yh(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||e&&a.willChange==="filter"||e&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function vA(t){for(var e=Sl(t),n=$j(t);n&&Cve(n)&&yh(n).position==="static";)n=$j(n);return n&&(Sd(n)==="html"||Sd(n)==="body"&&yh(n).position==="static")?e:n||Ive(t)||e}function vU(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Dx(t,e,n){return _v(t,xD(e,n))}function Mve(t,e,n){var r=Dx(t,e,n);return r>n?n:r}function cte(){return{top:0,right:0,bottom:0,left:0}}function dte(t){return Object.assign({},cte(),t)}function fte(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var Rve=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,dte(typeof t!="number"?t:fte(t,gA))};function $ve(t){var e,n=t.state,r=t.name,i=t.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=dd(n.placement),l=vU(s),c=[Us,lu].indexOf(s)>=0,f=c?"height":"width";if(!(!a||!o)){var h=Rve(i.padding,n),p=gU(a),g=l==="y"?Bs:Us,y=l==="y"?su:lu,v=n.rects.reference[f]+n.rects.reference[l]-o[l]-n.rects.popper[f],b=o[l]-n.rects.reference[l],w=vA(a),S=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,T=v/2-b/2,_=h[g],E=S-p[f]-h[y],D=S/2-p[f]/2+T,O=Dx(_,D,E),V=l;n.modifiersData[r]=(e={},e[V]=O,e.centerOffset=O-D,e)}}function Pve(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||ute(e.elements.popper,i)&&(e.elements.arrow=i))}const Lve={name:"arrow",enabled:!0,phase:"main",fn:$ve,effect:Pve,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Fb(t){return t.split("-")[1]}var Nve={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Fve(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:Lb(n*i)/i||0,y:Lb(r*i)/i||0}}function Pj(t){var e,n=t.popper,r=t.popperRect,i=t.placement,a=t.variation,o=t.offsets,s=t.position,l=t.gpuAcceleration,c=t.adaptive,f=t.roundOffsets,h=t.isFixed,p=o.x,g=p===void 0?0:p,y=o.y,v=y===void 0?0:y,b=typeof f=="function"?f({x:g,y:v}):{x:g,y:v};g=b.x,v=b.y;var w=o.hasOwnProperty("x"),S=o.hasOwnProperty("y"),T=Us,_=Bs,E=window;if(c){var D=vA(n),O="clientHeight",V="clientWidth";if(D===Sl(n)&&(D=Zp(n),yh(D).position!=="static"&&s==="absolute"&&(O="scrollHeight",V="scrollWidth")),D=D,i===Bs||(i===Us||i===lu)&&a===pS){_=su;var P=h&&D===E&&E.visualViewport?E.visualViewport.height:D[O];v-=P-r.height,v*=l?1:-1}if(i===Us||(i===Bs||i===su)&&a===pS){T=lu;var M=h&&D===E&&E.visualViewport?E.visualViewport.width:D[V];g-=M-r.width,g*=l?1:-1}}var C=Object.assign({position:s},c&&Nve),F=f===!0?Fve({x:g,y:v},Sl(n)):{x:g,y:v};if(g=F.x,v=F.y,l){var W;return Object.assign({},C,(W={},W[_]=S?"0":"",W[T]=w?"0":"",W.transform=(E.devicePixelRatio||1)<=1?"translate("+g+"px, "+v+"px)":"translate3d("+g+"px, "+v+"px, 0)",W))}return Object.assign({},C,(e={},e[_]=S?v+"px":"",e[T]=w?g+"px":"",e.transform="",e))}function Vve(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:dd(e.placement),variation:Fb(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Pj(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Pj(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Bve={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Vve,data:{}};var hk={passive:!0};function Uve(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,s=o===void 0?!0:o,l=Sl(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&c.forEach(function(f){f.addEventListener("scroll",n.update,hk)}),s&&l.addEventListener("resize",n.update,hk),function(){a&&c.forEach(function(f){f.removeEventListener("scroll",n.update,hk)}),s&&l.removeEventListener("resize",n.update,hk)}}const Wve={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Uve,data:{}};var zve={left:"right",right:"left",bottom:"top",top:"bottom"};function hT(t){return t.replace(/left|right|bottom|top/g,function(e){return zve[e]})}var jve={start:"end",end:"start"};function Lj(t){return t.replace(/start|end/g,function(e){return jve[e]})}function yU(t){var e=Sl(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function bU(t){return Nb(Zp(t)).left+yU(t).scrollLeft}function Hve(t,e){var n=Sl(t),r=Zp(t),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;var c=lte();(c||!c&&e==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s+bU(t),y:l}}function Yve(t){var e,n=Zp(t),r=yU(t),i=(e=t.ownerDocument)==null?void 0:e.body,a=_v(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=_v(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+bU(t),l=-r.scrollTop;return yh(i||n).direction==="rtl"&&(s+=_v(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:l}}function _U(t){var e=yh(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function hte(t){return["html","body","#document"].indexOf(Sd(t))>=0?t.ownerDocument.body:ru(t)&&_U(t)?t:hte(KO(t))}function Ox(t,e){var n;e===void 0&&(e=[]);var r=hte(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),a=Sl(r),o=i?[a].concat(a.visualViewport||[],_U(r)?r:[]):r,s=e.concat(o);return i?s:s.concat(Ox(KO(o)))}function SV(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function qve(t,e){var n=Nb(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Nj(t,e,n){return e===ate?SV(Hve(t,n)):Bv(e)?qve(e,n):SV(Yve(Zp(t)))}function Kve(t){var e=Ox(KO(t)),n=["absolute","fixed"].indexOf(yh(t).position)>=0,r=n&&ru(t)?vA(t):t;return Bv(r)?e.filter(function(i){return Bv(i)&&ute(i,r)&&Sd(i)!=="body"}):[]}function Gve(t,e,n,r){var i=e==="clippingParents"?Kve(t):[].concat(e),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(l,c){var f=Nj(t,c,r);return l.top=_v(f.top,l.top),l.right=xD(f.right,l.right),l.bottom=xD(f.bottom,l.bottom),l.left=_v(f.left,l.left),l},Nj(t,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function pte(t){var e=t.reference,n=t.element,r=t.placement,i=r?dd(r):null,a=r?Fb(r):null,o=e.x+e.width/2-n.width/2,s=e.y+e.height/2-n.height/2,l;switch(i){case Bs:l={x:o,y:e.y-n.height};break;case su:l={x:o,y:e.y+e.height};break;case lu:l={x:e.x+e.width,y:s};break;case Us:l={x:e.x-n.width,y:s};break;default:l={x:e.x,y:e.y}}var c=i?vU(i):null;if(c!=null){var f=c==="y"?"height":"width";switch(a){case Pb:l[c]=l[c]-(e[f]/2-n[f]/2);break;case pS:l[c]=l[c]+(e[f]/2-n[f]/2);break}}return l}function mS(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,a=n.strategy,o=a===void 0?t.strategy:a,s=n.boundary,l=s===void 0?gve:s,c=n.rootBoundary,f=c===void 0?ate:c,h=n.elementContext,p=h===void 0?c1:h,g=n.altBoundary,y=g===void 0?!1:g,v=n.padding,b=v===void 0?0:v,w=dte(typeof b!="number"?b:fte(b,gA)),S=p===c1?vve:c1,T=t.rects.popper,_=t.elements[y?S:p],E=Gve(Bv(_)?_:_.contextElement||Zp(t.elements.popper),l,f,o),D=Nb(t.elements.reference),O=pte({reference:D,element:T,placement:i}),V=SV(Object.assign({},T,O)),P=p===c1?V:D,M={top:E.top-P.top+w.top,bottom:P.bottom-E.bottom+w.bottom,left:E.left-P.left+w.left,right:P.right-E.right+w.right},C=t.modifiersData.offset;if(p===c1&&C){var F=C[i];Object.keys(M).forEach(function(W){var H=[lu,su].indexOf(W)>=0?1:-1,j=[Bs,su].indexOf(W)>=0?"y":"x";M[W]+=F[j]*H})}return M}function Zve(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?ote:l,f=Fb(r),h=f?s?Rj:Rj.filter(function(y){return Fb(y)===f}):gA,p=h.filter(function(y){return c.indexOf(y)>=0});p.length===0&&(p=h);var g=p.reduce(function(y,v){return y[v]=mS(t,{placement:v,boundary:i,rootBoundary:a,padding:o})[dd(v)],y},{});return Object.keys(g).sort(function(y,v){return g[y]-g[v]})}function Qve(t){if(dd(t)===pU)return[];var e=hT(t);return[Lj(t),e,Lj(e)]}function Xve(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!0:o,l=n.fallbackPlacements,c=n.padding,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,y=g===void 0?!0:g,v=n.allowedAutoPlacements,b=e.options.placement,w=dd(b),S=w===b,T=l||(S||!y?[hT(b)]:Qve(b)),_=[b].concat(T).reduce(function(me,Ee){return me.concat(dd(Ee)===pU?Zve(e,{placement:Ee,boundary:f,rootBoundary:h,padding:c,flipVariations:y,allowedAutoPlacements:v}):Ee)},[]),E=e.rects.reference,D=e.rects.popper,O=new Map,V=!0,P=_[0],M=0;M<_.length;M++){var C=_[M],F=dd(C),W=Fb(C)===Pb,H=[Bs,su].indexOf(F)>=0,j=H?"width":"height",N=mS(e,{placement:C,boundary:f,rootBoundary:h,altBoundary:p,padding:c}),U=H?W?lu:Us:W?su:Bs;E[j]>D[j]&&(U=hT(U));var ee=hT(U),le=[];if(a&&le.push(N[F]<=0),s&&le.push(N[U]<=0,N[ee]<=0),le.every(function(me){return me})){P=C,V=!1;break}O.set(C,le)}if(V)for(var _e=y?3:1,be=function(me){var Ee=_.find(function(Ce){var de=O.get(Ce);if(de)return de.slice(0,me).every(function(G){return G})});if(Ee)return P=Ee,"break"},Te=_e;Te>0;Te--){var J=be(Te);if(J==="break")break}e.placement!==P&&(e.modifiersData[r]._skip=!0,e.placement=P,e.reset=!0)}}const Jve={name:"flip",enabled:!0,phase:"main",fn:Xve,requiresIfExists:["offset"],data:{_skip:!1}};function Fj(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Vj(t){return[Bs,lu,su,Us].some(function(e){return t[e]>=0})}function eye(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,a=e.modifiersData.preventOverflow,o=mS(e,{elementContext:"reference"}),s=mS(e,{altBoundary:!0}),l=Fj(o,r),c=Fj(s,i,a),f=Vj(l),h=Vj(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const tye={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:eye};function nye(t,e,n){var r=dd(t),i=[Us,Bs].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[Us,lu].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function rye(t){var e=t.state,n=t.options,r=t.name,i=n.offset,a=i===void 0?[0,0]:i,o=ote.reduce(function(f,h){return f[h]=nye(h,e.rects,a),f},{}),s=o[e.placement],l=s.x,c=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=o}const iye={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:rye};function aye(t){var e=t.state,n=t.name;e.modifiersData[n]=pte({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const oye={name:"popperOffsets",enabled:!0,phase:"read",fn:aye,data:{}};function sye(t){return t==="x"?"y":"x"}function lye(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!1:o,l=n.boundary,c=n.rootBoundary,f=n.altBoundary,h=n.padding,p=n.tether,g=p===void 0?!0:p,y=n.tetherOffset,v=y===void 0?0:y,b=mS(e,{boundary:l,rootBoundary:c,padding:h,altBoundary:f}),w=dd(e.placement),S=Fb(e.placement),T=!S,_=vU(w),E=sye(_),D=e.modifiersData.popperOffsets,O=e.rects.reference,V=e.rects.popper,P=typeof v=="function"?v(Object.assign({},e.rects,{placement:e.placement})):v,M=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),C=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,F={x:0,y:0};if(D){if(a){var W,H=_==="y"?Bs:Us,j=_==="y"?su:lu,N=_==="y"?"height":"width",U=D[_],ee=U+b[H],le=U-b[j],_e=g?-V[N]/2:0,be=S===Pb?O[N]:V[N],Te=S===Pb?-V[N]:-O[N],J=e.elements.arrow,me=g&&J?gU(J):{width:0,height:0},Ee=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:cte(),Ce=Ee[H],de=Ee[j],G=Dx(0,O[N],me[N]),ge=T?O[N]/2-_e-G-Ce-M.mainAxis:be-G-Ce-M.mainAxis,Ue=T?-O[N]/2+_e+G+de+M.mainAxis:Te+G+de+M.mainAxis,ce=e.elements.arrow&&vA(e.elements.arrow),Ye=ce?_==="y"?ce.clientTop||0:ce.clientLeft||0:0,te=(W=C==null?void 0:C[_])!=null?W:0,ae=U+ge-te-Ye,ne=U+Ue-te,Ne=Dx(g?xD(ee,ae):ee,U,g?_v(le,ne):le);D[_]=Ne,F[_]=Ne-U}if(s){var Me,Ve=_==="x"?Bs:Us,at=_==="x"?su:lu,Ie=D[E],Ze=E==="y"?"height":"width",tt=Ie+b[Ve],Oe=Ie-b[at],Be=[Bs,Us].indexOf(w)!==-1,gt=(Me=C==null?void 0:C[E])!=null?Me:0,Bt=Be?tt:Ie-O[Ze]-V[Ze]-gt+M.altAxis,jt=Be?Ie+O[Ze]+V[Ze]-gt-M.altAxis:Oe,yt=g&&Be?Mve(Bt,Ie,jt):Dx(g?Bt:tt,Ie,g?jt:Oe);D[E]=yt,F[E]=yt-Ie}e.modifiersData[r]=F}}const uye={name:"preventOverflow",enabled:!0,phase:"main",fn:lye,requiresIfExists:["offset"]};function cye(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function dye(t){return t===Sl(t)||!ru(t)?yU(t):cye(t)}function fye(t){var e=t.getBoundingClientRect(),n=Lb(e.width)/t.offsetWidth||1,r=Lb(e.height)/t.offsetHeight||1;return n!==1||r!==1}function hye(t,e,n){n===void 0&&(n=!1);var r=ru(e),i=ru(e)&&fye(e),a=Zp(e),o=Nb(t,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Sd(e)!=="body"||_U(a))&&(s=dye(e)),ru(e)?(l=Nb(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):a&&(l.x=bU(a))),{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function pye(t){var e=new Map,n=new Set,r=[];t.forEach(function(a){e.set(a.name,a)});function i(a){n.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!n.has(s)){var l=e.get(s);l&&i(l)}}),r.push(a)}return t.forEach(function(a){n.has(a.name)||i(a)}),r}function mye(t){var e=pye(t);return Tve.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function gye(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function vye(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var Bj={placement:"bottom",modifiers:[],strategy:"absolute"};function Uj(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function yye(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,i=e.defaultOptions,a=i===void 0?Bj:i;return function(o,s,l){l===void 0&&(l=a);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Bj,a),modifiersData:{},elements:{reference:o,popper:s},attributes:{},styles:{}},f=[],h=!1,p={state:c,setOptions:function(v){var b=typeof v=="function"?v(c.options):v;y(),c.options=Object.assign({},a,c.options,b),c.scrollParents={reference:Bv(o)?Ox(o):o.contextElement?Ox(o.contextElement):[],popper:Ox(s)};var w=mye(vye([].concat(r,c.options.modifiers)));return c.orderedModifiers=w.filter(function(S){return S.enabled}),g(),p.update()},forceUpdate:function(){if(!h){var v=c.elements,b=v.reference,w=v.popper;if(Uj(b,w)){c.rects={reference:hye(b,vA(w),c.options.strategy==="fixed"),popper:gU(w)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(V){return c.modifiersData[V.name]=Object.assign({},V.data)});for(var S=0;S<c.orderedModifiers.length;S++){if(c.reset===!0){c.reset=!1,S=-1;continue}var T=c.orderedModifiers[S],_=T.fn,E=T.options,D=E===void 0?{}:E,O=T.name;typeof _=="function"&&(c=_({state:c,options:D,name:O,instance:p})||c)}}}},update:gye(function(){return new Promise(function(v){p.forceUpdate(),v(c)})}),destroy:function(){y(),h=!0}};if(!Uj(o,s))return p;p.setOptions(l).then(function(v){!h&&l.onFirstUpdate&&l.onFirstUpdate(v)});function g(){c.orderedModifiers.forEach(function(v){var b=v.name,w=v.options,S=w===void 0?{}:w,T=v.effect;if(typeof T=="function"){var _=T({state:c,name:b,instance:p,options:S}),E=function(){};f.push(_||E)}})}function y(){f.forEach(function(v){return v()}),f=[]}return p}}var bye=[Wve,oye,Bve,ste,iye,Jve,uye,Lve,tye],_ye=yye({defaultModifiers:bye}),wye="tippy-box",mte="tippy-content",xye="tippy-backdrop",gte="tippy-arrow",vte="tippy-svg-arrow",qg={passive:!0,capture:!0},yte=function(){return document.body};function Sye(t,e){return{}.hasOwnProperty.call(t,e)}function fL(t,e,n){if(Array.isArray(t)){var r=t[e];return r??(Array.isArray(n)?n[e]:n)}return t}function wU(t,e){var n={}.toString.call(t);return n.indexOf("[object")===0&&n.indexOf(e+"]")>-1}function bte(t,e){return typeof t=="function"?t.apply(void 0,e):t}function Wj(t,e){if(e===0)return t;var n;return function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)}}function Aye(t,e){var n=Object.assign({},t);return e.forEach(function(r){delete n[r]}),n}function kye(t){return t.split(/\s+/).filter(Boolean)}function Gy(t){return[].concat(t)}function zj(t,e){t.indexOf(e)===-1&&t.push(e)}function Eye(t){return t.filter(function(e,n){return t.indexOf(e)===n})}function Tye(t){return t.split("-")[0]}function SD(t){return[].slice.call(t)}function jj(t){return Object.keys(t).reduce(function(e,n){return t[n]!==void 0&&(e[n]=t[n]),e},{})}function Cx(){return document.createElement("div")}function gS(t){return["Element","Fragment"].some(function(e){return wU(t,e)})}function Dye(t){return wU(t,"NodeList")}function Oye(t){return wU(t,"MouseEvent")}function Cye(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function Iye(t){return gS(t)?[t]:Dye(t)?SD(t):Array.isArray(t)?t:SD(document.querySelectorAll(t))}function hL(t,e){t.forEach(function(n){n&&(n.style.transitionDuration=e+"ms")})}function Hj(t,e){t.forEach(function(n){n&&n.setAttribute("data-state",e)})}function Mye(t){var e,n=Gy(t),r=n[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function Rye(t,e){var n=e.clientX,r=e.clientY;return t.every(function(i){var a=i.popperRect,o=i.popperState,s=i.props,l=s.interactiveBorder,c=Tye(o.placement),f=o.modifiersData.offset;if(!f)return!0;var h=c==="bottom"?f.top.y:0,p=c==="top"?f.bottom.y:0,g=c==="right"?f.left.x:0,y=c==="left"?f.right.x:0,v=a.top-r+h>l,b=r-a.bottom-p>l,w=a.left-n+g>l,S=n-a.right-y>l;return v||b||w||S})}function pL(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){t[r](i,n)})}function Yj(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var ed={isTouch:!1},qj=0;function $ye(){ed.isTouch||(ed.isTouch=!0,window.performance&&document.addEventListener("mousemove",_te))}function _te(){var t=performance.now();t-qj<20&&(ed.isTouch=!1,document.removeEventListener("mousemove",_te)),qj=t}function Pye(){var t=document.activeElement;if(Cye(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function Lye(){document.addEventListener("touchstart",$ye,qg),window.addEventListener("blur",Pye)}var Nye=typeof window<"u"&&typeof document<"u",Fye=Nye?!!window.msCrypto:!1;function Ey(t){var e=t==="destroy"?"n already-":" ";return[t+"() was called on a"+e+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function Kj(t){var e=/[ \t]{2,}/g,n=/^[ \t]*/gm;return t.replace(e," ").replace(n,"").trim()}function Vye(t){return Kj(`
|
|
30
30
|
%ctippy.js
|
|
31
31
|
|
|
32
32
|
%c`+Kj(t)+`
|
|
@@ -103,7 +103,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
103
103
|
`)}function Ne(A,k,L,z){this.failures=k,this.failedKeys=z,this.successCount=L,this.message=ne(A,k)}b(Ne).from(ae);function Me(A,k){this.name="BulkError",this.failures=Object.keys(k).map(function(L){return k[L]}),this.failuresByPos=k,this.message=ne(A,this.failures)}b(Me).from(ae);var Ve=Ye.reduce(function(A,k){return A[k]=k+"Error",A},{}),at=ae,Ie=Ye.reduce(function(A,k){var L=k+"Error";function z(K,oe){this.name=L,K?typeof K=="string"?(this.message="".concat(K).concat(oe?`
|
|
104
104
|
`+oe:""),this.inner=oe||null):typeof K=="object"&&(this.message="".concat(K.name," ").concat(K.message),this.inner=K):(this.message=te[k]||L,this.inner=null)}return b(z).from(at),A[k]=z,A},{});Ie.Syntax=SyntaxError,Ie.Type=TypeError,Ie.Range=RangeError;var Ze=ce.reduce(function(A,k){return A[k+"Error"]=Ie[k],A},{});function tt(A,k){if(!A||A instanceof ae||A instanceof TypeError||A instanceof SyntaxError||!A.name||!Ze[A.name])return A;var L=new Ze[A.name](k||A.message,A);return"stack"in A&&v(L,"stack",{get:function(){return this.inner.stack}}),L}var Oe=Ye.reduce(function(A,k){return["Syntax","Type","Range"].indexOf(k)===-1&&(A[k+"Error"]=Ie[k]),A},{});Oe.ModifyError=Ne,Oe.DexieError=ae,Oe.BulkError=Me;function Be(){}function gt(A){return A}function Bt(A,k){return A==null||A===gt?k:function(L){return k(A(L))}}function jt(A,k){return function(){A.apply(this,arguments),k.apply(this,arguments)}}function yt(A,k){return A===Be?k:function(){var L=A.apply(this,arguments);L!==void 0&&(arguments[0]=L);var z=this.onsuccess,K=this.onerror;this.onsuccess=null,this.onerror=null;var oe=k.apply(this,arguments);return z&&(this.onsuccess=this.onsuccess?jt(z,this.onsuccess):z),K&&(this.onerror=this.onerror?jt(K,this.onerror):K),oe!==void 0?oe:L}}function hn(A,k){return A===Be?k:function(){A.apply(this,arguments);var L=this.onsuccess,z=this.onerror;this.onsuccess=this.onerror=null,k.apply(this,arguments),L&&(this.onsuccess=this.onsuccess?jt(L,this.onsuccess):L),z&&(this.onerror=this.onerror?jt(z,this.onerror):z)}}function nr(A,k){return A===Be?k:function(L){var z=A.apply(this,arguments);c(L,z);var K=this.onsuccess,oe=this.onerror;this.onsuccess=null,this.onerror=null;var ye=k.apply(this,arguments);return K&&(this.onsuccess=this.onsuccess?jt(K,this.onsuccess):K),oe&&(this.onerror=this.onerror?jt(oe,this.onerror):oe),z===void 0?ye===void 0?void 0:ye:c(z,ye)}}function wr(A,k){return A===Be?k:function(){return k.apply(this,arguments)===!1?!1:A.apply(this,arguments)}}function Dr(A,k){return A===Be?k:function(){var L=A.apply(this,arguments);if(L&&typeof L.then=="function"){for(var z=this,K=arguments.length,oe=new Array(K);K--;)oe[K]=arguments[K];return L.then(function(){return k.apply(z,oe)})}return k.apply(this,arguments)}}var sr=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function se(A,k){sr=A}var je={},Xe=100,bt=typeof Promise>"u"?[]:function(){var A=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[A,f(A),A];var k=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[k,f(k),A]}(),Ae=bt[0],ot=bt[1],Mt=bt[2],an=ot&&ot.then,st=Ae&&Ae.constructor,xt=!!Mt;function Gt(){queueMicrotask(Z_)}var or=function(A,k){Zs.push([A,k]),zr&&(Gt(),zr=!1)},Pi=!0,zr=!0,yr=[],Dl=[],Ld=gt,Mo={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Be,pgp:!1,env:{},finalize:Be},pn=Mo,Zs=[],vu=0,Lh=[];function Zt(A){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var k=this._PSD=pn;if(typeof A!="function"){if(A!==je)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&om(this,this._value);return}this._state=null,this._value=null,++k.ref,py(this,A)}var am={get:function(){var A=pn,k=Lc;function L(z,K){var oe=this,ye=!A.global&&(A!==pn||k!==Lc),xe=ye&&!Cl(),Se=new Zt(function(Le,Ke){Nd(oe,new hy(Il(z,A,ye,xe),Il(K,A,ye,xe),Le,Ke,A))});return this._consoleTask&&(Se._consoleTask=this._consoleTask),Se}return L.prototype=je,L},set:function(A){v(this,"then",A&&A.prototype===je?am:{get:function(){return A},set:am.set})}};g(Zt.prototype,{then:am,_then:function(A,k){Nd(this,new hy(null,null,A,k,pn))},catch:function(A){if(arguments.length===1)return this.then(null,A);var k=arguments[0],L=arguments[1];return typeof k=="function"?this.then(null,function(z){return z instanceof k?L(z):Es(z)}):this.then(null,function(z){return z&&z.name===k?L(z):Es(z)})},finally:function(A){return this.then(function(k){return Zt.resolve(A()).then(function(){return k})},function(k){return Zt.resolve(A()).then(function(){return Es(k)})})},timeout:function(A,k){var L=this;return A<1/0?new Zt(function(z,K){var oe=setTimeout(function(){return K(new Ie.Timeout(k))},A);L.then(z,K).finally(clearTimeout.bind(null,oe))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&v(Zt.prototype,Symbol.toStringTag,"Dexie.Promise"),Mo.env=gy();function hy(A,k,L,z,K){this.onFulfilled=typeof A=="function"?A:null,this.onRejected=typeof k=="function"?k:null,this.resolve=L,this.reject=z,this.psd=K}g(Zt,{all:function(){var A=G.apply(null,arguments).map(Fc);return new Zt(function(k,L){A.length===0&&k([]);var z=A.length;A.forEach(function(K,oe){return Zt.resolve(K).then(function(ye){A[oe]=ye,--z||k(A)},L)})})},resolve:function(A){if(A instanceof Zt)return A;if(A&&typeof A.then=="function")return new Zt(function(L,z){A.then(L,z)});var k=new Zt(je,!0,A);return k},reject:Es,race:function(){var A=G.apply(null,arguments).map(Fc);return new Zt(function(k,L){A.map(function(z){return Zt.resolve(z).then(k,L)})})},PSD:{get:function(){return pn},set:function(A){return pn=A}},totalEchoes:{get:function(){return Lc}},newPSD:Ol,usePSD:Qs,scheduler:{get:function(){return or},set:function(A){or=A}},rejectionMapper:{get:function(){return Ld},set:function(A){Ld=A}},follow:function(A,k){return new Zt(function(L,z){return Ol(function(K,oe){var ye=pn;ye.unhandleds=[],ye.onunhandled=oe,ye.finalize=jt(function(){var xe=this;Q_(function(){xe.unhandleds.length===0?K():oe(xe.unhandleds[0])})},ye.finalize),A()},k,L,z)})}}),st&&(st.allSettled&&v(Zt,"allSettled",function(){var A=G.apply(null,arguments).map(Fc);return new Zt(function(k){A.length===0&&k([]);var L=A.length,z=new Array(L);A.forEach(function(K,oe){return Zt.resolve(K).then(function(ye){return z[oe]={status:"fulfilled",value:ye}},function(ye){return z[oe]={status:"rejected",reason:ye}}).then(function(){return--L||k(z)})})})}),st.any&&typeof AggregateError<"u"&&v(Zt,"any",function(){var A=G.apply(null,arguments).map(Fc);return new Zt(function(k,L){A.length===0&&L(new AggregateError([]));var z=A.length,K=new Array(z);A.forEach(function(oe,ye){return Zt.resolve(oe).then(function(xe){return k(xe)},function(xe){K[ye]=xe,--z||L(new AggregateError(K))})})})}),st.withResolvers&&(Zt.withResolvers=st.withResolvers));function py(A,k){try{k(function(L){if(A._state===null){if(L===A)throw new TypeError("A promise cannot be resolved with itself.");var z=A._lib&&Mc();L&&typeof L.then=="function"?py(A,function(K,oe){L instanceof Zt?L._then(K,oe):L.then(K,oe)}):(A._state=!0,A._value=L,my(A)),z&&Rc()}},om.bind(null,A))}catch(L){om(A,L)}}function om(A,k){if(Dl.push(k),A._state===null){var L=A._lib&&Mc();k=Ld(k),A._state=!1,A._value=k,yu(A),my(A),L&&Rc()}}function my(A){var k=A._listeners;A._listeners=[];for(var L=0,z=k.length;L<z;++L)Nd(A,k[L]);var K=A._PSD;--K.ref||K.finalize(),vu===0&&(++vu,or(function(){--vu===0&&sm()},[]))}function Nd(A,k){if(A._state===null){A._listeners.push(k);return}var L=A._state?k.onFulfilled:k.onRejected;if(L===null)return(A._state?k.resolve:k.reject)(A._value);++k.psd.ref,++vu,or(G_,[L,A,k])}function G_(A,k,L){try{var z,K=k._value;!k._state&&Dl.length&&(Dl=[]),z=sr&&k._consoleTask?k._consoleTask.run(function(){return A(K)}):A(K),!k._state&&Dl.indexOf(K)===-1&&X_(k),L.resolve(z)}catch(oe){L.reject(oe)}finally{--vu===0&&sm(),--L.psd.ref||L.psd.finalize()}}function Z_(){Qs(Mo,function(){Mc()&&Rc()})}function Mc(){var A=Pi;return Pi=!1,zr=!1,A}function Rc(){var A,k,L;do for(;Zs.length>0;)for(A=Zs,Zs=[],L=A.length,k=0;k<L;++k){var z=A[k];z[0].apply(null,z[1])}while(Zs.length>0);Pi=!0,zr=!0}function sm(){var A=yr;yr=[],A.forEach(function(z){z._PSD.onunhandled.call(null,z._value,z)});for(var k=Lh.slice(0),L=k.length;L;)k[--L]()}function Q_(A){function k(){A(),Lh.splice(Lh.indexOf(k),1)}Lh.push(k),++vu,or(function(){--vu===0&&sm()},[])}function yu(A){yr.some(function(k){return k._value===A._value})||yr.push(A)}function X_(A){for(var k=yr.length;k;)if(yr[--k]._value===A._value){yr.splice(k,1);return}}function Es(A){return new Zt(je,!1,A)}function ti(A,k){var L=pn;return function(){var z=Mc(),K=pn;try{return Ro(L,!0),A.apply(this,arguments)}catch(oe){k&&k(oe)}finally{Ro(K,!1),z&&Rc()}}}var ra={awaits:0,echoes:0,id:0},J_=0,$c=[],Pc=0,Lc=0,e0=0;function Ol(A,k,L,z){var K=pn,oe=Object.create(K);oe.parent=K,oe.ref=0,oe.global=!1,oe.id=++e0,Mo.env,oe.env=xt?{Promise:Zt,PromiseProp:{value:Zt,configurable:!0,writable:!0},all:Zt.all,race:Zt.race,allSettled:Zt.allSettled,any:Zt.any,resolve:Zt.resolve,reject:Zt.reject}:{},k&&c(oe,k),++K.ref,oe.finalize=function(){--this.parent.ref||this.parent.finalize()};var ye=Qs(oe,A,L,z);return oe.ref===0&&oe.finalize(),ye}function Nc(){return ra.id||(ra.id=++J_),++ra.awaits,ra.echoes+=Xe,ra.id}function Cl(){return ra.awaits?(--ra.awaits===0&&(ra.id=0),ra.echoes=ra.awaits*Xe,!0):!1}(""+an).indexOf("[native code]")===-1&&(Nc=Cl=Be);function Fc(A){return ra.echoes&&A&&A.constructor===st?(Nc(),A.then(function(k){return Cl(),k},function(k){return Cl(),bi(k)})):A}function lm(A){++Lc,(!ra.echoes||--ra.echoes===0)&&(ra.echoes=ra.awaits=ra.id=0),$c.push(pn),Ro(A,!0)}function um(){var A=$c[$c.length-1];$c.pop(),Ro(A,!1)}function Ro(A,k){var L=pn;if((k?ra.echoes&&(!Pc++||A!==pn):Pc&&(!--Pc||A!==pn))&&queueMicrotask(k?lm.bind(null,A):um),A!==pn&&(pn=A,L===Mo&&(Mo.env=gy()),xt)){var z=Mo.env.Promise,K=A.env;(L.global||A.global)&&(Object.defineProperty(o,"Promise",K.PromiseProp),z.all=K.all,z.race=K.race,z.resolve=K.resolve,z.reject=K.reject,K.allSettled&&(z.allSettled=K.allSettled),K.any&&(z.any=K.any))}}function gy(){var A=o.Promise;return xt?{Promise:A,PromiseProp:Object.getOwnPropertyDescriptor(o,"Promise"),all:A.all,race:A.race,allSettled:A.allSettled,any:A.any,resolve:A.resolve,reject:A.reject}:{}}function Qs(A,k,L,z,K){var oe=pn;try{return Ro(A,!0),k(L,z,K)}finally{Ro(oe,!1)}}function Il(A,k,L,z){return typeof A!="function"?A:function(){var K=pn;L&&Nc(),Ro(k,!0);try{return A.apply(this,arguments)}finally{Ro(K,!1),z&&queueMicrotask(Cl)}}}function Fd(A){Promise===st&&ra.echoes===0?Pc===0?A():enqueueNativeMicroTask(A):setTimeout(A,0)}var bi=Zt.reject;function Vd(A,k,L,z){if(!A.idbdb||!A._state.openComplete&&!pn.letThrough&&!A._vip){if(A._state.openComplete)return bi(new Ie.DatabaseClosed(A._state.dbOpenError));if(!A._state.isBeingOpened){if(!A._state.autoOpen)return bi(new Ie.DatabaseClosed);A.open().catch(Be)}return A._state.dbReadyPromise.then(function(){return Vd(A,k,L,z)})}else{var K=A._createTransaction(k,L,A._dbSchema);try{K.create(),A._state.PR1398_maxLoop=3}catch(oe){return oe.name===Ve.InvalidState&&A.isOpen()&&--A._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),A.close({disableAutoOpen:!1}),A.open().then(function(){return Vd(A,k,L,z)})):bi(oe)}return K._promise(k,function(oe,ye){return Ol(function(){return pn.trans=K,z(oe,ye,K)})}).then(function(oe){if(k==="readwrite")try{K.idbtrans.commit()}catch{}return k==="readonly"?oe:K._completion.then(function(){return oe})})}}var Nh="4.0.10",as="",cm=-1/0,os="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Vc="String expected.",Ts=[],Xa="__dbnames",Bd="readonly",Ud="readwrite";function bu(A,k){return A?k?function(){return A.apply(this,arguments)&&k.apply(this,arguments)}:A:k}var Fh={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Bc(A){return typeof A=="string"&&!/\./.test(A)?function(k){return k[A]===void 0&&A in k&&(k=_e(k),delete k[A]),k}:function(k){return k}}function Vh(){throw Ie.Type()}function rr(A,k){try{var L=vy(A),z=vy(k);if(L!==z)return L==="Array"?1:z==="Array"?-1:L==="binary"?1:z==="binary"?-1:L==="string"?1:z==="string"?-1:L==="Date"?1:z!=="Date"?NaN:-1;switch(L){case"number":case"Date":case"string":return A>k?1:A<k?-1:0;case"binary":return n0(Bh(A),Bh(k));case"Array":return t0(A,k)}}catch{}return NaN}function t0(A,k){for(var L=A.length,z=k.length,K=L<z?L:z,oe=0;oe<K;++oe){var ye=rr(A[oe],k[oe]);if(ye!==0)return ye}return L===z?0:L<z?-1:1}function n0(A,k){for(var L=A.length,z=k.length,K=L<z?L:z,oe=0;oe<K;++oe)if(A[oe]!==k[oe])return A[oe]<k[oe]?-1:1;return L===z?0:L<z?-1:1}function vy(A){var k=typeof A;if(k!=="object")return k;if(ArrayBuffer.isView(A))return"binary";var L=J(A);return L==="ArrayBuffer"?"binary":L}function Bh(A){return A instanceof Uint8Array?A:ArrayBuffer.isView(A)?new Uint8Array(A.buffer,A.byteOffset,A.byteLength):new Uint8Array(A)}var yy=function(){function A(){}return A.prototype._trans=function(k,L,z){var K=this._tx||pn.trans,oe=this.name,ye=sr&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(k==="readonly"?"read":"write"," ").concat(this.name));function xe(Ke,He,ht){if(!ht.schema[oe])throw new Ie.NotFound("Table "+oe+" not part of transaction");return L(ht.idbtrans,ht)}var Se=Mc();try{var Le=K&&K.db._novip===this.db._novip?K===pn.trans?K._promise(k,xe,z):Ol(function(){return K._promise(k,xe,z)},{trans:K,transless:pn.transless||pn}):Vd(this.db,k,[this.name],xe);return ye&&(Le._consoleTask=ye,Le=Le.catch(function(Ke){return console.trace(Ke),bi(Ke)})),Le}finally{Se&&Rc()}},A.prototype.get=function(k,L){var z=this;return k&&k.constructor===Object?this.where(k).first(L):k==null?bi(new Ie.Type("Invalid argument to Table.get()")):this._trans("readonly",function(K){return z.core.get({trans:K,key:k}).then(function(oe){return z.hook.reading.fire(oe)})}).then(L)},A.prototype.where=function(k){if(typeof k=="string")return new this.db.WhereClause(this,k);if(l(k))return new this.db.WhereClause(this,"[".concat(k.join("+"),"]"));var L=s(k);if(L.length===1)return this.where(L[0]).equals(k[L[0]]);var z=this.schema.indexes.concat(this.schema.primKey).filter(function(Ke){if(Ke.compound&&L.every(function(ht){return Ke.keyPath.indexOf(ht)>=0})){for(var He=0;He<L.length;++He)if(L.indexOf(Ke.keyPath[He])===-1)return!1;return!0}return!1}).sort(function(Ke,He){return Ke.keyPath.length-He.keyPath.length})[0];if(z&&this.db._maxKey!==as){var K=z.keyPath.slice(0,L.length);return this.where(K).equals(K.map(function(Ke){return k[Ke]}))}!z&&sr&&console.warn("The query ".concat(JSON.stringify(k)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(L.join("+"),"]"));var oe=this.schema.idxByName;function ye(Ke,He){return rr(Ke,He)===0}var xe=L.reduce(function(Ke,He){var ht=Ke[0],Dt=Ke[1],qe=oe[He],Je=k[He];return[ht||qe,ht||!qe?bu(Dt,qe&&qe.multi?function(ct){var pt=P(ct,He);return l(pt)&&pt.some(function(dt){return ye(Je,dt)})}:function(ct){return ye(Je,P(ct,He))}):Dt]},[null,null]),Se=xe[0],Le=xe[1];return Se?this.where(Se.name).equals(k[Se.keyPath]).filter(Le):z?this.filter(Le):this.where(L).equals("")},A.prototype.filter=function(k){return this.toCollection().and(k)},A.prototype.count=function(k){return this.toCollection().count(k)},A.prototype.offset=function(k){return this.toCollection().offset(k)},A.prototype.limit=function(k){return this.toCollection().limit(k)},A.prototype.each=function(k){return this.toCollection().each(k)},A.prototype.toArray=function(k){return this.toCollection().toArray(k)},A.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},A.prototype.orderBy=function(k){return new this.db.Collection(new this.db.WhereClause(this,l(k)?"[".concat(k.join("+"),"]"):k))},A.prototype.reverse=function(){return this.toCollection().reverse()},A.prototype.mapToClass=function(k){var L=this,z=L.db,K=L.name;this.schema.mappedClass=k,k.prototype instanceof Vh&&(k=function(Se){r(Le,Se);function Le(){return Se!==null&&Se.apply(this,arguments)||this}return Object.defineProperty(Le.prototype,"db",{get:function(){return z},enumerable:!1,configurable:!0}),Le.prototype.table=function(){return K},Le}(k));for(var oe=new Set,ye=k.prototype;ye;ye=f(ye))Object.getOwnPropertyNames(ye).forEach(function(Se){return oe.add(Se)});var xe=function(Se){if(!Se)return Se;var Le=Object.create(k.prototype);for(var Ke in Se)if(!oe.has(Ke))try{Le[Ke]=Se[Ke]}catch{}return Le};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=xe,this.hook("reading",xe),k},A.prototype.defineClass=function(){function k(L){c(this,L)}return this.mapToClass(k)},A.prototype.add=function(k,L){var z=this,K=this.schema.primKey,oe=K.auto,ye=K.keyPath,xe=k;return ye&&oe&&(xe=Bc(ye)(k)),this._trans("readwrite",function(Se){return z.core.mutate({trans:Se,type:"add",keys:L!=null?[L]:null,values:[xe]})}).then(function(Se){return Se.numFailures?Zt.reject(Se.failures[0]):Se.lastResult}).then(function(Se){if(ye)try{M(k,ye,Se)}catch{}return Se})},A.prototype.update=function(k,L){if(typeof k=="object"&&!l(k)){var z=P(k,this.schema.primKey.keyPath);return z===void 0?bi(new Ie.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(z).modify(L)}else return this.where(":id").equals(k).modify(L)},A.prototype.put=function(k,L){var z=this,K=this.schema.primKey,oe=K.auto,ye=K.keyPath,xe=k;return ye&&oe&&(xe=Bc(ye)(k)),this._trans("readwrite",function(Se){return z.core.mutate({trans:Se,type:"put",values:[xe],keys:L!=null?[L]:null})}).then(function(Se){return Se.numFailures?Zt.reject(Se.failures[0]):Se.lastResult}).then(function(Se){if(ye)try{M(k,ye,Se)}catch{}return Se})},A.prototype.delete=function(k){var L=this;return this._trans("readwrite",function(z){return L.core.mutate({trans:z,type:"delete",keys:[k]})}).then(function(z){return z.numFailures?Zt.reject(z.failures[0]):void 0})},A.prototype.clear=function(){var k=this;return this._trans("readwrite",function(L){return k.core.mutate({trans:L,type:"deleteRange",range:Fh})}).then(function(L){return L.numFailures?Zt.reject(L.failures[0]):void 0})},A.prototype.bulkGet=function(k){var L=this;return this._trans("readonly",function(z){return L.core.getMany({keys:k,trans:z}).then(function(K){return K.map(function(oe){return L.hook.reading.fire(oe)})})})},A.prototype.bulkAdd=function(k,L,z){var K=this,oe=Array.isArray(L)?L:void 0;z=z||(oe?void 0:L);var ye=z?z.allKeys:void 0;return this._trans("readwrite",function(xe){var Se=K.schema.primKey,Le=Se.auto,Ke=Se.keyPath;if(Ke&&oe)throw new Ie.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(oe&&oe.length!==k.length)throw new Ie.InvalidArgument("Arguments objects and keys must have the same length");var He=k.length,ht=Ke&&Le?k.map(Bc(Ke)):k;return K.core.mutate({trans:xe,type:"add",keys:oe,values:ht,wantResults:ye}).then(function(Dt){var qe=Dt.numFailures,Je=Dt.results,ct=Dt.lastResult,pt=Dt.failures,dt=ye?Je:ct;if(qe===0)return dt;throw new Me("".concat(K.name,".bulkAdd(): ").concat(qe," of ").concat(He," operations failed"),pt)})})},A.prototype.bulkPut=function(k,L,z){var K=this,oe=Array.isArray(L)?L:void 0;z=z||(oe?void 0:L);var ye=z?z.allKeys:void 0;return this._trans("readwrite",function(xe){var Se=K.schema.primKey,Le=Se.auto,Ke=Se.keyPath;if(Ke&&oe)throw new Ie.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(oe&&oe.length!==k.length)throw new Ie.InvalidArgument("Arguments objects and keys must have the same length");var He=k.length,ht=Ke&&Le?k.map(Bc(Ke)):k;return K.core.mutate({trans:xe,type:"put",keys:oe,values:ht,wantResults:ye}).then(function(Dt){var qe=Dt.numFailures,Je=Dt.results,ct=Dt.lastResult,pt=Dt.failures,dt=ye?Je:ct;if(qe===0)return dt;throw new Me("".concat(K.name,".bulkPut(): ").concat(qe," of ").concat(He," operations failed"),pt)})})},A.prototype.bulkUpdate=function(k){var L=this,z=this.core,K=k.map(function(xe){return xe.key}),oe=k.map(function(xe){return xe.changes}),ye=[];return this._trans("readwrite",function(xe){return z.getMany({trans:xe,keys:K,cache:"clone"}).then(function(Se){var Le=[],Ke=[];k.forEach(function(ht,Dt){var qe=ht.key,Je=ht.changes,ct=Se[Dt];if(ct){for(var pt=0,dt=Object.keys(Je);pt<dt.length;pt++){var mt=dt[pt],$=Je[mt];if(mt===L.schema.primKey.keyPath){if(rr($,qe)!==0)throw new Ie.Constraint("Cannot update primary key in bulkUpdate()")}else M(ct,mt,$)}ye.push(Dt),Le.push(qe),Ke.push(ct)}});var He=Le.length;return z.mutate({trans:xe,type:"put",keys:Le,values:Ke,updates:{keys:K,changeSpecs:oe}}).then(function(ht){var Dt=ht.numFailures,qe=ht.failures;if(Dt===0)return He;for(var Je=0,ct=Object.keys(qe);Je<ct.length;Je++){var pt=ct[Je],dt=ye[Number(pt)];if(dt!=null){var mt=qe[pt];delete qe[pt],qe[dt]=mt}}throw new Me("".concat(L.name,".bulkUpdate(): ").concat(Dt," of ").concat(He," operations failed"),qe)})})})},A.prototype.bulkDelete=function(k){var L=this,z=k.length;return this._trans("readwrite",function(K){return L.core.mutate({trans:K,type:"delete",keys:k})}).then(function(K){var oe=K.numFailures,ye=K.lastResult,xe=K.failures;if(oe===0)return ye;throw new Me("".concat(L.name,".bulkDelete(): ").concat(oe," of ").concat(z," operations failed"),xe)})},A}();function Wd(A){var k={},L=function(xe,Se){if(Se){for(var Le=arguments.length,Ke=new Array(Le-1);--Le;)Ke[Le-1]=arguments[Le];return k[xe].subscribe.apply(null,Ke),A}else if(typeof xe=="string")return k[xe]};L.addEventType=oe;for(var z=1,K=arguments.length;z<K;++z)oe(arguments[z]);return L;function oe(xe,Se,Le){if(typeof xe=="object")return ye(xe);Se||(Se=wr),Le||(Le=Be);var Ke={subscribers:[],fire:Le,subscribe:function(He){Ke.subscribers.indexOf(He)===-1&&(Ke.subscribers.push(He),Ke.fire=Se(Ke.fire,He))},unsubscribe:function(He){Ke.subscribers=Ke.subscribers.filter(function(ht){return ht!==He}),Ke.fire=Ke.subscribers.reduce(Se,Le)}};return k[xe]=L[xe]=Ke,Ke}function ye(xe){s(xe).forEach(function(Se){var Le=xe[Se];if(l(Le))oe(Se,xe[Se][0],xe[Se][1]);else if(Le==="asap")var Ke=oe(Se,gt,function(){for(var ht=arguments.length,Dt=new Array(ht);ht--;)Dt[ht]=arguments[ht];Ke.subscribers.forEach(function(qe){O(function(){qe.apply(null,Dt)})})});else throw new Ie.InvalidArgument("Invalid event config")})}}function zd(A,k){return b(k).from({prototype:A}),k}function r0(A){return zd(yy.prototype,function(L,z,K){this.db=A,this._tx=K,this.name=L,this.schema=z,this.hook=A._allTables[L]?A._allTables[L].hook:Wd(null,{creating:[yt,Be],reading:[Bt,gt],updating:[nr,Be],deleting:[hn,Be]})})}function Ds(A,k){return!(A.filter||A.algorithm||A.or)&&(k?A.justLimit:!A.replayFilter)}function dm(A,k){A.filter=bu(A.filter,k)}function fm(A,k,L){var z=A.replayFilter;A.replayFilter=z?function(){return bu(z(),k())}:k,A.justLimit=L&&!z}function i0(A,k){A.isMatch=bu(A.isMatch,k)}function Uh(A,k){if(A.isPrimKey)return k.primaryKey;var L=k.getIndexByKeyPath(A.index);if(!L)throw new Ie.Schema("KeyPath "+A.index+" on object store "+k.name+" is not indexed");return L}function by(A,k,L){var z=Uh(A,k.schema);return k.openCursor({trans:L,values:!A.keysOnly,reverse:A.dir==="prev",unique:!!A.unique,query:{index:z,range:A.range}})}function An(A,k,L,z){var K=A.replayFilter?bu(A.filter,A.replayFilter()):A.filter;if(A.or){var oe={},ye=function(xe,Se,Le){if(!K||K(Se,Le,function(ht){return Se.stop(ht)},function(ht){return Se.fail(ht)})){var Ke=Se.primaryKey,He=""+Ke;He==="[object ArrayBuffer]"&&(He=""+new Uint8Array(Ke)),p(oe,He)||(oe[He]=!0,k(xe,Se,Le))}};return Promise.all([A.or._iterate(ye,L),kn(by(A,z,L),A.algorithm,ye,!A.keysOnly&&A.valueMapper)])}else return kn(by(A,z,L),bu(A.algorithm,K),k,!A.keysOnly&&A.valueMapper)}function kn(A,k,L,z){var K=z?function(ye,xe,Se){return L(z(ye),xe,Se)}:L,oe=ti(K);return A.then(function(ye){if(ye)return ye.start(function(){var xe=function(){return ye.continue()};(!k||k(ye,function(Se){return xe=Se},function(Se){ye.stop(Se),xe=Be},function(Se){ye.fail(Se),xe=Be}))&&oe(ye.value,ye,function(Se){return xe=Se}),xe()})})}var a0=Symbol(),jd=function(){function A(k){Object.assign(this,k)}return A.prototype.execute=function(k){var L;if(this.add!==void 0){var z=this.add;if(l(z))return a(a([],l(k)?k:[],!0),z).sort();if(typeof z=="number")return(Number(k)||0)+z;if(typeof z=="bigint")try{return BigInt(k)+z}catch{return BigInt(0)+z}throw new TypeError("Invalid term ".concat(z))}if(this.remove!==void 0){var K=this.remove;if(l(K))return l(k)?k.filter(function(ye){return!K.includes(ye)}).sort():[];if(typeof K=="number")return Number(k)-K;if(typeof K=="bigint")try{return BigInt(k)-K}catch{return BigInt(0)-K}throw new TypeError("Invalid subtrahend ".concat(K))}var oe=(L=this.replacePrefix)===null||L===void 0?void 0:L[0];return oe&&typeof k=="string"&&k.startsWith(oe)?this.replacePrefix[1]+k.substring(oe.length):k},A}(),o0=function(){function A(){}return A.prototype._read=function(k,L){var z=this._ctx;return z.error?z.table._trans(null,bi.bind(null,z.error)):z.table._trans("readonly",k).then(L)},A.prototype._write=function(k){var L=this._ctx;return L.error?L.table._trans(null,bi.bind(null,L.error)):L.table._trans("readwrite",k,"locked")},A.prototype._addAlgorithm=function(k){var L=this._ctx;L.algorithm=bu(L.algorithm,k)},A.prototype._iterate=function(k,L){return An(this._ctx,k,L,this._ctx.table.core)},A.prototype.clone=function(k){var L=Object.create(this.constructor.prototype),z=Object.create(this._ctx);return k&&c(z,k),L._ctx=z,L},A.prototype.raw=function(){return this._ctx.valueMapper=null,this},A.prototype.each=function(k){var L=this._ctx;return this._read(function(z){return An(L,k,z,L.table.core)})},A.prototype.count=function(k){var L=this;return this._read(function(z){var K=L._ctx,oe=K.table.core;if(Ds(K,!0))return oe.count({trans:z,query:{index:Uh(K,oe.schema),range:K.range}}).then(function(xe){return Math.min(xe,K.limit)});var ye=0;return An(K,function(){return++ye,!1},z,oe).then(function(){return ye})}).then(k)},A.prototype.sortBy=function(k,L){var z=k.split(".").reverse(),K=z[0],oe=z.length-1;function ye(Le,Ke){return Ke?ye(Le[z[Ke]],Ke-1):Le[K]}var xe=this._ctx.dir==="next"?1:-1;function Se(Le,Ke){var He=ye(Le,oe),ht=ye(Ke,oe);return rr(He,ht)*xe}return this.toArray(function(Le){return Le.sort(Se)}).then(L)},A.prototype.toArray=function(k){var L=this;return this._read(function(z){var K=L._ctx;if(K.dir==="next"&&Ds(K,!0)&&K.limit>0){var oe=K.valueMapper,ye=Uh(K,K.table.core.schema);return K.table.core.query({trans:z,limit:K.limit,values:!0,query:{index:ye,range:K.range}}).then(function(Se){var Le=Se.result;return oe?Le.map(oe):Le})}else{var xe=[];return An(K,function(Se){return xe.push(Se)},z,K.table.core).then(function(){return xe})}},k)},A.prototype.offset=function(k){var L=this._ctx;return k<=0?this:(L.offset+=k,Ds(L)?fm(L,function(){var z=k;return function(K,oe){return z===0?!0:z===1?(--z,!1):(oe(function(){K.advance(z),z=0}),!1)}}):fm(L,function(){var z=k;return function(){return--z<0}}),this)},A.prototype.limit=function(k){return this._ctx.limit=Math.min(this._ctx.limit,k),fm(this._ctx,function(){var L=k;return function(z,K,oe){return--L<=0&&K(oe),L>=0}},!0),this},A.prototype.until=function(k,L){return dm(this._ctx,function(z,K,oe){return k(z.value)?(K(oe),L):!0}),this},A.prototype.first=function(k){return this.limit(1).toArray(function(L){return L[0]}).then(k)},A.prototype.last=function(k){return this.reverse().first(k)},A.prototype.filter=function(k){return dm(this._ctx,function(L){return k(L.value)}),i0(this._ctx,k),this},A.prototype.and=function(k){return this.filter(k)},A.prototype.or=function(k){return new this.db.WhereClause(this._ctx.table,k,this)},A.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},A.prototype.desc=function(){return this.reverse()},A.prototype.eachKey=function(k){var L=this._ctx;return L.keysOnly=!L.isMatch,this.each(function(z,K){k(K.key,K)})},A.prototype.eachUniqueKey=function(k){return this._ctx.unique="unique",this.eachKey(k)},A.prototype.eachPrimaryKey=function(k){var L=this._ctx;return L.keysOnly=!L.isMatch,this.each(function(z,K){k(K.primaryKey,K)})},A.prototype.keys=function(k){var L=this._ctx;L.keysOnly=!L.isMatch;var z=[];return this.each(function(K,oe){z.push(oe.key)}).then(function(){return z}).then(k)},A.prototype.primaryKeys=function(k){var L=this._ctx;if(L.dir==="next"&&Ds(L,!0)&&L.limit>0)return this._read(function(K){var oe=Uh(L,L.table.core.schema);return L.table.core.query({trans:K,values:!1,limit:L.limit,query:{index:oe,range:L.range}})}).then(function(K){var oe=K.result;return oe}).then(k);L.keysOnly=!L.isMatch;var z=[];return this.each(function(K,oe){z.push(oe.primaryKey)}).then(function(){return z}).then(k)},A.prototype.uniqueKeys=function(k){return this._ctx.unique="unique",this.keys(k)},A.prototype.firstKey=function(k){return this.limit(1).keys(function(L){return L[0]}).then(k)},A.prototype.lastKey=function(k){return this.reverse().firstKey(k)},A.prototype.distinct=function(){var k=this._ctx,L=k.index&&k.table.schema.idxByName[k.index];if(!L||!L.multi)return this;var z={};return dm(this._ctx,function(K){var oe=K.primaryKey.toString(),ye=p(z,oe);return z[oe]=!0,!ye}),this},A.prototype.modify=function(k){var L=this,z=this._ctx;return this._write(function(K){var oe;if(typeof k=="function")oe=k;else{var ye=s(k),xe=ye.length;oe=function(dt){for(var mt=!1,$=0;$<xe;++$){var ut=ye[$],$t=k[ut],Ct=P(dt,ut);$t instanceof jd?(M(dt,ut,$t.execute(Ct)),mt=!0):Ct!==$t&&(M(dt,ut,$t),mt=!0)}return mt}}var Se=z.table.core,Le=Se.schema.primaryKey,Ke=Le.outbound,He=Le.extractKey,ht=200,Dt=L.db._options.modifyChunkSize;Dt&&(typeof Dt=="object"?ht=Dt[Se.name]||Dt["*"]||200:ht=Dt);var qe=[],Je=0,ct=[],pt=function(dt,mt){var $=mt.failures,ut=mt.numFailures;Je+=dt-ut;for(var $t=0,Ct=s($);$t<Ct.length;$t++){var nt=Ct[$t];qe.push($[nt])}};return L.clone().primaryKeys().then(function(dt){var mt=Ds(z)&&z.limit===1/0&&(typeof k!="function"||k===hm)&&{index:z.index,range:z.range},$=function(ut){var $t=Math.min(ht,dt.length-ut);return Se.getMany({trans:K,keys:dt.slice(ut,ut+$t),cache:"immutable"}).then(function(Ct){for(var nt=[],_n=[],Gn=Ke?[]:null,nn=[],wn=0;wn<$t;++wn){var Dn=Ct[wn],lr={value:_e(Dn),primKey:dt[ut+wn]};oe.call(lr,lr.value,lr)!==!1&&(lr.value==null?nn.push(dt[ut+wn]):!Ke&&rr(He(Dn),He(lr.value))!==0?(nn.push(dt[ut+wn]),nt.push(lr.value)):(_n.push(lr.value),Ke&&Gn.push(dt[ut+wn])))}return Promise.resolve(nt.length>0&&Se.mutate({trans:K,type:"add",values:nt}).then(function(vn){for(var mi in vn.failures)nn.splice(parseInt(mi),1);pt(nt.length,vn)})).then(function(){return(_n.length>0||mt&&typeof k=="object")&&Se.mutate({trans:K,type:"put",keys:Gn,values:_n,criteria:mt,changeSpec:typeof k!="function"&&k,isAdditionalChunk:ut>0}).then(function(vn){return pt(_n.length,vn)})}).then(function(){return(nn.length>0||mt&&k===hm)&&Se.mutate({trans:K,type:"delete",keys:nn,criteria:mt,isAdditionalChunk:ut>0}).then(function(vn){return pt(nn.length,vn)})}).then(function(){return dt.length>ut+$t&&$(ut+ht)})})};return $(0).then(function(){if(qe.length>0)throw new Ne("Error modifying one or more objects",qe,Je,ct);return dt.length})})})},A.prototype.delete=function(){var k=this._ctx,L=k.range;return Ds(k)&&(k.isPrimKey||L.type===3)?this._write(function(z){var K=k.table.core.schema.primaryKey,oe=L;return k.table.core.count({trans:z,query:{index:K,range:oe}}).then(function(ye){return k.table.core.mutate({trans:z,type:"deleteRange",range:oe}).then(function(xe){var Se=xe.failures;xe.lastResult,xe.results;var Le=xe.numFailures;if(Le)throw new Ne("Could not delete some values",Object.keys(Se).map(function(Ke){return Se[Ke]}),ye-Le);return ye-Le})})}):this.modify(hm)},A}(),hm=function(A,k){return k.value=null};function s0(A){return zd(o0.prototype,function(L,z){this.db=A;var K=Fh,oe=null;if(z)try{K=z()}catch(Le){oe=Le}var ye=L._ctx,xe=ye.table,Se=xe.hook.reading.fire;this._ctx={table:xe,index:ye.index,isPrimKey:!ye.index||xe.schema.primKey.keyPath&&ye.index===xe.schema.primKey.name,range:K,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:oe,or:ye.or,valueMapper:Se!==gt?Se:null}})}function l0(A,k){return A<k?-1:A===k?0:1}function pm(A,k){return A>k?-1:A===k?0:1}function yo(A,k,L){var z=A instanceof zh?new A.Collection(A):A;return z._ctx.error=L?new L(k):new TypeError(k),z}function Xn(A){return new A.Collection(A,function(){return Wh("")}).limit(0)}function Hd(A){return A==="next"?function(k){return k.toUpperCase()}:function(k){return k.toLowerCase()}}function bo(A){return A==="next"?function(k){return k.toLowerCase()}:function(k){return k.toUpperCase()}}function mm(A,k,L,z,K,oe){for(var ye=Math.min(A.length,z.length),xe=-1,Se=0;Se<ye;++Se){var Le=k[Se];if(Le!==z[Se])return K(A[Se],L[Se])<0?A.substr(0,Se)+L[Se]+L.substr(Se+1):K(A[Se],z[Se])<0?A.substr(0,Se)+z[Se]+L.substr(Se+1):xe>=0?A.substr(0,xe)+k[xe]+L.substr(xe+1):null;K(A[Se],Le)<0&&(xe=Se)}return ye<z.length&&oe==="next"?A+L.substr(A.length):ye<A.length&&oe==="prev"?A.substr(0,L.length):xe<0?null:A.substr(0,xe)+z[xe]+L.substr(xe+1)}function Ml(A,k,L,z){var K,oe,ye,xe,Se,Le,Ke,He=L.length;if(!L.every(function(Je){return typeof Je=="string"}))return yo(A,Vc);function ht(Je){K=Hd(Je),oe=bo(Je),ye=Je==="next"?l0:pm;var ct=L.map(function(pt){return{lower:oe(pt),upper:K(pt)}}).sort(function(pt,dt){return ye(pt.lower,dt.lower)});xe=ct.map(function(pt){return pt.upper}),Se=ct.map(function(pt){return pt.lower}),Le=Je,Ke=Je==="next"?"":z}ht("next");var Dt=new A.Collection(A,function(){return xr(xe[0],Se[He-1]+z)});Dt._ondirectionchange=function(Je){ht(Je)};var qe=0;return Dt._addAlgorithm(function(Je,ct,pt){var dt=Je.key;if(typeof dt!="string")return!1;var mt=oe(dt);if(k(mt,Se,qe))return!0;for(var $=null,ut=qe;ut<He;++ut){var $t=mm(dt,mt,xe[ut],Se[ut],ye,Le);$t===null&&$===null?qe=ut+1:($===null||ye($,$t)>0)&&($=$t)}return ct($!==null?function(){Je.continue($+Ke)}:pt),!1}),Dt}function xr(A,k,L,z){return{type:2,lower:A,upper:k,lowerOpen:L,upperOpen:z}}function Wh(A){return{type:1,lower:A,upper:A}}var zh=function(){function A(){}return Object.defineProperty(A.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),A.prototype.between=function(k,L,z,K){z=z!==!1,K=K===!0;try{return this._cmp(k,L)>0||this._cmp(k,L)===0&&(z||K)&&!(z&&K)?Xn(this):new this.Collection(this,function(){return xr(k,L,!z,!K)})}catch{return yo(this,os)}},A.prototype.equals=function(k){return k==null?yo(this,os):new this.Collection(this,function(){return Wh(k)})},A.prototype.above=function(k){return k==null?yo(this,os):new this.Collection(this,function(){return xr(k,void 0,!0)})},A.prototype.aboveOrEqual=function(k){return k==null?yo(this,os):new this.Collection(this,function(){return xr(k,void 0,!1)})},A.prototype.below=function(k){return k==null?yo(this,os):new this.Collection(this,function(){return xr(void 0,k,!1,!0)})},A.prototype.belowOrEqual=function(k){return k==null?yo(this,os):new this.Collection(this,function(){return xr(void 0,k)})},A.prototype.startsWith=function(k){return typeof k!="string"?yo(this,Vc):this.between(k,k+as,!0,!0)},A.prototype.startsWithIgnoreCase=function(k){return k===""?this.startsWith(k):Ml(this,function(L,z){return L.indexOf(z[0])===0},[k],as)},A.prototype.equalsIgnoreCase=function(k){return Ml(this,function(L,z){return L===z[0]},[k],"")},A.prototype.anyOfIgnoreCase=function(){var k=G.apply(de,arguments);return k.length===0?Xn(this):Ml(this,function(L,z){return z.indexOf(L)!==-1},k,"")},A.prototype.startsWithAnyOfIgnoreCase=function(){var k=G.apply(de,arguments);return k.length===0?Xn(this):Ml(this,function(L,z){return z.some(function(K){return L.indexOf(K)===0})},k,as)},A.prototype.anyOf=function(){var k=this,L=G.apply(de,arguments),z=this._cmp;try{L.sort(z)}catch{return yo(this,os)}if(L.length===0)return Xn(this);var K=new this.Collection(this,function(){return xr(L[0],L[L.length-1])});K._ondirectionchange=function(ye){z=ye==="next"?k._ascending:k._descending,L.sort(z)};var oe=0;return K._addAlgorithm(function(ye,xe,Se){for(var Le=ye.key;z(Le,L[oe])>0;)if(++oe,oe===L.length)return xe(Se),!1;return z(Le,L[oe])===0?!0:(xe(function(){ye.continue(L[oe])}),!1)}),K},A.prototype.notEqual=function(k){return this.inAnyRange([[cm,k],[k,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},A.prototype.noneOf=function(){var k=G.apply(de,arguments);if(k.length===0)return new this.Collection(this);try{k.sort(this._ascending)}catch{return yo(this,os)}var L=k.reduce(function(z,K){return z?z.concat([[z[z.length-1][1],K]]):[[cm,K]]},null);return L.push([k[k.length-1],this.db._maxKey]),this.inAnyRange(L,{includeLowers:!1,includeUppers:!1})},A.prototype.inAnyRange=function(k,L){var z=this,K=this._cmp,oe=this._ascending,ye=this._descending,xe=this._min,Se=this._max;if(k.length===0)return Xn(this);if(!k.every(function(ut){return ut[0]!==void 0&&ut[1]!==void 0&&oe(ut[0],ut[1])<=0}))return yo(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Ie.InvalidArgument);var Le=!L||L.includeLowers!==!1,Ke=L&&L.includeUppers===!0;function He(ut,$t){for(var Ct=0,nt=ut.length;Ct<nt;++Ct){var _n=ut[Ct];if(K($t[0],_n[1])<0&&K($t[1],_n[0])>0){_n[0]=xe(_n[0],$t[0]),_n[1]=Se(_n[1],$t[1]);break}}return Ct===nt&&ut.push($t),ut}var ht=oe;function Dt(ut,$t){return ht(ut[0],$t[0])}var qe;try{qe=k.reduce(He,[]),qe.sort(Dt)}catch{return yo(this,os)}var Je=0,ct=Ke?function(ut){return oe(ut,qe[Je][1])>0}:function(ut){return oe(ut,qe[Je][1])>=0},pt=Le?function(ut){return ye(ut,qe[Je][0])>0}:function(ut){return ye(ut,qe[Je][0])>=0};function dt(ut){return!ct(ut)&&!pt(ut)}var mt=ct,$=new this.Collection(this,function(){return xr(qe[0][0],qe[qe.length-1][1],!Le,!Ke)});return $._ondirectionchange=function(ut){ut==="next"?(mt=ct,ht=oe):(mt=pt,ht=ye),qe.sort(Dt)},$._addAlgorithm(function(ut,$t,Ct){for(var nt=ut.key;mt(nt);)if(++Je,Je===qe.length)return $t(Ct),!1;return dt(nt)?!0:(z._cmp(nt,qe[Je][1])===0||z._cmp(nt,qe[Je][0])===0||$t(function(){ht===oe?ut.continue(qe[Je][0]):ut.continue(qe[Je][1])}),!1)}),$},A.prototype.startsWithAnyOf=function(){var k=G.apply(de,arguments);return k.every(function(L){return typeof L=="string"})?k.length===0?Xn(this):this.inAnyRange(k.map(function(L){return[L,L+as]})):yo(this,"startsWithAnyOf() only works with strings")},A}();function gm(A){return zd(zh.prototype,function(L,z,K){if(this.db=A,this._ctx={table:L,index:z===":id"?null:z,or:K},this._cmp=this._ascending=rr,this._descending=function(oe,ye){return rr(ye,oe)},this._max=function(oe,ye){return rr(oe,ye)>0?oe:ye},this._min=function(oe,ye){return rr(oe,ye)<0?oe:ye},this._IDBKeyRange=A._deps.IDBKeyRange,!this._IDBKeyRange)throw new Ie.MissingAPI})}function $o(A){return ti(function(k){return _u(k),A(k.target.error),!1})}function _u(A){A.stopPropagation&&A.stopPropagation(),A.preventDefault&&A.preventDefault()}var wu="storagemutated",Rr="x-storagemutated-1",Rl=Wd(null,wu),ai=function(){function A(){}return A.prototype._lock=function(){return D(!pn.global),++this._reculock,this._reculock===1&&!pn.global&&(pn.lockOwnerFor=this),this},A.prototype._unlock=function(){if(D(!pn.global),--this._reculock===0)for(pn.global||(pn.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var k=this._blockedFuncs.shift();try{Qs(k[1],k[0])}catch{}}return this},A.prototype._locked=function(){return this._reculock&&pn.lockOwnerFor!==this},A.prototype.create=function(k){var L=this;if(!this.mode)return this;var z=this.db.idbdb,K=this.db._state.dbOpenError;if(D(!this.idbtrans),!k&&!z)switch(K&&K.name){case"DatabaseClosedError":throw new Ie.DatabaseClosed(K);case"MissingAPIError":throw new Ie.MissingAPI(K.message,K);default:throw new Ie.OpenFailed(K)}if(!this.active)throw new Ie.TransactionInactive;return D(this._completion._state===null),k=this.idbtrans=k||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):z.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})),k.onerror=ti(function(oe){_u(oe),L._reject(k.error)}),k.onabort=ti(function(oe){_u(oe),L.active&&L._reject(new Ie.Abort(k.error)),L.active=!1,L.on("abort").fire(oe)}),k.oncomplete=ti(function(){L.active=!1,L._resolve(),"mutatedParts"in k&&Rl.storagemutated.fire(k.mutatedParts)}),this},A.prototype._promise=function(k,L,z){var K=this;if(k==="readwrite"&&this.mode!=="readwrite")return bi(new Ie.ReadOnly("Transaction is readonly"));if(!this.active)return bi(new Ie.TransactionInactive);if(this._locked())return new Zt(function(ye,xe){K._blockedFuncs.push([function(){K._promise(k,L,z).then(ye,xe)},pn])});if(z)return Ol(function(){var ye=new Zt(function(xe,Se){K._lock();var Le=L(xe,Se,K);Le&&Le.then&&Le.then(xe,Se)});return ye.finally(function(){return K._unlock()}),ye._lib=!0,ye});var oe=new Zt(function(ye,xe){var Se=L(ye,xe,K);Se&&Se.then&&Se.then(ye,xe)});return oe._lib=!0,oe},A.prototype._root=function(){return this.parent?this.parent._root():this},A.prototype.waitFor=function(k){var L=this._root(),z=Zt.resolve(k);if(L._waitingFor)L._waitingFor=L._waitingFor.then(function(){return z});else{L._waitingFor=z,L._waitingQueue=[];var K=L.idbtrans.objectStore(L.storeNames[0]);(function ye(){for(++L._spinCount;L._waitingQueue.length;)L._waitingQueue.shift()();L._waitingFor&&(K.get(-1/0).onsuccess=ye)})()}var oe=L._waitingFor;return new Zt(function(ye,xe){z.then(function(Se){return L._waitingQueue.push(ti(ye.bind(null,Se)))},function(Se){return L._waitingQueue.push(ti(xe.bind(null,Se)))}).finally(function(){L._waitingFor===oe&&(L._waitingFor=null)})})},A.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Ie.Abort))},A.prototype.table=function(k){var L=this._memoizedTables||(this._memoizedTables={});if(p(L,k))return L[k];var z=this.schema[k];if(!z)throw new Ie.NotFound("Table "+k+" not part of transaction");var K=new this.db.Table(k,z,this);return K.core=this.db.core.table(k),L[k]=K,K},A}();function u0(A){return zd(ai.prototype,function(L,z,K,oe,ye){var xe=this;this.db=A,this.mode=L,this.storeNames=z,this.schema=K,this.chromeTransactionDurability=oe,this.idbtrans=null,this.on=Wd(this,"complete","error","abort"),this.parent=ye||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 Zt(function(Se,Le){xe._resolve=Se,xe._reject=Le}),this._completion.then(function(){xe.active=!1,xe.on.complete.fire()},function(Se){var Le=xe.active;return xe.active=!1,xe.on.error.fire(Se),xe.parent?xe.parent._reject(Se):Le&&xe.idbtrans&&xe.idbtrans.abort(),bi(Se)})})}function Yd(A,k,L,z,K,oe,ye){return{name:A,keyPath:k,unique:L,multi:z,auto:K,compound:oe,src:(L&&!ye?"&":"")+(z?"*":"")+(K?"++":"")+ka(k)}}function ka(A){return typeof A=="string"?A:A?"["+[].join.call(A,"+")+"]":""}function Xs(A,k,L){return{name:A,primKey:k,indexes:L,mappedClass:null,idxByName:V(L,function(z){return[z.name,z]})}}function qd(A){return A.length===1?A[0]:A}var Tn=function(A){try{return A.only([[]]),Tn=function(){return[[]]},[[]]}catch{return Tn=function(){return as},as}};function fa(A){return A==null?function(){}:typeof A=="string"?Kd(A):function(k){return P(k,A)}}function Kd(A){var k=A.split(".");return k.length===1?function(L){return L[A]}:function(L){return P(L,A)}}function _y(A){return[].slice.call(A)}var Gd=0;function Zd(A){return A==null?":id":typeof A=="string"?A:"[".concat(A.join("+"),"]")}function c0(A,k,L){function z(He,ht){var Dt=_y(He.objectStoreNames);return{schema:{name:He.name,tables:Dt.map(function(qe){return ht.objectStore(qe)}).map(function(qe){var Je=qe.keyPath,ct=qe.autoIncrement,pt=l(Je),dt=Je==null,mt={},$={name:qe.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:dt,compound:pt,keyPath:Je,autoIncrement:ct,unique:!0,extractKey:fa(Je)},indexes:_y(qe.indexNames).map(function(ut){return qe.index(ut)}).map(function(ut){var $t=ut.name,Ct=ut.unique,nt=ut.multiEntry,_n=ut.keyPath,Gn=l(_n),nn={name:$t,compound:Gn,keyPath:_n,unique:Ct,multiEntry:nt,extractKey:fa(_n)};return mt[Zd(_n)]=nn,nn}),getIndexByKeyPath:function(ut){return mt[Zd(ut)]}};return mt[":id"]=$.primaryKey,Je!=null&&(mt[Zd(Je)]=$.primaryKey),$})},hasGetAll:Dt.length>0&&"getAll"in ht.objectStore(Dt[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}function K(He){if(He.type===3)return null;if(He.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var ht=He.lower,Dt=He.upper,qe=He.lowerOpen,Je=He.upperOpen,ct=ht===void 0?Dt===void 0?null:k.upperBound(Dt,!!Je):Dt===void 0?k.lowerBound(ht,!!qe):k.bound(ht,Dt,!!qe,!!Je);return ct}function oe(He){var ht=He.name;function Dt(ct){var pt=ct.trans,dt=ct.type,mt=ct.keys,$=ct.values,ut=ct.range;return new Promise(function($t,Ct){$t=ti($t);var nt=pt.objectStore(ht),_n=nt.keyPath==null,Gn=dt==="put"||dt==="add";if(!Gn&&dt!=="delete"&&dt!=="deleteRange")throw new Error("Invalid operation type: "+dt);var nn=(mt||$||{length:1}).length;if(mt&&$&&mt.length!==$.length)throw new Error("Given keys array must have same length as given values array.");if(nn===0)return $t({numFailures:0,failures:{},results:[],lastResult:void 0});var wn,Dn=[],lr=[],vn=0,mi=function(Cs){++vn,_u(Cs)};if(dt==="deleteRange"){if(ut.type===4)return $t({numFailures:vn,failures:lr,results:[],lastResult:void 0});ut.type===3?Dn.push(wn=nt.clear()):Dn.push(wn=nt.delete(K(ut)))}else{var Ta=Gn?_n?[$,mt]:[$,null]:[mt,null],jr=Ta[0],no=Ta[1];if(Gn)for(var Fo=0;Fo<nn;++Fo)Dn.push(wn=no&&no[Fo]!==void 0?nt[dt](jr[Fo],no[Fo]):nt[dt](jr[Fo])),wn.onerror=mi;else for(var Fo=0;Fo<nn;++Fo)Dn.push(wn=nt[dt](jr[Fo])),wn.onerror=mi}var Fl=function(Cs){var sf=Cs.target.result;Dn.forEach(function($r,Kh){return $r.error!=null&&(lr[Kh]=$r.error)}),$t({numFailures:vn,failures:lr,results:dt==="delete"?mt:Dn.map(function($r){return $r.result}),lastResult:sf})};wn.onerror=function(Cs){mi(Cs),Fl(Cs)},wn.onsuccess=Fl})}function qe(ct){var pt=ct.trans,dt=ct.values,mt=ct.query,$=ct.reverse,ut=ct.unique;return new Promise(function($t,Ct){$t=ti($t);var nt=mt.index,_n=mt.range,Gn=pt.objectStore(ht),nn=nt.isPrimaryKey?Gn:Gn.index(nt.name),wn=$?ut?"prevunique":"prev":ut?"nextunique":"next",Dn=dt||!("openKeyCursor"in nn)?nn.openCursor(K(_n),wn):nn.openKeyCursor(K(_n),wn);Dn.onerror=$o(Ct),Dn.onsuccess=ti(function(lr){var vn=Dn.result;if(!vn){$t(null);return}vn.___id=++Gd,vn.done=!1;var mi=vn.continue.bind(vn),Ta=vn.continuePrimaryKey;Ta&&(Ta=Ta.bind(vn));var jr=vn.advance.bind(vn),no=function(){throw new Error("Cursor not started")},Fo=function(){throw new Error("Cursor not stopped")};vn.trans=pt,vn.stop=vn.continue=vn.continuePrimaryKey=vn.advance=no,vn.fail=ti(Ct),vn.next=function(){var Fl=this,Cs=1;return this.start(function(){return Cs--?Fl.continue():Fl.stop()}).then(function(){return Fl})},vn.start=function(Fl){var Cs=new Promise(function($r,Kh){$r=ti($r),Dn.onerror=$o(Kh),vn.fail=Kh,vn.stop=function(A0){vn.stop=vn.continue=vn.continuePrimaryKey=vn.advance=Fo,$r(A0)}}),sf=function(){if(Dn.result)try{Fl()}catch($r){vn.fail($r)}else vn.done=!0,vn.start=function(){throw new Error("Cursor behind last entry")},vn.stop()};return Dn.onsuccess=ti(function($r){Dn.onsuccess=sf,sf()}),vn.continue=mi,vn.continuePrimaryKey=Ta,vn.advance=jr,sf(),Cs},$t(vn)},Ct)})}function Je(ct){return function(pt){return new Promise(function(dt,mt){dt=ti(dt);var $=pt.trans,ut=pt.values,$t=pt.limit,Ct=pt.query,nt=$t===1/0?void 0:$t,_n=Ct.index,Gn=Ct.range,nn=$.objectStore(ht),wn=_n.isPrimaryKey?nn:nn.index(_n.name),Dn=K(Gn);if($t===0)return dt({result:[]});if(ct){var lr=ut?wn.getAll(Dn,nt):wn.getAllKeys(Dn,nt);lr.onsuccess=function(jr){return dt({result:jr.target.result})},lr.onerror=$o(mt)}else{var vn=0,mi=ut||!("openKeyCursor"in wn)?wn.openCursor(Dn):wn.openKeyCursor(Dn),Ta=[];mi.onsuccess=function(jr){var no=mi.result;if(!no)return dt({result:Ta});if(Ta.push(ut?no.value:no.primaryKey),++vn===$t)return dt({result:Ta});no.continue()},mi.onerror=$o(mt)}})}}return{name:ht,schema:He,mutate:Dt,getMany:function(ct){var pt=ct.trans,dt=ct.keys;return new Promise(function(mt,$){mt=ti(mt);for(var ut=pt.objectStore(ht),$t=dt.length,Ct=new Array($t),nt=0,_n=0,Gn,nn=function(vn){var mi=vn.target;(Ct[mi._pos]=mi.result)!=null,++_n===nt&&mt(Ct)},wn=$o($),Dn=0;Dn<$t;++Dn){var lr=dt[Dn];lr!=null&&(Gn=ut.get(dt[Dn]),Gn._pos=Dn,Gn.onsuccess=nn,Gn.onerror=wn,++nt)}nt===0&&mt(Ct)})},get:function(ct){var pt=ct.trans,dt=ct.key;return new Promise(function(mt,$){mt=ti(mt);var ut=pt.objectStore(ht),$t=ut.get(dt);$t.onsuccess=function(Ct){return mt(Ct.target.result)},$t.onerror=$o($)})},query:Je(Se),openCursor:qe,count:function(ct){var pt=ct.query,dt=ct.trans,mt=pt.index,$=pt.range;return new Promise(function(ut,$t){var Ct=dt.objectStore(ht),nt=mt.isPrimaryKey?Ct:Ct.index(mt.name),_n=K($),Gn=_n?nt.count(_n):nt.count();Gn.onsuccess=ti(function(nn){return ut(nn.target.result)}),Gn.onerror=$o($t)})}}}var ye=z(A,L),xe=ye.schema,Se=ye.hasGetAll,Le=xe.tables.map(function(He){return oe(He)}),Ke={};return Le.forEach(function(He){return Ke[He.name]=He}),{stack:"dbcore",transaction:A.transaction.bind(A),table:function(He){var ht=Ke[He];if(!ht)throw new Error("Table '".concat(He,"' not found"));return Ke[He]},MIN_KEY:-1/0,MAX_KEY:Tn(k),schema:xe}}function d0(A,k){return k.reduce(function(L,z){var K=z.create;return i(i({},L),K(L))},A)}function vm(A,k,L,z){var K=L.IDBKeyRange;L.indexedDB;var oe=d0(c0(k,K,z),A.dbcore);return{dbcore:oe}}function Os(A,k){var L=k.db,z=vm(A._middlewares,L,A._deps,k);A.core=z.dbcore,A.tables.forEach(function(K){var oe=K.name;A.core.schema.tables.some(function(ye){return ye.name===oe})&&(K.core=A.core.table(oe),A[oe]instanceof A.Table&&(A[oe].core=K.core))})}function Ja(A,k,L,z){L.forEach(function(K){var oe=z[K];k.forEach(function(ye){var xe=S(ye,K);(!xe||"value"in xe&&xe.value===void 0)&&(ye===A.Transaction.prototype||ye instanceof A.Transaction?v(ye,K,{get:function(){return this.table(K)},set:function(Se){y(this,K,{value:Se,writable:!0,configurable:!0,enumerable:!0})}}):ye[K]=new A.Table(K,oe))})})}function ym(A,k){k.forEach(function(L){for(var z in L)L[z]instanceof A.Table&&delete L[z]})}function bm(A,k){return A._cfg.version-k._cfg.version}function _m(A,k,L,z){var K=A._dbSchema;L.objectStoreNames.contains("$meta")&&!K.$meta&&(K.$meta=Xs("$meta",jh("")[0],[]),A._storeNames.push("$meta"));var oe=A._createTransaction("readwrite",A._storeNames,K);oe.create(L),oe._completion.catch(z);var ye=oe._reject.bind(oe),xe=pn.transless||pn;Ol(function(){if(pn.trans=oe,pn.transless=xe,k===0)s(K).forEach(function(Se){xu(L,Se,K[Se].primKey,K[Se].indexes)}),Os(A,L),Zt.follow(function(){return A.on.populate.fire(oe)}).catch(ye);else return Os(A,L),Xd(A,oe,k).then(function(Se){return wm(A,Se,oe,L)}).catch(ye)})}function Qd(A,k){Uc(A._dbSchema,k),k.db.version%10===0&&!k.objectStoreNames.contains("$meta")&&k.db.createObjectStore("$meta").add(Math.ceil(k.db.version/10-1),"version");var L=Cr(A,A.idbdb,k);zc(A,A._dbSchema,k);for(var z=xm(L,A._dbSchema),K=function(Le){if(Le.change.length||Le.recreate)return console.warn("Unable to patch indexes of table ".concat(Le.name," because it has changes on the type of index or primary key.")),{value:void 0};var Ke=k.objectStore(Le.name);Le.add.forEach(function(He){sr&&console.debug("Dexie upgrade patch: Creating missing index ".concat(Le.name,".").concat(He.src)),Wc(Ke,He)})},oe=0,ye=z.change;oe<ye.length;oe++){var xe=ye[oe],Se=K(xe);if(typeof Se=="object")return Se.value}}function Xd(A,k,L){return k.storeNames.includes("$meta")?k.table("$meta").get("version").then(function(z){return z??L}):Zt.resolve(L)}function wm(A,k,L,z){var K=[],oe=A._versions,ye=A._dbSchema=Cr(A,A.idbdb,z),xe=oe.filter(function(Le){return Le._cfg.version>=k});if(xe.length===0)return Zt.resolve();xe.forEach(function(Le){K.push(function(){var Ke=ye,He=Le._cfg.dbschema;zc(A,Ke,z),zc(A,He,z),ye=A._dbSchema=He;var ht=xm(Ke,He);ht.add.forEach(function(dt){xu(z,dt[0],dt[1].primKey,dt[1].indexes)}),ht.change.forEach(function(dt){if(dt.recreate)throw new Ie.Upgrade("Not yet support for changing primary key");var mt=z.objectStore(dt.name);dt.add.forEach(function($){return Wc(mt,$)}),dt.change.forEach(function($){mt.deleteIndex($.name),Wc(mt,$)}),dt.del.forEach(function($){return mt.deleteIndex($)})});var Dt=Le._cfg.contentUpgrade;if(Dt&&Le._cfg.version>k){Os(A,z),L._memoizedTables={};var qe=F(He);ht.del.forEach(function(dt){qe[dt]=Ke[dt]}),ym(A,[A.Transaction.prototype]),Ja(A,[A.Transaction.prototype],s(qe),qe),L.schema=qe;var Je=ge(Dt);Je&&Nc();var ct,pt=Zt.follow(function(){if(ct=Dt(L),ct&&Je){var dt=Cl.bind(null,null);ct.then(dt,dt)}});return ct&&typeof ct.then=="function"?Zt.resolve(ct):pt.then(function(){return ct})}}),K.push(function(Ke){var He=Le._cfg.dbschema;f0(He,Ke),ym(A,[A.Transaction.prototype]),Ja(A,[A.Transaction.prototype],A._storeNames,A._dbSchema),L.schema=A._dbSchema}),K.push(function(Ke){A.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(A.idbdb.version/10)===Le._cfg.version?(A.idbdb.deleteObjectStore("$meta"),delete A._dbSchema.$meta,A._storeNames=A._storeNames.filter(function(He){return He!=="$meta"})):Ke.objectStore("$meta").put(Le._cfg.version,"version"))})});function Se(){return K.length?Zt.resolve(K.shift()(L.idbtrans)).then(Se):Zt.resolve()}return Se().then(function(){Uc(ye,z)})}function xm(A,k){var L={del:[],add:[],change:[]},z;for(z in A)k[z]||L.del.push(z);for(z in k){var K=A[z],oe=k[z];if(!K)L.add.push([z,oe]);else{var ye={name:z,def:oe,recreate:!1,del:[],add:[],change:[]};if(""+(K.primKey.keyPath||"")!=""+(oe.primKey.keyPath||"")||K.primKey.auto!==oe.primKey.auto)ye.recreate=!0,L.change.push(ye);else{var xe=K.idxByName,Se=oe.idxByName,Le=void 0;for(Le in xe)Se[Le]||ye.del.push(Le);for(Le in Se){var Ke=xe[Le],He=Se[Le];Ke?Ke.src!==He.src&&ye.change.push(He):ye.add.push(He)}(ye.del.length>0||ye.add.length>0||ye.change.length>0)&&L.change.push(ye)}}}return L}function xu(A,k,L,z){var K=A.db.createObjectStore(k,L.keyPath?{keyPath:L.keyPath,autoIncrement:L.auto}:{autoIncrement:L.auto});return z.forEach(function(oe){return Wc(K,oe)}),K}function Uc(A,k){s(A).forEach(function(L){k.db.objectStoreNames.contains(L)||(sr&&console.debug("Dexie: Creating missing table",L),xu(k,L,A[L].primKey,A[L].indexes))})}function f0(A,k){[].slice.call(k.db.objectStoreNames).forEach(function(L){return A[L]==null&&k.db.deleteObjectStore(L)})}function Wc(A,k){A.createIndex(k.name,k.keyPath,{unique:k.unique,multiEntry:k.multi})}function Cr(A,k,L){var z={},K=_(k.objectStoreNames,0);return K.forEach(function(oe){for(var ye=L.objectStore(oe),xe=ye.keyPath,Se=Yd(ka(xe),xe||"",!0,!1,!!ye.autoIncrement,xe&&typeof xe!="string",!0),Le=[],Ke=0;Ke<ye.indexNames.length;++Ke){var He=ye.index(ye.indexNames[Ke]);xe=He.keyPath;var ht=Yd(He.name,xe,!!He.unique,!!He.multiEntry,!1,xe&&typeof xe!="string",!1);Le.push(ht)}z[oe]=Xs(oe,Se,Le)}),z}function Jd(A,k,L){A.verno=k.version/10;var z=A._dbSchema=Cr(A,k,L);A._storeNames=_(k.objectStoreNames,0),Ja(A,[A._allTables],s(z),z)}function Js(A,k){var L=Cr(A,A.idbdb,k),z=xm(L,A._dbSchema);return!(z.add.length||z.change.some(function(K){return K.add.length||K.change.length}))}function zc(A,k,L){for(var z=L.db.objectStoreNames,K=0;K<z.length;++K){var oe=z[K],ye=L.objectStore(oe);A._hasGetAll="getAll"in ye;for(var xe=0;xe<ye.indexNames.length;++xe){var Se=ye.indexNames[xe],Le=ye.index(Se).keyPath,Ke=typeof Le=="string"?Le:"["+_(Le).join("+")+"]";if(k[oe]){var He=k[oe].idxByName[Ke];He&&(He.name=Se,delete k[oe].idxByName[Ke],k[oe].idxByName[Se]=He)}}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&o.WorkerGlobalScope&&o instanceof o.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(A._hasGetAll=!1)}function jh(A){return A.split(",").map(function(k,L){k=k.trim();var z=k.replace(/([&*]|\+\+)/g,""),K=/^\[/.test(z)?z.match(/^\[(.*)\]$/)[1].split("+"):z;return Yd(z,K||null,/\&/.test(k),/\*/.test(k),/\+\+/.test(k),l(K),L===0)})}var h0=function(){function A(){}return A.prototype._parseStoresSpec=function(k,L){s(k).forEach(function(z){if(k[z]!==null){var K=jh(k[z]),oe=K.shift();if(oe.unique=!0,oe.multi)throw new Ie.Schema("Primary key cannot be multi-valued");K.forEach(function(ye){if(ye.auto)throw new Ie.Schema("Only primary key can be marked as autoIncrement (++)");if(!ye.keyPath)throw new Ie.Schema("Index must have a name and cannot be an empty string")}),L[z]=Xs(z,oe,K)}})},A.prototype.stores=function(k){var L=this.db;this._cfg.storesSource=this._cfg.storesSource?c(this._cfg.storesSource,k):k;var z=L._versions,K={},oe={};return z.forEach(function(ye){c(K,ye._cfg.storesSource),oe=ye._cfg.dbschema={},ye._parseStoresSpec(K,oe)}),L._dbSchema=oe,ym(L,[L._allTables,L,L.Transaction.prototype]),Ja(L,[L._allTables,L,L.Transaction.prototype,this._cfg.tables],s(oe),oe),L._storeNames=s(oe),this},A.prototype.upgrade=function(k){return this._cfg.contentUpgrade=Dr(this._cfg.contentUpgrade||Be,k),this},A}();function p0(A){return zd(h0.prototype,function(L){this.db=A,this._cfg={version:L,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}function Sm(A,k){var L=A._dbNamesDB;return L||(L=A._dbNamesDB=new _i(Xa,{addons:[],indexedDB:A,IDBKeyRange:k}),L.version(1).stores({dbnames:"name"})),L.table("dbnames")}function Am(A){return A&&typeof A.databases=="function"}function m0(A){var k=A.indexedDB,L=A.IDBKeyRange;return Am(k)?Promise.resolve(k.databases()).then(function(z){return z.map(function(K){return K.name}).filter(function(K){return K!==Xa})}):Sm(k,L).toCollection().primaryKeys()}function ss(A,k){var L=A.indexedDB,z=A.IDBKeyRange;!Am(L)&&k!==Xa&&Sm(L,z).put({name:k}).catch(Be)}function g0(A,k){var L=A.indexedDB,z=A.IDBKeyRange;!Am(L)&&k!==Xa&&Sm(L,z).delete(k).catch(Be)}function km(A){return Ol(function(){return pn.letThrough=!0,A()})}function ef(){var A=!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent);if(!A||!indexedDB.databases)return Promise.resolve();var k;return new Promise(function(L){var z=function(){return indexedDB.databases().finally(L)};k=setInterval(z,100),z()}).finally(function(){return clearInterval(k)})}var tf;function ha(A){return!("from"in A)}var hi=function(A,k){if(this)c(this,arguments.length?{d:1,from:A,to:arguments.length>1?k:A}:{d:0});else{var L=new hi;return A&&"d"in A&&c(L,A),L}};g(hi.prototype,(tf={add:function(A){return rf(this,A),this},addKey:function(A){return nf(this,A,A),this},addKeys:function(A){var k=this;return A.forEach(function(L){return nf(k,L,L)}),this},hasKey:function(A){var k=eo(this).next(A).value;return k&&rr(k.from,A)<=0&&rr(k.to,A)>=0}},tf[me]=function(){return eo(this)},tf));function nf(A,k,L){var z=rr(k,L);if(!isNaN(z)){if(z>0)throw RangeError();if(ha(A))return c(A,{from:k,to:L,d:1});var K=A.l,oe=A.r;if(rr(L,A.from)<0)return K?nf(K,k,L):A.l={from:k,to:L,d:1,l:null,r:null},pi(A);if(rr(k,A.to)>0)return oe?nf(oe,k,L):A.r={from:k,to:L,d:1,l:null,r:null},pi(A);rr(k,A.from)<0&&(A.from=k,A.l=null,A.d=oe?oe.d+1:1),rr(L,A.to)>0&&(A.to=L,A.r=null,A.d=A.l?A.l.d+1:1);var ye=!A.r;K&&!A.l&&rf(A,K),oe&&ye&&rf(A,oe)}}function rf(A,k){function L(z,K){var oe=K.from,ye=K.to,xe=K.l,Se=K.r;nf(z,oe,ye),xe&&L(z,xe),Se&&L(z,Se)}ha(k)||L(A,k)}function wy(A,k){var L=eo(k),z=L.next();if(z.done)return!1;for(var K=z.value,oe=eo(A),ye=oe.next(K.from),xe=ye.value;!z.done&&!ye.done;){if(rr(xe.from,K.to)<=0&&rr(xe.to,K.from)>=0)return!0;rr(K.from,xe.from)<0?K=(z=L.next(xe.from)).value:xe=(ye=oe.next(K.from)).value}return!1}function eo(A){var k=ha(A)?null:{s:0,n:A};return{next:function(L){for(var z=arguments.length>0;k;)switch(k.s){case 0:if(k.s=1,z)for(;k.n.l&&rr(L,k.n.from)<0;)k={up:k,n:k.n.l,s:1};else for(;k.n.l;)k={up:k,n:k.n.l,s:1};case 1:if(k.s=2,!z||rr(L,k.n.to)<=0)return{value:k.n,done:!1};case 2:if(k.n.r){k.s=3,k={up:k,n:k.n.r,s:0};continue}case 3:k=k.up}return{done:!0}}}}function pi(A){var k,L,z=(((k=A.r)===null||k===void 0?void 0:k.d)||0)-(((L=A.l)===null||L===void 0?void 0:L.d)||0),K=z>1?"r":z<-1?"l":"";if(K){var oe=K==="r"?"l":"r",ye=i({},A),xe=A[K];A.from=xe.from,A.to=xe.to,A[K]=xe[K],ye[K]=xe[oe],A[oe]=ye,ye.d=Hh(ye)}A.d=Hh(A)}function Hh(A){var k=A.r,L=A.l;return(k?L?Math.max(k.d,L.d):k.d:L?L.d:0)+1}function Yh(A,k){return s(k).forEach(function(L){A[L]?rf(A[L],k[L]):A[L]=U(k[L])}),A}function Em(A,k){return A.all||k.all||Object.keys(A).some(function(L){return k[L]&&wy(k[L],A[L])})}var Su={},Tm={},Dm=!1;function to(A,k){Yh(Tm,A),Dm||(Dm=!0,setTimeout(function(){Dm=!1;var L=Tm;Tm={},ue(L,!1)},0))}function ue(A,k){k===void 0&&(k=!1);var L=new Set;if(A.all)for(var z=0,K=Object.values(Su);z<K.length;z++){var oe=K[z];De(oe,A,L,k)}else for(var ye in A){var xe=/^idb\:\/\/(.*)\/(.*)\//.exec(ye);if(xe){var Se=xe[1],Le=xe[2],oe=Su["idb://".concat(Se,"/").concat(Le)];oe&&De(oe,A,L,k)}}L.forEach(function(Ke){return Ke()})}function De(A,k,L,z){for(var K=[],oe=0,ye=Object.entries(A.queries.query);oe<ye.length;oe++){for(var xe=ye[oe],Se=xe[0],Le=xe[1],Ke=[],He=0,ht=Le;He<ht.length;He++){var Dt=ht[He];Em(k,Dt.obsSet)?Dt.subscribers.forEach(function(pt){return L.add(pt)}):z&&Ke.push(Dt)}z&&K.push([Se,Ke])}if(z)for(var qe=0,Je=K;qe<Je.length;qe++){var ct=Je[qe],Se=ct[0],Ke=ct[1];A.queries.query[Se]=Ke}}function we(A){var k=A._state,L=A._deps.indexedDB;if(k.isBeingOpened||A.idbdb)return k.dbReadyPromise.then(function(){return k.dbOpenError?bi(k.dbOpenError):A});k.isBeingOpened=!0,k.dbOpenError=null,k.openComplete=!1;var z=k.openCanceller,K=Math.round(A.verno*10),oe=!1;function ye(){if(k.openCanceller!==z)throw new Ie.DatabaseClosed("db.open() was cancelled")}var xe=k.dbReadyResolve,Se=null,Le=!1,Ke=function(){return new Zt(function(He,ht){if(ye(),!L)throw new Ie.MissingAPI;var Dt=A.name,qe=k.autoSchema||!K?L.open(Dt):L.open(Dt,K);if(!qe)throw new Ie.MissingAPI;qe.onerror=$o(ht),qe.onblocked=ti(A._fireOnBlocked),qe.onupgradeneeded=ti(function(Je){if(Se=qe.transaction,k.autoSchema&&!A._options.allowEmptyDB){qe.onerror=_u,Se.abort(),qe.result.close();var ct=L.deleteDatabase(Dt);ct.onsuccess=ct.onerror=ti(function(){ht(new Ie.NoSuchDatabase("Database ".concat(Dt," doesnt exist")))})}else{Se.onerror=$o(ht);var pt=Je.oldVersion>Math.pow(2,62)?0:Je.oldVersion;Le=pt<1,A.idbdb=qe.result,oe&&Qd(A,Se),_m(A,pt/10,Se,ht)}},ht),qe.onsuccess=ti(function(){Se=null;var Je=A.idbdb=qe.result,ct=_(Je.objectStoreNames);if(ct.length>0)try{var pt=Je.transaction(qd(ct),"readonly");if(k.autoSchema)Jd(A,Je,pt);else if(zc(A,A._dbSchema,pt),!Js(A,pt)&&!oe)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."),Je.close(),K=Je.version+1,oe=!0,He(Ke());Os(A,pt)}catch{}Ts.push(A),Je.onversionchange=ti(function(dt){k.vcFired=!0,A.on("versionchange").fire(dt)}),Je.onclose=ti(function(dt){A.on("close").fire(dt)}),Le&&ss(A._deps,Dt),He()},ht)}).catch(function(He){switch(He==null?void 0:He.name){case"UnknownError":if(k.PR1398_maxLoop>0)return k.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),Ke();break;case"VersionError":if(K>0)return K=0,Ke();break}return Zt.reject(He)})};return Zt.race([z,(typeof navigator>"u"?Zt.resolve():ef()).then(Ke)]).then(function(){return ye(),k.onReadyBeingFired=[],Zt.resolve(km(function(){return A.on.ready.fire(A.vip)})).then(function He(){if(k.onReadyBeingFired.length>0){var ht=k.onReadyBeingFired.reduce(Dr,Be);return k.onReadyBeingFired=[],Zt.resolve(km(function(){return ht(A.vip)})).then(He)}})}).finally(function(){k.openCanceller===z&&(k.onReadyBeingFired=null,k.isBeingOpened=!1)}).catch(function(He){k.dbOpenError=He;try{Se&&Se.abort()}catch{}return z===k.openCanceller&&A._close(),bi(He)}).finally(function(){k.openComplete=!0,xe()}).then(function(){if(Le){var He={};A.tables.forEach(function(ht){ht.schema.indexes.forEach(function(Dt){Dt.name&&(He["idb://".concat(A.name,"/").concat(ht.name,"/").concat(Dt.name)]=new hi(-1/0,[[[]]]))}),He["idb://".concat(A.name,"/").concat(ht.name,"/")]=He["idb://".concat(A.name,"/").concat(ht.name,"/:dels")]=new hi(-1/0,[[[]]])}),Rl(wu).fire(He),ue(He,!0)}return A})}function lt(A){var k=function(ye){return A.next(ye)},L=function(ye){return A.throw(ye)},z=oe(k),K=oe(L);function oe(ye){return function(xe){var Se=ye(xe),Le=Se.value;return Se.done?Le:!Le||typeof Le.then!="function"?l(Le)?Promise.all(Le).then(z,K):z(Le):Le.then(z,K)}}return oe(k)()}function Lt(A,k,L){var z=arguments.length;if(z<2)throw new Ie.InvalidArgument("Too few arguments");for(var K=new Array(z-1);--z;)K[z-1]=arguments[z];L=K.pop();var oe=H(K);return[A,oe,L]}function ln(A,k,L,z,K){return Zt.resolve().then(function(){var oe=pn.transless||pn,ye=A._createTransaction(k,L,A._dbSchema,z);ye.explicit=!0;var xe={trans:ye,transless:oe};if(z)ye.idbtrans=z.idbtrans;else try{ye.create(),ye.idbtrans._explicit=!0,A._state.PR1398_maxLoop=3}catch(He){return He.name===Ve.InvalidState&&A.isOpen()&&--A._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),A.close({disableAutoOpen:!1}),A.open().then(function(){return ln(A,k,L,null,K)})):bi(He)}var Se=ge(K);Se&&Nc();var Le,Ke=Zt.follow(function(){if(Le=K.call(ye,ye),Le)if(Se){var He=Cl.bind(null,null);Le.then(He,He)}else typeof Le.next=="function"&&typeof Le.throw=="function"&&(Le=lt(Le))},xe);return(Le&&typeof Le.then=="function"?Zt.resolve(Le).then(function(He){return ye.active?He:bi(new Ie.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):Ke.then(function(){return Le})).then(function(He){return z&&ye._resolve(),ye._completion.then(function(){return He})}).catch(function(He){return ye._reject(He),bi(He)})})}function Kn(A,k,L){for(var z=l(A)?A.slice():[A],K=0;K<L;++K)z.push(k);return z}function bn(A){return i(i({},A),{table:function(k){var L=A.table(k),z=L.schema,K={},oe=[];function ye(Je,ct,pt){var dt=Zd(Je),mt=K[dt]=K[dt]||[],$=Je==null?0:typeof Je=="string"?1:Je.length,ut=ct>0,$t=i(i({},pt),{name:ut?"".concat(dt,"(virtual-from:").concat(pt.name,")"):pt.name,lowLevelIndex:pt,isVirtual:ut,keyTail:ct,keyLength:$,extractKey:fa(Je),unique:!ut&&pt.unique});if(mt.push($t),$t.isPrimaryKey||oe.push($t),$>1){var Ct=$===2?Je[0]:Je.slice(0,$-1);ye(Ct,ct+1,pt)}return mt.sort(function(nt,_n){return nt.keyTail-_n.keyTail}),$t}var xe=ye(z.primaryKey.keyPath,0,z.primaryKey);K[":id"]=[xe];for(var Se=0,Le=z.indexes;Se<Le.length;Se++){var Ke=Le[Se];ye(Ke.keyPath,0,Ke)}function He(Je){var ct=K[Zd(Je)];return ct&&ct[0]}function ht(Je,ct){return{type:Je.type===1?2:Je.type,lower:Kn(Je.lower,Je.lowerOpen?A.MAX_KEY:A.MIN_KEY,ct),lowerOpen:!0,upper:Kn(Je.upper,Je.upperOpen?A.MIN_KEY:A.MAX_KEY,ct),upperOpen:!0}}function Dt(Je){var ct=Je.query.index;return ct.isVirtual?i(i({},Je),{query:{index:ct.lowLevelIndex,range:ht(Je.query.range,ct.keyTail)}}):Je}var qe=i(i({},L),{schema:i(i({},z),{primaryKey:xe,indexes:oe,getIndexByKeyPath:He}),count:function(Je){return L.count(Dt(Je))},query:function(Je){return L.query(Dt(Je))},openCursor:function(Je){var ct=Je.query.index,pt=ct.keyTail,dt=ct.isVirtual,mt=ct.keyLength;if(!dt)return L.openCursor(Je);function $(ut){function $t(nt){nt!=null?ut.continue(Kn(nt,Je.reverse?A.MAX_KEY:A.MIN_KEY,pt)):Je.unique?ut.continue(ut.key.slice(0,mt).concat(Je.reverse?A.MIN_KEY:A.MAX_KEY,pt)):ut.continue()}var Ct=Object.create(ut,{continue:{value:$t},continuePrimaryKey:{value:function(nt,_n){ut.continuePrimaryKey(Kn(nt,A.MAX_KEY,pt),_n)}},primaryKey:{get:function(){return ut.primaryKey}},key:{get:function(){var nt=ut.key;return mt===1?nt[0]:nt.slice(0,mt)}},value:{get:function(){return ut.value}}});return Ct}return L.openCursor(Dt(Je)).then(function(ut){return ut&&$(ut)})}});return qe}})}var af={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:bn};function Om(A,k,L,z){return L=L||{},z=z||"",s(A).forEach(function(K){if(!p(k,K))L[z+K]=void 0;else{var oe=A[K],ye=k[K];if(typeof oe=="object"&&typeof ye=="object"&&oe&&ye){var xe=J(oe),Se=J(ye);xe!==Se?L[z+K]=k[K]:xe==="Object"?Om(oe,ye,L,z+K+"."):oe!==ye&&(L[z+K]=k[K])}else oe!==ye&&(L[z+K]=k[K])}}),s(k).forEach(function(K){p(A,K)||(L[z+K]=k[K])}),L}function qr(A,k){return k.type==="delete"?k.keys:k.keys||k.values.map(A.extractKey)}var Au={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(A){return i(i({},A),{table:function(k){var L=A.table(k),z=L.schema.primaryKey,K=i(i({},L),{mutate:function(oe){var ye=pn.trans,xe=ye.table(k).hook,Se=xe.deleting,Le=xe.creating,Ke=xe.updating;switch(oe.type){case"add":if(Le.fire===Be)break;return ye._promise("readwrite",function(){return He(oe)},!0);case"put":if(Le.fire===Be&&Ke.fire===Be)break;return ye._promise("readwrite",function(){return He(oe)},!0);case"delete":if(Se.fire===Be)break;return ye._promise("readwrite",function(){return He(oe)},!0);case"deleteRange":if(Se.fire===Be)break;return ye._promise("readwrite",function(){return ht(oe)},!0)}return L.mutate(oe);function He(qe){var Je=pn.trans,ct=qe.keys||qr(z,qe);if(!ct)throw new Error("Keys missing");return qe=qe.type==="add"||qe.type==="put"?i(i({},qe),{keys:ct}):i({},qe),qe.type!=="delete"&&(qe.values=a([],qe.values)),qe.keys&&(qe.keys=a([],qe.keys)),v0(L,qe,ct).then(function(pt){var dt=ct.map(function(mt,$){var ut=pt[$],$t={onerror:null,onsuccess:null};if(qe.type==="delete")Se.fire.call($t,mt,ut,Je);else if(qe.type==="add"||ut===void 0){var Ct=Le.fire.call($t,mt,qe.values[$],Je);mt==null&&Ct!=null&&(mt=Ct,qe.keys[$]=mt,z.outbound||M(qe.values[$],z.keyPath,mt))}else{var nt=Om(ut,qe.values[$]),_n=Ke.fire.call($t,nt,mt,ut,Je);if(_n){var Gn=qe.values[$];Object.keys(_n).forEach(function(nn){p(Gn,nn)?Gn[nn]=_n[nn]:M(Gn,nn,_n[nn])})}}return $t});return L.mutate(qe).then(function(mt){for(var $=mt.failures,ut=mt.results,$t=mt.numFailures,Ct=mt.lastResult,nt=0;nt<ct.length;++nt){var _n=ut?ut[nt]:ct[nt],Gn=dt[nt];_n==null?Gn.onerror&&Gn.onerror($[nt]):Gn.onsuccess&&Gn.onsuccess(qe.type==="put"&&pt[nt]?qe.values[nt]:_n)}return{failures:$,results:ut,numFailures:$t,lastResult:Ct}}).catch(function(mt){return dt.forEach(function($){return $.onerror&&$.onerror(mt)}),Promise.reject(mt)})})}function ht(qe){return Dt(qe.trans,qe.range,1e4)}function Dt(qe,Je,ct){return L.query({trans:qe,values:!1,query:{index:z,range:Je},limit:ct}).then(function(pt){var dt=pt.result;return He({type:"delete",keys:dt,trans:qe}).then(function(mt){return mt.numFailures>0?Promise.reject(mt.failures[0]):dt.length<ct?{failures:[],numFailures:0,lastResult:void 0}:Dt(qe,i(i({},Je),{lower:dt[dt.length-1],lowerOpen:!0}),ct)})})}}});return K}})}};function v0(A,k,L){return k.type==="add"?Promise.resolve([]):A.getMany({trans:k.trans,keys:L,cache:"immutable"})}function Po(A,k,L){try{if(!k||k.keys.length<A.length)return null;for(var z=[],K=0,oe=0;K<k.keys.length&&oe<A.length;++K)rr(k.keys[K],A[oe])===0&&(z.push(L?_e(k.values[K]):k.values[K]),++oe);return z.length===A.length?z:null}catch{return null}}var ku={stack:"dbcore",level:-1,create:function(A){return{table:function(k){var L=A.table(k);return i(i({},L),{getMany:function(z){if(!z.cache)return L.getMany(z);var K=Po(z.keys,z.trans._cache,z.cache==="clone");return K?Zt.resolve(K):L.getMany(z).then(function(oe){return z.trans._cache={keys:z.keys,values:z.cache==="clone"?_e(oe):oe},oe})},mutate:function(z){return z.type!=="add"&&(z.trans._cache=null),L.mutate(z)}})}}}};function $l(A,k){return A.trans.mode==="readonly"&&!!A.subscr&&!A.trans.explicit&&A.trans.db._options.cache!=="disabled"&&!k.schema.primaryKey.outbound}function mn(A,k){switch(A){case"query":return k.values&&!k.unique;case"get":return!1;case"getMany":return!1;case"count":return!1;case"openCursor":return!1}}var y0={stack:"dbcore",level:0,name:"Observability",create:function(A){var k=A.schema.name,L=new hi(A.MIN_KEY,A.MAX_KEY);return i(i({},A),{transaction:function(z,K,oe){if(pn.subscr&&K!=="readonly")throw new Ie.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(pn.querier));return A.transaction(z,K,oe)},table:function(z){var K=A.table(z),oe=K.schema,ye=oe.primaryKey,xe=oe.indexes,Se=ye.extractKey,Le=ye.outbound,Ke=ye.autoIncrement&&xe.filter(function(qe){return qe.compound&&qe.keyPath.includes(ye.keyPath)}),He=i(i({},K),{mutate:function(qe){var Je,ct,pt=qe.trans,dt=qe.mutatedParts||(qe.mutatedParts={}),mt=function(Dn){var lr="idb://".concat(k,"/").concat(z,"/").concat(Dn);return dt[lr]||(dt[lr]=new hi)},$=mt(""),ut=mt(":dels"),$t=qe.type,Ct=qe.type==="deleteRange"?[qe.range]:qe.type==="delete"?[qe.keys]:qe.values.length<50?[qr(ye,qe).filter(function(Dn){return Dn}),qe.values]:[],nt=Ct[0],_n=Ct[1],Gn=qe.trans._cache;if(l(nt)){$.addKeys(nt);var nn=$t==="delete"||nt.length===_n.length?Po(nt,Gn):null;nn||ut.addKeys(nt),(nn||_n)&&Cm(mt,oe,nn,_n)}else if(nt){var wn={from:(Je=nt.lower)!==null&&Je!==void 0?Je:A.MIN_KEY,to:(ct=nt.upper)!==null&&ct!==void 0?ct:A.MAX_KEY};ut.add(wn),$.add(wn)}else $.add(L),ut.add(L),oe.indexes.forEach(function(Dn){return mt(Dn.name).add(L)});return K.mutate(qe).then(function(Dn){return nt&&(qe.type==="add"||qe.type==="put")&&($.addKeys(Dn.results),Ke&&Ke.forEach(function(lr){for(var vn=qe.values.map(function(no){return lr.extractKey(no)}),mi=lr.keyPath.findIndex(function(no){return no===ye.keyPath}),Ta=0,jr=Dn.results.length;Ta<jr;++Ta)vn[Ta][mi]=Dn.results[Ta];mt(lr.name).addKeys(vn)})),pt.mutatedParts=Yh(pt.mutatedParts||{},dt),Dn})}}),ht=function(qe){var Je,ct,pt=qe.query,dt=pt.index,mt=pt.range;return[dt,new hi((Je=mt.lower)!==null&&Je!==void 0?Je:A.MIN_KEY,(ct=mt.upper)!==null&&ct!==void 0?ct:A.MAX_KEY)]},Dt={get:function(qe){return[ye,new hi(qe.key)]},getMany:function(qe){return[ye,new hi().addKeys(qe.keys)]},count:ht,query:ht,openCursor:ht};return s(Dt).forEach(function(qe){He[qe]=function(Je){var ct=pn.subscr,pt=!!ct,dt=$l(pn,K)&&mn(qe,Je),mt=dt?Je.obsSet={}:ct;if(pt){var $=function(nn){var wn="idb://".concat(k,"/").concat(z,"/").concat(nn);return mt[wn]||(mt[wn]=new hi)},ut=$(""),$t=$(":dels"),Ct=Dt[qe](Je),nt=Ct[0],_n=Ct[1];if(qe==="query"&&nt.isPrimaryKey&&!Je.values?$t.add(_n):$(nt.name||"").add(_n),!nt.isPrimaryKey)if(qe==="count")$t.add(L);else{var Gn=qe==="query"&&Le&&Je.values&&K.query(i(i({},Je),{values:!1}));return K[qe].apply(this,arguments).then(function(nn){if(qe==="query"){if(Le&&Je.values)return Gn.then(function(vn){var mi=vn.result;return ut.addKeys(mi),nn});var wn=Je.values?nn.result.map(Se):nn.result;Je.values?ut.addKeys(wn):$t.addKeys(wn)}else if(qe==="openCursor"){var Dn=nn,lr=Je.values;return Dn&&Object.create(Dn,{key:{get:function(){return $t.addKey(Dn.primaryKey),Dn.key}},primaryKey:{get:function(){var vn=Dn.primaryKey;return $t.addKey(vn),vn}},value:{get:function(){return lr&&ut.addKey(Dn.primaryKey),Dn.value}}})}return nn})}}return K[qe].apply(this,arguments)}}),He}})}};function Cm(A,k,L,z){function K(oe){var ye=A(oe.name||"");function xe(Le){return Le!=null?oe.extractKey(Le):null}var Se=function(Le){return oe.multiEntry&&l(Le)?Le.forEach(function(Ke){return ye.addKey(Ke)}):ye.addKey(Le)};(L||z).forEach(function(Le,Ke){var He=L&&xe(L[Ke]),ht=z&&xe(z[Ke]);rr(He,ht)!==0&&(He!=null&&Se(He),ht!=null&&Se(ht))})}k.indexes.forEach(K)}function Pl(A,k,L){if(L.numFailures===0)return k;if(k.type==="deleteRange")return null;var z=k.keys?k.keys.length:"values"in k&&k.values?k.values.length:1;if(L.numFailures===z)return null;var K=i({},k);return l(K.keys)&&(K.keys=K.keys.filter(function(oe,ye){return!(ye in L.failures)})),"values"in K&&l(K.values)&&(K.values=K.values.filter(function(oe,ye){return!(ye in L.failures)})),K}function b0(A,k){return k.lower===void 0?!0:k.lowerOpen?rr(A,k.lower)>0:rr(A,k.lower)>=0}function _0(A,k){return k.upper===void 0?!0:k.upperOpen?rr(A,k.upper)<0:rr(A,k.upper)<=0}function Im(A,k){return b0(A,k)&&_0(A,k)}function Ll(A,k,L,z,K,oe){if(!L||L.length===0)return A;var ye=k.query.index,xe=ye.multiEntry,Se=k.query.range,Le=z.schema.primaryKey,Ke=Le.extractKey,He=ye.extractKey,ht=(ye.lowLevelIndex||ye).extractKey,Dt=L.reduce(function(qe,Je){var ct=qe,pt=[];if(Je.type==="add"||Je.type==="put")for(var dt=new hi,mt=Je.values.length-1;mt>=0;--mt){var $=Je.values[mt],ut=Ke($);if(!dt.hasKey(ut)){var $t=He($);(xe&&l($t)?$t.some(function(nn){return Im(nn,Se)}):Im($t,Se))&&(dt.addKey(ut),pt.push($))}}switch(Je.type){case"add":{var Ct=new hi().addKeys(k.values?qe.map(function(nn){return Ke(nn)}):qe);ct=qe.concat(k.values?pt.filter(function(nn){var wn=Ke(nn);return Ct.hasKey(wn)?!1:(Ct.addKey(wn),!0)}):pt.map(function(nn){return Ke(nn)}).filter(function(nn){return Ct.hasKey(nn)?!1:(Ct.addKey(nn),!0)}));break}case"put":{var nt=new hi().addKeys(Je.values.map(function(nn){return Ke(nn)}));ct=qe.filter(function(nn){return!nt.hasKey(k.values?Ke(nn):nn)}).concat(k.values?pt:pt.map(function(nn){return Ke(nn)}));break}case"delete":var _n=new hi().addKeys(Je.keys);ct=qe.filter(function(nn){return!_n.hasKey(k.values?Ke(nn):nn)});break;case"deleteRange":var Gn=Je.range;ct=qe.filter(function(nn){return!Im(Ke(nn),Gn)});break}return ct},A);return Dt===A?A:(Dt.sort(function(qe,Je){return rr(ht(qe),ht(Je))||rr(Ke(qe),Ke(Je))}),k.limit&&k.limit<1/0&&(Dt.length>k.limit?Dt.length=k.limit:A.length===k.limit&&Dt.length<k.limit&&(K.dirty=!0)),oe?Object.freeze(Dt):Dt)}function Ea(A,k){return rr(A.lower,k.lower)===0&&rr(A.upper,k.upper)===0&&!!A.lowerOpen==!!k.lowerOpen&&!!A.upperOpen==!!k.upperOpen}function Eu(A,k,L,z){if(A===void 0)return k!==void 0?-1:0;if(k===void 0)return 1;var K=rr(A,k);if(K===0){if(L&&z)return 0;if(L)return 1;if(z)return-1}return K}function Mm(A,k,L,z){if(A===void 0)return k!==void 0?1:0;if(k===void 0)return-1;var K=rr(A,k);if(K===0){if(L&&z)return 0;if(L)return-1;if(z)return 1}return K}function Tu(A,k){return Eu(A.lower,k.lower,A.lowerOpen,k.lowerOpen)<=0&&Mm(A.upper,k.upper,A.upperOpen,k.upperOpen)>=0}function Rm(A,k,L,z){var K=Su["idb://".concat(A,"/").concat(k)];if(!K)return[];var oe=K.queries[L];if(!oe)return[null,!1,K,null];var ye=z.query?z.query.index.name:null,xe=oe[ye||""];if(!xe)return[null,!1,K,null];switch(L){case"query":var Se=xe.find(function(He){return He.req.limit===z.limit&&He.req.values===z.values&&Ea(He.req.query.range,z.query.range)});if(Se)return[Se,!0,K,xe];var Le=xe.find(function(He){var ht="limit"in He.req?He.req.limit:1/0;return ht>=z.limit&&(z.values?He.req.values:!0)&&Tu(He.req.query.range,z.query.range)});return[Le,!1,K,xe];case"count":var Ke=xe.find(function(He){return Ea(He.req.query.range,z.query.range)});return[Ke,!!Ke,K,xe]}}function $m(A,k,L,z){A.subscribers.add(L),z.addEventListener("abort",function(){A.subscribers.delete(L),A.subscribers.size===0&&Du(A,k)})}function Du(A,k){setTimeout(function(){A.subscribers.size===0&&Ce(k,A)},3e3)}var Pm={stack:"dbcore",level:0,name:"Cache",create:function(A){var k=A.schema.name,L=i(i({},A),{transaction:function(z,K,oe){var ye=A.transaction(z,K,oe);if(K==="readwrite"){var xe=new AbortController,Se=xe.signal,Le=function(Ke){return function(){if(xe.abort(),K==="readwrite"){for(var He=new Set,ht=0,Dt=z;ht<Dt.length;ht++){var qe=Dt[ht],Je=Su["idb://".concat(k,"/").concat(qe)];if(Je){var ct=A.table(qe),pt=Je.optimisticOps.filter(function(lr){return lr.trans===ye});if(ye._explicit&&Ke&&ye.mutatedParts)for(var dt=0,mt=Object.values(Je.queries.query);dt<mt.length;dt++)for(var $=mt[dt],ut=0,$t=$.slice();ut<$t.length;ut++){var Ct=$t[ut];Em(Ct.obsSet,ye.mutatedParts)&&(Ce($,Ct),Ct.subscribers.forEach(function(lr){return He.add(lr)}))}else if(pt.length>0){Je.optimisticOps=Je.optimisticOps.filter(function(lr){return lr.trans!==ye});for(var nt=0,_n=Object.values(Je.queries.query);nt<_n.length;nt++)for(var $=_n[nt],Gn=0,nn=$.slice();Gn<nn.length;Gn++){var Ct=nn[Gn];if(Ct.res!=null&&ye.mutatedParts)if(Ke&&!Ct.dirty){var wn=Object.isFrozen(Ct.res),Dn=Ll(Ct.res,Ct.req,pt,ct,Ct,wn);Ct.dirty?(Ce($,Ct),Ct.subscribers.forEach(function(mi){return He.add(mi)})):Dn!==Ct.res&&(Ct.res=Dn,Ct.promise=Zt.resolve({result:Dn}))}else Ct.dirty&&Ce($,Ct),Ct.subscribers.forEach(function(mi){return He.add(mi)})}}}}He.forEach(function(lr){return lr()})}}};ye.addEventListener("abort",Le(!1),{signal:Se}),ye.addEventListener("error",Le(!1),{signal:Se}),ye.addEventListener("complete",Le(!0),{signal:Se})}return ye},table:function(z){var K=A.table(z),oe=K.schema.primaryKey,ye=i(i({},K),{mutate:function(xe){var Se=pn.trans;if(oe.outbound||Se.db._options.cache==="disabled"||Se.explicit||Se.idbtrans.mode!=="readwrite")return K.mutate(xe);var Le=Su["idb://".concat(k,"/").concat(z)];if(!Le)return K.mutate(xe);var Ke=K.mutate(xe);return(xe.type==="add"||xe.type==="put")&&(xe.values.length>=50||qr(oe,xe).some(function(He){return He==null}))?Ke.then(function(He){var ht=i(i({},xe),{values:xe.values.map(function(qe,Je){var ct;if(He.failures[Je])return qe;var pt=!((ct=oe.keyPath)===null||ct===void 0)&&ct.includes(".")?_e(qe):i({},qe);return M(pt,oe.keyPath,He.results[Je]),pt})}),Dt=Pl(Le,ht,He);Le.optimisticOps.push(Dt),queueMicrotask(function(){return xe.mutatedParts&&to(xe.mutatedParts)})}):(Le.optimisticOps.push(xe),xe.mutatedParts&&to(xe.mutatedParts),Ke.then(function(He){if(He.numFailures>0){Ce(Le.optimisticOps,xe);var ht=Pl(Le,xe,He);ht&&Le.optimisticOps.push(ht),xe.mutatedParts&&to(xe.mutatedParts)}}),Ke.catch(function(){Ce(Le.optimisticOps,xe),xe.mutatedParts&&to(xe.mutatedParts)})),Ke},query:function(xe){var Se;if(!$l(pn,K)||!mn("query",xe))return K.query(xe);var Le=((Se=pn.trans)===null||Se===void 0?void 0:Se.db._options.cache)==="immutable",Ke=pn,He=Ke.requery,ht=Ke.signal,Dt=Rm(k,z,"query",xe),qe=Dt[0],Je=Dt[1],ct=Dt[2],pt=Dt[3];if(qe&&Je)qe.obsSet=xe.obsSet;else{var dt=K.query(xe).then(function(mt){var $=mt.result;if(qe&&(qe.res=$),Le){for(var ut=0,$t=$.length;ut<$t;++ut)Object.freeze($[ut]);Object.freeze($)}else mt.result=_e($);return mt}).catch(function(mt){return pt&&qe&&Ce(pt,qe),Promise.reject(mt)});qe={obsSet:xe.obsSet,promise:dt,subscribers:new Set,type:"query",req:xe,dirty:!1},pt?pt.push(qe):(pt=[qe],ct||(ct=Su["idb://".concat(k,"/").concat(z)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}}),ct.queries.query[xe.query.index.name||""]=pt)}return $m(qe,pt,He,ht),qe.promise.then(function(mt){return{result:Ll(mt.result,xe,ct==null?void 0:ct.optimisticOps,K,qe,Le)}})}});return ye}});return L}};function Lo(A,k){return new Proxy(A,{get:function(L,z,K){return z==="db"?k:Reflect.get(L,z,K)}})}var _i=function(){function A(k,L){var z=this;this._middlewares={},this.verno=0;var K=A.dependencies;this._options=L=i({addons:A.addons,autoOpen:!0,indexedDB:K.indexedDB,IDBKeyRange:K.IDBKeyRange,cache:"cloned"},L),this._deps={indexedDB:L.indexedDB,IDBKeyRange:L.IDBKeyRange};var oe=L.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var ye={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Be,dbReadyPromise:null,cancelOpen:Be,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:L.autoOpen};ye.dbReadyPromise=new Zt(function(Se){ye.dbReadyResolve=Se}),ye.openCanceller=new Zt(function(Se,Le){ye.cancelOpen=Le}),this._state=ye,this.name=k,this.on=Wd(this,"populate","blocked","versionchange","close",{ready:[Dr,Be]}),this.on.ready.subscribe=E(this.on.ready.subscribe,function(Se){return function(Le,Ke){A.vip(function(){var He=z._state;if(He.openComplete)He.dbOpenError||Zt.resolve().then(Le),Ke&&Se(Le);else if(He.onReadyBeingFired)He.onReadyBeingFired.push(Le),Ke&&Se(Le);else{Se(Le);var ht=z;Ke||Se(function Dt(){ht.on.ready.unsubscribe(Le),ht.on.ready.unsubscribe(Dt)})}})}}),this.Collection=s0(this),this.Table=r0(this),this.Transaction=u0(this),this.Version=p0(this),this.WhereClause=gm(this),this.on("versionchange",function(Se){Se.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(z.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(z.name,"'. Closing db now to resume the delete request.")),z.close({disableAutoOpen:!1})}),this.on("blocked",function(Se){!Se.newVersion||Se.newVersion<Se.oldVersion?console.warn("Dexie.delete('".concat(z.name,"') was blocked")):console.warn("Upgrade '".concat(z.name,"' blocked by other connection holding version ").concat(Se.oldVersion/10))}),this._maxKey=Tn(L.IDBKeyRange),this._createTransaction=function(Se,Le,Ke,He){return new z.Transaction(Se,Le,Ke,z._options.chromeTransactionDurability,He)},this._fireOnBlocked=function(Se){z.on("blocked").fire(Se),Ts.filter(function(Le){return Le.name===z.name&&Le!==z&&!Le._state.vcFired}).map(function(Le){return Le.on("versionchange").fire(Se)})},this.use(ku),this.use(Pm),this.use(y0),this.use(af),this.use(Au);var xe=new Proxy(this,{get:function(Se,Le,Ke){if(Le==="_vip")return!0;if(Le==="table")return function(ht){return Lo(z.table(ht),xe)};var He=Reflect.get(Se,Le,Ke);return He instanceof yy?Lo(He,xe):Le==="tables"?He.map(function(ht){return Lo(ht,xe)}):Le==="_createTransaction"?function(){var ht=He.apply(this,arguments);return Lo(ht,xe)}:He}});this.vip=xe,oe.forEach(function(Se){return Se(z)})}return A.prototype.version=function(k){if(isNaN(k)||k<.1)throw new Ie.Type("Given version is not a positive number");if(k=Math.round(k*10)/10,this.idbdb||this._state.isBeingOpened)throw new Ie.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,k);var L=this._versions,z=L.filter(function(K){return K._cfg.version===k})[0];return z||(z=new this.Version(k),L.push(z),L.sort(bm),z.stores({}),this._state.autoSchema=!1,z)},A.prototype._whenReady=function(k){var L=this;return this.idbdb&&(this._state.openComplete||pn.letThrough||this._vip)?k():new Zt(function(z,K){if(L._state.openComplete)return K(new Ie.DatabaseClosed(L._state.dbOpenError));if(!L._state.isBeingOpened){if(!L._state.autoOpen){K(new Ie.DatabaseClosed);return}L.open().catch(Be)}L._state.dbReadyPromise.then(z,K)}).then(k)},A.prototype.use=function(k){var L=k.stack,z=k.create,K=k.level,oe=k.name;oe&&this.unuse({stack:L,name:oe});var ye=this._middlewares[L]||(this._middlewares[L]=[]);return ye.push({stack:L,create:z,level:K??10,name:oe}),ye.sort(function(xe,Se){return xe.level-Se.level}),this},A.prototype.unuse=function(k){var L=k.stack,z=k.name,K=k.create;return L&&this._middlewares[L]&&(this._middlewares[L]=this._middlewares[L].filter(function(oe){return K?oe.create!==K:z?oe.name!==z:!1})),this},A.prototype.open=function(){var k=this;return Qs(Mo,function(){return we(k)})},A.prototype._close=function(){var k=this._state,L=Ts.indexOf(this);if(L>=0&&Ts.splice(L,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}k.isBeingOpened||(k.dbReadyPromise=new Zt(function(z){k.dbReadyResolve=z}),k.openCanceller=new Zt(function(z,K){k.cancelOpen=K}))},A.prototype.close=function(k){var L=k===void 0?{disableAutoOpen:!0}:k,z=L.disableAutoOpen,K=this._state;z?(K.isBeingOpened&&K.cancelOpen(new Ie.DatabaseClosed),this._close(),K.autoOpen=!1,K.dbOpenError=new Ie.DatabaseClosed):(this._close(),K.autoOpen=this._options.autoOpen||K.isBeingOpened,K.openComplete=!1,K.dbOpenError=null)},A.prototype.delete=function(k){var L=this;k===void 0&&(k={disableAutoOpen:!0});var z=arguments.length>0&&typeof arguments[0]!="object",K=this._state;return new Zt(function(oe,ye){var xe=function(){L.close(k);var Se=L._deps.indexedDB.deleteDatabase(L.name);Se.onsuccess=ti(function(){g0(L._deps,L.name),oe()}),Se.onerror=$o(ye),Se.onblocked=L._fireOnBlocked};if(z)throw new Ie.InvalidArgument("Invalid closeOptions argument to db.delete()");K.isBeingOpened?K.dbReadyPromise.then(xe):xe()})},A.prototype.backendDB=function(){return this.idbdb},A.prototype.isOpen=function(){return this.idbdb!==null},A.prototype.hasBeenClosed=function(){var k=this._state.dbOpenError;return k&&k.name==="DatabaseClosed"},A.prototype.hasFailed=function(){return this._state.dbOpenError!==null},A.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(A.prototype,"tables",{get:function(){var k=this;return s(this._allTables).map(function(L){return k._allTables[L]})},enumerable:!1,configurable:!0}),A.prototype.transaction=function(){var k=Lt.apply(this,arguments);return this._transaction.apply(this,k)},A.prototype._transaction=function(k,L,z){var K=this,oe=pn.trans;(!oe||oe.db!==this||k.indexOf("!")!==-1)&&(oe=null);var ye=k.indexOf("?")!==-1;k=k.replace("!","").replace("?","");var xe,Se;try{if(Se=L.map(function(Ke){var He=Ke instanceof K.Table?Ke.name:Ke;if(typeof He!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return He}),k=="r"||k===Bd)xe=Bd;else if(k=="rw"||k==Ud)xe=Ud;else throw new Ie.InvalidArgument("Invalid transaction mode: "+k);if(oe){if(oe.mode===Bd&&xe===Ud)if(ye)oe=null;else throw new Ie.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");oe&&Se.forEach(function(Ke){if(oe&&oe.storeNames.indexOf(Ke)===-1)if(ye)oe=null;else throw new Ie.SubTransaction("Table "+Ke+" not included in parent transaction.")}),ye&&oe&&!oe.active&&(oe=null)}}catch(Ke){return oe?oe._promise(null,function(He,ht){ht(Ke)}):bi(Ke)}var Le=ln.bind(null,this,xe,Se,oe,z);return oe?oe._promise(xe,Le,"lock"):pn.trans?Qs(pn.transless,function(){return K._whenReady(Le)}):this._whenReady(Le)},A.prototype.table=function(k){if(!p(this._allTables,k))throw new Ie.InvalidTable("Table ".concat(k," does not exist"));return this._allTables[k]},A}(),Ou=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",w0=function(){function A(k){this._subscribe=k}return A.prototype.subscribe=function(k,L,z){return this._subscribe(!k||typeof k=="function"?{next:k,error:L,complete:z}:k)},A.prototype[Ou]=function(){return this},A}(),qh;try{qh={indexedDB:o.indexedDB||o.mozIndexedDB||o.webkitIndexedDB||o.msIndexedDB,IDBKeyRange:o.IDBKeyRange||o.webkitIDBKeyRange}}catch{qh={indexedDB:null,IDBKeyRange:null}}function xy(A){var k=!1,L,z=new w0(function(K){var oe=ge(A);function ye(pt){var dt=Mc();try{oe&&Nc();var mt=Ol(A,pt);return oe&&(mt=mt.finally(Cl)),mt}finally{dt&&Rc()}}var xe=!1,Se,Le={},Ke={},He={get closed(){return xe},unsubscribe:function(){xe||(xe=!0,Se&&Se.abort(),ht&&Rl.storagemutated.unsubscribe(Je))}};K.start&&K.start(He);var ht=!1,Dt=function(){return Fd(ct)};function qe(){return Em(Ke,Le)}var Je=function(pt){Yh(Le,pt),qe()&&Dt()},ct=function(){if(!(xe||!qh.indexedDB)){Le={};var pt={};Se&&Se.abort(),Se=new AbortController;var dt={subscr:pt,signal:Se.signal,requery:Dt,querier:A,trans:null},mt=ye(dt);Promise.resolve(mt).then(function($){k=!0,L=$,!(xe||dt.signal.aborted)&&(Le={},Ke=pt,!ee(Ke)&&!ht&&(Rl(wu,Je),ht=!0),Fd(function(){return!xe&&K.next&&K.next($)}))},function($){k=!1,["DatabaseClosedError","AbortError"].includes($==null?void 0:$.name)||xe||Fd(function(){xe||K.error&&K.error($)})})}};return setTimeout(Dt,0),He});return z.hasValue=function(){return k},z.getValue=function(){return L},z}var _o=_i;g(_o,i(i({},Oe),{delete:function(A){var k=new _o(A,{addons:[]});return k.delete()},exists:function(A){return new _o(A,{addons:[]}).open().then(function(k){return k.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(A){try{return m0(_o.dependencies).then(A)}catch{return bi(new Ie.MissingAPI)}},defineClass:function(){function A(k){c(this,k)}return A},ignoreTransaction:function(A){return pn.trans?Qs(pn.transless,A):A()},vip:km,async:function(A){return function(){try{var k=lt(A.apply(this,arguments));return!k||typeof k.then!="function"?Zt.resolve(k):k}catch(L){return bi(L)}}},spawn:function(A,k,L){try{var z=lt(A.apply(L,k||[]));return!z||typeof z.then!="function"?Zt.resolve(z):z}catch(K){return bi(K)}},currentTransaction:{get:function(){return pn.trans||null}},waitFor:function(A,k){var L=Zt.resolve(typeof A=="function"?_o.ignoreTransaction(A):A).timeout(k||6e4);return pn.trans?pn.trans.waitFor(L):L},Promise:Zt,debug:{get:function(){return sr},set:function(A){se(A)}},derive:b,extend:c,props:g,override:E,Events:Wd,on:Rl,liveQuery:xy,extendObservabilitySet:Yh,getByKeyPath:P,setByKeyPath:M,delByKeyPath:C,shallowClone:F,deepClone:_e,getObjectDiff:Om,cmp:rr,asap:O,minKey:cm,addons:[],connections:Ts,errnames:Ve,dependencies:qh,cache:Su,semVer:Nh,version:Nh.split(".").map(function(A){return parseInt(A)}).reduce(function(A,k,L){return A+k/Math.pow(10,L*2)})})),_o.maxKey=Tn(_o.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Rl(wu,function(A){if(!No){var k;k=new CustomEvent(Rr,{detail:A}),No=!0,dispatchEvent(k),No=!1}}),addEventListener(Rr,function(A){var k=A.detail;No||el(k)}));function el(A){var k=No;try{No=!0,Rl.storagemutated.fire(A),ue(A,!0)}finally{No=k}}var No=!1,Nl,of=function(){};typeof BroadcastChannel<"u"&&(of=function(){Nl=new BroadcastChannel(Rr),Nl.onmessage=function(A){return A.data&&el(A.data)}},of(),typeof Nl.unref=="function"&&Nl.unref(),Rl(wu,function(A){No||Nl.postMessage(A)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(A){if(!_i.disableBfCache&&A.persisted){sr&&console.debug("Dexie: handling persisted pagehide"),Nl==null||Nl.close();for(var k=0,L=Ts;k<L.length;k++){var z=L[k];z.close({disableAutoOpen:!1})}}}),addEventListener("pageshow",function(A){!_i.disableBfCache&&A.persisted&&(sr&&console.debug("Dexie: handling persisted pageshow"),of(),el({all:new hi(-1/0,[[]])}))}));function x0(A){return new jd({add:A})}function S0(A){return new jd({remove:A})}function ir(A,k){return new jd({replacePrefix:[A,k]})}Zt.rejectionMapper=tt,se(sr);var br=Object.freeze({__proto__:null,Dexie:_i,liveQuery:xy,Entity:Vh,cmp:rr,PropModSymbol:a0,PropModification:jd,replacePrefix:ir,add:x0,remove:S0,default:_i,RangeSet:hi,mergeRanges:rf,rangesOverlap:wy});return i(_i,br,{default:_i}),_i})}(kT)),kT.exports}var XDe=QDe();const iB=h6(XDe),h9=Symbol.for("Dexie"),TS=globalThis[h9]||(globalThis[h9]=iB);if(iB.semVer!==TS.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${iB.semVer} and ${TS.semVer}`);const{liveQuery:Yft,mergeRanges:qft,rangesOverlap:Kft,RangeSet:Gft,cmp:Zft,Entity:Qft,PropModSymbol:Xft,PropModification:Jft,replacePrefix:eht,add:tht,remove:nht}=TS,JDe={loading:"Play",playing:"Pause",paused:"Play",ready:"Play",finished:"RotateRight",error:"ArrowRotate"},eOe={loading:"Loading",playing:"Pause",paused:"Play",ready:"Play",finished:"Replay",error:"Reload"},tOe=5,nOe=15e3,rOe=t=>{const e=lS(null),n=re(!1),r=Ht({currentTime:0,duration:0,isPlaying:!1,playingState:Da.loading,seekingTime:!1}),i=re(0);let a=null;const o=re(0),s=()=>{fn(()=>{var D;i.value++,r.playingState=Da.loading,r.currentTime=0,r.duration=0,(D=e.value)==null||D.load()})};Ge(t.resourceURL,()=>{s()},{immediate:!0}),Ge(()=>r.playingState,()=>{o.value++});const l=()=>{if(e.value){if(r.playingState===Da.error){s();return}switch(o.value++,n.value=!n.value,r.playingState){case Da.playing:e.value.pause(),r.playingState=Da.paused;break;case Da.paused:e.value.play(),r.playingState=Da.playing;break;case Da.ready:e.value.play(),r.playingState=Da.playing;break;case Da.finished:e.value.play(),r.playingState=Da.playing;break}}},c=Z(()=>JDe[r.playingState]),f=Z(()=>({label:"",type:"tertiary",size:"small"})),h=async D=>{if(typeof document>"u")return 0;const O=document.createElement("video"),V=()=>new Promise((M,C)=>{const F=()=>{O.duration===1/0?(O.currentTime=Number.MAX_SAFE_INTEGER,O.ontimeupdate=()=>{O.ontimeupdate=null,M(O.duration),O.currentTime=0}):M(O.duration)},W=()=>C(O.error);O.addEventListener("loadedmetadata",F,{once:!0}),O.addEventListener("error",W,{once:!0})});let P=null;try{return O.src=typeof D=="string"?D:P=URL.createObjectURL(D),await V()}finally{P&&URL.revokeObjectURL(P)}},p=async()=>{if(e.value)try{const D=t.resourceURL.value;if(D){const O=e.value.duration===1/0?await h(D):e.value.duration;r.duration=Math.ceil(O)}r.playingState=Da.ready}catch(D){console.error("Error loading metadata:",D),r.playingState=Da.error}};let g=null,y=0;const v=D=>{y=D.target.currentTime,g==null&&(g=(typeof window<"u"?window.requestAnimationFrame:O=>setTimeout(()=>O(performance.now()),16))(()=>{r.currentTime=y,typeof window<"u"&&g&&window.cancelAnimationFrame(g),g=null}))},b=()=>{r.playingState=Da.finished,r.currentTime=Math.ceil(r.duration)},w=()=>{i.value<tOe?(r.playingState=Da.loading,a&&clearTimeout(a),a=window.setTimeout(()=>{s()},nOe)):r.playingState=Da.error},S=D=>`${String(Math.floor(D/60)).padStart(2,"0")}:${String(Math.floor(D%60)).padStart(2,"0")}`,T=()=>{var D,O;r.seekingTime=!0,n.value?((D=e.value)==null||D.play(),r.playingState=Da.playing):((O=e.value)==null||O.pause(),r.playingState=Da.paused)},_=()=>{if(!e.value){r.seekingTime=!1;return}e.value.currentTime=r.currentTime,r.seekingTime=!1},E=Z(()=>eOe[r.playingState]);return Gs(()=>{a&&(clearTimeout(a),a=null),typeof window<"u"&&g&&(window.cancelAnimationFrame(g),g=null)}),{audioPlayerRef:e,isPlayingAudio:n,audioState:r,togglePlay:l,initAudio:s,icon:c,buttonConfig:f,handleLoadedMetadata:p,updatePlayingTime:v,handleAudioReset:b,formatValue:S,handleOnMouseDownProgressTime:T,handleOnMouseUpProgressTime:_,renderKey:o,handleError:w,iconTooltip:E}},iOe={class:"preview-audio-ce",part:"audio-preview"},aOe={key:0,class:"audio-loading-indicator"},oOe={class:"seeker"},sOe=["src"],lOe=["max"],uOe={class:"audio-duration"},cOe=Qe({__name:"AudioPlayback.ce",props:{resourceURL:{default:"",type:String}},setup(t,{expose:e}){const n=na,r=t,i=re(r.resourceURL),a=re(0);Ge(()=>r.resourceURL,T=>{i.value=T,a.value=Math.random()},{immediate:!0});const{audioPlayerRef:o,audioState:s,togglePlay:l,iconTooltip:c,icon:f,handleLoadedMetadata:h,updatePlayingTime:p,handleError:g,handleAudioReset:y,formatValue:v,handleOnMouseDownProgressTime:b,handleOnMouseUpProgressTime:w,initAudio:S}=rOe({resourceURL:i});return e({load:()=>{S()}}),(T,_)=>(R(),Y("div",iOe,[q(s).playingState==q(Da).loading?It((R(),Y("div",aOe,[..._[11]||(_[11]=[X("div",{class:"loader"},null,-1)])])),[[q(n),{content:q(c),delay:[300,0]}]]):It((R(),Y("button",{key:1,class:"button-icon-preview",part:"audio-control",onClick:_[0]||(_[0]=(...E)=>q(l)&&q(l)(...E))},[he(ES,{name:q(f)},null,8,["name"])])),[[q(n),{content:q(c),delay:[300,0]}]]),X("div",oOe,[X("audio",{ref_key:"audioPlayerRef",ref:o,hidden:"",preload:"auto",onPlay:_[2]||(_[2]=E=>q(s).isPlaying=!0),onPause:_[3]||(_[3]=E=>q(s).isPlaying=!1),onEnded:_[4]||(_[4]=(...E)=>q(y)&&q(y)(...E)),onLoadedmetadata:_[5]||(_[5]=(...E)=>q(h)&&q(h)(...E)),onTimeupdate:_[6]||(_[6]=(...E)=>q(p)&&q(p)(...E))},[X("source",{src:i.value,onError:_[1]||(_[1]=(...E)=>q(g)&&q(g)(...E))},null,40,sOe)],544),It(X("input",{"onUpdate:modelValue":_[7]||(_[7]=E=>q(s).currentTime=E),class:"slider",type:"range",min:"0",max:Math.ceil(q(s).duration),onClick:_[8]||(_[8]=Rt(()=>{},["stop"])),onMousedown:_[9]||(_[9]=Rt((...E)=>q(b)&&q(b)(...E),["stop"])),onMouseup:_[10]||(_[10]=Rt((...E)=>q(w)&&q(w)(...E),["stop"]))},null,40,lOe),[[xl,q(s).currentTime]])]),X("span",uOe,it(q(v)(q(s).currentTime))+" | "+it(q(v)(q(s).duration)),1)]))}}),dOe=`.preview-audio-ce{display:grid;grid-template-columns:24px auto 100px;gap:4px;max-height:24px;min-height:24px;height:24px;box-sizing:border-box;max-width:250px}.preview-audio-ce .arbo-btn{height:24px!important}.preview-audio-ce .seeker{display:flex;align-items:center}.preview-audio-ce .seeker .slider{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:2px;background:#d3d3d3;outline:none;opacity:.7;-webkit-transition:.2s;transition:opacity .2s}.preview-audio-ce .seeker .slider:hover{opacity:1}.preview-audio-ce .seeker .slider::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:2px;height:12px;background:#3c9bfa;cursor:pointer}.preview-audio-ce .seeker .slider::-moz-range-thumb{width:2px;height:12px;background:#3c9bfa;cursor:pointer}.preview-audio-ce .audio-duration{height:100%;display:inline-flex;align-items:center;justify-content:center}
|
|
105
105
|
`,fOe=qt(cOe,[["styles",[dOe]]]),aB=new TS("CommentFile");aB.version(1).stores({files:"++id, files "});const hOe={[En.pending]:"Stop the upload",[En.uploading]:"Stop the uploading",[En.uploadSucceed]:"Upload has been succeeded",[En.uploadFailed]:"Upload failed",[En.loading]:"Delete the file",[En.loadSucceed]:"Delete the file",[En.loadFailed]:"Delete the file",[En.default]:"Delete the file"},pOe={[En.pending]:"Xmark",[En.uploading]:"Xmark",[En.uploadSucceed]:"Check",[En.uploadFailed]:"Xmark",[En.loading]:"TrashCan",[En.loadSucceed]:"TrashCan",[En.loadFailed]:"TrashCan",[En.default]:"TrashCan"},mOe=3,gOe={name:"CommentUploadFile",components:{ImageSkeletonCe:cC,ArboButton:Nt,SvgRenderCe:ES,AudioPlaybackCe:fOe},directives:{arboTooltip:na},props:{fileid:{type:String,required:!0},path:{type:String,default:""},mimetype:{type:String,default:"application/octet-stream"},name:{type:String,default:"Untitled"},thumbnail:{type:String,default:""}},data(){return{fileStorage:uC(),resourceURL:"",thumbnailUrl:this.thumbnail||"",renderKey:0,bc:null,FileStatus:En,retryCount:0}},computed:{uploadStatus(){var t,e;const n=(e=(t=this.fileStorage)==null?void 0:t.uploadingStatus)==null?void 0:e.value;return(n==null?void 0:n[this.fileid])||En.loading},displayType(){return Rie(this.mimetype)},iconName(){return pOe[this.uploadStatus]},fileUploadTooltip(){return hOe[this.uploadStatus]}},mounted(){var t;try{const e=((t=document.querySelector("main"))==null?void 0:t.getAttribute("id"))||"default";this.bc=new BroadcastChannel(`file-upload-channel-${e}`),this.loadResourceLink()}catch(e){console.error("[CommentUploadFile] BroadcastChannel error",e)}},beforeUnmount(){var t;(t=this.bc)==null||t.close()},methods:{updateStatus(t){var e,n;const r=(n=(e=this.fileStorage)==null?void 0:e.uploadingStatus)==null?void 0:n.value;r&&typeof r=="object"&&(r[this.fileid]=t)},async getTemporaryResourceLink(){try{const t=await this.fileStorage.fetchResourceURL({path:this.path});if(!(t!=null&&t.url))throw new Error("Resource URL is missing");return this.applyFetchedResource(t.url),this.updateStatus(En.loadSucceed),t}catch(t){return console.error("[CommentUploadFile] temp resource error",t),this.updateStatus(En.loadFailed),null}},getDataCommentId(t){var e;if(t!=null)return t.attributes.getNamedItem("data-comment-id")?(e=t.attributes.getNamedItem("data-comment-id"))==null?void 0:e.value.toString():this.getDataCommentId((t==null?void 0:t.offsetParent)||null)},loadResourceLink(){try{this.updateStatus(En.loading);const t=this.$refs.rootCommentFile,e=this.getDataCommentId(t);e?this.getPermanentResourceLink(e):this.getTemporaryResourceLink()}catch(t){console.error("loadResourceLink",t),this.retryCount++,this.retryCount<mOe&&(this.updateStatus(En.loading),setTimeout(()=>{this.loadResourceLink()},15e3))}},async getPermanentResourceLink(t){const e=`${t}_${this.name}`;try{const n=await aB.files.where("id").equals(e).first();if(!n)throw this.updateStatus(En.loadFailed),new Error("Permanent resource not found");this.displayType==="audio"?this.applyFetchedResource(n.url):["image","video"].includes(this.displayType)&&(this.thumbnailUrl=this.displayType==="image"?n.path:n.thumbnail),this.renderKey++,this.updateStatus(En.loadSucceed)}catch(n){throw console.error("[CommentUploadFile] permanent link error",{error:n,_fileid:e}),this.updateStatus(En.loadFailed),new Error("Permanent resource not found")}},applyFetchedResource(t){this.displayType==="audio"?(this.resourceURL=t,fn(()=>{var e;const n=this.$refs.audioPlayerRef;(e=n==null?void 0:n.load)==null||e.call(n)})):this.thumbnailUrl=t},async getURL(){try{const t=this.$refs.rootCommentFile,e=this.getDataCommentId(t);if(!e)return{data:null,commentId:null};const n=`${e}_${this.name}`;return{data:await aB.files.where("id").equals(n).first(),commentId:e}}catch(t){return console.error("getURL from IDB",t),{data:null,commentId:null}}},async handleOpenCommentFile(t){var e;if(this.displayType==="audio"){t.preventDefault();return}const n=await this.getURL(),r={mimeType:this.mimetype??null,name:this.name??null,data:n.data,commenttype:n.commentId?"saved":"temporary",timestamp:cn.now().toFormat("HH:mm:ss"),path:this.path};(e=this.bc)==null||e.postMessage(r)},onLoadSuccess(){this.updateStatus(En.loadSucceed)},retryUpload(){var t,e;(e=(t=this.fileStorage)==null?void 0:t.retryUpload)==null||e.call(t,this.fileid)},handleClick(t){var e,n,r,i,a,o,s,l;if(t==="delete")return(n=(e=this.fileStorage)==null?void 0:e.removeFile)==null?void 0:n.call(e,this.fileid);const c=this.uploadStatus;return c<=En.uploading?(i=(r=this.fileStorage)==null?void 0:r.stopUploading)==null?void 0:i.call(r,this.fileid):c===En.uploadFailed?(o=(a=this.fileStorage)==null?void 0:a.retryUpload)==null?void 0:o.call(a,this.fileid):(l=(s=this.fileStorage)==null?void 0:s.removeFile)==null?void 0:l.call(s,this.fileid)}}},vOe={key:0,class:"arbo-label__prefix arbo__icon-btn"},yOe={key:0,class:"arbo-label__main"},bOe={key:0,class:"arbo-label__suffix arbo__icon-btn"},_Oe=Qe({__name:"Label.ce",props:{...El,prefixIcon:{type:String,default:""},suffixIcon:{type:String,default:""},label:{type:String,default:"Here is label"},tooltipLabel:{type:String,default:""}},setup(t){const e=t;return(n,r)=>(R(),Re(dr,{class:"arbo-label",content:e.tooltipLabel,delay:[300,0]},{default:ze(()=>[ke(n.$slots,"prefix",{prefixIcon:e.prefixIcon},()=>[e.prefixIcon?(R(),Y("div",vOe,[he(qn,{class:"arbo-label__prefix--icon",name:e.prefixIcon},null,8,["name"])])):pe("",!0)],!0),ke(n.$slots,"default",{},()=>[e.label?(R(),Y("div",yOe,it(e.label),1)):pe("",!0)],!0),ke(n.$slots,"suffix",{suffixIcon:e.suffixIcon},()=>[e.suffixIcon?(R(),Y("div",bOe,[he(qn,{class:"arbo-label__prefix--icon",name:e.suffixIcon},null,8,["name"])])):pe("",!0)],!0)]),_:3},8,["content"]))}}),wOe=`.arbo-label[data-v-755e58f1]{display:flex;align-items:center}.arbo-label__main[data-v-755e58f1]{font-weight:inherit;font-size:inherit;color:inherit;line-height:inherit}.arbo-label__prefix[data-v-755e58f1],.arbo-label__suffix[data-v-755e58f1]{max-width:32px;max-height:32px;object-fit:contain;display:flex;align-items:center;color:#000}
|
|
106
|
-
`,ea=qt(_Oe,[["styles",[wOe]],["__scopeId","data-v-755e58f1"]]),ci={isValid:(t,e)=>!t||typeof t=="string"?!1:cn.fromMillis(t,{zone:e}).isValid,format:(t,e,n)=>ci.isValid(t,n)?cn.fromMillis(t,{zone:n}).toFormat(e):"",standardize:(t,e,n)=>{const r=typeof t=="number"?t:t.getTime(),i=cn.fromMillis(r,{zone:n});if(!i.isValid)throw new Error(`Invalid date: ${t}`);return e==="start"?i.startOf("day").toMillis():i.endOf("day").toMillis()},isSameDay:(t,e,n)=>{if(!t&&!e)return!0;if(!t||!e)return!1;const r=cn.fromMillis(t,{zone:n}),i=cn.fromMillis(e,{zone:n});return!r.isValid&&!i.isValid?!0:!r.isValid||!i.isValid?!1:r.hasSame(i,"day")},toStructuredDate:(t,e)=>{if(t==null||t==="")return null;const n=cn.fromMillis(t,{zone:e});return n.isValid?{date:n.day,months:n.month,years:n.year,dateString:n.toISO()||"",timezone:e,value:n.toJSDate(),toMillis:n.toMillis()??null}:null},getInitialRangeValue:(t,e,n)=>{const r=t?new Date(t).getTime():"",i=e?new Date(e).getTime():"";return r&&i?[r,i]:!r&&!i?["",""]:r&&!i?[r,""]:!r&&i?["",i]:["",""]}},kk=(t,e)=>{try{return t()}catch(n){const r=n instanceof Error?n:new Error(String(n));return console.error("Date operation failed:",r),e==null||e(r),null}},Ur={log:(t,...e)=>{ve.env.NODE_ENV==="development"&&console.log(`%c[DateRange] ${t}`,"color: white; font-weight: bold; font-size:24px",...e)},warn:(t,...e)=>{ve.env.NODE_ENV==="development"&&console.warn(`%c[DateRange] ${t}`,"color: orange; font-weight: bold;",...e)},error:(t,...e)=>{console.error(`%c[DateRange] ${t}`,"color: red; font-weight: bold;",...e)}},Ek={DEFAULT_TIMEZONE:cn.local().zoneName,CLEANUP_DELAY:100,WATCH_OPTIONS:{immediate:!0,deep:!1},SELECTION_WATCH_OPTIONS:{deep:!0,immediate:!0}},xOe=(t,e,n,r,i)=>{try{const[a,o]=t,s=n===ov.START&&r,l=n===ov.END&&r,c=()=>{const p=ci.isValid(a,i),g=ci.isValid(o,i);return p&&g?"filled":!p&&!g?"both_empty":!p&&g?"empty_start":"empty_end"};if(!r)return"none";const f={openStartOnStart:s&&e==="start",openStartOnEnd:s&&e==="end",openEndOnStart:l&&e==="start",openEndOnEnd:l&&e==="end"},h=c();switch(!0){case(h==="both_empty"&&f.openStartOnStart):return"initiate";case(h==="both_empty"&&f.openStartOnEnd):return"update";case(h==="both_empty"&&f.openEndOnStart):return"initiate";case(h==="both_empty"&&f.openEndOnEnd):return"strictUpdate";case(h==="empty_start"&&f.openStartOnStart):return"initiate";case(h==="empty_start"&&f.openStartOnEnd):return"update";case(h==="empty_start"&&f.openEndOnStart):return"initiate";case(h==="empty_start"&&f.openEndOnEnd):return"update";case(h==="empty_end"&&f.openStartOnStart):return"initiate";case(h==="empty_end"&&f.openStartOnEnd):return"update";case(h==="empty_end"&&f.openEndOnStart):return"initiate";case(h==="empty_end"&&f.openEndOnEnd):return"update";case(h==="filled"&&f.openStartOnStart):return"strictUpdate";case(h==="filled"&&f.openStartOnEnd):return"strictUpdate"}return"none"}catch(a){return Ur.error("Error calculating date picker mode:",a),"update"}},SOe=(t,e)=>{const n=re(),r=re(),i=re(["",""]),a=re(["",""]),o=re({start:"",end:""}),s=re(0),l=re(!1),c=re(!1),f=Z(()=>t.timezone||Ek.DEFAULT_TIMEZONE),h=Ht({focusingPosition:"none",openingCalendar:!1}),p=re({start:i.value[0],end:i.value[1]}),g=Z(()=>h.focusingPosition!=="none"),y=Z(()=>xOe([p.value.start,p.value.end],h.focusingPosition,n.value,g.value,f.value)),v=Z(()=>({start:ci.toStructuredDate(i.value[0],f.value),end:ci.toStructuredDate(i.value[1],f.value)})),b=()=>{try{if(c.value)return;i.value=ci.getInitialRangeValue(t.startDate,t.dueDate,f.value),o.value={start:i.value[0],end:i.value[1]},p.value={start:i.value[0],end:i.value[1]},w()}catch(G){Ur.error("Error in setupDatePicker:",G)}},w=()=>{try{if(c.value)return;a.value=JSON.parse(JSON.stringify(i.value)),h.focusingPosition="none",n.value=void 0,s.value++}catch(G){Ur.error("Error in cleanUp:",G)}},S=()=>{var G;try{if(c.value)return;(G=r.value)==null||G.closeMenu()}catch(ge){Ur.error("Failed to close calendar",ge)}finally{w()}},T=G=>{try{if(c.value)return;(G()||y.value==="strictUpdate"||y.value==="update")&&(_(),S())}catch(ge){Ur.error("Error in handleClickOutside:",ge)}},_=()=>{var G,ge;try{if(c.value)return;const Ue=[p.value.start?new Date(p.value.start):null,p.value.end?new Date(p.value.end):null];(G=r.value)==null||G.selectDate(Ue),(ge=r.value)==null||ge.updateInternalModelValue(Ue),C(),w(),fn(()=>{S()})}catch(Ue){Ur.error("confirmSelect failed",Ue)}},E=(G,ge,Ue)=>{try{if(c.value)return;G.stopPropagation(),h.focusingPosition===ge?S():Ue()}catch(ce){Ur.error("Error in toggleCalendar:",ce)}},D=G=>{n.value||(n.value=G),g.value||ee(),h.focusingPosition=G},O=G=>{try{G?E(G,"start",()=>D(ov.START)):D(ov.START)}catch(ge){Ur.error("Error in selectStartField:",ge)}},V=G=>{try{G?E(G,"end",()=>D(ov.END)):D(ov.END)}catch(ge){Ur.error("Error in selectEndField:",ge)}},P=()=>{try{if(c.value)return;i.value[0]="",p.value.start="",o.value.start="",C()}catch(G){Ur.error("Failed to clear start date",G)}},M=()=>{try{if(c.value)return;i.value[1]="",p.value.end="",o.value.end="",C()}catch(G){Ur.error("Failed to clear end date",G)}},C=()=>{try{if(c.value)return;const[G,ge]=[t.startDate?new Date(t.startDate||"").getTime():"",t.dueDate?new Date(t.dueDate||"").getTime():""],[Ue,ce]=[ci.isSameDay(i.value[0],G,f.value),ci.isSameDay(i.value[1],ge,f.value)];if(!(Ue&&ce))e("update",v.value);else throw Ur.warn("No changes detected for sync",{selectedRange:i.value,oldStart:G,oldEnd:ge,sameStart:Ue,sameEnd:ce}),new Error("no change")}catch(G){Ur.warn("Sync action failed",G)}},F=G=>{try{if(c.value)return;const ge=kk(()=>ci.standardize(G,"end",f.value),Ue=>Ur.error("Failed to update strict end",Ue));ge&&(i.value[1]=ge,h.focusingPosition="none",C(),S(),w())}catch(ge){Ur.error("updatestrictUpdate failed",ge)}},W=G=>{N.value=G},H=re(!0),j=G=>{H.value=!0;try{const ge=Number(G.getTime()),{end:Ue,start:ce}={end:()=>ci.standardize(ge,"end",f.value),start:()=>ci.standardize(ge,"start",f.value)};switch(!0){case y.value==="initiate":if(!i.value[0]&&!i.value[1]&&h.focusingPosition==="start"){o.value.start=ce(),i.value[0]=ce(),h.focusingPosition="end";return}else if(i.value[1]&&ge>Number(i.value[1])&&h.focusingPosition==="start"){o.value.start=ce(),o.value.end=Ue(),i.value[0]=ce(),i.value[1]=Ue(),h.focusingPosition="end";return}else o.value.start=ce(),i.value[0]=ce(),h.focusingPosition="end";break;case y.value==="strictUpdate":F(ge);break;case y.value==="update":h.focusingPosition==="end"?(ge<Number(o.value.start)?(o.value.start=ce(),o.value.end=Ue(),i.value[0]=ce(),i.value[1]=Ue()):(i.value[1]=Ue()||"",o.value.end=Ue()||""),h.focusingPosition="end"):(i.value[0]=ce()||"",o.value.start=ce()||""),h.focusingPosition="end";break;case y.value==="none":console.error("No date selected");break}}catch(ge){Ur.error("Error in selectStartDate:",ge)}},N=re(["",""]),U=G=>{H.value=!0;try{const ge=G.getTime(),Ue=ci.standardize(ge,"end",f.value);y.value==="strictUpdate"?F(ge):(i.value[1]=Ue,h.focusingPosition="end")}catch(ge){Ur.error("Error in selectEndDate:",ge)}},ee=()=>{var G;try{if(c.value)return;a.value=JSON.parse(JSON.stringify(i.value)),(G=r.value)==null||G.openMenu()}catch(ge){Ur.error("Error in handleOpenMenu:",ge)}},le=()=>{try{if(c.value)return;w()}catch(G){Ur.error("Error in callbackClosed:",G)}},_e=G=>{try{if(c.value)return;V(),fn(()=>{var ge;(ge=r.value)==null||ge.updateInternalModelValue([G,G])})}catch(ge){Ur.error("Error in handleInvalidRange:",ge)}},be=()=>{try{if(c.value)return;i.value=JSON.parse(JSON.stringify(a.value)),S()}catch(G){Ur.error("Error in cancelSelect:",G)}},Te=G=>{try{if(c.value)return;const ge=Array.isArray(G)&&G.length===1,Ue=Array.isArray(G)&&G.length===2,ce=G instanceof Date,Ye=G==null||Array.isArray(G)&&G.length===0,te=(ge||Ue)&&kk(()=>ci.standardize(G[0],"start",f.value))||"",ae=Ue&&kk(()=>ci.standardize(G[1],"end",f.value))||"",ne=ce&&kk(()=>ci.standardize(G,"start",f.value))||"";switch(!0){case(ce&&G instanceof Date):H.value&&(i.value=[ne,""]);break;case(ge&&h.focusingPosition==="start"):H.value&&(i.value=[te,""]);break;case(ge&&h.focusingPosition==="end"):H.value&&(i.value=["",te]);break;case Ue:H.value&&(i.value=[te,ae]);break;case Ye:i.value=["",""];break}}catch(ge){Ur.error("Error in handleUpdateModelValue:",ge)}},J=G=>{try{if(c.value||!G||G.length<=1)return;p.value={start:G[0].getTime(),end:G[1].getTime()}}catch(ge){Ur.error("Error in handleInternalModelChange:",ge)}},me=()=>{try{if(c.value)return;T(()=>ci.isValid(p.value.start)&&ci.isValid(p.value.end))}catch(G){Ur.error("Error in focusOut:",G)}},Ee=Z(()=>{try{if(c.value)return{partialRange:!0,hasStart:!1,hasEnd:!1,case:"initial",showLastInRange:!1};const G=h.focusingPosition,ge=ci.isValid(i.value[0],f.value),Ue=ci.isValid(i.value[1],f.value),ce={partialRange:!0,hasStart:ge,hasEnd:Ue,case:"initial",showLastInRange:h.focusingPosition==="end"};let Ye={};switch(!0){case(G==="end"&&!ge&&!Ue):Ye={fixedStart:!1,fixedEnd:!1,case:"no start"};break;case(G==="start"&&ge&&Ue):Ye={fixedStart:!1,fixedEnd:!0,case:"block end"};break;case(G==="end"&&Ue&&ge):Ye={fixedStart:!0,fixedEnd:!1,case:"block start"};break}return{...ce,...Ye}}catch(G){return Ur.error("Error in rangeConfig computed:",G),{partialRange:!0,hasStart:!1,hasEnd:!1,case:"initial",showLastInRange:!1}}}),Ce=Z(()=>{try{const G=i.value[0]?new Date(i.value[0]):"",ge=i.value[1]?new Date(i.value[1]):"",Ue=ci.isValid(i.value[0],f.value),ce=ci.isValid(i.value[1],f.value),Ye=ci.isValid(p.value.start,f.value),te=ci.isValid(p.value.end,f.value);let ae=[];return te&&Ye?ae=[]:Ue&&G&&!ce?ae=[cn.fromJSDate(G,{zone:f.value}).startOf("day").toJSDate()]:!Ue&&ge&&ce&&(ae=[cn.fromJSDate(ge,{zone:f.value}).endOf("day").toJSDate()]),{dates:ae}}catch(G){return Ur.error("Error in highlightedDate computed:",G),{dates:[]}}}),de=Z(()=>({teleport:t.teleport,disabled:t.disabled,format:t.shortFormat,timezone:f.value,enableTimePicker:!1,multiCalendars:t.multipleCalendar,modelAuto:!0,onClickOutside:T}));return Ge([()=>t.startDate,()=>t.dueDate],()=>{try{if(c.value)return;i.value=ci.getInitialRangeValue(t.startDate,t.dueDate,f.value),w()}catch(G){Ur.error("Watch error",{error:G,start:t.startDate,due:t.dueDate})}},Ek.WATCH_OPTIONS),Ge(()=>t.timezone,()=>{var G;try{if(c.value)return;i.value=ci.getInitialRangeValue(t.startDate,t.dueDate,t.timezone||Ek.DEFAULT_TIMEZONE),(G=r.value)==null||G.handleFlow()}catch(ge){Ur.error("Error in timezone watcher:",ge)}}),Ge(()=>i.value,()=>{try{if(c.value)return;p.value={start:i.value[0],end:i.value[1]}}catch(G){Ur.error("Error in selectedRange watcher:",G)}},Ek.SELECTION_WATCH_OPTIONS),Ks(()=>{try{l.value=!0,b()}catch(G){Ur.error("Error in onBeforeMount:",G)}}),Qa(()=>{try{c.value=!0,w(),r.value=null,i.value=["",""],a.value=["",""],o.value={start:"",end:""},p.value={start:"",end:""}}catch(G){Ur.error("Error in onUnmounted:",G)}}),{dateRangePickerRef:r,selectedRange:i,renderKey:s,isDestroyed:c,states:h,previewingDate:p,selectingRange:o,vueDatepickerConfiguration:de,rangeConfig:Ee,highlightedDate:Ce,datePickerMode:y,selectStartField:O,selectEndField:V,clearStartDate:P,clearEndDate:M,selectStartDate:j,selectEndDate:U,callbackClosed:le,handleInvalidRange:_e,cancelSelect:be,confirmSelect:_,handleUpdateModelValue:Te,handleInternalModelChange:J,cleanUp:w,handleClickOutside:T,focusOut:me,handleUpdateModelValueTz:W,drValue:N}},AOe={class:"rc__header flex flex-col items-center justify-center"},kOe={class:"rc__logo"},EOe={class:"rc__title text-center"},TOe={class:"rc__content"},DOe=["innerHTML"],OOe={class:"rc__hovered"},COe={class:"rc__hovered__main"},IOe={class:"rc__content"},MOe={class:"rc__actions flex items-center"},ROe=Qe({__name:"ReportCard",props:{name:{type:String,default:"Completed Scenes Report"},subTitle:{type:String,default:"Download a report that includes the completed scenes."},logo:{type:String,default:"ReportCompletedScenes"},isShowBackFlipTile:{type:Boolean,default:!1},minHeight:{type:String,default:"224px"},downloadBtnLabel:{type:String,default:"Download report"},description:{type:String,default:"Download a report that includes the completed scenes."}},emits:["update-state-flip","clicked-download-btn"],setup(t,{emit:e}){const n=t,r=e;function i(){r("clicked-download-btn")}function a(){r("update-state-flip",!n.isShowBackFlipTile)}function o(){n.isShowBackFlipTile||a()}const s=Z(()=>({"--report-card__min-height":n.minHeight}));return(l,c)=>(R(),Y("div",{class:"report-card rc",style:_t(s.value)},[X("div",{class:"rc__body w-full",onClick:o},[X("div",{class:Fe(["rc__wrapper",{hovering:t.isShowBackFlipTile}])},[X("div",AOe,[X("div",kOe,[he(qn,{class:"rc__logo--img",name:t.logo,type:"visual"},null,8,["name"])]),X("h3",EOe,it(t.name),1),he(dr,{class:"rc__header--flip",content:"Flip",delay:[300,0]},{default:ze(()=>[he(Nt,{class:"rc__header--btn-flip",type:"secondary",label:"","suffix-icon":t.isShowBackFlipTile?"CustomFlipBack":"CustomFlipFront",onClick:Rt(a,["stop"])},null,8,["suffix-icon"])]),_:1})]),It(X("div",TOe,[X("div",{class:"rc__sub-title",innerHTML:t.subTitle},null,8,DOe)],512),[[Ln,!t.isShowBackFlipTile]]),It(X("div",OOe,[X("div",COe,[ke(l.$slots,"content",{isShowBackFlipTile:t.isShowBackFlipTile},()=>[X("div",IOe,it(n.description),1)],!0)]),ke(l.$slots,"actions",{},()=>[X("div",MOe,[he(Nt,{class:"rc__actions--download-btn w-full",type:"primary",onClick:Rt(i,["stop"]),label:n.downloadBtnLabel},null,8,["label"])])],!0)],512),[[Ln,t.isShowBackFlipTile]])],2)])],4))}}),$ie=qt(ROe,[["__scopeId","data-v-c4f48e45"]]),$Oe=(t,e,n)=>{const r={truncate:"End date cleared because it was before start. Please pick an end date.",swap:"Dates auto-swapped because start was after end.",...t.messages},i=Ht({startDate:null,endDate:null,timezone:t.timezone||"UTC",format:t.format||"",isSelectingStart:!1,isSelectingEnd:!1,rangeFeedback:{status:"idle",action:null,message:""},cacheStartDate:null,cacheEndDate:null,isDirty:!1});Ks(()=>{var E;((E=t.modelValue)==null?void 0:E.length)===2&&(i.startDate=t.modelValue[0],i.endDate=t.modelValue[1]),i.cacheStartDate=i.startDate,i.cacheEndDate=i.endDate,i.isSelectingStart=!1,i.isSelectingEnd=!1,t.timezone&&(i.timezone=t.timezone)});const a=()=>{var E,D,O,V,P,M,C,F,W,H;e("tracing",JSON.parse(JSON.stringify(n.value))),e("update:start",i.startDate),e("update:end",i.endDate);const j={start:ci.toStructuredDate(((E=i.startDate)==null?void 0:E.getTime())||"",i.timezone),end:ci.toStructuredDate(((D=i.endDate)==null?void 0:D.getTime())||"",i.timezone)};(i.startDate||i.endDate)&&(e("legacyUpdate",j),e("update",[i.startDate,i.endDate])),i.isDirty=!(((V=(O=i.startDate)==null?void 0:O.getTime)==null?void 0:V.call(O))===((M=(P=i.cacheStartDate)==null?void 0:P.getTime)==null?void 0:M.call(P))&&((F=(C=i.endDate)==null?void 0:C.getTime)==null?void 0:F.call(C))===((H=(W=i.cacheEndDate)==null?void 0:W.getTime)==null?void 0:H.call(W)))},o=(E,D)=>{const O=cn.fromObject({year:E.year,month:E.month,day:E.day},{zone:i.timezone});return(D==="start"?O.startOf("day"):O.endOf("day")).toJSDate()},s=()=>{i.rangeFeedback.status="idle",i.rangeFeedback.action=null,i.rangeFeedback.message=""},l=E=>{t.enableRangeFeedback&&(i.rangeFeedback.status="corrected",i.rangeFeedback.action=E,i.rangeFeedback.message=E==="swap"?r.swap:r.truncate)},c=E=>{if(!(!i.startDate||!i.endDate)){if(i.startDate.getTime()<=i.endDate.getTime()){t.enableRangeFeedback&&s();return}if(E==="select-start"){const D={start:i.startDate,end:i.endDate};i.endDate=null,e("range:invalid",D),e("range:corrected",{start:i.startDate,end:i.endDate,action:"truncate"}),i.isSelectingEnd=!0,l("truncate"),t.enableRangeFeedback&&!i.rangeFeedback.message&&(i.rangeFeedback.message=r.truncate)}else{const D={start:i.startDate,end:i.endDate},O=i.startDate;i.startDate=i.endDate,i.endDate=O,e("range:invalid",D),e("range:corrected",{start:i.startDate,end:i.endDate,action:"swap"}),l("swap")}}},f=(E,D=!0)=>{t.disabled||t.readonly||(i.startDate=o(E,"start"),D?(i.isSelectingStart=!1,i.isSelectingEnd=!0):(i.isSelectingStart=!0,i.isSelectingEnd=!1),c("select-start"))},h=E=>{t.disabled||t.readonly||(i.endDate=o(E,"end"),c("select-end"))},p=()=>{t.disabled||t.readonly||(i.startDate=null,e("clearStart"),s(),a())},g=()=>{t.disabled||t.readonly||(i.endDate=null,e("clearDue"),s(),a())},y=()=>{t.disabled||t.readonly||i.isDirty||(i.cacheStartDate=i.startDate,i.cacheEndDate=i.endDate)},v=()=>{t.disabled||t.readonly||(i.cacheStartDate=i.startDate,i.cacheEndDate=i.endDate,i.isDirty=!1,a())},b=()=>{t.disabled||t.readonly||(i.startDate=i.cacheStartDate,i.endDate=i.cacheEndDate,s(),a(),i.isDirty=!1)},w=Z(()=>i.startDate?cn.fromJSDate(i.startDate,{zone:i.timezone}).toFormat(i.format):t.startPlaceholder),S=Z(()=>i.endDate?cn.fromJSDate(i.endDate,{zone:i.timezone}).toFormat(i.format):t.duePlaceholder),T=Z(()=>!i.startDate&&!t.disabled?t.startTooltip:!i.startDate&&(t.disabled||t.readonly)?t.startPlaceholder:i.startDate?cn.fromJSDate(i.startDate,{zone:i.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):t.startTooltip),_=Z(()=>!i.endDate&&!t.disabled?t.dueTooltip:!i.endDate&&(t.disabled||t.readonly)?t.startPlaceholder:i.endDate?cn.fromJSDate(i.endDate,{zone:i.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):t.dueTooltip);return{states:i,displayStartDate:w,displayEndDate:S,tooltipStartDate:T,tooltipEndDate:_,selectEndDate:h,selectStartDate:f,clearDue:g,clearStart:p,beginInteraction:y,confirmSelection:v,cancelSelection:b}},POe=["aria-disabled","aria-readonly"],LOe=["disabled","aria-expanded","aria-label"],NOe={key:1,class:"adpb-icon","aria-hidden":"true"},FOe=["aria-readonly"],VOe={key:0,class:"adpb-icon","aria-hidden":"true"},BOe=Qe({__name:"ArboDatePickerButton",props:{modelValue:{},format:{default:"LLL dd"},placeholder:{default:"Select date"},timezone:{default:"UTC"},active:{type:Boolean,default:!1},tooltip:{default:""},type:{},actual:{type:Boolean},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},showIcon:{type:Boolean,default:!0},size:{default:"medium"}},emits:["clear","open"],setup(t,{emit:e}){const n=na,r=t,i=Z(()=>r.disabled),a=Z(()=>r.readonly),o=e,s=Z(()=>{if(!r.modelValue)return"empty";const v=cn.fromJSDate(r.modelValue,{zone:r.timezone}),b=cn.now().setZone(r.timezone).startOf("day"),w=v.startOf("day").toISODate();return w===b.toISODate()?"today":w===b.plus({days:1}).toISODate()?"tomorrow":w===b.minus({days:1}).toISODate()?"yesterday":v<b?"past":v>b?"future":"actual"}),l=Z(()=>r.modelValue?s.value==="today"?"Today":s.value==="tomorrow"?"Tomorrow":s.value==="yesterday"?"Yesterday":cn.fromJSDate(r.modelValue,{zone:r.timezone}).toFormat(r.format):r.placeholder),c=Z(()=>!!r.showIcon),f=Z(()=>!!r.modelValue&&!r.disabled&&!r.readonly),h=Z(()=>{let v=0;return f.value&&v++,c.value&&v++,v}),p=Z(()=>({"--adp-icon-count":h.value}));function g(){r.disabled||r.readonly||o("clear")}function y(){r.disabled||r.readonly||o("open")}return(v,b)=>!i.value&&!a.value?(R(),Y("div",{key:0,class:Fe(["arbo-date-picker-button",{"has-value":!!t.modelValue,active:t.active,disabled:i.value,readonly:a.value,"has-clear":f.value,"has-icon":c.value,small:r.size==="small"}]),style:_t(p.value),"aria-disabled":i.value?"true":"false","aria-readonly":a.value?"true":"false",role:"group",onClick:y},[It((R(),Y("button",{class:Fe(["adpb-main",{"is-empty":!t.modelValue}]),type:"button",disabled:i.value||a.value,"aria-haspopup":"dialog","aria-expanded":t.active?"true":"false","aria-label":`${t.type==="start"?"Start date":"End date"} picker`,onFocus:y},[X("span",{class:Fe(["adpb-label",[`${t.type}-${s.value}`,t.actual?"actual":""]])},it(l.value),3)],42,LOe)),[[q(n),{content:r.tooltip||l.value}]]),f.value?(R(),Re(q(Nt),{key:0,size:"small",label:"","prefix-icon":"Xmark",type:"primary",disabled:r.disabled,"prefix-tooltip":"Clear",class:"adpb-clear","aria-haspopup":"dialog","aria-expanded":t.active?"true":"false","aria-label":`${t.type==="start"?"Start date":"End date"} picker`,onClick:Rt(g,["stop"])},null,8,["disabled","aria-expanded","aria-label"])):pe("",!0),c.value?(R(),Y("span",NOe,[he(q(qn),{name:"Calendar"})])):pe("",!0)],14,POe)):(R(),Y("div",{key:1,class:Fe(["arbo-date-picker-button view-only",{"has-value":!!t.modelValue,active:t.active,disabled:i.value,readonly:a.value,"has-clear":!1,"has-icon":c.value,small:r.size==="small"}]),style:_t(p.value),"aria-disabled":"true","aria-readonly":a.value?"true":"false",role:"group"},[It((R(),Y("button",{class:Fe(["adpb-main",{"is-empty":!t.modelValue}]),type:"button",disabled:""},[X("span",{class:Fe(["adpb-label",[`${t.type}-${s.value}`,t.actual?"actual":""]])},it(l.value),3)],2)),[[q(n),{content:r.tooltip||l.value}]]),c.value?(R(),Y("span",VOe,[he(q(qn),{name:"Calendar"})])):pe("",!0)],14,FOe))}}),p9=qt(BOe,[["__scopeId","data-v-ddb3d668"]]);/*!
|
|
106
|
+
`,ea=qt(_Oe,[["styles",[wOe]],["__scopeId","data-v-755e58f1"]]),ci={isValid:(t,e)=>!t||typeof t=="string"?!1:cn.fromMillis(t,{zone:e}).isValid,format:(t,e,n)=>ci.isValid(t,n)?cn.fromMillis(t,{zone:n}).toFormat(e):"",standardize:(t,e,n)=>{const r=typeof t=="number"?t:t.getTime(),i=cn.fromMillis(r,{zone:n});if(!i.isValid)throw new Error(`Invalid date: ${t}`);return e==="start"?i.startOf("day").toMillis():i.endOf("day").toMillis()},isSameDay:(t,e,n)=>{if(!t&&!e)return!0;if(!t||!e)return!1;const r=cn.fromMillis(t,{zone:n}),i=cn.fromMillis(e,{zone:n});return!r.isValid&&!i.isValid?!0:!r.isValid||!i.isValid?!1:r.hasSame(i,"day")},toStructuredDate:(t,e)=>{if(t==null||t==="")return null;const n=cn.fromMillis(t,{zone:e});return n.isValid?{date:n.day,months:n.month,years:n.year,dateString:n.toISO()||"",timezone:e,value:n.toJSDate(),toMillis:n.toMillis()??null}:null},getInitialRangeValue:(t,e,n)=>{const r=t?new Date(t).getTime():"",i=e?new Date(e).getTime():"";return r&&i?[r,i]:!r&&!i?["",""]:r&&!i?[r,""]:!r&&i?["",i]:["",""]}},kk=(t,e)=>{try{return t()}catch(n){const r=n instanceof Error?n:new Error(String(n));return console.error("Date operation failed:",r),e==null||e(r),null}},Ur={log:(t,...e)=>{ve.env.NODE_ENV==="development"&&console.log(`%c[DateRange] ${t}`,"color: white; font-weight: bold; font-size:24px",...e)},warn:(t,...e)=>{ve.env.NODE_ENV==="development"&&console.warn(`%c[DateRange] ${t}`,"color: orange; font-weight: bold;",...e)},error:(t,...e)=>{console.error(`%c[DateRange] ${t}`,"color: red; font-weight: bold;",...e)}},Ek={DEFAULT_TIMEZONE:cn.local().zoneName,CLEANUP_DELAY:100,WATCH_OPTIONS:{immediate:!0,deep:!1},SELECTION_WATCH_OPTIONS:{deep:!0,immediate:!0}},xOe=(t,e,n,r,i)=>{try{const[a,o]=t,s=n===ov.START&&r,l=n===ov.END&&r,c=()=>{const p=ci.isValid(a,i),g=ci.isValid(o,i);return p&&g?"filled":!p&&!g?"both_empty":!p&&g?"empty_start":"empty_end"};if(!r)return"none";const f={openStartOnStart:s&&e==="start",openStartOnEnd:s&&e==="end",openEndOnStart:l&&e==="start",openEndOnEnd:l&&e==="end"},h=c();switch(!0){case(h==="both_empty"&&f.openStartOnStart):return"initiate";case(h==="both_empty"&&f.openStartOnEnd):return"update";case(h==="both_empty"&&f.openEndOnStart):return"initiate";case(h==="both_empty"&&f.openEndOnEnd):return"strictUpdate";case(h==="empty_start"&&f.openStartOnStart):return"initiate";case(h==="empty_start"&&f.openStartOnEnd):return"update";case(h==="empty_start"&&f.openEndOnStart):return"initiate";case(h==="empty_start"&&f.openEndOnEnd):return"update";case(h==="empty_end"&&f.openStartOnStart):return"initiate";case(h==="empty_end"&&f.openStartOnEnd):return"update";case(h==="empty_end"&&f.openEndOnStart):return"initiate";case(h==="empty_end"&&f.openEndOnEnd):return"update";case(h==="filled"&&f.openStartOnStart):return"strictUpdate";case(h==="filled"&&f.openStartOnEnd):return"strictUpdate"}return"none"}catch(a){return Ur.error("Error calculating date picker mode:",a),"update"}},SOe=(t,e)=>{const n=re(),r=re(),i=re(["",""]),a=re(["",""]),o=re({start:"",end:""}),s=re(0),l=re(!1),c=re(!1),f=Z(()=>t.timezone||Ek.DEFAULT_TIMEZONE),h=Ht({focusingPosition:"none",openingCalendar:!1}),p=re({start:i.value[0],end:i.value[1]}),g=Z(()=>h.focusingPosition!=="none"),y=Z(()=>xOe([p.value.start,p.value.end],h.focusingPosition,n.value,g.value,f.value)),v=Z(()=>({start:ci.toStructuredDate(i.value[0],f.value),end:ci.toStructuredDate(i.value[1],f.value)})),b=()=>{try{if(c.value)return;i.value=ci.getInitialRangeValue(t.startDate,t.dueDate,f.value),o.value={start:i.value[0],end:i.value[1]},p.value={start:i.value[0],end:i.value[1]},w()}catch(G){Ur.error("Error in setupDatePicker:",G)}},w=()=>{try{if(c.value)return;a.value=JSON.parse(JSON.stringify(i.value)),h.focusingPosition="none",n.value=void 0,s.value++}catch(G){Ur.error("Error in cleanUp:",G)}},S=()=>{var G;try{if(c.value)return;(G=r.value)==null||G.closeMenu()}catch(ge){Ur.error("Failed to close calendar",ge)}finally{w()}},T=G=>{try{if(c.value)return;(G()||y.value==="strictUpdate"||y.value==="update")&&(_(),S())}catch(ge){Ur.error("Error in handleClickOutside:",ge)}},_=()=>{var G,ge;try{if(c.value)return;const Ue=[p.value.start?new Date(p.value.start):null,p.value.end?new Date(p.value.end):null];(G=r.value)==null||G.selectDate(Ue),(ge=r.value)==null||ge.updateInternalModelValue(Ue),C(),w(),fn(()=>{S()})}catch(Ue){Ur.error("confirmSelect failed",Ue)}},E=(G,ge,Ue)=>{try{if(c.value)return;G.stopPropagation(),h.focusingPosition===ge?S():Ue()}catch(ce){Ur.error("Error in toggleCalendar:",ce)}},D=G=>{n.value||(n.value=G),g.value||ee(),h.focusingPosition=G},O=G=>{try{G?E(G,"start",()=>D(ov.START)):D(ov.START)}catch(ge){Ur.error("Error in selectStartField:",ge)}},V=G=>{try{G?E(G,"end",()=>D(ov.END)):D(ov.END)}catch(ge){Ur.error("Error in selectEndField:",ge)}},P=()=>{try{if(c.value)return;i.value[0]="",p.value.start="",o.value.start="",C()}catch(G){Ur.error("Failed to clear start date",G)}},M=()=>{try{if(c.value)return;i.value[1]="",p.value.end="",o.value.end="",C()}catch(G){Ur.error("Failed to clear end date",G)}},C=()=>{try{if(c.value)return;const[G,ge]=[t.startDate?new Date(t.startDate||"").getTime():"",t.dueDate?new Date(t.dueDate||"").getTime():""],[Ue,ce]=[ci.isSameDay(i.value[0],G,f.value),ci.isSameDay(i.value[1],ge,f.value)];if(!(Ue&&ce))e("update",v.value);else throw Ur.warn("No changes detected for sync",{selectedRange:i.value,oldStart:G,oldEnd:ge,sameStart:Ue,sameEnd:ce}),new Error("no change")}catch(G){Ur.warn("Sync action failed",G)}},F=G=>{try{if(c.value)return;const ge=kk(()=>ci.standardize(G,"end",f.value),Ue=>Ur.error("Failed to update strict end",Ue));ge&&(i.value[1]=ge,h.focusingPosition="none",C(),S(),w())}catch(ge){Ur.error("updatestrictUpdate failed",ge)}},W=G=>{N.value=G},H=re(!0),j=G=>{H.value=!0;try{const ge=Number(G.getTime()),{end:Ue,start:ce}={end:()=>ci.standardize(ge,"end",f.value),start:()=>ci.standardize(ge,"start",f.value)};switch(!0){case y.value==="initiate":if(!i.value[0]&&!i.value[1]&&h.focusingPosition==="start"){o.value.start=ce(),i.value[0]=ce(),h.focusingPosition="end";return}else if(i.value[1]&&ge>Number(i.value[1])&&h.focusingPosition==="start"){o.value.start=ce(),o.value.end=Ue(),i.value[0]=ce(),i.value[1]=Ue(),h.focusingPosition="end";return}else o.value.start=ce(),i.value[0]=ce(),h.focusingPosition="end";break;case y.value==="strictUpdate":F(ge);break;case y.value==="update":h.focusingPosition==="end"?(ge<Number(o.value.start)?(o.value.start=ce(),o.value.end=Ue(),i.value[0]=ce(),i.value[1]=Ue()):(i.value[1]=Ue()||"",o.value.end=Ue()||""),h.focusingPosition="end"):(i.value[0]=ce()||"",o.value.start=ce()||""),h.focusingPosition="end";break;case y.value==="none":console.error("No date selected");break}}catch(ge){Ur.error("Error in selectStartDate:",ge)}},N=re(["",""]),U=G=>{H.value=!0;try{const ge=G.getTime(),Ue=ci.standardize(ge,"end",f.value);y.value==="strictUpdate"?F(ge):(i.value[1]=Ue,h.focusingPosition="end")}catch(ge){Ur.error("Error in selectEndDate:",ge)}},ee=()=>{var G;try{if(c.value)return;a.value=JSON.parse(JSON.stringify(i.value)),(G=r.value)==null||G.openMenu()}catch(ge){Ur.error("Error in handleOpenMenu:",ge)}},le=()=>{try{if(c.value)return;w()}catch(G){Ur.error("Error in callbackClosed:",G)}},_e=G=>{try{if(c.value)return;V(),fn(()=>{var ge;(ge=r.value)==null||ge.updateInternalModelValue([G,G])})}catch(ge){Ur.error("Error in handleInvalidRange:",ge)}},be=()=>{try{if(c.value)return;i.value=JSON.parse(JSON.stringify(a.value)),S()}catch(G){Ur.error("Error in cancelSelect:",G)}},Te=G=>{try{if(c.value)return;const ge=Array.isArray(G)&&G.length===1,Ue=Array.isArray(G)&&G.length===2,ce=G instanceof Date,Ye=G==null||Array.isArray(G)&&G.length===0,te=(ge||Ue)&&kk(()=>ci.standardize(G[0],"start",f.value))||"",ae=Ue&&kk(()=>ci.standardize(G[1],"end",f.value))||"",ne=ce&&kk(()=>ci.standardize(G,"start",f.value))||"";switch(!0){case(ce&&G instanceof Date):H.value&&(i.value=[ne,""]);break;case(ge&&h.focusingPosition==="start"):H.value&&(i.value=[te,""]);break;case(ge&&h.focusingPosition==="end"):H.value&&(i.value=["",te]);break;case Ue:H.value&&(i.value=[te,ae]);break;case Ye:i.value=["",""];break}}catch(ge){Ur.error("Error in handleUpdateModelValue:",ge)}},J=G=>{try{if(c.value||!G||G.length<=1)return;p.value={start:G[0].getTime(),end:G[1].getTime()}}catch(ge){Ur.error("Error in handleInternalModelChange:",ge)}},me=()=>{try{if(c.value)return;T(()=>ci.isValid(p.value.start)&&ci.isValid(p.value.end))}catch(G){Ur.error("Error in focusOut:",G)}},Ee=Z(()=>{try{if(c.value)return{partialRange:!0,hasStart:!1,hasEnd:!1,case:"initial",showLastInRange:!1};const G=h.focusingPosition,ge=ci.isValid(i.value[0],f.value),Ue=ci.isValid(i.value[1],f.value),ce={partialRange:!0,hasStart:ge,hasEnd:Ue,case:"initial",showLastInRange:h.focusingPosition==="end"};let Ye={};switch(!0){case(G==="end"&&!ge&&!Ue):Ye={fixedStart:!1,fixedEnd:!1,case:"no start"};break;case(G==="start"&&ge&&Ue):Ye={fixedStart:!1,fixedEnd:!0,case:"block end"};break;case(G==="end"&&Ue&&ge):Ye={fixedStart:!0,fixedEnd:!1,case:"block start"};break}return{...ce,...Ye}}catch(G){return Ur.error("Error in rangeConfig computed:",G),{partialRange:!0,hasStart:!1,hasEnd:!1,case:"initial",showLastInRange:!1}}}),Ce=Z(()=>{try{const G=i.value[0]?new Date(i.value[0]):"",ge=i.value[1]?new Date(i.value[1]):"",Ue=ci.isValid(i.value[0],f.value),ce=ci.isValid(i.value[1],f.value),Ye=ci.isValid(p.value.start,f.value),te=ci.isValid(p.value.end,f.value);let ae=[];return te&&Ye?ae=[]:Ue&&G&&!ce?ae=[cn.fromJSDate(G,{zone:f.value}).startOf("day").toJSDate()]:!Ue&&ge&&ce&&(ae=[cn.fromJSDate(ge,{zone:f.value}).endOf("day").toJSDate()]),{dates:ae}}catch(G){return Ur.error("Error in highlightedDate computed:",G),{dates:[]}}}),de=Z(()=>({teleport:t.teleport,disabled:t.disabled,format:t.shortFormat,timezone:f.value,enableTimePicker:!1,multiCalendars:t.multipleCalendar,modelAuto:!0,onClickOutside:T}));return Ge([()=>t.startDate,()=>t.dueDate],()=>{try{if(c.value)return;i.value=ci.getInitialRangeValue(t.startDate,t.dueDate,f.value),w()}catch(G){Ur.error("Watch error",{error:G,start:t.startDate,due:t.dueDate})}},Ek.WATCH_OPTIONS),Ge(()=>t.timezone,()=>{var G;try{if(c.value)return;i.value=ci.getInitialRangeValue(t.startDate,t.dueDate,t.timezone||Ek.DEFAULT_TIMEZONE),(G=r.value)==null||G.handleFlow()}catch(ge){Ur.error("Error in timezone watcher:",ge)}}),Ge(()=>i.value,()=>{try{if(c.value)return;p.value={start:i.value[0],end:i.value[1]}}catch(G){Ur.error("Error in selectedRange watcher:",G)}},Ek.SELECTION_WATCH_OPTIONS),Ks(()=>{try{l.value=!0,b()}catch(G){Ur.error("Error in onBeforeMount:",G)}}),Qa(()=>{try{c.value=!0,w(),r.value=null,i.value=["",""],a.value=["",""],o.value={start:"",end:""},p.value={start:"",end:""}}catch(G){Ur.error("Error in onUnmounted:",G)}}),{dateRangePickerRef:r,selectedRange:i,renderKey:s,isDestroyed:c,states:h,previewingDate:p,selectingRange:o,vueDatepickerConfiguration:de,rangeConfig:Ee,highlightedDate:Ce,datePickerMode:y,selectStartField:O,selectEndField:V,clearStartDate:P,clearEndDate:M,selectStartDate:j,selectEndDate:U,callbackClosed:le,handleInvalidRange:_e,cancelSelect:be,confirmSelect:_,handleUpdateModelValue:Te,handleInternalModelChange:J,cleanUp:w,handleClickOutside:T,focusOut:me,handleUpdateModelValueTz:W,drValue:N}},AOe={class:"rc__header flex flex-col items-center justify-center"},kOe={class:"rc__logo"},EOe={class:"rc__title text-center"},TOe={class:"rc__content"},DOe=["innerHTML"],OOe={class:"rc__hovered"},COe={class:"rc__hovered__main"},IOe={class:"rc__content"},MOe={class:"rc__actions flex items-center"},ROe=Qe({__name:"ReportCard",props:{name:{type:String,default:"Completed Scenes Report"},subTitle:{type:String,default:"Download a report that includes the completed scenes."},logo:{type:String,default:"ReportCompletedScenes"},isShowBackFlipTile:{type:Boolean,default:!1},minHeight:{type:String,default:"224px"},downloadBtnLabel:{type:String,default:"Download report"},description:{type:String,default:"Download a report that includes the completed scenes."}},emits:["update-state-flip","clicked-download-btn"],setup(t,{emit:e}){const n=t,r=e;function i(){r("clicked-download-btn")}function a(){r("update-state-flip",!n.isShowBackFlipTile)}function o(){n.isShowBackFlipTile||a()}const s=Z(()=>({"--report-card__min-height":n.minHeight}));return(l,c)=>(R(),Y("div",{class:"report-card rc",style:_t(s.value)},[X("div",{class:"rc__body w-full",onClick:o},[X("div",{class:Fe(["rc__wrapper",{hovering:t.isShowBackFlipTile}])},[X("div",AOe,[X("div",kOe,[he(qn,{class:"rc__logo--img",name:t.logo,type:"visual"},null,8,["name"])]),X("h3",EOe,it(t.name),1),he(dr,{class:"rc__header--flip",content:"Flip",delay:[300,0]},{default:ze(()=>[he(Nt,{class:"rc__header--btn-flip",type:"secondary",label:"","suffix-icon":t.isShowBackFlipTile?"CustomFlipBack":"CustomFlipFront",onClick:Rt(a,["stop"])},null,8,["suffix-icon"])]),_:1})]),It(X("div",TOe,[X("div",{class:"rc__sub-title",innerHTML:t.subTitle},null,8,DOe)],512),[[Ln,!t.isShowBackFlipTile]]),It(X("div",OOe,[X("div",COe,[ke(l.$slots,"content",{isShowBackFlipTile:t.isShowBackFlipTile},()=>[X("div",IOe,it(n.description),1)],!0)]),ke(l.$slots,"actions",{},()=>[X("div",MOe,[he(Nt,{class:"rc__actions--download-btn w-full",type:"primary",onClick:Rt(i,["stop"]),label:n.downloadBtnLabel},null,8,["label"])])],!0)],512),[[Ln,t.isShowBackFlipTile]])],2)])],4))}}),$ie=qt(ROe,[["__scopeId","data-v-c4f48e45"]]),$Oe=(t,e,n)=>{const r={truncate:"End date cleared because it was before start. Please pick an end date.",swap:"Dates auto-swapped because start was after end.",...t.messages},i=Ht({startDate:null,endDate:null,timezone:t.timezone||"UTC",format:t.format||"",isSelectingStart:!1,isSelectingEnd:!1,rangeFeedback:{status:"idle",action:null,message:""},cacheStartDate:null,cacheEndDate:null,isDirty:!1});Ks(()=>{var E;((E=t.modelValue)==null?void 0:E.length)===2&&(i.startDate=t.modelValue[0],i.endDate=t.modelValue[1]),i.cacheStartDate=i.startDate,i.cacheEndDate=i.endDate,i.isSelectingStart=!1,i.isSelectingEnd=!1,t.timezone&&(i.timezone=t.timezone)});const a=()=>{var E,D,O,V,P,M,C,F,W,H;e("tracing",JSON.parse(JSON.stringify(n.value))),e("update:start",i.startDate),e("update:end",i.endDate);const j={start:ci.toStructuredDate(((E=i.startDate)==null?void 0:E.getTime())||"",i.timezone),end:ci.toStructuredDate(((D=i.endDate)==null?void 0:D.getTime())||"",i.timezone)};(i.startDate||i.endDate)&&(e("legacyUpdate",j),e("update",[i.startDate,i.endDate])),i.isDirty=!(((V=(O=i.startDate)==null?void 0:O.getTime)==null?void 0:V.call(O))===((M=(P=i.cacheStartDate)==null?void 0:P.getTime)==null?void 0:M.call(P))&&((F=(C=i.endDate)==null?void 0:C.getTime)==null?void 0:F.call(C))===((H=(W=i.cacheEndDate)==null?void 0:W.getTime)==null?void 0:H.call(W)))},o=(E,D)=>{const O=cn.fromObject({year:E.year,month:E.month,day:E.day},{zone:i.timezone});return(D==="start"?O.startOf("day"):O.endOf("day")).toJSDate()},s=()=>{i.rangeFeedback.status="idle",i.rangeFeedback.action=null,i.rangeFeedback.message=""},l=E=>{t.enableRangeFeedback&&(i.rangeFeedback.status="corrected",i.rangeFeedback.action=E,i.rangeFeedback.message=E==="swap"?r.swap:r.truncate)},c=E=>{if(!(!i.startDate||!i.endDate)){if(i.startDate.getTime()<=i.endDate.getTime()){t.enableRangeFeedback&&s();return}if(E==="select-start"){const D={start:i.startDate,end:i.endDate};i.endDate=null,e("range:invalid",D),e("range:corrected",{start:i.startDate,end:i.endDate,action:"truncate"}),i.isSelectingEnd=!0,l("truncate"),t.enableRangeFeedback&&!i.rangeFeedback.message&&(i.rangeFeedback.message=r.truncate)}else{const D={start:i.startDate,end:i.endDate},O=i.startDate;i.startDate=i.endDate,i.endDate=O,e("range:invalid",D),e("range:corrected",{start:i.startDate,end:i.endDate,action:"swap"}),l("swap")}}},f=(E,D=!0)=>{t.disabled||t.readonly||(i.startDate=o(E,"start"),D?(i.isSelectingStart=!1,i.isSelectingEnd=!0):(i.isSelectingStart=!0,i.isSelectingEnd=!1),c("select-start"))},h=E=>{t.disabled||t.readonly||(i.endDate=o(E,"end"),c("select-end"))},p=()=>{t.disabled||t.readonly||(i.startDate=null,e("clearStart"),s(),a())},g=()=>{t.disabled||t.readonly||(i.endDate=null,e("clearDue"),s(),a())},y=()=>{t.disabled||t.readonly||i.isDirty||(i.cacheStartDate=i.startDate,i.cacheEndDate=i.endDate)},v=()=>{t.disabled||t.readonly||(i.cacheStartDate=i.startDate,i.cacheEndDate=i.endDate,i.isDirty=!1,a())},b=()=>{t.disabled||t.readonly||(i.startDate=i.cacheStartDate,i.endDate=i.cacheEndDate,s(),a(),i.isDirty=!1)},w=Z(()=>i.startDate?cn.fromJSDate(i.startDate,{zone:i.timezone}).toFormat(i.format):t.startPlaceholder),S=Z(()=>i.endDate?cn.fromJSDate(i.endDate,{zone:i.timezone}).toFormat(i.format):t.duePlaceholder),T=Z(()=>!i.startDate&&!t.disabled?t.startTooltip:!i.startDate&&(t.disabled||t.readonly)?t.startPlaceholder:i.startDate?cn.fromJSDate(i.startDate,{zone:i.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):t.startTooltip),_=Z(()=>!i.endDate&&!t.disabled?t.dueTooltip:!i.endDate&&(t.disabled||t.readonly)?t.startPlaceholder:i.endDate?cn.fromJSDate(i.endDate,{zone:i.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):t.dueTooltip);return{states:i,displayStartDate:w,displayEndDate:S,tooltipStartDate:T,tooltipEndDate:_,selectEndDate:h,selectStartDate:f,clearDue:g,clearStart:p,beginInteraction:y,confirmSelection:v,cancelSelection:b}},POe=["aria-disabled","aria-readonly"],LOe=["disabled","aria-expanded","aria-label"],NOe={key:1,class:"adpb-icon","aria-hidden":"true"},FOe=["aria-readonly"],VOe={key:0,class:"adpb-icon","aria-hidden":"true"},BOe=Qe({__name:"ArboDatePickerButton",props:{modelValue:{},format:{default:"LLL dd"},placeholder:{default:"Select date"},timezone:{default:"UTC"},active:{type:Boolean,default:!1},tooltip:{default:""},type:{},actual:{type:Boolean},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},showIcon:{type:Boolean,default:!0},size:{default:"medium"}},emits:["clear","open"],setup(t,{emit:e}){const n=na,r=t,i=Z(()=>r.disabled),a=Z(()=>r.readonly),o=e,s=Z(()=>{if(!r.modelValue)return"empty";const v=cn.fromJSDate(r.modelValue,{zone:r.timezone}),b=cn.now().setZone(r.timezone).startOf("day"),w=v.startOf("day").toISODate();return w===b.toISODate()?"today":w===b.plus({days:1}).toISODate()?"tomorrow":w===b.minus({days:1}).toISODate()?"yesterday":v<b?"past":v>b?"future":"actual"}),l=Z(()=>r.modelValue?s.value==="today"?"Today":s.value==="tomorrow"?"Tomorrow":s.value==="yesterday"?"Yesterday":cn.fromJSDate(r.modelValue,{zone:r.timezone}).toFormat(r.format):r.placeholder),c=Z(()=>!!r.showIcon),f=Z(()=>!!r.modelValue&&!r.disabled&&!r.readonly),h=Z(()=>{let v=0;return f.value&&v++,c.value&&v++,v}),p=Z(()=>({"--adp-icon-count":h.value}));function g(){r.disabled||r.readonly||o("clear")}function y(){r.disabled||r.readonly||o("open")}return(v,b)=>!i.value&&!a.value?(R(),Y("div",{key:0,class:Fe(["arbo-date-picker-button",{"has-value":!!t.modelValue,active:t.active,disabled:i.value,readonly:a.value,"has-clear":f.value,"has-icon":c.value,small:r.size==="small"}]),style:_t(p.value),"aria-disabled":i.value?"true":"false","aria-readonly":a.value?"true":"false",role:"group",onClick:y},[It((R(),Y("button",{class:Fe(["adpb-main",{"is-empty":!t.modelValue}]),type:"button",disabled:i.value||a.value,"aria-haspopup":"dialog","aria-expanded":t.active?"true":"false","aria-label":`${t.type==="start"?"Start date":"End date"} picker`,onFocus:y},[X("span",{class:Fe(["adpb-label",[`${t.type}-${s.value}`,t.actual?"actual":""]])},it(l.value),3)],42,LOe)),[[q(n),{content:r.tooltip||l.value}]]),f.value?(R(),Re(q(Nt),{key:0,size:"small",label:"","prefix-icon":"Xmark",type:"primary",disabled:r.disabled,"prefix-tooltip":"Clear",class:"adpb-clear","aria-haspopup":"dialog","aria-expanded":t.active?"true":"false","aria-label":`${t.type==="start"?"Start date":"End date"} picker`,onClick:Rt(g,["stop"])},null,8,["disabled","aria-expanded","aria-label"])):pe("",!0),c.value?(R(),Y("span",NOe,[he(q(qn),{name:"Calendar"})])):pe("",!0)],14,POe)):(R(),Y("div",{key:1,class:Fe(["arbo-date-picker-button view-only",{"has-value":!!t.modelValue,active:t.active,disabled:i.value,readonly:a.value,"has-clear":!1,"has-icon":c.value,small:r.size==="small"}]),style:_t(p.value),"aria-disabled":"true","aria-readonly":a.value?"true":"false",role:"group"},[It((R(),Y("button",{class:Fe(["adpb-main",{"is-empty":!t.modelValue}]),type:"button",disabled:""},[X("span",{class:Fe(["adpb-label",[`${t.type}-${s.value}`,t.actual?"actual":""]])},it(l.value),3)],2)),[[q(n),{content:r.tooltip||l.value}]]),c.value?(R(),Y("span",VOe,[he(q(qn),{name:"Calendar"})])):pe("",!0)],14,FOe))}}),p9=qt(BOe,[["__scopeId","data-v-8c0ff777"]]);/*!
|
|
107
107
|
* vue-tippy v6.7.1
|
|
108
108
|
* (c) 2025
|
|
109
109
|
* @license MIT
|
|
@@ -170,7 +170,7 @@ Component that was made reactive: `,t)),K6e(t,e,n,r,i,o,a,!0)}function Z6e(t){re
|
|
|
170
170
|
*
|
|
171
171
|
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
|
|
172
172
|
* Released under the MIT license
|
|
173
|
-
*/var K7;function Mze(){return K7||(K7=1,function(t,e){(function(n){var r;if(t.exports=n(),r=!0,!r){var i=window.Cookies,a=window.Cookies=n();a.noConflict=function(){return window.Cookies=i,a}}})(function(){function n(){for(var a=0,o={};a<arguments.length;a++){var s=arguments[a];for(var l in s)o[l]=s[l]}return o}function r(a){return a.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function i(a){function o(){}function s(c,f,h){if(!(typeof document>"u")){h=n({path:"/"},o.defaults,h),typeof h.expires=="number"&&(h.expires=new Date(new Date*1+h.expires*864e5)),h.expires=h.expires?h.expires.toUTCString():"";try{var p=JSON.stringify(f);/^[\{\[]/.test(p)&&(f=p)}catch{}f=a.write?a.write(f,c):encodeURIComponent(String(f)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),c=encodeURIComponent(String(c)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var g="";for(var y in h)h[y]&&(g+="; "+y,h[y]!==!0&&(g+="="+h[y].split(";")[0]));return document.cookie=c+"="+f+g}}function l(c,f){if(!(typeof document>"u")){for(var h={},p=document.cookie?document.cookie.split("; "):[],g=0;g<p.length;g++){var y=p[g].split("="),v=y.slice(1).join("=");!f&&v.charAt(0)==='"'&&(v=v.slice(1,-1));try{var b=r(y[0]);if(v=(a.read||a)(v,b)||r(v),f)try{v=JSON.parse(v)}catch{}if(h[b]=v,c===b)break}catch{}}return c?h[c]:h}}return o.set=s,o.get=function(c){return l(c,!1)},o.getJSON=function(c){return l(c,!0)},o.remove=function(c,f){s(c,"",n(f,{expires:-1}))},o.defaults={},o.withConverter=i,o}return i(function(){})})}(EN)),EN.exports}var Rze=Mze();const i_=h6(Rze),G7=300,jA=T_("snackbarStore",()=>{const t=re(void 0),e=(a,o)=>{const s=JSON.parse(JSON.stringify(a));s.bgColor=o?"#FF5200":"#02C39A",s.prefixIcon=o?"TriangleExclamation":"Check",t.value={...s,duration:s.duration||8e3}},n=RS(a=>{e(a,!0)},G7),r=RS(a=>{e(a,!1)},G7);return{contentSnackBar:t,hideSnackBar:()=>{t.value=void 0},showErrorSnackbar:n,showSuccessSnackbar:r}});var Yl=(t=>(t[t.CONTINUE=100]="CONTINUE",t[t.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",t[t.PROCESSING=102]="PROCESSING",t[t.OK=200]="OK",t[t.CREATED=201]="CREATED",t[t.ACCEPTED=202]="ACCEPTED",t[t.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",t[t.NO_CONTENT=204]="NO_CONTENT",t[t.RESET_CONTENT=205]="RESET_CONTENT",t[t.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",t[t.MULTI_STATUS=207]="MULTI_STATUS",t[t.ALREADY_REPORTED=208]="ALREADY_REPORTED",t[t.IM_USED=226]="IM_USED",t[t.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",t[t.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",t[t.FOUND=302]="FOUND",t[t.SEE_OTHER=303]="SEE_OTHER",t[t.NOT_MODIFIED=304]="NOT_MODIFIED",t[t.USE_PROXY=305]="USE_PROXY",t[t.SWITCH_PROXY=306]="SWITCH_PROXY",t[t.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",t[t.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",t[t.BAD_REQUEST=400]="BAD_REQUEST",t[t.UNAUTHORIZED=401]="UNAUTHORIZED",t[t.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",t[t.FORBIDDEN=403]="FORBIDDEN",t[t.NOT_FOUND=404]="NOT_FOUND",t[t.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",t[t.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",t[t.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",t[t.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",t[t.CONFLICT=409]="CONFLICT",t[t.GONE=410]="GONE",t[t.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",t[t.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",t[t.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",t[t.URI_TOO_LONG=414]="URI_TOO_LONG",t[t.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",t[t.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",t[t.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",t[t.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",t[t.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",t[t.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",t[t.LOCKED=423]="LOCKED",t[t.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",t[t.TOO_EARLY=425]="TOO_EARLY",t[t.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",t[t.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",t[t.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",t[t.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",t[t.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",t[t.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",t[t.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",t[t.BAD_GATEWAY=502]="BAD_GATEWAY",t[t.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",t[t.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",t[t.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",t[t.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",t[t.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",t[t.LOOP_DETECTED=508]="LOOP_DETECTED",t[t.NOT_EXTENDED=510]="NOT_EXTENDED",t[t.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",t))(Yl||{});const $ze={BASE_URL:"/pt",DEV:!0,MODE:"production",PROD:!1,SSR:!1,VITE_API_URL:"https://api.dev.arbocollab.com/api/v1",VITE_APP_BASE_PATH:"/pt",VITE_APP_REVIEW_BASE_URL:"https://review.dev.arbocollab.com",VITE_APP_WEBPAGE_TITLE:"People Insights | ARBO",VITE_BASE_URL:"https://app.dev.arbocollab.com",VITE_FAVICON_FILENAME:"favicon-arbo",VITE_FAVICON_VERSION:"v1"},co={info:(t,e)=>{console.info(`[AXIOS-INFO] ${t}`,e||"")},error:(t,e)=>{console.error(`[AXIOS-ERROR] ${t}`,e||"")},warn:(t,e)=>{console.warn(`[AXIOS-WARN] ${t}`,e||"")},debug:(t,e)=>{console.debug(`[AXIOS-DEBUG] ${t}`,e||"")}},Ile=()=>window.location.href,Z7=window.self!==window.top,Q7=yn(),Pze=[/^\/workspace\/[^/]+\/tile\/people\/ws-user-roles\/[^/]+\/basic-info$/i],Lze=()=>{try{return jA()}catch(t){return co.warn("Failed to get snackbar store",t),null}},Tb=(t,e)=>{const n=Lze();if(!n){co.warn("Snackbar not available, notification not shown",{type:t,message:e});return}try{t==="success"?n.showSuccessSnackbar({label:e}):n.showErrorSnackbar({label:e})}catch(r){co.error("Failed to show notification",{type:t,message:e,error:r})}};function Nze(){i_.set("account.last_access_url_people_tile",Ile()),window.self!==window.top||document.querySelector(":host")?co.info("Inside shadow DOM or iframe detected"):window.location.replace(`${a_("BASE_URL","https://api.dev.arbocollab.com/api/v1")}/login`)}const Fze=i_.get("account.token");Fze||Nze();const X7=()=>a_("BASE_URL","https://app.dev.arbocollab.com"),Mle=g6e({accessTokenKey:"account.token",refreshTokenKey:"account.refresh_token",domain:void 0,secure:window.location.protocol==="https:",sameSite:"lax",refreshTokenFn:async t=>{try{const e=await xn.refreshToken({refresh_token:t});return co.info("Calling token refresh",{tokenPrefix:t.substring(0,5)+"..."}),{access_token:e.access_token,refresh_token:e.refresh_token,expires_in:e.expires_in}}catch(e){throw Tb("error","Token refresh failed"),co.error("Token refresh failed",e),e}},onRefreshSuccess:t=>{Tb("success","Token refresh successful"),HA.defaults.headers.common.Authorization=`Bearer ${t.access_token}`},onRefreshFailure:t=>{co.error("Token refresh failed permanently",t),Tb("error","Token refresh failed"),Z7?window.parent.postMessage({type:"TOKEN_EXPIRED",message:"Authentication token has expired"},"*"):window.location.replace(`${X7()}/start`)},onCrossTabLogout:t=>{co.info("Cross-tab logout event received",{reason:t}),Z7?window.parent.postMessage({type:"TOKEN_EXPIRED",message:"Authentication token has expired"},"*"):window.location.replace(`${X7()}/start`),i_.set("account.last_access_url_people_tile",Ile(),{domain:void 0})},maxRetries:5,retryDelay:500,backoffFactor:1.5,storage:void 0});function Vze(t){t.headers={...t.headers,"ws-code":Q7,ws_code:Q7,"Access-Control-Allow-Origin":"*","Access-Control-Allow-Headers":"*","Accept-Language":"*","Content-Type":"application/json"}}function NC(t){const e=i_.get("account.token"),n=i_.get("ws.user-access-id");return Vze(t),t.headers.Authorization=`Bearer ${e}`,Pze.some(i=>i.test(t.url||""))&&(t.headers.tracking=`view,people,${n}`),t}function YB(t,e){var i,a;co.error(`Redirecting to ${t} page due to error`,{url:(i=e.config)==null?void 0:i.url,method:(a=e.config)==null?void 0:a.method,statusCode:t});const n=a_("API_BASE_URL","https://app.dev.arbocollab.com"),r=a_("module.alias","/pt");n?window.location.replace(`${n}${r}/${t}`):window.location.replace(`${r}/${t}`)}function V_(t){var n,r,i,a,o;if(t.code==="ERR_NETWORK")throw co.error("Network error detected",{message:t.message,url:(n=t.config)==null?void 0:n.url}),Tb("error","Network connection error. Please check your internet connection."),new Error("Network error");if(t.code==="ECONNABORTED")throw co.error("Request timeout",{url:(r=t.config)==null?void 0:r.url,timeout:(i=t.config)==null?void 0:i.timeout}),Tb("error","Request timed out. Please try again."),new Error("Request timeout");const e=Number(t.status);if(e===Yl.FORBIDDEN||e===Yl.NOT_FOUND)YB(String(e),t);else throw co.error("HTTP error",{status:e,code:t.code,url:(a=t.config)==null?void 0:a.url,method:(o=t.config)==null?void 0:o.method}),new Error(t.code)}function Rle(t){const{status:e,data:n,config:r}=t;switch(co.debug("API response received",{status:e,url:r.url,method:r.method}),e){case Yl.OK:case Yl.CREATED:case Yl.ACCEPTED:case Yl.NO_CONTENT:return n;case Yl.UNAUTHORIZED:case Yl.BAD_REQUEST:throw co.warn("Client error in response",{status:e,url:r.url}),Tb("error",(n==null?void 0:n.message)||"Request failed"),new Error(n.message||"An error occurred");case Yl.FORBIDDEN:throw co.warn("Forbidden response, triggering redirect",{url:r.url}),YB("403",t.data),new Error(n.message||"An error occurred");case Yl.NOT_FOUND:throw co.warn("Not found response, triggering redirect",{url:r.url}),YB("404",t.data),new Error(n.message||"An error occurred");case Yl.TOO_EARLY:throw co.warn("Too early response",{url:r.url}),new Error(n.message||"An error occurred");default:return e>=200&&e<300||co.warn("Unexpected response status",{status:e,url:r.url}),n}}function a_(t,e){const n=sessionStorage.getItem(t)||$ze[t.replace("API_","VITE_API_").replace("_URL","_URL")];return(n==null?void 0:n.length)>0?n:e}const HA=ta.create(),$le=ta.create(),FC=ta.create(),Ple={retryStatusCodes:[401,425],tokenExpiredDetection:t=>{var r,i,a,o,s,l,c;const e=(r=t==null?void 0:t.response)==null?void 0:r.status,n=(a=(i=t==null?void 0:t.response)==null?void 0:i.data)==null?void 0:a.error.toString();if(e===401){if(((s=(o=t==null?void 0:t.response)==null?void 0:o.data)==null?void 0:s.error)==="user_not_exists"||((c=(l=t==null?void 0:t.response)==null?void 0:l.data)==null?void 0:c.error)==="blocked")return!1;if(n==="token_expired"||n==="empty_token")return!0}return e===425}};Wse(HA,Mle,Ple);Wse($le,Mle,Ple);$le.interceptors.request.use(t=>NC(t),V_);HA.interceptors.request.use(t=>(t.baseURL=a_("API_BASE_URL","https://api.dev.arbocollab.com/api/v1"),NC(t)),V_);FC.interceptors.request.use(t=>(t.baseURL=a_("API_REVIEW_URL",void 0),NC(t)),V_);HA.interceptors.response.use(Rle,V_);FC.interceptors.request.use(NC,V_);FC.interceptors.response.use(Rle,V_);const Un={apiClient:HA,apiReviewV2Client:FC},tE={VIEW_PROJECT:"project_getProjectDirectoryUserInterface_read",VIEW_REVIEW:"media_getReviewUserInterface_read",VIEW_UPDATE:"update_getUpdateUserInterface_read",VIEW_WOOHOO:"woohoo_getWoohooUserInterface_read"},fr=T_("data",{state:()=>({selectedDataId:"",basicInfo:{},isLoadingProfile:!1,sceneDetailFetch:{status_type_in:"",selectedSceneId:"",fetchType:"",include_archived:0,sceneTotal:0,sceneSortType:"id",sceneOrder:"asc",searchScene:"",isTreemapLastLevel:!1,previousSelectedSceneId:"",privateSceneTotal:0},commentDetailFetch:{commentSortType:"id",commentOrder:"asc",searchComment:""},viewingReport:"",currentTab:"people-home",isLoadingFetchData:!1,permissionList:[],userInfo:{}}),getters:{permissionMap:t=>({redirectPermission:{review:t.permissionList.includes(tE.VIEW_REVIEW),project:t.permissionList.includes(tE.VIEW_PROJECT),woohoo:t.permissionList.includes(tE.VIEW_WOOHOO),update:t.permissionList.includes(tE.VIEW_UPDATE),scene_hub:!0}})},actions:{setSelectedDataId(t){this.selectedDataId=t},setSelectedDataProfile(t){this.basicInfo=t},setIsLoadingProfile(t){this.isLoadingProfile=t},setSceneDetailFetch(t){this.sceneDetailFetch={...this.sceneDetailFetch,...t}},setCommentDetailFetch(t){this.commentDetailFetch={...this.commentDetailFetch,...t}},resetSceneDetail(t=[]){const e={include_archived:0,sceneSortType:"id",sceneOrder:"asc",searchScene:""};Object.keys(e).forEach(n=>{t.includes(n)||(this.sceneDetailFetch[n]=e[n])})},resetCommentDetail(t=[]){const e={commentSortType:"id",commentOrder:"asc"};Object.keys(e).forEach(n=>{t.includes(n)||(this.commentDetailFetch[n]=e[n])})},setCurrentViewReport(t){this.viewingReport=t},setCurrentActiveTab(t){this.currentTab=t},setLoadingFetchData(t){this.isLoadingFetchData=t},setPermission(t){this.permissionList=t},setUserInfo(t){this.userInfo=t}}}),TN=t=>{const e=Object.fromEntries(new Map(t.entries()));return new URLSearchParams(e)};class Bze{getItems(e,n=20){const r=Bn.GET_ITEMS.replace("{ws_code}",yn()).replace("{page}",e.toString()).replace("{per_page}",n.toString());return Un.apiClient.get(r)}getChartData(e,n){const r=Bn.GET_CHART_DATA.replace("{ws_code}",yn()).replace("{id}",e.toString());return Un.apiClient.post(r,{include_chart:n})}getUserListProfile(e,n,r,i=""){const a=Bn.GET_USER_PROFILE_LIST.replace("{ws_code}",yn()).replace("{page}",e.toString()).replace("{per_page}",n.toString()).replace("{include_wur_id}",r.toString()).replace("{display_name_and_email_like}",i.toString());return Un.apiClient.get(a)}getUserBasicInfo(e){const n=Bn.GET_BASIC_INFO.replace("{ws_code}",yn()).replace("{WS_USER_ROLE_ID}",e.toString());return Un.apiClient.get(n)}getUserPermission(e=1){const n=Bn.USER_PERMISSION.replace("{ws_code}",yn()).replace("{is_newly}",e.toString());return Un.apiClient.get(n)}getUserProfile(){const e=Bn.USER_PROFILE;return Un.apiClient.get(e)}refreshToken(e){const n=Bn.REFRESH_TOKEN,r=typeof e=="object"?e:{refresh_token:e};return Un.apiClient.post(n,r).then(i=>({access_token:i.access_token,refresh_token:i.refresh_token,expires_in:i.expires_in})).catch(i=>Promise.reject(i))}getUnresolveAssignedComment({id:e,page:n,perPage:r=10,include:i,assignedAt:a,sortByType:o,sortOrder:s,before_id:l,searchText:c},f){const h=Bn.GET_UNRESOLVE_ASSIGNED_COMMENTS.replace("{ws_code}",yn()).replace("{WS_USER_ROLE_ID}",e.toString()).replace("{include}",i.toString());let p=new URLSearchParams;if(n&&p.append("page",n.toString()),r&&p.append("per_page",r.toString()),i&&p.append("include",i.toString()),a&&p.append("assigned_at_btw",a.toString()),l&&p.append("before_id",l.toString()),o&&s){const y=`${o}-${s}`;p.append("order_by",y.toString())}Object.entries(Kk).forEach(([y,v])=>{v&&p.append(y,String(v))}),f&&Object.entries(f).forEach(([y,v])=>{v&&p.append(y,String(v))}),p=TN(p),c&&p.append("comment_raw_like",c.toString());const g=`${h}?${p.toString()}`;return Un.apiClient.get(g)}getResolveAssignedComment({id:e,page:n,perPage:r=10,include:i,assignedAt:a,sortByType:o,sortOrder:s,searchText:l}){const c=Bn.GET_RESOLVE_ASSIGNED_COMMENTS.replace("{ws_code}",yn()).replace("{WS_USER_ROLE_ID}",e.toString()).replace("{include}",i.toString()),f=new URLSearchParams;if(n&&f.append("page",n.toString()),r&&f.append("per_page",r.toString()),i&&f.append("include",i.toString()),a&&f.append("assigned_at_btw",a.toString()),o&&s){const p=`${o}-${s}`;f.append("order_by",p.toString())}Object.entries(Kk).forEach(([p,g])=>{g&&f.append(p,String(g))}),l&&f.append("comment_raw_like",l.toString());const h=`${c}?${f.toString()}`;return Un.apiClient.get(h)}getAssignedTreeMapData(e,n="status",r="",i="",a="",o="",s,l){const c=Bn.GET_ASSIGNED_TREEMAP.replace("{ws_code}",yn()).replace("{WS_USER_ROLE_ID}",e.toString()),f=new URLSearchParams;f.append("treemap_type",n.toString()),l!==""&&l==="fromStatus"?r&&f.append("template_flow_status_id_eq",r.toString()):l!==""&&l==="fromEntity"&&r&&f.append("entity_id_eq",r.toString()),i&&f.append("entity_type_code_eq",i.toString()),a&&f.append("template_flow_status_type_in",a.toString()),o&&f.append("excluded_ids_in",o.toString()),s===1&&f.append("include_archived",s.toString());const h=`${c}?${f.toString()}`;return Un.apiClient.get(h)}getCommonItems({id:e,page:n,perPage:r=20,selectedId:i="",templateFlowType:a="",includeArchived:o,fetchType:s,sortByType:l,sortOrder:c,searchText:f="",dueDateNul:h="",actualDueDateNul:p="",actualDueDateNnul:g="",dueDateBtw:y="",actualDueDateBtw:v=""},b){const w=Bn.GET_COMMON_ITEMS.replace("{ws_code}",yn()).replace("{WS_USER_ROLE_ID}",e.toString());let S=new URLSearchParams;n&&S.append("page",n.toString()),r&&S.append("per_page",r.toString()),a&&S.append("template_flow_status_type_in",a.toString());const T=fr();if(s!==""&&s==="status")if(!T.sceneDetailFetch.isTreemapLastLevel)i&&S.append("template_flow_status_id_eq",i.toString());else{const E=T.sceneDetailFetch.previousSelectedSceneId;i&&S.append("entity_id_eq",i.toString()),E&&S.append("template_flow_status_id_eq",E.toString())}else if(s!==""&&s==="entity")if(!T.sceneDetailFetch.isTreemapLastLevel)i&&S.append("entity_id_eq",i.toString());else{const E=T.sceneDetailFetch.previousSelectedSceneId;E&&S.append("entity_id_eq",E.toString()),i&&S.append("template_flow_status_id_eq",i.toString())}if(o===1&&S.append("include_archived",o.toString()),f!==""&&S.append("name_like",f.toString()),l&&c)if(l==="template_flow_status.position"){const E=`${l}-${c}`;S.append("sort_by",E.toString())}else{const E=`item.${l}-${c}`;S.append("sort_by",E.toString())}h&&S.append("due_date_nul",h.toString()),p&&S.append("actual_due_date_nul",p.toString()),g&&S.append("actual_due_date_nnul",g.toString()),y&&S.append("due_date_btw",y.toString()),v&&S.append("actual_due_date_btw",v.toString()),S.append("include_permission","1"),Object.entries(Kk).forEach(([E,D])=>{D&&S.append(E,String(D))}),b&&Object.entries(b).forEach(([E,D])=>{D&&S.append(E,String(D))}),S=TN(S);const _=`${w}?${S.toString()}`;return Un.apiClient.get(_)}resolveComment(e,n,r){const i=Bn.RESOLVE_COMMENT.replace("{ws_code}",yn()).replace("{id}",e.toString()).replace("{item_id}",n.toString()).replace("{comment_id}",r.toString());return Un.apiReviewV2Client.post(i)}getTemplateFlows(e,n,r="",i=1,a=1){const o=Bn.TEMPLATE_FLOW_STATUS.replace("{ws_code}",yn()).replace("{page}",e.toString()).replace("{per_page}",n.toString()).replace("{search_like}",r.toString()).replace("{status_eq}",a.toString()).replace("{is_deployed_eq}",i.toString());return Un.apiClient.get(o)}getStatusTemplateList(e,n,r=""){const i=Bn.TEMPLATE_FLOW_STATUS_LIST.replace("{ws_code}",yn()).replace("{page}",e.toString()).replace("{per_page}",n.toString()).replace("{search_like}",r.toString());return Un.apiClient.get(i)}getMetricList(e,n,r="",i="metric_type"){const a=Bn.LIST_METRIC.replace("{ws_code}",yn()).replace("{page}",e.toString()).replace("{per_page}",n.toString()).replace("{name_like}",r.toString()).replace("{include}",i.toString());return Un.apiClient.get(a)}getCompletedSceneReport(e,n,r="and"){const i=Bn.COMPLETED_SCENE_REPORT.replace("{ws_code}",yn()),a=new URLSearchParams;e&&a.append("time_range_btw",e.toString()),n&&a.append("assignee_id_ina",n.toString()),r&&a.append("condition_combine_type",r.toString());const o=`${i}?${a.toString()}`;return Un.apiClient.get(o)}getOverdueSceneReport(e){const n=Bn.OVERDUE_SCENE_REPORT.replace("{ws_code}",yn()),r=new URLSearchParams;e&&r.append("assignee_id_ina",e.toString());const i=`${n}?${r.toString()}`;return Un.apiClient.get(i)}getSceneStatusReport(e,n="",r,i="and"){const a=Bn.SCENE_STATUS_REPORT.replace("{ws_code}",yn()),o=new URLSearchParams;e&&o.append("template_flow_status_id_ina",e.toString()),r&&o.append("assignee_id_ina",r.toString()),n&&o.append("status_types",n.toString()),i&&o.append("condition_combine_type",i.toString());const s=`${a}?${o.toString()}`;return Un.apiClient.get(s)}getAssigneeAchievementReport(e,n,r="and"){const i=Bn.ASSIGNEE_ACHIEVEMENT_REPORT.replace("{ws_code}",yn()),a=new URLSearchParams;e&&a.append("time_range_btw",e.toString()),n&&a.append("assignee_id_ina",n.toString()),r&&a.append("condition_combine_type",r.toString());const o=`${i}?${a.toString()}`;return Un.apiClient.get(o)}getUserInvolvementReport(e,n,r="and"){const i=Bn.USER_INVOLVEMENT_REPORT.replace("{ws_code}",yn()),a=new URLSearchParams;e&&a.append("active_time_range_btw",e.toString()),n&&a.append("assignee_id_ina",n.toString()),r&&a.append("condition_combine_type",r.toString());const o=`${i}?${a.toString()}`;return Un.apiClient.get(o)}getSceneAssignementReport(e,n,r="and"){const i=Bn.SCENE_ASSIGNMENT_REPORT.replace("{ws_code}",yn()),a=new URLSearchParams;e&&a.append("time_range_btw",e.toString()),n&&a.append("assignee_id_ina",n.toString()),r&&a.append("condition_combine_type",r.toString());const o=`${i}?${a.toString()}`;return Un.apiClient.get(o)}getMetricReport(e,n,r="and"){const i=Bn.METRIC_REPORT.replace("{ws_code}",yn()),a=new URLSearchParams;e&&a.append("metric_id_eq",e.toString()),n&&a.append("assignee_id_ina",n.toString()),r&&a.append("condition_combine_type",r.toString());const o=`${i}?${a.toString()}`;return Un.apiClient.get(o)}updateScene(e,n){const r=Bn.UPDATE_SCENE.replace("{ws_code}",yn()).replace("{scene_id}",e);return Un.apiClient.put(r,n)}getAssignableUsers(e,n){const r=Bn.GET_ASSIGNABLE_USERS.replace("{ws_code}",yn()).replace("{scene_id}",e),i=new URLSearchParams;Object.entries(n).forEach(([o,s])=>{s&&i.append(o,String(s))});const a=`${r}?${i.toString()}`;return Un.apiClient.get(a)}updateAssigneesUsers(e,n){const r=Bn.UPDATE_ASSIGNEES_USERS.replace("{ws_code}",yn());return Un.apiClient.post(r,{item_ids:[e],ws_user_role_ids:n})}deleteScene(e){const n=Bn.DELETE_SCENE.replace("{ws_code}",yn()).replace("{scene_id}",e);return Un.apiClient.delete(n)}getAssignableStatus(e,n){const r=Bn.GET_ASSIGNABLE_STATUS.replace("{ws_code}",yn());return Un.apiClient.post(r,{item_ids:[e],name_like:n.name_like||"",page:n.page,per_page:10})}getSceneDetail(e,n){const r=Bn.GET_SCENE_DETAIL.replace("{ws_code}",yn()).replace("{scene_id}",e),i=new URLSearchParams;Object.entries(n).forEach(([o,s])=>{s&&i.append(o,String(s))});const a=`${r}?${i.toString()}`;return Un.apiClient.get(a)}assignUser(e,n){const r=Bn.ASSIGN_USER.replace("{ws_code}",yn());return Un.apiClient.post(r,{ws_user_role_ids:n,item_ids:[e]})}unAssignUser(e,n){const r=Bn.UNASSIGN_USER.replace("{ws_code}",yn()).replace("{scene_id}",e);return Un.apiClient.delete(r,{data:{ws_user_role_ids:n,item_ids:[e]}})}getPeopleCard(e){const n=Bn.DASHBOARD.replace("{ws_code}",yn()).replace("{id}",e.toString()),r=new URLSearchParams;Object.entries({include:"assigned_scenes,point_pool,unresolved_comments,overdue_scenes,completed_scenes_last_7_days,"}).forEach(([o,s])=>{s&&r.append(o,String(s))});const a=`${n}?${r.toString()}`;return Un.apiClient.get(a)}getPeopleDashboardData(e,n,r){const i=Bn.DASHBOARD.replace("{ws_code}",yn()).replace("{id}",String(e));let a=new URLSearchParams;const o={"comments.latest":jx,"comments.recently_resolved":jx,"recent_activities.new_renditions":"attachments,ws_creator","recent_activities.accessed_scenes":"item.point_metric,item.ws_creator,item.template_flow_status,item.item_user_roles.ws_user_role,item.assignees"},s={include:n+","+o[n],include_entity_path:1,include_permission:1};Object.entries(s).forEach(([c,f])=>{f&&a.append(c,String(f))}),Object.entries(Kk).forEach(([c,f])=>{f&&a.append(c,String(f))}),r&&Object.entries(r).forEach(([c,f])=>{f&&a.append(c,String(f))}),a=TN(a);const l=`${i}?${a.toString()}`;return Un.apiClient.get(l)}deleteRendition(e,n){const r=Bn.DELETE_RENDITION.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{rendition_id}",n);return Un.apiClient.delete(r)}getCommentAssignableUser(e,n,r,i){const a=Bn.GET_ASSIGNABLE_USERS.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n),o={page:r||1,per_page:10};return i&&(o.display_name_like=i),Un.apiClient.get(a,{params:o})}getMentionableUsers(e,n){const r=Bn.GET_ASSIGNABLE_USERS.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n);return Un.apiClient.get(r)}resolveCommentApi(e,n){const r=Bn.RESOLVE_COMMENT_API.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n);return Un.apiReviewV2Client.post(r)}unResolveCommentApi(e,n){const r=Bn.UN_RESOLVE_COMMENT.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n);return Un.apiReviewV2Client.post(r)}deleteCommentApi(e,n){const r=Bn.DELETE_COMMENT.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n);return Un.apiClient.delete(r)}reactToComment({scene_id:e,comment_id:n,reaction:r}){const i=Bn.REACT_TO_COMMENT.replace("{ws_code}",yn());return Un.apiClient.post(i,{model_type:"item_comment",item_id:e,model_id:n,emoji:r})}updateReactToComment({scene_id:e,comment_id:n,reaction:r,reaction_id:i}){const a=Bn.UPDATE_REACT_TO_COMMENT.replace("{ws_code}",yn()).replace("{reaction_id}",i);return Un.apiClient.put(a,{model_type:"item_comment",model_id:n,emoji:r,item_id:e})}deleteReactToComment(e){const n=Bn.DELETE_REACT_TO_COMMENT.replace("{ws_code}",yn()).replace("{reaction_id}",e);return Un.apiClient.delete(n)}assignUserApi(e,n,r){const i=Bn.ASSIGN_COMMENT_USER_API.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n);return Un.apiReviewV2Client.post(i,{assigned_id:r})}getNextRendition(e,n){const r=Bn.DASHBOARD.replace("{ws_code}",yn()).replace("{id}",String(e)),i=new URLSearchParams;Object.entries({include:"recent_activities.new_renditions,attachments,ws_creator,item",before_id:n,include_entity_path:1,per_page:5,include_permission:1}).forEach(([s,l])=>{l&&i.append(s,String(l))});const o=`${r}?${i.toString()}`;return Un.apiClient.get(o)}downloadFileFromS3(e){const n=Bn.GET_RESOURCE_API.replace("{ws_code}",yn()),r={item_id:e.scene_id,path:e.path};return Un.apiClient.get(n,{params:r})}getCommentDetail({comment_id:e,scene_id:n}){const r=Bn.GET_COMMENT_DETAIL.replace("{ws_code}",yn()).replace("{comment_id}",e.toString()).replace("{scene_id}",n.toString());return Un.apiClient.get(r,{params:{include:jx}})}getWSUserProfile(){const e=Bn.GET_WS_USER_PROFILE.replace("{ws_code}",yn());return Un.apiClient.get(e)}}const xn=new Bze,ks=T_("dashboardStore",()=>{const t=re(null),e=a=>{t.value=a},n=re(!0),r=Ht({comment_recent:!1,comment_resolved:!1,rendition:!1,scene:!1,people_comment:!1,assigned_scene:!1,chart:!1});return{dashboardData:t,getDashboardData:async a=>{const o=await xn.getPeopleCard(a);e(o)},refreshState:r,isBrowserActive:n}});var _l=(t=>(t.WHITE="#F3F5F8",t.RED="#FFD4C1",t.YELLOW="#FDE8B0",t.GREEN="#CCF3EB",t.BLUE="#A3D4F5",t.TEXT_GENERAL="#232323",t.ICON_GENERAL="#A6A6A6",t))(_l||{});const Lle=([t,e])=>{const n=t+e,r=t/n*360;return r==180?0:r<90||r>90&&r<180?90-r/2:r>180?r-180/2*-1:r/2},Nle=({rotation:t,handleRedirect:e,interactive:n})=>({type:"pie",options:{rotation:t,responsive:!0,onHover:n?(r,i)=>{const a=r.chart;i.length>0?a.canvas.style.cursor="pointer":a.canvas.style.cursor="default"}:void 0,onClick:n?function(r,i){i.length>0&&e()}:void 0,plugins:{tooltip:{enabled:!1},datalabels:{align:"end",anchor:"end",formatter:function(r){return[r.label,r.value]},color:function(r){return r.dataset.backgroundColor},font:function(){return{size:14,weight:"normal"}}}},aspectRatio:16/6,layout:{padding:{top:6,bottom:6}}}}),Uze=t=>Number.isInteger(t)?t.toString():t.toFixed(2),Wze=Qe({__name:"CardAssigned",setup(t,{expose:e}){e(),Ev.register(XD,LS,KD,QD,Eoe,Toe),Ev.register(LS,KD,QD);const n=Z(()=>({guidingTextBottomLeft:l.value?void 0:{text:"Scenes",fontStyle:{color:_l.TEXT_GENERAL,fontSize:"14px",fontWeight:"normal"},tooltip:"Scenes"},guidingTextBottomRight:void 0,backgroundColor:_l.WHITE,key:"assigned",title:"Assigned scenes",icon:{name:"Film",iconColor:"#A6A6A6",tooltip:"Assigned scenes status"},mainLabel:"AssignedMainlabel"})),r=ks(),{dashboardData:i}=Pn(r),a=Z(()=>{var S;return Number(((S=i.value)==null?void 0:S.assigned_scenes.active)||0)}),o=Z(()=>{var S;return Number(((S=i.value)==null?void 0:S.assigned_scenes.planned)||0)}),s=Z(()=>!0),l=Z(()=>a.value>0||o.value>0),c=Z(()=>{const S=a.value,T=o.value,_={active:"Active",planned:"Planned"},E={active:"#3C9BFA",planned:"#A6A6A6"},D=Object.entries({active:S,planned:T}).filter(O=>O[1]!==0).sort((O,V)=>O[1]-V[1]).map(([O,V])=>({value:V||0,key:O,label:_[O]}));return{datasets:[{backgroundColor:D.map(O=>E[O.key]),data:D}]}}),f=Z(()=>{const S=a.value,T=o.value;return S<T?[S,T]:[T,S]}),h=fr(),{currentTab:p}=Pn(h),g=()=>{p.value="people-scenes"},y=Z(()=>{const S=Lle(f.value);return{type:"pie",data:c.value,plugins:[XD],...Nle({rotation:S,handleRedirect:g,interactive:!1})}}),v=re(null),b=()=>{const S=document.getElementById("chart_assigned");S&&(v.value=new Ev(S,y.value))};Ge([l,s],S=>{S[0]&&S[1]&&fn(()=>b())},{immediate:!0});const w={cardConfiguration:n,dashboardStore:r,dashboardData:i,activeData:a,plannedData:o,showData:s,hasData:l,data:c,assigned_scenesDataArr:f,store:h,currentTab:p,handleRedirect:g,chartConfig:y,chartInstance:v,initChart:b,get SimpleCard(){return O_}};return Object.defineProperty(w,"__isScriptSetup",{enumerable:!1,value:!0}),w}}),Nn=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n};function zze(t,e,n,r,i,a){return r.showData?(R(),Re(r.SimpleCard,Ft({key:0,class:"card-simple"},r.cardConfiguration,{disabled:!1,class:{empty:!r.hasData}}),{body:ze(()=>[r.hasData?(R(),Y("div",{key:0,class:"chart-container card-title",onClick:r.handleRedirect},e[0]||(e[0]=[X("canvas",{id:"chart_assigned"},null,-1)]))):(R(),Y("span",{key:1,class:"card-title",onClick:r.handleRedirect},"0"))]),_:1},16,["class"])):pe("v-if",!0)}const jze=Nn(Wze,[["render",zze],["__scopeId","data-v-f1302b37"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CardAssigned.vue"]]),Hze=Qe({__name:"CardCompleted",setup(t,{expose:e}){e();const n=ks(),{dashboardData:r}=Pn(n),i=Z(()=>{var f;return r.value&&((f=r.value)==null?void 0:f.completed_scenes_last_7_days)||0}),a=Z(()=>{const f=i.value>0?_l.GREEN:_l.WHITE,h=i.value>0?"#02C39A":"#A6A6A6";return{guidingTextBottomLeft:{text:"Scenes",fontStyle:{color:"#000000",fontSize:"14px",fontWeight:"normal"},tooltip:"Assigned"},backgroundColor:f,key:"Completed",title:"Total completed (7 days)",icon:{name:"Film",iconColor:h,tooltip:"Completed scenes in the last 7 days"}}}),o=fr(),{currentTab:s}=Pn(o),c={dashboardStore:n,dashboardData:r,data:i,cardConfiguration:a,store:o,currentTab:s,handleRedirect:()=>{s.value="people-charts"},get SimpleCard(){return O_}};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function Yze(t,e,n,r,i,a){return R(),Re(r.SimpleCard,Ft({class:"card-simple"},r.cardConfiguration,{disabled:!1}),{body:ze(()=>[X("div",{class:"card-title",onClick:r.handleRedirect},it(r.data),1)]),_:1},16)}const qze=Nn(Hze,[["render",Yze],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CardCompleted.vue"]]),Kze=Qe({__name:"CardOverdue",setup(t,{expose:e}){e();const n=ks(),{dashboardData:r}=Pn(n),i=Z(()=>{var f;return r.value&&((f=r.value)==null?void 0:f.overdue_scenes)||0}),a=Z(()=>{const f=i.value>0?_l.YELLOW:_l.WHITE,h=i.value>0?"#F7941D":"#A6A6A6";return{guidingTextBottomLeft:{text:"Scenes",fontStyle:{color:_l.TEXT_GENERAL,fontSize:"14px",fontWeight:"normal"},tooltip:"Assigned"},backgroundColor:f,key:"assigned",title:"Overdue",icon:{name:"Film",iconColor:h,tooltip:"Assigned scenes past due"}}}),o=fr(),{currentTab:s}=Pn(o),c={dashboardStore:n,dashboardData:r,data:i,cardConfiguration:a,store:o,currentTab:s,handleRedirect:()=>{s.value="people-charts"},get SimpleCard(){return O_}};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function Gze(t,e,n,r,i,a){return R(),Re(r.SimpleCard,Ft({class:"card-simple"},r.cardConfiguration,{disabled:!1}),{body:ze(()=>[X("div",{class:"card-title",onClick:r.handleRedirect},it(r.data),1)]),_:1},16)}const Zze=Nn(Kze,[["render",Gze],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CardOverdue.vue"]]),Qze=Qe({__name:"CardTargetPoint",setup(t,{expose:e}){e(),Ev.register(XD,LS,KD,QD,Eoe,Toe),Ev.register(LS,KD,QD);const n=Z(()=>({guidingTextBottomLeft:l.value?void 0:{text:"Points",fontStyle:{color:_l.TEXT_GENERAL,fontSize:"14px",fontWeight:"normal"},tooltip:"Points"},guidingTextBottomRight:void 0,backgroundColor:_l.WHITE,key:"points",title:"Target points",icon:{name:"Award",iconColor:"#A6A6A6",tooltip:"Assigned points towards targets"},mainLabel:"AssignedMainlabel"})),r=Z(()=>{var v,b;return Number(((b=(v=o.value)==null?void 0:v.point_pool)==null?void 0:b.collected)||0)}),i=Z(()=>{var v,b;return Number(((b=(v=o.value)==null?void 0:v.point_pool)==null?void 0:b.pending)||0)}),a=ks(),{dashboardData:o}=Pn(a),s=Z(()=>{var v;return((v=o.value)==null?void 0:v.point_pool.can_view)==1}),l=Z(()=>r.value>0||i.value>0),c=Z(()=>{const v=r.value,b=i.value,w={collected:"Earned",pending:"Awaiting"},S={collected:"#F7941D",pending:"#A6A6A6"},T=Object.entries({collected:v,pending:b}).filter(_=>_[1]!==0).sort((_,E)=>_[1]-E[1]).map(([_,E])=>({value:Uze(E)||0,key:_,label:w[_]}));return{datasets:[{backgroundColor:T.map(_=>S[_.key]),data:T}]}}),f=Z(()=>{const v=r.value,b=i.value;return v<b?[v,b]:[b,v]}),h=Z(()=>{const v=Lle(f.value);return{plugins:[XD],type:"pie",data:c.value,...Nle({interactive:!1,handleRedirect:()=>{},rotation:v})}}),p=re(null),g=()=>{const v=document.getElementById("chart_target");v&&(p.value=new Ev(v,h.value))};Ge([l,s],v=>{v[0]&&v[1]&&fn(()=>g())},{immediate:!0});const y={cardConfiguration:n,collectedData:r,pendingData:i,dashboardStore:a,dashboardData:o,showData:s,hasData:l,data:c,assigned_scenesDataArr:f,chartConfig:h,chartInstance:p,initChart:g,get SimpleCard(){return O_}};return Object.defineProperty(y,"__isScriptSetup",{enumerable:!1,value:!0}),y}}),Xze={key:0,class:"chart-container card-title"},Jze={key:1,class:"card-title non-interactive"};function eje(t,e,n,r,i,a){return r.showData?(R(),Re(r.SimpleCard,Ft({key:0,class:"card-simple"},r.cardConfiguration,{disabled:!1,class:{empty:!r.hasData}}),{body:ze(()=>[r.hasData?(R(),Y("div",Xze,e[0]||(e[0]=[X("canvas",{id:"chart_target"},null,-1)]))):(R(),Y("span",Jze,"0"))]),_:1},16,["class"])):pe("v-if",!0)}const tje=Nn(Qze,[["render",eje],["__scopeId","data-v-24024258"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CardTargetPoint.vue"]]),nje=Qe({__name:"CardUnresolved",setup(t,{expose:e}){e();const n=ks(),{dashboardData:r}=Pn(n),i=Z(()=>{var f;return r.value&&((f=r.value)==null?void 0:f.unresolved_comments)||0}),a=Z(()=>{const f={text:"@",color:"#FFF",bgColor:i.value==0?"#A6A6A6":"#3C9BFA",show:!0};return{guidingTextBottomLeft:{text:"Comments",fontStyle:{color:_l.TEXT_GENERAL,fontSize:"14px",fontWeight:"normal"},tooltip:"Assigned"},backgroundColor:_l.WHITE,key:"Unresolved",title:"Unresolved",icon:{name:"Comments",iconColor:_l.ICON_GENERAL,tooltip:"Assigned comments to resolve"},alias:f}}),o=fr(),{currentTab:s}=Pn(o),c={dashboardStore:n,dashboardData:r,data:i,cardConfiguration:a,store:o,currentTab:s,handleRedirect:()=>{s.value="people-comments"},get SimpleCard(){return O_}};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function rje(t,e,n,r,i,a){return R(),Re(r.SimpleCard,Ft({class:"card-simple"},r.cardConfiguration,{disabled:!1}),{body:ze(()=>[X("div",{class:"card-title",onClick:r.handleRedirect},it(r.data),1)]),_:1},16)}const ije=Nn(nje,[["render",rje],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CardUnresolved.vue"]]),aje={},oje={class:"section-renditions-skeleton"};function sje(t,e){return R(),Y("div",oje,e[0]||(e[0]=[Vv('<div class="timestamp animation-skeleton dark" data-v-09df7c3e></div><div class="rendition-item animation-skeleton dark" data-v-09df7c3e><div class="name" data-v-09df7c3e></div><div class="breadcrumb" data-v-09df7c3e></div><div class="information" data-v-09df7c3e></div></div>',2)]))}const lje=Nn(aje,[["render",sje],["__scopeId","data-v-09df7c3e"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/NewRenditionSkeleton.vue"]]),uje=Qe({__name:"InfoVisual",props:{visualName:{type:String,required:!0,default:"NoData"},label:{type:String,required:!1,default:"label here"},height:{type:Number,required:!0,default:200},width:{type:Number,required:!1,default:400}},setup(t,{expose:e}){e();const n=t,r=Z(()=>n.height-36),i=Z(()=>n.width),a={props:n,visualHeight:r,visualWidth:i,get ArboIcon(){return qn}};return Object.defineProperty(a,"__isScriptSetup",{enumerable:!1,value:!0}),a}}),cje={class:"visual-info"},dje={class:"data-info"};function fje(t,e,n,r,i,a){return R(),Y("div",cje,[X("div",{class:"visual-info-container",style:_t({"--visual-height":r.visualHeight+"px","--visual-width":r.visualWidth+"px"})},[he(r.ArboIcon,{type:"visual",name:n.visualName,class:"data-visual"},null,8,["name"]),X("div",dje,it(n.label),1)],4)])}const Oc=Nn(uje,[["render",fje],["__scopeId","data-v-014c340b"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/InfoVisual.vue"]]),Al=()=>{const t=re(vo());return{getEnvVariable:n=>{const r=t.value,i=r==null?void 0:r.appContext.config.globalProperties[n];if(!r)return console.error("Current instance is not available."),"";let a="";return(!r||!r.appContext.config.globalProperties)&&(console.warn("Current instance or global properties not available."),a=""),!i||i.length===0?(console.warn(`Environment variable ${n} is not defined.`),a=""):a=i,a},currentInstance:t}},VC=()=>{const t=ks(),{getDashboardData:e}=t,n=async l=>{try{return await e(l)}catch(c){return console.error("getPeopleCard",c),{error:c}}},r=fr(),{basicInfo:i}=Pn(r);return{getPeopleCard:n,getRecentActivities:(l,c)=>{var h;const f=(h=i.value)==null?void 0:h.id;if(!f)throw new Error("userId is not found in store");return xn.getPeopleDashboardData(f,l,c)},deleteRendition:({scene_id:l,rendition_id:c})=>{if(!i.value.id)throw new Error("userId is not found in store");return xn.deleteRendition(l,c)},getNextRendition:l=>{var f;const c=(f=i.value)==null?void 0:f.id;if(!c)throw new Error("userId is not found in store");return xn.getNextRendition(c,l)}}},ay=(t,e,n)=>{const r=re(void 0),i=re(!1),a=async()=>{if(!h.value)return;const p=await e();p&&(r.value=p.signature)},o=re(null),s=6e4,l=()=>{o.value&&clearInterval(o.value),o.value=setInterval(()=>{a()},Number(s))};zt(async()=>{l()}),Qa(()=>{clearInterval(o.value)}),mee(()=>{clearInterval(o.value)});const c=ks(),{refreshState:f,isBrowserActive:h}=Pn(c);return Ge(i,p=>{t!==""&&(f.value[t]=p)}),Ge(n,p=>{r.value=p,fn(()=>i.value=!1)},{immediate:!0}),Ge(r,(p,g)=>{if(!(g==null||g==""))switch(!0){case!r.value:i.value=!1;break;case p!==g:i.value=!0;break;case r.value!=n.value:i.value=!0;break;case p==n.value:break}},{immediate:!0}),{subscribeSignature:l,needUpdate:i}};class oy extends Error{}class hje extends oy{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class pje extends oy{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class mje extends oy{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class db extends oy{}class Fle extends oy{constructor(e){super(`Invalid unit ${e}`)}}class Yo extends oy{}class tp extends oy{constructor(){super("Zone is an abstract class")}}const tn="numeric",Sc="short",wl="long",uO={year:tn,month:tn,day:tn},Vle={year:tn,month:Sc,day:tn},gje={year:tn,month:Sc,day:tn,weekday:Sc},Ble={year:tn,month:wl,day:tn},Ule={year:tn,month:wl,day:tn,weekday:wl},Wle={hour:tn,minute:tn},zle={hour:tn,minute:tn,second:tn},jle={hour:tn,minute:tn,second:tn,timeZoneName:Sc},Hle={hour:tn,minute:tn,second:tn,timeZoneName:wl},Yle={hour:tn,minute:tn,hourCycle:"h23"},qle={hour:tn,minute:tn,second:tn,hourCycle:"h23"},Kle={hour:tn,minute:tn,second:tn,hourCycle:"h23",timeZoneName:Sc},Gle={hour:tn,minute:tn,second:tn,hourCycle:"h23",timeZoneName:wl},Zle={year:tn,month:tn,day:tn,hour:tn,minute:tn},Qle={year:tn,month:tn,day:tn,hour:tn,minute:tn,second:tn},Xle={year:tn,month:Sc,day:tn,hour:tn,minute:tn},Jle={year:tn,month:Sc,day:tn,hour:tn,minute:tn,second:tn},vje={year:tn,month:Sc,day:tn,weekday:Sc,hour:tn,minute:tn},eue={year:tn,month:wl,day:tn,hour:tn,minute:tn,timeZoneName:Sc},tue={year:tn,month:wl,day:tn,hour:tn,minute:tn,second:tn,timeZoneName:Sc},nue={year:tn,month:wl,day:tn,weekday:wl,hour:tn,minute:tn,timeZoneName:wl},rue={year:tn,month:wl,day:tn,weekday:wl,hour:tn,minute:tn,second:tn,timeZoneName:wl};class YA{get type(){throw new tp}get name(){throw new tp}get ianaName(){return this.name}get isUniversal(){throw new tp}offsetName(e,n){throw new tp}formatOffset(e,n){throw new tp}offset(e){throw new tp}equals(e){throw new tp}get isValid(){throw new tp}}let DN=null;class BC extends YA{static get instance(){return DN===null&&(DN=new BC),DN}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return fue(e,n,r)}formatOffset(e,n){return Yx(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let VT={};function yje(t){return VT[t]||(VT[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),VT[t]}const bje={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function _je(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,i,a,o,s,l,c,f]=r;return[o,i,a,s,l,c,f]}function wje(t,e){const n=t.formatToParts(e),r=[];for(let i=0;i<n.length;i++){const{type:a,value:o}=n[i],s=bje[a];a==="era"?r[s]=o:jn(s)||(r[s]=parseInt(o,10))}return r}let nE={};class xh extends YA{static create(e){return nE[e]||(nE[e]=new xh(e)),nE[e]}static resetCache(){nE={},VT={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=xh.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return fue(e,n,r,this.name)}formatOffset(e,n){return Yx(this.offset(e),n)}offset(e){const n=new Date(e);if(isNaN(n))return NaN;const r=yje(this.name);let[i,a,o,s,l,c,f]=r.formatToParts?wje(r,n):_je(r,n);s==="BC"&&(i=-Math.abs(i)+1);const p=WC({year:i,month:a,day:o,hour:l===24?0:l,minute:c,second:f,millisecond:0});let g=+n;const y=g%1e3;return g-=y>=0?y:1e3+y,(p-g)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let J7={};function xje(t,e={}){const n=JSON.stringify([t,e]);let r=J7[n];return r||(r=new Intl.ListFormat(t,e),J7[n]=r),r}let qB={};function KB(t,e={}){const n=JSON.stringify([t,e]);let r=qB[n];return r||(r=new Intl.DateTimeFormat(t,e),qB[n]=r),r}let GB={};function Sje(t,e={}){const n=JSON.stringify([t,e]);let r=GB[n];return r||(r=new Intl.NumberFormat(t,e),GB[n]=r),r}let ZB={};function Aje(t,e={}){const{base:n,...r}=e,i=JSON.stringify([t,r]);let a=ZB[i];return a||(a=new Intl.RelativeTimeFormat(t,e),ZB[i]=a),a}let lx=null;function kje(){return lx||(lx=new Intl.DateTimeFormat().resolvedOptions().locale,lx)}let eq={};function Eje(t){let e=eq[t];if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,eq[t]=e}return e}function Tje(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(n===-1)return[t];{let r,i;try{r=KB(t).resolvedOptions(),i=t}catch{const l=t.substring(0,n);r=KB(l).resolvedOptions(),i=l}const{numberingSystem:a,calendar:o}=r;return[i,a,o]}}function Dje(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function Oje(t){const e=[];for(let n=1;n<=12;n++){const r=Wn.utc(2009,n,1);e.push(t(r))}return e}function Cje(t){const e=[];for(let n=1;n<=7;n++){const r=Wn.utc(2016,11,13+n);e.push(t(r))}return e}function rE(t,e,n,r){const i=t.listingMode();return i==="error"?null:i==="en"?n(e):r(e)}function Ije(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}class Mje{constructor(e,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:i,floor:a,...o}=r;if(!n||Object.keys(o).length>0){const s={useGrouping:!1,...r};r.padTo>0&&(s.minimumIntegerDigits=r.padTo),this.inf=Sje(e,s)}}format(e){if(this.inf){const n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{const n=this.floor?Math.floor(e):cW(e,3);return Ia(n,this.padTo)}}}class Rje{constructor(e,n,r){this.opts=r,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const o=-1*(e.offset/60),s=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&xh.create(s).valid?(i=s,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const a={...this.opts};a.timeZone=a.timeZone||i,this.dtf=KB(n,a)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class $je{constructor(e,n,r){this.opts={style:"long",...r},!n&&cue()&&(this.rtf=Aje(e,r))}format(e,n){return this.rtf?this.rtf.format(e,n):r8e(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}}const Pje={firstDay:1,minimalDays:4,weekend:[6,7]};let Ci=class ux{static fromOpts(e){return ux.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,r,i,a=!1){const o=e||la.defaultLocale,s=o||(a?"en-US":kje()),l=n||la.defaultNumberingSystem,c=r||la.defaultOutputCalendar,f=QB(i)||la.defaultWeekSettings;return new ux(s,l,c,f,o)}static resetCache(){lx=null,qB={},GB={},ZB={}}static fromObject({locale:e,numberingSystem:n,outputCalendar:r,weekSettings:i}={}){return ux.create(e,n,r,i)}constructor(e,n,r,i,a){const[o,s,l]=Tje(e);this.locale=o,this.numberingSystem=n||s||null,this.outputCalendar=r||l||null,this.weekSettings=i,this.intl=Dje(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=a,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Ije(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:ux.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,QB(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1){return rE(this,e,mue,()=>{const r=n?{month:e,day:"numeric"}:{month:e},i=n?"format":"standalone";return this.monthsCache[i][e]||(this.monthsCache[i][e]=Oje(a=>this.extract(a,r,"month"))),this.monthsCache[i][e]})}weekdays(e,n=!1){return rE(this,e,yue,()=>{const r=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=n?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=Cje(a=>this.extract(a,r,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return rE(this,void 0,()=>bue,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Wn.utc(2016,11,13,9),Wn.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return rE(this,e,_ue,()=>{const n={era:e};return this.eraCache[e]||(this.eraCache[e]=[Wn.utc(-40,1,1),Wn.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[e]})}extract(e,n,r){const i=this.dtFormatter(e,n),a=i.formatToParts(),o=a.find(s=>s.type.toLowerCase()===r);return o?o.value:null}numberFormatter(e={}){return new Mje(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new Rje(e,this.intl,n)}relFormatter(e={}){return new $je(this.intl,this.isEnglish(),e)}listFormatter(e={}){return xje(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:due()?Eje(this.locale):Pje}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},ON=null;class Ss extends YA{static get utcInstance(){return ON===null&&(ON=new Ss(0)),ON}static instance(e){return e===0?Ss.utcInstance:new Ss(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Ss(zC(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Yx(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Yx(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return Yx(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class Lje extends YA{constructor(e){super(),this.zoneName=e}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 vp(t,e){if(jn(t)||t===null)return e;if(t instanceof YA)return t;if(Wje(t)){const n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?BC.instance:n==="utc"||n==="gmt"?Ss.utcInstance:Ss.parseSpecifier(n)||xh.create(t)}else return Lp(t)?Ss.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new Lje(t)}const oW={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},tq={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]},Nje=oW.hanidec.replace(/[\[|\]]/g,"").split("");function Fje(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(t[n].search(oW.hanidec)!==-1)e+=Nje.indexOf(t[n]);else for(const i in tq){const[a,o]=tq[i];r>=a&&r<=o&&(e+=r-a)}}return parseInt(e,10)}else return e}let nb={};function Vje(){nb={}}function zu({numberingSystem:t},e=""){const n=t||"latn";return nb[n]||(nb[n]={}),nb[n][e]||(nb[n][e]=new RegExp(`${oW[n]}${e}`)),nb[n][e]}let nq=()=>Date.now(),rq="system",iq=null,aq=null,oq=null,sq=60,lq,uq=null;class la{static get now(){return nq}static set now(e){nq=e}static set defaultZone(e){rq=e}static get defaultZone(){return vp(rq,BC.instance)}static get defaultLocale(){return iq}static set defaultLocale(e){iq=e}static get defaultNumberingSystem(){return aq}static set defaultNumberingSystem(e){aq=e}static get defaultOutputCalendar(){return oq}static set defaultOutputCalendar(e){oq=e}static get defaultWeekSettings(){return uq}static set defaultWeekSettings(e){uq=QB(e)}static get twoDigitCutoffYear(){return sq}static set twoDigitCutoffYear(e){sq=e%100}static get throwOnInvalid(){return lq}static set throwOnInvalid(e){lq=e}static resetCaches(){Ci.resetCache(),xh.resetCache(),Wn.resetCache(),Vje()}}class lc{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const iue=[0,31,59,90,120,151,181,212,243,273,304,334],aue=[0,31,60,91,121,152,182,213,244,274,305,335];function eu(t,e){return new lc("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function sW(t,e,n){const r=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const i=r.getUTCDay();return i===0?7:i}function oue(t,e,n){return n+(qA(t)?aue:iue)[e-1]}function sue(t,e){const n=qA(t)?aue:iue,r=n.findIndex(a=>a<e),i=e-n[r];return{month:r+1,day:i}}function lW(t,e){return(t-e+7)%7+1}function cO(t,e=4,n=1){const{year:r,month:i,day:a}=t,o=oue(r,i,a),s=lW(sW(r,i,a),n);let l=Math.floor((o-s+14-e)/7),c;return l<1?(c=r-1,l=US(c,e,n)):l>US(r,e,n)?(c=r+1,l=1):c=r,{weekYear:c,weekNumber:l,weekday:s,...jC(t)}}function cq(t,e=4,n=1){const{weekYear:r,weekNumber:i,weekday:a}=t,o=lW(sW(r,1,e),n),s=Db(r);let l=i*7+a-o-7+e,c;l<1?(c=r-1,l+=Db(c)):l>s?(c=r+1,l-=Db(r)):c=r;const{month:f,day:h}=sue(c,l);return{year:c,month:f,day:h,...jC(t)}}function CN(t){const{year:e,month:n,day:r}=t,i=oue(e,n,r);return{year:e,ordinal:i,...jC(t)}}function dq(t){const{year:e,ordinal:n}=t,{month:r,day:i}=sue(e,n);return{year:e,month:r,day:i,...jC(t)}}function fq(t,e){if(!jn(t.localWeekday)||!jn(t.localWeekNumber)||!jn(t.localWeekYear)){if(!jn(t.weekday)||!jn(t.weekNumber)||!jn(t.weekYear))throw new db("Cannot mix locale-based week fields with ISO-based week fields");return jn(t.localWeekday)||(t.weekday=t.localWeekday),jn(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),jn(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Bje(t,e=4,n=1){const r=UC(t.weekYear),i=tu(t.weekNumber,1,US(t.weekYear,e,n)),a=tu(t.weekday,1,7);return r?i?a?!1:eu("weekday",t.weekday):eu("week",t.weekNumber):eu("weekYear",t.weekYear)}function Uje(t){const e=UC(t.year),n=tu(t.ordinal,1,Db(t.year));return e?n?!1:eu("ordinal",t.ordinal):eu("year",t.year)}function lue(t){const e=UC(t.year),n=tu(t.month,1,12),r=tu(t.day,1,dO(t.year,t.month));return e?n?r?!1:eu("day",t.day):eu("month",t.month):eu("year",t.year)}function uue(t){const{hour:e,minute:n,second:r,millisecond:i}=t,a=tu(e,0,23)||e===24&&n===0&&r===0&&i===0,o=tu(n,0,59),s=tu(r,0,59),l=tu(i,0,999);return a?o?s?l?!1:eu("millisecond",i):eu("second",r):eu("minute",n):eu("hour",e)}function jn(t){return typeof t>"u"}function Lp(t){return typeof t=="number"}function UC(t){return typeof t=="number"&&t%1===0}function Wje(t){return typeof t=="string"}function zje(t){return Object.prototype.toString.call(t)==="[object Date]"}function cue(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function due(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function jje(t){return Array.isArray(t)?t:[t]}function hq(t,e,n){if(t.length!==0)return t.reduce((r,i)=>{const a=[e(i),i];return r&&n(r[0],a[0])===r[0]?r:a},null)[1]}function Hje(t,e){return e.reduce((n,r)=>(n[r]=t[r],n),{})}function o_(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function QB(t){if(t==null)return null;if(typeof t!="object")throw new Yo("Week settings must be an object");if(!tu(t.firstDay,1,7)||!tu(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!tu(e,1,7)))throw new Yo("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function tu(t,e,n){return UC(t)&&t>=e&&t<=n}function Yje(t,e){return t-e*Math.floor(t/e)}function Ia(t,e=2){const n=t<0;let r;return n?r="-"+(""+-t).padStart(e,"0"):r=(""+t).padStart(e,"0"),r}function dp(t){if(!(jn(t)||t===null||t===""))return parseInt(t,10)}function Vg(t){if(!(jn(t)||t===null||t===""))return parseFloat(t)}function uW(t){if(!(jn(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function cW(t,e,n=!1){const r=10**e;return(n?Math.trunc:Math.round)(t*r)/r}function qA(t){return t%4===0&&(t%100!==0||t%400===0)}function Db(t){return qA(t)?366:365}function dO(t,e){const n=Yje(e-1,12)+1,r=t+(e-n)/12;return n===2?qA(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function WC(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function pq(t,e,n){return-lW(sW(t,1,e),n)+e-1}function US(t,e=4,n=1){const r=pq(t,e,n),i=pq(t+1,e,n);return(Db(t)-r+i)/7}function XB(t){return t>99?t:t>la.twoDigitCutoffYear?1900+t:2e3+t}function fue(t,e,n,r=null){const i=new Date(t),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(a.timeZone=r);const o={timeZoneName:e,...a},s=new Intl.DateTimeFormat(n,o).formatToParts(i).find(l=>l.type.toLowerCase()==="timezonename");return s?s.value:null}function zC(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const r=parseInt(e,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function hue(t){const e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new Yo(`Invalid unit value ${t}`);return e}function fO(t,e){const n={};for(const r in t)if(o_(t,r)){const i=t[r];if(i==null)continue;n[e(r)]=hue(i)}return n}function Yx(t,e){const n=Math.trunc(Math.abs(t/60)),r=Math.trunc(Math.abs(t%60)),i=t>=0?"+":"-";switch(e){case"short":return`${i}${Ia(n,2)}:${Ia(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${Ia(n,2)}${Ia(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function jC(t){return Hje(t,["hour","minute","second","millisecond"])}const qje=["January","February","March","April","May","June","July","August","September","October","November","December"],pue=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Kje=["J","F","M","A","M","J","J","A","S","O","N","D"];function mue(t){switch(t){case"narrow":return[...Kje];case"short":return[...pue];case"long":return[...qje];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 gue=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],vue=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Gje=["M","T","W","T","F","S","S"];function yue(t){switch(t){case"narrow":return[...Gje];case"short":return[...vue];case"long":return[...gue];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const bue=["AM","PM"],Zje=["Before Christ","Anno Domini"],Qje=["BC","AD"],Xje=["B","A"];function _ue(t){switch(t){case"narrow":return[...Xje];case"short":return[...Qje];case"long":return[...Zje];default:return null}}function Jje(t){return bue[t.hour<12?0:1]}function e8e(t,e){return yue(e)[t.weekday-1]}function t8e(t,e){return mue(e)[t.month-1]}function n8e(t,e){return _ue(e)[t.year<0?0:1]}function r8e(t,e,n="always",r=!1){const i={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."]},a=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&a){const h=t==="days";switch(e){case 1:return h?"tomorrow":`next ${i[t][0]}`;case-1:return h?"yesterday":`last ${i[t][0]}`;case 0:return h?"today":`this ${i[t][0]}`}}const o=Object.is(e,-0)||e<0,s=Math.abs(e),l=s===1,c=i[t],f=r?l?c[1]:c[2]||c[1]:l?i[t][0]:t;return o?`${s} ${f} ago`:`in ${s} ${f}`}function mq(t,e){let n="";for(const r of t)r.literal?n+=r.val:n+=e(r.val);return n}const i8e={D:uO,DD:Vle,DDD:Ble,DDDD:Ule,t:Wle,tt:zle,ttt:jle,tttt:Hle,T:Yle,TT:qle,TTT:Kle,TTTT:Gle,f:Zle,ff:Xle,fff:eue,ffff:nue,F:Qle,FF:Jle,FFF:tue,FFFF:rue};class Jo{static create(e,n={}){return new Jo(e,n)}static parseFormat(e){let n=null,r="",i=!1;const a=[];for(let o=0;o<e.length;o++){const s=e.charAt(o);s==="'"?(r.length>0&&a.push({literal:i||/^\s+$/.test(r),val:r}),n=null,r="",i=!i):i||s===n?r+=s:(r.length>0&&a.push({literal:/^\s+$/.test(r),val:r}),r=s,n=s)}return r.length>0&&a.push({literal:i||/^\s+$/.test(r),val:r}),a}static macroTokenToFormatOpts(e){return i8e[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0){if(this.opts.forceSimple)return Ia(e,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,n){const r=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",a=(g,y)=>this.loc.extract(e,g,y),o=g=>e.isOffsetFixed&&e.offset===0&&g.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,g.format):"",s=()=>r?Jje(e):a({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(g,y)=>r?t8e(e,g):a(y?{month:g}:{month:g,day:"numeric"},"month"),c=(g,y)=>r?e8e(e,g):a(y?{weekday:g}:{weekday:g,month:"long",day:"numeric"},"weekday"),f=g=>{const y=Jo.macroTokenToFormatOpts(g);return y?this.formatWithSystemDefault(e,y):g},h=g=>r?n8e(e,g):a({era:g},"era"),p=g=>{switch(g){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return s();case"d":return i?a({day:"numeric"},"day"):this.num(e.day);case"dd":return i?a({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return i?a({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?a({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return i?a({month:"numeric"},"month"):this.num(e.month);case"MM":return i?a({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return i?a({year:"numeric"},"year"):this.num(e.year);case"yy":return i?a({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?a({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?a({year:"numeric"},"year"):this.num(e.year,6);case"G":return h("short");case"GG":return h("long");case"GGGGG":return h("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(g)}};return mq(Jo.parseFormat(n),p)}formatDurationFromString(e,n){const r=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=l=>c=>{const f=r(c);return f?this.num(l.get(f),c.length):c},a=Jo.parseFormat(n),o=a.reduce((l,{literal:c,val:f})=>c?l:l.concat(f),[]),s=e.shiftTo(...o.map(r).filter(l=>l));return mq(a,i(s))}}const wue=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function B_(...t){const e=t.reduce((n,r)=>n+r.source,"");return RegExp(`^${e}$`)}function U_(...t){return e=>t.reduce(([n,r,i],a)=>{const[o,s,l]=a(e,i);return[{...n,...o},s||r,l]},[{},null,1]).slice(0,2)}function W_(t,...e){if(t==null)return[null,null];for(const[n,r]of e){const i=n.exec(t);if(i)return r(i)}return[null,null]}function xue(...t){return(e,n)=>{const r={};let i;for(i=0;i<t.length;i++)r[t[i]]=dp(e[n+i]);return[r,null,n+i]}}const Sue=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,a8e=`(?:${Sue.source}?(?:\\[(${wue.source})\\])?)?`,dW=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Aue=RegExp(`${dW.source}${a8e}`),fW=RegExp(`(?:T${Aue.source})?`),o8e=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,s8e=/(\d{4})-?W(\d\d)(?:-?(\d))?/,l8e=/(\d{4})-?(\d{3})/,u8e=xue("weekYear","weekNumber","weekDay"),c8e=xue("year","ordinal"),d8e=/(\d{4})-(\d\d)-(\d\d)/,kue=RegExp(`${dW.source} ?(?:${Sue.source}|(${wue.source}))?`),f8e=RegExp(`(?: ${kue.source})?`);function Ob(t,e,n){const r=t[e];return jn(r)?n:dp(r)}function h8e(t,e){return[{year:Ob(t,e),month:Ob(t,e+1,1),day:Ob(t,e+2,1)},null,e+3]}function z_(t,e){return[{hours:Ob(t,e,0),minutes:Ob(t,e+1,0),seconds:Ob(t,e+2,0),milliseconds:uW(t[e+3])},null,e+4]}function KA(t,e){const n=!t[e]&&!t[e+1],r=zC(t[e+1],t[e+2]),i=n?null:Ss.instance(r);return[{},i,e+3]}function GA(t,e){const n=t[e]?xh.create(t[e]):null;return[{},n,e+1]}const p8e=RegExp(`^T?${dW.source}$`),m8e=/^-?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 g8e(t){const[e,n,r,i,a,o,s,l,c]=t,f=e[0]==="-",h=l&&l[0]==="-",p=(g,y=!1)=>g!==void 0&&(y||g&&f)?-g:g;return[{years:p(Vg(n)),months:p(Vg(r)),weeks:p(Vg(i)),days:p(Vg(a)),hours:p(Vg(o)),minutes:p(Vg(s)),seconds:p(Vg(l),l==="-0"),milliseconds:p(uW(c),h)}]}const v8e={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 hW(t,e,n,r,i,a,o){const s={year:e.length===2?XB(dp(e)):dp(e),month:pue.indexOf(n)+1,day:dp(r),hour:dp(i),minute:dp(a)};return o&&(s.second=dp(o)),t&&(s.weekday=t.length>3?gue.indexOf(t)+1:vue.indexOf(t)+1),s}const y8e=/^(?:(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 b8e(t){const[,e,n,r,i,a,o,s,l,c,f,h]=t,p=hW(e,i,r,n,a,o,s);let g;return l?g=v8e[l]:c?g=0:g=zC(f,h),[p,new Ss(g)]}function _8e(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const w8e=/^(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$/,x8e=/^(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$/,S8e=/^(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 gq(t){const[,e,n,r,i,a,o,s]=t;return[hW(e,i,r,n,a,o,s),Ss.utcInstance]}function A8e(t){const[,e,n,r,i,a,o,s]=t;return[hW(e,s,n,r,i,a,o),Ss.utcInstance]}const k8e=B_(o8e,fW),E8e=B_(s8e,fW),T8e=B_(l8e,fW),D8e=B_(Aue),Eue=U_(h8e,z_,KA,GA),O8e=U_(u8e,z_,KA,GA),C8e=U_(c8e,z_,KA,GA),I8e=U_(z_,KA,GA);function M8e(t){return W_(t,[k8e,Eue],[E8e,O8e],[T8e,C8e],[D8e,I8e])}function R8e(t){return W_(_8e(t),[y8e,b8e])}function $8e(t){return W_(t,[w8e,gq],[x8e,gq],[S8e,A8e])}function P8e(t){return W_(t,[m8e,g8e])}const L8e=U_(z_);function N8e(t){return W_(t,[p8e,L8e])}const F8e=B_(d8e,f8e),V8e=B_(kue),B8e=U_(z_,KA,GA);function U8e(t){return W_(t,[F8e,Eue],[V8e,B8e])}const vq="Invalid Duration",Tue={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}},W8e={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},...Tue},zl=146097/400,Fy=146097/4800,z8e={years:{quarters:4,months:12,weeks:zl/7,days:zl,hours:zl*24,minutes:zl*24*60,seconds:zl*24*60*60,milliseconds:zl*24*60*60*1e3},quarters:{months:3,weeks:zl/28,days:zl/4,hours:zl*24/4,minutes:zl*24*60/4,seconds:zl*24*60*60/4,milliseconds:zl*24*60*60*1e3/4},months:{weeks:Fy/7,days:Fy,hours:Fy*24,minutes:Fy*24*60,seconds:Fy*24*60*60,milliseconds:Fy*24*60*60*1e3},...Tue},cv=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],j8e=cv.slice(0).reverse();function np(t,e,n=!1){const r={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Qo(r)}function Due(t,e){let n=e.milliseconds??0;for(const r of j8e.slice(1))e[r]&&(n+=e[r]*t[r].milliseconds);return n}function yq(t,e){const n=Due(t,e)<0?-1:1;cv.reduceRight((r,i)=>{if(jn(e[i]))return r;if(r){const a=e[r]*n,o=t[i][r],s=Math.floor(a/o);e[i]+=s*n,e[r]-=s*o*n}return i},null),cv.reduce((r,i)=>{if(jn(e[i]))return r;if(r){const a=e[r]%1;e[r]-=a,e[i]+=a*t[r][i]}return i},null)}function H8e(t){const e={};for(const[n,r]of Object.entries(t))r!==0&&(e[n]=r);return e}let Qo=class Co{constructor(e){const n=e.conversionAccuracy==="longterm"||!1;let r=n?z8e:W8e;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||Ci.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,n){return Co.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new Yo(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new Co({values:fO(e,Co.normalizeUnit),loc:Ci.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(Lp(e))return Co.fromMillis(e);if(Co.isDuration(e))return e;if(typeof e=="object")return Co.fromObject(e);throw new Yo(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){const[r]=P8e(e);return r?Co.fromObject(r,n):Co.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){const[r]=N8e(e);return r?Co.fromObject(r,n):Co.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new Yo("need to specify a reason the Duration is invalid");const r=e instanceof lc?e:new lc(e,n);if(la.throwOnInvalid)throw new mje(r);return new Co({invalid:r})}static normalizeUnit(e){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"}[e&&e.toLowerCase()];if(!n)throw new Fle(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?Jo.create(this.loc,r).formatDurationFromString(this,e):vq}toHuman(e={}){if(!this.isValid)return vq;const n=cv.map(r=>{const i=this.values[r];return jn(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:r.slice(0,-1)}).format(i)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=cW(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},Wn.fromMillis(n,{zone:"UTC"}).toISOTime(e))}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?Due(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const n=Co.fromDurationLike(e),r={};for(const i of cv)(o_(n.values,i)||o_(this.values,i))&&(r[i]=n.get(i)+this.get(i));return np(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const n=Co.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=hue(e(this.values[r],r));return np(this,{values:n},!0)}get(e){return this[Co.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const n={...this.values,...fO(e,Co.normalizeUnit)};return np(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:r,matrix:i}={}){const o={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:i,conversionAccuracy:r};return np(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return yq(this.matrix,e),np(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=H8e(this.normalize().shiftToAll().toObject());return np(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>Co.normalizeUnit(o));const n={},r={},i=this.toObject();let a;for(const o of cv)if(e.indexOf(o)>=0){a=o;let s=0;for(const c in r)s+=this.matrix[c][o]*r[c],r[c]=0;Lp(i[o])&&(s+=i[o]);const l=Math.trunc(s);n[o]=l,r[o]=(s*1e3-l*1e3)/1e3}else Lp(i[o])&&(r[o]=i[o]);for(const o in r)r[o]!==0&&(n[a]+=o===a?r[o]:r[o]/this.matrix[a][o]);return yq(this.matrix,n),np(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 e={};for(const n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return np(this,{values:e},!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(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(r,i){return r===void 0||r===0?i===void 0||i===0:r===i}for(const r of cv)if(!n(this.values[r],e.values[r]))return!1;return!0}};const Vy="Invalid Interval";function Y8e(t,e){return!t||!t.isValid?ia.invalid("missing or invalid start"):!e||!e.isValid?ia.invalid("missing or invalid end"):e<t?ia.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class ia{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new Yo("need to specify a reason the Interval is invalid");const r=e instanceof lc?e:new lc(e,n);if(la.throwOnInvalid)throw new pje(r);return new ia({invalid:r})}static fromDateTimes(e,n){const r=T1(e),i=T1(n),a=Y8e(r,i);return a??new ia({start:r,end:i})}static after(e,n){const r=Qo.fromDurationLike(n),i=T1(e);return ia.fromDateTimes(i,i.plus(r))}static before(e,n){const r=Qo.fromDurationLike(n),i=T1(e);return ia.fromDateTimes(i.minus(r),i)}static fromISO(e,n){const[r,i]=(e||"").split("/",2);if(r&&i){let a,o;try{a=Wn.fromISO(r,n),o=a.isValid}catch{o=!1}let s,l;try{s=Wn.fromISO(i,n),l=s.isValid}catch{l=!1}if(o&&l)return ia.fromDateTimes(a,s);if(o){const c=Qo.fromISO(i,n);if(c.isValid)return ia.after(a,c)}else if(l){const c=Qo.fromISO(r,n);if(c.isValid)return ia.before(s,c)}}return ia.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e: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(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(e,n);let i;return n!=null&&n.useLocaleWeeks?i=this.end.reconfigure({locale:r.locale}):i=this.end,i=i.startOf(e,n),Math.floor(i.diff(r,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?ia.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];const n=e.map(T1).filter(o=>this.contains(o)).sort((o,s)=>o.toMillis()-s.toMillis()),r=[];let{s:i}=this,a=0;for(;i<this.e;){const o=n[a]||this.e,s=+o>+this.e?this.e:o;r.push(ia.fromDateTimes(i,s)),i=s,a+=1}return r}splitBy(e){const n=Qo.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,i=1,a;const o=[];for(;r<this.e;){const s=this.start.plus(n.mapUnits(l=>l*i));a=+s>+this.e?this.e:s,o.push(ia.fromDateTimes(r,a)),r=a,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const n=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return n>=r?null:ia.fromDateTimes(n,r)}union(e){if(!this.isValid)return this;const n=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return ia.fromDateTimes(n,r)}static merge(e){const[n,r]=e.sort((i,a)=>i.s-a.s).reduce(([i,a],o)=>a?a.overlaps(o)||a.abutsStart(o)?[i,a.union(o)]:[i.concat([a]),o]:[i,o],[[],null]);return r&&n.push(r),n}static xor(e){let n=null,r=0;const i=[],a=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),o=Array.prototype.concat(...a),s=o.sort((l,c)=>l.time-c.time);for(const l of s)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&i.push(ia.fromDateTimes(n,l.time)),n=null);return ia.merge(i)}difference(...e){return ia.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Vy}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=uO,n={}){return this.isValid?Jo.create(this.s.loc.clone(n),e).formatInterval(this):Vy}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Vy}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Vy}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Vy}toFormat(e,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:Vy}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):Qo.invalid(this.invalidReason)}mapEndpoints(e){return ia.fromDateTimes(e(this.s),e(this.e))}}class iE{static hasDST(e=la.defaultZone){const n=Wn.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return xh.isValidZone(e)}static normalizeZone(e){return vp(e,la.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||Ci.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||Ci.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||Ci.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:a="gregory"}={}){return(i||Ci.create(n,r,a)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:a="gregory"}={}){return(i||Ci.create(n,r,a)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||Ci.create(n,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||Ci.create(n,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Ci.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return Ci.create(n,null,"gregory").eras(e)}static features(){return{relative:cue(),localeWeek:due()}}}function bq(t,e){const n=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(e)-n(t);return Math.floor(Qo.fromMillis(r).as("days"))}function q8e(t,e,n){const r=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const f=bq(l,c);return(f-f%7)/7}],["days",bq]],i={},a=t;let o,s;for(const[l,c]of r)n.indexOf(l)>=0&&(o=l,i[l]=c(t,e),s=a.plus(i),s>e?(i[l]--,t=a.plus(i),t>e&&(s=t,i[l]--,t=a.plus(i))):t=s);return[t,i,s,o]}function K8e(t,e,n,r){let[i,a,o,s]=q8e(t,e,n);const l=e-i,c=n.filter(h=>["hours","minutes","seconds","milliseconds"].indexOf(h)>=0);c.length===0&&(o<e&&(o=i.plus({[s]:1})),o!==i&&(a[s]=(a[s]||0)+l/(o-i)));const f=Qo.fromObject(a,r);return c.length>0?Qo.fromMillis(l,r).shiftTo(...c).plus(f):f}const G8e="missing Intl.DateTimeFormat.formatToParts support";function Br(t,e=n=>n){return{regex:t,deser:([n])=>e(Fje(n))}}const Z8e=" ",Oue=`[ ${Z8e}]`,Cue=new RegExp(Oue,"g");function Q8e(t){return t.replace(/\./g,"\\.?").replace(Cue,Oue)}function _q(t){return t.replace(/\./g,"").replace(Cue," ").toLowerCase()}function ju(t,e){return t===null?null:{regex:RegExp(t.map(Q8e).join("|")),deser:([n])=>t.findIndex(r=>_q(n)===_q(r))+e}}function wq(t,e){return{regex:t,deser:([,n,r])=>zC(n,r),groups:e}}function aE(t){return{regex:t,deser:([e])=>e}}function X8e(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function J8e(t,e){const n=zu(e),r=zu(e,"{2}"),i=zu(e,"{3}"),a=zu(e,"{4}"),o=zu(e,"{6}"),s=zu(e,"{1,2}"),l=zu(e,"{1,3}"),c=zu(e,"{1,6}"),f=zu(e,"{1,9}"),h=zu(e,"{2,4}"),p=zu(e,"{4,6}"),g=b=>({regex:RegExp(X8e(b.val)),deser:([w])=>w,literal:!0}),v=(b=>{if(t.literal)return g(b);switch(b.val){case"G":return ju(e.eras("short"),0);case"GG":return ju(e.eras("long"),0);case"y":return Br(c);case"yy":return Br(h,XB);case"yyyy":return Br(a);case"yyyyy":return Br(p);case"yyyyyy":return Br(o);case"M":return Br(s);case"MM":return Br(r);case"MMM":return ju(e.months("short",!0),1);case"MMMM":return ju(e.months("long",!0),1);case"L":return Br(s);case"LL":return Br(r);case"LLL":return ju(e.months("short",!1),1);case"LLLL":return ju(e.months("long",!1),1);case"d":return Br(s);case"dd":return Br(r);case"o":return Br(l);case"ooo":return Br(i);case"HH":return Br(r);case"H":return Br(s);case"hh":return Br(r);case"h":return Br(s);case"mm":return Br(r);case"m":return Br(s);case"q":return Br(s);case"qq":return Br(r);case"s":return Br(s);case"ss":return Br(r);case"S":return Br(l);case"SSS":return Br(i);case"u":return aE(f);case"uu":return aE(s);case"uuu":return Br(n);case"a":return ju(e.meridiems(),0);case"kkkk":return Br(a);case"kk":return Br(h,XB);case"W":return Br(s);case"WW":return Br(r);case"E":case"c":return Br(n);case"EEE":return ju(e.weekdays("short",!1),1);case"EEEE":return ju(e.weekdays("long",!1),1);case"ccc":return ju(e.weekdays("short",!0),1);case"cccc":return ju(e.weekdays("long",!0),1);case"Z":case"ZZ":return wq(new RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case"ZZZ":return wq(new RegExp(`([+-]${s.source})(${r.source})?`),2);case"z":return aE(/[a-z_+-/]{1,256}?/i);case" ":return aE(/[^\S\n\r]/);default:return g(b)}})(t)||{invalidReason:G8e};return v.token=t,v}const eHe={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 tHe(t,e,n){const{type:r,value:i}=t;if(r==="literal"){const l=/^\s+$/.test(i);return{literal:!l,val:l?" ":i}}const a=e[r];let o=r;r==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=n.hour12?"hour12":"hour24");let s=eHe[o];if(typeof s=="object"&&(s=s[a]),s)return{literal:!1,val:s}}function nHe(t){return[`^${t.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,t]}function rHe(t,e,n){const r=t.match(e);if(r){const i={};let a=1;for(const o in n)if(o_(n,o)){const s=n[o],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(i[s.token.val[0]]=s.deser(r.slice(a,a+l))),a+=l}return[r,i]}else return[r,{}]}function iHe(t){const e=a=>{switch(a){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,r;return jn(t.z)||(n=xh.create(t.z)),jn(t.Z)||(n||(n=new Ss(t.Z)),r=t.Z),jn(t.q)||(t.M=(t.q-1)*3+1),jn(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),jn(t.u)||(t.S=uW(t.u)),[Object.keys(t).reduce((a,o)=>{const s=e(o);return s&&(a[s]=t[o]),a},{}),n,r]}let IN=null;function aHe(){return IN||(IN=Wn.fromMillis(1555555555555)),IN}function oHe(t,e){if(t.literal)return t;const n=Jo.macroTokenToFormatOpts(t.val),r=$ue(n,e);return r==null||r.includes(void 0)?t:r}function Iue(t,e){return Array.prototype.concat(...t.map(n=>oHe(n,e)))}class Mue{constructor(e,n){if(this.locale=e,this.format=n,this.tokens=Iue(Jo.parseFormat(n),e),this.units=this.tokens.map(r=>J8e(r,e)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,i]=nHe(this.units);this.regex=RegExp(r,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){const[n,r]=rHe(e,this.regex,this.handlers),[i,a,o]=r?iHe(r):[null,null,void 0];if(o_(r,"a")&&o_(r,"H"))throw new db("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:i,zone:a,specificOffset:o}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Rue(t,e,n){return new Mue(t,n).explainFromTokens(e)}function sHe(t,e,n){const{result:r,zone:i,specificOffset:a,invalidReason:o}=Rue(t,e,n);return[r,i,a,o]}function $ue(t,e){if(!t)return null;const r=Jo.create(e,t).dtFormatter(aHe()),i=r.formatToParts(),a=r.resolvedOptions();return i.map(o=>tHe(o,t,a))}const MN="Invalid DateTime",lHe=864e13;function cx(t){return new lc("unsupported zone",`the zone "${t.name}" is not supported`)}function RN(t){return t.weekData===null&&(t.weekData=cO(t.c)),t.weekData}function $N(t){return t.localWeekData===null&&(t.localWeekData=cO(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Bg(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new Wn({...n,...e,old:n})}function Pue(t,e,n){let r=t-e*60*1e3;const i=n.offset(r);if(e===i)return[r,e];r-=(i-e)*60*1e3;const a=n.offset(r);return i===a?[r,i]:[t-Math.min(i,a)*60*1e3,Math.max(i,a)]}function oE(t,e){t+=e*60*1e3;const n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function BT(t,e,n){return Pue(WC(t),e,n)}function xq(t,e){const n=t.o,r=t.c.year+Math.trunc(e.years),i=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,a={...t.c,year:r,month:i,day:Math.min(t.c.day,dO(r,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=Qo.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),s=WC(a);let[l,c]=Pue(s,n,t.zone);return o!==0&&(l+=o,c=t.zone.offset(l)),{ts:l,o:c}}function By(t,e,n,r,i,a){const{setZone:o,zone:s}=n;if(t&&Object.keys(t).length!==0||e){const l=e||s,c=Wn.fromObject(t,{...n,zone:l,specificOffset:a});return o?c:c.setZone(s)}else return Wn.invalid(new lc("unparsable",`the input "${i}" can't be parsed as ${r}`))}function sE(t,e,n=!0){return t.isValid?Jo.create(Ci.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function PN(t,e){const n=t.c.year>9999||t.c.year<0;let r="";return n&&t.c.year>=0&&(r+="+"),r+=Ia(t.c.year,n?6:4),e?(r+="-",r+=Ia(t.c.month),r+="-",r+=Ia(t.c.day)):(r+=Ia(t.c.month),r+=Ia(t.c.day)),r}function Sq(t,e,n,r,i,a){let o=Ia(t.c.hour);return e?(o+=":",o+=Ia(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=":")):o+=Ia(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=Ia(t.c.second),(t.c.millisecond!==0||!r)&&(o+=".",o+=Ia(t.c.millisecond,3))),i&&(t.isOffsetFixed&&t.offset===0&&!a?o+="Z":t.o<0?(o+="-",o+=Ia(Math.trunc(-t.o/60)),o+=":",o+=Ia(Math.trunc(-t.o%60))):(o+="+",o+=Ia(Math.trunc(t.o/60)),o+=":",o+=Ia(Math.trunc(t.o%60)))),a&&(o+="["+t.zone.ianaName+"]"),o}const Lue={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},uHe={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},cHe={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Nue=["year","month","day","hour","minute","second","millisecond"],dHe=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],fHe=["year","ordinal","hour","minute","second","millisecond"];function hHe(t){const e={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"}[t.toLowerCase()];if(!e)throw new Fle(t);return e}function Aq(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return hHe(t)}}function pHe(t){return WT[t]||(UT===void 0&&(UT=la.now()),WT[t]=t.offset(UT)),WT[t]}function kq(t,e){const n=vp(e.zone,la.defaultZone);if(!n.isValid)return Wn.invalid(cx(n));const r=Ci.fromObject(e);let i,a;if(jn(t.year))i=la.now();else{for(const l of Nue)jn(t[l])&&(t[l]=Lue[l]);const o=lue(t)||uue(t);if(o)return Wn.invalid(o);const s=pHe(n);[i,a]=BT(t,s,n)}return new Wn({ts:i,zone:n,loc:r,o:a})}function Eq(t,e,n){const r=jn(n.round)?!0:n.round,i=(o,s)=>(o=cW(o,r||n.calendary?0:2,!0),e.loc.clone(n).relFormatter(n).format(o,s)),a=o=>n.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(n.unit)return i(a(n.unit),n.unit);for(const o of n.units){const s=a(o);if(Math.abs(s)>=1)return i(s,o)}return i(t>e?-0:0,n.units[n.units.length-1])}function Tq(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}let UT,WT={};class Wn{constructor(e){const n=e.zone||la.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new lc("invalid input"):null)||(n.isValid?null:cx(n));this.ts=jn(e.ts)?la.now():e.ts;let i=null,a=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[i,a]=[e.old.c,e.old.o];else{const s=Lp(e.o)&&!e.old?e.o:n.offset(this.ts);i=oE(this.ts,s),r=Number.isNaN(i.year)?new lc("invalid input"):null,i=r?null:i,a=r?null:s}this._zone=n,this.loc=e.loc||Ci.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=i,this.o=a,this.isLuxonDateTime=!0}static now(){return new Wn({})}static local(){const[e,n]=Tq(arguments),[r,i,a,o,s,l,c]=n;return kq({year:r,month:i,day:a,hour:o,minute:s,second:l,millisecond:c},e)}static utc(){const[e,n]=Tq(arguments),[r,i,a,o,s,l,c]=n;return e.zone=Ss.utcInstance,kq({year:r,month:i,day:a,hour:o,minute:s,second:l,millisecond:c},e)}static fromJSDate(e,n={}){const r=zje(e)?e.valueOf():NaN;if(Number.isNaN(r))return Wn.invalid("invalid input");const i=vp(n.zone,la.defaultZone);return i.isValid?new Wn({ts:r,zone:i,loc:Ci.fromObject(n)}):Wn.invalid(cx(i))}static fromMillis(e,n={}){if(Lp(e))return e<-864e13||e>lHe?Wn.invalid("Timestamp out of range"):new Wn({ts:e,zone:vp(n.zone,la.defaultZone),loc:Ci.fromObject(n)});throw new Yo(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(Lp(e))return new Wn({ts:e*1e3,zone:vp(n.zone,la.defaultZone),loc:Ci.fromObject(n)});throw new Yo("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};const r=vp(n.zone,la.defaultZone);if(!r.isValid)return Wn.invalid(cx(r));const i=Ci.fromObject(n),a=fO(e,Aq),{minDaysInFirstWeek:o,startOfWeek:s}=fq(a,i),l=la.now(),c=jn(n.specificOffset)?r.offset(l):n.specificOffset,f=!jn(a.ordinal),h=!jn(a.year),p=!jn(a.month)||!jn(a.day),g=h||p,y=a.weekYear||a.weekNumber;if((g||f)&&y)throw new db("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(p&&f)throw new db("Can't mix ordinal dates with month/day");const v=y||a.weekday&&!g;let b,w,S=oE(l,c);v?(b=dHe,w=uHe,S=cO(S,o,s)):f?(b=fHe,w=cHe,S=CN(S)):(b=Nue,w=Lue);let T=!1;for(const M of b){const C=a[M];jn(C)?T?a[M]=w[M]:a[M]=S[M]:T=!0}const _=v?Bje(a,o,s):f?Uje(a):lue(a),E=_||uue(a);if(E)return Wn.invalid(E);const D=v?cq(a,o,s):f?dq(a):a,[O,V]=BT(D,c,r),P=new Wn({ts:O,zone:r,o:V,loc:i});return a.weekday&&g&&e.weekday!==P.weekday?Wn.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${P.toISO()}`):P.isValid?P:Wn.invalid(P.invalid)}static fromISO(e,n={}){const[r,i]=M8e(e);return By(r,i,n,"ISO 8601",e)}static fromRFC2822(e,n={}){const[r,i]=R8e(e);return By(r,i,n,"RFC 2822",e)}static fromHTTP(e,n={}){const[r,i]=$8e(e);return By(r,i,n,"HTTP",n)}static fromFormat(e,n,r={}){if(jn(e)||jn(n))throw new Yo("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:a=null}=r,o=Ci.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0}),[s,l,c,f]=sHe(o,e,n);return f?Wn.invalid(f):By(s,l,r,`format ${n}`,e,c)}static fromString(e,n,r={}){return Wn.fromFormat(e,n,r)}static fromSQL(e,n={}){const[r,i]=U8e(e);return By(r,i,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new Yo("need to specify a reason the DateTime is invalid");const r=e instanceof lc?e:new lc(e,n);if(la.throwOnInvalid)throw new hje(r);return new Wn({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){const r=$ue(e,Ci.fromObject(n));return r?r.map(i=>i?i.val:null).join(""):null}static expandFormat(e,n={}){return Iue(Jo.parseFormat(e),Ci.fromObject(n)).map(i=>i.val).join("")}static resetCache(){UT=void 0,WT={}}get(e){return this[e]}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?RN(this).weekYear:NaN}get weekNumber(){return this.isValid?RN(this).weekNumber:NaN}get weekday(){return this.isValid?RN(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?$N(this).weekday:NaN}get localWeekNumber(){return this.isValid?$N(this).weekNumber:NaN}get localWeekYear(){return this.isValid?$N(this).weekYear:NaN}get ordinal(){return this.isValid?CN(this.c).ordinal:NaN}get monthShort(){return this.isValid?iE.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?iE.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?iE.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?iE.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 e=864e5,n=6e4,r=WC(this.c),i=this.zone.offset(r-e),a=this.zone.offset(r+e),o=this.zone.offset(r-i*n),s=this.zone.offset(r-a*n);if(o===s)return[this];const l=r-o*n,c=r-s*n,f=oE(l,o),h=oE(c,s);return f.hour===h.hour&&f.minute===h.minute&&f.second===h.second&&f.millisecond===h.millisecond?[Bg(this,{ts:l}),Bg(this,{ts:c})]:[this]}get isInLeapYear(){return qA(this.year)}get daysInMonth(){return dO(this.year,this.month)}get daysInYear(){return this.isValid?Db(this.year):NaN}get weeksInWeekYear(){return this.isValid?US(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?US(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:n,numberingSystem:r,calendar:i}=Jo.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:i}}toUTC(e=0,n={}){return this.setZone(Ss.instance(e),n)}toLocal(){return this.setZone(la.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(e=vp(e,la.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(n||r){const a=e.offset(this.ts),o=this.toObject();[i]=BT(o,a,e)}return Bg(this,{ts:i,zone:e})}else return Wn.invalid(cx(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:r}={}){const i=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:r});return Bg(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const n=fO(e,Aq),{minDaysInFirstWeek:r,startOfWeek:i}=fq(n,this.loc),a=!jn(n.weekYear)||!jn(n.weekNumber)||!jn(n.weekday),o=!jn(n.ordinal),s=!jn(n.year),l=!jn(n.month)||!jn(n.day),c=s||l,f=n.weekYear||n.weekNumber;if((c||o)&&f)throw new db("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new db("Can't mix ordinal dates with month/day");let h;a?h=cq({...cO(this.c,r,i),...n},r,i):jn(n.ordinal)?(h={...this.toObject(),...n},jn(n.day)&&(h.day=Math.min(dO(h.year,h.month),h.day))):h=dq({...CN(this.c),...n});const[p,g]=BT(h,this.o,this.zone);return Bg(this,{ts:p,o:g})}plus(e){if(!this.isValid)return this;const n=Qo.fromDurationLike(e);return Bg(this,xq(this,n))}minus(e){if(!this.isValid)return this;const n=Qo.fromDurationLike(e).negate();return Bg(this,xq(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},i=Qo.normalizeUnit(e);switch(i){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(i==="weeks")if(n){const a=this.loc.getStartOfWeek(),{weekday:o}=this;o<a&&(r.weekNumber=this.weekNumber-1),r.weekday=a}else r.weekday=1;if(i==="quarters"){const a=Math.ceil(this.month/3);r.month=(a-1)*3+1}return this.set(r)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?Jo.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):MN}toLocaleString(e=uO,n={}){return this.isValid?Jo.create(this.loc.clone(n),e).formatDateTime(this):MN}toLocaleParts(e={}){return this.isValid?Jo.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:i=!0,extendedZone:a=!1}={}){if(!this.isValid)return null;const o=e==="extended";let s=PN(this,o);return s+="T",s+=Sq(this,o,n,r,i,a),s}toISODate({format:e="extended"}={}){return this.isValid?PN(this,e==="extended"):null}toISOWeekDate(){return sE(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:i=!1,extendedZone:a=!1,format:o="extended"}={}){return this.isValid?(i?"T":"")+Sq(this,o==="extended",n,e,r,a):null}toRFC2822(){return sE(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return sE(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?PN(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let i="HH:mm:ss.SSS";return(n||e)&&(r&&(i+=" "),n?i+="z":e&&(i+="ZZ")),sE(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():MN}[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(e={}){if(!this.isValid)return{};const n={...this.c};return e.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(e,n="milliseconds",r={}){if(!this.isValid||!e.isValid)return Qo.invalid("created by diffing an invalid DateTime");const i={locale:this.locale,numberingSystem:this.numberingSystem,...r},a=jje(n).map(Qo.normalizeUnit),o=e.valueOf()>this.valueOf(),s=o?this:e,l=o?e:this,c=K8e(s,l,a,i);return o?c.negate():c}diffNow(e="milliseconds",n={}){return this.diff(Wn.now(),e,n)}until(e){return this.isValid?ia.fromDateTimes(this,e):this}hasSame(e,n,r){if(!this.isValid)return!1;const i=e.valueOf(),a=this.setZone(e.zone,{keepLocalTime:!0});return a.startOf(n,r)<=i&&i<=a.endOf(n,r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const n=e.base||Wn.fromObject({},{zone:this.zone}),r=e.padding?this<n?-e.padding:e.padding:0;let i=["years","months","days","hours","minutes","seconds"],a=e.unit;return Array.isArray(e.unit)&&(i=e.unit,a=void 0),Eq(n,this.plus(r),{...e,numeric:"always",units:i,unit:a})}toRelativeCalendar(e={}){return this.isValid?Eq(e.base||Wn.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(Wn.isDateTime))throw new Yo("min requires all arguments be DateTimes");return hq(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(Wn.isDateTime))throw new Yo("max requires all arguments be DateTimes");return hq(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,r={}){const{locale:i=null,numberingSystem:a=null}=r,o=Ci.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});return Rue(o,e,n)}static fromStringExplain(e,n,r={}){return Wn.fromFormatExplain(e,n,r)}static buildFormatParser(e,n={}){const{locale:r=null,numberingSystem:i=null}=n,a=Ci.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});return new Mue(a,e)}static fromFormatParser(e,n,r={}){if(jn(e)||jn(n))throw new Yo("fromFormatParser requires an input string and a format parser");const{locale:i=null,numberingSystem:a=null}=r,o=Ci.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});if(!o.equals(n.locale))throw new Yo(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);const{result:s,zone:l,specificOffset:c,invalidReason:f}=n.explainFromTokens(e);return f?Wn.invalid(f):By(s,l,r,`format ${n.format}`,e,c)}static get DATE_SHORT(){return uO}static get DATE_MED(){return Vle}static get DATE_MED_WITH_WEEKDAY(){return gje}static get DATE_FULL(){return Ble}static get DATE_HUGE(){return Ule}static get TIME_SIMPLE(){return Wle}static get TIME_WITH_SECONDS(){return zle}static get TIME_WITH_SHORT_OFFSET(){return jle}static get TIME_WITH_LONG_OFFSET(){return Hle}static get TIME_24_SIMPLE(){return Yle}static get TIME_24_WITH_SECONDS(){return qle}static get TIME_24_WITH_SHORT_OFFSET(){return Kle}static get TIME_24_WITH_LONG_OFFSET(){return Gle}static get DATETIME_SHORT(){return Zle}static get DATETIME_SHORT_WITH_SECONDS(){return Qle}static get DATETIME_MED(){return Xle}static get DATETIME_MED_WITH_SECONDS(){return Jle}static get DATETIME_MED_WITH_WEEKDAY(){return vje}static get DATETIME_FULL(){return eue}static get DATETIME_FULL_WITH_SECONDS(){return tue}static get DATETIME_HUGE(){return nue}static get DATETIME_HUGE_WITH_SECONDS(){return rue}}function T1(t){if(Wn.isDateTime(t))return t;if(t&&t.valueOf&&Lp(t.valueOf()))return Wn.fromJSDate(t);if(t&&typeof t=="object")return Wn.fromObject(t);throw new Yo(`Unknown datetime argument: ${t}, of type ${typeof t}`)}const Dd={getCookie(t,e){const n=document.cookie.split(";");for(let r=0;r<n.length;r++){const i=n[r].trim();if(i.startsWith(t+"="))return i.substring(t.length+1)}return null},setSessionCookie(t,e,n="/"){document.cookie=`${t}=${encodeURIComponent(e)}; path=${n}; SameSite=Lax`}},mHe=t=>{try{const e=new Date(t??""),r=new Date().getTime()-e.getTime(),i=Math.floor(r/(1e3*60*60)),a=Math.floor(r%(1e3*60*60)/(1e3*60));if(i<=3)return i===0?`${a} minute${a!==1?"s":""} ago`:`${i} hour${i!==1?"s":""} ${a} minute${a!==1?"s":""} ago`}catch(e){console.error("isShowShortDate -> error",e)}},Dq=()=>Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore",Fue=t=>{try{const e=new Date(t).toISOString(),n=Wn.fromISO(e).setZone(Dq()).toFormat(l5e);return String(n)}catch(e){console.error("formatDateValue",{e,dateStr:t,tz:Dq()})}return t},gHe=t=>{try{if(!t)return"";const e=new Date(t);if(isNaN(e.getTime()))throw new Error("Invalid date:"+t);const n=e.toISOString(),r=mHe(n),i=Fue(n);return r||String(i)}catch{return String(t)}},vHe=Qe({__name:"SectionNewRendition",setup(t,{expose:e}){const{getEnvVariable:n}=Al(),r=N=>{var _e;const U=n("BASE_REVIEW_URL"),ee=yn(),le=(_e=Qi({type:"review_rendition",config:{reviewDomain:U,ws_code:ee,scene_id:N.item.id,rendition_id:N.id,take_id:N.item.entity_id}}))==null?void 0:_e.url;window.open(le)},i=hc("switchInstance"),a=(N,U)=>{var _e;const ee=n("BASE_URL"),le=(_e=Qi({type:"hub_rendition",config:{baseDomain:ee,ws_code:yn(),scene_id:N.item.id,rendition_id:N.id}}))==null?void 0:_e.url;if(U.metaKey||U.ctrlKey){window.open(le,"_blank");return}else{if(i){i("scene_hub",{tab:"",id:N.item.id||""},{showLoading:!1});return}window.location.href=le}window.open(le)},o=Z(()=>{var N;return(N=w.value[w.value.length-1])==null?void 0:N.id}),s=Ht({canLoadMore:!0,failedRequest:!1}),l=async()=>{var N,U,ee,le;try{if(!o.value||!s.canLoadMore||h.value)return!0;h.value=!0;const _e=await p.getNextRendition(o.value),be=(U=(N=_e==null?void 0:_e.recent_activities)==null?void 0:N.new_renditions)==null?void 0:U.data;if(be)be.length==0&&(s.canLoadMore=!1),w.value=w.value.concat(((le=(ee=_e==null?void 0:_e.recent_activities)==null?void 0:ee.new_renditions)==null?void 0:le.data)||[]);else throw new Error("Failed to get more data")}catch(_e){s.failedRequest=!0,console.error("getMoreData -> error",_e)}finally{h.value=!1}},c=re(null),f=re(null);zt(()=>{S()}),Wae(f,async()=>{await l()},{distance:10,canLoadMore:()=>!h.value});const h=re(!1),p=VC(),g=re({}),y=async()=>{var U,ee,le,_e;let N;try{h.value=!0,N=await p.getRecentActivities("recent_activities.new_renditions"),b.value=(ee=(U=N==null?void 0:N.recent_activities)==null?void 0:U.new_renditions)==null?void 0:ee.meta["X-Tsr-signature"]}catch(be){console.error("getRecentNewRendition -> error",be)}finally{h.value=!1}return((_e=(le=N==null?void 0:N.recent_activities)==null?void 0:le.new_renditions)==null?void 0:_e.data)||[]},v=async()=>{var U,ee;const N=await p.getRecentActivities("recent_activities.new_renditions",ny);return{signature:(ee=(U=N==null?void 0:N.recent_activities)==null?void 0:U.new_renditions)==null?void 0:ee.meta["X-Tsr-signature"]}},b=re(void 0);ay("rendition",v,b);const w=re([]),S=async()=>{var N,U;w.value=[],w.value=await y(),_.value=((U=(N=c.value)==null?void 0:N.parentElement)==null?void 0:U.offsetHeight)||200,h.value=!1};e({resetList:S});const T=re(null),{height:_}=hh(T),E=fr(),{permissionMap:D}=Pn(E),O=(N,U)=>{const ee=n("BASE_URL"),le=Qi({type:"hub_rendition",config:{baseDomain:ee,ws_code:yn(),scene_id:N,rendition_id:U}}).url;navigator.clipboard.writeText(le).then(()=>{}).catch(_e=>{console.error("Failed to copy: ",_e)})},{deleteRendition:V}=p,{showErrorSnackbar:P}=jA(),M=()=>{let N="Update failed";navigator.onLine||(N="Network error"),P({label:N})},{refreshState:C}=Pn(ks()),F=async N=>{try{await V({scene_id:N.item.id,rendition_id:N.id})&&(C.value.rendition=!0,w.value=w.value.filter(ee=>ee.id!==N.id))}catch(U){M(),console.error("handleDelete -> error",U)}},W=Z(()=>Object.fromEntries(w.value.map(N=>[N.id,H(N)]))),H=N=>N!=null&&N.item?{items:(N==null?void 0:N.entity_path.map(ee=>{var _e;const le=ee.is_parent_item?"scene_hub":"project";return{name:ee.name,url:(_e=Qi({type:le,config:{baseDomain:n("BASE_URL"),ws_code:yn(),entity_id:ee.id,scene_id:ee.is_parent_item?ee.id:void 0}}))==null?void 0:_e.url,disabled:!1,id:ee.id,isHighlight:ee.is_parent_item=!0}}))||[],lastItemWidth:125,url:"",width:200,canCopy:!1,numberOfVisibleItems:2}:void 0,j={getEnvVariable:n,handleOpenInReview:r,switchInstance:i,handleOpenInHub:a,lastItemId:o,states:s,getMoreData:l,sectionRef:c,listRef:f,loading:h,peopleCard:p,hoveredMap:g,getRecentNewRendition:y,getUpdateSignature:v,iniSignature:b,list:w,resetList:S,recentlyAccessSceneRef:T,height:_,store:E,permissionMap:D,handleCopy:O,deleteRendition:V,showErrorSnackbar:P,showError:M,refreshState:C,handleDelete:F,breadcrumbConfig:W,createBreadCrumbProp:H,get ArboTooltip(){return dr},get TessRenditionCard(){return Sae},get TessTruncatedText(){return ty},get TessBreadcrumb(){return vC},get ArboButton(){return Nt},NewRenditionSkeleton:lje,InfoVisual:Oc,get formatDate(){return gHe},get formatDateValue(){return Fue}};return Object.defineProperty(j,"__isScriptSetup",{enumerable:!1,value:!0}),j}}),yHe={ref:"sectionRef",class:"section-renditions-wrapper"},bHe={ref:"listRef",class:"section-renditions"},_He={key:0,class:"empty-data"},wHe=["onMouseover","onMouseleave"],xHe={class:"timestamp"},SHe={key:0,class:"rendition-breadcrumb"},AHe={class:"name"};function kHe(t,e,n,r,i,a){return R(),Y("div",yHe,[X("div",bHe,[r.list.length==0&&!r.loading?(R(),Y("div",_He,[he(r.InfoVisual,{"visual-name":"NoData",label:"No activity available.",height:150})])):pe("v-if",!0),(R(!0),Y(wt,null,Qt(r.list,o=>{var s,l,c,f;return R(),Y("div",{key:o.id,class:Fe(["rendition-item",{hovered:r.hoveredMap[o.id]}]),onMouseover:()=>{r.hoveredMap[o.id]||(r.hoveredMap[o.id]=1)},onMouseleave:()=>{r.hoveredMap[o.id]===1&&(r.hoveredMap[o.id]=0)}},[he(r.ArboTooltip,{content:r.formatDateValue(o.created_at),delay:[1e3,0]},{default:ze(()=>[X("div",xHe,it(r.formatDate(o.created_at)),1)]),_:2},1032,["content"]),he(r.TessRenditionCard,Ft({class:"rendition-card"},{ref_for:!0},{renditionData:o,disabled:!1,hasNewComment:!1,isDeletable:((l=(s=o.permission)==null?void 0:s.media)==null?void 0:l.has_delete_rendition_permission)==1,isReadOnly:!1,active:!1,hovered:r.hoveredMap[o.id]>0,canDelete:((f=(c=o.permission)==null?void 0:c.media)==null?void 0:f.has_delete_rendition_permission)==1,canOpenReview:r.permissionMap.redirectPermission.review,canOpenSceneHub:r.permissionMap.redirectPermission.scene_hub,customStyle:{borderWidth:2,borderColor:"white"}},{tooltip:"",onOpenHub:(h,p)=>r.handleOpenInHub(o,p),onShowPopup:h=>r.hoveredMap[o.id]=2,onHidePopup:h=>r.hoveredMap[o.id]=0,onOpenReview:()=>r.handleOpenInReview(o),onClick:Rt(h=>r.handleOpenInHub(o,h),["stop"]),onCopy:h=>r.handleCopy(o.item.id,h),onDelete:()=>r.handleDelete(o)}),{title:ze(()=>{var h;return[r.breadcrumbConfig[o.id]?(R(),Y("div",SHe,[he(r.TessBreadcrumb,Ft({ref_for:!0},r.breadcrumbConfig[o.id],{url:"",items:((h=r.breadcrumbConfig[o.id])==null?void 0:h.items)||[],disabled:"true"}),null,16,["items"])])):pe("v-if",!0)]}),timestamp:ze(()=>[X("div",AHe,[he(r.TessTruncatedText,{value:o.name,"max-width":190},null,8,["value"])])]),_:2,__:[0]},1040,["onOpenHub","onShowPopup","onHidePopup","onOpenReview","onClick","onCopy","onDelete"])],42,wHe)}),128)),X("div",null,[r.states.failedRequest?(R(),Re(r.ArboButton,{key:0,label:"Retry",onClick:r.getMoreData})):pe("v-if",!0)]),r.loading&&r.states.canLoadMore?(R(),Y(wt,{key:1},Qt(3,o=>he(r.NewRenditionSkeleton,{key:o})),64)):pe("v-if",!0)],512)],512)}const EHe=Nn(vHe,[["render",kHe],["__scopeId","data-v-0c7bda83"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionNewRendition.vue"]]),THe={},DHe={class:"pi-skeleton"};function OHe(t,e){return R(),Y("div",DHe,e[0]||(e[0]=[Vv('<div class="pi-skeleton-avatar" data-v-ee72a1a9></div><div class="pi-skeleton-body" data-v-ee72a1a9><div class="pi-skeleton-details" data-v-ee72a1a9><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-line" style="width:80%;" data-v-ee72a1a9></div></div><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-line large" style="width:50%;" data-v-ee72a1a9></div><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-button" data-v-ee72a1a9></div><div class="pi-skeleton-button" data-v-ee72a1a9></div></div></div><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-button" style="width:140px;" data-v-ee72a1a9></div><div class="pi-skeleton-button" style="width:140px;" data-v-ee72a1a9></div></div><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-button" style="width:24px;" data-v-ee72a1a9></div><div class="pi-skeleton-button" style="width:100px;" data-v-ee72a1a9></div></div></div><div class="pi-skeleton-line" data-v-ee72a1a9></div></div></div><div class="pi-skeleton-status" data-v-ee72a1a9></div>',3)]))}const Vue=Nn(THe,[["render",OHe],["__scopeId","data-v-ee72a1a9"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/GirdItemSkeleton.vue"]]);var dx={exports:{}};/**
|
|
173
|
+
*/var K7;function Mze(){return K7||(K7=1,function(t,e){(function(n){var r;if(t.exports=n(),r=!0,!r){var i=window.Cookies,a=window.Cookies=n();a.noConflict=function(){return window.Cookies=i,a}}})(function(){function n(){for(var a=0,o={};a<arguments.length;a++){var s=arguments[a];for(var l in s)o[l]=s[l]}return o}function r(a){return a.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function i(a){function o(){}function s(c,f,h){if(!(typeof document>"u")){h=n({path:"/"},o.defaults,h),typeof h.expires=="number"&&(h.expires=new Date(new Date*1+h.expires*864e5)),h.expires=h.expires?h.expires.toUTCString():"";try{var p=JSON.stringify(f);/^[\{\[]/.test(p)&&(f=p)}catch{}f=a.write?a.write(f,c):encodeURIComponent(String(f)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),c=encodeURIComponent(String(c)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var g="";for(var y in h)h[y]&&(g+="; "+y,h[y]!==!0&&(g+="="+h[y].split(";")[0]));return document.cookie=c+"="+f+g}}function l(c,f){if(!(typeof document>"u")){for(var h={},p=document.cookie?document.cookie.split("; "):[],g=0;g<p.length;g++){var y=p[g].split("="),v=y.slice(1).join("=");!f&&v.charAt(0)==='"'&&(v=v.slice(1,-1));try{var b=r(y[0]);if(v=(a.read||a)(v,b)||r(v),f)try{v=JSON.parse(v)}catch{}if(h[b]=v,c===b)break}catch{}}return c?h[c]:h}}return o.set=s,o.get=function(c){return l(c,!1)},o.getJSON=function(c){return l(c,!0)},o.remove=function(c,f){s(c,"",n(f,{expires:-1}))},o.defaults={},o.withConverter=i,o}return i(function(){})})}(EN)),EN.exports}var Rze=Mze();const i_=h6(Rze),G7=300,jA=T_("snackbarStore",()=>{const t=re(void 0),e=(a,o)=>{const s=JSON.parse(JSON.stringify(a));s.bgColor=o?"#FF5200":"#02C39A",s.prefixIcon=o?"TriangleExclamation":"Check",t.value={...s,duration:s.duration||8e3}},n=RS(a=>{e(a,!0)},G7),r=RS(a=>{e(a,!1)},G7);return{contentSnackBar:t,hideSnackBar:()=>{t.value=void 0},showErrorSnackbar:n,showSuccessSnackbar:r}});var Yl=(t=>(t[t.CONTINUE=100]="CONTINUE",t[t.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",t[t.PROCESSING=102]="PROCESSING",t[t.OK=200]="OK",t[t.CREATED=201]="CREATED",t[t.ACCEPTED=202]="ACCEPTED",t[t.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",t[t.NO_CONTENT=204]="NO_CONTENT",t[t.RESET_CONTENT=205]="RESET_CONTENT",t[t.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",t[t.MULTI_STATUS=207]="MULTI_STATUS",t[t.ALREADY_REPORTED=208]="ALREADY_REPORTED",t[t.IM_USED=226]="IM_USED",t[t.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",t[t.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",t[t.FOUND=302]="FOUND",t[t.SEE_OTHER=303]="SEE_OTHER",t[t.NOT_MODIFIED=304]="NOT_MODIFIED",t[t.USE_PROXY=305]="USE_PROXY",t[t.SWITCH_PROXY=306]="SWITCH_PROXY",t[t.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",t[t.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",t[t.BAD_REQUEST=400]="BAD_REQUEST",t[t.UNAUTHORIZED=401]="UNAUTHORIZED",t[t.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",t[t.FORBIDDEN=403]="FORBIDDEN",t[t.NOT_FOUND=404]="NOT_FOUND",t[t.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",t[t.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",t[t.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",t[t.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",t[t.CONFLICT=409]="CONFLICT",t[t.GONE=410]="GONE",t[t.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",t[t.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",t[t.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",t[t.URI_TOO_LONG=414]="URI_TOO_LONG",t[t.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",t[t.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",t[t.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",t[t.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",t[t.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",t[t.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",t[t.LOCKED=423]="LOCKED",t[t.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",t[t.TOO_EARLY=425]="TOO_EARLY",t[t.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",t[t.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",t[t.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",t[t.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",t[t.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",t[t.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",t[t.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",t[t.BAD_GATEWAY=502]="BAD_GATEWAY",t[t.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",t[t.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",t[t.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",t[t.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",t[t.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",t[t.LOOP_DETECTED=508]="LOOP_DETECTED",t[t.NOT_EXTENDED=510]="NOT_EXTENDED",t[t.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",t))(Yl||{});const $ze={BASE_URL:"/pt",DEV:!0,MODE:"production",PROD:!1,SSR:!1,VITE_API_URL:"https://api.dev.arbocollab.com/api/v1",VITE_APP_BASE_PATH:"/pt",VITE_APP_REVIEW_BASE_URL:"https://review.dev.arbocollab.com",VITE_APP_WEBPAGE_TITLE:"People Insights | ARBO",VITE_BASE_URL:"https://app.dev.arbocollab.com",VITE_FAVICON_FILENAME:"favicon-arbo",VITE_FAVICON_VERSION:"v1"},co={info:(t,e)=>{console.info(`[AXIOS-INFO] ${t}`,e||"")},error:(t,e)=>{console.error(`[AXIOS-ERROR] ${t}`,e||"")},warn:(t,e)=>{console.warn(`[AXIOS-WARN] ${t}`,e||"")},debug:(t,e)=>{console.debug(`[AXIOS-DEBUG] ${t}`,e||"")}},Ile=()=>window.location.href,Z7=window.self!==window.top,Q7=yn(),Pze=[/^\/workspace\/[^/]+\/tile\/people\/ws-user-roles\/[^/]+\/basic-info$/i],Lze=()=>{try{return jA()}catch(t){return co.warn("Failed to get snackbar store",t),null}},Tb=(t,e)=>{const n=Lze();if(!n){co.warn("Snackbar not available, notification not shown",{type:t,message:e});return}try{t==="success"?n.showSuccessSnackbar({label:e}):n.showErrorSnackbar({label:e})}catch(r){co.error("Failed to show notification",{type:t,message:e,error:r})}};function Nze(){i_.set("account.last_access_url_people_tile",Ile()),window.self!==window.top||document.querySelector(":host")?co.info("Inside shadow DOM or iframe detected"):window.location.replace(`${a_("BASE_URL","https://api.dev.arbocollab.com/api/v1")}/login`)}const Fze=i_.get("account.token");Fze||Nze();const X7=()=>a_("BASE_URL","https://app.dev.arbocollab.com"),Mle=g6e({accessTokenKey:"account.token",refreshTokenKey:"account.refresh_token",domain:void 0,secure:window.location.protocol==="https:",sameSite:"lax",refreshTokenFn:async t=>{try{const e=await xn.refreshToken({refresh_token:t});return co.info("Calling token refresh",{tokenPrefix:t.substring(0,5)+"..."}),{access_token:e.access_token,refresh_token:e.refresh_token,expires_in:e.expires_in}}catch(e){throw Tb("error","Token refresh failed"),co.error("Token refresh failed",e),e}},onRefreshSuccess:t=>{Tb("success","Token refresh successful"),HA.defaults.headers.common.Authorization=`Bearer ${t.access_token}`},onRefreshFailure:t=>{co.error("Token refresh failed permanently",t),Tb("error","Token refresh failed"),Z7?window.parent.postMessage({type:"TOKEN_EXPIRED",message:"Authentication token has expired"},"*"):window.location.replace(`${X7()}/start`)},onCrossTabLogout:t=>{co.info("Cross-tab logout event received",{reason:t}),Z7?window.parent.postMessage({type:"TOKEN_EXPIRED",message:"Authentication token has expired"},"*"):window.location.replace(`${X7()}/start`),i_.set("account.last_access_url_people_tile",Ile(),{domain:void 0})},maxRetries:5,retryDelay:500,backoffFactor:1.5,storage:void 0});function Vze(t){t.headers={...t.headers,"ws-code":Q7,ws_code:Q7,"Access-Control-Allow-Origin":"*","Access-Control-Allow-Headers":"*","Accept-Language":"*","Content-Type":"application/json"}}function NC(t){const e=i_.get("account.token"),n=i_.get("ws.user-access-id");return Vze(t),t.headers.Authorization=`Bearer ${e}`,Pze.some(i=>i.test(t.url||""))&&(t.headers.tracking=`view,people,${n}`),t}function YB(t,e){var i,a;co.error(`Redirecting to ${t} page due to error`,{url:(i=e.config)==null?void 0:i.url,method:(a=e.config)==null?void 0:a.method,statusCode:t});const n=a_("API_BASE_URL","https://app.dev.arbocollab.com"),r=a_("module.alias","/pt");n?window.location.replace(`${n}${r}/${t}`):window.location.replace(`${r}/${t}`)}function V_(t){var n,r,i,a,o;if(t.code==="ERR_NETWORK")throw co.error("Network error detected",{message:t.message,url:(n=t.config)==null?void 0:n.url}),Tb("error","Network connection error. Please check your internet connection."),new Error("Network error");if(t.code==="ECONNABORTED")throw co.error("Request timeout",{url:(r=t.config)==null?void 0:r.url,timeout:(i=t.config)==null?void 0:i.timeout}),Tb("error","Request timed out. Please try again."),new Error("Request timeout");const e=Number(t.status);if(e===Yl.FORBIDDEN||e===Yl.NOT_FOUND)YB(String(e),t);else throw co.error("HTTP error",{status:e,code:t.code,url:(a=t.config)==null?void 0:a.url,method:(o=t.config)==null?void 0:o.method}),new Error(t.code)}function Rle(t){const{status:e,data:n,config:r}=t;switch(co.debug("API response received",{status:e,url:r.url,method:r.method}),e){case Yl.OK:case Yl.CREATED:case Yl.ACCEPTED:case Yl.NO_CONTENT:return n;case Yl.UNAUTHORIZED:case Yl.BAD_REQUEST:throw co.warn("Client error in response",{status:e,url:r.url}),Tb("error",(n==null?void 0:n.message)||"Request failed"),new Error(n.message||"An error occurred");case Yl.FORBIDDEN:throw co.warn("Forbidden response, triggering redirect",{url:r.url}),YB("403",t.data),new Error(n.message||"An error occurred");case Yl.NOT_FOUND:throw co.warn("Not found response, triggering redirect",{url:r.url}),YB("404",t.data),new Error(n.message||"An error occurred");case Yl.TOO_EARLY:throw co.warn("Too early response",{url:r.url}),new Error(n.message||"An error occurred");default:return e>=200&&e<300||co.warn("Unexpected response status",{status:e,url:r.url}),n}}function a_(t,e){const n=sessionStorage.getItem(t)||$ze[t.replace("API_","VITE_API_").replace("_URL","_URL")];return(n==null?void 0:n.length)>0?n:e}const HA=ta.create(),$le=ta.create(),FC=ta.create(),Ple={retryStatusCodes:[401,425],tokenExpiredDetection:t=>{var r,i,a,o,s,l,c;const e=(r=t==null?void 0:t.response)==null?void 0:r.status,n=(a=(i=t==null?void 0:t.response)==null?void 0:i.data)==null?void 0:a.error.toString();if(e===401){if(((s=(o=t==null?void 0:t.response)==null?void 0:o.data)==null?void 0:s.error)==="user_not_exists"||((c=(l=t==null?void 0:t.response)==null?void 0:l.data)==null?void 0:c.error)==="blocked")return!1;if(n==="token_expired"||n==="empty_token")return!0}return e===425}};Wse(HA,Mle,Ple);Wse($le,Mle,Ple);$le.interceptors.request.use(t=>NC(t),V_);HA.interceptors.request.use(t=>(t.baseURL=a_("API_BASE_URL","https://api.dev.arbocollab.com/api/v1"),NC(t)),V_);FC.interceptors.request.use(t=>(t.baseURL=a_("API_REVIEW_URL",void 0),NC(t)),V_);HA.interceptors.response.use(Rle,V_);FC.interceptors.request.use(NC,V_);FC.interceptors.response.use(Rle,V_);const Un={apiClient:HA,apiReviewV2Client:FC},tE={VIEW_PROJECT:"project_getProjectDirectoryUserInterface_read",VIEW_REVIEW:"media_getReviewUserInterface_read",VIEW_UPDATE:"update_getUpdateUserInterface_read",VIEW_WOOHOO:"woohoo_getWoohooUserInterface_read"},fr=T_("data",{state:()=>({selectedDataId:"",basicInfo:{},isLoadingProfile:!1,sceneDetailFetch:{status_type_in:"",selectedSceneId:"",fetchType:"",include_archived:0,sceneTotal:0,sceneSortType:"id",sceneOrder:"asc",searchScene:"",isTreemapLastLevel:!1,previousSelectedSceneId:"",privateSceneTotal:0},commentDetailFetch:{commentSortType:"id",commentOrder:"asc",searchComment:""},viewingReport:"",currentTab:"people-home",isLoadingFetchData:!1,permissionList:[],userInfo:{}}),getters:{permissionMap:t=>({redirectPermission:{review:t.permissionList.includes(tE.VIEW_REVIEW),project:t.permissionList.includes(tE.VIEW_PROJECT),woohoo:t.permissionList.includes(tE.VIEW_WOOHOO),update:t.permissionList.includes(tE.VIEW_UPDATE),scene_hub:!0}})},actions:{setSelectedDataId(t){this.selectedDataId=t},setSelectedDataProfile(t){this.basicInfo=t},setIsLoadingProfile(t){this.isLoadingProfile=t},setSceneDetailFetch(t){this.sceneDetailFetch={...this.sceneDetailFetch,...t}},setCommentDetailFetch(t){this.commentDetailFetch={...this.commentDetailFetch,...t}},resetSceneDetail(t=[]){const e={include_archived:0,sceneSortType:"id",sceneOrder:"asc",searchScene:""};Object.keys(e).forEach(n=>{t.includes(n)||(this.sceneDetailFetch[n]=e[n])})},resetCommentDetail(t=[]){const e={commentSortType:"id",commentOrder:"asc"};Object.keys(e).forEach(n=>{t.includes(n)||(this.commentDetailFetch[n]=e[n])})},setCurrentViewReport(t){this.viewingReport=t},setCurrentActiveTab(t){this.currentTab=t},setLoadingFetchData(t){this.isLoadingFetchData=t},setPermission(t){this.permissionList=t},setUserInfo(t){this.userInfo=t}}}),TN=t=>{const e=Object.fromEntries(new Map(t.entries()));return new URLSearchParams(e)};class Bze{getItems(e,n=20){const r=Bn.GET_ITEMS.replace("{ws_code}",yn()).replace("{page}",e.toString()).replace("{per_page}",n.toString());return Un.apiClient.get(r)}getChartData(e,n){const r=Bn.GET_CHART_DATA.replace("{ws_code}",yn()).replace("{id}",e.toString());return Un.apiClient.post(r,{include_chart:n})}getUserListProfile(e,n,r,i=""){const a=Bn.GET_USER_PROFILE_LIST.replace("{ws_code}",yn()).replace("{page}",e.toString()).replace("{per_page}",n.toString()).replace("{include_wur_id}",r.toString()).replace("{display_name_and_email_like}",i.toString());return Un.apiClient.get(a)}getUserBasicInfo(e){const n=Bn.GET_BASIC_INFO.replace("{ws_code}",yn()).replace("{WS_USER_ROLE_ID}",e.toString());return Un.apiClient.get(n)}getUserPermission(e=1){const n=Bn.USER_PERMISSION.replace("{ws_code}",yn()).replace("{is_newly}",e.toString());return Un.apiClient.get(n)}getUserProfile(){const e=Bn.USER_PROFILE;return Un.apiClient.get(e)}refreshToken(e){const n=Bn.REFRESH_TOKEN,r=typeof e=="object"?e:{refresh_token:e};return Un.apiClient.post(n,r).then(i=>({access_token:i.access_token,refresh_token:i.refresh_token,expires_in:i.expires_in})).catch(i=>Promise.reject(i))}getUnresolveAssignedComment({id:e,page:n,perPage:r=10,include:i,assignedAt:a,sortByType:o,sortOrder:s,before_id:l,searchText:c},f){const h=Bn.GET_UNRESOLVE_ASSIGNED_COMMENTS.replace("{ws_code}",yn()).replace("{WS_USER_ROLE_ID}",e.toString()).replace("{include}",i.toString());let p=new URLSearchParams;if(n&&p.append("page",n.toString()),r&&p.append("per_page",r.toString()),i&&p.append("include",i.toString()),a&&p.append("assigned_at_btw",a.toString()),l&&p.append("before_id",l.toString()),o&&s){const y=`${o}-${s}`;p.append("order_by",y.toString())}Object.entries(Kk).forEach(([y,v])=>{v&&p.append(y,String(v))}),f&&Object.entries(f).forEach(([y,v])=>{v&&p.append(y,String(v))}),p=TN(p),c&&p.append("comment_raw_like",c.toString());const g=`${h}?${p.toString()}`;return Un.apiClient.get(g)}getResolveAssignedComment({id:e,page:n,perPage:r=10,include:i,assignedAt:a,sortByType:o,sortOrder:s,searchText:l}){const c=Bn.GET_RESOLVE_ASSIGNED_COMMENTS.replace("{ws_code}",yn()).replace("{WS_USER_ROLE_ID}",e.toString()).replace("{include}",i.toString()),f=new URLSearchParams;if(n&&f.append("page",n.toString()),r&&f.append("per_page",r.toString()),i&&f.append("include",i.toString()),a&&f.append("assigned_at_btw",a.toString()),o&&s){const p=`${o}-${s}`;f.append("order_by",p.toString())}Object.entries(Kk).forEach(([p,g])=>{g&&f.append(p,String(g))}),l&&f.append("comment_raw_like",l.toString());const h=`${c}?${f.toString()}`;return Un.apiClient.get(h)}getAssignedTreeMapData(e,n="status",r="",i="",a="",o="",s,l){const c=Bn.GET_ASSIGNED_TREEMAP.replace("{ws_code}",yn()).replace("{WS_USER_ROLE_ID}",e.toString()),f=new URLSearchParams;f.append("treemap_type",n.toString()),l!==""&&l==="fromStatus"?r&&f.append("template_flow_status_id_eq",r.toString()):l!==""&&l==="fromEntity"&&r&&f.append("entity_id_eq",r.toString()),i&&f.append("entity_type_code_eq",i.toString()),a&&f.append("template_flow_status_type_in",a.toString()),o&&f.append("excluded_ids_in",o.toString()),s===1&&f.append("include_archived",s.toString());const h=`${c}?${f.toString()}`;return Un.apiClient.get(h)}getCommonItems({id:e,page:n,perPage:r=20,selectedId:i="",templateFlowType:a="",includeArchived:o,fetchType:s,sortByType:l,sortOrder:c,searchText:f="",dueDateNul:h="",actualDueDateNul:p="",actualDueDateNnul:g="",dueDateBtw:y="",actualDueDateBtw:v=""},b){const w=Bn.GET_COMMON_ITEMS.replace("{ws_code}",yn()).replace("{WS_USER_ROLE_ID}",e.toString());let S=new URLSearchParams;n&&S.append("page",n.toString()),r&&S.append("per_page",r.toString()),a&&S.append("template_flow_status_type_in",a.toString());const T=fr();if(s!==""&&s==="status")if(!T.sceneDetailFetch.isTreemapLastLevel)i&&S.append("template_flow_status_id_eq",i.toString());else{const E=T.sceneDetailFetch.previousSelectedSceneId;i&&S.append("entity_id_eq",i.toString()),E&&S.append("template_flow_status_id_eq",E.toString())}else if(s!==""&&s==="entity")if(!T.sceneDetailFetch.isTreemapLastLevel)i&&S.append("entity_id_eq",i.toString());else{const E=T.sceneDetailFetch.previousSelectedSceneId;E&&S.append("entity_id_eq",E.toString()),i&&S.append("template_flow_status_id_eq",i.toString())}if(o===1&&S.append("include_archived",o.toString()),f!==""&&S.append("name_like",f.toString()),l&&c)if(l==="template_flow_status.position"){const E=`${l}-${c}`;S.append("sort_by",E.toString())}else{const E=`item.${l}-${c}`;S.append("sort_by",E.toString())}h&&S.append("due_date_nul",h.toString()),p&&S.append("actual_due_date_nul",p.toString()),g&&S.append("actual_due_date_nnul",g.toString()),y&&S.append("due_date_btw",y.toString()),v&&S.append("actual_due_date_btw",v.toString()),S.append("include_permission","1"),Object.entries(Kk).forEach(([E,D])=>{D&&S.append(E,String(D))}),b&&Object.entries(b).forEach(([E,D])=>{D&&S.append(E,String(D))}),S=TN(S);const _=`${w}?${S.toString()}`;return Un.apiClient.get(_)}resolveComment(e,n,r){const i=Bn.RESOLVE_COMMENT.replace("{ws_code}",yn()).replace("{id}",e.toString()).replace("{item_id}",n.toString()).replace("{comment_id}",r.toString());return Un.apiReviewV2Client.post(i)}getTemplateFlows(e,n,r="",i=1,a=1){const o=Bn.TEMPLATE_FLOW_STATUS.replace("{ws_code}",yn()).replace("{page}",e.toString()).replace("{per_page}",n.toString()).replace("{search_like}",r.toString()).replace("{status_eq}",a.toString()).replace("{is_deployed_eq}",i.toString());return Un.apiClient.get(o)}getStatusTemplateList(e,n,r=""){const i=Bn.TEMPLATE_FLOW_STATUS_LIST.replace("{ws_code}",yn()).replace("{page}",e.toString()).replace("{per_page}",n.toString()).replace("{search_like}",r.toString());return Un.apiClient.get(i)}getMetricList(e,n,r="",i="metric_type"){const a=Bn.LIST_METRIC.replace("{ws_code}",yn()).replace("{page}",e.toString()).replace("{per_page}",n.toString()).replace("{name_like}",r.toString()).replace("{include}",i.toString());return Un.apiClient.get(a)}getCompletedSceneReport(e,n,r="and"){const i=Bn.COMPLETED_SCENE_REPORT.replace("{ws_code}",yn()),a=new URLSearchParams;e&&a.append("time_range_btw",e.toString()),n&&a.append("assignee_id_ina",n.toString()),r&&a.append("condition_combine_type",r.toString());const o=`${i}?${a.toString()}`;return Un.apiClient.get(o)}getOverdueSceneReport(e){const n=Bn.OVERDUE_SCENE_REPORT.replace("{ws_code}",yn()),r=new URLSearchParams;e&&r.append("assignee_id_ina",e.toString());const i=`${n}?${r.toString()}`;return Un.apiClient.get(i)}getSceneStatusReport(e,n="",r,i="and"){const a=Bn.SCENE_STATUS_REPORT.replace("{ws_code}",yn()),o=new URLSearchParams;e&&o.append("template_flow_status_id_ina",e.toString()),r&&o.append("assignee_id_ina",r.toString()),n&&o.append("status_types",n.toString()),i&&o.append("condition_combine_type",i.toString());const s=`${a}?${o.toString()}`;return Un.apiClient.get(s)}getAssigneeAchievementReport(e,n,r="and"){const i=Bn.ASSIGNEE_ACHIEVEMENT_REPORT.replace("{ws_code}",yn()),a=new URLSearchParams;e&&a.append("time_range_btw",e.toString()),n&&a.append("assignee_id_ina",n.toString()),r&&a.append("condition_combine_type",r.toString());const o=`${i}?${a.toString()}`;return Un.apiClient.get(o)}getUserInvolvementReport(e,n,r="and"){const i=Bn.USER_INVOLVEMENT_REPORT.replace("{ws_code}",yn()),a=new URLSearchParams;e&&a.append("active_time_range_btw",e.toString()),n&&a.append("assignee_id_ina",n.toString()),r&&a.append("condition_combine_type",r.toString());const o=`${i}?${a.toString()}`;return Un.apiClient.get(o)}getSceneAssignementReport(e,n,r="and"){const i=Bn.SCENE_ASSIGNMENT_REPORT.replace("{ws_code}",yn()),a=new URLSearchParams;e&&a.append("time_range_btw",e.toString()),n&&a.append("assignee_id_ina",n.toString()),r&&a.append("condition_combine_type",r.toString());const o=`${i}?${a.toString()}`;return Un.apiClient.get(o)}getMetricReport(e,n,r="and"){const i=Bn.METRIC_REPORT.replace("{ws_code}",yn()),a=new URLSearchParams;e&&a.append("metric_id_eq",e.toString()),n&&a.append("assignee_id_ina",n.toString()),r&&a.append("condition_combine_type",r.toString());const o=`${i}?${a.toString()}`;return Un.apiClient.get(o)}updateScene(e,n){const r=Bn.UPDATE_SCENE.replace("{ws_code}",yn()).replace("{scene_id}",e);return Un.apiClient.put(r,n)}getAssignableUsers(e,n){const r=Bn.GET_ASSIGNABLE_USERS.replace("{ws_code}",yn()).replace("{scene_id}",e),i=new URLSearchParams;Object.entries(n).forEach(([o,s])=>{s&&i.append(o,String(s))});const a=`${r}?${i.toString()}`;return Un.apiClient.get(a)}updateAssigneesUsers(e,n){const r=Bn.UPDATE_ASSIGNEES_USERS.replace("{ws_code}",yn());return Un.apiClient.post(r,{item_ids:[e],ws_user_role_ids:n})}deleteScene(e){const n=Bn.DELETE_SCENE.replace("{ws_code}",yn()).replace("{scene_id}",e);return Un.apiClient.delete(n)}getAssignableStatus(e,n){const r=Bn.GET_ASSIGNABLE_STATUS.replace("{ws_code}",yn());return Un.apiClient.post(r,{item_ids:[e],name_like:n.name_like||"",page:n.page,per_page:10})}getSceneDetail(e,n){const r=Bn.GET_SCENE_DETAIL.replace("{ws_code}",yn()).replace("{scene_id}",e),i=new URLSearchParams;Object.entries(n).forEach(([o,s])=>{s&&i.append(o,String(s))});const a=`${r}?${i.toString()}`;return Un.apiClient.get(a)}assignUser(e,n){const r=Bn.ASSIGN_USER.replace("{ws_code}",yn());return Un.apiClient.post(r,{ws_user_role_ids:n,item_ids:[e]})}unAssignUser(e,n){const r=Bn.UNASSIGN_USER.replace("{ws_code}",yn()).replace("{scene_id}",e);return Un.apiClient.delete(r,{data:{ws_user_role_ids:n,item_ids:[e]}})}getPeopleCard(e){const n=Bn.DASHBOARD.replace("{ws_code}",yn()).replace("{id}",e.toString()),r=new URLSearchParams;Object.entries({include:"assigned_scenes,point_pool,unresolved_comments,overdue_scenes,completed_scenes_last_7_days,"}).forEach(([o,s])=>{s&&r.append(o,String(s))});const a=`${n}?${r.toString()}`;return Un.apiClient.get(a)}getPeopleDashboardData(e,n,r){const i=Bn.DASHBOARD.replace("{ws_code}",yn()).replace("{id}",String(e));let a=new URLSearchParams;const o={"comments.latest":jx,"comments.recently_resolved":jx,"recent_activities.new_renditions":"attachments,ws_creator","recent_activities.accessed_scenes":"item.point_metric,item.ws_creator,item.template_flow_status,item.item_user_roles.ws_user_role,item.assignees"},s={include:n+","+o[n],include_entity_path:1,include_permission:1};Object.entries(s).forEach(([c,f])=>{f&&a.append(c,String(f))}),Object.entries(Kk).forEach(([c,f])=>{f&&a.append(c,String(f))}),r&&Object.entries(r).forEach(([c,f])=>{f&&a.append(c,String(f))}),a=TN(a);const l=`${i}?${a.toString()}`;return Un.apiClient.get(l)}deleteRendition(e,n){const r=Bn.DELETE_RENDITION.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{rendition_id}",n);return Un.apiClient.delete(r)}getCommentAssignableUser(e,n,r,i){const a=Bn.GET_ASSIGNABLE_USERS.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n),o={page:r||1,per_page:10};return i&&(o.display_name_like=i),Un.apiClient.get(a,{params:o})}getMentionableUsers(e,n){const r=Bn.GET_ASSIGNABLE_USERS.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n);return Un.apiClient.get(r)}resolveCommentApi(e,n){const r=Bn.RESOLVE_COMMENT_API.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n);return Un.apiReviewV2Client.post(r)}unResolveCommentApi(e,n){const r=Bn.UN_RESOLVE_COMMENT.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n);return Un.apiReviewV2Client.post(r)}deleteCommentApi(e,n){const r=Bn.DELETE_COMMENT.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n);return Un.apiClient.delete(r)}reactToComment({scene_id:e,comment_id:n,reaction:r}){const i=Bn.REACT_TO_COMMENT.replace("{ws_code}",yn());return Un.apiClient.post(i,{model_type:"item_comment",item_id:e,model_id:n,emoji:r})}updateReactToComment({scene_id:e,comment_id:n,reaction:r,reaction_id:i}){const a=Bn.UPDATE_REACT_TO_COMMENT.replace("{ws_code}",yn()).replace("{reaction_id}",i);return Un.apiClient.put(a,{model_type:"item_comment",model_id:n,emoji:r,item_id:e})}deleteReactToComment(e){const n=Bn.DELETE_REACT_TO_COMMENT.replace("{ws_code}",yn()).replace("{reaction_id}",e);return Un.apiClient.delete(n)}assignUserApi(e,n,r){const i=Bn.ASSIGN_COMMENT_USER_API.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n);return Un.apiReviewV2Client.post(i,{assigned_id:r})}getNextRendition(e,n){const r=Bn.DASHBOARD.replace("{ws_code}",yn()).replace("{id}",String(e)),i=new URLSearchParams;Object.entries({include:"recent_activities.new_renditions,attachments,ws_creator,item",before_id:n,include_entity_path:1,per_page:5,include_permission:1}).forEach(([s,l])=>{l&&i.append(s,String(l))});const o=`${r}?${i.toString()}`;return Un.apiClient.get(o)}downloadFileFromS3(e){const n=Bn.GET_RESOURCE_API.replace("{ws_code}",yn()),r={item_id:e.scene_id,path:e.path};return Un.apiClient.get(n,{params:r})}getCommentDetail({comment_id:e,scene_id:n}){const r=Bn.GET_COMMENT_DETAIL.replace("{ws_code}",yn()).replace("{comment_id}",e.toString()).replace("{scene_id}",n.toString());return Un.apiClient.get(r,{params:{include:jx}})}getWSUserProfile(){const e=Bn.GET_WS_USER_PROFILE.replace("{ws_code}",yn());return Un.apiClient.get(e)}}const xn=new Bze,ks=T_("dashboardStore",()=>{const t=re(null),e=a=>{t.value=a},n=re(!0),r=Ht({comment_recent:!1,comment_resolved:!1,rendition:!1,scene:!1,people_comment:!1,assigned_scene:!1,chart:!1});return{dashboardData:t,getDashboardData:async a=>{const o=await xn.getPeopleCard(a);e(o)},refreshState:r,isBrowserActive:n}});var _l=(t=>(t.WHITE="#F3F5F8",t.RED="#FFD4C1",t.YELLOW="#FDE8B0",t.GREEN="#CCF3EB",t.BLUE="#A3D4F5",t.TEXT_GENERAL="#232323",t.ICON_GENERAL="#A6A6A6",t))(_l||{});const Lle=([t,e])=>{const n=t+e,r=t/n*360;return r==180?0:r<90||r>90&&r<180?90-r/2:r>180?r-180/2*-1:r/2},Nle=({rotation:t,handleRedirect:e,interactive:n})=>({type:"pie",options:{rotation:t,responsive:!0,onHover:n?(r,i)=>{const a=r.chart;i.length>0?a.canvas.style.cursor="pointer":a.canvas.style.cursor="default"}:void 0,onClick:n?function(r,i){i.length>0&&e()}:void 0,plugins:{tooltip:{enabled:!1},datalabels:{align:"end",anchor:"end",formatter:function(r){return[r.label,r.value]},color:function(r){return r.dataset.backgroundColor},font:function(){return{size:14,weight:"normal"}}}},aspectRatio:16/6,layout:{padding:{top:6,bottom:6}}}}),Uze=t=>Number.isInteger(t)?t.toString():t.toFixed(2),Wze=Qe({__name:"CardAssigned",setup(t,{expose:e}){e(),Ev.register(XD,LS,KD,QD,Eoe,Toe),Ev.register(LS,KD,QD);const n=Z(()=>({guidingTextBottomLeft:l.value?void 0:{text:"Scenes",fontStyle:{color:_l.TEXT_GENERAL,fontSize:"14px",fontWeight:"normal"},tooltip:"Scenes"},guidingTextBottomRight:void 0,backgroundColor:_l.WHITE,key:"assigned",title:"Assigned scenes",icon:{name:"Film",iconColor:"#A6A6A6",tooltip:"Assigned scenes status"},mainLabel:"AssignedMainlabel"})),r=ks(),{dashboardData:i}=Pn(r),a=Z(()=>{var S;return Number(((S=i.value)==null?void 0:S.assigned_scenes.active)||0)}),o=Z(()=>{var S;return Number(((S=i.value)==null?void 0:S.assigned_scenes.planned)||0)}),s=Z(()=>!0),l=Z(()=>a.value>0||o.value>0),c=Z(()=>{const S=a.value,T=o.value,_={active:"Active",planned:"Planned"},E={active:"#3C9BFA",planned:"#A6A6A6"},D=Object.entries({active:S,planned:T}).filter(O=>O[1]!==0).sort((O,V)=>O[1]-V[1]).map(([O,V])=>({value:V||0,key:O,label:_[O]}));return{datasets:[{backgroundColor:D.map(O=>E[O.key]),data:D}]}}),f=Z(()=>{const S=a.value,T=o.value;return S<T?[S,T]:[T,S]}),h=fr(),{currentTab:p}=Pn(h),g=()=>{p.value="people-scenes"},y=Z(()=>{const S=Lle(f.value);return{type:"pie",data:c.value,plugins:[XD],...Nle({rotation:S,handleRedirect:g,interactive:!1})}}),v=re(null),b=()=>{const S=document.getElementById("chart_assigned");S&&(v.value=new Ev(S,y.value))};Ge([l,s],S=>{S[0]&&S[1]&&fn(()=>b())},{immediate:!0});const w={cardConfiguration:n,dashboardStore:r,dashboardData:i,activeData:a,plannedData:o,showData:s,hasData:l,data:c,assigned_scenesDataArr:f,store:h,currentTab:p,handleRedirect:g,chartConfig:y,chartInstance:v,initChart:b,get SimpleCard(){return O_}};return Object.defineProperty(w,"__isScriptSetup",{enumerable:!1,value:!0}),w}}),Nn=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n};function zze(t,e,n,r,i,a){return r.showData?(R(),Re(r.SimpleCard,Ft({key:0,class:"card-simple"},r.cardConfiguration,{disabled:!1,class:{empty:!r.hasData}}),{body:ze(()=>[r.hasData?(R(),Y("div",{key:0,class:"chart-container card-title",onClick:r.handleRedirect},e[0]||(e[0]=[X("canvas",{id:"chart_assigned"},null,-1)]))):(R(),Y("span",{key:1,class:"card-title",onClick:r.handleRedirect},"0"))]),_:1},16,["class"])):pe("v-if",!0)}const jze=Nn(Wze,[["render",zze],["__scopeId","data-v-f1302b37"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CardAssigned.vue"]]),Hze=Qe({__name:"CardCompleted",setup(t,{expose:e}){e();const n=ks(),{dashboardData:r}=Pn(n),i=Z(()=>{var f;return r.value&&((f=r.value)==null?void 0:f.completed_scenes_last_7_days)||0}),a=Z(()=>{const f=i.value>0?_l.GREEN:_l.WHITE,h=i.value>0?"#02C39A":"#A6A6A6";return{guidingTextBottomLeft:{text:"Scenes",fontStyle:{color:"#000000",fontSize:"14px",fontWeight:"normal"},tooltip:"Assigned"},backgroundColor:f,key:"Completed",title:"Total completed (7 days)",icon:{name:"Film",iconColor:h,tooltip:"Completed scenes in the last 7 days"}}}),o=fr(),{currentTab:s}=Pn(o),c={dashboardStore:n,dashboardData:r,data:i,cardConfiguration:a,store:o,currentTab:s,handleRedirect:()=>{s.value="people-charts"},get SimpleCard(){return O_}};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function Yze(t,e,n,r,i,a){return R(),Re(r.SimpleCard,Ft({class:"card-simple"},r.cardConfiguration,{disabled:!1}),{body:ze(()=>[X("div",{class:"card-title",onClick:r.handleRedirect},it(r.data),1)]),_:1},16)}const qze=Nn(Hze,[["render",Yze],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CardCompleted.vue"]]),Kze=Qe({__name:"CardOverdue",setup(t,{expose:e}){e();const n=ks(),{dashboardData:r}=Pn(n),i=Z(()=>{var f;return r.value&&((f=r.value)==null?void 0:f.overdue_scenes)||0}),a=Z(()=>{const f=i.value>0?_l.YELLOW:_l.WHITE,h=i.value>0?"#F7941D":"#A6A6A6";return{guidingTextBottomLeft:{text:"Scenes",fontStyle:{color:_l.TEXT_GENERAL,fontSize:"14px",fontWeight:"normal"},tooltip:"Assigned"},backgroundColor:f,key:"assigned",title:"Overdue",icon:{name:"Film",iconColor:h,tooltip:"Assigned scenes past due"}}}),o=fr(),{currentTab:s}=Pn(o),c={dashboardStore:n,dashboardData:r,data:i,cardConfiguration:a,store:o,currentTab:s,handleRedirect:()=>{s.value="people-charts"},get SimpleCard(){return O_}};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function Gze(t,e,n,r,i,a){return R(),Re(r.SimpleCard,Ft({class:"card-simple"},r.cardConfiguration,{disabled:!1}),{body:ze(()=>[X("div",{class:"card-title",onClick:r.handleRedirect},it(r.data),1)]),_:1},16)}const Zze=Nn(Kze,[["render",Gze],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CardOverdue.vue"]]),Qze=Qe({__name:"CardTargetPoint",setup(t,{expose:e}){e(),Ev.register(XD,LS,KD,QD,Eoe,Toe),Ev.register(LS,KD,QD);const n=Z(()=>({guidingTextBottomLeft:l.value?void 0:{text:"Points",fontStyle:{color:_l.TEXT_GENERAL,fontSize:"14px",fontWeight:"normal"},tooltip:"Points"},guidingTextBottomRight:void 0,backgroundColor:_l.WHITE,key:"points",title:"Target points",icon:{name:"Award",iconColor:"#A6A6A6",tooltip:"Assigned points towards targets"},mainLabel:"AssignedMainlabel"})),r=Z(()=>{var v,b;return Number(((b=(v=o.value)==null?void 0:v.point_pool)==null?void 0:b.collected)||0)}),i=Z(()=>{var v,b;return Number(((b=(v=o.value)==null?void 0:v.point_pool)==null?void 0:b.pending)||0)}),a=ks(),{dashboardData:o}=Pn(a),s=Z(()=>{var v;return((v=o.value)==null?void 0:v.point_pool.can_view)==1}),l=Z(()=>r.value>0||i.value>0),c=Z(()=>{const v=r.value,b=i.value,w={collected:"Earned",pending:"Awaiting"},S={collected:"#F7941D",pending:"#A6A6A6"},T=Object.entries({collected:v,pending:b}).filter(_=>_[1]!==0).sort((_,E)=>_[1]-E[1]).map(([_,E])=>({value:Uze(E)||0,key:_,label:w[_]}));return{datasets:[{backgroundColor:T.map(_=>S[_.key]),data:T}]}}),f=Z(()=>{const v=r.value,b=i.value;return v<b?[v,b]:[b,v]}),h=Z(()=>{const v=Lle(f.value);return{plugins:[XD],type:"pie",data:c.value,...Nle({interactive:!1,handleRedirect:()=>{},rotation:v})}}),p=re(null),g=()=>{const v=document.getElementById("chart_target");v&&(p.value=new Ev(v,h.value))};Ge([l,s],v=>{v[0]&&v[1]&&fn(()=>g())},{immediate:!0});const y={cardConfiguration:n,collectedData:r,pendingData:i,dashboardStore:a,dashboardData:o,showData:s,hasData:l,data:c,assigned_scenesDataArr:f,chartConfig:h,chartInstance:p,initChart:g,get SimpleCard(){return O_}};return Object.defineProperty(y,"__isScriptSetup",{enumerable:!1,value:!0}),y}}),Xze={key:0,class:"chart-container card-title"},Jze={key:1,class:"card-title non-interactive"};function eje(t,e,n,r,i,a){return r.showData?(R(),Re(r.SimpleCard,Ft({key:0,class:"card-simple"},r.cardConfiguration,{disabled:!1,class:{empty:!r.hasData}}),{body:ze(()=>[r.hasData?(R(),Y("div",Xze,e[0]||(e[0]=[X("canvas",{id:"chart_target"},null,-1)]))):(R(),Y("span",Jze,"0"))]),_:1},16,["class"])):pe("v-if",!0)}const tje=Nn(Qze,[["render",eje],["__scopeId","data-v-24024258"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CardTargetPoint.vue"]]),nje=Qe({__name:"CardUnresolved",setup(t,{expose:e}){e();const n=ks(),{dashboardData:r}=Pn(n),i=Z(()=>{var f;return r.value&&((f=r.value)==null?void 0:f.unresolved_comments)||0}),a=Z(()=>{const f={text:"@",color:"#FFF",bgColor:i.value==0?"#A6A6A6":"#3C9BFA",show:!0};return{guidingTextBottomLeft:{text:"Comments",fontStyle:{color:_l.TEXT_GENERAL,fontSize:"14px",fontWeight:"normal"},tooltip:"Assigned"},backgroundColor:_l.WHITE,key:"Unresolved",title:"Unresolved",icon:{name:"Comments",iconColor:_l.ICON_GENERAL,tooltip:"Assigned comments to resolve"},alias:f}}),o=fr(),{currentTab:s}=Pn(o),c={dashboardStore:n,dashboardData:r,data:i,cardConfiguration:a,store:o,currentTab:s,handleRedirect:()=>{s.value="people-comments"},get SimpleCard(){return O_}};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function rje(t,e,n,r,i,a){return R(),Re(r.SimpleCard,Ft({class:"card-simple"},r.cardConfiguration,{disabled:!1}),{body:ze(()=>[X("div",{class:"card-title",onClick:r.handleRedirect},it(r.data),1)]),_:1},16)}const ije=Nn(nje,[["render",rje],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CardUnresolved.vue"]]),aje={},oje={class:"section-renditions-skeleton"};function sje(t,e){return R(),Y("div",oje,e[0]||(e[0]=[Vv('<div class="timestamp animation-skeleton dark" data-v-09df7c3e></div><div class="rendition-item animation-skeleton dark" data-v-09df7c3e><div class="name" data-v-09df7c3e></div><div class="breadcrumb" data-v-09df7c3e></div><div class="information" data-v-09df7c3e></div></div>',2)]))}const lje=Nn(aje,[["render",sje],["__scopeId","data-v-09df7c3e"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/NewRenditionSkeleton.vue"]]),uje=Qe({__name:"InfoVisual",props:{visualName:{type:String,required:!0,default:"NoData"},label:{type:String,required:!1,default:"label here"},height:{type:Number,required:!0,default:200},width:{type:Number,required:!1,default:400}},setup(t,{expose:e}){e();const n=t,r=Z(()=>n.height-36),i=Z(()=>n.width),a={props:n,visualHeight:r,visualWidth:i,get ArboIcon(){return qn}};return Object.defineProperty(a,"__isScriptSetup",{enumerable:!1,value:!0}),a}}),cje={class:"visual-info"},dje={class:"data-info"};function fje(t,e,n,r,i,a){return R(),Y("div",cje,[X("div",{class:"visual-info-container",style:_t({"--visual-height":r.visualHeight+"px","--visual-width":r.visualWidth+"px"})},[he(r.ArboIcon,{type:"visual",name:n.visualName,class:"data-visual"},null,8,["name"]),X("div",dje,it(n.label),1)],4)])}const Oc=Nn(uje,[["render",fje],["__scopeId","data-v-014c340b"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/InfoVisual.vue"]]),Al=()=>{const t=re(vo());return{getEnvVariable:n=>{const r=t.value,i=r==null?void 0:r.appContext.config.globalProperties[n];if(!r)return console.error("Current instance is not available."),"";let a="";return(!r||!r.appContext.config.globalProperties)&&(console.warn("Current instance or global properties not available."),a=""),!i||i.length===0?(console.warn(`Environment variable ${n} is not defined.`),a=""):a=i,a},currentInstance:t}},VC=()=>{const t=ks(),{getDashboardData:e}=t,n=async l=>{try{return await e(l)}catch(c){return console.error("getPeopleCard",c),{error:c}}},r=fr(),{basicInfo:i}=Pn(r);return{getPeopleCard:n,getRecentActivities:(l,c)=>{var h;const f=(h=i.value)==null?void 0:h.id;if(!f)throw new Error("userId is not found in store");return xn.getPeopleDashboardData(f,l,c)},deleteRendition:({scene_id:l,rendition_id:c})=>{if(!i.value.id)throw new Error("userId is not found in store");return xn.deleteRendition(l,c)},getNextRendition:l=>{var f;const c=(f=i.value)==null?void 0:f.id;if(!c)throw new Error("userId is not found in store");return xn.getNextRendition(c,l)}}},ay=(t,e,n)=>{const r=re(void 0),i=re(!1),a=async()=>{if(!h.value)return;const p=await e();p&&(r.value=p.signature)},o=re(null),s=6e4,l=()=>{o.value&&clearInterval(o.value),o.value=setInterval(()=>{a()},Number(s))};zt(async()=>{l()}),Qa(()=>{clearInterval(o.value)}),mee(()=>{clearInterval(o.value)});const c=ks(),{refreshState:f,isBrowserActive:h}=Pn(c);return Ge(i,p=>{t!==""&&(f.value[t]=p)}),Ge(n,p=>{r.value=p,fn(()=>i.value=!1)},{immediate:!0}),Ge(r,(p,g)=>{if(!(g==null||g==""))switch(!0){case!r.value:i.value=!1;break;case p!==g:i.value=!0;break;case r.value!=n.value:i.value=!0;break;case p==n.value:break}},{immediate:!0}),{subscribeSignature:l,needUpdate:i}};class oy extends Error{}class hje extends oy{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class pje extends oy{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class mje extends oy{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class db extends oy{}class Fle extends oy{constructor(e){super(`Invalid unit ${e}`)}}class Yo extends oy{}class tp extends oy{constructor(){super("Zone is an abstract class")}}const tn="numeric",Sc="short",wl="long",uO={year:tn,month:tn,day:tn},Vle={year:tn,month:Sc,day:tn},gje={year:tn,month:Sc,day:tn,weekday:Sc},Ble={year:tn,month:wl,day:tn},Ule={year:tn,month:wl,day:tn,weekday:wl},Wle={hour:tn,minute:tn},zle={hour:tn,minute:tn,second:tn},jle={hour:tn,minute:tn,second:tn,timeZoneName:Sc},Hle={hour:tn,minute:tn,second:tn,timeZoneName:wl},Yle={hour:tn,minute:tn,hourCycle:"h23"},qle={hour:tn,minute:tn,second:tn,hourCycle:"h23"},Kle={hour:tn,minute:tn,second:tn,hourCycle:"h23",timeZoneName:Sc},Gle={hour:tn,minute:tn,second:tn,hourCycle:"h23",timeZoneName:wl},Zle={year:tn,month:tn,day:tn,hour:tn,minute:tn},Qle={year:tn,month:tn,day:tn,hour:tn,minute:tn,second:tn},Xle={year:tn,month:Sc,day:tn,hour:tn,minute:tn},Jle={year:tn,month:Sc,day:tn,hour:tn,minute:tn,second:tn},vje={year:tn,month:Sc,day:tn,weekday:Sc,hour:tn,minute:tn},eue={year:tn,month:wl,day:tn,hour:tn,minute:tn,timeZoneName:Sc},tue={year:tn,month:wl,day:tn,hour:tn,minute:tn,second:tn,timeZoneName:Sc},nue={year:tn,month:wl,day:tn,weekday:wl,hour:tn,minute:tn,timeZoneName:wl},rue={year:tn,month:wl,day:tn,weekday:wl,hour:tn,minute:tn,second:tn,timeZoneName:wl};class YA{get type(){throw new tp}get name(){throw new tp}get ianaName(){return this.name}get isUniversal(){throw new tp}offsetName(e,n){throw new tp}formatOffset(e,n){throw new tp}offset(e){throw new tp}equals(e){throw new tp}get isValid(){throw new tp}}let DN=null;class BC extends YA{static get instance(){return DN===null&&(DN=new BC),DN}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return fue(e,n,r)}formatOffset(e,n){return Yx(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let VT={};function yje(t){return VT[t]||(VT[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),VT[t]}const bje={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function _je(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,i,a,o,s,l,c,f]=r;return[o,i,a,s,l,c,f]}function wje(t,e){const n=t.formatToParts(e),r=[];for(let i=0;i<n.length;i++){const{type:a,value:o}=n[i],s=bje[a];a==="era"?r[s]=o:jn(s)||(r[s]=parseInt(o,10))}return r}let nE={};class xh extends YA{static create(e){return nE[e]||(nE[e]=new xh(e)),nE[e]}static resetCache(){nE={},VT={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=xh.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return fue(e,n,r,this.name)}formatOffset(e,n){return Yx(this.offset(e),n)}offset(e){const n=new Date(e);if(isNaN(n))return NaN;const r=yje(this.name);let[i,a,o,s,l,c,f]=r.formatToParts?wje(r,n):_je(r,n);s==="BC"&&(i=-Math.abs(i)+1);const p=WC({year:i,month:a,day:o,hour:l===24?0:l,minute:c,second:f,millisecond:0});let g=+n;const y=g%1e3;return g-=y>=0?y:1e3+y,(p-g)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let J7={};function xje(t,e={}){const n=JSON.stringify([t,e]);let r=J7[n];return r||(r=new Intl.ListFormat(t,e),J7[n]=r),r}let qB={};function KB(t,e={}){const n=JSON.stringify([t,e]);let r=qB[n];return r||(r=new Intl.DateTimeFormat(t,e),qB[n]=r),r}let GB={};function Sje(t,e={}){const n=JSON.stringify([t,e]);let r=GB[n];return r||(r=new Intl.NumberFormat(t,e),GB[n]=r),r}let ZB={};function Aje(t,e={}){const{base:n,...r}=e,i=JSON.stringify([t,r]);let a=ZB[i];return a||(a=new Intl.RelativeTimeFormat(t,e),ZB[i]=a),a}let lx=null;function kje(){return lx||(lx=new Intl.DateTimeFormat().resolvedOptions().locale,lx)}let eq={};function Eje(t){let e=eq[t];if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,eq[t]=e}return e}function Tje(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(n===-1)return[t];{let r,i;try{r=KB(t).resolvedOptions(),i=t}catch{const l=t.substring(0,n);r=KB(l).resolvedOptions(),i=l}const{numberingSystem:a,calendar:o}=r;return[i,a,o]}}function Dje(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function Oje(t){const e=[];for(let n=1;n<=12;n++){const r=Wn.utc(2009,n,1);e.push(t(r))}return e}function Cje(t){const e=[];for(let n=1;n<=7;n++){const r=Wn.utc(2016,11,13+n);e.push(t(r))}return e}function rE(t,e,n,r){const i=t.listingMode();return i==="error"?null:i==="en"?n(e):r(e)}function Ije(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}class Mje{constructor(e,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:i,floor:a,...o}=r;if(!n||Object.keys(o).length>0){const s={useGrouping:!1,...r};r.padTo>0&&(s.minimumIntegerDigits=r.padTo),this.inf=Sje(e,s)}}format(e){if(this.inf){const n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{const n=this.floor?Math.floor(e):cW(e,3);return Ia(n,this.padTo)}}}class Rje{constructor(e,n,r){this.opts=r,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const o=-1*(e.offset/60),s=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&xh.create(s).valid?(i=s,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const a={...this.opts};a.timeZone=a.timeZone||i,this.dtf=KB(n,a)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class $je{constructor(e,n,r){this.opts={style:"long",...r},!n&&cue()&&(this.rtf=Aje(e,r))}format(e,n){return this.rtf?this.rtf.format(e,n):r8e(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}}const Pje={firstDay:1,minimalDays:4,weekend:[6,7]};let Ci=class ux{static fromOpts(e){return ux.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,r,i,a=!1){const o=e||la.defaultLocale,s=o||(a?"en-US":kje()),l=n||la.defaultNumberingSystem,c=r||la.defaultOutputCalendar,f=QB(i)||la.defaultWeekSettings;return new ux(s,l,c,f,o)}static resetCache(){lx=null,qB={},GB={},ZB={}}static fromObject({locale:e,numberingSystem:n,outputCalendar:r,weekSettings:i}={}){return ux.create(e,n,r,i)}constructor(e,n,r,i,a){const[o,s,l]=Tje(e);this.locale=o,this.numberingSystem=n||s||null,this.outputCalendar=r||l||null,this.weekSettings=i,this.intl=Dje(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=a,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Ije(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:ux.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,QB(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1){return rE(this,e,mue,()=>{const r=n?{month:e,day:"numeric"}:{month:e},i=n?"format":"standalone";return this.monthsCache[i][e]||(this.monthsCache[i][e]=Oje(a=>this.extract(a,r,"month"))),this.monthsCache[i][e]})}weekdays(e,n=!1){return rE(this,e,yue,()=>{const r=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=n?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=Cje(a=>this.extract(a,r,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return rE(this,void 0,()=>bue,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Wn.utc(2016,11,13,9),Wn.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return rE(this,e,_ue,()=>{const n={era:e};return this.eraCache[e]||(this.eraCache[e]=[Wn.utc(-40,1,1),Wn.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[e]})}extract(e,n,r){const i=this.dtFormatter(e,n),a=i.formatToParts(),o=a.find(s=>s.type.toLowerCase()===r);return o?o.value:null}numberFormatter(e={}){return new Mje(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new Rje(e,this.intl,n)}relFormatter(e={}){return new $je(this.intl,this.isEnglish(),e)}listFormatter(e={}){return xje(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:due()?Eje(this.locale):Pje}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},ON=null;class Ss extends YA{static get utcInstance(){return ON===null&&(ON=new Ss(0)),ON}static instance(e){return e===0?Ss.utcInstance:new Ss(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Ss(zC(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Yx(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Yx(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return Yx(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class Lje extends YA{constructor(e){super(),this.zoneName=e}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 vp(t,e){if(jn(t)||t===null)return e;if(t instanceof YA)return t;if(Wje(t)){const n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?BC.instance:n==="utc"||n==="gmt"?Ss.utcInstance:Ss.parseSpecifier(n)||xh.create(t)}else return Lp(t)?Ss.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new Lje(t)}const oW={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},tq={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]},Nje=oW.hanidec.replace(/[\[|\]]/g,"").split("");function Fje(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(t[n].search(oW.hanidec)!==-1)e+=Nje.indexOf(t[n]);else for(const i in tq){const[a,o]=tq[i];r>=a&&r<=o&&(e+=r-a)}}return parseInt(e,10)}else return e}let nb={};function Vje(){nb={}}function zu({numberingSystem:t},e=""){const n=t||"latn";return nb[n]||(nb[n]={}),nb[n][e]||(nb[n][e]=new RegExp(`${oW[n]}${e}`)),nb[n][e]}let nq=()=>Date.now(),rq="system",iq=null,aq=null,oq=null,sq=60,lq,uq=null;class la{static get now(){return nq}static set now(e){nq=e}static set defaultZone(e){rq=e}static get defaultZone(){return vp(rq,BC.instance)}static get defaultLocale(){return iq}static set defaultLocale(e){iq=e}static get defaultNumberingSystem(){return aq}static set defaultNumberingSystem(e){aq=e}static get defaultOutputCalendar(){return oq}static set defaultOutputCalendar(e){oq=e}static get defaultWeekSettings(){return uq}static set defaultWeekSettings(e){uq=QB(e)}static get twoDigitCutoffYear(){return sq}static set twoDigitCutoffYear(e){sq=e%100}static get throwOnInvalid(){return lq}static set throwOnInvalid(e){lq=e}static resetCaches(){Ci.resetCache(),xh.resetCache(),Wn.resetCache(),Vje()}}class lc{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const iue=[0,31,59,90,120,151,181,212,243,273,304,334],aue=[0,31,60,91,121,152,182,213,244,274,305,335];function eu(t,e){return new lc("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function sW(t,e,n){const r=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const i=r.getUTCDay();return i===0?7:i}function oue(t,e,n){return n+(qA(t)?aue:iue)[e-1]}function sue(t,e){const n=qA(t)?aue:iue,r=n.findIndex(a=>a<e),i=e-n[r];return{month:r+1,day:i}}function lW(t,e){return(t-e+7)%7+1}function cO(t,e=4,n=1){const{year:r,month:i,day:a}=t,o=oue(r,i,a),s=lW(sW(r,i,a),n);let l=Math.floor((o-s+14-e)/7),c;return l<1?(c=r-1,l=US(c,e,n)):l>US(r,e,n)?(c=r+1,l=1):c=r,{weekYear:c,weekNumber:l,weekday:s,...jC(t)}}function cq(t,e=4,n=1){const{weekYear:r,weekNumber:i,weekday:a}=t,o=lW(sW(r,1,e),n),s=Db(r);let l=i*7+a-o-7+e,c;l<1?(c=r-1,l+=Db(c)):l>s?(c=r+1,l-=Db(r)):c=r;const{month:f,day:h}=sue(c,l);return{year:c,month:f,day:h,...jC(t)}}function CN(t){const{year:e,month:n,day:r}=t,i=oue(e,n,r);return{year:e,ordinal:i,...jC(t)}}function dq(t){const{year:e,ordinal:n}=t,{month:r,day:i}=sue(e,n);return{year:e,month:r,day:i,...jC(t)}}function fq(t,e){if(!jn(t.localWeekday)||!jn(t.localWeekNumber)||!jn(t.localWeekYear)){if(!jn(t.weekday)||!jn(t.weekNumber)||!jn(t.weekYear))throw new db("Cannot mix locale-based week fields with ISO-based week fields");return jn(t.localWeekday)||(t.weekday=t.localWeekday),jn(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),jn(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Bje(t,e=4,n=1){const r=UC(t.weekYear),i=tu(t.weekNumber,1,US(t.weekYear,e,n)),a=tu(t.weekday,1,7);return r?i?a?!1:eu("weekday",t.weekday):eu("week",t.weekNumber):eu("weekYear",t.weekYear)}function Uje(t){const e=UC(t.year),n=tu(t.ordinal,1,Db(t.year));return e?n?!1:eu("ordinal",t.ordinal):eu("year",t.year)}function lue(t){const e=UC(t.year),n=tu(t.month,1,12),r=tu(t.day,1,dO(t.year,t.month));return e?n?r?!1:eu("day",t.day):eu("month",t.month):eu("year",t.year)}function uue(t){const{hour:e,minute:n,second:r,millisecond:i}=t,a=tu(e,0,23)||e===24&&n===0&&r===0&&i===0,o=tu(n,0,59),s=tu(r,0,59),l=tu(i,0,999);return a?o?s?l?!1:eu("millisecond",i):eu("second",r):eu("minute",n):eu("hour",e)}function jn(t){return typeof t>"u"}function Lp(t){return typeof t=="number"}function UC(t){return typeof t=="number"&&t%1===0}function Wje(t){return typeof t=="string"}function zje(t){return Object.prototype.toString.call(t)==="[object Date]"}function cue(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function due(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function jje(t){return Array.isArray(t)?t:[t]}function hq(t,e,n){if(t.length!==0)return t.reduce((r,i)=>{const a=[e(i),i];return r&&n(r[0],a[0])===r[0]?r:a},null)[1]}function Hje(t,e){return e.reduce((n,r)=>(n[r]=t[r],n),{})}function o_(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function QB(t){if(t==null)return null;if(typeof t!="object")throw new Yo("Week settings must be an object");if(!tu(t.firstDay,1,7)||!tu(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!tu(e,1,7)))throw new Yo("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function tu(t,e,n){return UC(t)&&t>=e&&t<=n}function Yje(t,e){return t-e*Math.floor(t/e)}function Ia(t,e=2){const n=t<0;let r;return n?r="-"+(""+-t).padStart(e,"0"):r=(""+t).padStart(e,"0"),r}function dp(t){if(!(jn(t)||t===null||t===""))return parseInt(t,10)}function Vg(t){if(!(jn(t)||t===null||t===""))return parseFloat(t)}function uW(t){if(!(jn(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function cW(t,e,n=!1){const r=10**e;return(n?Math.trunc:Math.round)(t*r)/r}function qA(t){return t%4===0&&(t%100!==0||t%400===0)}function Db(t){return qA(t)?366:365}function dO(t,e){const n=Yje(e-1,12)+1,r=t+(e-n)/12;return n===2?qA(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function WC(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function pq(t,e,n){return-lW(sW(t,1,e),n)+e-1}function US(t,e=4,n=1){const r=pq(t,e,n),i=pq(t+1,e,n);return(Db(t)-r+i)/7}function XB(t){return t>99?t:t>la.twoDigitCutoffYear?1900+t:2e3+t}function fue(t,e,n,r=null){const i=new Date(t),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(a.timeZone=r);const o={timeZoneName:e,...a},s=new Intl.DateTimeFormat(n,o).formatToParts(i).find(l=>l.type.toLowerCase()==="timezonename");return s?s.value:null}function zC(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const r=parseInt(e,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function hue(t){const e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new Yo(`Invalid unit value ${t}`);return e}function fO(t,e){const n={};for(const r in t)if(o_(t,r)){const i=t[r];if(i==null)continue;n[e(r)]=hue(i)}return n}function Yx(t,e){const n=Math.trunc(Math.abs(t/60)),r=Math.trunc(Math.abs(t%60)),i=t>=0?"+":"-";switch(e){case"short":return`${i}${Ia(n,2)}:${Ia(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${Ia(n,2)}${Ia(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function jC(t){return Hje(t,["hour","minute","second","millisecond"])}const qje=["January","February","March","April","May","June","July","August","September","October","November","December"],pue=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Kje=["J","F","M","A","M","J","J","A","S","O","N","D"];function mue(t){switch(t){case"narrow":return[...Kje];case"short":return[...pue];case"long":return[...qje];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 gue=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],vue=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Gje=["M","T","W","T","F","S","S"];function yue(t){switch(t){case"narrow":return[...Gje];case"short":return[...vue];case"long":return[...gue];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const bue=["AM","PM"],Zje=["Before Christ","Anno Domini"],Qje=["BC","AD"],Xje=["B","A"];function _ue(t){switch(t){case"narrow":return[...Xje];case"short":return[...Qje];case"long":return[...Zje];default:return null}}function Jje(t){return bue[t.hour<12?0:1]}function e8e(t,e){return yue(e)[t.weekday-1]}function t8e(t,e){return mue(e)[t.month-1]}function n8e(t,e){return _ue(e)[t.year<0?0:1]}function r8e(t,e,n="always",r=!1){const i={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."]},a=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&a){const h=t==="days";switch(e){case 1:return h?"tomorrow":`next ${i[t][0]}`;case-1:return h?"yesterday":`last ${i[t][0]}`;case 0:return h?"today":`this ${i[t][0]}`}}const o=Object.is(e,-0)||e<0,s=Math.abs(e),l=s===1,c=i[t],f=r?l?c[1]:c[2]||c[1]:l?i[t][0]:t;return o?`${s} ${f} ago`:`in ${s} ${f}`}function mq(t,e){let n="";for(const r of t)r.literal?n+=r.val:n+=e(r.val);return n}const i8e={D:uO,DD:Vle,DDD:Ble,DDDD:Ule,t:Wle,tt:zle,ttt:jle,tttt:Hle,T:Yle,TT:qle,TTT:Kle,TTTT:Gle,f:Zle,ff:Xle,fff:eue,ffff:nue,F:Qle,FF:Jle,FFF:tue,FFFF:rue};class Jo{static create(e,n={}){return new Jo(e,n)}static parseFormat(e){let n=null,r="",i=!1;const a=[];for(let o=0;o<e.length;o++){const s=e.charAt(o);s==="'"?(r.length>0&&a.push({literal:i||/^\s+$/.test(r),val:r}),n=null,r="",i=!i):i||s===n?r+=s:(r.length>0&&a.push({literal:/^\s+$/.test(r),val:r}),r=s,n=s)}return r.length>0&&a.push({literal:i||/^\s+$/.test(r),val:r}),a}static macroTokenToFormatOpts(e){return i8e[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0){if(this.opts.forceSimple)return Ia(e,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,n){const r=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",a=(g,y)=>this.loc.extract(e,g,y),o=g=>e.isOffsetFixed&&e.offset===0&&g.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,g.format):"",s=()=>r?Jje(e):a({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(g,y)=>r?t8e(e,g):a(y?{month:g}:{month:g,day:"numeric"},"month"),c=(g,y)=>r?e8e(e,g):a(y?{weekday:g}:{weekday:g,month:"long",day:"numeric"},"weekday"),f=g=>{const y=Jo.macroTokenToFormatOpts(g);return y?this.formatWithSystemDefault(e,y):g},h=g=>r?n8e(e,g):a({era:g},"era"),p=g=>{switch(g){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return s();case"d":return i?a({day:"numeric"},"day"):this.num(e.day);case"dd":return i?a({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return i?a({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?a({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return i?a({month:"numeric"},"month"):this.num(e.month);case"MM":return i?a({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return i?a({year:"numeric"},"year"):this.num(e.year);case"yy":return i?a({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?a({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?a({year:"numeric"},"year"):this.num(e.year,6);case"G":return h("short");case"GG":return h("long");case"GGGGG":return h("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(g)}};return mq(Jo.parseFormat(n),p)}formatDurationFromString(e,n){const r=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=l=>c=>{const f=r(c);return f?this.num(l.get(f),c.length):c},a=Jo.parseFormat(n),o=a.reduce((l,{literal:c,val:f})=>c?l:l.concat(f),[]),s=e.shiftTo(...o.map(r).filter(l=>l));return mq(a,i(s))}}const wue=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function B_(...t){const e=t.reduce((n,r)=>n+r.source,"");return RegExp(`^${e}$`)}function U_(...t){return e=>t.reduce(([n,r,i],a)=>{const[o,s,l]=a(e,i);return[{...n,...o},s||r,l]},[{},null,1]).slice(0,2)}function W_(t,...e){if(t==null)return[null,null];for(const[n,r]of e){const i=n.exec(t);if(i)return r(i)}return[null,null]}function xue(...t){return(e,n)=>{const r={};let i;for(i=0;i<t.length;i++)r[t[i]]=dp(e[n+i]);return[r,null,n+i]}}const Sue=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,a8e=`(?:${Sue.source}?(?:\\[(${wue.source})\\])?)?`,dW=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Aue=RegExp(`${dW.source}${a8e}`),fW=RegExp(`(?:T${Aue.source})?`),o8e=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,s8e=/(\d{4})-?W(\d\d)(?:-?(\d))?/,l8e=/(\d{4})-?(\d{3})/,u8e=xue("weekYear","weekNumber","weekDay"),c8e=xue("year","ordinal"),d8e=/(\d{4})-(\d\d)-(\d\d)/,kue=RegExp(`${dW.source} ?(?:${Sue.source}|(${wue.source}))?`),f8e=RegExp(`(?: ${kue.source})?`);function Ob(t,e,n){const r=t[e];return jn(r)?n:dp(r)}function h8e(t,e){return[{year:Ob(t,e),month:Ob(t,e+1,1),day:Ob(t,e+2,1)},null,e+3]}function z_(t,e){return[{hours:Ob(t,e,0),minutes:Ob(t,e+1,0),seconds:Ob(t,e+2,0),milliseconds:uW(t[e+3])},null,e+4]}function KA(t,e){const n=!t[e]&&!t[e+1],r=zC(t[e+1],t[e+2]),i=n?null:Ss.instance(r);return[{},i,e+3]}function GA(t,e){const n=t[e]?xh.create(t[e]):null;return[{},n,e+1]}const p8e=RegExp(`^T?${dW.source}$`),m8e=/^-?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 g8e(t){const[e,n,r,i,a,o,s,l,c]=t,f=e[0]==="-",h=l&&l[0]==="-",p=(g,y=!1)=>g!==void 0&&(y||g&&f)?-g:g;return[{years:p(Vg(n)),months:p(Vg(r)),weeks:p(Vg(i)),days:p(Vg(a)),hours:p(Vg(o)),minutes:p(Vg(s)),seconds:p(Vg(l),l==="-0"),milliseconds:p(uW(c),h)}]}const v8e={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 hW(t,e,n,r,i,a,o){const s={year:e.length===2?XB(dp(e)):dp(e),month:pue.indexOf(n)+1,day:dp(r),hour:dp(i),minute:dp(a)};return o&&(s.second=dp(o)),t&&(s.weekday=t.length>3?gue.indexOf(t)+1:vue.indexOf(t)+1),s}const y8e=/^(?:(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 b8e(t){const[,e,n,r,i,a,o,s,l,c,f,h]=t,p=hW(e,i,r,n,a,o,s);let g;return l?g=v8e[l]:c?g=0:g=zC(f,h),[p,new Ss(g)]}function _8e(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const w8e=/^(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$/,x8e=/^(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$/,S8e=/^(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 gq(t){const[,e,n,r,i,a,o,s]=t;return[hW(e,i,r,n,a,o,s),Ss.utcInstance]}function A8e(t){const[,e,n,r,i,a,o,s]=t;return[hW(e,s,n,r,i,a,o),Ss.utcInstance]}const k8e=B_(o8e,fW),E8e=B_(s8e,fW),T8e=B_(l8e,fW),D8e=B_(Aue),Eue=U_(h8e,z_,KA,GA),O8e=U_(u8e,z_,KA,GA),C8e=U_(c8e,z_,KA,GA),I8e=U_(z_,KA,GA);function M8e(t){return W_(t,[k8e,Eue],[E8e,O8e],[T8e,C8e],[D8e,I8e])}function R8e(t){return W_(_8e(t),[y8e,b8e])}function $8e(t){return W_(t,[w8e,gq],[x8e,gq],[S8e,A8e])}function P8e(t){return W_(t,[m8e,g8e])}const L8e=U_(z_);function N8e(t){return W_(t,[p8e,L8e])}const F8e=B_(d8e,f8e),V8e=B_(kue),B8e=U_(z_,KA,GA);function U8e(t){return W_(t,[F8e,Eue],[V8e,B8e])}const vq="Invalid Duration",Tue={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}},W8e={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},...Tue},zl=146097/400,Fy=146097/4800,z8e={years:{quarters:4,months:12,weeks:zl/7,days:zl,hours:zl*24,minutes:zl*24*60,seconds:zl*24*60*60,milliseconds:zl*24*60*60*1e3},quarters:{months:3,weeks:zl/28,days:zl/4,hours:zl*24/4,minutes:zl*24*60/4,seconds:zl*24*60*60/4,milliseconds:zl*24*60*60*1e3/4},months:{weeks:Fy/7,days:Fy,hours:Fy*24,minutes:Fy*24*60,seconds:Fy*24*60*60,milliseconds:Fy*24*60*60*1e3},...Tue},cv=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],j8e=cv.slice(0).reverse();function np(t,e,n=!1){const r={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Qo(r)}function Due(t,e){let n=e.milliseconds??0;for(const r of j8e.slice(1))e[r]&&(n+=e[r]*t[r].milliseconds);return n}function yq(t,e){const n=Due(t,e)<0?-1:1;cv.reduceRight((r,i)=>{if(jn(e[i]))return r;if(r){const a=e[r]*n,o=t[i][r],s=Math.floor(a/o);e[i]+=s*n,e[r]-=s*o*n}return i},null),cv.reduce((r,i)=>{if(jn(e[i]))return r;if(r){const a=e[r]%1;e[r]-=a,e[i]+=a*t[r][i]}return i},null)}function H8e(t){const e={};for(const[n,r]of Object.entries(t))r!==0&&(e[n]=r);return e}let Qo=class Co{constructor(e){const n=e.conversionAccuracy==="longterm"||!1;let r=n?z8e:W8e;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||Ci.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,n){return Co.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new Yo(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new Co({values:fO(e,Co.normalizeUnit),loc:Ci.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(Lp(e))return Co.fromMillis(e);if(Co.isDuration(e))return e;if(typeof e=="object")return Co.fromObject(e);throw new Yo(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){const[r]=P8e(e);return r?Co.fromObject(r,n):Co.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){const[r]=N8e(e);return r?Co.fromObject(r,n):Co.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new Yo("need to specify a reason the Duration is invalid");const r=e instanceof lc?e:new lc(e,n);if(la.throwOnInvalid)throw new mje(r);return new Co({invalid:r})}static normalizeUnit(e){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"}[e&&e.toLowerCase()];if(!n)throw new Fle(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?Jo.create(this.loc,r).formatDurationFromString(this,e):vq}toHuman(e={}){if(!this.isValid)return vq;const n=cv.map(r=>{const i=this.values[r];return jn(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:r.slice(0,-1)}).format(i)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=cW(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},Wn.fromMillis(n,{zone:"UTC"}).toISOTime(e))}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?Due(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const n=Co.fromDurationLike(e),r={};for(const i of cv)(o_(n.values,i)||o_(this.values,i))&&(r[i]=n.get(i)+this.get(i));return np(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const n=Co.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=hue(e(this.values[r],r));return np(this,{values:n},!0)}get(e){return this[Co.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const n={...this.values,...fO(e,Co.normalizeUnit)};return np(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:r,matrix:i}={}){const o={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:i,conversionAccuracy:r};return np(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return yq(this.matrix,e),np(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=H8e(this.normalize().shiftToAll().toObject());return np(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>Co.normalizeUnit(o));const n={},r={},i=this.toObject();let a;for(const o of cv)if(e.indexOf(o)>=0){a=o;let s=0;for(const c in r)s+=this.matrix[c][o]*r[c],r[c]=0;Lp(i[o])&&(s+=i[o]);const l=Math.trunc(s);n[o]=l,r[o]=(s*1e3-l*1e3)/1e3}else Lp(i[o])&&(r[o]=i[o]);for(const o in r)r[o]!==0&&(n[a]+=o===a?r[o]:r[o]/this.matrix[a][o]);return yq(this.matrix,n),np(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 e={};for(const n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return np(this,{values:e},!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(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(r,i){return r===void 0||r===0?i===void 0||i===0:r===i}for(const r of cv)if(!n(this.values[r],e.values[r]))return!1;return!0}};const Vy="Invalid Interval";function Y8e(t,e){return!t||!t.isValid?ia.invalid("missing or invalid start"):!e||!e.isValid?ia.invalid("missing or invalid end"):e<t?ia.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class ia{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new Yo("need to specify a reason the Interval is invalid");const r=e instanceof lc?e:new lc(e,n);if(la.throwOnInvalid)throw new pje(r);return new ia({invalid:r})}static fromDateTimes(e,n){const r=T1(e),i=T1(n),a=Y8e(r,i);return a??new ia({start:r,end:i})}static after(e,n){const r=Qo.fromDurationLike(n),i=T1(e);return ia.fromDateTimes(i,i.plus(r))}static before(e,n){const r=Qo.fromDurationLike(n),i=T1(e);return ia.fromDateTimes(i.minus(r),i)}static fromISO(e,n){const[r,i]=(e||"").split("/",2);if(r&&i){let a,o;try{a=Wn.fromISO(r,n),o=a.isValid}catch{o=!1}let s,l;try{s=Wn.fromISO(i,n),l=s.isValid}catch{l=!1}if(o&&l)return ia.fromDateTimes(a,s);if(o){const c=Qo.fromISO(i,n);if(c.isValid)return ia.after(a,c)}else if(l){const c=Qo.fromISO(r,n);if(c.isValid)return ia.before(s,c)}}return ia.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e: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(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(e,n);let i;return n!=null&&n.useLocaleWeeks?i=this.end.reconfigure({locale:r.locale}):i=this.end,i=i.startOf(e,n),Math.floor(i.diff(r,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?ia.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];const n=e.map(T1).filter(o=>this.contains(o)).sort((o,s)=>o.toMillis()-s.toMillis()),r=[];let{s:i}=this,a=0;for(;i<this.e;){const o=n[a]||this.e,s=+o>+this.e?this.e:o;r.push(ia.fromDateTimes(i,s)),i=s,a+=1}return r}splitBy(e){const n=Qo.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,i=1,a;const o=[];for(;r<this.e;){const s=this.start.plus(n.mapUnits(l=>l*i));a=+s>+this.e?this.e:s,o.push(ia.fromDateTimes(r,a)),r=a,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const n=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return n>=r?null:ia.fromDateTimes(n,r)}union(e){if(!this.isValid)return this;const n=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return ia.fromDateTimes(n,r)}static merge(e){const[n,r]=e.sort((i,a)=>i.s-a.s).reduce(([i,a],o)=>a?a.overlaps(o)||a.abutsStart(o)?[i,a.union(o)]:[i.concat([a]),o]:[i,o],[[],null]);return r&&n.push(r),n}static xor(e){let n=null,r=0;const i=[],a=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),o=Array.prototype.concat(...a),s=o.sort((l,c)=>l.time-c.time);for(const l of s)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&i.push(ia.fromDateTimes(n,l.time)),n=null);return ia.merge(i)}difference(...e){return ia.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Vy}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=uO,n={}){return this.isValid?Jo.create(this.s.loc.clone(n),e).formatInterval(this):Vy}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Vy}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Vy}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Vy}toFormat(e,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:Vy}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):Qo.invalid(this.invalidReason)}mapEndpoints(e){return ia.fromDateTimes(e(this.s),e(this.e))}}class iE{static hasDST(e=la.defaultZone){const n=Wn.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return xh.isValidZone(e)}static normalizeZone(e){return vp(e,la.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||Ci.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||Ci.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||Ci.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:a="gregory"}={}){return(i||Ci.create(n,r,a)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:a="gregory"}={}){return(i||Ci.create(n,r,a)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||Ci.create(n,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||Ci.create(n,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Ci.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return Ci.create(n,null,"gregory").eras(e)}static features(){return{relative:cue(),localeWeek:due()}}}function bq(t,e){const n=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(e)-n(t);return Math.floor(Qo.fromMillis(r).as("days"))}function q8e(t,e,n){const r=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const f=bq(l,c);return(f-f%7)/7}],["days",bq]],i={},a=t;let o,s;for(const[l,c]of r)n.indexOf(l)>=0&&(o=l,i[l]=c(t,e),s=a.plus(i),s>e?(i[l]--,t=a.plus(i),t>e&&(s=t,i[l]--,t=a.plus(i))):t=s);return[t,i,s,o]}function K8e(t,e,n,r){let[i,a,o,s]=q8e(t,e,n);const l=e-i,c=n.filter(h=>["hours","minutes","seconds","milliseconds"].indexOf(h)>=0);c.length===0&&(o<e&&(o=i.plus({[s]:1})),o!==i&&(a[s]=(a[s]||0)+l/(o-i)));const f=Qo.fromObject(a,r);return c.length>0?Qo.fromMillis(l,r).shiftTo(...c).plus(f):f}const G8e="missing Intl.DateTimeFormat.formatToParts support";function Br(t,e=n=>n){return{regex:t,deser:([n])=>e(Fje(n))}}const Z8e=" ",Oue=`[ ${Z8e}]`,Cue=new RegExp(Oue,"g");function Q8e(t){return t.replace(/\./g,"\\.?").replace(Cue,Oue)}function _q(t){return t.replace(/\./g,"").replace(Cue," ").toLowerCase()}function ju(t,e){return t===null?null:{regex:RegExp(t.map(Q8e).join("|")),deser:([n])=>t.findIndex(r=>_q(n)===_q(r))+e}}function wq(t,e){return{regex:t,deser:([,n,r])=>zC(n,r),groups:e}}function aE(t){return{regex:t,deser:([e])=>e}}function X8e(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function J8e(t,e){const n=zu(e),r=zu(e,"{2}"),i=zu(e,"{3}"),a=zu(e,"{4}"),o=zu(e,"{6}"),s=zu(e,"{1,2}"),l=zu(e,"{1,3}"),c=zu(e,"{1,6}"),f=zu(e,"{1,9}"),h=zu(e,"{2,4}"),p=zu(e,"{4,6}"),g=b=>({regex:RegExp(X8e(b.val)),deser:([w])=>w,literal:!0}),v=(b=>{if(t.literal)return g(b);switch(b.val){case"G":return ju(e.eras("short"),0);case"GG":return ju(e.eras("long"),0);case"y":return Br(c);case"yy":return Br(h,XB);case"yyyy":return Br(a);case"yyyyy":return Br(p);case"yyyyyy":return Br(o);case"M":return Br(s);case"MM":return Br(r);case"MMM":return ju(e.months("short",!0),1);case"MMMM":return ju(e.months("long",!0),1);case"L":return Br(s);case"LL":return Br(r);case"LLL":return ju(e.months("short",!1),1);case"LLLL":return ju(e.months("long",!1),1);case"d":return Br(s);case"dd":return Br(r);case"o":return Br(l);case"ooo":return Br(i);case"HH":return Br(r);case"H":return Br(s);case"hh":return Br(r);case"h":return Br(s);case"mm":return Br(r);case"m":return Br(s);case"q":return Br(s);case"qq":return Br(r);case"s":return Br(s);case"ss":return Br(r);case"S":return Br(l);case"SSS":return Br(i);case"u":return aE(f);case"uu":return aE(s);case"uuu":return Br(n);case"a":return ju(e.meridiems(),0);case"kkkk":return Br(a);case"kk":return Br(h,XB);case"W":return Br(s);case"WW":return Br(r);case"E":case"c":return Br(n);case"EEE":return ju(e.weekdays("short",!1),1);case"EEEE":return ju(e.weekdays("long",!1),1);case"ccc":return ju(e.weekdays("short",!0),1);case"cccc":return ju(e.weekdays("long",!0),1);case"Z":case"ZZ":return wq(new RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case"ZZZ":return wq(new RegExp(`([+-]${s.source})(${r.source})?`),2);case"z":return aE(/[a-z_+-/]{1,256}?/i);case" ":return aE(/[^\S\n\r]/);default:return g(b)}})(t)||{invalidReason:G8e};return v.token=t,v}const eHe={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 tHe(t,e,n){const{type:r,value:i}=t;if(r==="literal"){const l=/^\s+$/.test(i);return{literal:!l,val:l?" ":i}}const a=e[r];let o=r;r==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=n.hour12?"hour12":"hour24");let s=eHe[o];if(typeof s=="object"&&(s=s[a]),s)return{literal:!1,val:s}}function nHe(t){return[`^${t.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,t]}function rHe(t,e,n){const r=t.match(e);if(r){const i={};let a=1;for(const o in n)if(o_(n,o)){const s=n[o],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(i[s.token.val[0]]=s.deser(r.slice(a,a+l))),a+=l}return[r,i]}else return[r,{}]}function iHe(t){const e=a=>{switch(a){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,r;return jn(t.z)||(n=xh.create(t.z)),jn(t.Z)||(n||(n=new Ss(t.Z)),r=t.Z),jn(t.q)||(t.M=(t.q-1)*3+1),jn(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),jn(t.u)||(t.S=uW(t.u)),[Object.keys(t).reduce((a,o)=>{const s=e(o);return s&&(a[s]=t[o]),a},{}),n,r]}let IN=null;function aHe(){return IN||(IN=Wn.fromMillis(1555555555555)),IN}function oHe(t,e){if(t.literal)return t;const n=Jo.macroTokenToFormatOpts(t.val),r=$ue(n,e);return r==null||r.includes(void 0)?t:r}function Iue(t,e){return Array.prototype.concat(...t.map(n=>oHe(n,e)))}class Mue{constructor(e,n){if(this.locale=e,this.format=n,this.tokens=Iue(Jo.parseFormat(n),e),this.units=this.tokens.map(r=>J8e(r,e)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,i]=nHe(this.units);this.regex=RegExp(r,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){const[n,r]=rHe(e,this.regex,this.handlers),[i,a,o]=r?iHe(r):[null,null,void 0];if(o_(r,"a")&&o_(r,"H"))throw new db("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:i,zone:a,specificOffset:o}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Rue(t,e,n){return new Mue(t,n).explainFromTokens(e)}function sHe(t,e,n){const{result:r,zone:i,specificOffset:a,invalidReason:o}=Rue(t,e,n);return[r,i,a,o]}function $ue(t,e){if(!t)return null;const r=Jo.create(e,t).dtFormatter(aHe()),i=r.formatToParts(),a=r.resolvedOptions();return i.map(o=>tHe(o,t,a))}const MN="Invalid DateTime",lHe=864e13;function cx(t){return new lc("unsupported zone",`the zone "${t.name}" is not supported`)}function RN(t){return t.weekData===null&&(t.weekData=cO(t.c)),t.weekData}function $N(t){return t.localWeekData===null&&(t.localWeekData=cO(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Bg(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new Wn({...n,...e,old:n})}function Pue(t,e,n){let r=t-e*60*1e3;const i=n.offset(r);if(e===i)return[r,e];r-=(i-e)*60*1e3;const a=n.offset(r);return i===a?[r,i]:[t-Math.min(i,a)*60*1e3,Math.max(i,a)]}function oE(t,e){t+=e*60*1e3;const n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function BT(t,e,n){return Pue(WC(t),e,n)}function xq(t,e){const n=t.o,r=t.c.year+Math.trunc(e.years),i=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,a={...t.c,year:r,month:i,day:Math.min(t.c.day,dO(r,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=Qo.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),s=WC(a);let[l,c]=Pue(s,n,t.zone);return o!==0&&(l+=o,c=t.zone.offset(l)),{ts:l,o:c}}function By(t,e,n,r,i,a){const{setZone:o,zone:s}=n;if(t&&Object.keys(t).length!==0||e){const l=e||s,c=Wn.fromObject(t,{...n,zone:l,specificOffset:a});return o?c:c.setZone(s)}else return Wn.invalid(new lc("unparsable",`the input "${i}" can't be parsed as ${r}`))}function sE(t,e,n=!0){return t.isValid?Jo.create(Ci.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function PN(t,e){const n=t.c.year>9999||t.c.year<0;let r="";return n&&t.c.year>=0&&(r+="+"),r+=Ia(t.c.year,n?6:4),e?(r+="-",r+=Ia(t.c.month),r+="-",r+=Ia(t.c.day)):(r+=Ia(t.c.month),r+=Ia(t.c.day)),r}function Sq(t,e,n,r,i,a){let o=Ia(t.c.hour);return e?(o+=":",o+=Ia(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=":")):o+=Ia(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=Ia(t.c.second),(t.c.millisecond!==0||!r)&&(o+=".",o+=Ia(t.c.millisecond,3))),i&&(t.isOffsetFixed&&t.offset===0&&!a?o+="Z":t.o<0?(o+="-",o+=Ia(Math.trunc(-t.o/60)),o+=":",o+=Ia(Math.trunc(-t.o%60))):(o+="+",o+=Ia(Math.trunc(t.o/60)),o+=":",o+=Ia(Math.trunc(t.o%60)))),a&&(o+="["+t.zone.ianaName+"]"),o}const Lue={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},uHe={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},cHe={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Nue=["year","month","day","hour","minute","second","millisecond"],dHe=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],fHe=["year","ordinal","hour","minute","second","millisecond"];function hHe(t){const e={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"}[t.toLowerCase()];if(!e)throw new Fle(t);return e}function Aq(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return hHe(t)}}function pHe(t){return WT[t]||(UT===void 0&&(UT=la.now()),WT[t]=t.offset(UT)),WT[t]}function kq(t,e){const n=vp(e.zone,la.defaultZone);if(!n.isValid)return Wn.invalid(cx(n));const r=Ci.fromObject(e);let i,a;if(jn(t.year))i=la.now();else{for(const l of Nue)jn(t[l])&&(t[l]=Lue[l]);const o=lue(t)||uue(t);if(o)return Wn.invalid(o);const s=pHe(n);[i,a]=BT(t,s,n)}return new Wn({ts:i,zone:n,loc:r,o:a})}function Eq(t,e,n){const r=jn(n.round)?!0:n.round,i=(o,s)=>(o=cW(o,r||n.calendary?0:2,!0),e.loc.clone(n).relFormatter(n).format(o,s)),a=o=>n.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(n.unit)return i(a(n.unit),n.unit);for(const o of n.units){const s=a(o);if(Math.abs(s)>=1)return i(s,o)}return i(t>e?-0:0,n.units[n.units.length-1])}function Tq(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}let UT,WT={};class Wn{constructor(e){const n=e.zone||la.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new lc("invalid input"):null)||(n.isValid?null:cx(n));this.ts=jn(e.ts)?la.now():e.ts;let i=null,a=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[i,a]=[e.old.c,e.old.o];else{const s=Lp(e.o)&&!e.old?e.o:n.offset(this.ts);i=oE(this.ts,s),r=Number.isNaN(i.year)?new lc("invalid input"):null,i=r?null:i,a=r?null:s}this._zone=n,this.loc=e.loc||Ci.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=i,this.o=a,this.isLuxonDateTime=!0}static now(){return new Wn({})}static local(){const[e,n]=Tq(arguments),[r,i,a,o,s,l,c]=n;return kq({year:r,month:i,day:a,hour:o,minute:s,second:l,millisecond:c},e)}static utc(){const[e,n]=Tq(arguments),[r,i,a,o,s,l,c]=n;return e.zone=Ss.utcInstance,kq({year:r,month:i,day:a,hour:o,minute:s,second:l,millisecond:c},e)}static fromJSDate(e,n={}){const r=zje(e)?e.valueOf():NaN;if(Number.isNaN(r))return Wn.invalid("invalid input");const i=vp(n.zone,la.defaultZone);return i.isValid?new Wn({ts:r,zone:i,loc:Ci.fromObject(n)}):Wn.invalid(cx(i))}static fromMillis(e,n={}){if(Lp(e))return e<-864e13||e>lHe?Wn.invalid("Timestamp out of range"):new Wn({ts:e,zone:vp(n.zone,la.defaultZone),loc:Ci.fromObject(n)});throw new Yo(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(Lp(e))return new Wn({ts:e*1e3,zone:vp(n.zone,la.defaultZone),loc:Ci.fromObject(n)});throw new Yo("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};const r=vp(n.zone,la.defaultZone);if(!r.isValid)return Wn.invalid(cx(r));const i=Ci.fromObject(n),a=fO(e,Aq),{minDaysInFirstWeek:o,startOfWeek:s}=fq(a,i),l=la.now(),c=jn(n.specificOffset)?r.offset(l):n.specificOffset,f=!jn(a.ordinal),h=!jn(a.year),p=!jn(a.month)||!jn(a.day),g=h||p,y=a.weekYear||a.weekNumber;if((g||f)&&y)throw new db("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(p&&f)throw new db("Can't mix ordinal dates with month/day");const v=y||a.weekday&&!g;let b,w,S=oE(l,c);v?(b=dHe,w=uHe,S=cO(S,o,s)):f?(b=fHe,w=cHe,S=CN(S)):(b=Nue,w=Lue);let T=!1;for(const M of b){const C=a[M];jn(C)?T?a[M]=w[M]:a[M]=S[M]:T=!0}const _=v?Bje(a,o,s):f?Uje(a):lue(a),E=_||uue(a);if(E)return Wn.invalid(E);const D=v?cq(a,o,s):f?dq(a):a,[O,V]=BT(D,c,r),P=new Wn({ts:O,zone:r,o:V,loc:i});return a.weekday&&g&&e.weekday!==P.weekday?Wn.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${P.toISO()}`):P.isValid?P:Wn.invalid(P.invalid)}static fromISO(e,n={}){const[r,i]=M8e(e);return By(r,i,n,"ISO 8601",e)}static fromRFC2822(e,n={}){const[r,i]=R8e(e);return By(r,i,n,"RFC 2822",e)}static fromHTTP(e,n={}){const[r,i]=$8e(e);return By(r,i,n,"HTTP",n)}static fromFormat(e,n,r={}){if(jn(e)||jn(n))throw new Yo("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:a=null}=r,o=Ci.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0}),[s,l,c,f]=sHe(o,e,n);return f?Wn.invalid(f):By(s,l,r,`format ${n}`,e,c)}static fromString(e,n,r={}){return Wn.fromFormat(e,n,r)}static fromSQL(e,n={}){const[r,i]=U8e(e);return By(r,i,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new Yo("need to specify a reason the DateTime is invalid");const r=e instanceof lc?e:new lc(e,n);if(la.throwOnInvalid)throw new hje(r);return new Wn({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){const r=$ue(e,Ci.fromObject(n));return r?r.map(i=>i?i.val:null).join(""):null}static expandFormat(e,n={}){return Iue(Jo.parseFormat(e),Ci.fromObject(n)).map(i=>i.val).join("")}static resetCache(){UT=void 0,WT={}}get(e){return this[e]}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?RN(this).weekYear:NaN}get weekNumber(){return this.isValid?RN(this).weekNumber:NaN}get weekday(){return this.isValid?RN(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?$N(this).weekday:NaN}get localWeekNumber(){return this.isValid?$N(this).weekNumber:NaN}get localWeekYear(){return this.isValid?$N(this).weekYear:NaN}get ordinal(){return this.isValid?CN(this.c).ordinal:NaN}get monthShort(){return this.isValid?iE.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?iE.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?iE.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?iE.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 e=864e5,n=6e4,r=WC(this.c),i=this.zone.offset(r-e),a=this.zone.offset(r+e),o=this.zone.offset(r-i*n),s=this.zone.offset(r-a*n);if(o===s)return[this];const l=r-o*n,c=r-s*n,f=oE(l,o),h=oE(c,s);return f.hour===h.hour&&f.minute===h.minute&&f.second===h.second&&f.millisecond===h.millisecond?[Bg(this,{ts:l}),Bg(this,{ts:c})]:[this]}get isInLeapYear(){return qA(this.year)}get daysInMonth(){return dO(this.year,this.month)}get daysInYear(){return this.isValid?Db(this.year):NaN}get weeksInWeekYear(){return this.isValid?US(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?US(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:n,numberingSystem:r,calendar:i}=Jo.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:i}}toUTC(e=0,n={}){return this.setZone(Ss.instance(e),n)}toLocal(){return this.setZone(la.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(e=vp(e,la.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(n||r){const a=e.offset(this.ts),o=this.toObject();[i]=BT(o,a,e)}return Bg(this,{ts:i,zone:e})}else return Wn.invalid(cx(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:r}={}){const i=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:r});return Bg(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const n=fO(e,Aq),{minDaysInFirstWeek:r,startOfWeek:i}=fq(n,this.loc),a=!jn(n.weekYear)||!jn(n.weekNumber)||!jn(n.weekday),o=!jn(n.ordinal),s=!jn(n.year),l=!jn(n.month)||!jn(n.day),c=s||l,f=n.weekYear||n.weekNumber;if((c||o)&&f)throw new db("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new db("Can't mix ordinal dates with month/day");let h;a?h=cq({...cO(this.c,r,i),...n},r,i):jn(n.ordinal)?(h={...this.toObject(),...n},jn(n.day)&&(h.day=Math.min(dO(h.year,h.month),h.day))):h=dq({...CN(this.c),...n});const[p,g]=BT(h,this.o,this.zone);return Bg(this,{ts:p,o:g})}plus(e){if(!this.isValid)return this;const n=Qo.fromDurationLike(e);return Bg(this,xq(this,n))}minus(e){if(!this.isValid)return this;const n=Qo.fromDurationLike(e).negate();return Bg(this,xq(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},i=Qo.normalizeUnit(e);switch(i){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(i==="weeks")if(n){const a=this.loc.getStartOfWeek(),{weekday:o}=this;o<a&&(r.weekNumber=this.weekNumber-1),r.weekday=a}else r.weekday=1;if(i==="quarters"){const a=Math.ceil(this.month/3);r.month=(a-1)*3+1}return this.set(r)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?Jo.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):MN}toLocaleString(e=uO,n={}){return this.isValid?Jo.create(this.loc.clone(n),e).formatDateTime(this):MN}toLocaleParts(e={}){return this.isValid?Jo.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:i=!0,extendedZone:a=!1}={}){if(!this.isValid)return null;const o=e==="extended";let s=PN(this,o);return s+="T",s+=Sq(this,o,n,r,i,a),s}toISODate({format:e="extended"}={}){return this.isValid?PN(this,e==="extended"):null}toISOWeekDate(){return sE(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:i=!1,extendedZone:a=!1,format:o="extended"}={}){return this.isValid?(i?"T":"")+Sq(this,o==="extended",n,e,r,a):null}toRFC2822(){return sE(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return sE(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?PN(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let i="HH:mm:ss.SSS";return(n||e)&&(r&&(i+=" "),n?i+="z":e&&(i+="ZZ")),sE(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():MN}[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(e={}){if(!this.isValid)return{};const n={...this.c};return e.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(e,n="milliseconds",r={}){if(!this.isValid||!e.isValid)return Qo.invalid("created by diffing an invalid DateTime");const i={locale:this.locale,numberingSystem:this.numberingSystem,...r},a=jje(n).map(Qo.normalizeUnit),o=e.valueOf()>this.valueOf(),s=o?this:e,l=o?e:this,c=K8e(s,l,a,i);return o?c.negate():c}diffNow(e="milliseconds",n={}){return this.diff(Wn.now(),e,n)}until(e){return this.isValid?ia.fromDateTimes(this,e):this}hasSame(e,n,r){if(!this.isValid)return!1;const i=e.valueOf(),a=this.setZone(e.zone,{keepLocalTime:!0});return a.startOf(n,r)<=i&&i<=a.endOf(n,r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const n=e.base||Wn.fromObject({},{zone:this.zone}),r=e.padding?this<n?-e.padding:e.padding:0;let i=["years","months","days","hours","minutes","seconds"],a=e.unit;return Array.isArray(e.unit)&&(i=e.unit,a=void 0),Eq(n,this.plus(r),{...e,numeric:"always",units:i,unit:a})}toRelativeCalendar(e={}){return this.isValid?Eq(e.base||Wn.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(Wn.isDateTime))throw new Yo("min requires all arguments be DateTimes");return hq(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(Wn.isDateTime))throw new Yo("max requires all arguments be DateTimes");return hq(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,r={}){const{locale:i=null,numberingSystem:a=null}=r,o=Ci.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});return Rue(o,e,n)}static fromStringExplain(e,n,r={}){return Wn.fromFormatExplain(e,n,r)}static buildFormatParser(e,n={}){const{locale:r=null,numberingSystem:i=null}=n,a=Ci.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});return new Mue(a,e)}static fromFormatParser(e,n,r={}){if(jn(e)||jn(n))throw new Yo("fromFormatParser requires an input string and a format parser");const{locale:i=null,numberingSystem:a=null}=r,o=Ci.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});if(!o.equals(n.locale))throw new Yo(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);const{result:s,zone:l,specificOffset:c,invalidReason:f}=n.explainFromTokens(e);return f?Wn.invalid(f):By(s,l,r,`format ${n.format}`,e,c)}static get DATE_SHORT(){return uO}static get DATE_MED(){return Vle}static get DATE_MED_WITH_WEEKDAY(){return gje}static get DATE_FULL(){return Ble}static get DATE_HUGE(){return Ule}static get TIME_SIMPLE(){return Wle}static get TIME_WITH_SECONDS(){return zle}static get TIME_WITH_SHORT_OFFSET(){return jle}static get TIME_WITH_LONG_OFFSET(){return Hle}static get TIME_24_SIMPLE(){return Yle}static get TIME_24_WITH_SECONDS(){return qle}static get TIME_24_WITH_SHORT_OFFSET(){return Kle}static get TIME_24_WITH_LONG_OFFSET(){return Gle}static get DATETIME_SHORT(){return Zle}static get DATETIME_SHORT_WITH_SECONDS(){return Qle}static get DATETIME_MED(){return Xle}static get DATETIME_MED_WITH_SECONDS(){return Jle}static get DATETIME_MED_WITH_WEEKDAY(){return vje}static get DATETIME_FULL(){return eue}static get DATETIME_FULL_WITH_SECONDS(){return tue}static get DATETIME_HUGE(){return nue}static get DATETIME_HUGE_WITH_SECONDS(){return rue}}function T1(t){if(Wn.isDateTime(t))return t;if(t&&t.valueOf&&Lp(t.valueOf()))return Wn.fromJSDate(t);if(t&&typeof t=="object")return Wn.fromObject(t);throw new Yo(`Unknown datetime argument: ${t}, of type ${typeof t}`)}const Dd={getCookie(t,e){const n=document.cookie.split(";");for(let r=0;r<n.length;r++){const i=n[r].trim();if(i.startsWith(t+"="))return i.substring(t.length+1)}return null},setSessionCookie(t,e,n="/"){document.cookie=`${t}=${encodeURIComponent(e)}; path=${n}; SameSite=Lax`}},mHe=t=>{try{const e=new Date(t??""),r=new Date().getTime()-e.getTime(),i=Math.floor(r/(1e3*60*60)),a=Math.floor(r%(1e3*60*60)/(1e3*60));if(i<=3)return i===0?`${a} minute${a!==1?"s":""} ago`:`${i} hour${i!==1?"s":""} ${a} minute${a!==1?"s":""} ago`}catch(e){console.error("isShowShortDate -> error",e)}},Dq=()=>Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore",Fue=t=>{try{const e=new Date(t).toISOString(),n=Wn.fromISO(e).setZone(Dq()).toFormat(l5e);return String(n)}catch(e){console.error("formatDateValue",{e,dateStr:t,tz:Dq()})}return t},gHe=t=>{try{if(!t)return"";const e=new Date(t);if(isNaN(e.getTime()))throw new Error("Invalid date:"+t);const n=e.toISOString(),r=mHe(n),i=Fue(n);return r||String(i)}catch{return String(t)}},vHe=Qe({__name:"SectionNewRendition",setup(t,{expose:e}){const{getEnvVariable:n}=Al(),r=N=>{var _e;const U=n("BASE_REVIEW_URL"),ee=yn(),le=(_e=Qi({type:"review_rendition",config:{reviewDomain:U,ws_code:ee,scene_id:N.item.id,rendition_id:N.id,take_id:N.item.entity_id}}))==null?void 0:_e.url;window.open(le)},i=hc("switchInstance"),a=(N,U)=>{var _e;const ee=n("BASE_URL"),le=(_e=Qi({type:"hub_rendition",config:{baseDomain:ee,ws_code:yn(),scene_id:N.item.id,rendition_id:N.id}}))==null?void 0:_e.url;if(U.metaKey||U.ctrlKey){window.open(le,"_blank");return}else{if(i){i("scene_hub",{tab:"rendition",id:N.item.id,renditionId:N.id},{showLoading:!1});return}window.location.href=le}window.open(le)},o=Z(()=>{var N;return(N=w.value[w.value.length-1])==null?void 0:N.id}),s=Ht({canLoadMore:!0,failedRequest:!1}),l=async()=>{var N,U,ee,le;try{if(!o.value||!s.canLoadMore||h.value)return!0;h.value=!0;const _e=await p.getNextRendition(o.value),be=(U=(N=_e==null?void 0:_e.recent_activities)==null?void 0:N.new_renditions)==null?void 0:U.data;if(be)be.length==0&&(s.canLoadMore=!1),w.value=w.value.concat(((le=(ee=_e==null?void 0:_e.recent_activities)==null?void 0:ee.new_renditions)==null?void 0:le.data)||[]);else throw new Error("Failed to get more data")}catch(_e){s.failedRequest=!0,console.error("getMoreData -> error",_e)}finally{h.value=!1}},c=re(null),f=re(null);zt(()=>{S()}),Wae(f,async()=>{await l()},{distance:10,canLoadMore:()=>!h.value});const h=re(!1),p=VC(),g=re({}),y=async()=>{var U,ee,le,_e;let N;try{h.value=!0,N=await p.getRecentActivities("recent_activities.new_renditions"),b.value=(ee=(U=N==null?void 0:N.recent_activities)==null?void 0:U.new_renditions)==null?void 0:ee.meta["X-Tsr-signature"]}catch(be){console.error("getRecentNewRendition -> error",be)}finally{h.value=!1}return((_e=(le=N==null?void 0:N.recent_activities)==null?void 0:le.new_renditions)==null?void 0:_e.data)||[]},v=async()=>{var U,ee;const N=await p.getRecentActivities("recent_activities.new_renditions",ny);return{signature:(ee=(U=N==null?void 0:N.recent_activities)==null?void 0:U.new_renditions)==null?void 0:ee.meta["X-Tsr-signature"]}},b=re(void 0);ay("rendition",v,b);const w=re([]),S=async()=>{var N,U;w.value=[],w.value=await y(),_.value=((U=(N=c.value)==null?void 0:N.parentElement)==null?void 0:U.offsetHeight)||200,h.value=!1};e({resetList:S});const T=re(null),{height:_}=hh(T),E=fr(),{permissionMap:D}=Pn(E),O=(N,U)=>{const ee=n("BASE_URL"),le=Qi({type:"hub_rendition",config:{baseDomain:ee,ws_code:yn(),scene_id:N,rendition_id:U}}).url;navigator.clipboard.writeText(le).then(()=>{}).catch(_e=>{console.error("Failed to copy: ",_e)})},{deleteRendition:V}=p,{showErrorSnackbar:P}=jA(),M=()=>{let N="Update failed";navigator.onLine||(N="Network error"),P({label:N})},{refreshState:C}=Pn(ks()),F=async N=>{try{await V({scene_id:N.item.id,rendition_id:N.id})&&(C.value.rendition=!0,w.value=w.value.filter(ee=>ee.id!==N.id))}catch(U){M(),console.error("handleDelete -> error",U)}},W=Z(()=>Object.fromEntries(w.value.map(N=>[N.id,H(N)]))),H=N=>N!=null&&N.item?{items:(N==null?void 0:N.entity_path.map(ee=>{var _e;const le=ee.is_parent_item?"scene_hub":"project";return{name:ee.name,url:(_e=Qi({type:le,config:{baseDomain:n("BASE_URL"),ws_code:yn(),entity_id:ee.id,scene_id:ee.is_parent_item?ee.id:void 0}}))==null?void 0:_e.url,disabled:!1,id:ee.id,isHighlight:ee.is_parent_item=!0}}))||[],lastItemWidth:125,url:"",width:200,canCopy:!1,numberOfVisibleItems:2}:void 0,j={getEnvVariable:n,handleOpenInReview:r,switchInstance:i,handleOpenInHub:a,lastItemId:o,states:s,getMoreData:l,sectionRef:c,listRef:f,loading:h,peopleCard:p,hoveredMap:g,getRecentNewRendition:y,getUpdateSignature:v,iniSignature:b,list:w,resetList:S,recentlyAccessSceneRef:T,height:_,store:E,permissionMap:D,handleCopy:O,deleteRendition:V,showErrorSnackbar:P,showError:M,refreshState:C,handleDelete:F,breadcrumbConfig:W,createBreadCrumbProp:H,get ArboTooltip(){return dr},get TessRenditionCard(){return Sae},get TessTruncatedText(){return ty},get TessBreadcrumb(){return vC},get ArboButton(){return Nt},NewRenditionSkeleton:lje,InfoVisual:Oc,get formatDate(){return gHe},get formatDateValue(){return Fue}};return Object.defineProperty(j,"__isScriptSetup",{enumerable:!1,value:!0}),j}}),yHe={ref:"sectionRef",class:"section-renditions-wrapper"},bHe={ref:"listRef",class:"section-renditions"},_He={key:0,class:"empty-data"},wHe=["onMouseover","onMouseleave"],xHe={class:"timestamp"},SHe={key:0,class:"rendition-breadcrumb"},AHe={class:"name"};function kHe(t,e,n,r,i,a){return R(),Y("div",yHe,[X("div",bHe,[r.list.length==0&&!r.loading?(R(),Y("div",_He,[he(r.InfoVisual,{"visual-name":"NoData",label:"No activity available.",height:150})])):pe("v-if",!0),(R(!0),Y(wt,null,Qt(r.list,o=>{var s,l,c,f;return R(),Y("div",{key:o.id,class:Fe(["rendition-item",{hovered:r.hoveredMap[o.id]}]),onMouseover:()=>{r.hoveredMap[o.id]||(r.hoveredMap[o.id]=1)},onMouseleave:()=>{r.hoveredMap[o.id]===1&&(r.hoveredMap[o.id]=0)}},[he(r.ArboTooltip,{content:r.formatDateValue(o.created_at),delay:[1e3,0]},{default:ze(()=>[X("div",xHe,it(r.formatDate(o.created_at)),1)]),_:2},1032,["content"]),he(r.TessRenditionCard,Ft({class:"rendition-card"},{ref_for:!0},{renditionData:o,disabled:!1,hasNewComment:!1,isDeletable:((l=(s=o.permission)==null?void 0:s.media)==null?void 0:l.has_delete_rendition_permission)==1,isReadOnly:!1,active:!1,hovered:r.hoveredMap[o.id]>0,canDelete:((f=(c=o.permission)==null?void 0:c.media)==null?void 0:f.has_delete_rendition_permission)==1,canOpenReview:r.permissionMap.redirectPermission.review,canOpenSceneHub:r.permissionMap.redirectPermission.scene_hub,customStyle:{borderWidth:2,borderColor:"white"}},{tooltip:"",onOpenHub:(h,p)=>r.handleOpenInHub(o,p),onShowPopup:h=>r.hoveredMap[o.id]=2,onHidePopup:h=>r.hoveredMap[o.id]=0,onOpenReview:()=>r.handleOpenInReview(o),onClick:Rt(h=>r.handleOpenInHub(o,h),["stop"]),onCopy:h=>r.handleCopy(o.item.id,h),onDelete:()=>r.handleDelete(o)}),{title:ze(()=>{var h;return[r.breadcrumbConfig[o.id]?(R(),Y("div",SHe,[he(r.TessBreadcrumb,Ft({ref_for:!0},r.breadcrumbConfig[o.id],{url:"",items:((h=r.breadcrumbConfig[o.id])==null?void 0:h.items)||[],disabled:"true"}),null,16,["items"])])):pe("v-if",!0)]}),timestamp:ze(()=>[X("div",AHe,[he(r.TessTruncatedText,{value:o.name,"max-width":190},null,8,["value"])])]),_:2,__:[0]},1040,["onOpenHub","onShowPopup","onHidePopup","onOpenReview","onClick","onCopy","onDelete"])],42,wHe)}),128)),X("div",null,[r.states.failedRequest?(R(),Re(r.ArboButton,{key:0,label:"Retry",onClick:r.getMoreData})):pe("v-if",!0)]),r.loading&&r.states.canLoadMore?(R(),Y(wt,{key:1},Qt(3,o=>he(r.NewRenditionSkeleton,{key:o})),64)):pe("v-if",!0)],512)],512)}const EHe=Nn(vHe,[["render",kHe],["__scopeId","data-v-0c7bda83"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionNewRendition.vue"]]),THe={},DHe={class:"pi-skeleton"};function OHe(t,e){return R(),Y("div",DHe,e[0]||(e[0]=[Vv('<div class="pi-skeleton-avatar" data-v-ee72a1a9></div><div class="pi-skeleton-body" data-v-ee72a1a9><div class="pi-skeleton-details" data-v-ee72a1a9><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-line" style="width:80%;" data-v-ee72a1a9></div></div><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-line large" style="width:50%;" data-v-ee72a1a9></div><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-button" data-v-ee72a1a9></div><div class="pi-skeleton-button" data-v-ee72a1a9></div></div></div><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-button" style="width:140px;" data-v-ee72a1a9></div><div class="pi-skeleton-button" style="width:140px;" data-v-ee72a1a9></div></div><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-button" style="width:24px;" data-v-ee72a1a9></div><div class="pi-skeleton-button" style="width:100px;" data-v-ee72a1a9></div></div></div><div class="pi-skeleton-line" data-v-ee72a1a9></div></div></div><div class="pi-skeleton-status" data-v-ee72a1a9></div>',3)]))}const Vue=Nn(THe,[["render",OHe],["__scopeId","data-v-ee72a1a9"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/GirdItemSkeleton.vue"]]);var dx={exports:{}};/**
|
|
174
174
|
* @license
|
|
175
175
|
* Lodash <https://lodash.com/>
|
|
176
176
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
@@ -205,7 +205,7 @@ var Bue;function Yt(){return Bue.apply(null,arguments)}function MHe(t){Bue=t}fun
|
|
|
205
205
|
[`+a+"] ";for(o in arguments[0])Ir(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[a];r.push(i)}Wue(t+`
|
|
206
206
|
Arguments: `+Array.prototype.slice.call(r).join("")+`
|
|
207
207
|
`+new Error().stack),n=!1}return e.apply(this,arguments)},e)}var Iq={};function zue(t,e){Yt.deprecationHandler!=null&&Yt.deprecationHandler(t,e),Iq[t]||(Wue(e),Iq[t]=!0)}Yt.suppressDeprecationWarnings=!1;Yt.deprecationHandler=null;function $d(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function $He(t){var e,n;for(n in t)Ir(t,n)&&(e=t[n],$d(e)?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function e5(t,e){var n=Sp({},t),r;for(r in e)Ir(e,r)&&(Iv(t[r])&&Iv(e[r])?(n[r]={},Sp(n[r],t[r]),Sp(n[r],e[r])):e[r]!=null?n[r]=e[r]:delete n[r]);for(r in t)Ir(t,r)&&!Ir(e,r)&&Iv(t[r])&&(n[r]=Sp({},n[r]));return n}function vW(t){t!=null&&this.set(t)}var t5;Object.keys?t5=Object.keys:t5=function(t){var e,n=[];for(e in t)Ir(t,e)&&n.push(e);return n};var PHe={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function LHe(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return $d(r)?r.call(e,n):r}function Od(t,e,n){var r=""+Math.abs(t),i=e-r.length,a=t>=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var yW=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,lE=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,NN={},Cb={};function In(t,e,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),t&&(Cb[t]=i),e&&(Cb[e[0]]=function(){return Od(i.apply(this,arguments),e[1],e[2])}),n&&(Cb[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function NHe(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function FHe(t){var e=t.match(yW),n,r;for(n=0,r=e.length;n<r;n++)Cb[e[n]]?e[n]=Cb[e[n]]:e[n]=NHe(e[n]);return function(i){var a="",o;for(o=0;o<r;o++)a+=$d(e[o])?e[o].call(i,t):e[o];return a}}function zT(t,e){return t.isValid()?(e=jue(e,t.localeData()),NN[e]=NN[e]||FHe(e),NN[e](t)):t.localeData().invalidDate()}function jue(t,e){var n=5;function r(i){return e.longDateFormat(i)||i}for(lE.lastIndex=0;n>=0&&lE.test(t);)t=t.replace(lE,r),lE.lastIndex=0,n-=1;return t}var VHe={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function BHe(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(yW).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[t])}var UHe="Invalid date";function WHe(){return this._invalidDate}var zHe="%d",jHe=/\d{1,2}/;function HHe(t){return this._ordinal.replace("%d",t)}var YHe={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function qHe(t,e,n,r){var i=this._relativeTime[n];return $d(i)?i(t,e,n,r):i.replace(/%d/i,t)}function KHe(t,e){var n=this._relativeTime[t>0?"future":"past"];return $d(n)?n(e):n.replace(/%s/i,e)}var Mq={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function gu(t){return typeof t=="string"?Mq[t]||Mq[t.toLowerCase()]:void 0}function bW(t){var e={},n,r;for(r in t)Ir(t,r)&&(n=gu(r),n&&(e[n]=t[r]));return e}var GHe={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ZHe(t){var e=[],n;for(n in t)Ir(t,n)&&e.push({unit:n,priority:GHe[n]});return e.sort(function(r,i){return r.priority-i.priority}),e}var Hue=/\d/,Tl=/\d\d/,Yue=/\d{3}/,_W=/\d{4}/,qC=/[+-]?\d{6}/,$i=/\d\d?/,que=/\d\d\d\d?/,Kue=/\d\d\d\d\d\d?/,KC=/\d{1,3}/,wW=/\d{1,4}/,GC=/[+-]?\d{1,6}/,j_=/\d+/,ZC=/[+-]?\d+/,QHe=/Z|[+-]\d\d:?\d\d/gi,QC=/Z|[+-]\d\d(?::?\d\d)?/gi,XHe=/[+-]?\d+(\.\d{1,3})?/,XA=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,H_=/^[1-9]\d?/,xW=/^([1-9]\d|\d)/,hO;hO={};function sn(t,e,n){hO[t]=$d(e)?e:function(r,i){return r&&n?n:e}}function JHe(t,e){return Ir(hO,t)?hO[t](e._strict,e._locale):new RegExp(e9e(t))}function e9e(t){return ph(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,n,r,i,a){return n||r||i||a}))}function ph(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Kl(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function gr(t){var e=+t,n=0;return e!==0&&isFinite(e)&&(n=Kl(e)),n}var n5={};function ii(t,e){var n,r=e,i;for(typeof t=="string"&&(t=[t]),Sh(e)&&(r=function(a,o){o[e]=gr(a)}),i=t.length,n=0;n<i;n++)n5[t[n]]=r}function JA(t,e){ii(t,function(n,r,i,a){i._w=i._w||{},e(n,i._w,i,a)})}function t9e(t,e,n){e!=null&&Ir(n5,t)&&n5[t](e,n._a,n,t)}function XC(t){return t%4===0&&t%100!==0||t%400===0}var ns=0,sh=1,od=2,Ka=3,uc=4,lh=5,dv=6,n9e=7,r9e=8;In("Y",0,0,function(){var t=this.year();return t<=9999?Od(t,4):"+"+t});In(0,["YY",2],0,function(){return this.year()%100});In(0,["YYYY",4],0,"year");In(0,["YYYYY",5],0,"year");In(0,["YYYYYY",6,!0],0,"year");sn("Y",ZC);sn("YY",$i,Tl);sn("YYYY",wW,_W);sn("YYYYY",GC,qC);sn("YYYYYY",GC,qC);ii(["YYYYY","YYYYYY"],ns);ii("YYYY",function(t,e){e[ns]=t.length===2?Yt.parseTwoDigitYear(t):gr(t)});ii("YY",function(t,e){e[ns]=Yt.parseTwoDigitYear(t)});ii("Y",function(t,e){e[ns]=parseInt(t,10)});function qx(t){return XC(t)?366:365}Yt.parseTwoDigitYear=function(t){return gr(t)+(gr(t)>68?1900:2e3)};var Gue=Y_("FullYear",!0);function i9e(){return XC(this.year())}function Y_(t,e){return function(n){return n!=null?(Zue(this,t,n),Yt.updateOffset(this,e),this):WS(this,t)}}function WS(t,e){if(!t.isValid())return NaN;var n=t._d,r=t._isUTC;switch(e){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Zue(t,e,n){var r,i,a,o,s;if(!(!t.isValid()||isNaN(n))){switch(r=t._d,i=t._isUTC,e){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}a=n,o=t.month(),s=t.date(),s=s===29&&o===1&&!XC(a)?28:s,i?r.setUTCFullYear(a,o,s):r.setFullYear(a,o,s)}}function a9e(t){return t=gu(t),$d(this[t])?this[t]():this}function o9e(t,e){if(typeof t=="object"){t=bW(t);var n=ZHe(t),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](t[n[r].unit])}else if(t=gu(t),$d(this[t]))return this[t](e);return this}function s9e(t,e){return(t%e+e)%e}var ya;Array.prototype.indexOf?ya=Array.prototype.indexOf:ya=function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1};function SW(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=s9e(e,12);return t+=(e-n)/12,n===1?XC(t)?29:28:31-n%7%2}In("M",["MM",2],"Mo",function(){return this.month()+1});In("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)});In("MMMM",0,0,function(t){return this.localeData().months(this,t)});sn("M",$i,H_);sn("MM",$i,Tl);sn("MMM",function(t,e){return e.monthsShortRegex(t)});sn("MMMM",function(t,e){return e.monthsRegex(t)});ii(["M","MM"],function(t,e){e[sh]=gr(t)-1});ii(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);i!=null?e[sh]=i:ar(n).invalidMonth=t});var l9e="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Que="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Xue=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,u9e=XA,c9e=XA;function d9e(t,e){return t?Ac(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Xue).test(e)?"format":"standalone"][t.month()]:Ac(this._months)?this._months:this._months.standalone}function f9e(t,e){return t?Ac(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Xue.test(e)?"format":"standalone"][t.month()]:Ac(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function h9e(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=Rd([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?e==="MMM"?(i=ya.call(this._shortMonthsParse,o),i!==-1?i:null):(i=ya.call(this._longMonthsParse,o),i!==-1?i:null):e==="MMM"?(i=ya.call(this._shortMonthsParse,o),i!==-1?i:(i=ya.call(this._longMonthsParse,o),i!==-1?i:null)):(i=ya.call(this._longMonthsParse,o),i!==-1?i:(i=ya.call(this._shortMonthsParse,o),i!==-1?i:null))}function p9e(t,e,n){var r,i,a;if(this._monthsParseExact)return h9e.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=Rd([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&e==="MMMM"&&this._longMonthsParse[r].test(t))return r;if(n&&e==="MMM"&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function Jue(t,e){if(!t.isValid())return t;if(typeof e=="string"){if(/^\d+$/.test(e))e=gr(e);else if(e=t.localeData().monthsParse(e),!Sh(e))return t}var n=e,r=t.date();return r=r<29?r:Math.min(r,SW(t.year(),n)),t._isUTC?t._d.setUTCMonth(n,r):t._d.setMonth(n,r),t}function ece(t){return t!=null?(Jue(this,t),Yt.updateOffset(this,!0),this):WS(this,"Month")}function m9e(){return SW(this.year(),this.month())}function g9e(t){return this._monthsParseExact?(Ir(this,"_monthsRegex")||tce.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(Ir(this,"_monthsShortRegex")||(this._monthsShortRegex=u9e),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function v9e(t){return this._monthsParseExact?(Ir(this,"_monthsRegex")||tce.call(this),t?this._monthsStrictRegex:this._monthsRegex):(Ir(this,"_monthsRegex")||(this._monthsRegex=c9e),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function tce(){function t(l,c){return c.length-l.length}var e=[],n=[],r=[],i,a,o,s;for(i=0;i<12;i++)a=Rd([2e3,i]),o=ph(this.monthsShort(a,"")),s=ph(this.months(a,"")),e.push(o),n.push(s),r.push(s),r.push(o);e.sort(t),n.sort(t),r.sort(t),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function y9e(t,e,n,r,i,a,o){var s;return t<100&&t>=0?(s=new Date(t+400,e,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,a,o),s}function zS(t){var e,n;return t<100&&t>=0?(n=Array.prototype.slice.call(arguments),n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function pO(t,e,n){var r=7+e-n,i=(7+zS(t,0,r).getUTCDay()-e)%7;return-i+r-1}function nce(t,e,n,r,i){var a=(7+n-r)%7,o=pO(t,r,i),s=1+7*(e-1)+a+o,l,c;return s<=0?(l=t-1,c=qx(l)+s):s>qx(t)?(l=t+1,c=s-qx(t)):(l=t,c=s),{year:l,dayOfYear:c}}function jS(t,e,n){var r=pO(t.year(),e,n),i=Math.floor((t.dayOfYear()-r-1)/7)+1,a,o;return i<1?(o=t.year()-1,a=i+mh(o,e,n)):i>mh(t.year(),e,n)?(a=i-mh(t.year(),e,n),o=t.year()+1):(o=t.year(),a=i),{week:a,year:o}}function mh(t,e,n){var r=pO(t,e,n),i=pO(t+1,e,n);return(qx(t)-r+i)/7}In("w",["ww",2],"wo","week");In("W",["WW",2],"Wo","isoWeek");sn("w",$i,H_);sn("ww",$i,Tl);sn("W",$i,H_);sn("WW",$i,Tl);JA(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=gr(t)});function b9e(t){return jS(t,this._week.dow,this._week.doy).week}var _9e={dow:0,doy:6};function w9e(){return this._week.dow}function x9e(){return this._week.doy}function S9e(t){var e=this.localeData().week(this);return t==null?e:this.add((t-e)*7,"d")}function A9e(t){var e=jS(this,1,4).week;return t==null?e:this.add((t-e)*7,"d")}In("d",0,"do","day");In("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)});In("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)});In("dddd",0,0,function(t){return this.localeData().weekdays(this,t)});In("e",0,0,"weekday");In("E",0,0,"isoWeekday");sn("d",$i);sn("e",$i);sn("E",$i);sn("dd",function(t,e){return e.weekdaysMinRegex(t)});sn("ddd",function(t,e){return e.weekdaysShortRegex(t)});sn("dddd",function(t,e){return e.weekdaysRegex(t)});JA(["dd","ddd","dddd"],function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);i!=null?e.d=i:ar(n).invalidWeekday=t});JA(["d","e","E"],function(t,e,n,r){e[r]=gr(t)});function k9e(t,e){return typeof t!="string"?t:isNaN(t)?(t=e.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function E9e(t,e){return typeof t=="string"?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function AW(t,e){return t.slice(e,7).concat(t.slice(0,e))}var T9e="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),rce="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),D9e="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),O9e=XA,C9e=XA,I9e=XA;function M9e(t,e){var n=Ac(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return t===!0?AW(n,this._week.dow):t?n[t.day()]:n}function R9e(t){return t===!0?AW(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function $9e(t){return t===!0?AW(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function P9e(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=Rd([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?e==="dddd"?(i=ya.call(this._weekdaysParse,o),i!==-1?i:null):e==="ddd"?(i=ya.call(this._shortWeekdaysParse,o),i!==-1?i:null):(i=ya.call(this._minWeekdaysParse,o),i!==-1?i:null):e==="dddd"?(i=ya.call(this._weekdaysParse,o),i!==-1||(i=ya.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=ya.call(this._minWeekdaysParse,o),i!==-1?i:null)):e==="ddd"?(i=ya.call(this._shortWeekdaysParse,o),i!==-1||(i=ya.call(this._weekdaysParse,o),i!==-1)?i:(i=ya.call(this._minWeekdaysParse,o),i!==-1?i:null)):(i=ya.call(this._minWeekdaysParse,o),i!==-1||(i=ya.call(this._weekdaysParse,o),i!==-1)?i:(i=ya.call(this._shortWeekdaysParse,o),i!==-1?i:null))}function L9e(t,e,n){var r,i,a;if(this._weekdaysParseExact)return P9e.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Rd([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&e==="dddd"&&this._fullWeekdaysParse[r].test(t))return r;if(n&&e==="ddd"&&this._shortWeekdaysParse[r].test(t))return r;if(n&&e==="dd"&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}}function N9e(t){if(!this.isValid())return t!=null?this:NaN;var e=WS(this,"Day");return t!=null?(t=k9e(t,this.localeData()),this.add(t-e,"d")):e}function F9e(t){if(!this.isValid())return t!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return t==null?e:this.add(t-e,"d")}function V9e(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var e=E9e(t,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function B9e(t){return this._weekdaysParseExact?(Ir(this,"_weekdaysRegex")||kW.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(Ir(this,"_weekdaysRegex")||(this._weekdaysRegex=O9e),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function U9e(t){return this._weekdaysParseExact?(Ir(this,"_weekdaysRegex")||kW.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Ir(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=C9e),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function W9e(t){return this._weekdaysParseExact?(Ir(this,"_weekdaysRegex")||kW.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Ir(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=I9e),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function kW(){function t(f,h){return h.length-f.length}var e=[],n=[],r=[],i=[],a,o,s,l,c;for(a=0;a<7;a++)o=Rd([2e3,1]).day(a),s=ph(this.weekdaysMin(o,"")),l=ph(this.weekdaysShort(o,"")),c=ph(this.weekdays(o,"")),e.push(s),n.push(l),r.push(c),i.push(s),i.push(l),i.push(c);e.sort(t),n.sort(t),r.sort(t),i.sort(t),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function EW(){return this.hours()%12||12}function z9e(){return this.hours()||24}In("H",["HH",2],0,"hour");In("h",["hh",2],0,EW);In("k",["kk",2],0,z9e);In("hmm",0,0,function(){return""+EW.apply(this)+Od(this.minutes(),2)});In("hmmss",0,0,function(){return""+EW.apply(this)+Od(this.minutes(),2)+Od(this.seconds(),2)});In("Hmm",0,0,function(){return""+this.hours()+Od(this.minutes(),2)});In("Hmmss",0,0,function(){return""+this.hours()+Od(this.minutes(),2)+Od(this.seconds(),2)});function ice(t,e){In(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}ice("a",!0);ice("A",!1);function ace(t,e){return e._meridiemParse}sn("a",ace);sn("A",ace);sn("H",$i,xW);sn("h",$i,H_);sn("k",$i,H_);sn("HH",$i,Tl);sn("hh",$i,Tl);sn("kk",$i,Tl);sn("hmm",que);sn("hmmss",Kue);sn("Hmm",que);sn("Hmmss",Kue);ii(["H","HH"],Ka);ii(["k","kk"],function(t,e,n){var r=gr(t);e[Ka]=r===24?0:r});ii(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t});ii(["h","hh"],function(t,e,n){e[Ka]=gr(t),ar(n).bigHour=!0});ii("hmm",function(t,e,n){var r=t.length-2;e[Ka]=gr(t.substr(0,r)),e[uc]=gr(t.substr(r)),ar(n).bigHour=!0});ii("hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[Ka]=gr(t.substr(0,r)),e[uc]=gr(t.substr(r,2)),e[lh]=gr(t.substr(i)),ar(n).bigHour=!0});ii("Hmm",function(t,e,n){var r=t.length-2;e[Ka]=gr(t.substr(0,r)),e[uc]=gr(t.substr(r))});ii("Hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[Ka]=gr(t.substr(0,r)),e[uc]=gr(t.substr(r,2)),e[lh]=gr(t.substr(i))});function j9e(t){return(t+"").toLowerCase().charAt(0)==="p"}var H9e=/[ap]\.?m?\.?/i,Y9e=Y_("Hours",!0);function q9e(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var oce={calendar:PHe,longDateFormat:VHe,invalidDate:UHe,ordinal:zHe,dayOfMonthOrdinalParse:jHe,relativeTime:YHe,months:l9e,monthsShort:Que,week:_9e,weekdays:T9e,weekdaysMin:D9e,weekdaysShort:rce,meridiemParse:H9e},Vi={},D1={},HS;function K9e(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n+=1)if(t[n]!==e[n])return n;return r}function Rq(t){return t&&t.toLowerCase().replace("_","-")}function G9e(t){for(var e=0,n,r,i,a;e<t.length;){for(a=Rq(t[e]).split("-"),n=a.length,r=Rq(t[e+1]),r=r?r.split("-"):null;n>0;){if(i=JC(a.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&K9e(a,r)>=n-1)break;n--}e++}return HS}function Z9e(t){return!!(t&&t.match("^[^/\\\\]*$"))}function JC(t){var e=null,n;if(Vi[t]===void 0&&typeof module<"u"&&module&&module.exports&&Z9e(t))try{e=HS._abbr,n=require,n("./locale/"+t),Np(e)}catch{Vi[t]=null}return Vi[t]}function Np(t,e){var n;return t&&($s(e)?n=Dh(t):n=TW(t,e),n?HS=n:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),HS._abbr}function TW(t,e){if(e!==null){var n,r=oce;if(e.abbr=t,Vi[t]!=null)zue("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Vi[t]._config;else if(e.parentLocale!=null)if(Vi[e.parentLocale]!=null)r=Vi[e.parentLocale]._config;else if(n=JC(e.parentLocale),n!=null)r=n._config;else return D1[e.parentLocale]||(D1[e.parentLocale]=[]),D1[e.parentLocale].push({name:t,config:e}),null;return Vi[t]=new vW(e5(r,e)),D1[t]&&D1[t].forEach(function(i){TW(i.name,i.config)}),Np(t),Vi[t]}else return delete Vi[t],null}function Q9e(t,e){if(e!=null){var n,r,i=oce;Vi[t]!=null&&Vi[t].parentLocale!=null?Vi[t].set(e5(Vi[t]._config,e)):(r=JC(t),r!=null&&(i=r._config),e=e5(i,e),r==null&&(e.abbr=t),n=new vW(e),n.parentLocale=Vi[t],Vi[t]=n),Np(t)}else Vi[t]!=null&&(Vi[t].parentLocale!=null?(Vi[t]=Vi[t].parentLocale,t===Np()&&Np(t)):Vi[t]!=null&&delete Vi[t]);return Vi[t]}function Dh(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return HS;if(!Ac(t)){if(e=JC(t),e)return e;t=[t]}return G9e(t)}function X9e(){return t5(Vi)}function DW(t){var e,n=t._a;return n&&ar(t).overflow===-2&&(e=n[sh]<0||n[sh]>11?sh:n[od]<1||n[od]>SW(n[ns],n[sh])?od:n[Ka]<0||n[Ka]>24||n[Ka]===24&&(n[uc]!==0||n[lh]!==0||n[dv]!==0)?Ka:n[uc]<0||n[uc]>59?uc:n[lh]<0||n[lh]>59?lh:n[dv]<0||n[dv]>999?dv:-1,ar(t)._overflowDayOfYear&&(e<ns||e>od)&&(e=od),ar(t)._overflowWeeks&&e===-1&&(e=n9e),ar(t)._overflowWeekday&&e===-1&&(e=r9e),ar(t).overflow=e),t}var J9e=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,eYe=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,tYe=/Z|[+-]\d\d(?::?\d\d)?/,uE=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],FN=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],nYe=/^\/?Date\((-?\d+)/i,rYe=/^(?:(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{4}))$/,iYe={UT:0,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 sce(t){var e,n,r=t._i,i=J9e.exec(r)||eYe.exec(r),a,o,s,l,c=uE.length,f=FN.length;if(i){for(ar(t).iso=!0,e=0,n=c;e<n;e++)if(uE[e][1].exec(i[1])){o=uE[e][0],a=uE[e][2]!==!1;break}if(o==null){t._isValid=!1;return}if(i[3]){for(e=0,n=f;e<n;e++)if(FN[e][1].exec(i[3])){s=(i[2]||" ")+FN[e][0];break}if(s==null){t._isValid=!1;return}}if(!a&&s!=null){t._isValid=!1;return}if(i[4])if(tYe.exec(i[4]))l="Z";else{t._isValid=!1;return}t._f=o+(s||"")+(l||""),CW(t)}else t._isValid=!1}function aYe(t,e,n,r,i,a){var o=[oYe(t),Que.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}function oYe(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function sYe(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function lYe(t,e,n){if(t){var r=rce.indexOf(t),i=new Date(e[0],e[1],e[2]).getDay();if(r!==i)return ar(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function uYe(t,e,n){if(t)return iYe[t];if(e)return 0;var r=parseInt(n,10),i=r%100,a=(r-i)/100;return a*60+i}function lce(t){var e=rYe.exec(sYe(t._i)),n;if(e){if(n=aYe(e[4],e[3],e[2],e[5],e[6],e[7]),!lYe(e[1],n,t))return;t._a=n,t._tzm=uYe(e[8],e[9],e[10]),t._d=zS.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),ar(t).rfc2822=!0}else t._isValid=!1}function cYe(t){var e=nYe.exec(t._i);if(e!==null){t._d=new Date(+e[1]);return}if(sce(t),t._isValid===!1)delete t._isValid;else return;if(lce(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:Yt.createFromInputFallback(t)}Yt.createFromInputFallback=mu("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))});function rb(t,e,n){return t??e??n}function dYe(t){var e=new Date(Yt.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function OW(t){var e,n,r=[],i,a,o;if(!t._d){for(i=dYe(t),t._w&&t._a[od]==null&&t._a[sh]==null&&fYe(t),t._dayOfYear!=null&&(o=rb(t._a[ns],i[ns]),(t._dayOfYear>qx(o)||t._dayOfYear===0)&&(ar(t)._overflowDayOfYear=!0),n=zS(o,0,t._dayOfYear),t._a[sh]=n.getUTCMonth(),t._a[od]=n.getUTCDate()),e=0;e<3&&t._a[e]==null;++e)t._a[e]=r[e]=i[e];for(;e<7;e++)t._a[e]=r[e]=t._a[e]==null?e===2?1:0:t._a[e];t._a[Ka]===24&&t._a[uc]===0&&t._a[lh]===0&&t._a[dv]===0&&(t._nextDay=!0,t._a[Ka]=0),t._d=(t._useUTC?zS:y9e).apply(null,r),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Ka]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==a&&(ar(t).weekdayMismatch=!0)}}function fYe(t){var e,n,r,i,a,o,s,l,c;e=t._w,e.GG!=null||e.W!=null||e.E!=null?(a=1,o=4,n=rb(e.GG,t._a[ns],jS(Ri(),1,4).year),r=rb(e.W,1),i=rb(e.E,1),(i<1||i>7)&&(l=!0)):(a=t._locale._week.dow,o=t._locale._week.doy,c=jS(Ri(),a,o),n=rb(e.gg,t._a[ns],c.year),r=rb(e.w,c.week),e.d!=null?(i=e.d,(i<0||i>6)&&(l=!0)):e.e!=null?(i=e.e+a,(e.e<0||e.e>6)&&(l=!0)):i=a),r<1||r>mh(n,a,o)?ar(t)._overflowWeeks=!0:l!=null?ar(t)._overflowWeekday=!0:(s=nce(n,r,i,a,o),t._a[ns]=s.year,t._dayOfYear=s.dayOfYear)}Yt.ISO_8601=function(){};Yt.RFC_2822=function(){};function CW(t){if(t._f===Yt.ISO_8601){sce(t);return}if(t._f===Yt.RFC_2822){lce(t);return}t._a=[],ar(t).empty=!0;var e=""+t._i,n,r,i,a,o,s=e.length,l=0,c,f;for(i=jue(t._f,t._locale).match(yW)||[],f=i.length,n=0;n<f;n++)a=i[n],r=(e.match(JHe(a,t))||[])[0],r&&(o=e.substr(0,e.indexOf(r)),o.length>0&&ar(t).unusedInput.push(o),e=e.slice(e.indexOf(r)+r.length),l+=r.length),Cb[a]?(r?ar(t).empty=!1:ar(t).unusedTokens.push(a),t9e(a,r,t)):t._strict&&!r&&ar(t).unusedTokens.push(a);ar(t).charsLeftOver=s-l,e.length>0&&ar(t).unusedInput.push(e),t._a[Ka]<=12&&ar(t).bigHour===!0&&t._a[Ka]>0&&(ar(t).bigHour=void 0),ar(t).parsedDateParts=t._a.slice(0),ar(t).meridiem=t._meridiem,t._a[Ka]=hYe(t._locale,t._a[Ka],t._meridiem),c=ar(t).era,c!==null&&(t._a[ns]=t._locale.erasConvertYear(c,t._a[ns])),OW(t),DW(t)}function hYe(t,e,n){var r;return n==null?e:t.meridiemHour!=null?t.meridiemHour(e,n):(t.isPM!=null&&(r=t.isPM(n),r&&e<12&&(e+=12),!r&&e===12&&(e=0)),e)}function pYe(t){var e,n,r,i,a,o,s=!1,l=t._f.length;if(l===0){ar(t).invalidFormat=!0,t._d=new Date(NaN);return}for(i=0;i<l;i++)a=0,o=!1,e=gW({},t),t._useUTC!=null&&(e._useUTC=t._useUTC),e._f=t._f[i],CW(e),mW(e)&&(o=!0),a+=ar(e).charsLeftOver,a+=ar(e).unusedTokens.length*10,ar(e).score=a,s?a<r&&(r=a,n=e):(r==null||a<r||o)&&(r=a,n=e,o&&(s=!0));Sp(t,n||e)}function mYe(t){if(!t._d){var e=bW(t._i),n=e.day===void 0?e.date:e.day;t._a=Uue([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],function(r){return r&&parseInt(r,10)}),OW(t)}}function gYe(t){var e=new QA(DW(uce(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function uce(t){var e=t._i,n=t._f;return t._locale=t._locale||Dh(t._l),e===null||n===void 0&&e===""?YC({nullInput:!0}):(typeof e=="string"&&(t._i=e=t._locale.preparse(e)),kc(e)?new QA(DW(e)):(ZA(e)?t._d=e:Ac(n)?pYe(t):n?CW(t):vYe(t),mW(t)||(t._d=null),t))}function vYe(t){var e=t._i;$s(e)?t._d=new Date(Yt.now()):ZA(e)?t._d=new Date(e.valueOf()):typeof e=="string"?cYe(t):Ac(e)?(t._a=Uue(e.slice(0),function(n){return parseInt(n,10)}),OW(t)):Iv(e)?mYe(t):Sh(e)?t._d=new Date(e):Yt.createFromInputFallback(t)}function cce(t,e,n,r,i){var a={};return(e===!0||e===!1)&&(r=e,e=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(Iv(t)&&pW(t)||Ac(t)&&t.length===0)&&(t=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=t,a._f=e,a._strict=r,gYe(a)}function Ri(t,e,n,r){return cce(t,e,n,r,!1)}var yYe=mu("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Ri.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:YC()}),bYe=mu("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Ri.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:YC()});function dce(t,e){var n,r;if(e.length===1&&Ac(e[0])&&(e=e[0]),!e.length)return Ri();for(n=e[0],r=1;r<e.length;++r)(!e[r].isValid()||e[r][t](n))&&(n=e[r]);return n}function _Ye(){var t=[].slice.call(arguments,0);return dce("isBefore",t)}function wYe(){var t=[].slice.call(arguments,0);return dce("isAfter",t)}var xYe=function(){return Date.now?Date.now():+new Date},O1=["year","quarter","month","week","day","hour","minute","second","millisecond"];function SYe(t){var e,n=!1,r,i=O1.length;for(e in t)if(Ir(t,e)&&!(ya.call(O1,e)!==-1&&(t[e]==null||!isNaN(t[e]))))return!1;for(r=0;r<i;++r)if(t[O1[r]]){if(n)return!1;parseFloat(t[O1[r]])!==gr(t[O1[r]])&&(n=!0)}return!0}function AYe(){return this._isValid}function kYe(){return Cc(NaN)}function eI(t){var e=bW(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,l=e.minute||0,c=e.second||0,f=e.millisecond||0;this._isValid=SYe(e),this._milliseconds=+f+c*1e3+l*6e4+s*1e3*60*60,this._days=+o+a*7,this._months=+i+r*3+n*12,this._data={},this._locale=Dh(),this._bubble()}function jT(t){return t instanceof eI}function r5(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function EYe(t,e,n){var r=Math.min(t.length,e.length),i=Math.abs(t.length-e.length),a=0,o;for(o=0;o<r;o++)gr(t[o])!==gr(e[o])&&a++;return a+i}function fce(t,e){In(t,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+Od(~~(n/60),2)+e+Od(~~n%60,2)})}fce("Z",":");fce("ZZ","");sn("Z",QC);sn("ZZ",QC);ii(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=IW(QC,t)});var TYe=/([\+\-]|\d\d)/gi;function IW(t,e){var n=(e||"").match(t),r,i,a;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(TYe)||["-",0,0],a=+(i[1]*60)+gr(i[2]),a===0?0:i[0]==="+"?a:-a)}function MW(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(kc(t)||ZA(t)?t.valueOf():Ri(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),Yt.updateOffset(n,!1),n):Ri(t).local()}function i5(t){return-Math.round(t._d.getTimezoneOffset())}Yt.updateOffset=function(){};function DYe(t,e,n){var r=this._offset||0,i;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=IW(QC,t),t===null)return this}else Math.abs(t)<16&&!n&&(t=t*60);return!this._isUTC&&e&&(i=i5(this)),this._offset=t,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==t&&(!e||this._changeInProgress?mce(this,Cc(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Yt.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:i5(this)}function OYe(t,e){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function CYe(t){return this.utcOffset(0,t)}function IYe(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(i5(this),"m")),this}function MYe(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=IW(QHe,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function RYe(t){return this.isValid()?(t=t?Ri(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function $Ye(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function PYe(){if(!$s(this._isDSTShifted))return this._isDSTShifted;var t={},e;return gW(t,this),t=uce(t),t._a?(e=t._isUTC?Rd(t._a):Ri(t._a),this._isDSTShifted=this.isValid()&&EYe(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function LYe(){return this.isValid()?!this._isUTC:!1}function NYe(){return this.isValid()?this._isUTC:!1}function hce(){return this.isValid()?this._isUTC&&this._offset===0:!1}var FYe=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,VYe=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Cc(t,e){var n=t,r=null,i,a,o;return jT(t)?n={ms:t._milliseconds,d:t._days,M:t._months}:Sh(t)||!isNaN(+t)?(n={},e?n[e]=+t:n.milliseconds=+t):(r=FYe.exec(t))?(i=r[1]==="-"?-1:1,n={y:0,d:gr(r[od])*i,h:gr(r[Ka])*i,m:gr(r[uc])*i,s:gr(r[lh])*i,ms:gr(r5(r[dv]*1e3))*i}):(r=VYe.exec(t))?(i=r[1]==="-"?-1:1,n={y:Ug(r[2],i),M:Ug(r[3],i),w:Ug(r[4],i),d:Ug(r[5],i),h:Ug(r[6],i),m:Ug(r[7],i),s:Ug(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(o=BYe(Ri(n.from),Ri(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),a=new eI(n),jT(t)&&Ir(t,"_locale")&&(a._locale=t._locale),jT(t)&&Ir(t,"_isValid")&&(a._isValid=t._isValid),a}Cc.fn=eI.prototype;Cc.invalid=kYe;function Ug(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function $q(t,e){var n={};return n.months=e.month()-t.month()+(e.year()-t.year())*12,t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function BYe(t,e){var n;return t.isValid()&&e.isValid()?(e=MW(e,t),t.isBefore(e)?n=$q(t,e):(n=$q(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function pce(t,e){return function(n,r){var i,a;return r!==null&&!isNaN(+r)&&(zue(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),i=Cc(n,r),mce(this,i,t),this}}function mce(t,e,n,r){var i=e._milliseconds,a=r5(e._days),o=r5(e._months);t.isValid()&&(r=r??!0,o&&Jue(t,WS(t,"Month")+o*n),a&&Zue(t,"Date",WS(t,"Date")+a*n),i&&t._d.setTime(t._d.valueOf()+i*n),r&&Yt.updateOffset(t,a||o))}var UYe=pce(1,"add"),WYe=pce(-1,"subtract");function gce(t){return typeof t=="string"||t instanceof String}function zYe(t){return kc(t)||ZA(t)||gce(t)||Sh(t)||HYe(t)||jYe(t)||t===null||t===void 0}function jYe(t){var e=Iv(t)&&!pW(t),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,a,o=r.length;for(i=0;i<o;i+=1)a=r[i],n=n||Ir(t,a);return e&&n}function HYe(t){var e=Ac(t),n=!1;return e&&(n=t.filter(function(r){return!Sh(r)&&gce(t)}).length===0),e&&n}function YYe(t){var e=Iv(t)&&!pW(t),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,a;for(i=0;i<r.length;i+=1)a=r[i],n=n||Ir(t,a);return e&&n}function qYe(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function KYe(t,e){arguments.length===1&&(arguments[0]?zYe(arguments[0])?(t=arguments[0],e=void 0):YYe(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||Ri(),r=MW(n,this).startOf("day"),i=Yt.calendarFormat(this,r)||"sameElse",a=e&&($d(e[i])?e[i].call(this,n):e[i]);return this.format(a||this.localeData().calendar(i,this,Ri(n)))}function GYe(){return new QA(this)}function ZYe(t,e){var n=kc(t)?t:Ri(t);return this.isValid()&&n.isValid()?(e=gu(e)||"millisecond",e==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf()):!1}function QYe(t,e){var n=kc(t)?t:Ri(t);return this.isValid()&&n.isValid()?(e=gu(e)||"millisecond",e==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf()):!1}function XYe(t,e,n,r){var i=kc(t)?t:Ri(t),a=kc(e)?e:Ri(e);return this.isValid()&&i.isValid()&&a.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(a,n):!this.isAfter(a,n))):!1}function JYe(t,e){var n=kc(t)?t:Ri(t),r;return this.isValid()&&n.isValid()?(e=gu(e)||"millisecond",e==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(e).valueOf()<=r&&r<=this.clone().endOf(e).valueOf())):!1}function e7e(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function t7e(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function n7e(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(r=MW(t,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,e=gu(e),e){case"year":a=HT(this,r)/12;break;case"month":a=HT(this,r);break;case"quarter":a=HT(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:Kl(a)}function HT(t,e){if(t.date()<e.date())return-HT(e,t);var n=(e.year()-t.year())*12+(e.month()-t.month()),r=t.clone().add(n,"months"),i,a;return e-r<0?(i=t.clone().add(n-1,"months"),a=(e-r)/(r-i)):(i=t.clone().add(n+1,"months"),a=(e-r)/(i-r)),-(n+a)||0}Yt.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";Yt.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function r7e(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function i7e(t){if(!this.isValid())return null;var e=t!==!0,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?zT(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):$d(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",zT(n,"Z")):zT(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function a7e(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="",n,r,i,a;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",a=e+'[")]',this.format(n+r+i+a)}function o7e(t){t||(t=this.isUtc()?Yt.defaultFormatUtc:Yt.defaultFormat);var e=zT(this,t);return this.localeData().postformat(e)}function s7e(t,e){return this.isValid()&&(kc(t)&&t.isValid()||Ri(t).isValid())?Cc({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function l7e(t){return this.from(Ri(),t)}function u7e(t,e){return this.isValid()&&(kc(t)&&t.isValid()||Ri(t).isValid())?Cc({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function c7e(t){return this.to(Ri(),t)}function vce(t){var e;return t===void 0?this._locale._abbr:(e=Dh(t),e!=null&&(this._locale=e),this)}var yce=mu("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function bce(){return this._locale}var mO=1e3,Ib=60*mO,gO=60*Ib,_ce=(365*400+97)*24*gO;function Mb(t,e){return(t%e+e)%e}function wce(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-_ce:new Date(t,e,n).valueOf()}function xce(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-_ce:Date.UTC(t,e,n)}function d7e(t){var e,n;if(t=gu(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?xce:wce,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Mb(e+(this._isUTC?0:this.utcOffset()*Ib),gO);break;case"minute":e=this._d.valueOf(),e-=Mb(e,Ib);break;case"second":e=this._d.valueOf(),e-=Mb(e,mO);break}return this._d.setTime(e),Yt.updateOffset(this,!0),this}function f7e(t){var e,n;if(t=gu(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?xce:wce,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=gO-Mb(e+(this._isUTC?0:this.utcOffset()*Ib),gO)-1;break;case"minute":e=this._d.valueOf(),e+=Ib-Mb(e,Ib)-1;break;case"second":e=this._d.valueOf(),e+=mO-Mb(e,mO)-1;break}return this._d.setTime(e),Yt.updateOffset(this,!0),this}function h7e(){return this._d.valueOf()-(this._offset||0)*6e4}function p7e(){return Math.floor(this.valueOf()/1e3)}function m7e(){return new Date(this.valueOf())}function g7e(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function v7e(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function y7e(){return this.isValid()?this.toISOString():null}function b7e(){return mW(this)}function _7e(){return Sp({},ar(this))}function w7e(){return ar(this).overflow}function x7e(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}In("N",0,0,"eraAbbr");In("NN",0,0,"eraAbbr");In("NNN",0,0,"eraAbbr");In("NNNN",0,0,"eraName");In("NNNNN",0,0,"eraNarrow");In("y",["y",1],"yo","eraYear");In("y",["yy",2],0,"eraYear");In("y",["yyy",3],0,"eraYear");In("y",["yyyy",4],0,"eraYear");sn("N",RW);sn("NN",RW);sn("NNN",RW);sn("NNNN",R7e);sn("NNNNN",$7e);ii(["N","NN","NNN","NNNN","NNNNN"],function(t,e,n,r){var i=n._locale.erasParse(t,r,n._strict);i?ar(n).era=i:ar(n).invalidEra=t});sn("y",j_);sn("yy",j_);sn("yyy",j_);sn("yyyy",j_);sn("yo",P7e);ii(["y","yy","yyy","yyyy"],ns);ii(["yo"],function(t,e,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[ns]=n._locale.eraYearOrdinalParse(t,i):e[ns]=parseInt(t,10)});function S7e(t,e){var n,r,i,a=this._eras||Dh("en")._eras;for(n=0,r=a.length;n<r;++n){switch(typeof a[n].since){case"string":i=Yt(a[n].since).startOf("day"),a[n].since=i.valueOf();break}switch(typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":i=Yt(a[n].until).startOf("day").valueOf(),a[n].until=i.valueOf();break}}return a}function A7e(t,e,n){var r,i,a=this.eras(),o,s,l;for(t=t.toUpperCase(),r=0,i=a.length;r<i;++r)if(o=a[r].name.toUpperCase(),s=a[r].abbr.toUpperCase(),l=a[r].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(s===t)return a[r];break;case"NNNN":if(o===t)return a[r];break;case"NNNNN":if(l===t)return a[r];break}else if([o,s,l].indexOf(t)>=0)return a[r]}function k7e(t,e){var n=t.since<=t.until?1:-1;return e===void 0?Yt(t.since).year():Yt(t.since).year()+(e-t.offset)*n}function E7e(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].name;return""}function T7e(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].narrow;return""}function D7e(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].abbr;return""}function O7e(){var t,e,n,r,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t)if(n=i[t].since<=i[t].until?1:-1,r=this.clone().startOf("day").valueOf(),i[t].since<=r&&r<=i[t].until||i[t].until<=r&&r<=i[t].since)return(this.year()-Yt(i[t].since).year())*n+i[t].offset;return this.year()}function C7e(t){return Ir(this,"_erasNameRegex")||$W.call(this),t?this._erasNameRegex:this._erasRegex}function I7e(t){return Ir(this,"_erasAbbrRegex")||$W.call(this),t?this._erasAbbrRegex:this._erasRegex}function M7e(t){return Ir(this,"_erasNarrowRegex")||$W.call(this),t?this._erasNarrowRegex:this._erasRegex}function RW(t,e){return e.erasAbbrRegex(t)}function R7e(t,e){return e.erasNameRegex(t)}function $7e(t,e){return e.erasNarrowRegex(t)}function P7e(t,e){return e._eraYearOrdinalRegex||j_}function $W(){var t=[],e=[],n=[],r=[],i,a,o,s,l,c=this.eras();for(i=0,a=c.length;i<a;++i)o=ph(c[i].name),s=ph(c[i].abbr),l=ph(c[i].narrow),e.push(o),t.push(s),n.push(l),r.push(o),r.push(s),r.push(l);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}In(0,["gg",2],0,function(){return this.weekYear()%100});In(0,["GG",2],0,function(){return this.isoWeekYear()%100});function tI(t,e){In(0,[t,t.length],0,e)}tI("gggg","weekYear");tI("ggggg","weekYear");tI("GGGG","isoWeekYear");tI("GGGGG","isoWeekYear");sn("G",ZC);sn("g",ZC);sn("GG",$i,Tl);sn("gg",$i,Tl);sn("GGGG",wW,_W);sn("gggg",wW,_W);sn("GGGGG",GC,qC);sn("ggggg",GC,qC);JA(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=gr(t)});JA(["gg","GG"],function(t,e,n,r){e[r]=Yt.parseTwoDigitYear(t)});function L7e(t){return Sce.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function N7e(t){return Sce.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function F7e(){return mh(this.year(),1,4)}function V7e(){return mh(this.isoWeekYear(),1,4)}function B7e(){var t=this.localeData()._week;return mh(this.year(),t.dow,t.doy)}function U7e(){var t=this.localeData()._week;return mh(this.weekYear(),t.dow,t.doy)}function Sce(t,e,n,r,i){var a;return t==null?jS(this,r,i).year:(a=mh(t,r,i),e>a&&(e=a),W7e.call(this,t,e,n,r,i))}function W7e(t,e,n,r,i){var a=nce(t,e,n,r,i),o=zS(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}In("Q",0,"Qo","quarter");sn("Q",Hue);ii("Q",function(t,e){e[sh]=(gr(t)-1)*3});function z7e(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}In("D",["DD",2],"Do","date");sn("D",$i,H_);sn("DD",$i,Tl);sn("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient});ii(["D","DD"],od);ii("Do",function(t,e){e[od]=gr(t.match($i)[0])});var Ace=Y_("Date",!0);In("DDD",["DDDD",3],"DDDo","dayOfYear");sn("DDD",KC);sn("DDDD",Yue);ii(["DDD","DDDD"],function(t,e,n){n._dayOfYear=gr(t)});function j7e(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")}In("m",["mm",2],0,"minute");sn("m",$i,xW);sn("mm",$i,Tl);ii(["m","mm"],uc);var H7e=Y_("Minutes",!1);In("s",["ss",2],0,"second");sn("s",$i,xW);sn("ss",$i,Tl);ii(["s","ss"],lh);var Y7e=Y_("Seconds",!1);In("S",0,0,function(){return~~(this.millisecond()/100)});In(0,["SS",2],0,function(){return~~(this.millisecond()/10)});In(0,["SSS",3],0,"millisecond");In(0,["SSSS",4],0,function(){return this.millisecond()*10});In(0,["SSSSS",5],0,function(){return this.millisecond()*100});In(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});In(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});In(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});In(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});sn("S",KC,Hue);sn("SS",KC,Tl);sn("SSS",KC,Yue);var Ap,kce;for(Ap="SSSS";Ap.length<=9;Ap+="S")sn(Ap,j_);function q7e(t,e){e[dv]=gr(("0."+t)*1e3)}for(Ap="S";Ap.length<=9;Ap+="S")ii(Ap,q7e);kce=Y_("Milliseconds",!1);In("z",0,0,"zoneAbbr");In("zz",0,0,"zoneName");function K7e(){return this._isUTC?"UTC":""}function G7e(){return this._isUTC?"Coordinated Universal Time":""}var Pt=QA.prototype;Pt.add=UYe;Pt.calendar=KYe;Pt.clone=GYe;Pt.diff=n7e;Pt.endOf=f7e;Pt.format=o7e;Pt.from=s7e;Pt.fromNow=l7e;Pt.to=u7e;Pt.toNow=c7e;Pt.get=a9e;Pt.invalidAt=w7e;Pt.isAfter=ZYe;Pt.isBefore=QYe;Pt.isBetween=XYe;Pt.isSame=JYe;Pt.isSameOrAfter=e7e;Pt.isSameOrBefore=t7e;Pt.isValid=b7e;Pt.lang=yce;Pt.locale=vce;Pt.localeData=bce;Pt.max=bYe;Pt.min=yYe;Pt.parsingFlags=_7e;Pt.set=o9e;Pt.startOf=d7e;Pt.subtract=WYe;Pt.toArray=g7e;Pt.toObject=v7e;Pt.toDate=m7e;Pt.toISOString=i7e;Pt.inspect=a7e;typeof Symbol<"u"&&Symbol.for!=null&&(Pt[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});Pt.toJSON=y7e;Pt.toString=r7e;Pt.unix=p7e;Pt.valueOf=h7e;Pt.creationData=x7e;Pt.eraName=E7e;Pt.eraNarrow=T7e;Pt.eraAbbr=D7e;Pt.eraYear=O7e;Pt.year=Gue;Pt.isLeapYear=i9e;Pt.weekYear=L7e;Pt.isoWeekYear=N7e;Pt.quarter=Pt.quarters=z7e;Pt.month=ece;Pt.daysInMonth=m9e;Pt.week=Pt.weeks=S9e;Pt.isoWeek=Pt.isoWeeks=A9e;Pt.weeksInYear=B7e;Pt.weeksInWeekYear=U7e;Pt.isoWeeksInYear=F7e;Pt.isoWeeksInISOWeekYear=V7e;Pt.date=Ace;Pt.day=Pt.days=N9e;Pt.weekday=F9e;Pt.isoWeekday=V9e;Pt.dayOfYear=j7e;Pt.hour=Pt.hours=Y9e;Pt.minute=Pt.minutes=H7e;Pt.second=Pt.seconds=Y7e;Pt.millisecond=Pt.milliseconds=kce;Pt.utcOffset=DYe;Pt.utc=CYe;Pt.local=IYe;Pt.parseZone=MYe;Pt.hasAlignedHourOffset=RYe;Pt.isDST=$Ye;Pt.isLocal=LYe;Pt.isUtcOffset=NYe;Pt.isUtc=hce;Pt.isUTC=hce;Pt.zoneAbbr=K7e;Pt.zoneName=G7e;Pt.dates=mu("dates accessor is deprecated. Use date instead.",Ace);Pt.months=mu("months accessor is deprecated. Use month instead",ece);Pt.years=mu("years accessor is deprecated. Use year instead",Gue);Pt.zone=mu("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",OYe);Pt.isDSTShifted=mu("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",PYe);function Z7e(t){return Ri(t*1e3)}function Q7e(){return Ri.apply(null,arguments).parseZone()}function Ece(t){return t}var Mr=vW.prototype;Mr.calendar=LHe;Mr.longDateFormat=BHe;Mr.invalidDate=WHe;Mr.ordinal=HHe;Mr.preparse=Ece;Mr.postformat=Ece;Mr.relativeTime=qHe;Mr.pastFuture=KHe;Mr.set=$He;Mr.eras=S7e;Mr.erasParse=A7e;Mr.erasConvertYear=k7e;Mr.erasAbbrRegex=I7e;Mr.erasNameRegex=C7e;Mr.erasNarrowRegex=M7e;Mr.months=d9e;Mr.monthsShort=f9e;Mr.monthsParse=p9e;Mr.monthsRegex=v9e;Mr.monthsShortRegex=g9e;Mr.week=b9e;Mr.firstDayOfYear=x9e;Mr.firstDayOfWeek=w9e;Mr.weekdays=M9e;Mr.weekdaysMin=$9e;Mr.weekdaysShort=R9e;Mr.weekdaysParse=L9e;Mr.weekdaysRegex=B9e;Mr.weekdaysShortRegex=U9e;Mr.weekdaysMinRegex=W9e;Mr.isPM=j9e;Mr.meridiem=q9e;function vO(t,e,n,r){var i=Dh(),a=Rd().set(r,e);return i[n](a,t)}function Tce(t,e,n){if(Sh(t)&&(e=t,t=void 0),t=t||"",e!=null)return vO(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=vO(t,r,n,"month");return i}function PW(t,e,n,r){typeof t=="boolean"?(Sh(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,Sh(e)&&(n=e,e=void 0),e=e||"");var i=Dh(),a=t?i._week.dow:0,o,s=[];if(n!=null)return vO(e,(n+a)%7,r,"day");for(o=0;o<7;o++)s[o]=vO(e,(o+a)%7,r,"day");return s}function X7e(t,e){return Tce(t,e,"months")}function J7e(t,e){return Tce(t,e,"monthsShort")}function eqe(t,e,n){return PW(t,e,n,"weekdays")}function tqe(t,e,n){return PW(t,e,n,"weekdaysShort")}function nqe(t,e,n){return PW(t,e,n,"weekdaysMin")}Np("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=gr(t%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return t+n}});Yt.lang=mu("moment.lang is deprecated. Use moment.locale instead.",Np);Yt.langData=mu("moment.langData is deprecated. Use moment.localeData instead.",Dh);var Pf=Math.abs;function rqe(){var t=this._data;return this._milliseconds=Pf(this._milliseconds),this._days=Pf(this._days),this._months=Pf(this._months),t.milliseconds=Pf(t.milliseconds),t.seconds=Pf(t.seconds),t.minutes=Pf(t.minutes),t.hours=Pf(t.hours),t.months=Pf(t.months),t.years=Pf(t.years),this}function Dce(t,e,n,r){var i=Cc(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function iqe(t,e){return Dce(this,t,e,1)}function aqe(t,e){return Dce(this,t,e,-1)}function Pq(t){return t<0?Math.floor(t):Math.ceil(t)}function oqe(){var t=this._milliseconds,e=this._days,n=this._months,r=this._data,i,a,o,s,l;return t>=0&&e>=0&&n>=0||t<=0&&e<=0&&n<=0||(t+=Pq(a5(n)+e)*864e5,e=0,n=0),r.milliseconds=t%1e3,i=Kl(t/1e3),r.seconds=i%60,a=Kl(i/60),r.minutes=a%60,o=Kl(a/60),r.hours=o%24,e+=Kl(o/24),l=Kl(Oce(e)),n+=l,e-=Pq(a5(l)),s=Kl(n/12),n%=12,r.days=e,r.months=n,r.years=s,this}function Oce(t){return t*4800/146097}function a5(t){return t*146097/4800}function sqe(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if(t=gu(t),t==="month"||t==="quarter"||t==="year")switch(e=this._days+r/864e5,n=this._months+Oce(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(a5(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return e*24+r/36e5;case"minute":return e*1440+r/6e4;case"second":return e*86400+r/1e3;case"millisecond":return Math.floor(e*864e5)+r;default:throw new Error("Unknown unit "+t)}}function Oh(t){return function(){return this.as(t)}}var Cce=Oh("ms"),lqe=Oh("s"),uqe=Oh("m"),cqe=Oh("h"),dqe=Oh("d"),fqe=Oh("w"),hqe=Oh("M"),pqe=Oh("Q"),mqe=Oh("y"),gqe=Cce;function vqe(){return Cc(this)}function yqe(t){return t=gu(t),this.isValid()?this[t+"s"]():NaN}function sy(t){return function(){return this.isValid()?this._data[t]:NaN}}var bqe=sy("milliseconds"),_qe=sy("seconds"),wqe=sy("minutes"),xqe=sy("hours"),Sqe=sy("days"),Aqe=sy("months"),kqe=sy("years");function Eqe(){return Kl(this.days()/7)}var Hf=Math.round,fb={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Tqe(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function Dqe(t,e,n,r){var i=Cc(t).abs(),a=Hf(i.as("s")),o=Hf(i.as("m")),s=Hf(i.as("h")),l=Hf(i.as("d")),c=Hf(i.as("M")),f=Hf(i.as("w")),h=Hf(i.as("y")),p=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||o<=1&&["m"]||o<n.m&&["mm",o]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return n.w!=null&&(p=p||f<=1&&["w"]||f<n.w&&["ww",f]),p=p||c<=1&&["M"]||c<n.M&&["MM",c]||h<=1&&["y"]||["yy",h],p[2]=e,p[3]=+t>0,p[4]=r,Tqe.apply(null,p)}function Oqe(t){return t===void 0?Hf:typeof t=="function"?(Hf=t,!0):!1}function Cqe(t,e){return fb[t]===void 0?!1:e===void 0?fb[t]:(fb[t]=e,t==="s"&&(fb.ss=e-1),!0)}function Iqe(t,e){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=fb,i,a;return typeof t=="object"&&(e=t,t=!1),typeof t=="boolean"&&(n=t),typeof e=="object"&&(r=Object.assign({},fb,e),e.s!=null&&e.ss==null&&(r.ss=e.s-1)),i=this.localeData(),a=Dqe(this,!n,r,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var VN=Math.abs;function Uy(t){return(t>0)-(t<0)||+t}function nI(){if(!this.isValid())return this.localeData().invalidDate();var t=VN(this._milliseconds)/1e3,e=VN(this._days),n=VN(this._months),r,i,a,o,s=this.asSeconds(),l,c,f,h;return s?(r=Kl(t/60),i=Kl(r/60),t%=60,r%=60,a=Kl(n/12),n%=12,o=t?t.toFixed(3).replace(/\.?0+$/,""):"",l=s<0?"-":"",c=Uy(this._months)!==Uy(s)?"-":"",f=Uy(this._days)!==Uy(s)?"-":"",h=Uy(this._milliseconds)!==Uy(s)?"-":"",l+"P"+(a?c+a+"Y":"")+(n?c+n+"M":"")+(e?f+e+"D":"")+(i||r||t?"T":"")+(i?h+i+"H":"")+(r?h+r+"M":"")+(t?h+o+"S":"")):"P0D"}var Tr=eI.prototype;Tr.isValid=AYe;Tr.abs=rqe;Tr.add=iqe;Tr.subtract=aqe;Tr.as=sqe;Tr.asMilliseconds=Cce;Tr.asSeconds=lqe;Tr.asMinutes=uqe;Tr.asHours=cqe;Tr.asDays=dqe;Tr.asWeeks=fqe;Tr.asMonths=hqe;Tr.asQuarters=pqe;Tr.asYears=mqe;Tr.valueOf=gqe;Tr._bubble=oqe;Tr.clone=vqe;Tr.get=yqe;Tr.milliseconds=bqe;Tr.seconds=_qe;Tr.minutes=wqe;Tr.hours=xqe;Tr.days=Sqe;Tr.weeks=Eqe;Tr.months=Aqe;Tr.years=kqe;Tr.humanize=Iqe;Tr.toISOString=nI;Tr.toString=nI;Tr.toJSON=nI;Tr.locale=vce;Tr.localeData=bce;Tr.toIsoString=mu("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",nI);Tr.lang=yce;In("X",0,0,"unix");In("x",0,0,"valueOf");sn("x",ZC);sn("X",XHe);ii("X",function(t,e,n){n._d=new Date(parseFloat(t)*1e3)});ii("x",function(t,e,n){n._d=new Date(gr(t))});//! moment.js
|
|
208
|
-
Yt.version="2.30.1";MHe(Ri);Yt.fn=Pt;Yt.min=_Ye;Yt.max=wYe;Yt.now=xYe;Yt.utc=Rd;Yt.unix=Z7e;Yt.months=X7e;Yt.isDate=ZA;Yt.locale=Np;Yt.invalid=YC;Yt.duration=Cc;Yt.isMoment=kc;Yt.weekdays=eqe;Yt.parseZone=Q7e;Yt.localeData=Dh;Yt.isDuration=jT;Yt.monthsShort=J7e;Yt.weekdaysMin=nqe;Yt.defineLocale=TW;Yt.updateLocale=Q9e;Yt.locales=X9e;Yt.weekdaysShort=tqe;Yt.normalizeUnits=gu;Yt.relativeTimeRounding=Oqe;Yt.relativeTimeThreshold=Cqe;Yt.calendarFormat=qYe;Yt.prototype=Pt;Yt.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const tm=T_("scene",()=>{const t=re({}),e=s=>{s.forEach(l=>{HC.set(t.value,l.id,l)})},n=re(void 0),r=re(0),i=(s,l)=>{const c=t.value;t.value={...c,[s]:{...t.value[s],...l}},o.value=!0},a=s=>t.value[s],o=re(!1);return{sceneDataMap:t,totalSceneCount:n,privateSceneCount:r,setSceneDataMap:e,updateSceneDataValue:i,getSceneDataValue:a,needRefresh:o}}),Ice=t=>{const{showErrorSnackbar:e,showSuccessSnackbar:n}=jA(),r=(C,F)=>(console.error("handleErrorHeader",C),C.code=="ERR_NETWORK"||navigator.onLine==!1?e({label:"Network error."}):e({label:(F==null?void 0:F.label)??"Update failed."}),{success:!1,data:void 0}),i=C=>{let F=C||"Update failed";navigator.onLine||(F="Network error"),e({label:F})},a=(C,F,W)=>{let H={success:!1,data:C};const j=C;return!j||j!=null&&j.error||j.error==403?(W&&i(),H={success:!1,data:C}):j&&j.error!=403&&(t&&t(F),H={success:!0,data:j}),H.success==!1&&W&&i(),H},o=C=>{const F=Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore";if(!C||!Yt(C).isValid())return null;new Date(C).setMilliseconds(0);const H=Q6(C,F);return String(H)||null},s=async(C,F)=>{try{const W=await xn.updateScene(C,{name:F});return _.value=!0,a(W,C,!0)}catch(W){return console.error("updateScene Name",W),r(W,{label:"Update failed."})}},l=async C=>{try{const F=await xn.updateScene(C,{status:0}),W=a(F,C);return W.success||i("Archive failed."),W}catch(F){return console.error("archiveScene",F),r(F,{label:"Update failed."})}},c=async C=>{try{const F=await xn.deleteScene(C),W=a(F,C);return W.success?n({label:"Deletion successful!"}):e({label:"Deletion failed."}),W}catch(F){return console.error("deleteScene",F),{success:!1,data:F}}},f=async C=>{try{const F=await xn.updateScene(C,{status:1}),W=a(F,C);return W.success||i("Unarchive failed."),W}catch(F){return console.error("unArchiveScene",F),r(F,{label:"Update failed."})}},h=async C=>{try{const F=await xn.updateScene(C,{clear_thumbnail:"1"}),W=a(F,C);return W.success?n({label:"Deletion successful"}):i("Deletion failed."),W}catch(F){return console.error("deleteThumbnail",F,!0),r(F,{label:"Deletion failed."})}},p=async(C,F)=>{var j,N;const W=o((j=F==null?void 0:F.start)==null?void 0:j.dateString),H=o((N=F==null?void 0:F.end)==null?void 0:N.dateString);try{const U=await xn.updateScene(C,{start_date:W,due_date:H});return a(U,C,!0)}catch(U){return console.error("updateDate",U),r(U,{label:"Update failed."})}},g=async C=>{try{const F=await xn.updateScene(C,{due_date:null});return a(F,C,!0)}catch(F){return console.error("clearDueDate",F),r(F,{label:"Update failed."})}},y=async C=>{try{const F=await xn.updateScene(C,{start_date:null});return a(F,C,!0)}catch(F){return console.error("updateDueDate",F),r(F,{label:"Update failed."})}},v=async(C,F)=>{try{const W=await xn.updateScene(C,{template_flow_status_id:F});return a(W,C)}catch(W){return console.error("updateSceneStatus",W),r(W,{label:"Update failed."})}},b=async(C,F)=>{try{const W=await xn.updateAssigneesUsers(C,F);return a(W,C,!0)}catch(W){return console.error("updateSceneAssignees",W),r(W,{label:"Update failed."})}},w=fr(),{basicInfo:S}=Pn(w),T=tm(),{needRefresh:_}=Pn(T);return{handleUpdateSceneName:s,handleArchiveScene:l,handleDeleteScene:c,handleUnArchiveScene:f,handleDeleteThumbnail:h,handleUpdateDate:p,handleClearDueDate:g,handleClearStarDate:y,handleUpdateSceneStatus:v,handleUpdateSceneAssignees:b,handleGetAssignableUsers:async(C,F)=>{try{const W=await xn.getAssignableUsers(C,{page:F.page,per_page:10,display_name_like:F.keyword});return{success:!0,data:{data:W.data.map(j=>({id:j.id,user_id:j.user_id,name:j.display_name,initial:j.initial,bgColor:j.color.bgColor,textColor:j.color.textColor,profile_image:j.profile_image,is_me:j.user_id==S.value.user_id})),meta:W.meta}}}catch(W){return console.error("getAssignableUsers",W),{success:!1,data:W}}},handleGetAssignableStatus:async(C,F)=>{try{const W=await xn.getAssignableStatus(C,F);return{success:!0,data:{data:W.data.filter(N=>N.can_update==1).map(N=>({id:N.id,name:N.name,color:N.color})),meta:W.meta}}}catch(W){return console.error("getAssignableStatus",W),{success:!1,data:W}}},handleGetSceneDetail:async C=>{try{const F={include_entity_path:1,include:"point_metric,ws_creator,template_flow_status,item_user_roles.ws_user_role,assignees"},W=await xn.getSceneDetail(C,F);return a(W,C)}catch(F){return console.error("getSceneDetail",F),{success:!1,data:F}}},handleAssignUser:async(C,F)=>{try{const W=await xn.assignUser(C,F);return a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}},handleReassignUser:async(C,F)=>{try{const W=await xn.updateAssigneesUsers(C,F);return a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}},handleUnassignUser:async(C,F)=>{try{const W=await xn.unAssignUser(C,F);return _.value=!0,a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}}}},Mqe=Qe({__name:"GridItem",props:{sceneId:{type:String,required:!0}},emits:["updateScene","loaded"],setup(t,{expose:e,emit:n}){e();const r=t,i=tm(),{sceneDataMap:a,needRefresh:o}=Pn(i),s=re(0),l=Z(()=>a.value[r.sceneId]),c=re(!1);zt(()=>{S("loaded")}),pee(()=>{S("loaded")});const f=hc("switchInstance"),h=()=>{f("scene_hub",{id:r.sceneId,tab:""},{showLoading:!1})},p=Dd.getCookie("account.last_prefered_timezone"),g=re(null);Ge(()=>r.sceneId,()=>{c.value=!1},{immediate:!0}),Ge(g,()=>{c.value=!0});const y=Z(()=>{let ge=yn();return ge||""}),v=fr(),{permissionMap:b}=Pn(v),w=Z(()=>{const ge=l.value.permission;return{canUpdateName:ge==null?void 0:ge.has_edit_permission,canUpdateThumbnail:ge==null?void 0:ge.has_edit_permission,canArchive:ge==null?void 0:ge.has_archive_permission,canDelete:ge==null?void 0:ge.has_delete_permission,canUpdateAssignees:ge==null?void 0:ge.has_update_assignee_permission,canUpdateStatus:l.value.has_stage>0?ge==null?void 0:ge.has_edit_permission:0,canUpdateDate:ge==null?void 0:ge.has_edit_date_permission,canOpenReview:b.value.redirectPermission.review,canOpenWoohoo:b.value.redirectPermission.woohoo,canOpenProject:b.value.redirectPermission.project,canOpenUpdate:b.value.redirectPermission.update}}),S=n,T=ge=>{o.value=!0,ge&&S("updateScene",ge)},{handleUpdateSceneName:_,handleGetAssignableUsers:E,handleArchiveScene:D,handleDeleteScene:O,handleUnArchiveScene:V,handleDeleteThumbnail:P,handleUpdateDate:M,handleClearDueDate:C,handleClearStarDate:F,handleUpdateSceneStatus:W,handleUpdateSceneAssignees:H,handleGetAssignableStatus:j,handleAssignUser:N,handleReassignUser:U,handleUnassignUser:ee}=Ice(T),{basicInfo:le}=Pn(v),_e=Z(()=>Number(l.value.property.is_archived)),be=Z(()=>Number(l.value.property.is_locked)),Te=Z(()=>{try{const ge=l.value,Ue=ge.assignees.map(Ye=>({id:Ye.id,user_id:Ye.user_id,name:Ye.display_name,initial:Ye.initial,bgColor:Ye==null?void 0:Ye.color.bgColor,textColor:Ye==null?void 0:Ye.color.textColor,profile_image:Ye.profile_image,is_me:Ye.user_id==le.value.user_id}));return{...ge,status:ge.template_flow_status,assignees:Ue,is_archived:_e.value,is_locked:be.value,bulk_process:ge.bulk_process}}catch(ge){return console.error(ge),l.value}});Ge(()=>Te.value,()=>s.value++,{deep:!0});const J=async ge=>{const Ue=r.sceneId;return await M(Ue,ge)},{getEnvVariable:me}=Al(),Ee=Z(()=>{const ge=l.value,Ue=Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore",ce={ws_code:y.value,scene_id:ge.id,entity_id:ge.entity_id,baseUrl:me("BASE_URL")||"https://app.dev.arbocollab.com",reviewUrl:me("BASE_REVIEW_URL")||"https://review.dev.arbocollab.com"},Ye={thumbnailKey:"thumbnail",breadcrumbKey:"entity_path",titleKey:"name",startDateKey:"start_date",dueDateKey:"due_date",isStartedKey:"is_started",isCompletedKey:"is_completed",archivedKey:"is_archived",lockedKey:"is_locked",assigneesKey:"assignees",statusKey:"status",bulkUpdateKey:"bulk_process"},te=ge.id;return{notifyError:(...ae)=>{console.error(...ae)},updateFuncs:{updateDate:async ae=>await J(ae),updateName:async ae=>await _(te,ae),updateStatus:async ae=>await W(te,ae.id),getAssignees:async ae=>await E(te,ae),getStatus:async ae=>await j(te,ae),clearDueDate:async()=>await C(te),clearStartDate:async()=>await F(te),updateAssignees:async ae=>await H(te,ae),archiveScene:async()=>await D(te),deleteScene:async()=>await O(te),unarchiveScene:async()=>await V(te),deleteThumbnail:async()=>await P(te),assignUser:async ae=>await N(te,ae),unassignUser:async ae=>await ee(te,ae),reassignUser:async ae=>await U(te,ae)},active:!1,keys:Ye,readonly:!1,disabled:!1,timezone:Ue,sceneConfiguration:ce,data:{...Te.value},permissions:w.value}});Ge([l,_e,be],()=>{s.value=s.value+1});const Ce=re(!1),de=Uae(g);Ge(de,HC.debounce(()=>{Ce.value=!de.value},300));const G={props:r,sceneStore:i,sceneDataMap:a,needRefresh:o,renderKey:s,sceneDataMapComputed:l,ready:c,switchInstance:f,handleOpenSceneHub:h,timezones:p,cardRef:g,wsCode:y,store:v,permissionMap:b,mappingPermission:w,emits:S,callbackUpdateScene:T,handleUpdateSceneName:_,handleGetAssignableUsers:E,handleArchiveScene:D,handleDeleteScene:O,handleUnArchiveScene:V,handleDeleteThumbnail:P,handleUpdateDate:M,handleClearDueDate:C,handleClearStarDate:F,handleUpdateSceneStatus:W,handleUpdateSceneAssignees:H,handleGetAssignableStatus:j,handleAssignUser:N,handleReassignUser:U,handleUnassignUser:ee,basicInfo:le,isArchived:_e,isLocked:be,sceneDataComputed:Te,_handleUpdateDate:J,getEnvVariable:me,tessCardProps:Ee,showLoading:Ce,targetIsVisible:de,get TessSceneCard(){return xae},GirdItemSkeleton:Vue};return Object.defineProperty(G,"__isScriptSetup",{enumerable:!1,value:!0}),G}}),Rqe=["id"];function $qe(t,e,n,r,i,a){return R(),Y("div",{id:r.props.sceneId,class:"grid-item-wrapper"},[It(he(r.GirdItemSkeleton,{class:"pi-skeleton"},null,512),[[Ln,r.showLoading]]),(R(),Re(r.TessSceneCard,Ft({key:r.renderKey,ref:"cardRef"},{...r.tessCardProps},{timezone:r.timezones,style:{opacity:r.showLoading?0:1},onOnOpenSceneHub:r.handleOpenSceneHub}),null,16,["timezone","style"]))],8,Rqe)}const Pqe=Nn(Mqe,[["render",$qe],["__scopeId","data-v-0da73336"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/GridItem.vue"]]),Lqe=1,Nqe=t=>{const{handleGetSceneDetail:e}=Ice(void 0),n=async(b,w)=>{try{const S=await e(b);S.success&&S.data&&(l.value[w]=S.data,f.updateSceneDataValue(b,S.data))}catch(S){console.error(S)}},r=Z(()=>Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore"),i={perPage:10,itemsPerRow:1,totalItems:0,totalPages:1,currentPage:1,loading:!1},a=Ht(i);async function o(){l.value=[],Object.entries(i).forEach(([b,w])=>{a[b]=w}),await s(Lqe)}const s=async(b=1)=>{var D,O;if(a.loading)return;a.loading=!0,a.currentPage=b;const w={...t.value.filterParameter,page:b},S=await t.value.getDataFunction(w),{meta:T,data:_,private_item_count:E}=S;return y(T),g(_),(O=(D=t.value).callbackGetData)==null||O.call(D,T),p.value=E||0,_},l=re([]),c=async()=>{a.isLoadScene=!0,await o(),a.loadedPage=!1},f=tm(),{totalSceneCount:h,privateSceneCount:p}=Pn(f),g=b=>{f.setSceneDataMap(b),b&&(b==null?void 0:b.length)===0?l.value=[]:l.value=[...l.value,...b]},y=b=>{a.totalItems=b.total,a.totalPages=b.last_page,a.currentPage=b.current_page,h.value=b.total,a.loadedPage=!0,a.loading=!1};return{states:a,listData:l,callbackUpdatingMeta:y,callbackUpdateData:g,resetList:c,initList:o,handleUpdateScene:n,loadNextPage:async()=>{a.currentPage<a.totalPages&&await s(a.currentPage+1)},fetchMoreData:s,preferredTimezone:r}},Fqe=Qe({__name:"SceneList",props:{getDataFunction:{type:Function,required:!0},filterParameter:{type:Object,required:!0},callbackUpdateMeta:{type:Function,required:!1},callbackGetData:{type:Function,required:!1},ready:{type:Boolean,required:!0},height:{type:Number,required:!1}},emits:["loaded","metaUpdate","update","needUpdate"],setup(t,{expose:e,emit:n}){const r=n,i=t,a=pu(),o=E=>!!a[E],s=re({}),l=Z(()=>({getDataFunction:i.getDataFunction,filterParameter:i.filterParameter,callbackUpdateMeta:E=>{r("metaUpdate",E),r("loaded")},callbackGetData:E=>{r("loaded",E)}})),{states:c,listData:f,handleUpdateScene:h,loadNextPage:p,resetList:g,initList:y}=Nqe(l),v=(E,D)=>{h(E,D),r("update")};zt(()=>{y()});const b=re(Math.random());Ge(()=>i.filterParameter,async(E,D)=>{i.ready&&JSON.stringify(E)!==JSON.stringify(D)&&await g()},{deep:!0}),e({resetList:g});const w=async()=>{const E=await i.getDataFunction(i.filterParameter,ny);return{signature:E==null?void 0:E.meta["X-Tsr-signature"]}},S=re(""),{needUpdate:T}=ay("",w,S);Ge(T,E=>{E&&r("needUpdate")},{immediate:!0});const _={emits:r,props:i,slots:a,hasSlot:o,mapRender:s,useSceneListProps:l,states:c,listData:f,handleUpdateScene:h,loadNextPage:p,resetList:g,initList:y,_handleUpdateSceneData:v,renderKey:b,getUpdateSignature:w,iniSignature:S,needUpdate:T,get RecycleScroller(){return bC},InfoVisual:Oc,GridItemSkeleton:Vue,GridItem:Pqe};return Object.defineProperty(_,"__isScriptSetup",{enumerable:!1,value:!0}),_}}),Vqe={key:0,class:"empty-list"},Bqe={class:"scene-item"},Uqe={style:{display:"flex","flex-direction":"column",gap:"8px"}};function Wqe(t,e,n,r,i,a){return r.props.ready?(R(),Y("div",{key:r.renderKey,class:Fe(["scene-list-component",{"no-footer":!r.hasSlot("footer"),empty:!r.states.loading&&r.listData.length===0}]),style:_t({"--list-height":`${r.props.height}px`})},[!r.states.loading&&r.listData.length===0?(R(),Y("div",Vqe,[ke(t.$slots,"empty",{listData:r.listData,loadedPage:r.states.loadedPage},()=>[!r.listData.length&&r.states.loadedPage?(R(),Re(r.InfoVisual,{key:0,"visual-name":"NoData2",label:"No results. Try another search.",height:180})):pe("v-if",!0)],!0)])):pe("v-if",!0),he(r.RecycleScroller,{class:"scroller",items:r.listData,"item-size":116,"key-field":"id",style:_t({height:r.props.height+"px"}),buffer:500,onScrollEnd:r.loadNextPage},ji({default:ze(({item:o,index:s})=>[X("div",Bqe,[he(r.GridItem,{id:o.id,"scene-id":o.id,"item-data":o,onLoaded:l=>r.mapRender[o.id]=!0,onUpdateScene:l=>r._handleUpdateSceneData(l,s)},null,8,["id","scene-id","item-data","onLoaded","onUpdateScene"])])]),_:2},[r.states.loading?{name:"after",fn:ze(()=>[X("div",Uqe,[(R(),Y(wt,null,Qt(5,o=>he(r.GridItemSkeleton,{key:o})),64))])]),key:"0"}:void 0]),1032,["items","style","onScrollEnd"])],6)):pe("v-if",!0)}const LW=Nn(Fqe,[["render",Wqe],["__scopeId","data-v-fd835b02"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SceneList.vue"]]),Lq=400,zqe=Qe({__name:"SectionRecentAccess",setup(t,{expose:e}){const n=VC(),r=async T=>{var D;const _=await n.getRecentActivities("recent_activities.accessed_scenes",{...T,per_page:10}),E=_.recent_activities.accessed_scenes;return!T.after_id&&!T.before_id&&(w.value=(D=_.recent_activities.accessed_scenes)==null?void 0:D.meta["X-Tsr-signature"]),E.data=E.data.map(O=>({...O.item})),E},i={},a=re(null),o=()=>{var T;(T=a.value)==null||T.resetList()};e({resetList:o});const s=re(null),{height:l}=hh(s),c=re(!1),f=fr(),{basicInfo:h}=Pn(f);Ge(h,()=>{h.value.id&&(c.value=!0)},{deep:!0,immediate:!0});const p=Z(()=>l.value||Lq),g=ks(),{refreshState:y}=Pn(g),v=()=>{y.value.scene=!0},b=async()=>{var _,E;const T=await n.getRecentActivities("recent_activities.accessed_scenes",ny);return{signature:(E=(_=T==null?void 0:T.recent_activities)==null?void 0:_.accessed_scenes)==null?void 0:E.meta["X-Tsr-signature"]}},w=re("");ay("scene",b,w);const S={peopleCard:n,getRecentAccessScenes:r,filterParameter:i,listRef:a,resetList:o,INITIAL_HEIGHT:Lq,recentlyAccessSceneRef:s,height:l,ready:c,store:f,basicInfo:h,listHeight:p,dashboardStore:g,refreshState:y,handleUpdateScene:v,getUpdateSignature:b,iniSignature:w,InfoVisual:Oc,SceneList:LW};return Object.defineProperty(S,"__isScriptSetup",{enumerable:!1,value:!0}),S}}),jqe={ref:"recentlyAccessSceneRef",class:"recently-access-scene"};function Hqe(t,e,n,r,i,a){return R(),Y("div",jqe,[he(r.SceneList,{ref:"listRef","get-data-function":r.getRecentAccessScenes,"filter-parameter":r.filterParameter,ready:r.ready,class:"no-footer",height:r.listHeight,onUpdate:r.handleUpdateScene},{empty:ze(()=>[he(r.InfoVisual,{"visual-name":"NoData",label:"No activity available.",height:150,width:400})]),_:1},8,["ready","height"])],512)}const Nq=Nn(zqe,[["render",Hqe],["__scopeId","data-v-630eed87"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionRecentAccess.vue"]]),Yqe=({comment_id:t,scene_id:e,callbackUpdate:n,commentData:r,userId:i})=>{const{showErrorSnackbar:a,showSuccessSnackbar:o}=jA(),s=e,l=t,c=async()=>[],f=(D,O)=>(console.error("Error in comment API > useCommentTile:",D),navigator.onLine===!1||D.code=="ERR_NETWORK"?a({label:"Network error."}):a({label:(O==null?void 0:O.label)??"Update failed."}),{success:!1,data:void 0}),h=async D=>{const O={success:!1,data:void 0};try{const V=await xn.assignUserApi(s,l,D);if(V)O.success=!0,O.data=V.data;else throw new Error("reassignUser failed")}catch(V){return f(V)}finally{n()}return O},p=async D=>{let O={success:!1,data:void 0};try{const{page:V,keyword:P}=D,M=await xn.getCommentAssignableUser(s,l,V,P);if(M)O={success:!0,data:{data:M.data.map(C=>({id:C.id,name:C.display_name,profile_image:C.profile_image,shortLabel:C.initial,bgColor:C.color.bgColor,textColor:C.color.textColor})),meta:M.meta}};else throw new Error("Error")}catch(V){return console.error("getAssignableUser",V),O={success:!1,data:void 0},O}return O},g=async D=>{const O={success:!1,data:void 0};try{const V=await xn.assignUserApi(s,l,D[0]);V&&(O.success=!0,O.data=V.data)}catch(V){return f(V)}finally{n()}return O},y=async()=>{const D={success:!1,data:void 0};try{const O=await xn.assignUserApi(s,l,null);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}return D},v=async()=>{const D={success:!1,data:void 0};try{const O=await xn.resolveCommentApi(s,l);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}finally{n()}return D},b=async()=>{const D={success:!1,data:void 0};try{const O=await xn.deleteCommentApi(s,l);if(O)D.success=!0,D.data=O.data,o({label:"Deletion successful."});else throw new Error("Error")}catch(O){f(O,{label:"Deletion failed."})}return D},w=async()=>{const D={success:!1,data:void 0};try{const O=await xn.unResolveCommentApi(s,l);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}finally{n()}return D},S=async D=>{const O={success:!1,data:void 0};try{const{id:V,type:P,reactionType:M}=D;if(P!=="add"||!M)throw new Error("reactionType is required");const C=await xn.reactToComment({scene_id:s,comment_id:V,reaction:M});C&&(O.success=!0,O.data=C.data)}catch(V){return f(V)}finally{n()}return O},T=async D=>{const O=_(),V={success:!1,data:void 0};try{const{id:P,type:M,reactionType:C}=D;if(M!=="replace"||!C||!O)throw new Error("reactionType is required");const F=await xn.updateReactToComment({scene_id:s,comment_id:P,reaction:C,reaction_id:O});F&&(V.success=!0,V.data=F.data)}catch(P){return f(P)}finally{n()}return V},_=()=>{var D,O;return(O=(D=r.emoji_users)==null?void 0:D.find(V=>V.user_id===i))==null?void 0:O.emoji_id};return{reactToComment:S,updateReactComment:T,getMentionableUser:c,deleteReactComment:async()=>{const D=_(),O={success:!1,data:void 0};try{if(!D)throw new Error("emojiId is required");const V=await xn.deleteReactToComment(D);V&&(O.success=!0,O.data=V.data)}catch(V){return f(V)}finally{n()}return O},getAssignableUser:p,assignUser:g,resolveComment:v,deleteComment:b,unResolveComment:w,unassignUser:y,reassignUser:h}},qqe=Qe({__name:"CommentItem",props:{item:{type:Object,required:!0},commentId:{type:String,required:!0},width:{type:Number,required:!1,default:400},renderKey:{type:Number,required:!0}},emits:["commentDeleted","updateComment"],setup(t,{expose:e,emit:n}){e();const r=t,i=fr();uC();const{userInfo:a}=Pn(i),{getEnvVariable:o}=Al(),s=W=>{var j;return{items:((j=W==null?void 0:W.entity_path)==null?void 0:j.map(N=>{const U=Qi({type:N.is_parent_item?"scene_hub":"project",config:{baseDomain:o("BASE_URL"),ws_code:yn(),entity_id:N.id,scene_id:N.is_parent_item?N.id:void 0}}).url;return{name:N.name,url:U,disabled:!0,id:N.id,isHighlight:N.is_parent_item=!0}}))||[],lastItemWidth:200,canCopy:!1,url:""}},l=async({path:W})=>{if(W.length===0)return{message:"",url:""};const H=await xn.downloadFileFromS3({scene_id:yn(),path:W});return H?{url:H.url,message:H.message}:{url:"",message:""}},c=async()=>{const W=r.item.id,H=await xn.getCommentDetail({comment_id:W,scene_id:r.item.item_id});D("updateComment",H)},f=Yqe({comment_id:r.item.id,scene_id:r.item.item_id,callbackUpdate:c,commentData:r.item,userId:a.value.id}),{assignUser:h,getAssignableUser:p,resolveComment:g,deleteComment:y,unResolveComment:v,reactToComment:b,updateReactComment:w,deleteReactComment:S,unassignUser:T,getMentionableUser:_,reassignUser:E}=f,D=n,O=Z(()=>{const W=r.item;return{disabled:!1,readonly:!1,isReplying:!1,selected:!1,searchText:void 0,isResolvedList:!0,currentUser:{id:a.value.id,name:a.value.display_name},commentConfig:{renditionId:W.item_rendition_id||void 0,sceneId:W==null?void 0:W.item_id,entityId:W==null?void 0:W.item_id,wsCode:yn(),commentId:W.id},componentConfig:{isReviewComment:!!W.item_rendition_id,isMyComment:W.ws_creator.user_id==a.value.id,onSceneHub:!1},commentPermission:{canEdit:!1,canDelete:!0,canAssign:!0,canOpenSceneHub:!0,canResolve:!0,canOpenReview:!0},apiFunctions:{assignUser:h,unassignUser:T,reassignUser:E,addReaction:async H=>await b(H),removeReaction:S,replaceReaction:H=>{var N,U;const j=((U=(N=r.item.emoji_users)==null?void 0:N.find(ee=>ee.user_id==a.value.id))==null?void 0:U.emoji_id)||"";return w({...H,emojiId:j})},resolveComment:g,unResolveComment:v,deleteComment:async()=>{const H=await y();return H?(D("commentDeleted",r.item.id),H):{success:!1,data:void 0}},updateComment:()=>new Promise((H,j)=>{setTimeout(()=>{j({success:!1,data:{message:"Error"}})},1500)}),uploadFunction:void 0,getResourceURL:l,getAssignableUser:p,getMentionableUser:_},commentData:{...W}}}),V=hc("switchInstance"),P=Z(()=>{var H,j,N,U,ee,le,_e;const W=((H=r.item)==null?void 0:H.entity_path)||[];return{project:(j=W[0])==null?void 0:j.id,process:(N=W[1])==null?void 0:N.id,episode:(U=W[2])==null?void 0:U.id,take:(ee=W[3])==null?void 0:ee.id,scene:((le=W[4])==null?void 0:le.id)||r.item.item_id,rendition:((_e=W[5])==null?void 0:_e.id)||r.item.item_rendition_id,comment:r.item.id}}),M=(W,H)=>{const{scene:j,rendition:N,comment:U}=P.value;if(r.item.item_rendition_id){const ee=Qi({type:"review_rendition_comment",config:{reviewDomain:o("BASE_REVIEW_URL"),ws_code:yn(),scene_id:j,comment_id:U,rendition_id:N||""}});window.open(ee.url,"_blank")}else{const ee=Qi({type:"hub_comment",config:{baseDomain:o("BASE_URL"),ws_code:yn(),scene_id:j,comment_id:U}});H.ctrlKey||H.metaKey?window.open(ee.url,"_blank"):V?V("scene_hub",{sceneId:j,commentId:U},{showLoading:!1}):window.location.href=ee.url}},F={props:r,store:i,userInfo:a,getEnvVariable:o,createBreadCrumbProp:s,fetchResourceUrl:l,updateCommentTile:c,sceneTileComposable:f,assignUser:h,getAssignableUser:p,resolveComment:g,deleteComment:y,unResolveComment:v,reactToComment:b,updateReactComment:w,deleteReactComment:S,unassignUser:T,getMentionableUser:_,reassignUser:E,emits:D,commentTileProps:O,switchInstance:V,commentEntityConfig:P,handleOnReply:M,handleRedirectToComment:(W,H)=>{M(W,H)},get TessCommentTileCore(){return Tae},get TessBreadcrumb(){return vC}};return Object.defineProperty(F,"__isScriptSetup",{enumerable:!1,value:!0}),F}}),Kqe={class:"breadcrumb"};function Gqe(t,e,n,r,i,a){return R(),Re(r.TessCommentTileCore,Ft(r.commentTileProps,{class:"comment-tile-item",style:{"--comment-tile-width":"100%"},onOnReply:r.handleOnReply,onRedirectToComment:r.handleRedirectToComment}),{breadcrumb:ze(()=>[X("div",Kqe,[he(r.TessBreadcrumb,Ft({...r.createBreadCrumbProp(n.item)},{"can-copy":!1,"number-of-visible-items":3}),null,16)])]),_:1},16)}const Zqe=Nn(qqe,[["render",Gqe],["__scopeId","data-v-a67ebcfc"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentItem.vue"]]),Qqe=Qe({__name:"CommentSkeleton",setup(t,{expose:e}){e();const r={getRandomWidth:()=>Math.floor(Math.random()*71)+30};return Object.defineProperty(r,"__isScriptSetup",{enumerable:!1,value:!0}),r}}),Xqe={class:"skeleton-comment"},Jqe={class:"comment-body"},eKe={class:"body"},tKe={class:"skeleton-details"};function nKe(t,e,n,r,i,a){return R(),Y("div",Xqe,[e[2]||(e[2]=X("div",{class:"skeleton-row bg-white",style:{height:"24px",display:"flex","justify-content":"flex-start","align-items":"center",padding:"8px"}},[X("div",{class:"skeleton-line w-50 animation-skeleton small dark"})],-1)),X("div",Jqe,[e[0]||(e[0]=Vv('<div class="skeleton-row" data-v-b9ff2b95><div class="header w-50" data-v-b9ff2b95><div class="skeleton-avatar animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-details" data-v-b9ff2b95><div class="skeleton-line animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-line animation-skeleton small dark" data-v-b9ff2b95></div></div></div><div class="button-group" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div></div></div>',1)),X("div",eKe,[X("div",tKe,[(R(!0),Y(wt,null,Qt(Math.floor(Math.random()*5)+1,o=>(R(),Y("div",{key:o,class:"skeleton-line animation-skeleton small dark",style:_t({width:`${r.getRandomWidth()}%`})},null,4))),128))])]),e[1]||(e[1]=Vv('<div class="footer" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div></div><div class="footer" data-v-b9ff2b95><div class="button-group" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div></div><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div></div>',2))])])}const rKe=Nn(Qqe,[["render",nKe],["__scopeId","data-v-b9ff2b95"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentSkeleton.vue"]]),Jg=new TS("CommentFile");Jg.version(1).stores({files:"++id, files "});const iKe=()=>{const t=async a=>{await Jg.files.where("id").equals(a.id).first()?await Jg.files.update(a.id,a):await Jg.files.add(a)};return{setCommentFile:t,updateCommentFile:async(a,o)=>{try{await Jg.files.update(a,o)}catch(s){console.error("Error updating comment file",s)}},removeCommentFile:async a=>{try{await Jg.files.where("id").equals(a).delete()}catch(o){console.error("Error removing comment file",o)}},storeCommentFile:(a,o)=>{o.forEach(s=>{t({id:a.id+"_"+s.name,path:s.path,thumbnail:s.thumbnail,url:s.path,type:s.mimetype})})},getCommentFile:async a=>{try{const o=await Jg.files.where("id").equals(a).delete();return console.log("getComment File ",o),o}catch(o){console.error("Error removing comment file",o)}}}},aKe=T_("comment",()=>{const t=re({});return{commentMap:t,updateCommentData:(i,a)=>{t.value[i]={...t.value[i],...a}},setComments:i=>{const a={};i.forEach(o=>{a[o.id]=o}),t.value={...t.value,...a}},getCommentById:i=>t.value[i]}}),oKe=Qe({__name:"CommentList",props:{getData:{type:Function,required:!0},filterParameters:{type:Object,required:!1},loadMore:{type:Boolean,required:!1}},emits:["listDataChange","update","loaded"],setup(t,{expose:e,emit:n}){const r=t,i=re(!0),a=async()=>{var O;p.value=[],i.value=!0;const _=await r.getData({}),E=_.data;f(E,!0),i.value=!1;const D=(O=_.meta)==null?void 0:O.total;b("loaded",D)},o=aKe(),s=re(""),l=re(!0),c=re({}),f=(_,E)=>{if(_.length==0){l.value=!1;return}if(o.setComments(_),_.forEach(D=>{c.value[D.id]=(c.value[D.id]||0)+1,h(D,D.attachments),D.parent&&h(D.parent,D.parent.attachments)}),E){p.value=_,s.value=_[_.length-1].id;return}p.value=[...p.value,..._],s.value=p.value[p.value.length-1].id},{storeCommentFile:h}=iKe(),p=re([]),g=re(null);Wae(g,async()=>{var O;const _=s.value;if(i.value||!l.value)return;i.value=!0;const E=await r.getData({before_id:_}),D=E.data;f(D),i.value=!1,b("loaded",(O=E.meta)==null?void 0:O.total)},{canLoadMore:()=>!i.value&&r.loadMore&&l.value,distance:10});const y=re(!1),v=async()=>{var E;i.value=!0;const _=await r.getData({});f(_.data),y.value=!0,i.value=!1,b("loaded",(E=_==null?void 0:_.meta)==null?void 0:E.total)};zt(async()=>{await v()});const b=n,w=_=>{const E=p.value.findIndex(D=>D.id==_);p.value.splice(E,1),b("listDataChange"),b("update")},S=_=>{const E=p.value.findIndex(D=>D.id==_.id);p.value[E]={...p.value[E],..._},b("update")};e({resetList:a});const T={props:r,loading:i,resetList:a,commentStore:o,lastId:s,canLoadMore:l,renderKey:c,handleDataInsertion:f,storeCommentFile:h,list:p,commentListRef:g,ready:y,init:v,emits:b,deleteComment:w,handleUpdateCommentData:S,CommentItem:Zqe,InfoVisual:Oc,CommentSkeleton:rKe};return Object.defineProperty(T,"__isScriptSetup",{enumerable:!1,value:!0}),T}}),sKe={ref:"commentListRef",class:"recent-comment"},lKe={class:"empty-data"};function uKe(t,e,n,r,i,a){return R(),Y("div",sKe,[r.list.length==0&&!r.loading?ke(t.$slots,"empty",{key:0},()=>[X("div",lKe,[he(r.InfoVisual,{"visual-name":"NoData",label:"No activity available.",height:150})])],!0):pe("v-if",!0),e[0]||(e[0]=Cn()),r.list.length!==0?(R(!0),Y(wt,{key:1},Qt(r.list,o=>(R(),Re(r.CommentItem,{key:`comment_${o.id}_${r.renderKey[o.id]}`,"render-key":r.renderKey[o.id],"comment-id":o.id,item:o,onCommentDeleted:r.deleteComment,onUpdateComment:r.handleUpdateCommentData},null,8,["render-key","comment-id","item"]))),128)):pe("v-if",!0),e[1]||(e[1]=Cn()),r.loading?(R(),Y(wt,{key:2},Qt(3,o=>X("div",{key:o},[he(r.CommentSkeleton)])),64)):pe("v-if",!0)],512)}const rI=Nn(oKe,[["render",uKe],["__scopeId","data-v-bafec57c"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentList.vue"]]),cKe=Qe({__name:"SectionRecentComment",setup(t,{expose:e}){const n=VC(),r=f=>({...f}),i=async f=>{var p,g,y,v,b;const h=await n.getRecentActivities("comments.latest",f);return!f.after_id&&!f.before_id&&(l.value=(g=(p=h==null?void 0:h.comments)==null?void 0:p.latest)==null?void 0:g.meta["X-Tsr-signature"]),{...(y=h==null?void 0:h.comments)==null?void 0:y.latest,data:((b=(v=h==null?void 0:h.comments)==null?void 0:v.latest)==null?void 0:b.data.map(r))||[]}},a=re(null),o=async()=>{var f;(f=a.value)==null||f.resetList()},s=async()=>{var h,p;const f=await n.getRecentActivities("comments.latest",ny);return{signature:(p=(h=f==null?void 0:f.comments)==null?void 0:h.latest)==null?void 0:p.meta["X-Tsr-signature"]}},l=re("");ay("comment_recent",s,l),e({resetList:o});const c={peopleCard:n,convertCommentData:r,getData:i,listRef:a,resetList:o,getUpdateSignature:s,iniSignature:l,CommentList:rI};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function dKe(t,e,n,r,i,a){return R(),Re(r.CommentList,{ref:"listRef","get-data":r.getData,"load-more":!0},null,512)}const BN=Nn(cKe,[["render",dKe],["__scopeId","data-v-d2c94fc0"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionRecentComment.vue"]]),fKe=Qe({__name:"SectionResolvedComment",setup(t,{expose:e}){const n=VC(),r=async p=>{var y,v,b,w,S;const g=await n.getRecentActivities("comments.recently_resolved",p);return!(p!=null&&p.before_id)&&!(p!=null&&p.after_id)&&(f.value=(v=(y=g==null?void 0:g.comments)==null?void 0:y.recently_resolved)==null?void 0:v.meta["X-Tsr-signature"]),{...(b=g==null?void 0:g.comments)==null?void 0:b.recently_resolved,data:((S=(w=g==null?void 0:g.comments)==null?void 0:w.recently_resolved)==null?void 0:S.data)||[]}},i=re(null),a=async()=>{var p;(p=i.value)==null||p.resetList()},o=ks(),{refreshState:s}=Pn(o),l=()=>{s.value.comment_resolved=!0};e({resetList:a});const c=async()=>{var g,y;const p=await n.getRecentActivities("comments.recently_resolved",ny);return{signature:(y=(g=p==null?void 0:p.comments)==null?void 0:g.recently_resolved)==null?void 0:y.meta["X-Tsr-signature"]}},f=re("");ay("comment_resolved",c,f);const h={peopleCard:n,getData:r,listRef:i,resetList:a,dashboardStore:o,refreshState:s,informListChange:l,getUpdateSignature:c,iniSignature:f,CommentList:rI};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}});function hKe(t,e,n,r,i,a){return R(),Re(r.CommentList,{ref:"listRef","get-data":r.getData,"load-more":!0,onListDataChange:r.informListChange},null,512)}const pKe=Nn(fKe,[["render",hKe],["__scopeId","data-v-f0047820"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionResolvedComment.vue"]]),mKe=Qe({__name:"DashboardTabSection",props:{tabs:{type:Array,required:!0}},setup(t,{expose:e}){e();const n={comment_recent:BN,comment_resolved:pKe,rendition:EHe,scene:Nq,people_comment:BN,chart:BN,assigned_scene:Nq},r=t,i=re(r.tabs[0].id);Ks(()=>{i.value=r.tabs[0].id});const a=S=>{i.value=S};Ge(i,(S,T)=>{y.value[S]=!1,y.value[T]=!1});const o=re({comment_recent:null,comment_resolved:null,rendition:null,scene:null,people_comment:null,chart:null,assigned_scene:null}),s=()=>{var T;const S=i.value;S&&y.value[S]!=null&&(y.value[S]=!1,(T=o.value[S])==null||T.resetList())},l=(S,T)=>{o.value[T]=S},c=Z(()=>r.tabs.map(S=>({...S,id:S.id}))),f=fr(),{basicInfo:h}=Pn(f),p=Z(()=>h.value.id);Ge(p,(S,T)=>{S&&S!==T&&Object.keys(o.value).forEach(_=>{var E;(E=o.value[_])==null||E.resetList()})});const g=ks(),{refreshState:y}=Pn(g),v=Z(()=>{const S=i.value;return y.value[S]}),b=Z(()=>{const S=v.value?"Refresh":"",T=v.value?"Change detected. Refresh now.":"Refresh";return{prefixIcon:"ArrowRotate",label:S,size:"small",type:"secondary",prefixTooltip:T,onClick:s}}),w={components:n,props:r,currentTab:i,changeTab:a,componentRef:o,handleRefreshPage:s,handleRefUpdate:l,computedTabs:c,store:f,basicInfo:h,userId:p,dashboardStore:g,refreshState:y,needRefresh:v,refreshBtnArgs:b,get ArboButton(){return Nt},get ArboTabs(){return hC}};return Object.defineProperty(w,"__isScriptSetup",{enumerable:!1,value:!0}),w}}),gKe={class:"tab-sections"},vKe={class:"tab"},yKe={class:"refresh-btn"};function bKe(t,e,n,r,i,a){return R(),Y("div",gKe,[X("div",vKe,[he(r.ArboTabs,{"key-value":"id",tabs:r.computedTabs,value:r.currentTab,class:"arbo-tabs",onInput:r.changeTab},ji({_:2},[Qt(r.computedTabs,o=>({name:`${o.id}`,fn:ze(()=>[o.id==r.currentTab?(R(),Re(wd(r.components[o.id]),{key:0,ref:s=>r.handleRefUpdate(s,o.id)},null,512)):pe("v-if",!0)])}))]),1032,["tabs","value"]),X("div",yKe,[he(r.ArboButton,Ft({...r.refreshBtnArgs},{onClick:r.handleRefreshPage}),null,16)])])])}const _Ke=Nn(mKe,[["render",bKe],["__scopeId","data-v-0ede6907"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/DashboardTabSection.vue"]]),wKe=Qe({__name:"ResizeLayout",props:{minWidthRight:{type:Number,required:!1,default:730},minWidthLeft:{type:Number,required:!1,default:400},layoutName:{type:String,required:!0},mode:{type:String,required:!1,default:"horizontal"},breakPoint:{type:Number,required:!1,default:1024},minHeight:{type:Number,required:!1,default:500},requireHeight:{type:Number,required:!1,default:500},requireRightMargin:{type:Number,required:!1,default:0}},emits:["resized"],setup(t,{expose:e,emit:n}){var H;const r=re(null),i=re(null),a=re(null),o=re(null),s=re(!1),l=t,{height:c}=zae(),f=n,h=Z(()=>l.minWidthRight||730),p=Z(()=>l.minWidthLeft||400),g=Z(()=>y.value<Loe||c.value<700),{width:y}=hh(r),{width:v,height:b}=hh(i),w=Z(()=>v.value),S=Z(()=>b.value),{width:T}=hh(a),_=re(!1),E=re(((H=r.value)==null?void 0:H.offsetWidth)||0),D=()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.classList.add("active"),_.value=!0,E.value=N.offsetWidth)},O=()=>{const j=o.value;!j||!_.value||(_.value=!1,j.classList.remove("active"),fn(()=>{var N,U;f("resized",[(N=i.value)==null?void 0:N.offsetWidth,(U=i.value)==null?void 0:U.offsetWidth]),M()}))},V=j=>{const N=o.value,U=r.value,ee=i.value,le=a.value;if(!(!N||!ee||!le||!U)&&_.value){const _e=U.getBoundingClientRect(),be=j.clientX,Te=_e.left,J=(be-Te)/_e.width;if((1-J)*_e.width<h.value||J*_e.width<p.value)return;const me=_e.width,Ee=J*me-5,Ce=(1-J)*me-5;ee.style.width=`${Ee}px`,le.style.width=`${Ce}px`}},P=()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.addEventListener("mousedown",D),document.addEventListener("mousemove",V),document.addEventListener("mouseup",O))},M=()=>{const j=JSON.stringify({left:v.value,right:T.value});localStorage.setItem("layout_"+l.layoutName,j)},C=()=>{try{const j=localStorage.getItem("layout_"+l.layoutName);if(j){const{left:N,right:U}=JSON.parse(j);i.value&&a.value&&(i.value.style.width=`${N}px`,a.value.style.width=`${U}px`)}}catch(j){console.error("getSavedLayout",j,i.value,a.value)}},F=()=>{_.value&&O()};zt(()=>{P(),fn(()=>{var j,N,U,ee;C(),f("resized",[(j=i.value)==null?void 0:j.offsetWidth,(N=a.value)==null?void 0:N.offsetWidth]),f("resized",[(U=i.value)==null?void 0:U.offsetWidth,(ee=a.value)==null?void 0:ee.offsetWidth]),s.value=!0}),document.addEventListener("resize",F)}),Gs(()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.removeEventListener("mousedown",D),document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",O))}),e({leftPanelRef:i,rightPanelRef:a,leftPanelWidth:v,rightPanelWidth:T});const W={resizingPanelRef:r,leftPanelRef:i,rightPanelRef:a,resizeBar:o,ready:s,props:l,windowHeight:c,emits:f,minWidthRight:h,minWidthLeft:p,isColumnLayout:g,containerWidth:y,leftPanelWidth:v,leftPanelHeight:b,leftWidth:w,leftHeight:S,rightPanelWidth:T,isDragging:_,initialWidth:E,initResize:D,handleFinishResize:O,handleResize:V,init:P,saveCurrentLayout:M,getSavedLayout:C,handleWindowResize:F};return Object.defineProperty(W,"__isScriptSetup",{enumerable:!1,value:!0}),W}}),xKe=["id"],SKe={ref:"resizeBar",class:"resize-layout__resize-bar"};function AKe(t,e,n,r,i,a){return R(),Y("div",{id:`resize-layout-${r.props.layoutName}`,ref:"resizingPanelRef",class:Fe(["resize-layout",[r.props.mode,{"break-layout":r.isColumnLayout}]])},[X("div",{ref:"leftPanelRef",class:Fe(["resize-layout__content flex-1",{"disabled-pointer":r.isDragging}]),style:_t({"min-width":`${r.minWidthLeft}px`,minHeight:`${r.isColumnLayout?r.props.requireHeight:r.props.minHeight}px`})},[r.ready?ke(t.$slots,"left",{key:0,width:r.leftWidth,height:r.leftHeight,ready:r.ready,isColumnLayout:r.isColumnLayout},()=>[e[0]||(e[0]=X("div",{class:"loading-box animation-skeleton"},null,-1))],!0):pe("v-if",!0)],6),X("div",SKe,null,512),X("div",{ref:"rightPanelRef",class:Fe(["resize-layout__content",{"disabled-pointer":r.isDragging}]),style:_t({"min-width":`${r.minWidthRight}px`,minHeight:`${r.props.minHeight}px`,"margin-right":`${r.props.requireRightMargin}px`})},[r.ready?ke(t.$slots,"right",{key:0},()=>[e[1]||(e[1]=X("div",{class:"loading-box animation-skeleton"},null,-1))],!0):pe("v-if",!0)],6)],10,xKe)}const NW=Nn(wKe,[["render",AKe],["__scopeId","data-v-17f7c923"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/layouts/ResizeLayout.vue"]]),kKe=Qe({__name:"PreferencePopup",props:{width:{type:Number,required:!1,default:280},isActive:{type:Boolean,required:!1}},setup(t,{expose:e}){e();const n=t,r=()=>{a.value?o():i()},i=()=>{f(),a.value=!0},a=re(!1),o=()=>{a.value=!1},s=re(null),l=re(null),c=re(null);o4e(s,()=>{o()});const f=()=>{const p=l.value,g=c.value;if(!p||!g)return;const y=p.getBoundingClientRect();g.style.top=`${y.bottom}px`,g.style.left=`${y.left-n.width+y.width}px`,g.style.right=`${window.innerWidth-y.right}px`},h={props:n,togglePreferencePopup:r,openPreferencePopup:i,isOpen:a,closePreferencePopup:o,preferencePopupComponentRef:s,activatorButtonRef:l,preferencePopupRef:c,positioningPopup:f,get ArboButton(){return Nt}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),EKe={ref:"preferencePopupComponentRef",class:"preference-popup-component"};function TKe(t,e,n,r,i,a){return R(),Y("div",EKe,[X("div",{ref:"activatorButtonRef",class:Fe(["activator-button",{active:r.isOpen}])},[ke(t.$slots,"activator",{},()=>[he(r.ArboButton,{class:Fe({highlight:n.isActive}),"prefix-icon":"Gear","prefix-tooltip":"Preference",type:"secondary",label:"",size:"small",onClick:r.togglePreferencePopup},null,8,["class"])],!0)],2),It(X("div",{ref:"preferencePopupRef",class:"preference-popup",style:_t({width:r.props.width+"px"})},[ke(t.$slots,"content",{},void 0,!0)],4),[[Ln,r.isOpen]])],512)}const DKe=Nn(kKe,[["render",TKe],["__scopeId","data-v-6449bd28"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/PreferencePopup.vue"]]),OKe=Qe({__name:"SkeletonLoading",props:{isLoading:{type:Boolean,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0}},setup(t,{expose:e}){e();const n=t,r=Z(()=>({"--card-width":`${n.width}px`,"--card-height":`${n.height}px`})),i={props:n,computedCardStyle:r};return Object.defineProperty(i,"__isScriptSetup",{enumerable:!1,value:!0}),i}});function CKe(t,e,n,r,i,a){return R(),Re(Md,{name:"fade",mode:"out-in"},{default:ze(()=>[n.isLoading?(R(),Y("div",{key:0,class:"card-skeleton animation-skeleton",style:_t(r.computedCardStyle)},null,4)):ke(t.$slots,"default",{key:1},void 0,!0)]),_:3})}const IKe=Nn(OKe,[["render",CKe],["__scopeId","data-v-3e5dcdc8"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SkeletonLoading.vue"]]),MKe=Qe({__name:"SectionTitle",props:{countBtn:{type:Object,required:!1,default:void 0},showRefreshLabel:{type:Boolean,required:!1,default:!1},showRefreshBtn:{type:Boolean,required:!0},title:{type:String,required:!1,default:""},loading:{type:Boolean,required:!1,default:!0},activeFilter:{type:Boolean,required:!1,default:!1}},emits:["refresh"],setup(t,{expose:e,emit:n}){e();const r=pu(),i=f=>!!r[f],a=t,o=re(0),s=n,c={slots:r,hasSlot:i,props:a,renderKey:o,emits:s,refresh:()=>{o.value+=1,s("refresh")},get ArboButton(){return Nt},get TessNonInteractiveChip(){return IS},get ArboTooltip(){return dr},PreferencePopup:DKe,SkeletonLoading:IKe};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}}),RKe={class:"section-title"},$Ke={class:"title"},PKe={class:"actions"},LKe={class:"counting-chip"};function NKe(t,e,n,r,i,a){return R(),Y("div",RKe,[ke(t.$slots,"title",{},()=>[X("div",$Ke,it(n.title),1)],!0),X("div",PKe,[ke(t.$slots,"search",{},void 0,!0),e[0]||(e[0]=Cn()),ke(t.$slots,"refresh",{},()=>[n.showRefreshBtn?(R(),Re(r.ArboTooltip,{key:0,content:n.showRefreshLabel?"Change detected. Refresh now.":"Refresh",delay:[300,0]},{default:ze(()=>[n.showRefreshLabel?(R(),Re(r.ArboButton,{key:r.renderKey,type:"secondary",label:"Refresh","prefix-icon":"ArrowRotate",size:"small",onClick:r.refresh})):(R(),Re(r.ArboButton,{key:r.renderKey+1,type:"secondary",label:"","prefix-icon":"ArrowRotate",size:"small",onClick:r.refresh}))]),_:1},8,["content"])):pe("v-if",!0)],!0),e[1]||(e[1]=Cn()),ke(t.$slots,"count",{},()=>[n.countBtn?(R(),Re(r.ArboTooltip,{key:0,content:n.countBtn.countTooltip,delay:[1e3,0]},{default:ze(()=>[he(r.SkeletonLoading,{"is-loading":r.props.loading,width:50,height:24},{default:ze(()=>[X("div",LKe,[he(r.TessNonInteractiveChip,{label:String(n.countBtn.count||"0"),icon:n.countBtn.icon},null,8,["label","icon"])])]),_:1},8,["is-loading"])]),_:1},8,["content"])):pe("v-if",!0)],!0),e[2]||(e[2]=Cn()),ke(t.$slots,"preferences",{},()=>[r.hasSlot("preference-popup")||r.hasSlot("preference")?(R(),Re(r.PreferencePopup,{key:0,"is-active":n.activeFilter},{content:ze(()=>[ke(t.$slots,"preference-popup",{},void 0,!0)]),_:3},8,["is-active"])):pe("v-if",!0)],!0)])])}const iI=Nn(MKe,[["render",NKe],["__scopeId","data-v-1814b956"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SectionTitle.vue"]]),FKe=Qe({__name:"PeopleHome",setup(t,{expose:e}){e();const n={"assigned-tile":jze,"target-points-tile":tje,"unresolved-tile":ije,"overdue-tile":Zze,"total-completed-tile":qze},r=ks(),{getDashboardData:i}=r,{dashboardData:a}=Pn(r),o=Z(()=>{var V;return["assigned-tile",((V=a.value)==null?void 0:V.point_pool.can_view)?"target-points-tile":void 0,"overdue-tile","unresolved-tile","total-completed-tile"].filter(Boolean)}),s=re(!0),l=[{id:"comment_resolved",name:"Recently resolved",needRefresh:!0},{id:"comment_recent",name:"Recent comments",needRefresh:!0}],c=Z(()=>({"--card-width":`${T.value}px`,"--max-width":`${T.value}px`})),f=[{id:"rendition",name:"New renditions",needRefresh:!0},{id:"scene",name:"Recently accessed scenes",needRefresh:!0}],{height:h}=zae(),p=re(null),g=re(null),y=fr(),{basicInfo:v}=Pn(y),b=re(null),{width:w}=hh(b),S=Z(()=>w.value),T=Z(()=>{const D=w.value,O=Math.min(Math.floor(D/266),5),V=D-(O-1)*16;return Math.floor(V/Math.ceil(O))}),_=RS(async()=>{v.value.id&&(s.value=!0,await i(v.value.id),s.value=!1)},500);Ge(v,()=>{_()},{deep:!0,immediate:!0});const E={components:n,dashboardStore:r,getDashboardData:i,dashboardData:a,tiles:o,isLoading:s,sectionComment:l,computedCardStyle:c,sectionScene:f,windowHeight:h,peopleHomeRef:p,topRef:g,store:y,basicInfo:v,sectionRef:b,width:w,widthSection:S,cardWidth:T,handleRefreshPage:_,DashboardTabSection:_Ke,ResizeLayout:NW,SectionTitle:iI,get BREAKPOINT_RESIZE(){return Loe}};return Object.defineProperty(E,"__isScriptSetup",{enumerable:!1,value:!0}),E}}),VKe={ref:"peopleHomeRef",class:"people-home"},BKe={ref:"topRef",class:"top"},UKe={ref:"sectionRef",class:"section-card-wrapper"},WKe={class:"section-card"};function zKe(t,e,n,r,i,a){return R(),Y("div",VKe,[X("div",BKe,[he(r.SectionTitle,{title:"Summary","show-refresh-btn":!0,onRefresh:r.handleRefreshPage},null,8,["onRefresh"]),X("div",UKe,[X("div",WKe,[(R(!0),Y(wt,null,Qt(r.tiles,o=>(R(),Y("div",{key:o,class:"dashboard-item-wrapper"},[he(Md,{name:"fade",mode:"out-in"},{default:ze(()=>[r.isLoading?(R(),Y("div",{key:0,class:"card-skeleton animation-skeleton",style:_t(r.computedCardStyle)},null,4)):(R(),Re(wd(r.components[o]),{key:1,class:"dashboard-item",style:_t(r.computedCardStyle)},null,8,["style"]))]),_:2},1024)]))),128))])],512)],512),X("div",{class:Fe(["bottom",{"column-layout":r.widthSection<=r.BREAKPOINT_RESIZE||r.windowHeight<700}])},[he(r.ResizeLayout,{"min-width-left":440,"min-width-right":750,"layout-name":"people-home",class:"resize-layout"},{left:ze(()=>[he(r.DashboardTabSection,{tabs:r.sectionComment})]),right:ze(()=>[he(r.DashboardTabSection,{tabs:r.sectionScene})]),_:1,__:[0]})],2)],512)}const jKe=Nn(FKe,[["render",zKe],["__scopeId","data-v-ba194661"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/PeopleHome.vue"]]),HKe=Qe({__name:"ProfileAvatar",props:{bgColor:{type:String,default:"#FFFFFF"},textColor:{type:String,default:"#FFFFFF"},initialName:{type:String,default:""},profileImage:{type:String,default:""}},setup(t,{expose:e}){e();const n=t,r=fr(),i=re(null),a=re(!1);async function o(){if(n.profileImage){a.value=!0;try{const p=await fetch(n.profileImage,{method:"GET"});p.ok?i.value=n.profileImage:(console.error("loadImageSrc: Invalid image URL",p.status),i.value="")}catch(p){console.error("loadImageSrc: Error fetching image:",p),i.value=""}finally{a.value=!1}}else i.value="",a.value=!1}const s=Z(()=>r.basicInfo.private_info),l=Z(()=>{var p,g,y;return((p=s.value)==null?void 0:p.is_offline)===!0?"Logged out from account":((g=s.value)==null?void 0:g.last_active)!==null?"Active in the workspace within the last 10 minutes":((y=s.value)==null?void 0:y.last_active)===null?"No activity in the workspace within the last 10 minutes":""}),c=Z(()=>{var p,g,y;return((p=s.value)==null?void 0:p.is_offline)===!0?"#A6A6A6":((g=s.value)==null?void 0:g.last_active)!==null?"#02C39A":((y=s.value)==null?void 0:y.last_active)===null?"#F7941D":""}),f=Z(()=>({backgroundColor:c.value}));zt(()=>{o()});const h={props:n,store:r,imageUrl:i,isLoadImage:a,loadImageSrc:o,userStatusInfo:s,statusTooltipContent:l,statusBackgroundColor:c,dynamicStyles:f,get TessAvatar(){return _h},get ArboTooltip(){return dr},get ArboSkeletonLoading(){return D_}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),YKe={class:"profile-image"},qKe={class:"profile-image__main--status-avatar"},KKe={class:"profile-image__main"},GKe={key:1};function ZKe(t,e,n,r,i,a){return R(),Y("div",YKe,[X("div",qKe,[he(r.ArboTooltip,{content:r.statusTooltipContent,delay:[300,0],"hide-on-click":!0,placement:"right"},{default:ze(()=>[X("div",{class:"profile-image__main--status-avatar-icon",style:_t(r.dynamicStyles)},null,4)]),_:1},8,["content"])]),X("div",KKe,[r.isLoadImage?(R(),Re(r.ArboSkeletonLoading,{key:0,size:108,width:108,height:108,radius:4,duration:2})):(R(),Y("div",GKe,[he(r.TessAvatar,{class:"profile-image__main--avatar",image:r.imageUrl,label:"","short-label":r.props.initialName,"is-use-short-label":!0,"bg-color":r.props.bgColor,"text-color":r.props.textColor,"disable-hover":!0},null,8,["image","short-label","bg-color","text-color"])]))])])}const QKe=Nn(HKe,[["render",ZKe],["__scopeId","data-v-6855256d"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileAvatar.vue"]]),XKe=Qe({__name:"ProfileInfoDetailFirstSection",setup(t,{expose:e}){e();const n=Ht({filteredData:[],currentPage:1,perPage:10,pageMeta:{},selectedUser:"",searchText:"",isFetching:!1}),r=fr();let i=Ht({isShow:!1}),a=Ht({isShow:!1});const o=re(!1),s=re(!1),l=re(0),c=async(N,U,ee,le="",_e=!1)=>{try{if(n.isFetching)return;n.isFetching=!0;const be=await xn.getUserListProfile(N,U,ee,le),Te=be.data.map(J=>{var me,Ee;return{...J,bg_color:(me=J==null?void 0:J.color)==null?void 0:me.bgColor,text_color:(Ee=J==null?void 0:J.color)==null?void 0:Ee.textColor}});_e?n.filteredData=[...Te]:n.filteredData=[...n.filteredData,...Te],n.pageMeta=be==null?void 0:be.meta,n.currentPage++,n.isFetching=!1}catch(be){console.error("fetchUserProfile error:",be)}};function f(){c(n.currentPage,n.perPage,n.selectedUser,n.searchText)}const h=Z(()=>n.filteredData.length<n.pageMeta.total),p=fr(),{selectedDataId:g}=Pn(p),y=async()=>{n.searchText="",n.currentPage=1,n.filteredData=[],await c(n.currentPage,n.perPage,g.value||"")};function v(N){n.selectedUser=JSON.parse(JSON.stringify(N))}const b=Nae(),{getEnvVariable:w}=Al(),{currentTab:S}=Pn(p),T=w("IS_DETACH");Ge(()=>n.selectedUser,()=>{T||b.replace({name:"PeopleDetail",params:{people_id:n.selectedUser||d5e(),ws_code:yn()},query:{tab:S.value||"home"}})});const _=Z(()=>r.isLoadingFetchData),E=()=>{var U;const N=r.basicInfo;o.value=!0,navigator.clipboard.writeText((U=N==null?void 0:N.user)==null?void 0:U.email).then(()=>{setTimeout(()=>{o.value=!1,i.isShow=!1},1e3)}).catch(ee=>{console.error("Could not copy the email",ee)})},D=()=>{var U;const N=r.basicInfo;s.value=!0,navigator.clipboard.writeText((U=N==null?void 0:N.user)==null?void 0:U.professional_name).then(()=>{setTimeout(()=>{s.value=!1,a.isShow=!1},1e3)}).catch(ee=>{console.error("Could not copy the name",ee)})},O=Z(()=>{let N=yn();return N||""}),V=Z(()=>{var N,U,ee;return r.isLoadingProfile||!((N=r.basicInfo)!=null&&N.user)?"":((ee=(U=r.basicInfo)==null?void 0:U.user)==null?void 0:ee.professional_name)||"Professional name not provided"});function P(N,U){return(N==null?void 0:N.id)===(U==null?void 0:U.id)?U.professional_name===null:!1}function M(){w("BASE_URL")&&(window.parent.location.href=`${w("BASE_URL")}/${O.value}/ac/acc`)}function C(N,U){return N&&N.length>U?N.substring(0,U-3)+"...":N||""}const F=async N=>{n.searchText=N,n.currentPage=1,await c(n.currentPage,n.perPage,n.selectedUser,n.searchText,!0)},W=async()=>{await c(n.currentPage,n.perPage,g.value||""),l.value++};Ge(()=>g.value,N=>{n.selectedUser=N,W()},{immediate:!0,deep:!0}),zt(async()=>{W()}),Ge(n,N=>{!n.filteredData.length&&!N.selectedUser||fr().setSelectedDataId(N.selectedUser===""?n.filteredData[0].id:N.selectedUser)});const H=Z(()=>"Choose a team member to view their profile"),j={states:n,store:r,get showCopyIcon(){return i},set showCopyIcon(N){i=N},get showCopyIconName(){return a},set showCopyIconName(N){a=N},showCopiedEmail:o,showCopiedName:s,componentKey:l,fetchUserProfile:c,loadMoreData:f,enableLoadMore:h,globalStore:p,peopleId:g,resetSearch:y,updateValue:v,router:b,getEnvVariable:w,currentTab:S,isDetach:T,isDisableSelect:_,copyEmail:E,copyName:D,wsCode:O,getProfessionalName:V,checkUserProfile:P,redirectAccountSetting:M,truncateLabel:C,handleSearch:F,init:W,tooltipContent:H,get ArboLabel(){return ea},get ArboTooltip(){return dr},get TessAssigneeSelect(){return k6},get ArboSkeletonLoading(){return D_},get ArboButton(){return Nt},get ArboIcon(){return qn}};return Object.defineProperty(j,"__isScriptSetup",{enumerable:!1,value:!0}),j}}),JKe={class:"info-detail-content"},eGe={class:"info-detail-content__main"},tGe={class:"info-detail-content__main--user-select"},nGe={class:"info-detail-content__main--user-name"},rGe={key:1,class:"detail-row"},iGe={class:"icon-wrapper"},aGe={class:"content-wrapper"},oGe={class:"inline-content"},sGe={key:4,class:"inline-copy-button"},lGe={class:"info-detail-content__main--user-email"},uGe={key:1,class:"detail-row"},cGe={class:"icon-wrapper"},dGe={class:"content-wrapper"},fGe={class:"inline-content"},hGe={key:3,class:"inline-copy-button"};function pGe(t,e,n,r,i,a){var o,s,l,c,f,h,p,g,y,v,b,w,S,T,_,E,D,O,V,P,M,C;return R(),Y("div",JKe,[X("div",eGe,[X("div",tGe,[(R(),Re(r.TessAssigneeSelect,{key:r.componentKey,modelValue:r.states.selectedUser,"onUpdate:modelValue":e[0]||(e[0]=F=>r.states.selectedUser=F),"empty-text":"No results. Try another search.","prepend-height":0,options:r.states.filteredData,"is-dark":!0,disable:r.isDisableSelect,"select-limit":1,"disable-un-select-single-mode":!0,"is-enable-pagination":!1,"is-enable-load-more":r.enableLoadMore,"is-clearable":!1,label:"",placeholder:"Please select a user","value-key":"id","tooltip-display":r.tooltipContent,onSearch:r.handleSearch,onLoadMore:r.loadMoreData,onUpdateValue:r.updateValue,onShown:r.resetSearch},ji({"loading-animation":ze(({})=>[e[6]||(e[6]=X("div",{class:"box-loading absolute"},[X("div",{class:"animation-skeleton"}),X("div",{class:"animation-skeleton"})],-1))]),prepend_list:ze(({})=>[It(X("div",null,null,512),[[Ln,!1]])]),_:2},[r.states.isFetching?{name:"empty_text",fn:ze(({})=>[e[5]||(e[5]=X("div",{class:"box-loading"},[X("div",{class:"animation-skeleton"}),X("div",{class:"animation-skeleton"})],-1))]),key:"0"}:void 0]),1032,["modelValue","options","disable","is-enable-load-more","tooltip-display"]))]),X("div",nGe,[r.store.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:200,width:200,height:21,radius:4,duration:1})):(R(),Y("div",rGe,[he(r.ArboTooltip,{content:((s=(o=r.store.basicInfo)==null?void 0:o.user)==null?void 0:s.professional_name)!==null?"Professional name":"",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[X("div",iGe,[he(r.ArboIcon,{name:"AddressCard"})])]),_:1},8,["content"]),X("div",aGe,[X("div",oGe,[X("div",{class:"name-hover-area",onMouseover:e[1]||(e[1]=F=>r.showCopyIconName.isShow=!0),onMouseleave:e[2]||(e[2]=F=>r.showCopyIconName.isShow=!1)},[(c=(l=r.store.basicInfo)==null?void 0:l.user)!=null&&c.professional_name&&((h=(f=r.store.basicInfo)==null?void 0:f.user)==null?void 0:h.professional_name.length)>25&&!r.showCopiedName?(R(),Re(r.ArboTooltip,{key:0,content:(g=(p=r.store.basicInfo)==null?void 0:p.user)==null?void 0:g.professional_name,delay:[1e3,0],"hide-on-click":!0,style:{"padding-top":"4px"}},{default:ze(()=>{var F,W;return[he(r.ArboLabel,{label:r.truncateLabel((W=(F=r.store.basicInfo)==null?void 0:F.user)==null?void 0:W.professional_name,25),class:"name-label-truncate"},null,8,["label"])]}),_:1},8,["content"])):!r.showCopiedName&&!r.checkUserProfile((y=r.store.basicInfo)==null?void 0:y.user,r.store.userInfo)?(R(),Re(r.ArboLabel,{key:1,label:r.getProfessionalName,class:Fe(["name-label",{"name-label-not-provided":((b=(v=r.store.basicInfo)==null?void 0:v.user)==null?void 0:b.professional_name)===null}])},null,8,["label","class"])):!r.showCopiedName&&r.checkUserProfile((w=r.store.basicInfo)==null?void 0:w.user,r.store.userInfo)?(R(),Re(r.ArboButton,{key:2,class:"update-name-button",label:"Update professional name",type:"tertiary",style:{padding:"4px 0px !important"},onClick:r.redirectAccountSetting})):(R(),Re(r.ArboLabel,{key:3,class:"name-label",label:"Copied"})),r.showCopyIconName.isShow&&((T=(S=r.store.basicInfo)==null?void 0:S.user)!=null&&T.professional_name)&&!r.showCopiedName?(R(),Y("div",sGe,[he(r.ArboTooltip,{content:"Copy",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[he(r.ArboButton,{type:"tertiary","suffix-icon":"Copy",label:"",onClick:r.copyName})]),_:1})])):pe("v-if",!0)],32)])])]))]),X("div",lGe,[r.store.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:200,width:200,height:21,radius:4,duration:1})):(R(),Y("div",uGe,[X("div",cGe,[he(r.ArboIcon,{name:"Email"})]),X("div",dGe,[X("div",fGe,[X("div",{class:"email-hover-area",onMouseover:e[3]||(e[3]=F=>r.showCopyIcon.isShow=!0),onMouseleave:e[4]||(e[4]=F=>r.showCopyIcon.isShow=!1)},[(E=(_=r.store.basicInfo)==null?void 0:_.user)!=null&&E.email&&((O=(D=r.store.basicInfo)==null?void 0:D.user)==null?void 0:O.email.length)>25&&!r.showCopiedEmail?(R(),Re(r.ArboTooltip,{key:0,content:(P=(V=r.store.basicInfo)==null?void 0:V.user)==null?void 0:P.email,delay:[1e3,0],"hide-on-click":!0},{default:ze(()=>{var F,W;return[he(r.ArboLabel,{label:r.truncateLabel((W=(F=r.store.basicInfo)==null?void 0:F.user)==null?void 0:W.email,25),class:"email-label"},null,8,["label"])]}),_:1},8,["content"])):r.showCopiedEmail?(R(),Re(r.ArboLabel,{key:2,class:"email-label",label:"Copied"})):(R(),Re(r.ArboLabel,{key:1,label:((C=(M=r.store.basicInfo)==null?void 0:M.user)==null?void 0:C.email)||"",class:"email-label"},null,8,["label"])),r.showCopyIcon.isShow&&!r.showCopiedEmail?(R(),Y("div",hGe,[he(r.ArboTooltip,{content:"Copy",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[he(r.ArboButton,{type:"tertiary","suffix-icon":"Copy",label:"",onClick:r.copyEmail})]),_:1})])):pe("v-if",!0)],32)])])]))])])])}const mGe=Nn(XKe,[["render",pGe],["__scopeId","data-v-e2811187"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfoDetailFirstSection.vue"]]),gGe=Qe({__name:"LinkProfileCopied",setup(t,{expose:e}){e();const n=re(!1),r=re(!1);function i(h){h.type==="mouseleave"&&setTimeout(()=>{n.value=!1},300)}const a=Z(()=>n.value===!0?"Copied":"Copy link"),{getEnvVariable:o}=Al(),s=fr(),{selectedDataId:l}=Pn(s);function c(){const h=Qi({type:"people_insight",config:{baseDomain:o("BASE_URL"),ws_code:yn(),user_id:String(l.value)||""}});o("BASE_URL")&&navigator.clipboard.writeText(h.url).then(()=>{n.value=!0}).catch(p=>{console.error("Failed to copy: ",p),r.value=!1})}const f={isCopied:n,isCopiedError:r,tooltipEventMouseLeave:i,tooltipContent:a,getEnvVariable:o,globalStore:s,peopleId:l,copyProfileLink:c,get ArboButton(){return Nt},get ArboTooltip(){return dr}};return Object.defineProperty(f,"__isScriptSetup",{enumerable:!1,value:!0}),f}}),vGe={class:"link-profile-button"};function yGe(t,e,n,r,i,a){return R(),Y("div",vGe,[X("div",{class:"link-profile-button__main",onMouseleave:r.tooltipEventMouseLeave},[he(r.ArboTooltip,{class:"link-profile-button__main--content",content:r.tooltipContent,delay:[300,0],"hide-on-click":!1},{default:ze(()=>[he(r.ArboButton,{type:"secondary","suffix-icon":"Link",label:"",onClick:Rt(r.copyProfileLink,["prevent"])})]),_:1},8,["content"])],32)])}const bGe=Nn(gGe,[["render",yGe],["__scopeId","data-v-85be9f0a"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/LinkProfileCopied.vue"]]),_Ge=Qe({__name:"ProfileInfoDetailSecondSection",setup(t,{expose:e}){e();const n=fr(),{isLoadingProfile:r}=Pn(n),i=re("");function a(f,h,p,g="png"){return new Promise(y=>{const v=new Image,b=document.createElement("canvas");b.width=h,b.height=p;const w=b.getContext("2d");w&&(v.onload=()=>{w.drawImage(v,0,0,h,p);const S=b.toDataURL(`image/${g}`);y(S)},v.src=`data:image/svg+xml;base64,${btoa(f)}`)})}const{getEnvVariable:o}=Al();async function s(){const f=o("ASSET_URL")?o("ASSET_URL"):"https://arbodev.s3.ap-south-1.amazonaws.com";if(f){const h=`${f}/icon/general/default-avatar.svg`;try{const p=await fetch(h);if(!p.ok)throw new Error("Failed to load SVG file");const g=await p.text(),y=await a(g,100,100);i.value=y}catch(p){console.error("Error:",p)}}}const l=Z(()=>{const f=n.basicInfo;return f&&f.private_info&&f.private_info.common_team&&f.private_info.common_team.team?f.private_info.common_team.team.map(h=>{const p=h.avatar===null||h.avatar===void 0?i.value:h.avatar;return{...h,avatar:p}}):[]});zt(()=>{s()});const c={store:n,isLoadingProfile:r,defaultAvatar:i,convertSvgToImage:a,getEnvVariable:o,loadAndConvertSVG:s,basicInfoTeam:l,get TessAvatarGroup(){return mC},get ArboSkeletonLoading(){return D_},LinkProfileCopied:bGe};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}}),wGe={class:"info-detail-content"},xGe={class:"info-detail-content__main"},SGe={class:"info-detail-content__content"},AGe={class:"info-detail-content__content--link-copy"},kGe={class:"info-detail-content__content--list-team-group"};function EGe(t,e,n,r,i,a){return R(),Y("div",wGe,[X("div",xGe,[X("div",SGe,[X("div",AGe,[r.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:83,width:83,height:32,radius:4,duration:1})):(R(),Re(r.LinkProfileCopied,{key:1}))]),X("div",kGe,[r.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:88,width:88,height:22,radius:4,duration:1})):(R(),Re(r.TessAvatarGroup,{key:1,"empty-text":"No team",data:r.basicInfoTeam,"label-key":"name","disable-hover":!0,"image-key":"avatar","tooltip-key":"name"},null,8,["data"]))])])])])}const TGe=Nn(_Ge,[["render",EGe],["__scopeId","data-v-9eec8ecc"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfoDetailSecondSection.vue"]]),DGe=Qe({__name:"ProfileInfo",setup(t,{expose:e}){e();const n={FirstSectionInfo:mGe,SecondSectionInfo:TGe};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),OGe={class:"profile-content"},CGe={class:"profile-content__main"},IGe={class:"profile-content__main--first-section"},MGe={class:"profile-content__main--second-section"};function RGe(t,e,n,r,i,a){return R(),Y("div",OGe,[X("div",CGe,[X("div",IGe,[he(r.FirstSectionInfo)]),X("div",MGe,[he(r.SecondSectionInfo)])])])}const $Ge=Nn(DGe,[["render",RGe],["__scopeId","data-v-e4f533f7"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfo.vue"]]),PGe=Qe({__name:"SharedHeader",emits:["loaded"],setup(t,{expose:e,emit:n}){e();const r=fr();let i=1;const a=Ht({isLoading:!1,profileInfo:void 0,permissionList:[]}),{getEnvVariable:o}=Al(),s=async()=>{try{a.isLoading=!0,Dd.setSessionCookie("ws.user-access-id",r.selectedDataId);const p=await xn.getUserBasicInfo(r.selectedDataId);r.setSelectedDataProfile(p),i_.remove("account.last_access_url_people_tile",{domain:o("BASE_DOMAIN_COOKIE")})}catch(p){a.isLoading=!1,console.error("fetchBasicInfo",p)}finally{a.isLoading=!1}},l=async()=>{try{const p=await xn.getUserPermission();r.setPermission(p)}catch(p){console.error("fetchUserPermission",p)}},c=async()=>{try{const p=await xn.getUserProfile();r.setUserInfo(p)}catch(p){console.error("fetchUserProfile",p)}},f=n;zt(async()=>{await c(),l(),setTimeout(()=>{f("loaded")},3e3)}),Ge(()=>r.selectedDataId,p=>{p&&setTimeout(()=>{p&&s()},300)},{immediate:!0,deep:!0}),Ge(()=>r.basicInfo,p=>{p&&(a.profileInfo=p,i++)},{deep:!0}),Ge(()=>a.isLoading,p=>{r.setIsLoadingProfile(p)},{deep:!0});const h={store:r,get componentKey(){return i},set componentKey(p){i=p},state:a,getEnvVariable:o,fetchBasicInfo:s,fetchUserPermission:l,fetchUserProfile:c,emits:f,get ArboSkeletonLoading(){return D_},ProfileAvatar:QKe,ProfileInfo:$Ge};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),LGe={class:"header-content"},NGe={class:"header-content__main"},FGe={class:"header-content__profile-image"},VGe={class:"header-content__profile-image--content"},BGe={class:"header-content__profile-info"},UGe={class:"header-content__profile-info--content"};function WGe(t,e,n,r,i,a){var o,s,l,c,f,h;return R(),Y("div",LGe,[X("div",NGe,[X("div",FGe,[X("div",VGe,[r.state.isLoading?(R(),Re(r.ArboSkeletonLoading,{key:0,size:108,width:108,height:108,radius:4,duration:1})):(R(),Re(r.ProfileAvatar,{key:r.componentKey,"profile-image":(o=r.state.profileInfo)==null?void 0:o.profile_image,"text-color":(l=(s=r.state.profileInfo)==null?void 0:s.color)==null?void 0:l.textColor,"bg-color":(f=(c=r.state.profileInfo)==null?void 0:c.color)==null?void 0:f.bgColor,"initial-name":(h=r.store.basicInfo)==null?void 0:h.initial},null,8,["profile-image","text-color","bg-color","initial-name"]))])]),X("div",BGe,[X("div",UGe,[he(r.ProfileInfo)])])])])}const zGe=Nn(PGe,[["render",WGe],["__scopeId","data-v-b176f8be"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/SharedHeader.vue"]]),jGe=Qe({__name:"MenuTab",setup(t,{expose:e}){e();const n=fr(),{currentTab:r}=Pn(n),i=Fae();Ks(()=>{var l;if(Al().getEnvVariable("IS_DETACH"))return;const s=(l=i==null?void 0:i.query)==null?void 0:l.tab;s&&a.value.findIndex(c=>c.id==s)&&(r.value=s)});const a=Z(()=>[{id:"people-home",name:"",content:"",tooltipName:"Summary",icon:"House"},{id:"people-scenes",name:"",content:"",tooltipName:"Assigned scenes",icon:"PhotoVideo"},{id:"people-charts",name:"",content:"",tooltipName:"Charts",icon:"ChartPie"},{id:"people-comments",name:"",content:"",tooltipName:"Assigned Comments",icon:"Comments"},{id:"report-tab",name:"",content:"",tooltipName:"Reports",icon:"File"}]),o={store:n,currentTab:r,route:i,tabsListType:a,get ArboTabs(){return hC}};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}});function HGe(t,e,n,r,i,a){return R(),Re(r.ArboTabs,{tabs:r.tabsListType,position:"left",value:r.currentTab,onInput:e[0]||(e[0]=o=>r.currentTab=o)},null,8,["tabs","value"])}const YGe=Nn(jGe,[["render",HGe],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/MenuTab.vue"]]),qGe=Qe({__name:"SectionLayout",props:{layout:{type:Object,required:!1}},setup(t,{expose:e}){e();const n=pu(),a={slots:n,hasSlots:o=>n[o]!==void 0,props:t};return Object.defineProperty(a,"__isScriptSetup",{enumerable:!1,value:!0}),a}});function KGe(t,e,n,r,i,a){var o;return R(),Y("div",{class:Fe(["layout-section",{"no-footer":!r.hasSlots("footer")}]),style:_t({"--layout":r.props.layout?`${r.props.layout.header}px ${r.props.layout.content}px ${r.props.layout.footer}px`:void 0})},[It(X("div",{class:"header",style:_t({height:(o=n.layout)!=null&&o.footer?n.layout.header+"px":void 0})},[ke(t.$slots,"header",{},()=>[e[0]||(e[0]=Cn(" header ",-1))],!0)],4),[[Ln,r.hasSlots("header")]]),ke(t.$slots,"content",{},()=>{var s,l;return[It(X("div",{class:"body",style:_t({height:(s=n.layout)!=null&&s.footer?n.layout.body+"px":void 0})},[ke(t.$slots,"body",{},()=>[e[1]||(e[1]=Cn("body",-1))],!0)],4),[[Ln,r.hasSlots("body")]]),It(X("div",{class:"footer",style:_t({height:(l=n.layout)!=null&&l.footer?n.layout.footer+"px":void 0})},[ke(t.$slots,"footer",{},()=>[e[2]||(e[2]=Cn(" footer ",-1))],!0)],4),[[Ln,r.hasSlots("footer")]])]},!0)],6)}const Mce=Nn(qGe,[["render",KGe],["__scopeId","data-v-73dfa5d2"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/layouts/SectionLayout.vue"]]);function o5(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function GGe(t){if(Array.isArray(t))return o5(t)}function Fq(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(c){return void n(c)}s.done?e(l):Promise.resolve(l).then(r,i)}function ZGe(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Fq(a,r,i,o,s,"next",l)}function s(l){Fq(a,r,i,o,s,"throw",l)}o(void 0)})}}function QGe(t,e,n){return(e=rZe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function XGe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function JGe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
208
|
+
Yt.version="2.30.1";MHe(Ri);Yt.fn=Pt;Yt.min=_Ye;Yt.max=wYe;Yt.now=xYe;Yt.utc=Rd;Yt.unix=Z7e;Yt.months=X7e;Yt.isDate=ZA;Yt.locale=Np;Yt.invalid=YC;Yt.duration=Cc;Yt.isMoment=kc;Yt.weekdays=eqe;Yt.parseZone=Q7e;Yt.localeData=Dh;Yt.isDuration=jT;Yt.monthsShort=J7e;Yt.weekdaysMin=nqe;Yt.defineLocale=TW;Yt.updateLocale=Q9e;Yt.locales=X9e;Yt.weekdaysShort=tqe;Yt.normalizeUnits=gu;Yt.relativeTimeRounding=Oqe;Yt.relativeTimeThreshold=Cqe;Yt.calendarFormat=qYe;Yt.prototype=Pt;Yt.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const tm=T_("scene",()=>{const t=re({}),e=s=>{s.forEach(l=>{HC.set(t.value,l.id,l)})},n=re(void 0),r=re(0),i=(s,l)=>{const c=t.value;t.value={...c,[s]:{...t.value[s],...l}},o.value=!0},a=s=>t.value[s],o=re(!1);return{sceneDataMap:t,totalSceneCount:n,privateSceneCount:r,setSceneDataMap:e,updateSceneDataValue:i,getSceneDataValue:a,needRefresh:o}}),Ice=t=>{const{showErrorSnackbar:e,showSuccessSnackbar:n}=jA(),r=(C,F)=>(console.error("handleErrorHeader",C),C.code=="ERR_NETWORK"||navigator.onLine==!1?e({label:"Network error."}):e({label:(F==null?void 0:F.label)??"Update failed."}),{success:!1,data:void 0}),i=C=>{let F=C||"Update failed";navigator.onLine||(F="Network error"),e({label:F})},a=(C,F,W)=>{let H={success:!1,data:C};const j=C;return!j||j!=null&&j.error||j.error==403?(W&&i(),H={success:!1,data:C}):j&&j.error!=403&&(t&&t(F),H={success:!0,data:j}),H.success==!1&&W&&i(),H},o=C=>{const F=Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore";if(!C||!Yt(C).isValid())return null;new Date(C).setMilliseconds(0);const H=Q6(C,F);return String(H)||null},s=async(C,F)=>{try{const W=await xn.updateScene(C,{name:F});return _.value=!0,a(W,C,!0)}catch(W){return console.error("updateScene Name",W),r(W,{label:"Update failed."})}},l=async C=>{try{const F=await xn.updateScene(C,{status:0}),W=a(F,C);return W.success||i("Archive failed."),W}catch(F){return console.error("archiveScene",F),r(F,{label:"Update failed."})}},c=async C=>{try{const F=await xn.deleteScene(C),W=a(F,C);return W.success?n({label:"Deletion successful!"}):e({label:"Deletion failed."}),W}catch(F){return console.error("deleteScene",F),{success:!1,data:F}}},f=async C=>{try{const F=await xn.updateScene(C,{status:1}),W=a(F,C);return W.success||i("Unarchive failed."),W}catch(F){return console.error("unArchiveScene",F),r(F,{label:"Update failed."})}},h=async C=>{try{const F=await xn.updateScene(C,{clear_thumbnail:"1"}),W=a(F,C);return W.success?n({label:"Deletion successful"}):i("Deletion failed."),W}catch(F){return console.error("deleteThumbnail",F,!0),r(F,{label:"Deletion failed."})}},p=async(C,F)=>{var j,N;const W=o((j=F==null?void 0:F.start)==null?void 0:j.dateString),H=o((N=F==null?void 0:F.end)==null?void 0:N.dateString);try{const U=await xn.updateScene(C,{start_date:W,due_date:H});return a(U,C,!0)}catch(U){return console.error("updateDate",U),r(U,{label:"Update failed."})}},g=async C=>{try{const F=await xn.updateScene(C,{due_date:null});return a(F,C,!0)}catch(F){return console.error("clearDueDate",F),r(F,{label:"Update failed."})}},y=async C=>{try{const F=await xn.updateScene(C,{start_date:null});return a(F,C,!0)}catch(F){return console.error("updateDueDate",F),r(F,{label:"Update failed."})}},v=async(C,F)=>{try{const W=await xn.updateScene(C,{template_flow_status_id:F});return a(W,C)}catch(W){return console.error("updateSceneStatus",W),r(W,{label:"Update failed."})}},b=async(C,F)=>{try{const W=await xn.updateAssigneesUsers(C,F);return a(W,C,!0)}catch(W){return console.error("updateSceneAssignees",W),r(W,{label:"Update failed."})}},w=fr(),{basicInfo:S}=Pn(w),T=tm(),{needRefresh:_}=Pn(T);return{handleUpdateSceneName:s,handleArchiveScene:l,handleDeleteScene:c,handleUnArchiveScene:f,handleDeleteThumbnail:h,handleUpdateDate:p,handleClearDueDate:g,handleClearStarDate:y,handleUpdateSceneStatus:v,handleUpdateSceneAssignees:b,handleGetAssignableUsers:async(C,F)=>{try{const W=await xn.getAssignableUsers(C,{page:F.page,per_page:10,display_name_like:F.keyword});return{success:!0,data:{data:W.data.map(j=>({id:j.id,user_id:j.user_id,name:j.display_name,initial:j.initial,bgColor:j.color.bgColor,textColor:j.color.textColor,profile_image:j.profile_image,is_me:j.user_id==S.value.user_id})),meta:W.meta}}}catch(W){return console.error("getAssignableUsers",W),{success:!1,data:W}}},handleGetAssignableStatus:async(C,F)=>{try{const W=await xn.getAssignableStatus(C,F);return{success:!0,data:{data:W.data.filter(N=>N.can_update==1).map(N=>({id:N.id,name:N.name,color:N.color})),meta:W.meta}}}catch(W){return console.error("getAssignableStatus",W),{success:!1,data:W}}},handleGetSceneDetail:async C=>{try{const F={include_entity_path:1,include:"point_metric,ws_creator,template_flow_status,item_user_roles.ws_user_role,assignees"},W=await xn.getSceneDetail(C,F);return a(W,C)}catch(F){return console.error("getSceneDetail",F),{success:!1,data:F}}},handleAssignUser:async(C,F)=>{try{const W=await xn.assignUser(C,F);return a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}},handleReassignUser:async(C,F)=>{try{const W=await xn.updateAssigneesUsers(C,F);return a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}},handleUnassignUser:async(C,F)=>{try{const W=await xn.unAssignUser(C,F);return _.value=!0,a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}}}},Mqe=Qe({__name:"GridItem",props:{sceneId:{type:String,required:!0}},emits:["updateScene","loaded"],setup(t,{expose:e,emit:n}){e();const r=t,i=tm(),{sceneDataMap:a,needRefresh:o}=Pn(i),s=re(0),l=Z(()=>a.value[r.sceneId]),c=re(!1);zt(()=>{S("loaded")}),pee(()=>{S("loaded")});const f=hc("switchInstance"),h=()=>{f("scene_hub",{id:r.sceneId,tab:"home"},{showLoading:!1})},p=Dd.getCookie("account.last_prefered_timezone"),g=re(null);Ge(()=>r.sceneId,()=>{c.value=!1},{immediate:!0}),Ge(g,()=>{c.value=!0});const y=Z(()=>{let ge=yn();return ge||""}),v=fr(),{permissionMap:b}=Pn(v),w=Z(()=>{const ge=l.value.permission;return{canUpdateName:ge==null?void 0:ge.has_edit_permission,canUpdateThumbnail:ge==null?void 0:ge.has_edit_permission,canArchive:ge==null?void 0:ge.has_archive_permission,canDelete:ge==null?void 0:ge.has_delete_permission,canUpdateAssignees:ge==null?void 0:ge.has_update_assignee_permission,canUpdateStatus:l.value.has_stage>0?ge==null?void 0:ge.has_edit_permission:0,canUpdateDate:ge==null?void 0:ge.has_edit_date_permission,canOpenReview:b.value.redirectPermission.review,canOpenWoohoo:b.value.redirectPermission.woohoo,canOpenProject:b.value.redirectPermission.project,canOpenUpdate:b.value.redirectPermission.update}}),S=n,T=ge=>{o.value=!0,ge&&S("updateScene",ge)},{handleUpdateSceneName:_,handleGetAssignableUsers:E,handleArchiveScene:D,handleDeleteScene:O,handleUnArchiveScene:V,handleDeleteThumbnail:P,handleUpdateDate:M,handleClearDueDate:C,handleClearStarDate:F,handleUpdateSceneStatus:W,handleUpdateSceneAssignees:H,handleGetAssignableStatus:j,handleAssignUser:N,handleReassignUser:U,handleUnassignUser:ee}=Ice(T),{basicInfo:le}=Pn(v),_e=Z(()=>Number(l.value.property.is_archived)),be=Z(()=>Number(l.value.property.is_locked)),Te=Z(()=>{try{const ge=l.value,Ue=ge.assignees.map(Ye=>({id:Ye.id,user_id:Ye.user_id,name:Ye.display_name,initial:Ye.initial,bgColor:Ye==null?void 0:Ye.color.bgColor,textColor:Ye==null?void 0:Ye.color.textColor,profile_image:Ye.profile_image,is_me:Ye.user_id==le.value.user_id}));return{...ge,status:ge.template_flow_status,assignees:Ue,is_archived:_e.value,is_locked:be.value,bulk_process:ge.bulk_process}}catch(ge){return console.error(ge),l.value}});Ge(()=>Te.value,()=>s.value++,{deep:!0});const J=async ge=>{const Ue=r.sceneId;return await M(Ue,ge)},{getEnvVariable:me}=Al(),Ee=Z(()=>{const ge=l.value,Ue=Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore",ce={ws_code:y.value,scene_id:ge.id,entity_id:ge.entity_id,baseUrl:me("BASE_URL")||"https://app.dev.arbocollab.com",reviewUrl:me("BASE_REVIEW_URL")||"https://review.dev.arbocollab.com"},Ye={thumbnailKey:"thumbnail",breadcrumbKey:"entity_path",titleKey:"name",startDateKey:"start_date",dueDateKey:"due_date",isStartedKey:"is_started",isCompletedKey:"is_completed",archivedKey:"is_archived",lockedKey:"is_locked",assigneesKey:"assignees",statusKey:"status",bulkUpdateKey:"bulk_process"},te=ge.id;return{notifyError:(...ae)=>{console.error(...ae)},updateFuncs:{updateDate:async ae=>await J(ae),updateName:async ae=>await _(te,ae),updateStatus:async ae=>await W(te,ae.id),getAssignees:async ae=>await E(te,ae),getStatus:async ae=>await j(te,ae),clearDueDate:async()=>await C(te),clearStartDate:async()=>await F(te),updateAssignees:async ae=>await H(te,ae),archiveScene:async()=>await D(te),deleteScene:async()=>await O(te),unarchiveScene:async()=>await V(te),deleteThumbnail:async()=>await P(te),assignUser:async ae=>await N(te,ae),unassignUser:async ae=>await ee(te,ae),reassignUser:async ae=>await U(te,ae)},active:!1,keys:Ye,readonly:!1,disabled:!1,timezone:Ue,sceneConfiguration:ce,data:{...Te.value},permissions:w.value}});Ge([l,_e,be],()=>{s.value=s.value+1});const Ce=re(!1),de=Uae(g);Ge(de,HC.debounce(()=>{Ce.value=!de.value},300));const G={props:r,sceneStore:i,sceneDataMap:a,needRefresh:o,renderKey:s,sceneDataMapComputed:l,ready:c,switchInstance:f,handleOpenSceneHub:h,timezones:p,cardRef:g,wsCode:y,store:v,permissionMap:b,mappingPermission:w,emits:S,callbackUpdateScene:T,handleUpdateSceneName:_,handleGetAssignableUsers:E,handleArchiveScene:D,handleDeleteScene:O,handleUnArchiveScene:V,handleDeleteThumbnail:P,handleUpdateDate:M,handleClearDueDate:C,handleClearStarDate:F,handleUpdateSceneStatus:W,handleUpdateSceneAssignees:H,handleGetAssignableStatus:j,handleAssignUser:N,handleReassignUser:U,handleUnassignUser:ee,basicInfo:le,isArchived:_e,isLocked:be,sceneDataComputed:Te,_handleUpdateDate:J,getEnvVariable:me,tessCardProps:Ee,showLoading:Ce,targetIsVisible:de,get TessSceneCard(){return xae},GirdItemSkeleton:Vue};return Object.defineProperty(G,"__isScriptSetup",{enumerable:!1,value:!0}),G}}),Rqe=["id"];function $qe(t,e,n,r,i,a){return R(),Y("div",{id:r.props.sceneId,class:"grid-item-wrapper"},[It(he(r.GirdItemSkeleton,{class:"pi-skeleton"},null,512),[[Ln,r.showLoading]]),(R(),Re(r.TessSceneCard,Ft({key:r.renderKey,ref:"cardRef"},{...r.tessCardProps},{timezone:r.timezones,style:{opacity:r.showLoading?0:1},onOnOpenSceneHub:r.handleOpenSceneHub}),null,16,["timezone","style"]))],8,Rqe)}const Pqe=Nn(Mqe,[["render",$qe],["__scopeId","data-v-0da73336"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/GridItem.vue"]]),Lqe=1,Nqe=t=>{const{handleGetSceneDetail:e}=Ice(void 0),n=async(b,w)=>{try{const S=await e(b);S.success&&S.data&&(l.value[w]=S.data,f.updateSceneDataValue(b,S.data))}catch(S){console.error(S)}},r=Z(()=>Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore"),i={perPage:10,itemsPerRow:1,totalItems:0,totalPages:1,currentPage:1,loading:!1},a=Ht(i);async function o(){l.value=[],Object.entries(i).forEach(([b,w])=>{a[b]=w}),await s(Lqe)}const s=async(b=1)=>{var D,O;if(a.loading)return;a.loading=!0,a.currentPage=b;const w={...t.value.filterParameter,page:b},S=await t.value.getDataFunction(w),{meta:T,data:_,private_item_count:E}=S;return y(T),g(_),(O=(D=t.value).callbackGetData)==null||O.call(D,T),p.value=E||0,_},l=re([]),c=async()=>{a.isLoadScene=!0,await o(),a.loadedPage=!1},f=tm(),{totalSceneCount:h,privateSceneCount:p}=Pn(f),g=b=>{f.setSceneDataMap(b),b&&(b==null?void 0:b.length)===0?l.value=[]:l.value=[...l.value,...b]},y=b=>{a.totalItems=b.total,a.totalPages=b.last_page,a.currentPage=b.current_page,h.value=b.total,a.loadedPage=!0,a.loading=!1};return{states:a,listData:l,callbackUpdatingMeta:y,callbackUpdateData:g,resetList:c,initList:o,handleUpdateScene:n,loadNextPage:async()=>{a.currentPage<a.totalPages&&await s(a.currentPage+1)},fetchMoreData:s,preferredTimezone:r}},Fqe=Qe({__name:"SceneList",props:{getDataFunction:{type:Function,required:!0},filterParameter:{type:Object,required:!0},callbackUpdateMeta:{type:Function,required:!1},callbackGetData:{type:Function,required:!1},ready:{type:Boolean,required:!0},height:{type:Number,required:!1}},emits:["loaded","metaUpdate","update","needUpdate"],setup(t,{expose:e,emit:n}){const r=n,i=t,a=pu(),o=E=>!!a[E],s=re({}),l=Z(()=>({getDataFunction:i.getDataFunction,filterParameter:i.filterParameter,callbackUpdateMeta:E=>{r("metaUpdate",E),r("loaded")},callbackGetData:E=>{r("loaded",E)}})),{states:c,listData:f,handleUpdateScene:h,loadNextPage:p,resetList:g,initList:y}=Nqe(l),v=(E,D)=>{h(E,D),r("update")};zt(()=>{y()});const b=re(Math.random());Ge(()=>i.filterParameter,async(E,D)=>{i.ready&&JSON.stringify(E)!==JSON.stringify(D)&&await g()},{deep:!0}),e({resetList:g});const w=async()=>{const E=await i.getDataFunction(i.filterParameter,ny);return{signature:E==null?void 0:E.meta["X-Tsr-signature"]}},S=re(""),{needUpdate:T}=ay("",w,S);Ge(T,E=>{E&&r("needUpdate")},{immediate:!0});const _={emits:r,props:i,slots:a,hasSlot:o,mapRender:s,useSceneListProps:l,states:c,listData:f,handleUpdateScene:h,loadNextPage:p,resetList:g,initList:y,_handleUpdateSceneData:v,renderKey:b,getUpdateSignature:w,iniSignature:S,needUpdate:T,get RecycleScroller(){return bC},InfoVisual:Oc,GridItemSkeleton:Vue,GridItem:Pqe};return Object.defineProperty(_,"__isScriptSetup",{enumerable:!1,value:!0}),_}}),Vqe={key:0,class:"empty-list"},Bqe={class:"scene-item"},Uqe={style:{display:"flex","flex-direction":"column",gap:"8px"}};function Wqe(t,e,n,r,i,a){return r.props.ready?(R(),Y("div",{key:r.renderKey,class:Fe(["scene-list-component",{"no-footer":!r.hasSlot("footer"),empty:!r.states.loading&&r.listData.length===0}]),style:_t({"--list-height":`${r.props.height}px`})},[!r.states.loading&&r.listData.length===0?(R(),Y("div",Vqe,[ke(t.$slots,"empty",{listData:r.listData,loadedPage:r.states.loadedPage},()=>[!r.listData.length&&r.states.loadedPage?(R(),Re(r.InfoVisual,{key:0,"visual-name":"NoData2",label:"No results. Try another search.",height:180})):pe("v-if",!0)],!0)])):pe("v-if",!0),he(r.RecycleScroller,{class:"scroller",items:r.listData,"item-size":116,"key-field":"id",style:_t({height:r.props.height+"px"}),buffer:500,onScrollEnd:r.loadNextPage},ji({default:ze(({item:o,index:s})=>[X("div",Bqe,[he(r.GridItem,{id:o.id,"scene-id":o.id,"item-data":o,onLoaded:l=>r.mapRender[o.id]=!0,onUpdateScene:l=>r._handleUpdateSceneData(l,s)},null,8,["id","scene-id","item-data","onLoaded","onUpdateScene"])])]),_:2},[r.states.loading?{name:"after",fn:ze(()=>[X("div",Uqe,[(R(),Y(wt,null,Qt(5,o=>he(r.GridItemSkeleton,{key:o})),64))])]),key:"0"}:void 0]),1032,["items","style","onScrollEnd"])],6)):pe("v-if",!0)}const LW=Nn(Fqe,[["render",Wqe],["__scopeId","data-v-fd835b02"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SceneList.vue"]]),Lq=400,zqe=Qe({__name:"SectionRecentAccess",setup(t,{expose:e}){const n=VC(),r=async T=>{var D;const _=await n.getRecentActivities("recent_activities.accessed_scenes",{...T,per_page:10}),E=_.recent_activities.accessed_scenes;return!T.after_id&&!T.before_id&&(w.value=(D=_.recent_activities.accessed_scenes)==null?void 0:D.meta["X-Tsr-signature"]),E.data=E.data.map(O=>({...O.item})),E},i={},a=re(null),o=()=>{var T;(T=a.value)==null||T.resetList()};e({resetList:o});const s=re(null),{height:l}=hh(s),c=re(!1),f=fr(),{basicInfo:h}=Pn(f);Ge(h,()=>{h.value.id&&(c.value=!0)},{deep:!0,immediate:!0});const p=Z(()=>l.value||Lq),g=ks(),{refreshState:y}=Pn(g),v=()=>{y.value.scene=!0},b=async()=>{var _,E;const T=await n.getRecentActivities("recent_activities.accessed_scenes",ny);return{signature:(E=(_=T==null?void 0:T.recent_activities)==null?void 0:_.accessed_scenes)==null?void 0:E.meta["X-Tsr-signature"]}},w=re("");ay("scene",b,w);const S={peopleCard:n,getRecentAccessScenes:r,filterParameter:i,listRef:a,resetList:o,INITIAL_HEIGHT:Lq,recentlyAccessSceneRef:s,height:l,ready:c,store:f,basicInfo:h,listHeight:p,dashboardStore:g,refreshState:y,handleUpdateScene:v,getUpdateSignature:b,iniSignature:w,InfoVisual:Oc,SceneList:LW};return Object.defineProperty(S,"__isScriptSetup",{enumerable:!1,value:!0}),S}}),jqe={ref:"recentlyAccessSceneRef",class:"recently-access-scene"};function Hqe(t,e,n,r,i,a){return R(),Y("div",jqe,[he(r.SceneList,{ref:"listRef","get-data-function":r.getRecentAccessScenes,"filter-parameter":r.filterParameter,ready:r.ready,class:"no-footer",height:r.listHeight,onUpdate:r.handleUpdateScene},{empty:ze(()=>[he(r.InfoVisual,{"visual-name":"NoData",label:"No activity available.",height:150,width:400})]),_:1},8,["ready","height"])],512)}const Nq=Nn(zqe,[["render",Hqe],["__scopeId","data-v-630eed87"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionRecentAccess.vue"]]),Yqe=({comment_id:t,scene_id:e,callbackUpdate:n,commentData:r,userId:i})=>{const{showErrorSnackbar:a,showSuccessSnackbar:o}=jA(),s=e,l=t,c=async()=>[],f=(D,O)=>(console.error("Error in comment API > useCommentTile:",D),navigator.onLine===!1||D.code=="ERR_NETWORK"?a({label:"Network error."}):a({label:(O==null?void 0:O.label)??"Update failed."}),{success:!1,data:void 0}),h=async D=>{const O={success:!1,data:void 0};try{const V=await xn.assignUserApi(s,l,D);if(V)O.success=!0,O.data=V.data;else throw new Error("reassignUser failed")}catch(V){return f(V)}finally{n()}return O},p=async D=>{let O={success:!1,data:void 0};try{const{page:V,keyword:P}=D,M=await xn.getCommentAssignableUser(s,l,V,P);if(M)O={success:!0,data:{data:M.data.map(C=>({id:C.id,name:C.display_name,profile_image:C.profile_image,shortLabel:C.initial,bgColor:C.color.bgColor,textColor:C.color.textColor})),meta:M.meta}};else throw new Error("Error")}catch(V){return console.error("getAssignableUser",V),O={success:!1,data:void 0},O}return O},g=async D=>{const O={success:!1,data:void 0};try{const V=await xn.assignUserApi(s,l,D[0]);V&&(O.success=!0,O.data=V.data)}catch(V){return f(V)}finally{n()}return O},y=async()=>{const D={success:!1,data:void 0};try{const O=await xn.assignUserApi(s,l,null);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}return D},v=async()=>{const D={success:!1,data:void 0};try{const O=await xn.resolveCommentApi(s,l);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}finally{n()}return D},b=async()=>{const D={success:!1,data:void 0};try{const O=await xn.deleteCommentApi(s,l);if(O)D.success=!0,D.data=O.data,o({label:"Deletion successful."});else throw new Error("Error")}catch(O){f(O,{label:"Deletion failed."})}return D},w=async()=>{const D={success:!1,data:void 0};try{const O=await xn.unResolveCommentApi(s,l);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}finally{n()}return D},S=async D=>{const O={success:!1,data:void 0};try{const{id:V,type:P,reactionType:M}=D;if(P!=="add"||!M)throw new Error("reactionType is required");const C=await xn.reactToComment({scene_id:s,comment_id:V,reaction:M});C&&(O.success=!0,O.data=C.data)}catch(V){return f(V)}finally{n()}return O},T=async D=>{const O=_(),V={success:!1,data:void 0};try{const{id:P,type:M,reactionType:C}=D;if(M!=="replace"||!C||!O)throw new Error("reactionType is required");const F=await xn.updateReactToComment({scene_id:s,comment_id:P,reaction:C,reaction_id:O});F&&(V.success=!0,V.data=F.data)}catch(P){return f(P)}finally{n()}return V},_=()=>{var D,O;return(O=(D=r.emoji_users)==null?void 0:D.find(V=>V.user_id===i))==null?void 0:O.emoji_id};return{reactToComment:S,updateReactComment:T,getMentionableUser:c,deleteReactComment:async()=>{const D=_(),O={success:!1,data:void 0};try{if(!D)throw new Error("emojiId is required");const V=await xn.deleteReactToComment(D);V&&(O.success=!0,O.data=V.data)}catch(V){return f(V)}finally{n()}return O},getAssignableUser:p,assignUser:g,resolveComment:v,deleteComment:b,unResolveComment:w,unassignUser:y,reassignUser:h}},qqe=Qe({__name:"CommentItem",props:{item:{type:Object,required:!0},commentId:{type:String,required:!0},width:{type:Number,required:!1,default:400},renderKey:{type:Number,required:!0}},emits:["commentDeleted","updateComment"],setup(t,{expose:e,emit:n}){e();const r=t,i=fr();uC();const{userInfo:a}=Pn(i),{getEnvVariable:o}=Al(),s=W=>{var j;return{items:((j=W==null?void 0:W.entity_path)==null?void 0:j.map(N=>{const U=Qi({type:N.is_parent_item?"scene_hub":"project",config:{baseDomain:o("BASE_URL"),ws_code:yn(),entity_id:N.id,scene_id:N.is_parent_item?N.id:void 0}}).url;return{name:N.name,url:U,disabled:!0,id:N.id,isHighlight:N.is_parent_item=!0}}))||[],lastItemWidth:200,canCopy:!1,url:""}},l=async({path:W})=>{if(W.length===0)return{message:"",url:""};const H=await xn.downloadFileFromS3({scene_id:yn(),path:W});return H?{url:H.url,message:H.message}:{url:"",message:""}},c=async()=>{const W=r.item.id,H=await xn.getCommentDetail({comment_id:W,scene_id:r.item.item_id});D("updateComment",H)},f=Yqe({comment_id:r.item.id,scene_id:r.item.item_id,callbackUpdate:c,commentData:r.item,userId:a.value.id}),{assignUser:h,getAssignableUser:p,resolveComment:g,deleteComment:y,unResolveComment:v,reactToComment:b,updateReactComment:w,deleteReactComment:S,unassignUser:T,getMentionableUser:_,reassignUser:E}=f,D=n,O=Z(()=>{const W=r.item;return{disabled:!1,readonly:!1,isReplying:!1,selected:!1,searchText:void 0,isResolvedList:!0,currentUser:{id:a.value.id,name:a.value.display_name},commentConfig:{renditionId:W.item_rendition_id||void 0,sceneId:W==null?void 0:W.item_id,entityId:W==null?void 0:W.item_id,wsCode:yn(),commentId:W.id},componentConfig:{isReviewComment:!!W.item_rendition_id,isMyComment:W.ws_creator.user_id==a.value.id,onSceneHub:!1},commentPermission:{canEdit:!1,canDelete:!0,canAssign:!0,canOpenSceneHub:!0,canResolve:!0,canOpenReview:!0},apiFunctions:{assignUser:h,unassignUser:T,reassignUser:E,addReaction:async H=>await b(H),removeReaction:S,replaceReaction:H=>{var N,U;const j=((U=(N=r.item.emoji_users)==null?void 0:N.find(ee=>ee.user_id==a.value.id))==null?void 0:U.emoji_id)||"";return w({...H,emojiId:j})},resolveComment:g,unResolveComment:v,deleteComment:async()=>{const H=await y();return H?(D("commentDeleted",r.item.id),H):{success:!1,data:void 0}},updateComment:()=>new Promise((H,j)=>{setTimeout(()=>{j({success:!1,data:{message:"Error"}})},1500)}),uploadFunction:void 0,getResourceURL:l,getAssignableUser:p,getMentionableUser:_},commentData:{...W}}}),V=hc("switchInstance"),P=Z(()=>{var H,j,N,U,ee,le,_e;const W=((H=r.item)==null?void 0:H.entity_path)||[];return{project:(j=W[0])==null?void 0:j.id,process:(N=W[1])==null?void 0:N.id,episode:(U=W[2])==null?void 0:U.id,take:(ee=W[3])==null?void 0:ee.id,scene:((le=W[4])==null?void 0:le.id)||r.item.item_id,rendition:((_e=W[5])==null?void 0:_e.id)||r.item.item_rendition_id,comment:r.item.id}}),M=(W,H)=>{const{scene:j,rendition:N,comment:U}=P.value;if(r.item.item_rendition_id){const ee=Qi({type:"review_rendition_comment",config:{reviewDomain:o("BASE_REVIEW_URL"),ws_code:yn(),scene_id:j,comment_id:U,rendition_id:N||""}});window.open(ee.url,"_blank")}else{const ee=Qi({type:"hub_comment",config:{baseDomain:o("BASE_URL"),ws_code:yn(),scene_id:j,comment_id:U}});H.ctrlKey||H.metaKey?window.open(ee.url,"_blank"):V?V("scene_hub",{sceneId:j,commentId:U},{showLoading:!1}):window.location.href=ee.url}},F={props:r,store:i,userInfo:a,getEnvVariable:o,createBreadCrumbProp:s,fetchResourceUrl:l,updateCommentTile:c,sceneTileComposable:f,assignUser:h,getAssignableUser:p,resolveComment:g,deleteComment:y,unResolveComment:v,reactToComment:b,updateReactComment:w,deleteReactComment:S,unassignUser:T,getMentionableUser:_,reassignUser:E,emits:D,commentTileProps:O,switchInstance:V,commentEntityConfig:P,handleOnReply:M,handleRedirectToComment:(W,H)=>{M(W,H)},get TessCommentTileCore(){return Tae},get TessBreadcrumb(){return vC}};return Object.defineProperty(F,"__isScriptSetup",{enumerable:!1,value:!0}),F}}),Kqe={class:"breadcrumb"};function Gqe(t,e,n,r,i,a){return R(),Re(r.TessCommentTileCore,Ft(r.commentTileProps,{class:"comment-tile-item",style:{"--comment-tile-width":"100%"},onOnReply:r.handleOnReply,onRedirectToComment:r.handleRedirectToComment}),{breadcrumb:ze(()=>[X("div",Kqe,[he(r.TessBreadcrumb,Ft({...r.createBreadCrumbProp(n.item)},{"can-copy":!1,"number-of-visible-items":3}),null,16)])]),_:1},16)}const Zqe=Nn(qqe,[["render",Gqe],["__scopeId","data-v-a67ebcfc"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentItem.vue"]]),Qqe=Qe({__name:"CommentSkeleton",setup(t,{expose:e}){e();const r={getRandomWidth:()=>Math.floor(Math.random()*71)+30};return Object.defineProperty(r,"__isScriptSetup",{enumerable:!1,value:!0}),r}}),Xqe={class:"skeleton-comment"},Jqe={class:"comment-body"},eKe={class:"body"},tKe={class:"skeleton-details"};function nKe(t,e,n,r,i,a){return R(),Y("div",Xqe,[e[2]||(e[2]=X("div",{class:"skeleton-row bg-white",style:{height:"24px",display:"flex","justify-content":"flex-start","align-items":"center",padding:"8px"}},[X("div",{class:"skeleton-line w-50 animation-skeleton small dark"})],-1)),X("div",Jqe,[e[0]||(e[0]=Vv('<div class="skeleton-row" data-v-b9ff2b95><div class="header w-50" data-v-b9ff2b95><div class="skeleton-avatar animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-details" data-v-b9ff2b95><div class="skeleton-line animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-line animation-skeleton small dark" data-v-b9ff2b95></div></div></div><div class="button-group" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div></div></div>',1)),X("div",eKe,[X("div",tKe,[(R(!0),Y(wt,null,Qt(Math.floor(Math.random()*5)+1,o=>(R(),Y("div",{key:o,class:"skeleton-line animation-skeleton small dark",style:_t({width:`${r.getRandomWidth()}%`})},null,4))),128))])]),e[1]||(e[1]=Vv('<div class="footer" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div></div><div class="footer" data-v-b9ff2b95><div class="button-group" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div></div><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div></div>',2))])])}const rKe=Nn(Qqe,[["render",nKe],["__scopeId","data-v-b9ff2b95"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentSkeleton.vue"]]),Jg=new TS("CommentFile");Jg.version(1).stores({files:"++id, files "});const iKe=()=>{const t=async a=>{await Jg.files.where("id").equals(a.id).first()?await Jg.files.update(a.id,a):await Jg.files.add(a)};return{setCommentFile:t,updateCommentFile:async(a,o)=>{try{await Jg.files.update(a,o)}catch(s){console.error("Error updating comment file",s)}},removeCommentFile:async a=>{try{await Jg.files.where("id").equals(a).delete()}catch(o){console.error("Error removing comment file",o)}},storeCommentFile:(a,o)=>{o.forEach(s=>{t({id:a.id+"_"+s.name,path:s.path,thumbnail:s.thumbnail,url:s.path,type:s.mimetype})})},getCommentFile:async a=>{try{const o=await Jg.files.where("id").equals(a).delete();return console.log("getComment File ",o),o}catch(o){console.error("Error removing comment file",o)}}}},aKe=T_("comment",()=>{const t=re({});return{commentMap:t,updateCommentData:(i,a)=>{t.value[i]={...t.value[i],...a}},setComments:i=>{const a={};i.forEach(o=>{a[o.id]=o}),t.value={...t.value,...a}},getCommentById:i=>t.value[i]}}),oKe=Qe({__name:"CommentList",props:{getData:{type:Function,required:!0},filterParameters:{type:Object,required:!1},loadMore:{type:Boolean,required:!1}},emits:["listDataChange","update","loaded"],setup(t,{expose:e,emit:n}){const r=t,i=re(!0),a=async()=>{var O;p.value=[],i.value=!0;const _=await r.getData({}),E=_.data;f(E,!0),i.value=!1;const D=(O=_.meta)==null?void 0:O.total;b("loaded",D)},o=aKe(),s=re(""),l=re(!0),c=re({}),f=(_,E)=>{if(_.length==0){l.value=!1;return}if(o.setComments(_),_.forEach(D=>{c.value[D.id]=(c.value[D.id]||0)+1,h(D,D.attachments),D.parent&&h(D.parent,D.parent.attachments)}),E){p.value=_,s.value=_[_.length-1].id;return}p.value=[...p.value,..._],s.value=p.value[p.value.length-1].id},{storeCommentFile:h}=iKe(),p=re([]),g=re(null);Wae(g,async()=>{var O;const _=s.value;if(i.value||!l.value)return;i.value=!0;const E=await r.getData({before_id:_}),D=E.data;f(D),i.value=!1,b("loaded",(O=E.meta)==null?void 0:O.total)},{canLoadMore:()=>!i.value&&r.loadMore&&l.value,distance:10});const y=re(!1),v=async()=>{var E;i.value=!0;const _=await r.getData({});f(_.data),y.value=!0,i.value=!1,b("loaded",(E=_==null?void 0:_.meta)==null?void 0:E.total)};zt(async()=>{await v()});const b=n,w=_=>{const E=p.value.findIndex(D=>D.id==_);p.value.splice(E,1),b("listDataChange"),b("update")},S=_=>{const E=p.value.findIndex(D=>D.id==_.id);p.value[E]={...p.value[E],..._},b("update")};e({resetList:a});const T={props:r,loading:i,resetList:a,commentStore:o,lastId:s,canLoadMore:l,renderKey:c,handleDataInsertion:f,storeCommentFile:h,list:p,commentListRef:g,ready:y,init:v,emits:b,deleteComment:w,handleUpdateCommentData:S,CommentItem:Zqe,InfoVisual:Oc,CommentSkeleton:rKe};return Object.defineProperty(T,"__isScriptSetup",{enumerable:!1,value:!0}),T}}),sKe={ref:"commentListRef",class:"recent-comment"},lKe={class:"empty-data"};function uKe(t,e,n,r,i,a){return R(),Y("div",sKe,[r.list.length==0&&!r.loading?ke(t.$slots,"empty",{key:0},()=>[X("div",lKe,[he(r.InfoVisual,{"visual-name":"NoData",label:"No activity available.",height:150})])],!0):pe("v-if",!0),e[0]||(e[0]=Cn()),r.list.length!==0?(R(!0),Y(wt,{key:1},Qt(r.list,o=>(R(),Re(r.CommentItem,{key:`comment_${o.id}_${r.renderKey[o.id]}`,"render-key":r.renderKey[o.id],"comment-id":o.id,item:o,onCommentDeleted:r.deleteComment,onUpdateComment:r.handleUpdateCommentData},null,8,["render-key","comment-id","item"]))),128)):pe("v-if",!0),e[1]||(e[1]=Cn()),r.loading?(R(),Y(wt,{key:2},Qt(3,o=>X("div",{key:o},[he(r.CommentSkeleton)])),64)):pe("v-if",!0)],512)}const rI=Nn(oKe,[["render",uKe],["__scopeId","data-v-bafec57c"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentList.vue"]]),cKe=Qe({__name:"SectionRecentComment",setup(t,{expose:e}){const n=VC(),r=f=>({...f}),i=async f=>{var p,g,y,v,b;const h=await n.getRecentActivities("comments.latest",f);return!f.after_id&&!f.before_id&&(l.value=(g=(p=h==null?void 0:h.comments)==null?void 0:p.latest)==null?void 0:g.meta["X-Tsr-signature"]),{...(y=h==null?void 0:h.comments)==null?void 0:y.latest,data:((b=(v=h==null?void 0:h.comments)==null?void 0:v.latest)==null?void 0:b.data.map(r))||[]}},a=re(null),o=async()=>{var f;(f=a.value)==null||f.resetList()},s=async()=>{var h,p;const f=await n.getRecentActivities("comments.latest",ny);return{signature:(p=(h=f==null?void 0:f.comments)==null?void 0:h.latest)==null?void 0:p.meta["X-Tsr-signature"]}},l=re("");ay("comment_recent",s,l),e({resetList:o});const c={peopleCard:n,convertCommentData:r,getData:i,listRef:a,resetList:o,getUpdateSignature:s,iniSignature:l,CommentList:rI};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function dKe(t,e,n,r,i,a){return R(),Re(r.CommentList,{ref:"listRef","get-data":r.getData,"load-more":!0},null,512)}const BN=Nn(cKe,[["render",dKe],["__scopeId","data-v-d2c94fc0"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionRecentComment.vue"]]),fKe=Qe({__name:"SectionResolvedComment",setup(t,{expose:e}){const n=VC(),r=async p=>{var y,v,b,w,S;const g=await n.getRecentActivities("comments.recently_resolved",p);return!(p!=null&&p.before_id)&&!(p!=null&&p.after_id)&&(f.value=(v=(y=g==null?void 0:g.comments)==null?void 0:y.recently_resolved)==null?void 0:v.meta["X-Tsr-signature"]),{...(b=g==null?void 0:g.comments)==null?void 0:b.recently_resolved,data:((S=(w=g==null?void 0:g.comments)==null?void 0:w.recently_resolved)==null?void 0:S.data)||[]}},i=re(null),a=async()=>{var p;(p=i.value)==null||p.resetList()},o=ks(),{refreshState:s}=Pn(o),l=()=>{s.value.comment_resolved=!0};e({resetList:a});const c=async()=>{var g,y;const p=await n.getRecentActivities("comments.recently_resolved",ny);return{signature:(y=(g=p==null?void 0:p.comments)==null?void 0:g.recently_resolved)==null?void 0:y.meta["X-Tsr-signature"]}},f=re("");ay("comment_resolved",c,f);const h={peopleCard:n,getData:r,listRef:i,resetList:a,dashboardStore:o,refreshState:s,informListChange:l,getUpdateSignature:c,iniSignature:f,CommentList:rI};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}});function hKe(t,e,n,r,i,a){return R(),Re(r.CommentList,{ref:"listRef","get-data":r.getData,"load-more":!0,onListDataChange:r.informListChange},null,512)}const pKe=Nn(fKe,[["render",hKe],["__scopeId","data-v-f0047820"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionResolvedComment.vue"]]),mKe=Qe({__name:"DashboardTabSection",props:{tabs:{type:Array,required:!0}},setup(t,{expose:e}){e();const n={comment_recent:BN,comment_resolved:pKe,rendition:EHe,scene:Nq,people_comment:BN,chart:BN,assigned_scene:Nq},r=t,i=re(r.tabs[0].id);Ks(()=>{i.value=r.tabs[0].id});const a=S=>{i.value=S};Ge(i,(S,T)=>{y.value[S]=!1,y.value[T]=!1});const o=re({comment_recent:null,comment_resolved:null,rendition:null,scene:null,people_comment:null,chart:null,assigned_scene:null}),s=()=>{var T;const S=i.value;S&&y.value[S]!=null&&(y.value[S]=!1,(T=o.value[S])==null||T.resetList())},l=(S,T)=>{o.value[T]=S},c=Z(()=>r.tabs.map(S=>({...S,id:S.id}))),f=fr(),{basicInfo:h}=Pn(f),p=Z(()=>h.value.id);Ge(p,(S,T)=>{S&&S!==T&&Object.keys(o.value).forEach(_=>{var E;(E=o.value[_])==null||E.resetList()})});const g=ks(),{refreshState:y}=Pn(g),v=Z(()=>{const S=i.value;return y.value[S]}),b=Z(()=>{const S=v.value?"Refresh":"",T=v.value?"Change detected. Refresh now.":"Refresh";return{prefixIcon:"ArrowRotate",label:S,size:"small",type:"secondary",prefixTooltip:T,onClick:s}}),w={components:n,props:r,currentTab:i,changeTab:a,componentRef:o,handleRefreshPage:s,handleRefUpdate:l,computedTabs:c,store:f,basicInfo:h,userId:p,dashboardStore:g,refreshState:y,needRefresh:v,refreshBtnArgs:b,get ArboButton(){return Nt},get ArboTabs(){return hC}};return Object.defineProperty(w,"__isScriptSetup",{enumerable:!1,value:!0}),w}}),gKe={class:"tab-sections"},vKe={class:"tab"},yKe={class:"refresh-btn"};function bKe(t,e,n,r,i,a){return R(),Y("div",gKe,[X("div",vKe,[he(r.ArboTabs,{"key-value":"id",tabs:r.computedTabs,value:r.currentTab,class:"arbo-tabs",onInput:r.changeTab},ji({_:2},[Qt(r.computedTabs,o=>({name:`${o.id}`,fn:ze(()=>[o.id==r.currentTab?(R(),Re(wd(r.components[o.id]),{key:0,ref:s=>r.handleRefUpdate(s,o.id)},null,512)):pe("v-if",!0)])}))]),1032,["tabs","value"]),X("div",yKe,[he(r.ArboButton,Ft({...r.refreshBtnArgs},{onClick:r.handleRefreshPage}),null,16)])])])}const _Ke=Nn(mKe,[["render",bKe],["__scopeId","data-v-0ede6907"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/DashboardTabSection.vue"]]),wKe=Qe({__name:"ResizeLayout",props:{minWidthRight:{type:Number,required:!1,default:730},minWidthLeft:{type:Number,required:!1,default:400},layoutName:{type:String,required:!0},mode:{type:String,required:!1,default:"horizontal"},breakPoint:{type:Number,required:!1,default:1024},minHeight:{type:Number,required:!1,default:500},requireHeight:{type:Number,required:!1,default:500},requireRightMargin:{type:Number,required:!1,default:0}},emits:["resized"],setup(t,{expose:e,emit:n}){var H;const r=re(null),i=re(null),a=re(null),o=re(null),s=re(!1),l=t,{height:c}=zae(),f=n,h=Z(()=>l.minWidthRight||730),p=Z(()=>l.minWidthLeft||400),g=Z(()=>y.value<Loe||c.value<700),{width:y}=hh(r),{width:v,height:b}=hh(i),w=Z(()=>v.value),S=Z(()=>b.value),{width:T}=hh(a),_=re(!1),E=re(((H=r.value)==null?void 0:H.offsetWidth)||0),D=()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.classList.add("active"),_.value=!0,E.value=N.offsetWidth)},O=()=>{const j=o.value;!j||!_.value||(_.value=!1,j.classList.remove("active"),fn(()=>{var N,U;f("resized",[(N=i.value)==null?void 0:N.offsetWidth,(U=i.value)==null?void 0:U.offsetWidth]),M()}))},V=j=>{const N=o.value,U=r.value,ee=i.value,le=a.value;if(!(!N||!ee||!le||!U)&&_.value){const _e=U.getBoundingClientRect(),be=j.clientX,Te=_e.left,J=(be-Te)/_e.width;if((1-J)*_e.width<h.value||J*_e.width<p.value)return;const me=_e.width,Ee=J*me-5,Ce=(1-J)*me-5;ee.style.width=`${Ee}px`,le.style.width=`${Ce}px`}},P=()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.addEventListener("mousedown",D),document.addEventListener("mousemove",V),document.addEventListener("mouseup",O))},M=()=>{const j=JSON.stringify({left:v.value,right:T.value});localStorage.setItem("layout_"+l.layoutName,j)},C=()=>{try{const j=localStorage.getItem("layout_"+l.layoutName);if(j){const{left:N,right:U}=JSON.parse(j);i.value&&a.value&&(i.value.style.width=`${N}px`,a.value.style.width=`${U}px`)}}catch(j){console.error("getSavedLayout",j,i.value,a.value)}},F=()=>{_.value&&O()};zt(()=>{P(),fn(()=>{var j,N,U,ee;C(),f("resized",[(j=i.value)==null?void 0:j.offsetWidth,(N=a.value)==null?void 0:N.offsetWidth]),f("resized",[(U=i.value)==null?void 0:U.offsetWidth,(ee=a.value)==null?void 0:ee.offsetWidth]),s.value=!0}),document.addEventListener("resize",F)}),Gs(()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.removeEventListener("mousedown",D),document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",O))}),e({leftPanelRef:i,rightPanelRef:a,leftPanelWidth:v,rightPanelWidth:T});const W={resizingPanelRef:r,leftPanelRef:i,rightPanelRef:a,resizeBar:o,ready:s,props:l,windowHeight:c,emits:f,minWidthRight:h,minWidthLeft:p,isColumnLayout:g,containerWidth:y,leftPanelWidth:v,leftPanelHeight:b,leftWidth:w,leftHeight:S,rightPanelWidth:T,isDragging:_,initialWidth:E,initResize:D,handleFinishResize:O,handleResize:V,init:P,saveCurrentLayout:M,getSavedLayout:C,handleWindowResize:F};return Object.defineProperty(W,"__isScriptSetup",{enumerable:!1,value:!0}),W}}),xKe=["id"],SKe={ref:"resizeBar",class:"resize-layout__resize-bar"};function AKe(t,e,n,r,i,a){return R(),Y("div",{id:`resize-layout-${r.props.layoutName}`,ref:"resizingPanelRef",class:Fe(["resize-layout",[r.props.mode,{"break-layout":r.isColumnLayout}]])},[X("div",{ref:"leftPanelRef",class:Fe(["resize-layout__content flex-1",{"disabled-pointer":r.isDragging}]),style:_t({"min-width":`${r.minWidthLeft}px`,minHeight:`${r.isColumnLayout?r.props.requireHeight:r.props.minHeight}px`})},[r.ready?ke(t.$slots,"left",{key:0,width:r.leftWidth,height:r.leftHeight,ready:r.ready,isColumnLayout:r.isColumnLayout},()=>[e[0]||(e[0]=X("div",{class:"loading-box animation-skeleton"},null,-1))],!0):pe("v-if",!0)],6),X("div",SKe,null,512),X("div",{ref:"rightPanelRef",class:Fe(["resize-layout__content",{"disabled-pointer":r.isDragging}]),style:_t({"min-width":`${r.minWidthRight}px`,minHeight:`${r.props.minHeight}px`,"margin-right":`${r.props.requireRightMargin}px`})},[r.ready?ke(t.$slots,"right",{key:0},()=>[e[1]||(e[1]=X("div",{class:"loading-box animation-skeleton"},null,-1))],!0):pe("v-if",!0)],6)],10,xKe)}const NW=Nn(wKe,[["render",AKe],["__scopeId","data-v-17f7c923"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/layouts/ResizeLayout.vue"]]),kKe=Qe({__name:"PreferencePopup",props:{width:{type:Number,required:!1,default:280},isActive:{type:Boolean,required:!1}},setup(t,{expose:e}){e();const n=t,r=()=>{a.value?o():i()},i=()=>{f(),a.value=!0},a=re(!1),o=()=>{a.value=!1},s=re(null),l=re(null),c=re(null);o4e(s,()=>{o()});const f=()=>{const p=l.value,g=c.value;if(!p||!g)return;const y=p.getBoundingClientRect();g.style.top=`${y.bottom}px`,g.style.left=`${y.left-n.width+y.width}px`,g.style.right=`${window.innerWidth-y.right}px`},h={props:n,togglePreferencePopup:r,openPreferencePopup:i,isOpen:a,closePreferencePopup:o,preferencePopupComponentRef:s,activatorButtonRef:l,preferencePopupRef:c,positioningPopup:f,get ArboButton(){return Nt}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),EKe={ref:"preferencePopupComponentRef",class:"preference-popup-component"};function TKe(t,e,n,r,i,a){return R(),Y("div",EKe,[X("div",{ref:"activatorButtonRef",class:Fe(["activator-button",{active:r.isOpen}])},[ke(t.$slots,"activator",{},()=>[he(r.ArboButton,{class:Fe({highlight:n.isActive}),"prefix-icon":"Gear","prefix-tooltip":"Preference",type:"secondary",label:"",size:"small",onClick:r.togglePreferencePopup},null,8,["class"])],!0)],2),It(X("div",{ref:"preferencePopupRef",class:"preference-popup",style:_t({width:r.props.width+"px"})},[ke(t.$slots,"content",{},void 0,!0)],4),[[Ln,r.isOpen]])],512)}const DKe=Nn(kKe,[["render",TKe],["__scopeId","data-v-6449bd28"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/PreferencePopup.vue"]]),OKe=Qe({__name:"SkeletonLoading",props:{isLoading:{type:Boolean,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0}},setup(t,{expose:e}){e();const n=t,r=Z(()=>({"--card-width":`${n.width}px`,"--card-height":`${n.height}px`})),i={props:n,computedCardStyle:r};return Object.defineProperty(i,"__isScriptSetup",{enumerable:!1,value:!0}),i}});function CKe(t,e,n,r,i,a){return R(),Re(Md,{name:"fade",mode:"out-in"},{default:ze(()=>[n.isLoading?(R(),Y("div",{key:0,class:"card-skeleton animation-skeleton",style:_t(r.computedCardStyle)},null,4)):ke(t.$slots,"default",{key:1},void 0,!0)]),_:3})}const IKe=Nn(OKe,[["render",CKe],["__scopeId","data-v-3e5dcdc8"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SkeletonLoading.vue"]]),MKe=Qe({__name:"SectionTitle",props:{countBtn:{type:Object,required:!1,default:void 0},showRefreshLabel:{type:Boolean,required:!1,default:!1},showRefreshBtn:{type:Boolean,required:!0},title:{type:String,required:!1,default:""},loading:{type:Boolean,required:!1,default:!0},activeFilter:{type:Boolean,required:!1,default:!1}},emits:["refresh"],setup(t,{expose:e,emit:n}){e();const r=pu(),i=f=>!!r[f],a=t,o=re(0),s=n,c={slots:r,hasSlot:i,props:a,renderKey:o,emits:s,refresh:()=>{o.value+=1,s("refresh")},get ArboButton(){return Nt},get TessNonInteractiveChip(){return IS},get ArboTooltip(){return dr},PreferencePopup:DKe,SkeletonLoading:IKe};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}}),RKe={class:"section-title"},$Ke={class:"title"},PKe={class:"actions"},LKe={class:"counting-chip"};function NKe(t,e,n,r,i,a){return R(),Y("div",RKe,[ke(t.$slots,"title",{},()=>[X("div",$Ke,it(n.title),1)],!0),X("div",PKe,[ke(t.$slots,"search",{},void 0,!0),e[0]||(e[0]=Cn()),ke(t.$slots,"refresh",{},()=>[n.showRefreshBtn?(R(),Re(r.ArboTooltip,{key:0,content:n.showRefreshLabel?"Change detected. Refresh now.":"Refresh",delay:[300,0]},{default:ze(()=>[n.showRefreshLabel?(R(),Re(r.ArboButton,{key:r.renderKey,type:"secondary",label:"Refresh","prefix-icon":"ArrowRotate",size:"small",onClick:r.refresh})):(R(),Re(r.ArboButton,{key:r.renderKey+1,type:"secondary",label:"","prefix-icon":"ArrowRotate",size:"small",onClick:r.refresh}))]),_:1},8,["content"])):pe("v-if",!0)],!0),e[1]||(e[1]=Cn()),ke(t.$slots,"count",{},()=>[n.countBtn?(R(),Re(r.ArboTooltip,{key:0,content:n.countBtn.countTooltip,delay:[1e3,0]},{default:ze(()=>[he(r.SkeletonLoading,{"is-loading":r.props.loading,width:50,height:24},{default:ze(()=>[X("div",LKe,[he(r.TessNonInteractiveChip,{label:String(n.countBtn.count||"0"),icon:n.countBtn.icon},null,8,["label","icon"])])]),_:1},8,["is-loading"])]),_:1},8,["content"])):pe("v-if",!0)],!0),e[2]||(e[2]=Cn()),ke(t.$slots,"preferences",{},()=>[r.hasSlot("preference-popup")||r.hasSlot("preference")?(R(),Re(r.PreferencePopup,{key:0,"is-active":n.activeFilter},{content:ze(()=>[ke(t.$slots,"preference-popup",{},void 0,!0)]),_:3},8,["is-active"])):pe("v-if",!0)],!0)])])}const iI=Nn(MKe,[["render",NKe],["__scopeId","data-v-1814b956"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SectionTitle.vue"]]),FKe=Qe({__name:"PeopleHome",setup(t,{expose:e}){e();const n={"assigned-tile":jze,"target-points-tile":tje,"unresolved-tile":ije,"overdue-tile":Zze,"total-completed-tile":qze},r=ks(),{getDashboardData:i}=r,{dashboardData:a}=Pn(r),o=Z(()=>{var V;return["assigned-tile",((V=a.value)==null?void 0:V.point_pool.can_view)?"target-points-tile":void 0,"overdue-tile","unresolved-tile","total-completed-tile"].filter(Boolean)}),s=re(!0),l=[{id:"comment_resolved",name:"Recently resolved",needRefresh:!0},{id:"comment_recent",name:"Recent comments",needRefresh:!0}],c=Z(()=>({"--card-width":`${T.value}px`,"--max-width":`${T.value}px`})),f=[{id:"rendition",name:"New renditions",needRefresh:!0},{id:"scene",name:"Recently accessed scenes",needRefresh:!0}],{height:h}=zae(),p=re(null),g=re(null),y=fr(),{basicInfo:v}=Pn(y),b=re(null),{width:w}=hh(b),S=Z(()=>w.value),T=Z(()=>{const D=w.value,O=Math.min(Math.floor(D/266),5),V=D-(O-1)*16;return Math.floor(V/Math.ceil(O))}),_=RS(async()=>{v.value.id&&(s.value=!0,await i(v.value.id),s.value=!1)},500);Ge(v,()=>{_()},{deep:!0,immediate:!0});const E={components:n,dashboardStore:r,getDashboardData:i,dashboardData:a,tiles:o,isLoading:s,sectionComment:l,computedCardStyle:c,sectionScene:f,windowHeight:h,peopleHomeRef:p,topRef:g,store:y,basicInfo:v,sectionRef:b,width:w,widthSection:S,cardWidth:T,handleRefreshPage:_,DashboardTabSection:_Ke,ResizeLayout:NW,SectionTitle:iI,get BREAKPOINT_RESIZE(){return Loe}};return Object.defineProperty(E,"__isScriptSetup",{enumerable:!1,value:!0}),E}}),VKe={ref:"peopleHomeRef",class:"people-home"},BKe={ref:"topRef",class:"top"},UKe={ref:"sectionRef",class:"section-card-wrapper"},WKe={class:"section-card"};function zKe(t,e,n,r,i,a){return R(),Y("div",VKe,[X("div",BKe,[he(r.SectionTitle,{title:"Summary","show-refresh-btn":!0,onRefresh:r.handleRefreshPage},null,8,["onRefresh"]),X("div",UKe,[X("div",WKe,[(R(!0),Y(wt,null,Qt(r.tiles,o=>(R(),Y("div",{key:o,class:"dashboard-item-wrapper"},[he(Md,{name:"fade",mode:"out-in"},{default:ze(()=>[r.isLoading?(R(),Y("div",{key:0,class:"card-skeleton animation-skeleton",style:_t(r.computedCardStyle)},null,4)):(R(),Re(wd(r.components[o]),{key:1,class:"dashboard-item",style:_t(r.computedCardStyle)},null,8,["style"]))]),_:2},1024)]))),128))])],512)],512),X("div",{class:Fe(["bottom",{"column-layout":r.widthSection<=r.BREAKPOINT_RESIZE||r.windowHeight<700}])},[he(r.ResizeLayout,{"min-width-left":440,"min-width-right":750,"layout-name":"people-home",class:"resize-layout"},{left:ze(()=>[he(r.DashboardTabSection,{tabs:r.sectionComment})]),right:ze(()=>[he(r.DashboardTabSection,{tabs:r.sectionScene})]),_:1,__:[0]})],2)],512)}const jKe=Nn(FKe,[["render",zKe],["__scopeId","data-v-ba194661"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/PeopleHome.vue"]]),HKe=Qe({__name:"ProfileAvatar",props:{bgColor:{type:String,default:"#FFFFFF"},textColor:{type:String,default:"#FFFFFF"},initialName:{type:String,default:""},profileImage:{type:String,default:""}},setup(t,{expose:e}){e();const n=t,r=fr(),i=re(null),a=re(!1);async function o(){if(n.profileImage){a.value=!0;try{const p=await fetch(n.profileImage,{method:"GET"});p.ok?i.value=n.profileImage:(console.error("loadImageSrc: Invalid image URL",p.status),i.value="")}catch(p){console.error("loadImageSrc: Error fetching image:",p),i.value=""}finally{a.value=!1}}else i.value="",a.value=!1}const s=Z(()=>r.basicInfo.private_info),l=Z(()=>{var p,g,y;return((p=s.value)==null?void 0:p.is_offline)===!0?"Logged out from account":((g=s.value)==null?void 0:g.last_active)!==null?"Active in the workspace within the last 10 minutes":((y=s.value)==null?void 0:y.last_active)===null?"No activity in the workspace within the last 10 minutes":""}),c=Z(()=>{var p,g,y;return((p=s.value)==null?void 0:p.is_offline)===!0?"#A6A6A6":((g=s.value)==null?void 0:g.last_active)!==null?"#02C39A":((y=s.value)==null?void 0:y.last_active)===null?"#F7941D":""}),f=Z(()=>({backgroundColor:c.value}));zt(()=>{o()});const h={props:n,store:r,imageUrl:i,isLoadImage:a,loadImageSrc:o,userStatusInfo:s,statusTooltipContent:l,statusBackgroundColor:c,dynamicStyles:f,get TessAvatar(){return _h},get ArboTooltip(){return dr},get ArboSkeletonLoading(){return D_}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),YKe={class:"profile-image"},qKe={class:"profile-image__main--status-avatar"},KKe={class:"profile-image__main"},GKe={key:1};function ZKe(t,e,n,r,i,a){return R(),Y("div",YKe,[X("div",qKe,[he(r.ArboTooltip,{content:r.statusTooltipContent,delay:[300,0],"hide-on-click":!0,placement:"right"},{default:ze(()=>[X("div",{class:"profile-image__main--status-avatar-icon",style:_t(r.dynamicStyles)},null,4)]),_:1},8,["content"])]),X("div",KKe,[r.isLoadImage?(R(),Re(r.ArboSkeletonLoading,{key:0,size:108,width:108,height:108,radius:4,duration:2})):(R(),Y("div",GKe,[he(r.TessAvatar,{class:"profile-image__main--avatar",image:r.imageUrl,label:"","short-label":r.props.initialName,"is-use-short-label":!0,"bg-color":r.props.bgColor,"text-color":r.props.textColor,"disable-hover":!0},null,8,["image","short-label","bg-color","text-color"])]))])])}const QKe=Nn(HKe,[["render",ZKe],["__scopeId","data-v-6855256d"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileAvatar.vue"]]),XKe=Qe({__name:"ProfileInfoDetailFirstSection",setup(t,{expose:e}){e();const n=Ht({filteredData:[],currentPage:1,perPage:10,pageMeta:{},selectedUser:"",searchText:"",isFetching:!1}),r=fr();let i=Ht({isShow:!1}),a=Ht({isShow:!1});const o=re(!1),s=re(!1),l=re(0),c=async(N,U,ee,le="",_e=!1)=>{try{if(n.isFetching)return;n.isFetching=!0;const be=await xn.getUserListProfile(N,U,ee,le),Te=be.data.map(J=>{var me,Ee;return{...J,bg_color:(me=J==null?void 0:J.color)==null?void 0:me.bgColor,text_color:(Ee=J==null?void 0:J.color)==null?void 0:Ee.textColor}});_e?n.filteredData=[...Te]:n.filteredData=[...n.filteredData,...Te],n.pageMeta=be==null?void 0:be.meta,n.currentPage++,n.isFetching=!1}catch(be){console.error("fetchUserProfile error:",be)}};function f(){c(n.currentPage,n.perPage,n.selectedUser,n.searchText)}const h=Z(()=>n.filteredData.length<n.pageMeta.total),p=fr(),{selectedDataId:g}=Pn(p),y=async()=>{n.searchText="",n.currentPage=1,n.filteredData=[],await c(n.currentPage,n.perPage,g.value||"")};function v(N){n.selectedUser=JSON.parse(JSON.stringify(N))}const b=Nae(),{getEnvVariable:w}=Al(),{currentTab:S}=Pn(p),T=w("IS_DETACH");Ge(()=>n.selectedUser,()=>{T||b.replace({name:"PeopleDetail",params:{people_id:n.selectedUser||d5e(),ws_code:yn()},query:{tab:S.value||"home"}})});const _=Z(()=>r.isLoadingFetchData),E=()=>{var U;const N=r.basicInfo;o.value=!0,navigator.clipboard.writeText((U=N==null?void 0:N.user)==null?void 0:U.email).then(()=>{setTimeout(()=>{o.value=!1,i.isShow=!1},1e3)}).catch(ee=>{console.error("Could not copy the email",ee)})},D=()=>{var U;const N=r.basicInfo;s.value=!0,navigator.clipboard.writeText((U=N==null?void 0:N.user)==null?void 0:U.professional_name).then(()=>{setTimeout(()=>{s.value=!1,a.isShow=!1},1e3)}).catch(ee=>{console.error("Could not copy the name",ee)})},O=Z(()=>{let N=yn();return N||""}),V=Z(()=>{var N,U,ee;return r.isLoadingProfile||!((N=r.basicInfo)!=null&&N.user)?"":((ee=(U=r.basicInfo)==null?void 0:U.user)==null?void 0:ee.professional_name)||"Professional name not provided"});function P(N,U){return(N==null?void 0:N.id)===(U==null?void 0:U.id)?U.professional_name===null:!1}function M(){w("BASE_URL")&&(window.parent.location.href=`${w("BASE_URL")}/${O.value}/ac/acc`)}function C(N,U){return N&&N.length>U?N.substring(0,U-3)+"...":N||""}const F=async N=>{n.searchText=N,n.currentPage=1,await c(n.currentPage,n.perPage,n.selectedUser,n.searchText,!0)},W=async()=>{await c(n.currentPage,n.perPage,g.value||""),l.value++};Ge(()=>g.value,N=>{n.selectedUser=N,W()},{immediate:!0,deep:!0}),zt(async()=>{W()}),Ge(n,N=>{!n.filteredData.length&&!N.selectedUser||fr().setSelectedDataId(N.selectedUser===""?n.filteredData[0].id:N.selectedUser)});const H=Z(()=>"Choose a team member to view their profile"),j={states:n,store:r,get showCopyIcon(){return i},set showCopyIcon(N){i=N},get showCopyIconName(){return a},set showCopyIconName(N){a=N},showCopiedEmail:o,showCopiedName:s,componentKey:l,fetchUserProfile:c,loadMoreData:f,enableLoadMore:h,globalStore:p,peopleId:g,resetSearch:y,updateValue:v,router:b,getEnvVariable:w,currentTab:S,isDetach:T,isDisableSelect:_,copyEmail:E,copyName:D,wsCode:O,getProfessionalName:V,checkUserProfile:P,redirectAccountSetting:M,truncateLabel:C,handleSearch:F,init:W,tooltipContent:H,get ArboLabel(){return ea},get ArboTooltip(){return dr},get TessAssigneeSelect(){return k6},get ArboSkeletonLoading(){return D_},get ArboButton(){return Nt},get ArboIcon(){return qn}};return Object.defineProperty(j,"__isScriptSetup",{enumerable:!1,value:!0}),j}}),JKe={class:"info-detail-content"},eGe={class:"info-detail-content__main"},tGe={class:"info-detail-content__main--user-select"},nGe={class:"info-detail-content__main--user-name"},rGe={key:1,class:"detail-row"},iGe={class:"icon-wrapper"},aGe={class:"content-wrapper"},oGe={class:"inline-content"},sGe={key:4,class:"inline-copy-button"},lGe={class:"info-detail-content__main--user-email"},uGe={key:1,class:"detail-row"},cGe={class:"icon-wrapper"},dGe={class:"content-wrapper"},fGe={class:"inline-content"},hGe={key:3,class:"inline-copy-button"};function pGe(t,e,n,r,i,a){var o,s,l,c,f,h,p,g,y,v,b,w,S,T,_,E,D,O,V,P,M,C;return R(),Y("div",JKe,[X("div",eGe,[X("div",tGe,[(R(),Re(r.TessAssigneeSelect,{key:r.componentKey,modelValue:r.states.selectedUser,"onUpdate:modelValue":e[0]||(e[0]=F=>r.states.selectedUser=F),"empty-text":"No results. Try another search.","prepend-height":0,options:r.states.filteredData,"is-dark":!0,disable:r.isDisableSelect,"select-limit":1,"disable-un-select-single-mode":!0,"is-enable-pagination":!1,"is-enable-load-more":r.enableLoadMore,"is-clearable":!1,label:"",placeholder:"Please select a user","value-key":"id","tooltip-display":r.tooltipContent,onSearch:r.handleSearch,onLoadMore:r.loadMoreData,onUpdateValue:r.updateValue,onShown:r.resetSearch},ji({"loading-animation":ze(({})=>[e[6]||(e[6]=X("div",{class:"box-loading absolute"},[X("div",{class:"animation-skeleton"}),X("div",{class:"animation-skeleton"})],-1))]),prepend_list:ze(({})=>[It(X("div",null,null,512),[[Ln,!1]])]),_:2},[r.states.isFetching?{name:"empty_text",fn:ze(({})=>[e[5]||(e[5]=X("div",{class:"box-loading"},[X("div",{class:"animation-skeleton"}),X("div",{class:"animation-skeleton"})],-1))]),key:"0"}:void 0]),1032,["modelValue","options","disable","is-enable-load-more","tooltip-display"]))]),X("div",nGe,[r.store.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:200,width:200,height:21,radius:4,duration:1})):(R(),Y("div",rGe,[he(r.ArboTooltip,{content:((s=(o=r.store.basicInfo)==null?void 0:o.user)==null?void 0:s.professional_name)!==null?"Professional name":"",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[X("div",iGe,[he(r.ArboIcon,{name:"AddressCard"})])]),_:1},8,["content"]),X("div",aGe,[X("div",oGe,[X("div",{class:"name-hover-area",onMouseover:e[1]||(e[1]=F=>r.showCopyIconName.isShow=!0),onMouseleave:e[2]||(e[2]=F=>r.showCopyIconName.isShow=!1)},[(c=(l=r.store.basicInfo)==null?void 0:l.user)!=null&&c.professional_name&&((h=(f=r.store.basicInfo)==null?void 0:f.user)==null?void 0:h.professional_name.length)>25&&!r.showCopiedName?(R(),Re(r.ArboTooltip,{key:0,content:(g=(p=r.store.basicInfo)==null?void 0:p.user)==null?void 0:g.professional_name,delay:[1e3,0],"hide-on-click":!0,style:{"padding-top":"4px"}},{default:ze(()=>{var F,W;return[he(r.ArboLabel,{label:r.truncateLabel((W=(F=r.store.basicInfo)==null?void 0:F.user)==null?void 0:W.professional_name,25),class:"name-label-truncate"},null,8,["label"])]}),_:1},8,["content"])):!r.showCopiedName&&!r.checkUserProfile((y=r.store.basicInfo)==null?void 0:y.user,r.store.userInfo)?(R(),Re(r.ArboLabel,{key:1,label:r.getProfessionalName,class:Fe(["name-label",{"name-label-not-provided":((b=(v=r.store.basicInfo)==null?void 0:v.user)==null?void 0:b.professional_name)===null}])},null,8,["label","class"])):!r.showCopiedName&&r.checkUserProfile((w=r.store.basicInfo)==null?void 0:w.user,r.store.userInfo)?(R(),Re(r.ArboButton,{key:2,class:"update-name-button",label:"Update professional name",type:"tertiary",style:{padding:"4px 0px !important"},onClick:r.redirectAccountSetting})):(R(),Re(r.ArboLabel,{key:3,class:"name-label",label:"Copied"})),r.showCopyIconName.isShow&&((T=(S=r.store.basicInfo)==null?void 0:S.user)!=null&&T.professional_name)&&!r.showCopiedName?(R(),Y("div",sGe,[he(r.ArboTooltip,{content:"Copy",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[he(r.ArboButton,{type:"tertiary","suffix-icon":"Copy",label:"",onClick:r.copyName})]),_:1})])):pe("v-if",!0)],32)])])]))]),X("div",lGe,[r.store.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:200,width:200,height:21,radius:4,duration:1})):(R(),Y("div",uGe,[X("div",cGe,[he(r.ArboIcon,{name:"Email"})]),X("div",dGe,[X("div",fGe,[X("div",{class:"email-hover-area",onMouseover:e[3]||(e[3]=F=>r.showCopyIcon.isShow=!0),onMouseleave:e[4]||(e[4]=F=>r.showCopyIcon.isShow=!1)},[(E=(_=r.store.basicInfo)==null?void 0:_.user)!=null&&E.email&&((O=(D=r.store.basicInfo)==null?void 0:D.user)==null?void 0:O.email.length)>25&&!r.showCopiedEmail?(R(),Re(r.ArboTooltip,{key:0,content:(P=(V=r.store.basicInfo)==null?void 0:V.user)==null?void 0:P.email,delay:[1e3,0],"hide-on-click":!0},{default:ze(()=>{var F,W;return[he(r.ArboLabel,{label:r.truncateLabel((W=(F=r.store.basicInfo)==null?void 0:F.user)==null?void 0:W.email,25),class:"email-label"},null,8,["label"])]}),_:1},8,["content"])):r.showCopiedEmail?(R(),Re(r.ArboLabel,{key:2,class:"email-label",label:"Copied"})):(R(),Re(r.ArboLabel,{key:1,label:((C=(M=r.store.basicInfo)==null?void 0:M.user)==null?void 0:C.email)||"",class:"email-label"},null,8,["label"])),r.showCopyIcon.isShow&&!r.showCopiedEmail?(R(),Y("div",hGe,[he(r.ArboTooltip,{content:"Copy",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[he(r.ArboButton,{type:"tertiary","suffix-icon":"Copy",label:"",onClick:r.copyEmail})]),_:1})])):pe("v-if",!0)],32)])])]))])])])}const mGe=Nn(XKe,[["render",pGe],["__scopeId","data-v-e2811187"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfoDetailFirstSection.vue"]]),gGe=Qe({__name:"LinkProfileCopied",setup(t,{expose:e}){e();const n=re(!1),r=re(!1);function i(h){h.type==="mouseleave"&&setTimeout(()=>{n.value=!1},300)}const a=Z(()=>n.value===!0?"Copied":"Copy link"),{getEnvVariable:o}=Al(),s=fr(),{selectedDataId:l}=Pn(s);function c(){const h=Qi({type:"people_insight",config:{baseDomain:o("BASE_URL"),ws_code:yn(),user_id:String(l.value)||""}});o("BASE_URL")&&navigator.clipboard.writeText(h.url).then(()=>{n.value=!0}).catch(p=>{console.error("Failed to copy: ",p),r.value=!1})}const f={isCopied:n,isCopiedError:r,tooltipEventMouseLeave:i,tooltipContent:a,getEnvVariable:o,globalStore:s,peopleId:l,copyProfileLink:c,get ArboButton(){return Nt},get ArboTooltip(){return dr}};return Object.defineProperty(f,"__isScriptSetup",{enumerable:!1,value:!0}),f}}),vGe={class:"link-profile-button"};function yGe(t,e,n,r,i,a){return R(),Y("div",vGe,[X("div",{class:"link-profile-button__main",onMouseleave:r.tooltipEventMouseLeave},[he(r.ArboTooltip,{class:"link-profile-button__main--content",content:r.tooltipContent,delay:[300,0],"hide-on-click":!1},{default:ze(()=>[he(r.ArboButton,{type:"secondary","suffix-icon":"Link",label:"",onClick:Rt(r.copyProfileLink,["prevent"])})]),_:1},8,["content"])],32)])}const bGe=Nn(gGe,[["render",yGe],["__scopeId","data-v-85be9f0a"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/LinkProfileCopied.vue"]]),_Ge=Qe({__name:"ProfileInfoDetailSecondSection",setup(t,{expose:e}){e();const n=fr(),{isLoadingProfile:r}=Pn(n),i=re("");function a(f,h,p,g="png"){return new Promise(y=>{const v=new Image,b=document.createElement("canvas");b.width=h,b.height=p;const w=b.getContext("2d");w&&(v.onload=()=>{w.drawImage(v,0,0,h,p);const S=b.toDataURL(`image/${g}`);y(S)},v.src=`data:image/svg+xml;base64,${btoa(f)}`)})}const{getEnvVariable:o}=Al();async function s(){const f=o("ASSET_URL")?o("ASSET_URL"):"https://arbodev.s3.ap-south-1.amazonaws.com";if(f){const h=`${f}/icon/general/default-avatar.svg`;try{const p=await fetch(h);if(!p.ok)throw new Error("Failed to load SVG file");const g=await p.text(),y=await a(g,100,100);i.value=y}catch(p){console.error("Error:",p)}}}const l=Z(()=>{const f=n.basicInfo;return f&&f.private_info&&f.private_info.common_team&&f.private_info.common_team.team?f.private_info.common_team.team.map(h=>{const p=h.avatar===null||h.avatar===void 0?i.value:h.avatar;return{...h,avatar:p}}):[]});zt(()=>{s()});const c={store:n,isLoadingProfile:r,defaultAvatar:i,convertSvgToImage:a,getEnvVariable:o,loadAndConvertSVG:s,basicInfoTeam:l,get TessAvatarGroup(){return mC},get ArboSkeletonLoading(){return D_},LinkProfileCopied:bGe};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}}),wGe={class:"info-detail-content"},xGe={class:"info-detail-content__main"},SGe={class:"info-detail-content__content"},AGe={class:"info-detail-content__content--link-copy"},kGe={class:"info-detail-content__content--list-team-group"};function EGe(t,e,n,r,i,a){return R(),Y("div",wGe,[X("div",xGe,[X("div",SGe,[X("div",AGe,[r.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:83,width:83,height:32,radius:4,duration:1})):(R(),Re(r.LinkProfileCopied,{key:1}))]),X("div",kGe,[r.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:88,width:88,height:22,radius:4,duration:1})):(R(),Re(r.TessAvatarGroup,{key:1,"empty-text":"No team",data:r.basicInfoTeam,"label-key":"name","disable-hover":!0,"image-key":"avatar","tooltip-key":"name"},null,8,["data"]))])])])])}const TGe=Nn(_Ge,[["render",EGe],["__scopeId","data-v-9eec8ecc"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfoDetailSecondSection.vue"]]),DGe=Qe({__name:"ProfileInfo",setup(t,{expose:e}){e();const n={FirstSectionInfo:mGe,SecondSectionInfo:TGe};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),OGe={class:"profile-content"},CGe={class:"profile-content__main"},IGe={class:"profile-content__main--first-section"},MGe={class:"profile-content__main--second-section"};function RGe(t,e,n,r,i,a){return R(),Y("div",OGe,[X("div",CGe,[X("div",IGe,[he(r.FirstSectionInfo)]),X("div",MGe,[he(r.SecondSectionInfo)])])])}const $Ge=Nn(DGe,[["render",RGe],["__scopeId","data-v-e4f533f7"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfo.vue"]]),PGe=Qe({__name:"SharedHeader",emits:["loaded"],setup(t,{expose:e,emit:n}){e();const r=fr();let i=1;const a=Ht({isLoading:!1,profileInfo:void 0,permissionList:[]}),{getEnvVariable:o}=Al(),s=async()=>{try{a.isLoading=!0,Dd.setSessionCookie("ws.user-access-id",r.selectedDataId);const p=await xn.getUserBasicInfo(r.selectedDataId);r.setSelectedDataProfile(p),i_.remove("account.last_access_url_people_tile",{domain:o("BASE_DOMAIN_COOKIE")})}catch(p){a.isLoading=!1,console.error("fetchBasicInfo",p)}finally{a.isLoading=!1}},l=async()=>{try{const p=await xn.getUserPermission();r.setPermission(p)}catch(p){console.error("fetchUserPermission",p)}},c=async()=>{try{const p=await xn.getUserProfile();r.setUserInfo(p)}catch(p){console.error("fetchUserProfile",p)}},f=n;zt(async()=>{await c(),l(),setTimeout(()=>{f("loaded")},3e3)}),Ge(()=>r.selectedDataId,p=>{p&&setTimeout(()=>{p&&s()},300)},{immediate:!0,deep:!0}),Ge(()=>r.basicInfo,p=>{p&&(a.profileInfo=p,i++)},{deep:!0}),Ge(()=>a.isLoading,p=>{r.setIsLoadingProfile(p)},{deep:!0});const h={store:r,get componentKey(){return i},set componentKey(p){i=p},state:a,getEnvVariable:o,fetchBasicInfo:s,fetchUserPermission:l,fetchUserProfile:c,emits:f,get ArboSkeletonLoading(){return D_},ProfileAvatar:QKe,ProfileInfo:$Ge};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),LGe={class:"header-content"},NGe={class:"header-content__main"},FGe={class:"header-content__profile-image"},VGe={class:"header-content__profile-image--content"},BGe={class:"header-content__profile-info"},UGe={class:"header-content__profile-info--content"};function WGe(t,e,n,r,i,a){var o,s,l,c,f,h;return R(),Y("div",LGe,[X("div",NGe,[X("div",FGe,[X("div",VGe,[r.state.isLoading?(R(),Re(r.ArboSkeletonLoading,{key:0,size:108,width:108,height:108,radius:4,duration:1})):(R(),Re(r.ProfileAvatar,{key:r.componentKey,"profile-image":(o=r.state.profileInfo)==null?void 0:o.profile_image,"text-color":(l=(s=r.state.profileInfo)==null?void 0:s.color)==null?void 0:l.textColor,"bg-color":(f=(c=r.state.profileInfo)==null?void 0:c.color)==null?void 0:f.bgColor,"initial-name":(h=r.store.basicInfo)==null?void 0:h.initial},null,8,["profile-image","text-color","bg-color","initial-name"]))])]),X("div",BGe,[X("div",UGe,[he(r.ProfileInfo)])])])])}const zGe=Nn(PGe,[["render",WGe],["__scopeId","data-v-b176f8be"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/SharedHeader.vue"]]),jGe=Qe({__name:"MenuTab",setup(t,{expose:e}){e();const n=fr(),{currentTab:r}=Pn(n),i=Fae();Ks(()=>{var l;if(Al().getEnvVariable("IS_DETACH"))return;const s=(l=i==null?void 0:i.query)==null?void 0:l.tab;s&&a.value.findIndex(c=>c.id==s)&&(r.value=s)});const a=Z(()=>[{id:"people-home",name:"",content:"",tooltipName:"Summary",icon:"House"},{id:"people-scenes",name:"",content:"",tooltipName:"Assigned scenes",icon:"PhotoVideo"},{id:"people-charts",name:"",content:"",tooltipName:"Charts",icon:"ChartPie"},{id:"people-comments",name:"",content:"",tooltipName:"Assigned Comments",icon:"Comments"},{id:"report-tab",name:"",content:"",tooltipName:"Reports",icon:"File"}]),o={store:n,currentTab:r,route:i,tabsListType:a,get ArboTabs(){return hC}};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}});function HGe(t,e,n,r,i,a){return R(),Re(r.ArboTabs,{tabs:r.tabsListType,position:"left",value:r.currentTab,onInput:e[0]||(e[0]=o=>r.currentTab=o)},null,8,["tabs","value"])}const YGe=Nn(jGe,[["render",HGe],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/MenuTab.vue"]]),qGe=Qe({__name:"SectionLayout",props:{layout:{type:Object,required:!1}},setup(t,{expose:e}){e();const n=pu(),a={slots:n,hasSlots:o=>n[o]!==void 0,props:t};return Object.defineProperty(a,"__isScriptSetup",{enumerable:!1,value:!0}),a}});function KGe(t,e,n,r,i,a){var o;return R(),Y("div",{class:Fe(["layout-section",{"no-footer":!r.hasSlots("footer")}]),style:_t({"--layout":r.props.layout?`${r.props.layout.header}px ${r.props.layout.content}px ${r.props.layout.footer}px`:void 0})},[It(X("div",{class:"header",style:_t({height:(o=n.layout)!=null&&o.footer?n.layout.header+"px":void 0})},[ke(t.$slots,"header",{},()=>[e[0]||(e[0]=Cn(" header ",-1))],!0)],4),[[Ln,r.hasSlots("header")]]),ke(t.$slots,"content",{},()=>{var s,l;return[It(X("div",{class:"body",style:_t({height:(s=n.layout)!=null&&s.footer?n.layout.body+"px":void 0})},[ke(t.$slots,"body",{},()=>[e[1]||(e[1]=Cn("body",-1))],!0)],4),[[Ln,r.hasSlots("body")]]),It(X("div",{class:"footer",style:_t({height:(l=n.layout)!=null&&l.footer?n.layout.footer+"px":void 0})},[ke(t.$slots,"footer",{},()=>[e[2]||(e[2]=Cn(" footer ",-1))],!0)],4),[[Ln,r.hasSlots("footer")]])]},!0)],6)}const Mce=Nn(qGe,[["render",KGe],["__scopeId","data-v-73dfa5d2"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/layouts/SectionLayout.vue"]]);function o5(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function GGe(t){if(Array.isArray(t))return o5(t)}function Fq(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(c){return void n(c)}s.done?e(l):Promise.resolve(l).then(r,i)}function ZGe(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Fq(a,r,i,o,s,"next",l)}function s(l){Fq(a,r,i,o,s,"throw",l)}o(void 0)})}}function QGe(t,e,n){return(e=rZe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function XGe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function JGe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
209
209
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vq(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function eZe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Vq(Object(n),!0).forEach(function(r){QGe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vq(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function s5(){s5=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=typeof Symbol=="function"?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(M,C,F,W){return Object.defineProperty(M,C,{value:F,enumerable:!W,configurable:!W,writable:!W})}try{l({},"")}catch{l=function(C,F,W){return C[F]=W}}function c(M,C,F,W){var H=C&&C.prototype instanceof p?C:p,j=Object.create(H.prototype);return l(j,"_invoke",function(N,U,ee){var le=1;return function(_e,be){if(le===3)throw Error("Generator is already running");if(le===4){if(_e==="throw")throw be;return{value:t,done:!0}}for(ee.method=_e,ee.arg=be;;){var Te=ee.delegate;if(Te){var J=E(Te,ee);if(J){if(J===h)continue;return J}}if(ee.method==="next")ee.sent=ee._sent=ee.arg;else if(ee.method==="throw"){if(le===1)throw le=4,ee.arg;ee.dispatchException(ee.arg)}else ee.method==="return"&&ee.abrupt("return",ee.arg);le=3;var me=f(N,U,ee);if(me.type==="normal"){if(le=ee.done?4:2,me.arg===h)continue;return{value:me.arg,done:ee.done}}me.type==="throw"&&(le=4,ee.method="throw",ee.arg=me.arg)}}}(M,F,new V(W||[])),!0),j}function f(M,C,F){try{return{type:"normal",arg:M.call(C,F)}}catch(W){return{type:"throw",arg:W}}}e.wrap=c;var h={};function p(){}function g(){}function y(){}var v={};l(v,a,function(){return this});var b=Object.getPrototypeOf,w=b&&b(b(P([])));w&&w!==n&&r.call(w,a)&&(v=w);var S=y.prototype=p.prototype=Object.create(v);function T(M){["next","throw","return"].forEach(function(C){l(M,C,function(F){return this._invoke(C,F)})})}function _(M,C){function F(H,j,N,U){var ee=f(M[H],M,j);if(ee.type!=="throw"){var le=ee.arg,_e=le.value;return _e&&typeof _e=="object"&&r.call(_e,"__await")?C.resolve(_e.__await).then(function(be){F("next",be,N,U)},function(be){F("throw",be,N,U)}):C.resolve(_e).then(function(be){le.value=be,N(le)},function(be){return F("throw",be,N,U)})}U(ee.arg)}var W;l(this,"_invoke",function(H,j){function N(){return new C(function(U,ee){F(H,j,U,ee)})}return W=W?W.then(N,N):N()},!0)}function E(M,C){var F=C.method,W=M.i[F];if(W===t)return C.delegate=null,F==="throw"&&M.i.return&&(C.method="return",C.arg=t,E(M,C),C.method==="throw")||F!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+F+"' method")),h;var H=f(W,M.i,C.arg);if(H.type==="throw")return C.method="throw",C.arg=H.arg,C.delegate=null,h;var j=H.arg;return j?j.done?(C[M.r]=j.value,C.next=M.n,C.method!=="return"&&(C.method="next",C.arg=t),C.delegate=null,h):j:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,h)}function D(M){this.tryEntries.push(M)}function O(M){var C=M[4]||{};C.type="normal",C.arg=t,M[4]=C}function V(M){this.tryEntries=[[-1]],M.forEach(D,this),this.reset(!0)}function P(M){if(M!=null){var C=M[a];if(C)return C.call(M);if(typeof M.next=="function")return M;if(!isNaN(M.length)){var F=-1,W=function H(){for(;++F<M.length;)if(r.call(M,F))return H.value=M[F],H.done=!1,H;return H.value=t,H.done=!0,H};return W.next=W}}throw new TypeError(typeof M+" is not iterable")}return g.prototype=y,l(S,"constructor",y),l(y,"constructor",g),g.displayName=l(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(M){var C=typeof M=="function"&&M.constructor;return!!C&&(C===g||(C.displayName||C.name)==="GeneratorFunction")},e.mark=function(M){return Object.setPrototypeOf?Object.setPrototypeOf(M,y):(M.__proto__=y,l(M,s,"GeneratorFunction")),M.prototype=Object.create(S),M},e.awrap=function(M){return{__await:M}},T(_.prototype),l(_.prototype,o,function(){return this}),e.AsyncIterator=_,e.async=function(M,C,F,W,H){H===void 0&&(H=Promise);var j=new _(c(M,C,F,W),H);return e.isGeneratorFunction(C)?j:j.next().then(function(N){return N.done?N.value:j.next()})},T(S),l(S,s,"Generator"),l(S,a,function(){return this}),l(S,"toString",function(){return"[object Generator]"}),e.keys=function(M){var C=Object(M),F=[];for(var W in C)F.unshift(W);return function H(){for(;F.length;)if((W=F.pop())in C)return H.value=W,H.done=!1,H;return H.done=!0,H}},e.values=P,V.prototype={constructor:V,reset:function(M){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!M)for(var C in this)C.charAt(0)==="t"&&r.call(this,C)&&!isNaN(+C.slice(1))&&(this[C]=t)},stop:function(){this.done=!0;var M=this.tryEntries[0][4];if(M.type==="throw")throw M.arg;return this.rval},dispatchException:function(M){if(this.done)throw M;var C=this;function F(le){j.type="throw",j.arg=M,C.next=le}for(var W=C.tryEntries.length-1;W>=0;--W){var H=this.tryEntries[W],j=H[4],N=this.prev,U=H[1],ee=H[2];if(H[0]===-1)return F("end"),!1;if(!U&&!ee)throw Error("try statement without catch or finally");if(H[0]!=null&&H[0]<=N){if(N<U)return this.method="next",this.arg=t,F(U),!0;if(N<ee)return F(ee),!1}}},abrupt:function(M,C){for(var F=this.tryEntries.length-1;F>=0;--F){var W=this.tryEntries[F];if(W[0]>-1&&W[0]<=this.prev&&this.prev<W[2]){var H=W;break}}H&&(M==="break"||M==="continue")&&H[0]<=C&&C<=H[2]&&(H=null);var j=H?H[4]:{};return j.type=M,j.arg=C,H?(this.method="next",this.next=H[2],h):this.complete(j)},complete:function(M,C){if(M.type==="throw")throw M.arg;return M.type==="break"||M.type==="continue"?this.next=M.arg:M.type==="return"?(this.rval=this.arg=M.arg,this.method="return",this.next="end"):M.type==="normal"&&C&&(this.next=C),h},finish:function(M){for(var C=this.tryEntries.length-1;C>=0;--C){var F=this.tryEntries[C];if(F[2]===M)return this.complete(F[4],F[3]),O(F),h}},catch:function(M){for(var C=this.tryEntries.length-1;C>=0;--C){var F=this.tryEntries[C];if(F[0]===M){var W=F[4];if(W.type==="throw"){var H=W.arg;O(F)}return H}}throw Error("illegal catch attempt")},delegateYield:function(M,C,F){return this.delegate={i:P(M),r:C,n:F},this.method==="next"&&(this.arg=t),h}},e}function tZe(t){return GGe(t)||XGe(t)||iZe(t)||JGe()}function nZe(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function rZe(t){var e=nZe(t,"string");return typeof e=="symbol"?e:e+""}function iZe(t,e){if(t){if(typeof t=="string")return o5(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o5(t,e):void 0}}/*!
|
|
210
210
|
* @kurkle/color v0.3.4
|
|
211
211
|
* https://github.com/kurkle/color#readme
|