@arbocollab/arbo-web-people 0.1.85-alpha.10 → 0.1.85-alpha.11
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 +2 -2
- package/es/index.es.js +2 -2
- package/npmjs.npmrc +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/umd/index.umd.js +2 -2
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+HrwAAALRFwAJGN0Spg4OD9Pjx43W0uh6p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ELIoRrwAAAGIQsaiNgEUR4hUAAEAsIhY1EbCYnHgFAAAQk4hFLQQsJiVeAQAAxCZiUQMBi8mIVwAAAHUQsYhOwGIS4hUAAEBdcsTKz3GLxSJBNAIWoxOvAAAA6nRwcCBiEZKAxajEKwAAgLotl0sRi3AELEYjXgEAALRBxCIaAYtRiFcAAABtEbGIRMBib+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/5R4FAYIPDGhsbGQubmDUR30uN07uSrcMcuqufqrouGLQJe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AAAD6ImIxJwGLrYlXAAAAfRKxmIuAxVbEKwAAgL6JWMxBwGJj4hUAAACZiEVpAhYbEa8AAAC4Lkes8/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
|